Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Nicolas Pouillard" <nicolas.pouillard@gmail.com>
To: Caml_mailing list <caml-list@yquem.inria.fr>
Subject: Re: Re : [Caml-list] Porting camlp4 stuff from 3.09 to 3.10: need help
Date: Wed, 09 Apr 2008 16:07:49 +0200	[thread overview]
Message-ID: <1207749837-sup-1927@port-ext16.ensta.fr> (raw)
In-Reply-To: <243732.71350.qm@web27014.mail.ukl.yahoo.com>

[-- Attachment #1: Type: text/plain, Size: 1627 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

  parent reply	other threads:[~2008-04-09 14:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-09 13:07 Matthieu Wipliez
2008-04-09 13:31 ` Loup Vaillant
2008-04-09 14:07 ` Nicolas Pouillard [this message]
2008-04-09 15:29   ` Loup Vaillant
2008-04-09 15:36     ` Nicolas Pouillard
2008-04-09 15:46       ` Loup Vaillant
2008-04-09 16:02         ` Nicolas Pouillard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1207749837-sup-1927@port-ext16.ensta.fr \
    --to=nicolas.pouillard@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox