Package org.qdl_lang.statements
Interface ExpressionInterface
-
- All Superinterfaces:
HasResultInterface
,Serializable
,Statement
- All Known Subinterfaces:
ExpressionNode
- All Known Implementing Classes:
AllIndices
,AltIfExpressionNode
,ANode2
,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
,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 int
ALL_INDICES_NODE
static int
ALT_IF_NODE
static int
ASSIGNMENT_NODE
static int
CLOSED_SLICE_NODE
static int
COMPARISON_DYAD_NODE
static int
CONSTANT_NODE
static int
DYAD_NODE
static int
DYADIC_FUNCTION_REFERENCE_NODE
static int
EXPRESSION_STEM_NODE
static int
EXPRESSION_STEM2_NODE
static int
FUNCTION_REFERENCE_NODE
static int
LAMBDA_DEFINITION_NODE
static int
LIST_NODE
static int
MODULE_NODE
static int
MONAD_NODE
static int
NILAD_NODE
static int
OPEN_SLICE_NODE
static int
PARENTHESIZED_NODE
static int
PARSE_EXPRESSION_BLOCK_NODE
static int
PARSE_STATEMENT_BLOCK_NODE
static int
POLYAD_NODE
static int
QDL_NULL_NODE
static int
SELECT_NODE
static int
SET_NODE
static int
STEM_ENTRY_NODE
static int
STEM_EXTRACTION_NODE
static int
STEM_NODE
static int
UNKNOWN_NODE
static int
VARIABLE_NODE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getAlias()
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.boolean
hasAlias()
ExpressionInterface
makeCopy()
void
setAlias(String alias)
-
Methods inherited from interface org.qdl_lang.statements.HasResultInterface
getResult, getResultType, isEvaluated, setEvaluated, setResult, setResultType
-
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
-
-
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:
-
-