English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] ocamllex/yacc question...
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ 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...

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 


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