网站大量收购独家精品文档,联系QQ:2885784924

C++6.0编译原理设计.doc

  1. 1、本文档共52页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
C6.0编译原理设计

摘要 “编译原理”是计算机专业特别是计算机软件专业的一门重要专业课。为了使学生对高级语言的编译过程有较直观的了解,以达到辅助教学的目的,开发了编译原理的辅助教学软件。 该软件包含两个部分,第一部分是PL/0 语言的CAI,第二部分是供教学练习的解题系统。第二部分由五个小部分组成:语法基础部分、词法分析、语法部分、中间代码生成、基本块划分。本人完成的主要工作是:修改了语法基础部分的错误代码,使语法树能够正确显示,最左最右推导都能正确进行、完成了语法分析部分的LR(1)语法分析功能和LALR(1)的语法分析功能、并且实现了四元式形式的中间代码的基本块划分。 编译原理辅助教学软件的设计充分利用Visual C++6.0开发环境的底层控制能力和C++高级语言,C++语言中的封装、继承等概念使得编程实现简单,逻辑清楚。该软件可辅助教师教学,也有利于学生理解编译原理课程中的基本原理,同时也可以作为课程的配套练习工具。 关键字: 语法分析 ,编译原理 ,面向对象技术 Abstract As we all known, there are thousands of computer language existing in the world. So many languages could be applied in the computer by reason of compiler program. ‘Compiler Principle’ is an important special course for the computer major, particularly for software major of computer department .In order to provide students with a straight and explicit understanding of complier process of senior language , we developed the computer-assisted software of complier program to help in the class. This software is consisted of two parts: one is CAI (Computer-Aided Instruction) of PL/0, the other is an exercise system for teachers and students. The exercise system is consisted of five parts: Base Syntax Analysis, Lexical Analysis, Syntax Analysis, Intermediate Code Generation, and Basic Block Partitioning. Most of my work involve: modify some code in the model of base syntax analysis to make the syntax tree can be shown correctly; add the functions of the LR (1) syntax analysis and the LALR (1) syntax analysis in the model of syntax analysis; and the whole model of Basic Block Partitioning. Computer Assisted Instruction of Compilation, taking full advantage of the basal powerful control ability of Visual C++6.0 and C++, is a good assistant software helpful for students to study and understand the course of Compiler Principle clearly. It could be used not only for teacher’s illustration in class, but also for students’ exercise after class. Key Word: Syntax Analysis, Compiler Principle, Object-Oriented Programming 目录 摘要 I Abstract II 目录 I

文档评论(0)

2017meng + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档