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