22 |
|
|
23 |
#include "system.h" |
#include "system.h" |
24 |
#include "getargs.h" |
#include "getargs.h" |
25 |
|
#include "quote.h" |
26 |
#include "files.h" |
#include "files.h" |
27 |
#include "gram.h" |
#include "gram.h" |
28 |
#include "error.h" |
#include "error.h" |
420 |
|
|
421 |
/* Computes the extensions from the grammar file name. */ |
/* Computes the extensions from the grammar file name. */ |
422 |
filename_split (infile, &base, &tab, &ext); |
filename_split (infile, &base, &tab, &ext); |
423 |
|
|
424 |
if (ext && !yacc_flag) |
if (ext && !yacc_flag) |
425 |
compute_exts_from_gf (ext); |
compute_exts_from_gf (ext); |
426 |
} |
} |
446 |
if (!spec_defines_file) |
if (!spec_defines_file) |
447 |
spec_defines_file = stringappend (full_base_name, header_extension); |
spec_defines_file = stringappend (full_base_name, header_extension); |
448 |
|
|
449 |
|
if (defines_flag) |
450 |
|
{ |
451 |
|
/* This is really Q&D, but I don't want to spend time on issues |
452 |
|
which will be different with 1.50. */ |
453 |
|
const char *parser_filename = NULL; |
454 |
|
if (spec_outfile) |
455 |
|
parser_filename = spec_outfile; |
456 |
|
else |
457 |
|
parser_filename = stringappend (full_base_name, src_extension); |
458 |
|
if (!strcmp (spec_defines_file, parser_filename)) |
459 |
|
fatal ("header and parser would be both named %s", |
460 |
|
quote (parser_filename)); |
461 |
|
} |
462 |
|
|
463 |
/* It the graph filename if not given, we create it. */ |
/* It the graph filename if not given, we create it. */ |
464 |
if (!spec_graph_file) |
if (!spec_graph_file) |
465 |
spec_graph_file = stringappend (short_base_name, ".vcg"); |
spec_graph_file = stringappend (short_base_name, ".vcg"); |