[antlr-interest] Exception with gunit and custom tree adaptors

Kaleb Pederson kaleb.pederson at gmail.com
Wed Oct 28 07:10:00 PDT 2009


On Wednesday 28 October 2009 06:23:29 am Chris DiGiano wrote:
> TreeAdaptor class names currently need to be fully qualified.

Thanks for the information.  As I mentioned yesterday, I have tried with the fully qualified class name and I receive the same error.  For instance, this morning I tried with the following:

options{TreeAdaptor = org.antlr.runtime.tree.CommonTreeAdaptor;}

I still receive the exact same exception.  I'm curious if it's a JIT problem and will investigate more soon, although I'm hoping somebody will be able to save me some of that time.

Thanks.

--
Kaleb Pederson

Twitter - http://twitter.com/kalebpederson
Blog - http://kalebpederson.com

 
> Chris
> 
> On Tue, Oct 27, 2009 at 4:46 PM, Kaleb Pederson
> <kaleb.pederson at gmail.com> wrote:
> > I'm getting a strange exception when working attempting to use custom AST nodes with gunit.  Per the instructions, I added the following to my gunit file:
> >
> > options { TreeAdaptor = ElementTypeTreeAdaptor; }
> >
> > However, I now get an odd exception:
> >
> > java.lang.ClassNotFoundException: llvm.CC
> >        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> >        at java.security.AccessController.doPrivileged(Native Method)
> >        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> >        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> >        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
> >        at org.antlr.gunit.gUnitExecutor.classForName(gUnitExecutor.java:98)
> >        at org.antlr.gunit.gUnitExecutor.runParser(gUnitExecutor.java:326)
> >        at org.antlr.gunit.gUnitExecutor.runCorrectParser(gUnitExecutor.java:159)
> >        at org.antlr.gunit.gUnitExecutor.executeTests(gUnitExecutor.java:175)
> >        at org.antlr.gunit.gUnitExecutor.execTest(gUnitExecutor.java:123)
> >        at org.antlr.mojo.antlr3.GUnitExecuteMojo.performExecution(GUnitExecuteMojo.java:305)
> >        at org.antlr.mojo.antlr3.GUnitExecuteMojo.execute(GUnitExecuteMojo.java:136)
> > ...
> >
> > My first thought is that I messed up the class name, but that's not the case because I verified the name and it fails in exactly the same way with a fully qualified class name.  Additionally, I tried ANTLR's CommonTreeAdaptor and I still receive the same error.  I'm using Sun's Java-6.
> >
> > --
> > Kaleb Pederson



More information about the antlr-interest mailing list