Fix parse2 and add some nice debug wrappers.

The debug wrappers are useful for seeing what is happening at a per-rule
level as the input is parsed. This could be extended to include literal
and regular expression parsing as well.

I'm realizing that users may not like having to use the restricted
regular expressions that Lua provides by default. I'm not yet sure what
to do about that in the long run, but for now my main goal is to arrive
at a cleaner, more feature-complete open compiler than what I achieved
with project water. That goal can be reached with restricted regular
expressions in place. The next goal, to be a practical replacement of
other language tools, is the right time to think carefully about that
aspect of the user experience.