Class ExpressionParseTree


  • public class ExpressionParseTree
    extends Object
    Represents a parsed expression.
    Author:
    Paul Speed
    • Constructor Detail

      • ExpressionParseTree

        public ExpressionParseTree​(String expr,
                                   SSIMediator ssiMediator)
                            throws ParseException
        Creates a new parse tree for the specified expression.
        Parameters:
        expr - The expression string
        ssiMediator - Used to evaluated the expressions
        Throws:
        ParseException - a parsing error occurred
    • Method Detail

      • evaluateTree

        public boolean evaluateTree()
        Evaluates the tree and returns true or false. The specified SSIMediator is used to resolve variable references.
        Returns:
        the evaluation result