[antlr-interest] Problems with EOF
RamosD.External at infineon.com
RamosD.External at infineon.com
Thu Jan 5 02:13:02 PST 2006
I have problems with my parsers...
If I have the end of file in last line of script, the parser stay on
cycle and do nothing.
Please help me, I cant understand this problem.
MY CODE:
// Single-line comments
SL_COMMENT
: "//"
(~('\n'|'\r'))* ('\n'|'\r'('\n')?)?
{$setType(Token.SKIP); newline();}
;
// multiple-line comments
ML_COMMENT
: "/*"
(
options {
generateAmbigWarnings=false;
}
:
{ LA(2)!='/' }? '*'
| '\r' '\n' {newline();}
| '\r' {newline();}
| '\n' {newline();}
| ~('*'|'\n'|'\r')
)*
"*/"
{$setType(Token.SKIP);newline();}
;
THANKS,
Daniel Ramos
More information about the antlr-interest
mailing list