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 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id DF180BC0A for ; Wed, 13 Jun 2007 15:45:46 +0200 (CEST) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.181]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5DDjiJA029730 for ; Wed, 13 Jun 2007 15:45:45 +0200 Received: by wa-out-1112.google.com with SMTP id m34so265489wag for ; Wed, 13 Jun 2007 06:45:44 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=echze4lkVLUTpsqw6kDbEHcVWgnlKw04BFs7CHO92DRw+mswg+C3bhWmeLRjMgIw5WeUcuWSGBSxRpsR+RtKSL8Vgop8G1omTlmb9yIUjFxJnLgq6nBiCEbh165eq8/w+ieLw8hDw3A3mcRnyNKjvsjAgEfyOQeYOeRFIIao1yo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Tk9FBlisTQGjpyk93d20W4y3Q58VOWpAl/4atQN7exNdEE2Ms2CM1GHlqzenbt+Sh3P0N/2N7JJZeA+RrHTlp5eLvIYa/NfyBfbfozqlceW1D31B5b4xgwd7rIC4FUXWupLuKLZ1RCXb/vfEeypZPcDYUyY0bKETVvk80RiSTiA= Received: by 10.115.54.1 with SMTP id g1mr598068wak.1181742344560; Wed, 13 Jun 2007 06:45:44 -0700 (PDT) Received: by 10.114.181.9 with HTTP; Wed, 13 Jun 2007 06:45:44 -0700 (PDT) Message-ID: Date: Wed, 13 Jun 2007 15:45:44 +0200 From: "Nicolas Pouillard" To: "Jeremy Yallop" Subject: Re: [Caml-list] building executables with camlp4 Cc: caml-list@inria.fr In-Reply-To: <466FF0D8.5060006@ed.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <466FCB46.1070304@ed.ac.uk> <466FED3B.3030405@ed.ac.uk> <466FF0D8.5060006@ed.ac.uk> X-j-chkmail-Score: MSGID : 466FF509.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 466FF509.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 ocamlc:01 -linkall:01 usr:01 ocaml:01 lib:01 ocaml:01 camlp:01 lib:01 parsers:01 cmo:01 parsers:01 cmo:01 ctyp:01 functor:01 On 6/13/07, Jeremy Yallop wrote: > Nicolas Pouillard wrote: > >> But this doesn't: > >> > >> $ ocamlc -g -linkall -I /usr/local/ocaml/lib/ocaml/camlp4 \ > >> -o minimal \ > >> camlp4lib.cma \ > >> unix.cma \ > >> Camlp4Parsers/Camlp4OCamlRevisedParser.cmo \ > >> Camlp4Parsers/Camlp4OCamlParser.cmo \ > >> Camlp4Printers/Camlp4OCamlPrinter.cmo \ > >> Camlp4Bin.cmo \ > >> minimal.cmo > >> $ ./minimal input.ml > >> File "input.ml", line 1, characters 35-36: > >> Parse error: ident_of_ctyp: this type is not an identifier > > > > Try to put Camlp4Bin before minimal, since it's the main so the init > > section of this module is the starting point. > > Sorry, I don't follow. Camlp4Bin is before minimal above, right? If I > reverse the order of Camlp4Bin.cmo and minimal.cmo I get Not_found > errors again when I run the program. > Hum, sorry for my very confusing previous answer. I thought "Camlp4Bin *after* minimal". But you've tried that. After thinking a little more, I can explain what's happening there is two modes to get into Camlp4 pipeline. The first one is through registration and the second one is through dyn-linking of cmo files on the command line. Here your Minimal module is neither on the command line nor registered. To register it make a functor around your grammar extension and call Camlp4.Register.OCamlSyntaxExtension. -- Nicolas Pouillard