涡轮帕斯卡编译器写在涡轮帕斯卡。这不是 Turbo Pascal 的 "原始 " Borland"源代码,因为它不是用 Pascal 编写的。这是 TPC16,一个从零开始编写的 Turbo Pascal 兼容编译器。它是与博兰涡轮帕斯卡 7.0 命令行编译器 TPC 完全兼容的源代码。Exe。这意味着它使用相同的语法,并为 x86 生成完全相同的编译单位和 16 位代码。 此源代码显示了 Pascal 编程语言的所有美感,并揭示了为任何语言(而不仅仅是 Pascal)构建快速紧凑的编译器所需的所有技巧。有了这个 Turbo Pascal 单通编译器源代码,你会得到: 符号表的体系结构, 了解 Turbo Pascal 单元结构, 超快扫描仪, 用于快速关键字搜索的哈希表示例, 任何编译器所需的数据结构的 Plethora, 处理标识符的算法, 范围和单元,Parser 分析一系列令牌并检查 Pascal 语法、编译器错误报告示例、表达式和计算理解、任意表达式处理和代码生成示例、用于生成具有有限寄存器集的复杂代码的算法、行内汇编编译器示例、中间代码结构示例、优化代码生成器、了解导入对象文件、优化链接器以及解决引用的出色方法、与 Borland Turbo Pascal 7 兼容的工作编译器,深入了解 Turbo Pascal 编译器内部等。 此包最重要的功能是实际实现各种算法以及经过验证的数据结构。成功的编译器实现主要取决于使用的数据结构和算法。因此,TPC16 源可以用作如何为编译器实现复杂算法的灵感。关于编译器设计的最佳电子书。
版本历史记录
- 版本 1.0 发布于 2009-10-22
软件信息
终端用户许可协议
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.