Hostname: page-component-7479d7b7d-rvbq7 Total loading time: 0 Render date: 2024-07-13T20:14:05.386Z Has data issue: false hasContentIssue false

FUNCTIONAL PEARL Functional chart parsing of context-free grammars

Published online by Cambridge University Press:  27 October 2004

PETER LJUNGLÖF
Affiliation:
Department of Computing Science, Göteborg University and Chalmers University of Technology, Gothenburg, Sweden (email: peb@cs.chalmers.se)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

This paper implements a simple and elegant version of bottom-up Kilbury chart parsing (Kilbury, 1985; Wirén, 1992). This is one of the many chart parsing variants, which are all based on the data structure of charts. The chart parsing process uses inference rules to add new edges to the chart, and parsing is complete when no further edges can be added. One novel aspect of this implementation is that it doesn't have to rely on a global state for the implementation of the chart. This makes the code clean, elegant and declarative, while still having the same space and time complexity as the standard imperative implementations.

Type
Functional pearls
Copyright
© 2004 Cambridge University Press
Submit a response

Discussions

No Discussions have been published for this article.