Commit dfd16851 authored by fpottier's avatar fpottier

Removed the (huge) directory bench, which was obsolete.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/menhir@323 0f8b5475-4b4e-0410-85a8-ee3154a6bfe7
parent 8e9b54a3

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

.PHONY: test clean
test clean:
$(MAKE) -C bad $@
$(MAKE) -C good $@
.PHONY: clean test expected
SHELL=/bin/bash
SRC=../../src
MENHIR=$(SRC)/menhir --stdlib $(SRC)
# La convention de nommage des tests multi-grammaires
# est : /nom/-[1-9].mly
TESTS=$(shell ls | egrep '*([1]|[^2-9]).mly')
RESULTS=$(TESTS:.mly=.result)
test: clean $(RESULTS)
@ if test -e failed_files; then \
echo FAILED ON: ; \
cat failed_files; \
fi
%.result: %.mly
@ if echo $< | grep -e "-1.mly" &> /dev/null; then \
export BASE=`echo $< | sed s/"-1.mly"/""/`; \
export FILES=`echo $$BASE-[1-9].mly`; \
export CMD="$$FILES --base $$BASE"; \
else \
export FILES="$<"; \
export CMD="$<"; \
fi; \
if $(MENHIR) $$CMD >& /dev/null; then \
echo "-> [KO] menhir should not accept $$FILES"; \
export FAILED_FILES="$$FAILED_FILES $$FILES"; \
else \
$(SHELL) -c '$(MENHIR) --only-preprocess $$CMD >& $@'; \
if [ x$$CREATE_EXPECTED == x"1" ]; then \
cp $@ $*.expected; \
fi; \
if [ x$$VERBOSE == x"1" ]; then \
echo "********************************************************"; \
echo "* INPUT"; \
echo "********************************************************"; \
cat $<; \
echo "********************************************************"; \
echo "* OUTPUT"; \
echo "********************************************************"; \
cat $@; \
echo ""; \
fi; \
if test -e $*.expected; then \
if diff $@ $*.expected >& /dev/null; then \
echo "[OK] $$FILES"; \
else \
echo "-> [KO] menhir gives bad error message on $$FILES"; \
echo " $$FILES" >> failed_files; \
fi; \
else \
echo "[OK] $$FILES"; \
fi; \
fi
# TEMPORARY il faudrait pouvoir construire les fichiers .expected un par un
expected:
@ echo "Are you sure ? (this will erase *.expected) [Press ENTER]"
@ read
@ mkdir -p /tmp/mini-expected
@ cp -f *.expected /tmp/mini-expected >& /dev/null || true
@ CREATE_EXPECTED=1 $(MAKE) -s test
@ echo "Expected output re-generated."
clean:
rm -f *.ml *.mli *.conflicts *.automaton *.cmi *.cmo *.cmx *.o *.s *.result *~ failed_files
File "arity-error.mly", line 9, characters 9-10:
Error: does this symbol expect 1 or 2 arguments?
%token FOO BAR
%%
a(X):
x = X { x }
foo:
a(FOO) a(BAR,BAR) { () }
File "bad-arity.mly", line 5, characters 3-4:
Error: does this symbol expect 1 or 2 arguments?
%start<int> a
%token A
%%
a: b(A, A) {}
b(X): X {}
File "bad-dollar.mly", line 7, characters 9-11:
Error: $3 refers to a nonexistent symbol.
%token <int> A
%token B C
%%
main: A B
{ $1 + $3 }
File "constant-arity-in-multiple-def-2.mly", line 2, characters 8-9:
File "constant-arity-in-multiple-def-1.mly", line 6, characters 8-9:
Error: symbol b is defined with arities 2 and 1.
%start<int> a
%%
a: {}
%public b(X): {}
File "constant-inline-in-multiple-def-2.mly", line 3, characters 16-17:
File "constant-inline-in-multiple-def-1.mly", line 5, characters 8-9:
Error: not all definitions of a are marked %inline.
File "cyclic-parameterized-definition.mly", line 5, characters 6-7:
Error: How is this symbol parameterized?
It is used at sorts a and (a -> *) -> *.
The sort a cannot be unified with the sort (a -> *) -> *.
(* Reported by Daniel Weil and Radu Grigore. *)
(* Fixed in r154. *)
%%
b(A): A(b) {}
a(B): B(a) {}
c: a(b) {}
%%
File "declaration-error.mly", line 1, characters 0-20:
Syntax error in a %token declaration.
Here are sample valid declarations:
%token DOT SEMICOLON
%token <string> LID UID
File "declaration-error.mly", line 3, characters 10-11:
Syntax error inside a declaration.
Did you perhaps forget the %% that separates declarations and rules?
%token FOO BAR <int> /* the error is the type */
%type <int> INT
%token BAZ::::: QUUX /* the error is the colon */
%token HOP
%%
main: HOP BAZ QUUX { () }
File "dont-use-private-symbol-2.mly", line 4, characters 3-4:
Error: a is undefined.