File: bison_13.html

package info (click to toggle)
bisonc%2B%2B 6.09.02-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,984 kB
  • sloc: cpp: 9,375; ansic: 1,505; fortran: 1,134; makefile: 1,062; sh: 526; yacc: 84; lex: 60
file content (339 lines) | stat: -rw-r--r-- 12,604 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                      "http://www.w3.org/TR/html40/loose.dtd">
<HTML>
<!-- Created on January, 28 2005 by texi2html 1.66 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people <dev@texi2html.cvshome.org>
Send bugs and suggestions to <users@texi2html.cvshome.org>

-->
<HEAD>
<TITLE>Bison 2.21.5: Table of Symbols</TITLE>

<META NAME="description" CONTENT="Bison 2.21.5: Table of Symbols">
<META NAME="keywords" CONTENT="Bison 2.21.5: Table of Symbols">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.66">

</HEAD>

<BODY LANG="en" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">

<A NAME="SEC90"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_12.html#SEC89"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_14.html#SEC91"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_12.html#SEC86"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_14.html#SEC91"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_15.html#SEC92">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> A. Bison Symbols </H1>
<!--docid::SEC90::-->
<P>

</P>
<DL COMPACT>
<DT><CODE>error</CODE>
<DD>A token name reserved for error recovery.  This token may be used in
grammar rules so as to allow the Bison parser to recognize an error in
the grammar without halting the process.  In effect, a sentence
containing an error may be recognized as valid.  On a parse error, the
token <CODE>error</CODE> becomes the current look-ahead token.  Actions
corresponding to <CODE>error</CODE> are then executed, and the look-ahead
token is reset to the token that originally caused the violation.
See section <A HREF="bison_9.html#SEC80">6. Error Recovery</A>.
<P>

</P>
<DT><CODE>YYABORT</CODE>
<DD>Macro to pretend that an unrecoverable syntax error has occurred, by
making <CODE>yyparse</CODE> return 1 immediately.  The error reporting
function <CODE>yyerror</CODE> is not called.  See section <A HREF="bison_7.html#SEC59">The Parser Function <CODE>yyparse</CODE></A>.
<P>

</P>
<DT><CODE>YYACCEPT</CODE>
<DD>Macro to pretend that a complete utterance of the language has been
read, by making <CODE>yyparse</CODE> return 0 immediately.  
See section <A HREF="bison_7.html#SEC59">The Parser Function <CODE>yyparse</CODE></A>.
<P>

</P>
<DT><CODE>YYBACKUP</CODE>
<DD>Macro to discard a value from the parser stack and fake a look-ahead
token.  See section <A HREF="bison_7.html#SEC66">Special Features for Use in Actions</A>.
<P>

</P>
<DT><CODE>YYERROR</CODE>
<DD>Macro to pretend that a syntax error has just been detected: call
<CODE>yyerror</CODE> and then perform normal error recovery if possible
(see section <A HREF="bison_9.html#SEC80">6. Error Recovery</A>), or (if recovery is impossible) make
<CODE>yyparse</CODE> return 1.  See section <A HREF="bison_9.html#SEC80">6. Error Recovery</A>.
<P>

</P>
<DT><CODE>YYERROR_VERBOSE</CODE>
<DD>Macro that you define with <CODE>#define</CODE> in the Bison declarations
section to request verbose, specific error message strings when
<CODE>yyerror</CODE> is called.
<P>

</P>
<DT><CODE>YYINITDEPTH</CODE>
<DD>Macro for specifying the initial size of the parser stack.
See section <A HREF="bison_8.html#SEC79">5.8 Stack Overflow, and How to Avoid It</A>.
<P>

</P>
<DT><CODE>YYLEX_PARAM</CODE>
<DD>Macro for specifying an extra argument (or list of extra arguments) for
<CODE>yyparse</CODE> to pass to <CODE>yylex</CODE>.  See section <A HREF="bison_7.html#SEC64">Calling Conventions for Pure Parsers</A>.
<P>

</P>
<DT><CODE>YYLTYPE</CODE>
<DD>Macro for the data type of <CODE>yylloc</CODE>; a structure with four
members.  See section <A HREF="bison_7.html#SEC63">Textual Positions of Tokens</A>.
<P>

</P>
<DT><CODE>yyltype</CODE>
<DD>Default value for YYLTYPE.
<P>

</P>
<DT><CODE>YYMAXDEPTH</CODE>
<DD>Macro for specifying the maximum size of the parser stack.
See section <A HREF="bison_8.html#SEC79">5.8 Stack Overflow, and How to Avoid It</A>.
<P>

</P>
<DT><CODE>YYPARSE_PARAM</CODE>
<DD>Macro for specifying the name of a parameter that <CODE>yyparse</CODE> should
accept.  See section <A HREF="bison_7.html#SEC64">Calling Conventions for Pure Parsers</A>.
<P>

</P>
<DT><CODE>YYRECOVERING</CODE>
<DD>Macro whose value indicates whether the parser is recovering from a
syntax error.  See section <A HREF="bison_7.html#SEC66">Special Features for Use in Actions</A>.
<P>

</P>
<DT><CODE>YYSTYPE</CODE>
<DD>Macro for the data type of semantic values; <CODE>int</CODE> by default.
See section <A HREF="bison_6.html#SEC43">Data Types of Semantic Values</A>.
<P>

</P>
<DT><CODE>yychar</CODE>
<DD>External integer variable that contains the integer value of the
current look-ahead token.  (In a pure parser, it is a local variable
within <CODE>yyparse</CODE>.)  Error-recovery rule actions may examine this
variable.  See section <A HREF="bison_7.html#SEC66">Special Features for Use in Actions</A>.
<P>

</P>
<DT><CODE>yyclearin</CODE>
<DD>Macro used in error-recovery rule actions.  It clears the previous
look-ahead token.  See section <A HREF="bison_9.html#SEC80">6. Error Recovery</A>.
<P>

</P>
<DT><CODE>yydebug</CODE>
<DD>External integer variable set to zero by default.  If <CODE>yydebug</CODE>
is given a nonzero value, the parser will output information on input
symbols and parser action.  See section <A HREF="bison_11.html#SEC85">Debugging Your Parser</A>.
<P>

</P>
<DT><CODE>yyerrok</CODE>
<DD>Macro to cause parser to recover immediately to its normal mode
after a parse error.  See section <A HREF="bison_9.html#SEC80">6. Error Recovery</A>.
<P>

</P>
<DT><CODE>yyerror</CODE>
<DD>User-supplied function to be called by <CODE>yyparse</CODE> on error.  The
function receives one argument, a pointer to a character string
containing an error message.  See section <A HREF="bison_7.html#SEC65">The Error Reporting Function <CODE>yyerror</CODE></A>.
<P>

</P>
<DT><CODE>yylex</CODE>
<DD>User-supplied lexical analyzer function, called with no arguments
to get the next token.  See section <A HREF="bison_7.html#SEC60">The Lexical Analyzer Function <CODE>yylex</CODE></A>.
<P>

</P>
<DT><CODE>yylval</CODE>
<DD>External variable in which <CODE>yylex</CODE> should place the semantic
value associated with a token.  (In a pure parser, it is a local
variable within <CODE>yyparse</CODE>, and its address is passed to
<CODE>yylex</CODE>.)  See section <A HREF="bison_7.html#SEC62">Semantic Values of Tokens</A>.
<P>

</P>
<DT><CODE>yylloc</CODE>
<DD>External variable in which <CODE>yylex</CODE> should place the line and
column numbers associated with a token.  (In a pure parser, it is a
local variable within <CODE>yyparse</CODE>, and its address is passed to
<CODE>yylex</CODE>.)  You can ignore this variable if you don't use the
`<SAMP>@</SAMP>' feature in the grammar actions.  See section <A HREF="bison_7.html#SEC63">Textual Positions of Tokens</A>.
<P>

</P>
<DT><CODE>yynerrs</CODE>
<DD>Global variable which Bison increments each time there is a parse
error.  (In a pure parser, it is a local variable within
<CODE>yyparse</CODE>.)  See section <A HREF="bison_7.html#SEC65">The Error Reporting Function <CODE>yyerror</CODE></A>.
<P>

</P>
<DT><CODE>yyparse</CODE>
<DD>The parser function produced by Bison; call this function to start
parsing.  See section <A HREF="bison_7.html#SEC59">The Parser Function <CODE>yyparse</CODE></A>.
<P>

</P>
<DT><CODE>%left</CODE>
<DD>Bison declaration to assign left associativity to token(s).
See section <A HREF="bison_6.html#SEC50">Operator Precedence</A>.
<P>

</P>
<DT><CODE>%no_lines</CODE>
<DD>Bison declaration to avoid generating <CODE>#line</CODE> directives in the
parser file.  See section <A HREF="bison_6.html#SEC56">3.6.8 Bison Declaration Summary</A>.
<P>

</P>
<DT><CODE>%nonassoc</CODE>
<DD>Bison declaration to assign nonassociativity to token(s).
See section <A HREF="bison_6.html#SEC50">Operator Precedence</A>.
<P>

</P>
<DT><CODE>%prec</CODE>
<DD>Bison declaration to assign a precedence to a specific rule.
See section <A HREF="bison_8.html#SEC75">Context-Dependent Precedence</A>.
<P>

</P>
<DT><CODE>%pure_parser</CODE>
<DD>Bison declaration to request a pure (reentrant) parser.
See section <A HREF="bison_6.html#SEC55">A Pure (Reentrant) Parser</A>.
<P>

</P>
<DT><CODE>%raw</CODE>
<DD>Bison declaration to use Bison internal token code numbers in token
tables instead of the usual Yacc-compatible token code numbers.
See section <A HREF="bison_6.html#SEC56">3.6.8 Bison Declaration Summary</A>.
<P>

</P>
<DT><CODE>%right</CODE>
<DD>Bison declaration to assign right associativity to token(s).
See section <A HREF="bison_6.html#SEC50">Operator Precedence</A>.
<P>

</P>
<DT><CODE>%start</CODE>
<DD>Bison declaration to specify the start symbol.  See section <A HREF="bison_6.html#SEC54">The Start-Symbol</A>.
<P>

</P>
<DT><CODE>%token</CODE>
<DD>Bison declaration to declare token(s) without specifying precedence.
See section <A HREF="bison_6.html#SEC49">Token Type Names</A>.
<P>

</P>
<DT><CODE>%token_table</CODE>
<DD>Bison declaration to include a token name table in the parser file.
See section <A HREF="bison_6.html#SEC56">3.6.8 Bison Declaration Summary</A>.
<P>

</P>
<DT><CODE>%type</CODE>
<DD>Bison declaration to declare nonterminals.  See section <A HREF="bison_6.html#SEC52">Nonterminal Symbols</A>.
<P>

</P>
<DT><CODE>%union</CODE>
<DD>Bison declaration to specify several possible data types for semantic
values.  See section <A HREF="bison_6.html#SEC51">The Collection of Value Types</A>.
</DL>
<P>

These are the punctuation and delimiters used in Bison input:
</P>
<P>

</P>
<DL COMPACT>
<DT>`<SAMP>%%</SAMP>'
<DD>Delimiter used to separate the grammar rule section from the
Bison declarations section or the additional C code section.
See section <A HREF="bison_4.html#SEC13">The Overall Layout of a Bison Grammar</A>.
<P>

</P>
<DT>`<SAMP>%{ %}</SAMP>'
<DD>All code listed between `<SAMP>%{</SAMP>' and `<SAMP>%}</SAMP>' is copied directly
to the output file uninterpreted.  Such code forms the &quot;C
declarations&quot; section of the input file.  See section <A HREF="bison_6.html#SEC34">Outline of a Bison Grammar</A>.
<P>

</P>
<DT>`<SAMP>/*<small>...</small>*/</SAMP>'
<DD>Comment delimiters, as in C.
<P>

</P>
<DT>`<SAMP>:</SAMP>'
<DD>Separates a rule's result from its components.  See section <A HREF="bison_6.html#SEC40">Syntax of Grammar Rules</A>.
<P>

</P>
<DT>`<SAMP>;</SAMP>'
<DD>Terminates a rule.  See section <A HREF="bison_6.html#SEC40">Syntax of Grammar Rules</A>.
<P>

</P>
<DT>`<SAMP>|</SAMP>'
<DD>Separates alternate rules for the same result nonterminal.
See section <A HREF="bison_6.html#SEC40">Syntax of Grammar Rules</A>.
</DL>
<P>

<A NAME="Glossary"></A>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_12.html#SEC86"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_14.html#SEC91"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_15.html#SEC92">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bison_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
This document was generated
by <I>Frank B. Brokken</I> on <I>January, 28 2005</I>
using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A>
</FONT>

</BODY>
</HTML>