[antlr-interest] Error: "Message ID 100 created but is not present in errorMsgIDs"

Jim Idle jimi at temporal-wave.com
Fri Jul 11 10:03:55 PDT 2008


On Fri, 2008-07-11 at 15:48 +0100, Andy Doddington wrote:

> I have written a very simple grammar, that supports single line
> comments, and a primitive 'DEFINE name' statement.
> 
> Processing this inside AntlrWorks seems to be reasonably OK< e.g.
> generating the parse tree. However, when I try
> to debug or generate code I get the following error:
> 
>     error(100): U:\Development\NomadSchemaAnalyser\grammar
> \NomadSchema.g:0:0: syntax error: codegen: <AST>:0:0: unexpected end
> of subtree
>     error(10):  internal error:
> org.antlr.tool.Message.toString(Message.java:124): Assertion failed!
> Message ID 100 created but is not present in errorMsgIDs or
> warningMsgIDs. 


The message could be a bit clearer, but you have specified a combined
lexer/parser grammar but all your rules start with UPPER CASE, hence you
have created a "lexer grammar". Parser rules start with lower case
letters, lexer rules start with UpperCase letters. Hence your DefList
should be defList, as per the documentation.

> 
> This looks like an internal Antlr bug - referring to a non-existent
> 'Message ID 100' am I correct in this supposition? If so,
> when is it due to be fixed; if not, what am I doing wrong?
> 
> My grammar is as given below:
> 
>         grammar TestGrammar;
>         
>         DefList: (CommentLine | Def | WS)*;


defList : .... EOF ;


Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080711/63652bd9/attachment.html 


More information about the antlr-interest mailing list