3 bison \- GNU Project parser generator (yacc replacement)
9 .BI \-\-file-prefix= file-prefix
13 .BI \-\-defines= defines-file
17 .BI \-\-graph= graph-file
33 .BI \-\-output-file= outfile
37 .BI \-\-name-prefix= prefix
59 .B \-\-fixed-output-files
65 .I "similar options and operands"
69 is a parser generator in the style of
71 It should be upwardly compatible with input files designed
75 Input files should follow the
77 convention of ending in
81 the generated files do not have fixed names, but instead use the prefix
83 Moreover, if you need to put
85 code in the input file, you can end his name by a C++-like extension
86 (.ypp or .y++), then bison will follow your extension to name the
87 output file (.cpp or .c++).
88 For instance, a grammar description file named
90 would produce the generated parser in a file named
100 This description of the options that can be given to
102 is adapted from the node
106 manual, which should be taken as authoritative.
109 supports both traditional single-letter options and mnemonic long
110 option names. Long option names are indicated with
114 Abbreviations for option names are allowed as long as they
115 are unique. When a long option takes an argument, like
116 .BR \-\-file-prefix ,
117 connect the option name and the argument with
121 .BI \-b " file-prefix"
125 .BI \-\-file-prefix= file-prefix
126 Specify a prefix to use for all
128 output file names. The names are
129 chosen as if the input file were named
130 \fIfile-prefix\fP\fB.c\fP.
135 Write an extra output file containing macro definitions for the token
136 type names defined in the grammar and the semantic value type
140 variable declarations.
142 If the parser output file is named
148 This output file is essential if you wish to put the definition of
150 in a separate source file, because
152 needs to be able to refer to token type codes and the variable
155 .BI \-\-defines= defines-file
161 The only difference is that it has an optional argument which is
162 the name of the output filename.
167 Output a graph of the grammar automaton computed by
168 Bison. If the grammar file is
170 , the output file will be
173 .BI \-\-graph= graph-file
178 option. The only difference is that it has an optional argument which
179 is the name of the output graph filename.
186 This switch causes the
188 output to include a list of
189 token names in order by their token numbers; this is defined in the array
206 preprocessor commands in the parser file.
209 puts them in the parser file so that the C compiler
210 and debuggers will associate errors with your source file, the
211 grammar file. This option causes them to associate errors with the
212 parser file, treating it an independent source file in its own right.
219 Do not generate the parser code into the output; generate only
220 declarations. The generated
223 constant declarations. In addition, a
226 generated containing a switch statement body containing all the
233 .BI \-\-output-file= outfile
238 The other output files' names are constructed from
240 as described under the
250 .BI \-\-name-prefix= prefix
251 Rename the external symbols used in the parser so that they start with
255 The precise list of symbols renamed is
264 For example, if you use
276 In the parser file, define the macro
278 to 1 if it is not already defined,
279 so that the debugging facilities are compiled.
286 Write an extra output file containing verbose descriptions of the
287 parser states and what is done for each type of lookahead token in
290 This file also describes all the conflicts, both those resolved by
291 operator precedence and the unresolved ones.
293 The file's name is made by removing
297 from the parser output file name, and adding
301 Therefore, if the input file is
303 then the parser file is called
305 by default. As a consequence, the verbose
306 output file is called
314 Print the version number of
323 Print a summary of the options to
335 .B \-\-fixed-output-files
338 the parser output file is called
340 and the other outputs are called
344 The purpose of this switch is to imitate
346 output file name conventions.
347 Thus, the following shell script can substitute for
349 and is often installed as
362 .IR "Bison Reference Manual" ,
371 Copyright \(co 2006 Free Software Foundation, Inc.
373 This is free software. You may redistribute copies of it under the terms of
374 the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
375 There is NO WARRANTY, to the extent permitted by law.