Skip to content

test fails: Cannot recover from the syntax error

I have Java 8.0 as well and built the project with gradlew. I get this message:

> Task :test FAILED

lang.ParseTests > example PASSED

lang.ParseTests > error PASSED

lang.TestDumpTree > runTest[example.in] FAILED
    lang.ast.LangParser$SyntaxError: Cannot recover from the syntax error
        at lang.ast.LangParser.recoverFromError(LangParser.java:17)
        at beaver.Parser.parse(Parser.java:487)
        at beaver.Parser.parse(Parser.java:428)
        at lang.Util.parse(Util.java:33)
        at lang.TestDumpTree.runTest(TestDumpTree.java:29)

3 tests completed, 1 failed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///home/matthias/Software/deros/build/reports/tests/test/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 23s
7 actionable tasks: 6 executed, 1 up-to-date

That's the top of the trace. Let me know if I can provide more.

lang.ast.LangParser$SyntaxError: Cannot recover from the syntax error
	at lang.ast.LangParser.recoverFromError(LangParser.java:17)
	at beaver.Parser.parse(Parser.java:487)
	at beaver.Parser.parse(Parser.java:428)
	at lang.Util.parse(Util.java:33)
	at lang.TestDumpTree.runTest(TestDumpTree.java:29)
	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:498)