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

Chris DiGiano digi at google.com
Wed Oct 28 08:07:54 PDT 2009


Sorry for not reading your initial post more carefully. A fully
qualified classname is working for me under ANTLR 3.2, but I did have
to upgrade to the latest gunit.jar, which I received directly from
Leon Su, the developer. I think he updated the 1.0.6b.jar here
http://www.antlr.org/wiki/pages/viewpageattachments.action?pageId=3244061&metadataLink=true
but if this doesn't work for you, you might want to contact Leon directly.

I'm assuming that you double-checked that your class is actually on
the classpath!

Chris

On Wed, Oct 28, 2009 at 8:10 AM, Kaleb Pederson
<kaleb.pederson at gmail.com> wrote:
> 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