doc-src/rail.ML
changeset 36973 b0033a307d1f
parent 32449 696d64ed85da
child 37216 3165bc303f66
equal deleted inserted replaced
36972:aa4bc5a4be1d 36973:b0033a307d1f
    57 
    57 
    58 val markup_table =
    58 val markup_table =
    59 (*  [(kind, (markup, check, style))*)
    59 (*  [(kind, (markup, check, style))*)
    60   Symtab.make [
    60   Symtab.make [
    61   ("syntax", ("", no_check, true)),
    61   ("syntax", ("", no_check, true)),
    62   ("command", ("isacommand", K (is_some o OuterKeyword.command_keyword), true)),
    62   ("command", ("isacommand", K (is_some o Keyword.command_keyword), true)),
    63   ("keyword", ("isakeyword", K OuterKeyword.is_keyword, true)),
    63   ("keyword", ("isakeyword", K Keyword.is_keyword, true)),
    64   ("element", ("isakeyword", K OuterKeyword.is_keyword, true)),
    64   ("element", ("isakeyword", K Keyword.is_keyword, true)),
    65   ("method", ("", thy_check Method.intern Method.defined, true)),
    65   ("method", ("", thy_check Method.intern Method.defined, true)),
    66   ("attribute", ("", thy_check Attrib.intern Attrib.defined, true)),
    66   ("attribute", ("", thy_check Attrib.intern Attrib.defined, true)),
    67   ("fact", ("", no_check, true)),
    67   ("fact", ("", no_check, true)),
    68   ("variable", ("", no_check, true)),
    68   ("variable", ("", no_check, true)),
    69   ("case", ("", no_check, true)),
    69   ("case", ("", no_check, true)),
   471 fun process txt ctxt =
   471 fun process txt ctxt =
   472   lex txt ctxt
   472   lex txt ctxt
   473   |> parse
   473   |> parse
   474   |> print;
   474   |> print;
   475 
   475 
   476 val _ = ThyOutput.antiquotation "rail" (Scan.lift ( OuterParse.position Args.name ))
   476 val _ = ThyOutput.antiquotation "rail" (Scan.lift (Parse.position Args.name))
   477   (fn {context = ctxt,...} => fn txt => process txt ctxt);
   477   (fn {context = ctxt,...} => fn txt => process txt ctxt);
   478 
   478 
   479 end;
   479 end;
   480 
   480