| Modifier and Type | Field and Description |
|---|---|
| private Expression | |
| private final int | |
| private Expression | |
| public static final int | |
| private static final String[] | |
| public static final int |
| Access | Constructor and Description |
|---|---|
| public | LogicalExpr(int op, Expression left, Expression right)
Creates a new logical expression - either OR or AND. |
| Modifier and Type | Method and Description |
|---|---|
| public Object | evaluateAtCompileTime()
Overrides com. Returns an object representing the compile-time evaluation of an expression. |
| public int | |
| public boolean | hasLastCall()
Overrides com. Returns true if this expressions contains a call to last() |
| public boolean | hasPositionCall()
Overrides com. Returns true if this expressions contains a call to position(). |
| public void | setParser(Parser parser)
Overrides com. Override the SyntaxTreeNode.setParser() method to make sure that the parser is set for sub-expressions |
| public String | toString()
Implements abstract com. Returns a string describing this expression |
| public void | translate(ClassGenerator classGen, MethodGenerator methodGen)
Overrides com. Compile the expression - leave boolean expression on stack |
| public void | translateDesynthesized(ClassGenerator classGen, MethodGenerator methodGen)
Overrides com. Compile expression and update true/false-lists |
| public Type | typeCheck(SymbolTable stable)
Overrides com. Type-check this expression, and possibly child expressions. |
| _left | back to summary |
|---|---|
| private Expression _left | |
| _op | back to summary |
|---|---|
| private final int _op | |
| _right | back to summary |
|---|---|
| private Expression _right | |
| AND | back to summary |
|---|---|
| public static final int AND | |
| Ops | back to summary |
|---|---|
| private static final String[] Ops | |
| OR | back to summary |
|---|---|
| public static final int OR | |
| LogicalExpr | back to summary |
|---|---|
| public LogicalExpr(int op, Expression left, Expression right) Creates a new logical expression - either OR or AND. Note that the left- and right-hand side expressions can also be logical expressions, thus creating logical trees representing structures such as (a and (b or c) and d), etc... | |
| evaluateAtCompileTime | back to summary |
|---|---|
| public Object evaluateAtCompileTime() Overrides com. Returns an object representing the compile-time evaluation of an expression. We are only using this for function-available and element-available at this time. | |
| getOp | back to summary |
|---|---|
| public int getOp() Returns this logical expression's operator - OR or AND represented by 0 and 1 respectively. | |
| hasLastCall | back to summary |
|---|---|
| public boolean hasLastCall() Overrides com. Returns true if this expressions contains a call to last() | |
| hasPositionCall | back to summary |
|---|---|
| public boolean hasPositionCall() Overrides com. Returns true if this expressions contains a call to position(). This is needed for context changes in node steps containing multiple predicates. | |
| setParser | back to summary |
|---|---|
| public void setParser(Parser parser) Overrides com. Override the SyntaxTreeNode.setParser() method to make sure that the parser is set for sub-expressions | |
| toString | back to summary |
|---|---|
| public String toString() Implements abstract com. Returns a string describing this expression | |
| translate | back to summary |
|---|---|
| public void translate(ClassGenerator classGen, MethodGenerator methodGen) Overrides com. Compile the expression - leave boolean expression on stack | |
| translateDesynthesized | back to summary |
|---|---|
| public void translateDesynthesized(ClassGenerator classGen, MethodGenerator methodGen) Overrides com. Compile expression and update true/false-lists | |
| typeCheck | back to summary |
|---|---|
| public Type typeCheck(SymbolTable stable) throws TypeCheckError Overrides com. Type-check this expression, and possibly child expressions. | |