正在加载图片...
Parsing Techniques Depending on how the parse tree is created,there are different parsing techniques. These parsing techniques are categorized into two groups: Top-Down Parsing, Bottom-Up Parsing ● Top-Down Parsing: Construction of the parse tree starts at the root,and proceeds towards the leaves -Efficient top-down parsers can be easily constructed by hand. Recursive Predictive Parsing,Non-Recursive Predictive Parsing(LL Parsing). ·Bottom-Up Parsing: -Construction of the parse tree starts at the leaves,and proceeds towards the root. -Normally efficient bottom-up parsers are created with the help of some software tools. Bottom-up parsing is also known as shift-reduce parsing. Operator-Precedence Parsing-simple,restrictive,easy to implement LR Parsing-much general form of shift-reduce parsing,LR,SLR,LALR CS308 Compiler Theory 9Parsing Techniques • Depending on how the parse tree is created, there are different parsing techni ques. • These parsing techniques are categorized into two groups: – Top-Down Parsing, – Bottom-Up Parsing • Top-Down Parsing: – Construction of the parse tree starts at the root, and proceeds towards the leaves. – Efficient top-down parsers can be easily constructed by hand. – Recursive Predictive Parsing, Non-Recursive Predictive Parsing (LL Parsing). • Bottom-Up Parsing: – Construction of the parse tree starts at the leaves, and proceeds towards the root. – Normally efficient bottom Normally efficient bottom -up parsers are created with the help of some software tools up parsers are created with the help of some software tools. – Bottom-up parsing is also known as shift-reduce parsing. – Operator-Precedence Parsing – simple, restrictive, easy to implement LR P i h l f f hif d i LR SLR LALR 9 – LR Parsing – muc h general form o f shift-re duce parsing, LR, SLR, LALR CS308 Compiler Theory
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有