A New Top-Down Parsing Algorithm for Left-Recursive DCGs

@inproceedings{Nederhof1993ANT,
  title={A New Top-Down Parsing Algorithm for Left-Recursive DCGs},
  author={Mark-Jan Nederhof},
  booktitle={PLILP},
  year={1993}
}
  • M. Nederhof
  • Published in PLILP 25 August 1993
  • Computer Science
In this paper we introduce a new parsing algorithm, called cancellation parsing. Deterministic cancellation parsing with lookahead k can handle the C(k) grammars, which include the LL(k) grammars and are contained in the LC(k) grammars. 

Increasing the Applicability of LR Parsing

TLDR
It is shown that ordinary LR parsing according to hidden left-recursive grammars is not possible and a range of solutions to this problem are indicated, including a new parsing technique, which is a variant of traditional LR parsing.

Parser Combinators for Ambiguous Left-Recursive Grammars

TLDR
This paper describes combinators, implemented in Haskell, which overcome all the limitations of existing implementations of parsers, and can accommodate left-recursive grammars.

The extension of deterministic cancellation parser to directly handle indirect and hidden left recursion

TLDR
The resulting parser is a deterministic cancellation parser with a recursive decent structure, which has more acceptance power, because of its capability of working with all kinds of left recursion without any need for transforming them into non left-recursive equivalents.

Practical general top-down parsers

TLDR
A derivation-based semantics for operator precedence disambiguation that is independent of the underlying parsing technique, and is safe, i.e., does not remove sentences from the language when there is no ambiguity is introduced.

Exploration of conflict situations in deterministic cancellation parser

TLDR
This paper investigates situations that result in conflicts at which parsers cannot make a deterministic decision to continue the process of parsing and tries to categorize them.

Practical, general parser combinators

TLDR
This paper presents general parser combinators that support all context-free grammars and construct a parse forest in cubic time and space in the worst case, while behaving nearly linearly on Grammars of real programming languages.

Eeciency and Robustness in Agfl

TLDR
An eecient and robust parser that is used in an information retrieval system is discussed and a principle-based approach to robustness and optimizations for improving the eeciency of top-down backtrack parsers are discussed.

Software Languages

In this chapter, we characterize the notion of “software language” in a broad sense. We begin by setting out diverse examples of programming, modeling, and specification languages to cover a wide

References

SHOWING 1-10 OF 13 REFERENCES

Increasing the Applicability of LR Parsing

TLDR
It is shown that ordinary LR parsing according to hidden left-recursive grammars is not possible and a range of solutions to this problem are indicated, including a new parsing technique, which is a variant of traditional LR parsing.

A Parsing System Based on Logic Programming

TLDR
A practical parsing system based on logic programming that works in a bottom-up manner so that the left-recursive rules do not cause difficulties, the parsing process does not involve backtracking, and there is no duplicated construction of same syntactic structures is presented.

Generalized Left-Corner Parsing

TLDR
A strong advantage of this presentation is that it makes explicit the role of left-corner parsing in these algorithms, which can be seen as an optimization of algorithms known from existing literature.

Guarded attribute grammars: top down parsing and left recursive productions

TLDR
A novel device by which left recursive productions can be directly compiled into executable interpreters that use a top down parsing strategy and it is shown how this technique can be used to construct executable attribute grammars that are both modular and expressively natural.

Parsing as Deduction

By exploring the relationship between parsing and deduction, a new and more general view of chart parsing is obtained, which encompasses parsing for grammar formalisms based on unification, and is

Non-deterministic Recursive Ascent Parsing

A purely functional implementation of LR-parsers is given, together with a simple correctness proof. It is presented as a generalization of the recursive descent parser. For non-LR grammars the

Deterministic Left Corner Parsing (Extended Abstract)

TLDR
It is shown that when a particular grammatical rewriting procedure is applied to a grammar, the resulting grammar is (strong) LL(k) if and only if the original grammar is(strong) LC(k), which implies that the class of LC (k) languages is identical to theclass of LL( k) languages.

A Generalized Greibach Normal Form for Definite Clause Grammars

TLDR
The GGNF seems to be the first normal form result for DCGs, which provides an explicit factorization of the potential sources of undecidability for the parsing problem, and offers valuable insights on the computational structure of unification grammars in general.

Parsing and compiling using Prolog

TLDR
The primary aim of this paper is to demonstrate the use of Prolog in parsing and compiling and to show that Prolog is a labor-saving tool in prototyping and implementing many non-numerical algorithms which arise in compiling.