caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Re : [Caml-list] Porting camlp4 stuff from 3.09 to 3.10: need help
@ 2008-04-09 13:07 Matthieu Wipliez
  2008-04-09 13:31 ` Loup Vaillant
  2008-04-09 14:07 ` Nicolas Pouillard
  0 siblings, 2 replies; 7+ messages in thread
From: Matthieu Wipliez @ 2008-04-09 13:07 UTC (permalink / raw)
  To: Caml List

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

> 
> 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).

Hope this helps,

Matthieu



      _____________________________________________________________________________ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr

[-- Attachment #2: Type: text/html, Size: 2099 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re : [Caml-list] Porting camlp4 stuff from 3.09 to 3.10: need help
  2008-04-09 13:07 Re : [Caml-list] Porting camlp4 stuff from 3.09 to 3.10: need help Matthieu Wipliez
@ 2008-04-09 13:31 ` Loup Vaillant
  2008-04-09 14:07 ` Nicolas Pouillard
  1 sibling, 0 replies; 7+ messages in thread
From: Loup Vaillant @ 2008-04-09 13:31 UTC (permalink / raw)
  To: Matthieu Wipliez; +Cc: Caml List

2008/4/9, Matthieu Wipliez <mwipliez@yahoo.fr>:
>
> > 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

But it helped me, anyway: I saw there is an "empty" case in the
str_item declaration. For my use case, it does the job. (They are
still errors left, but I saw where they are documented --about the
EXTEND statement changes).


> the following quotation was available in camlp4 3.09, but not in the 3.10
> version:
>   <:str_item< declare $list:stl$ end >>: declare.
> [...]
> 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).

I'll do that if I need to.

> Hope this helps,

It did. Thanks.

Loup


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re : [Caml-list] Porting camlp4 stuff from 3.09 to 3.10: need help
  2008-04-09 13:07 Re : [Caml-list] Porting camlp4 stuff from 3.09 to 3.10: need help Matthieu Wipliez
  2008-04-09 13:31 ` Loup Vaillant
@ 2008-04-09 14:07 ` Nicolas Pouillard
  2008-04-09 15:29   ` Loup Vaillant
  1 sibling, 1 reply; 7+ messages in thread
From: Nicolas Pouillard @ 2008-04-09 14:07 UTC (permalink / raw)
  To: Caml_mailing list

[-- 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 --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re : [Caml-list] Porting camlp4 stuff from 3.09 to 3.10: need help
  2008-04-09 14:07 ` Nicolas Pouillard
@ 2008-04-09 15:29   ` Loup Vaillant
  2008-04-09 15:36     ` Nicolas Pouillard
  0 siblings, 1 reply; 7+ messages in thread
From: Loup Vaillant @ 2008-04-09 15:29 UTC (permalink / raw)
  To: Nicolas Pouillard; +Cc: Caml_mailing list

Hello,

Now, I'm lost in the wiki. Do we have somewhere the 3.10 equivalent of this?
http://martin.jambon.free.fr/extend-ocaml-syntax.html

More specifically, I think about the part which deals with extending
The Ocaml grammar, (adding a "try ... finally" clause).

The wiki page about syntax extensions:
http://brion.inria.fr/gallium/index.php/Syntax_extension_tutorial

Seems to be about creating a new grammar, and then extending it. I
can't find (or understand) about extending specifically the Ocaml
(base syntax) grammar.

Finally, do we have some introductory page about the 3.10 camlp4,
which could be understood by a complete newbie? I know Ocaml's core
language pretty well, but my camlp4 knowledge is close to nil.

Thanks,
Loup


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re : [Caml-list] Porting camlp4 stuff from 3.09 to 3.10: need help
  2008-04-09 15:29   ` Loup Vaillant
@ 2008-04-09 15:36     ` Nicolas Pouillard
  2008-04-09 15:46       ` Loup Vaillant
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Pouillard @ 2008-04-09 15:36 UTC (permalink / raw)
  To: Loup Vaillant; +Cc: Caml_mailing list

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

Excerpts from Loup Vaillant's message of Wed Apr 09 17:29:29 +0200 2008:
> Hello,
> 
> Now, I'm lost in the wiki. Do we have somewhere the 3.10 equivalent of this?
> http://martin.jambon.free.fr/extend-ocaml-syntax.html

The [Pa_float] page is one of them.

[Pa_float]: http://brion.inria.fr/gallium/index.php/Pa_float

> More specifically, I think about the part which deals with extending
> The Ocaml grammar, (adding a "try ... finally" clause).
> 
> The wiki page about syntax extensions:
> http://brion.inria.fr/gallium/index.php/Syntax_extension_tutorial
> 
> Seems to be about creating a new grammar, and then extending it. I
> can't find (or understand) about extending specifically the Ocaml
> (base syntax) grammar.

You're right.

> Finally, do we have some introductory page about the 3.10 camlp4,
> which could be understood by a complete newbie? I know Ocaml's core
> language pretty well, but my camlp4 knowledge is close to nil.

That's  one  more drawback of such a wiki, the presentation is not well suited
for  newcomers.  While waiting something better (and helping to make it happen
if  possible),  starting  by  the first Camlp4 page on the wiki or reading the
old documentation.

-- 
Nicolas Pouillard aka Ertai

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re : [Caml-list] Porting camlp4 stuff from 3.09 to 3.10: need help
  2008-04-09 15:36     ` Nicolas Pouillard
@ 2008-04-09 15:46       ` Loup Vaillant
  2008-04-09 16:02         ` Nicolas Pouillard
  0 siblings, 1 reply; 7+ messages in thread
From: Loup Vaillant @ 2008-04-09 15:46 UTC (permalink / raw)
  To: Nicolas Pouillard; +Cc: Caml_mailing list

2008/4/9, Nicolas Pouillard <nicolas.pouillard@gmail.com>:
> Excerpts from Loup Vaillant's message of Wed Apr 09 17:29:29 +0200 2008:
>
> > Hello,
>  >
>  > Now, I'm lost in the wiki. Do we have somewhere the 3.10 equivalent of this?
>  > http://martin.jambon.free.fr/extend-ocaml-syntax.html
>
> The [Pa_float] page is one of them.
>
>  [Pa_float]: http://brion.inria.fr/gallium/index.php/Pa_float

Oh. Silly me.


>  > Finally, do we have some introductory page about the 3.10 camlp4,
>  > which could be understood by a complete newbie? I know Ocaml's core
>  > language pretty well, but my camlp4 knowledge is close to nil.
>
>
> That's  one  more drawback of such a wiki, the presentation is not well suited
>  for  newcomers.  While waiting something better (and helping to make it happen
>  if  possible),  starting  by  the first Camlp4 page on the wiki or reading the
>  old documentation.

I've read on the TODO page of the wiki that it still lacks references
about the differences between 3.09 and 3.10. Could I hope for such a
page (even incomplete), or should I compare the docs of the two
versions by myself?

Cheers, (and thanks, again :-)
Loup


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re : [Caml-list] Porting camlp4 stuff from 3.09 to 3.10: need help
  2008-04-09 15:46       ` Loup Vaillant
@ 2008-04-09 16:02         ` Nicolas Pouillard
  0 siblings, 0 replies; 7+ messages in thread
From: Nicolas Pouillard @ 2008-04-09 16:02 UTC (permalink / raw)
  To: Loup Vaillant; +Cc: Caml_mailing list

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

Excerpts from Loup Vaillant's message of Wed Apr 09 17:46:41 +0200 2008:
> 2008/4/9, Nicolas Pouillard <nicolas.pouillard@gmail.com>:
> > Excerpts from Loup Vaillant's message of Wed Apr 09 17:29:29 +0200 2008:
> >
> > > Hello,
> >  >
> >  > Now, I'm lost in the wiki. Do we have somewhere the 3.10 equivalent of this?
> >  > http://martin.jambon.free.fr/extend-ocaml-syntax.html
> >
> > The [Pa_float] page is one of them.
> >
> >  [Pa_float]: http://brion.inria.fr/gallium/index.php/Pa_float
> 
> Oh. Silly me.
> 
> >  > Finally, do we have some introductory page about the 3.10 camlp4,
> >  > which could be understood by a complete newbie? I know Ocaml's core
> >  > language pretty well, but my camlp4 knowledge is close to nil.
> >
> >
> > That's  one  more drawback of such a wiki, the presentation is not well suited
> >  for  newcomers.  While waiting something better (and helping to make it happen
> >  if  possible),  starting  by  the first Camlp4 page on the wiki or reading the
> >  old documentation.
> 
> I've read on the TODO page of the wiki that it still lacks references
> about the differences between 3.09 and 3.10. Could I hope for such a
> page (even incomplete), or should I compare the docs of the two
> versions by myself?

Differences  between  3.09  and 3.10 are spread all over the wiki but there is
still the most important ones.

-- 
Nicolas Pouillard aka Ertai

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-04-09 16:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-09 13:07 Re : [Caml-list] Porting camlp4 stuff from 3.09 to 3.10: need help Matthieu Wipliez
2008-04-09 13:31 ` Loup Vaillant
2008-04-09 14:07 ` Nicolas Pouillard
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).