English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    
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
Hi,

I have another comment in this speek-to-myself-thread:

I wrote:

   2. The two MakeQuotationSyntax candidates
      Camlp4OCamlRevisedParser.Make and Camlp4OCamlParser.Make do
      only mutate the grammar entries in their argument modules.

This is wrong: When they extend the syntax they register
keywords, which are apparently stored in a hash table in the
grammar module. Therefore they mutate the grammar module.

      Therefore one always has to create new EmptySyntax'es but can
      reuse all the rest (especially Lexer, Ast and Loc) from
      Camlp4.PreCast.

At least the grammar argument to OCamlInitSyntax should always be
freshly generated by
Camlp4.Struct.Grammar.Static.Make(Camlp4.PreCast.Lexer) to start
with a fresh keyword hash.

   4. Why does Camlp4OCamlRevisedQuotationExpander generate a new
      grammar module Gram and does not reuse Camlp4.PreCast.Gram?
      Can the latter be changed by some syntax extension?

This is answered now.

Bye,

Hendrik