[antlr-interest] ANTLR3 Nested parser

Bertalan Fodor (LilyPondTool) lilypondtool at organum.hu
Tue Jan 22 23:49:40 PST 2008


> The trouble with using the nested parser to detect the extents is by 
> the time it runs the nested lexer will have already processed the 
> entire input stream producing errors you would have to ignore.
Yes, now I can see that can be an issue. Originally I was thinking about 
subclassing the character and/or token stream to provide rewinding that 
is better suited for me, but I think I will go with that fragment lexer 
solution. That will at last render into Harald's original suggestion, 
ie. to handle that fragment as a single String.

Thanks,

Bert


More information about the antlr-interest mailing list