Predictive parser combinators need four values to report errors
Authors:
Open Access
- 1 January 1996
- journal article
- research article
- Published by Cambridge University Press (CUP) in Journal of Functional Programming
- Vol. 6 (2) , 355-364
Abstract
A combinator-based parser is a parser constructed directly from a BNF grammar, using higher-order functions (combinators) to model the alternative and sequencing operations of BNF. This paper describes a method for constructing parser combinators that can be used to build efficient predictive parsers which accurately report the cause of parsing errors. The method uses parsers that return values (parse trees or error indications) decorated with one of four tags.Keywords
This publication has 4 references indexed in Scilit:
- Higher-order functions for parsingJournal of Functional Programming, 1992
- Comprehending monads1990
- How to replace failure by a list of successes a method for exception handling, backtracking, and pattern matching in lazy functional languagesLecture Notes in Computer Science, 1985
- Syntax-Directed TransductionJournal of the ACM, 1968