Package org.harctoolbox.irp
Class Expression
java.lang.Object
org.harctoolbox.irp.IrpObject
org.harctoolbox.irp.PrimaryItem
org.harctoolbox.irp.Expression
- All Implemented Interfaces:
Serializable,EquationSolving,Numerical,XmlExport
This class corresponds to Chapter 9.
An expression is evaluated during execution time with the current name bindings.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static longcBoolean(boolean x) abstract booleanconstant(NameEngine nameEngine) booleanstatic ExpressionnewExpression(long value) static ExpressionnewExpression(String str) static ExpressionnewExpression(org.antlr.v4.runtime.tree.ParseTree original, IrpParser.ExpressionContext ctx) static Expressionstatic ExpressionnewExpression(ParserDriver parserDriver) static ExpressionnewExpressionEOF(String str) Construct an Expression by parsing the argument.static ExpressionnewExpressionEOF(ParserDriver parserDriver) propertiesMap(int noProperties) longtoLong()toNumber()org.antlr.v4.gui.TreeViewerMethods inherited from class org.harctoolbox.irp.PrimaryItem
invert, leftHandSide, newPrimaryItem, newPrimaryItem, newPrimaryItem, propertiesMap, substituteConstantVariables, toIrpStringMethods inherited from class org.harctoolbox.irp.IrpObject
createParameterSpecs, equals, getParseTree, hashCode, numberOfBits, numberOfBitSpecs, numberOfInfiniteRepeats, prerender, toDocument, toIrpString, toString, toString, toStringTree, toStringTree, toTreeViewer, toTreeViewer, toTreeViewer, updateStateWhenEntering, updateStateWhenExiting, weightMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.harctoolbox.irp.Numerical
toBitwiseParameter, toLong
-
Field Details
-
TRUE
-
FALSE
-
-
Constructor Details
-
Expression
protected Expression(org.antlr.v4.runtime.tree.ParseTree ctx)
-
-
Method Details
-
newExpression
-
newExpressionEOF
Construct an Expression by parsing the argument.- Parameters:
str-- Returns:
- Throws:
IrpParseException
-
newExpression
-
newExpression
-
newExpressionEOF
-
newExpression
-
newExpression
public static Expression newExpression(org.antlr.v4.runtime.tree.ParseTree original, IrpParser.ExpressionContext ctx) -
cBoolean
protected static long cBoolean(boolean x) -
toStringTree
-
toTreeViewer
public org.antlr.v4.gui.TreeViewer toTreeViewer() -
toLong
- Throws:
NameUnassignedException
-
toNumber
-
propertiesMap
- Overrides:
propertiesMapin classIrpObject
-
toElement
-
isNumericLiteral
public boolean isNumericLiteral() -
constant
- Specified by:
constantin classPrimaryItem
-