[antlr-interest] Keywords management in lexer with ANTLR v3
Matthieu Moy
Matthieu.Moy at grenoble-inp.fr
Mon Oct 1 07:26:32 PDT 2012
Hi,
I'm wondering what is the recommended way to manage keywords in a lexer.
I read about testLiterals in ANTLRv2, which disapeared in ANTLRv3. Does
this mean that the "brute force", doing e.g.
FOR: 'for'
WHILE: 'while'
IF: 'if'
...
(my language also have identifiers)
became as efficient as a dictionary-based approach? Is there any other
way?
Thanks in advance,
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
More information about the antlr-interest
mailing list