Re: [作業] 請問compiler中error的問題

看板b93902HW作者 (with friends)時間18年前 (2007/05/28 22:58), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串2/2 (看更多)
lines | lines error '\n' { yyerror(""); yyerrok;} error 產生 yacc 自動 call 一次 yyerror lines .... '\n' reduced 前 你又 call 一次 yyerror 所以就做了兩次 至於yyerrok請看 http://www.gnu.org/software/bison/manual/html_mono/bison.html 搜尋yyerrok the statement yyerrok, a macro defined automatically by Bison; its meaning is that error recovery is complete 建議: yyerror 放空, 什麼事都不要做 請看看 tinyC.tgz or tinyC++.tgz 的 system.cpp 檔 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.217.61

05/28 23:33, , 1F
感謝~~
05/28 23:33, 1F
文章代碼(AID): #16Mkty-x (b93902HW)
文章代碼(AID): #16Mkty-x (b93902HW)