better error handling

Parser now records errors and keeps
going. You can set debug => true
to get output about all the errors
encountered.