Implementing SNOBOL4 pattern matching in Icon

  • Authors:
  • Ralph E. Griswold

  • Affiliations:
  • The University of Arizona, Department of Computer Science, Tucson, AZ 85721, U.S.A.

  • Venue:
  • Computer Languages
  • Year:
  • 1983

Quantified Score

Hi-index 0.00

Visualization

Abstract

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 substring model, on the other hand, is concerned with the portion of the subject that is matched by patterns. More general models are introduced, leading to a variety of extensions and generalizations of pattern matching. An implementation of these models is given in Icon.