@Override public double assign(double value) throws EvaluationException { throw new EvaluationException(getPosition(), "Tried to assign unbound variable!"); }
@Override public LValue optimize() throws EvaluationException { throw new EvaluationException(getPosition(), "Tried to optimize unbound variable!"); }
@Override public double getValue() throws EvaluationException { throw new EvaluationException(getPosition(), "Tried to evaluate unbound variable!"); }
@Override public LValue bindVariables(Expression expression, boolean preferLValue) throws ParserException { final RValue variable = expression.getVariable(name, preferLValue); if (variable == null) { throw new ParserException(getPosition(), "Variable '" + name + "' not found"); } return (LValue) variable; }
public RValue bind(Expression expression, boolean isLValue) throws ParserException { final RValue variable = expression.getVariable(name, isLValue); if (variable == null) { throw new ParserException(getPosition(), "Variable '" + name + "' not found"); } return variable; }