Package org.qdl_lang.statements
Interface ExpressionInterface
-
- All Superinterfaces:
HasResultInterface,Serializable,Statement
- All Known Subinterfaces:
ExpressionNode
- All Known Implementing Classes:
AllIndices,AltIfExpressionNode,ANode2,AxisExpression,ClosedSliceNode,ComparisonDyad,ConstantNode,Dyad,DyadicFunctionReferenceNode,ESN2,ExpressionImpl,ExpressionStemNode,FunctionReferenceNode,LambdaDefinitionNode,ModuleExpression,Monad,Nilad,OpenSliceNode,ParenthesizedExpression,ParseExpressionBlockNode,ParseStatementBlock,Polyad,QDLNull,QDLSetNode,SelectExpressionNode,StemEntryNode,StemExtractionNode,StemListNode,StemVariableNode,UserFunction,VariableNode
public interface ExpressionInterface extends Statement, HasResultInterface
The actual top-level interface for an expression. This adds information about whether this is executing in a module and has an alias.Created by Jeff Gaynor
on 9/28/20 at 4:18 PM
-
-
Field Summary
Fields Modifier and Type Field Description static intALL_INDICES_NODEstatic intALT_IF_NODEstatic intASSIGNMENT_NODEstatic intAXIS_RESTRICTION_NODEstatic intCLOSED_SLICE_NODEstatic intCOMPARISON_DYAD_NODEstatic intCONSTANT_NODEstatic intDYAD_NODEstatic intDYADIC_FUNCTION_REFERENCE_NODEstatic intEXPRESSION_STEM_NODEstatic intEXPRESSION_STEM2_NODEstatic intFUNCTION_REFERENCE_NODEstatic intLAMBDA_DEFINITION_NODEstatic intLIST_NODEstatic intMODULE_NODEstatic intMONAD_NODEstatic intNILAD_NODEstatic intOPEN_SLICE_NODEstatic intPARENTHESIZED_NODEstatic intPARSE_EXPRESSION_BLOCK_NODEstatic intPARSE_STATEMENT_BLOCK_NODEstatic intPOLYAD_NODEstatic intQDL_NULL_NODEstatic intSELECT_NODEstatic intSET_NODEstatic intSTEM_ENTRY_NODEstatic intSTEM_EXTRACTION_NODEstatic intSTEM_NODEstatic intUNKNOWN_NODEstatic intVARIABLE_NODE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetAlias()intgetNodeType()QDL is not strongly typed but Java is, so each node type should have a unique integer and conditionals should use that, not the instanceof operator.booleanhasAlias()ExpressionInterfacemakeCopy()voidsetAlias(String alias)-
Methods inherited from interface org.qdl_lang.statements.HasResultInterface
getResult, getResultType, isEvaluated, setEvaluated, setResult, setResult
-
Methods inherited from interface org.qdl_lang.statements.Statement
evaluate, getSourceCode, getTokenPosition, hasTokenPosition, setSourceCode, setTokenPosition
-
-
-
-
Field Detail
-
UNKNOWN_NODE
static final int UNKNOWN_NODE
- See Also:
- Constant Field Values
-
ALL_INDICES_NODE
static final int ALL_INDICES_NODE
- See Also:
- Constant Field Values
-
ALT_IF_NODE
static final int ALT_IF_NODE
- See Also:
- Constant Field Values
-
ASSIGNMENT_NODE
static final int ASSIGNMENT_NODE
- See Also:
- Constant Field Values
-
CLOSED_SLICE_NODE
static final int CLOSED_SLICE_NODE
- See Also:
- Constant Field Values
-
COMPARISON_DYAD_NODE
static final int COMPARISON_DYAD_NODE
- See Also:
- Constant Field Values
-
CONSTANT_NODE
static final int CONSTANT_NODE
- See Also:
- Constant Field Values
-
DYAD_NODE
static final int DYAD_NODE
- See Also:
- Constant Field Values
-
EXPRESSION_STEM2_NODE
static final int EXPRESSION_STEM2_NODE
- See Also:
- Constant Field Values
-
EXPRESSION_STEM_NODE
static final int EXPRESSION_STEM_NODE
- See Also:
- Constant Field Values
-
FUNCTION_REFERENCE_NODE
static final int FUNCTION_REFERENCE_NODE
- See Also:
- Constant Field Values
-
LAMBDA_DEFINITION_NODE
static final int LAMBDA_DEFINITION_NODE
- See Also:
- Constant Field Values
-
LIST_NODE
static final int LIST_NODE
- See Also:
- Constant Field Values
-
MODULE_NODE
static final int MODULE_NODE
- See Also:
- Constant Field Values
-
MONAD_NODE
static final int MONAD_NODE
- See Also:
- Constant Field Values
-
NILAD_NODE
static final int NILAD_NODE
- See Also:
- Constant Field Values
-
OPEN_SLICE_NODE
static final int OPEN_SLICE_NODE
- See Also:
- Constant Field Values
-
PARENTHESIZED_NODE
static final int PARENTHESIZED_NODE
- See Also:
- Constant Field Values
-
PARSE_EXPRESSION_BLOCK_NODE
static final int PARSE_EXPRESSION_BLOCK_NODE
- See Also:
- Constant Field Values
-
PARSE_STATEMENT_BLOCK_NODE
static final int PARSE_STATEMENT_BLOCK_NODE
- See Also:
- Constant Field Values
-
POLYAD_NODE
static final int POLYAD_NODE
- See Also:
- Constant Field Values
-
QDL_NULL_NODE
static final int QDL_NULL_NODE
- See Also:
- Constant Field Values
-
SELECT_NODE
static final int SELECT_NODE
- See Also:
- Constant Field Values
-
SET_NODE
static final int SET_NODE
- See Also:
- Constant Field Values
-
STEM_ENTRY_NODE
static final int STEM_ENTRY_NODE
- See Also:
- Constant Field Values
-
STEM_EXTRACTION_NODE
static final int STEM_EXTRACTION_NODE
- See Also:
- Constant Field Values
-
STEM_NODE
static final int STEM_NODE
- See Also:
- Constant Field Values
-
VARIABLE_NODE
static final int VARIABLE_NODE
- See Also:
- Constant Field Values
-
DYADIC_FUNCTION_REFERENCE_NODE
static final int DYADIC_FUNCTION_REFERENCE_NODE
- See Also:
- Constant Field Values
-
AXIS_RESTRICTION_NODE
static final int AXIS_RESTRICTION_NODE
- See Also:
- Constant Field Values
-
-
Method Detail
-
makeCopy
ExpressionInterface makeCopy()
-
hasAlias
boolean hasAlias()
-
getAlias
String getAlias()
-
setAlias
void setAlias(String alias)
-
getNodeType
int getNodeType()
QDL is not strongly typed but Java is, so each node type should have a unique integer and conditionals should use that, not the instanceof operator. This allows for efficient programming with switch statements rather than a bevy of conditionals (potentially each of which gets done even if the correct case has been handled).- Returns:
-
-