|
Compilers: Principles, Techniques, and Tools, 2/E
Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman Publisher: Addison-Wesley, 2007 ISBN-10:0321486811 ISBN-13:9780321486813 |
Schedule :
Homework #1 is uploaded. Deadline for this homework is Sunday, April 12, 2009 (23 Farvardin 1388).
Homework #2 is uploaded. Deadline for this homework is Sunday, May 03, 2009 (13 OrdiBehesht 1388).
Homework #3 is uploaded. Deadline for this homework is Sunday, May 17, 2009 (27 OrdiBehesht 1388).
Homework #4 is uploaded. Deadline for this homework is Sunday, May 31, 2009 (10 Khordad 1388).
This set of slides takes 2-3 sessions of our class. In these sessions we speak about anatomy of a compiler and glimpse each phase of compilation. We introduce lexical analysis, syntax analysis, semantic analysis, intermediate code generation, and code optimization, and examine each of them in an example. Here you can download the color slides and here you can find the b/w slides which is more suitable for printing.
This set of slides takes 2 sessions of our class. We learn how one can build lexical analyzer using regular grammars and finite automata. Here you can download the color slides and here you can find the b/w slides which is more suitable for printing.
We invest 3 sessions on this set of slides. We start discussing on context free grammars (CFGs) and use them to make a syntax analyzer. For this we first study "grammar ambiguity", "left recursion", and "common left factor" in CFGs. We also introduce a family of grammars called LL(1). Next we learn how to build a top-down parser. We study two ways for building a top-down parser. The first is "recursive descent predictive" method, and the second one is "table driven" method. Download the color slides, or the b/w slides.
This set of slides takes 2 sessions. We start learning Bottom up Parsing and we see how a Shift Reduce Parser works. We also introduce the problems a shift reduce parser may encounter (Shift-Reduce & Reduce-Reduce Conflict). Finally, we see the Parse Table with which the parser performs its tasks. Download the color slides, or the b/w slides.
In the sessions we use this set of slides, we will see how LR(0) parsers work.We also learn how to construct the LR(0) parse table. We also introduce different kinds of LR parsers, and compare the LR and LL parsers. Download the color slides, or the b/w slides.
This set of slides are about SLR(1) parsers. We see what the defec of LR(0) is and learn how SLR(1) parsers improve this flaw using the notion of the follow sets. Download the color slides, or the b/w slides.
Download the color slides, or the b/w slides.
Mostafa Jalambadani |
Java bytecode http://www-128.ibm.com/developerworks/ibm/library/it-haggar_bytecode/