From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 46FBBBC57 for ; Thu, 2 Sep 2010 10:56:08 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmgDAPgDf0yNTDBjgWdsb2JhbACTVo0mFQEBFiIivTGFOQSKGQ X-IronPort-AV: E=Sophos;i="4.56,307,1280700000"; d="scan'208";a="56502833" Received: from os.inf.tu-dresden.de ([141.76.48.99]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 02 Sep 2010 10:56:07 +0200 Received: from [2002:8d4c:3001:48:222:68ff:fe19:71d] (helo=blau.inf.tu-dresden.de) by os.inf.tu-dresden.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) id 1Or5aY-0006AU-Q3 for caml-list@yquem.inria.fr; Thu, 02 Sep 2010 10:56:06 +0200 Received: from tews by blau.inf.tu-dresden.de with local (Exim 4.72) (envelope-from ) id 1Or5aY-0001AN-2B for caml-list@yquem.inria.fr; Thu, 02 Sep 2010 10:56:06 +0200 From: Hendrik Tews To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Quotations and the functorial camlp4 interface References: <19548.32194.301525.322135@blau.inf.tu-dresden.de> Date: Thu, 02 Sep 2010 10:56:05 +0200 In-Reply-To: <19548.32194.301525.322135@blau.inf.tu-dresden.de> (Hendrik Tews's message of "Fri, 6 Aug 2010 23:25:22 +0200") Message-ID: <6x7hj44j8a.fsf@blau.inf.tu-dresden.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam: no; 0.00; hendrik:01 tews:01 tews:01 camlp:01 camlp:01 syntax:01 hash:01 lexer:01 struct:01 lexer:01 hash:01 syntax:01 hendrik:01 tu-dresden:01 wrote:01 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