parse almost done!

lots of algorithmic work to try and get the parser finished. it's very
close, just needs a couple minor tweaks.