Lex

From Computer History Wiki
Revision as of 20:32, 3 May 2022 by Jnc (talk | contribs) (Stubby, but a start)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.

See also

External links

  • lex - V7 manual
  • lex - V7 source