|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--scale.clef.AcceptPredicate | +--scale.clef2C.Clef2C
A class to generate C code from a Clef AST.
$Id: Clef2C.java,v 1.197 2002/01/03 21:44:25 burrill Exp $
Copyright 2002 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
This class is used primarily to generate C for declarations. However, it can also generate executable statements from a Clef AST.
Note, that as a side effect, Clef2C may change the Clef tree (for example, Clef2C changes the Clef tree to implement virtual functions).
Clef2Cxx
Field Summary | |
protected ClassLower |
classLower
The object used to ClassType objects. |
protected static int |
cNoPass
An enumeration of the different passes made over types to generate types/declarations. |
protected static int |
cPostName
Generate type/declaration code after name |
protected static int |
cPreName
Generate type/declaration code before name |
protected Emit |
emit
The Emit class used for generating output. |
protected static int |
firstLabelNum
|
protected boolean |
genForwardDecl
Generate a forward declaration or the complete function? |
protected boolean |
genFullProcedureType
Do we want the formals and exceptions wanted? |
protected boolean |
genInitialValue
Do we want to generate the initializer for a declaration? |
protected static java.lang.String |
idPrefix
|
protected boolean |
inAggregationElements
true if processing AggregationElements |
protected static java.lang.String |
includeFile1
|
protected static java.lang.String |
includeFile2
|
protected boolean |
inTypeRef
A flag which indicates if we are generating an aggregate/enum defintion or reference (e.g., struct A {int a;}; vs. |
protected Keyword |
keywords
Target language keywords (i.e., C and C++ have different sets of keywords) |
protected int |
labelNum
Current label number. |
protected static java.lang.String |
labelPrefix
|
protected java.util.Hashtable |
labelToInt
Map label strings to integers (needed for fortran) |
protected SourceLanguage |
lang
Information that is specific to the source language |
protected Declaration |
myDecl
The declaration associated with a type. |
protected int |
typePass
The current pass number for type declarations. |
Constructor Summary | |
protected |
Clef2C(Emit emit,
Keyword keywords,
SourceLanguage lang)
Construct a C language code generator - output goes to a file Either the Clef tree needs to be specified or the source language - but not both. |
|
Clef2C(Emit em,
SourceLanguage lang)
Construct a C language code generator - output goes to a file |
Method Summary | |
void |
closeParens(Expression expr)
Code to generate the closing parenthesis for an expression. |
void |
codeGen(Node root)
Generate code for Clef tree |
java.lang.String |
convertDeclName(Declaration decl,
boolean address)
Convert the name of the declaration for display. |
java.lang.String |
fileExt()
Get the file name extension for the C language. |
protected void |
genActuals(CallFunctionOp f)
Generate code for the actual arguments for a function call. |
protected void |
genActuals(CallMethodOp m)
Generate code for the actual arguments. |
protected void |
genArgumentList(java.util.Enumeration argList,
ProcedureType s)
Generate code for the actuals arguments to a function. |
protected void |
genColMajorSubscript(ArrayType arrayType,
java.util.Enumeration sub)
Convert a column major array subscript to a row major array subscript. |
void |
genDeclarator(Type t,
java.lang.String v)
Generate the C code for a declarator. |
void |
genDeclaratorFull(Type t,
java.lang.String v)
|
protected void |
genDecls(SymtabScope scope)
Generate code for declarations. |
protected void |
genExceptionList(java.util.Enumeration args)
Generate code for exceptions. |
protected void |
genFormals(ProcedureType s)
Generate code for a list of formal arguments. |
void |
genForwardRoutineDecl(RoutineDecl p)
|
static void |
genIncludes(SourceLanguage sl,
Emit emit)
Generate the include files needed for the generated C code. |
void |
genIntrinsicOp(java.lang.String op,
Type t1,
Expression e1,
Type t2,
Expression e2)
Generate a call to a routine that is part of the Scale runtime library. |
void |
genRoutineAttributes(RoutineDecl p)
|
protected void |
genStatements(Statement s)
Generate code for a list of statements. |
void |
genTypeDecl(TypeDecl td)
|
protected void |
genTypeReference(java.lang.String kind)
Generate the C code for a type reference. |
ClassLower |
getClassLower()
|
protected java.lang.String |
identifierName(IdReferenceOp id)
Create a unique identifier name given a IdReferenceOp node. |
protected java.lang.String |
labelName(java.lang.String n)
Create a unique label name - we prepend the label with "_L_" to ensure that label is legal for C/C++ and that it is unique. |
protected int |
mapLabelToInt(java.lang.String label)
We maintain a mapping between labels and integer values for Fortran labels (i.e., for assign statements). |
java.lang.String |
mapTypeToString(Type t)
Map a type to a string. |
void |
openParens(Expression expr)
Code to generate a parenthesis for an expression. |
protected int |
precedence(Type t)
Return a precedence value for types. |
void |
visitAbsoluteValueOp(Node n)
|
void |
visitAdditionAssignmentOp(Node n)
|
void |
visitAdditionOp(Node n)
|
void |
visitAddressLiteral(Node n)
|
void |
visitAddressOp(Node n)
|
void |
visitAggregateType(Node n)
Generate the C code for an aggregate type. |
void |
visitAggregationElementOp(Node n)
This node represents a single expression in the initializer. |
void |
visitAggregationElements(Node n)
Generate code for aggregate values. |
void |
visitAllocateOp(Node n)
Allocate an object (when the allocation occurs implicitly). |
void |
visitAlternateReturnStmt(Node n)
|
void |
visitAndConditionalOp(Node n)
|
void |
visitAndOp(Node n)
|
void |
visitArgument(Node n)
|
void |
visitArithmeticIfStmt(Node n)
Generate code for an arithmetic if statement (from Fortran 77). |
void |
visitArrayEqualityOp(Node n)
|
void |
visitArrayGreaterEqualOp(Node n)
|
void |
visitArrayGreaterOp(Node n)
|
void |
visitArrayInequalityOp(Node n)
|
void |
visitArrayLessEqualOp(Node n)
|
void |
visitArrayLessOp(Node n)
|
void |
visitArrayRelOp(Node n)
|
void |
visitArrayType(Node n)
A generic array. |
void |
visitAssignComponentsOp(Node n)
Generate C code for assigning aggregates or arrays. |
void |
visitAssignedGotoStmt(Node n)
|
void |
visitAssignFixedStringOp(Node n)
|
void |
visitAssignLabelStmt(Node n)
|
void |
visitAssignSimpleOp(Node n)
Generate the C code for a regular assignment. |
void |
visitBitAndAssignmentOp(Node n)
|
void |
visitBitAndOp(Node n)
|
void |
visitBitComplementOp(Node n)
|
void |
visitBitOrAssignmentOp(Node n)
|
void |
visitBitOrOp(Node n)
|
void |
visitBitShiftAssignmentOp(Node n)
|
void |
visitBitShiftOp(Node n)
|
void |
visitBitXorAssignmentOp(Node n)
|
void |
visitBitXorOp(Node n)
|
void |
visitBlockStmt(Node n)
Generate code for a block of statements. We emit braces around the block of statements and we generate declarations (if we generate C code) for all symbols declared in the block. |
void |
visitBooleanLiteral(Node n)
|
void |
visitBooleanType(Node n)
|
void |
visitBound(Node n)
|
void |
visitBreakStmt(Node n)
|
void |
visitCallFunctionOp(Node n)
|
void |
visitCallMethodOp(Node n)
Generate code for a call to a method. |
void |
visitCaseStmt(Node n)
|
void |
visitCharacterType(Node n)
|
void |
visitCharLiteral(Node n)
|
void |
visitClassType(Node n)
Generate C code for a class type. |
void |
visitComplexType(Node n)
|
void |
visitComputedGotoStmt(Node n)
|
void |
visitConcatenationOp(Node n)
|
void |
visitConstantDecl(Node n)
|
void |
visitConstructorDecl(Node n)
Generate code for a constructor (modeled after C++ constructors). |
void |
visitContinueStmt(Node n)
|
void |
visitDeclaration(Node n)
|
void |
visitDeclStmt(Node n)
|
void |
visitDefiniteAgElementOp(Node n)
This node represents a single expression in the initializer. |
void |
visitDereferenceOp(Node n)
|
void |
visitDestructorDecl(Node n)
|
void |
visitDivisionAssignmentOp(Node n)
|
void |
visitDivisionOp(Node n)
|
void |
visitDoLoopStmt(Node n)
|
void |
visitEntryDecl(Node n)
|
void |
visitEnumElementDecl(Node n)
|
void |
visitEnumerationType(Node n)
|
void |
visitEqualityOp(Node n)
|
void |
visitEquivalenceDecl(Node n)
Generates the C code for Fortran EQUIVALENCE relations. |
void |
visitEvalStmt(Node n)
|
void |
visitExitStmt(Node n)
|
void |
visitExponentiationOp(Node n)
|
void |
visitExpression(Node n)
|
void |
visitExpressionIfOp(Node n)
|
void |
visitFieldDecl(Node n)
|
void |
visitFileDecl(Node n)
|
void |
visitFixedArrayType(Node n)
Generate code for a fixed array (same as a regular array). |
void |
visitFloatArrayLiteral(Node n)
|
void |
visitFloatLiteral(Node n)
|
void |
visitFloatType(Node n)
|
void |
visitForLoopStmt(Node n)
|
void |
visitFormalDecl(Node n)
Generate code for formal declarations. |
void |
visitForwardProcedureDecl(Node n)
|
void |
visitGotoStmt(Node n)
|
void |
visitGreaterEqualOp(Node n)
|
void |
visitGreaterOp(Node n)
|
void |
visitIdAddressOp(Node n)
|
void |
visitIdReferenceOp(Node n)
|
void |
visitIdValueOp(Node n)
|
void |
visitIfThenElseStmt(Node n)
Generate code for a If-Then-Else statement. |
void |
visitIncompleteType(Node n)
|
void |
visitIndefiniteAgElementOp(Node n)
This node represents a single expression in the initializer. |
void |
visitInitializer(Node n)
Generate code for constructor initializers. |
void |
visitIntArrayLiteral(Node n)
|
void |
visitIntegerType(Node n)
|
void |
visitIntLiteral(Node n)
|
void |
visitLabelDecl(Node n)
|
void |
visitLabelStmt(Node n)
|
void |
visitLessEqualOp(Node n)
|
void |
visitLessOp(Node n)
|
void |
visitLiteral(Node n)
Generate code for a literal. |
void |
visitMaximumOp(Node n)
|
void |
visitMethodDecl(Node n)
|
void |
visitMethodType(Node n)
Generate code for a method's signature. |
void |
visitMinimumOp(Node n)
|
void |
visitModulusOp(Node n)
|
void |
visitMultiBranchStmt(Node n)
|
void |
visitMultiplicationAssignmentOp(Node n)
|
void |
visitMultiplicationOp(Node n)
|
void |
visitNegativeOp(Node n)
|
void |
visitNilOp(Node n)
|
void |
visitNotEqualOp(Node n)
|
void |
visitNotOp(Node n)
|
void |
visitNullStmt(Node n)
|
void |
visitOrConditionalOp(Node n)
|
void |
visitOrOp(Node n)
|
void |
visitParenthesesOp(Node n)
|
void |
visitPointerType(Node n)
Generate code for a pointer type. |
void |
visitPositionalArgumentOp(Node n)
Generate code for an actual argument. |
void |
visitPositiveOp(Node n)
|
void |
visitPostDecrementOp(Node n)
|
void |
visitPostIncrementOp(Node n)
|
void |
visitPreDecrementOp(Node n)
|
void |
visitPreIncrementOp(Node n)
|
void |
visitProcedureDecl(Node n)
|
void |
visitProcedureType(Node n)
Generate code for a procedure type. |
void |
visitRangeType(Node n)
|
void |
visitRecordType(Node n)
Generate C code for a record type. |
void |
visitRefType(Node n)
Generate code for a RefType. |
void |
visitRemainderAssignmentOp(Node n)
|
void |
visitRemainderOp(Node n)
|
void |
visitRenamedVariableDecl(Node n)
|
void |
visitRepeatUntilLoopStmt(Node n)
|
void |
visitRepeatWhileLoopStmt(Node n)
|
void |
visitReturnStmt(Node n)
|
void |
visitSelectIndirectOp(Node n)
|
void |
visitSelectOp(Node n)
|
void |
visitSeriesOp(Node n)
|
void |
visitSizeofLiteral(Node n)
|
void |
visitStringLiteral(Node n)
|
void |
visitSubscriptAddressOp(Node n)
|
void |
visitSubscriptOp(Node n)
|
void |
visitSubscriptValueOp(Node n)
|
void |
visitSubtractionAssignmentOp(Node n)
|
void |
visitSubtractionOp(Node n)
|
void |
visitSwitchStmt(Node n)
|
void |
visitThisOp(Node n)
|
void |
visitTranscendental2Op(Node n)
|
void |
visitTranscendentalOp(Node n)
|
void |
visitType(Node n)
|
void |
visitTypeConversion2Op(Node n)
Implement the conversion operator. |
void |
visitTypeConversionDecl(Node n)
A Type Conversion routine is a special case of a Method. |
void |
visitTypeConversionOp(Node n)
Implement the conversion operator. |
void |
visitTypeDecl(Node n)
Generate code for declaring a type. |
void |
visitTypeName(Node n)
|
void |
visitUnionType(Node n)
|
void |
visitUnknownFormals(Node n)
|
void |
visitVaArgOp(Node n)
Generate the C construct for the va_arg(va_list, type) construct. |
void |
visitVaEndOp(Node n)
Generate the C construct for the va_end(va_list) construct. |
void |
visitValueDecl(Node n)
Generate C code for declarations (also known as declarators). |
void |
visitVariableDecl(Node n)
|
void |
visitVaStartOp(Node n)
Generate the C construct for the va_start(va_list, parmN) construct. |
void |
visitVoidType(Node n)
|
void |
visitWhileLoopStmt(Node n)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface scale.clef.Predicate |
visitNode |
Methods inherited from interface scale.clef.DeclPredicate |
visitAltReturnFormal, visitCaseLabelDecl, visitExceptionDecl, visitFriendDecl, visitMethodReferenceDecl, visitRoutineDecl |
Methods inherited from interface scale.clef.TypePredicate |
visitAtomicType, visitCompositeType, visitFixedType, visitNumericType, visitOffsetType, visitRaise, visitRaiseWithObject, visitRaiseWithType, visitRealType, visitSuperType |
Field Detail |
protected Emit emit
protected Keyword keywords
protected SourceLanguage lang
protected int labelNum
protected java.util.Hashtable labelToInt
protected ClassLower classLower
protected static final int cNoPass
Default value - means we aren't generating types.
protected static final int cPreName
protected static final int cPostName
protected int typePass
protected boolean genInitialValue
protected boolean inAggregationElements
protected boolean genForwardDecl
protected boolean genFullProcedureType
protected boolean inTypeRef
protected Declaration myDecl
protected static final int firstLabelNum
protected static java.lang.String labelPrefix
protected static java.lang.String idPrefix
protected static java.lang.String includeFile1
protected static java.lang.String includeFile2
Constructor Detail |
public Clef2C(Emit em, SourceLanguage lang)
em
- is the Emit instance used to generate the C program.lang
- the source languageEmit
protected Clef2C(Emit emit, Keyword keywords, SourceLanguage lang)
em
- is the Emit instance used to generate the C program.k
- keywords for the languagelang
- the source languageEmit
Method Detail |
public java.lang.String fileExt()
public final void codeGen(Node root)
root
- root node of the Clef treepublic void openParens(Expression expr)
expr
- the expression after the parenthesispublic void closeParens(Expression expr)
expr
- the expression after the parenthesispublic java.lang.String mapTypeToString(Type t)
protected int mapLabelToInt(java.lang.String label)
protected void genDecls(SymtabScope scope)
protected java.lang.String labelName(java.lang.String n)
protected java.lang.String identifierName(IdReferenceOp id)
id
- the IdReferenceOp node.public java.lang.String convertDeclName(Declaration decl, boolean address)
decl
- is the Declarationaddress
- is true if an address form of the name is neededprotected void genColMajorSubscript(ArrayType arrayType, java.util.Enumeration sub)
arrayType
- the array typedimensions
- the subscript expressionsprotected void genFormals(ProcedureType s)
protected void genActuals(CallMethodOp m)
protected void genActuals(CallFunctionOp f)
f
- the clef node for a regular function callprotected void genArgumentList(java.util.Enumeration argList, ProcedureType s)
args
- the list of arguments.s
- the signature of the function (maybe null)protected void genExceptionList(java.util.Enumeration args)
protected void genTypeReference(java.lang.String kind)
kind
- a string representing the C type (e.g., struct)t
- the Clef type nodepublic void genDeclarator(Type t, java.lang.String v)
t
- the clef type to generate in Cv
- the name of the defined objectpublic void genDeclaratorFull(Type t, java.lang.String v)
protected void genStatements(Statement s)
s
- a Clef statement nodeprotected int precedence(Type t)
t
- the type of the declaratorpublic void visitDeclaration(Node n)
visitDeclaration
in interface DeclPredicate
visitDeclaration
in class AcceptPredicate
public void visitTypeDecl(Node n)
visitTypeDecl
in interface DeclPredicate
visitTypeDecl
in class AcceptPredicate
public void genTypeDecl(TypeDecl td)
public void visitTypeName(Node n)
visitTypeName
in interface DeclPredicate
visitTypeName
in class AcceptPredicate
public void visitValueDecl(Node n)
visitValueDecl
in interface DeclPredicate
visitValueDecl
in class AcceptPredicate
public void visitLabelDecl(Node n)
visitLabelDecl
in interface DeclPredicate
visitLabelDecl
in class AcceptPredicate
public void visitVariableDecl(Node n)
visitVariableDecl
in interface DeclPredicate
visitVariableDecl
in class AcceptPredicate
public void visitRenamedVariableDecl(Node n)
visitRenamedVariableDecl
in interface DeclPredicate
visitRenamedVariableDecl
in class AcceptPredicate
public void visitEquivalenceDecl(Node n)
visitEquivalenceDecl
in interface DeclPredicate
visitEquivalenceDecl
in class AcceptPredicate
public void visitFormalDecl(Node n)
visitFormalDecl
in interface DeclPredicate
visitFormalDecl
in class AcceptPredicate
n
- the FormalDecl nodepublic void visitUnknownFormals(Node n)
visitUnknownFormals
in interface DeclPredicate
visitUnknownFormals
in class AcceptPredicate
public void visitFieldDecl(Node n)
visitFieldDecl
in interface DeclPredicate
visitFieldDecl
in class AcceptPredicate
public void visitConstantDecl(Node n)
visitConstantDecl
in interface DeclPredicate
visitConstantDecl
in class AcceptPredicate
public void genRoutineAttributes(RoutineDecl p)
public void visitProcedureDecl(Node n)
visitProcedureDecl
in interface DeclPredicate
visitProcedureDecl
in class AcceptPredicate
public void genForwardRoutineDecl(RoutineDecl p)
public void visitMethodDecl(Node n)
visitMethodDecl
in interface DeclPredicate
visitMethodDecl
in class AcceptPredicate
public void visitTypeConversionDecl(Node n)
visitTypeConversionDecl
in interface DeclPredicate
visitTypeConversionDecl
in class AcceptPredicate
public void visitInitializer(Node n)
visitInitializer
in interface DeclPredicate
visitInitializer
in class AcceptPredicate
public void visitConstructorDecl(Node n)
visitConstructorDecl
in interface DeclPredicate
visitConstructorDecl
in class AcceptPredicate
n
- the ConstructorDecl Clef nodepublic void visitDestructorDecl(Node n)
visitDestructorDecl
in interface DeclPredicate
visitDestructorDecl
in class AcceptPredicate
public void visitForwardProcedureDecl(Node n)
visitForwardProcedureDecl
in interface DeclPredicate
visitForwardProcedureDecl
in class AcceptPredicate
public static void genIncludes(SourceLanguage sl, Emit emit)
sl
- specifies the original source languageemit
- is the Emit object ued to output the codepublic void visitFileDecl(Node n)
visitFileDecl
in interface DeclPredicate
visitFileDecl
in class AcceptPredicate
public void visitEnumElementDecl(Node n)
visitEnumElementDecl
in interface DeclPredicate
visitEnumElementDecl
in class AcceptPredicate
public void visitEntryDecl(Node n)
public void visitType(Node n)
visitType
in interface TypePredicate
visitType
in class AcceptPredicate
public void visitVoidType(Node n)
visitVoidType
in interface TypePredicate
visitVoidType
in class AcceptPredicate
public void visitRefType(Node n)
visitRefType
in interface TypePredicate
visitRefType
in class AcceptPredicate
public void visitProcedureType(Node n)
visitProcedureType
in interface TypePredicate
visitProcedureType
in class AcceptPredicate
n
- is the clef node for a ProcedureTypepublic void visitMethodType(Node n)
visitMethodType
in interface TypePredicate
visitMethodType
in class AcceptPredicate
public void visitIncompleteType(Node n)
visitIncompleteType
in interface TypePredicate
visitIncompleteType
in class AcceptPredicate
public void visitPointerType(Node n)
visitPointerType
in interface TypePredicate
visitPointerType
in class AcceptPredicate
n
- the pointer type clef nodepublic void visitArrayType(Node n)
visitArrayType
in interface TypePredicate
visitArrayType
in class AcceptPredicate
n
- an Array Clef nodepublic void visitAggregateType(Node n)
We assume that the aggregate head has already been generated via a call to genTypeNameProlog() and that the enclosing braces are generated. or ClassType.
visitAggregateType
in interface TypePredicate
visitAggregateType
in class AcceptPredicate
RecordType
,
UnionType
,
ClassType
public void visitComplexType(Node n)
visitComplexType
in interface TypePredicate
visitComplexType
in class AcceptPredicate
public void visitBound(Node n)
visitBound
in interface TypePredicate
visitBound
in class AcceptPredicate
public void visitRangeType(Node n)
visitRangeType
in interface TypePredicate
visitRangeType
in class AcceptPredicate
public void visitFixedArrayType(Node n)
visitFixedArrayType
in interface TypePredicate
visitFixedArrayType
in class AcceptPredicate
n
- a FixedArray Clef nodepublic ClassLower getClassLower()
public void visitClassType(Node n)
Note that if inTypeRef is true we just generate the name of the class.
visitClassType
in interface TypePredicate
visitClassType
in class AcceptPredicate
visitAggregateType(scale.clef.Node)
public void visitRecordType(Node n)
Similar code is generated for records, unions, and classes.
visitRecordType
in interface TypePredicate
visitRecordType
in class AcceptPredicate
visitAggregateType(scale.clef.Node)
public void visitFloatType(Node n)
visitFloatType
in interface TypePredicate
visitFloatType
in class AcceptPredicate
public void visitIntegerType(Node n)
visitIntegerType
in interface TypePredicate
visitIntegerType
in class AcceptPredicate
public void visitEnumerationType(Node n)
visitEnumerationType
in interface TypePredicate
visitEnumerationType
in class AcceptPredicate
public void visitUnionType(Node n)
visitUnionType
in interface TypePredicate
visitUnionType
in class AcceptPredicate
public void visitCharacterType(Node n)
visitCharacterType
in interface TypePredicate
visitCharacterType
in class AcceptPredicate
public void visitBooleanType(Node n)
visitBooleanType
in interface TypePredicate
visitBooleanType
in class AcceptPredicate
public void visitBlockStmt(Node n)
visitBlockStmt
in interface StmtPredicate
visitBlockStmt
in class AcceptPredicate
public void visitMultiBranchStmt(Node n)
visitMultiBranchStmt
in interface StmtPredicate
visitMultiBranchStmt
in class AcceptPredicate
public void visitIfThenElseStmt(Node n)
visitIfThenElseStmt
in interface StmtPredicate
visitIfThenElseStmt
in class AcceptPredicate
public void visitArithmeticIfStmt(Node n)
if (e == 0) goto L_Equal; else if (e < 0) goto L_Less; } else goto L_Greater;
visitArithmeticIfStmt
in interface StmtPredicate
visitArithmeticIfStmt
in class AcceptPredicate
public void visitComputedGotoStmt(Node n)
visitComputedGotoStmt
in interface StmtPredicate
visitComputedGotoStmt
in class AcceptPredicate
public void visitAssignLabelStmt(Node n)
visitAssignLabelStmt
in interface StmtPredicate
visitAssignLabelStmt
in class AcceptPredicate
public void visitAssignedGotoStmt(Node n)
visitAssignedGotoStmt
in interface StmtPredicate
visitAssignedGotoStmt
in class AcceptPredicate
public void visitCaseStmt(Node n)
visitCaseStmt
in interface StmtPredicate
visitCaseStmt
in class AcceptPredicate
public void visitSwitchStmt(Node n)
visitSwitchStmt
in interface StmtPredicate
visitSwitchStmt
in class AcceptPredicate
public void visitWhileLoopStmt(Node n)
visitWhileLoopStmt
in interface StmtPredicate
visitWhileLoopStmt
in class AcceptPredicate
public void visitRepeatWhileLoopStmt(Node n)
visitRepeatWhileLoopStmt
in interface StmtPredicate
visitRepeatWhileLoopStmt
in class AcceptPredicate
public void visitRepeatUntilLoopStmt(Node n)
visitRepeatUntilLoopStmt
in interface StmtPredicate
visitRepeatUntilLoopStmt
in class AcceptPredicate
public void visitDoLoopStmt(Node n)
visitDoLoopStmt
in interface StmtPredicate
visitDoLoopStmt
in class AcceptPredicate
public void visitForLoopStmt(Node n)
visitForLoopStmt
in interface StmtPredicate
visitForLoopStmt
in class AcceptPredicate
public void visitBreakStmt(Node n)
visitBreakStmt
in interface StmtPredicate
visitBreakStmt
in class AcceptPredicate
public void visitContinueStmt(Node n)
visitContinueStmt
in interface StmtPredicate
visitContinueStmt
in class AcceptPredicate
public void visitGotoStmt(Node n)
visitGotoStmt
in interface StmtPredicate
visitGotoStmt
in class AcceptPredicate
public void visitReturnStmt(Node n)
visitReturnStmt
in interface StmtPredicate
visitReturnStmt
in class AcceptPredicate
public void visitExitStmt(Node n)
visitExitStmt
in interface StmtPredicate
visitExitStmt
in class AcceptPredicate
public void visitAlternateReturnStmt(Node n)
visitAlternateReturnStmt
in interface StmtPredicate
visitAlternateReturnStmt
in class AcceptPredicate
public void visitEvalStmt(Node n)
visitEvalStmt
in interface StmtPredicate
visitEvalStmt
in class AcceptPredicate
public void visitDeclStmt(Node n)
visitDeclStmt
in interface StmtPredicate
visitDeclStmt
in class AcceptPredicate
public void visitNullStmt(Node n)
visitNullStmt
in interface StmtPredicate
visitNullStmt
in class AcceptPredicate
public void visitLabelStmt(Node n)
visitLabelStmt
in interface StmtPredicate
visitLabelStmt
in class AcceptPredicate
public void visitExpression(Node n)
visitExpression
in interface ExprPredicate
visitExpression
in class AcceptPredicate
public void visitLiteral(Node n)
visitLiteral
in interface ExprPredicate
visitLiteral
in class AcceptPredicate
n
- the literal nodepublic void visitStringLiteral(Node n)
visitStringLiteral
in interface ExprPredicate
visitStringLiteral
in class AcceptPredicate
public void visitBooleanLiteral(Node n)
visitBooleanLiteral
in interface ExprPredicate
visitBooleanLiteral
in class AcceptPredicate
public void visitCharLiteral(Node n)
visitCharLiteral
in interface ExprPredicate
visitCharLiteral
in class AcceptPredicate
public void visitIntLiteral(Node n)
visitIntLiteral
in interface ExprPredicate
visitIntLiteral
in class AcceptPredicate
public void visitIntArrayLiteral(Node n)
visitIntArrayLiteral
in interface ExprPredicate
visitIntArrayLiteral
in class AcceptPredicate
public void visitFloatLiteral(Node n)
visitFloatLiteral
in interface ExprPredicate
visitFloatLiteral
in class AcceptPredicate
public void visitFloatArrayLiteral(Node n)
visitFloatArrayLiteral
in interface ExprPredicate
visitFloatArrayLiteral
in class AcceptPredicate
public void visitSizeofLiteral(Node n)
visitSizeofLiteral
in interface ExprPredicate
visitSizeofLiteral
in class AcceptPredicate
public void visitAddressLiteral(Node n)
visitAddressLiteral
in interface ExprPredicate
visitAddressLiteral
in class AcceptPredicate
public void visitIdAddressOp(Node n)
visitIdAddressOp
in interface ExprPredicate
visitIdAddressOp
in class AcceptPredicate
public void visitIdValueOp(Node n)
visitIdValueOp
in interface ExprPredicate
visitIdValueOp
in class AcceptPredicate
public void visitIdReferenceOp(Node n)
visitIdReferenceOp
in interface ExprPredicate
visitIdReferenceOp
in class AcceptPredicate
public void visitSeriesOp(Node n)
visitSeriesOp
in interface ExprPredicate
visitSeriesOp
in class AcceptPredicate
public void visitParenthesesOp(Node n)
visitParenthesesOp
in interface ExprPredicate
visitParenthesesOp
in class AcceptPredicate
public void visitAggregationElementOp(Node n)
visitAggregationElementOp
in interface ExprPredicate
visitAggregationElementOp
in class AcceptPredicate
public void visitDefiniteAgElementOp(Node n)
visitDefiniteAgElementOp
in interface ExprPredicate
visitDefiniteAgElementOp
in class AcceptPredicate
public void visitIndefiniteAgElementOp(Node n)
visitIndefiniteAgElementOp
in interface ExprPredicate
visitIndefiniteAgElementOp
in class AcceptPredicate
public void visitAggregationElements(Node n)
visitAggregationElements
in interface ExprPredicate
visitAggregationElements
in class AcceptPredicate
public void visitAssignSimpleOp(Node n)
visitAssignSimpleOp
in interface ExprPredicate
visitAssignSimpleOp
in class AcceptPredicate
public void visitAssignComponentsOp(Node n)
visitAssignComponentsOp
in interface ExprPredicate
visitAssignComponentsOp
in class AcceptPredicate
public void visitAssignFixedStringOp(Node n)
visitAssignFixedStringOp
in interface ExprPredicate
visitAssignFixedStringOp
in class AcceptPredicate
public void visitPositiveOp(Node n)
visitPositiveOp
in interface ExprPredicate
visitPositiveOp
in class AcceptPredicate
public void genIntrinsicOp(java.lang.String op, Type t1, Expression e1, Type t2, Expression e2)
public void visitNegativeOp(Node n)
visitNegativeOp
in interface ExprPredicate
visitNegativeOp
in class AcceptPredicate
public void visitTranscendentalOp(Node n)
visitTranscendentalOp
in interface ExprPredicate
public void visitTranscendental2Op(Node n)
visitTranscendental2Op
in interface ExprPredicate
public void visitAbsoluteValueOp(Node n)
visitAbsoluteValueOp
in interface ExprPredicate
visitAbsoluteValueOp
in class AcceptPredicate
public void visitMinimumOp(Node n)
visitMinimumOp
in interface ExprPredicate
visitMinimumOp
in class AcceptPredicate
public void visitMaximumOp(Node n)
visitMaximumOp
in interface ExprPredicate
visitMaximumOp
in class AcceptPredicate
public void visitAdditionOp(Node n)
visitAdditionOp
in interface ExprPredicate
visitAdditionOp
in class AcceptPredicate
public void visitSubtractionOp(Node n)
visitSubtractionOp
in interface ExprPredicate
visitSubtractionOp
in class AcceptPredicate
public void visitMultiplicationOp(Node n)
visitMultiplicationOp
in interface ExprPredicate
visitMultiplicationOp
in class AcceptPredicate
public void visitDivisionOp(Node n)
visitDivisionOp
in interface ExprPredicate
visitDivisionOp
in class AcceptPredicate
public void visitModulusOp(Node n)
visitModulusOp
in interface ExprPredicate
visitModulusOp
in class AcceptPredicate
public void visitRemainderOp(Node n)
visitRemainderOp
in interface ExprPredicate
visitRemainderOp
in class AcceptPredicate
public void visitExponentiationOp(Node n)
visitExponentiationOp
in interface ExprPredicate
visitExponentiationOp
in class AcceptPredicate
public void visitPreDecrementOp(Node n)
visitPreDecrementOp
in interface ExprPredicate
visitPreDecrementOp
in class AcceptPredicate
public void visitPreIncrementOp(Node n)
visitPreIncrementOp
in interface ExprPredicate
visitPreIncrementOp
in class AcceptPredicate
public void visitPostDecrementOp(Node n)
visitPostDecrementOp
in interface ExprPredicate
visitPostDecrementOp
in class AcceptPredicate
public void visitPostIncrementOp(Node n)
visitPostIncrementOp
in interface ExprPredicate
visitPostIncrementOp
in class AcceptPredicate
public void visitEqualityOp(Node n)
visitEqualityOp
in interface ExprPredicate
visitEqualityOp
in class AcceptPredicate
public void visitNotEqualOp(Node n)
visitNotEqualOp
in interface ExprPredicate
visitNotEqualOp
in class AcceptPredicate
public void visitGreaterOp(Node n)
visitGreaterOp
in interface ExprPredicate
visitGreaterOp
in class AcceptPredicate
public void visitGreaterEqualOp(Node n)
visitGreaterEqualOp
in interface ExprPredicate
visitGreaterEqualOp
in class AcceptPredicate
public void visitLessOp(Node n)
visitLessOp
in interface ExprPredicate
visitLessOp
in class AcceptPredicate
public void visitLessEqualOp(Node n)
visitLessEqualOp
in interface ExprPredicate
visitLessEqualOp
in class AcceptPredicate
public void visitBitComplementOp(Node n)
visitBitComplementOp
in interface ExprPredicate
visitBitComplementOp
in class AcceptPredicate
public void visitBitAndOp(Node n)
visitBitAndOp
in interface ExprPredicate
visitBitAndOp
in class AcceptPredicate
public void visitBitXorOp(Node n)
visitBitXorOp
in interface ExprPredicate
visitBitXorOp
in class AcceptPredicate
public void visitBitOrOp(Node n)
visitBitOrOp
in interface ExprPredicate
visitBitOrOp
in class AcceptPredicate
public void visitBitShiftOp(Node n)
visitBitShiftOp
in interface ExprPredicate
visitBitShiftOp
in class AcceptPredicate
public void visitMultiplicationAssignmentOp(Node n)
visitMultiplicationAssignmentOp
in interface ExprPredicate
visitMultiplicationAssignmentOp
in class AcceptPredicate
public void visitDivisionAssignmentOp(Node n)
visitDivisionAssignmentOp
in interface ExprPredicate
visitDivisionAssignmentOp
in class AcceptPredicate
public void visitRemainderAssignmentOp(Node n)
visitRemainderAssignmentOp
in interface ExprPredicate
visitRemainderAssignmentOp
in class AcceptPredicate
public void visitAdditionAssignmentOp(Node n)
visitAdditionAssignmentOp
in interface ExprPredicate
visitAdditionAssignmentOp
in class AcceptPredicate
public void visitSubtractionAssignmentOp(Node n)
visitSubtractionAssignmentOp
in interface ExprPredicate
visitSubtractionAssignmentOp
in class AcceptPredicate
public void visitBitShiftAssignmentOp(Node n)
visitBitShiftAssignmentOp
in interface ExprPredicate
visitBitShiftAssignmentOp
in class AcceptPredicate
public void visitBitAndAssignmentOp(Node n)
visitBitAndAssignmentOp
in interface ExprPredicate
visitBitAndAssignmentOp
in class AcceptPredicate
public void visitBitXorAssignmentOp(Node n)
visitBitXorAssignmentOp
in interface ExprPredicate
visitBitXorAssignmentOp
in class AcceptPredicate
public void visitBitOrAssignmentOp(Node n)
visitBitOrAssignmentOp
in interface ExprPredicate
visitBitOrAssignmentOp
in class AcceptPredicate
public void visitNotOp(Node n)
visitNotOp
in interface ExprPredicate
visitNotOp
in class AcceptPredicate
public void visitAndOp(Node n)
visitAndOp
in interface ExprPredicate
visitAndOp
in class AcceptPredicate
public void visitOrOp(Node n)
visitOrOp
in interface ExprPredicate
visitOrOp
in class AcceptPredicate
public void visitAndConditionalOp(Node n)
visitAndConditionalOp
in interface ExprPredicate
visitAndConditionalOp
in class AcceptPredicate
public void visitOrConditionalOp(Node n)
visitOrConditionalOp
in interface ExprPredicate
visitOrConditionalOp
in class AcceptPredicate
public void visitExpressionIfOp(Node n)
visitExpressionIfOp
in interface ExprPredicate
visitExpressionIfOp
in class AcceptPredicate
public void visitAddressOp(Node n)
visitAddressOp
in interface ExprPredicate
visitAddressOp
in class AcceptPredicate
public void visitDereferenceOp(Node n)
visitDereferenceOp
in interface ExprPredicate
visitDereferenceOp
in class AcceptPredicate
public void visitNilOp(Node n)
visitNilOp
in interface ExprPredicate
visitNilOp
in class AcceptPredicate
public void visitThisOp(Node n)
visitThisOp
in interface ExprPredicate
visitThisOp
in class AcceptPredicate
public void visitSelectOp(Node n)
visitSelectOp
in interface ExprPredicate
visitSelectOp
in class AcceptPredicate
public void visitSelectIndirectOp(Node n)
visitSelectIndirectOp
in interface ExprPredicate
visitSelectIndirectOp
in class AcceptPredicate
public void visitSubscriptValueOp(Node n)
visitSubscriptValueOp
in interface ExprPredicate
visitSubscriptValueOp
in class AcceptPredicate
public void visitSubscriptAddressOp(Node n)
visitSubscriptAddressOp
in interface ExprPredicate
visitSubscriptAddressOp
in class AcceptPredicate
public void visitSubscriptOp(Node n)
visitSubscriptOp
in interface ExprPredicate
visitSubscriptOp
in class AcceptPredicate
public void visitArrayRelOp(Node n)
visitArrayRelOp
in interface ExprPredicate
visitArrayRelOp
in class AcceptPredicate
public void visitArrayEqualityOp(Node n)
visitArrayEqualityOp
in interface ExprPredicate
visitArrayEqualityOp
in class AcceptPredicate
public void visitArrayInequalityOp(Node n)
visitArrayInequalityOp
in interface ExprPredicate
visitArrayInequalityOp
in class AcceptPredicate
public void visitArrayGreaterOp(Node n)
visitArrayGreaterOp
in interface ExprPredicate
visitArrayGreaterOp
in class AcceptPredicate
public void visitArrayGreaterEqualOp(Node n)
visitArrayGreaterEqualOp
in interface ExprPredicate
visitArrayGreaterEqualOp
in class AcceptPredicate
public void visitArrayLessOp(Node n)
visitArrayLessOp
in interface ExprPredicate
visitArrayLessOp
in class AcceptPredicate
public void visitArrayLessEqualOp(Node n)
visitArrayLessEqualOp
in interface ExprPredicate
visitArrayLessEqualOp
in class AcceptPredicate
public void visitConcatenationOp(Node n)
visitConcatenationOp
in interface ExprPredicate
visitConcatenationOp
in class AcceptPredicate
public void visitArgument(Node n)
visitArgument
in interface ExprPredicate
visitArgument
in class AcceptPredicate
public void visitPositionalArgumentOp(Node n)
visitPositionalArgumentOp
in interface ExprPredicate
visitPositionalArgumentOp
in class AcceptPredicate
public void visitCallFunctionOp(Node n)
visitCallFunctionOp
in interface ExprPredicate
visitCallFunctionOp
in class AcceptPredicate
public void visitCallMethodOp(Node n)
visitCallMethodOp
in interface ExprPredicate
visitCallMethodOp
in class AcceptPredicate
ClassLower
public void visitAllocateOp(Node n)
visitAllocateOp
in interface ExprPredicate
visitAllocateOp
in class AcceptPredicate
n
- the Clef AllocateOp nodepublic void visitTypeConversionOp(Node n)
visitTypeConversionOp
in interface ExprPredicate
visitTypeConversionOp
in class AcceptPredicate
public void visitTypeConversion2Op(Node n)
visitTypeConversion2Op
in interface ExprPredicate
visitTypeConversion2Op
in class AcceptPredicate
InternalError
- for errorspublic void visitVaStartOp(Node n)
visitVaStartOp
in interface ExprPredicate
visitVaStartOp
in class AcceptPredicate
public void visitVaArgOp(Node n)
visitVaArgOp
in interface ExprPredicate
visitVaArgOp
in class AcceptPredicate
public void visitVaEndOp(Node n)
visitVaEndOp
in interface ExprPredicate
visitVaEndOp
in class AcceptPredicate
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |