[hw5]作業規定與參考資料

[語法檢查]

建置一個symble table   

1.作 type - vriable name之間的關連

2.function name - parameters, result type and local variables 之間的關連

3. function parameter -type之間的關連

4.class name - variable declarations之間的關連

[yuhina types]

int , boolean , string , int[] ,class name

[error check]

1. Check for undeclared variables

根據目前的scope 查詢symbol table檢查是否宣告

2.Multiple variable declarations

根據目前的scope 查詢symbol table檢查是否宣告

3.Type checking

[必須提供的type check]

1. arithmetic expression

2.assignment statement

3. function call

[java doc]

hashtable http://java.sun.com/j2se/1.5.0/docs/api/java/util/Hashtable.html

symboltable http://www.jstatcom.com/javadoc/com/jstatcom/model/SymbolTable.html

[reference]

jtb document

 http://compilers.cs.ucla.edu/jtb/jtb-2003/docs.html

Types and Type Checking

http://lambda.uta.edu/cse5317/notes/node30.html

留言

這個網誌中的熱門文章

電腦網路project