2006
DOI: 10.1145/1149982.1149988
|View full text |Cite
|
Sign up to set email alerts
|

A new top-down parsing algorithm to accommodate ambiguity and left recursion in polynomial time

Abstract: Top-down backtracking language processors are highly modular, can handle ambiguity, and are easy to implement with clear and maintainable code. However, a widely-held, and incorrect, view is that top-down processors are inherently exponential for ambiguous grammars and cannot accommodate left-recursive productions. It has been known for many years that exponential complexity can be avoided by memoization, and that left-recursive productions can be accommodated through a variety of techniques. However, until no… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
1
1
1
1

Citation Types

0
13
0

Year Published

2007
2007
2024
2024

Publication Types

Select...
3
3
3

Relationship

1
8

Authors

Journals

citations
Cited by 15 publications
(13 citation statements)
references
References 8 publications
0
13
0
Order By: Relevance
“…For each of the term -non-terminal pair in every list the parse function is recursively called (line 10). for i ← 0 to size of term list do 10 child node ← Parse(term list i , pattern.non terminals i ) ; 11 add child node to child nodes; 12 add Node(type, p , r, child nodes) to nodes; 13 if nodes is empty then 14 final node ← Node(type, p , null, {}); 15 else 16 final node ← arg max n∈nodes r(n) ; 17 if final node is not fully parsed then 18 add final node to induction nodes ; 19 return final node Algorithm 1: Pseudocode of the main function parse of the top-down parser.…”
Section: Parsermentioning
confidence: 99%
“…For each of the term -non-terminal pair in every list the parse function is recursively called (line 10). for i ← 0 to size of term list do 10 child node ← Parse(term list i , pattern.non terminals i ) ; 11 add child node to child nodes; 12 add Node(type, p , r, child nodes) to nodes; 13 if nodes is empty then 14 final node ← Node(type, p , null, {}); 15 else 16 final node ← arg max n∈nodes r(n) ; 17 if final node is not fully parsed then 18 add final node to induction nodes ; 19 return final node Algorithm 1: Pseudocode of the main function parse of the top-down parser.…”
Section: Parsermentioning
confidence: 99%
“…A probabilistic method has been tried for parsing natural language sentences [3,4]. A top-down parsing algorithm to accommodate ambiguity and left recursion in polynomial time has also been tried [5]. A shift reduce parsing technique has been used for word sense disambiguation [6].…”
Section: Previous Workmentioning
confidence: 99%
“…The work applies Brzozowski's work on derivatives for regular languages [4] to context-free languages as a new method of parsing. Parsing with derivatives can be used to construct parser combinator libraries that can parse arbitrary context-free grammars, which is usually complicated (see for example [8]).…”
Section: Related Workmentioning
confidence: 99%
“…It is therefore of interest to have methods that allow parsing such grammars, and preferably using simple algorithms. Parser combinator libraries can be implemented to handle left-recursion, [8] but these do not follow from a clear mathematical theory, and in turn their correctness is harder to prove.…”
Section: Introductionmentioning
confidence: 99%