From 1858d901456b6ead40454d550d4e22e28c7441d8 Mon Sep 17 00:00:00 2001 From: Nicolas Pouillard Date: Fri, 30 Jun 2006 07:24:45 +0000 Subject: [PATCH] Finish the match_case renaming and bootstrap git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7460 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- camlp4/Camlp4/Sig/Camlp4Ast.ml | 2 +- camlp4/Camlp4/Struct/Camlp4Ast.genmap.ml | 4 ++-- camlp4/Camlp4/Struct/Camlp4Ast.ml | 4 ++-- camlp4/Camlp4Filters/ExceptionTracer.ml | 6 +++--- camlp4/Camlp4Filters/GenerateMap.ml | 6 +++--- camlp4/Camlp4Filters/Tracer.ml | 6 +++--- camlp4/Camlp4Parsers/OCaml.ml | 2 +- camlp4/Camlp4Parsers/OCamlQuotationBase.ml | 2 +- camlp4/Camlp4Parsers/OCamlr.ml | 2 +- camlp4/boot/camlp4boot | Bin 1034298 -> 1034298 bytes 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/camlp4/Camlp4/Sig/Camlp4Ast.ml b/camlp4/Camlp4/Sig/Camlp4Ast.ml index 2ed6d5b21..c41b241d0 100644 --- a/camlp4/Camlp4/Sig/Camlp4Ast.ml +++ b/camlp4/Camlp4/Sig/Camlp4Ast.ml @@ -446,7 +446,7 @@ module type S = sig value wcAnd_of_list : list with_constr -> with_constr; value meApp_of_list : list module_expr -> module_expr; value mbAnd_of_list : list module_binding -> module_binding; - value asOr_of_list : list match_case -> match_case; + value mcOr_of_list : list match_case -> match_case; value idAcc_of_list : list ident -> ident; value idApp_of_list : list ident -> ident; value exSem_of_list : list expr -> expr; diff --git a/camlp4/Camlp4/Struct/Camlp4Ast.genmap.ml b/camlp4/Camlp4/Struct/Camlp4Ast.genmap.ml index 6a3356b99..8ba064b68 100644 --- a/camlp4/Camlp4/Struct/Camlp4Ast.genmap.ml +++ b/camlp4/Camlp4/Struct/Camlp4Ast.genmap.ml @@ -179,13 +179,13 @@ module Make (Loc : Sig.Loc.S) let _loc = loc_of_ident i in <:ident< $i$ $idApp_of_list is$ >> ]; - value rec asOr_of_list = + value rec mcOr_of_list = fun [ [] -> <:match_case@ghost<>> | [x] -> x | [x::xs] -> let _loc = loc_of_match_case x in - <:match_case< $x$ | $asOr_of_list xs$ >> ]; + <:match_case< $x$ | $mcOr_of_list xs$ >> ]; value rec mbAnd_of_list = fun diff --git a/camlp4/Camlp4/Struct/Camlp4Ast.ml b/camlp4/Camlp4/Struct/Camlp4Ast.ml index 0f03f09cd..996de4745 100644 --- a/camlp4/Camlp4/Struct/Camlp4Ast.ml +++ b/camlp4/Camlp4/Struct/Camlp4Ast.ml @@ -534,12 +534,12 @@ module Make (Loc : Sig.Loc.S) : Sig.Camlp4Ast.S with module Loc = Loc = | [ i ] -> i | [ i :: is ] -> let _loc = loc_of_ident i in Ast.IdApp _loc i (idApp_of_list is) ]; - value rec asOr_of_list = + value rec mcOr_of_list = fun [ [] -> Ast.McNil ghost | [ x ] -> x | [ x :: xs ] -> - let _loc = loc_of_match_case x in Ast.McOr _loc x (asOr_of_list xs) ]; + let _loc = loc_of_match_case x in Ast.McOr _loc x (mcOr_of_list xs) ]; value rec mbAnd_of_list = fun [ [] -> Ast.MbNil ghost diff --git a/camlp4/Camlp4Filters/ExceptionTracer.ml b/camlp4/Camlp4Filters/ExceptionTracer.ml index ea91d0919..21c930162 100644 --- a/camlp4/Camlp4Filters/ExceptionTracer.ml +++ b/camlp4/Camlp4Filters/ExceptionTracer.ml @@ -43,17 +43,17 @@ module Make (AstFilters : Camlp4.Sig.AstFilters.S) = struct raise exc } ] >>; - value rec map_match_rule = + value rec map_match_case = fun [ <:match_case@_loc< $m1$ | $m2$ >> -> - <:match_case< $map_match_rule m1$ | $map_match_rule m2$ >> + <:match_case< $map_match_case m1$ | $map_match_case m2$ >> | <:match_case@_loc< $p$ when $w$ -> $e$ >> -> <:match_case@_loc< $p$ when $w$ -> $add_debug_expr e$ >> | m -> m ] and map_expr = fun - [ <:expr@_loc< fun [ $m$ ] >> -> <:expr< fun [ $map_match_rule m$ ] >> + [ <:expr@_loc< fun [ $m$ ] >> -> <:expr< fun [ $map_match_case m$ ] >> | x -> x ]; register_str_item_filter (new Ast.c_expr map_expr)#str_item; diff --git a/camlp4/Camlp4Filters/GenerateMap.ml b/camlp4/Camlp4Filters/GenerateMap.ml index d2087ed26..3d298d3ca 100644 --- a/camlp4/Camlp4Filters/GenerateMap.ml +++ b/camlp4/Camlp4Filters/GenerateMap.ml @@ -187,10 +187,10 @@ module Make (AstFilters : Camlp4.Sig.AstFilters.S) = struct patt_of_constructor t2 (patt_of_constructor t1 (i, acc)) | _ -> (succ i, <:patt< $acc$ $lid:xi i$ >>) ] - and match_rule_of_sum_type = + and match_case_of_sum_type = fun [ <:ctyp< $t1$ | $t2$ >> -> - <:match_case< $match_rule_of_sum_type t1$ | $match_rule_of_sum_type t2$ >> + <:match_case< $match_case_of_sum_type t1$ | $match_case_of_sum_type t2$ >> | <:ctyp< $uid:s$ of $t$ >> -> <:match_case< $pat:snd (patt_of_constructor t (0, <:patt< $uid:s$ >>))$ -> $snd (expr_of_constructor t (0, <:expr< $uid:s$ >>))$ >> @@ -217,7 +217,7 @@ module Make (AstFilters : Camlp4.Sig.AstFilters.S) = struct and fun_of_ctyp = fun [ <:ctyp< [ $t$ ] >> -> - <:expr< fun [ $match_rule_of_sum_type t$ ] >> + <:expr< fun [ $match_case_of_sum_type t$ ] >> | <:ctyp< { $t$ } >> -> <:expr< fun { $record_patt_of_type t$ } -> { $record_binding_of_type t$ } >> | <:ctyp< ( $tup:t$ ) >> -> mk_tuple expr_of_ty t diff --git a/camlp4/Camlp4Filters/Tracer.ml b/camlp4/Camlp4Filters/Tracer.ml index 1324a6890..a34461a90 100644 --- a/camlp4/Camlp4Filters/Tracer.ml +++ b/camlp4/Camlp4Filters/Tracer.ml @@ -38,17 +38,17 @@ module Make (AstFilters : Camlp4.Sig.AstFilters.S) = struct else (); $e$ } >>; - value rec map_match_rule = + value rec map_match_case = fun [ <:match_case@_loc< $m1$ | $m2$ >> -> - <:match_case< $map_match_rule m1$ | $map_match_rule m2$ >> + <:match_case< $map_match_case m1$ | $map_match_case m2$ >> | <:match_case@_loc< $p$ when $w$ -> $e$ >> -> <:match_case@_loc< $p$ when $w$ -> $add_debug_expr e$ >> | m -> m ] and map_expr = fun - [ <:expr@_loc< fun [ $m$ ] >> -> <:expr< fun [ $map_match_rule m$ ] >> + [ <:expr@_loc< fun [ $m$ ] >> -> <:expr< fun [ $map_match_case m$ ] >> | x -> x ]; register_str_item_filter (new Ast.c_expr map_expr)#str_item; diff --git a/camlp4/Camlp4Parsers/OCaml.ml b/camlp4/Camlp4Parsers/OCaml.ml index f8ebaeffc..32c2eded5 100644 --- a/camlp4/Camlp4Parsers/OCaml.ml +++ b/camlp4/Camlp4Parsers/OCaml.ml @@ -594,7 +594,7 @@ module Make (Syntax : Sig.Camlp4Syntax.S) = struct | i = a_UIDENT; "."; j = SELF -> <:ident< $uid:i$.$j$ >> ] ] ; match_case: - [ [ l = LIST1 match_case0 SEP "|" -> Ast.asOr_of_list l ] ] + [ [ l = LIST1 match_case0 SEP "|" -> Ast.mcOr_of_list l ] ] ; (* Patterns *) patt: diff --git a/camlp4/Camlp4Parsers/OCamlQuotationBase.ml b/camlp4/Camlp4Parsers/OCamlQuotationBase.ml index 36beac0a0..08fe1d3f7 100644 --- a/camlp4/Camlp4Parsers/OCamlQuotationBase.ml +++ b/camlp4/Camlp4Parsers/OCamlQuotationBase.ml @@ -105,7 +105,7 @@ module Make (Syntax : Sig.Camlp4Syntax.S) | "listident" -> <:expr< Ast.idAcc_of_list $e$ >> | "listctypand" -> <:expr< Ast.tyAnd_of_list $e$ >> | "listwith_constr" -> <:expr< Ast.wcAnd_of_list $e$ >> - | "listmatch_case" -> <:expr< Ast.asOr_of_list $e$ >> + | "listmatch_case" -> <:expr< Ast.mcOr_of_list $e$ >> | "listpatt;" -> <:expr< Ast.paSem_of_list $e$ >> | "antisig_item" -> <:expr< Ast.SgAnt $mloc _loc$ $e$ >> | "antistr_item" -> <:expr< Ast.StAnt $mloc _loc$ $e$ >> diff --git a/camlp4/Camlp4Parsers/OCamlr.ml b/camlp4/Camlp4Parsers/OCamlr.ml index ae03ec7ec..2138405a0 100644 --- a/camlp4/Camlp4Parsers/OCamlr.ml +++ b/camlp4/Camlp4Parsers/OCamlr.ml @@ -654,7 +654,7 @@ Old (no more supported) syntax: | ":>"; t = ctyp; "="; e = expr -> <:expr< ($e$ :> $t$) >> ] ] ; match_case: - [ [ l = LIST0 match_case0 SEP "|" -> Ast.asOr_of_list l ] ] + [ [ l = LIST0 match_case0 SEP "|" -> Ast.mcOr_of_list l ] ] ; match_case0: [ [ `ANTIQUOT ("match_case"|"list" as n) s -> diff --git a/camlp4/boot/camlp4boot b/camlp4/boot/camlp4boot index e05679adf208cfe3d9c71fca0a328dcf2c63f534..0a5c173fbf4fd1e3d045589a559b6706e9e5f4da 100755 GIT binary patch delta 1425 zcmZ`(drVtZ7~gmAIa_({Yqr6(QoOWd1IM70G03n3=k*W3g*}qRXJ~D^wkx`BmIXGn z=&nY@NOjR;)F}y>3M$+sxVx}N3}CbplPSKlnEk$)`1Bu&rAXqj4;maXMz%STXi!Fu+T3(KI|7;)i20yW0^ zt!Q5cwMKIT4#?2M{=6F}<#(E@88qQa1tx*R8-3zpxZ4s)SD-X~pb9>Nf zigFbK8ey+`&}NEowI66Jn-Hp%s}7(+Hp9PL5mfu?>vi%Z(EGW61n6#Nc?ca@+f#lV zXakFdu{1_r1A1r5JOx^FU?<%Y)BT#t%Re ztk;VLaEc9i`86132`?6Mu==o!ECKSiU=`5EntfOWy#k!15J)#W?ZXneO;woHj}>GS zkY<+e=Q%3d>Bka&p*#Ip2^Yj=T1VU;Jx%;*?Sn!~?eDk!@C#Mara%!>yOKd_5k z9K#RIXSY2))017`5;c!Kvtvrxv;PDuoxnEp-dM#{ zPW9;J!Dk0YV&R?NuoDw_yE)PE?$Fqk19_2MfAvm}{E^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