Sciweavers

PEPM
2016
ACM

Operator precedence for data-dependent grammars

8 years 7 months ago
Operator precedence for data-dependent grammars
Constructing parsers based on declarative specification of operator precedence is a very old research topic, and there are various existing approaches. However, these approaches are either tied to a particular parsing technique, or cannot deal with all corner cases found in programming languages. In this paper we present an implementation of declarative specification of operator precedence for general parsing that (1) is independent of the underlying parsing algorithm, (2) does not require any grammar transformation that increases the size of the grammar, (3) preserves the shape of parse trees of the original, natural grammar, and (4) can deal with intricate cases of operator precedence found in functional programming languages such as OCaml. Our new approach to operator precedence is formulated using data-dependent grammars, which extend context-free grammars with arbitrary computation, variable binding and constraints. We implemented our approach using Iguana, a data-dependent par...
Ali Afroozeh, Anastasia Izmaylova
Added 08 Apr 2016
Updated 08 Apr 2016
Type Journal
Year 2016
Where PEPM
Authors Ali Afroozeh, Anastasia Izmaylova
Comments (0)