From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id B9C257EFCD for ; Wed, 1 Oct 2014 13:53:18 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of vouillon@pps.univ-paris-diderot.fr) identity=pra; client-ip=194.254.61.138; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="vouillon@pps.univ-paris-diderot.fr"; x-sender="vouillon@pps.univ-paris-diderot.fr"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of vouillon@pps.univ-paris-diderot.fr) identity=mailfrom; client-ip=194.254.61.138; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="vouillon@pps.univ-paris-diderot.fr"; x-sender="vouillon@pps.univ-paris-diderot.fr"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@korolev.univ-paris7.fr) identity=helo; client-ip=194.254.61.138; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="vouillon@pps.univ-paris-diderot.fr"; x-sender="postmaster@korolev.univ-paris7.fr"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq0BALfqK1TC/j2KnGdsb2JhbABggmt2gxNIxzaHUQKBCRYBEQEBAQEBBg0JCRQshAQBAQQMFw8BRREJAhgCAgUWCwICCQMCAQIBRQYBDAgCiDoBA4tdnEyVcwETBIEsjwGCeIFTAQSWKY5ikgCDNAEBAQ X-IPAS-Result: Aq0BALfqK1TC/j2KnGdsb2JhbABggmt2gxNIxzaHUQKBCRYBEQEBAQEBBg0JCRQshAQBAQQMFw8BRREJAhgCAgUWCwICCQMCAQIBRQYBDAgCiDoBA4tdnEyVcwETBIEsjwGCeIFTAQSWKY5ikgCDNAEBAQ X-IronPort-AV: E=Sophos;i="5.04,632,1406584800"; d="scan'208";a="81525468" Received: from korolev.univ-paris7.fr ([194.254.61.138]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 01 Oct 2014 13:53:17 +0200 Received: from potemkin.univ-paris7.fr (potemkin.univ-paris7.fr [IPv6:2001:660:3301:8000::1:1]) by korolev.univ-paris7.fr (8.14.4/8.14.4/relay1/46573) with ESMTP id s91BrHZ0032588 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 1 Oct 2014 13:53:17 +0200 Received: from mailhub.math.univ-paris-diderot.fr (mailhub.math.univ-paris-diderot.fr [81.194.30.253]) by potemkin.univ-paris7.fr (8.14.4/8.14.4/relay2/46573) with ESMTP id s91BrHaG022615; Wed, 1 Oct 2014 13:53:17 +0200 Received: from mailhub.math.univ-paris-diderot.fr (localhost [127.0.0.1]) by mailhub.math.univ-paris-diderot.fr (Postfix) with ESMTP id F25072D9E59; Wed, 1 Oct 2014 13:53:16 +0200 (CEST) X-Virus-Scanned: amavisd-new at math.univ-paris-diderot.fr Received: from mailhub.math.univ-paris-diderot.fr ([127.0.0.1]) by mailhub.math.univ-paris-diderot.fr (mailhub.math.univ-paris-diderot.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id hgoJf3SLaAbp; Wed, 1 Oct 2014 13:53:15 +0200 (CEST) Received: from [128.93.60.74] (keithp.inria.fr [128.93.60.74]) (Authenticated sender: vouillon) by mailhub.math.univ-paris-diderot.fr (Postfix) with ESMTPSA id 3830F2D9E4C; Wed, 1 Oct 2014 13:53:15 +0200 (CEST) Message-ID: <542BEB26.4060209@pps.univ-paris-diderot.fr> Date: Wed, 01 Oct 2014 13:53:10 +0200 From: =?UTF-8?B?SsOpcsO0bWUgVm91aWxsb24=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.0 MIME-Version: 1.0 To: Tom Ridge , caml-list References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (korolev.univ-paris7.fr [IPv6:2001:660:3301:8000::1:2]); Wed, 01 Oct 2014 13:53:17 +0200 (CEST) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (potemkin.univ-paris7.fr [194.254.61.141]); Wed, 01 Oct 2014 13:53:17 +0200 (CEST) X-Miltered: at korolev with ID 542BEB2D.000 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-Miltered: at potemkin with ID 542BEB2D.000 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Enveloppe: 542BEB2D.000 from potemkin.univ-paris7.fr/potemkin.univ-paris7.fr/null/potemkin.univ-paris7.fr/ X-j-chkmail-Enveloppe: 542BEB2D.000 from mailhub.math.univ-paris-diderot.fr/mailhub.math.univ-paris-diderot.fr/null/mailhub.math.univ-paris-diderot.fr/ X-j-chkmail-Score: MSGID : 542BEB2D.000 on korolev.univ-paris7.fr : j-chkmail score : . : R=. U=. O=. B=0.000 -> S=0.000 X-j-chkmail-Score: MSGID : 542BEB2D.000 on potemkin.univ-paris7.fr : j-chkmail score : . : R=. U=. O=. B=0.000 -> S=0.000 X-j-chkmail-Status: Ham X-j-chkmail-Status: Ham Subject: Re: [Caml-list] ocaml-re library, partial match semantics Hi, On 09/30/2014 14:35, Tom Ridge wrote: > I am using the ocaml-re library > > https://github.com/ocaml/ocaml-re > > I have the following code: > > open Re; > > let a = char 'a' > let b = char 'b' > > let re = seq[a;b] |> compile [...] > let _ = assert (exec_partial re "a" = `Mismatch) > > I was expecting that the exec_partial in the final line would return > `Partial, indicating that a prefix of a match was found. However, a > `Mismatch was returned instead. What is the meaning/behaviour of > exec_partial? Can I use it to perform a partial match? There was a bug in exec_partial, which is fixed in version 1.2.2. Now, you get the correct result: # exec_partial re "a";; - : [ `Full | `Mismatch | `Partial ] = `Partial -- Jérôme