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 320 of 320+ 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.
%start a
%type <unit> a
%%
a:
| b
{ () }
b:
| a
{ () }
%%
%start a
%type <unit> a
%%
a:
b { () }
b:
a { () }
File "error-reserved.mly", line 6, characters 0-5:
Error: error is reserved and thus cannot be used as a non-terminal symbol.
%start<int> a
%%
a: {}
error: {}
File "inline-cycle-complex.mly", line 9, characters 8-9:
Error: there is a cycle in the definition of d.
%start<int> a
%token INT
%%
a: b {}
%inline b: INT c INT {}
%inline c: d INT d {}
%inline d: b {}
File "inline-cycle.mly", line 6, characters 8-9:
Error: there is a cycle in the definition of c.
%start<int> a
%%
a: b {}
%inline b: c {}
%inline c: b {}
File "inline-minimal-cycle.mly", line 5, characters 8-9:
Error: there is a cycle in the definition of b.
%start<int> a
%%
a: b {}
%inline b: b {}
File "inline-shift.mly", line 5, characters 3-11:
Error: You cannot use b and the $i syntax in this branch since the definition of b has to be inlined.
%start<int> a
%token<int> T
%%
a: b c d c { $2 + $3 + $4 }
%inline b: T T {}
c: x=T { x + 1 }
%inline d: { 0 }
File "inlined-dollar.mly", line 9, characters 8-9:
Error: You cannot use $i syntax in this branch since its definition will be inlined.
%token<int> A B
%start<unit> t
%%
t : B y=y {
y
}
%inline y: A
{
$1
}
File "invalid-declarations.mly", line 3, characters 0-14:
Syntax error in a %token declaration.
Here are sample valid declarations:
%token DOT SEMICOLON
%token <string> LID UID
File "invalid-declarations.mly", line 5, characters 0-10:
Syntax error in a %start declaration.
Here are sample valid declarations:
%start expression phrase
%start <int> date time
File "invalid-declarations.mly", line 6, characters 0-7:
Syntax error in a %type declaration.
Here are sample valid declarations:
%type <Syntax.expression> expression
%type <int> date time
File "invalid-declarations.mly", line 9, characters 0-16:
Syntax error in a precedence declaration.
Here are sample valid declarations:
%left PLUS TIMES
%nonassoc unary_minus
%right CONCAT
File "invalid-declarations.mly", line 18, characters 0-0:
Syntax error inside a production.
%token <int> FOO
%token BAZ QUUX HOP
%token BAR int BAT
%token FOO QWD ASFLJ QWKJH QWDK
%start RAT
%type (int) date time
%token BAZAR
%left FOO BAR
%right
%nonassoc BAR QWD QWD QWD ASD QWD D QWD WQD QWD
%token BAR
%%
main:
FOO BAR
File "invalid-token-in-prec.mly", line 4, characters 9-10:
Error: F is undefined.
%start<int> a
%%
a: %prec F {}
File "keyword.mly", line 5, characters 9-12:
Error: this is an Objective Caml reserved word.
%token<int> INT
%start<unit> file
%%
file : let=INT { ignore(let) }
File "location-keyword-errors.mly", line 8, characters 6-18:
Error: z refers to a nonexistent symbol.
%token <int> A
%token B C
%%
main:
x = A; y = B
{ $startpos(z) }
| A
{ $endpos($2) }
File "lots-of-errors.mly", line 1, characters 0-1:
Syntax error inside a declaration.
Did you perhaps forget the %% that separates declarations and rules?
( idiot )
%token FOO BAR <int> /* the error is the type */
%type <int> INT
%token ( BAZ: QUUX , %start /* the error is the opening parenthesis */
%token HOP
%%
main: HOP BAZ QUUX { () }
File "lowercase-token.mly", line 1, characters 0-10:
Syntax error in a %token declaration.
Here are sample valid declarations:
%token DOT SEMICOLON
%token <string> LID UID
File "lowercase-token.mly", line 3, characters 0-10:
Syntax error in a %start declaration.
Here are sample valid declarations:
%start expression phrase
%start <int> date time
File "lowercase-token.mly", line 8, characters 5-6:
Syntax error inside a production.
%token bla
%token FOO
%start Bla
%%
prod:
x == X /* intentional syntax error */
{ () }
File "missing-percentpercent.mly", line 4, characters 4-5:
Syntax error inside a declaration.
Did you perhaps forget the %% that separates declarations and rules?
%token FOO BAR
%start <unit> main
main:
FOO BAR
{ () }
File "multiple-precedence.mly", line 2, characters 7-8:
File "multiple-precedence.mly", line 1, characters 6-7:
Error: there are multiple precedence declarations for token A.
%left A
%right A
%token A
%start<int> a
%%
a: A {}
File "multiple-producers-with-same-name.mly", line 5, characters 10-11:
Error: there are multiple producers named x in this sequence.
%start<int> a
%token A
%%
a: x = A; x = A {}
File "multiple-token.mly", line 2, characters 7-10:
Error: the token FOO has multiple definitions.
File "multiple-type-definition-modules-2.mly", line 1, characters 12-13:
Error: There are multiple %type definitions for nonterminal a.
%type<bool> a
%start<int> b
%%
b: a {}
%public a: {}
File "multiple-type-definition.mly", line 2, characters 12-13:
Error: There are multiple %type definitions for nonterminal a.
%type<int> a
%type<bool> a
%start<int> b
%%
a: {}
b: {}
File "no-prec-and-inline.mly", line 7, characters 17-20:
Error: use of %prec is forbidden in an %inlined nonterminal definition.
%start<int> a
%left foo
%%
a: {}
%inline b: %prec foo {}
File "no-start-and-inline.mly", line 4, characters 8-9:
Error: a cannot be both a start symbol and inlined.
%start<int> a
%%
%inline a: {}
Error: no start symbol has been declared.
%token MACHIN
%%
main:
MACHIN
{ $1 }
%start s
%type <unit> s
%%
s:
| s
{}
%%
%type<unit> s
%start s
%%
s: s {}
File "non-terminal-multiple-branch-groups.mly", line 4, characters 0-1:
File "non-terminal-multiple-branch-groups.mly", line 5, characters 0-1:
Error: the nonterminal symbol b is multiply defined.
File "non-terminal-multiple-definitions.mly", line 4, characters 8-9:
File "non-terminal-multiple-definitions.mly", line 6, characters 0-1:
Error: the nonterminal symbol b is multiply defined.
File "non-terminals-tokens-overlap-2.mly", line 3, characters 0-1:
File "non-terminals-tokens-overlap-1.mly", line 1, characters 7-8:
Error: The identifier B is a reference to a token.