[antlr-interest] (unknown)

franck_antibes_fr caronfranck at yahoo.fr
Tue Jun 10 01:52:39 PDT 2003


Hi all.




I have a problem with the lexer : 




I have several lexer rules to detect some tokens. that's OK


but I want to create a rules for any token that do not match 


the previous rules. In PCCTS there was a "precedence" in lexer rules 


so that I could have a rule (.)  at the end of all the rule and 


if none of the previous one matched this one will. 


I tryed to use the filter=OTHERTOKEN option (OTHERTOKEN is a private 
rule) in the antlr parser but this prevent the lexer to throw 
exception if the char do not match any rules and match OTHERTOKEN but 
do not create token in the token stream






Is there a way to handle this without writing an long complex rule for 
OTHERTOKEN?






TIA,


Franck




 



 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list