[antlr-interest] Re: How can i get ML_COMMENT
nagii5
nagii5 at yahoo.com
Tue Mar 12 10:19:45 PST 2002
> ML_COMMENT
> : "/*"
> ( {LA(2) != '/'}? '*'
> | '\n' { newline(); }
> | ~('*' | '\n')
> )+
> "*/"
> { _ttype = antlr::Token::SKIP; }
> ;
did you say you are using 2.1.7 or 2.7.1
if you are using 2.7.1 the following should work
ML_COMMENT : "/*" ({ options{greedy=false;} :. ) * "*/" ;
you can take care of the \n and newline instead of the .
hope that helps
-nagesh
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list