now allowing numeric identifiers to be used in 'file' annotations;
more informative failure of missed cases by raising ANNOT_STRUCTURE instead of the default Match;
--- a/src/HOL/TPTP/TPTP_Parser/tptp_proof.ML Tue Sep 03 21:46:40 2013 +0100
+++ b/src/HOL/TPTP/TPTP_Parser/tptp_proof.ML Tue Sep 03 21:46:41 2013 +0100
@@ -49,6 +49,8 @@
open TPTP_Syntax
+exception ANNOT_STRUCTURE of general_term
+
(*Extract name of inference rule, and the inferences it relies on*)
(*This is tuned to work with LEO-II, and is brittle wrt upstream
changes of the proof protocol.*)
@@ -119,6 +121,15 @@
General_Data (Atomic_Word defname)])), _) =
(SOME (File (filename, defname)))
+ | analyse_annot
+ (General_Data
+ (Application
+ ("file",
+ [General_Data (Atomic_Word filename),
+ General_Data (Number (Int_num, defname))])), _) =
+ (SOME (File (filename, defname)))
+
+ | analyse_annot (other, _) = raise (ANNOT_STRUCTURE other)
in
case annot of
NONE => NONE