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.  IELR(1) and canon‐
37       ical LR(1) support is experimental.
38
39       Mandatory arguments to long options are  mandatory  for  short  options
40       too.  The same is true for optional arguments.
41
42   Operation modes:
43       -h, --help
44              display this help and exit
45
46       -V, --version
47              output version information and exit
48
49       --print-localedir
50              output directory containing locale-dependent data
51
52       --print-datadir
53              output directory containing skeletons and XSLT
54
55       -y, --yacc
56              emulate POSIX Yacc
57
58       -W, --warnings[=CATEGORY]
59              report the warnings falling in CATEGORY
60
61       -f, --feature[=FEATURE]
62              activate miscellaneous features
63
64   Parser:
65       -L, --language=LANGUAGE
66              specify the output programming language
67
68       -S, --skeleton=FILE
69              specify the skeleton to use
70
71       -t, --debug
72              instrument the parser for tracing same as '-Dparse.trace'
73
74       --locations
75              enable location support
76
77       -D, --define=NAME[=VALUE]
78              similar to '%define NAME "VALUE"'
79
80       -F, --force-define=NAME[=VALUE]
81              override '%define NAME "VALUE"'
82
83       -p, --name-prefix=PREFIX
84              prepend PREFIX to the external symbols deprecated by '-Dapi.pre‐
85              fix=PREFIX'
86
87       -l, --no-lines
88              don't generate '#line' directives
89
90       -k, --token-table
91              include a table of token names
92
93   Output:
94       --defines[=FILE]
95              also produce a header file
96
97       -d     likewise but cannot specify FILE (for POSIX Yacc)
98
99       -r, --report=THINGS
100              also produce details on the automaton
101
102       --report-file=FILE
103              write report to FILE
104
105       -v, --verbose
106              same as '--report=state'
107
108       -b, --file-prefix=PREFIX
109              specify a PREFIX for output files
110
111       -o, --output=FILE
112              leave output to FILE
113
114       -g, --graph[=FILE]
115              also output a graph of the automaton
116
117       -x, --xml[=FILE]
118              also output an XML report of the automaton (the  XML  schema  is
119              experimental)
120
121   Warning categories include:
122       'midrule-values'
123              unset or unused midrule values
124
125       'yacc' incompatibilities with POSIX Yacc
126
127       'conflicts-sr'
128              S/R conflicts (enabled by default)
129
130       'conflicts-rr'
131              R/R conflicts (enabled by default)
132
133       'deprecated'
134              obsolete constructs
135
136       'empty-rule'
137              empty rules without %empty
138
139       'precedence'
140              useless precedence and associativity
141
142       'other'
143              all other warnings (enabled by default)
144
145       'all'  all the warnings except 'yacc'
146
147       'no-CATEGORY'
148              turn off warnings in CATEGORY
149
150       'none' turn off all the warnings
151
152       'error[=CATEGORY]'
153              treat warnings as errors
154
155   THINGS is a list of comma separated words that can include:
156       'state'
157              describe the states
158
159       'itemset'
160              complete the core item sets with their closure
161
162       'lookahead'
163              explicitly associate lookahead tokens to items
164
165       'solved'
166              describe shift/reduce conflicts solving
167
168       'all'  include all the above information
169
170       'none' disable the report
171
172   FEATURE is a list of comma separated words that can include:
173       'caret'
174              show errors with carets
175
176       'all'  all of the above
177
178       'none' disable all of the above
179

AUTHOR

181       Written by Robert Corbett and Richard Stallman.
182

REPORTING BUGS

184       Report bugs to <bug-bison@gnu.org>.
185       GNU Bison home page: <http://www.gnu.org/software/bison/>.
186       General help using GNU software: <http://www.gnu.org/gethelp/>.
187
188       Report translation bugs to <http://translationproject.org/team/>.
189       For complete documentation, run: info bison.
190
192       Copyright © 2018 Free Software Foundation, Inc.
193       This is free software; see the source for copying conditions.  There is
194       NO warranty; not even for MERCHANTABILITY or FITNESS FOR  A  PARTICULAR
195       PURPOSE.
196

SEE ALSO

198       lex(1), flex(1), yacc(1).
199
200       The full documentation for bison is maintained as a Texinfo manual.  If
201       the info and bison programs are properly installed at  your  site,  the
202       command
203
204              info bison
205
206       should give you access to the complete manual.
207
208
209
210bison 3.0.5                        May 2018                           BISON(1)
Impressum