public class PrintAST extends Pass
PrintAST
pass simply prints a text representation of the parsed AST to standard
output.ast, canAddErrorsAndWarnings, fatalError, root
Constructor and Description |
---|
PrintAST(AST ast)
Instantiates a pass that runs on an entire
AST . |
Modifier and Type | Method and Description |
---|---|
void |
indentedPrintln(String text)
Prints the given text preceded by the amount of indentation called for in the
indent member variable and followed by a new line. |
void |
indentedPrintln(String text,
ASTNode node)
Prints the given text preceeded by the amount of indentation called for in the
indent member variable and followed by the line number and byte offset
information for the specified ASTNode and a new line. |
void |
nonTerminal(String text,
ASTNode node)
The default routine for printing a non-terminal AST node is to first print the name of the
AST node's class with line and byte offset information, and then recursively print its
children at indentation level one higher.
|
void |
run(Argument node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ArrayCreationExpression node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ArrayInitializer node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ArrayType node)
Runs this pass on all nodes of the indicated type.
|
void |
run(AssertStatement node)
Runs this pass on all nodes of the indicated type.
|
void |
run(Assignment node)
Runs this pass on all nodes of the indicated type.
|
void |
run(AST node)
Runs this pass on all nodes of the indicated type.
|
void |
run(AtLeastQuantifierExpression node)
Runs this pass on all nodes of the indicated type.
|
void |
run(AtMostQuantifierExpression node)
Runs this pass on all nodes of the indicated type.
|
void |
run(BinaryConstraintExpression node)
Runs this pass on all nodes of the indicated type.
|
void |
run(BinaryExpression node)
Runs this pass on all nodes of the indicated type.
|
void |
run(Block node)
Runs this pass on all nodes of the indicated type.
|
void |
run(BreakStatement node)
Runs this pass on all nodes of the indicated type.
|
void |
run(CastExpression node)
Runs this pass on all nodes of the indicated type.
|
void |
run(CatchClause node)
Runs this pass on all nodes of the indicated type.
|
void |
run(CatchList node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ClassifierAssignment node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ClassifierCastExpression node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ClassifierExpressionList node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ClassifierName node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ClassifierReturnType node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ClassifierType node)
Runs this pass on all nodes of the indicated type.
|
void |
run(CodedClassifier node)
Runs this pass on all nodes of the indicated type.
|
void |
run(CompositeGenerator node)
Runs this pass on all nodes of the indicated type.
|
void |
run(Conditional node)
Runs this pass on all nodes of the indicated type.
|
void |
run(Conjunction node)
Runs this pass on all nodes of the indicated type.
|
void |
run(Constant node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ConstantList node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ConstraintDeclaration node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ConstraintEqualityExpression node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ConstraintInvocation node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ConstraintStatementExpression node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ContinueStatement node)
Runs this pass on all nodes of the indicated type.
|
void |
run(DeclarationList node)
Runs this pass on all nodes of the indicated type.
|
void |
run(DoStatement node)
Runs this pass on all nodes of the indicated type.
|
void |
run(EmptyStatement node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ExistentialQuantifierExpression node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ExpressionList node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ExpressionStatement node)
Runs this pass on all nodes of the indicated type.
|
void |
run(FieldAccess node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ForStatement node)
Runs this pass on all nodes of the indicated type.
|
void |
run(IfStatement node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ImportDeclaration node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ImportList node)
Runs this pass on all nodes of the indicated type.
|
void |
run(IncrementExpression node)
Runs this pass on all nodes of the indicated type.
|
void |
run(InferenceDeclaration.HeadFinder node)
Runs this pass on all nodes of the indicated type.
|
void |
run(InferenceDeclaration.NormalizerDeclaration node)
Runs this pass on all nodes of the indicated type.
|
void |
run(InferenceDeclaration node)
Runs this pass on all nodes of the indicated type.
|
void |
run(InferenceInvocation node)
Runs this pass on all nodes of the indicated type.
|
void |
run(InstanceCreationExpression node)
Runs this pass on all nodes of the indicated type.
|
void |
run(InstanceofExpression node)
Runs this pass on all nodes of the indicated type.
|
void |
run(LabeledStatement node)
Runs this pass on all nodes of the indicated type.
|
void |
run(LearningClassifierExpression node)
Runs this pass on all nodes of the indicated type.
|
void |
run(MethodInvocation node)
Runs this pass on all nodes of the indicated type.
|
void |
run(Name n)
Runs this pass on all nodes of the indicated type.
|
void |
run(NameList node)
Runs this pass on all nodes of the indicated type.
|
void |
run(NegatedConstraintExpression node)
Runs this pass on all nodes of the indicated type.
|
void |
run(Operator node)
Runs this pass on all nodes of the indicated type.
|
void |
run(PackageDeclaration node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ParameterSet node)
Runs this pass on all nodes of the indicated type.
|
void |
run(PrimitiveType node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ReferenceType node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ReturnStatement node)
Runs this pass on all nodes of the indicated type.
|
void |
run(SenseStatement node)
Runs this pass on all nodes of the indicated type.
|
void |
run(StatementList node)
Runs this pass on all nodes of the indicated type.
|
void |
run(SubscriptVariable node)
Runs this pass on all nodes of the indicated type.
|
void |
run(SwitchBlock node)
Runs this pass on all nodes of the indicated type.
|
void |
run(SwitchGroup node)
Runs this pass on all nodes of the indicated type.
|
void |
run(SwitchGroupList node)
Runs this pass on all nodes of the indicated type.
|
void |
run(SwitchLabel node)
Runs this pass on all nodes of the indicated type.
|
void |
run(SwitchLabelList node)
Runs this pass on all nodes of the indicated type.
|
void |
run(SwitchStatement node)
Runs this pass on all nodes of the indicated type.
|
void |
run(SynchronizedStatement node)
Runs this pass on all nodes of the indicated type.
|
void |
run(ThrowStatement node)
Runs this pass on all nodes of the indicated type.
|
void |
run(TryStatement node)
Runs this pass on all nodes of the indicated type.
|
void |
run(UnaryExpression node)
Runs this pass on all nodes of the indicated type.
|
void |
run(UniversalQuantifierExpression node)
Runs this pass on all nodes of the indicated type.
|
void |
run(VariableDeclaration node)
Runs this pass on all nodes of the indicated type.
|
void |
run(WhileStatement node)
Runs this pass on all nodes of the indicated type.
|
printErrorsAndWarnings, reportError, reportWarning, run, run, run, run, runOnChildren, setRoot
public PrintAST(AST ast)
AST
.ast
- The program to run this pass on.public void indentedPrintln(String text)
indent
member variable and followed by a new line.text
- The text to print.public void indentedPrintln(String text, ASTNode node)
indent
member variable and followed by the line number and byte offset
information for the specified ASTNode
and a new line.text
- The text to print.node
- The node for which to print line and byte offset information.public void nonTerminal(String text, ASTNode node)
text
- The text to print.node
- The node for which to print line and byte offset information.public void run(AST node)
public void run(PackageDeclaration node)
public void run(ImportDeclaration node)
public void run(Name n)
public void run(BinaryExpression node)
public void run(InstanceCreationExpression node)
public void run(InstanceofExpression node)
public void run(ArrayCreationExpression node)
public void run(ArrayInitializer node)
public void run(Conditional node)
public void run(LearningClassifierExpression node)
public void run(CastExpression node)
public void run(IncrementExpression node)
public void run(Assignment node)
public void run(Constant node)
public void run(UnaryExpression node)
public void run(ParameterSet node)
public void run(FieldAccess node)
public void run(SubscriptVariable node)
public void run(Argument node)
public void run(Operator node)
public void run(NameList node)
public void run(ConstantList node)
public void run(StatementList node)
public void run(ExpressionList node)
public void run(ClassifierType node)
public void run(ReferenceType node)
public void run(ArrayType node)
public void run(PrimitiveType node)
public void run(ClassifierReturnType node)
public void run(ClassifierAssignment node)
public void run(VariableDeclaration node)
public void run(EmptyStatement node)
public void run(LabeledStatement node)
public void run(IfStatement node)
public void run(SwitchStatement node)
public void run(SwitchBlock node)
public void run(SwitchGroupList node)
public void run(SwitchGroup node)
public void run(SwitchLabelList node)
public void run(SwitchLabel node)
public void run(DoStatement node)
public void run(WhileStatement node)
public void run(ForStatement node)
public void run(ExpressionStatement node)
public void run(ContinueStatement node)
public void run(ReturnStatement node)
public void run(SenseStatement node)
public void run(ThrowStatement node)
public void run(SynchronizedStatement node)
public void run(TryStatement node)
public void run(CatchList node)
public void run(Block node)
public void run(CatchClause node)
public void run(AssertStatement node)
public void run(BreakStatement node)
public void run(MethodInvocation node)
public void run(DeclarationList node)
public void run(ClassifierCastExpression node)
public void run(ClassifierExpressionList node)
public void run(ClassifierName node)
public void run(CodedClassifier node)
public void run(CompositeGenerator node)
public void run(Conjunction node)
public void run(ImportList node)
public void run(AtLeastQuantifierExpression node)
public void run(AtMostQuantifierExpression node)
public void run(BinaryConstraintExpression node)
public void run(ConstraintDeclaration node)
public void run(ConstraintEqualityExpression node)
public void run(ConstraintInvocation node)
public void run(ConstraintStatementExpression node)
public void run(ExistentialQuantifierExpression node)
public void run(InferenceDeclaration node)
public void run(InferenceDeclaration.HeadFinder node)
public void run(InferenceDeclaration.NormalizerDeclaration node)
public void run(InferenceInvocation node)
public void run(NegatedConstraintExpression node)
public void run(UniversalQuantifierExpression node)
Copyright © 2016. All rights reserved.