src/Pure/Isar/spec_parse.ML
changeset 27378 0968c0d0b969
parent 26361 7946f459c6c8
child 27816 0dfed2f2822a
equal deleted inserted replaced
27377:0b9295c598f6 27378:0968c0d0b969
    54 val attribs = P.$$$ "[" |-- P.list attrib --| P.$$$ "]";
    54 val attribs = P.$$$ "[" |-- P.list attrib --| P.$$$ "]";
    55 val opt_attribs = Scan.optional attribs [];
    55 val opt_attribs = Scan.optional attribs [];
    56 
    56 
    57 fun thm_name s = P.name -- opt_attribs --| P.$$$ s;
    57 fun thm_name s = P.name -- opt_attribs --| P.$$$ s;
    58 fun opt_thm_name s =
    58 fun opt_thm_name s =
    59   Scan.optional ((P.name -- opt_attribs || (attribs >> pair "")) --| P.$$$ s) ("", []);
    59   Scan.optional ((P.name -- opt_attribs || attribs >> pair "") --| P.$$$ s) ("", []);
    60 
    60 
    61 val spec = opt_thm_name ":" -- Scan.repeat1 P.prop;
    61 val spec = opt_thm_name ":" -- Scan.repeat1 P.prop;
    62 val named_spec = thm_name ":" -- Scan.repeat1 P.prop;
    62 val named_spec = thm_name ":" -- Scan.repeat1 P.prop;
    63 
    63 
    64 val spec_name = thm_name ":" -- P.prop >> (fn ((x, y), z) => ((x, z), y));
    64 val spec_name = thm_name ":" -- P.prop >> (fn ((x, y), z) => ((x, z), y));