文件名称:LR
- 所属分类:
- 编译器/词法分析
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 283kb
- 下载次数:
- 0次
- 提 供 者:
- sh***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
1.实验目的
设计一个LR分析器,实现对表达式语言的分析,加深对LR语法分析方法的基本思想的理解,掌握LR分析器设计与实现的基本方法。
2.实验要求
建立文法及其LR分析表表示的数据结构,设计并实现一个LALR(1)的分析器,对源程序经词法分析后生成的二元式代码流进行分析,如果输入串是文法定义的句子则输出“是”,否则输出“否”。
3.实验内容
(1)文法描述及其LALR(1)分析表
描述表达式语言的文法G如下:
-1. The experiment was to design a LR parser, the realization of the analysis of the expression language, better understanding of the LR parsing method to understand the basic idea of the master LR parser design and implementation of the basic method. 2. Experiment called for the establishment of grammar and LR analysis table that the data structure, design and realization of a LALR (1) of the analyzer, lexical analysis of source code generated by the binary-type code flow analysis, if the input strings is the definition of grammar sentence is the output " yes" , otherwise output " no." 3. Experimental (1) grammar descr iption and LALR (1) Analysis of the expression language described in Table G of the grammar are as follows:
设计一个LR分析器,实现对表达式语言的分析,加深对LR语法分析方法的基本思想的理解,掌握LR分析器设计与实现的基本方法。
2.实验要求
建立文法及其LR分析表表示的数据结构,设计并实现一个LALR(1)的分析器,对源程序经词法分析后生成的二元式代码流进行分析,如果输入串是文法定义的句子则输出“是”,否则输出“否”。
3.实验内容
(1)文法描述及其LALR(1)分析表
描述表达式语言的文法G如下:
-1. The experiment was to design a LR parser, the realization of the analysis of the expression language, better understanding of the LR parsing method to understand the basic idea of the master LR parser design and implementation of the basic method. 2. Experiment called for the establishment of grammar and LR analysis table that the data structure, design and realization of a LALR (1) of the analyzer, lexical analysis of source code generated by the binary-type code flow analysis, if the input strings is the definition of grammar sentence is the output " yes" , otherwise output " no." 3. Experimental (1) grammar descr iption and LALR (1) Analysis of the expression language described in Table G of the grammar are as follows:
(系统自动生成,下载前可以参看下载内容)
下载文件列表
根据LR分析表构造LR分析器
........................\编译原理课程设计
........................\................\26.cpp
........................\................\26.dsp
........................\................\26.dsw
........................\................\26.ncb
........................\................\26.opt
........................\................\26.plg
........................\................\Debug
........................\................\.....\26.exe
........................\................\.....\26.ilk
........................\................\.....\26.obj
........................\................\.....\26.pch
........................\................\.....\26.pdb
........................\................\.....\vc60.idb
........................\................\.....\vc60.pdb
........................\................\lr.h
........................\................\status_stack.h
........................\................\symbol_instr_stack.h
........................\................\《编译原理》实验.doc
........................\................\任务书.doc
........................\................\我的报告.doc
........................\编译原理课程设计
........................\................\26.cpp
........................\................\26.dsp
........................\................\26.dsw
........................\................\26.ncb
........................\................\26.opt
........................\................\26.plg
........................\................\Debug
........................\................\.....\26.exe
........................\................\.....\26.ilk
........................\................\.....\26.obj
........................\................\.....\26.pch
........................\................\.....\26.pdb
........................\................\.....\vc60.idb
........................\................\.....\vc60.pdb
........................\................\lr.h
........................\................\status_stack.h
........................\................\symbol_instr_stack.h
........................\................\《编译原理》实验.doc
........................\................\任务书.doc
........................\................\我的报告.doc