edu.toronto.cs.cparser
Class CILTransformer
java.lang.Object
antlr.TreeParser
edu.toronto.cs.cparser.CILTransformer
- All Implemented Interfaces:
- CILTransformerTokenTypes
public class CILTransformer
- extends antlr.TreeParser
- implements CILTransformerTokenTypes
Fields inherited from class antlr.TreeParser |
_retTree, astFactory, ASTNULL, inputState, returnAST, tokenNames |
Fields inherited from interface edu.toronto.cs.cparser.CILTransformerTokenTypes |
ASSIGN, BadStringLiteral, BAND, BAND_ASSIGN, BNOT, BOR, BOR_ASSIGN, BXOR, BXOR_ASSIGN, CharLiteral, COLON, COMMA, Comment, CPPComment, DEC, Digit, DIV, DIV_ASSIGN, DOT, DoubleDoubleConst, EOF, EQUAL, Escape, Exponent, FloatDoubleConst, FloatSuffix, GT, GTE, ID, INC, IntHexConst, IntIntConst, IntOctalConst, LAND, LBRACKET, LCURLY, LineDirective, LITERAL___alignof, LITERAL___attribute, LITERAL___builtin_va_list, LITERAL___complex, LITERAL___imag, LITERAL___label__, LITERAL___nd_goto, LITERAL___noreturn__, LITERAL___pure__, LITERAL___real, LITERAL___restrict, LITERAL_asm, LITERAL_auto, LITERAL_break, LITERAL_case, LITERAL_char, LITERAL_const, LITERAL_continue, LITERAL_default, LITERAL_do, LITERAL_double, LITERAL_else, LITERAL_enum, LITERAL_extern, LITERAL_float, LITERAL_for, LITERAL_goto, LITERAL_if, LITERAL_inline, LITERAL_int, LITERAL_long, LITERAL_register, LITERAL_return, LITERAL_short, LITERAL_signed, LITERAL_sizeof, LITERAL_static, LITERAL_struct, LITERAL_switch, LITERAL_typedef, LITERAL_typeof, LITERAL_union, LITERAL_unsigned, LITERAL_void, LITERAL_volatile, LITERAL_while, LNOT, LongDoubleConst, LongHexConst, LongIntConst, LongOctalConst, LongSuffix, LOR, LPAREN, LSHIFT, LSHIFT_ASSIGN, LT, LTE, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NAsmAttribute, NCast, NCommaExpr, NCompoundStatement, NDeclaration, NDeclarator, NEmptyExpression, NExpressionGroup, NFunctionCallArgs, NFunctionDef, NGnuAsmExpr, NInitDecl, NInitializer, NInitializerElementLabel, NLabel, NLcurlyInitializer, NNonemptyAbstractDeclarator, NOT_EQUAL, NParameterDeclaration, NParameterTypeList, NPointerGroup, NPostfixExpr, NRangeExpr, NStatementExpr, NStringSeq, NStructDeclarator, NTypedefName, NTypeMissing, NULL_TREE_LOOKAHEAD, Number, NUnaryExpr, PLUS, PLUS_ASSIGN, PREPROC_DIRECTIVE, PTR, QUESTION, RBRACKET, RCURLY, RPAREN, RSHIFT, RSHIFT_ASSIGN, SEMI, Space, STAR, STAR_ASSIGN, StringLiteral, UnsignedHexConst, UnsignedIntConst, UnsignedOctalConst, UnsignedSuffix, VARARGS, Vocabulary, Whitespace |
Method Summary |
Expr |
additiveExpr(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
argExprList(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
asm_expr(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
assignExpr(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
attributeDecl(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
bitAndExpr(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
castExpr(antlr.collections.AST _t,
ExprFactory fac)
|
protected void |
charConst(antlr.collections.AST _t)
|
Expr |
compoundStatement(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
compoundStatementExpr(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
declaration(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
declarationList(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
declarator(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
declSpecifiers(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
enumerator(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
enumList(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
enumSpecifier(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
equalityExpr(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
exclusiveOrExpr(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
expr(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
externalDef(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
externalList(antlr.collections.AST _t,
ExprFactory fac)
|
protected void |
floatConst(antlr.collections.AST _t)
|
Expr |
functionDeclSpecifiers(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
functionDef(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
functionStorageClassSpecifier(antlr.collections.AST _t,
ExprFactory fac)
|
java.util.Map |
getCallNumMap()
|
int |
getNumCallSites(java.lang.String funcName)
|
void |
gnuAsmExpr(antlr.collections.AST _t,
ExprFactory fac)
|
void |
idList(antlr.collections.AST _t)
|
Expr |
inclusiveOrExpr(antlr.collections.AST _t,
ExprFactory fac)
|
void |
incNumCallSites(java.lang.String funcName)
|
Expr |
initDecl(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
initDeclList(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
initializer(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
initializerList(antlr.collections.AST _t,
ExprFactory fac)
|
protected void |
intConst(antlr.collections.AST _t)
|
Expr |
lcurlyInitializer(antlr.collections.AST _t,
ExprFactory fac)
|
void |
localLabelDecl(antlr.collections.AST _t)
|
Expr |
logicalAndExpr(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
logicalOrExpr(antlr.collections.AST _t,
ExprFactory fac)
|
void |
match(antlr.collections.AST t,
antlr.collections.impl.BitSet b)
|
protected void |
match(antlr.collections.AST t,
int ttype)
|
protected void |
matchNot(antlr.collections.AST t,
int ttype)
|
Expr |
multExpr(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
ndGotoLabelList(antlr.collections.AST _t,
ExprFactory fac)
|
void |
nonemptyAbstractDeclarator(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
parameterDeclaration(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
parameterTypeList(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
pointerGroup(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
postfixExpr(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
primaryExpr(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
relationalExpr(antlr.collections.AST _t,
ExprFactory fac)
|
void |
reportError(antlr.MismatchedTokenException ex)
|
void |
reportError(antlr.NoViableAltException ex)
|
void |
reportError(antlr.RecognitionException ex)
|
void |
reportError(java.lang.String s)
|
void |
reportWarning(java.lang.String s)
|
Expr |
shiftExpr(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
specifierQualifierList(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
statement(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
statementBody(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
statementList(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
storageClassSpecifier(antlr.collections.AST _t,
ExprFactory fac)
|
protected void |
stringConst(antlr.collections.AST _t)
|
void |
strOptExprPair(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
structDeclaration(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
structDeclarationList(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
structDeclarator(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
structOrUnionBody(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
structSpecifier(antlr.collections.AST _t,
ExprFactory fac)
|
void |
traceIn(java.lang.String rname,
antlr.collections.AST t)
|
void |
traceOut(java.lang.String rname,
antlr.collections.AST t)
|
Expr |
translationUnit(antlr.collections.AST _t,
ExprFactory fac,
boolean _stmtBlocking)
|
void |
typedefName(antlr.collections.AST _t)
|
void |
typeName(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
typeQualifier(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
typeSpecifier(antlr.collections.AST _t,
ExprFactory fac)
|
Expr |
unaryExpr(antlr.collections.AST _t,
ExprFactory fac)
|
Operator |
unaryOperator(antlr.collections.AST _t)
|
Expr |
unionSpecifier(antlr.collections.AST _t,
ExprFactory fac)
|
Methods inherited from class antlr.TreeParser |
getAST, getASTFactory, getTokenName, getTokenNames, panic, setASTFactory, setASTNodeClass, setASTNodeType, traceIndent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_tokenNames
public static final java.lang.String[] _tokenNames
_tokenSet_0
public static final antlr.collections.impl.BitSet _tokenSet_0
_tokenSet_1
public static final antlr.collections.impl.BitSet _tokenSet_1
_tokenSet_2
public static final antlr.collections.impl.BitSet _tokenSet_2
_tokenSet_3
public static final antlr.collections.impl.BitSet _tokenSet_3
CILTransformer
public CILTransformer()
reportError
public void reportError(antlr.RecognitionException ex)
- Overrides:
reportError
in class antlr.TreeParser
reportError
public void reportError(antlr.NoViableAltException ex)
reportError
public void reportError(antlr.MismatchedTokenException ex)
reportError
public void reportError(java.lang.String s)
- Overrides:
reportError
in class antlr.TreeParser
reportWarning
public void reportWarning(java.lang.String s)
- Overrides:
reportWarning
in class antlr.TreeParser
match
protected void match(antlr.collections.AST t,
int ttype)
throws antlr.MismatchedTokenException
- Overrides:
match
in class antlr.TreeParser
- Throws:
antlr.MismatchedTokenException
match
public void match(antlr.collections.AST t,
antlr.collections.impl.BitSet b)
throws antlr.MismatchedTokenException
- Overrides:
match
in class antlr.TreeParser
- Throws:
antlr.MismatchedTokenException
matchNot
protected void matchNot(antlr.collections.AST t,
int ttype)
throws antlr.MismatchedTokenException
- Overrides:
matchNot
in class antlr.TreeParser
- Throws:
antlr.MismatchedTokenException
traceIn
public void traceIn(java.lang.String rname,
antlr.collections.AST t)
- Overrides:
traceIn
in class antlr.TreeParser
traceOut
public void traceOut(java.lang.String rname,
antlr.collections.AST t)
- Overrides:
traceOut
in class antlr.TreeParser
incNumCallSites
public void incNumCallSites(java.lang.String funcName)
getNumCallSites
public int getNumCallSites(java.lang.String funcName)
getCallNumMap
public java.util.Map getCallNumMap()
translationUnit
public final Expr translationUnit(antlr.collections.AST _t,
ExprFactory fac,
boolean _stmtBlocking)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
externalList
public final Expr externalList(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
externalDef
public final Expr externalDef(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
declaration
public final Expr declaration(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
functionDef
public final Expr functionDef(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
asm_expr
public final Expr asm_expr(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
expr
public final Expr expr(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
declSpecifiers
public final Expr declSpecifiers(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
initDecl
public final Expr initDecl(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
storageClassSpecifier
public final Expr storageClassSpecifier(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
typeQualifier
public final Expr typeQualifier(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
typeSpecifier
public final Expr typeSpecifier(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
functionStorageClassSpecifier
public final Expr functionStorageClassSpecifier(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
structSpecifier
public final Expr structSpecifier(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
attributeDecl
public final Expr attributeDecl(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
unionSpecifier
public final Expr unionSpecifier(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
enumSpecifier
public final Expr enumSpecifier(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
typedefName
public final void typedefName(antlr.collections.AST _t)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
structOrUnionBody
public final Expr structOrUnionBody(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
structDeclarationList
public final Expr structDeclarationList(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
structDeclaration
public final Expr structDeclaration(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
specifierQualifierList
public final Expr specifierQualifierList(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
structDeclarator
public final Expr structDeclarator(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
declarator
public final Expr declarator(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
enumList
public final Expr enumList(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
enumerator
public final Expr enumerator(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
initDeclList
public final Expr initDeclList(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
pointerGroup
public final Expr pointerGroup(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
idList
public final void idList(antlr.collections.AST _t)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
initializer
public final Expr initializer(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
lcurlyInitializer
public final Expr lcurlyInitializer(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
initializerList
public final Expr initializerList(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
parameterTypeList
public final Expr parameterTypeList(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
parameterDeclaration
public final Expr parameterDeclaration(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
nonemptyAbstractDeclarator
public final void nonemptyAbstractDeclarator(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
functionDeclSpecifiers
public final Expr functionDeclSpecifiers(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
compoundStatement
public final Expr compoundStatement(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
declarationList
public final Expr declarationList(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
localLabelDecl
public final void localLabelDecl(antlr.collections.AST _t)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
statementList
public final Expr statementList(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
statement
public final Expr statement(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
statementBody
public final Expr statementBody(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
ndGotoLabelList
public final Expr ndGotoLabelList(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
assignExpr
public final Expr assignExpr(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
logicalOrExpr
public final Expr logicalOrExpr(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
logicalAndExpr
public final Expr logicalAndExpr(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
inclusiveOrExpr
public final Expr inclusiveOrExpr(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
exclusiveOrExpr
public final Expr exclusiveOrExpr(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
bitAndExpr
public final Expr bitAndExpr(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
shiftExpr
public final Expr shiftExpr(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
equalityExpr
public final Expr equalityExpr(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
relationalExpr
public final Expr relationalExpr(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
additiveExpr
public final Expr additiveExpr(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
multExpr
public final Expr multExpr(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
castExpr
public final Expr castExpr(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
unaryExpr
public final Expr unaryExpr(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
postfixExpr
public final Expr postfixExpr(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
primaryExpr
public final Expr primaryExpr(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
gnuAsmExpr
public final void gnuAsmExpr(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
compoundStatementExpr
public final Expr compoundStatementExpr(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
stringConst
protected final void stringConst(antlr.collections.AST _t)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
strOptExprPair
public final void strOptExprPair(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
typeName
public final void typeName(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
unaryOperator
public final Operator unaryOperator(antlr.collections.AST _t)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
argExprList
public final Expr argExprList(antlr.collections.AST _t,
ExprFactory fac)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
charConst
protected final void charConst(antlr.collections.AST _t)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
intConst
protected final void intConst(antlr.collections.AST _t)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
floatConst
protected final void floatConst(antlr.collections.AST _t)
throws antlr.RecognitionException
- Throws:
antlr.RecognitionException