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 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 A2CA6BBC1 for ; Wed, 9 Apr 2008 16:07:56 +0200 (CEST) X-IronPort-AV: E=Sophos;i="4.25,629,1199660400"; d="asc'?scan'208";a="24801726" Received: from peray.inria.fr (HELO ausone.inria.fr) ([128.93.8.98]) by mail4-relais-sop.national.inria.fr with SMTP; 09 Apr 2008 16:07:56 +0200 Received: by ausone.inria.fr (sSMTP sendmail emulation); Wed, _d Apr 2008 16:07:53 +0200 From: "Nicolas Pouillard" Subject: Re: Re : [Caml-list] Porting camlp4 stuff from 3.09 to 3.10: need help To: Caml_mailing list References: <243732.71350.qm@web27014.mail.ukl.yahoo.com> In-Reply-To: <243732.71350.qm@web27014.mail.ukl.yahoo.com> Date: Wed, 09 Apr 2008 16:07:49 +0200 Message-Id: <1207749837-sup-1927@port-ext16.ensta.fr> User-Agent: Sup/git Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=-1207750073-781246-59991-761-11-="; micalg="pgp-sha1" MIME-Version: 1.0 X-Spam: no; 0.00; camlp:01 matthieu:01 afaik:01 syntax:01 camlp:01 syntax:01 stl:01 struct:01 cheers:01 sts:98 abstract:01 abstract:01 caml-list:01 emulate:01 caml:02 X-Attachments: cset="UTF-8" type="application/pgp-signature" name="signature.asc" name="signature.asc" --=-1207750073-781246-59991-761-11-= Content-Type: text/plain; charset=UTF-8 Excerpts from Matthieu Wipliez's message of Wed Apr 09 15:07:18 +0200 2008: > > > > AFAIK the list of predefined quotations is the same as for 3.09, but > > maybe this page will help: > > > > http://brion.inria.fr/gallium/index.php/Abstract_Syntax_Tree > > This seems unlikely: > http://camltest.inria.fr/pub/old_caml_site/camlp4/manual/manual010.html#toc39 > http://brion.inria.fr/gallium/index.php/Abstract_Syntax_Tree > > the following quotation was available in camlp4 3.09, but not in the 3.10 version: > <:str_item< declare $list:stl$ end >>: declare. > > > > > > The mentioned line 78 is: > > > > > > <:str_item< declare end >> > > > > > > It looks like the "declare end" construct is not allowed any more. Is > > > there any equivalent in 3.10, and is there a specific bit of > > > documentation about this? > > Maybe it was removed because it was kind of redundant with other constructions, for example: > module Declarations = struct ... end > open Declarations > > I'd suggest you either use a module as I did above to emulate the "declare" behavior, or that you declare everything at the top level (have a look at str_items in the Camlp4OCamlRevisedParser if you need inspiration). There is no longer a <:str_item< declare ... end >> construct, you can build str_item sequences using the empty str_item <:str_item<>> and the sequence <:str_item< $st1$; $st2$ >>. <:str_item< $list:sts$ >> should even do the job when having a list, but that's just a sugar over folding with these two constructions (Ast.stSem_of_list). Cheers, -- Nicolas Pouillard aka Ertai --=-1207750073-781246-59991-761-11-= Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAkf8zbUACgkQj+FCNw9dwLlWHQCfROMQKS7ZavHnEzOofgTu6mE7 er0An1EuAvb4mY0Ua+pcGx96/avcbm6X =mMuG -----END PGP SIGNATURE----- --=-1207750073-781246-59991-761-11-=--