[antlr-interest] Disabling overriden rule during iheritance.

Martin Probst mail at martin-probst.com
Fri Jun 10 07:42:57 PDT 2005


Hi,

> parser exception: a.npl:1:1: expecting "header", found 'header'
> a.npl:1:1: expecting "header", found 'header'

The problem is most likely a token with the wrong id. ANTLR expects the
token that corresponds to the literal "header" (probably LITERAL_header
or sth similar) and get's a different token, that has the same text
("header") but a different ID. The error message is not very helpful - I
usually override it and provide the token number together with the text.

So the odds are indeed that you're lacking a "testLiterals=true" in some
identifier rule.

Regards,
Martin



More information about the antlr-interest mailing list