Programming Language Implementation
Tyler Hall Rm 251
Office hours: Wed. 3:30-4:40, Fri. 10:00-11:00
[12/4/12] Posted the Simple5 Interpreter
[12/3/12] *Final exam reports* -- you are no longer required to give a presentation of your
final project but your are required to hand in a final exam report no later than
*Thursday 12/20/12 @ noon* in my office. The report must contain the following
sections in order to receive full credit:
[11/28/12] posted a new version of assignment #8...had a bunch of typos.
Introduction - describe your language and its application area (an example would be nice).
Implementation - a description of your implementation: overall architecture, key data structures,
anything else that might be noteworthy about your implementation.
Challenges - what was challenging about the implementation? What would you do better if you could
do it over? What would you add to the language/implementation if you had more time?
Examples - run some key examples and show that they work. Show at least three examples that exercise
different aspects of your language/implementation.
Conclusions - some final words you might want to say about the language/implementation.
Source Code - attach source code that you have written for the implemenation (Please, no machine
generated source code!).
[11/28/12] posted assignment #8
[11/8/12] posted assignment #7
[11/4/12] Assignment #6 will be due on Friday 11/9, the proposal will be due on Monday 11/12
[11/1/12] Final Project Proposal to be completed by Friday 11/9.
[10/20/12] Posted assignment #6.
[10/28/12] ** classes are canceled for 10/29, therefore the midterm will be due on Wednesday 10/31 in class,
you will need to submit a zip file with your source code by Wednesday morning before class. **
[10/14/12] ** midterm ** due in class 10/29/12. The
Mini2 Basic grammar.
[10/9/12] posted assignment #5
[10/8/12] Since I do not allow you to use AntlrWorks for assignment #4 you can ignore problem #1 of the
[10/4/12] I posted a new version of assignment#4 - it is version 3 - the big change in this
assignment is that you are NOT allowed to use any IDEs for the assignment: no Exclipse and no AntlrWorks
[10/3/12] assignment #4 is due on Wednesday 10/10 in class
[9/28/12] Posted assignment #4
[9/25/12] Posted a new version of the assignment sheet for #3, you should be working with version 4.0
[9/20/12] Posted assignment #3
[9/20/12] Posted interpreter example code from class, see the "Specifications and Grammars" page below.
[9/20/12] Electronic grade book is now online...email me to get the access code.
[9/14/12] Posted assignment #2.
[9/12/12] If you are fuzzy on the details of reading a text file in Java, for example,
there is a nice website called www.exampledepot.com
with lots of code snippets. For instance, if you would like to refresh your memory on how
to read a text file follow the links:
Java >> Java packages >> java.io >> Reading and Writing >> Reading Text from a File
[9/10/12] Posted assignment #1.
If any of these questions interest you then CSC402 is for you. We will spend
the semester looking at programming language implementations: from syntax
highlighters to code analyzers, from interpreters and virtual machines to
- Have you ever wondered how the syntax highlighter in Eclipse works?
- Have you ever wondered how languages like PHP and HTML are implemented?
- How about Python and Pearl?
- What is the difference between interpreting a programming language and translating/compiling it?
- What is the difference between an interpreter and a virtual machine?
As part of the course we will construct interpreters and translators for domain
specific languages such as calculator languages and command line languages for
steering your favorite game character. The course will also include one large
semester project of a language implementation project of your choosing. This
could be a graphics language, a new programming language (think Ruby), a domain
specific language such as PHP or a new command line shell interpreter for
The goal of the course is to give you a solid foundation with respect to
programming language implementation which includes grammar construction, parsing
techniques, intermediate representations, tree construction, tree pattern
matching techniques, among many other topics. The course is designed around a
set of programming language implementation design patterns that shed light on
the overall construction of programming language processors. These tools will
enable you to add domain specific and general programming language
implementations to your tool chest to solve difficult engineering problems.
Final Project Ideas
When I say implementation that could mean: as an interpreter, as a compiler to a virtual machine,
or as a compiler to actual machine code.
An implementation of a subset of a game scripting language such as Lua
An implementation of a subset of C (e.g. Small-C
or Tiny-C) or any other general purpose programming language.
Design and implement a language to program cellular automata (CA).
Design and implement a language interface to the JMusic
Design and implement an interpreter for a graphics/drawing language, e.g. Logo.
Implement an interpreter or compiler for Vintage Basic (Altair Basic).
Documents of Interest:
NOTE: email submissions are not
acceptable for assignments.