Skip to content
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

Refinement on recursion depth checking #585

Merged

Conversation

TristonianJones
Copy link
Collaborator

@TristonianJones TristonianJones commented Sep 15, 2022

This change unnests common object graphs which resolve to simple expressions, and reduces the number of stack frames needed to build an AST from the parse graph. This change is believed to be safe as it expands the number of expressions which will pass max recursion depth test.

Additionally, all rules which may left recurse are only tracked if they contain a recursive parse graph thanks to the unnesting step.

parser/parser.go Show resolved Hide resolved
parser/parser.go Show resolved Hide resolved
parser/parser.go Show resolved Hide resolved
@TristonianJones TristonianJones merged commit 1df250a into google:master Sep 17, 2022
@TristonianJones TristonianJones deleted the parser-recursion-improvement branch September 17, 2022 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants