Re: [助教] compiler homework4

看板b93902HW作者 (with friends)時間18年前 (2007/05/23 18:49), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/7 (看更多)
※ 引述《wens ( )》之銘言: : ※ 引述《sophialiege (with friends)》之銘言: : : The precise specification is already annouced and two more test cases : : are online now. : : -tsai- : 發現只要用 error, : yacc 一定會印 syntax error. : 有沒有辦法避免他印出來啊? 我想我知道為什麼你的會印"syntax error"了 因為error token出現會去call yyerror而你的yyerror大概是這樣寫 void yyerror(const char* str){ .... cout << str << endl; .... } 我的寫法是 void yyerror(const char* str){ /* do nothing, make compiler happy only */ } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.217.61
文章代碼(AID): #16L1mlFT (b93902HW)
討論串 (同標題文章)
文章代碼(AID): #16L1mlFT (b93902HW)