50 |
char *spec_defines_file = NULL; /* for --defines. */ |
char *spec_defines_file = NULL; /* for --defines. */ |
51 |
char *parser_file_name = NULL; |
char *parser_file_name = NULL; |
52 |
|
|
53 |
char *infile = NULL; |
struniq_t grammar_file = NULL; |
54 |
|
struniq_t current_file = NULL; |
55 |
|
|
56 |
static char *full_base_name = NULL; |
static char *full_base_name = NULL; |
57 |
|
|
280 |
{ |
{ |
281 |
/* Otherwise, the short base name is computed from the input |
/* Otherwise, the short base name is computed from the input |
282 |
grammar: `foo/bar.yy' => `bar'. */ |
grammar: `foo/bar.yy' => `bar'. */ |
283 |
filename_split (infile, &base, &tab, &ext); |
filename_split (grammar_file, &base, &tab, &ext); |
284 |
short_base_name = |
short_base_name = |
285 |
xstrndup (base, |
xstrndup (base, |
286 |
(strlen (base) - (ext ? strlen (ext) : 0))); |
(strlen (base) - (ext ? strlen (ext) : 0))); |
292 |
stpcpy (stpcpy (full_base_name, short_base_name), EXT_TAB); |
stpcpy (stpcpy (full_base_name, short_base_name), EXT_TAB); |
293 |
|
|
294 |
/* Computes the extensions from the grammar file name. */ |
/* Computes the extensions from the grammar file name. */ |
295 |
filename_split (infile, &base, &tab, &ext); |
filename_split (grammar_file, &base, &tab, &ext); |
296 |
if (ext && !yacc_flag) |
if (ext && !yacc_flag) |
297 |
compute_exts_from_gf (ext); |
compute_exts_from_gf (ext); |
298 |
} |
} |