Builds the state machine of a regex.
The regex's explanation from explainRegex.
The machine's outermost part. Non-capturing groups without flags leave no trace.
Builds the state machine of a regex.