bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: filenaming with .yxx extensions


From: Hans Aberg
Subject: Re: filenaming with .yxx extensions
Date: Wed, 27 Feb 2002 20:54:38 +0100

At 09:36 +0100 2002/02/27, Akim Demaille wrote:
>Now, the question is:
>
>        bison foo.y -d -o foo.x
>           => error (my preferred)
>           => foo.x.c, foo.x.h
>           => foo.c, foo.x.h

I think that the original idea that the ".y" suffix should be allowed to
vary is wrong, as the input is the same format. This is what causing your
problem.

The manual says that --output=<parser-filename> produces a parser file
named <parser-filename> and similarly, --output=<defines-filename> produces
a defines file named <defines-filename>. This is how I think it should be.

If you want to allow suffixes vary, introduce some new options for that.
Users under UNIX can then easy construct their own bison variation by an
alias.

So, for example
  bison foo.y --output-suffix=.cc --defines-suffix=""
would produce a parser file named foo.cc and a defines file named "foo",
and so would
  bison foo.yxx --output-suffix=.cc --defines-suffix=""

The default is:
  bison foo.y --output-suffix=.c --defines-suffix=.h

  Hans Aberg





reply via email to

[Prev in Thread] Current Thread [Next in Thread]