[antlr-interest] ambiguity ?
Lloyd Dupont
lloyd at galador.net
Thu Apr 18 00:33:08 PDT 2002
why these rules ares ambiguous (in a Lexer) ?
#-------------------
DIV_ASSIGN : "/=" ;
SL_COMMENT :
( "//" | '#' )
(~('\n'|'\r'))* ('\n'|'\r'('\n')?)
;
#-------------------
while these ones are not !
#-------------------
DIV_ASSIGN : "/=" ;
SL_COMMENT_1 :
"//" (~('\n'|'\r'))* ('\n'|'\r'('\n')?)
;
SL_COMMENT_2 :
'#'
(~('\n'|'\r'))* ('\n'|'\r'('\n')?)
;
#-------------------
????
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list