English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2007-07-25 (11:40)
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"
<john.r.harrison@intel.com> 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