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
64 is a parser generator in the style of
66 It should be upwardly compatible with input files designed
70 Input files should follow the
72 convention of ending in
76 the generated files do not have fixed names, but instead use the prefix
78 Moreover, if you need to put
80 code in the input file, you can end his name by a C++-like extension
81 (.ypp or .y++), then bison will follow your extension to name the
82 output file (.cpp or .c++).
83 For instance, a grammar description file named
85 would produce the generated parser in a file named
95 This description of the options that can be given to
97 is adapted from the node
101 manual, which should be taken as authoritative.
104 supports both traditional single-letter options and mnemonic long
105 option names. Long option names are indicated with
109 Abbreviations for option names are allowed as long as they
110 are unique. When a long option takes an argument, like
111 .BR \-\-file-prefix ,
112 connect the option name and the argument with
116 .BI \-b " file-prefix"
120 .BI \-\-file-prefix= file-prefix
121 Specify a prefix to use for all
123 output file names. The names are
124 chosen as if the input file were named
125 \fIfile-prefix\fB.c\fR.
130 Write an extra output file containing macro definitions for the token
131 type names defined in the grammar and the semantic value type
135 variable declarations.
137 If the parser output file is named
143 This output file is essential if you wish to put the definition of
145 in a separate source file, because
147 needs to be able to refer to token type codes and the variable
150 .BI \-\-defines= defines-file
156 The only difference is that it has an optionnal argument which is
157 the name of the output filename.
162 Output a VCG definition of the LALR(1) grammar automaton computed by
163 Bison. If the grammar file is
165 , the VCG output file will be
168 .BI \-\-graph= graph-file
173 option. The only difference is that it has an optionnal argument which
174 is the name of the output graph filename.
181 This switch causes the \fIname\fB.tab.c\fR output to include a list of
182 token names in order by their token numbers; this is defined in the array
199 preprocessor commands in the parser file.
202 puts them in the parser file so that the C compiler
203 and debuggers will associate errors with your source file, the
204 grammar file. This option causes them to associate errors with the
205 parser file, treating it an independent source file in its own right.
212 Do not generate the parser code into the output; generate only
213 declarations. The generated \fIname\fB.tab.c\fR file will have only
214 constant declarations. In addition, a \fIname\fB.act\fR file is
215 generated containing a switch statement body containing all the
222 .BI \-\-output-file= outfile
227 The other output files' names are constructed from
229 as described under the
239 .BI \-\-name-prefix= prefix
240 Rename the external symbols used in the parser so that they start with
244 The precise list of symbols renamed is
253 For example, if you use
265 In the parser file, define the macro
267 to 1 if it is not already defined,
268 so that the debugging facilities are compiled.
275 Write an extra output file containing verbose descriptions of the
276 parser states and what is done for each type of look-ahead token in
279 This file also describes all the conflicts, both those resolved by
280 operator precedence and the unresolved ones.
282 The file's name is made by removing
286 from the parser output file name, and adding
290 Therefore, if the input file is
292 then the parser file is called
294 by default. As a consequence, the verbose
295 output file is called
303 Print the version number of
312 Print a summary of the options to
324 .B \-\-fixed-output-files
327 the parser output file is called
329 and the other outputs are called
333 The purpose of this switch is to imitate
335 output file name conventions.
336 Thus, the following shell script can substitute for
346 /usr/local/share/bison/bison.simple simple parser
348 /usr/local/share/bison/bison.hairy complicated parser
349 .SH "ENVIRONMENT VARIABLES"
352 If this is set, it specifies the location in which the
357 If this is set, it specifies the location in which the
364 .IR "Bison Reference Manual" ,