[antlr-interest] Problem with antlrworks (1.1.7 and 1.2b) and Python target (generation/debugging)
Johannes Luber
JALuber at gmx.de
Mon May 19 04:37:14 PDT 2008
> Hi,
>
> I am having trouble in using antlrworks with the Python target.
> However, from command line I can generate source code and parse the tree.
> The way to bypass this problem is to comment out the language line in
> the options{} section of the grammar when using AntlrWorks.
>
> Here are the errors I am getting,
>
> (antlrworks 1.2b with stringtemplate.jar 3.1, pyStringTemplate 3.1)
> error(10): internal error: /tmp/XKBGrammar.g :
> java.lang.IllegalArgumentException: Can't find template noRewrite.st
>
> In the UI, when generating code, it shows the error
> "Cannot generate the grammar because:
> error(10): internal error: group Python does not satisfy interface
> ANTLRCore: mismatched arguments on these templates [tokenRef(token,
> label, elementIndex, hetero), tokenRefAndListLabel(token, label,
> elementIndex, hetero)]"
>
> (antlrworks 1.17 with stringtemplate.jar 3.1, pyStringTemplate 3.1)
> error(10): internal error: no such group file Dbg.stg
> error(10): internal error: problem parsing group AST:
> java.lang.IllegalArgumentException: Can't find template outputFile.st :
> java.lang.IllegalArgumentException: Can't find template outputFile.st
>
> Simos
This looks like as if the ANTLR version included in ANTLRworks has a disconnect between the Java target and the Python target. In other words, Python isn't uptodate there. Use the workaround until a new version of ANTLRworks is released.
Johannes
--
249 Spiele für nur 1 Preis. Die GMX Spieleflatrate schon ab 9,90 Euro.
Neu: Asterix bei den Olympischen Spielen: http://flat.games.gmx.de
More information about the antlr-interest
mailing list