Regular Expression Lexer, Parser, and Minimizer