18 and "typedecl" "type_synonym" "nonterminal" "judgment" |
18 and "typedecl" "type_synonym" "nonterminal" "judgment" |
19 "consts" "syntax" "no_syntax" "translations" "no_translations" |
19 "consts" "syntax" "no_syntax" "translations" "no_translations" |
20 "definition" "abbreviation" "type_notation" "no_type_notation" "notation" |
20 "definition" "abbreviation" "type_notation" "no_type_notation" "notation" |
21 "no_notation" "axiomatization" "alias" "type_alias" "lemmas" "declare" |
21 "no_notation" "axiomatization" "alias" "type_alias" "lemmas" "declare" |
22 "hide_class" "hide_type" "hide_const" "hide_fact" :: thy_decl |
22 "hide_class" "hide_type" "hide_const" "hide_fact" :: thy_decl |
23 and "external_file" :: thy_load |
23 and "external_file" "bibtex_file" :: thy_load |
24 and "ML_file" "ML_file_debug" "ML_file_no_debug" :: thy_load % "ML" |
24 and "ML_file" "ML_file_debug" "ML_file_no_debug" :: thy_load % "ML" |
25 and "SML_file" "SML_file_debug" "SML_file_no_debug" :: thy_load % "ML" |
25 and "SML_file" "SML_file_debug" "SML_file_no_debug" :: thy_load % "ML" |
26 and "SML_import" "SML_export" :: thy_decl % "ML" |
26 and "SML_import" "SML_export" :: thy_decl % "ML" |
27 and "ML_prf" :: prf_decl % "proof" (* FIXME % "ML" ?? *) |
27 and "ML_prf" :: prf_decl % "proof" (* FIXME % "ML" ?? *) |
28 and "ML_val" "ML_command" :: diag % "ML" |
28 and "ML_val" "ML_command" :: diag % "ML" |
105 and "realizability" = "" |
105 and "realizability" = "" |
106 begin |
106 begin |
107 |
107 |
108 section \<open>Isar commands\<close> |
108 section \<open>Isar commands\<close> |
109 |
109 |
110 subsection \<open>External file dependencies\<close> |
110 subsection \<open>Other files\<close> |
111 |
111 |
112 ML \<open> |
112 ML \<open> |
113 Outer_Syntax.command \<^command_keyword>\<open>external_file\<close> "formal dependency on external file" |
113 local |
114 (Parse.position Parse.path >> (fn (s, pos) => Toplevel.keep (fn st => |
114 fun check_path ctxt (s, pos) = |
115 let |
115 let |
116 val ctxt = Toplevel.context_of st; |
116 val _ = Context_Position.report ctxt pos Markup.language_path; |
117 val _ = Context_Position.report ctxt pos Markup.language_path; |
117 val path = Path.explode s; |
118 val path = Path.explode s; |
118 val _ = Context_Position.report ctxt pos (Markup.path (Path.smart_implode path)); |
119 val _ = Context_Position.report ctxt pos (Markup.path (Path.smart_implode path)); |
119 in () end; |
120 in () end))); |
120 |
121 \<close> |
121 val _ = |
|
122 Outer_Syntax.command \<^command_keyword>\<open>external_file\<close> "formal dependency on external file" |
|
123 (Parse.position Parse.path >> (fn path => Toplevel.keep (fn st => |
|
124 check_path (Toplevel.context_of st) path))); |
|
125 |
|
126 val _ = |
|
127 Outer_Syntax.command \<^command_keyword>\<open>bibtex_file\<close> "check bibtex database file in Prover IDE" |
|
128 (Scan.ahead Parse.not_eof -- Parse.position Parse.path >> (fn (tok, path) => |
|
129 Toplevel.keep (fn st => |
|
130 let |
|
131 val ctxt = Toplevel.context_of st; |
|
132 val _ = check_path ctxt path; |
|
133 val _ = |
|
134 (case Token.get_files tok of |
|
135 [Exn.Res {lines, pos, ...}] => Bibtex.check_database_output pos (cat_lines lines) |
|
136 | _ => ()); |
|
137 in () end))); |
|
138 in end\<close> |
122 |
139 |
123 |
140 |
124 subsection \<open>Embedded ML text\<close> |
141 subsection \<open>Embedded ML text\<close> |
125 |
142 |
126 ML \<open> |
143 ML \<open> |