Google Answers Logo
View Question
Q: Compilers ( Answered,   0 Comments )
Subject: Compilers
Category: Computers > Programming
Asked by: hbarca-ga
List Price: $10.00
Posted: 01 Nov 2002 18:36 PST
Expires: 01 Dec 2002 18:36 PST
Question ID: 96066
Where can I find source code and documentation of a C/C++
implementation of a PASCAL compiler?
Subject: Re: Compilers
Answered By: duncan2-ga on 01 Nov 2002 20:45 PST
Hello hbarca,

Thanks for the question.  I've been a happy Pascal user since the
early 80's and have used a number of compilers.

Many Pascal compilers are themselves written in Pascal; it’s fairly
common for compilers to be able to bootstrap their own source as
“proof” of their power.  Most of the C/C++ Pascal compiler
implementations are either closed-source commercial products, or
student projects and of varying quality.  I’ve searched the web and
found several resources that appear to match what you’re looking for.
One possible Pascal compiler that might interest you is the one
developed by Zoly Farkas and posted on  It was written
in Visual C++.

Steven Pemberton of CWI (National Research Institute for Mathematics
and Computer Science in the Netherlands) was the co-author of a text
titled “Pascal Implementations: the P4 Compiler and Interpreter”.  The
source code from his text is available on the web.  While the compiler
was written in Pascal, there’s a C translation of the compiler
available too:

You might also be interested in this report by Wang Wenjie (in Adobe
Acrobat form) which discusses the process of writing a mini-pascal
compiler for a compiler theory course:

A better resource is Ronald Mak’s book, "Writing Compilers and
Interpreters".  The entire book is devoted to writing a Pascal
compiler in C and C++.  You can find more about his books on his web
The first edition used C, the second C++.  If you follow Ronald’s
links to, you’ll find a few pages of the text available
online.  (Click on the book cover image once you get to Amazon for the
“Look Inside” feature.)

Search Strategy
To find these resources, I used Google with several search phrases and
terms including:
implementing a pascal compiler
design of a pascal compiler
“pascal compiler” c c++

Printed References:
Writing Compilers and Interpreters: an Applied Approach by Ronald Mak.
 John Wiley & Sons; ASIN: 047150968X; (April 1991)

Writing Compilers and Interpreters by Ronald Mak. John Wiley & Sons;
ISBN: 0471113530; 2nd edition (July 1996)

Pascal Implementation: Book I: The P4 Compiler by Steven Pemberton,
Martin Daniels.   Ellis Horwood Ltd; ASIN: 0470273860; (August 1983)

I hope you find these resources helpful and that this answers your
question satisfactorily.  If any of the above is unclear, please don’t
hesitate to request a clarification before rating this answer.

There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  

Google Home - Answers FAQ - Terms of Service - Privacy Policy