From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 693FCBC6C for ; Sun, 27 Jan 2008 18:25:13 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAMRMnEfAXQInh2dsb2JhbACQKAEBAQgKKZl4 X-IronPort-AV: E=Sophos;i="4.25,256,1199660400"; d="scan'208";a="21857048" Received: from concorde.inria.fr ([192.93.2.39]) by mail4-smtp-sop.national.inria.fr with ESMTP; 27 Jan 2008 18:25:13 +0100 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m0RHPCYS027767 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Sun, 27 Jan 2008 18:25:12 +0100 X-IronPort-AV: E=Sophos;i="4.25,256,1199660400"; d="scan'208";a="8422523" Received: from peray.inria.fr (HELO ausone.inria.fr) ([128.93.8.98]) by mail3-relais-sop.national.inria.fr with SMTP; 27 Jan 2008 18:25:12 +0100 Received: by ausone.inria.fr (sSMTP sendmail emulation); Sun, _d Jan 2008 18:24:08 +0100 From: "Nicolas Pouillard" Content-Type: text/plain; charset=UTF-8 Cc: caml-list Subject: Re: [Caml-list] camlp4 Filters changed? To: joelr1 References: <1201438563-sup-8235@ausone.local> <1201451422-sup-4208@ausone.local> In-Reply-To: Date: Sun, 27 Jan 2008 18:24:08 +0100 Message-Id: <1201454527-sup-5193@ausone.local> User-Agent: Sup/git X-Miltered: at concorde with ID 479CBE78.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 camlp:01 struct:01 expr:01 expr:01 token:01 token:01 wrote:01 caml-list:01 inherit:01 define:02 ast:02 ast:02 defined:02 match:02 Excerpts from joelr1's message of Sun Jan 27 17:37:58 +0100 2008: > > On Jan 27, 2008, at 4:32 PM, Nicolas Pouillard wrote: > > > That's certainly because you need to define your types as one big > > definition (using "and"). > > > > type t1 = ... > > and t2 = ... > > and t3 = ... > > > > class map = Camlp4MapGenerator.generated; > > > > Because the generation declaration take only the last definition > > group now. > > > That's exactly what my AST looks like. Then I have (in a different ml > file) > > open Easy_ast > Move it there > module Camlp4Trash = struct > INCLUDE "easy_ast.ml";; > end;; > class map = Camlp4MapGenerator.generated;; > > let strip_token_loc = object > inherit map as super > method expr e = > match super#expr e with > | `TokenPos (a, _) -> a > | e -> e > end > > let strip_stmt x = strip_token_loc#statement x;; > > > This used to work just fine before. The generator works on the last defined types before the "class map = Camlp4MapGenerator.generated;;". -- Nicolas Pouillard aka Ertai