Abstract
In this paper we introduce a new parsing algorithm, called cancellation parsing. Deterministic cancellation parsing with lookahead k can handle the C(k) grammars, which include the LL(k) grammars and are contained in the LC(k) grammars.
The C(k) property is of theoretical interest in that it shows how to formalize the intuitive notion of the LL(k) property extended with the possibility of left recursion. The top-down nature of cancellation parsing gives it advantages over many other parsing algorithms.
No analysis is needed to construct a nondeterministic cancellation parser. This makes cancellation parsing particularly useful for the implementation of definite clause grammars in Prolog environments.
Supported by the Dutch Organisation for Scientific Research (NWO), under grant 00-62-518.
Preview
Unable to display preview. Download preview PDF.
References
J. Cohen and T.J. Hickey. Parsing and compiling using Prolog. ACM Transactions on Programming Languages and Systems, 9(2):125–163, April 1987.
M. Dymetman. A generalized Greibach normal form for definite clause grammars. In Proc. of the fifteenth International Conference on Computational Linguistics, volume 1, pages 366–372, Nantes, August 1992.
R.A. Frost. Guarded attribute grammars — top down parsing and left recursive productions. SIGPLAN Notices, 27(6):72–75, 1992.
S. Kuno. The predictive analyzer and a path elimination technique. Communications of the ACM, 8(7):453–462, July 1965.
B. Lang. Complete evaluation of Horn clauses: An automata theoretic approach. Rapport de Recherche 913, Institut ational de Recherche en Informatique et en Automatique, Rocquencourt, France, November 1988.
R. Leermakers. Non-deterministic recursive ascent parsing. In Fifth Conference of the European Chapter of the ACL, pages 63–68, Berlin, Germany, April 1991.
Y. Matsumoto et al. BUP: A bottom-up parser embedded in Prolog. New Generation Computing, 1:145–158, 1983.
Y. Matsumoto and R. Sugimura. A parsing system based on logic programming. In Proc. of the Tenth International Joint Conference on Artificial Intelligence, volume 2, pages 671–674, Milan, August 1987.
M.J. Nederhof. Generalized left-corner parsing. In Sixth Conference of the European Chapter of the ACL, pages 305–314, Utrecht, The Netherlands, April 1993.
M.J. Nederhof and C.H.A. Koster. Top-down parsing for left-recursive grammars. Technical report, University of Nijmegen, Department of Computer Science, June 1993.
M.J. Nederhof and J.J. Sarbo. Increasing the applicability of LR parsing. In The Third International Workshop on Parsing Technologies, Tilburg (The Netherlands) and Durbuy (Belgium), August 1993. To appear.
U. Nilsson. AID: An alternative implementation of DCGs. New Generation Computing, 4:383–399, 1986.
F.C.N. Pereira and D.H.D. Warren. Definite clause grammars for language analysis—a survey of the formalism and a comparison with the augmented transition networks. Artificial Intelligence, 13:231–278, 1980.
F.C.N. Pereira and D.H.D. Warren. Parsing as deduction. In 21th Annual Meeting of the ACL, pages 137–144, Cambridge, Massachusetts, July 1983.
P. Rangel Henriques. A semantic evaluator generating system in Prolog. In Programming Languages Implementation and Logic Programming, International Workshop, LNCS 348, pages 201–218, Orléans, France, May 1988. Springer-Verlag.
D.J. Rosenkrantz and P.M. Lewis II. Deterministic left corner parsing. In IEEE Conference Record of the 11th Annual Symposium on Switching and Automata Theory, pages 139–152, 1970.
B.A. Sheil. Observations on context-free parsing. Statistical Methods in Linguistics, 1976, pages 71–109.
K. Uehara, R. Ochitani, O. Kakusho, and J. Toyoda. A bottom-up parser based on predicate logic: A survey of the formalism and its implementation technique. In 1984 International Symposium on Logic Programming, pages 220–227, Atlantic City, New Jersey, February 1984.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1993 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Nederhof, MJ. (1993). A new top-down parsing algorithm for left-recursive DCGs. In: Bruynooghe, M., Penjam, J. (eds) Progamming Language Implementation and Logic Programming. PLILP 1993. Lecture Notes in Computer Science, vol 714. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-57186-8_74
Download citation
DOI: https://doi.org/10.1007/3-540-57186-8_74
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-57186-5
Online ISBN: 978-3-540-47945-1
eBook Packages: Springer Book Archive