List Info

Thread: "ocaml_beginners"::[] Getting started with Camlp4




"ocaml_beginners"::[] Getting started with Camlp4
country flaguser name
United States
2008-03-16 14:30:09

Hi -

I'd like to start playing around with the 3.10 version of Camlp4.
Getting started is difficult because the amount of
information/examples out there is still in its infancy.

In the 3.09 version of Camlp4 I like to visualize the grammar and
figure out which point to extend by typing in:

Grammar.Entry.print Pcaml.expr;;

Is there something similar I can do with Camlp4 3.10? Otherwise, what
methods are people using to figure out the structure of the original
OCaml grammar?

Thanks,

Andy

__._,_.___
.

__,_._,___
Re: "ocaml_beginners"::[] Getting started with Camlp4
country flaguser name
United Kingdom
2008-03-16 14:49:46

On Sunday 16 March 2008 19:30:09 andrew_schein wrote:
> Hi -
>
> I'd like to start playing around with the 3.10 version of Camlp4.
> Getting started is difficult because the amount of
> information/examples out there is still in its infancy.
>
>; In the 3.09 version of Camlp4 I like to visualize the grammar and
> figure out which point to extend by typing in:
>
> Grammar.Entry.print Pcaml.expr;;
>
> Is there something similar I can do with Camlp4 3.10? Otherwise, what
>; methods are people using to figure out the structure of the original
> OCaml grammar?

According to the article about camlp4 3.10 in the OCaml Journal, you do:

# Gram.Entry.print Format.std_formatter Syntax.expr;;

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

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )