-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add one new test file containing 1086 tests of the syntax error messages (plus tooling) #10086
Commits on Dec 17, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 381081e - Browse repository at this point
Copy the full SHA 381081eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a44158 - Browse repository at this point
Copy the full SHA 7a44158View commit details -
Distinguish MENHIRBASICFLAGS and MENHIRFLAGS.
The former is a subset of the latter, and suffices when running Menhir to perform an analysis of the grammar. This allows [make interpret-menhir] to be used even if ocamlrun and ocamlc have not been built yet.
Configuration menu - View commit details
-
Copy full SHA for 0b85c5b - Browse repository at this point
Copy the full SHA 0b85c5bView commit details -
Define an alias (i.e., concrete syntax) for every token. Add --requir…
…e-aliases. The flag --require-aliases makes sure that the property that every token has an alias will be preserved in the future. This requires Menhir 20201214.
Configuration menu - View commit details
-
Copy full SHA for 13f6b14 - Browse repository at this point
Copy the full SHA 13f6b14View commit details -
This rule runs Menhir's reachability analysis, which produces a list of all states where a syntax error can be detected (and a corresponding list of of erroneous sentences). This data is stored in parsing/parser.auto.messages. All text between BEGIN AVOID and END AVOID is removed from the grammar before the analysis is run. This can be used to filter out productions and declarations that the analysis should ignore.
Configuration menu - View commit details
-
Copy full SHA for 7af7fbe - Browse repository at this point
Copy the full SHA 7af7fbeView commit details -
Add [make generate-parse-errors].
This rule turns the error sentences stored in parsing/parser.auto.messages into concrete .ml files, which can be used as tests. One file per sentence is created. The file name is derived from the sentence. The test files are placed in the directory testsuite/tests/generated-parse-errors.
Configuration menu - View commit details
-
Copy full SHA for c3ee162 - Browse repository at this point
Copy the full SHA c3ee162View commit details -
Configuration menu - View commit details
-
Copy full SHA for 092dcb2 - Browse repository at this point
Copy the full SHA 092dcb2View commit details -
Mark the production that allows puns with [AVOID].
This prevents [make list-errors] from generating sentences that exploit this production. Indeed, there is a risk of generating sentences that cause syntax errors, due to the auxiliary function [addlb], which rejects certain puns.
Configuration menu - View commit details
-
Copy full SHA for 5043b8b - Browse repository at this point
Copy the full SHA 5043b8bView commit details -
Configuration menu - View commit details
-
Copy full SHA for ae8fa65 - Browse repository at this point
Copy the full SHA ae8fa65View commit details -
Add one new test file in testsuite/tests/generated-parse-errors/error…
…s.ml. This file was produced by [make generate-parse-errors]. This file contains: 1072 sentences whose start symbol is implementation. 5 sentences whose start symbol is use_file. 9 sentences whose start symbol is toplevel_phrase. The parser's output can be described as follows: 1086 syntax errors reported. 721 syntax errors without explanation. 365 syntax errors with an indication of what was expected. 307 syntax errors with an indication of an unmatched delimiter.
Configuration menu - View commit details
-
Copy full SHA for c318232 - Browse repository at this point
Copy the full SHA c318232View commit details -
Configuration menu - View commit details
-
Copy full SHA for ee6d974 - Browse repository at this point
Copy the full SHA ee6d974View commit details -
Configuration menu - View commit details
-
Copy full SHA for f016aff - Browse repository at this point
Copy the full SHA f016affView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a3e617 - Browse repository at this point
Copy the full SHA 6a3e617View commit details
Commits on Dec 21, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 01d6c4e - Browse repository at this point
Copy the full SHA 01d6c4eView commit details