}
sfprintf(cc->ccdisc->text, ")");
return;
- case IN:
+ case IN_OP:
gen(cc, expr->data.variable.index);
sfprintf(cc->ccdisc->text, " in %s", expr->data.variable.symbol->name);
return;
EX_ID("float", DECLARE, FLOATING, FLOATING, 0),
EX_ID("gsub", GSUB, GSUB, STRING, 0),
EX_ID("if", IF, IF, 0, 0),
- EX_ID("in", IN, IN, 0, 0),
+ EX_ID("in", IN_OP, IN_OP, 0, 0),
EX_ID("int", DECLARE, INTEGER, INTEGER, 0),
EX_ID("long", DECLARE, INTEGER, INTEGER, 0),
EX_ID("print", PRINT, PRINT, INTEGER, 0),
case '#':
v.integer = dtsize ((Dt_t*)expr->data.variable.symbol->local.pointer);
return v;
- case IN:
+ case IN_OP:
v.integer = evaldyn (ex, expr, env, 0);
return v;
case UNSET:
x->data.variable.symbol->local.pointer = 0;
}
break;
- case IN:
+ case IN_OP:
case UNSET:
if (x->data.variable.index)
exfreenode(p, x->data.variable.index);
%binary <op> EQ NE
%binary <op> '<' '>' LE GE
%left <op> LS RS
-%left <op> '+' '-' IN
+%left <op> '+' '-' IN_OP
%left <op> '*' '/' '%'
%right <op> '!' '~' '#' UNARY
%right <op> INC DEC
$$ = exnewnode(expr.program, $2, 0, $1->type, $1, NiL);
$$->subop = POS;
}
- | expr IN DYNAMIC
+ | expr IN_OP DYNAMIC
{
if ($3->local.pointer == 0)
exerror("cannot apply IN to non-array %s", $3->name);
if (($3->index_type > 0) && ($1->type != $3->index_type))
exerror("%s indices must have type %s, not %s",
$3->name, extypename(expr.program, $3->index_type),extypename(expr.program, $1->type));
- $$ = exnewnode(expr.program, IN, 0, INTEGER, NiL, NiL);
+ $$ = exnewnode(expr.program, IN_OP, 0, INTEGER, NiL, NiL);
$$->data.variable.symbol = $3;
$$->data.variable.index = $1;
}
case IF:
s = " if";
break;
- case IN:
+ case IN_OP:
s = " in";
break;
case PRAGMA: