[antlr-interest] what's wrong with my grammar?
Johannes Luber
jaluber at gmx.de
Fri Jul 6 14:04:56 PDT 2007
Pete Siemsen wrote:
> I'm struggling to convert an old ANTLR v2 grammar to ANTLR v3. I'm a
> newbie. ANTLR reports
>
> $ java org.antlr.Tool cim2mof.g
> ANTLR Parser Generator Version 3.0 (May 17, 2007) 1989-2007
> error(100): cim2mof.g:493:33: syntax error: antlr: cim2mof.g:493:33:
> unexpected token: qualifierType
> error(100): cim2mof.g:523:1: syntax error: antlr: cim2mof.g:523:1:
> unexpected token: scope
> error(100): cim2mof.g:524:23: syntax error: antlr: cim2mof.g:524:23:
> unexpected token: metaElement
> error(100): cim2mof.g:525:2: syntax error: antlr: cim2mof.g:525:2:
> unexpected token: ;
> $
>
> I can't understand what ANTLR doesn't like. The grammar is attached.
> Any help appreciated!
>
> -- Pete
ANTLR has the keyword "scope" reserved for its own use. You have to
rename the rule "scope" into something else and it should work then.
Best regards,
Johannes Luber
More information about the antlr-interest
mailing list