[antlr-interest] funny error message

Jim Idle jimi at temporal-wave.com
Wed Feb 13 09:45:19 PST 2008


 

 

From: Darien Hager [mailto:darien.hager at etelos-inc.com] 
Sent: Tuesday, February 12, 2008 6:40 PM
To: antlr-interest at antlr.org
Subject: Re: [antlr-interest] funny error message

 

 

Well, with hindsight it looks like a pretty good error message.

I guess it might hinge on the definition of "unreachable" or what
component is doing the reaching. Two possible quick interpretations of
the message:

This token cannot be reached...
1) ...because it is an orphan not used by any parser rules. 

The lexer and parser are not connected. The lexer just has to tokenize
and does not care if the consumer (which may not be a parser) knows
about the token.


2) ...because other lexer tokens will always match first.  

I think I might assume explanation #1, just from reading the error
message, while it appears to be #2 that is happening.


But, as #1 has no meaning, then there is only #2 to consider J

Jim


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080213/55625f3e/attachment.html 


More information about the antlr-interest mailing list