]> git.saurik.com Git - bison.git/blame_incremental - doc/bison.1
* data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer text.
[bison.git] / doc / bison.1
... / ...
CommitLineData
1.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
2.TH BISON "1" "November 2007" "bison 2.3a+" "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.
64.SS "Operation modes:"
65.TP
66\fB\-h\fR, \fB\-\-help\fR
67display this help and exit
68.TP
69\fB\-V\fR, \fB\-\-version\fR
70output version information and exit
71.TP
72\fB\-\-print\-localedir\fR
73output directory containing locale\-dependent data
74.TP
75\fB\-\-print\-datadir\fR
76output directory containing skeletons and XSLT
77.TP
78\fB\-y\fR, \fB\-\-yacc\fR
79emulate POSIX Yacc
80.TP
81\fB\-W\fR, \fB\-\-warnings\fR=\fI[CATEGORY]\fR
82report the warnings falling in CATEGORY
83.SS "Parser:"
84.TP
85\fB\-S\fR, \fB\-\-skeleton\fR=\fIFILE\fR
86specify the skeleton to use
87.TP
88\fB\-t\fR, \fB\-\-debug\fR
89instrument the parser for debugging
90.TP
91\fB\-\-locations\fR
92enable locations computation
93.TP
94\fB\-p\fR, \fB\-\-name\-prefix\fR=\fIPREFIX\fR
95prepend PREFIX to the external symbols
96.TP
97\fB\-l\fR, \fB\-\-no\-lines\fR
98don't generate `#line' directives
99.TP
100\fB\-k\fR, \fB\-\-token\-table\fR
101include a table of token names
102.SS "Output:"
103.TP
104\fB\-d\fR, \fB\-\-defines\fR[=\fIFILE\fR]
105also produce a header file
106.TP
107\fB\-r\fR, \fB\-\-report\fR=\fITHINGS\fR
108also produce details on the automaton
109.TP
110\fB\-\-report\-file\fR=\fIFILE\fR
111write report to FILE
112.TP
113\fB\-v\fR, \fB\-\-verbose\fR
114same as `\-\-report=state'
115.TP
116\fB\-b\fR, \fB\-\-file\-prefix\fR=\fIPREFIX\fR
117specify a PREFIX for output files
118.TP
119\fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR
120leave output to FILE
121.TP
122\fB\-g\fR, \fB\-\-graph\fR[=\fIFILE\fR]
123also output a graph of the automaton
124.TP
125\fB\-x\fR, \fB\-\-xml\fR[=\fIFILE\fR]
126also output an XML report of the automaton
127.SS "Warning categories include:"
128.TP
129`midrule\-values'
130unset or unused midrule values
131.TP
132`yacc'
133incompatibilities with POSIX YACC
134.TP
135`all'
136all the warnings
137.TP
138`no\-CATEGORY'
139turn off warnings in CATEGORY
140.TP
141`none'
142turn off all the warnings
143.TP
144`error'
145treat warnings as errors
146.SS "THINGS is a list of comma separated words that can include:"
147.TP
148`state'
149describe the states
150.TP
151`itemset'
152complete the core item sets with their closure
153.TP
154`lookahead'
155explicitly associate lookahead tokens to items
156.TP
157`solved'
158describe shift/reduce conflicts solving
159.TP
160`all'
161include all the above information
162.TP
163`none'
164disable the report
165.SH AUTHOR
166Written by Robert Corbett and Richard Stallman.
167.SH "REPORTING BUGS"
168Report bugs to <bug\-bison@gnu.org>.
169.SH COPYRIGHT
170Copyright \(co 2007 Free Software Foundation, Inc.
171.br
172This is free software; see the source for copying conditions. There is NO
173warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
174.SH "SEE ALSO"
175.BR lex (1),
176.BR flex (1),
177.BR yacc (1).
178.PP
179The full documentation for
180.B bison
181is maintained as a Texinfo manual. If the
182.B info
183and
184.B bison
185programs are properly installed at your site, the command
186.IP
187.B info bison
188.PP
189should give you access to the complete manual.