Pascal Compiler Source (Paul Robinson)
Sat, 21 Nov 1992 07:45:52 GMT

          From comp.compilers

Related articles
Pascal Compiler Source (1992-11-21)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Paul Robinson)
Organization: Compilers Central
Date: Sat, 21 Nov 1992 07:45:52 GMT
Keywords: Pascal

For anyone interested, I have the source to a Pascal Compiler which was
written in Pascal. I made some minor modifications and was able to
compile this program under Turbo Pascal 6. It appears to be a full
compiler, (not merely a toy) with support for the entire language
including gotos, pointers and at least two external files (PRR and PRD),
in addition to INPUT and OUTPUT.

The only problem I have with it is that the manner in which it allocates
memory I can't get it to compile itself. By enabling Mark() and Release()
it got somewhat farther down in the source before it died, but apparently
what is happening is either (1) it was set up on a VERY large memory, i.e.
a machine with at least a meg of accessible memory (2) the program was
compiled using some scheme involving memory paging and such, or the
program could have been compiled in pieces, i.e. when the program is at a
certain spot, all of the label and indexes are saved, and the program then
restarts the rest of the source from that point.

The source to the compiler is about 122K, the source to the P-CODE
interpreter is another 29K. If someone in the U.S. wants me to send them
a copy, I will send it out either in 5 1/4" 360K disk, or on a 720K 3 1/2"
disk. The price will be $3 to cover disk costs and postage. This is the
"PCOM" compiler. I'll include with this a similar subset Pascal compiler
known as "FACILIS" which does work and is compilable using Turbo Pascal 3,
but is not self-compilable due to lack of pointers and the GOTO
instruction. On the PCOM compiler, I'll include the original source and
my corrections.

However, I also have three others. One was the "NBS" pascal compiler
which was created for the PDP-11 under contract to the National Bureau of
Standards. The other is a set of 10 releases of the "SWEDISH PASCAL"
compiler also written for the PDP-11, and consisting of several upgrades
during 1975-1979.

The NBS pascal compiler takes about 400K in a compressed archive,
including the PDP-11 assembly and Compiler Source.

The Swedish Pascal compiler releases take three 720K disks. If someone
wants these, I can send them in ZOO or ZIP archive format, on MSDOS
diskettes. The cost in the U.S. would be $10. If you want it on 5 1/4,
say so otherwise I'll send 3 1/2". If you only wanted the NBS pascal
compiler, the price would be the same $3, or $8 for the Swedish Pascal
Compiler alone.

Or all three of these sets for $12. To the best of my knowledge these
compilers are all public domain. I know for a fact the NBS one is, being
done under contract for a U.S. Government agency. For anyone of interest
in how compilers are written, I can send these out.

Send either cash or a Post Office Money order if you are interested in
any of these to:

Paul Robinson
8604 Second Avenue #104
Silver Spring MD, 20910 USA

If you are outside of the U.S. or Canada, use an international money order
or a US dollar check amounting to $10 plus the above price.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.