diff options
author | Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr> | 2001-12-22 13:58:03 +0000 |
---|---|---|
committer | Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr> | 2001-12-22 13:58:03 +0000 |
commit | 7607a5b6f510e247b50e6028519d480283364bac (patch) | |
tree | fa515f54dd2030fdae03e62af37b5f30fe64de8b | |
parent | 751851e34cd5ad06e6eac6ba7a5bfc9584602b7f (diff) |
-
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4182 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | camlp4/compile/compile.ml | 4 | ||||
-rw-r--r-- | camlp4/etc/pr_r.ml | 3 | ||||
-rw-r--r-- | camlp4/lib/plexer.ml | 3 | ||||
-rw-r--r-- | camlp4/meta/pa_rp.ml | 2 |
4 files changed, 8 insertions, 4 deletions
diff --git a/camlp4/compile/compile.ml b/camlp4/compile/compile.ml index 41ccb5e47..2dcee96d5 100644 --- a/camlp4/compile/compile.ml +++ b/camlp4/compile/compile.ml @@ -245,7 +245,9 @@ and parse_symbol entry nlevn s rkont fkont ending_act = let patt = nth_patt_of_act ending_act in let p_con = String.escaped (fst tok) in let p_prm = String.escaped (snd tok) in - if snd tok = "" then <:patt< ($str:p_con$, $patt$) >> + if snd tok = "" then + if fst tok = "ANY" then <:patt< (_, $patt$) >> + else <:patt< ($str:p_con$, $patt$) >> else let p = <:patt< ($str:p_con$, $str:p_prm$) >> in match patt with diff --git a/camlp4/etc/pr_r.ml b/camlp4/etc/pr_r.ml index 4b2fd83b3..62f65830f 100644 --- a/camlp4/etc/pr_r.ml +++ b/camlp4/etc/pr_r.ml @@ -1748,6 +1748,9 @@ Pcaml.add_option "-l" (Arg.Int (fun x -> maxl.val := x)) Pcaml.add_option "-sep" (Arg.String (fun x -> sep.val := Some x)) "<string> Use this string between phrases instead of reading source."; +Pcaml.add_option "-no_where" (Arg.Clear gen_where) + " Dont generate \"where\" statements"; + Pcaml.add_option "-ncip" (Arg.Set ncip) " No comments in phrases."; Pcaml.add_option "-old_seq" (Arg.Set old_sequences) diff --git a/camlp4/lib/plexer.ml b/camlp4/lib/plexer.ml index fda405fdb..35e5125b1 100644 --- a/camlp4/lib/plexer.ml +++ b/camlp4/lib/plexer.ml @@ -483,8 +483,7 @@ value using_token kwd_table (p_con, p_prm) = | _ -> raise (Token.Error - ("\ -the constructor \"" ^ p_con ^ + ("the constructor \"" ^ p_con ^ "\" is not recognized by Plexer")) ] ; diff --git a/camlp4/meta/pa_rp.ml b/camlp4/meta/pa_rp.ml index f5be73a66..793d0d35a 100644 --- a/camlp4/meta/pa_rp.ml +++ b/camlp4/meta/pa_rp.ml @@ -98,7 +98,7 @@ value rec subst v e = | _ -> raise Not_found ] and subst_pe v (p, e) = match p with - [ <:patt< $lid:v'$ >> -> if v = v' then (p, e) else (p, subst v e) + [ <:patt< $lid:v'$ >> when v <> v' -> (p, subst v e) | _ -> raise Not_found ] ; |