]> git.saurik.com Git - bison.git/blob - src/files.h
* src/files.c, src/files.h (strsuffix): Not static.
[bison.git] / src / files.h
1 /* File names and variables for bison,
2 Copyright 1984, 1989, 2000, 2002 Free Software Foundation, Inc.
3
4 This file is part of Bison, the GNU Compiler Compiler.
5
6 Bison is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 Bison is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with Bison; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
20
21 #ifndef FILES_H_
22 # define FILES_H_
23
24 /* These two should be pathnames for opening the sample parser files.
25 When bison is installed, they should be absolute pathnames.
26 XPFILE1 and XPFILE2 normally come from config.h. */
27
28 /* File name specified with -o for the output file, or 0 if no -o. */
29 extern char *spec_outfile;
30
31 /* For -a. */
32 extern char *spec_name_prefix;
33
34 /* File name pfx specified with -b, or 0 if no -b. */
35 extern char *spec_file_prefix;
36
37 /* --verbose. */
38 extern char *spec_verbose_file;
39
40 /* File name specified for the output VCG graph. */
41 extern char *spec_graph_file;
42
43 /* File name specified with --defines. */
44 extern char *spec_defines_file;
45
46 /* Read grammar specifications. */
47 extern FILE *finput;
48
49
50 /* Output all the action code; precise form depends on which parser. */
51 extern struct obstack action_obstack;
52
53 /* Output the tables and the parser and also contains all the %{
54 ... %} definitions. */
55 extern struct obstack table_obstack;
56
57 /* optionally output #define's for token numbers. */
58 extern struct obstack defines_obstack;
59
60 /* If semantic parser, output a .h file that defines YYSTYPE... */
61 extern struct obstack attrs_obstack;
62
63 /* ... and output yyguard, containing all the guard code. */
64 extern struct obstack guard_obstack;
65
66 /* The verbose output. */
67 extern struct obstack output_obstack;
68
69 extern char *infile;
70 extern char *attrsfile;
71
72 void open_files PARAMS((void));
73 void close_files PARAMS((void));
74
75 void compute_output_file_names PARAMS((void));
76 void output_files PARAMS((void));
77
78 FILE *xfopen PARAMS ((const char *name, const char *mode));
79 int xfclose PARAMS ((FILE *ptr));
80
81 const char *skeleton_find PARAMS ((const char *envvar,
82 const char *skeleton_name));
83 #endif /* !FILES_H_ */