From: Bernhard Urban Date: Wed, 5 May 2010 11:02:13 +0000 (+0200) Subject: codea: tiefenmeldung umgeaendert und script zum ausfuehren einzelner testcases hinzug... X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=uebersetzerbau-ss10.git;a=commitdiff_plain;h=8836ee65981a63b5fb0864b1db06a9e40fcf9572 codea: tiefenmeldung umgeaendert und script zum ausfuehren einzelner testcases hinzugefuegt --- diff --git a/codea/exectestcase b/codea/exectestcase new file mode 100755 index 0000000..1061fff --- /dev/null +++ b/codea/exectestcase @@ -0,0 +1,2 @@ +#!/bin/bash +make && cat $1 && ./codea < $1 | clr.py diff --git a/codea/parser.y b/codea/parser.y index 0ffd8f5..0c58a77 100644 --- a/codea/parser.y +++ b/codea/parser.y @@ -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@); @} ;