Rewrite parser to remove tail calls

Rust doesn't do tail call elimination.  Bah.