You have a version of java that is too old it looks like. Use the Sun java as everything else is pretty flakey IMO.
Also the C runtime does not support 3.3 yet - I hope to release it next week. Jim > -----Original Message----- > From: [email protected] [mailto:antlr-interest- > [email protected]] On Behalf Of Krishna Venuturimilli > Sent: Friday, February 25, 2011 4:15 PM > To: [email protected] > Subject: Re: [antlr-interest] generating C code from g3pl file for 64 > bit linux > > I tried using 3.3; > Not sure what I am doing wrong...but the code doesn't even get > generated now. > Here's the error message. > thanks > -Krishna > > ectflnx1001> java -cp > "/disks/data1/HDMT/hdmt_project/thirdparty/Antlr/antlr-3.3/lib/antlr- > 3.3-complete.jar" > org.antlr.Tool > /disks/data1/HDMT/hdmt_project/src/hdmt/tos/common/HdmtTplParser2/tplPa > rser.g3pl > -fo . > > Exception in thread "main" java.lang.UnsupportedClassVersionError: > org/antlr/Tool (Unsupported major.minor version 49.0) > > at java.lang.ClassLoader.defineClass0(Native Method) > > at java.lang.ClassLoader.defineClass(ClassLoader.java:502) > > at > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) > > at java.net.URLClassLoader.defineClass(URLClassLoader.java:250) > > at java.net.URLClassLoader.access$100(URLClassLoader.java:54) > > at java.net.URLClassLoader$1.run(URLClassLoader.java:193) > > at java.security.AccessController.doPrivileged(Native Method) > > at java.net.URLClassLoader.findClass(URLClassLoader.java:186) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:299) > > at > sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:255) > > at > java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) > > On Fri, Feb 25, 2011 at 12:34 PM, Jim Idle <[email protected]> > wrote: > > > I think that there is one place where the generated code is not quite > > correct - something to do with tree parser output. Can you post the > > error you are getting or send me the grammar files? > > > > > > > > Jim > > > > > > > > *From:* Krishna Venuturimilli [mailto:[email protected]] > > *Sent:* Friday, February 25, 2011 11:11 AM > > *To:* Jim Idle > > *Cc:* [email protected] > > *Subject:* Re: [antlr-interest] generating C code from g3pl file for > > 64 bit linux > > > > > > > > we are using antlr 3.1.1 - and yes we did compile the runtime libs > > with the enable 64 bit. > > > > The libs compile fine and link with our application code fine; When > > did not have the enable 64 bit the link against our application code > > would fail because the libs were built in 32 bit. > > > > > > > > May be I should try with 3.3 (the latest version of antlr). > > > > thank you > > > > -Krishna > > > > On Fri, Feb 25, 2011 at 10:34 AM, Jim Idle <[email protected]> > wrote: > > > > Did you set the enable-64bit flag when you built the runtime? Did you > > use the latest release? It is 64 bit compatible and ANTLR_MARKER is > 64 > > bits when you build the runtime for 64 bits. Sounds like you built it > > with the default > > 32 bits. > > > > > > > > Jim > > > > > > > > *From:* Krishna Venuturimilli [mailto:[email protected]] > > *Sent:* Friday, February 25, 2011 10:32 AM > > *To:* Jim Idle > > *Cc:* [email protected] > > *Subject:* Re: [antlr-interest] generating C code from g3pl file for > > 64 bit > > > > linux > > > > > > > > Well the generated code is using ANTLR_UINT32 variable and is > > assigning ANTLR_MARKER type value to it; this doesn't work on 64 bit. > > So I was wondering if the generated C code is dependent on 32 vs 64 > bit. > > > > > > > > Is there a way to make it use UINT64 instead of UINT32? > > > > > > > > thanks > > > > -Krishna > > > > On Fri, Feb 25, 2011 at 9:01 AM, Jim Idle <[email protected]> > wrote: > > > > 1) What file is this and from where? > > 2) These days you can just rename it to a .g file, the extension > names > > were because older versions of Visual Studio needed it to see what > the > > output files were but that isn't relevant any more. > > 3) The generated C is the same on all platforms and there is nothing > > special to do to generate 64 but, 32 bit, Linux, Win32, Solaris etc. > > In fact it is designed so that you can generate the C on one platform > > and compile it on any. I had to do that because HPUX Java (and HPUX > in > > general) sucks and could not even run the ANTLR tool jar without > > patching the kernel. > > > > So, just like any other file you run the ANTLR tool on it and it will > > give you a .c and .h file. The generated files are both 32 and 64 bit > > compatible but if you read the docs for the C runtime it will point > > you at ./configure --help where you will see a flag that you supply > to > > build the libraries in 64 bit mode. > > > > As to searching all over the interweb, look at the API documentation > > link on the ANTLR home page and remember antlr.markmail.org as per > the > > link on the support page. > > > > Jim > > > > > > > -----Original Message----- > > > From: [email protected] [mailto:antlr-interest- > > > [email protected]] On Behalf Of Krishna Venuturimilli > > > Sent: Thursday, February 24, 2011 4:59 PM > > > To: [email protected] > > > Subject: [antlr-interest] generating C code from g3pl file for 64 > > > bit linux > > > > > > I searched all over the net, but can't find a way to compile g3pl > > > file to generate C code for 64 bit target. > > > Any help is appreciated. > > > thanks a lot. > > > -Krishna > > > > > > > > List: http://www.antlr.org/mailman/listinfo/antlr-interest > > > Unsubscribe: > > > http://www.antlr.org/mailman/options/antlr-interest/your- > > > email-address > > > > List: http://www.antlr.org/mailman/listinfo/antlr-interest > > Unsubscribe: > > http://www.antlr.org/mailman/options/antlr-interest/your-email- > address > > > > List: http://www.antlr.org/mailman/listinfo/antlr-interest > > Unsubscribe: > > http://www.antlr.org/mailman/options/antlr-interest/your-email- > address > > > > List: http://www.antlr.org/mailman/listinfo/antlr-interest > > Unsubscribe: > > http://www.antlr.org/mailman/options/antlr-interest/your-email- > address > > > > List: http://www.antlr.org/mailman/listinfo/antlr-interest > Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your- > email-address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
