[antlr-interest] end of file
clocKwize
clocKwize at blueyonder.co.uk
Sun Jul 11 15:56:50 PDT 2004
Hi there, I'm trying to implement single line comments, which is fine, I
use:
SL_COMMENT: "//" (~EOL)* EOL;
protected
EOL: '\n' | '\r' | ('\r' '\n') | ('\n' '\r');
Which works for me - but then, what if there is no EOL, what if there is a
single line comment on the last line of the file, how can I add that kind of
thing into my grammar?
Thanks.
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20040711/af06ad34/attachment.html
More information about the antlr-interest
mailing list