Commit 6d8da9d8 authored by Julien Lopez's avatar Julien Lopez
Browse files

[TESTS][EVAL] Add test for lexer; small fixes

parent fa46164a
......@@ -6,7 +6,7 @@ expr = id
| "(" expr ")"
| "match" expr "with" "|" expr ["&" type_id] "->" expr branches
abstr = "fun" id params "=" expr
abstr = "fun" id params "->" expr
params = (* empty *)
| id params
......@@ -14,6 +14,6 @@ params = (* empty *)
branches = (* empty *)
| "|" expr ["&" type_id] "->" expr branches
id = [A-Za-z_][A-Za-z0-9-_]*
id = [A-Za-z_][A-Za-z0-9_]*
integer = [0-9]+
Original: fun _verylong_454namewithsome_underscores___________ -> 2
Expr: Abstract(_verylong_454namewithsome_underscores___________, Int(2))
Result: fun _verylong_454namewithsome_underscores___________ -> 2
fun _verylong_454namewithsome_underscores___________ -> 2
......@@ -12,7 +12,7 @@ for i in $MODULES; do
for j in `ls $i/tests`; do
PREFIX=`echo $j | rev | cut -b 6- | rev`
EXPECTRES=`cat $i/refs/$PREFIX.res`
NBRTESTS=$(($TESTS + 1))
NBRTESTS=$(($NBRTESTS + 1))
$BIN $i/tests/$j > $OUT 2>&1
RES=$?
......
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