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

efx-grammar: Remove unneeded alternative in a parser rule (TEDEFO-3718) #1017

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

bertrand-lorentz
Copy link
Contributor

In the fieldReference parser rule, having a direct reference to fieldReferenceWithFieldContextOverride is not needed, because fieldReferenceInOtherNotice can also match it with a chain of rules.

So removing this unneeded reference removes the ambiguity in the rule, which reduces the parsing time, as the parser does not spend time looking ahead and then backtracking.

This does not change the result of the translation.

In the fieldReference parser rule, having a direct reference to
fieldReferenceWithFieldContextOverride is not needed, because
fieldReferenceInOtherNotice can also match it with a chain of rules.

So removing this unneeded reference removes the ambiguity in the
rule, which reduces the parsing time, as the parser does not spend
time looking ahead and then backtracking.

This does not change the result of the translation.
Copy link
Contributor

@rousso rousso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. You are right. Let's merge this. Thank you @bertrand-lorentz

@bertrand-lorentz bertrand-lorentz merged commit beeb863 into develop Sep 17, 2024
2 of 4 checks passed
@bertrand-lorentz bertrand-lorentz deleted the efx-grammar-optimisation branch September 17, 2024 14:40
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