| author | wenzelm | 
| Tue, 29 Mar 2016 16:20:48 +0200 | |
| changeset 62749 | eba34ff9671c | 
| parent 62453 | b93cc7d73431 | 
| child 62876 | 507c90523113 | 
| permissions | -rw-r--r-- | 
| 48879 | 1 | (* Title: Pure/pure_syn.ML | 
| 2 | Author: Makarius | |
| 3 | ||
| 60096 | 4 | Outer syntax for bootstrapping: commands that are accessible outside a | 
| 5 | regular theory context. | |
| 48879 | 6 | *) | 
| 7 | ||
| 60095 | 8 | signature PURE_SYN = | 
| 9 | sig | |
| 10 | val bootstrap_thy: theory | |
| 11 | end; | |
| 12 | ||
| 13 | structure Pure_Syn: PURE_SYN = | |
| 48879 | 14 | struct | 
| 15 | ||
| 58928 
23d0ffd48006
plain value Keywords.keywords, which might be used outside theory for bootstrap purposes;
 wenzelm parents: 
58918diff
changeset | 16 | val _ = | 
| 58999 
ed09ae4ea2d8
uniform treatment of all document markup commands: 'text' and 'txt' merely differ in LaTeX style;
 wenzelm parents: 
58928diff
changeset | 17 |   Outer_Syntax.command ("chapter", @{here}) "chapter heading"
 | 
| 61457 | 18 |     (Parse.opt_target -- Parse.document_source >> Thy_Output.document_command {markdown = false});
 | 
| 58999 
ed09ae4ea2d8
uniform treatment of all document markup commands: 'text' and 'txt' merely differ in LaTeX style;
 wenzelm parents: 
58928diff
changeset | 19 | |
| 
ed09ae4ea2d8
uniform treatment of all document markup commands: 'text' and 'txt' merely differ in LaTeX style;
 wenzelm parents: 
58928diff
changeset | 20 | val _ = | 
| 
ed09ae4ea2d8
uniform treatment of all document markup commands: 'text' and 'txt' merely differ in LaTeX style;
 wenzelm parents: 
58928diff
changeset | 21 |   Outer_Syntax.command ("section", @{here}) "section heading"
 | 
| 61457 | 22 |     (Parse.opt_target -- Parse.document_source >> Thy_Output.document_command {markdown = false});
 | 
| 58918 | 23 | |
| 48879 | 24 | val _ = | 
| 58999 
ed09ae4ea2d8
uniform treatment of all document markup commands: 'text' and 'txt' merely differ in LaTeX style;
 wenzelm parents: 
58928diff
changeset | 25 |   Outer_Syntax.command ("subsection", @{here}) "subsection heading"
 | 
| 61457 | 26 |     (Parse.opt_target -- Parse.document_source >> Thy_Output.document_command {markdown = false});
 | 
| 58999 
ed09ae4ea2d8
uniform treatment of all document markup commands: 'text' and 'txt' merely differ in LaTeX style;
 wenzelm parents: 
58928diff
changeset | 27 | |
| 
ed09ae4ea2d8
uniform treatment of all document markup commands: 'text' and 'txt' merely differ in LaTeX style;
 wenzelm parents: 
58928diff
changeset | 28 | val _ = | 
| 
ed09ae4ea2d8
uniform treatment of all document markup commands: 'text' and 'txt' merely differ in LaTeX style;
 wenzelm parents: 
58928diff
changeset | 29 |   Outer_Syntax.command ("subsubsection", @{here}) "subsubsection heading"
 | 
| 61457 | 30 |     (Parse.opt_target -- Parse.document_source >> Thy_Output.document_command {markdown = false});
 | 
| 58928 
23d0ffd48006
plain value Keywords.keywords, which might be used outside theory for bootstrap purposes;
 wenzelm parents: 
58918diff
changeset | 31 | |
| 
23d0ffd48006
plain value Keywords.keywords, which might be used outside theory for bootstrap purposes;
 wenzelm parents: 
58918diff
changeset | 32 | val _ = | 
| 61463 | 33 |   Outer_Syntax.command ("paragraph", @{here}) "paragraph heading"
 | 
| 34 |     (Parse.opt_target -- Parse.document_source >> Thy_Output.document_command {markdown = false});
 | |
| 35 | ||
| 36 | val _ = | |
| 37 |   Outer_Syntax.command ("subparagraph", @{here}) "subparagraph heading"
 | |
| 38 |     (Parse.opt_target -- Parse.document_source >> Thy_Output.document_command {markdown = false});
 | |
| 39 | ||
| 40 | val _ = | |
| 58999 
ed09ae4ea2d8
uniform treatment of all document markup commands: 'text' and 'txt' merely differ in LaTeX style;
 wenzelm parents: 
58928diff
changeset | 41 |   Outer_Syntax.command ("text", @{here}) "formal comment (primary style)"
 | 
| 61457 | 42 |     (Parse.opt_target -- Parse.document_source >> Thy_Output.document_command {markdown = true});
 | 
| 58928 
23d0ffd48006
plain value Keywords.keywords, which might be used outside theory for bootstrap purposes;
 wenzelm parents: 
58918diff
changeset | 43 | |
| 
23d0ffd48006
plain value Keywords.keywords, which might be used outside theory for bootstrap purposes;
 wenzelm parents: 
58918diff
changeset | 44 | val _ = | 
| 58999 
ed09ae4ea2d8
uniform treatment of all document markup commands: 'text' and 'txt' merely differ in LaTeX style;
 wenzelm parents: 
58928diff
changeset | 45 |   Outer_Syntax.command ("txt", @{here}) "formal comment (secondary style)"
 | 
| 61457 | 46 |     (Parse.opt_target -- Parse.document_source >> Thy_Output.document_command {markdown = true});
 | 
| 58999 
ed09ae4ea2d8
uniform treatment of all document markup commands: 'text' and 'txt' merely differ in LaTeX style;
 wenzelm parents: 
58928diff
changeset | 47 | |
| 
ed09ae4ea2d8
uniform treatment of all document markup commands: 'text' and 'txt' merely differ in LaTeX style;
 wenzelm parents: 
58928diff
changeset | 48 | val _ = | 
| 61464 | 49 |   Outer_Syntax.command ("text_raw", @{here}) "LaTeX text (without surrounding environment)"
 | 
| 50 |     (Parse.opt_target -- Parse.document_source >> Thy_Output.document_command {markdown = true});
 | |
| 58928 
23d0ffd48006
plain value Keywords.keywords, which might be used outside theory for bootstrap purposes;
 wenzelm parents: 
58918diff
changeset | 51 | |
| 
23d0ffd48006
plain value Keywords.keywords, which might be used outside theory for bootstrap purposes;
 wenzelm parents: 
58918diff
changeset | 52 | val _ = | 
| 
23d0ffd48006
plain value Keywords.keywords, which might be used outside theory for bootstrap purposes;
 wenzelm parents: 
58918diff
changeset | 53 |   Outer_Syntax.command ("theory", @{here}) "begin theory"
 | 
| 58852 | 54 | (Thy_Header.args >> | 
| 55 | (fn _ => Toplevel.init_theory (fn () => error "Missing theory initialization"))); | |
| 48879 | 56 | |
| 60095 | 57 | |
| 58 | val bootstrap_thy = ML_Context.the_global_context (); | |
| 59 | ||
| 60 | val _ = Theory.setup (Config.put_global Outer_Syntax.bootstrap false); | |
| 61 | ||
| 48879 | 62 | end; |