|
@@ -25,7 +25,7 @@ def do_parse(inputfile, grammarfile):
|
|
|
new_grammar = False
|
|
|
else:
|
|
|
# Will be catched immediately
|
|
|
- raise Exception("Pickle is invalid!")
|
|
|
+ raise Exception()
|
|
|
except:
|
|
|
result = parser = Parser(Grammar(), hide_implicit = True).parse(read(grammarfile))
|
|
|
if result['status'] != Parser.Constants.Success:
|
|
@@ -46,9 +46,6 @@ def do_parse(inputfile, grammarfile):
|
|
|
|
|
|
picklefile = inputfile + ".pickle"
|
|
|
try:
|
|
|
- if new_grammar:
|
|
|
- # Stop anyway, as the grammar is new
|
|
|
- raise Exception()
|
|
|
if os.path.getmtime(picklefile) > os.path.getmtime(inputfile):
|
|
|
# Pickle is more recent than inputfile, so use it
|
|
|
result = pickle.load(open(picklefile, 'rb'))
|