Browse thread
[Caml-list] ocamllex/yacc question...
- Micha
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2004-09-17 (17:15) |
From: | Micha <micha-1@f...> |
Subject: | [Caml-list] ocamllex/yacc question... |
Hi, I have a little scanning/parsing problem and the solution which I tried was to have empty productions in the grammar, which switch the lexer (setting a ref to the new lexer function), like that: use_lexer_1 : { switch_lexer 1 } use_lexer_2 : { switch_lexer 2 } special_id: use_lexer_1 token use_lexer_2 { ... } ... This does not work, I think because of the look ahead. Is there another solution to this (to switch lexing rules) ? Or is this a completly wrong idea? thanks Michael ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners