KOI: Lab Exercises (Old Windows Version)
Det här är en gammal version av labbarna,
fråm en tidigare upplaga av kursen när de gick på Windows.
En del av labbarna är samma som i den nya kursen,
men inte alla!
|
The exercise numbers do not necessarily correspond
to the order numbers of the scheduled
lab times.
The exercises may take very different amounts of time to finish.
Do the exercises in your own pace.
The labs will be done using our new Linux systems,
but the labs have not been designed for any particular
compiler or system.
They should work equally well with Borland C++,
with Microsoft Visual C++, or with the Gnu compilers on a Linux system.
However, there are some system dependencies,
for example in which arguments to give to certain programs.
The system-specific Linux instructions are available
here,
but I've also left these older Windows-specific instructions,
that assume that you are using Borland C++ under Windows.
-
Exercise 1: Getting started with Borland C++, etc.
-
Exercise 2: A hand-coded parser.
-
Exercise 3: Creating a parser with Yacc. (Actually Bison.)
-
Exercise 4: Lexical analysis. Making a scanner by hand and with Lex. (Actually Flex.)
-
Exercise 5: Building abstract syntax trees.
-
Exercise 6: An interpreter that executes the syntax trees.
-
Exercise 7: Stack machine code. Optimization.
Resources:
-
There are some links to Yacc and Lex,
both to documentation and to free versions that can be downloaded,
on the
Some Useful Texts
page.
Windows-specific resources:
-
(If you need a PostScript viewer for Windows: First install
Ghostscript,
and then
GSview.
You can download these local copies of the install files:
Ghostscript,
GSview.)
-
Thomas Niemann:
A Compact Guide to Lex & Yacc
-
PC versions of Bison and Flex can be downloaded from the same site.
Click on Overview in the navigation bar to the left,
and then choose "my version of Lex and Yacc".
(Or use these local copies of the executables and the source:
gnu.zip,
gnusrc.zip.)
-
The main Gnu web page for the Lex-like scanner generator Flex
(documentation)
-
The main Gnu web page for the Yacc-like parser generator Bison
(documentation)
Thomas Padron-McCarthy
(Thomas.Padron-McCarthy@tech.oru.se)
August 10, 2006