×

Pattern matching compilation of functions defined in context-free languages. (English) Zbl 0986.68014

Summary: LFC is a functional language based on recursive functions defined in context-free languages. In this paper, a new pattern matching algorithm for LFC is presented, which can represent a sequence of patterns as an integer by an encoding method. It is a rather simple method and produces efficient case-expressions for pattern matching definitions of LFC. The algorithm can also be used for other functional languages, but for nested patterns it may become complicated and further studies are needed.

MSC:

68N20 Theory of compilers and interpreters
68Q45 Formal languages and automata
PDFBibTeX XMLCite
Full Text: DOI

References:

[1] Dong Yunmei. Recursive functions defined on context-free languages (I). Technical Report ISCAS-LCS-2K-03, Computer Science Laboratory, Institute of Software, The Chinese Academy of Sciences, 2000. · Zbl 1161.68521
[2] Chen Haiming. Function definition language FDL and its implementation.Journal of Computer Science & Technology, 1999, 14(4): 414–421.
[3] Augustsson L. Compiling pattern matching. InProc. Conference on Functional Programming Languages and Computer Architecture, Jouannaud J-P (ed.), Nancy, France, LNCS 201, Springer-Verlag, Sept. 1985, pp.368–381.
[4] Peyton Jones S L. The Implementation of Functional Programming Languages. Prentice-Hall International, 1987. · Zbl 0712.68017
[5] Sekar R C, Ramesh R, Ramakrishnan I V. Adaptive pattern matching. InICALP’92, LNCS 632, Springer-Verlag, 1992, pp.247–260. · Zbl 0845.68017
[6] Graf A. Left-to-right tree pattern matching. InRTA’91, LNCS 488, Springer-Verlag, 1991, pp.323–334.
[7] Schnoebelen Ph. Refined compilation of pattern matching for functional languages.Science of Computer Programming, 1988, 11: 133–159. · Zbl 0677.68004 · doi:10.1016/0167-6423(88)90002-0
[8] Appel A W. Modern Compiler Implementation in C. Cambridge University Press, 1998. · Zbl 0888.68036
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. In some cases that data have been complemented/enhanced by data from zbMATH Open. This attempts to reflect the references listed in the original paper as accurately as possible without claiming completeness or a perfect matching.