52018 Compiler: Homework
Homework 1: Write the pseudo code for micro
compiler and present it in HTML.
Due on Mar. 23, 2000 by email
Modify the parsing procedures for macro to include calls to semantic routines
as in Fig. 2.11. You can reference to the grammar for micro with action
symbols in Fig 2.9. Take the advantage of hyperlinks in HTML to link parsing
procedures and semantic routines.
You can also write CGI program and provide FORM to get users' input. The
CGI program is attached to the match() function, so whenever it is called,
the CGI program consume the next token.
Use an example program and trace the steps taken by the parser as in pp.46.
Submission: By email, send to email@example.com
Note: Please hand in your homework on time. Late hand-in will be deducted
a certain amount of points
- B: linking all parsing procedures
- B+: linking all parsing procedures and semantic calls
- A: linking all parsing procedures and semantic calls with semantic
- A+: additional
Best Homework: links all parsing procedures
2: Due on Mar. 29, 2000 in class (Absolutely
no copying others' works)
Answer to homework 2
Chapter 4: Exercise 2, 4
Chapter 5: Exercise 1, 2
Due on Apr. 27, 2000 in class (Absolutely no copying others' works)
Chapter 6: Exercise 4.a, 4.b, 7.a, 7.b
Due on May. 24, 2000 in class (Absolutely no copying others' works)