Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] changing the filename in errors reported by ocamlyacc and ocamllex
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Remi Vanicat <remi.vanicat@l...>
Subject: Re: [Caml-list] changing the filename in errors reported by ocamlyacc and ocamllex
James Leifer <James.Leifer@inria.fr> 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