codea: tiefenmeldung umgeaendert und script zum ausfuehren einzelner testcases hinzug...
authorBernhard Urban <lewurm@gmail.com>
Wed, 5 May 2010 11:02:13 +0000 (13:02 +0200)
committerBernhard Urban <lewurm@gmail.com>
Wed, 5 May 2010 12:09:42 +0000 (14:09 +0200)
codea/exectestcase [new file with mode: 0755]
codea/parser.y

diff --git a/codea/exectestcase b/codea/exectestcase
new file mode 100755 (executable)
index 0000000..1061fff
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/bash
+make && cat $1 && ./codea < $1 | clr.py
index 0ffd8f5b59a5bcef441257ae5a418ffb2589f5e3..0c58a77d51466bcd558ba33c06e038b83fc2203e 100644 (file)
@@ -185,7 +185,7 @@ Statement:
          @{
                statinout()
                xxputsin(@Expr.s@,)
-               @i @Statement.node@ = new_node(O_RET, @Expr.node@, TREENULL, @Expr.exprcount@+1); if(@Expr.gparamges@ + @Expr.exprcount@ + 1 > 7) { fprintf(stderr, "RETURN: zu hohe tiefe (gparamges: %i, exprcount: %i, gesamt %i [maximal: 7])\n", @Expr.gparamges@, @Expr.exprcount@+1, @Expr.gparamges@+@Expr.exprcount@+1); }
+               @i @Statement.node@ = new_node(O_RET, @Expr.node@, TREENULL, @Expr.exprcount@+1); fprintf(stderr, "RETURN: %s (gparamges: %i, exprcount: %i, gesamt %i [maximal: 7])\n", @Expr.gparamges@ + @Expr.exprcount@ + 1 > 7 ? "zu hohe tiefe" : "tiefe passt", @Expr.gparamges@, @Expr.exprcount@+1, @Expr.gparamges@+@Expr.exprcount@+1);
                @reg @Statement.node@->reg = @Expr.node@->reg = next_reg((char *)NULL, 0, @Expr.gparamges@);
          @}
        ;