-
Notifications
You must be signed in to change notification settings - Fork 52
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
Integrate menhir parser and elaborator tests #1220
Open
7h3kk1d
wants to merge
246
commits into
dev
Choose a base branch
from
menhir_tests
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
246 commits
Select commit
Hold shift + click to select a range
1b4a6a4
Initial project organization & setup
green726 d6a6e95
preliminary & minimal implementation of the lexer
green726 88f5cc7
got initial version of parser to work - also added testing code
green726 5cfd56a
drastically expanded parser, lexer, ast (reworked pats vs exps, added…
green726 4659076
added cases & rules
green726 a3c77ed
Expanded the patterns and changed rules/cases
green726 7759144
Added arrow types & expanded test
green726 a01b07c
formatting
green726 556e8b4
Merge branch 'dev' into menhir_parser
green726 c32dfb2
started working on the menhir ast -> DHExp translation - got the simp…
green726 bfe2db1
Merge branch 'dev' into menhir_parser
green726 9080650
finished up preliminary translation
green726 af03c40
Added in the cast syntax to the menhir parser; still need to test
green726 8aff486
Merge remote-tracking branch 'origin/dev' into menhir_parser
7h3kk1d 951d4a2
Reformat
7h3kk1d 97c5187
Integrate menhir tests with the haz3ltests
7h3kk1d 3bc4227
Try failing test
7h3kk1d 191639e
Merge branch 'dev' into menhir_tests
green726 db3b918
fixed the menhir parser test for integer literal
green726 cdfc8ad
fixing some bugs with the functions expressions in the menhir parser
green726 d3a5995
changed the elaborator test to start adding in Menhir tests - some is…
green726 8ecd025
modified the menhir parser to have manual annotations for fun exp typ…
green726 16b7e4a
added support for the holes, closures, hole ids, and free vars
green726 e3060a7
added inconsistent branch handling to the menhir parser for testing b…
green726 6b13317
reworked hole syntax + added unknown types + changed expression parsi…
green726 0448846
fixed the ifthenelse menhir -> dhexp translation + added menhir ifthe…
green726 595c6f7
added if consistency & test case for inconsistent if
green726 2ba24df
cleaned up the test_elaboration file and removed all non-menhir tests
green726 a4d7a93
added the docs as well as cons, seqs, and test to menhir parser
green726 76d1ef8
added in the remaining pat forms & docs, cleaned up some of the code,…
green726 b10b8ac
merged main into menhir_test
green726 cd8ae48
finished fixing conflicts with the elaborator file & new tests direct…
green726 a33b30d
changed the hole syntax to align with Cyrus comments; changed menhir …
green726 27be64a
fixed parser build error, updated DHPat and Typ docs to new menhir te…
green726 971945c
updated menhir elaboration unit tests to new menhir dhexp syntax
green726 d9d07f9
changed the fixf to match hazel syntax without menhir conflict
green726 cc2b5dc
renamed the menhir parser to match hazel naming conventions
green726 4aed0bc
updated elaboration tests to the new menhir parser module name
green726 33cb84a
updated the menhir parser to the new universal exp format; merged men…
green726 d91c550
merged remove dhexp updated elaboration tests into the elaboration me…
green726 56ceaf8
updated elaborator tests to use the new unified Exp menhir parser
green726 834a803
Added documentation for exp menhir textual syntax
green726 8af6998
Updated some of the textual exp syntax with the menhir parser
green726 3317133
Merge branch 'dev' into menhir_tests
green726 a783dd5
Fixed conflicts from recent update to dev
green726 d27ff09
Added more elaboration tests & added in DynamicErrorHole menhir parsing
green726 e81fbdb
Added in sexp serialization for InvalidOperationError test
green726 5b71bd9
Added in elaboration tests for undef, filter action, and builtin
green726 dfa56af
Cleaned up some comments & updated the menhir parser tests
green726 aefea80
More merge cleanups
green726 196c910
Merge branch 'dev' into menhir_tests
green726 d8bdd8f
Moved the menhir -> dhexp conversion logic to haz3lmenhir from haz3lcore
green726 ffe5ef9
Removed MultiHoles from the Menhir parser
green726 47ffe3e
Resolved about 50% of the shift/reduce conflicts in the menhir parser
green726 de59c41
Finished resolving shift/reduce conflicts in the menhir parser
green726 9246a07
Fixed precedence issues in the menhir parser; tests now run sucessfully
green726 cf736fa
Added some more menhir-based elaboration tests
green726 b7481c7
Added menhir elaboration tests for list concat, minus unop & fixed me…
green726 cf7b720
Added menhir elaboration test for seq, fixf
green726 804aada
Merge branch 'dev' into menhir_tests
green726 079754b
Fixing issue with dev -> menhir tests merge
green726 b852d0f
Merge branch 'dev' into menhir_tests
green726 4c4eeb9
Removed some menhir elaboration test debug code
green726 850d247
Fix formatting
7h3kk1d 935f842
Move menhir elaboration tests into module
7h3kk1d dab05cb
Add back plain elaboration tests
7h3kk1d dc51508
Use alco_check_menhir in all the menhir elaboration tests
7h3kk1d f2e14fe
Added menhir parser readme
green726 dd7dd80
Started restructuring the menhir parser tests
green726 39d077f
Add additional parser tests
7h3kk1d ce26173
Add more menhir tests including a failing constructor test
7h3kk1d 01d6f3a
Add more tests
7h3kk1d 9a3b5dd
Add test for parsing named function
7h3kk1d aef64e9
Add test for parsing named function and additional parser tests
7h3kk1d 15a82a0
Refmt
7h3kk1d 4a2fe8b
Change constructor tests
7h3kk1d 00ab1de
Fix filter parsing
7h3kk1d be06410
Fix integer operator test
7h3kk1d 6b1c3b0
Simplify test
7h3kk1d 51ec3c4
Add a test that compares the menhir parser to maketerm with the basic…
7h3kk1d ed962c0
Add haz3lweb library to test dependencies
7h3kk1d 9d2b7db
More menhir parser tests added
green726 f5886c3
Fixed some menhir parser precedence bugs; added more menhir parser te…
green726 efdbdc7
Merge remote-tracking branch 'origin/dev' into menhir_tests
7h3kk1d 17880ce
Merge branch 'coverage' into menhir_tests
7h3kk1d d8f2652
Add coverage instrumentation to haz3lmenhir library
7h3kk1d eb5ba2b
Added hole replacement to the basic_reference parser test
green726 1cc26f6
Merge branch 'menhir_tests' of github.com:hazelgrove/hazel into menhi…
green726 6b36552
Merges
green726 574c359
Reworked the constructor menhir parsing to match maketerm
green726 8b79893
Fixed the invalid reduce/reduce conflict and added LESS_THAN back int…
green726 c3de67f
Merge branch 'dev' into menhir_tests
7h3kk1d ac4e9f9
Fix variant constructor type in parser
7h3kk1d c5861cd
Add commented out test for constructor with a type variable
7h3kk1d 1aec2b9
Add some commented out tests for type variables
7h3kk1d a265eb8
Add a commented out float operations test
7h3kk1d ff2aa0f
Mark failing tests as skipped
7h3kk1d d444d6e
Stop printing
7h3kk1d ad1ffec
Added type variables to the menhir parser
green726 decb9ec
Fix assert message for parser_test when menhir fails
7h3kk1d 807dc8f
Some changed to the menhir parser for int operations
green726 993ad15
Merge branch 'menhir_tests' of github.com:hazelgrove/hazel into menhi…
green726 033bda3
Modifications to the menhir testing to fix the float ops testing and …
green726 13e968f
Started to add sum types to the menhir parser & temporarily changed m…
green726 24a4588
Updated menhir elaboration tests to match new menhir casting syntax
green726 6d816f4
Fixed the shift/reduce conflict with the sum types in the menhir parser
green726 8335bfe
Added initial version of menhir sum type -> hazel sum type conversion
green726 a01348a
Readd comparison with MakeTerm for tests and add basic sum type test
7h3kk1d 93251b8
Update integer and float ops tests and fix some assertion messages
7h3kk1d f202efd
Stop skipping integer ops
7h3kk1d 115d4e2
Fix integer and float precedences
7h3kk1d b5ed4c3
Fixed the menhir sum type parsing & conversion to match hazel sum typ…
green726 6391f8e
Removed parser automaton and conflicts
green726 497ea3f
Make tests for every documentation buffer
7h3kk1d a6f0f03
Print doc buffer source text before test
7h3kk1d 3ea7cb5
Add test for empty type holes
7h3kk1d 3b72ec2
Add EmptyHole type to menhir
7h3kk1d 66de4a3
Added test
7h3kk1d 5d2c5e8
incremental progress on parser arrow/colon precedence
7h3kk1d 286352d
Add parens around ascription in function pattern for tests
7h3kk1d 87729b9
More progress on parser
7h3kk1d a76f253
Fix unused variable
7h3kk1d 3d06374
Update Init.ml file with parentheses on function args
7h3kk1d cfc4180
Manually curate documentation buffers to account for menhir differenc…
7h3kk1d be85171
Add forall to AST
7h3kk1d 7904db5
Add forall, unit exp to parser
7h3kk1d 94bec54
Merge remote-tracking branch 'origin/dev' into menhir_tests
7h3kk1d f450850
Make assertion more restrictive
7h3kk1d f96e3d2
Fix sequence precedence
7h3kk1d e7f8e61
Fix and ap precedence
7h3kk1d aa34712
Stripped parens in tests
7h3kk1d 773583f
Fix negation precedence
7h3kk1d 5bb8b18
Stop having singleton tuple types
7h3kk1d 97dd32d
Fix cons association
7h3kk1d abfccdf
Fix arrow associativity
7h3kk1d 7929bcc
Add tests for polymorphism documentation buffer
7h3kk1d dbdc108
Temporary fix for some failing tests on builtins
7h3kk1d 1465aa5
Add todo about literal t in t_typ
7h3kk1d a7aa733
Add rec type
7h3kk1d 9e997a3
Polymorphism buffer parsing
7h3kk1d 978e65e
Fix precedence between less than and &&
7h3kk1d 5ecdfc6
Tighten assertions on tests
7h3kk1d d7423f1
Start reverse conversion
7h3kk1d a860c6a
Fix ExpToSegment float serialization
7h3kk1d 4e5379c
Stop negative floats and ints
7h3kk1d 8c3b753
Start using qcheck to test parser
7h3kk1d 542f10f
Add lists to pbt for menhir
7h3kk1d ee3b6bf
Start tuple generator
7h3kk1d f90e146
Fix tuple generator
7h3kk1d f988005
Reduce size of generator to speed up test
7h3kk1d 91476cb
Fixed the shift/reduce error with new fun exps
green726 60f5709
Merge branch 'menhir_tests' of github.com:hazelgrove/hazel into menhi…
green726 d13e07c
Fixed the single character invalid form annotations in the menhir parser
green726 92b9d5d
Make AST sum type closer to Haz3lcore
7h3kk1d 36307a9
Forgot to commit parser
7h3kk1d bef0026
Change AST generator ident to use full a-z
7h3kk1d e2f5f72
Add some more leaf generators
7h3kk1d 8288d7a
Reenable unit generation
7h3kk1d c77d065
Add constructors to generator and exclude keywords
7h3kk1d 3d11a0d
Formatting
7h3kk1d 428faaa
Fix constructor ident
7h3kk1d 956fb32
Several operator precedence improvements as well as a generator for b…
7h3kk1d 39f2999
Increase quickcheck test size to help find bugs
7h3kk1d ca2a0c0
Update String concat precedence to match Precedence.re
7h3kk1d 5b2f3cf
Remove keywords from arb_constructor_ident
7h3kk1d ff0b325
More generators
7h3kk1d a96659c
Fix precedences
7h3kk1d 4cd1e56
revert mistake
7h3kk1d e7af810
More generators for types
7h3kk1d b1da56a
Generate product types
7h3kk1d 0710524
More generator fixes and adjusted float equality
7h3kk1d 20bcba5
Merge remote-tracking branch 'origin/dev' into menhir_tests
7h3kk1d d762a74
Add deriving eq to menhir
7h3kk1d 9eac896
Remove space from testsuite name
7h3kk1d 1e44f9c
Add comment
7h3kk1d d535f5e
Add unit pattern
7h3kk1d ed36809
More pattern generation
7h3kk1d 0e3353d
Added CastPat and ApPat generators
7h3kk1d 57b3e8b
Add ArrayType to generator
7h3kk1d 4a79a14
More patterns
7h3kk1d 8436063
Clean up qcheck generator
7h3kk1d 9c31795
Make ExpToSegment more resilient to missing ids
7h3kk1d cb0dac7
Add more typ generators
7h3kk1d dbc4d47
Add test for exp to segment
7h3kk1d 5970942
reformat
7h3kk1d 524547f
Add Test_ExpToSegment to test runner
7h3kk1d d5db2df
Fix ApPat
7h3kk1d 80f744f
Cleanup constructor generator
7h3kk1d bd9fd3c
Fix a precedence
7h3kk1d 9839e5e
Back to a 100 tests
7h3kk1d 0bba4b1
Readd qcheck
7h3kk1d 54e19f4
Enhance ExpToSegment tests with constructor and match statement cases
7h3kk1d f5595e7
Add case generation for expressions
7h3kk1d 618a4d9
More expression generation
7h3kk1d c9556ef
Added deferrals and filters to generators
7h3kk1d f3e4349
Adjust if precedence
7h3kk1d d0a7a76
Generate sequences
7h3kk1d 680a25c
Precedence of cons
7h3kk1d 419f9e3
Generate cons
7h3kk1d 1f06f00
enable ListConcat generation
7h3kk1d 21d34fe
Fix tpat arb instance
7h3kk1d bea13f7
Refactor tpat and pat types; simplify arb generation and remove unuse…
7h3kk1d 21bcfbf
Add failing test for concat and typap
7h3kk1d 28d60bd
Fix TypAp with lexing operator
7h3kk1d cfda148
Remove debug code
7h3kk1d 88341f3
List concat/cons precedence
7h3kk1d 2936215
ExpToSegment more resilient without ids
7h3kk1d 9fd16cc
sum types non-empty generator
7h3kk1d 1ce5144
Add parens to tuples, sums, and records when converting
7h3kk1d d508eec
Adjust cast precedence
7h3kk1d 0059289
Add parens around forall and rectype to help with ambiguities
7h3kk1d c485ea5
Address some remaining inconsistencies with generation
7h3kk1d d8bf5e1
Commenting out skipped tests because of bug in Junit_alcotest
7h3kk1d 56b3291
Remove unused basic_reference.txt
7h3kk1d 30e0af4
Revert pp formatting for id tagged
7h3kk1d 896224d
revert formatting change
7h3kk1d 3b3087b
Revert formatting change
7h3kk1d 6f38eb6
Revert term base to dev
7h3kk1d ad9ddfa
Remove debug statements
7h3kk1d 44caaa0
Cleaning up tests
7h3kk1d 57de33c
More test cleanup
7h3kk1d a7c80e9
More cleanup
7h3kk1d 57b0a1d
Address todos in Conversion
7h3kk1d ebe9380
Rename binop
7h3kk1d dd4dffa
Adjust comment
7h3kk1d db04947
Remove todo
7h3kk1d 5cdb818
Simplify qualified imports
7h3kk1d d220808
Refactor gen_exp_sized to use let* for improved readability and struc…
7h3kk1d 423d874
Finish converting gen_exp to let notation
7h3kk1d 8deebf7
Refmt
7h3kk1d ccda1d2
Refactor gen_typ_sized to use let notation
7h3kk1d 109f130
Refactor sumtype to use let notation
7h3kk1d 64d1a04
Refactor gen_pat_sized to use let notation
7h3kk1d ea51395
Remove unused gen_exp and gen_typ definitions
7h3kk1d 98e7730
Rename arb_str to arb_alpha_str
7h3kk1d ce23f3f
Inlining cleanup
7h3kk1d acc2fca
Refactor to gen_literal_string
7h3kk1d 926ab68
More let notation
7h3kk1d 7472c64
Add annotation
7h3kk1d 24ebb17
Cleanup
7h3kk1d 6618e86
Turn arb_constructor_ident into gen_constructor_ident
7h3kk1d 35ddd72
Rename generators
7h3kk1d 9620c17
Add detailed documentation for generator functions in AST
7h3kk1d ae1ae3d
Remove TODO comment regarding builtins in the parser
7h3kk1d ce578a3
Remove invalid deferral test
7h3kk1d a5b5421
Upgrade junit_alcotest to 2.1.0 and uncomment skipped tests
7h3kk1d File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes it consistent with Precedence.re