文件名称:LL1
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:9.14kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
LL分析器
2、 在VC下打开LL1.dsp,阅读工程LL1,LL1为一个加、乘法(适当扩充可为四则)运算表达式的LL1预测语法分析器,规定其文法如下:
E->TE’ (1)
E’->+TE’ (2)
E’->ε (3)
T->FT’ (4)
T’->*FT’ (5)
T’->ε (6)
F->(E) (7)
F->i (8)
程序设计思路见课本P76,词法分析器调用接口为lex(),LL1分析表构造过程参考LL1程序实现方法,练习:修改文法和程序使支持减、除运算
-LL parser 2, the VC open the LL1.dsp, read the works LL1, LL1 is a plus, multiplication (appropriate expansion for 4) expression is forecast LL1 parser, provides the grammar as follows: E-> TE ' (1) E' -> + TE ' (2) E' -> ε (3) T-> FT' (4) T' -> * FT ' (5) T' -> ε (6) F-> (E) (7) F-> i (8) programming ideas, see textbooks P76, call the lexical analyzer interface lex (), LL1 of table construction process of reference LL1 program implementation method, practice: grammar and procedural changes to support the reduction of , in addition to computing
2、 在VC下打开LL1.dsp,阅读工程LL1,LL1为一个加、乘法(适当扩充可为四则)运算表达式的LL1预测语法分析器,规定其文法如下:
E->TE’ (1)
E’->+TE’ (2)
E’->ε (3)
T->FT’ (4)
T’->*FT’ (5)
T’->ε (6)
F->(E) (7)
F->i (8)
程序设计思路见课本P76,词法分析器调用接口为lex(),LL1分析表构造过程参考LL1程序实现方法,练习:修改文法和程序使支持减、除运算
-LL parser 2, the VC open the LL1.dsp, read the works LL1, LL1 is a plus, multiplication (appropriate expansion for 4) expression is forecast LL1 parser, provides the grammar as follows: E-> TE ' (1) E' -> + TE ' (2) E' -> ε (3) T-> FT' (4) T' -> * FT ' (5) T' -> ε (6) F-> (E) (7) F-> i (8) programming ideas, see textbooks P76, call the lexical analyzer interface lex (), LL1 of table construction process of reference LL1 program implementation method, practice: grammar and procedural changes to support the reduction of , in addition to computing
相关搜索: T→FT
(系统自动生成,下载前可以参看下载内容)
下载文件列表
LL1/gram.cpp
LL1/gram.h
LL1/istack.cpp
LL1/istack.h
LL1/LL1.dsp
LL1/LL1.dsw
LL1/LL1.ncb
LL1/LL1.opt
LL1/LL1.plg
LL1/Debug
LL1
LL1/gram.h
LL1/istack.cpp
LL1/istack.h
LL1/LL1.dsp
LL1/LL1.dsw
LL1/LL1.ncb
LL1/LL1.opt
LL1/LL1.plg
LL1/Debug
LL1
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.