Eli specification implementing the Pascal- language defined by Brinch-Hansen
in his book "Brinch-Hansen on Pascal Compilers". This example shows how an
executable specification reduces the effort required to implement a
compiler. The specification has been written to describe exactly the
compilation algorithm given as code in the book.
The contents of this directory are:
Intro.fw Description of what the Pascal- compiler does.
Structure.fw The Pascal- specification, organized according to the
Scope.fw chapters in Brinch-Hansen's book. Each of these five
Type.fw files specifies one of the compiler tasks implemented
Computer.fw as code in the book.
Code.fw
pascal-.specs Text file containing the names of the specifications
making up the compiler.
pascal.h Implementation of the Pascal- Computer in C
HtmlPminus.fw Wrapper for the specification in HTML
TexPminus.fw Wrapper for the specification in PostScript
tests Simple test suite for Pascal-
Odinfile Commands that build some useful products
You can request any of the following products by invoking "eli" with the
name of the product as its argument (e.g. "eli pascal.exe"):
pascal-.exe Executable compiler from Pascal- to the Pascal- Computer
%source All files, including a Makefile, needed to implement the
Pascal- compiler independent of Eli. This product should
be redirected to a directory (e.g. "eli '%source>src'").
pascal-.html Formatted specification with hyperlinks
pascal-.pdf Formatted specification for printing
%lint Build a Pascal- compiler and test it by applying it to all
of the Pascal- programs in the test suite. The executable
version of the compiler will be left as file "pascal.exe"
in this directory.
These tests will all produce nothing if they are successful.
If the generated processor detects errors when attempting to
compile any conforming program, or fails to detect errors in
any deviating program, the test will stop at that point.
The test program for which the errors were reported will be
copied to file "input" in this directory, and the error
reports will be written to file "ERR" in this directory.