GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||
GeezerVison is showing github.com — bpo-42218: Correctly handle errors in left-recursive rules by lysnikolaou · Pull Request #23065 · python/cpython Conversation
|
|
@lysnikolaou (For a different PR/issue) I was thinking that maybe we should add an |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
That's a good idea, though every function might be a bit too much. Are we 100% sure that the assertion should apply to every single rule? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @lysnikolaou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, @lysnikolaou, I could not cleanly backport this to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…honGH-23065) Left-recursive rules need to check for errors explicitly, since even if the rule returns NULL, the parsing might continue and lead to long-distance failures. Co-authored-by: Pablo Galindo <[email protected]> (cherry picked from commit 02cdfc9)
|
GH-23066 is a backport of this pull request to the 3.9 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I am confident it applies to most of the functions if not all. The key here is that non of these functions should be called with the error indicator set, ever. As the assertion is also only on debug mode (and is just a simple check of an integer) I think the cost is not too elevated. The most annoying part is checking what functions don't make sense to include the check. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Right, that's what I wanted to say before as well. Figuring out where might be a bit annoying, but I agree that it's definitely worth it. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Ok, I will try to make a proposal PR soon :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Let me know, in case you don't find the bandwidth. I can take it up, if needed. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…23065) (GH-23066) Left-recursive rules need to check for errors explicitly, since even if the rule returns NULL, the parsing might continue and lead to long-distance failures. Co-authored-by: Pablo Galindo <[email protected]> (cherry picked from commit 02cdfc9) Automerge-Triggered-By: GH:lysnikolaou
…23065) Left-recursive rules need to check for errors explicitly, since even if the rule returns NULL, the parsing might continue and lead to long-distance failures. Co-authored-by: Pablo Galindo <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.