ICS 611

Syllabus

NOTE: for all homework on the computer, you should, supply a listing of the program, plus a listing of some trial data, and the result of running the program on the trial data (see description of how to capture screen contents).

SLIDES

Set 1.  Introduction to Compilers   Notes

The material in the next two links needs to be modified for use with Vista or Windows 7 (which I don't have available).
I would appreciate feedback on the modifications needed.

Using Cygwin, a DOS version of Unix on a PC (includes versions of Lex & Yacc, plus gcc)

Getting the best of both worlds: using both Unix and DOS tools

A Windows version of Lex & Yacc, including manuals.

Another source for Lex is http://gnuwin32.sourceforge.net/packages/flex.htm

What to hand in for assignments involving Lex and Yacc

Set 2.  Parsing   Notes 

Set 3.  Lex & regular expressions    Notes  
Assign 1
.  Use Lex to count no. of lines, strings, & characters (e.g. by modifying the lex input file given in Set 3).  Due 9/7/10

Assign 2   On listing the different identifiers in a source file.  Note link given to example of code for a symbol table.  Due 9/9/10

Set 4. Binary search and quicksort in C & comments in Lex.    Assign 3.  Described on slides 8-9.  Due 9/14/10

QUIZ 2.  9/14/10.  Reread Set 5a, and also Set 5b.  The quiz will be to produce the Lex and Yacc input files for a simple application.

Project 1: Constructing a cross-reference list.  Due 9/21/10.

Set 5a  Set 5b. Using Lex & Yacc together    Notes    
Skeleton of required Lex and Yacc code

The unary minus (and unary plus) problem
Assign 4: Creating an interpreter program, serving as a calculator.  Due 9/16/10

Set 6. Debugging with Lex & Yacc.  Example of y.output for E -> E+T | T   T -> T*a | a   and a Trace using source a + a * a
Assign 5a

Assign 5:  Pinpointing a single error.  Due 9/23/10.   Hints.

Assign 6. Produce y.output as decribed in Set 6 for the grammar  E -> E + T | T     T -> a | ( E ).   Draw the parsing machine.
                 Create a trace of the parse for  a + (a).   By hand label the lines in a printout of the trace as   a,b,c...
                
Construct your own parse of  a + (a) and number the lines.  For each of these lines, specify the labels of the lines
                 in the trace to which it corresponds.
  Due 9/28/10

SEEKING HELP

Project 2: Providing an error report. Due 9/30/10

Instructions on downloading Masm 6.15, the assembler translator.

Review of Assembler

Assign 7.   Trying out a simple Assembler program. Due 10/5/10

Project 3: Compiling to an intermediate language.  Due 10/12/10.

Set 7. Introduction to machine code.     Notes on Machine code   Machine code instructions   Machine code instructions sorted
Assign 8
 plus hmw in handout.   Due 10/7/10

Assign 99on writing a common subroutine to generate code for add, adc, etc.  

Set 8. object modules

 

.