parsers are hard, regexes are sloppy.  let's see if i can do any better.