Generalized LR parsing for extensions of context-free grammars (original) (raw)

Construction of efficient generalized LR parsers

Automata Implementation, 1998

We show how LR parsers for the analysis of arbitrary context free grammars can be derived from classical Earley's parsing algorithm. The result is a Generalized LR parsing algorithm working at complexity O(n^3) in the worst case, which is achieved by the use of dynamic programming to represent the non-deterministic evolution of the stack instead of graph-structured stack representations, as has often been the case in previous approaches. The algorithm behaves better in practical cases, achieving linear complexity on LR

Parsing techniques for lexicalized context-free grammars

2000

State-of-the art parsers use lexicalized grammars to achieve high accuracy on real-world texts. Most of these systems are based on traditional parsing algorithms that were originally developed for the unlexicalized versions of the adopted grammar formalisms. We show that these parsing algorithms do not perform e ciently when processing lexicalized grammars. We then develop novel parsing algorithms that overcome the computational ine ciencies of the standard algorithms.

Abstract parsing with string updates using LR-parsing technology

2010

parsing with string updates using LR-parsing technology Kyung-Goo Doh, Hyunha Kim, David A. Schmidt 1 Hanyang University, Ansan, South Korea 2 Kansas State University, Manhattan, Kansas, USA Abstract. We combine LR(k)-parsing technology and data-flow analysis to analyze, in advance of execution, the documents generated dynamically by a program. Based on the document language’s context-free reference grammar and the program’s control structure, formatted as a set of flow equations, the analysis predicts how the documents will be generated and simultaneously parses the predicted documents. Recursions in the flow equations cause the analysis to emit a set of residual equations that are solved by least-fixed point calculation in the domain of abstract (folded) LR-parse stacks. Since the technique accommodates LR(k) grammars, it can also handle string-update operations in the programs by translating the updates into finite-state transducers, whose controllers are composed with the LR(k)-...

Abstract LDTA’04 Preliminary Version Parameterized LR Parsing

2008

Common LR parser generators lack abstraction facilities for defining recurring patterns of productions. Although there are generators capable of supporting regular expressions on the right hand side of productions, no generator supports user defined patterns in grammars. Parameterized LR parsing extends standard LR parsing technology by admitting grammars with parameterized non-terminal symbols. A generator can implement such a grammar in two ways, either by expansion or directly. We develop the theory required for the direct implementation and show that it leads to significantly smaller parse tables and that it has fewer parsing conflicts than the expanded grammar. Attribute evaluation for a parameterized non-terminal is possible in the same way as before, if the semantic functions related to the non-terminal are polymorphic with respect to the parameter. We have implemented parameterized LR parsing in the context of Essence, a partial-evaluation based LR parser generator for Schem...