Abstract
This paper addresses efficient parsing in the context of logical inference for the purpose of using logic programming languages in compiler writing. A bottom-up, deterministic parsing mechanism is formulated for “bounded right context” grammars, a subclass of LR(k) grammars with characteristics amenable to declarative parser specification. A working parser generator for λProlog is described, although the basic parsing mechanism is applicable to logic programming in general.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
A. V. Aho, R. Sethi, and J. Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1986.
A. W. Appel. Modern Compiler Implementation in ML. Cambridge University Press, 1998.
J. Cohen and T. Hickey. Parsing and compiling using prolog. ACM Transactions on Programming Languages and Systems, 9(2):125–163, 1987.
R. Floyd. Bounded context syntactic analysis. Communications of the ACM, 7(2):62–67, 1964.
S. Fong. Computational Properties of Principle-Based Grammatical Theories. PhD thesis, MIT, June 1991.
S. L. Graham. On bounded right context languages and grammars. SIAM Journal on Computing, 3(3):224–254, 1974.
M. Harrison and I. Havel. On the parsing of deterministic languages. Journal of the ACM, 21(4):525–548, 1974.
M. A. Harrison. Introduction to Formal Language Theory. Addison-Wesley, 1978.
R. Ochitani K. Uehara and O. Kakusho. A bottom-up parser based on predicate logic. IEEE Proceedings, International Symposium on Logic Programming, pages 220–227, 1984.
D. E. Knuth. On the translation of languages from left to right. Information and Control, 8(6):607–639, 1965.
G. Nadathur and D. Mitchell. System description: Teyjus—a compiler and abstract machine based implementation of λProlog. In Automated Deduction-CADE-13, Springer-Verlag LNAI no. 1632, pages 287–291, July 1999.
U. Nilsson. AID: an alternative implementation of DCGs. New Generation Computing, 4:383–399, 1986.
F. Pereira and D. Warren. Definite clause grammars for language analysis. Artificial Intelligence, 13:231–278, 1980.
F. Pereira and D. Warren. Parsing as deduction. In 21st Annual Meeting of the Association for Computational Linguistics, pages 137–144, 1983.
Shieber S., Schabes Y., and Pereira F. Principles and implementation of deductive parsing. Technical Report TR-11-94, Center for Research in Computing Technology, Harvard University, December 1998.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2000 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Liang, C. (2000). A Deterministic Shift-Reduce Parser Generator for a Logic Programming Language. In: Lloyd, J., et al. Computational Logic — CL 2000. CL 2000. Lecture Notes in Computer Science(), vol 1861. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44957-4_88
Download citation
DOI: https://doi.org/10.1007/3-540-44957-4_88
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-67797-0
Online ISBN: 978-3-540-44957-7
eBook Packages: Springer Book Archive