TPC16 Compiler Source Code 1.0

License: Free Trial ‎File size: 530.39 KB
‎Users Rating: 4.6/5 - ‎5 ‎votes

Turbo Pascal compiler written in Turbo Pascal. This is not the "original" Borland source code of the Turbo Pascal since it was not written in Pascal. This is TPC16, a Turbo Pascal compatible compiler written from scratch. It is completely source-code compatible with the Borland Turbo Pascal 7.0 command line compiler TPC.EXE. This means that it uses the same syntax and generates EXACTLY THE SAME compiled units and 16-bit code for x86. This source code shows all the beauty of the Pascal programming language and reveals all the tricks needed to build a fast and compact compiler for any language, not just Pascal. With this Turbo Pascal single pass compiler source code you will get: Architecture of symbol tables, Understanding of Turbo Pascal unit structure, Ultra fast scanner, Examples of hash tables for fast keyword search, Plethora of data structures needed in any compiler, Algorithms for dealing with identifiers, scopes and units, Parser to analyze a sequence of tokens and to check Pascal syntax, Example of compiler error reporting, Understanding of expressions and calculations, Examples of arbitrary expression processing and code generation, Algorithms for generating complex code with limited set of registers, Example of in-line assembler compiler, Example of intermediate code structure, Optimizing code generator, Understanding of importing object files, Optimizing linker with excellent approach to resolve references, A working compiler compatible with Borland Turbo Pascal 7, Deep understanding of the Turbo Pascal compiler internals and more. The most important feature of this package is practical implementation of various algorithms together with proven data structures. A successful compiler implementation depends mainly on data structures and algorithms used. Therefore TPC16 source can be used as an inspiration on how to implement complex algorithms for your compiler. The best e-book on compiler design.

VERSION HISTORY

  • Version 1.0 posted on 2009-10-22

Program Details

EULA

Source Code License Agreement Except where otherwise noted, all of the documentation, source code and software included in the TPC16 package is copyrighted by Igor Funa. This License Agreement is a legal agreement between you (either an individual or a single entity) and Igor Funa for the TPC16 software product identified above, which may include associated software components, source code, media, printed materials, and online or electronic documentation (Software). By installing, copying, or otherwise using the Software, you agree to be bound by the terms of this Agreement. If you do not agree to the terms of this Agreement, do not install or use the Software. DEFINITIONS For purposes of this Agreement, the following definitions shall apply: * "Software" shall mean the particular Software product purchased by Licensee from Igor Funa. * "Source Code" shall include computer programming code or any computer instructions necessary to compile the Software. * "Derivative Works" means any software programs which are developed by Licensee and which incorporate or contain modifications of any part of Source Code, and including any revision, modification, translation (including compilation or recapitulation by computer), abridgment, condensation, expansion or any other form in which Source Code, may be recast, transformed or adapted. * "Purpose" means the creation of bug-fixes, corrections, enhancements, revisions, modifications and adaptations of Source Code and addition of new user interfaces, features and functionality to the Software. LICENSEE RIGHTS AND RESTRICTIONS 1. By accepting this Agreement and subject to the restrictions and consideration stated below, Igor Funa grants Licensee a nonexclusive, nontransferable, perpetual, worldwide right to: 1.1 use and reproduce as many copies of the Source Code as are reasonably necessary only for the purpose of exercising the rights granted under this Agreement; 1.2 modify and create Derivative Works of the Source Code for the Purpose; 1.3 use, reproduce, have reproduced, sell (via sublicense), distribute (via sublicense), perform or otherwise transfer (via sublicense), directly or through distributors or resellers, Derivative Works, only in object code format, that are consistent with the Purpose and subject to the reporting and audit provisions of the Agreement. 2. No right is granted to Licensee hereunder to permit, authorize, license or sublicense any third party to view or use the Source Code. 3. No right is granted to Licensee hereunder to sell, distribute, make available, publish or otherwise transfer the Source Code except as provided in section 1. above. 4. Licensee shall not use the Source Code for anything other than its intended, legitimate, and legal purpose. 5. Licensee shall not use the Source Code in any manner not specifically permitted under this Agreement. 6. The terms of this Agreement do not entitle Licensee to receive any support or maintenance services from Igor Funa with respect to the Source Code. CONFIDENTIALITY AND PROPRIETARY Licensee agrees and acknowledges that the Source Code is proprietary, valuable, and not generally known to the public. Licensee agrees that it will maintain, through reasonable means, the confidentiality of the Source Code, and will not disseminate or allow unrestricted access. Licensee shall not distribute the Source Code to anyone other than employees and software developers of Licensee's organization or third party contractors working on behalf of Licensees organization with a need to know. Licensee may be held legally responsible for any infringement of intellectual property rights that is caused or encouraged by Licensees failure to abide by this Agreement. DISCLAIMER This Software, Source Code and any support from Igor Funa are provided AS IS and without warranty, express or implied. Igor Funa specifically disclaims any implied warranties of merchantability and fitness for a particular purpose. In no event will Igor Funa be liable for any damages, including but not limited to any lost profits, lost savings or any incidental or consequential damages, whether resulting from impaired or lost data, software or computer failure or any other cause, or for any other claim by the user or for any third party claim.