Package org.scijava.parsington.eval
Interface StackEvaluator
- All Superinterfaces:
Evaluator
- All Known Subinterfaces:
StandardStackEvaluator
- All Known Implementing Classes:
DefaultStackEvaluator
Interface for stack-based expression evaluators, operating on postfix queues.
- Author:
- Curtis Rueden
-
Method Summary
Modifier and TypeMethodDescriptiondefault ObjectEvaluates an infix expression.default Objectevaluate(LinkedList<Object> queue) Evaluates a postfix token queue.default Objectevaluate(SyntaxTree syntaxTree) Evaluates a syntax tree.Executes anoperationwith the specified value stack.
-
Method Details
-
execute
Executes anoperationwith the specified value stack.- Parameters:
op- The operator to execute.stack- The value stack containing the arguments to pass.- Returns:
- The result of the operation.
-
evaluate
Description copied from interface:EvaluatorEvaluates an infix expression. -
evaluate
Description copied from interface:EvaluatorEvaluates a syntax tree. -
evaluate
Description copied from interface:EvaluatorEvaluates a postfix token queue.
-