Closed cznic closed 5 years ago
menhir, version 20170712
That's the issue. You need a more recent version of Menhir. Version 20181113.
I've updated the readme.
Confirming all works with updated menhir
==== jnml@e5-1650:~/src/github.com/jhjourdan/C11parser> make realclean test
rm -rf _build parse
rm -f parser.output parser.tab.c
rm -f parser.y
ocamlbuild -menhir "menhir --no-stdlib --unused-token IMAGINARY -lg 1 -la 1 -v" main.native
Finished, 1 target (0 cached) in 00:00:00.
+ menhir --no-stdlib --unused-token IMAGINARY -lg 1 -la 1 -v --ocamlc 'ocamlc.opt -w @1..49-4-9-41-44' --explain --infer parser.mly
Grammar has 127 nonterminal symbols, among which 1 start symbols.
Grammar has 97 terminal symbols.
Grammar has 305 productions.
Built an LR(0) automaton with 506 states.
The grammar is not SLR(1) -- 15 states have a conflict.
Built an LR(1) automaton with 506 states.
One shift/reduce conflict was silently solved.
Warning: one state has reduce/reduce conflicts.
Warning: 3 reduce/reduce conflicts were arbitrarily resolved.
+ menhir --no-stdlib --unused-token IMAGINARY -lg 1 -la 1 -v --ocamlc 'ocamlc.opt -w @1..49-4-9-41-44' --explain --infer --external-tokens Parser parser_ansi_compatible.mly
Grammar has 181 nonterminal symbols, among which 1 start symbols.
Grammar has 97 terminal symbols.
Grammar has 594 productions.
Built an LR(0) automaton with 934 states.
The grammar is not SLR(1) -- 100 states have a conflict.
Built an LR(1) automaton with 934 states.
One shift/reduce conflict was silently solved.
Warning: one state has reduce/reduce conflicts.
Warning: 3 reduce/reduce conflicts were arbitrarily resolved.
Finished, 31 targets (0 cached) in 00:00:03.
mv main.native parse
cram tests/tests.t
.
# Ran 1 tests, 0 skipped, 0 failed.
==== jnml@e5-1650:~/src/github.com/jhjourdan/C11parser>
Thank you.
While trying to verify my environment I did
OS: openSuse Leap 15.0 64 bit
I'd expect
make realclean test
to succeed and produceparser.y
.