文件名称:LL1
- 所属分类:
- 编译器/词法分析
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 9kb
- 下载次数:
- 0次
- 提 供 者:
- chi***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
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
...\gram.h
...\istack.cpp
...\istack.h
...\LL1.dsp
...\LL1.dsw
...\LL1.ncb
...\LL1.opt
...\LL1.plg
...\Debug
LL1
...\gram.h
...\istack.cpp
...\istack.h
...\LL1.dsp
...\LL1.dsw
...\LL1.ncb
...\LL1.opt
...\LL1.plg
...\Debug
LL1