3 bison \- GNU Project parser generator (yacc replacement)
9 .BI \-\-file-prefix= file-prefix
13 .BI \-\-defines= defines-file
17 .BI \-\-graph= graph-file
29 .BI \-\-output-file= outfile
33 .BI \-\-name-prefix= prefix
55 .B \-\-fixed-output-files
61 .I "similar options and operands"
65 is a parser generator in the style of
67 It should be upwardly compatible with input files designed
71 Input files should follow the
73 convention of ending in
77 the generated files do not have fixed names, but instead use the prefix
79 Moreover, if you need to put
81 code in the input file, you can end his name by a C++-like extension
82 (.ypp or .y++), then bison will follow your extension to name the
83 output file (.cpp or .c++).
84 For instance, a grammar description file named
86 would produce the generated parser in a file named
96 This description of the options that can be given to
98 is adapted from the node
102 manual, which should be taken as authoritative.
105 supports both traditional single-letter options and mnemonic long
106 option names. Long option names are indicated with
110 Abbreviations for option names are allowed as long as they
111 are unique. When a long option takes an argument, like
112 .BR \-\-file-prefix ,
113 connect the option name and the argument with
117 .BI \-b " file-prefix"
121 .BI \-\-file-prefix= file-prefix
122 Specify a prefix to use for all
124 output file names. The names are
125 chosen as if the input file were named
126 \fIfile-prefix\fP\fB.c\fP.
131 Write an extra output file containing macro definitions for the token
132 type names defined in the grammar and the semantic value type
136 variable declarations.
138 If the parser output file is named
144 This output file is essential if you wish to put the definition of
146 in a separate source file, because
148 needs to be able to refer to token type codes and the variable
151 .BI \-\-defines= defines-file
157 The only difference is that it has an optional argument which is
158 the name of the output filename.
163 Output a graph of the grammar automaton computed by
164 Bison. If the grammar file is
166 , the output file will be
169 .BI \-\-graph= graph-file
174 option. The only difference is that it has an optional argument which
175 is the name of the output graph filename.
182 This switch causes the
184 output to include a list of
185 token names in order by their token numbers; this is defined in the array
202 preprocessor commands in the parser file.
205 puts them in the parser file so that the C compiler
206 and debuggers will associate errors with your source file, the
207 grammar file. This option causes them to associate errors with the
208 parser file, treating it an independent source file in its own right.
214 .BI \-\-output-file= outfile
219 The other output files' names are constructed from
221 as described under the
231 .BI \-\-name-prefix= prefix
232 Rename the external symbols used in the parser so that they start with
236 The precise list of symbols renamed is
245 For example, if you use
257 In the parser file, define the macro
259 to 1 if it is not already defined,
260 so that the debugging facilities are compiled.
267 Write an extra output file containing verbose descriptions of the
268 parser states and what is done for each type of lookahead token in
271 This file also describes all the conflicts, both those resolved by
272 operator precedence and the unresolved ones.
274 The file's name is made by removing
278 from the parser output file name, and adding
282 Therefore, if the input file is
284 then the parser file is called
286 by default. As a consequence, the verbose
287 output file is called
295 Print the version number of
304 Print a summary of the options to
316 .B \-\-fixed-output-files
319 the parser output file is called
321 and the other outputs are called
325 The purpose of this switch is to imitate
327 output file name conventions.
328 Thus, the following shell script can substitute for
330 and is often installed as
343 .IR "Bison Reference Manual" ,
352 Copyright \(co 2006 Free Software Foundation, Inc.
354 This is free software. You may redistribute copies of it under the terms of
355 the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
356 There is NO WARRANTY, to the extent permitted by law.