~washort/pymeta/trunk

« back to all changes in this revision

Viewing changes to pymeta/boot.py

  • Committer: Allen Short
  • Date: 2010-05-13 14:37:58 UTC
  • Revision ID: washort@allen-shorts-macbook-pro.local-20100513143758-33o83wm5staezyyv
Make error reporting less silly.

Avoid double-repr on tokens in expected records; report early termination
of parses using the last error value returned; clean up formatError
output.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
        except EOFError:
37
37
            pass
38
38
        else:
39
 
            x = ''.join(self.input.data[self.input.position:])
40
 
            raise ParseError(self.input.position,
41
 
                             [("leftover", x)])
 
39
            raise err
42
40
        return res
43
41
 
44
42