[antlr-interest] Antwort: Single quote and MismatchedTokenException
lars.vonwedel at bayertechnology.com
lars.vonwedel at bayertechnology.com
Thu Dec 18 02:54:30 PST 2008
Mmmh, seems like it the quote rule is competing with the string rule which
has quotes as delimiters and expects another quote at the end of the
string. Now that I have stripped a trailing \n at the end of the line to
scan, it seems to work.
Regards,
Lars
_________________________________________
lars.vonwedel at bayertechnology.com
Gesendet von: antlr-interest-bounces at antlr.org
18.12.2008 10:54
An
antlr-interest at antlr.org
Kopie
Thema
[antlr-interest] Single quote and MismatchedTokenException
Hello,
I have a lexer where a quote is defined as
QUOTE : '\'';
running some simple text through the lexer (just repeatedly calling
NextToken) works fine.
However, when I run that lexer as part of an application (a Visual Studio
Language Service in fact), the line
Match( '\'' );
in the generated Lexer method mQUOTE() throws an
Antlr.Runtime.MismatchedTokenException.
Any ideas what goes wrong here and what I can try to solve that problem ?
Freundliche Grüße / Best Regards
Lars
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20081218/63abc8c6/attachment.html
More information about the antlr-interest
mailing list