caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* stupid q: camlp4
@ 2008-11-08 20:00 Anastasia Gornostaeva
  2008-11-08 21:24 ` [Caml-list] " Jon Harrop
  2008-11-09 15:39 ` Richard Jones
  0 siblings, 2 replies; 5+ messages in thread
From: Anastasia Gornostaeva @ 2008-11-08 20:00 UTC (permalink / raw)
  To: caml-list

Hello.

How can I learn modern Camlp4?

thx.
ermine


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

* Re: [Caml-list] stupid q: camlp4
  2008-11-08 21:24 ` [Caml-list] " Jon Harrop
@ 2008-11-08 21:03   ` Anastasia Gornostaeva
  2008-11-08 22:11     ` Jon Harrop
  0 siblings, 1 reply; 5+ messages in thread
From: Anastasia Gornostaeva @ 2008-11-08 21:03 UTC (permalink / raw)
  To: caml-list

On Sat, Nov 08, 2008 at 09:24:05PM +0000, Jon Harrop wrote:
> On Saturday 08 November 2008 20:00:44 Anastasia Gornostaeva wrote:
> > Hello.
> >
> > How can I learn modern Camlp4?
> 
> The new Camlp4 is not yet fully documented. The official documentation is on a 
> wiki here:
> 
>   http://brion.inria.fr/gallium/index.php/Camlp4
> 
> Richard Jones' OCaml tutorial site has a simple "foreach" example:
> 
>   http://www.ocaml-tutorial.org/camlp4_3.10/
> 
> Our OCaml Journal published an article about parsers and macros using the new 
> Camlp4 on 23rd November 2007:
> 
>   http://www.ffconsultancy.com/products/ocaml_journal/?ol
> 
> I once posted a simple compiler for the "Minim" language that was written 
> using Camlp4:
> 
> http://caml.inria.fr/pub/ml-archives/caml-list/2007/08/c92bb15c444511674faf0c898d2e9986.en.html
> 
Oh, how many useful links! I spent some time on ocaml.org site 
to figure out something interesting for new camlp4, but it was not always clear
if the article is about new or old camlp4.


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

* Re: [Caml-list] stupid q: camlp4
  2008-11-08 20:00 stupid q: camlp4 Anastasia Gornostaeva
@ 2008-11-08 21:24 ` Jon Harrop
  2008-11-08 21:03   ` Anastasia Gornostaeva
  2008-11-09 15:39 ` Richard Jones
  1 sibling, 1 reply; 5+ messages in thread
From: Jon Harrop @ 2008-11-08 21:24 UTC (permalink / raw)
  To: caml-list

On Saturday 08 November 2008 20:00:44 Anastasia Gornostaeva wrote:
> Hello.
>
> How can I learn modern Camlp4?

The new Camlp4 is not yet fully documented. The official documentation is on a 
wiki here:

  http://brion.inria.fr/gallium/index.php/Camlp4

Richard Jones' OCaml tutorial site has a simple "foreach" example:

  http://www.ocaml-tutorial.org/camlp4_3.10/

Our OCaml Journal published an article about parsers and macros using the new 
Camlp4 on 23rd November 2007:

  http://www.ffconsultancy.com/products/ocaml_journal/?ol

I once posted a simple compiler for the "Minim" language that was written 
using Camlp4:

http://caml.inria.fr/pub/ml-archives/caml-list/2007/08/c92bb15c444511674faf0c898d2e9986.en.html

-- 
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e


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

* Re: [Caml-list] stupid q: camlp4
  2008-11-08 21:03   ` Anastasia Gornostaeva
@ 2008-11-08 22:11     ` Jon Harrop
  0 siblings, 0 replies; 5+ messages in thread
From: Jon Harrop @ 2008-11-08 22:11 UTC (permalink / raw)
  To: caml-list

On Saturday 08 November 2008 21:03:33 Anastasia Gornostaeva wrote:
> On Sat, Nov 08, 2008 at 09:24:05PM +0000, Jon Harrop wrote:
> > Richard Jones' OCaml tutorial site has a simple "foreach" example:
> >
> >   http://www.ocaml-tutorial.org/camlp4_3.10/
> >
> > Our OCaml Journal published an article about parsers and macros using the
> > new Camlp4 on 23rd November 2007:
> >
> >   http://www.ffconsultancy.com/products/ocaml_journal/?ol
>
> Oh, how many useful links! I spent some time on ocaml.org site
> to figure out something interesting for new camlp4, but it was not always
> clear if the article is about new or old camlp4.

Well, you get what you pay for. ;-)

-- 
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e


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

* Re: [Caml-list] stupid q: camlp4
  2008-11-08 20:00 stupid q: camlp4 Anastasia Gornostaeva
  2008-11-08 21:24 ` [Caml-list] " Jon Harrop
@ 2008-11-09 15:39 ` Richard Jones
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Jones @ 2008-11-09 15:39 UTC (permalink / raw)
  To: Anastasia Gornostaeva; +Cc: caml-list

On Sat, Nov 08, 2008 at 11:00:44PM +0300, Anastasia Gornostaeva wrote:
> How can I learn modern Camlp4?

With difficulty.  That's sad because it's very powerful.

I would suggest starting with Martin's Jambon's tutorial.  Even though
it refers to the "old" camlp4 / camlp5, it's still useful to
understand the concepts:

http://martin.jambon.free.fr/extend-ocaml-syntax.html

Then take a look at Martin's example of what changed between the two
versions:

http://martin.jambon.free.fr/examples/pa_json_static_3100beta.html

The camlp4 wiki has already been mentioned, and is very useful.  This
is probably the most useful reference page of all:

http://brion.inria.fr/gallium/index.php/AST

Finally take a look at some real examples:

http://caml.inria.fr/cgi-bin/hump.en.cgi?sort=0&browse=92

Rich.

-- 
Richard Jones
Red Hat


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

end of thread, other threads:[~2008-11-09 15:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-08 20:00 stupid q: camlp4 Anastasia Gornostaeva
2008-11-08 21:24 ` [Caml-list] " Jon Harrop
2008-11-08 21:03   ` Anastasia Gornostaeva
2008-11-08 22:11     ` Jon Harrop
2008-11-09 15:39 ` Richard Jones

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