From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA15137; Thu, 6 May 2004 16:16:20 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA15194 for ; Thu, 6 May 2004 16:16:19 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from mwinf0103.wanadoo.fr (smtp1.wanadoo.fr [193.252.22.30]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i46EGIEV020344 for ; Thu, 6 May 2004 16:16:18 +0200 Received: from vanicat.homelinux.org (ca-bordeaux-16-51.w80-8.abo.wanadoo.fr [80.8.88.51]) by mwinf0103.wanadoo.fr (SMTP Server) with ESMTP id 661451BB65E0 for ; Thu, 6 May 2004 16:16:18 +0200 (CEST) Received: from moi by vanicat.homelinux.org with local (Exim 4.32) id 1BLjfV-0002Vr-RU for caml-list@inria.fr; Thu, 06 May 2004 16:16:09 +0200 To: caml-list@inria.fr Subject: Re: [Caml-list] changing the filename in errors reported by ocamlyacc and ocamllex References: From: Remi Vanicat Mail-Copy-To: never Date: Thu, 06 May 2004 16:16:09 +0200 In-Reply-To: (James Leifer's message of "Thu, 06 May 2004 15:53:00 +0200") Message-ID: <87isf9k5ee.dlv@vanicat.homelinux.org> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-Miltered: at nez-perce with ID 409A48B2.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 foo:01 foo:01 indirection:01 stdout:01 stderr:01 filenames:01 caml:01 writes:01 remi:01 remi:01 vanicat:01 vanicat:01 patch:02 makefile:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk James Leifer writes: > Hello. > > Anyone know how to get ocamlyacc and ocamllex to report errors in a > filename different from the one that they are processing? > > The reason I ask is that I'm *generating* foo.mll and foo.mly from > another set of files (every problem in computer science being > susceptible to an added level of indirection 8-)). I'd like the get > the errors reported in the source rather than generated file. Of > course my Makefile *can* pipe the stdout and stderr of ocamllex and > yacc through a perl script that renames the filenames in the error > reports, but that's obscene. > > Ideas? The caml team have just added support of #line directive for ocamllex and ocamlyacc (just as in this week). I believe that if you don't want to use the cvs version, there is no many solution (perhaps only to extract just the patch for ocamllex/ocamlyacc). -- Rémi Vanicat ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners