Commit 71d3aaad authored by POTTIER Francois's avatar POTTIER Francois

Fixed the test files in bench/good so that "make test" succeeds again.

parent 609c412e
......@@ -36,7 +36,6 @@ test: clean $(RESULTS)
# (There is presently no expected output file.)
%.result: %.mly
# Single-file or multi-file test?
@ if echo $< | grep -e "-1.mly" &> /dev/null; then \
export BASE=`echo $< | sed s/"-1.mly"/""/`; \
export FILES=`echo $$BASE-[1-9].mly`; \
......@@ -59,7 +58,7 @@ test: clean $(RESULTS)
echo "-> [KO] $$FILES:"; \
echo " menhir --only-preprocess succeeded,"; \
echo " but menhir failed."; \
echo " cat $*.out"; \
echo " more $*.out"; \
) | tee -a failures; \
else \
echo "-> [KO] $$FILES:"; \
......@@ -79,8 +78,8 @@ test: clean $(RESULTS)
expected:
@ echo "Are you sure ? (this will erase *.expected) [Press ENTER]"
@ read
@ mkdir -p /tmp/mini-expected
@ cp *.expected /tmp/mini-expected >& /dev/null || true
@ mkdir -p /tmp/menhir-expected
@ cp *.expected /tmp/menhir-expected >& /dev/null || true
@ CREATE_EXPECTED=1 $(MAKE) -s test
@ echo "Expected output re-generated."
......
This diff is collapsed.
......@@ -109,7 +109,6 @@ module P = Parse_aux
%left TPlus TMinus
%left TMul TDiv TMod
%start reinit
%type <unit> reinit
%start minus_main
......
%start infinite
%start dummy
%token A
%type <unit> infinite
%type <unit> dummy
%%
dummy:
| A
{ () }
| A infinite
{ () }
infinite:
| A infinite
{ () }
......
%token A
%start <unit> infinite
%start <unit> dummy
%%
dummy:
A { () }
| A infinite { () }
infinite:
A infinite
{ () }
......
File "kimmit.mly", line 4, characters 12-13:
Warning: the token X is unused.
%{
let x = X 0
%}
......@@ -10,7 +8,7 @@ Warning: the token X is unused.
%%
s:
|
| X
{}
%%
......
......@@ -4,4 +4,4 @@
%token<int> X
%start<unit> s
%%
s: {}
s: X {}
%start b
%start name_clash_1_a
%token FOO
%token BAR
%type <unit> b
......@@ -15,7 +16,7 @@ name_clash_1_a:
{ () }
name_clash_1_a1:
|
| FOO
{ () }
b:
......
%start <unit> name_clash_1_a
%token FOO
%%
......@@ -6,5 +7,5 @@ name_clash_1_a:
a { () }
a:
{ () }
FOO { () }
......@@ -9,7 +9,7 @@ Warning: symbol a is unreachable from any of the start symbol(s).
%%
s:
|
| T
{}
%%
......
......@@ -5,4 +5,4 @@
%public a: T {}
s: {}
s: T {}
File "self.mly", line 1, characters 7-8:
Warning: the token A is unused.
%start s
File "self.mly", line 11, characters 0-1:
Warning: symbol b is unreachable from any of the start symbol(s).
File "self.mly", line 9, characters 0-1:
Warning: symbol s is unreachable from any of the start symbol(s).
%start dummy
%token A
%type <unit> dummy
%type <unit> s
%%
s:
| b s
{}
b:
|
dummy:
| A
{}
%%
......
%token A
%type<unit> s
%start s
%start<unit> dummy
%%
dummy: A {}
s: b s {}
b: {}
......
File "unused-pseudo-token.mly", line 1, characters 11-14:
Warning: the token BAR is unused.
File "unused-pseudo-token.mly", line 1, characters 7-10:
Warning: the token FOO is unused.
File "unused-pseudo-token.mly", line 3, characters 6-11:
Warning: the token zorro is unused.
%start main
......@@ -12,7 +10,7 @@ Warning: the token zorro is unused.
%%
main:
|
| FOO
{}
%%
......
......@@ -7,5 +7,5 @@
%%
main:
{}
FOO {}
File "unused-token1.mly", line 1, characters 7-8:
Warning: the token A is unused.
File "unused-token1.mly", line 1, characters 9-10:
Warning: the token B is unused.
%start a
......@@ -10,7 +8,7 @@ Warning: the token B is unused.
%%
a:
|
| A
{}
%%
......
......@@ -2,4 +2,4 @@
%start<int> a
%%
a: {}
a: A {}
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