Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Equivalent of Quotation.ExStr in new camlp4?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Gabriel Kerneis <gabriel.kerneis@e...>
Subject: Re: [Caml-list] Equivalent of Quotation.ExStr in new camlp4?
Le Tue, 24 Jul 2007 14:23:34 -0700, "Harrison, John R"
<> a écrit :
> In the old camlp4 one could set up a quotation parser to just apply a
> string
> transformation and thereafter parse with the usual OCaml parser, e.g.
>   Quotation.add name (Quotation.ExStr expander)
> What is the equivalent in the new camlp4?

In Ocsigen,
Quotation.add "xml" (Quotation.ExAst (xml_exp, xml_pat))
open Camlp4.PreCast ;
Syntax.Quotation.add "xml" Syntax.Quotation.DynAst.expr_tag

Maybe this can give you a clue ?

Gabriel Kerneis