[antlr-interest] Re: SL_COMMENT in java.g

Matt Benson gudnabrsam at yahoo.com
Thu Oct 16 08:44:08 PDT 2003


I accidentally deleted the original message, but at
one time I had modified the lexer grammar to make the
line terminators optional on this token, seemingly
without ill effect; something like:

SL_COMMENT
	:	"//"
		(~('\n'|'\r'))* ('\n'|'\r'('\n')?)?
		{$setType(Token.SKIP); newline();}
	;



Does anyone see a problem with this approach?

-Matt

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list