Parsing Mixfix Operators

Parsing Mixfix Operators
Nils Anders Danielsson and Ulf Norell
In Implementation and Application of Functional Languages, 20th International Symposium, IFL 2008. The original publication is available at www.springerlink.com. [pdf, code, highlighted code]

Abstract

A simple grammar scheme for expressions containing mixfix operators is presented. The scheme is parameterised by a precedence relation which is only restricted to be a directed acyclic graph; this makes it possible to build up precedence relations in a modular way. Efficient and simple implementations of parsers for languages with user-defined mixfix operators, based on the grammar scheme, are also discussed. In the future we plan to replace the support for mixfix operators in the language Agda with a grammar scheme and an implementation based on this work.

Nils Anders Danielsson
Disclaimer
Last updated Tue Apr 14 15:42:07 UTC 2009.