Commit Graph

10 Commits (80db356e9ce8129385291f65a32fd20c7ac48ba2)

Author SHA1 Message Date
Gabriel Scherer 80db356e9c add a .depend.menhir file for menhir parser dependencies
We do not write to .depend during the common 'depend' target,
because computing dependencies requires Menhir installed.
2018-09-01 23:17:06 +02:00
Gabriel Scherer d09349f631 rename parsing/parser_menhir into parsing/parser 2018-09-01 23:17:06 +02:00
Gabriel Scherer e6ecea4008 remove the yacc parser
The large diff in boot/menhir/parser_menhir.ml comes from the fact
that the token list is now included in it, instead of being merely
a reference to the yacc parsers' Parser.token type.
2018-09-01 23:17:06 +02:00
Gabriel Scherer 982ac40b5a menhir --fixed-exception, use the same exception as yacc 2018-09-01 23:17:05 +02:00
Gabriel Scherer f571282d7d menhir parser: rename MenhirLib into CamlinternalMenhirLib
The goal of this change is to avoid conflicts encountered by
compiler-libs users that would also use their own MenhirLib runtime
for their own parsers.

I first tried to implement a solution to this module-name-conflict
issue using module aliases and -open, but this proven too fragile and
too difficult to get right.
2018-09-01 23:17:04 +02:00
Gabriel Scherer 5fb52b21ea menhir parser: use --lalr mode on François Pottier's advice 2018-09-01 23:17:04 +02:00
Gabriel Scherer 5794656607 Makefile.menhir: enable strict mode
The yacc parser already uses its --strict flag, which turns grammar
conflicts into build errors so that they are noticed. Menhir uses
a more extensive semantics for the --strict flag, as it turns into
errors grammar warnings that have no yacc counterpart, in particular
unused precedence levels. We have to fix more mistakes, which I guess
is good news.
2018-09-01 23:17:04 +02:00
Gabriel Scherer db15ee7793 Makefile.menhir: some tokens are unused for decent reasons 2018-09-01 23:17:04 +02:00
Gabriel Scherer cbea1b6b69 menhir parser: move .mlyp to .mly, no cpp step anymore 2018-09-01 23:17:04 +02:00
Gabriel Scherer 4aa3b8c788 new Makefile.menhir file for menhir parser bootstrap 2018-09-01 23:17:03 +02:00