[antlr-interest] ANTLR/ANTLRworks error message suggestion

Steve Bennett stevagewp at gmail.com
Fri Feb 15 20:22:43 PST 2008


Periodically ANTLRworks gives me the message "Could not even do k=1
for decision 114". I vaguely understand that this means that some set
of rules is horrendously ambiguous and ANTLR couldn't analyse it. But
the message isn't very useful as it doesn't tell me where the problem
is. Clicking "show console" doesn't help much either, as the last line
of the console reads:


[15:17:57] error(10):  internal error:
org.antlr.tool.Message.toString(Message.java:124): Assertion failed!
Message ID 10 created but is not present in errorMsgIDs or
warningMsgIDs.


Prior to which there are just lots of warnings. If there is any
possibility of providing names of rules rather than decision numbers
(which I'm not sure how to use), that would be very helpful.

Possibly related issue, I'm getting this error message which I can't
interpret at all:

[15:17:56] error(100): C:\antlr\mediawiki11intransit.g:0:0: syntax
error: buildnfa: <AST>:1162:8: expecting EOA, found 'SLASH'

The rule is:

fragment EXTENSION_TAG_CLOSE:
    LT SLASH SAME_EXTENSION_NAME (SPACE* ATTR)? SPACE* (SLASH? GT)
  ;


Can anyone explain it? Again, maybe a slightly more descriptive error
message would help?

Steve


More information about the antlr-interest mailing list