src/Pure/Tools/codegen_serializer.ML
changeset 21895 6cbc0f69a21c
parent 21882 04d8633fbd2f
child 21911 e29bcab0c81c
equal deleted inserted replaced
21894:1a0e32ccb8bb 21895:6cbc0f69a21c
   148     | ((b, p as _ :: _ :: _), []) => mk_mixfix (if b then NOBR else BR, p)
   148     | ((b, p as _ :: _ :: _), []) => mk_mixfix (if b then NOBR else BR, p)
   149     | _ => Scan.!! (the_default ("malformed mixfix annotation: " ^ quote s) o snd) Scan.fail ()
   149     | _ => Scan.!! (the_default ("malformed mixfix annotation: " ^ quote s) o snd) Scan.fail ()
   150   end;
   150   end;
   151 
   151 
   152 fun parse_args f args =
   152 fun parse_args f args =
   153   case f args
   153   case Scan.read Args.stopper f args
   154    of (x, []) => x
   154    of SOME x => x
   155     | (_, _) => error "bad serializer arguments";
   155     | NONE => error "bad serializer arguments";
   156 
   156 
   157 
   157 
   158 (* list and string serializer *)
   158 (* list and string serializer *)
   159 
   159 
   160 fun implode_list c_nil c_cons e =
   160 fun implode_list c_nil c_cons e =