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=0.4 required=5.0 tests=AWL 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 4BAD3BBCA for ; Fri, 4 Apr 2008 15:44:17 +0200 (CEST) X-IronPort-AV: E=Sophos;i="4.25,604,1199660400"; d="asc'?scan'208";a="11075113" Received: from peray.inria.fr (HELO ausone.inria.fr) ([128.93.8.98]) by mail3-relais-sop.national.inria.fr with SMTP; 04 Apr 2008 15:44:17 +0200 Received: by ausone.inria.fr (sSMTP sendmail emulation); Fri, _d Apr 2008 15:42:57 +0200 From: "Nicolas Pouillard" Cc: Caml_mailing list Subject: Re: [Caml-list] camlp4 questions To: Conglun Yao References: In-Reply-To: Date: Fri, 04 Apr 2008 15:42:57 +0200 Message-Id: <1207316493-sup-1017@ausone.inria.fr> User-Agent: Sup/git Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=-1207316577-376769-97874-3387-3-="; micalg="pgp-sha1" MIME-Version: 1.0 X-Spam: no; 0.00; camlp:01 camlp:01 expr:01 expr:01 caml-list:01 grammar:02 append:02 expression:02 seems:03 aka:04 fri:05 extension:06 apr:06 sem:07 0200:07 X-Attachments: cset="UTF-8" type="application/pgp-signature" name="signature.asc" name="signature.asc" --=-1207316577-376769-97874-3387-3-= Content-Type: text/plain; charset=UTF-8 Excerpts from Conglun Yao's message of Fri Apr 04 09:59:09 +0200 2008: > Hi, Hi, > While doing my little camlp4 (3.10) practice, I had the following questions: > [...] > (2) How to extend operators like '@', for example if I want to change the > expression > list_1 @ list_2 => List.append list_1 list_2 > > In 3.09, it could be achieved by deleting rules > DELETE_RULE Gram expr: SELF; "@"; SELF END > > however, in 3.10, it seems I can't find the above grammar, only can find in > Camlp4OCamlParser.ml > expr: AFTER "^" > [ "::" RIGHTA > [ e1 = SELF; "::"; e2 = SELF -> <:expr< [$e1$ :: $e2$] >> ] > ]; You should have to also check in Camlp4OCamlRevisedParser.ml, since Camlp4OCamlParser.ml is now just an extension of the former. > Furthermore, if I want to extend the expr: "["; sem_expr_for_list; "]", > where to find the rule definition. > In 3.09, all of these exist in pa_o.ml Same answer. Regards, -- Nicolas Pouillard aka Ertai --=-1207316577-376769-97874-3387-3-= Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAkf2MGEACgkQj+FCNw9dwLk8FgCgjTYh9wAyan3FuA3KHUFB5+sl gKcAmQG+ReBN1JgUXeQfhR5HSBzIjMod =eEIr -----END PGP SIGNATURE----- --=-1207316577-376769-97874-3387-3-=--