src/Tools/code/code_target.ML
changeset 27809 a1e409db516b
parent 27757 650af1991b8b
child 27845 141772c866c9
equal deleted inserted replaced
27808:4dd3d5efcc7f 27809:a1e409db516b
   316   end;
   316   end;
   317 
   317 
   318 fun serialize thy = mount_serializer thy NONE;
   318 fun serialize thy = mount_serializer thy NONE;
   319 
   319 
   320 fun parse_args f args =
   320 fun parse_args f args =
   321   case Scan.read Args.stopper f args
   321   case Scan.read OuterLex.stopper f args
   322    of SOME x => x
   322    of SOME x => x
   323     | NONE => error "Bad serializer arguments";
   323     | NONE => error "Bad serializer arguments";
   324 
   324 
   325 
   325 
   326 (** generic code combinators **)
   326 (** generic code combinators **)
  2241 fun code_exprP cmd =
  2241 fun code_exprP cmd =
  2242   (Scan.repeat P.term_group
  2242   (Scan.repeat P.term_group
  2243   -- Scan.repeat (P.$$$ inK |-- P.name
  2243   -- Scan.repeat (P.$$$ inK |-- P.name
  2244      -- Scan.option (P.$$$ module_nameK |-- P.name)
  2244      -- Scan.option (P.$$$ module_nameK |-- P.name)
  2245      -- Scan.option (P.$$$ fileK |-- P.name)
  2245      -- Scan.option (P.$$$ fileK |-- P.name)
  2246      -- Scan.optional (P.$$$ "(" |-- P.arguments --| P.$$$ ")") []
  2246      -- Scan.optional (P.$$$ "(" |-- Args.parse --| P.$$$ ")") []
  2247   ) >> (fn (raw_cs, seris) => cmd raw_cs seris));
  2247   ) >> (fn (raw_cs, seris) => cmd raw_cs seris));
  2248 
  2248 
  2249 val _ = List.app OuterKeyword.keyword [infixK, infixlK, infixrK, inK, module_nameK, fileK];
  2249 val _ = List.app OuterKeyword.keyword [infixK, infixlK, infixrK, inK, module_nameK, fileK];
  2250 
  2250 
  2251 val _ =
  2251 val _ =