[antlr-interest] 3b6 internal error (bug?)

Ilia Kantor ilia at obnovlenie.ru
Thu Dec 28 05:40:22 PST 2006



ANTLR Parser Generator  Version 3.0b6 (??)  1989-2007
error(100): CommonRule.g:11:1: syntax error: antlr: CommonRule.g:11:1: 
unexpected token: options {
error(10):  internal error: CommonRule.g : java.lang.NullPointerException
org.antlr.tool.Grammar.setGrammarContent(Grammar.java:518)
org.antlr.tool.Grammar.<init>(Grammar.java:440)
org.antlr.Tool.process(Tool.java:261)
org.antlr.Tool.main(Tool.java:69)


The error is fixed if I swap tokens with options.



======== simplified grammar with most part removed =====================

grammar Gram2;


tokens {
        RULE_ID;
}


options {
    output=AST;
}


LCURL   :       '{';
RCURL   :       '}';

CONTROL :        '~';

IF      :       'If';
THEN:   'Then';
CASE:   'Case';
ELSE:   'Else';


document .*;


More information about the antlr-interest mailing list