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\fP\fB.c\fP.
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 optional 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 optional argument which
174 is the name of the output graph filename.
181 This switch causes the
183 output to include a list of
184 token names in order by their token numbers; this is defined in the array
201 preprocessor commands in the parser file.
204 puts them in the parser file so that the C compiler
205 and debuggers will associate errors with your source file, the
206 grammar file. This option causes them to associate errors with the
207 parser file, treating it an independent source file in its own right.
214 Do not generate the parser code into the output; generate only
215 declarations. The generated
218 constant declarations. In addition, a
221 generated containing a switch statement body containing all the
228 .BI \-\-output-file= outfile
233 The other output files' names are constructed from
235 as described under the
245 .BI \-\-name-prefix= prefix
246 Rename the external symbols used in the parser so that they start with
250 The precise list of symbols renamed is
259 For example, if you use
271 In the parser file, define the macro
273 to 1 if it is not already defined,
274 so that the debugging facilities are compiled.
281 Write an extra output file containing verbose descriptions of the
282 parser states and what is done for each type of look-ahead token in
285 This file also describes all the conflicts, both those resolved by
286 operator precedence and the unresolved ones.
288 The file's name is made by removing
292 from the parser output file name, and adding
296 Therefore, if the input file is
298 then the parser file is called
300 by default. As a consequence, the verbose
301 output file is called
309 Print the version number of
318 Print a summary of the options to
330 .B \-\-fixed-output-files
333 the parser output file is called
335 and the other outputs are called
339 The purpose of this switch is to imitate
341 output file name conventions.
342 Thus, the following shell script can substitute for
352 /usr/local/share/bison/bison.simple simple parser
354 /usr/local/share/bison/bison.hairy complicated parser
355 .SH "ENVIRONMENT VARIABLES"
358 If this is set, it specifies the location in which the
363 If this is set, it specifies the location in which the
370 .IR "Bison Reference Manual" ,