[antlr-interest] Simple grammar with error
Johannes Luber
jaluber at gmx.de
Sat Sep 15 15:18:30 PDT 2007
Cédric Berger wrote:
> Alfonso wrote:
>
>> PLUS : '+';
>> MINUS : '-';
>> DIVIDE : '/';
>> ASTERISK : '*';
>>
>> OPEN_PAREN : '(' ;
>> CLOSE_PAREN: ')' ;
>
> I keep wondering why people do that...
> Is that just to obfuscate the grammar and make it less readable
> or is there a real rationale here?
>
> Cedric
>
Only if you separate lexer and parser grammars. Otherwise it's better to
use the implicit token variety.
Best regards,
Johannes Luber
More information about the antlr-interest
mailing list