Fixed bug and slightly improved error reporting
Generated new parser and added tests for error reporting
Added better error reporting for trailing input as well