Version 0.2
5/31/98
Ralf Bauer (nathan@cs.tu-berlin.de)
Max Spring (sepp@cs.tu-berlin.de)
To subscribe send an email to majordomo@employees.org containing
subscribe jacob your-address
in the body (subject doesn't matter).
To mail to the mailing list send to jacob@employees.org.
As the practical result of our diploma thesis, Jacob owes its existance from the use of compiler generating tools: The front-end was generated with the Compiler Construction Tool Box "Cocktail" (Version 9209) of Dr. J. Grosch. In particular the tools Rex, Lalr, Puma, Ast and Ag were used. For the back-end we used Beg (Version 1.75) of H. Emmelmann to produce GNU assembler code.
There is still a lot of debug code in Jacob so the execution speed is not optimal. The various command-line options allows tracing of the compile phase and looking at intermediate results which are often hidden within a compiler.
This software package is FREE, so you can do with it whatever is in your mind, BUT: whatever you do with this package, YOU are responsible and you do it ON YOUR OWN RISK. This simply means we disclaim warranties of any kind.
Because of the early version of Jacob it is definitely possible that there are bugs in the implementation. If you find one (or several) don't despair. Please let us know about it (see section Bug Report below).
jacobIf you decide to use a home directory other than /usr you have to edit the script files oc and sys/oc.linker and to adjust the directory specifications in these scripts.
jacob/lib
jacob/sys
jacob/test
Copy, move or link the script oc into a directory which is included by your PATH environment variable.
To test your installation change the current work directory to jacob/test, compile the Test module by "oc Test". This will also generate the object files of the library modules, if you have write permissions to jacob/lib.
Assembler and object files are written into the directory which contains the source file.
sepp@cs.tu-berlin.de
It is useful to send a small example program which shows the bug.
Module = MODULE ident ';'
[ImportList]
DeclSeq
[BEGIN StatementSeq] END ident
| XModule .
...
XModule = MODULE ident EXTERNAL '[' string ']' ';'
[ImportList]
XDeclSeq
END ident '.' .
XDeclSeq = { CONST {ConstDecl ';'}
| TYPE {TypeDecl ';'}
| VAR {VarDecl ';'}
| PROCEDURE IdentDef [XFormalPars] ';'
} .
XFormalPars = '(' [XFPSections] ')' [':' Qualident] .
XFPSections = FPSection {';' FPSection} [';' '..'] .External modules are identified by the keyword EXTERNAL following the module's name. The following bracket-enclosed string will be passed unchanged to the linker.
Constants, types, variables and procedures may be declared in any order. This allows grouping of types and functions which belong together, e.g. for writing interfaces for large libraries. Type-bound procedures aren't allowed.
A procedure declaration consists only of the procedure header. The last formal parameter of a non-empty formal parameter list may be '..', in which case any non-empty actual parameter list starting at the corresponding position is legal.
formal parameter | actual parameter | passed object
===================================================================
variable parameter | any | address of actual
| | parameter
-------------------------------------------------------------------
non-open-array value | any | value of actual
parameter | | parameter
-------------------------------------------------------------------
open-array value | character constant; | address of actual
parameter | string constant; array | parameter
-------------------------------------------------------------------
open-array value | SYSTEM.BYTE; SYSTEM.PTR; | value of actual
parameter | BOOLEAN; CHAR variable; | parameter
| SET; integer type; real |
| type; NIL; pointer, |
| procedure or record type |
-------------------------------------------------------------------
.. | character constant; | address of actual
| string constant; array | parameter
-------------------------------------------------------------------
.. | SYSTEM.BYTE; SYSTEM.PTR; | value of actual
| BOOLEAN; CHAR variable; | parameter
| SET; integer type; real |
| type; NIL; pointer, |
| procedure or record type |
---------------------+--------------------------+------------------