History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: ANTLR-25
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Terence Parr
Reporter: Terence Parr
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ANTLR v3

failed assertion for error 208

Created: 07/Nov/06 01:45 PM   Updated: 08/Nov/06 06:05 PM
Component/s: ANTLR Core
Affects Version/s: 3.0
Fix Version/s: 3.0b5


 Description  « Hide
ANTLR Parser Generator Early Access Version 3.0b5 (??, 2006) 1989-2006
error: (10) internal error: org.antlr.tool.Message.toString(Message.java:116): Assertion failed! Message ID 208 created but is not present in errorMsgIDs or warningMsgIDs.

: t.g:7:1: (208) The following token definitions are unreachable: ML_COMMENT

from grammar

lexer grammar t;

DOC_COMMENT
    : (options {greedy=false;} : .)* '*/'
    ;

ML_COMMENT
    : (options {greedy=false;} : .)* '*/'
    ;


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Terence Parr - 08/Nov/06 02:51 PM
Here in GrammarUnreachableAltsMessage.jav:

if ( probe.dfa.isTokensRuleDecision() ) {
setMessageID(ErrorManager.MSG_UNREACHABLE_TOKENS);
}

the type gets flipped but AFTER the MSG_UNREACHABLE_ALTS was added to the list of warnings, hence, the mismatch.

Terence Parr - 08/Nov/06 06:05 PM
Altered stuff in ErrorManager so that warning methods ask the Message object for the msgID instead of using a constant that has to be kept in sync.