flex

Fast Lexical Analyzer Generator

FLEX is a tool for generating scanners: programs that recognize lexical patterns in text.