-
Notifications
You must be signed in to change notification settings - Fork 20
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 loop in lazy hashcode computation #35
Comments
Oh, it seems we may have a circular reference. Hasher doesn't handle such cases, indeed. Can you check if it holds? If so, is circular reference expected, or is it the root cause? |
Java's |
Not sure what the problem is yet. But, it runs differently under the debugger (program completes). Double-checking the build. I may have to rely on prints to find the problem. Doesn't seem like there's any odd parameters on the xdebug spawn either. |
So far, I've verified a circular parent chain for PredictionContext. That's why hashing crashes. |
After implementing code to find strongly connected cycles in the PredictionContext data structures, and finding nothing, I did a search for the error message and found that it's caused by Xdebug not configured correctly. Add this to your php.ini file:
Everything is now starting to work. |
I'm going through as many of the v4 grammars as possible with my fix for #12. But, I failed on an infinite loop in the lazy computation for the acme grammar, first example input, on a PredictionContext objects. (In Java and CSharp, the has code is computed immediately at the time of construction of a PredictionContext object (looks like for ArrayPredictionContext). I've verified it for for the current "dev" branch. Note, the grammar contains both
identifier
andIDENTIFIER
, so one needs to be renamed. I chose to renameidentifier
usingtrparse *.g4 | trrename -r 'identifier,identifier_' | trsponge -c
.The text was updated successfully, but these errors were encountered: