A regular expression pattern matching processor for APL

  • Authors:
  • Mark R. Dempsey;Leslie H. Goldsmith

  • Affiliations:
  • APL Development Group, I.P. Sharp Associates Inc., 1200 First Federal Plaza, Rochester, New York;APL Development Group, I.P. Sharp Associates Ltd., 145 King Street West, Suite 1400, Toronto, Ontario, Canada, MSH 1J8

  • Venue:
  • APL '81 Proceedings of the international conference on APL
  • Year:
  • 1981

Quantified Score

Hi-index 0.00

Visualization

Abstract

Regular expressions are a powerful notation for expressing text patterns. This paper discusses classical regular expressions and their extension into the domain of APL. These extensions are manifest in terms of locator templates, which describe patterns to be searched for, and action templates, which specify an action to be performed when a match is encountered. An algorithm for implementing these concepts is briefly discussed. The algorithm compiles a template into code which is then interpreted in the context of a specific text vector to be searched. Numerous examples are espoused to demonstrate the utility of pattern matching over a wide range of problems.