subrule fixes and Menhir backend improvements#131
Open
SergioBenitez wants to merge 14 commits intoott-lang:masterfrom
Open
subrule fixes and Menhir backend improvements#131SergioBenitez wants to merge 14 commits intoott-lang:masterfrom
SergioBenitez wants to merge 14 commits intoott-lang:masterfrom
Conversation
Co-authored-by: Joey Eremondi <joey.eremondi@gmail.com>
This fixes issues with subrules in the Menhir backend by: 1. Adding a syntaxdefn field to pp_menhir_opts in types.ml 2. Modifying suppress_rule to check if a nonterminal is non-maximal in the subrule hierarchy in lex_menhir_pp.ml 3. Adding a skip_subrule_validation parameter to check_and_disambiguate in grammar_typecheck.ml 4. Passing the appropriate flag when generating Menhir output in main.ml The Menhir backend should 'only take the maximal elements from the subrule order' as documented in the comments. This implementation correctly suppresses non-maximal elements to ensure the generated parser works properly with subrules.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 (which revives #127) includes several commits that collectively address various issues with subrule handling across backends, improve the Menhir backend's correctness, and update regression testing infrastructure. Changes include:
d3acdac).803bce7).e89b0a4).cb0c678).b887eac,8506ddc).f7ca37b)ede3291,b2b9863)parsingintest21.1.ottAll regression tests pass, including those newly added.