Multiple ANTLR versions using Xtext and third party library in a standalone application [message #558316] |
Sat, 11 September 2010 06:55 |
Acher Messages: 9 Registered: July 2009 |
Junior Member |
|
|
Hi,
I am using Xtext and its parsing facilities to implement an interpreter.
In addition, I am using a third party library that parses some other parts of the interpreter.
The third party library relies on ANTLR 3.1.3 whereas Xtext relies on 3.0.0 -- if I am not wrong. Here comes my issue since I need to mixin the two versions of ANTLR -- for Xtext and for the third party library.
Depending on the order I export entries in the Java build path, I have one of the following error:
(1) Exception in thread "main" java.lang.SecurityException: class "org.antlr.runtime.RecognizerSharedState"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:807)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:488)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:626)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
......
call to the third library fails
(2) Exception in thread "main" java.lang.NoSuchFieldError: ruleMemo
at org.xtext.example.mydsl.parser.antlr.internal.InternalFMLPar ser. <init>(InternalFMLParser.java:53)
at org.xtext.example.mydsl.parser.antlr.internal.InternalFMLPar ser. <init>(InternalFMLParser.java:70)
at org.xtext.example.mydsl.parser.antlr.FMLParser.createParser( FMLParser.java:40)
at org.xtext.example.mydsl.parser.antlr.FMLParser.parse(FMLPars er.java:26)
at org.eclipse.xtext.parser.antlr.AbstractAntlrParser.doParse(A bstractAntlrParser.java:57)
Surprisingly, when I deploy the application as an Eclipse plugin, there is no problem -- Xtext and the third party library can collaborate and there is no conflict with ANTLR versions.
Have you got any idea why does it work well when deploying as an Eclipse plugin?
Have you ever been confronted with such situations (collaborations of two ANTLR versions?)?
Can I force Xtext to work with ANTLR 3.1.3?
More generally, have you got any idea on how to resolve this problem?
Thank you for your support
Mathieu
PS: I have the feeling that this is related to org.antlr.runtime
PS2: The packrat parser seems to be abandoned. Am I wrong?
[Updated on: Sat, 11 September 2010 07:16] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03908 seconds