Flex

Flex is a tool used to recognize language elements specified as regular expressions, generating lexical analyzers (a.k.a. “scanners” or “lexers”). This tool is frequently paired with Berkeley YACC.