Hi,
today i encounterd a problem with antlrworks2 (ANTLRWorks 2 20130716-5d2e7d936ca1) . As soon as i add any left recursiv rule to the grammer the "Run in TestRig" fails.
For example this simple expression grammar fails:
grammar newEmptyCombinedGrammar;
expr: expr ('*'|'/') expr
| expr ('+'|'-') expr
| '(' expr ')'
| INT
;
INT: [0-9]+;
i get the following output in the "TestRig Window"
Compiling grammar files...
warning: Supported source version 'RELEASE_6' from annotation processor 'org.netbeans.modules.openide.modules.PatchedPublicProcessor' less than -source '1.8'
warning: Supported source version 'RELEASE_6' from annotation processor 'org.netbeans.modules.openide.util.ServiceProviderProcessor' less than -source '1.8'
warning: Supported source version 'RELEASE_6' from annotation processor 'org.netbeans.modules.openide.util.NamedServiceProcessor' less than -source '1.8'
warning: Supported source version 'RELEASE_6' from annotation processor 'org.netbeans.modules.openide.util.NbBundleProcessor' less than -source '1.8'
4 warnings
Arguments: [newEmptyCombinedGrammar, expr, -tokens, -tree, -gui, C:\....\exp.txt]
and Antlrworks2 states that there is a unexpected Exception:
in detail:
java.lang.ClassNotFoundException: newEmptyCombinedGrammarParser
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.antlr.v4.runtime.misc.TestRig.process(TestRig.java:174)
at org.antlr.v4.runtime.misc.TestRig.main(TestRig.java:143)
Caused: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
[catch] at org.antlr.works.editor.grammar.actions.RunInTestRigAction$TestRigTask.run(RunInTestRigAction.java:359)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042)
other grammers without left recursive rules compile just fine and the treegui/string tree/tokes show up as expected.
I googled the problem but haven't found any other similiar problems.
Maybe someone can help me with my problem.
Thomas