Commit 170c9c0e authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Added menhir(no-inline) to quicktest/positions/.

parent 4986f5ca
_ocamlyacc
_menhir
_menhir_table
_menhir_no_inline
*.log
......@@ -15,22 +15,25 @@ all:
-use-menhir -menhir "$(MENHIR) $(MENHIRFLAGS) -lc 1 --comment --no-code-inlining"
@ $(OCAMLBUILD) -build-dir _menhir_table -tag fancy $(MAIN).native \
-use-menhir -menhir "$(MENHIR) $(MENHIRFLAGS) --table" -package menhirLib
@ $(OCAMLBUILD) -build-dir _menhir_no_inline -tag fancy $(MAIN).native \
-use-menhir -menhir "$(MENHIR) $(MENHIRFLAGS) --no-inline"
clean:
@ rm -f *~ .*~
@ $(OCAMLBUILD) -build-dir _ocamlyacc -clean
@ $(OCAMLBUILD) -build-dir _menhir -clean
@ $(OCAMLBUILD) -build-dir _menhir_table -clean
@ $(OCAMLBUILD) -build-dir _ocamlyacc -clean
@ $(OCAMLBUILD) -build-dir _menhir -clean
@ $(OCAMLBUILD) -build-dir _menhir_table -clean
@ $(OCAMLBUILD) -build-dir _menhir_no_inline -clean
# We try every input file whose name matches *.in.
# We parse it using each of the three parsers,
# We parse it using each of the parsers,
# and compare the results pairwise.
test: all
@ for f in *.in ; do \
out=$${f%*.in}.out ; \
log=$${f%*.in}.log ; \
for target in _ocamlyacc _menhir _menhir_table ; do \
for target in _ocamlyacc _menhir _menhir_table _menhir_no_inline ; do \
$$target/$(MAIN).native < $$f > $$target/$$out ; \
done ; \
if diff _ocamlyacc/$$out _menhir/$$out > $$log ; then \
......@@ -51,5 +54,11 @@ test: all
echo "menhir(code) versus menhir(table): $$f: FAILURE" ; \
cat $$log ; \
fi ; \
if diff _menhir_table/$$out _menhir_no_inline/$$out > $$log ; then \
echo "menhir(table) versus menhir(no-inline): $$f: OK" ; \
else \
echo "menhir(table) versus menhir(no-inline): $$f: FAILURE" ; \
cat $$log ; \
fi ; \
done
......@@ -36,13 +36,13 @@ annotations:
optional_dot optional_comma
{ Aux.print "annotations" $startpos $endpos }
%inline operator:
PLUS | MINUS | TIMES | DIV {}
raw_expr:
| INT
| annotations LPAREN nothing expr RPAREN optional_dot
| expr operator expr
| expr PLUS expr
| expr MINUS expr
| expr TIMES expr
| expr DIV expr
| MINUS expr %prec UMINUS
{}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment