|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
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
FatalError
public HIR visit(ASTree ast)
public void atASTList(ASTList ast)
Visitor
内の atASTList
ast
- ASTListpublic void atPragma(Pragma ast)
Visitor
内の atPragma
ast
- Pragma character string contained in the pragma statement.public void atAsmExpr(AsmExpr ast)
Visitor
内の atAsmExpr
public void atCompoundStmnt(CompoundStmnt ast)
Visitor
内の atCompoundStmnt
ast
- ASTListpublic void atStruct(Struct ast)
Visitor
内の atStruct
ast
- Structpublic StructType atStructDeclarator(Struct ast)
public void atUnion(Union ast)
Visitor
内の atUnion
ast
- Unionpublic UnionType atUnionDeclarator(Union ast)
ast
- Unionpublic void atEnum(Enum ast)
Visitor
内の atEnum
ast
- Enumpublic void atDeclarator(Declarator ast)
Visitor
内の atDeclarator
ast
- Declaratorpublic void atDeclaratorList(DeclaratorList ast)
Visitor
内の atDeclaratorList
ast
- DeclaratorListpublic void atArrayInitializer(ArrayInitializer ast)
Visitor
内の atArrayInitializer
ast
- ArrayInitializerpublic void atFunction(Function ast)
Visitor
内の atFunction
ast
- Functionpublic void atPair(Pair ast)
Visitor
内の atPair
ast
- Pairpublic void atAddressExpr(AddressExpr ast)
Visitor
内の atAddressExpr
ast
- AddressExprpublic void atArithBinaryExpr(ArithBinaryExpr ast)
Visitor
内の atArithBinaryExpr
ast
- ArithBinaryExprpublic void atArithUnaryExpr(ArithUnaryExpr ast)
Visitor
内の atArithUnaryExpr
ast
- ArithUnaryExprpublic void atArrayExpr(ArrayExpr ast)
Visitor
内の atArrayExpr
ast
- ArrayExprpublic void atAssignExpr(AssignExpr ast)
Visitor
内の atAssignExpr
ast
- AssignExprpublic void atCallExpr(CallExpr ast)
Visitor
内の atCallExpr
ast
- CallExprpublic void atCastExpr(CastExpr ast)
Visitor
内の atCastExpr
ast
- CastExprpublic void atSizeofExpr(SizeofExpr ast)
Visitor
内の atSizeofExpr
ast
- SizeofExprpublic void atCommaExpr(CommaExpr ast)
Visitor
内の atCommaExpr
ast
- CommaExprpublic void atConditionalExpr(ConditionalExpr ast)
Visitor
内の atConditionalExpr
ast
- ConditionalExprpublic void atConstantExpr(ConstantExpr ast)
Visitor
内の atConstantExpr
ast
- ConstantExprpublic void atDereferenceExpr(DereferenceExpr ast)
Visitor
内の atDereferenceExpr
ast
- DereferenceExprpublic void atMemberExpr(MemberExpr ast)
Visitor
内の atMemberExpr
ast
- MemberExprpublic void atPointerBinaryExpr(PointerBinaryExpr ast)
Visitor
内の atPointerBinaryExpr
ast
- PointerBinaryExprpublic void atPostfixExpr(PostfixExpr ast)
Visitor
内の atPostfixExpr
ast
- PostfixExprpublic void atPrefixExpr(PrefixExpr ast)
Visitor
内の atPrefixExpr
ast
- PrefixExprpublic void atStringLiteral(StringLiteral ast)
Visitor
内の atStringLiteral
ast
- StringLiteralpublic void atVariableExpr(VariableExpr ast)
Visitor
内の atVariableExpr
ast
- VariableExprpublic void atBreakStmnt(BreakStmnt ast)
Visitor
内の atBreakStmnt
public void atCaseLabel(CaseLabel ast)
Visitor
内の atCaseLabel
ast
- CaseLabelpublic void atContinueStmnt(ContinueStmnt ast)
Visitor
内の atContinueStmnt
ast
- ContinueStmntpublic void atDefaultLabel(DefaultLabel ast)
Visitor
内の atDefaultLabel
ast
- DefaultLabelpublic void atDoStmnt(DoStmnt ast)
Visitor
内の atDoStmnt
ast
- DoStmntpublic void atExpressionStmnt(ExpressionStmnt ast)
Visitor
内の atExpressionStmnt
ast
- ExpressionStmntpublic void atForStmnt(ForStmnt ast)
Visitor
内の atForStmnt
ast
- ForStmntpublic void atGotoStmnt(GotoStmnt ast)
Visitor
内の atGotoStmnt
ast
- GotoStmntpublic void atIfStmnt(IfStmnt ast)
Visitor
内の atIfStmnt
ast
- IfStmntpublic void atNamedLabel(NamedLabel ast)
Visitor
内の atNamedLabel
ast
- NamedLabelpublic void atNullStmnt(NullStmnt ast)
Visitor
内の atNullStmnt
ast
- NullStmntpublic void atReturnStmnt(ReturnStmnt ast)
Visitor
内の atReturnStmnt
ast
- ReturnStmntpublic void atSwitchStmnt(SwitchStmnt ast)
Visitor
内の atSwitchStmnt
ast
- SwitchStmntpublic void atWhileStmnt(WhileStmnt ast)
Visitor
内の atWhileStmnt
ast
- WhileStmntpublic Exp pPromotion(Exp e)
e
- Expression which has VectorType/SubpType.
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |