Assignment 2
Assignment 2
We defined a programming language called Mini C, which is a suitable language for a compiler projects. The project is divided into three steps: Scanner, Parser, and Code Generator. The language used for the compiler project is a subset of C, and the output target code is the MIPS codes. In the first step, we list the lexical conventions of the language, including a description of the tokens of the language. In this homework assignment, students are required to implement a Scanner using hand-coded approach, that is, students cannot use existing tools such as Lex to implement the scanner.
INT_NUM FLOAT_NUM ID
= = =
4. White space consists of blanks, newlines, and tabs. White space is ignored except that it must separate keywords, symbols, and tokens shown 1~3. 5. Comments are surrounded by the usual C notations /* */. Comments can be placed anywhere of a program except within tokens. A comment may contain more than one line. Comments cannot be nested.
Format
1. Technique Report Please turn in a report includes i. Cover ii. Purpose iii. Method iv. Source Code v. Results vi. What you have learned You need to explain how to execute your program in the report. 2. Source Code Please upload your work to course FTP before due date! i. IP: 140.114.71.92 ii. Port: 1234 iii. Account: compiler11 iv. Password: 11compiler Create a package named as your student ID. Your package should include: i. /Source code ii. /Makefile // If you need . iii. /Readme
Evaluation
Technique Report 20% (A4 not more than 10 pages) Source Code 80% (Base : 60% + Output Display & Source Code Comments : 20% ) Source Code Due date: 2011 / 4 / 26 12:00:00
Report
Late submission policy: 1 Day late:-10% 2 Day late:-20% 3 Day late:30% Assignment will not be accepted after three days. Does not copy or you will get the point: (points / the # of people of the same copy) If you have any questions about HW, please send mail to TA.