[antlr-interest] please help on lexer rules antlr v3

Michiel Vermandel Michiel_Vermandel at axi.be
Fri Sep 29 07:41:09 PDT 2006


John,

Sorry, I forgot to mention that I reduced my test string to "--axi.reject"
, so without the space.
I have done this to strip out every part that is not really crucial.
So even with the "--axi.reject"  test string the grammar I have sent in my 
previous mail results in an EarlyExitException...

I tried as wel to change the rule  to 
SL_COMMENT:  '--' ( ((TAB|SPACE)* ('axi.locate' | 'axi.reject')) | ( 
ANYTHING_2_EOL { channel=90; }) );
but the problem remains...


Please help?







"John B. Brodie" <jbb at acm.org> 
Sent by: antlr-interest-bounces at antlr.org
29/09/2006 15:33

To
Michiel_Vermandel at axi.be
cc
antlr-interest at antlr.org
Subject
Re: [antlr-interest] please help on lexer rules antlr v3






>Can you please tell why this modified grammar acts in just the same way 
as 
>the previous?

You forgot to allow for whitespace between the '--' and 'axi...'

Your modified grammar accepts "--axi.reject".
   -jbb

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20060929/2ade791b/attachment.html 


More information about the antlr-interest mailing list