文件名称:SLR1
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:13kb
-
已下载:1次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
在VC下打开LRTrans1.dsp,阅读工程LRTrans1,LRTrans1为一个加、乘(适当扩充可为四则)运算表达式的SLR语法分析器,规定其文法如下:
文法3:
(0) S ->E
(1) E->E+E
(2) E->E*E
(3) E->(E)
(4) E->i
经分析其SLR(1)分析表如下(分析表按“操作符运算优先级和运算符的结合率”方法解决冲突——*优先集高于+,*和+的结合率均为左结合)
-In the VC to open LRTrans1.dsp, read the works LRTrans1, LRTrans1 as a plus, by (the appropriate expansion for 4) expression is the SLR parser, the provisions of the grammar as follows: Grammar 3: (0) S' -> E (1) E-> E+ E (2) E-> E* E (3) E-> (E) (4) E-> i by the analysis of the SLR (1) of the table as follows (of the table by " operation Fu operator precedence and operator binding rate " method of conflict resolution priority set higher than the+--*,* and+ binding rate for both left-associative)
文法3:
(0) S ->E
(1) E->E+E
(2) E->E*E
(3) E->(E)
(4) E->i
经分析其SLR(1)分析表如下(分析表按“操作符运算优先级和运算符的结合率”方法解决冲突——*优先集高于+,*和+的结合率均为左结合)
-In the VC to open LRTrans1.dsp, read the works LRTrans1, LRTrans1 as a plus, by (the appropriate expansion for 4) expression is the SLR parser, the provisions of the grammar as follows: Grammar 3: (0) S' -> E (1) E-> E+ E (2) E-> E* E (3) E-> (E) (4) E-> i by the analysis of the SLR (1) of the table as follows (of the table by " operation Fu operator precedence and operator binding rate " method of conflict resolution priority set higher than the+--*,* and+ binding rate for both left-associative)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
SLR1/gram.cpp
SLR1/gram.h
SLR1/rstack.cpp
SLR1/rstack.h
SLR1/SLR1.dsp
SLR1/SLR1.dsw
SLR1/SLR1.ncb
SLR1/SLR1.opt
SLR1/SLR1.plg
SLR1/SLR1.sln
SLR1/SLR1.suo
SLR1/SLR1.vcproj
SLR1/SLR1.vcproj.TCL-1BD8B03B4C4.Sun.user
SLR1/Debug
SLR1
SLR1/gram.h
SLR1/rstack.cpp
SLR1/rstack.h
SLR1/SLR1.dsp
SLR1/SLR1.dsw
SLR1/SLR1.ncb
SLR1/SLR1.opt
SLR1/SLR1.plg
SLR1/SLR1.sln
SLR1/SLR1.suo
SLR1/SLR1.vcproj
SLR1/SLR1.vcproj.TCL-1BD8B03B4C4.Sun.user
SLR1/Debug
SLR1
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.