Add of %source_extension and %header_extension which specify

the source or/and the header output file extension.
* src/files.c (compute_base_names): Remove initialisation of
src_extension and header_extension.
(compute_exts_from_gf): Update.
(compute_exts_from_src): Update.
(output_files): Update.
* src/reader.c (parse_header_extension_decl): New.
(parse_source_extension_decl): New.
(read_declarations): New case statements for the new tokens.
* src/lex.c (percent_table): Add entries for %source_extension
and %header_extension.
* src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
This commit is contained in:
Akim Demaille
2001-08-06 08:51:41 +00:00
parent 8416323152
commit 7333d40316
20 changed files with 348 additions and 217 deletions

View File

@@ -551,6 +551,8 @@ struct percent_table_struct percent_table[] =
{ "output_file", &spec_outfile, tok_setopt }, /* -o */
{ "file_prefix", &spec_file_prefix, tok_setopt }, /* -b */
{ "name_prefix", &spec_name_prefix, tok_setopt }, /* -p */
{ "header_extension", NULL, tok_hdrext},
{ "source_extension", NULL, tok_srcext},
#endif
{ "verbose", &verbose_flag, tok_noop }, /* -v */
{ "debug", &debug_flag, tok_noop }, /* -t */