New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite recursion regression #26
Comments
Can you provide a sample input and which rule you run? |
Sample input: "bbbcbbb". Rule: either rule2() or rule3() as both cause the regression. |
OK, there's something going on here; I can't reproduce, at least not with the input which you have given. Can you provide some code which reproduces the problem for you? |
One of the two issues did occur because I was mixing classes from both org.parboiled and com.github.fge.grappa. Using only classes from com.github.fge.grappa did fix one of the problems. The other one still persists. The following two files (build.gradle and src/main/java/app/Main.java) do reproduce the problem. (Note: the broken lines within the stack trace are not a copy/paste error but did actually occur.)
|
The grammar you provide here is quite different from the first one! Also, I don't think it even works with 1.0.x; I'd be highly surprised if it did at all. |
You're right: it never did work. It is actually an example for #27. This issue can be closed because the problem it describes does not occur anymore. It must have been the result of mixing classes from both com.github.fge.grappa and org.parboiled. Using only classes from com.github.fge.grappa makes it work as expected. |
On to #27 then ;) |
The following rules do work fine with Grappa 1.0.4 but cause an infinite recursion with Grappa 2.0.0-beta.4.
In neither case an infinite recursion should occur because both methods are annotated with @cached and because in each recursion the same Var instance is provided.
The stack overflow exception is:
The text was updated successfully, but these errors were encountered: