[antlr-interest] Simple grammar with error

Randall R Schulz rschulz at sonic.net
Sat Sep 15 15:27:40 PDT 2007


On Saturday 15 September 2007 15:18, Johannes Luber wrote:
> Cédric Berger wrote:
> > ...
> >>
> >> 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.

Why is it better not to define names for fixed terminals?


> ...
> Johannes Luber


Randall Schulz


More information about the antlr-interest mailing list