This file is indexed.

/usr/share/doc/bison-doc/html/Bison-Options.html is in bison-doc 1:2.5-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<html lang="en">
<head>
<title>Bison Options - Bison 2.5</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Bison 2.5">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Invocation.html#Invocation" title="Invocation">
<link rel="next" href="Option-Cross-Key.html#Option-Cross-Key" title="Option Cross Key">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This manual (14 May 2011) is for GNU Bison (version
2.5), the GNU parser generator.

Copyright (C) 1988-1993, 1995, 1998-2011 Free Software
Foundation, Inc.

     Permission is granted to copy, distribute and/or modify this
     document under the terms of the GNU Free Documentation License,
     Version 1.3 or any later version published by the Free Software
     Foundation; with no Invariant Sections, with the Front-Cover texts
     being ``A GNU Manual,'' and with the Back-Cover Texts as in (a)
     below.  A copy of the license is included in the section entitled
     ``GNU Free Documentation License.''

     (a) The FSF's Back-Cover Text is: ``You have the freedom to copy
     and modify this GNU manual.  Buying copies from the FSF supports
     it in developing GNU and promoting software freedom.''
   -->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="Bison-Options"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Option-Cross-Key.html#Option-Cross-Key">Option Cross Key</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Invocation.html#Invocation">Invocation</a>
<hr>
</div>

<h3 class="section">9.1 Bison Options</h3>

<p>Bison supports both traditional single-letter options and mnemonic long
option names.  Long option names are indicated with &lsquo;<samp><span class="samp">--</span></samp>&rsquo; instead of
&lsquo;<samp><span class="samp">-</span></samp>&rsquo;.  Abbreviations for option names are allowed as long as they
are unique.  When a long option takes an argument, like
&lsquo;<samp><span class="samp">--file-prefix</span></samp>&rsquo;, connect the option name and the argument with
&lsquo;<samp><span class="samp">=</span></samp>&rsquo;.

   <p>Here is a list of options that can be used with Bison, alphabetized by
short option.  It is followed by a cross key alphabetized by long
option.

<!-- Please, keep this ordered as in `bison -help'. -->
<p class="noindent">Operations modes:
     <dl>
<dt><samp><span class="option">-h</span></samp><dt><samp><span class="option">--help</span></samp><dd>Print a summary of the command-line options to Bison and exit.

     <br><dt><samp><span class="option">-V</span></samp><dt><samp><span class="option">--version</span></samp><dd>Print the version number of Bison and exit.

     <br><dt><samp><span class="option">--print-localedir</span></samp><dd>Print the name of the directory containing locale-dependent data.

     <br><dt><samp><span class="option">--print-datadir</span></samp><dd>Print the name of the directory containing skeletons and XSLT.

     <br><dt><samp><span class="option">-y</span></samp><dt><samp><span class="option">--yacc</span></samp><dd>Act more like the traditional Yacc command.  This can cause different
diagnostics to be generated, and may change behavior in other minor
ways.  Most importantly, imitate Yacc's output file name conventions,
so that the parser implementation file is called <samp><span class="file">y.tab.c</span></samp>, and
the other outputs are called <samp><span class="file">y.output</span></samp> and <samp><span class="file">y.tab.h</span></samp>. 
Also, if generating a deterministic parser in C, generate
<code>#define</code> statements in addition to an <code>enum</code> to associate
token numbers with token names.  Thus, the following shell script can
substitute for Yacc, and the Bison distribution contains such a script
for compatibility with POSIX:

     <pre class="example">          #! /bin/sh
          bison -y "$@"
</pre>
     <p>The <samp><span class="option">-y</span></samp>/<samp><span class="option">--yacc</span></samp> option is intended for use with
traditional Yacc grammars.  If your grammar uses a Bison extension
like &lsquo;<samp><span class="samp">%glr-parser</span></samp>&rsquo;, Bison might not be Yacc-compatible even if
this option is specified.

     <br><dt><samp><span class="option">-W [</span><var>category</var><span class="option">]</span></samp><dt><samp><span class="option">--warnings[=</span><var>category</var><span class="option">]</span></samp><dd>Output warnings falling in <var>category</var>.  <var>category</var> can be one
of:
          <dl>
<dt><code>midrule-values</code><dd>Warn about mid-rule values that are set but not used within any of the actions
of the parent rule. 
For example, warn about unused <code>$2</code> in:

          <pre class="example">               exp: '1' { $$ = 1; } '+' exp { $$ = $1 + $4; };
</pre>
          <p>Also warn about mid-rule values that are used but not set. 
For example, warn about unset <code>$$</code> in the mid-rule action in:

          <pre class="example">                exp: '1' { $1 = 1; } '+' exp { $$ = $2 + $4; };
</pre>
          <p>These warnings are not enabled by default since they sometimes prove to
be false alarms in existing grammars employing the Yacc constructs
<code>$0</code> or <code>$-</code><var>n</var> (where <var>n</var> is some positive integer).

          <br><dt><code>yacc</code><dd>Incompatibilities with POSIX Yacc.

          <br><dt><code>conflicts-sr</code><dt><code>conflicts-rr</code><dd>S/R and R/R conflicts.  These warnings are enabled by default.  However, if
the <code>%expect</code> or <code>%expect-rr</code> directive is specified, an
unexpected number of conflicts is an error, and an expected number of
conflicts is not reported, so <samp><span class="option">-W</span></samp> and <samp><span class="option">--warning</span></samp> then have
no effect on the conflict report.

          <br><dt><code>other</code><dd>All warnings not categorized above.  These warnings are enabled by default.

          <p>This category is provided merely for the sake of completeness.  Future
releases of Bison may move warnings from this category to new, more specific
categories.

          <br><dt><code>all</code><dd>All the warnings. 
<br><dt><code>none</code><dd>Turn off all the warnings. 
<br><dt><code>error</code><dd>Treat warnings as errors. 
</dl>

     <p>A category can be turned off by prefixing its name with &lsquo;<samp><span class="samp">no-</span></samp>&rsquo;.  For
instance, <samp><span class="option">-Wno-yacc</span></samp> will hide the warnings about
POSIX Yacc incompatibilities. 
</dl>

<p class="noindent">Tuning the parser:

     <dl>
<dt><samp><span class="option">-t</span></samp><dt><samp><span class="option">--debug</span></samp><dd>In the parser implementation file, define the macro <code>YYDEBUG</code> to
1 if it is not already defined, so that the debugging facilities are
compiled.  See <a href="Tracing.html#Tracing">Tracing Your Parser</a>.

     <br><dt><samp><span class="option">-D </span><var>name</var><span class="option">[=</span><var>value</var><span class="option">]</span></samp><dt><samp><span class="option">--define=</span><var>name</var><span class="option">[=</span><var>value</var><span class="option">]</span></samp><dt><samp><span class="option">-F </span><var>name</var><span class="option">[=</span><var>value</var><span class="option">]</span></samp><dt><samp><span class="option">--force-define=</span><var>name</var><span class="option">[=</span><var>value</var><span class="option">]</span></samp><dd>Each of these is equivalent to &lsquo;<samp><span class="samp">%define </span><var>name</var><span class="samp"> "</span><var>value</var><span class="samp">"</span></samp>&rsquo;
(see <a href="_0025define-Summary.html#g_t_0025define-Summary">%define Summary</a>) except that Bison processes multiple
definitions for the same <var>name</var> as follows:

          <ul>
<li>Bison quietly ignores all command-line definitions for <var>name</var> except
the last. 
<li>If that command-line definition is specified by a <code>-D</code> or
<code>--define</code>, Bison reports an error for any <code>%define</code>
definition for <var>name</var>. 
<li>If that command-line definition is specified by a <code>-F</code> or
<code>--force-define</code> instead, Bison quietly ignores all <code>%define</code>
definitions for <var>name</var>. 
<li>Otherwise, Bison reports an error if there are multiple <code>%define</code>
definitions for <var>name</var>. 
</ul>

     <p>You should avoid using <code>-F</code> and <code>--force-define</code> in your
make files unless you are confident that it is safe to quietly ignore
any conflicting <code>%define</code> that may be added to the grammar file.

     <br><dt><samp><span class="option">-L </span><var>language</var></samp><dt><samp><span class="option">--language=</span><var>language</var></samp><dd>Specify the programming language for the generated parser, as if
<code>%language</code> was specified (see <a href="Decl-Summary.html#Decl-Summary">Bison Declaration Summary</a>).  Currently supported languages include C, C++, and Java. 
<var>language</var> is case-insensitive.

     <p>This option is experimental and its effect may be modified in future
releases.

     <br><dt><samp><span class="option">--locations</span></samp><dd>Pretend that <code>%locations</code> was specified.  See <a href="Decl-Summary.html#Decl-Summary">Decl Summary</a>.

     <br><dt><samp><span class="option">-p </span><var>prefix</var></samp><dt><samp><span class="option">--name-prefix=</span><var>prefix</var></samp><dd>Pretend that <code>%name-prefix "</code><var>prefix</var><code>"</code> was specified. 
See <a href="Decl-Summary.html#Decl-Summary">Decl Summary</a>.

     <br><dt><samp><span class="option">-l</span></samp><dt><samp><span class="option">--no-lines</span></samp><dd>Don't put any <code>#line</code> preprocessor commands in the parser
implementation file.  Ordinarily Bison puts them in the parser
implementation file so that the C compiler and debuggers will
associate errors with your source file, the grammar file.  This option
causes them to associate errors with the parser implementation file,
treating it as an independent source file in its own right.

     <br><dt><samp><span class="option">-S </span><var>file</var></samp><dt><samp><span class="option">--skeleton=</span><var>file</var></samp><dd>Specify the skeleton to use, similar to <code>%skeleton</code>
(see <a href="Decl-Summary.html#Decl-Summary">Bison Declaration Summary</a>).

     <!-- You probably don't need this option unless you are developing Bison. -->
     <!-- You should use @option{-language} if you want to specify the skeleton for a -->
     <!-- different language, because it is clearer and because it will always -->
     <!-- choose the correct skeleton for non-deterministic or push parsers. -->
     <p>If <var>file</var> does not contain a <code>/</code>, <var>file</var> is the name of a skeleton
file in the Bison installation directory. 
If it does, <var>file</var> is an absolute file name or a file name relative to the
current working directory. 
This is similar to how most shells resolve commands.

     <br><dt><samp><span class="option">-k</span></samp><dt><samp><span class="option">--token-table</span></samp><dd>Pretend that <code>%token-table</code> was specified.  See <a href="Decl-Summary.html#Decl-Summary">Decl Summary</a>. 
</dl>

<p class="noindent">Adjust the output:

     <dl>
<dt><samp><span class="option">--defines[=</span><var>file</var><span class="option">]</span></samp><dd>Pretend that <code>%defines</code> was specified, i.e., write an extra output
file containing macro definitions for the token type names defined in
the grammar, as well as a few other declarations.  See <a href="Decl-Summary.html#Decl-Summary">Decl Summary</a>.

     <br><dt><samp><span class="option">-d</span></samp><dd>This is the same as <code>--defines</code> except <code>-d</code> does not accept a
<var>file</var> argument since POSIX Yacc requires that <code>-d</code> can be bundled
with other short options.

     <br><dt><samp><span class="option">-b </span><var>file-prefix</var></samp><dt><samp><span class="option">--file-prefix=</span><var>prefix</var></samp><dd>Pretend that <code>%file-prefix</code> was specified, i.e., specify prefix to use
for all Bison output file names.  See <a href="Decl-Summary.html#Decl-Summary">Decl Summary</a>.

     <br><dt><samp><span class="option">-r </span><var>things</var></samp><dt><samp><span class="option">--report=</span><var>things</var></samp><dd>Write an extra output file containing verbose description of the comma
separated list of <var>things</var> among:

          <dl>
<dt><code>state</code><dd>Description of the grammar, conflicts (resolved and unresolved), and
parser's automaton.

          <br><dt><code>lookahead</code><dd>Implies <code>state</code> and augments the description of the automaton with
each rule's lookahead set.

          <br><dt><code>itemset</code><dd>Implies <code>state</code> and augments the description of the automaton with
the full set of items for each state, instead of its core only. 
</dl>

     <br><dt><samp><span class="option">--report-file=</span><var>file</var></samp><dd>Specify the <var>file</var> for the verbose description.

     <br><dt><samp><span class="option">-v</span></samp><dt><samp><span class="option">--verbose</span></samp><dd>Pretend that <code>%verbose</code> was specified, i.e., write an extra output
file containing verbose descriptions of the grammar and
parser.  See <a href="Decl-Summary.html#Decl-Summary">Decl Summary</a>.

     <br><dt><samp><span class="option">-o </span><var>file</var></samp><dt><samp><span class="option">--output=</span><var>file</var></samp><dd>Specify the <var>file</var> for the parser implementation file.

     <p>The other output files' names are constructed from <var>file</var> as
described under the &lsquo;<samp><span class="samp">-v</span></samp>&rsquo; and &lsquo;<samp><span class="samp">-d</span></samp>&rsquo; options.

     <br><dt><samp><span class="option">-g [</span><var>file</var><span class="option">]</span></samp><dt><samp><span class="option">--graph[=</span><var>file</var><span class="option">]</span></samp><dd>Output a graphical representation of the parser's
automaton computed by Bison, in <a href="http://www.graphviz.org/">Graphviz</a>
<a href="http://www.graphviz.org/doc/info/lang.html">DOT</a> format. 
<var>file</var> is optional. 
If omitted and the grammar file is <samp><span class="file">foo.y</span></samp>, the output file will be
<samp><span class="file">foo.dot</span></samp>.

     <br><dt><samp><span class="option">-x [</span><var>file</var><span class="option">]</span></samp><dt><samp><span class="option">--xml[=</span><var>file</var><span class="option">]</span></samp><dd>Output an XML report of the parser's automaton computed by Bison. 
<var>file</var> is optional. 
If omitted and the grammar file is <samp><span class="file">foo.y</span></samp>, the output file will be
<samp><span class="file">foo.xml</span></samp>. 
(The current XML schema is experimental and may evolve. 
More user feedback will help to stabilize it.) 
</dl>

   </body></html>