【文章內(nèi)容簡(jiǎn)介】
ts: a: (line 13) variable , type int b: (line 13) variable , type int ? Exiting global scope. Contents: main: (line 3) function test: (line 13) function Global Main Function Scope Main Local Scope main Empty Int c String s 實(shí)驗(yàn)三要求 ?實(shí)驗(yàn)要求:完成語(yǔ)義分析,結(jié)果同sample一致,擴(kuò)展不做要求。 ?上交日期:三周以后即 12:00上載到 piler/soft ?提交方法:同以前一樣。 ?歡迎同學(xué)用不同的方法實(shí)現(xiàn)相同的功能。 –如自己設(shè)計(jì)符號(hào)表、類(lèi)的實(shí)現(xiàn)等。 實(shí)驗(yàn)四 代碼生成 ? TAC指令 ? Variable declarations ? Assignment ? Arithmetic ? Relational/equality/logical ? Labels and Branches ? Function/method calls ? Function definitions ? Memory references ? Array indexing ? Object fields method dispatch ? Miscellaneous ? Data specification 簡(jiǎn)單的例子 ? void main (){ ? P