public class ParseTreeSpecializer extends AbstractParseTreeVisitor
ASTPtRootNode
Modifier and Type | Field and Description |
---|---|
protected ParseTreeEvaluator |
_evaluator |
protected java.util.List |
_excludedNames |
protected ASTPtRootNode |
_result |
protected ParserScope |
_scope |
Constructor and Description |
---|
ParseTreeSpecializer() |
_unsupportedVisitException, _visitAllChildren, _visitChild, visitAssignmentNode, visitUnionConstructNode
protected java.util.List _excludedNames
protected ASTPtRootNode _result
protected ParserScope _scope
protected ParseTreeEvaluator _evaluator
public ASTPtRootNode specialize(ASTPtRootNode node, java.util.List excludedNames, ParserScope scope) throws IllegalActionException
node
- The nodeexcludedNames
- the names to be excludedscope
- The scopeIllegalActionException
- If the node can't be cloned
or if thrown while visiting.public void visitArrayConstructNode(ASTPtArrayConstructNode node) throws IllegalActionException
visitArrayConstructNode
in interface ParseTreeVisitor
visitArrayConstructNode
in class AbstractParseTreeVisitor
IllegalActionException
public void visitBitwiseNode(ASTPtBitwiseNode node) throws IllegalActionException
visitBitwiseNode
in interface ParseTreeVisitor
visitBitwiseNode
in class AbstractParseTreeVisitor
IllegalActionException
public void visitFunctionApplicationNode(ASTPtFunctionApplicationNode node) throws IllegalActionException
visitFunctionApplicationNode
in interface ParseTreeVisitor
visitFunctionApplicationNode
in class AbstractParseTreeVisitor
IllegalActionException
public void visitFunctionDefinitionNode(ASTPtFunctionDefinitionNode node) throws IllegalActionException
visitFunctionDefinitionNode
in interface ParseTreeVisitor
visitFunctionDefinitionNode
in class AbstractParseTreeVisitor
IllegalActionException
public void visitFunctionalIfNode(ASTPtFunctionalIfNode node) throws IllegalActionException
visitFunctionalIfNode
in interface ParseTreeVisitor
visitFunctionalIfNode
in class AbstractParseTreeVisitor
IllegalActionException
public void visitLeafNode(ASTPtLeafNode node) throws IllegalActionException
visitLeafNode
in interface ParseTreeVisitor
visitLeafNode
in class AbstractParseTreeVisitor
IllegalActionException
public void visitLogicalNode(ASTPtLogicalNode node) throws IllegalActionException
visitLogicalNode
in interface ParseTreeVisitor
visitLogicalNode
in class AbstractParseTreeVisitor
IllegalActionException
public void visitMatrixConstructNode(ASTPtMatrixConstructNode node) throws IllegalActionException
visitMatrixConstructNode
in interface ParseTreeVisitor
visitMatrixConstructNode
in class AbstractParseTreeVisitor
IllegalActionException
public void visitMethodCallNode(ASTPtMethodCallNode node) throws IllegalActionException
visitMethodCallNode
in interface ParseTreeVisitor
visitMethodCallNode
in class AbstractParseTreeVisitor
IllegalActionException
public void visitPowerNode(ASTPtPowerNode node) throws IllegalActionException
visitPowerNode
in interface ParseTreeVisitor
visitPowerNode
in class AbstractParseTreeVisitor
IllegalActionException
public void visitProductNode(ASTPtProductNode node) throws IllegalActionException
visitProductNode
in interface ParseTreeVisitor
visitProductNode
in class AbstractParseTreeVisitor
IllegalActionException
public void visitRecordConstructNode(ASTPtRecordConstructNode node) throws IllegalActionException
visitRecordConstructNode
in interface ParseTreeVisitor
visitRecordConstructNode
in class AbstractParseTreeVisitor
IllegalActionException
public void visitRelationalNode(ASTPtRelationalNode node) throws IllegalActionException
visitRelationalNode
in interface ParseTreeVisitor
visitRelationalNode
in class AbstractParseTreeVisitor
IllegalActionException
public void visitShiftNode(ASTPtShiftNode node) throws IllegalActionException
visitShiftNode
in interface ParseTreeVisitor
visitShiftNode
in class AbstractParseTreeVisitor
IllegalActionException
public void visitSumNode(ASTPtSumNode node) throws IllegalActionException
visitSumNode
in interface ParseTreeVisitor
visitSumNode
in class AbstractParseTreeVisitor
IllegalActionException
public void visitUnaryNode(ASTPtUnaryNode node) throws IllegalActionException
visitUnaryNode
in interface ParseTreeVisitor
visitUnaryNode
in class AbstractParseTreeVisitor
IllegalActionException
protected boolean _childrenAreConstant(ASTPtRootNode node)
node
- the nodeprotected void _defaultVisit(ASTPtRootNode node) throws IllegalActionException
IllegalActionException
protected void _replaceConstantNode(ASTPtRootNode node) throws IllegalActionException
IllegalActionException