[antlr-interest] Re: ANTLR 3: Lexer problem
Oliver Zeigermann
oliver.zeigermann at gmail.com
Mon Sep 12 07:58:12 PDT 2005
Hi Martin!
2005/9/12, Martin Probst <mail at martin-probst.com>:
> are you sure it's a good idea to do this XML parsing in the lexer? It
> should be really trivial in the parser (as XML is indeed more or less
> trivial to parse). Is there a specific reason to do so?
Why not? ;) Besides, AFAIK an XML parser in ANTLR isn't actually
trivial. You would at least need sematic predicates (somehow
incomplete in ANTLR 3), or more than one grammar.
Any better ideas?
> If you increase your Lexer's k to 2 this should (theoretically) work. If
> it doesn't, I would opt for a bug in ANTLR.
How do you set the lookahead in ANTLR 3?
Oliver
More information about the antlr-interest
mailing list