[antlr-interest] Re: Enhance ANTLR to support comments?

atripp54321 atripp at comcast.net
Mon Jul 21 08:09:22 PDT 2003


*sigh* 

Sure enough, the hidden token stream stuff
(http://antlr.org/doc/streams.html)
is just about exactly what I'm asking for.
You guys are way ahead of me :)

I am going to keep the comments separate from the
normal lexing and parsing. The AST that's
associated with a comment may be long gone by the time
I'm done with the tree. Or, as Monty points out, it may
be gone before I even get started.

Instead, I'll try to keep an informal description of the
statement that the comment goes with e.g. "this comment goes
before the third 'else if' clause in function f()".
I know, it sure won't work perfectly, but this seems like
the "least-worst" solution.

Andy


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list