Commit Graph

17970 Commits (70efc8555ab42427807b5351859653e1fe37414a)

Author SHA1 Message Date
François Pottier 088fc0914b Introduce the generic definition `llist(X)`.
Simplify the definition of `constraints`.
Preliminary cleanup in `type_declaration`.
2018-11-20 13:47:23 +01:00
François Pottier ba6f8d4d7f Created the file VIPs. 2018-11-20 12:44:39 +01:00
François Pottier 5b6b0ed186 More auxiliary functions. 2018-11-20 12:44:39 +01:00
François Pottier dc6f3a4e42 Cleanup in `str_exception_declaration` and `sig_exception_declaration`. 2018-11-20 12:44:39 +01:00
François Pottier 6d363ca6e7 Clean up `value_description`. 2018-11-20 12:44:39 +01:00
François Pottier a1c533aecb Eliminate `primitive_declaration_body`. 2018-11-20 12:44:39 +01:00
François Pottier 53997673fa Clean up `primitive_declaration`. 2018-11-20 12:44:39 +01:00
François Pottier 01d1f2dbca Increase the similarity between `str_type_extension` and `sig_type_extension`. 2018-11-20 12:44:39 +01:00
François Pottier 69ccf3779d Inline `str_extension_constructors` and `sig_extension_constructors`
at their single use site.
2018-11-20 12:44:39 +01:00
François Pottier 5c10f5debe Clean up `module_binding`. Mark it `%inline` as it has a single use site. 2018-11-20 12:44:39 +01:00
François Pottier 4ca7fd925d Inline `structure_item_with_ext` at its single use site. 2018-11-20 12:44:39 +01:00
François Pottier 52f8d8c371 New auxiliary function `wrap_mkstr_ext`. 2018-11-20 12:44:39 +01:00
François Pottier 1fc8a970ce Cleanup the syntax of module expressions. Isolate `expr_colon_package_type`. 2018-11-20 12:44:39 +01:00
François Pottier 6bb0f2578e Cleanup and comments. 2018-11-20 12:44:39 +01:00
François Pottier c6274312b1 More cleanup and comments. 2018-11-20 12:44:39 +01:00
François Pottier 169176fac5 Remove `choose`. Introduce `use_file_element`. Eliminate `use_file_tail`. 2018-11-20 12:44:39 +01:00
François Pottier fd6fd43b7d Inline one copy of `use_file_body` into `use_file_tail`. 2018-11-20 12:44:39 +01:00
François Pottier 240156c32f Introduce `optional_use_file_standalone_expression`
and use it to simplify `use_file_body`.
2018-11-20 12:44:39 +01:00
François Pottier 5cefe658d8 Introduce `text_def` and `top_def`.
Use them to simplify `use_file_body` and `use_file_tail`.
2018-11-20 12:44:39 +01:00
François Pottier 1712b8637d Comments and movement. 2018-11-20 12:44:39 +01:00
François Pottier 6890b1ae8f Introduce `signature_element` and use it to simplify `signature`.
`signature_nodoc` disappears.
2018-11-20 12:44:39 +01:00
François Pottier cb7adc0f1b Introduce `text_sig` and `text_sig_SEMISEMI`. Use them to simplify
`signature_nodoc`.
2018-11-20 12:44:39 +01:00
François Pottier c340d9c2a7 Introduce `choose`, and use it to give an equivalent higher-level
formulation of `structure_element`. Add comments.
2018-11-20 12:44:39 +01:00
François Pottier 32981d6ef7 Introduce `append`. Use it to simplify `structure_nodoc`,
then inline `structure_nodoc` at its single use site.
2018-11-20 12:44:39 +01:00
François Pottier 86a14713db Reduce the verbosity of `make promote-menhir`. 2018-11-20 12:44:39 +01:00
François Pottier 49bf53857d Inline `structure_tail_nodoc` at its single use site. 2018-11-20 12:44:39 +01:00
François Pottier 330d6052de Introduce `structure_element` and simplify `structure_tail_nodoc`,
which is just a list of structure elements.
2018-11-20 12:44:39 +01:00
François Pottier f8c3f5472e Inline one copy of `structure_nodoc` into `structure_tail_nodoc`. 2018-11-20 12:44:39 +01:00
François Pottier 0d917c75b4 Introduce `iloption`. Use it to simplify `structure_nodoc`. 2018-11-20 12:44:39 +01:00
François Pottier 695137f321 Introduce `mark_rhs_docs`. 2018-11-20 12:44:39 +01:00
François Pottier 08d88c767d Reformatting. 2018-11-20 12:44:39 +01:00
François Pottier e6a80c126e Introduce `text_str_SEMISEMI`. 2018-11-20 12:44:39 +01:00
François Pottier 10f6862f80 Simplify `structure_nodoc` and `structure_tail_nodoc`. 2018-11-20 12:44:39 +01:00
François Pottier 51a17a4f78 Introduce `str_exp` and use it to simplify `toplevel_phrase`. 2018-11-20 12:44:39 +01:00
François Pottier 6c9d2c29ac Introduce `flatten`, which removes the need for `flattened_list`.
Use it in `toplevel_phrase`.
2018-11-20 12:44:39 +01:00
François Pottier 828c4933d5 Inline `toplevel_directive_` at its single use site. 2018-11-20 12:44:39 +01:00
François Pottier 9de5d20027 Simplified definition of `toplevel_directive_`. 2018-11-20 12:44:39 +01:00
François Pottier 19cf5b52a4 Manually inline `top_structure` at its single use site. 2018-11-20 12:44:39 +01:00
François Pottier 32aba8beba A simpler formulation of `top_structure`. 2018-11-20 12:44:39 +01:00
François Pottier 607fe02746 Introduce `flattened_list` and use it to simplify `top_structure_tail_nodoc`.
Inline `top_structure_tail_nodoc` at its single use site.
2018-11-20 12:44:39 +01:00
François Pottier aff8b69729 Introduce `text_str` and use it to simplify `top_structure_tail_nodoc`. 2018-11-20 12:44:39 +01:00
François Pottier f5f5bd0601 Manually inline [top_structure_nodoc].
Mark [top_structure] as %inline.
This saves two states and clarifies things a little.
2018-11-20 12:44:39 +01:00
François Pottier 992f1d2fcb Simplified definition of `functor_args`. 2018-11-20 12:44:39 +01:00
François Pottier bc2ab8b7ef Change the definition of `match_cases` so that `opt_bar match_cases`
can be replaced everywhere with just `match_cases`.
2018-11-20 12:44:39 +01:00
François Pottier 3919c55443 Simplify `with_constraints` and inline it at its single use site. 2018-11-20 12:44:39 +01:00
François Pottier 12130a9998 Introduce `reversed_bar_llist(X)` and use it to improve sharing. 2018-11-20 12:44:36 +01:00
François Pottier 0b13840435 Improve sharing by introducing `extension_constructor`, a choice between
`extension_constructor_declaration` and `extension_constructor_rebind`.
2018-11-20 12:28:18 +01:00
François Pottier 83fdb09bbe Simplified definition of `match_cases`. 2018-11-20 12:28:18 +01:00
François Pottier a3c964703d Introduce `extension_constructor_rebind(opening)`, reducing duplication. 2018-11-20 12:28:18 +01:00
François Pottier c91612f3d4 Introduce `extension_constructor_declaration(opening)`, reducing duplication. 2018-11-20 12:28:18 +01:00