diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-07-08 15:54:05 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-07-08 15:54:05 +0000 |
commit | fc7be18c76af2e700641f3598c4856baeef1428e (patch) | |
tree | 11dbca45eb321c3a4dd08b12152acc6ef5dd3fa9 /contrib/tools/bison/src/files.h | |
parent | ec0e7ed6da6fb317741fd8468602949a1362eca5 (diff) | |
parent | c92cb9d3a19331916f0c274d80e67f02a62caa9b (diff) | |
download | ydb-fc7be18c76af2e700641f3598c4856baeef1428e.tar.gz |
Merge branch 'rightlib' into mergelibs-240708-1553
Diffstat (limited to 'contrib/tools/bison/src/files.h')
-rw-r--r-- | contrib/tools/bison/src/files.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/contrib/tools/bison/src/files.h b/contrib/tools/bison/src/files.h index ebe5037c7a..d5ee44c274 100644 --- a/contrib/tools/bison/src/files.h +++ b/contrib/tools/bison/src/files.h @@ -1,7 +1,7 @@ /* File names and variables for bison, - Copyright (C) 1984, 1989, 2000-2002, 2006-2007, 2009-2013 Free - Software Foundation, Inc. + Copyright (C) 1984, 1989, 2000-2002, 2006-2007, 2009-2015, 2018-2019 + Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -21,6 +21,7 @@ #ifndef FILES_H_ # define FILES_H_ +# include "location.h" # include "uniqstr.h" /* File name specified with -o for the output file, or 0 if no -o. */ @@ -31,9 +32,11 @@ extern char *parser_file_name; /* Symbol prefix specified with -p, or 0 if no -p. */ extern const char *spec_name_prefix; +extern location spec_name_prefix_loc; /* File name prefix specified with -b, or 0 if no -b. */ extern char const *spec_file_prefix; +extern location spec_file_prefix_loc; /* --verbose. */ extern char *spec_verbose_file; @@ -55,7 +58,7 @@ extern char *dir_prefix; and therefore GCC warns about a name clash. */ extern uniqstr grammar_file; -/* The current file name. Might change with %include, or with #line. */ +/* The current file name. Might change with #line. */ extern uniqstr current_file; /* The computed base for output file names. */ @@ -63,7 +66,17 @@ extern char *all_but_ext; void compute_output_file_names (void); void output_file_names_free (void); -void output_file_name_check (char **file_name); + +/** Record that we generate a file. + * + * \param file_name the name of file being generated. + * \param source whether this is a source file (*c, *.java...) + * as opposed to a report (*.output, *.dot...). + */ +void output_file_name_check (char **file_name, bool source); + +/** Remove all the generated source files. */ +void unlink_generated_sources (void); FILE *xfopen (const char *name, char const *mode); void xfclose (FILE *ptr); |