[antlr-interest] Trouble with a string literal

Paul J. Lucas dude at darkfigure.org
Tue May 13 11:22:10 PDT 2003


	I have a lexer rule like:

		STRING_LITERAL : "'" ( ~'\'' )* "'" | '"' ( ~'"' )* '"' ;

	That, when lexing text like:

		"hello"

	stops on the 'h' and complains that it's an unexpected
	character.

	The thing is that I have another lexer with the same
	STRING_LITERAL rule that works fine.  I don't understand what
	the difference could be.  I looked at the generated Java code
	and it looks the same to me.

	Any ide of what to check?

	- Paul


 

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




More information about the antlr-interest mailing list