]> git.saurik.com Git - bison.git/blame_incremental - doc/bison.1
Fix untranslatable composition of sentences.
[bison.git] / doc / bison.1
... / ...
CommitLineData
1.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
2.TH BISON "1" "July 2008" "bison 2.3b+" "User Commands"
3.SH NAME
4bison \- GNU Project parser generator (yacc replacement)
5.SH SYNOPSIS
6.B bison
7[\fIOPTION\fR]... \fIFILE\fR
8.SH DESCRIPTION
9.I Bison
10is a parser generator in the style of
11.IR yacc (1).
12It should be upwardly compatible with input files designed
13for
14.IR yacc .
15.PP
16Input files should follow the
17.I yacc
18convention of ending in
19.BR .y .
20Unlike
21.IR yacc ,
22the generated files do not have fixed names, but instead use the prefix
23of the input file.
24Moreover, if you need to put
25.I C++
26code in the input file, you can end his name by a C++-like extension
27(.ypp or .y++), then bison will follow your extension to name the
28output file (.cpp or .c++).
29For instance, a grammar description file named
30.B parse.yxx
31would produce the generated parser in a file named
32.BR parse.tab.cxx ,
33instead of
34.IR yacc 's
35.B y.tab.c
36or old
37.I Bison
38version's
39.BR parse.tab.c .
40.PP
41This description of the options that can be given to
42.I bison
43is adapted from the node
44.B Invocation
45in the
46.B bison.texinfo
47manual, which should be taken as authoritative.
48.PP
49.I Bison
50supports both traditional single-letter options and mnemonic long
51option names. Long option names are indicated with
52.B \-\-
53instead of
54.BR \- .
55Abbreviations for option names are allowed as long as they
56are unique. When a long option takes an argument, like
57.BR \-\-file-prefix ,
58connect the option name and the argument with
59.BR = .
60.PP
61Generate LALR(1) and GLR parsers.
62.PP
63Mandatory arguments to long options are mandatory for short options too.
64The same is true for optional arguments.
65.SS "Operation modes:"
66.TP
67\fB\-h\fR, \fB\-\-help\fR
68display this help and exit
69.TP
70\fB\-V\fR, \fB\-\-version\fR
71output version information and exit
72.TP
73\fB\-\-print\-localedir\fR
74output directory containing locale\-dependent data
75.TP
76\fB\-\-print\-datadir\fR
77output directory containing skeletons and XSLT
78.TP
79\fB\-y\fR, \fB\-\-yacc\fR
80emulate POSIX Yacc
81.TP
82\fB\-W\fR, \fB\-\-warnings\fR=\fI[CATEGORY]\fR
83report the warnings falling in CATEGORY
84.SS "Parser:"
85.TP
86\fB\-L\fR, \fB\-\-language\fR=\fILANGUAGE\fR
87specify the output programming language
88.TP
89\fB\-S\fR, \fB\-\-skeleton\fR=\fIFILE\fR
90specify the skeleton to use
91.TP
92\fB\-t\fR, \fB\-\-debug\fR
93instrument the parser for debugging
94.TP
95\fB\-\-locations\fR
96enable locations computation
97.TP
98\fB\-p\fR, \fB\-\-name\-prefix\fR=\fIPREFIX\fR
99prepend PREFIX to the external symbols
100.TP
101\fB\-l\fR, \fB\-\-no\-lines\fR
102don't generate `#line' directives
103.TP
104\fB\-k\fR, \fB\-\-token\-table\fR
105include a table of token names
106.SS "Output:"
107.TP
108\fB\-\-defines\fR[=\fIFILE\fR]
109also produce a header file
110.TP
111\fB\-d\fR
112likewise but cannot specify FILE (for POSIX Yacc)
113.TP
114\fB\-r\fR, \fB\-\-report\fR=\fITHINGS\fR
115also produce details on the automaton
116.TP
117\fB\-\-report\-file\fR=\fIFILE\fR
118write report to FILE
119.TP
120\fB\-v\fR, \fB\-\-verbose\fR
121same as `\-\-report=state'
122.TP
123\fB\-b\fR, \fB\-\-file\-prefix\fR=\fIPREFIX\fR
124specify a PREFIX for output files
125.TP
126\fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR
127leave output to FILE
128.TP
129\fB\-g\fR, \fB\-\-graph\fR[=\fIFILE\fR]
130also output a graph of the automaton
131.TP
132\fB\-x\fR, \fB\-\-xml\fR[=\fIFILE\fR]
133also output an XML report of the automaton
134(the XML schema is experimental)
135.SS "Warning categories include:"
136.TP
137`midrule\-values'
138unset or unused midrule values
139.TP
140`yacc'
141incompatibilities with POSIX YACC
142.TP
143`all'
144all the warnings
145.TP
146`no\-CATEGORY'
147turn off warnings in CATEGORY
148.TP
149`none'
150turn off all the warnings
151.TP
152`error'
153treat warnings as errors
154.SS "THINGS is a list of comma separated words that can include:"
155.TP
156`state'
157describe the states
158.TP
159`itemset'
160complete the core item sets with their closure
161.TP
162`lookahead'
163explicitly associate lookahead tokens to items
164.TP
165`solved'
166describe shift/reduce conflicts solving
167.TP
168`all'
169include all the above information
170.TP
171`none'
172disable the report
173.SH AUTHOR
174Written by Robert Corbett and Richard Stallman.
175.SH "REPORTING BUGS"
176Report bugs to <bug\-bison@gnu.org>.
177.PP
178Id
179.SH COPYRIGHT
180Copyright \(co 2008 Free Software Foundation, Inc.
181.br
182This is free software; see the source for copying conditions. There is NO
183warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
184.SH "SEE ALSO"
185.BR lex (1),
186.BR flex (1),
187.BR yacc (1).
188.PP
189The full documentation for
190.B bison
191is maintained as a Texinfo manual. If the
192.B info
193and
194.B bison
195programs are properly installed at your site, the command
196.IP
197.B info bison
198.PP
199should give you access to the complete manual.