[antlr-interest] Re: Continuing problem with # directives
uprightness_of_character
andrei at metalanguage.com
Thu May 15 11:04:20 PDT 2003
> I create a newline token called EOL, and then when my parser
constructs
> its tree it doesn't bother putting it in the tree. Would that work?
>
> Or maybe a parser rule that recognises and dumps EOL.
That would complicate the parser a lot, given that EOL in C can appear
pretty much anywhere. So I'd have to write:
while_stmt : "while" (EOL)? LPAR (EOL)? expression (EOL)? RPAR (EOL)?
statement ;
Is this what you're referring to?
Andrei
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list