CSC/CPE 430 Programming Languages I
|Wednesday,|| 10:00-11:30,||R 0.058 |
| 1 ||Tuesday,|| 13:30-15:00,||R 2.012 |
| 2 ||Tuesday,|| 15:15-16:45,||R 2.012 |
| 3 ||Wednesday,|| 13:30-15:00,||R 3.026 |
We will use a Linux system.
Most of the software is already installed by default.
You need to have the following packages:
- a text editor of your choice,
- a C compiler, for example gcc,
- bison (or yacc),
- flex (or lex),
- libfl (the flex library),
- ghostscript with X11 support, and
- a PostScript viewer.
For the lab work, you can use
a devbox as described below.
The devbox setup
If you do not have a dev box, do the following:
To set up the devbox virtual linux box in the lab do the following:
The software should be all in the current base system.
Now it's time to select in the Menu Maschine->Sicherungspunkt erstellen
to keep a snapshot of your new machine with everything installed and set
When you shut down your Linux machine use "mit ACPI-Event herunterfahren"
or otherwise you might loose the changes you made.
- Read the "Anleitung fürStudierende" under
- Go to C:\VB-Images\Devbox
- Use the CreateVM.bat file to create your own Linux machine.
You get a link to your new DevBox on the desktop.
- Start your new DevBox Linux machine.
All necessary software is already installed in the 2023 base version.
No update is needed.
If the flex library is missing use:
sudo apt-get install libfl-dev
|March 21/22 ||Introduction to PostScript |
|March 28/29 ||Introduction to lex/flex |
|April 4/5 ||Introduction to yacc/bison: Keywords |
|April 18/19 ||Numbers |
|April 25/26 ||Make see: Sample Code|
|May 2/3 ||Arithmetic |
|May 9/10 || Union declaration and Floating Point Numbers |
|May 16/17 ||Variables see: Video Sommer 2022|
|May 23/24 ||Control Structures see: Sample Code|
|June 6/7 ||Local Variables |
|June 13/14 ||Procedures |
|June 20/21 ||Testat/Final Project |
|June 27/28 ||Testat/Final Project |
|July 4/5 ||Testat/FinalProject |
Each lab class starts with an introduction by the instructor
giving you a distinct assignment for each class. Because of this
format, it is usually difficult for a student to catch up, if he
or she has missed one of the lab sessions. There are however
three different time slots available for the lab.
If you have to miss a lab class, let me know early, probably
I can assign you to a different time slot.
The final goal is
to develop your own language and your own compiler for Turtle Graphics.
For more details on the Lab assignment read this page on
"A Programming Language for Turtle Graphics.
Some Remarks on Turtle Graphic
Turtle graphic was originally part of the programming language LOGO, a programming
language designed for children. Recently this idea led Microsoft to implement
the Turtle App, a Windows app that lets kids drag and drop commands to create their
own turtle programs. Check it out!
An Introduction (in Deutsch) can be found on the
Code your Life: TurtleCoder site. You will find there also the TurtleCoder as a Web-App
A big collection of possible turtle programs with an image gallery is found at
the Turtle Art site.
You find more information on turtle graphic on
Lab attendance certificate (Schein):
The lab attendance certificate (Schein) is a required prerequisite for taking
the final exam. You obtain this certificate (in spite of the name) not just
because you attended the lab sessions; to obtain it, you have to demonstrate
your ability to use lex/flex and yacc/bison to write and modify your compiler.
While you will write - during the lab sessions - your own compiler, it is
a misunderstanding to believe that the lab certificate is granted based on
the compiler you wrote. It is based on what you learned while you wrote it!
In practice, I will look at the compiler you wrote and give you a small challenge,
like "how about adding feature ... to your compiler?" From what you do to
implement the new feature, I can tell what you have learned.
An implementation of the symbol table is found in the files:
Es gibt zur Vorlesung ein unvollständiges Skript (deutsch), das hier
zu finden ist:
A First Guide to PostScript
by Peter J. Weingartner.
Thinking in PostScript
by Glenn C. Reid.
the ultimate PostScript Language Reference
or a Short Summary of PostScript by me
(also available in German: Kurze Zusammenfassung von Postscript).
An Introduction to regular Expressions from the gawk manual in
Lexical Analyzer Generator flex:
The flex manual in
Parser Generator bison:
The Bison Reference Manual in
Many useful manuals for GNU/UNIX tools
(for example make)
you find at www.gnu.org/manual.
Last not Least...
The Dragon Book:
Compilers, Principles,Techniques and Tools,