author | blanchet |
Wed, 12 Feb 2014 08:35:56 +0100 | |
changeset 55399 | 5c8e91f884af |
parent 54705 | 0dff3326d12a |
child 55742 | a989bdaf8121 |
permissions | -rw-r--r-- |
48985 | 1 |
(* Title: Doc/antiquote_setup.ML |
21375 | 2 |
Author: Makarius |
3 |
||
26742 | 4 |
Auxiliary antiquotations for the Isabelle manuals. |
21375 | 5 |
*) |
6 |
||
43564
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
7 |
signature ANTIQUOTE_SETUP = |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
8 |
sig |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
9 |
val setup: theory -> theory |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
10 |
end; |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
11 |
|
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
12 |
structure Antiquote_Setup: ANTIQUOTE_SETUP = |
26742 | 13 |
struct |
21375 | 14 |
|
26742 | 15 |
(* misc utils *) |
16 |
||
29736
ec3fc818b82e
clean_string/clean_name: proper treatment of \<dash>;
wenzelm
parents:
29726
diff
changeset
|
17 |
fun translate f = Symbol.explode #> map f #> implode; |
ec3fc818b82e
clean_string/clean_name: proper treatment of \<dash>;
wenzelm
parents:
29726
diff
changeset
|
18 |
|
ec3fc818b82e
clean_string/clean_name: proper treatment of \<dash>;
wenzelm
parents:
29726
diff
changeset
|
19 |
val clean_string = translate |
26853
52cb0e965041
clean_string: map "_" to "\\_" (best used with underscore.sty);
wenzelm
parents:
26843
diff
changeset
|
20 |
(fn "_" => "\\_" |
30120
aaa4667285c8
uniform treatment of ML indexing, using general \indexdef macro for formal Isabelle/Isar entities;
wenzelm
parents:
29736
diff
changeset
|
21 |
| "#" => "\\#" |
52408 | 22 |
| "$" => "\\$" |
23 |
| "%" => "\\%" |
|
26897 | 24 |
| "<" => "$<$" |
26768 | 25 |
| ">" => "$>$" |
26 |
| "{" => "\\{" |
|
30120
aaa4667285c8
uniform treatment of ML indexing, using general \indexdef macro for formal Isabelle/Isar entities;
wenzelm
parents:
29736
diff
changeset
|
27 |
| "|" => "$\\mid$" |
26768 | 28 |
| "}" => "\\}" |
42666 | 29 |
| "\<hyphen>" => "-" |
26768 | 30 |
| c => c); |
26751 | 31 |
|
31546 | 32 |
fun clean_name "\<dots>" = "dots" |
26897 | 33 |
| clean_name ".." = "ddot" |
34 |
| clean_name "." = "dot" |
|
26910 | 35 |
| clean_name "_" = "underscore" |
26897 | 36 |
| clean_name "{" = "braceleft" |
37 |
| clean_name "}" = "braceright" |
|
42666 | 38 |
| clean_name s = s |> translate (fn "_" => "-" | "\<hyphen>" => "-" | c => c); |
26897 | 39 |
|
26742 | 40 |
|
41 |
(* verbatim text *) |
|
42 |
||
43 |
val verbatim = space_implode "\\verb,|," o map (enclose "\\verb|" "|") o space_explode "|"; |
|
44 |
||
43564
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
45 |
val verbatim_setup = |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
46 |
Thy_Output.antiquotation @{binding verbatim} (Scan.lift Args.name) |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
47 |
(K (split_lines #> map verbatim #> space_implode "\\isasep\\isanewline%\n")); |
26742 | 48 |
|
49 |
||
50 |
(* ML text *) |
|
51 |
||
52 |
local |
|
53 |
||
21375 | 54 |
fun ml_val (txt1, "") = "fn _ => (" ^ txt1 ^ ");" |
39858
5be7a57c3b4e
more robust treatment of symbolic indentifiers (which may contain colons);
wenzelm
parents:
39829
diff
changeset
|
55 |
| ml_val (txt1, txt2) = "fn _ => (" ^ txt1 ^ " : " ^ txt2 ^ ");"; |
21375 | 56 |
|
46261 | 57 |
fun ml_op (txt1, "") = "fn _ => (op " ^ txt1 ^ ");" |
58 |
| ml_op (txt1, txt2) = "fn _ => (op " ^ txt1 ^ " : " ^ txt2 ^ ");"; |
|
59 |
||
21375 | 60 |
fun ml_type (txt1, "") = "val _ = NONE : (" ^ txt1 ^ ") option;" |
61 |
| ml_type (txt1, txt2) = "val _ = [NONE : (" ^ txt1 ^ ") option, NONE : (" ^ txt2 ^ ") option];"; |
|
22289 | 62 |
|
39858
5be7a57c3b4e
more robust treatment of symbolic indentifiers (which may contain colons);
wenzelm
parents:
39829
diff
changeset
|
63 |
fun ml_exn (txt1, "") = "fn _ => (" ^ txt1 ^ " : exn);" |
5be7a57c3b4e
more robust treatment of symbolic indentifiers (which may contain colons);
wenzelm
parents:
39829
diff
changeset
|
64 |
| ml_exn (txt1, txt2) = "fn _ => (" ^ txt1 ^ " : " ^ txt2 ^ " -> exn);"; |
22289 | 65 |
|
30394 | 66 |
fun ml_structure (txt, _) = "functor XXX() = struct structure XX = " ^ txt ^ " end;"; |
21375 | 67 |
|
36163
823c9400eb62
proper checking of ML functors (in Poly/ML 5.2 or later);
wenzelm
parents:
31546
diff
changeset
|
68 |
fun ml_functor (txt, _) = "ML_Env.check_functor " ^ ML_Syntax.print_string txt; |
21375 | 69 |
|
39869
c269f6bd0a1f
more robust index_ML antiquotations: guess name from text (affects infixes and type constructors in particular);
wenzelm
parents:
39858
diff
changeset
|
70 |
val is_name = ML_Lex.kind_of #> (fn kind => kind = ML_Lex.Ident orelse kind = ML_Lex.LongIdent); |
c269f6bd0a1f
more robust index_ML antiquotations: guess name from text (affects infixes and type constructors in particular);
wenzelm
parents:
39858
diff
changeset
|
71 |
|
c269f6bd0a1f
more robust index_ML antiquotations: guess name from text (affects infixes and type constructors in particular);
wenzelm
parents:
39858
diff
changeset
|
72 |
fun ml_name txt = |
c269f6bd0a1f
more robust index_ML antiquotations: guess name from text (affects infixes and type constructors in particular);
wenzelm
parents:
39858
diff
changeset
|
73 |
(case filter is_name (ML_Lex.tokenize txt) of |
c269f6bd0a1f
more robust index_ML antiquotations: guess name from text (affects infixes and type constructors in particular);
wenzelm
parents:
39858
diff
changeset
|
74 |
toks as [_] => ML_Lex.flatten toks |
c269f6bd0a1f
more robust index_ML antiquotations: guess name from text (affects infixes and type constructors in particular);
wenzelm
parents:
39858
diff
changeset
|
75 |
| _ => error ("Single ML name expected in input: " ^ quote txt)); |
c269f6bd0a1f
more robust index_ML antiquotations: guess name from text (affects infixes and type constructors in particular);
wenzelm
parents:
39858
diff
changeset
|
76 |
|
37216
3165bc303f66
modernized some structure names, keeping a few legacy aliases;
wenzelm
parents:
37198
diff
changeset
|
77 |
fun index_ml name kind ml = Thy_Output.antiquotation name |
30394 | 78 |
(Scan.lift (Args.name -- Scan.optional (Args.colon |-- Args.name) "")) |
79 |
(fn {context = ctxt, ...} => fn (txt1, txt2) => |
|
80 |
let |
|
81 |
val txt = |
|
82 |
if txt2 = "" then txt1 |
|
83 |
else if kind = "type" then txt1 ^ " = " ^ txt2 |
|
84 |
else if kind = "exception" then txt1 ^ " of " ^ txt2 |
|
50239 | 85 |
else if Symbol_Pos.is_identifier (Long_Name.base_name (ml_name txt1)) |
42290
b1f544c84040
discontinued special treatment of structure Lexicon;
wenzelm
parents:
40801
diff
changeset
|
86 |
then txt1 ^ ": " ^ txt2 |
39858
5be7a57c3b4e
more robust treatment of symbolic indentifiers (which may contain colons);
wenzelm
parents:
39829
diff
changeset
|
87 |
else txt1 ^ " : " ^ txt2; |
30394 | 88 |
val txt' = if kind = "" then txt else kind ^ " " ^ txt; |
37198
3af985b10550
replaced ML_Lex.read_antiq by more concise ML_Lex.read, which includes full read/report with explicit position information;
wenzelm
parents:
36973
diff
changeset
|
89 |
val _ = ML_Context.eval_text_in (SOME ctxt) false Position.none (ml (txt1, txt2)); (* ML_Lex.read (!?) *) |
30394 | 90 |
val kind' = if kind = "" then "ML" else "ML " ^ kind; |
91 |
in |
|
39869
c269f6bd0a1f
more robust index_ML antiquotations: guess name from text (affects infixes and type constructors in particular);
wenzelm
parents:
39858
diff
changeset
|
92 |
"\\indexdef{}{" ^ kind' ^ "}{" ^ clean_string (ml_name txt1) ^ "}" ^ |
30394 | 93 |
(txt' |
38767
d8da44a8dd25
proper context for various Thy_Output options, via official configuration options in ML and Isar;
wenzelm
parents:
37982
diff
changeset
|
94 |
|> (if Config.get ctxt Thy_Output.quotes then quote else I) |
d8da44a8dd25
proper context for various Thy_Output options, via official configuration options in ML and Isar;
wenzelm
parents:
37982
diff
changeset
|
95 |
|> (if Config.get ctxt Thy_Output.display then enclose "\\begin{verbatim}\n" "\n\\end{verbatim}" |
30394 | 96 |
else split_lines #> map verbatim #> space_implode "\\isasep\\isanewline%\n")) |
97 |
end); |
|
26742 | 98 |
|
99 |
in |
|
21375 | 100 |
|
43564
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
101 |
val index_ml_setup = |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
102 |
index_ml @{binding index_ML} "" ml_val #> |
46261 | 103 |
index_ml @{binding index_ML_op} "infix" ml_op #> |
43564
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
104 |
index_ml @{binding index_ML_type} "type" ml_type #> |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
105 |
index_ml @{binding index_ML_exn} "exception" ml_exn #> |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
106 |
index_ml @{binding index_ML_structure} "structure" ml_structure #> |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
107 |
index_ml @{binding index_ML_functor} "functor" ml_functor; |
21375 | 108 |
|
26742 | 109 |
end; |
21375 | 110 |
|
23846 | 111 |
|
30394 | 112 |
(* named theorems *) |
23846 | 113 |
|
43564
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
114 |
val named_thms_setup = |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
115 |
Thy_Output.antiquotation @{binding named_thms} |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
116 |
(Scan.repeat (Attrib.thm -- Scan.lift (Args.parens Args.name))) |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
117 |
(fn {context = ctxt, ...} => |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
118 |
map (apfst (Thy_Output.pretty_thm ctxt)) |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
119 |
#> (if Config.get ctxt Thy_Output.quotes then map (apfst Pretty.quote) else I) |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
120 |
#> (if Config.get ctxt Thy_Output.display |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
121 |
then |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
122 |
map (fn (p, name) => |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
123 |
Output.output (Pretty.string_of (Pretty.indent (Config.get ctxt Thy_Output.indent) p)) ^ |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
124 |
"\\rulename{" ^ Output.output (Pretty.str_of (Thy_Output.pretty_text ctxt name)) ^ "}") |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
125 |
#> space_implode "\\par\\smallskip%\n" |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
126 |
#> enclose "\\begin{isabelle}%\n" "%\n\\end{isabelle}" |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
127 |
else |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
128 |
map (fn (p, name) => |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
129 |
Output.output (Pretty.str_of p) ^ |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
130 |
"\\rulename{" ^ Output.output (Pretty.str_of (Thy_Output.pretty_text ctxt name)) ^ "}") |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
131 |
#> space_implode "\\par\\smallskip%\n" |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
132 |
#> enclose "\\isa{" "}")); |
26742 | 133 |
|
134 |
||
30394 | 135 |
(* theory file *) |
26742 | 136 |
|
43564
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
137 |
val thy_file_setup = |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
138 |
Thy_Output.antiquotation @{binding thy_file} (Scan.lift Args.name) |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
139 |
(fn {context = ctxt, ...} => |
48899 | 140 |
fn name => (Thy_Load.check_thy Path.current name; Thy_Output.output ctxt [Pretty.str name])); |
26742 | 141 |
|
26751 | 142 |
|
30394 | 143 |
(* Isabelle/Isar entities (with index) *) |
26751 | 144 |
|
145 |
local |
|
146 |
||
26894 | 147 |
fun no_check _ _ = true; |
148 |
||
53061 | 149 |
fun command_check (name, pos) = |
150 |
is_some (Keyword.command_keyword name) andalso |
|
151 |
let |
|
152 |
val markup = |
|
153 |
Outer_Syntax.scan Position.none name |
|
154 |
|> maps (Outer_Syntax.command_reports (#2 (Outer_Syntax.get_syntax ()))) |
|
155 |
|> map (snd o fst); |
|
156 |
val _ = List.app (Position.report pos) markup; |
|
157 |
in true end; |
|
158 |
||
53044 | 159 |
fun thy_check check ctxt = can (check (Proof_Context.theory_of ctxt)); |
26894 | 160 |
|
53044 | 161 |
fun check_tool (name, pos) = |
162 |
let |
|
163 |
fun tool dir = |
|
164 |
let val path = Path.append dir (Path.basic name) |
|
165 |
in if File.exists path then SOME path else NONE end; |
|
166 |
in |
|
53045 | 167 |
(case get_first tool (Path.split (getenv "ISABELLE_TOOLS")) of |
53044 | 168 |
NONE => false |
169 |
| SOME path => (Position.report pos (Markup.path (Path.implode path)); true)) |
|
170 |
end; |
|
28237 | 171 |
|
26751 | 172 |
val arg = enclose "{" "}" o clean_string; |
173 |
||
30394 | 174 |
fun entity check markup kind index = |
37216
3165bc303f66
modernized some structure names, keeping a few legacy aliases;
wenzelm
parents:
37198
diff
changeset
|
175 |
Thy_Output.antiquotation |
43564
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
176 |
(Binding.name (translate (fn " " => "_" | c => c) kind ^ |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
177 |
(case index of NONE => "" | SOME true => "_def" | SOME false => "_ref"))) |
53044 | 178 |
(Scan.lift (Scan.optional (Args.parens Args.name) "" -- Parse.position Args.name)) |
179 |
(fn {context = ctxt, ...} => fn (logic, (name, pos)) => |
|
30394 | 180 |
let |
181 |
val hyper_name = |
|
182 |
"{" ^ Long_Name.append kind (Long_Name.append logic (clean_name name)) ^ "}"; |
|
183 |
val hyper = |
|
184 |
enclose ("\\hyperlink" ^ hyper_name ^ "{") "}" #> |
|
185 |
index = SOME true ? enclose ("\\hypertarget" ^ hyper_name ^ "{") "}"; |
|
186 |
val idx = |
|
187 |
(case index of |
|
188 |
NONE => "" |
|
189 |
| SOME is_def => |
|
190 |
"\\index" ^ (if is_def then "def" else "ref") ^ arg logic ^ arg kind ^ arg name); |
|
191 |
in |
|
53044 | 192 |
if check ctxt (name, pos) then |
30394 | 193 |
idx ^ |
194 |
(Output.output name |
|
195 |
|> (if markup = "" then I else enclose ("\\" ^ markup ^ "{") "}") |
|
38767
d8da44a8dd25
proper context for various Thy_Output options, via official configuration options in ML and Isar;
wenzelm
parents:
37982
diff
changeset
|
196 |
|> (if Config.get ctxt Thy_Output.quotes then quote else I) |
d8da44a8dd25
proper context for various Thy_Output options, via official configuration options in ML and Isar;
wenzelm
parents:
37982
diff
changeset
|
197 |
|> (if Config.get ctxt Thy_Output.display |
d8da44a8dd25
proper context for various Thy_Output options, via official configuration options in ML and Isar;
wenzelm
parents:
37982
diff
changeset
|
198 |
then enclose "\\begin{isabelle}%\n" "%\n\\end{isabelle}" |
30394 | 199 |
else hyper o enclose "\\mbox{\\isa{" "}}")) |
53044 | 200 |
else error ("Bad " ^ kind ^ " " ^ quote name ^ Position.here pos) |
30394 | 201 |
end); |
26897 | 202 |
|
26894 | 203 |
fun entity_antiqs check markup kind = |
43564
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
204 |
entity check markup kind NONE #> |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
205 |
entity check markup kind (SOME true) #> |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
206 |
entity check markup kind (SOME false); |
26751 | 207 |
|
208 |
in |
|
209 |
||
43564
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
210 |
val entity_setup = |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
211 |
entity_antiqs no_check "" "syntax" #> |
53061 | 212 |
entity_antiqs (K command_check) "isacommand" "command" #> |
53044 | 213 |
entity_antiqs (K (Keyword.is_keyword o #1)) "isakeyword" "keyword" #> |
214 |
entity_antiqs (K (Keyword.is_keyword o #1)) "isakeyword" "element" #> |
|
215 |
entity_antiqs (thy_check Method.check) "" "method" #> |
|
216 |
entity_antiqs (thy_check Attrib.check) "" "attribute" #> |
|
43564
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
217 |
entity_antiqs no_check "" "fact" #> |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
218 |
entity_antiqs no_check "" "variable" #> |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
219 |
entity_antiqs no_check "" "case" #> |
53044 | 220 |
entity_antiqs (thy_check Thy_Output.check_command) "" "antiquotation" #> |
221 |
entity_antiqs (thy_check Thy_Output.check_option) "" "antiquotation option" #> |
|
48554
011cbb395d46
no_check for @{setting} antiquotations -- empty values are treated as undefined on Cygwin;
wenzelm
parents:
47825
diff
changeset
|
222 |
entity_antiqs no_check "isatt" "setting" #> |
48578 | 223 |
entity_antiqs no_check "isatt" "system option" #> |
43564
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
224 |
entity_antiqs no_check "" "inference" #> |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
225 |
entity_antiqs no_check "isatt" "executable" #> |
48602 | 226 |
entity_antiqs (K check_tool) "isatool" "tool" #> |
53044 | 227 |
entity_antiqs (thy_check ML_Context.check_antiq) "" Markup.ML_antiquotationN; |
26751 | 228 |
|
26742 | 229 |
end; |
26751 | 230 |
|
43564
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
231 |
|
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
232 |
(* theory setup *) |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
233 |
|
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
234 |
val setup = |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
235 |
verbatim_setup #> |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
236 |
index_ml_setup #> |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
237 |
named_thms_setup #> |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
238 |
thy_file_setup #> |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
239 |
entity_setup; |
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
43563
diff
changeset
|
240 |
|
26751 | 241 |
end; |