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 concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id B5D82BC6B for ; Sat, 28 Apr 2007 17:12:29 +0200 (CEST) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.226]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l3SFCSCv027201 for ; Sat, 28 Apr 2007 17:12:29 +0200 Received: by nz-out-0506.google.com with SMTP id l8so1581541nzf for ; Sat, 28 Apr 2007 08:12:27 -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=VzWA2CENk02Q4C3gkZsmyMGFObH6bAsVOmtvLLvmazY/oIAe679PXLj8aKaAOIBRPbh9hbfo6hjuX7EW0xkkfuJMeuV2uc7uuN1qVG94zQC1CRqQIOzgykAIPCkg04Cc7Nh6ZAFhzkY7V8zYAZGv7GqnOZ1YTKq3gKE2F/iD7Yk= 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=bzamwYLqhCptDGy4hJD6Sn0C74cQyr1D5IPIMCKcJKo/jH33irRC339wd4SSclyEqnio3lzjYB3AJTwh/zkBaYdy71u7tsVzqX7w3iWS3TOdgs6S9a2yQ8haVxfBUCXVXJXiaaNk3Unz2uPGAXipr9nK756UyQSRtvBTHApZTQc= Received: by 10.114.153.18 with SMTP id a18mr1379748wae.1177773147194; Sat, 28 Apr 2007 08:12:27 -0700 (PDT) Received: by 10.114.181.18 with HTTP; Sat, 28 Apr 2007 08:12:27 -0700 (PDT) Message-ID: Date: Sat, 28 Apr 2007 17:12:27 +0200 From: "Nicolas Pouillard" To: "Joel Reymont" Subject: Re: [Caml-list] Re: ocamlbuild, menhir and keeping tokens in a separate file Cc: "Caml List" In-Reply-To: <2A1A8C74-50D5-4F0B-815B-B56CA506578E@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <301C13B2-671A-40CE-AB6C-E92E0ED454E6@gmail.com> <78040751-B95B-4620-A995-A4AB74F5E997@gmail.com> <2A1A8C74-50D5-4F0B-815B-B56CA506578E@gmail.com> X-j-chkmail-Score: MSGID : 4633645C.000 on concorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at concorde with ID 4633645C.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; tokens:01 ocaml:01 parser:01 ocaml:01 ocamldep:01 tokens:01 ocamldep:01 parser:01 wrote:01 token:01 caml-list:01 mly:02 mly:02 nicolas:08 nicolas:08 On 4/28/07, Joel Reymont wrote: > This is what I came up with: > > flag ["ocaml"; "parser"; "mehir" ] (A"--explain"); > flag ["ocaml"; "menhir_ocamldep" ] (A"easy_tokens.mly"); > flag ["ocaml"; "menhir_ocamldep" ] (A"--base"); > flag ["ocaml"; "menhir_ocamldep" ] (A"easy_parser"); > > Can the 3 different (A"..")s be combined? flag ["ocaml"; "menhir_ocamldep" ] (S[A"easy_tokens.mly"; A"--base"; A"easy_parser"]); > This works but ocamlbuild doesn't know anything about easy_tokens and > doesn't copy it to _build which results in a "file not found" error. > > Is there a way to say that this token file should always go on the > command line with this mly file? Hardcoding like above only works if > there's one parser in the project. > > I tried the following off of the top of my head but it doesn't work. > > dep ["ocaml"; "parser"; "menhir"; "tokens"] ["easy_tokens.mly"]; > > in _tags > > "easy_parser.mly": tokens Hum this is supposed to works. Can you try these one dep ["ocaml"; "parser"; "menhir"] ["easy_tokens.mly"]; dep ["ocaml"; "parser"; "menhir"; "file:easy_parser.mly"] ["easy_tokens.mly"]; -- Nicolas Pouillard