4 term -> prim modifier ?;
5 modifier -> "?" | "+" | "*" | "{" number "}" | "{" number "," number "}";
6 prim -> char | char_class | "(" regex ")";
7 char -> escaped_char=/\\./ | regular_char=/[^\\\r\n\t\s[(]/;
8 char_class -> "[" ( class_char ("-" class_char)? )* "]";
9 class_char -> escaped_class_char=/\\./ | regular_class_char=/[^\]\\]/;
12 whitespace -> /[\r\n\t\s]+/;
13 allow whitespace in regex, frag, term, prim;