-
Notifications
You must be signed in to change notification settings - Fork 94
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
Tools for debugging recursion problems? #330
Comments
I've worked around this for now with:
|
There isn't any tools directly to debug it (unless rustc provides some general ability to print out the entire, long type). But if you have a good idea of how your grammar looks you may be able to figure out where these large types appear as they would correlate to wide and deeply constructed parsers that use If you know (or guess) where these large parsers are then you can use the |
How do I determine which parsers are the deeply constructed ones? None of mine are beyond 20 lines long. |
"Deeply" in this case relates to multiple |
Hello, I'm using
combine
to write a parser for a language that's not LL(1), and don't know if it's LALR(1). The code is here, with the original grammar all in comments:https://github.com/jwiegley/motoko_parse/blob/main/src/lib.rs
When I try to run
cargo test
, I get the following error:At this point I've tried simplifying things and cutting down the use of closures to the bare minimum, etc., but I can't seem to move past this error. What would be the best approach to debugging something like this?
Thanks, John
The text was updated successfully, but these errors were encountered: