[antlr-interest] newbie question: single line comments?
clocKwize
clocKwize at blueyonder.co.uk
Tue Jun 8 09:05:56 PDT 2004
Hi, I'm just playing at the moment, but I'm doing a single line comment
rule, I have (taken from tinyc example):
SL_COMMENT: "//"
(~'\n')* '\n'
{ _ttype = antlr::Token::SKIP; newline(); }
;
Which is fine, unless, the is a single line comment on the last line, then
\n is never encountered, but EOF is, I think I need to do:
(~'\n')* ('\n' | EOF)
But what is EOF? I can't figure it out.
Thanks.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list