4

When i run the interpreter as follows,

Running method

to create parse tree in ANTLR 3.4(in eclipse 3.7) it shows,

Error message

An internal error occurred during: "ANTLR Event Listener". For input string: "false"

When I run the second option Debug(Java) it doesn't give any error nor parse tree.

How can I resolve this?

Thanks

1
  • I am facing exactly same problem. i.e On running, the "error" comes up. Strangely, clicking on save, makes the parse tree correctly. If you have sorted out the problem, please share it here. Apr 2, 2012 at 13:02

3 Answers 3

3

By not using the interpreter.

No, it's not joke :). AFAIK, antlrv3ide uses the interpreter- and debug-components from ANTLRWorks. And ANTLRWorks' interpreter is rather buggy. However, its debugger works like a charm: so use that.

8
  • I tried the debug also. But it wont display any errors nor the parse tree. But the tester wrote for the grammar showing a error.
    – DarRay
    Mar 3, 2012 at 4:30
  • @DarRay, sorry, I don't know what 'a error' is. There's too little information to (try to) help you. Consider posting the grammar, the test input, and explaining how you'r invoking the interpreter.
    – Bart Kiers
    Mar 3, 2012 at 6:37
  • This interpreter error gives me even in a new project. Seems like it wont depend on the grammar. Without the parse tree are there any way to debug the code find the errors?
    – DarRay
    Mar 3, 2012 at 7:37
  • Please can u tell me how to use the debugger. I have updated the question also. Thanks.
    – DarRay
    Mar 3, 2012 at 7:39
  • 1
    Yes, ANTLRWorks' debugger is great: I use it a lot (press CTRL+D in ANTLRWorks).
    – Bart Kiers
    Mar 3, 2012 at 8:23
2

I had this problem when I was using antlr-3.4-complete.jar , but I changed it to antlr-3.2.jar and even if it gives me FailedPredicateExeption I still able to run it with java in the interpreter and create the grammar tree in the interpreter . download antlr jar :antlr-3.2.jar

0
-1

refer bla said, my here, change from antlr-3.5-complete.jar to antlr-3.3-complete.jar, then fix this problem.

for detail, can refer An internal error occurred during: "ANTLR Event Listener". For input string: "false"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.