src/Pure/Syntax/syn_ext.ML
changeset 15973 5fd94d84470f
parent 15835 fdf678bec567
child 16610 58bf09036a6d
equal deleted inserted replaced
15972:8ac3803c8f73 15973:5fd94d84470f
   214   val scan_symb =
   214   val scan_symb =
   215     scan_sym >> SOME ||
   215     scan_sym >> SOME ||
   216     $$ "'" -- Scan.one Symbol.is_blank >> K NONE;
   216     $$ "'" -- Scan.one Symbol.is_blank >> K NONE;
   217 
   217 
   218   val scan_symbs = Scan.repeat scan_symb --| Scan.ahead (Scan.one (not_equal "'"));
   218   val scan_symbs = Scan.repeat scan_symb --| Scan.ahead (Scan.one (not_equal "'"));
   219   val read_symbs = List.mapPartial I o valOf o Scan.read Symbol.stopper scan_symbs;
   219   val read_symbs = List.mapPartial I o the o Scan.read Symbol.stopper scan_symbs;
   220 
   220 
   221   fun unique_index xsymbs =
   221   fun unique_index xsymbs =
   222     if length (List.filter is_index xsymbs) <= 1 then xsymbs
   222     if length (List.filter is_index xsymbs) <= 1 then xsymbs
   223     else error "Duplicate index arguments (\\<index>)";
   223     else error "Duplicate index arguments (\\<index>)";
   224 in
   224 in