[antlr-interest] Re: Parsing Nested Multi-line text

Xue Yong Zhi seclib at seclib.com
Tue Feb 28 10:55:34 PST 2006


Xue Yong Zhi wrote:

> 
> Are you aware you are parsing heredoc?
> 
> In my ruby antlr parser, I overwrite the generated lexer. The lexer will 
> maitain states so that it can switch from "normal" mode to "heredoc 
> content" mode.
> 


Oops, should be "override".

btw, since heredoc content can be anything, I think overriding 
nextToken() is the only way to handle heredoc with antlr. If you have 
other good ideas let me know.


-- 
Xue Yong Zhi
http://seclib.blogspot.com



More information about the antlr-interest mailing list