COSC 170
COMPILER CONSTRUCTION
Course Homepage
Spring, 1996


This is a Web site for one semester of 170. Although the course always covers basic compiler techniques and always includes work on some project language, the details may differ quite a bit from semester to semester.


Course Description:
This course provides an overview of basic compiler techniques which are useful in a variety of programming projects.

This semester we will be working on designing and implementing an interactive graphics programming language. One of the problems of trying to do simple mathematical graphics (say drawing iterations of a space-filling curve) on the X-terminals is the extreme amount of general setup which needs to be done. Writing direct calls to the Xlib routines is overwhelming and even the toolkits can be hard to master. It seems that there would be a use for a language without the full generality of the X-toolkits, but with the ability to create simple color graphic applications.

During the semester we will extend the preliminary design of such a language and implement the language as a compiler which generates C code. The course will begin with an overview of X graphics programming. As usual, we will cover basic concepts of lexical scanning and parsing and learn to use Lex and Yacc to help implement our compiler.

Course Syllabus

Description of the course project language, SGL.

Homework Assignments

How to submit homework

Graduate reading assignment

X information
In particular, the entry on Xlib man pages documents the many Xlib drawing functions.

Bison tutorial
Bison is a general-purpose parser generator similar to (and upward compatible with) Yacc. Not everything described in this tutorial will work with Yacc, but the basics are the same.

Lex description

Here's a tutorial for Flex, which is a scanner generator (upward compatible with Lex) designed to go with Bison

And here's another Bison tutorial

This site created and maintained by Dr. Michael C. Slattery of Marquette University.
You can contact me at mikes (a) mscs.mu.edu.