Lines Matching refs:op

62 #define ARITH_PRECEDENCE(op, prec) [op - ARITH_BINOP_MIN] = prec  argument
111 static inline int arith_prec(int op) in arith_prec() argument
113 return prec[op - ARITH_BINOP_MIN]; in arith_prec()
121 static arith_t do_binop(int op, arith_t a, arith_t b) in do_binop() argument
124 switch (op) { in do_binop()
132 return op == ARITH_REM ? a % b : a / b; in do_binop()
166 static arith_t primary(int token, union yystype *val, int op, int noeval) in primary() argument
173 result = assignment(op, noeval); in primary()
179 last_token = op; in primary()
182 last_token = op; in primary()
185 token = op; in primary()
187 op = yylex(); in primary()
191 return -primary(op, val, yylex(), noeval); in primary()
194 return !primary(op, val, yylex(), noeval); in primary()
197 return ~primary(op, val, yylex(), noeval); in primary()
203 static arith_t binop2(arith_t a, int op, int precedence, int noeval) in binop2() argument
218 higher_prec(op2, op)) { in binop2()
219 b = binop2(b, op2, arith_prec(op), noeval); in binop2()
223 a = noeval ? b : do_binop(op, a, b); in binop2()
229 op = op2; in binop2()
233 static arith_t binop(int token, union yystype *val, int op, int noeval) in binop() argument
235 arith_t a = primary(token, val, op, noeval); in binop()
237 op = last_token; in binop()
238 if (op < ARITH_BINOP_MIN || op >= ARITH_BINOP_MAX) in binop()
241 return binop2(a, op, ARITH_MAX_PREC, noeval); in binop()
244 static arith_t and(int token, union yystype *val, int op, int noeval) in and() argument
246 arith_t a = binop(token, val, op, noeval); in and()
249 op = last_token; in and()
250 if (op != ARITH_AND) in and()
261 static arith_t or(int token, union yystype *val, int op, int noeval) in or() argument
263 arith_t a = and(token, val, op, noeval); in or()
266 op = last_token; in or()
267 if (op != ARITH_OR) in or()
278 static arith_t cond(int token, union yystype *val, int op, int noeval) in cond() argument
280 arith_t a = or(token, val, op, noeval); in cond()
303 int op = yylex(); in assignment() local
308 return cond(var, &val, op, noeval); in assignment()
310 if (op != ARITH_ASS && (op < ARITH_ASS_MIN || op >= ARITH_ASS_MAX)) in assignment()
311 return cond(var, &val, op, noeval); in assignment()
317 if (op != ARITH_ASS) in assignment()
318 result = do_binop(op - 11, arith_lookupvarint(val.name), result); in assignment()