This page last updated: Sunday September 27, 1998 01:07

This Course is Over

The Winter 1998 section of Compilers is now over.  If you are finishing an Incomplete Grade in the course, read the Incomplete Grade Policy, below, to find out where and when to deliver your final assignments.

Incomplete Grade Policy

WarningD2B4.gif (951 bytes)  If you are considering asking for a grade of "Incomplete" in this course, read this.

Missing Assignments?

WarningD2B4.gif (951 bytes)  I'm making my last visit to the assignment box at 6pm on Thursday, April 30.  Missing assignments prevent you from passing the course.


Welcome to CST 8152, Winter 1998 section.  This course is centred around electronic delivery, including Web course notes, online discussion via News Groups, and submission of assignments on diskettes as well as traditional paper.  You can see the course notes and participate in the online discussions from anywhere in the world that has an Internet connection.  Assignments will be announced in the news groups.

As mature C Language programmers, you will be exposed to programming constructs and functions that may not be covered directly by the course notes or lectures.  Learn to use the online help files for your compiler.  Check out my alternate resources section, especially the section dealing with programming at Algonquin.   You can also post questions to the online course discussion group.

If you haven't spent time learning how to use a C Language debugger, start right away.   You will be building a program of some 1,000-1,500 lines over the course of a few months.  If you can't set breakpoints, "watch" variables, or single-step your code, you may not be able to complete the final project and finish the course.

Course Outline / Course Notes

This is the official course outline for CST 8152, Winter 1998, in Corel WordPerfect 6 (*.wpd) format.

The Scanner

The Parser

Semantic Actions

The Symbol Table

News Groups, Announcements, and Discussion

Click here if you want to know more about participating in online discussion.

I recommend you learn to use the NNTP News interface, with Options set to "See only new/unread messages".

Read the Course Announcements to keep up-to-date on course news.

If you have questions or comments about the course, post it to the Course Discussion news group.
To chat with other Algonquin students about non-course issues, post to the Algonquin Student Discussion news group.

CST 8152 Course Announcements
WWW Gate
CST 8152 Course News Group: Questions, Answers, Comments, and Discussion
WWW Gate
Algonquin Student Discussion
WWW Gate

The Algonquin College News Server is located on the National Capital FreeNet, a non-profit community network supported by member donations.

List of Assignments

Assignments are listed here as they become available:

Assignment Number Topic Due
Assignment One the Buffer data structure 12:00 noon, Monday January 19
Assignment Two file handling 12:00 noon, Monday February 9
Assignment Three Lexical Analyser

12:00 noon, Friday March 6
The one-week late penalty is waived.

Assignment Four The Parser 12:00 noon, Friday March 27
The one-week late penalty is waived.
Assignment Five Panic-Mode error recovery 2pm, Monday April 6
The one-week late penalty is waived.
Assignment Six Semantic Actions 6pm, Thursday April 30
This is the last date for marked submissions.
Assignment Seven The Symbol Table Optional/Bonus Assignment
6pm, Thursday April 30
This is the last date for marked submissions.

Assignment Submission Specifics for CST 8152

Assignments must be submitted in a particular format.

Do three things:

  1. Be sure you have registered with my online marking system or I won't know who you are.
  2. Read the general assignment submission guidelines that apply to all my courses.
  3. Return here to continue to read the specific submission requirements for this course, given below:

The CST 8152 FIle and Function Headers

C Language program submissions in this course must adhere to the Algonquin Standard coding practices set out in the CST 8110 Blue Book.  I accept variance from this standard in two areas: brace style (I also accept a consistent K&R brace style), and pseudocode (I want only a short, high-level description of your algorithm, as outlined below).

Each source file and major function of a submitted program in CST 8152 must have an Algonquin-style header with the following five familiar headings of information:

  1. The Purpose of the source file or function.  What does this source file or function do?  (Note that the purpose of the program is not always identical to the purpose of the assignment.)
  2. The History of the source file or function, which must itself include six things:
    1. your name
    2. your student number
    3. your email address
    4. the course number
    5. the current term (e.g. 97w, 98s)
    6. the date you began writing this source file or function
  3. Inputs (if not already mentioned in the Purpose) or PreConditions
  4. Outputs (if not already mentioned in the Purpose) or PostConditions
  5. Algorithm:
    • I do not require detailed pseudocode at the start of each function. Keep the Algorithm description short, readable, and accurate.
    • In the source file or function header I do require a high-level description of the Algorithm used in each function, with good comments describing each block of code in the function itself.  Give an overview of the whole function; don't go into details about each source line.
    • If the Algorithm description takes more than a screenful of text, either your function is too long or you are specifying too much detail!

Minor functions in a source file do not need a full header.  Each source file does need a full header. The source file header identifies the file, so it should be the very first thing at the top of the file.

Here is a sample source file header for this course.  It describes the overall program and gives the algorithm for the main() function that drives the overall program:

 *    Implement and test a Buffer data structure.
 *    Use the data structure to read lines ending in a newline from
 *    standard input.  Print the lines and their lengths.
 *    EOF, or the string "done", may be used to terminate input.
 *    Author: Ian! D. Allen  #74210779
 *    EMail:
 *    Course: CST 8152   Winter 1998
 *    Date:   January 4, 1998
 *    Reads characters from standard input.
 *    Prints lines and their lengths on standard output.
 *    Prompts appear on standard error if the input is a terminal.
 *    Error messages also appear on the standard error output.
 *     Allocate a buffer.
 *     Loop:
 *        Clear the buffer.
 *        If input is from a terminal, prompt the user for a string.
 *        Fill the buffer with all the characters up to newline or EOF.
 *        Terminate the string with NUL character and print the string.
 *        Break out if the string has the value "done" or on EOF.
 *     Print the size to which the buffer grew.
 *     Free the buffer.  Return Success to the O/S.

Note that the algorithm is a high-level description of what the function does. It is short and clear.

Assignment Evaluation

Days of No Classes

Midterm Tests and Final Exam

Each of the two midterms is held in class, 50 minutes long, closed book; no calculators; no aids.  No make-up midterms will be given.  After the tests are marked and the marks posted, the midterms and answers will be available here in some format.

Final Exam

Course Text

Aho, Sethi, Ullman; Compilers - Principles, Techniques & Tools; Addison-Wesley, 1988

Students with the 1986 printing of the book may find it adequate.   The 1988 printing fixed some errors.  The text looks something like this (not exactly as illustrated): Compilers: Pain, Agony, and Stress

The text is also on reserve in the Algonquin Library at Rideau Campus.

Additional References

Other References

List of Marks and Alter Egos for this Course

A current list of marks, posted using your Alter Ego code names, is available.

Last revised: Sunday September 27, 1998 01:07.
Email comments to Ian! D. Allen