I'm new to ANTLR and ANTLRWorks, so I'm quite puzzled by this: I'm using ANTLRWorks 2.1 for grammar creation and subsequent creation of the lexer and parser (Java target). I have then created a small Eclipse project and imported the ANTLR4 jars from ANTLRWorks to manually call the lexer and parser as described in the ANTLR book examples. When running the application I get the following exception:
Caused by: java.lang.UnsupportedOperationException: java.io.InvalidClassException: org.antlr.v4.runtime.atn.ATN; Could not deserialize ATN with UUID 33761b2d-78bb-4a43-8b0b-4f5bee8aacf3 (expected e4178468-df95-44d0-ad87-f22a5d5fb6d3).
at org.antlr.v4.runtime.atn.ATNSimulator.deserialize(ATNSimulator.java:111)
at org.antlr.v4.runtime.atn.ATNSimulator.deserialize(ATNSimulator.java:90)
at TestLexer.<clinit>(TestLexer.java:177)
... 1 more
Caused by: java.io.InvalidClassException: org.antlr.v4.runtime.atn.ATN; Could not deserialize ATN with UUID 33761b2d-78bb-4a43-8b0b-4f5bee8aacf3 (expected e4178468-df95-44d0-ad87-f22a5d5fb6d3).
... 4 more
However, when running the same grammar and input data in the ANTLRWorks TestRig, everything works fine. What is going wrong here? I have already found similar posts regarding versioning issues, however none addressing this UUID issue. Can anyone help me with this?
Thanks in advance!