]> git.saurik.com Git - bison.git/blame - doc/bison.rnh
* src/complain.c: Adjust strerror_r portability issues.
[bison.git] / doc / bison.rnh
CommitLineData
22a89eed
RS
1.!
2.! RUNOFF source file for BISON.HLP
3.!
4.! This is a RUNOFF input file which will produce a VMS help file
5.! for the VMS HELP library.
6.!
333ccc01 7.! Eric Youngdale and Wilfred J. Hansen (wjh+@cmu.edu).
22a89eed
RS
8.!
9.literal
10.end literal
11.no paging
12.no flags all
13.right margin 70
14.left margin 1
15
16.indent -1
171 BISON
18.skip
19 The BISON command invokes the GNU BISON parser generator.
20.skip
21.literal
22 BISON file-spec
23.end literal
24.skip
25.indent -1
262 Parameters
27.skip
28 file-spec
29.skip
30Here file-spec is the grammar file name, which usually ends in
31.y. The parser file's name is made by replacing the .y
32with _tab.c. Thus, the command bison foo.y yields
33foo_tab.c.
34
35.skip
36.indent -1
372 Qualifiers
38.skip
39 The following is the list of available qualifiers for BISON:
40.literal
41 /DEBUG
42 /DEFINES
43 /FILE_PREFIX=prefix
44 /FIXED_OUTFILES
45 /NAME_PREFIX=prefix
46 /NOLINES
333ccc01 47 /NOPARSER
22a89eed 48 /OUTPUT=outfilefile
333ccc01
RS
49 /RAW
50 /TOKEN_TABLE
22a89eed
RS
51 /VERBOSE
52 /VERSION
53 /YACC
54.end literal
55.skip
56.indent -1
572 /DEBUG
58.skip
59Output a definition of the macro YYDEBUG into the parser file,
60so that the debugging facilities are compiled.
61.skip
62.indent -1
632 /DEFINES
64.skip
65Write an extra output file containing macro definitions for the token
66type names defined in the grammar and the semantic value type
67YYSTYPE, as well as a extern variable declarations.
68.skip
69If the parser output file is named "name.c" then this file
70is named "name.h".
71.skip
72This output file is essential if you wish to put the definition of
73yylex in a separate source file, because yylex needs to
74be able to refer to token type codes and the variable
75yylval.
76.skip
77.indent -1
782 /FILE_PREFIX
79.skip
80.literal
81 /FILIE_PREFIX=prefix
82.end literal
83.skip
84 Specify a prefix to use for all Bison output file names. The names are
85chosen as if the input file were named prefix.c
86
87.skip
88.indent -1
892 /FIXED_OUTFILES
90.skip
91Equivalent to /OUTPUT=y_tab.c; the parser output file is called
92y_tab.c, and the other outputs are called y.output and
93y_tab.h. The purpose of this switch is to imitate Yacc's output
94file name conventions. The /YACC qualifier is functionally equivalent
95to /FIXED_OUTFILES. The following command definition will
96work as a substitute for Yacc:
97
98.literal
99$YACC:==BISON/FIXED_OUTFILES
100.end literal
101.skip
102.indent -1
1032 /NAME_PREFIX
104.skip
105.literal
106 /NAME_PREFIX=prefix
107.end literal
108.skip
109Rename the external symbols used in the parser so that they start with
110"prefix" instead of "yy". The precise list of symbols renamed
111is yyparse, yylex, yyerror, yylval, yychar and yydebug.
112
113For example, if you use /NAME_PREFIX="c", the names become cparse,
114clex, and so on.
115
116.skip
117.indent -1
1182 /NOLINES
119.skip
120Don't put any "#line" preprocessor commands in the parser file.
121Ordinarily Bison puts them in the parser file so that the C compiler
122and debuggers will associate errors with your source file, the
123grammar file. This option causes them to associate errors with the
124parser file, treating it an independent source file in its own right.
333ccc01
RS
125.skip
126.indent -1
1272 /NOPARSER
128.skip
129Do not generate the parser code into the output; generate only
130declarations. The generated name_tab.c file will have only
131constant declarations. In addition, a name.act file is
132generated containing a switch statement body containing all the
133translated actions.
22a89eed
RS
134.skip
135.indent -1
1362 /OUTPUT
137.skip
138.literal
139 /OUTPUT=outfile
140.end literal
141.skip
142Specify the name "outfile" for the parser file.
333ccc01
RS
143.skip
144.indent -1
1452 /RAW
146.skip
147When this switch is specified, the .tab.h file defines the tokens to
148have the bison token numbers rather than the yacc compatible numbers.
149To employ this switch you would have to have your own parser.
150.skip
151.indent -1
1522 /TOKEN_TABLE
153.skip
154This switch causes the name_tab.c output to include a list of
155token names in order by their token numbers; this is defined in the array
156yytname. Also generated are #defines for YYNTOKENS, YYNNTS, YYNRULES,
157and YYNSTATES.
158
22a89eed
RS
159.skip
160.indent -1
1612 /VERBOSE
162.skip
163Write an extra output file containing verbose descriptions of the
164parser states and what is done for each type of look-ahead token in
165that state.
166.skip
167This file also describes all the conflicts, both those resolved by
168operator precedence and the unresolved ones.
169.skip
170The file's name is made by removing _tab.c or .c from
171the parser output file name, and adding .output instead.
172.skip
173Therefore, if the input file is foo.y, then the parser file is
174called foo_tab.c by default. As a consequence, the verbose
175output file is called foo.output.
176.skip
177.indent -1
1782 /VERSION
179.skip
180Print the version number of Bison.
181
182.skip
183.indent -1
1842 /YACC
185.skip
186See /FIXED_OUTFILES.
187.skip
188.indent -1
189
190
191