[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: extension patch
From: |
Akim Demaille |
Subject: |
Re: extension patch |
Date: |
01 Aug 2001 20:10:19 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Academic Rigor) |
>>>>> "marc-alexandre" == marc-alexandre autret <address@hidden> writes:
marc-alexandre> This one is better.
Thanks, I'm applying it.
| --- bison/src/files.c Thu Jan 18 15:47:08 2001
| +++ bison-1.29/src/files.c Wed Aug 1 13:22:15 2001
| @@ -45,6 +45,11 @@
| static char *base_name;
| static char *short_base_name;
|
| +/* C source file extension (the parser source). */
| +static char *src_extension;
| +/* Header file extension (if option ``-d'' is specified). */
| +static char *header_extension;
| +
You should have been taught to initialize pointers to NULL :)
| address@hidden/address@hidden
| address@hidden/foo.tab.c}. It's is also possible, in case you are writting
| +C++ code instead of C in your grammar file, to name it @file{foo.ypp}
| +or @file{foo.y++}. Then, the output files will take an extention like
| +the given one as input (repectively @file{foo.tab.cpp} and
@file{foo.tab.c++}).
| +This feature takes effect with all options that manipulate filenames like
| address@hidden or @samp{-d}.
| +
| +For example :
| +
| address@hidden
| +bison -d @var{infile.yxx}
| address@hidden example
@noindent is missing here.
| +will produce @file{infile.tab.cxx} and @file{infile.tab.hxx}. and
| +
| address@hidden
| +bison -d @var{infile.y} -o @var{output.c++}
| address@hidden example
Likewise.
| +will produce @file{output.c++} and @file{outfile.h++}.
| +
| address@hidden
@refill is not useful here AFAICS.
| +Changes in version 1.29:
We are still working on 1.28a.
| +2001-07-22 Marc Autret <address@hidden>
| +
| + * doc/bison.texinfo: Updated.
| + * doc/bison.1 (mandoc): Updated.
| + * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Removed .c and .h.
| + * src/files.c: Support output files extensions computing.
| + (src_extension): New static variable.
| + (header_extension): New static variable.
| + (tr): New function.
| + (get_extension_index): New function, gets the index of an extension
| + filename in a string.
| + (compute_exts_from_gf): New function, computes extensions from the
| + grammar file extension.
| + (compute_exts_from_src): New functions, computes extensions from the
| + C source file extension, file given by ``-o'' option.
| + (compute_base_names): Updated.
| + (output_files): Updated.
| +
| +2001-07-20 Marc Autret <address@hidden>
| +
| + * src/output.c: Warning ``assignment discards qualifiers from pointer
| + target type'' removed.
| + * src/getargs.h (skeleton): Extern declaration Updated.
| + * src/getargs.c (skeleton): Variable declared ``const''.
| +
This was not part of the patch.