#include "tree.h"
#define MAX(A,B) (A > B ? A : B)
+
+ /* funktioniert nicht fuer skinner33_00.0 @ gesamt (aber dafuer fuer ca.0) */
+ int ret_opt(struct treenode *x, int call)
+ {
+ if(x->op == O_RET && x->kids[0] != TREENULL) {
+ x = x->kids[0];
+ if(x->op == O_CALL && x->kids[0] != TREENULL && x->kids[1] !=
+ TREENULL && x->kids[0]->op == O_NOTHING) {
+ x = x->kids[1];
+ if(x->op == O_ARG && x->kids[0] != TREENULL && x->kids[1] !=
+ TREENULL && x->kids[0]->op == O_NOTHING &&
+ x->kids[1]->op == O_NOTHING) {
+ return -1;
+ }
+ }
+ }
+ return call;
+ }
%}
%start Input
@i @Statseq.0.lblcnt_out@ = @Statseq.1.lblcnt_out@;
@i @Statseq.0.vars_out@ = @Statseq.1.vars_out@;
- @i @Statseq.0.call@ = @Statement.call@ || @Statseq.1.call@;
+ @i @Statseq.0.call@ = @Statement.call@ | @Statseq.1.call@;
@}
|
xxputsin(@Expr.s@,)
@i @Statement.node@ = new_node(O_RET, @Expr.node@, TREENULL);
+ @i @Statement.call@ = ret_opt(@Statement.node@, @Expr.call@);
+
@reg @Statement.node@->reg = @Expr.node@->reg = next_reg((char *)NULL, @Expr.gparamges@);
@gen write_tree(@Statement.node@, 0); burm_label(@Statement.node@); burm_reduce(@Statement.node@, 1); func_footer();