Lex
From Computer History Wiki
lex is a program which generates a parser (in either C or Ratfor), given as input an array of regular expressions, and accompanying code sections. The generated parser will break an input stream into tokens (defined by the regular expressions), and as each is recognised, the matching code section in executed.
It was first written for UNIX Sixth Edition, and first distributed outside Bell Labs as part of Unix Seventh Edition; it later became a standard part of the UNIX tool suite in later versions.