Update grammar to be closer to p4c implementation 2025 feb #1365
+78
−65
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR intentionally has 2 commits, in hopes of making it slightly easier to review.
The first commit only reorders some definitions of nonterminal symbols in the grammar, without changing their contents at all in any other way, to make the order the same as the p4c implementation grammar, for easier diff'ing. OK, that plus fixing one typo in a nonterminal name, and updating an example command in scripts/README.md for running that can help with easier diff'ing of the spec grammar vs. the p4c implementation grammar.
The second commit only updates the definitions of nonterminals related to the new
for
loops, to make them closer to the p4c implementation grammar. Those are the ones that require closer scrutiny on review, I think.