The size of the parsed syntax list could overflow. Allowing it to be
bigger than the compiled program makes no sense, so use the same size
limit when parsing as when compiling.
The syntax tree for long chains of Cat nodes leaned leftwards, which
made the compile() step potentially run out of stack. If we build the
Cat tree leaning right, we can use an iterative loop instead of
recursion.
Handle empty regular expressions in RegExp compiler asserts.
Also turn them into /(?:)/ on the JS side, so they can be printed
back as valid JS syntax where // is a comment, not a regular expression.
The 'save' variable is *always* set before it's accessed, but the logic
is too difficult for gcc to trace.
node->m is always > 0, but the compiler has no way of knowing.
A regular expression with lots of nested repetition can lead to
integer overflow when calculating the size of the program.
Check max program size when counting the number of instructions required
for a loop, so we can bail before integer overflow can happen.