/2017-compiler-item3

2017 Compiler class project

Primary LanguageJava

2017_Compiler_Item3

[1. Basic Block]

1_While_stmt
2_If_stmt
3_For_stmt
4_Switch_stmt

[2. Addtional Grammer]

1_For_stmt
2_Switch_stmt

[3. Addtional Type]

1_Float
2_Double

[4. Type_Checking]

1_Var_decl
2_Local_decl
3_Param
4_Expr

1. Store variable's type in static HashMap(named "GlobalVariableMap, LocalVariableMap") at Var_decl, Local_decl
2. Do Type check at Var_decl, Local_decl, Param, Expr using type stored in prev step's map