Lines Matching refs:stack
149 static inline void stack_push(struct tst_expr_tok *stack[], unsigned int *op_stack_pos,
152 stack[(*op_stack_pos)++] = op;
160 static inline struct tst_expr_tok *stack_pop(struct tst_expr_tok *stack[],
166 return stack[--(*op_stack_pos)];
171 static inline int stack_peek_op(struct tst_expr_tok *stack[],
177 return stack[op_stack_pos - 1]->op;
291 * There can be at most one binary op on the stack
292 * since we pop the one present on the stack before we
366 int stack[MAX_STACK];
372 stack[pos] = !stack[pos];
375 stack[pos-1] = stack[pos] || stack[pos-1];
379 stack[pos-1] = stack[pos] && stack[pos-1];
384 fprintf(stderr, "Eval out of stack!\n");
388 stack[++pos] = map(i);
391 if (stack[pos] == -1)
400 return stack[0];