Package | Description |
---|---|
parsii.eval |
Modifier and Type | Class and Description |
---|---|
class |
BinaryOperation
Represents a binary operation.
|
class |
Constant
Represents a constant numeric expression.
|
class |
FunctionCall
Represents the invocation of a function.
|
class |
VariableReference
Represents a reference to a variable.
|
Modifier and Type | Method and Description |
---|---|
protected Expression |
Parser.atom()
Parser rule for parsing an atom.
|
protected Expression |
Parser.expression()
Parser rule for parsing an expression.
|
protected Expression |
Parser.functionCall()
Parses a function call.
|
Expression |
BinaryOperation.getLeft()
Returns the left operand
|
Expression |
BinaryOperation.getRight()
Returns the right operand
|
Expression |
Parser.parse()
Parses the expression in input
|
Expression |
Parser.parse(Reader input)
Parses the given input into an expression.
|
Expression |
Parser.parse(Reader input,
Scope scope)
Parses the given input into an expression.
|
Expression |
Parser.parse(String input)
Parses the given input into an expression.
|
Expression |
Parser.parse(String input,
Scope scope)
Parses the given input into an expression.
|
protected Expression |
Parser.power()
Parser rule for parsing a power.
|
protected Expression |
Parser.product()
Parser rule for parsing a product.
|
protected Expression |
Parser.relationalExpression()
Parser rule for parsing a relational expression.
|
protected Expression |
Parser.reOrder(Expression left,
Expression right,
BinaryOperation.Op op) |
Expression |
VariableReference.simplify() |
Expression |
FunctionCall.simplify() |
Expression |
BinaryOperation.simplify() |
default Expression |
Expression.simplify()
Returns a simplified version of this expression.
|
protected Expression |
Parser.term()
Parser rule for parsing a term.
|
Modifier and Type | Method and Description |
---|---|
List<Expression> |
FunctionCall.getParameters()
Returns all parameters added so far.
|
Modifier and Type | Method and Description |
---|---|
void |
FunctionCall.addParameter(Expression expression)
Adds an expression as parameter.
|
protected Expression |
Parser.reOrder(Expression left,
Expression right,
BinaryOperation.Op op) |
protected void |
Parser.replaceLeft(BinaryOperation target,
Expression newLeft,
BinaryOperation.Op op) |
void |
BinaryOperation.setLeft(Expression left)
Replaces the left operand of the operation with the given expression.
|
Modifier and Type | Method and Description |
---|---|
double |
BinaryFunction.eval(List<Expression> args) |
double |
Function.eval(List<Expression> args)
Executes the function with the given arguments.
|
double |
UnaryFunction.eval(List<Expression> args) |
Constructor and Description |
---|
BinaryOperation(BinaryOperation.Op op,
Expression left,
Expression right)
Creates a new binary operator for the given operator and operands.
|
Copyright © 2020. All rights reserved.