Commits

camlspotter committed fc8505a

removed unnecessary files

  • Participants
  • Parent commits 6e77c4c
  • Branches module

Comments (0)

Files changed (4)

File parsing/plparser.ml

-(* header *)
-open Parsing
-open Token
-open Planck
-open Token.Parser
-open Plphelper
-
-
-open Location
-open Asttypes
-open Longident
-open Parsetree
-
-let mktyp d =
-  { ptyp_desc = d; ptyp_loc = symbol_rloc() }
-let mkpat d =
-  { ppat_desc = d; ppat_loc = symbol_rloc() }
-let mkexp d =
-  { pexp_desc = d; pexp_loc = symbol_rloc() }
-let mkmty d =
-  { pmty_desc = d; pmty_loc = symbol_rloc() }
-let mksig d =
-  { psig_desc = d; psig_loc = symbol_rloc() }
-let mkmod d =
-  { pmod_desc = d; pmod_loc = symbol_rloc() }
-let mkstr d =
-  { pstr_desc = d; pstr_loc = symbol_rloc() }
-let mkfield d =
-  { pfield_desc = d; pfield_loc = symbol_rloc() }
-let mkclass d =
-  { pcl_desc = d; pcl_loc = symbol_rloc() }
-let mkcty d =
-  { pcty_desc = d; pcty_loc = symbol_rloc() }
-
-let reloc_pat x = { x with ppat_loc = symbol_rloc () };;
-let reloc_exp x = { x with pexp_loc = symbol_rloc () };;
-
-let mkoperator name pos =
-  { pexp_desc = Pexp_ident(Lident name); pexp_loc = rhs_loc pos }
-
-(*
-  Ghost expressions and patterns:
-  expressions and patterns that do not appear explicitely in the
-  source file they have the loc_ghost flag set to true.
-  Then the profiler will not try to instrument them and the
-  -stypes option will not try to display their type.
-
-  Every grammar rule that generates an element with a location must
-  make at most one non-ghost element, the topmost one.
-
-  How to tell whether your location must be ghost:
-  A location corresponds to a range of characters in the source file.
-  If the location contains a piece of code that is syntactically
-  valid (according to the documentation), and corresponds to the
-  AST node, then the location must be real; in all other cases,
-  it must be ghost.
-*)
-let ghexp d = { pexp_desc = d; pexp_loc = symbol_gloc () };;
-let ghpat d = { ppat_desc = d; ppat_loc = symbol_gloc () };;
-let ghtyp d = { ptyp_desc = d; ptyp_loc = symbol_gloc () };;
-
-let mkassert e =
-  match e with
-  | {pexp_desc = Pexp_construct (Lident "false", None, false); _ } ->
-         mkexp (Pexp_assertfalse)
-  | _ -> mkexp (Pexp_assert (e))
-;;
-
-let mkinfix arg1 name arg2 =
-  mkexp(Pexp_apply(mkoperator name 2, ["", arg1; "", arg2]))
-
-let neg_float_string f =
-  if String.length f > 0 && String.unsafe_get f 0 = '-'
-  then String.sub f 1 (String.length f - 1)
-  else "-" ^ f
-
-let mkuminus name arg =
-  match name, arg.pexp_desc with
-  | "-", Pexp_constant(Const_int n) ->
-      mkexp(Pexp_constant(Const_int(-n)))
-  | "-", Pexp_constant(Const_int32 n) ->
-      mkexp(Pexp_constant(Const_int32(Int32.neg n)))
-  | "-", Pexp_constant(Const_int64 n) ->
-      mkexp(Pexp_constant(Const_int64(Int64.neg n)))
-  | "-", Pexp_constant(Const_nativeint n) ->
-      mkexp(Pexp_constant(Const_nativeint(Nativeint.neg n)))
-  | ("-" | "-."), Pexp_constant(Const_float f) ->
-      mkexp(Pexp_constant(Const_float(neg_float_string f)))
-  | _ ->
-      mkexp(Pexp_apply(mkoperator ("~" ^ name) 1, ["", arg]))
-
-let mkuplus name arg =
-  let desc = arg.pexp_desc in
-  match name, desc with
-  | "+", Pexp_constant(Const_int _)
-  | "+", Pexp_constant(Const_int32 _)
-  | "+", Pexp_constant(Const_int64 _)
-  | "+", Pexp_constant(Const_nativeint _)
-  | ("+" | "+."), Pexp_constant(Const_float _) -> mkexp desc
-  | _ ->
-      mkexp(Pexp_apply(mkoperator ("~" ^ name) 1, ["", arg]))
-
-let rec mktailexp = function
-    [] ->
-      ghexp(Pexp_construct(Lident "[]", None, false))
-  | e1 :: el ->
-      let exp_el = mktailexp el in
-      let l = {loc_start = e1.pexp_loc.loc_start;
-               loc_end = exp_el.pexp_loc.loc_end;
-               loc_ghost = true}
-      in
-      let arg = {pexp_desc = Pexp_tuple [e1; exp_el]; pexp_loc = l} in
-      {pexp_desc = Pexp_construct(Lident "::", Some arg, false); pexp_loc = l}
-
-let rec mktailpat = function
-    [] ->
-      ghpat(Ppat_construct(Lident "[]", None, false))
-  | p1 :: pl ->
-      let pat_pl = mktailpat pl in
-      let l = {loc_start = p1.ppat_loc.loc_start;
-               loc_end = pat_pl.ppat_loc.loc_end;
-               loc_ghost = true}
-      in
-      let arg = {ppat_desc = Ppat_tuple [p1; pat_pl]; ppat_loc = l} in
-      {ppat_desc = Ppat_construct(Lident "::", Some arg, false); ppat_loc = l}
-
-let ghstrexp e =
-  { pstr_desc = Pstr_eval e; pstr_loc = {e.pexp_loc with loc_ghost = true} }
-
-let array_function str name =
-  Ldot(Lident str, (if !Clflags.fast then "unsafe_" ^ name else name))
-
-let rec deep_mkrangepat c1 c2 =
-  if c1 = c2 then ghpat(Ppat_constant(Const_char c1)) else
-  ghpat(Ppat_or(ghpat(Ppat_constant(Const_char c1)),
-                deep_mkrangepat (Char.chr(Char.code c1 + 1)) c2))
-
-let rec mkrangepat c1 c2 =
-  if c1 > c2 then mkrangepat c2 c1 else
-  if c1 = c2 then mkpat(Ppat_constant(Const_char c1)) else
-  reloc_pat (deep_mkrangepat c1 c2)
-
-let syntax_error () =
-  raise Syntaxerr.Escape_error
-
-let unclosed opening_name opening_num closing_name closing_num =
-  raise(Syntaxerr.Error(Syntaxerr.Unclosed(rhs_loc opening_num, opening_name,
-                                           rhs_loc closing_num, closing_name)))
-
-let bigarray_function str name =
-  Ldot(Ldot(Lident "Bigarray", str), name)
-
-let bigarray_untuplify = function
-    { pexp_desc = Pexp_tuple explist; _ } -> explist
-  | exp -> [exp]
-
-let bigarray_get arr arg =
-  let get = if !Clflags.fast then "unsafe_get" else "get" in
-  match bigarray_untuplify arg with
-    [c1] ->
-      mkexp(Pexp_apply(ghexp(Pexp_ident(bigarray_function "Array1" get)),
-                       ["", arr; "", c1]))
-  | [c1;c2] ->
-      mkexp(Pexp_apply(ghexp(Pexp_ident(bigarray_function "Array2" get)),
-                       ["", arr; "", c1; "", c2]))
-  | [c1;c2;c3] ->
-      mkexp(Pexp_apply(ghexp(Pexp_ident(bigarray_function "Array3" get)),
-                       ["", arr; "", c1; "", c2; "", c3]))
-  | coords ->
-      mkexp(Pexp_apply(ghexp(Pexp_ident(bigarray_function "Genarray" "get")),
-                       ["", arr; "", ghexp(Pexp_array coords)]))
-
-let bigarray_set arr arg newval =
-  let set = if !Clflags.fast then "unsafe_set" else "set" in
-  match bigarray_untuplify arg with
-    [c1] ->
-      mkexp(Pexp_apply(ghexp(Pexp_ident(bigarray_function "Array1" set)),
-                       ["", arr; "", c1; "", newval]))
-  | [c1;c2] ->
-      mkexp(Pexp_apply(ghexp(Pexp_ident(bigarray_function "Array2" set)),
-                       ["", arr; "", c1; "", c2; "", newval]))
-  | [c1;c2;c3] ->
-      mkexp(Pexp_apply(ghexp(Pexp_ident(bigarray_function "Array3" set)),
-                       ["", arr; "", c1; "", c2; "", c3; "", newval]))
-  | coords ->
-      mkexp(Pexp_apply(ghexp(Pexp_ident(bigarray_function "Genarray" "set")),
-                       ["", arr;
-                        "", ghexp(Pexp_array coords);
-                        "", newval]))
-
-let lapply p1 p2 =
-  if !Clflags.applicative_functors
-  then Lapply(p1, p2)
-  else raise (Syntaxerr.Error(Syntaxerr.Applicative_path (symbol_rloc())))
-
-let exp_of_label lbl =
-  mkexp (Pexp_ident(Lident(Longident.last lbl)))
-
-let pat_of_label lbl =
-  mkpat (Ppat_var(Longident.last lbl))
-
-(* ops! *)
-
-let infix arg1 name arg2 f = 
-  let reg2 = rhs_reg 2 in
-  Op_prec.infix name (fun (arg1, reg1) (arg2, reg3) ->
-    let pos_back = !symbol_rloc_ref in
-    let cntr = push_rhs_tbl ("infix_" ^ name) in
-    Spotlib.Spot.protect (fun () -> 
-      add_rhs_pos reg1;
-      add_rhs_pos reg2;
-      add_rhs_pos reg3;
-      prepare_symbol_rloc ();
-      let pos = !symbol_rloc_ref in
-      let res = f arg1 name arg2 in
-      res, pos) () ~finally: (fun () -> 
-        pop_rhs_tbl cntr;
-        symbol_rloc_ref := pos_back
-    );
-  ) arg1 arg2
-
-let mkinfix arg1 name arg2 = infix arg1 name arg2 mkinfix
-
-(* CR jfuruse: can be merged with mku_op *)
-let mkpat_prefix f name v_2 =
-  let reg1 = rhs_reg 1 in
-  Op_prec.prefix name (fun (arg, reg) ->
-    let pos_back = !symbol_rloc_ref in
-    let cntr = push_rhs_tbl ("mkpat_prefix_" ^ name) in
-    Spotlib.Spot.protect (fun () ->
-      add_rhs_pos reg1;
-      add_rhs_pos reg;
-      prepare_symbol_rloc ();
-      let pos = !symbol_rloc_ref in
-      let res = f arg in
-      res, pos) () ~finally: (fun () -> 
-        pop_rhs_tbl cntr;
-        symbol_rloc_ref := pos_back);
-  ) v_2
-
-let mkpat_postfix f name v_1 =
-  let reg2 = rhs_reg 2 in
-  let reg3 = rhs_reg 3 in
-  Op_prec.postfix name (fun (v_1, reg1) ->
-    let pos_back = !symbol_rloc_ref in
-    let cntr = push_rhs_tbl ("mkpat_postfix_" ^ name) in
-    Spotlib.Spot.protect (fun () ->
-      add_rhs_pos reg1;
-      add_rhs_pos reg2;
-      add_rhs_pos reg3;
-      prepare_symbol_rloc ();
-      let pos = !symbol_rloc_ref in
-      let res = f v_1 in
-      res, pos) () ~finally: (fun () -> 
-        pop_rhs_tbl cntr;
-        symbol_rloc_ref := pos_back);
-  ) v_1
-
-let mkpat_infix arg1 name arg2 f = infix arg1 name arg2 (fun arg1 _ arg2 -> f arg1 arg2) 
-
-let build t = fst (Op_prec.build t)
-let terminal e = Op_prec.terminal (e, !symbol_rloc_ref)
-let mkexpX d = Op_prec.terminal (mkexp d, !symbol_rloc_ref)
-let mkpatX d = Op_prec.terminal (mkpat d, !symbol_rloc_ref)
-let mkassertX e = Op_prec.terminal (mkassert e, !symbol_rloc_ref)
-
-let mkexp_prefix name arg f = 
-  let reg1 = rhs_reg 1 in (* for the OP *)
-  Op_prec.prefix name (fun (v_2, reg2) -> 
-    let pos_back = !symbol_rloc_ref in
-    let cntr = push_rhs_tbl ("mkexp_prefix_" ^ name) in
-    Spotlib.Spot.protect (fun () ->
-      add_rhs_pos reg1;
-      add_rhs_pos reg2;
-      prepare_symbol_rloc ();
-      let pos = !symbol_rloc_ref in
-      let res = f v_2 in
-      res, pos) () ~finally: (fun () -> 
-        pop_rhs_tbl cntr;
-        symbol_rloc_ref := pos_back);
-  ) arg
-
-(* The best interface *)
-let mkexp_postfix v_1 name f =
-  let rhs_info = List.hd !rhs_tbl_stack in
-  Op_prec.postfix name (fun (v_1, reg1) ->
-    let pos_back = !symbol_rloc_ref in
-    let cntr = push_rhs_tbl ("mkpat_postfix_" ^ name) in
-    Spotlib.Spot.protect (fun () ->
-      rhs_replay_with_override rhs_info [1, reg1];
-      prepare_symbol_rloc ();
-      let pos = !symbol_rloc_ref in
-      let res = f v_1 in
-      res, pos) () ~finally: (fun () -> 
-        pop_rhs_tbl cntr;
-        symbol_rloc_ref := pos_back);
-  ) v_1
-
-let mku_op f name arg = 
-  let reg1 = rhs_reg 1 in
-  Op_prec.prefix "~" (* CR jfuruse: quick workaround *) (fun (arg, reg) -> 
-    let pos_back = !symbol_rloc_ref in
-    let cntr = push_rhs_tbl ("mku_op_" ^ name) in
-    Spotlib.Spot.protect (fun () ->
-      add_rhs_pos reg1;
-      add_rhs_pos reg;
-      prepare_symbol_rloc ();
-      let pos = !symbol_rloc_ref in
-      let res = f name arg in
-      res, pos) () ~finally: (fun () -> 
-        pop_rhs_tbl cntr;
-        symbol_rloc_ref := pos_back);
-  ) arg
-
-let mkuplus = mku_op mkuplus
-let mkuminus = mku_op mkuminus
-
-let build_tuple (es : ('a * Planck.Position.Region.t) Op_prec.t list) (f : 'a list -> 'a) : 'a = 
-  fst (Op_prec.build (Op_prec.list "," (fun e_reg_lst -> 
-    let pos_back = !symbol_rloc_ref in
-    let cntr = push_rhs_tbl "build_tuple" in
-    Spotlib.Spot.protect (fun () ->
-      List.iter (fun (_,reg) -> add_rhs_pos reg) e_reg_lst;
-      prepare_symbol_rloc ();
-      let pos = !symbol_rloc_ref in
-      let res = f (List.map fst e_reg_lst) in
-      res, pos) () ~finally: (fun () ->
-        pop_rhs_tbl cntr;
-        symbol_rloc_ref := pos_back)) es))
-
-(* /header *)
-
-(* declarations *)
-let get_CHAR = token_result (function (CHAR v) -> Result.Ok v | _ -> Result.Error "expected CHAR")
-let get_FLOAT = token_result (function (FLOAT v) -> Result.Ok v | _ -> Result.Error "expected FLOAT")
-let get_INFIXOP0 = token_result (function (INFIXOP0 v) -> Result.Ok v | _ -> Result.Error "expected INFIXOP0")
-let get_INFIXOP1 = token_result (function (INFIXOP1 v) -> Result.Ok v | _ -> Result.Error "expected INFIXOP1")
-let get_INFIXOP2 = token_result (function (INFIXOP2 v) -> Result.Ok v | _ -> Result.Error "expected INFIXOP2")
-let get_INFIXOP3 = token_result (function (INFIXOP3 v) -> Result.Ok v | _ -> Result.Error "expected INFIXOP3")
-let get_INFIXOP4 = token_result (function (INFIXOP4 v) -> Result.Ok v | _ -> Result.Error "expected INFIXOP4")
-let get_INT = token_result (function (INT v) -> Result.Ok v | _ -> Result.Error "expected INT")
-let get_INT32 = token_result (function (INT32 v) -> Result.Ok v | _ -> Result.Error "expected INT32")
-let get_INT64 = token_result (function (INT64 v) -> Result.Ok v | _ -> Result.Error "expected INT64")
-let get_LABEL = token_result (function (LABEL v) -> Result.Ok v | _ -> Result.Error "expected LABEL")
-let get_LIDENT = token_result (function (LIDENT v) -> Result.Ok v | _ -> Result.Error "expected LIDENT")
-let get_NATIVEINT = token_result (function (NATIVEINT v) -> Result.Ok v | _ -> Result.Error "expected NATIVEINT")
-let get_OPTLABEL = token_result (function (OPTLABEL v) -> Result.Ok v | _ -> Result.Error "expected OPTLABEL")
-let get_PREFIXOP = token_result (function (PREFIXOP v) -> Result.Ok v | _ -> Result.Error "expected PREFIXOP")
-let get_STRING = token_result (function (STRING v) -> Result.Ok v | _ -> Result.Error "expected STRING")
-let get_UIDENT = token_result (function (UIDENT v) -> Result.Ok v | _ -> Result.Error "expected UIDENT")
-(* (Nonassoc (IN)) *)
-(* (Nonassoc (below_SEMI)) *)
-(* (Nonassoc (SEMI)) *)
-(* (Nonassoc (LET)) *)
-(* (Nonassoc (below_WITH)) *)
-(* (Nonassoc (FUNCTION WITH)) *)
-(* (Nonassoc (AND)) *)
-(* (Nonassoc (THEN)) *)
-(* (Nonassoc (ELSE)) *)
-(* (Nonassoc (LESSMINUS)) *)
-(* (Left (COLONEQUAL)) *)
-(* (Nonassoc (AS)) *)
-(* (Left (BAR)) *)
-(* (Nonassoc (below_COMMA)) *)
-(* (Left (COMMA)) *)
-(* (Left (MINUSGREATER)) *)
-(* (Left (OR BARBAR)) *)
-(* (Left (AMPERSAND AMPERAMPER)) *)
-(* (Nonassoc (below_EQUAL)) *)
-(* (Left (INFIXOP0 EQUAL LESS GREATER)) *)
-(* (Left (INFIXOP1)) *)
-(* (Left (COLONCOLON)) *)
-(* (Left (INFIXOP2 PLUS PLUSDOT MINUS MINUSDOT)) *)
-(* (Left (INFIXOP3 STAR)) *)
-(* (Left (INFIXOP4)) *)
-(* (Nonassoc (prec_unary_minus prec_unary_plus)) *)
-(* (Nonassoc (prec_constant_constructor)) *)
-(* (Nonassoc (prec_constr_appl)) *)
-(* (Nonassoc (below_SHARP)) *)
-(* (Nonassoc (SHARP)) *)
-(* (Nonassoc (below_DOT)) *)
-(* (Nonassoc (DOT)) *)
-(* (Nonassoc
-    (BACKQUOTE BANG BEGIN CHAR FALSE FLOAT INT INT32 INT64 LBRACE LBRACELESS
-     LBRACKET LBRACKETBAR LIDENT LPAREN NEW NATIVEINT PREFIXOP STRING TRUE
-     UIDENT)) *)
-(* (Start (implementation)) *)
-(* (Type Parsetree.structure (implementation)) *)
-(* (Start (interface)) *)
-(* (Type Parsetree.signature (interface)) *)
-(* (Start (toplevel_phrase)) *)
-(* (Type Parsetree.toplevel_phrase (toplevel_phrase)) *)
-(* (Start (use_file)) *)
-(* (Type "Parsetree.toplevel_phrase list" (use_file)) *)
-(* (Start (locident)) *)
-(* (Type Locident.t (locident)) *)
-(* /declarations *)
-
-(* rules *)
-
-let check_close (close : 'a Token.Parser.t) (f : 'a -> 'b) (errf : unit -> 'b) = 
-  (perform v <-- close; return (fun () -> f v)) <|> (perform take_ (* error *); return errf) 
-
-let gen_list : 
-    'a 'b. unit Token.Parser.t -> string 
-      -> 'a list Token.Parser.t -> unit Token.Parser.t 
-        -> unit Token.Parser.t -> string
-          -> ('a list -> 'b) -> (unit -> 'b) Token.Parser.t = fun left nleft list opt right nright f -> perform
-    left;
-    (perform right; return (fun () -> f []))
-    <|> (perform     
-           v_2 <-- list;
-           _v_3 <-- opt;
-           (perform
-              right;
-              return (fun () -> f (List.rev v_2)))
-           <|> (perform
-                  take_; (* error *)
-                  return (fun () -> unclosed nleft 1 nright 4)))
-
-class rules = object (self)
-  method implementation = rule "implementation" (fun () -> dummy
-    <|> case "implementation_0" (perform
-
-           v_1 <-- self#structure ;
-           eos;
-
-           return (fun () ->  v_1 ))
-
-      )
-
-  method interface = rule "interface" (fun () -> dummy
-    <|> case "interface_0" (perform
-
-           v_1 <-- self#signature ;
-           eos;
-
-           return (fun () ->  List.rev v_1 ))
-
-      )
-
-  method toplevel_phrase = rule "toplevel_phrase" (fun () -> dummy
-    <|> case "toplevel_phrase_2" (perform (* always start with '#' *)
-
-           v_1 <-- self#toplevel_directive ;
-           token SEMISEMI;
-
-           return (fun () ->  v_1 ))
-
-    <|> case "toplevel_phrase_3" (perform
-
-           eos;
-
-           return (fun () ->  raise End_of_file ))
-
-    <|> case "toplevel_phrase_0" (perform
-
-           v_1 <-- self#seq_expr ;
-           token SEMISEMI;
-
-           return (fun () ->  Ptop_def[ghstrexp v_1] ))
-
-    <|> case "toplevel_phrase_1" (perform
-
-           v_1 <-- self#top_structure ;
-           token SEMISEMI;
-
-           return (fun () ->  Ptop_def v_1 ))
-
-      )
-
-  method top_structure = rule "top_structure" (fun () -> dummy
-    <|> case "top_structure_0" (perform
-
-           v_1 <-- self#structure_item ;
-           v_2_opt <-- option self#top_structure ;
-
-           return (fun () ->  
-             match v_2_opt with
-             | Some v_2 -> v_1 :: v_2 
-             | None -> [v_1])))
-
-  method use_file = rule "use_file" (fun () -> dummy
-    <|> case "use_file_0" (perform
-
-           v_1 <-- self#seq_expr ;
-           v_2 <-- self#use_file_tail ;
-
-           return (fun () ->  Ptop_def[ghstrexp v_1] :: v_2 ))
-
-    <|> case "use_file_1" (perform
-
-           v_1 <-- self#use_file_tail ;
-
-           return (fun () ->  v_1 ))
-
-      )
-
-  method use_file_tail = rule "use_file_tail" (fun () -> dummy
-    <|> case "use_file_tail_6" (perform
-
-           eos;
-
-           return (fun () ->  [] ))
-
-    <|> case "use_file_tail_5" (perform
-
-           v_1 <-- self#toplevel_directive ;
-           v_2 <-- self#use_file_tail ;
-
-           return (fun () ->  v_1 :: v_2 ))
-
-    <|> case "use_file_tail_0" (perform
-
-           token SEMISEMI;
-
-           (perform
-
-                  v_2 <-- self#toplevel_directive ;
-                  v_3 <-- self#use_file_tail ;
-
-                  return (fun () ->  v_2 :: v_3 ))
-
-           <|> (perform
-
-                  eos;
-
-                return (fun () ->  [] ))
-
-           <|> (perform                                
-
-                  v_2 <-- self#seq_expr ;
-                  v_3 <-- self#use_file_tail ;
-
-                  return (fun () ->  Ptop_def[ghstrexp v_2] :: v_3 ))
-
-           <|> (perform
-
-                  v_2 <-- self#structure_item ;
-                  v_3 <-- self#use_file_tail ;
-
-                  return (fun () ->  Ptop_def[v_2] :: v_3 ))
-    )
-
-
-    <|> case "use_file_tail_4" (perform
-
-           v_1 <-- self#structure_item ;
-           v_2 <-- self#use_file_tail ;
-
-           return (fun () ->  Ptop_def[v_1] :: v_2 ))
-
-      )
-
-  method module_expr = leftrec "module_expr" self#module_expr_nonleftrec self#module_expr_leftrec
-
-  method module_expr_nonleftrec = (dummy
-    <|> case "module_expr_nonleftrec_0" (perform
-
-           token FUNCTOR;
-           token LPAREN;
-           v_3 <-- get_UIDENT;
-           token COLON;
-           v_5 <-- self#module_type ;
-           token RPAREN;
-           token MINUSGREATER;
-           v_8 <-- self#module_expr ;
-
-           return (fun () ->  mkmod(Pmod_functor(v_3, v_5, v_8)) ))
-
-    <|> case "module_expr_nonleftrec_7" (perform
-
-           token STRUCT;
-           v_2 <-- self#structure ;
-           check_close
-             (token END)
-             (fun () ->  mkmod(Pmod_structure(v_2)))
-             (fun () ->  unclosed "struct" 1 "end" 3 ))
-
-    <|> case "module_expr_nonleftrec_9" (perform
-
-           v_1 <-- self#mod_longident ;
-
-           return (fun () ->  mkmod(Pmod_ident v_1) ))
-
-    <|> case "module_expr_nonleftrec_1" (perform
-
-           token LPAREN;
-
-           (perform                                         
-              token VAL;
-              v_3 <-- self#expr ;
-              token COLON;
-              check_close
-                (perform
-                   v_5 <-- self#package_type ;
-                   token RPAREN;
-                   return v_5)
-                (fun v_5 ->  mkmod(Pmod_unpack(v_3, v_5)))
-                (fun () ->  unclosed "(" 1 ")" 5 ))
-
-           <|> (perform
-                v_2 <-- self#module_expr ;
-                v_4 <-- option (perform
-                             token COLON;
-                             self#module_type) ;
-                check_close
-                  (token RPAREN)
-                  (fun () ->  
-                    match v_4 with
-                    | Some v_4 -> mkmod(Pmod_constraint(v_2, v_4))
-                    | None -> v_2)
-                  (fun () ->  unclosed "(" 1 ")" 5 )))
-
-  )
-
-  method module_expr_leftrec v_1 = (dummy
-    <|> case "module_expr_leftrec_0" (perform
-
-           token LPAREN;
-           v_3 <-- self#module_expr ;
-           check_close 
-             (token RPAREN)
-             (fun () ->  mkmod(Pmod_apply(v_1, v_3)))
-             (fun () ->  unclosed "(" 2 ")" 4))
-
-  )
-
-  method structure = rule "structure" (fun () -> dummy
-    <|> case "structure_0" (perform
-
-           v_1 <-- self#seq_expr ;
-           v_2 <-- self#structure_tail ;
-
-           return (fun () ->  ghstrexp v_1 :: v_2 ))
-
-    <|> case "structure_1" (perform
-
-           v_1 <-- self#structure_tail ;
-
-           return (fun () ->  v_1 ))
-
-      )
-
-  method structure_tail = rule "structure_tail" (fun () -> dummy
-    <|> case "structure_tail_0" (perform
-
-           token SEMISEMI;
-
-           (perform                                 
-              v_2 <-- self#seq_expr ;
-              v_3 <-- self#structure_tail ;
-
-              return (fun () ->  ghstrexp v_2 :: v_3 ))
-             
-           <|> (perform
-                  v_2 <-- self#structure_item ;
-                  v_3 <-- self#structure_tail ;
-
-                  return (fun () ->  v_2 :: v_3 ))
-
-           <|> (perform
-                  
-                  return (fun () ->  [] )))
-
-    <|> case "structure_tail_2" (perform
-
-           v_1 <-- self#structure_item ;
-           v_2 <-- self#structure_tail ;
-
-           return (fun () ->  v_1 :: v_2 ))
-
-    <|> case "structure_tail_4" (perform
-
-           (* empty *)
-
-           return (fun () ->  [] ))
-
-      )
-
-  method structure_item = rule "structure_item" (fun () -> dummy
-    <|> case "structure_item_0" (perform
-
-           token EXTERNAL;
-           v_2 <-- self#val_ident ;
-           token COLON;
-           v_4 <-- self#core_type ;
-           token EQUAL;
-           v_6 <-- self#primitive_declaration ;
-
-           return (fun () ->  mkstr(Pstr_primitive(v_2, {pval_type = v_4; pval_prim = v_6})) ))
-
-    <|> case "structure_item_9" (perform
-
-           token INCLUDE;
-           v_2 <-- self#module_expr ;
-
-           return (fun () ->  mkstr(Pstr_include v_2) ))
-
-    <|> case "structure_item_10" (perform
-
-           token OPEN;
-           v_2 <-- self#mod_longident ;
-
-           return (fun () ->  mkstr(Pstr_open v_2) ))
-
-    <|> case "structure_item_11" (perform
-
-           token TYPE;
-           v_2 <-- self#type_declarations ;
-
-           return (fun () ->  mkstr(Pstr_type(List.rev v_2)) ))
-
-    <|> case "structure_item_5" (perform
-
-           token LET;
-           v_2 <-- self#rec_flag ;
-           v_3 <-- self#let_bindings ;
-
-           return (fun () ->  match v_3 with
-          [{ppat_desc = Ppat_any; _ }, exp] -> mkstr(Pstr_eval exp)
-        | _ -> mkstr(Pstr_value(v_2, List.rev v_3)) ))
-
-    <|> case "structure_item_2" ( (perform
-
-             token EXCEPTION;
-             v_2 <-- get_UIDENT;
-             token EQUAL;
-             v_4 <-- self#constr_longident ;
-     
-             return (fun () ->  mkstr(Pstr_exn_rebind(v_2, v_4)) ))
-
-           <!> (perform
-
-             token EXCEPTION;
-             v_2 <-- get_UIDENT;
-             v_3 <-- self#constructor_arguments ;
-     
-             return (fun () ->  mkstr(Pstr_exception(v_2, v_3)) ))
-        )
-
-    <|> case "structure_item_3" ( (perform
-
-             token CLASS;
-             token TYPE;
-             v_3 <-- self#class_type_declarations ;
-  
-             return (fun () ->  mkstr(Pstr_class_type (List.rev v_3)) ))
-
-           <!> (perform
-
-             token CLASS;
-             v_2 <-- self#class_declarations ;
-  
-             return (fun () ->  mkstr(Pstr_class (List.rev v_2)) ))
-      )
-
-    <|> case "structure_item_1" (perform
-
-           token MODULE;
-           token TYPE;
-           v_3 <-- self#ident ;
-           token EQUAL;
-           v_5 <-- self#module_type ;
-
-           return (fun () ->  mkstr(Pstr_modtype(v_3, v_5)) ))
-
-    <!> case "structure_item_6" (perform
-
-           token MODULE;
-           token REC;
-           v_3 <-- self#module_rec_bindings ;
-
-           return (fun () ->  mkstr(Pstr_recmodule(List.rev v_3)) ))
-
-    <!> case "structure_item_7" (perform
-
-           token MODULE;
-           v_2 <-- get_UIDENT;
-           v_3 <-- self#module_binding ;
-
-           return (fun () ->  mkstr(Pstr_module(v_2, v_3)) ))
-
-      )
-
-  method module_binding = rule "module_binding" (fun () -> dummy
-    <|> case "module_binding_0" (perform
-
-           token LPAREN;
-           v_2 <-- get_UIDENT;
-           token COLON;
-           v_4 <-- self#module_type ;
-           token RPAREN;
-           v_6 <-- self#module_binding ;
-
-           return (fun () ->  mkmod(Pmod_functor(v_2, v_4, v_6)) ))
-
-    <|> case "module_binding_1" (perform
-
-           token COLON;
-           v_2 <-- self#module_type ;
-           token EQUAL;
-           v_4 <-- self#module_expr ;
-
-           return (fun () ->  mkmod(Pmod_constraint(v_4, v_2)) ))
-
-    <|> case "module_binding_2" (perform
-
-           token EQUAL;
-           v_2 <-- self#module_expr ;
-
-           return (fun () ->  v_2 ))
-
-      )
-
-  method module_rec_bindings = leftrec "module_rec_bindings" self#module_rec_bindings_nonleftrec self#module_rec_bindings_leftrec
-
-  method module_rec_bindings_nonleftrec = (dummy
-    <|> case "module_rec_bindings_nonleftrec_0" (perform
-
-           v_1 <-- self#module_rec_binding ;
-
-           return (fun () ->  [v_1] ))
-
-      )
-
-  method module_rec_bindings_leftrec v_1 = (dummy
-    <|> case "module_rec_bindings_leftrec_0" (perform
-
-           token AND;
-           v_3 <-- self#module_rec_binding ;
-
-           return (fun () ->  v_3 :: v_1 ))
-
-      )
-
-  method module_rec_binding = rule "module_rec_binding" (fun () -> dummy
-    <|> case "module_rec_binding_0" (perform
-
-           v_1 <-- get_UIDENT;
-           token COLON;
-           v_3 <-- self#module_type ;
-           token EQUAL;
-           v_5 <-- self#module_expr ;
-
-           return (fun () ->  (v_1, v_3, v_5) ))
-
-      )
-
-  method module_type = leftrec "module_type" self#module_type_nonleftrec self#module_type_leftrec
-
-  method module_type_nonleftrec = (dummy
-    <|> case "module_type_nonleftrec_0" (perform
-
-           token FUNCTOR;
-           token LPAREN;
-           v_3 <-- get_UIDENT;
-           token COLON;
-           v_5 <-- self#module_type ;
-           token RPAREN;
-           token MINUSGREATER;
-           v_8 <-- self#module_type ;
-           (* %prec below_WITH *)
-
-           return (fun () ->  mkmty(Pmty_functor(v_3, v_5, v_8)) ))
-
-    <|> case "module_type_nonleftrec_1" (perform
-
-           token MODULE;
-           token TYPE;
-           token OF;
-           v_4 <-- self#module_expr ;
-
-           return (fun () ->  mkmty(Pmty_typeof v_4) ))
-
-    <|> case "module_type_nonleftrec_2" (perform
-
-           token LPAREN;
-           v_2 <-- self#module_type ;
-           check_close
-             (token RPAREN)
-             (fun () ->  v_2 )
-             (fun () ->  unclosed "(" 1 ")" 3 ))
-
-    <|> case "module_type_nonleftrec_4" (perform
-
-           token SIG;
-           v_2 <-- self#signature ;
-           check_close
-             (token END)
-             (fun () ->  mkmty(Pmty_signature(List.rev v_2)))
-             (fun () ->  unclosed "sig" 1 "end" 3 ))
-
-    <|> case "module_type_nonleftrec_6" (perform
-
-           v_1 <-- self#mty_longident ;
-
-           return (fun () ->  mkmty(Pmty_ident v_1) ))
-
-      )
-
-  method module_type_leftrec v_1 = (dummy
-    <|> case "module_type_leftrec_0" (perform
-
-           token WITH;
-           v_3 <-- self#with_constraints ;
-
-           return (fun () ->  mkmty(Pmty_with(v_1, List.rev v_3)) ))
-
-      )
-
-  method signature = leftrec "signature" self#signature_nonleftrec self#signature_leftrec
-
-  method signature_nonleftrec = (dummy
-    <|> case "signature_nonleftrec_0" (perform
-
-           (* empty *)
-
-           return (fun () ->  [] ))
-
-      )
-
-(* TYPPPICAL EXAMPLE OF INEFFICIENCY!
-  method signature_leftrec v_1 = (dummy
-    <|> case "signature_leftrec_0" (perform
-
-           v_2 <-- self#signature_item ;
-           token SEMISEMI;
-
-           return (fun () ->  v_2 :: v_1 ))
-
-    <!> case "signature_leftrec_1" (perform
-
-           v_2 <-- self#signature_item ;
-
-           return (fun () ->  v_2 :: v_1 ))
-
-      )
-*)
-
-
-  method signature_leftrec v_1 = (dummy
-    <|> case "signature_leftrec_0" (perform
-
-           v_2 <-- self#signature_item ;
-           ignore (option (token SEMISEMI));
-
-           return (fun () ->  v_2 :: v_1 ))
-  )
-
-
-  method signature_item = rule "signature_item" (fun () -> dummy
-    <|> case "signature_item_0" (perform
-
-           token EXTERNAL;
-           v_2 <-- self#val_ident ;
-           token COLON;
-           v_4 <-- self#core_type ;
-           token EQUAL;
-           v_6 <-- self#primitive_declaration ;
-
-           return (fun () ->  mksig(Psig_value(v_2, {pval_type = v_4; pval_prim = v_6})) ))
-
-    <|> case "signature_item_2" (perform
-
-           token VAL;
-           v_2 <-- self#val_ident ;
-           token COLON;
-           v_4 <-- self#core_type ;
-
-           return (fun () ->  mksig(Psig_value(v_2, {pval_type = v_4; pval_prim = []})) ))
-
-    <|> case "signature_item_4" (perform
-
-           token EXCEPTION;
-           v_2 <-- get_UIDENT;
-           v_3 <-- self#constructor_arguments ;
-
-           return (fun () ->  mksig(Psig_exception(v_2, v_3)) ))
-
-    <|> case "signature_item_9" (perform
-
-           token INCLUDE;
-           v_2 <-- self#module_type ;
-
-           return (fun () ->  mksig(Psig_include v_2) ))
-
-    <|> case "signature_item_10" (perform
-
-           token OPEN;
-           v_2 <-- self#mod_longident ;
-
-           return (fun () ->  mksig(Psig_open v_2) ))
-
-    <|> case "signature_item_11" (perform
-
-           token TYPE;
-           v_2 <-- self#type_declarations ;
-
-           return (fun () ->  mksig(Psig_type(List.rev v_2)) ))
-
-    <|> case "signature_item_1" (perform
-
-           token MODULE;
-           token TYPE;
-           v_3 <-- self#ident ;
-           token EQUAL;
-           v_5 <-- self#module_type ;
-
-           return (fun () ->  mksig(Psig_modtype(v_3, Pmodtype_manifest v_5)) ))
-
-    <!> case "signature_item_6" (perform
-
-           token MODULE;
-           token TYPE;
-           v_3 <-- self#ident ;
-
-           return (fun () ->  mksig(Psig_modtype(v_3, Pmodtype_abstract)) ))
-
-    <!> case "signature_item_5" (perform
-
-           token MODULE;
-           token REC;
-           v_3 <-- self#module_rec_declarations ;
-
-           return (fun () ->  mksig(Psig_recmodule(List.rev v_3)) ))
-
-    <!> case "signature_item_7" (perform
-
-           token MODULE;
-           v_2 <-- get_UIDENT;
-           v_3 <-- self#module_declaration ;
-
-           return (fun () ->  mksig(Psig_module(v_2, v_3)) ))
-
-    <!> case "signature_item_3" (perform
-
-           token CLASS;
-           token TYPE;
-           v_3 <-- self#class_type_declarations ;
-
-           return (fun () ->  mksig(Psig_class_type (List.rev v_3)) ))
-
-    <!> case "signature_item_8" (perform
-
-           token CLASS;
-           v_2 <-- self#class_descriptions ;
-
-           return (fun () ->  mksig(Psig_class (List.rev v_2)) ))
-
-      )
-
-  method module_declaration = rule "module_declaration" (fun () -> dummy
-    <|> case "module_declaration_0" (perform
-
-           token LPAREN;
-           v_2 <-- get_UIDENT;
-           token COLON;
-           v_4 <-- self#module_type ;
-           token RPAREN;
-           v_6 <-- self#module_declaration ;
-
-           return (fun () ->  mkmty(Pmty_functor(v_2, v_4, v_6)) ))
-
-    <|> case "module_declaration_1" (perform
-
-           token COLON;
-           v_2 <-- self#module_type ;
-
-           return (fun () ->  v_2 ))
-
-      )
-
-  method module_rec_declarations = leftrec "module_rec_declarations" self#module_rec_declarations_nonleftrec self#module_rec_declarations_leftrec
-
-  method module_rec_declarations_nonleftrec = (dummy
-    <|> case "module_rec_declarations_nonleftrec_0" (perform
-
-           v_1 <-- self#module_rec_declaration ;
-
-           return (fun () ->  [v_1] ))
-
-      )
-
-  method module_rec_declarations_leftrec v_1 = (dummy
-    <|> case "module_rec_declarations_leftrec_0" (perform
-
-           token AND;
-           v_3 <-- self#module_rec_declaration ;
-
-           return (fun () ->  v_3 :: v_1 ))
-
-      )
-
-  method module_rec_declaration = rule "module_rec_declaration" (fun () -> dummy
-    <|> case "module_rec_declaration_0" (perform
-
-           v_1 <-- get_UIDENT;
-           token COLON;
-           v_3 <-- self#module_type ;
-
-           return (fun () ->  (v_1, v_3) ))
-
-      )
-
-  method class_declarations = leftrec "class_declarations" self#class_declarations_nonleftrec self#class_declarations_leftrec
-
-  method class_declarations_nonleftrec = (dummy
-    <|> case "class_declarations_nonleftrec_0" (perform
-
-           v_1 <-- self#class_declaration ;
-
-           return (fun () ->  [v_1] ))
-
-      )
-
-  method class_declarations_leftrec v_1 = (dummy
-    <|> case "class_declarations_leftrec_0" (perform
-
-           token AND;
-           v_3 <-- self#class_declaration ;
-
-           return (fun () ->  v_3 :: v_1 ))
-
-      )
-
-  method class_declaration = rule "class_declaration" (fun () -> dummy
-    <|> case "class_declaration_0" (perform
-
-           v_1 <-- self#virtual_flag ;
-           v_2 <-- self#class_type_parameters ;
-           v_3 <-- get_LIDENT;
-           v_4 <-- self#class_fun_binding ;
-
-           return (fun () ->  let params, variance = List.split (fst v_2) in
-        {pci_virt = v_1; pci_params = params, snd v_2;
-         pci_name = v_3; pci_expr = v_4; pci_variance = variance;
-         pci_loc = symbol_rloc ()} ))
-
-      )
-
-  method class_fun_binding = rule "class_fun_binding" (fun () -> dummy
-    <|> case "class_fun_binding_0" (perform
-
-           token COLON;
-           v_2 <-- self#class_type ;
-           token EQUAL;
-           v_4 <-- self#class_expr ;
-
-           return (fun () ->  mkclass(Pcl_constraint(v_4, v_2)) ))
-
-    <|> case "class_fun_binding_1" (perform
-
-           token EQUAL;
-           v_2 <-- self#class_expr ;
-
-           return (fun () ->  v_2 ))
-
-    <|> case "class_fun_binding_2" (perform
-
-           v_1 <-- self#labeled_simple_pattern ;
-           v_2 <-- self#class_fun_binding ;
-
-           return (fun () ->  let (l,o,p) = v_1 in mkclass(Pcl_fun(l, o, p, v_2)) ))
-
-      )
-
-  method class_type_parameters = rule "class_type_parameters" (fun () -> dummy
-    <|> case "class_type_parameters_0" (perform
-
-           token LBRACKET;
-           v_2 <-- self#type_parameter_list ;
-           token RBRACKET;
-
-           return (fun () ->  List.rev v_2, symbol_rloc () ))
-
-    <|> case "class_type_parameters_1" (perform
-
-           (* empty *)
-
-           return (fun () ->  [], symbol_gloc () ))
-
-      )
-
-  method class_fun_def = rule "class_fun_def" (fun () -> dummy
-    <|> case "class_fun_def_0" (perform
-
-           v_1 <-- self#labeled_simple_pattern ;
-           token MINUSGREATER;
-           v_3 <-- self#class_expr ;
-
-           return (fun () ->  let (l,o,p) = v_1 in mkclass(Pcl_fun(l, o, p, v_3)) ))
-
-    <!> case "class_fun_def_1" (perform
-
-           v_1 <-- self#labeled_simple_pattern ;
-           v_2 <-- self#class_fun_def ;
-
-           return (fun () ->  let (l,o,p) = v_1 in mkclass(Pcl_fun(l, o, p, v_2)) ))
-
-      )
-
-  method class_expr = rule "class_expr" (fun () -> dummy
-    <|> case "class_expr_0" (perform
-
-           token LET;
-           v_2 <-- self#rec_flag ;
-           v_3 <-- self#let_bindings ;
-           token IN;
-           v_5 <-- self#class_expr ;
-
-           return (fun () ->  mkclass(Pcl_let (v_2, List.rev v_3, v_5)) ))
-
-    <|> case "class_expr_1" (perform
-
-           token FUN;
-           v_2 <-- self#class_fun_def ;
-
-           return (fun () ->  v_2 ))
-
-    <|> case "class_expr_2" (perform
-
-           v_1 <-- self#class_simple_expr ;
-           v_2 <-- option (self#simple_labeled_expr_list) ;
-
-           return (fun () ->  
-             match v_2 with
-             | Some v_2 -> mkclass(Pcl_apply(v_1, List.rev v_2))
-             | None -> v_1))
-
-  )
-
-  method class_simple_expr = rule "class_simple_expr" (fun () -> dummy
-    <|> case "class_simple_expr_2" (perform
-
-           token LBRACKET;
-           v_2 <-- self#core_type_comma_list ;
-           token RBRACKET;
-           v_4 <-- self#class_longident ;
-
-           return (fun () ->  mkclass(Pcl_constr(v_4, List.rev v_2)) ))
-
-    <|> case "class_simple_expr_5" (perform
-
-           token OBJECT;
-           v_2 <-- self#class_structure ;
-           check_close 
-             (token END)
-             (fun () ->  mkclass(Pcl_structure(v_2)))
-             (fun () ->  unclosed "object" 1 "end" 3))
-
-    <|> case "class_simple_expr_0" (perform
-
-           token LPAREN;
-           v_2 <-- self#class_expr ;
-           token COLON;
-           v_4 <-- self#class_type ;
-           check_close
-             (token RPAREN)
-             (fun () ->  mkclass(Pcl_constraint(v_2, v_4)))
-             (fun () ->  unclosed "(" 1 ")" 5 ))
-
-    <!> case "class_simple_expr_3" (perform
-
-           token LPAREN;
-           v_2 <-- self#class_expr ;
-           check_close 
-             (token RPAREN)
-             (fun () ->  v_2 )
-             (fun () ->  unclosed "(" 1 ")" 3 ))
-
-    <!> case "class_simple_expr_7" (perform
-
-           v_1 <-- self#class_longident ;
-
-           return (fun () ->  mkclass(Pcl_constr(v_1, [])) ))
-
-      )
-
-  method class_structure = rule "class_structure" (fun () -> dummy
-    <|> case "class_structure_0" (perform
-
-           v_1 <-- self#class_self_pattern ;
-           v_2 <-- self#class_fields ;
-
-           return (fun () ->  v_1, List.rev v_2 ))
-
-      )
-
-  method class_self_pattern = rule "class_self_pattern" (fun () -> dummy
-    <|> case "class_self_pattern_0" (perform
-
-           token LPAREN;
-           v_2 <-- self#pattern ;
-           token COLON;
-           v_4 <-- self#core_type ;
-           token RPAREN;
-
-           return (fun () ->  mkpat(Ppat_constraint(v_2, v_4)) ))
-
-    <!> case "class_self_pattern_1" (perform
-
-           token LPAREN;
-           v_2 <-- self#pattern ;
-           token RPAREN;
-
-           return (fun () ->  reloc_pat v_2 ))
-
-    <!> case "class_self_pattern_2" (perform
-
-           (* empty *)
-
-           return (fun () ->  ghpat(Ppat_any) ))
-
-      )
-
-  method class_fields = leftrec "class_fields" self#class_fields_nonleftrec self#class_fields_leftrec
-
-  method class_fields_nonleftrec = (dummy
-    <|> case "class_fields_nonleftrec_0" (perform
-
-           (* empty *)
-
-           return (fun () ->  [] ))
-
-      )
-
-  method class_fields_leftrec v_1 = (dummy
-    <|> case "class_fields_leftrec_0" (perform
-
-           token INHERIT;
-           v_3 <-- self#override_flag ;
-           v_4 <-- self#class_expr ;
-           v_5 <-- self#parent_binder ;
-
-           return (fun () ->  Pcf_inher (v_3, v_4, v_5) :: v_1 ))
-
-    <|> case "class_fields_leftrec_1" (perform
-
-           token CONSTRAINT;
-           v_3 <-- self#constrain ;
-
-           return (fun () ->  Pcf_cstr v_3 :: v_1 ))
-
-    <|> case "class_fields_leftrec_2" (perform
-
-           token INITIALIZER;
-           v_3 <-- self#seq_expr ;
-
-           return (fun () ->  Pcf_init v_3 :: v_1 ))
-
-    <|> case "class_fields_leftrec_3" (perform
-
-           token VAL;
-           v_3 <-- self#value ;
-
-           return (fun () ->  Pcf_val v_3 :: v_1 ))
-
-    <!> case "class_fields_leftrec_4" (perform
-
-           token VAL;
-           v_3 <-- self#virtual_value ;
-
-           return (fun () ->  Pcf_valvirt v_3 :: v_1 ))
-
-    <!> case "class_fields_leftrec_5" (perform
-
-           v_2 <-- self#concrete_method ;
-
-           return (fun () ->  Pcf_meth v_2 :: v_1 ))
-
-    <!> case "class_fields_leftrec_6" (perform
-
-           v_2 <-- self#virtual_method ;
-
-           return (fun () ->  Pcf_virt v_2 :: v_1 ))
-
-      )
-
-  method parent_binder = rule "parent_binder" (fun () -> dummy
-    <|> case "parent_binder_0" (perform
-
-           token AS;
-           v_2 <-- get_LIDENT;
-
-           return (fun () ->  Some v_2 ))
-
-    <|> case "parent_binder_1" (perform
-
-           (* empty *)
-
-           return (fun () ->  None ))
-
-      )
-
-  method virtual_value = rule "virtual_value" (fun () -> dummy
-    <|> case "virtual_value_0" (perform
-
-           v_1 <-- self#override_flag ;
-           token MUTABLE;
-           token VIRTUAL;
-           v_4 <-- self#label ;
-           token COLON;
-           v_6 <-- self#core_type ;
-
-           return (fun () ->  if v_1 = Override then syntax_error ();
-        v_4, Mutable, v_6, symbol_rloc () ))
-
-    <|> case "virtual_value_1" (perform
-
-           token VIRTUAL;
-           v_2 <-- self#mutable_flag ;
-           v_3 <-- self#label ;
-           token COLON;
-           v_5 <-- self#core_type ;
-
-           return (fun () ->  v_3, v_2, v_5, symbol_rloc () ))
-
-      )
-
-  method value = rule "value" (fun () -> dummy
-    <|> case "value_0" (perform
-
-           v_1 <-- self#override_flag ;
-           v_2 <-- self#mutable_flag ;
-           v_3 <-- self#label ;
-           v_4 <-- option self#type_constraint ;
-           token EQUAL;
-           v_6 <-- self#seq_expr ;
-
-           return (fun () -> 
-             match v_4 with
-             | Some v_4 -> v_3, v_2, v_1, (let (t, t') = v_4 in ghexp(Pexp_constraint(v_6, t, t'))), symbol_rloc () 
-             | None -> v_3, v_2, v_1, v_6, symbol_rloc () ))
-
-      )
-
-  method virtual_method = rule "virtual_method" (fun () -> dummy
-    <|> case "virtual_method_0" (perform
-
-           token METHOD;
-           v_2 <-- self#override_flag ;
-           token PRIVATE;
-           token VIRTUAL;
-           v_5 <-- self#label ;
-           token COLON;
-           v_7 <-- self#poly_type ;
-
-           return (fun () ->  if v_2 = Override then syntax_error ();
-        v_5, Private, v_7, symbol_rloc () ))
-
-    <!> case "virtual_method_1" (perform
-
-           token METHOD;
-           v_2 <-- self#override_flag ;
-           token VIRTUAL;
-           v_4 <-- self#private_flag ;
-           v_5 <-- self#label ;
-           token COLON;
-           v_7 <-- self#poly_type ;
-
-           return (fun () ->  if v_2 = Override then syntax_error ();
-        v_5, v_4, v_7, symbol_rloc () ))
-
-      )
-
-  method concrete_method = rule "concrete_method" (fun () -> dummy
-    <|> case "concrete_method_0" (perform
-
-           token METHOD;
-           v_2 <-- self#override_flag ;
-           v_3 <-- self#private_flag ;
-           v_4 <-- self#label ;
-           token COLON;
-           v_6 <-- self#poly_type ;
-           token EQUAL;
-           v_8 <-- self#seq_expr ;
-
-           return (fun () ->  v_4, v_3, v_2, ghexp(Pexp_poly(v_8,Some v_6)), symbol_rloc () ))
-
-    <!> case "concrete_method_1" (perform
-
-           token METHOD;
-           v_2 <-- self#override_flag ;
-           v_3 <-- self#private_flag ;
-           v_4 <-- self#label ;
-           v_5 <-- self#strict_binding ;
-
-           return (fun () ->  v_4, v_3, v_2, ghexp(Pexp_poly (v_5, None)), symbol_rloc () ))
-
-      )
-
-  method class_type = rule "class_type" (fun () -> dummy
-    <|> case "class_type_0" (perform
-
-           token QUESTION;
-           v_2 <-- get_LIDENT;
-           token COLON;
-           v_4 <-- self#simple_core_type_or_tuple ;
-           token MINUSGREATER;
-           v_6 <-- self#class_type ;
-
-           return (fun () ->  mkcty(Pcty_fun("?" ^ v_2 ,
-                       {ptyp_desc =
-                        Ptyp_constr(Ldot (Lident "*predef*", "option"), [v_4]);
-                        ptyp_loc = v_4.ptyp_loc},
-                       v_6)) ))
-
-    <|> case "class_type_2" (perform
-
-           v_1 <-- get_OPTLABEL;
-           v_2 <-- self#simple_core_type_or_tuple ;
-           token MINUSGREATER;
-           v_4 <-- self#class_type ;
-
-           return (fun () ->  mkcty(Pcty_fun("?" ^ v_1 ,
-                       {ptyp_desc =
-                        Ptyp_constr(Ldot (Lident "*predef*", "option"), [v_2]);
-                        ptyp_loc = v_2.ptyp_loc},
-                       v_4)) ))
-
-    <|> case "class_type_1" (perform
-
-           v_1 <-- get_LIDENT;
-           token COLON;
-           v_3 <-- self#simple_core_type_or_tuple ;
-           token MINUSGREATER;
-           v_5 <-- self#class_type ;
-
-           return (fun () ->  mkcty(Pcty_fun(v_1, v_3, v_5)) ))
-
-    <!> case "class_type_3" (perform
-
-           v_1 <-- self#simple_core_type_or_tuple ;
-           token MINUSGREATER;
-           v_3 <-- self#class_type ;
-
-           return (fun () ->  mkcty(Pcty_fun("", v_1, v_3)) ))
-
-    <!> case "class_type_4" (perform
-
-           v_1 <-- self#class_signature ;
-
-           return (fun () ->  v_1 ))
-
-      )
-
-  method class_signature = rule "class_signature" (fun () -> dummy
-    <|> case "class_signature_0" (perform
-
-           token LBRACKET;
-           v_2 <-- self#core_type_comma_list ;
-           token RBRACKET;
-           v_4 <-- self#clty_longident ;
-
-           return (fun () ->  mkcty(Pcty_constr (v_4, List.rev v_2)) ))
-
-    <|> case "class_signature_1" (perform
-
-           token OBJECT;
-           v_2 <-- self#class_sig_body ;
-           check_close
-             (token END)
-             (fun () ->  mkcty(Pcty_signature v_2))
-             (fun () ->  unclosed "object" 1 "end" 3))
-
-    <|> case "class_signature_3" (perform
-
-           v_1 <-- self#clty_longident ;
-
-           return (fun () ->  mkcty(Pcty_constr (v_1, [])) ))
-
-      )
-
-  method class_sig_body = rule "class_sig_body" (fun () -> dummy
-    <|> case "class_sig_body_0" (perform
-
-           v_1 <-- self#class_self_type ;
-           v_2 <-- self#class_sig_fields ;
-
-           return (fun () ->  v_1, List.rev v_2 ))
-
-      )
-
-  method class_self_type = rule "class_self_type" (fun () -> dummy
-    <|> case "class_self_type_0" (perform
-
-           token LPAREN;
-           v_2 <-- self#core_type ;
-           token RPAREN;
-
-           return (fun () ->  v_2 ))
-
-    <|> case "class_self_type_1" (perform
-
-           (* empty *)
-
-           return (fun () ->  mktyp(Ptyp_any) ))
-
-      )
-
-  method class_sig_fields = leftrec "class_sig_fields" self#class_sig_fields_nonleftrec self#class_sig_fields_leftrec
-
-  method class_sig_fields_nonleftrec = (dummy
-    <|> case "class_sig_fields_nonleftrec_0" (perform
-
-           (* empty *)
-
-           return (fun () ->  [] ))
-
-      )
-
-  method class_sig_fields_leftrec v_1 = (dummy
-    <|> case "class_sig_fields_leftrec_0" (perform
-
-           token CONSTRAINT;
-           v_3 <-- self#constrain ;
-
-           return (fun () ->  Pctf_cstr  v_3 :: v_1 ))
-
-    <|> case "class_sig_fields_leftrec_1" (perform
-
-           token INHERIT;
-           v_3 <-- self#class_signature ;
-
-           return (fun () ->  Pctf_inher v_3 :: v_1 ))
-
-    <|> case "class_sig_fields_leftrec_2" (perform
-
-           token VAL;
-           v_3 <-- self#value_type ;
-
-           return (fun () ->  Pctf_val   v_3 :: v_1 ))
-
-    <|> case "class_sig_fields_leftrec_3" (perform
-
-           v_2 <-- self#method_type ;
-
-           return (fun () ->  Pctf_meth  v_2 :: v_1 ))
-
-    <!> case "class_sig_fields_leftrec_4" (perform
-
-           v_2 <-- self#virtual_method_type ;
-
-           return (fun () ->  Pctf_virt  v_2 :: v_1 ))
-
-      )
-
-  method value_type = rule "value_type" (fun () -> dummy
-    <|> case "value_type_0" (perform
-
-           token MUTABLE;
-           v_2 <-- self#virtual_flag ;
-           v_3 <-- self#label ;
-           token COLON;
-           v_5 <-- self#core_type ;
-
-           return (fun () ->  v_3, Mutable, v_2, v_5, symbol_rloc () ))
-
-    <|> case "value_type_1" (perform
-
-           token VIRTUAL;
-           v_2 <-- self#mutable_flag ;
-           v_3 <-- self#label ;
-           token COLON;
-           v_5 <-- self#core_type ;
-
-           return (fun () ->  v_3, v_2, Virtual, v_5, symbol_rloc () ))
-
-    <|> case "value_type_2" (perform
-
-           v_1 <-- self#label ;
-           token COLON;
-           v_3 <-- self#core_type ;
-
-           return (fun () ->  v_1, Immutable, Concrete, v_3, symbol_rloc () ))
-
-      )
-
-  method method_type = rule "method_type" (fun () -> dummy
-    <|> case "method_type_0" (perform
-
-           token METHOD;
-           v_2 <-- self#private_flag ;
-           v_3 <-- self#label ;
-           token COLON;
-           v_5 <-- self#poly_type ;
-
-           return (fun () ->  v_3, v_2, v_5, symbol_rloc () ))
-
-      )
-
-  method virtual_method_type = rule "virtual_method_type" (fun () -> dummy
-    <|> case "virtual_method_type_0" (perform
-
-           token METHOD;
-           token PRIVATE;
-           token VIRTUAL;
-           v_4 <-- self#label ;
-           token COLON;
-           v_6 <-- self#poly_type ;
-
-           return (fun () ->  v_4, Private, v_6, symbol_rloc () ))
-
-    <!> case "virtual_method_type_1" (perform
-
-           token METHOD;
-           token VIRTUAL;
-           v_3 <-- self#private_flag ;
-           v_4 <-- self#label ;
-           token COLON;
-           v_6 <-- self#poly_type ;
-
-           return (fun () ->  v_4, v_3, v_6, symbol_rloc () ))
-
-      )
-
-  method constrain = rule "constrain" (fun () -> dummy
-    <|> case "constrain_0" (perform
-
-           v_1 <-- self#core_type ;
-           token EQUAL;
-           v_3 <-- self#core_type ;
-
-           return (fun () ->  v_1, v_3, symbol_rloc () ))
-
-      )
-
-  method class_descriptions = leftrec "class_descriptions" self#class_descriptions_nonleftrec self#class_descriptions_leftrec
-
-  method class_descriptions_nonleftrec = (dummy
-    <|> case "class_descriptions_nonleftrec_0" (perform
-
-           v_1 <-- self#class_description ;
-
-           return (fun () ->  [v_1] ))
-
-      )
-
-  method class_descriptions_leftrec v_1 = (dummy
-    <|> case "class_descriptions_leftrec_0" (perform
-
-           token AND;
-           v_3 <-- self#class_description ;
-
-           return (fun () ->  v_3 :: v_1 ))
-
-      )
-
-  method class_description = rule "class_description" (fun () -> dummy
-    <|> case "class_description_0" (perform
-
-           v_1 <-- self#virtual_flag ;
-           v_2 <-- self#class_type_parameters ;
-           v_3 <-- get_LIDENT;
-           token COLON;
-           v_5 <-- self#class_type ;
-
-           return (fun () ->  let params, variance = List.split (fst v_2) in
-        {pci_virt = v_1; pci_params = params, snd v_2;
-         pci_name = v_3; pci_expr = v_5; pci_variance = variance;
-         pci_loc = symbol_rloc ()} ))
-
-      )
-
-  method class_type_declarations = leftrec "class_type_declarations" self#class_type_declarations_nonleftrec self#class_type_declarations_leftrec
-
-  method class_type_declarations_nonleftrec = (dummy
-    <|> case "class_type_declarations_nonleftrec_0" (perform
-
-           v_1 <-- self#class_type_declaration ;
-
-           return (fun () ->  [v_1] ))
-
-      )
-
-  method class_type_declarations_leftrec v_1 = (dummy
-    <|> case "class_type_declarations_leftrec_0" (perform
-
-           token AND;
-           v_3 <-- self#class_type_declaration ;
-
-           return (fun () ->  v_3 :: v_1 ))
-
-      )
-
-  method class_type_declaration = rule "class_type_declaration" (fun () -> dummy
-    <|> case "class_type_declaration_0" (perform
-
-           v_1 <-- self#virtual_flag ;
-           v_2 <-- self#class_type_parameters ;
-           v_3 <-- get_LIDENT;
-           token EQUAL;
-           v_5 <-- self#class_signature ;
-
-           return (fun () ->  let params, variance = List.split (fst v_2) in
-        {pci_virt = v_1; pci_params = params, snd v_2;
-         pci_name = v_3; pci_expr = v_5; pci_variance = variance;
-         pci_loc = symbol_rloc ()} ))
-
-      )
-
-  method seq_expr = rule "seq_expr" (fun () -> dummy
-    <|> case "seq_expr_0" (perform
-
-           v_1 <-- self#expr ;
-           (perform 
-              token SEMI;
-              v_3 <-- option self#seq_expr;
-              
-              return (fun () ->  
-                match v_3 with
-                | Some v_3 -> mkexp(Pexp_sequence(v_1, v_3))
-                | None -> reloc_exp v_1)
-              
-           ) <|>
-              (* %prec below_SEMI *)  
-              return (fun () ->  v_1 ))
-    )
-
-  method labeled_simple_pattern = rule "labeled_simple_pattern" (fun () -> dummy
-    <|> case "labeled_simple_pattern_7" (perform
-
-           v_1 <-- self#simple_pattern ;
-
-           return (fun () ->  ("", None, v_1) ))
-
-    <|> case "labeled_simple_pattern_3" (perform
-
-           v_1 <-- get_LABEL;
-           v_2 <-- self#simple_pattern ;
-
-           return (fun () ->  (v_1, None, v_2) ))
-
-    <|> case "labeled_simple_pattern_2" (perform
-
-           token TILDE;
-           token LPAREN;
-           v_3 <-- self#label_let_pattern ;
-           token RPAREN;
-
-           return (fun () ->  (fst v_3, None, snd v_3) ))
-
-    <!> case "labeled_simple_pattern_6" (perform
-
-           token TILDE;
-           v_2 <-- self#label_var ;
-
-           return (fun () ->  (fst v_2, None, snd v_2) ))
-
-    <!> case "labeled_simple_pattern_0" (perform
-
-           v_1 <-- get_OPTLABEL;
-           token LPAREN;
-           v_3 <-- self#let_pattern ;
-           v_4 <-- self#opt_default ;
-           token RPAREN;
-
-           return (fun () ->  ("?" ^ v_1, v_4, v_3) ))
-
-    <!> case "labeled_simple_pattern_4" (perform
-
-           v_1 <-- get_OPTLABEL;
-           v_2 <-- self#pattern_var ;
-
-           return (fun () ->  ("?" ^ v_1, None, v_2) ))
-
-    <!> case "labeled_simple_pattern_1" (perform
-
-           token QUESTION;
-           token LPAREN;
-           v_3 <-- self#label_let_pattern ;
-           v_4 <-- self#opt_default ;
-           token RPAREN;
-
-           return (fun () ->  ("?" ^ fst v_3, v_4, snd v_3) ))
-
-    <!> case "labeled_simple_pattern_5" (perform
-
-           token QUESTION;
-           v_2 <-- self#label_var ;
-
-           return (fun () ->  ("?" ^ fst v_2, None, snd v_2) ))
-
-      )
-
-  method pattern_var = rule "pattern_var" (fun () -> dummy
-    <|> case "pattern_var_0" (perform
-
-           v_1 <-- get_LIDENT;
-
-           return (fun () ->  mkpat(Ppat_var v_1) ))
-
-    <|> case "pattern_var_1" (perform
-
-           token UNDERSCORE;
-
-           return (fun () ->  mkpat Ppat_any ))
-
-      )
-
-  method opt_default = rule "opt_default" (fun () -> dummy
-    <|> case "opt_default_0" (perform
-
-           token EQUAL;
-           v_2 <-- self#seq_expr ;
-
-           return (fun () ->  Some v_2 ))
-
-    <|> case "opt_default_1" (perform
-
-           (* empty *)
-
-           return (fun () ->  None ))
-
-      )
-
-  method label_let_pattern = rule "label_let_pattern" (fun () -> dummy
-    <|> case "label_let_pattern_0" (perform
-
-           v_1 <-- self#label_var ;
-           token COLON;
-           v_3 <-- self#core_type ;
-
-           return (fun () ->  let (lab, pat) = v_1 in (lab, mkpat(Ppat_constraint(pat, v_3))) ))
-
-    <!> case "label_let_pattern_1" (perform
-
-           v_1 <-- self#label_var ;
-
-           return (fun () ->  v_1 ))
-
-      )
-
-  method label_var = rule "label_var" (fun () -> dummy
-    <|> case "label_var_0" (perform
-
-           v_1 <-- get_LIDENT;
-
-           return (fun () ->  (v_1, mkpat(Ppat_var v_1)) ))
-
-      )
-
-  method let_pattern = rule "let_pattern" (fun () -> dummy
-    <|> case "let_pattern_0" (perform
-
-           v_1 <-- self#pattern ;
-           token COLON;
-           v_3 <-- self#core_type ;
-
-           return (fun () ->  mkpat(Ppat_constraint(v_1, v_3)) ))
-
-    <!> case "let_pattern_1" (perform
-
-           v_1 <-- self#pattern ;
-
-           return (fun () ->  v_1 ))
-
-      )
-
-(*
-  method expr = rule "expr" (fun () -> dummy
-
-    <!> case "expr_1" (perform
-
-           expr <-- self#exprX;
-           token COMMA;
-           rev_exprs <-- self#expr_comma_list ;
-
-           return (fun () -> build_tuple (expr :: List.rev rev_exprs) (fun exprs -> mkexp(Pexp_tuple exprs))))
-
-    <!> case "expr_2" (perform
-
-           res <-- self#exprX;
-
-           return (fun () -> build res) (* CR jfuruse: we should add this _pos to rhs and !symbol_rloc_ref *)
-
-        )
-    )
-*)
-  method expr = rule "expr" (fun () -> dummy
-
-    <|> case "expr_1" (perform
-
-           expr <-- self#exprX;
-           rev_exprs <-- option (perform
-                                   token COMMA;
-                                   self#expr_comma_list);
-
-           return (fun () -> 
-             match rev_exprs with
-             | Some rev_exprs -> 
-                 build_tuple (expr :: List.rev rev_exprs) (fun exprs -> mkexp(Pexp_tuple exprs))
-             | None -> build expr)
-        )
-    )
-
-  method exprX = leftrec "exprX" self#expr_nonleftrec self#expr_leftrec
-
-  method expr_nonleftrec = (dummy
-    <|> case "expr_nonleftrec_0" (perform
-
-           token FOR;
-           v_2 <-- self#val_ident ;
-           token EQUAL;
-           v_4 <-- self#seq_expr ;
-           v_5 <-- self#direction_flag ;
-           v_6 <-- self#seq_expr ;
-           token DO;
-           v_8 <-- self#seq_expr ;
-           token DONE;
-
-           return (fun () ->  mkexpX(Pexp_for(v_2, v_4, v_6, v_5, v_8)) ))
-
-    <|> case "expr_nonleftrec_1" (perform
-
-           token LPAREN;
-           token COLONCOLON;
-           token RPAREN;
-           token LPAREN;
-           v_5 <-- self#expr ;
-           token COMMA;
-           v_7 <-- self#expr ;
-           token RPAREN;
-
-           return (fun () ->  mkexpX(Pexp_construct(Lident "::",
-                             Some(ghexp(Pexp_tuple[v_5; v_7])),
-                             false)) ))
-
-    (* expr_nonleftrec_2 .. _4 are moved to simple_expr_leftrec *)
-
-    <|> case "expr_nonleftrec_5" (perform
-
-           token FUN;
-
-           (perform                                  
-              token LPAREN;
-              token TYPE;
-              v_4 <-- get_LIDENT;
-              token RPAREN;
-              v_6 <-- self#fun_def ;
-
-              return (fun () ->  mkexpX(Pexp_newtype(v_4, v_6)) ))
-
-           <!> (perform
-                  v_2 <-- self#labeled_simple_pattern ;
-                  v_3 <-- self#fun_def ;
-
-                  return (fun () ->  let (l,o,p) = v_2 in mkexpX(Pexp_function(l, o, [p, v_3])) )))
-
-    <|> case "expr_nonleftrec_6" (perform
-
-           token IF;
-           v_2 <-- self#seq_expr ;
-           token THEN;
-           v_4 <-- self#expr ;
-           v_6 <-- option (perform
-                             token ELSE;
-                             self#expr); (* Take as long as possible *)
-
-           return (fun () -> 
-             match v_6 with
-             | Some v_6 -> mkexpX(Pexp_ifthenelse(v_2, v_4, Some v_6))
-             | None -> mkexpX(Pexp_ifthenelse(v_2, v_4, None)) ))
-
-    <|> case "expr_nonleftrec_7" (perform
-
-           token LET;
-
-           (perform                                  
-              token MODULE;
-              v_3 <-- get_UIDENT;
-              v_4 <-- self#module_binding ;
-              token IN;
-              v_6 <-- self#seq_expr ;
-
-              return (fun () ->  mkexpX(Pexp_letmodule(v_3, v_4, v_6)) ))
-
-           <|> (perform 
-                  token OPEN;
-                  v_3 <-- self#mod_longident ;
-                  token IN;
-                  v_5 <-- self#seq_expr ;
-
-                  return (fun () ->  mkexpX(Pexp_open(v_3, v_5)) ))
-
-           <|> (perform
-
-                  v_2 <-- self#rec_flag ;
-                  v_3 <-- self#let_bindings ;
-                  token IN;
-                  v_5 <-- self#seq_expr ;
-
-                  return (fun () ->  mkexpX(Pexp_let(v_2, List.rev v_3, v_5)) ))
-    )
-
-    <|> case "expr_nonleftrec_10" (perform
-
-           token MATCH;
-           v_2 <-- self#seq_expr ;
-           token WITH;
-           _v_4 <-- self#opt_bar ;
-           v_5 <-- self#match_cases ;
-
-           return (fun () ->  mkexpX(Pexp_match(v_2, List.rev v_5)) ))
-
-    <|> case "expr_nonleftrec_11" (perform
-
-           token TRY;
-           v_2 <-- self#seq_expr ;
-           token WITH;
-           (perform
-              _v_4 <-- self#opt_bar ;
-              v_5 <-- self#match_cases ;
-
-              return (fun () ->  mkexpX(Pexp_try(v_2, List.rev v_5)) ))
-
-           <!> (perform
-                  take_ (* error *);
-
-                return (fun () ->  syntax_error() )))
-
-    <|> case "expr_nonleftrec_12" (perform
-
-           token WHILE;
-           v_2 <-- self#seq_expr ;
-           token DO;
-           v_4 <-- self#seq_expr ;
-           token DONE;
-
-           return (fun () ->  mkexpX(Pexp_while(v_2, v_4)) ))
-
-    (* expr_nonleftrec_13 is moved to simple_expr_leftrec *)
-
-    <|> case "expr_nonleftrec_17" (perform
-
-           token FUNCTION;
-           _v_2 <-- self#opt_bar ;
-           v_3 <-- self#match_cases ;
-
-           return (fun () ->  mkexpX(Pexp_function("", None, List.rev v_3)) ))
-
-    <|> case "expr_nonleftrec_18" (perform
-
-           token OBJECT;
-           v_2 <-- self#class_structure ;
-           (perform
-              token END;
-
-              return (fun () ->  mkexpX (Pexp_object(v_2)) ))
-           <|> (perform
-                  take_ (* error *);
-
-                  return (fun () ->  unclosed "object" 1 "end" 3 )))
-
-    <|> case "expr_nonleftrec_21" (perform
-
-           token ASSERT;
-           v_2 <-- self#simple_expr ;
-           (* %prec below_SHARP *)
-
-           return (fun () ->  mkassertX v_2 ))
-
-    <|> case "expr_nonleftrec_22" (perform
-
-           token LAZY;
-           v_2 <-- self#simple_expr ;
-           (* %prec below_SHARP *)
-
-           return (fun () ->  mkexpX (Pexp_lazy (v_2)) ))
-
-    <|> case "expr_nonleftrec_23" (perform
-
-           v_1 <-- self#additive ;
-           v_2 <-- self#exprX ;
-           (* %prec prec_unary_plus *)
-
-           return (fun () ->  mkuplus v_1 v_2 ))
-
-    <|> case "expr_nonleftrec_27" (perform
-
-           v_1 <-- self#subtractive ;
-           v_2 <-- self#exprX ;
-           (* %prec prec_unary_minus *)
-
-           return (fun () ->  mkuminus v_1 v_2 ))
-
-    <!> case "expr_nonleftrec_20" (perform