Hostname: page-component-8448b6f56d-c47g7 Total loading time: 0 Render date: 2024-04-19T17:21:31.841Z Has data issue: false hasContentIssue false

Higher-order functions for parsing*

Published online by Cambridge University Press:  07 November 2008

Graham Hutton
Affiliation:
Department of Computing Science, University of Glasgow (graham@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.

In combinator parsing, the text of parsers resembles BNF notation. We present the basic method, and a number of extensions. We address the special problems presented by white-space, and parsers with separate lexical and syntactic phases. In particular, a combining form for handling the ‘offside rule’ is given. Other extensions to the basic method include an ‘into’ combining form with many useful applications, and a simple means by which combinator parsers can produce more informative error messages.

Type
Articles
Copyright
Copyright © Cambridge University Press 1992

References

Aho, A., Sethi, R. and Ullman, J. 1986. Compilers – Principles, Techniques and Tools. Addison-Wesley.Google Scholar
Fairbairn, J. 1986. Making Form Follow Function. Glasgow University.Google Scholar
Frost, R. and Launchbury, J. 1988. Constructing Natural Language Interpreters in Lazy Functional Languages. Glasgow University.Google Scholar
Hudak, P. and Wadler, P. (eds). 1990. Report on the Programming Language Haskell. Glasgow University-Yale University.Google Scholar
Hutton, G. 1989. Parsing using combinators. In Proc. Glasgow Workshop on Functional Programming. August 1989, Springer Workshops in Computing, Springer-Verlag.Google Scholar
Johnsson, T. 1987. Attribute grammars as a functional programming paradigm. In Proc. FPCA 87, Vol. 274 of Lecture Notes in Computer Science. Springer-Verlag.Google Scholar
Landin, P. 1966. The Next 700 Programming Languages. Comm. ACM, 9 (Mar.).CrossRefGoogle Scholar
Wadler, P. 1985. How to Replace Failure by a List of Successes. In Proc. FPCA 85, Vol. 201 of Lecture Notes in Computer Science. Springer-Verlag.Google Scholar
Wadler, P. 1990. Comprehending Mondads. In Proc. FPCA 90.Google Scholar
Submit a response

Discussions

No Discussions have been published for this article.