Abstract
The notion of a discrete pattern is formalized and certain properties deduced. A pattern is shown to be a generalization of a formal language. Algorithms for implementing the kinds of patterns in SNOBOL4 are given. The general approach is to create, in-so-far as possible, a bottom-up parse from a top-down specification.
- 1 Chomsky, N. Three models for the description of language. PGIT 2 (Mar. 1956), 113-124.Google Scholar
- 2 Christensen, C. AMBIT/2 (programming language). Applied Data Research, Wakefield, Mass., 1970.Google Scholar
- 3 Dewar, R.B. SPITBOL-version 2.0. SNOBOL4 Document s4D23, Illinois Inst. of Tech., Chicago, 1971.Google Scholar
- 4 Feldman, J., and Gries, D. Translator writing systems. Comm. ACM 11, 2 (Feb. 1968), 77-113. Google ScholarDigital Library
- 5 Floyd, R.W. The syntax of programming languages. IEEE Trans. EC-13 (Aug. 1964), 346-353.Google Scholar
- 6 Gimpel, J.F. Blocks-a new datatype for SNOBOL4. Comm. ACM 15, 6 (June 1972), 438-447. Google ScholarDigital Library
- 7 Gimpel, J.F. The theory and implementation of pattern matching in SNOBOL4 and other programming languages. SNOBOL4 doc. S4D24, Bell Telephone Laboratories, Holmdel, N.J., 1971.Google Scholar
- 8 Gries, D. Compiler Construction. For Digital Computers. Wiley, New York, 1971. Google ScholarDigital Library
- 9 Griswold, R.E., and Polonsky, I.P. String pattern matching in the programming language SNOBOL. Internal Memo., Bell Telephone Laboratories, Holmdel, N.J., 1964.Google Scholar
- 10 Griswold, R.E., Poage, J.F., and Polonsky, I.P. The SNOBOL4 Programming Language. Prentice-Hall, Englewood Cliffs, N.J., 1968. Google ScholarDigital Library
- 11 Harrison, M.C. Data-Structures and Programming. Courant Institute of Math. Sciences, New York, 1970, p. 289.Google Scholar
- 12 Hoperoft, J., and Ullman, J. Formal Languages and Their Relation to Automata. Addison-Wesley, Reading, Mass., 1969. Google ScholarDigital Library
- 13 McClure, R.M. TMG-A syntax directed compiler. Proc. ACM, 20th Nat. Conf., 1965, pp. 252-274.Google Scholar
- 14 Thompson, K. Regular expression search algorithm. Comm. ACM 11, 6 (June 1968), 419-422. Google ScholarDigital Library
- 15 Thompson, K. QED-A text editor. (To be published.) Internal Memo., Bell Telephone Laboratories, Murray Hill, N.J.Google Scholar
- 16 Yngve, V.H. A programming language for mechanical translation. Mech. Trans. 4 (Dec. 1957), 59-65.Google Scholar
Recommendations
Implementing SNOBOL4 pattern matching in Icon
This paper presents several models for string pattern matching. Two of these provide a basis for implementing pattern matching in SNOBOL4. The cursor model does this in terms of changes in the position in the subject as patterns are applied. The ...
APAREL—A parse-request language
APAREL is described: this language is an extension to an algorithmic language (PL/I) that provides the pattern-matching capabilities normally found only in special purpose languages such as SNOBOL4 and TMG. This capability is provided through parse-...
Comments