Lex
Lex is a computer program that generates lexical analyzers (“scanners” or “lexers”). It is commonly used with the yacc parser generator and is the standard lexical analyzer generator on many Unix and Unix-like systems.
Lex reads an input stream specifying the lexical analyzer and writes source code which implements the lexical analyzer in the C programming language.
...