54 val command_files: string -> Path.T -> Path.T list |
53 val command_files: string -> Path.T -> Path.T list |
55 val command_tags: string -> string list |
54 val command_tags: string -> string list |
56 val dest: unit -> string list * string list |
55 val dest: unit -> string list * string list |
57 val define: string * T option -> unit |
56 val define: string * T option -> unit |
58 val is_diag: string -> bool |
57 val is_diag: string -> bool |
59 val is_control: string -> bool |
|
60 val is_regular: string -> bool |
|
61 val is_heading: string -> bool |
58 val is_heading: string -> bool |
62 val is_theory_begin: string -> bool |
59 val is_theory_begin: string -> bool |
63 val is_theory_load: string -> bool |
60 val is_theory_load: string -> bool |
64 val is_theory: string -> bool |
61 val is_theory: string -> bool |
65 val is_theory_body: string -> bool |
62 val is_theory_body: string -> bool |
90 Keyword {kind = kind, files = files @ fs, tags = tags}; |
87 Keyword {kind = kind, files = files @ fs, tags = tags}; |
91 |
88 |
92 |
89 |
93 (* kinds *) |
90 (* kinds *) |
94 |
91 |
95 val control = kind "control"; |
|
96 val diag = kind "diag"; |
92 val diag = kind "diag"; |
97 val thy_begin = kind "thy_begin"; |
93 val thy_begin = kind "thy_begin"; |
98 val thy_end = kind "thy_end"; |
94 val thy_end = kind "thy_end"; |
99 val thy_heading1 = kind "thy_heading1"; |
95 val thy_heading1 = kind "thy_heading1"; |
100 val thy_heading2 = kind "thy_heading2"; |
96 val thy_heading2 = kind "thy_heading2"; |
122 val prf_asm_goal = kind "prf_asm_goal"; |
118 val prf_asm_goal = kind "prf_asm_goal"; |
123 val prf_asm_goal_script = kind "prf_asm_goal_script"; |
119 val prf_asm_goal_script = kind "prf_asm_goal_script"; |
124 val prf_script = kind "prf_script"; |
120 val prf_script = kind "prf_script"; |
125 |
121 |
126 val kinds = |
122 val kinds = |
127 [control, diag, thy_begin, thy_end, thy_heading1, thy_heading2, thy_heading3, thy_heading4, |
123 [diag, thy_begin, thy_end, thy_heading1, thy_heading2, thy_heading3, thy_heading4, |
128 thy_load, thy_decl, thy_decl_block, thy_goal, qed, qed_script, qed_block, qed_global, |
124 thy_load, thy_decl, thy_decl_block, thy_goal, qed, qed_script, qed_block, qed_global, |
129 prf_heading2, prf_heading3, prf_heading4, prf_goal, prf_block, prf_open, |
125 prf_heading2, prf_heading3, prf_heading4, prf_goal, prf_block, prf_open, |
130 prf_close, prf_chain, prf_decl, prf_asm, prf_asm_goal, prf_asm_goal_script, prf_script]; |
126 prf_close, prf_chain, prf_decl, prf_asm, prf_asm_goal, prf_asm_goal_script, prf_script]; |
131 |
127 |
132 |
128 |
236 NONE => false |
232 NONE => false |
237 | SOME k => Symtab.defined tab (kind_of k)) |
233 | SOME k => Symtab.defined tab (kind_of k)) |
238 end; |
234 end; |
239 |
235 |
240 val is_diag = command_category [diag]; |
236 val is_diag = command_category [diag]; |
241 val is_control = command_category [control]; |
|
242 val is_regular = not o command_category [diag, control]; |
|
243 |
237 |
244 val is_heading = |
238 val is_heading = |
245 command_category [thy_heading1, thy_heading2, thy_heading3, thy_heading4, |
239 command_category [thy_heading1, thy_heading2, thy_heading3, thy_heading4, |
246 prf_heading2, prf_heading3, prf_heading4]; |
240 prf_heading2, prf_heading3, prf_heading4]; |
247 |
241 |