]> git.saurik.com Git - bison.git/blame - doc/bison.rnh
*** empty log message ***
[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.!
7.! Date of last revision: June 21, 1992
8.!
9.!
10.! Eric Youngdale
11.!
12.literal
13.end literal
14.no paging
15.no flags all
16.right margin 70
17.left margin 1
18
19.indent -1
201 BISON
21.skip
22 The BISON command invokes the GNU BISON parser generator.
23.skip
24.literal
25 BISON file-spec
26.end literal
27.skip
28.indent -1
292 Parameters
30.skip
31 file-spec
32.skip
33Here file-spec is the grammar file name, which usually ends in
34.y. The parser file's name is made by replacing the .y
35with _tab.c. Thus, the command bison foo.y yields
36foo_tab.c.
37
38.skip
39.indent -1
402 Qualifiers
41.skip
42 The following is the list of available qualifiers for BISON:
43.literal
44 /DEBUG
45 /DEFINES
46 /FILE_PREFIX=prefix
47 /FIXED_OUTFILES
48 /NAME_PREFIX=prefix
49 /NOLINES
50 /OUTPUT=outfilefile
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.
125
126.skip
127.indent -1
1282 /OUTPUT
129.skip
130.literal
131 /OUTPUT=outfile
132.end literal
133.skip
134Specify the name "outfile" for the parser file.
135.skip
136.indent -1
1372 /VERBOSE
138.skip
139Write an extra output file containing verbose descriptions of the
140parser states and what is done for each type of look-ahead token in
141that state.
142.skip
143This file also describes all the conflicts, both those resolved by
144operator precedence and the unresolved ones.
145.skip
146The file's name is made by removing _tab.c or .c from
147the parser output file name, and adding .output instead.
148.skip
149Therefore, if the input file is foo.y, then the parser file is
150called foo_tab.c by default. As a consequence, the verbose
151output file is called foo.output.
152.skip
153.indent -1
1542 /VERSION
155.skip
156Print the version number of Bison.
157
158.skip
159.indent -1
1602 /YACC
161.skip
162See /FIXED_OUTFILES.
163.skip
164.indent -1
165
166
167