Weekly Note 4, DM18, Spring 2007
Lecture February 13
-
Abstract syntax trees.
-
Weeding, symbol tables, and type check.
Background material: Appel Chapter 4 and 5.
Exercises February 15
-
Extend tiny expressions
with a modulo operator % and an absolute value funktion |_|.
-
Introduce unary minus, -x, into the language as
so-called syntactic sugar for 0-x,
i.e., you may write -x according to the new grammar, but
internally (in the AST), it is just represented as 0-x.
-
Discuss in detail how you can avoid building lists backwards
in an LALR(1) parser. Rewrite the lecture example to obtain this.
-
Appel 5.1 a; do this with basis in you own implementation of a hash table.
With regards to literature and material on flex and bison, see the
literature page.
Announcements
-
Please check the
list of participants and groups and
report any error to the lecturer by e-mail.
-
On the list of participants as well as on the project parts
you turn in, it is important to list your full name.
We have seen repeatedly
that people who use a middle name as either their first name or their
last name, do not comply with this. Often, this can result in
administrative difficulties for these people as they may not get
registered at the administrative level as having turned in their project.
Last modified: Fri Feb 9 12:22:39 CET 2007
Kim Skak Larsen
(kslarsen@imada.sdu.dk)