[antlr-interest] ANTLR equivalent of JavaCC Lexer behaviour?

Micheal J open.zone at virgin.net
Mon Mar 27 18:23:12 PST 2006

> Robert,
> Fair enough.
> So would I be right in thinking that the JavaCC Lexer is 
> implemented quite differently?

Yes, it's implemented as a traditional [D]FA-based recognizer afaict. ANTLR
lexers are LL recognizers.

> That there is no ANTLR 
> equivalent (either now or planned, though I guess that is a 
> question for Ter)?

You can continue as you are doing and [re-]write/massage your grammar for
ANTLR lexing. Or you could try using JFlex/CsFlex. They also generate
DFA-based recognizers but, these recognizers can be easily interfaced with
ANTLR. ANTLR 2.7.6 includes an example (in C#) of using CsFlex and an ANTLR
parser. It is called 'csharp_v1'.



More information about the antlr-interest mailing list