| author | wenzelm | 
| Wed, 21 Dec 2022 14:00:00 +0100 | |
| changeset 76730 | 1b8dd8c0492f | 
| parent 76514 | 2615cf68f6f4 | 
| child 76955 | 3f25c28c4257 | 
| permissions | -rw-r--r-- | 
| 45670 | 1  | 
(* Title: Pure/PIDE/markup.ML  | 
| 23623 | 2  | 
Author: Makarius  | 
3  | 
||
| 56743 | 4  | 
Quasi-abstract markup elements.  | 
| 23623 | 5  | 
*)  | 
6  | 
||
7  | 
signature MARKUP =  | 
|
8  | 
sig  | 
|
| 28017 | 9  | 
type T = string * Properties.T  | 
| 
38474
 
e498dc2eb576
uniform Markup.empty/Markup.Empty in ML and Scala;
 
wenzelm 
parents: 
38429 
diff
changeset
 | 
10  | 
val empty: T  | 
| 
 
e498dc2eb576
uniform Markup.empty/Markup.Empty in ML and Scala;
 
wenzelm 
parents: 
38429 
diff
changeset
 | 
11  | 
val is_empty: T -> bool  | 
| 38229 | 12  | 
val properties: Properties.T -> T -> T  | 
| 68997 | 13  | 
val nameN: string val name: string -> T -> T  | 
14  | 
val xnameN: string val xname: string -> T -> T  | 
|
| 
38887
 
1261481ef5e5
Command.State: add reported positions to markup tree, according main message position or Markup.binding/entity/report occurrences in body;
 
wenzelm 
parents: 
38871 
diff
changeset
 | 
15  | 
val kindN: string  | 
| 60744 | 16  | 
val serialN: string  | 
17  | 
val serial_properties: int -> Properties.T  | 
|
| 
52854
 
92932931bd82
more general Output.result: allow to update arbitrary properties;
 
wenzelm 
parents: 
52800 
diff
changeset
 | 
18  | 
val instanceN: string  | 
| 
69889
 
be04e9a053a7
markup and document markers for some meta data from "Dublin Core Metadata Element Set";
 
wenzelm 
parents: 
69887 
diff
changeset
 | 
19  | 
val meta_titleN: string val meta_title: T  | 
| 
 
be04e9a053a7
markup and document markers for some meta data from "Dublin Core Metadata Element Set";
 
wenzelm 
parents: 
69887 
diff
changeset
 | 
20  | 
val meta_creatorN: string val meta_creator: T  | 
| 
 
be04e9a053a7
markup and document markers for some meta data from "Dublin Core Metadata Element Set";
 
wenzelm 
parents: 
69887 
diff
changeset
 | 
21  | 
val meta_contributorN: string val meta_contributor: T  | 
| 
 
be04e9a053a7
markup and document markers for some meta data from "Dublin Core Metadata Element Set";
 
wenzelm 
parents: 
69887 
diff
changeset
 | 
22  | 
val meta_dateN: string val meta_date: T  | 
| 
69962
 
82e945d472d5
documentation of document markers and re-interpreted command tags;
 
wenzelm 
parents: 
69916 
diff
changeset
 | 
23  | 
val meta_licenseN: string val meta_license: T  | 
| 
69889
 
be04e9a053a7
markup and document markers for some meta data from "Dublin Core Metadata Element Set";
 
wenzelm 
parents: 
69887 
diff
changeset
 | 
24  | 
val meta_descriptionN: string val meta_description: T  | 
| 
55828
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
25  | 
val languageN: string  | 
| 
55615
 
bf4bbe72f740
completion of keywords and symbols based on language context;
 
wenzelm 
parents: 
55613 
diff
changeset
 | 
26  | 
val symbolsN: string  | 
| 
55828
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
27  | 
val delimitedN: string  | 
| 
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
28  | 
val is_delimited: Properties.T -> bool  | 
| 
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
29  | 
  val language: {name: string, symbols: bool, antiquotes: bool, delimited: bool} -> T
 | 
| 
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
30  | 
  val language': {name: string, symbols: bool, antiquotes: bool} -> bool -> T
 | 
| 
62231
 
25f4a9cd8b68
tuned markup, e.g. relevant for Rendering.tooltip;
 
wenzelm 
parents: 
61864 
diff
changeset
 | 
31  | 
val language_Isar: bool -> T  | 
| 
55761
 
213b9811f59f
method language markup, e.g. relevant to prevent outer keyword completion;
 
wenzelm 
parents: 
55750 
diff
changeset
 | 
32  | 
val language_method: T  | 
| 56033 | 33  | 
val language_attribute: T  | 
| 
55828
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
34  | 
val language_sort: bool -> T  | 
| 
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
35  | 
val language_type: bool -> T  | 
| 
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
36  | 
val language_term: bool -> T  | 
| 
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
37  | 
val language_prop: bool -> T  | 
| 
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
38  | 
val language_ML: bool -> T  | 
| 
56278
 
2576d3a40ed6
separate tokenization and language context for SML: no symbols, no antiquotes;
 
wenzelm 
parents: 
56202 
diff
changeset
 | 
39  | 
val language_SML: bool -> T  | 
| 
61600
 
1ca11ddfcc70
clarified completion of explicit symbols (see also f6bd97a587b7, e0e4ac981cf1);
 
wenzelm 
parents: 
61598 
diff
changeset
 | 
40  | 
val language_document: bool -> T  | 
| 69887 | 41  | 
val language_document_marker: T  | 
| 
55653
 
528de9a20054
more markup -- complete symbols within antiquotation, notably with broken arguments;
 
wenzelm 
parents: 
55615 
diff
changeset
 | 
42  | 
val language_antiquotation: T  | 
| 
55828
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
43  | 
val language_text: bool -> T  | 
| 62520 | 44  | 
val language_verbatim: bool -> T  | 
| 67429 | 45  | 
val language_latex: bool -> T  | 
| 55613 | 46  | 
val language_rail: T  | 
| 72841 | 47  | 
val language_path: bool -> T  | 
| 72843 | 48  | 
val language_url: bool -> T  | 
| 62772 | 49  | 
val language_mixfix: T  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
50  | 
val bindingN: string val binding: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
51  | 
val entityN: string val entity: string -> string -> T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
52  | 
val defN: string  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
53  | 
val refN: string  | 
| 
55694
 
a1184dfb8e00
clarified semantic completion: retain kind.full_name as official item name for history;
 
wenzelm 
parents: 
55687 
diff
changeset
 | 
54  | 
val completionN: string val completion: T  | 
| 
55914
 
c5b752d549e3
clarified init_assignable: make double-sure that initial values are reset;
 
wenzelm 
parents: 
55837 
diff
changeset
 | 
55  | 
val no_completionN: string val no_completion: T  | 
| 69557 | 56  | 
val updateN: string val update: T  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
57  | 
val lineN: string  | 
| 
58978
 
e42da880c61e
more position information, e.g. relevant for errors in generated ML source;
 
wenzelm 
parents: 
58855 
diff
changeset
 | 
58  | 
val end_lineN: string  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
59  | 
val offsetN: string  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
60  | 
val end_offsetN: string  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
61  | 
val fileN: string  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
62  | 
val idN: string  | 
| 74182 | 63  | 
val positionN: string val position: T  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
64  | 
val position_properties: string list  | 
| 72708 | 65  | 
val position_property: Properties.entry -> bool  | 
| 74182 | 66  | 
val def_name: string -> string  | 
| 62806 | 67  | 
val expressionN: string val expression: string -> T  | 
| 
58545
 
30b75b7958d6
citation tooltip/hyperlink based on open buffers with .bib files;
 
wenzelm 
parents: 
58544 
diff
changeset
 | 
68  | 
val citationN: string val citation: string -> T  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
69  | 
val pathN: string val path: string -> T  | 
| 70016 | 70  | 
val export_pathN: string val export_path: string -> T  | 
| 
54702
 
3daeba5130f0
added document antiquotation @{url}, which produces formal markup for LaTeX and PIDE;
 
wenzelm 
parents: 
53378 
diff
changeset
 | 
71  | 
val urlN: string val url: string -> T  | 
| 
61660
 
78b371644654
added antiquotation @{doc}, e.g. useful for demonstration purposes;
 
wenzelm 
parents: 
61614 
diff
changeset
 | 
72  | 
val docN: string val doc: string -> T  | 
| 72763 | 73  | 
val toolN: string val tool: string -> T  | 
| 62788 | 74  | 
val markupN: string  | 
75  | 
val consistentN: string  | 
|
| 62789 | 76  | 
val unbreakableN: string  | 
| 62786 | 77  | 
val block_properties: string list  | 
| 62788 | 78  | 
val indentN: string  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
79  | 
val widthN: string  | 
| 61864 | 80  | 
val blockN: string val block: bool -> int -> T  | 
| 
61862
 
e2a9e46ac0fb
support pretty break indent, like underlying ML systems;
 
wenzelm 
parents: 
61660 
diff
changeset
 | 
81  | 
val breakN: string val break: int -> int -> T  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
82  | 
val fbreakN: string val fbreak: T  | 
| 
51570
 
3633828d80fc
basic support for Pretty.item, which is considered as logical markup and interpreted in Isabelle/Scala, but ignored elsewhere (TTY, latex etc.);
 
wenzelm 
parents: 
51228 
diff
changeset
 | 
83  | 
val itemN: string val item: T  | 
| 56548 | 84  | 
val wordsN: string val words: T  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
85  | 
val hiddenN: string val hidden: T  | 
| 
68298
 
2c3ce27cf4a8
markup for deleted fragments of token source (NB: quoted tokens transform "\123" implicitly);
 
wenzelm 
parents: 
68101 
diff
changeset
 | 
86  | 
val deleteN: string val delete: T  | 
| 74671 | 87  | 
val load_commandN: string  | 
| 71912 | 88  | 
val bash_functionN: string  | 
89  | 
val scala_functionN: string  | 
|
| 56465 | 90  | 
val system_optionN: string  | 
| 67219 | 91  | 
val sessionN: string  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
92  | 
val theoryN: string  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
93  | 
val classN: string  | 
| 74112 | 94  | 
val localeN: string  | 
| 
74261
 
d28a51dd9da6
export other entities, e.g. relevant for formal document output;
 
wenzelm 
parents: 
74182 
diff
changeset
 | 
95  | 
val bundleN: string  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
96  | 
val type_nameN: string  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
97  | 
val constantN: string  | 
| 74112 | 98  | 
val axiomN: string  | 
99  | 
val factN: string  | 
|
100  | 
val oracleN: string  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
101  | 
val fixedN: string val fixed: string -> T  | 
| 
53378
 
07990ba8c0ea
cases: more position information and PIDE markup;
 
wenzelm 
parents: 
53055 
diff
changeset
 | 
102  | 
val caseN: string val case_: string -> T  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
103  | 
val dynamic_factN: string val dynamic_fact: string -> T  | 
| 63337 | 104  | 
val literal_factN: string val literal_fact: string -> T  | 
| 74112 | 105  | 
val attributeN: string  | 
106  | 
val methodN: string  | 
|
| 
58048
 
aa6296d09e0e
more explicit Method.modifier with reported position;
 
wenzelm 
parents: 
57975 
diff
changeset
 | 
107  | 
val method_modifierN: string  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
108  | 
val tfreeN: string val tfree: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
109  | 
val tvarN: string val tvar: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
110  | 
val freeN: string val free: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
111  | 
val skolemN: string val skolem: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
112  | 
val boundN: string val bound: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
113  | 
val varN: string val var: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
114  | 
val numeralN: string val numeral: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
115  | 
val literalN: string val literal: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
116  | 
val delimiterN: string val delimiter: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
117  | 
val inner_stringN: string val inner_string: T  | 
| 55033 | 118  | 
val inner_cartoucheN: string val inner_cartouche: T  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
119  | 
val token_rangeN: string val token_range: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
120  | 
val sortingN: string val sorting: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
121  | 
val typingN: string val typing: T  | 
| 63347 | 122  | 
val class_parameterN: string val class_parameter: T  | 
| 55505 | 123  | 
val ML_keyword1N: string val ML_keyword1: T  | 
124  | 
val ML_keyword2N: string val ML_keyword2: T  | 
|
125  | 
val ML_keyword3N: string val ML_keyword3: T  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
126  | 
val ML_delimiterN: string val ML_delimiter: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
127  | 
val ML_tvarN: string val ML_tvar: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
128  | 
val ML_numeralN: string val ML_numeral: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
129  | 
val ML_charN: string val ML_char: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
130  | 
val ML_stringN: string val ML_string: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
131  | 
val ML_commentN: string val ML_comment: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
132  | 
val ML_defN: string  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
133  | 
val ML_openN: string  | 
| 55837 | 134  | 
val ML_structureN: string  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
135  | 
val ML_typingN: string val ML_typing: T  | 
| 60744 | 136  | 
val ML_breakpointN: string val ML_breakpoint: int -> T  | 
| 55526 | 137  | 
val antiquotedN: string val antiquoted: T  | 
138  | 
val antiquoteN: string val antiquote: T  | 
|
| 
69381
 
4c9b4e2c5460
more general command 'generate_file' for registered file types, notably Haskell;
 
wenzelm 
parents: 
69345 
diff
changeset
 | 
139  | 
val file_typeN: string  | 
| 
 
4c9b4e2c5460
more general command 'generate_file' for registered file types, notably Haskell;
 
wenzelm 
parents: 
69345 
diff
changeset
 | 
140  | 
val antiquotationN: string  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
141  | 
val ML_antiquotationN: string  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
142  | 
val document_antiquotationN: string  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
143  | 
val document_antiquotation_optionN: string  | 
| 
76514
 
2615cf68f6f4
ML support for the Prism.js syntax highlighter -- via Isabelle/Scala;
 
wenzelm 
parents: 
76394 
diff
changeset
 | 
144  | 
val prismjs_languageN: string  | 
| 
69965
 
da5e7278286b
more markup for various text kinds, notably for nested formal comments;
 
wenzelm 
parents: 
69962 
diff
changeset
 | 
145  | 
val raw_textN: string val raw_text: T  | 
| 
 
da5e7278286b
more markup for various text kinds, notably for nested formal comments;
 
wenzelm 
parents: 
69962 
diff
changeset
 | 
146  | 
val plain_textN: string val plain_text: T  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
147  | 
val paragraphN: string val paragraph: T  | 
| 
50545
 
00bdc48c5f71
explicit text_fold markup, which is used by default in Pretty.chunks/chunks2;
 
wenzelm 
parents: 
50543 
diff
changeset
 | 
148  | 
val text_foldN: string val text_fold: T  | 
| 70229 | 149  | 
val document_markerN: string val document_marker: T  | 
| 
70135
 
ad6d4a14adb5
report document tags as seen in the text (not the active tag of Thy_Output.present_thy);
 
wenzelm 
parents: 
70016 
diff
changeset
 | 
150  | 
val document_tagN: string val document_tag: string -> T  | 
| 
73780
 
466fae6bf22e
compose Latex text as XML, output exported YXML in Isabelle/Scala;
 
wenzelm 
parents: 
73419 
diff
changeset
 | 
151  | 
val document_latexN: string val document_latex: T  | 
| 
74784
 
d2522bb4db1b
symbolic latex_output via XML, interpreted in Isabelle/Scala;
 
wenzelm 
parents: 
74673 
diff
changeset
 | 
152  | 
val latex_outputN: string val latex_output: T  | 
| 74790 | 153  | 
val latex_macro0N: string val latex_macro0: string -> T  | 
154  | 
val latex_macroN: string val latex_macro: string -> T  | 
|
155  | 
val latex_environmentN: string val latex_environment: string -> T  | 
|
| 74823 | 156  | 
val latex_headingN: string val latex_heading: string -> T  | 
157  | 
val latex_bodyN: string val latex_body: string -> T  | 
|
| 74786 | 158  | 
val latex_index_itemN: string val latex_index_item: T  | 
159  | 
val latex_index_entryN: string val latex_index_entry: string -> T  | 
|
| 
74826
 
0e4d8aa61ad7
more symbolic latex_output via XML (using YXML within text);
 
wenzelm 
parents: 
74823 
diff
changeset
 | 
160  | 
val latex_delimN: string val latex_delim: string -> T  | 
| 
 
0e4d8aa61ad7
more symbolic latex_output via XML (using YXML within text);
 
wenzelm 
parents: 
74823 
diff
changeset
 | 
161  | 
val latex_tagN: string val latex_tag: string -> T  | 
| 
74836
 
a97ec0954c50
example: alternative document headings, based on more general document output markup;
 
wenzelm 
parents: 
74826 
diff
changeset
 | 
162  | 
val optional_argumentN: string val optional_argument: string -> T -> T  | 
| 61449 | 163  | 
val markdown_paragraphN: string val markdown_paragraph: T  | 
| 
67323
 
d02208cefbdb
PIDE markup for Markdown items (which may consist of multiple paragraphs or lists);
 
wenzelm 
parents: 
67322 
diff
changeset
 | 
164  | 
val markdown_itemN: string val markdown_item: T  | 
| 67336 | 165  | 
val markdown_bulletN: string val markdown_bullet: int -> T  | 
| 61449 | 166  | 
val markdown_listN: string val markdown_list: string -> T  | 
| 67336 | 167  | 
val itemizeN: string  | 
168  | 
val enumerateN: string  | 
|
169  | 
val descriptionN: string  | 
|
| 59795 | 170  | 
val inputN: string val input: bool -> Properties.T -> T  | 
| 59935 | 171  | 
val command_keywordN: string val command_keyword: T  | 
| 74673 | 172  | 
val command_spanN: string val command_span: string -> T  | 
| 66066 | 173  | 
val commandN: string val command_properties: T -> T  | 
174  | 
val keywordN: string val keyword_properties: T -> T  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
175  | 
val stringN: string val string: T  | 
| 59081 | 176  | 
val alt_stringN: string val alt_string: T  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
177  | 
val verbatimN: string val verbatim: T  | 
| 55033 | 178  | 
val cartoucheN: string val cartouche: T  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
179  | 
val commentN: string val comment: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
180  | 
val keyword1N: string val keyword1: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
181  | 
val keyword2N: string val keyword2: T  | 
| 55763 | 182  | 
val keyword3N: string val keyword3: T  | 
| 
55919
 
2eb8c13339a5
more explicit quasi_keyword markup, for Args.$$$ material, which is somewhere in between of outer and inner syntax;
 
wenzelm 
parents: 
55914 
diff
changeset
 | 
183  | 
val quasi_keywordN: string val quasi_keyword: T  | 
| 56202 | 184  | 
val improperN: string val improper: T  | 
185  | 
val operatorN: string val operator: T  | 
|
| 69320 | 186  | 
val comment1N: string val comment1: T  | 
187  | 
val comment2N: string val comment2: T  | 
|
188  | 
val comment3N: string val comment3: T  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
189  | 
val elapsedN: string  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
190  | 
val cpuN: string  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
191  | 
val gcN: string  | 
| 
51606
 
2843cc095a57
additional timing status for implicitly forked terminal proofs -- proper accounting for interactive Timing dockable etc.;
 
wenzelm 
parents: 
51570 
diff
changeset
 | 
192  | 
  val timing_properties: {elapsed: Time.time, cpu: Time.time, gc: Time.time} -> Properties.T
 | 
| 51228 | 193  | 
val parse_command_timing_properties:  | 
194  | 
    Properties.T -> ({file: string, offset: int, name: string} * Time.time) option
 | 
|
| 
51606
 
2843cc095a57
additional timing status for implicitly forked terminal proofs -- proper accounting for interactive Timing dockable etc.;
 
wenzelm 
parents: 
51570 
diff
changeset
 | 
195  | 
  val timingN: string val timing: {elapsed: Time.time, cpu: Time.time, gc: Time.time} -> T
 | 
| 
63474
 
f66e3c3b0fb1
semantic indentation for unstructured proof scripts;
 
wenzelm 
parents: 
63347 
diff
changeset
 | 
196  | 
val command_indentN: string val command_indent: int -> T  | 
| 50543 | 197  | 
val goalN: string val goal: T  | 
| 
50537
 
08ce81aeeacc
more subgoal markup information, which is potentially useful to manage proof state output;
 
wenzelm 
parents: 
50503 
diff
changeset
 | 
198  | 
val subgoalN: string val subgoal: string -> T  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
199  | 
val taskN: string  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
200  | 
val forkedN: string val forked: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
201  | 
val joinedN: string val joined: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
202  | 
val runningN: string val running: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
203  | 
val finishedN: string val finished: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
204  | 
val failedN: string val failed: T  | 
| 
68871
 
f5c76072db55
more explicit status for "canceled" command within theory node;
 
wenzelm 
parents: 
68822 
diff
changeset
 | 
205  | 
val canceledN: string val canceled: T  | 
| 68323 | 206  | 
val initializedN: string val initialized: T  | 
| 
68884
 
9b97d0b20d95
clarified quasi_consolidated state: ensure that exports are present for ok nodes;
 
wenzelm 
parents: 
68871 
diff
changeset
 | 
207  | 
val finalizedN: string val finalized: T  | 
| 
70780
 
034742453594
more robust: avoid update/interrupt of long-running print_consolidation;
 
wenzelm 
parents: 
70665 
diff
changeset
 | 
208  | 
val consolidatingN: string val consolidating: T  | 
| 
66379
 
6392766f3c25
maintain "consolidated" status of theory nodes, which means all evals are finished (but not necessarily prints nor imports);
 
wenzelm 
parents: 
66066 
diff
changeset
 | 
209  | 
val consolidatedN: string val consolidated: T  | 
| 
50914
 
fe4714886d92
identify future results more carefully, to avoid odd duplication of error messages, notably from forked goals;
 
wenzelm 
parents: 
50845 
diff
changeset
 | 
210  | 
val exec_idN: string  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
211  | 
val initN: string  | 
| 61209 | 212  | 
val statusN: string val status: T  | 
213  | 
val resultN: string val result: T  | 
|
214  | 
val writelnN: string val writeln: T  | 
|
215  | 
val stateN: string val state: T  | 
|
216  | 
val informationN: string val information: T  | 
|
217  | 
val tracingN: string val tracing: T  | 
|
218  | 
val warningN: string val warning: T  | 
|
219  | 
val legacyN: string val legacy: T  | 
|
220  | 
val errorN: string val error: T  | 
|
221  | 
val systemN: string val system: T  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
222  | 
val protocolN: string  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
223  | 
val reportN: string val report: T  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
224  | 
val no_reportN: string val no_report: T  | 
| 
64677
 
8dc24130e8fe
more uniform treatment of "bad" like other messages (with serial number);
 
wenzelm 
parents: 
63806 
diff
changeset
 | 
225  | 
val badN: string val bad: unit -> T  | 
| 
50500
 
c94bba7906d2
identify dialogs via official serial and maintain as result message;
 
wenzelm 
parents: 
50499 
diff
changeset
 | 
226  | 
val intensifyN: string val intensify: T  | 
| 73835 | 227  | 
val countN: string  | 
228  | 
val ML_profiling_entryN: string  | 
|
229  | 
  val ML_profiling_entry: {name: string, count: int} -> T
 | 
|
230  | 
val ML_profilingN: string  | 
|
231  | 
val ML_profiling: string -> T  | 
|
| 
50715
 
8cfd585b9162
prefer old graph browser in Isabelle/jEdit, which still produces better layout;
 
wenzelm 
parents: 
50683 
diff
changeset
 | 
232  | 
val browserN: string  | 
| 
50500
 
c94bba7906d2
identify dialogs via official serial and maintain as result message;
 
wenzelm 
parents: 
50499 
diff
changeset
 | 
233  | 
val graphviewN: string  | 
| 69650 | 234  | 
val theory_exportsN: string  | 
| 
50500
 
c94bba7906d2
identify dialogs via official serial and maintain as result message;
 
wenzelm 
parents: 
50499 
diff
changeset
 | 
235  | 
val sendbackN: string  | 
| 
 
c94bba7906d2
identify dialogs via official serial and maintain as result message;
 
wenzelm 
parents: 
50499 
diff
changeset
 | 
236  | 
val paddingN: string  | 
| 50842 | 237  | 
val padding_line: Properties.entry  | 
| 
52697
 
6fb98a20c349
explicit padding on command boundary for "auto" generated sendback -- do not replace the corresponding goal command, but append to it;
 
wenzelm 
parents: 
52643 
diff
changeset
 | 
238  | 
val padding_command: Properties.entry  | 
| 
50500
 
c94bba7906d2
identify dialogs via official serial and maintain as result message;
 
wenzelm 
parents: 
50499 
diff
changeset
 | 
239  | 
val dialogN: string val dialog: serial -> string -> T  | 
| 63681 | 240  | 
val jedit_actionN: string  | 
| 76394 | 241  | 
val function: string -> Properties.entry  | 
| 
72119
 
d115d50a19c0
provide POLYSTATSDIR to keep $HOME/.polyml clean (requires Poly/ML 52881757b127, otherwise ignored);
 
wenzelm 
parents: 
72116 
diff
changeset
 | 
242  | 
  val ML_statistics: {pid: int, stats_dir: string} -> Properties.T
 | 
| 
70665
 
94442fce40a5
prefer commands_accepted: fewer protocol messages;
 
wenzelm 
parents: 
70499 
diff
changeset
 | 
243  | 
val commands_accepted: Properties.T  | 
| 52563 | 244  | 
val assign_update: Properties.T  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
245  | 
val removed_versions: Properties.T  | 
| 
73419
 
22f3f2117ed7
clarified signature: function_thread is determined in Isabelle/Scala, not Isabelle/ML;
 
wenzelm 
parents: 
72861 
diff
changeset
 | 
246  | 
val invoke_scala: string -> string -> Properties.T  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
247  | 
val cancel_scala: string -> Properties.T  | 
| 50975 | 248  | 
val task_statistics: Properties.entry  | 
| 51216 | 249  | 
val command_timing: Properties.entry  | 
| 
66873
 
9953ae603a23
provide theory timing information, similar to command timing but always considered relevant;
 
wenzelm 
parents: 
66379 
diff
changeset
 | 
250  | 
val theory_timing: Properties.entry  | 
| 
72002
 
5c4800f6b25a
more robust protocol for "Timing ..." messages, notably for pide_session=true;
 
wenzelm 
parents: 
71912 
diff
changeset
 | 
251  | 
val session_timing: Properties.entry  | 
| 50845 | 252  | 
val loading_theory: string -> Properties.T  | 
| 65313 | 253  | 
val build_session_finished: Properties.T  | 
| 56864 | 254  | 
val print_operations: Properties.T  | 
| 69788 | 255  | 
val exportN: string  | 
256  | 
type export_args =  | 
|
257  | 
   {id: string option,
 | 
|
258  | 
serial: serial,  | 
|
259  | 
theory_name: string,  | 
|
260  | 
name: string,  | 
|
261  | 
executable: bool,  | 
|
| 70499 | 262  | 
compress: bool,  | 
263  | 
strict: bool}  | 
|
| 69788 | 264  | 
val export: export_args -> Properties.T  | 
| 60842 | 265  | 
val debugger_state: string -> Properties.T  | 
| 60834 | 266  | 
val debugger_output: string -> Properties.T  | 
| 
57594
 
037f3b251df5
regular message to refer to Simplifier Trace panel (unused);
 
wenzelm 
parents: 
56864 
diff
changeset
 | 
267  | 
val simp_trace_panelN: string  | 
| 
55553
 
99409ccbe04a
more standard names for protocol and markup elements;
 
wenzelm 
parents: 
55551 
diff
changeset
 | 
268  | 
val simp_trace_logN: string  | 
| 
 
99409ccbe04a
more standard names for protocol and markup elements;
 
wenzelm 
parents: 
55551 
diff
changeset
 | 
269  | 
val simp_trace_stepN: string  | 
| 
 
99409ccbe04a
more standard names for protocol and markup elements;
 
wenzelm 
parents: 
55551 
diff
changeset
 | 
270  | 
val simp_trace_recurseN: string  | 
| 
 
99409ccbe04a
more standard names for protocol and markup elements;
 
wenzelm 
parents: 
55551 
diff
changeset
 | 
271  | 
val simp_trace_hintN: string  | 
| 
 
99409ccbe04a
more standard names for protocol and markup elements;
 
wenzelm 
parents: 
55551 
diff
changeset
 | 
272  | 
val simp_trace_ignoreN: string  | 
| 
 
99409ccbe04a
more standard names for protocol and markup elements;
 
wenzelm 
parents: 
55551 
diff
changeset
 | 
273  | 
val simp_trace_cancel: serial -> Properties.T  | 
| 
69345
 
6bd63c94cf62
tuned signature (see also src/Tools/Haskell/Markup.hs);
 
wenzelm 
parents: 
69320 
diff
changeset
 | 
274  | 
type output = Output.output * Output.output  | 
| 
 
6bd63c94cf62
tuned signature (see also src/Tools/Haskell/Markup.hs);
 
wenzelm 
parents: 
69320 
diff
changeset
 | 
275  | 
val no_output: output  | 
| 
 
6bd63c94cf62
tuned signature (see also src/Tools/Haskell/Markup.hs);
 
wenzelm 
parents: 
69320 
diff
changeset
 | 
276  | 
val add_mode: string -> (T -> output) -> unit  | 
| 
 
6bd63c94cf62
tuned signature (see also src/Tools/Haskell/Markup.hs);
 
wenzelm 
parents: 
69320 
diff
changeset
 | 
277  | 
val output: T -> output  | 
| 
40131
 
7cbebd636e79
explicitly qualify type Output.output, which is a slightly odd internal feature;
 
wenzelm 
parents: 
39585 
diff
changeset
 | 
278  | 
val enclose: T -> Output.output -> Output.output  | 
| 25552 | 279  | 
val markup: T -> string -> string  | 
| 59125 | 280  | 
val markups: T list -> string -> string  | 
| 43665 | 281  | 
val markup_only: T -> string  | 
| 
55956
 
94d384d621b0
reject internal term names outright, and complete consts instead;
 
wenzelm 
parents: 
55919 
diff
changeset
 | 
282  | 
val markup_report: string -> string  | 
| 23623 | 283  | 
end;  | 
284  | 
||
285  | 
structure Markup: MARKUP =  | 
|
286  | 
struct  | 
|
287  | 
||
| 30221 | 288  | 
(** markup elements **)  | 
289  | 
||
| 23658 | 290  | 
(* basic markup *)  | 
| 23623 | 291  | 
|
| 28017 | 292  | 
type T = string * Properties.T;  | 
| 23637 | 293  | 
|
| 
38474
 
e498dc2eb576
uniform Markup.empty/Markup.Empty in ML and Scala;
 
wenzelm 
parents: 
38429 
diff
changeset
 | 
294  | 
val empty = ("", []);
 | 
| 23637 | 295  | 
|
| 
38474
 
e498dc2eb576
uniform Markup.empty/Markup.Empty in ML and Scala;
 
wenzelm 
parents: 
38429 
diff
changeset
 | 
296  | 
fun is_empty ("", _) = true
 | 
| 
 
e498dc2eb576
uniform Markup.empty/Markup.Empty in ML and Scala;
 
wenzelm 
parents: 
38429 
diff
changeset
 | 
297  | 
| is_empty _ = false;  | 
| 27883 | 298  | 
|
| 23794 | 299  | 
|
| 23671 | 300  | 
fun properties more_props ((elem, props): T) =  | 
| 28017 | 301  | 
(elem, fold_rev Properties.put more_props props);  | 
| 23671 | 302  | 
|
| 55551 | 303  | 
fun markup_elem name = (name, (name, []): T);  | 
304  | 
fun markup_string name prop = (name, fn s => (name, [(prop, s)]): T);  | 
|
| 63806 | 305  | 
fun markup_int name prop = (name, fn i => (name, [(prop, Value.print_int i)]): T);  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
306  | 
|
| 26977 | 307  | 
|
| 
38721
 
ca8b14fa0d0d
added some proof state markup, notably number of subgoals (e.g. for indentation);
 
wenzelm 
parents: 
38474 
diff
changeset
 | 
308  | 
(* misc properties *)  | 
| 26977 | 309  | 
|
| 23658 | 310  | 
val nameN = "name";  | 
| 27818 | 311  | 
fun name a = properties [(nameN, a)];  | 
312  | 
||
| 68997 | 313  | 
val xnameN = "xname";  | 
314  | 
fun xname a = properties [(xnameN, a)];  | 
|
315  | 
||
| 23658 | 316  | 
val kindN = "kind";  | 
| 23671 | 317  | 
|
| 60744 | 318  | 
val serialN = "serial";  | 
| 63806 | 319  | 
fun serial_properties i = [(serialN, Value.print_int i)];  | 
| 60744 | 320  | 
|
| 
52854
 
92932931bd82
more general Output.result: allow to update arbitrary properties;
 
wenzelm 
parents: 
52800 
diff
changeset
 | 
321  | 
val instanceN = "instance";  | 
| 
 
92932931bd82
more general Output.result: allow to update arbitrary properties;
 
wenzelm 
parents: 
52800 
diff
changeset
 | 
322  | 
|
| 23658 | 323  | 
|
| 
69962
 
82e945d472d5
documentation of document markers and re-interpreted command tags;
 
wenzelm 
parents: 
69916 
diff
changeset
 | 
324  | 
(* meta data -- see https://www.dublincore.org/specifications/dublin-core/dcmi-terms *)  | 
| 
69889
 
be04e9a053a7
markup and document markers for some meta data from "Dublin Core Metadata Element Set";
 
wenzelm 
parents: 
69887 
diff
changeset
 | 
325  | 
|
| 
 
be04e9a053a7
markup and document markers for some meta data from "Dublin Core Metadata Element Set";
 
wenzelm 
parents: 
69887 
diff
changeset
 | 
326  | 
val (meta_titleN, meta_title) = markup_elem "meta_title";  | 
| 
 
be04e9a053a7
markup and document markers for some meta data from "Dublin Core Metadata Element Set";
 
wenzelm 
parents: 
69887 
diff
changeset
 | 
327  | 
val (meta_creatorN, meta_creator) = markup_elem "meta_creator";  | 
| 
 
be04e9a053a7
markup and document markers for some meta data from "Dublin Core Metadata Element Set";
 
wenzelm 
parents: 
69887 
diff
changeset
 | 
328  | 
val (meta_contributorN, meta_contributor) = markup_elem "meta_contributor";  | 
| 
 
be04e9a053a7
markup and document markers for some meta data from "Dublin Core Metadata Element Set";
 
wenzelm 
parents: 
69887 
diff
changeset
 | 
329  | 
val (meta_dateN, meta_date) = markup_elem "meta_date";  | 
| 
69962
 
82e945d472d5
documentation of document markers and re-interpreted command tags;
 
wenzelm 
parents: 
69916 
diff
changeset
 | 
330  | 
val (meta_licenseN, meta_license) = markup_elem "meta_license";  | 
| 
69889
 
be04e9a053a7
markup and document markers for some meta data from "Dublin Core Metadata Element Set";
 
wenzelm 
parents: 
69887 
diff
changeset
 | 
331  | 
val (meta_descriptionN, meta_description) = markup_elem "meta_description";  | 
| 
 
be04e9a053a7
markup and document markers for some meta data from "Dublin Core Metadata Element Set";
 
wenzelm 
parents: 
69887 
diff
changeset
 | 
332  | 
|
| 
 
be04e9a053a7
markup and document markers for some meta data from "Dublin Core Metadata Element Set";
 
wenzelm 
parents: 
69887 
diff
changeset
 | 
333  | 
|
| 55550 | 334  | 
(* embedded languages *)  | 
335  | 
||
| 
55828
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
336  | 
val languageN = "language";  | 
| 
55615
 
bf4bbe72f740
completion of keywords and symbols based on language context;
 
wenzelm 
parents: 
55613 
diff
changeset
 | 
337  | 
val symbolsN = "symbols";  | 
| 55666 | 338  | 
val antiquotesN = "antiquotes";  | 
| 
55828
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
339  | 
val delimitedN = "delimited"  | 
| 
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
340  | 
|
| 
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
341  | 
fun is_delimited props =  | 
| 
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
342  | 
Properties.get props delimitedN = SOME "true";  | 
| 55666 | 343  | 
|
| 
55828
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
344  | 
fun language {name, symbols, antiquotes, delimited} =
 | 
| 55666 | 345  | 
(languageN,  | 
| 
55828
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
346  | 
[(nameN, name),  | 
| 63806 | 347  | 
(symbolsN, Value.print_bool symbols),  | 
348  | 
(antiquotesN, Value.print_bool antiquotes),  | 
|
349  | 
(delimitedN, Value.print_bool delimited)]);  | 
|
| 55550 | 350  | 
|
| 
55828
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
351  | 
fun language' {name, symbols, antiquotes} delimited =
 | 
| 
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
352  | 
  language {name = name, symbols = symbols, antiquotes = antiquotes, delimited = delimited};
 | 
| 
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
353  | 
|
| 
62231
 
25f4a9cd8b68
tuned markup, e.g. relevant for Rendering.tooltip;
 
wenzelm 
parents: 
61864 
diff
changeset
 | 
354  | 
val language_Isar = language' {name = "Isar", symbols = true, antiquotes = false};
 | 
| 
55828
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
355  | 
val language_method =  | 
| 
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
356  | 
  language {name = "method", symbols = true, antiquotes = false, delimited = false};
 | 
| 56033 | 357  | 
val language_attribute =  | 
358  | 
  language {name = "attribute", symbols = true, antiquotes = false, delimited = false};
 | 
|
| 
55828
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
359  | 
val language_sort = language' {name = "sort", symbols = true, antiquotes = false};
 | 
| 
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
360  | 
val language_type = language' {name = "type", symbols = true, antiquotes = false};
 | 
| 
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
361  | 
val language_term = language' {name = "term", symbols = true, antiquotes = false};
 | 
| 
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
362  | 
val language_prop = language' {name = "prop", symbols = true, antiquotes = false};
 | 
| 
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
363  | 
val language_ML = language' {name = "ML", symbols = false, antiquotes = true};
 | 
| 
56278
 
2576d3a40ed6
separate tokenization and language context for SML: no symbols, no antiquotes;
 
wenzelm 
parents: 
56202 
diff
changeset
 | 
364  | 
val language_SML = language' {name = "SML", symbols = false, antiquotes = false};
 | 
| 
61600
 
1ca11ddfcc70
clarified completion of explicit symbols (see also f6bd97a587b7, e0e4ac981cf1);
 
wenzelm 
parents: 
61598 
diff
changeset
 | 
365  | 
val language_document = language' {name = "document", symbols = false, antiquotes = true};
 | 
| 69887 | 366  | 
val language_document_marker =  | 
367  | 
  language {name = "document_marker", symbols = true, antiquotes = true, delimited = true};
 | 
|
| 
55828
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
368  | 
val language_antiquotation =  | 
| 
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
369  | 
  language {name = "antiquotation", symbols = true, antiquotes = false, delimited = true};
 | 
| 
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
370  | 
val language_text = language' {name = "text", symbols = true, antiquotes = false};
 | 
| 62772 | 371  | 
val language_verbatim = language' {name = "verbatim_text", symbols = true, antiquotes = false};
 | 
| 67429 | 372  | 
val language_latex = language' {name = "latex", symbols = false, antiquotes = false};
 | 
| 
55828
 
42ac3cfb89f6
clarified language markup: added "delimited" property;
 
wenzelm 
parents: 
55763 
diff
changeset
 | 
373  | 
val language_rail = language {name = "rail", symbols = true, antiquotes = true, delimited = true};
 | 
| 72841 | 374  | 
val language_path = language' {name = "path", symbols = false, antiquotes = false};
 | 
| 72843 | 375  | 
val language_url = language' {name = "url", symbols = false, antiquotes = false};
 | 
| 62772 | 376  | 
val language_mixfix =  | 
377  | 
  language {name = "mixfix_annotation", symbols = true, antiquotes = false, delimited = true};
 | 
|
| 55550 | 378  | 
|
379  | 
||
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
380  | 
(* formal entities *)  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
381  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
382  | 
val (bindingN, binding) = markup_elem "binding";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
383  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
384  | 
val entityN = "entity";  | 
| 63337 | 385  | 
fun entity kind name =  | 
386  | 
(entityN,  | 
|
387  | 
(if name = "" then [] else [(nameN, name)]) @ (if kind = "" then [] else [(kindN, kind)]));  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
388  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
389  | 
val defN = "def";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
390  | 
val refN = "ref";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
391  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
392  | 
|
| 
55672
 
5e25cc741ab9
support for completion within the formal context;
 
wenzelm 
parents: 
55666 
diff
changeset
 | 
393  | 
(* completion *)  | 
| 
 
5e25cc741ab9
support for completion within the formal context;
 
wenzelm 
parents: 
55666 
diff
changeset
 | 
394  | 
|
| 
55694
 
a1184dfb8e00
clarified semantic completion: retain kind.full_name as official item name for history;
 
wenzelm 
parents: 
55687 
diff
changeset
 | 
395  | 
val (completionN, completion) = markup_elem "completion";  | 
| 
55914
 
c5b752d549e3
clarified init_assignable: make double-sure that initial values are reset;
 
wenzelm 
parents: 
55837 
diff
changeset
 | 
396  | 
val (no_completionN, no_completion) = markup_elem "no_completion";  | 
| 
55672
 
5e25cc741ab9
support for completion within the formal context;
 
wenzelm 
parents: 
55666 
diff
changeset
 | 
397  | 
|
| 69557 | 398  | 
val (updateN, update) = markup_elem "update";  | 
399  | 
||
| 
55672
 
5e25cc741ab9
support for completion within the formal context;
 
wenzelm 
parents: 
55666 
diff
changeset
 | 
400  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
401  | 
(* position *)  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
402  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
403  | 
val lineN = "line";  | 
| 
58978
 
e42da880c61e
more position information, e.g. relevant for errors in generated ML source;
 
wenzelm 
parents: 
58855 
diff
changeset
 | 
404  | 
val end_lineN = "end_line";  | 
| 
 
e42da880c61e
more position information, e.g. relevant for errors in generated ML source;
 
wenzelm 
parents: 
58855 
diff
changeset
 | 
405  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
406  | 
val offsetN = "offset";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
407  | 
val end_offsetN = "end_offset";  | 
| 
58978
 
e42da880c61e
more position information, e.g. relevant for errors in generated ML source;
 
wenzelm 
parents: 
58855 
diff
changeset
 | 
408  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
409  | 
val fileN = "file";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
410  | 
val idN = "id";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
411  | 
|
| 74182 | 412  | 
val (positionN, position) = markup_elem "position";  | 
413  | 
||
| 72707 | 414  | 
val position_properties = [lineN, offsetN, end_offsetN, fileN, idN];  | 
| 72708 | 415  | 
fun position_property (entry: Properties.entry) = member (op =) position_properties (#1 entry);  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
416  | 
|
| 74182 | 417  | 
|
418  | 
(* position "def" names *)  | 
|
419  | 
||
420  | 
fun make_def a = "def_" ^ a;  | 
|
421  | 
||
422  | 
val def_names = Symtab.make (map (fn a => (a, make_def a)) position_properties);  | 
|
423  | 
||
424  | 
fun def_name a =  | 
|
425  | 
(case Symtab.lookup def_names a of  | 
|
426  | 
SOME b => b  | 
|
427  | 
| NONE => make_def a);  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
428  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
429  | 
|
| 58464 | 430  | 
(* expression *)  | 
431  | 
||
| 62806 | 432  | 
val expressionN = "expression";  | 
433  | 
fun expression kind = (expressionN, if kind = "" then [] else [(kindN, kind)]);  | 
|
| 58464 | 434  | 
|
435  | 
||
| 
58544
 
340f130b3d38
bibtex support in ML: document antiquotation @{cite} with markup;
 
wenzelm 
parents: 
58464 
diff
changeset
 | 
436  | 
(* citation *)  | 
| 
 
340f130b3d38
bibtex support in ML: document antiquotation @{cite} with markup;
 
wenzelm 
parents: 
58464 
diff
changeset
 | 
437  | 
|
| 
58545
 
30b75b7958d6
citation tooltip/hyperlink based on open buffers with .bib files;
 
wenzelm 
parents: 
58544 
diff
changeset
 | 
438  | 
val (citationN, citation) = markup_string "citation" nameN;  | 
| 
58544
 
340f130b3d38
bibtex support in ML: document antiquotation @{cite} with markup;
 
wenzelm 
parents: 
58464 
diff
changeset
 | 
439  | 
|
| 
 
340f130b3d38
bibtex support in ML: document antiquotation @{cite} with markup;
 
wenzelm 
parents: 
58464 
diff
changeset
 | 
440  | 
|
| 
54702
 
3daeba5130f0
added document antiquotation @{url}, which produces formal markup for LaTeX and PIDE;
 
wenzelm 
parents: 
53378 
diff
changeset
 | 
441  | 
(* external resources *)  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
442  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
443  | 
val (pathN, path) = markup_string "path" nameN;  | 
| 70016 | 444  | 
val (export_pathN, export_path) = markup_string "export_path" nameN;  | 
| 
54702
 
3daeba5130f0
added document antiquotation @{url}, which produces formal markup for LaTeX and PIDE;
 
wenzelm 
parents: 
53378 
diff
changeset
 | 
445  | 
val (urlN, url) = markup_string "url" nameN;  | 
| 
61660
 
78b371644654
added antiquotation @{doc}, e.g. useful for demonstration purposes;
 
wenzelm 
parents: 
61614 
diff
changeset
 | 
446  | 
val (docN, doc) = markup_string "doc" nameN;  | 
| 72763 | 447  | 
val (toolN, tool) = markup_string "tool" nameN;  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
448  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
449  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
450  | 
(* pretty printing *)  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
451  | 
|
| 62783 | 452  | 
val markupN = "markup";  | 
| 62786 | 453  | 
val consistentN = "consistent";  | 
| 62789 | 454  | 
val unbreakableN = "unbreakable";  | 
| 62786 | 455  | 
val indentN = "indent";  | 
456  | 
||
| 62789 | 457  | 
val block_properties = [markupN, consistentN, unbreakableN, indentN];  | 
| 62786 | 458  | 
|
| 61864 | 459  | 
val widthN = "width";  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
460  | 
|
| 61864 | 461  | 
val blockN = "block";  | 
462  | 
fun block c i =  | 
|
463  | 
(blockN,  | 
|
| 63806 | 464  | 
(if c then [(consistentN, Value.print_bool c)] else []) @  | 
465  | 
(if i <> 0 then [(indentN, Value.print_int i)] else []));  | 
|
| 61864 | 466  | 
|
| 
61862
 
e2a9e46ac0fb
support pretty break indent, like underlying ML systems;
 
wenzelm 
parents: 
61660 
diff
changeset
 | 
467  | 
val breakN = "break";  | 
| 61864 | 468  | 
fun break w i =  | 
469  | 
(breakN,  | 
|
| 63806 | 470  | 
(if w <> 0 then [(widthN, Value.print_int w)] else []) @  | 
471  | 
(if i <> 0 then [(indentN, Value.print_int i)] else []));  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
472  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
473  | 
val (fbreakN, fbreak) = markup_elem "fbreak";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
474  | 
|
| 
51570
 
3633828d80fc
basic support for Pretty.item, which is considered as logical markup and interpreted in Isabelle/Scala, but ignored elsewhere (TTY, latex etc.);
 
wenzelm 
parents: 
51228 
diff
changeset
 | 
475  | 
val (itemN, item) = markup_elem "item";  | 
| 
 
3633828d80fc
basic support for Pretty.item, which is considered as logical markup and interpreted in Isabelle/Scala, but ignored elsewhere (TTY, latex etc.);
 
wenzelm 
parents: 
51228 
diff
changeset
 | 
476  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
477  | 
|
| 56548 | 478  | 
(* text properties *)  | 
479  | 
||
480  | 
val (wordsN, words) = markup_elem "words";  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
481  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
482  | 
val (hiddenN, hidden) = markup_elem "hidden";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
483  | 
|
| 
68298
 
2c3ce27cf4a8
markup for deleted fragments of token source (NB: quoted tokens transform "\123" implicitly);
 
wenzelm 
parents: 
68101 
diff
changeset
 | 
484  | 
val (deleteN, delete) = markup_elem "delete";  | 
| 
 
2c3ce27cf4a8
markup for deleted fragments of token source (NB: quoted tokens transform "\123" implicitly);
 
wenzelm 
parents: 
68101 
diff
changeset
 | 
485  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
486  | 
|
| 
58048
 
aa6296d09e0e
more explicit Method.modifier with reported position;
 
wenzelm 
parents: 
57975 
diff
changeset
 | 
487  | 
(* misc entities *)  | 
| 56465 | 488  | 
|
| 74671 | 489  | 
val load_commandN = "load_command";  | 
| 71912 | 490  | 
val bash_functionN = "bash_function";  | 
491  | 
val scala_functionN = "scala_function";  | 
|
| 56465 | 492  | 
val system_optionN = "system_option";  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
493  | 
|
| 67219 | 494  | 
val sessionN = "session";  | 
495  | 
||
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
496  | 
val theoryN = "theory";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
497  | 
val classN = "class";  | 
| 74112 | 498  | 
val localeN = "locale";  | 
| 
74261
 
d28a51dd9da6
export other entities, e.g. relevant for formal document output;
 
wenzelm 
parents: 
74182 
diff
changeset
 | 
499  | 
val bundleN = "bundle";  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
500  | 
val type_nameN = "type_name";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
501  | 
val constantN = "constant";  | 
| 74112 | 502  | 
val axiomN = "axiom";  | 
503  | 
val factN = "fact";  | 
|
504  | 
val oracleN = "oracle";  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
505  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
506  | 
val (fixedN, fixed) = markup_string "fixed" nameN;  | 
| 
53378
 
07990ba8c0ea
cases: more position information and PIDE markup;
 
wenzelm 
parents: 
53055 
diff
changeset
 | 
507  | 
val (caseN, case_) = markup_string "case" nameN;  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
508  | 
val (dynamic_factN, dynamic_fact) = markup_string "dynamic_fact" nameN;  | 
| 63337 | 509  | 
val (literal_factN, literal_fact) = markup_string "literal_fact" nameN;  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
510  | 
|
| 74112 | 511  | 
val attributeN = "attribute";  | 
512  | 
val methodN = "method";  | 
|
| 
58048
 
aa6296d09e0e
more explicit Method.modifier with reported position;
 
wenzelm 
parents: 
57975 
diff
changeset
 | 
513  | 
val method_modifierN = "method_modifier";  | 
| 
 
aa6296d09e0e
more explicit Method.modifier with reported position;
 
wenzelm 
parents: 
57975 
diff
changeset
 | 
514  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
515  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
516  | 
(* inner syntax *)  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
517  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
518  | 
val (tfreeN, tfree) = markup_elem "tfree";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
519  | 
val (tvarN, tvar) = markup_elem "tvar";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
520  | 
val (freeN, free) = markup_elem "free";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
521  | 
val (skolemN, skolem) = markup_elem "skolem";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
522  | 
val (boundN, bound) = markup_elem "bound";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
523  | 
val (varN, var) = markup_elem "var";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
524  | 
val (numeralN, numeral) = markup_elem "numeral";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
525  | 
val (literalN, literal) = markup_elem "literal";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
526  | 
val (delimiterN, delimiter) = markup_elem "delimiter";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
527  | 
val (inner_stringN, inner_string) = markup_elem "inner_string";  | 
| 55033 | 528  | 
val (inner_cartoucheN, inner_cartouche) = markup_elem "inner_cartouche";  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
529  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
530  | 
val (token_rangeN, token_range) = markup_elem "token_range";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
531  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
532  | 
val (sortingN, sorting) = markup_elem "sorting";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
533  | 
val (typingN, typing) = markup_elem "typing";  | 
| 63347 | 534  | 
val (class_parameterN, class_parameter) = markup_elem "class_parameter";  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
535  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
536  | 
|
| 60744 | 537  | 
(* ML *)  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
538  | 
|
| 55505 | 539  | 
val (ML_keyword1N, ML_keyword1) = markup_elem "ML_keyword1";  | 
540  | 
val (ML_keyword2N, ML_keyword2) = markup_elem "ML_keyword2";  | 
|
541  | 
val (ML_keyword3N, ML_keyword3) = markup_elem "ML_keyword3";  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
542  | 
val (ML_delimiterN, ML_delimiter) = markup_elem "ML_delimiter";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
543  | 
val (ML_tvarN, ML_tvar) = markup_elem "ML_tvar";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
544  | 
val (ML_numeralN, ML_numeral) = markup_elem "ML_numeral";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
545  | 
val (ML_charN, ML_char) = markup_elem "ML_char";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
546  | 
val (ML_stringN, ML_string) = markup_elem "ML_string";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
547  | 
val (ML_commentN, ML_comment) = markup_elem "ML_comment";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
548  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
549  | 
val ML_defN = "ML_def";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
550  | 
val ML_openN = "ML_open";  | 
| 55837 | 551  | 
val ML_structureN = "ML_structure";  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
552  | 
val (ML_typingN, ML_typing) = markup_elem "ML_typing";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
553  | 
|
| 60744 | 554  | 
val (ML_breakpointN, ML_breakpoint) = markup_int "ML_breakpoint" serialN;  | 
555  | 
||
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
556  | 
|
| 55550 | 557  | 
(* antiquotations *)  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
558  | 
|
| 55526 | 559  | 
val (antiquotedN, antiquoted) = markup_elem "antiquoted";  | 
560  | 
val (antiquoteN, antiquote) = markup_elem "antiquote";  | 
|
561  | 
||
| 
69381
 
4c9b4e2c5460
more general command 'generate_file' for registered file types, notably Haskell;
 
wenzelm 
parents: 
69345 
diff
changeset
 | 
562  | 
val file_typeN = "file_type";  | 
| 
 
4c9b4e2c5460
more general command 'generate_file' for registered file types, notably Haskell;
 
wenzelm 
parents: 
69345 
diff
changeset
 | 
563  | 
val antiquotationN = "antiquotation";  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
564  | 
val ML_antiquotationN = "ML_antiquotation";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
565  | 
val document_antiquotationN = "document_antiquotation";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
566  | 
val document_antiquotation_optionN = "document_antiquotation_option";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
567  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
568  | 
|
| 
70135
 
ad6d4a14adb5
report document tags as seen in the text (not the active tag of Thy_Output.present_thy);
 
wenzelm 
parents: 
70016 
diff
changeset
 | 
569  | 
(* document text *)  | 
| 
69965
 
da5e7278286b
more markup for various text kinds, notably for nested formal comments;
 
wenzelm 
parents: 
69962 
diff
changeset
 | 
570  | 
|
| 
76514
 
2615cf68f6f4
ML support for the Prism.js syntax highlighter -- via Isabelle/Scala;
 
wenzelm 
parents: 
76394 
diff
changeset
 | 
571  | 
val prismjs_languageN = "prismjs_language";  | 
| 
 
2615cf68f6f4
ML support for the Prism.js syntax highlighter -- via Isabelle/Scala;
 
wenzelm 
parents: 
76394 
diff
changeset
 | 
572  | 
|
| 
69965
 
da5e7278286b
more markup for various text kinds, notably for nested formal comments;
 
wenzelm 
parents: 
69962 
diff
changeset
 | 
573  | 
val (raw_textN, raw_text) = markup_elem "raw_text";  | 
| 
 
da5e7278286b
more markup for various text kinds, notably for nested formal comments;
 
wenzelm 
parents: 
69962 
diff
changeset
 | 
574  | 
val (plain_textN, plain_text) = markup_elem "plain_text";  | 
| 
 
da5e7278286b
more markup for various text kinds, notably for nested formal comments;
 
wenzelm 
parents: 
69962 
diff
changeset
 | 
575  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
576  | 
val (paragraphN, paragraph) = markup_elem "paragraph";  | 
| 
50545
 
00bdc48c5f71
explicit text_fold markup, which is used by default in Pretty.chunks/chunks2;
 
wenzelm 
parents: 
50543 
diff
changeset
 | 
577  | 
val (text_foldN, text_fold) = markup_elem "text_fold";  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
578  | 
|
| 70229 | 579  | 
val (document_markerN, document_marker) = markup_elem "document_marker";  | 
| 
70135
 
ad6d4a14adb5
report document tags as seen in the text (not the active tag of Thy_Output.present_thy);
 
wenzelm 
parents: 
70016 
diff
changeset
 | 
580  | 
val (document_tagN, document_tag) = markup_string "document_tag" nameN;  | 
| 
 
ad6d4a14adb5
report document tags as seen in the text (not the active tag of Thy_Output.present_thy);
 
wenzelm 
parents: 
70016 
diff
changeset
 | 
581  | 
|
| 
74784
 
d2522bb4db1b
symbolic latex_output via XML, interpreted in Isabelle/Scala;
 
wenzelm 
parents: 
74673 
diff
changeset
 | 
582  | 
|
| 
 
d2522bb4db1b
symbolic latex_output via XML, interpreted in Isabelle/Scala;
 
wenzelm 
parents: 
74673 
diff
changeset
 | 
583  | 
(* LaTeX *)  | 
| 
 
d2522bb4db1b
symbolic latex_output via XML, interpreted in Isabelle/Scala;
 
wenzelm 
parents: 
74673 
diff
changeset
 | 
584  | 
|
| 
73780
 
466fae6bf22e
compose Latex text as XML, output exported YXML in Isabelle/Scala;
 
wenzelm 
parents: 
73419 
diff
changeset
 | 
585  | 
val (document_latexN, document_latex) = markup_elem "document_latex";  | 
| 
 
466fae6bf22e
compose Latex text as XML, output exported YXML in Isabelle/Scala;
 
wenzelm 
parents: 
73419 
diff
changeset
 | 
586  | 
|
| 
74784
 
d2522bb4db1b
symbolic latex_output via XML, interpreted in Isabelle/Scala;
 
wenzelm 
parents: 
74673 
diff
changeset
 | 
587  | 
val (latex_outputN, latex_output) = markup_elem "latex_output";  | 
| 74790 | 588  | 
val (latex_macro0N, latex_macro0) = markup_string "latex_macro0" nameN;  | 
589  | 
val (latex_macroN, latex_macro) = markup_string "latex_macro" nameN;  | 
|
590  | 
val (latex_environmentN, latex_environment) = markup_string "latex_environment" nameN;  | 
|
| 74823 | 591  | 
val (latex_headingN, latex_heading) = markup_string "latex_heading" kindN;  | 
592  | 
val (latex_bodyN, latex_body) = markup_string "latex_body" kindN;  | 
|
| 74786 | 593  | 
val (latex_index_itemN, latex_index_item) = markup_elem "latex_index_item";  | 
594  | 
val (latex_index_entryN, latex_index_entry) = markup_string "latex_index_entry" kindN;  | 
|
| 
74826
 
0e4d8aa61ad7
more symbolic latex_output via XML (using YXML within text);
 
wenzelm 
parents: 
74823 
diff
changeset
 | 
595  | 
val (latex_delimN, latex_delim) = markup_string "latex_delim" nameN;  | 
| 
 
0e4d8aa61ad7
more symbolic latex_output via XML (using YXML within text);
 
wenzelm 
parents: 
74823 
diff
changeset
 | 
596  | 
val (latex_tagN, latex_tag) = markup_string "latex_tag" nameN;  | 
| 
74784
 
d2522bb4db1b
symbolic latex_output via XML, interpreted in Isabelle/Scala;
 
wenzelm 
parents: 
74673 
diff
changeset
 | 
597  | 
|
| 
74836
 
a97ec0954c50
example: alternative document headings, based on more general document output markup;
 
wenzelm 
parents: 
74826 
diff
changeset
 | 
598  | 
val optional_argumentN = "optional_argument";  | 
| 
 
a97ec0954c50
example: alternative document headings, based on more general document output markup;
 
wenzelm 
parents: 
74826 
diff
changeset
 | 
599  | 
fun optional_argument arg = properties [(optional_argumentN, arg)];  | 
| 
 
a97ec0954c50
example: alternative document headings, based on more general document output markup;
 
wenzelm 
parents: 
74826 
diff
changeset
 | 
600  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
601  | 
|
| 61449 | 602  | 
(* Markdown document structure *)  | 
603  | 
||
604  | 
val (markdown_paragraphN, markdown_paragraph) = markup_elem "markdown_paragraph";  | 
|
| 
67323
 
d02208cefbdb
PIDE markup for Markdown items (which may consist of multiple paragraphs or lists);
 
wenzelm 
parents: 
67322 
diff
changeset
 | 
605  | 
val (markdown_itemN, markdown_item) = markup_elem "markdown_item";  | 
| 67336 | 606  | 
val (markdown_bulletN, markdown_bullet) = markup_int "markdown_bullet" "depth";  | 
| 61449 | 607  | 
val (markdown_listN, markdown_list) = markup_string "markdown_list" kindN;  | 
| 67336 | 608  | 
|
609  | 
val itemizeN = "itemize";  | 
|
610  | 
val enumerateN = "enumerate";  | 
|
611  | 
val descriptionN = "description";  | 
|
| 61449 | 612  | 
|
613  | 
||
| 59795 | 614  | 
(* formal input *)  | 
615  | 
||
616  | 
val inputN = "input";  | 
|
| 63806 | 617  | 
fun input delimited props = (inputN, (delimitedN, Value.print_bool delimited) :: props);  | 
| 59795 | 618  | 
|
619  | 
||
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
620  | 
(* outer syntax *)  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
621  | 
|
| 59935 | 622  | 
val (command_keywordN, command_keyword) = markup_elem "command_keyword";  | 
| 74673 | 623  | 
val (command_spanN, command_span) = markup_string "command_span" nameN;  | 
| 66044 | 624  | 
|
| 66066 | 625  | 
val commandN = "command"; val command_properties = properties [(kindN, commandN)];  | 
626  | 
val keywordN = "keyword"; val keyword_properties = properties [(kindN, keywordN)];  | 
|
627  | 
||
| 
55744
 
4a4e5686e091
clarified token markup: keyword1/keyword2 is for syntax, and "command" the entity kind;
 
wenzelm 
parents: 
55694 
diff
changeset
 | 
628  | 
val (keyword1N, keyword1) = markup_elem "keyword1";  | 
| 
 
4a4e5686e091
clarified token markup: keyword1/keyword2 is for syntax, and "command" the entity kind;
 
wenzelm 
parents: 
55694 
diff
changeset
 | 
629  | 
val (keyword2N, keyword2) = markup_elem "keyword2";  | 
| 55763 | 630  | 
val (keyword3N, keyword3) = markup_elem "keyword3";  | 
| 
55919
 
2eb8c13339a5
more explicit quasi_keyword markup, for Args.$$$ material, which is somewhere in between of outer and inner syntax;
 
wenzelm 
parents: 
55914 
diff
changeset
 | 
631  | 
val (quasi_keywordN, quasi_keyword) = markup_elem "quasi_keyword";  | 
| 56202 | 632  | 
val (improperN, improper) = markup_elem "improper";  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
633  | 
val (operatorN, operator) = markup_elem "operator";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
634  | 
val (stringN, string) = markup_elem "string";  | 
| 59081 | 635  | 
val (alt_stringN, alt_string) = markup_elem "alt_string";  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
636  | 
val (verbatimN, verbatim) = markup_elem "verbatim";  | 
| 55033 | 637  | 
val (cartoucheN, cartouche) = markup_elem "cartouche";  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
638  | 
val (commentN, comment) = markup_elem "comment";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
639  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
640  | 
|
| 69320 | 641  | 
(* comments *)  | 
642  | 
||
643  | 
val (comment1N, comment1) = markup_elem "comment1";  | 
|
644  | 
val (comment2N, comment2) = markup_elem "comment2";  | 
|
645  | 
val (comment3N, comment3) = markup_elem "comment3";  | 
|
646  | 
||
647  | 
||
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
648  | 
(* timing *)  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
649  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
650  | 
val elapsedN = "elapsed";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
651  | 
val cpuN = "cpu";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
652  | 
val gcN = "gc";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
653  | 
|
| 50781 | 654  | 
fun timing_properties {elapsed, cpu, gc} =
 | 
| 
67000
 
1698e9ccef2d
more portable print_time, notably for occasional negative (!) elapsed time of theory_timing;
 
wenzelm 
parents: 
66873 
diff
changeset
 | 
655  | 
[(elapsedN, Value.print_time elapsed),  | 
| 
 
1698e9ccef2d
more portable print_time, notably for occasional negative (!) elapsed time of theory_timing;
 
wenzelm 
parents: 
66873 
diff
changeset
 | 
656  | 
(cpuN, Value.print_time cpu),  | 
| 
 
1698e9ccef2d
more portable print_time, notably for occasional negative (!) elapsed time of theory_timing;
 
wenzelm 
parents: 
66873 
diff
changeset
 | 
657  | 
(gcN, Value.print_time gc)];  | 
| 50781 | 658  | 
|
| 51665 | 659  | 
val timingN = "timing";  | 
660  | 
fun timing t = (timingN, timing_properties t);  | 
|
| 
51218
 
6425a0d3b7ac
support for build passing timings from Scala to ML;
 
wenzelm 
parents: 
51217 
diff
changeset
 | 
661  | 
|
| 51228 | 662  | 
|
663  | 
(* command timing *)  | 
|
664  | 
||
665  | 
fun parse_command_timing_properties props =  | 
|
666  | 
(case (Properties.get props fileN, Properties.get props offsetN, Properties.get props nameN) of  | 
|
667  | 
(SOME file, SOME offset, SOME name) =>  | 
|
| 63806 | 668  | 
      SOME ({file = file, offset = Value.parse_int offset, name = name},
 | 
| 51665 | 669  | 
Properties.seconds props elapsedN)  | 
| 51228 | 670  | 
| _ => NONE);  | 
671  | 
||
672  | 
||
| 
63474
 
f66e3c3b0fb1
semantic indentation for unstructured proof scripts;
 
wenzelm 
parents: 
63347 
diff
changeset
 | 
673  | 
(* indentation *)  | 
| 
 
f66e3c3b0fb1
semantic indentation for unstructured proof scripts;
 
wenzelm 
parents: 
63347 
diff
changeset
 | 
674  | 
|
| 
 
f66e3c3b0fb1
semantic indentation for unstructured proof scripts;
 
wenzelm 
parents: 
63347 
diff
changeset
 | 
675  | 
val (command_indentN, command_indent) = markup_int "command_indent" indentN;  | 
| 
 
f66e3c3b0fb1
semantic indentation for unstructured proof scripts;
 
wenzelm 
parents: 
63347 
diff
changeset
 | 
676  | 
|
| 
 
f66e3c3b0fb1
semantic indentation for unstructured proof scripts;
 
wenzelm 
parents: 
63347 
diff
changeset
 | 
677  | 
|
| 
 
f66e3c3b0fb1
semantic indentation for unstructured proof scripts;
 
wenzelm 
parents: 
63347 
diff
changeset
 | 
678  | 
(* goals *)  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
679  | 
|
| 50543 | 680  | 
val (goalN, goal) = markup_elem "goal";  | 
| 
50537
 
08ce81aeeacc
more subgoal markup information, which is potentially useful to manage proof state output;
 
wenzelm 
parents: 
50503 
diff
changeset
 | 
681  | 
val (subgoalN, subgoal) = markup_string "subgoal" nameN;  | 
| 50215 | 682  | 
|
| 
50450
 
358b6020f8b6
generalized notion of active area, where sendback is just one application;
 
wenzelm 
parents: 
50255 
diff
changeset
 | 
683  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
684  | 
(* command status *)  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
685  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
686  | 
val taskN = "task";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
687  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
688  | 
val (forkedN, forked) = markup_elem "forked";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
689  | 
val (joinedN, joined) = markup_elem "joined";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
690  | 
val (runningN, running) = markup_elem "running";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
691  | 
val (finishedN, finished) = markup_elem "finished";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
692  | 
val (failedN, failed) = markup_elem "failed";  | 
| 
68871
 
f5c76072db55
more explicit status for "canceled" command within theory node;
 
wenzelm 
parents: 
68822 
diff
changeset
 | 
693  | 
val (canceledN, canceled) = markup_elem "canceled";  | 
| 68323 | 694  | 
val (initializedN, initialized) = markup_elem "initialized";  | 
| 
68884
 
9b97d0b20d95
clarified quasi_consolidated state: ensure that exports are present for ok nodes;
 
wenzelm 
parents: 
68871 
diff
changeset
 | 
695  | 
val (finalizedN, finalized) = markup_elem "finalized";  | 
| 
70780
 
034742453594
more robust: avoid update/interrupt of long-running print_consolidation;
 
wenzelm 
parents: 
70665 
diff
changeset
 | 
696  | 
val (consolidatingN, consolidating) = markup_elem "consolidating";  | 
| 
66379
 
6392766f3c25
maintain "consolidated" status of theory nodes, which means all evals are finished (but not necessarily prints nor imports);
 
wenzelm 
parents: 
66066 
diff
changeset
 | 
697  | 
val (consolidatedN, consolidated) = markup_elem "consolidated";  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
698  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
699  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
700  | 
(* messages *)  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
701  | 
|
| 
50914
 
fe4714886d92
identify future results more carefully, to avoid odd duplication of error messages, notably from forked goals;
 
wenzelm 
parents: 
50845 
diff
changeset
 | 
702  | 
val exec_idN = "exec_id";  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
703  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
704  | 
val initN = "init";  | 
| 61209 | 705  | 
val (statusN, status) = markup_elem "status";  | 
706  | 
val (resultN, result) = markup_elem "result";  | 
|
707  | 
val (writelnN, writeln) = markup_elem "writeln";  | 
|
708  | 
val (stateN, state) = markup_elem "state"  | 
|
709  | 
val (informationN, information) = markup_elem "information";  | 
|
710  | 
val (tracingN, tracing) = markup_elem "tracing";  | 
|
711  | 
val (warningN, warning) = markup_elem "warning";  | 
|
712  | 
val (legacyN, legacy) = markup_elem "legacy";  | 
|
713  | 
val (errorN, error) = markup_elem "error";  | 
|
714  | 
val (systemN, system) = markup_elem "system";  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
715  | 
val protocolN = "protocol";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
716  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
717  | 
val (reportN, report) = markup_elem "report";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
718  | 
val (no_reportN, no_report) = markup_elem "no_report";  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
719  | 
|
| 
64677
 
8dc24130e8fe
more uniform treatment of "bad" like other messages (with serial number);
 
wenzelm 
parents: 
63806 
diff
changeset
 | 
720  | 
val badN = "bad";  | 
| 
 
8dc24130e8fe
more uniform treatment of "bad" like other messages (with serial number);
 
wenzelm 
parents: 
63806 
diff
changeset
 | 
721  | 
fun bad () = (badN, serial_properties (serial ()));  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
722  | 
|
| 
50500
 
c94bba7906d2
identify dialogs via official serial and maintain as result message;
 
wenzelm 
parents: 
50499 
diff
changeset
 | 
723  | 
val (intensifyN, intensify) = markup_elem "intensify";  | 
| 
 
c94bba7906d2
identify dialogs via official serial and maintain as result message;
 
wenzelm 
parents: 
50499 
diff
changeset
 | 
724  | 
|
| 
 
c94bba7906d2
identify dialogs via official serial and maintain as result message;
 
wenzelm 
parents: 
50499 
diff
changeset
 | 
725  | 
|
| 73835 | 726  | 
(* ML profiling *)  | 
727  | 
||
728  | 
val countN = "count";  | 
|
729  | 
||
730  | 
val ML_profiling_entryN = "ML_profiling_entry";  | 
|
731  | 
fun ML_profiling_entry {name, count} =
 | 
|
732  | 
(ML_profiling_entryN, [(nameN, name), (countN, Value.print_int count)]);  | 
|
733  | 
||
734  | 
val (ML_profilingN, ML_profiling) = markup_string "ML_profiling" kindN;  | 
|
735  | 
||
736  | 
||
| 
50500
 
c94bba7906d2
identify dialogs via official serial and maintain as result message;
 
wenzelm 
parents: 
50499 
diff
changeset
 | 
737  | 
(* active areas *)  | 
| 
 
c94bba7906d2
identify dialogs via official serial and maintain as result message;
 
wenzelm 
parents: 
50499 
diff
changeset
 | 
738  | 
|
| 
50715
 
8cfd585b9162
prefer old graph browser in Isabelle/jEdit, which still produces better layout;
 
wenzelm 
parents: 
50683 
diff
changeset
 | 
739  | 
val browserN = "browser"  | 
| 
50500
 
c94bba7906d2
identify dialogs via official serial and maintain as result message;
 
wenzelm 
parents: 
50499 
diff
changeset
 | 
740  | 
val graphviewN = "graphview";  | 
| 69650 | 741  | 
val theory_exportsN = "theory_exports";  | 
| 
50500
 
c94bba7906d2
identify dialogs via official serial and maintain as result message;
 
wenzelm 
parents: 
50499 
diff
changeset
 | 
742  | 
|
| 
 
c94bba7906d2
identify dialogs via official serial and maintain as result message;
 
wenzelm 
parents: 
50499 
diff
changeset
 | 
743  | 
val sendbackN = "sendback";  | 
| 
 
c94bba7906d2
identify dialogs via official serial and maintain as result message;
 
wenzelm 
parents: 
50499 
diff
changeset
 | 
744  | 
val paddingN = "padding";  | 
| 
52697
 
6fb98a20c349
explicit padding on command boundary for "auto" generated sendback -- do not replace the corresponding goal command, but append to it;
 
wenzelm 
parents: 
52643 
diff
changeset
 | 
745  | 
val padding_line = (paddingN, "line");  | 
| 
 
6fb98a20c349
explicit padding on command boundary for "auto" generated sendback -- do not replace the corresponding goal command, but append to it;
 
wenzelm 
parents: 
52643 
diff
changeset
 | 
746  | 
val padding_command = (paddingN, "command");  | 
| 
50500
 
c94bba7906d2
identify dialogs via official serial and maintain as result message;
 
wenzelm 
parents: 
50499 
diff
changeset
 | 
747  | 
|
| 
 
c94bba7906d2
identify dialogs via official serial and maintain as result message;
 
wenzelm 
parents: 
50499 
diff
changeset
 | 
748  | 
val dialogN = "dialog";  | 
| 63806 | 749  | 
fun dialog i result = (dialogN, [(serialN, Value.print_int i), (resultN, result)]);  | 
| 
50500
 
c94bba7906d2
identify dialogs via official serial and maintain as result message;
 
wenzelm 
parents: 
50499 
diff
changeset
 | 
750  | 
|
| 63681 | 751  | 
val jedit_actionN = "jedit_action";  | 
752  | 
||
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
753  | 
|
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
754  | 
(* protocol message functions *)  | 
| 
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
755  | 
|
| 76394 | 756  | 
fun function name = ("function", name);
 | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
757  | 
|
| 
72119
 
d115d50a19c0
provide POLYSTATSDIR to keep $HOME/.polyml clean (requires Poly/ML 52881757b127, otherwise ignored);
 
wenzelm 
parents: 
72116 
diff
changeset
 | 
758  | 
fun ML_statistics {pid, stats_dir} =
 | 
| 76394 | 759  | 
  [function "ML_statistics", ("pid", Value.print_int pid), ("stats_dir", stats_dir)];
 | 
| 
72112
 
3546dd4ade74
ML statistics via external process: allows monitoring RTS while ML program sleeps;
 
wenzelm 
parents: 
72106 
diff
changeset
 | 
760  | 
|
| 76394 | 761  | 
val commands_accepted = [function "commands_accepted"];  | 
| 
70665
 
94442fce40a5
prefer commands_accepted: fewer protocol messages;
 
wenzelm 
parents: 
70499 
diff
changeset
 | 
762  | 
|
| 76394 | 763  | 
val assign_update = [function "assign_update"];  | 
764  | 
val removed_versions = [function "removed_versions"];  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
765  | 
|
| 76394 | 766  | 
fun invoke_scala name id = [function "invoke_scala", (nameN, name), (idN, id)];  | 
| 
72332
 
319dd5c618a5
allow Scala function execution on separate thread: better reactivity, but potential overloading of the JVM;
 
wenzelm 
parents: 
72156 
diff
changeset
 | 
767  | 
|
| 76394 | 768  | 
fun cancel_scala id = [function "cancel_scala", (idN, id)];  | 
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
769  | 
|
| 76394 | 770  | 
val task_statistics = function "task_statistics";  | 
| 50975 | 771  | 
|
| 76394 | 772  | 
val command_timing = function "command_timing";  | 
| 51216 | 773  | 
|
| 76394 | 774  | 
val theory_timing = function "theory_timing";  | 
| 
66873
 
9953ae603a23
provide theory timing information, similar to command timing but always considered relevant;
 
wenzelm 
parents: 
66379 
diff
changeset
 | 
775  | 
|
| 76394 | 776  | 
val session_timing = function "session_timing";  | 
| 
72002
 
5c4800f6b25a
more robust protocol for "Timing ..." messages, notably for pide_session=true;
 
wenzelm 
parents: 
71912 
diff
changeset
 | 
777  | 
|
| 76394 | 778  | 
fun loading_theory name = [function "loading_theory", (nameN, name)];  | 
| 50845 | 779  | 
|
| 76394 | 780  | 
val build_session_finished = [function "build_session_finished"];  | 
| 
56616
 
abc2da18d08d
added protocol command "use_theories", with core functionality of batch build;
 
wenzelm 
parents: 
56548 
diff
changeset
 | 
781  | 
|
| 76394 | 782  | 
val print_operations = [function "print_operations"];  | 
| 56864 | 783  | 
|
| 
50201
 
c26369c9eda6
Isabelle-specific implementation of quasi-abstract markup elements -- back to module arrangement before d83797ef0d2d;
 
wenzelm 
parents: 
46894 
diff
changeset
 | 
784  | 
|
| 69788 | 785  | 
(* export *)  | 
786  | 
||
787  | 
val exportN = "export";  | 
|
788  | 
||
789  | 
type export_args =  | 
|
790  | 
 {id: string option,
 | 
|
791  | 
serial: serial,  | 
|
792  | 
theory_name: string,  | 
|
793  | 
name: string,  | 
|
794  | 
executable: bool,  | 
|
| 70499 | 795  | 
compress: bool,  | 
796  | 
strict: bool};  | 
|
| 69788 | 797  | 
|
| 70499 | 798  | 
fun export ({id, serial, theory_name, name, executable, compress, strict}: export_args) =
 | 
| 76394 | 799  | 
[function exportN,  | 
| 69788 | 800  | 
(idN, the_default "" id),  | 
801  | 
(serialN, Value.print_int serial),  | 
|
802  | 
  ("theory_name", theory_name),
 | 
|
803  | 
(nameN, name),  | 
|
804  | 
  ("executable", Value.print_bool executable),
 | 
|
| 70499 | 805  | 
  ("compress", Value.print_bool compress),
 | 
806  | 
  ("strict", Value.print_bool strict)];
 | 
|
| 69788 | 807  | 
|
808  | 
||
| 60830 | 809  | 
(* debugger *)  | 
810  | 
||
| 76394 | 811  | 
fun debugger_state name = [function "debugger_state", (nameN, name)];  | 
812  | 
fun debugger_output name = [function "debugger_output", (nameN, name)];  | 
|
| 60830 | 813  | 
|
814  | 
||
| 
55553
 
99409ccbe04a
more standard names for protocol and markup elements;
 
wenzelm 
parents: 
55551 
diff
changeset
 | 
815  | 
(* simplifier trace *)  | 
| 
 
99409ccbe04a
more standard names for protocol and markup elements;
 
wenzelm 
parents: 
55551 
diff
changeset
 | 
816  | 
|
| 
57594
 
037f3b251df5
regular message to refer to Simplifier Trace panel (unused);
 
wenzelm 
parents: 
56864 
diff
changeset
 | 
817  | 
val simp_trace_panelN = "simp_trace_panel";  | 
| 
 
037f3b251df5
regular message to refer to Simplifier Trace panel (unused);
 
wenzelm 
parents: 
56864 
diff
changeset
 | 
818  | 
|
| 
55553
 
99409ccbe04a
more standard names for protocol and markup elements;
 
wenzelm 
parents: 
55551 
diff
changeset
 | 
819  | 
val simp_trace_logN = "simp_trace_log";  | 
| 
 
99409ccbe04a
more standard names for protocol and markup elements;
 
wenzelm 
parents: 
55551 
diff
changeset
 | 
820  | 
val simp_trace_stepN = "simp_trace_step";  | 
| 
 
99409ccbe04a
more standard names for protocol and markup elements;
 
wenzelm 
parents: 
55551 
diff
changeset
 | 
821  | 
val simp_trace_recurseN = "simp_trace_recurse";  | 
| 
 
99409ccbe04a
more standard names for protocol and markup elements;
 
wenzelm 
parents: 
55551 
diff
changeset
 | 
822  | 
val simp_trace_hintN = "simp_trace_hint";  | 
| 
 
99409ccbe04a
more standard names for protocol and markup elements;
 
wenzelm 
parents: 
55551 
diff
changeset
 | 
823  | 
val simp_trace_ignoreN = "simp_trace_ignore";  | 
| 
 
99409ccbe04a
more standard names for protocol and markup elements;
 
wenzelm 
parents: 
55551 
diff
changeset
 | 
824  | 
|
| 76394 | 825  | 
fun simp_trace_cancel i = [function "simp_trace_cancel", (serialN, Value.print_int i)];  | 
| 
55553
 
99409ccbe04a
more standard names for protocol and markup elements;
 
wenzelm 
parents: 
55551 
diff
changeset
 | 
826  | 
|
| 27969 | 827  | 
|
| 
55672
 
5e25cc741ab9
support for completion within the formal context;
 
wenzelm 
parents: 
55666 
diff
changeset
 | 
828  | 
|
| 30221 | 829  | 
(** print mode operations **)  | 
| 23704 | 830  | 
|
| 
69345
 
6bd63c94cf62
tuned signature (see also src/Tools/Haskell/Markup.hs);
 
wenzelm 
parents: 
69320 
diff
changeset
 | 
831  | 
type output = Output.output * Output.output;  | 
| 
 
6bd63c94cf62
tuned signature (see also src/Tools/Haskell/Markup.hs);
 
wenzelm 
parents: 
69320 
diff
changeset
 | 
832  | 
|
| 29325 | 833  | 
val no_output = ("", "");
 | 
| 23704 | 834  | 
|
835  | 
local  | 
|
| 
62933
 
f14569a9ab93
proper output of markup, e.g. relevant for nested ML as used in Pure/System/bash.ML;
 
wenzelm 
parents: 
62806 
diff
changeset
 | 
836  | 
  val default = {output = Output_Primitives.markup_fn};
 | 
| 43684 | 837  | 
  val modes = Synchronized.var "Markup.modes" (Symtab.make [("", default)]);
 | 
| 23704 | 838  | 
in  | 
| 43684 | 839  | 
fun add_mode name output =  | 
| 
46894
 
e2ad717ec889
allow redefining pretty/markup modes (not output due to bootstrap issues) -- to support reloading of theory src/HOL/src/Tools/Code_Generator;
 
wenzelm 
parents: 
45674 
diff
changeset
 | 
840  | 
Synchronized.change modes (fn tab =>  | 
| 
 
e2ad717ec889
allow redefining pretty/markup modes (not output due to bootstrap issues) -- to support reloading of theory src/HOL/src/Tools/Code_Generator;
 
wenzelm 
parents: 
45674 
diff
changeset
 | 
841  | 
(if not (Symtab.defined tab name) then ()  | 
| 61209 | 842  | 
       else Output.warning ("Redefining markup mode " ^ quote name);
 | 
| 
46894
 
e2ad717ec889
allow redefining pretty/markup modes (not output due to bootstrap issues) -- to support reloading of theory src/HOL/src/Tools/Code_Generator;
 
wenzelm 
parents: 
45674 
diff
changeset
 | 
843  | 
       Symtab.update (name, {output = output}) tab));
 | 
| 23704 | 844  | 
fun get_mode () =  | 
| 43684 | 845  | 
the_default default  | 
846  | 
(Library.get_first (Symtab.lookup (Synchronized.value modes)) (print_mode_value ()));  | 
|
| 23623 | 847  | 
end;  | 
| 23704 | 848  | 
|
| 
38474
 
e498dc2eb576
uniform Markup.empty/Markup.Empty in ML and Scala;
 
wenzelm 
parents: 
38429 
diff
changeset
 | 
849  | 
fun output m = if is_empty m then no_output else #output (get_mode ()) m;  | 
| 23704 | 850  | 
|
| 23719 | 851  | 
val enclose = output #-> Library.enclose;  | 
852  | 
||
| 25552 | 853  | 
fun markup m =  | 
854  | 
let val (bg, en) = output m  | 
|
855  | 
in Library.enclose (Output.escape bg) (Output.escape en) end;  | 
|
856  | 
||
| 59125 | 857  | 
val markups = fold_rev markup;  | 
858  | 
||
| 43665 | 859  | 
fun markup_only m = markup m "";  | 
860  | 
||
| 
55956
 
94d384d621b0
reject internal term names outright, and complete consts instead;
 
wenzelm 
parents: 
55919 
diff
changeset
 | 
861  | 
fun markup_report "" = ""  | 
| 
 
94d384d621b0
reject internal term names outright, and complete consts instead;
 
wenzelm 
parents: 
55919 
diff
changeset
 | 
862  | 
| markup_report txt = markup report txt;  | 
| 
 
94d384d621b0
reject internal term names outright, and complete consts instead;
 
wenzelm 
parents: 
55919 
diff
changeset
 | 
863  | 
|
| 23704 | 864  | 
end;  |