This is an Algol-68 interpreter. Hereby you are granted the permit to modify, distribute, and use these programs in any way for any non-profit purpose. Laci Csirmaz, DIMACS at Rutgers, 1990 CEU, Hungary, 2000 ---------------------------------------------------------------------------- Contents ---------------------------------------------------------------------------- This directory contains executables complied for Linux with libc-2, the source code for the Algol-68 interpreter as well as the Manual and sample programs. It consists of the following: readme this file manual how to use the interpreter a68 script to run algol-68 programs .a68.prelude contains data for the interpreter src/ source files (prepared for Linux) sample/ sample Algol-68 programs la, al lexical analyzer, the interpreter dump, textual_error auxiliary programs The directory `src\la' contains the source code for the first part of the interpreter, the lexical analyzer. `src\al' contains the source code for the interpreter proper, the rest is in src. ---------------------------------------------------------------------------- How to use the interpreter ---------------------------------------------------------------------------- Use the gunzip and tar programs to uncompress and unpack the files as follows: mkdir algol68 cp linuxa69.tgz alogl68/ cd algol68 gunzip -c linuxa68.tgz | tar xf - rm linuxa68.tgz The script `a68' can be used to run Algol68 programs from the algol68 directory. During the run several hidden temporary files are created, which can be deleted later. For example run the first program in the `sample' directory, type a68 sample\01.a68 After listing the program text, the program `01.a68' is interpreted, the result (if any) is printed. ---------------------------------------------------------------------------- Other useful information ---------------------------------------------------------------------------- Different parts of the interpreter communicate through the files `.a68.w1', `.a68.w2', and `.a68.dump'. They sit in the home directory of the calling process; this (or the names) can be changed by editing thr script file `a68.bat'. The lexical analyzer is invoked with the parameters la workfile1 workfile2 [input-file] The first two are the files in which the lexical analyzer and the interpreter proper communicate. If the third parameter is missing, `lexical' reads from the standard input. `la' exits with status 0 - no error were detected; 1 - one of the files couldn't be opened; in this case error messages are sent to stderr; 7 - a syntactical error was detected. The interpreter proper `al' is invoked by al prelude workfile1 workfile2 dumpfile [-] The file `prelude' is a binary file containing the standard prelude, as made by the program `prelude.c'. `workfile1' and `workfile2' are the files produced by `lexical'; `dumpfile' is used for dumping information whenever an error occurs in the interpreted program. The content of the dumpfile is binary, and can be listed by `dump'; the file remains unchanged if the interpretation is successful. The optional last parameter `-', if present, suppresses the printing of the source code. `al' exits with status 0 - either the program to be interpreted was syntactically wrong, or if the interpreter halted properly; 1 - some of the necessary files cannot be opened; 2 - the program was interrupted (by CTRL-C); 7 - an error occurred. The program `textual_error' serves to give a textual error message. It is called as textual_error dumpfile Using the information in `dumpfile', it gives a half line explanation of the possible source of the error. It exits with status 0 even if it couldn't open `dumpfile'. The program `dump' prints the dump information in a legible form; usage: dump dumpfile [-] If the second parameter `-' is present, an unedited raw (and lengthy) listing is given. The program always exits with status 0 except if no parameter is given. The debugger version of the interpreter proper should be compiled by definint the DEBUG variable. It is invoked by aldebug prelude workfile1 workfile2 dumpfile debugfile [-] with all arguments being the same as for `al' except for `debugfile'. This latter one contains info about the different procedures which were called (see the DEBUG variable in the source). The program `prelude.c' generates the file `prelude' containing the standard prelude. Since it should be run only once its binary form is not preserved. This program exits with status 1 if the 'prelude' file cannot be created; otherwise the exit value is 0. The Interpreter has been compiled with gcc. As the compilation should be trivial, no Makefile is given. The Interpreter uses 32 bit integers and 64 bit double (real) values. For other information about the interpreter, see the manual.