[antlr-interest] Using other lexer generator with ANTLR 3

Terence Parr parrt at cs.usfca.edu
Wed Mar 7 17:58:32 PST 2007

On Mar 7, 2007, at 2:56 PM, FranklinChen at cmu.edu wrote:

> I have ANTLR 2 projects that use a different lexer generator, e.g.,
> JFlex, for reasons of performance and features (especially lexical
> states).  It was trivial to hook up the JFlex-generated lexer with
> ANTLR 2 generated parsers, by means of "implements TokenStream" and
> just having ANTLR's nextToken() call JFlex's yylex().
> But I see that in ANTLR 3, TokenStream is much, much more involved.  I
> presume that there is therefore no plan to support non-ANTLR lexers to
> use with ANTLR 3 parsers?

Use TokenSource :)  It's the new equiv.


More information about the antlr-interest mailing list