[antlr-interest] "Contextual lexing": Ideas on "nested parsers" and "lexing parsers."
Keith Whittingham
kwhittingham at gmail.com
Tue Nov 27 10:03:02 PST 2007
I went through this pain a couple of years back. In the end I gave up with
generators and hand code a 'syntax driven lexer'. I just passed context
change directives through the nextToken() method. Personally I liked this
approach a lot. A purist might comment that the split between the lexer
and parser is broken but I don't think so - quite the opposite.
On Tue, 27 Nov 2007 15:52:57 +0100, Steve Bennett <stevagewp at gmail.com>
wrote:
> but it's actually an improvement on what there was before? I keep
> wishing that the lexer was an on-demand stream that could be told to
> relex tokens when required.
>
More information about the antlr-interest
mailing list