没有合适的资源?快使用搜索试试~ 我知道了~
The Dummies’ Guide to Compiler Design
需积分: 10 5 下载量 41 浏览量
2019-01-06
18:15:24
上传
评论
收藏 2.51MB PDF 举报
温馨提示
The Dummies’ Guide to Compiler Design By 作者: Rosina S Khan Pub Date: 2018 ISBN: n/a Pages: 161 This book is useful for those who are interested in knowing the underlying principles of a Compiler that is used for compiling high-level programming languages. This book actually guides you step by step in a lucid and simple way how to design a compiler ultimately. I am guessing you have compiled a high-level program some time or the other or rather, you do it on a regular basis; then this book would come handy for you because it opens all the mysteries to the functioning and designing of a compiler! Go ahead- jump aboard and download the book.
资源推荐
资源详情
资源评论
The Dummies’ GuiDe To
Compiler Design
Rosina S Khan
1
Dedicated to You,
The Valued Reader
2
Contents
Preface ...............................................................................
8
C H A P T E R 1 ..................................................................
11
Introduction to Compilers ...................................................................
11
1.1
What actually is a Compiler? .........................................................................
11
1.2
Other Translators .........................................................................................
11
1.3
What is the Significance of Translators? .........................................................
12
1.4
Macros .........................................................................................................
13
1.5
High-Level Languages ...................................................................................
14
1.6
The Structure of a Compiler ..........................................................................
15
C H A P T E R 2 ..................................................................
18
Lexical Analysis ..................................................................................
18
2.1
How a Lexical Analyzer Works .......................................................................
18
2.2
Input Buffering .............................................................................................
19
2.3
Preliminary Scanning ....................................................................................
20
2.4
A Simple Design of Lexical Analyzers .............................................................
21
2.5
Regular Expressions .....................................................................................
26
2.6
Finite Automata ............................................................................................
29
2.7
Nondeterministic Automata ...........................................................................
29
2.8
Converting an NFA to a DFA ..........................................................................
31
2.9
Minimizing the Number of States of a DFA .....................................................
41
2.10 A Language for Specifying Lexical Analyzers .................................................
43
2.11 Implementation of a Lexical Analyzer ...........................................................
48
C H A P T E R 3 ..................................................................
52
Syntax Analysis - Part 1 ......................................................................
52
3.1
Context-Free Grammars ................................................................................
52
3.2
Derivations and Parse Trees ..........................................................................
55
3.3
Regular expressions vs Context-Free Grammar ...............................................
58
4
3.4
Further example of Context-Free Grammar ....................................................
59
C H A P T E R 4 ..................................................................
62
Syntax Analysis - Part 2 ......................................................................
62
4.1
Shift-Reduce Parsing ....................................................................................
62
4.2
Operator-Precedence Parsing ........................................................................
64
4.3
Top-Down Parsing ........................................................................................
67
4.4
Recursive-Descent Parsing ............................................................................
70
4.5
Predictive Parsers .........................................................................................
72
C H A P T E R 5 ..................................................................
79
Syntax Analysis - Part 3 ......................................................................
79
5.1
LR Parsers ...................................................................................................
80
5.2
CLOSURE .....................................................................................................
81
5.3
Parsing Table ...............................................................................................
87
5.4
Moves of LR parser on an Input String ...........................................................
90
C H A P T E R 6 ..................................................................
92
Syntax-Directed Translation ................................................................
92
6.1
Syntax-Directed Translation Scheme ..............................................................
92
Semantic Actions ................................................................................................
92
6.2
Implementation of Syntax-Directed Translators .............................................
95
6.3
Intermediate Code ......................................................................................
100
6.4
Postfix Notation ..........................................................................................
101
6.5
Parse Trees and Syntax Trees .....................................................................
105
6.6
Three-Address Code ...................................................................................
106
C H A P T E R 7 ...............................................................
114
Run-Time Storage Organization ..........................................................
114
7.1
Memory Layout of an Executable Program ...................................................
114
7.2
Run-Time Stack ..........................................................................................
115
7.3
Storage Allocation ......................................................................................
118
5
剩余160页未读,继续阅读
资源评论
THESUMMERE
- 粉丝: 23
- 资源: 328
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功