« Return to Thread: [Camlp4 3.10] The rosetta stone (Was: lists without $list:...$)

Re: [Camlp4 3.10] The rosetta stone (Was: lists without $list:...$)

by Nicolas Pouillard-2 :: Rate this Message:

Reply to Author | View in Thread

On 4/1/07, Dmitry Bely <dmitry.bely@...> wrote:

> On 3/26/07, Nicolas Pouillard <nicolas.pouillard@...> wrote:
> > On 3/24/07, Martin Jambon <martin.jambon@...> wrote:
> > >
> > > I would like you or anyone knowledgeable to translate one significant
> > > syntax extension. You know, some kind of Rosetta stone. You can take
> > > Markus' sexp syntax extension or ioxml if you prefer, it won't be much
> > > different.
> >
> > Here is your rosetta stone :)
> >
> > I translated pa_json_static.ml.
>
> For me it compiles but does not work:
>
> D:\Work\Camlp4test>ocamlc -pp camlp4orf -I +camlp4 -c pa_json_static.ml
>
> D:\Work\Camlp4test>camlp4 pa_json_static.cmo -parser OCaml -printer
> OCaml test.ml
> No level labelled "top" in entry "str_item"
> Failure: "Grammar.extend"

Wrong order for loaded modules....

camlp4 -parser OCaml pa_json_static.cmo -printer OCaml test.ml

or shorter:

camlp4 -parser o pa_json_static.cmo -printer o test.ml

or event shorter:

camlp4o pa_json_static.cmo -printer o test.ml

--
Nicolas Pouillard

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

 « Return to Thread: [Camlp4 3.10] The rosetta stone (Was: lists without $list:...$)