欢迎来到天天文库
浏览记录
ID:6792173
大小:572.00 KB
页数:52页
时间:2018-01-25
《毕业设计(论文)-c++6.0编译原理设计》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、中国农业大学学士学位论文摘要摘要“编译原理”是计算机专业特别是计算机软件专业的一门重要专业课。为了使学生对高级语言的编译过程有较直观的了解,以达到辅助教学的目的,开发了编译原理的辅助教学软件。该软件包含两个部分,第一部分是PL/0语言的CAI,第二部分是供教学练习的解题系统。第二部分由五个小部分组成:语法基础部分、词法分析、语法部分、中间代码生成、基本块划分。本人完成的主要工作是:修改了语法基础部分的错误代码,使语法树能够正确显示,最左最右推导都能正确进行、完成了语法分析部分的LR(1)语法分析功能和LALR(1)的语法分析功能、并且实现了四元式形式的中间代码的基本块划分。
2、编译原理辅助教学软件的设计充分利用VisualC++6.0开发环境的底层控制能力和C++高级语言,C++语言中的封装、继承等概念使得编程实现简单,逻辑清楚。该软件可辅助教师教学,也有利于学生理解编译原理课程中的基本原理,同时也可以作为课程的配套练习工具。关键字:语法分析,编译原理,面向对象技术-I-中国农业大学学士学位论文AbstractAbstractAsweallknown,therearethousandsofcomputerlanguageexistingintheworld.Somanylanguagescouldbeappliedinthecomputerbyr
3、easonofcompilerprogram.‘CompilerPrinciple’isanimportantspecialcourseforthecomputermajor,particularlyforsoftwaremajorofcomputerdepartment.Inordertoprovidestudentswithastraightandexplicitunderstandingofcomplierprocessofseniorlanguage,wedevelopedthecomputer-assistedsoftwareofcomplierprogramto
4、helpintheclass.Thissoftwareisconsistedoftwoparts:oneisCAI(Computer-AidedInstruction)ofPL/0,theotherisanexercisesystemforteachersandstudents.Theexercisesystemisconsistedoffiveparts:BaseSyntaxAnalysis,LexicalAnalysis,SyntaxAnalysis,IntermediateCodeGeneration,andBasicBlockPartitioning.Mostofm
5、yworkinvolve:modifysomecodeinthemodelofbasesyntaxanalysistomakethesyntaxtreecanbeshowncorrectly;addthefunctionsoftheLR(1)syntaxanalysisandtheLALR(1)syntaxanalysisinthemodelofsyntaxanalysis;andthewholemodelofBasicBlockPartitioning.ComputerAssistedInstructionofCompilation,takingfulladvantage
6、ofthebasalpowerfulcontrolabilityofVisualC++6.0andC++,isagoodassistantsoftwarehelpfulforstudentstostudyandunderstandthecourseofCompilerPrincipleclearly.Itcouldbeusednotonlyforteacher’sillustrationinclass,butalsoforstudents’exerciseafterclass.KeyWord:SyntaxAnalysis,CompilerPrinciple,Object-O
7、rientedProgramming-II-中国农业大学学士学位论文目录目录摘要IAbstractII目录III-、绪论11.1系统开发背景11.2选题目的11.3平台的选择1二、系统开发环境及其相应的技术简介22.1面向对象技术22.2可视化技术22.3VisualC++6.02三、系统功能的设计与实现33.1编译原理概述33.2模块的实现技术43.2.1消息映射机制43.2.2控件及对话框53.2.3属性页73.3系统的整体设计83.3.1系统设计思想83.3.2编译原理辅助教学软件功能设计说明93.4语法基础
此文档下载收益归作者所有