[antlr-interest] Good practice for grammar with translated keywords
Jim Idle
jimi at temporal-wave.com
Thu Mar 12 10:57:00 PDT 2009
Olivier THIERRY wrote:
> 2009/3/12 Olivier THIERRY <olivier.thierry at gmail.com>:
>
>>> s,
>>>
>>> Jim
>>> PS: You will probably find the superclass stuff easiest if you are not
>>> familiar with lexers or implementing ANTLR lexers by hand.
>>>
> I tried it and it works great !
> Note I wrote all code in @members part instead of using a superclass
> for lexer because this superclass can't compile because it misses
> constants defined fotr tokens.
>
> Thanks a lot for your help.
>
> Olivier
>
You can leave it that way if you like of course but you reference tokens
from the superclass by referencing the subclass in your abstract
superclass: myLexer.IF and so on;
Jim
More information about the antlr-interest
mailing list