From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 0532DBC37 for ; Fri, 12 Feb 2010 13:16:10 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhUBAE7VdEvRVdvdkGdsb2JhbACaeggVAQEBAQkJDAcTAyC+QoRYBA X-IronPort-AV: E=Sophos;i="4.49,460,1262559600"; d="scan'208";a="56934422" Received: from mail-ew0-f221.google.com ([209.85.219.221]) by mail4-smtp-sop.national.inria.fr with ESMTP; 12 Feb 2010 13:16:09 +0100 Received: by ewy21 with SMTP id 21so2767224ewy.22 for ; Fri, 12 Feb 2010 04:16:09 -0800 (PST) MIME-Version: 1.0 Received: by 10.213.1.151 with SMTP id 23mr15349ebf.34.1265976969375; Fri, 12 Feb 2010 04:16:09 -0800 (PST) In-Reply-To: <9722eaea1002111055q7f571aeu1797760f58ad4dd5@mail.gmail.com> References: <9722eaea1002111055q7f571aeu1797760f58ad4dd5@mail.gmail.com> Date: Fri, 12 Feb 2010 12:16:09 +0000 Message-ID: <9722eaea1002120416s72a7e1e6u9730b755aa3e4ef1@mail.gmail.com> Subject: Re: another camlp4 question From: Thomas Gazagnaire To: caml-list@inria.fr Content-Type: multipart/alternative; boundary=000e0ce029f68dae7e047f663b61 X-Spam: no; 0.00; camlp:01 ocaml:01 sig:01 sig:01 lident:01 lident:01 module:03 module:03 extend:07 extend:07 definition:07 definition:07 gram:11 gram:11 end:12 --000e0ce029f68dae7e047f663b61 Content-Type: text/plain; charset=ISO-8859-1 To answer to myself: EXTEND Gram > > GLOBAL: sig_item; > > sig_item: [[ > "module"; "type"; i = a_UIDENT; "="; mt = module_type; "with"; id = > LIDENT -> > <:sig_item< module type $uid:i ^ "_" ^ id$ = $mt$; >> > ]]; > END > should have been: str_item instead of sig_item + any keyword different from "with" after the signature definition. - Thomas --000e0ce029f68dae7e047f663b61 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable To answer to myself:

EXTEND Gram

GLOBAL: sig_item;<= br>
sig_item:=A0 [[
=A0=A0=A0 "module"; "type"; i = =3D a_UIDENT; "=3D"; mt =3D module_type; "with"; id =3D= LIDENT ->
=A0=A0=A0 =A0=A0=A0 <:sig_item< module type $uid:i ^ "_" ^ = id$ =3D $mt$; >>
=A0=A0=A0 ]];
END

sh= ould have been: str_item instead of sig_item + any keyword different from &= quot;with" after the signature definition.

- Thomas
--000e0ce029f68dae7e047f663b61--