3 bison \- GNU Project parser generator (yacc replacement)
9 .BI \-\-file-prefix= file-prefix
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.
132 Write an extra output file containing macro definitions for the token
133 type names defined in the grammar and the semantic value type
137 variable declarations.
139 If the parser output file is named
145 This output file is essential if you wish to put the definition of
147 in a separate source file, because
149 needs to be able to refer to token type codes and the variable
157 Output a VCG definition of the LALR(1) grammar automaton computed by
158 Bison. If the grammar file is
160 , the VCG output file will be
168 This switch causes the \fIname\fB.tab.c\fR output to include a list of
169 token names in order by their token numbers; this is defined in the array
186 preprocessor commands in the parser file.
189 puts them in the parser file so that the C compiler
190 and debuggers will associate errors with your source file, the
191 grammar file. This option causes them to associate errors with the
192 parser file, treating it an independent source file in its own right.
199 Do not generate the parser code into the output; generate only
200 declarations. The generated \fIname\fB.tab.c\fR file will have only
201 constant declarations. In addition, a \fIname\fB.act\fR file is
202 generated containing a switch statement body containing all the
209 .BI \-\-output-file= outfile
214 The other output files' names are constructed from
216 as described under the
226 .BI \-\-name-prefix= prefix
227 Rename the external symbols used in the parser so that they start with
231 The precise list of symbols renamed is
240 For example, if you use
252 Output a definition of the macro
254 into the parser file,
255 so that the debugging facilities are compiled.
262 Write an extra output file containing verbose descriptions of the
263 parser states and what is done for each type of look-ahead token in
266 This file also describes all the conflicts, both those resolved by
267 operator precedence and the unresolved ones.
269 The file's name is made by removing
273 from the parser output file name, and adding
277 Therefore, if the input file is
279 then the parser file is called
281 by default. As a consequence, the verbose
282 output file is called
290 Print the version number of
299 Print a summary of the options to
311 .B \-\-fixed-output-files
314 the parser output file is called
316 and the other outputs are called
320 The purpose of this switch is to imitate
322 output file name conventions.
323 Thus, the following shell script can substitute for
333 /usr/local/lib/bison.simple simple parser
335 /usr/local/lib/bison.hairy complicated parser
336 .SH "ENVIRONMENT VARIABLES"
339 If this is set, it specifies the location in which the
344 If this is set, it specifies the location in which the
351 .IR "Bison Reference Manual" ,