[Pkg-ocaml-maint-commits] [ocaml-re] 07/15: Imported Upstream version 1.6.1
Stéphane Glondu
glondu at moszumanska.debian.org
Fri Aug 5 11:15:33 UTC 2016
This is an automated email from the git hooks/post-receive script.
glondu pushed a commit to branch master
in repository ocaml-re.
commit 93bd06d001b1f53a984d5cff4d83c66d6f2d6233
Author: Stephane Glondu <steph at glondu.net>
Date: Fri Aug 5 12:50:21 2016 +0200
Imported Upstream version 1.6.1
---
.travis.yml | 1 +
CHANGES | 5 +++++
_oasis | 2 +-
lib/META | 16 ++++++++--------
lib/re.ml | 11 +++++++++++
lib/re.mli | 1 +
lib/re_fmt.ml | 2 +-
lib_test/META | 4 ++--
lib_test/pcre_scan.ml | 2 +-
lib_test/re_scan.ml | 2 +-
lib_test/scan.ml | 2 +-
setup.ml | 9 +++++----
12 files changed, 38 insertions(+), 19 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 7e8a190..743d2df 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,6 +3,7 @@ sudo: required
install: wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-opam.sh
script: bash -ex .travis-opam.sh
env:
+ - OCAML_VERSION=4.00
- OCAML_VERSION=4.01
- OCAML_VERSION=4.02
- OCAML_VERSION=4.03
diff --git a/CHANGES b/CHANGES
index fb14350..0ee9b81 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+1.6.1 (20-Jun-2016)
+
+* Fix Re.pp (#101)
+* Add Re.Group.pp (#102)
+
1.6.0 (30-May-2016)
* Add Re.pp and Re.pp_re (#55)
diff --git a/_oasis b/_oasis
index 9a03b54..e84dc23 100644
--- a/_oasis
+++ b/_oasis
@@ -1,6 +1,6 @@
OASISFormat: 0.4
Name: re
-Version: 1.6.0
+Version: 1.6.1
Synopsis: Pure OCaml regular expression library
Authors: Jerome Vouillon, Thomas Gazagnaire, Anil Madhavapeddy
License: LGPL-2.0 with OCaml linking exception
diff --git a/lib/META b/lib/META
index a86354c..23b7b89 100644
--- a/lib/META
+++ b/lib/META
@@ -1,6 +1,6 @@
# OASIS_START
-# DO NOT EDIT (digest: f617609bf72ea371afe897fad8c64b8e)
-version = "1.6.0"
+# DO NOT EDIT (digest: 4756dd5c9ea312db675eba1ab9b127a5)
+version = "1.6.1"
description = "Pure OCaml regular expression library"
requires = "bytes"
archive(byte) = "re.cma"
@@ -9,7 +9,7 @@ archive(native) = "re.cmxa"
archive(native, plugin) = "re.cmxs"
exists_if = "re.cma"
package "str" (
- version = "1.6.0"
+ version = "1.6.1"
description = "Str-compatible regexps"
requires = "re re.emacs"
archive(byte) = "re_str.cma"
@@ -20,7 +20,7 @@ package "str" (
)
package "posix" (
- version = "1.6.0"
+ version = "1.6.1"
description = "POSIX-compatible regexps"
requires = "re"
archive(byte) = "re_posix.cma"
@@ -31,7 +31,7 @@ package "posix" (
)
package "perl" (
- version = "1.6.0"
+ version = "1.6.1"
description = "Perl-compatible regexps"
requires = "re"
archive(byte) = "re_perl.cma"
@@ -42,7 +42,7 @@ package "perl" (
)
package "pcre" (
- version = "1.6.0"
+ version = "1.6.1"
description = "subset of PCRE using the Re engine"
requires = "re re.perl"
archive(byte) = "re_pcre.cma"
@@ -53,7 +53,7 @@ package "pcre" (
)
package "glob" (
- version = "1.6.0"
+ version = "1.6.1"
description = "Shell glob regexps"
requires = "re"
archive(byte) = "re_glob.cma"
@@ -64,7 +64,7 @@ package "glob" (
)
package "emacs" (
- version = "1.6.0"
+ version = "1.6.1"
description = "Emacs-compatible regexps"
requires = "re"
archive(byte) = "re_emacs.cma"
diff --git a/lib/re.ml b/lib/re.ml
index 7c4fff7..891c6f7 100644
--- a/lib/re.ml
+++ b/lib/re.ml
@@ -1044,6 +1044,17 @@ module Group = struct
done;
res
+ let pp fmt t =
+ let matches =
+ let offsets = all_offset t in
+ let strs = all t in
+ Array.to_list (
+ Array.init (Array.length strs) (fun i -> strs.(i), offsets.(i))
+ ) in
+ let open Re_fmt in
+ let pp_match fmt (str, (start, stop)) =
+ fprintf fmt "@[(%s (%d %d))@]" str start stop in
+ sexp fmt "Group" (list pp_match) matches
end
module Mark = struct
diff --git a/lib/re.mli b/lib/re.mli
index 04a2c27..535ed8f 100644
--- a/lib/re.mli
+++ b/lib/re.mli
@@ -95,6 +95,7 @@ module Group : sig
val test : t -> int -> bool
(** Test whether a group matched *)
+ val pp : Format.formatter -> t -> unit
end
(** Marks *)
diff --git a/lib/re_fmt.ml b/lib/re_fmt.ml
index 2c7cf5e..0d707ec 100644
--- a/lib/re_fmt.ml
+++ b/lib/re_fmt.ml
@@ -12,7 +12,7 @@ let rec list pp ppf = function
list pp ppf vs
let str = pp_print_string
-let sexp fmt s pp x = fprintf fmt "@[<3>(%s@ %a@)]" s pp x
+let sexp fmt s pp x = fprintf fmt "@[<3>(%s@ %a)@]" s pp x
let pair pp1 pp2 fmt (v1,v2) =
pp1 fmt v1; pp_print_space fmt () ; pp2 fmt v2
let triple pp1 pp2 pp3 fmt (v1, v2, v3) =
diff --git a/lib_test/META b/lib_test/META
index d5fae05..3ecc46e 100644
--- a/lib_test/META
+++ b/lib_test/META
@@ -1,6 +1,6 @@
# OASIS_START
-# DO NOT EDIT (digest: 2f3aecdc681b02148ad0a4004aea972f)
-version = "1.6.0"
+# DO NOT EDIT (digest: 0e2484619fa18a2ca074b6cf5c7c2631)
+version = "1.6.1"
description = "Pure OCaml regular expression library"
requires = "oUnit"
archive(byte) = "fort_unit.cma"
diff --git a/lib_test/pcre_scan.ml b/lib_test/pcre_scan.ml
index f70cdc5..6a521ac 100755
--- a/lib_test/pcre_scan.ml
+++ b/lib_test/pcre_scan.ml
@@ -3,6 +3,6 @@ let x = Re_pcre.regexp "aa?b"
let _ =
let s = String.make (1024*1024) 'a' in
s.[1024*1024-1] <- 'b';
- for i = 0 to 99 do
+ for _i = 0 to 99 do
ignore (Re_pcre.exec ~rex:x s)
done
diff --git a/lib_test/re_scan.ml b/lib_test/re_scan.ml
index d7f49ce..397b5ce 100644
--- a/lib_test/re_scan.ml
+++ b/lib_test/re_scan.ml
@@ -5,6 +5,6 @@ let x = compile (seq [char 'a'; opt (char 'a'); char 'b'])
let _ =
let s = String.make (1024*1024) 'a' in
s.[1024*1024-1] <- 'b';
- for i = 0 to 99 do
+ for _i = 0 to 99 do
ignore (exec x s)
done
diff --git a/lib_test/scan.ml b/lib_test/scan.ml
index 9faa6fb..0e9d4bc 100755
--- a/lib_test/scan.ml
+++ b/lib_test/scan.ml
@@ -145,6 +145,6 @@ let exec s = loop {i_cols = cols; last = String.length s} s 0 cols st1 st1
let _ =
let s = String.make (1024*1024) 'a' in
s.[1024*1024-1] <- 'b';
- for i = 0 to 99 do
+ for _i = 0 to 99 do
ignore (exec s)
done
diff --git a/setup.ml b/setup.ml
index 9c5bef9..55ac449 100644
--- a/setup.ml
+++ b/setup.ml
@@ -1,7 +1,7 @@
(* setup.ml generated for the first time by OASIS v0.2.1~alpha1 *)
(* OASIS_START *)
-(* DO NOT EDIT (digest: 9ca7744eb2d1e0439500041d071e4367) *)
+(* DO NOT EDIT (digest: 42dc30c67642299d187632a6fa872bcf) *)
(*
Regenerated by OASIS v0.4.6
Visit http://oasis.forge.ocamlcore.org for more information and
@@ -7030,7 +7030,7 @@ let setup_t =
alpha_features = ["compiled_setup_ml"; "ocamlbuild_more_args"];
beta_features = [];
name = "re";
- version = "1.6.0";
+ version = "1.6.1";
license =
OASISLicense.DEP5License
(OASISLicense.DEP5Unit
@@ -7786,7 +7786,8 @@ let setup_t =
};
oasis_fn = Some "_oasis";
oasis_version = "0.4.6";
- oasis_digest = Some "\211\024:\168\249\128Yt&\200\190[m\210\175\204";
+ oasis_digest =
+ Some "\196\011\206\177\204\224\022m\232\0145O\251\130\024X";
oasis_exec = None;
oasis_setup_args = [];
setup_update = false
@@ -7794,6 +7795,6 @@ let setup_t =
let setup () = BaseSetup.setup setup_t;;
-# 7798 "setup.ml"
+# 7799 "setup.ml"
(* OASIS_STOP *)
let () = setup ();;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ocaml-maint/packages/ocaml-re.git
More information about the Pkg-ocaml-maint-commits
mailing list