Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
using different lexers with one parser?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-04-18 (10:01)
From: Oliver Bandel <oliver@f...>
Subject: Re: [Caml-list] using different lexers with one parser?
On Wed, Apr 18, 2007 at 09:38:20AM +0200, Hendrik Tews wrote:
> Oliver Bandel <> writes:
>    Is it possible (without too much effort) to switch
>    the lexer during parsing (from within the parser)?
> Yes, see

OK; I hoped to find a solution without the global-switching-var hacks;
something that is built in in ocamlyacc.

Maybe formy purposes then it's better to write my own
parser and call ocamllex-generated functions directly.

> The main problem is the lookahead token.

OK; then I better hackmy own parser.
As the fileformat is not too hard,
this should be the better way.