Compiler HWK#4 Due date: 2:20pm, May 6, 2004 Submit the YACC rules for checking whether a program is a valid C-- program or not. In your YACC code, you need to report error statements. For example: line 3: bad register name line 5: illegal statement Report the number of correct statements at the end using this format: End of compilation, find 34 correct lines, and 2 lines with errors. Note: To submit your homework, send an email to comp04@csie.ntu.edu.tw subject: HWK4: your student number and name eg: "HWK4 - B90902xxx 王小明" attachments: one file .tar.gz format files must contain in the current dir after uncompression and untar This homework MUST execute on Linux or FreeBSD workstations in our department. Submitting files include a lex file, a YACC file, a Makefile, and optional C codes. 如果不確定自己的程式是不是能同時在FreeBSD和Linux上都能執行的話 請在FreeBSD上撰寫 The Makefile MUST supports "make clean", "make all", and "make test" for cleaning, building, and testing the homework. An example of the Makefile can be obtained from the course web. 輸出結果的時候, 一定要要求只能輸出標準格式的錯誤訊息 自己debug用的訊息要拿掉 最後一行summary的格式要固定