[antlr-interest] Re: lexer "modes" for XML parsing etc...
Terence Parr
parrt at cs.usfca.edu
Sun Nov 20 13:25:35 PST 2005
On Nov 20, 2005, at 1:36 PM, Micheal J wrote:
> OK. I was trying to contrast it with an all-in-one hand-coded
> lexer+preprocessor Kunle & I built where there is a int to store
> the current
> state (or lexing context/mode if you will) and, GetNextToken()
> switch()-es
> on the current_lexer_state_int to determine which of a number of
> NextToken_XXX() methods to delegate to.
>
> This sounds like what we're now planning for ANTLR 3. Is it?
Yeah, something like this could be convenient even if people will
sometimes use it when they should be using a rule reference (like for
matching Strings, etc...)
Ter
More information about the antlr-interest
mailing list