src/Pure/Thy/thy_header.ML
changeset 62453 b93cc7d73431
parent 61463 8e46cea6a45a
child 62849 caaa2fc4040d
equal deleted inserted replaced
62452:f25b67245699 62453:b93cc7d73431
    40   {name = name, imports = imports, keywords = keywords};
    40   {name = name, imports = imports, keywords = keywords};
    41 
    41 
    42 
    42 
    43 (* bootstrap keywords *)
    43 (* bootstrap keywords *)
    44 
    44 
    45 val headerN = "header";  (* FIXME legacy *)
       
    46 
       
    47 val chapterN = "chapter";
    45 val chapterN = "chapter";
    48 val sectionN = "section";
    46 val sectionN = "section";
    49 val subsectionN = "subsection";
    47 val subsectionN = "subsection";
    50 val subsubsectionN = "subsubsection";
    48 val subsubsectionN = "subsubsection";
    51 val paragraphN = "paragraph";
    49 val paragraphN = "paragraph";
    70      (("==", @{here}), NONE),
    68      (("==", @{here}), NONE),
    71      (("and", @{here}), NONE),
    69      (("and", @{here}), NONE),
    72      ((beginN, @{here}), NONE),
    70      ((beginN, @{here}), NONE),
    73      ((importsN, @{here}), NONE),
    71      ((importsN, @{here}), NONE),
    74      ((keywordsN, @{here}), NONE),
    72      ((keywordsN, @{here}), NONE),
    75      ((headerN, @{here}), SOME ((Keyword.document_heading, []), [])),
       
    76      ((chapterN, @{here}), SOME ((Keyword.document_heading, []), [])),
    73      ((chapterN, @{here}), SOME ((Keyword.document_heading, []), [])),
    77      ((sectionN, @{here}), SOME ((Keyword.document_heading, []), [])),
    74      ((sectionN, @{here}), SOME ((Keyword.document_heading, []), [])),
    78      ((subsectionN, @{here}), SOME ((Keyword.document_heading, []), [])),
    75      ((subsectionN, @{here}), SOME ((Keyword.document_heading, []), [])),
    79      ((subsubsectionN, @{here}), SOME ((Keyword.document_heading, []), [])),
    76      ((subsubsectionN, @{here}), SOME ((Keyword.document_heading, []), [])),
    80      ((paragraphN, @{here}), SOME ((Keyword.document_heading, []), [])),
    77      ((paragraphN, @{here}), SOME ((Keyword.document_heading, []), [])),
   145 
   142 
   146 
   143 
   147 (* read header *)
   144 (* read header *)
   148 
   145 
   149 val heading =
   146 val heading =
   150   (Parse.command headerN ||
   147   (Parse.command chapterN ||
   151     Parse.command chapterN ||
       
   152     Parse.command sectionN ||
   148     Parse.command sectionN ||
   153     Parse.command subsectionN ||
   149     Parse.command subsectionN ||
   154     Parse.command subsubsectionN ||
   150     Parse.command subsubsectionN ||
   155     Parse.command paragraphN ||
   151     Parse.command paragraphN ||
   156     Parse.command subparagraphN ||
   152     Parse.command subparagraphN ||