Skip to main content Accessibility help
×
Home

Predictive parser combinators need four values to report errors

  • Andrew Partridge (a1) and David Wright (a1)

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.

Copyright

References

Hide All
Aho, A. V., Sethi, R. and Ullman, J. D. (1986) Compilers: Principles, Techniques, and Tools. Addison-Wesley.
Appel, A. W. (1992) Compiling with continuations. Cambridge University Press.
Fokker, J. (1995) Functional Parsers. In Advanced Functional Programming: Lecture Notes in Computer Science, 925, Jeuring, J. and Meijer, E. (editors). Springer-Verlag.
Hutton, G. (1992) Higher-order functions for parsing. Journal of Functional Programming, 2(3): 323343.
Jones, M. (1994) Gofer 2.30 release notes, http://www.cs.nott.ac.uk:80/Department/Staff/mpj/.
Lewis, P. M. II and Stearns, R. E. (1968) Syntax-directed transduction. J. ACM, 15(3): 465488.
Wadler, P. (1985) How to Replace Failure by a List of Successes. Functional Programming Languages and Computer Architecture: Lecture Notes in Computer Science, 201, pp. 113128. Springer-Verlag.
Wadler, P. (1990) Comprehending Monads. In Proceedings of the 1990 ACM Conference on LISP and Functional Programming, pp. 6178. ACM.

Related content

Powered by UNSILO

Predictive parser combinators need four values to report errors

  • Andrew Partridge (a1) and David Wright (a1)

Metrics

Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed.

Predictive parser combinators need four values to report errors

  • Andrew Partridge (a1) and David Wright (a1)
Submit a response

Discussions

No Discussions have been published for this article.

×

Reply to: Submit a response


Your details


Conflicting interests

Do you have any conflicting interests? *