1BISON(1)                         User Commands                        BISON(1)
2
3
4

NAME

6       bison - GNU Project parser generator (yacc replacement)
7

SYNOPSIS

9       bison [OPTION]... FILE
10

DESCRIPTION

12       Bison  is  a  parser  generator  in the style of yacc(1).  It should be
13       upwardly compatible with input files designed for yacc.
14
15       Input files should follow the yacc convention of ending in .y.   Unlike
16       yacc,  the generated files do not have fixed names, but instead use the
17       prefix of the input file.  Moreover, if you need to put C++ code in the
18       input  file,  you  can  end  his  name by a C++-like extension (.ypp or
19       .y++), then bison will follow your extension to name  the  output  file
20       (.cpp  or  .c++).   For  instance,  a  grammar  description  file named
21       parse.yxx  would  produce  the  generated  parser  in  a   file   named
22       parse.tab.cxx,  instead  of  yacc's  y.tab.c  or  old  Bison  version's
23       parse.tab.c.
24
25       This description of the options that can be given to bison  is  adapted
26       from  the  node  Invocation  in  the bison.texi manual, which should be
27       taken as authoritative.
28
29       Bison supports both traditional single-letter options and mnemonic long
30       option  names.   Long  option names are indicated with -- instead of -.
31       Abbreviations for option names are allowed as long as they are  unique.
32       When  a  long option takes an argument, like --file-prefix, connect the
33       option name and the argument with =.
34
35       Generate a deterministic LR or generalized LR  (GLR)  parser  employing
36       LALR(1), IELR(1), or canonical LR(1) parser tables.
37
38       Mandatory  arguments  to  long  options are mandatory for short options
39       too.  The same is true for optional arguments.
40
41   Operation Modes:
42       -h, --help
43              display this help and exit
44
45       -V, --version
46              output version information and exit
47
48       --print-localedir
49              output directory containing locale-dependent data and exit
50
51       --print-datadir
52              output directory containing skeletons and XSLT and exit
53
54       -u, --update
55              apply fixes to the source grammar file and exit
56
57       -f, --feature[=FEATURES]
58              activate miscellaneous features
59
60   FEATURES is a list of comma separated words that can include:
61       caret, diagnostics-show-caret
62              show errors with carets
63
64       fixit, diagnostics-parseable-fixits
65              show machine-readable fixes
66
67       syntax-only
68              do not generate any file
69
70       all    all of the above
71
72       none   disable all of the above
73
74   Diagnostics:
75       -W, --warnings[=CATEGORY]
76              report the warnings falling in CATEGORY
77
78       --color[=WHEN]
79              whether to colorize the diagnostics
80
81       --style=FILE
82              specify the CSS FILE for colorizer diagnostics
83
84   Warning categories include:
85       conflicts-sr
86              S/R conflicts (enabled by default)
87
88       conflicts-rr
89              R/R conflicts (enabled by default)
90
91       dangling-alias
92              string aliases not attached to a symbol
93
94       deprecated
95              obsolete constructs
96
97       empty-rule
98              empty rules without %empty
99
100       midrule-values
101              unset or unused midrule values
102
103       precedence
104              useless precedence and associativity
105
106       yacc   incompatibilities with POSIX Yacc
107
108       other  all other warnings (enabled by default)
109
110       all    all the warnings except 'dangling-alias' and 'yacc'
111
112       no-CATEGORY
113              turn off warnings in CATEGORY
114
115       none   turn off all the warnings
116
117       error[=CATEGORY]
118              treat warnings as errors
119
120   WHEN can be one of the following:
121       always, yes
122              colorize the output
123
124       never, no
125              don't colorize the output
126
127       auto, tty
128              colorize if the output device is a tty
129
130   Tuning the Parser:
131       -L, --language=LANGUAGE
132              specify the output programming language
133
134       -S, --skeleton=FILE
135              specify the skeleton to use
136
137       -t, --debug
138              instrument the parser for tracing same as '-Dparse.trace'
139
140       --locations
141              enable location support
142
143       -D, --define=NAME[=VALUE]
144              similar to '%define NAME VALUE'
145
146       -F, --force-define=NAME[=VALUE]
147              override '%define NAME VALUE'
148
149       -p, --name-prefix=PREFIX
150              prepend PREFIX to the external symbols deprecated by '-Dapi.pre‐
151              fix={PREFIX}'
152
153       -l, --no-lines
154              don't generate '#line' directives
155
156       -k, --token-table
157              include a table of token names
158
159       -y, --yacc
160              emulate POSIX Yacc
161
162   Output Files:
163       --defines[=FILE]
164              also produce a header file
165
166       -d     likewise but cannot specify FILE (for POSIX Yacc)
167
168       -r, --report=THINGS
169              also produce details on the automaton
170
171       --report-file=FILE
172              write report to FILE
173
174       -v, --verbose
175              same as '--report=state'
176
177       -b, --file-prefix=PREFIX
178              specify a PREFIX for output files
179
180       -o, --output=FILE
181              leave output to FILE
182
183       -g, --graph[=FILE]
184              also output a graph of the automaton
185
186       -x, --xml[=FILE]
187              also output an XML report of the automaton
188
189   THINGS is a list of comma separated words that can include:
190       states describe the states
191
192       itemsets
193              complete the core item sets with their closure
194
195       lookaheads
196              explicitly associate lookahead tokens to items
197
198       solved describe shift/reduce conflicts solving
199
200       all    include all the above information
201
202       none   disable the report
203

AUTHOR

205       Written by Robert Corbett and Richard Stallman.
206

REPORTING BUGS

208       Report bugs to <bug-bison@gnu.org>.
209       GNU Bison home page: <https://www.gnu.org/software/bison/>.
210       General help using GNU software: <http://www.gnu.org/gethelp/>.
211       For complete documentation, run: info bison.
212
214       Copyright © 2020 Free Software Foundation, Inc.
215       This is free software; see the source for copying conditions.  There is
216       NO warranty; not even for MERCHANTABILITY or FITNESS FOR  A  PARTICULAR
217       PURPOSE.
218

SEE ALSO

220       lex(1), flex(1), yacc(1).
221
222       The full documentation for bison is maintained as a Texinfo manual.  If
223       the info and bison programs are properly installed at  your  site,  the
224       command
225
226              info bison
227
228       should give you access to the complete manual.
229
230
231
232GNU Bison 3.6.4                    June 2020                          BISON(1)
Impressum