Abstract
This paper discusses bottom-up grammar analysis problems such as the Empty problem and the First problem. It defines a general class of bottom-up grammar analysis problems, and from this definition it derives a functional program for performing bottom-up grammar analysis. The derivation is purely calculational, using theorems from lattice theory, the Bird-Meertens calculus, and laws for list-comprehensions. Sufficient conditions guaranteeing the existence of a solution emerge as a byproduct of the calculation. The resulting program is used to construct programs for the Empty problem and the First problem.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
R.S. Bird. An introduction to the theory of lists. In M. Broy, editor, Logic of Programming and Calculi of Discrete Design, volume F36 of NATO ASI Series, pages 5–42. Springer-Verlag, 1987.
B.A. Davey and H.A. Priestley. Introduction to Lattices and Order. Cambridge University Press, 1990.
J.H. Fasel, P. Hudak, S. Peyton Jones, and P. Wadler. Sigplan Notices Special Issue on the Functional Programming Language Haskell. ACM SIGPLAN notices, 27(5), 1992.
Andy Gill and Simon Marlow. Happy manual. Published on comp.lang.functional, 1993.
J. Jeuring. Theories for Algorithm Calculation. PhD thesis, Utrecht University, 1993.
J. Jeuring and S.D. Swierstra. Bottom-up grammar analysis — a functional formulation-. Technical Report UU-CS-1994-01, Utrecht University, 1994.
M.P. Jones. Introduction to Gofer 2.20. Programming Research Group, Oxford University, 1992.
G. Malcolm. Data structures and program transformation. Science of Computer Programming, 14:255–279, 1990.
L. Meertens. Algorithmics-towards programming as a mathematical activity. In J.W. de Bakker, M. Hazewinkel, and J.K. Lenstra, editors, Proceedings of the CWI Symposium on Mathematics and Computer Science, volume 1 of CWI Monographs, pages 289–334. North-Holland, 1986.
Torben Mogensen. Ratatosk — a parser generator and scanner generator for Gofer. Published on comp.lang.functional, 1993.
Ulrich Möncke and Reinhard Wilhelm. Grammar flow analysis. In Attribute Grammars, Applications and Systems, SAGA '91, pages 151–186. Springer-Verlag, New York, 1991. LNCS 545.
Simon L. Peyton Jones. Yacc in Sasl — an exercise in functional programming. Software-Practice and Experience, 15(8):807–820, 1985.
P. Wadler. Comprehending monads. Mathematical Structures in Computer Science, 2:461–493, 1992.
Author information
Authors and Affiliations
Corresponding author
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Jeuring, J., Swierstra, D. (1994). Bottom-up grammar analysis — A functional formulation. In: Sannella, D. (eds) Programming Languages and Systems — ESOP '94. ESOP 1994. Lecture Notes in Computer Science, vol 788. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-57880-3_21
Download citation
DOI: https://doi.org/10.1007/3-540-57880-3_21
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-57880-2
Online ISBN: 978-3-540-48376-2
eBook Packages: Springer Book Archive