src/Pure/Isar/outer_parse.ML
changeset 9037 91cbae314c84
parent 8897 fb1436ca3b2e
child 9131 cd17637c917f
equal deleted inserted replaced
9036:d9e09ef531dd 9037:91cbae314c84
    47   val simple_arity: token list -> (string list * xclass) * token list
    47   val simple_arity: token list -> (string list * xclass) * token list
    48   val type_args: token list -> string list * token list
    48   val type_args: token list -> string list * token list
    49   val typ: token list -> string * token list
    49   val typ: token list -> string * token list
    50   val opt_infix: token list -> Syntax.mixfix * token list
    50   val opt_infix: token list -> Syntax.mixfix * token list
    51   val opt_mixfix: token list -> Syntax.mixfix * token list
    51   val opt_mixfix: token list -> Syntax.mixfix * token list
       
    52   val opt_infix': token list -> Syntax.mixfix * token list
       
    53   val opt_mixfix': token list -> Syntax.mixfix * token list
    52   val const: token list -> (bstring * string * Syntax.mixfix) * token list
    54   val const: token list -> (bstring * string * Syntax.mixfix) * token list
    53   val term: token list -> string * token list
    55   val term: token list -> string * token list
    54   val prop: token list -> string * token list
    56   val prop: token list -> string * token list
    55   val propp: token list -> (string * (string list * string list)) * token list
    57   val propp: token list -> (string * (string list * string list)) * token list
    56   val termp: token list -> (string * string list) * token list
    58   val termp: token list -> (string * string list) * token list
   210 
   212 
   211 val mixfix =
   213 val mixfix =
   212   (string -- !!! (opt_pris -- Scan.optional nat Syntax.max_pri))
   214   (string -- !!! (opt_pris -- Scan.optional nat Syntax.max_pri))
   213   >> (Syntax.Mixfix o triple2);
   215   >> (Syntax.Mixfix o triple2);
   214 
   216 
   215 fun opt_fix fix =
   217 fun opt_fix guard fix =
   216   Scan.optional ($$$ "(" |-- fix --| $$$ ")") Syntax.NoSyn;
   218   Scan.optional ($$$ "(" |-- guard (fix --| $$$ ")")) Syntax.NoSyn;
   217 
   219 
   218 val opt_infix = opt_fix (infxl || infxr);
   220 val opt_infix = opt_fix !!! (infxl || infxr);
   219 val opt_mixfix = opt_fix (mixfix || binder || infxl || infxr);
   221 val opt_mixfix = opt_fix !!! (mixfix || binder || infxl || infxr);
       
   222 
       
   223 val opt_infix' = opt_fix I (infxl || infxr);
       
   224 val opt_mixfix' = opt_fix I (mixfix || binder || infxl || infxr);
   220 
   225 
   221 
   226 
   222 (* consts *)
   227 (* consts *)
   223 
   228 
   224 val const =
   229 val const =