[antlr-interest] SL_COMMENT rule from java.g example
rradh at yahoo.com
rradh at yahoo.com
Mon Nov 19 05:50:59 PST 2001
Hi,
I have the same definition of the SL_COMMENT rule (from java.g in the
examples/cpp/java/ directory), in my language.
SL_COMMENT
: "//"
(~('\n'|'\r'))* ('\n'|'\r'('\n')?)
{$setType(ANTLR_USE_NAMESPACE(antlr)Token::SKIP); newline();}
;
The language is "Cpp".
The problem I am having is that if there is no terminating '\n' in a
single line comment. I get an "Abort" message and the program
terminates, despite the presence of '\n' being optional.
Regards
Rajesh
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list