| Package | Description |
|---|---|
| com.mpobjects.bdparsii.eval |
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractExpression
Expression which holds a
MathContext field. |
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
|
protected Expression |
Parser.parse()
Parses the expression in input
|
static Expression |
Parser.parse(Reader input)
Parses the given input into an expression.
|
static Expression |
Parser.parse(Reader input,
Scope scope)
Parses the given input into an expression.
|
static Expression |
Parser.parse(String input)
Parses the given input into an expression.
|
static 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(MathContext mathContext) |
Expression |
FunctionCall.simplify(MathContext mathContext) |
default Expression |
Expression.simplify(MathContext mathContext)
Returns a simplified version of this expression.
|
Expression |
BinaryOperation.simplify(MathContext mathContext) |
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 |
|---|---|
BigDecimal |
UnaryFunction.eval(List<Expression> args,
MathContext mathContext) |
BigDecimal |
Function.eval(List<Expression> args,
MathContext mathContext)
Executes the function with the given arguments.
|
BigDecimal |
BinaryFunction.eval(List<Expression> args,
MathContext mathContext) |
| Constructor and Description |
|---|
BinaryOperation(MathContext mathContext,
BinaryOperation.Op op,
Expression left,
Expression right)
Creates a new binary operator for the given operator and operands.
|
Copyright © 2019. All rights reserved.