一个编译原理语法分析器的实现与设计一个编译原理语法分析器的实现与设计—免费毕业设计论文.doc

一个编译原理语法分析器的实现与设计一个编译原理语法分析器的实现与设计—免费毕业设计论文.doc

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

学位论文 一个编译原理语法分析器的实现与设计 论文作者姓名: 申请学位专业: 申请学位类别: 指导教师姓名(职称): 论文提交日期: 一个编译原理语法分析器的实现与设计 摘 要 编译程序一般由词法分析程序、语法分析程序、语义分析程序、中间代码生成程序、目标代码生成程序、代码优化程序、表格管理程序和出错处理程序等成分构成。本文旨在介绍语法分析方法中的一种自上而下的分析方法——LL1)分析法。所谓LL1)分析法是指语法分析是按自左至右的顺序向前查看一个输入字符串,并分析过程中产生句子的最左推导。 The Design and Implementation of A Syntax Analyzer based on Compilation Theory Abstract The compiler generally is made up of the lexical analyzer program, the syntax analysis program, the semantics analysis program, the inter-language production procedure, the goal code production procedure, the code optimization procedure, the form executive program and the procedure of disposing mistakes. In the teaching process of compiler principle, all algorithm explanation needs to be explain clearly, including algorithm condition judgment, grammar analytical table structure process, grammar analytical table concrete production, in view of grammar sentence analysis process and so on. These processes often take much time to analyze, the scheduling and so on. This program mainly work is to complete the algorithm which take advantage of the procedure to deal with those above mentioned processes , in order to save time. The paper aims at introducing a syntax analytical method named LL(1) algorithm which from the up to down. The syntax analyzer analyzes the character string beginning from the left to right one word each time and educes the most left deduction of the sentence in the analyze course.. Key words: compiler; grammar analysis; LL(1) algorithm; demonstrate 目 录 论文总页数:22页 1引言 1 1.1项目背景 1 1.2目标 1 1.3名词解释 1 1.4算法简介 2 1.4.1自顶向下分析 2 1.4.2 递归子程序 3 1.4.3 LL(K)分析方法 4 1.4.4 LL(1)分析方法 4 1.4.5LL(1)分析表 5 2 系统流程图 6 2.1程序流程图 6 2.2 系统模块流程图 7 3 系统实施 7 3.1文件读取模块 8 3.1.1文件读取使用的CommonDialog控件介绍 8 3.1.2文法左递归的判断 9 3.2算法分析模块 9 3.2.1求select集 9 3.2.2求first集 10 3.2.3求follow集 10 3.3分析表构造模块 12 3.3.1构造文法分析表 12 3.3.2A::=aβ规则 13 3.3.3A::=Dβ规则 13 3.3.4A::=ε规则 13 3.4句子分析模块 13 3.4.1读取句子 14 3.4.2分析句子 14 4 特殊问题及解决方法 14 4.1 Select集的求解 15 4.1.1 问题描述

您可能关注的文档

文档评论(0)

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

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

1亿VIP精品文档

相关文档