From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST, HTML_MESSAGE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 257D9BBAF for ; Wed, 22 Jul 2009 00:35:42 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtQHAPzeZUpQDPIuWmdsb2JhbACCJS+WfwEWCgkHFgK4JIQMBYFA X-IronPort-AV: E=Sophos;i="4.43,242,1246831200"; d="asc'?ml'?scan'208,217";a="31508343" Received: from smtp21.orange.fr ([80.12.242.46]) by mail3-smtp-sop.national.inria.fr with ESMTP; 22 Jul 2009 00:35:41 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2128.orange.fr (SMTP Server) with ESMTP id 6E2DA2000087 for ; Wed, 22 Jul 2009 00:35:41 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2128.orange.fr (SMTP Server) with ESMTP id 61CE82000089 for ; Wed, 22 Jul 2009 00:35:41 +0200 (CEST) Received: from [192.168.1.2] (LAubervilliers-153-53-1-14.w217-128.abo.wanadoo.fr [217.128.128.14]) by mwinf2128.orange.fr (SMTP Server) with ESMTP id 2D2BA2000087 for ; Wed, 22 Jul 2009 00:35:41 +0200 (CEST) X-ME-UUID: 20090721223541185.2D2BA2000087@mwinf2128.orange.fr Subject: Re: [Caml-list] DELETE_RULE arguments? From: Serge Leblanc To: caml-list@yquem.inria.fr In-Reply-To: <1248006890.4590.166.camel@serge2> References: <1248006890.4590.166.camel@serge2> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-zY2tIu8TnS3+4mVLiRi5" Date: Wed, 22 Jul 2009 00:35:43 +0200 Message-Id: <1248215743.6357.39.camel@serge2> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 X-Spam: no; 0.00; foo:01 foo:01 lident:01 camlp:01 lident:01 'foo:01 gpg:01 3324:01 camlp:01 'foo:01 gpg:01 3324:01 exploded:98 ubuntu:98 exploded:98 X-Attachments: cset="utf-8" type="text/x-ocaml" cset="UTF-8" name="pr_ulex.ml" name="pr_ulex.ml" type="application/pgp-signature" name="signature.asc" --=-zY2tIu8TnS3+4mVLiRi5 Content-Type: multipart/mixed; boundary="=-K4RpO5/bfwO7HaJv3An6" --=-K4RpO5/bfwO7HaJv3An6 Content-Type: multipart/alternative; boundary="=-M0KXpW/FQf8zmNRG9g/3" --=-M0KXpW/FQf8zmNRG9g/3 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable In the attached exemple, the DELETE_RULE raise an exception Not_found. The statement DELETE_RULE Gram foo: "foo"; LIDENT; END bar is exploded as follows : $ camlp4of -str "DELETE_RULE Gram foo: "foo"; LIDENT; bar END"=20 Gram.delete_rule foo [ Gram.Snterm (Gram.Entry.obj (foo : 'foo Gram.Entry.t)); Gram.Stoken (((function | LIDENT ((_)) -> true | _ -> false), "LIDENT ((_))")); Gram.Snterm (Gram.Entry.obj (bar : 'bar Gram.Entry.t)) ] while the running example is the following :=20 Gram.delete_rule foo [ Gram.Skeyword "foo"; Gram.Stoken (((function | LIDENT ((_)) -> true | _ -> false), "LIDENT _")); Gram.Snterm (Gram.Entry.obj (bar : 'bar Gram.Entry.t)) ] How do I write the rule DELETE_RULE to work in this case?=20 -- Serge Leblanc gpg --keyserver hkp://keyserver.ubuntu.com:11371 --recv-keys 0x33243C1B Fingerprint =3D 066C 005F 5595 D85C 7673 D969 1DD4 90C4 3324 3C1B --=-M0KXpW/FQf8zmNRG9g/3 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable In the attached exemple, the DELETE_RULE raise an exception Not_found.
The statement DELETE_RULE Gram foo: "foo"; LIDENT; END bar is exp= loded as follows :

$ camlp4of -str "DELETE_RULE Gram foo: "foo"; LIDENT; bar EN= D"=20
Gram.delete_rule foo
  [ Gram.Snterm (Gram.Entry.obj (foo : 'foo Gram.Entry.t));
    Gram.Stoken
      (((function | LIDENT ((_)) -> true | _ -&=
gt; false), "LIDENT ((_))"));
    Gram.Snterm (Gram.Entry.obj (bar : 'bar Gram.Entry.t)) ]

while the running example is the following :=20
Gram.delete_rule foo
      [ Gram.Skeyword "foo";
        Gram.Stoken
          (((function | LIDENT=
 ((_)) -> true | _ -> false), "LIDENT _"));
        Gram.Snterm (Gram.Entry.obj (bar=
 : 'bar Gram.Entry.t)) ]

How do I write the rule DELETE_RULE to work in this case?
--
Serge Leblanc
gpg --keyserver  hkp://keyserver.ubuntu.com:11= 371 --recv-keys 0x33243C1B
Fingerprint =3D 066C 005F 5595 D85C 7673  D969= 1DD4 90C4 3324 3C1B
--=-M0KXpW/FQf8zmNRG9g/3-- --=-K4RpO5/bfwO7HaJv3An6 Content-Disposition: attachment; filename="pr_ulex.ml" Content-Type: text/x-ocaml; name="pr_ulex.ml"; charset="UTF-8" Content-Transfer-Encoding: base64 DQp0eXBlIHQxID0gQSB8IEINCnR5cGUgdDIgPSBGb28gb2Ygc3RyaW5nICogdDENCg0KbGV0IHBy aW50X3QyID0gZnVuY3Rpb24gDQogIEZvbyAocyx0KSAtPiBsZXQgcHJpbnRfdDEgPSBmdW5jdGlv biBBIC0+ICJBIiB8IEIgLT4gIkIiIA0KICAgICAgICAgICAgICAgIGluIFByaW50Zi5wcmludGYg IkZvbyAoXCIlc1wiLCVzKVxuIiBzIChwcmludF90MSB0KQ0KDQpvcGVuIENhbWxwNC5QcmVDYXN0 DQoNCmxldCBmb28gPSBHcmFtLkVudHJ5Lm1rICJmb28iDQpsZXQgYmFyID0gR3JhbS5FbnRyeS5t ayAiYmFyIg0KDQpFWFRFTkQgR3JhbQ0KICBHTE9CQUw6IGZvbyBiYXI7DQogIGZvbzogWyBbICJm b28iOyBpID0gTElERU5UOyBiID0gYmFyIC0+IEZvbyhpLGIpIF0gXTsNCiAgYmFyOiBbIFsgIj8i IC0+IEEgfCAiLiIgLT4gQiBdIF07DQpFTkQNCg0KbGV0IHIgPSBHcmFtLnBhcnNlX3N0cmluZyBm b28gKExvYy5tayAiPHN0cmluZz4iKSAiZm9vIHg/Ig0KICBpbiBwcmludF90MiByDQoNCmxldCBf ID0gR3JhbS5FbnRyeS5wcmludCBGb3JtYXQuc3RkX2Zvcm1hdHRlciBmb28NCg0KdHJ5DQogICBE RUxFVEVfUlVMRSBHcmFtIGZvbzogImZvbyI7IExJREVOVDsgYmFyIEVORA0Kd2l0aCBOb3RfZm91 bmQgLT4gRm9ybWF0LnByaW50ZiAiQFtubyBydWxlIG1hdGNoZWQhQF1AXG4iIA0KDQooKiB0aGUg Y29ycmVjdCBzZW50ZW5jZSANCmxldCBfID0NCiAgdHJ5DQogICAgR3JhbS5kZWxldGVfcnVsZSBm b28NCiAgICAgIFsgR3JhbS5Ta2V5d29yZCAiZm9vIjsNCiAgICAgICAgR3JhbS5TdG9rZW4NCiAg ICAgICAgICAoKChmdW5jdGlvbiB8IExJREVOVCAoKF8pKSAtPiB0cnVlIHwgXyAtPiBmYWxzZSks ICJMSURFTlQgXyIpKTsNCiAgICAgICAgR3JhbS5TbnRlcm0gKEdyYW0uRW50cnkub2JqIChiYXIg OiAnYmFyIEdyYW0uRW50cnkudCkpIF0NCiAgd2l0aCB8IE5vdF9mb3VuZCAtPiBGb3JtYXQucHJp bnRmICJAW25vIHJ1bGUgbWF0Y2hlZCFAXUBcbiINCiopDQoNCmxldCBfID0gR3JhbS5FbnRyeS5w cmludCBGb3JtYXQuc3RkX2Zvcm1hdHRlciBmb28NCg== --=-K4RpO5/bfwO7HaJv3An6-- --=-zY2tIu8TnS3+4mVLiRi5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkpmQq8ACgkQHdSQxDMkPBuACACaAp79nKu/4XYjqbYEEyB7lijY zB0An1YK29QCuqx8VJh2DGsaPiIf9c6j =K09V -----END PGP SIGNATURE----- --=-zY2tIu8TnS3+4mVLiRi5--