#1 Handles parse errors ungracefully

open
nobody
None
5
2002-03-22
2002-03-22
Darren Platt
No

Running pystat over a large body of code hit a multi
line parse error - I think the tool should have
reported and continued,

Darren.

timeless 10:24 ~/tmp/Pythius-1.3 469 % /tools/Python-
2.0/bin/pystat SRextend_yj.py
Found 1 file.
Needed 0.950 secs.
Traceback (most recent call last):
File "/tools/Python-2.0/bin/pystat", line 3, in ?
run()
File "/tools/python/lib/python2.0/site-
packages/pythius/scripts/pystat.py", line 237, in run
util.runMain(main)
File "/tools/python/lib/python2.0/site-
packages/pythius/util.py", line 80, in runMain
mainloop()
File "/tools/python/lib/python2.0/site-
packages/pythius/scripts/pystat.py", line 220, in main
analyze(filename, total)
File "/tools/python/lib/python2.0/site-
packages/pythius/scripts/pystat.py", line 105, in
analyze
parser.parse(source)
File "/tools/python/lib/python2.0/site-
packages/pythius/grok.py", line 103, in parse
raise ParseError("ERROR %s\n%s" % (
pythius.grok.ParseError: ERROR EOF in multi-line
statement

Discussion