3 bison \- GNU Project parser generator (yacc replacement)
9 .BI \-\-file-prefix= file-prefix
29 .BI \-\-output-file= outfile
33 .BI \-\-name-prefix= prefix
55 .B \-\-fixed-output-files
60 is a parser generator in the style of
62 It should be upwardly compatible with input files designed
66 Input files should follow the
68 convention of ending in
72 the generated files do not have fixed names, but instead use the prefix
74 For instance, a grammar description file named
76 would produce the generated parser in a file named
82 This description of the options that can be given to
84 is adapted from the node
88 manual, which should be taken as authoritative.
91 supports both traditional single-letter options and mnemonic long
92 option names. Long option names are indicated with
96 Abbreviations for option names are allowed as long as they
97 are unique. When a long option takes an argument, like
99 connect the option name and the argument with
103 .BI \-b " file-prefix"
107 .BI \-\-file-prefix= file-prefix
108 Specify a prefix to use for all
110 output file names. The names are
111 chosen as if the input file were named
112 \fIfile-prefix\fB.c\fR.
119 Write an extra output file containing macro definitions for the token
120 type names defined in the grammar and the semantic value type
124 variable declarations.
126 If the parser output file is named
132 This output file is essential if you wish to put the definition of
134 in a separate source file, because
136 needs to be able to refer to token type codes and the variable
144 This switch causes the \fIname\fB.tab.c\fR output to include a list of
145 token names in order by their token numbers; this is defined in the array
162 preprocessor commands in the parser file.
165 puts them in the parser file so that the C compiler
166 and debuggers will associate errors with your source file, the
167 grammar file. This option causes them to associate errors with the
168 parser file, treating it an independent source file in its own right.
175 Do not generate the parser code into the output; generate only
176 declarations. The generated \fIname\fB.tab.c\fR file will have only
177 constant declarations. In addition, a \fIname\fB.act\fR file is
178 generated containing a switch statement body containing all the
185 .BI \-\-output-file= outfile
190 The other output files' names are constructed from
192 as described under the
202 .BI \-\-name-prefix= prefix
203 Rename the external symbols used in the parser so that they start with
207 The precise list of symbols renamed is
216 For example, if you use
228 Output a definition of the macro
230 into the parser file,
231 so that the debugging facilities are compiled.
238 Write an extra output file containing verbose descriptions of the
239 parser states and what is done for each type of look-ahead token in
242 This file also describes all the conflicts, both those resolved by
243 operator precedence and the unresolved ones.
245 The file's name is made by removing
249 from the parser output file name, and adding
253 Therefore, if the input file is
255 then the parser file is called
257 by default. As a consequence, the verbose
258 output file is called
266 Print the version number of
275 Print a summary of the options to
287 .B \-\-fixed-output-files
290 the parser output file is called
292 and the other outputs are called
296 The purpose of this switch is to imitate
298 output file name conventions.
299 Thus, the following shell script can substitute for
309 /usr/local/lib/bison.simple simple parser
311 /usr/local/lib/bison.hairy complicated parser
312 .SH "ENVIRONMENT VARIABLES"
315 If this is set, it specifies the location in which the
320 If this is set, it specifies the location in which the
327 .IR "Bison Reference Manual" ,