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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static long
cBoolean
(boolean x) abstract boolean
constant
(NameEngine nameEngine) boolean
static Expression
newExpression
(long value) static Expression
newExpression
(String str) static Expression
newExpression
(org.antlr.v4.runtime.tree.ParseTree original, IrpParser.ExpressionContext ctx) static Expression
static Expression
newExpression
(ParserDriver parserDriver) static Expression
newExpressionEOF
(String str) Construct an Expression by parsing the argument.static Expression
newExpressionEOF
(ParserDriver parserDriver) propertiesMap
(int noProperites) long
toLong()
toNumber()
org.antlr.v4.gui.TreeViewer
Methods inherited from class org.harctoolbox.irp.PrimaryItem
invert, leftHandSide, newPrimaryItem, newPrimaryItem, newPrimaryItem, propertiesMap, substituteConstantVariables, toIrpString
Methods 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, weight
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:
propertiesMap
in classIrpObject
-
toElement
-
isNumericLiteral
public boolean isNumericLiteral() -
constant
- Specified by:
constant
in classPrimaryItem
-