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
Quotations and the functorial camlp4 interface
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Hendrik Tews <tews@o...>
Subject: Re: [Caml-list] Quotations and the functorial camlp4 interface
I wrote:

   More in detail: Assume I obtained two camlp4 syntax modules SO
   and SR, such that SO parses the orginal syntax and SR parses the
   revised syntax. I now want to add quotation support to both SO
   and SR. Following Camlp4OCamlRevisedQuotationExpander I do

There is one point that I found out myself in the meantime:
quotations are installed by mutating something inside the
Quotation submodule of a Camlp4Syntax. Further, the functor that
creates emoty syntaxes, OCamlInitSyntax, uses its Quotation
argument literally as Quotation submodule in its output.
Therefore, when creating the modules SO and SR it is important to
do so with freshly generated quotations modules (by

How about the Loc submodule of Ast that is passed into
OCamlInitSyntax? There is the mutable Loc.name, which contains
the default location variable. If I reuse the Ast argument of
OCamlInitSyntax, will the mutable Loc.name be shared between the
outputs? Are there syntax extensions in the camlp4 distribution
that mutate Loc.name?