[antlr-interest] Can't find template ruleRefBang.st

Johannes Luber jaluber at gmx.de
Mon Jul 14 12:00:55 PDT 2008


Guy Kroizman schrieb:
> I tried with 3.1b1
> and got:
> 
> kroiz at kroiz-desktop:~/Desktop/Fortran$ java org.antlr.Tool Fortran77.g
> Exception in thread "main" java.lang.NoClassDefFoundError: 
> org/antlr/stringtemplate/StringTemplateErrorListener
>     at org.antlr.Tool.main(Tool.java:68)
> Caused by: java.lang.ClassNotFoundException: 
> org.antlr.stringtemplate.StringTemplateErrorListener
>     at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
>     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
>     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
>     ... 1 more
> 
> Does this makes more sense?

Look for ! mixed with ->, as Gavin said. Remove those ! in these rules.

Johannes
> 
> On Mon, Jul 14, 2008 at 3:27 PM, Gavin Lambert <antlr at mirality.co.nz 
> <mailto:antlr at mirality.co.nz>> wrote:
> 
>     At 23:37 14/07/2008, Guy Kroizman wrote:
> 
>         I am trying to convert the Fortran77 grammar so I could use it
>         with ANTLR 3.
>         I get the following error:
> 
>         kroiz at kroiz-desktop:~/Desktop/Fortran$ java org.antlr.Tool
>         Fortran77.g
>         error(10):  internal error: Fortran77.g :
>         java.lang.IllegalArgumentException: Can't find template
>         ruleRefBang.st
> 
> 
>     IIRC, this has something to do with mixing tree construction syntax
>     illegally, most likely trying to use a ! in a rule that already has
>     a -> rewrite.
> 
>     (Yeah, I know, it's not the best error message in the world.)
> 
> 



More information about the antlr-interest mailing list