scale.clef
Class Display

java.lang.Object
  extended by scale.clef.DescendPredicate
      extended by scale.clef.Display
All Implemented Interfaces:
DeclPredicate, ExprPredicate, Predicate, StmtPredicate, TypePredicate

public class Display
extends DescendPredicate

A class which generates information to generate a graph of a Clef tree.

$Id: Display.java,v 1.39 2007-10-04 19:58:02 burrill Exp $

Copyright 2008 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.

Do a visit on the node that you want to be the root and supply an instance of this class as the Predicate. Then use getCommand() to get the commands for daVinci.


Constructor Summary
Display(DisplayGraph da, int displayFlags)
          Display the Clef AST graphically.
 
Method Summary
 void visitAssignmentOp(AssignmentOp assign)
           
 void visitChildren(Node parent)
          A routine to visit the children of a node and generate an edge.
 void visitDeclaration(Declaration d)
           
 void visitExpression(Expression exp)
           
 void visitSubscriptOp(SubscriptOp n)
           
 
Methods inherited from class scale.clef.DescendPredicate
visitAbsoluteValueOp, visitAdditionAssignmentOp, visitAdditionOp, visitAddressLiteral, visitAddressOp, visitAggregateOp, visitAggregateType, visitAggregationElements, visitAllocArrayType, visitAllocatePlacementOp, visitAllocateSettingFieldsOp, visitAltCase, visitAndConditionalOp, visitAndOp, visitArithmeticIfStmt, visitArrayType, visitAssignedGotoStmt, visitAssignLabelStmt, visitAssignSimpleOp, visitAtomicType, visitBitAndAssignmentOp, visitBitAndOp, visitBitComplementOp, visitBitOrAssignmentOp, visitBitOrOp, visitBitShiftAssignmentOp, visitBitShiftOp, visitBitXorAssignmentOp, visitBitXorOp, visitBlockStmt, visitBooleanLiteral, visitBooleanType, visitBound, visitBreakStmt, visitCallFunctionOp, visitCallOp, visitCaseLabelDecl, visitCaseStmt, visitCharacterType, visitCharLiteral, visitComplexLiteral, visitComplexOp, visitComplexType, visitCompositeType, visitCompoundAssignmentOp, visitComputedGotoStmt, visitContinueStmt, visitDeclStmt, visitDefOp, visitDeleteArrayOp, visitDeleteOp, visitDereferenceOp, visitDivisionAssignmentOp, visitDivisionOp, visitDoLoopStmt, visitDyadicOp, visitEnumElementDecl, visitEnumerationType, visitEqualityOp, visitEquivalenceDecl, visitEvalStmt, visitExceptionDecl, visitExitStmt, visitExponentiationOp, visitExpressionIfOp, visitFieldDecl, visitFileDecl, visitFixedArrayType, visitFloatArrayLiteral, visitFloatLiteral, visitFloatType, visitForLoopStmt, visitFormalDecl, visitFortranCharType, visitForwardProcedureDecl, visitGotoStmt, visitGreaterEqualOp, visitGreaterOp, visitHeapOp, visitIdAddressOp, visitIdReferenceOp, visitIdValueOp, visitIfStmt, visitIfThenElseStmt, visitIncompleteType, visitIncrementOp, visitIntArrayLiteral, visitIntegerType, visitIntLiteral, visitLabelDecl, visitLabelStmt, visitLessEqualOp, visitLessOp, visitLiteral, visitLoopStmt, visitMaximumOp, visitMinimumOp, visitModulusOp, visitMonadicOp, visitMultiBranchStmt, visitMultiplicationAssignmentOp, visitMultiplicationOp, visitNegativeOp, visitNilOp, visitNode, visitNotEqualOp, visitNotOp, visitNullStmt, visitNumericType, visitOrConditionalOp, visitOrOp, visitParenthesesOp, visitPointerType, visitPositiveOp, visitPostDecrementOp, visitPostIncrementOp, visitPreDecrementOp, visitPreIncrementOp, visitProcedureDecl, visitProcedureType, visitRaise, visitRaiseWithObject, visitRaiseWithType, visitRealType, visitRecordType, visitRefType, visitRemainderAssignmentOp, visitRemainderOp, visitRenamedVariableDecl, visitRepeatUntilLoopStmt, visitRepeatWhileLoopStmt, visitReturnStmt, visitRoutineDecl, visitSelectIndirectOp, visitSelectOp, visitSeriesOp, visitSignedIntegerType, visitSizeofLiteral, visitStatement, visitStatementOp, visitStringLiteral, visitSubscriptAddressOp, visitSubscriptValueOp, visitSubstringOp, visitSubtractionAssignmentOp, visitSubtractionOp, visitSwitchStmt, visitTernaryOp, visitTestLoopStmt, visitThisOp, visitTranscendental2Op, visitTranscendentalOp, visitType, visitTypeConversionOp, visitTypeDecl, visitTypeName, visitUnionType, visitUnknownFormals, visitUnsignedIntegerType, visitVaArgOp, visitVaCopyOp, visitVaEndOp, visitValueDecl, visitVarArgOp, visitVariableDecl, visitVaStartOp, visitVoidType, visitWhileLoopStmt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Display

public Display(DisplayGraph da,
               int displayFlags)
Display the Clef AST graphically.

Parameters:
da - the display graph object
displayFlags - specify what should be displayed
See Also:
DisplayNode
Method Detail

visitChildren

public void visitChildren(Node parent)
A routine to visit the children of a node and generate an edge.

Overrides:
visitChildren in class DescendPredicate
Parameters:
parent - a clef node

visitExpression

public void visitExpression(Expression exp)
Specified by:
visitExpression in interface ExprPredicate
Overrides:
visitExpression in class DescendPredicate

visitDeclaration

public void visitDeclaration(Declaration d)
Specified by:
visitDeclaration in interface DeclPredicate
Overrides:
visitDeclaration in class DescendPredicate

visitAssignmentOp

public void visitAssignmentOp(AssignmentOp assign)
Specified by:
visitAssignmentOp in interface ExprPredicate
Overrides:
visitAssignmentOp in class DescendPredicate

visitSubscriptOp

public void visitSubscriptOp(SubscriptOp n)
Specified by:
visitSubscriptOp in interface ExprPredicate
Overrides:
visitSubscriptOp in class DescendPredicate