|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Object | +--coins.casttohir.ToHirC
Convert ASTree(abstruct syntax tree) to HIR-C.
| フィールドの概要 | |
(パッケージプライベート) static byte[] |
astPrototype
|
(パッケージプライベート) static int |
lListNum
|
| インタフェース coins.ast.TypeId から継承したフィールド |
ARRAY_T, CHAR_T, CONST_T, DOUBLE_T, ELLIPSIS_T, ENUM_BEGIN, ENUM_END, FLOAT_T, FUNCTION_T, INT_T, LONG_DOUBLE_T, LONG_LONG_T, LONG_T, NO_DIMENSION_T, OFFSET_T, POINTER_T, RESTRICT_T, RETURN_T, S_AUTO, S_EXTERN, S_INLINE, S_NONE, S_REGISTER, S_STATIC, SHORT_T, SIGNED_T, SIZE_T, STRUCT_BEGIN, STRUCT_END, UNION_BEGIN, UNION_END, UNSIGNED_T, VOID_T, VOLATILE_T |
| インタフェース coins.ast.TokenId から継承したフィールド |
AND_E, ANDAND, ARROW, ASM, AUTO, BAD_TOKEN, BREAK, CASE, CAST_OP, CHAR, CHAR_CONST, COND_OP, CONST, CONTINUE, DEFAULT, DIV_E, DO, DOUBLE, DOUBLE_CONST, ELLIPSIS, ELSE, ENUM, EOF, EQ, EXOR_E, EXTERN, FLOAT, FLOAT_CONST, FOR, FUNCALL, GE, GOTO, IDENTIFIER, IF, IGNORE, INDEX_OP, INLINE, INT, INT_CONST, LE, LONG, LONG_CONST, LONG_DOUBLE_CONST, LONGLONG_CONST, LSHIFT, LSHIFT_E, MINUS_E, MINUSMINUS, MOD_E, MUL_E, MUTABLE, NEQ, OR_E, OROR, PLUS_E, PLUSPLUS, PRAGMA, REGISTER, RESTRICT, RETURN, RSHIFT, RSHIFT_E, SHORT, SIGNED, SIZEOF, SKIP_GCC_ASM, SKIP_GCC_ATTRIBUTE, STATIC, STRING_L, STRING_WL, STRUCT, SWITCH, TYPEDEF, TYPEDEF_NAME, UINT_CONST, ULONG_CONST, ULONGLONG_CONST, UNION, UNSIGNED, VOID, VOLATILE, WHILE |
| コンストラクタの概要 | |
ToHirC(ToHir tohir)
Constructor. |
|
| メソッドの概要 | |
void |
astToHirC(java.io.InputStream stream)
Create ASTree by ast.Parser.read(), and visit ASTree to create corresponding HIR-C. |
void |
atAddressExpr(AddressExpr ast)
Create reference expression. |
void |
atArithBinaryExpr(ArithBinaryExpr ast)
Create arithmetic binary expression. |
void |
atArithUnaryExpr(ArithUnaryExpr ast)
Create arithmetic unary expression. |
void |
atArrayExpr(ArrayExpr ast)
Create array subscript expression. |
void |
atArrayInitializer(ArrayInitializer ast)
At array initializer. |
void |
atAsmExpr(AsmExpr ast)
|
void |
atAssignExpr(AssignExpr ast)
Create assign expression. |
void |
atASTList(ASTList ast)
At AST list. |
void |
atBreakStmnt(BreakStmnt ast)
Create break statement. |
void |
atCallExpr(CallExpr ast)
Create function call expression. |
void |
atCaseLabel(CaseLabel ast)
Create case statement. |
void |
atCastExpr(CastExpr ast)
Create cast expression. |
void |
atCommaExpr(CommaExpr ast)
Create comma expression. |
void |
atCompoundStmnt(CompoundStmnt ast)
At compound statement. |
void |
atConditionalExpr(ConditionalExpr ast)
Create conditional expression. |
void |
atConstantExpr(ConstantExpr ast)
Create constant expression. |
void |
atContinueStmnt(ContinueStmnt ast)
Create continue statement. |
void |
atDeclarator(Declarator ast)
Create symbol and add into symbol table. (= typedef, function prototype, variable declaration) |
void |
atDeclaratorList(DeclaratorList ast)
At declaration list. |
void |
atDefaultLabel(DefaultLabel ast)
Create default statement. |
void |
atDereferenceExpr(DereferenceExpr ast)
Create dereference expression. |
void |
atDoStmnt(DoStmnt ast)
Create do-while statement. |
void |
atEnum(Enum ast)
Create EnumType and add symTableCurrent. |
void |
atExpressionStmnt(ExpressionStmnt ast)
Create expression statement. |
void |
atForStmnt(ForStmnt ast)
Create for statement. |
void |
atFunction(Function ast)
Create function, and add programRoot. |
void |
atGotoStmnt(GotoStmnt ast)
Create goto statement. |
void |
atIfStmnt(IfStmnt ast)
Create if statement. |
void |
atMemberExpr(MemberExpr ast)
Create member-access expression. |
void |
atNamedLabel(NamedLabel ast)
Create label statement. |
void |
atNullStmnt(NullStmnt ast)
Create null statement. |
void |
atPair(Pair ast)
At Pair. |
void |
atPointerBinaryExpr(PointerBinaryExpr ast)
Create pointer binary expression. |
void |
atPostfixExpr(PostfixExpr ast)
Create postfix expression. |
void |
atPragma(Pragma ast)
atPragma changes Pragma to InfStmt whose inf-body is the String specified in the pragma statement. |
void |
atPrefixExpr(PrefixExpr ast)
Create prefix expression. |
void |
atReturnStmnt(ReturnStmnt ast)
Create return statement. |
void |
atSizeofExpr(SizeofExpr ast)
Create sizeof expression. |
void |
atStringLiteral(StringLiteral ast)
Create string literal expression. |
void |
atStruct(Struct ast)
Create StructType and add to symTableCurrent. |
StructType |
atStructDeclarator(Struct ast)
|
void |
atSwitchStmnt(SwitchStmnt ast)
Create switch statement. |
void |
atUnion(Union ast)
Create UnionType and add symTableCurrent. |
UnionType |
atUnionDeclarator(Union ast)
Create UnionType and add symTableCurrent. |
void |
atVariableExpr(VariableExpr ast)
Create variable expression. |
void |
atWhileStmnt(WhileStmnt ast)
Create while statement. |
protected void |
message(int level,
java.lang.String mes)
Output debug message. |
Exp |
pPromotion(Exp e)
Pointer promotion (selfish naming). |
HIR |
visit(ASTree ast)
Visit ASTree. |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| フィールドの詳細 |
static final byte[] astPrototype
static int lListNum
| コンストラクタの詳細 |
public ToHirC(ToHir tohir)
tohir - Offers cooperation with the object of other packages.| メソッドの詳細 |
protected void message(int level,
java.lang.String mes)
level - Debug level.mes - Debug message.
public void astToHirC(java.io.InputStream stream)
throws java.io.IOException,
FatalError
stream - Input stream.
java.io.IOException
FatalErrorpublic HIR visit(ASTree ast)
public void atASTList(ASTList ast)
Visitor 内の atASTListast - ASTListpublic void atPragma(Pragma ast)
Visitor 内の atPragmaast - Pragma character string contained in the pragma statement.public void atAsmExpr(AsmExpr ast)
Visitor 内の atAsmExprpublic void atCompoundStmnt(CompoundStmnt ast)
Visitor 内の atCompoundStmntast - ASTListpublic void atStruct(Struct ast)
Visitor 内の atStructast - Structpublic StructType atStructDeclarator(Struct ast)
public void atUnion(Union ast)
Visitor 内の atUnionast - Unionpublic UnionType atUnionDeclarator(Union ast)
ast - Unionpublic void atEnum(Enum ast)
Visitor 内の atEnumast - Enumpublic void atDeclarator(Declarator ast)
Visitor 内の atDeclaratorast - Declaratorpublic void atDeclaratorList(DeclaratorList ast)
Visitor 内の atDeclaratorListast - DeclaratorListpublic void atArrayInitializer(ArrayInitializer ast)
Visitor 内の atArrayInitializerast - ArrayInitializerpublic void atFunction(Function ast)
Visitor 内の atFunctionast - Functionpublic void atPair(Pair ast)
Visitor 内の atPairast - Pairpublic void atAddressExpr(AddressExpr ast)
Visitor 内の atAddressExprast - AddressExprpublic void atArithBinaryExpr(ArithBinaryExpr ast)
Visitor 内の atArithBinaryExprast - ArithBinaryExprpublic void atArithUnaryExpr(ArithUnaryExpr ast)
Visitor 内の atArithUnaryExprast - ArithUnaryExprpublic void atArrayExpr(ArrayExpr ast)
Visitor 内の atArrayExprast - ArrayExprpublic void atAssignExpr(AssignExpr ast)
Visitor 内の atAssignExprast - AssignExprpublic void atCallExpr(CallExpr ast)
Visitor 内の atCallExprast - CallExprpublic void atCastExpr(CastExpr ast)
Visitor 内の atCastExprast - CastExprpublic void atSizeofExpr(SizeofExpr ast)
Visitor 内の atSizeofExprast - SizeofExprpublic void atCommaExpr(CommaExpr ast)
Visitor 内の atCommaExprast - CommaExprpublic void atConditionalExpr(ConditionalExpr ast)
Visitor 内の atConditionalExprast - ConditionalExprpublic void atConstantExpr(ConstantExpr ast)
Visitor 内の atConstantExprast - ConstantExprpublic void atDereferenceExpr(DereferenceExpr ast)
Visitor 内の atDereferenceExprast - DereferenceExprpublic void atMemberExpr(MemberExpr ast)
Visitor 内の atMemberExprast - MemberExprpublic void atPointerBinaryExpr(PointerBinaryExpr ast)
Visitor 内の atPointerBinaryExprast - PointerBinaryExprpublic void atPostfixExpr(PostfixExpr ast)
Visitor 内の atPostfixExprast - PostfixExprpublic void atPrefixExpr(PrefixExpr ast)
Visitor 内の atPrefixExprast - PrefixExprpublic void atStringLiteral(StringLiteral ast)
Visitor 内の atStringLiteralast - StringLiteralpublic void atVariableExpr(VariableExpr ast)
Visitor 内の atVariableExprast - VariableExprpublic void atBreakStmnt(BreakStmnt ast)
Visitor 内の atBreakStmntpublic void atCaseLabel(CaseLabel ast)
Visitor 内の atCaseLabelast - CaseLabelpublic void atContinueStmnt(ContinueStmnt ast)
Visitor 内の atContinueStmntast - ContinueStmntpublic void atDefaultLabel(DefaultLabel ast)
Visitor 内の atDefaultLabelast - DefaultLabelpublic void atDoStmnt(DoStmnt ast)
Visitor 内の atDoStmntast - DoStmntpublic void atExpressionStmnt(ExpressionStmnt ast)
Visitor 内の atExpressionStmntast - ExpressionStmntpublic void atForStmnt(ForStmnt ast)
Visitor 内の atForStmntast - ForStmntpublic void atGotoStmnt(GotoStmnt ast)
Visitor 内の atGotoStmntast - GotoStmntpublic void atIfStmnt(IfStmnt ast)
Visitor 内の atIfStmntast - IfStmntpublic void atNamedLabel(NamedLabel ast)
Visitor 内の atNamedLabelast - NamedLabelpublic void atNullStmnt(NullStmnt ast)
Visitor 内の atNullStmntast - NullStmntpublic void atReturnStmnt(ReturnStmnt ast)
Visitor 内の atReturnStmntast - ReturnStmntpublic void atSwitchStmnt(SwitchStmnt ast)
Visitor 内の atSwitchStmntast - SwitchStmntpublic void atWhileStmnt(WhileStmnt ast)
Visitor 内の atWhileStmntast - WhileStmntpublic Exp pPromotion(Exp e)
e - Expression which has VectorType/SubpType.
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||