]>
Commit | Line | Data |
---|---|---|
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 | |
4 | bison \- GNU Project parser generator (yacc replacement) | |
5 | .SH SYNOPSIS | |
6 | .B bison | |
7 | [\fIOPTION\fR]... \fIFILE\fR | |
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. | |
24 | Moreover, if you need to put | |
25 | .I C++ | |
26 | code 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 | |
28 | output file (.cpp or .c++). | |
29 | For instance, a grammar description file named | |
30 | .B parse.yxx | |
31 | would produce the generated parser in a file named | |
32 | .BR parse.tab.cxx , | |
33 | instead of | |
34 | .IR yacc 's | |
35 | .B y.tab.c | |
36 | or old | |
37 | .I Bison | |
38 | version's | |
39 | .BR parse.tab.c . | |
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 = . | |
60 | .PP | |
61 | Generate LALR(1) and GLR parsers. | |
62 | .PP | |
63 | Mandatory arguments to long options are mandatory for short options too. | |
64 | The same is true for optional arguments. | |
65 | .SS "Operation modes:" | |
66 | .TP | |
67 | \fB\-h\fR, \fB\-\-help\fR | |
68 | display this help and exit | |
69 | .TP | |
70 | \fB\-V\fR, \fB\-\-version\fR | |
71 | output version information and exit | |
72 | .TP | |
73 | \fB\-\-print\-localedir\fR | |
74 | output directory containing locale\-dependent data | |
75 | .TP | |
76 | \fB\-\-print\-datadir\fR | |
77 | output directory containing skeletons and XSLT | |
78 | .TP | |
79 | \fB\-y\fR, \fB\-\-yacc\fR | |
80 | emulate POSIX Yacc | |
81 | .TP | |
82 | \fB\-W\fR, \fB\-\-warnings\fR=\fI[CATEGORY]\fR | |
83 | report the warnings falling in CATEGORY | |
84 | .SS "Parser:" | |
85 | .TP | |
86 | \fB\-L\fR, \fB\-\-language\fR=\fILANGUAGE\fR | |
87 | specify the output programming language | |
88 | .TP | |
89 | \fB\-S\fR, \fB\-\-skeleton\fR=\fIFILE\fR | |
90 | specify the skeleton to use | |
91 | .TP | |
92 | \fB\-t\fR, \fB\-\-debug\fR | |
93 | instrument the parser for debugging | |
94 | .TP | |
95 | \fB\-\-locations\fR | |
96 | enable locations computation | |
97 | .TP | |
98 | \fB\-p\fR, \fB\-\-name\-prefix\fR=\fIPREFIX\fR | |
99 | prepend PREFIX to the external symbols | |
100 | .TP | |
101 | \fB\-l\fR, \fB\-\-no\-lines\fR | |
102 | don't generate `#line' directives | |
103 | .TP | |
104 | \fB\-k\fR, \fB\-\-token\-table\fR | |
105 | include a table of token names | |
106 | .SS "Output:" | |
107 | .TP | |
108 | \fB\-\-defines\fR[=\fIFILE\fR] | |
109 | also produce a header file | |
110 | .TP | |
111 | \fB\-d\fR | |
112 | likewise but cannot specify FILE (for POSIX Yacc) | |
113 | .TP | |
114 | \fB\-r\fR, \fB\-\-report\fR=\fITHINGS\fR | |
115 | also produce details on the automaton | |
116 | .TP | |
117 | \fB\-\-report\-file\fR=\fIFILE\fR | |
118 | write report to FILE | |
119 | .TP | |
120 | \fB\-v\fR, \fB\-\-verbose\fR | |
121 | same as `\-\-report=state' | |
122 | .TP | |
123 | \fB\-b\fR, \fB\-\-file\-prefix\fR=\fIPREFIX\fR | |
124 | specify a PREFIX for output files | |
125 | .TP | |
126 | \fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR | |
127 | leave output to FILE | |
128 | .TP | |
129 | \fB\-g\fR, \fB\-\-graph\fR[=\fIFILE\fR] | |
130 | also output a graph of the automaton | |
131 | .TP | |
132 | \fB\-x\fR, \fB\-\-xml\fR[=\fIFILE\fR] | |
133 | also output an XML report of the automaton | |
134 | (the XML schema is experimental) | |
135 | .SS "Warning categories include:" | |
136 | .TP | |
137 | `midrule\-values' | |
138 | unset or unused midrule values | |
139 | .TP | |
140 | `yacc' | |
141 | incompatibilities with POSIX YACC | |
142 | .TP | |
143 | `all' | |
144 | all the warnings | |
145 | .TP | |
146 | `no\-CATEGORY' | |
147 | turn off warnings in CATEGORY | |
148 | .TP | |
149 | `none' | |
150 | turn off all the warnings | |
151 | .TP | |
152 | `error' | |
153 | treat warnings as errors | |
154 | .SS "THINGS is a list of comma separated words that can include:" | |
155 | .TP | |
156 | `state' | |
157 | describe the states | |
158 | .TP | |
159 | `itemset' | |
160 | complete the core item sets with their closure | |
161 | .TP | |
162 | `lookahead' | |
163 | explicitly associate lookahead tokens to items | |
164 | .TP | |
165 | `solved' | |
166 | describe shift/reduce conflicts solving | |
167 | .TP | |
168 | `all' | |
169 | include all the above information | |
170 | .TP | |
171 | `none' | |
172 | disable the report | |
173 | .SH AUTHOR | |
174 | Written by Robert Corbett and Richard Stallman. | |
175 | .SH "REPORTING BUGS" | |
176 | Report bugs to <bug\-bison@gnu.org>. | |
177 | .PP | |
178 | Id | |
179 | .SH COPYRIGHT | |
180 | Copyright \(co 2008 Free Software Foundation, Inc. | |
181 | .br | |
182 | This is free software; see the source for copying conditions. There is NO | |
183 | warranty; 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 | |
189 | The full documentation for | |
190 | .B bison | |
191 | is maintained as a Texinfo manual. If the | |
192 | .B info | |
193 | and | |
194 | .B bison | |
195 | programs are properly installed at your site, the command | |
196 | .IP | |
197 | .B info bison | |
198 | .PP | |
199 | should give you access to the complete manual. |