- 70
- 0
- 约8.77千字
- 约 17页
- 2017-06-08 发布于河南
- 举报
编译原理-- 语法分析——规约(国外英文资料)
编译原理-- 语法分析——规约(国外英文资料)
Course name compiling principle
Design topic syntax analysis - Specification
Catalog
I. description of the problem:...
Two. Description of grammar and attribute grammar...
2.1 grammar describes... As to... (2)
2.2, the grammar of the while-do loop statement...... (2)
The 2.3 attribute grammar describes:... (2)
3 syntax analysis methods and the description of the form of intermediate code. (3)
3.1 grammatical analysis methods:...
3.2 description in the form of intermediate code:.... (3)
4 brief analysis and summary design:..... (4)
4.1 lexical analysis:... (4)
4.2 recursive descent translator design:... (4)
4.3 grammar, guided translation,...... (5)
5 detailed algorithms describe... /... (5)
5.1 Grammar:... /... (6)
5.2 to check out the mistake of...
Three. Test methods and test results:... (9)
3.1 test methods:...
3.2 test results:...
Four. Design experience:... (10)
I. problem description
1.1 can write a while-do statement that conforms to the grammar of LL (1).
1.2 constructs lexical analysis program, carries on the lexical analysis to the while-do statement.
1.3 construct syntax analysis program, syntax analysis of while-do statements, to determine grammatical correctness.
1.4 run program that requires the correct semantic output (4 address code).
Two, grammar and attribute grammar description:
2.1 grammar description:
Basic concept:
Grammar is the definition and description of linguistic structures. Form is used to describe and define language
Grammar is called grammar.
Definition: grammar G= (VN, VT, P, Z)
VN: non terminating symbolic set
VT: end of symbol set
P: a set of production or rules
Z: start symbol (symbol) Z, VN
Among them:
Grammar for 2.2 while-do loop statements
The grammar G (s) follows:
S--WEDG (meaning while, E, do, G)
G--c=R
R--dTe|d
T--+|-|*|/
E--aFb
F-- |==| (Id1, Id2 representative identifier)
Description of 2.3 attribute grammar:
The definition form of 2.3.1 attribute grammar:
Each grammar notation has a set of attrib
您可能关注的文档
最近下载
- 海绵城市监理实施细则范本·仅供参考.doc VIP
- 七年级数学下册-相交线与平行线测试题(同名10636).doc VIP
- 《跨学科主题学习设计与实施》全套教学课件.pptx
- 建设工程项目管理全套课件.pptx
- 数控多轴加工编程与仿真全套教学课件.pptx
- 2018助理班主任工作总结3篇-2018助理班主任工作总结3篇-2018助理班主任工作总结3篇-.doc VIP
- 《水工程施工》课程大纲.pdf VIP
- 市政管线项目划分.doc VIP
- 2026年春季开学第一课 课件:策马新学期,筑梦向远方-2025-2026学年下学期优质主题班会(全国通用).pptx
- 初高中英语必背4000个词汇表.pdf
原创力文档

文档评论(0)