]>
Commit | Line | Data |
---|---|---|
a8289c62 RA |
1 | /* -*- C -*- */ |
2 | ||
3 | /* A Bison parser, made from %%filename | |
4 | by GNU bison %%version. */ | |
5 | ||
10fa2066 | 6 | /* Skeleton output parser for bison, |
fabd3b43 | 7 | Copyright 1984, 1989, 1990, 2000, 2001 Free Software Foundation, Inc. |
10fa2066 RS |
8 | |
9 | This program is free software; you can redistribute it and/or modify | |
10 | it under the terms of the GNU General Public License as published by | |
21b14802 | 11 | the Free Software Foundation; either version 2, or (at your option) |
10fa2066 RS |
12 | any later version. |
13 | ||
14 | This program is distributed in the hope that it will be useful, | |
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | GNU General Public License for more details. | |
18 | ||
19 | You should have received a copy of the GNU General Public License | |
20 | along with this program; if not, write to the Free Software | |
c49a8e71 JT |
21 | Foundation, Inc., 59 Temple Place - Suite 330, |
22 | Boston, MA 02111-1307, USA. */ | |
10fa2066 | 23 | |
c71f8bba RS |
24 | /* As a special exception, when this file is copied by Bison into a |
25 | Bison output file, you may use that output file without restriction. | |
26 | This special exception was added by the Free Software Foundation | |
cfeaeb52 | 27 | in version 1.24 of Bison. */ |
10fa2066 | 28 | |
71da9eea AD |
29 | /* This is the parser code that is written into each bison parser when |
30 | the %semantic_parser declaration is not specified in the grammar. | |
31 | It was written by Richard Stallman by simplifying the hairy parser | |
32 | used when %semantic_parser is specified. */ | |
444fbf65 | 33 | |
7093d0f5 AD |
34 | /* Identify Bison output. */ |
35 | #define YYBISON 1 | |
fd51e5ff | 36 | |
7093d0f5 AD |
37 | /* Pure parsers. */ |
38 | #define YYPURE %%pure | |
39 | ||
40 | /* Using locations. */ | |
41 | #define YYLSP_NEEDED %%locations-flag | |
42 | ||
43 | /* Enabling traces. */ | |
44 | #ifndef YYDEBUG | |
45 | # define YYDEBUG %%debug | |
46 | #endif | |
47 | ||
48 | /* Enabling verbose error messages. */ | |
49 | #undef YYERROR_VERBOSE | |
50 | #define YYERROR_VERBOSE %%error-verbose | |
a8289c62 | 51 | |
17da6427 PB |
52 | /* If name_prefix is specify substitute the variables and functions |
53 | names. */ | |
54 | #define yyparse %%prefix##parse | |
fd51e5ff | 55 | #define yylex %%prefix##lex |
17da6427 | 56 | #define yyerror %%prefix##error |
fd51e5ff AD |
57 | #define yylval %%prefix##lval |
58 | #define yychar %%prefix##char | |
17da6427 PB |
59 | #define yydebug %%prefix##debug |
60 | #define yynerrs %%prefix##nerrs | |
61 | ||
fd51e5ff AD |
62 | #ifndef YYSTYPE |
63 | typedef %%stype yystype; | |
64 | # define YYSTYPE yystype | |
65 | #endif | |
66 | ||
67 | #ifndef YYLTYPE | |
68 | typedef struct yyltype | |
69 | { | |
70 | int first_line; | |
71 | int first_column; | |
72 | int last_line; | |
73 | int last_column; | |
74 | } yyltype; | |
75 | # define YYLTYPE %%ltype | |
76 | #endif | |
77 | ||
7093d0f5 AD |
78 | /* Copy the user declarations. */ |
79 | #line %%input-line "%%filename" | |
80 | %%prologue | |
81 | ||
fd51e5ff | 82 | #line %%line "%%skeleton" |
7093d0f5 AD |
83 | |
84 | #include <stdio.h> | |
85 | ||
86 | #ifndef __cplusplus | |
87 | # ifndef __STDC__ | |
88 | # define const | |
89 | # endif | |
90 | #endif | |
91 | ||
92 | /* All symbols defined below should begin with yy or YY, to avoid | |
93 | infringing on user name space. This should be done even for local | |
94 | variables, as they might otherwise be expanded by user macros. | |
95 | There are some unavoidable exceptions within include files to | |
96 | define necessary C library symbols; they are noted "INFRINGES ON | |
97 | USER NAME SPACE" below. */ | |
98 | ||
99 | #if ! defined (yyoverflow) || YYERROR_VERBOSE | |
100 | ||
101 | /* The parser invokes alloca or malloc; define the necessary symbols. */ | |
102 | ||
103 | # if YYSTACK_USE_ALLOCA | |
104 | # define YYSTACK_ALLOC alloca | |
105 | # define YYSIZE_T size_t | |
106 | # else | |
107 | # ifndef YYSTACK_USE_ALLOCA | |
108 | # if defined (alloca) || defined (_ALLOCA_H) | |
109 | # define YYSTACK_ALLOC alloca | |
110 | # define YYSIZE_T size_t | |
111 | # else | |
112 | # if defined (__GNUC__) || defined (_AIX) || defined (__hpux) | |
113 | # define YYSTACK_ALLOC __builtin_alloca | |
114 | # endif | |
115 | # ifndef __GNUC__ | |
116 | # ifdef _AIX | |
117 | # pragma alloca | |
118 | # endif | |
119 | # if defined (__sgi) || defined (__sparc__) || defined (__sparc) || defined (__sun) | |
120 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ | |
121 | # define YYSTACK_ALLOC alloca | |
122 | # define YYSIZE_T size_t | |
123 | # endif | |
124 | # endif | |
125 | # endif | |
126 | # endif | |
127 | # endif | |
128 | ||
129 | # ifdef YYSTACK_ALLOC | |
130 | /* Pacify GCC's `empty if-body' warning. */ | |
131 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) | |
132 | # else | |
133 | # define YYSTACK_ALLOC malloc | |
134 | # define YYSTACK_FREE(Ptr) free (Ptr) | |
135 | # if defined (__STDC__) || defined (__cplusplus) | |
136 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ | |
137 | # define YYSIZE_T size_t | |
138 | # endif | |
139 | # endif | |
140 | ||
600f9b0c PE |
141 | /* A type that is properly aligned for any stack member. */ |
142 | union yyalloc | |
143 | { | |
2729e106 PE |
144 | short yyss; |
145 | YYSTYPE yyvs; | |
7093d0f5 | 146 | # if YYLSP_NEEDED |
2729e106 | 147 | YYLTYPE yyls; |
7093d0f5 | 148 | # endif |
600f9b0c PE |
149 | }; |
150 | ||
151 | /* The size of the maximum gap between one aligned stack and the next. */ | |
7093d0f5 | 152 | # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) |
600f9b0c PE |
153 | |
154 | /* The size of an array large to enough to hold all stacks, each with | |
155 | N elements. */ | |
7093d0f5 AD |
156 | # if YYLSP_NEEDED |
157 | # define YYSTACK_BYTES(N) \ | |
600f9b0c PE |
158 | ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ |
159 | + 2 * YYSTACK_GAP_MAX) | |
7093d0f5 AD |
160 | # else |
161 | # define YYSTACK_BYTES(N) \ | |
600f9b0c PE |
162 | ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ |
163 | + YYSTACK_GAP_MAX) | |
7093d0f5 | 164 | # endif |
600f9b0c PE |
165 | |
166 | /* Relocate the TYPE STACK from its old location to the new one. The | |
7093d0f5 | 167 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
600f9b0c PE |
168 | elements in the stack, and YYPTR gives the new location of the |
169 | stack. Advance YYPTR to a properly aligned location for the next | |
170 | stack. */ | |
7093d0f5 AD |
171 | # define YYSTACK_RELOCATE(Type, Stack) \ |
172 | do \ | |
173 | { \ | |
174 | YYSIZE_T yynewbytes; \ | |
2729e106 | 175 | yymemcpy ((char *) yyptr, (char *) (Stack), \ |
7093d0f5 | 176 | yysize * (YYSIZE_T) sizeof (Type)); \ |
2729e106 | 177 | Stack = &yyptr->Stack; \ |
7093d0f5 | 178 | yynewbytes = yystacksize * sizeof (Type) + YYSTACK_GAP_MAX; \ |
2729e106 | 179 | yyptr += yynewbytes / sizeof (*yyptr); \ |
7093d0f5 AD |
180 | } \ |
181 | while (0) | |
182 | ||
183 | #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ | |
8850be4b | 184 | |
e8cb70b9 | 185 | /* Tokens. */ |
a8289c62 RA |
186 | %%tokendef |
187 | ||
188 | #define YYFINAL %%final | |
189 | #define YYFLAG %%flag | |
190 | #define YYNTBASE %%ntbase | |
191 | #define YYLAST %%last | |
192 | ||
193 | #define YYNTOKENS %%ntokens | |
194 | #define YYNNTS %%nnts | |
195 | #define YYNRULES %%nrules | |
196 | #define YYNSTATES %%nstates | |
197 | #define YYMAXUTOK %%maxtok | |
198 | ||
199 | /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ | |
200 | #define YYTRANSLATE(x) ((unsigned)(x) <= %%maxtok ? yytranslate[x] : %%nsym) | |
201 | ||
202 | /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ | |
203 | static const char yytranslate[] = | |
204 | { | |
205 | %%translate | |
206 | }; | |
207 | ||
208 | #if YYDEBUG | |
209 | static const short yyprhs[] = | |
210 | { | |
211 | %%prhs | |
212 | }; | |
213 | ||
214 | static const short yyrhs[] = | |
215 | { | |
216 | %%rhs | |
217 | }; | |
218 | ||
219 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ | |
220 | static const short yyrline[] = | |
221 | { | |
222 | %%rline | |
223 | }; | |
224 | #endif | |
225 | ||
8850be4b | 226 | #if YYDEBUG || YYERROR_VERBOSE |
e8cb70b9 PB |
227 | /* YYTNME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ |
228 | static const char *const yytname[] = | |
a8289c62 RA |
229 | { |
230 | %%tname | |
231 | }; | |
232 | #endif | |
233 | ||
234 | /* YYTOKNUM[YYN] -- Index in YYTNAME corresponding to YYLEX. */ | |
235 | static const short yytoknum[] = | |
236 | { | |
237 | %%toknum | |
238 | }; | |
239 | ||
240 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ | |
241 | static const short yyr1[] = | |
242 | { | |
243 | %%r1 | |
244 | }; | |
245 | ||
246 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ | |
247 | static const short yyr2[] = | |
248 | { | |
249 | %%r2 | |
250 | }; | |
251 | ||
252 | /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE | |
253 | doesn't specify something else to do. Zero means the default is an | |
254 | error. */ | |
255 | static const short yydefact[] = | |
256 | { | |
257 | %%defact | |
258 | }; | |
259 | ||
260 | static const short yydefgoto[] = | |
261 | { | |
262 | %%defgoto | |
263 | }; | |
264 | ||
265 | static const short yypact[] = | |
266 | { | |
267 | %%pact | |
268 | }; | |
269 | ||
270 | static const short yypgoto[] = | |
271 | { | |
272 | %%pgoto | |
273 | }; | |
274 | ||
275 | static const short yytable[] = | |
276 | { | |
277 | %%table | |
278 | }; | |
279 | ||
280 | static const short yycheck[] = | |
281 | { | |
282 | %%check | |
283 | }; | |
284 | ||
7093d0f5 AD |
285 | |
286 | #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) | |
287 | # define YYSIZE_T __SIZE_TYPE__ | |
288 | #endif | |
289 | #if ! defined (YYSIZE_T) && defined (size_t) | |
290 | # define YYSIZE_T size_t | |
291 | #endif | |
292 | #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus)) | |
293 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ | |
294 | # define YYSIZE_T size_t | |
295 | #endif | |
296 | #if ! defined (YYSIZE_T) | |
297 | # define YYSIZE_T unsigned int | |
298 | #endif | |
299 | ||
10fa2066 | 300 | #define yyerrok (yyerrstatus = 0) |
17da6427 | 301 | #define yyclearin (yychar = YYEMPTY) |
10fa2066 RS |
302 | #define YYEMPTY -2 |
303 | #define YYEOF 0 | |
a8289c62 | 304 | |
70ddf897 | 305 | #define YYACCEPT goto yyacceptlab |
a8289c62 | 306 | #define YYABORT goto yyabortlab |
10fa2066 | 307 | #define YYERROR goto yyerrlab1 |
a8289c62 | 308 | |
71da9eea AD |
309 | /* Like YYERROR except do call yyerror. This remains here temporarily |
310 | to ease the transition to the new meaning of YYERROR, for GCC. | |
10fa2066 | 311 | Once GCC version 2 has supplanted version 1, this can go. */ |
a8289c62 | 312 | |
10fa2066 | 313 | #define YYFAIL goto yyerrlab |
a8289c62 | 314 | |
10fa2066 | 315 | #define YYRECOVERING() (!!yyerrstatus) |
a8289c62 | 316 | |
69b4e0c5 | 317 | #define YYBACKUP(Token, Value) \ |
10fa2066 | 318 | do \ |
17da6427 | 319 | if (yychar == YYEMPTY && yylen == 1) \ |
71da9eea | 320 | { \ |
17da6427 PB |
321 | yychar = (Token); \ |
322 | yylval = (Value); \ | |
323 | yychar1 = YYTRANSLATE (yychar); \ | |
10fa2066 RS |
324 | YYPOPSTACK; \ |
325 | goto yybackup; \ | |
326 | } \ | |
327 | else \ | |
71da9eea | 328 | { \ |
17da6427 | 329 | yyerror ("syntax error: cannot back up"); \ |
71da9eea AD |
330 | YYERROR; \ |
331 | } \ | |
10fa2066 RS |
332 | while (0) |
333 | ||
334 | #define YYTERROR 1 | |
335 | #define YYERRCODE 256 | |
336 | ||
3abcd459 AD |
337 | /* YYLLOC_DEFAULT -- Compute the default location (before the actions |
338 | are run). | |
339 | ||
340 | When YYLLOC_DEFAULT is run, CURRENT is set the location of the | |
341 | first token. By default, to implement support for ranges, extend | |
342 | its range to the last symbol. */ | |
343 | ||
344 | #ifndef YYLLOC_DEFAULT | |
ca96bc2d MA |
345 | # define YYLLOC_DEFAULT(Current, Rhs, N) \ |
346 | Current.last_line = Rhs[N].last_line; \ | |
347 | Current.last_column = Rhs[N].last_column; | |
3abcd459 AD |
348 | #endif |
349 | ||
3abcd459 | 350 | /* YYLEX -- calling `yylex' with the right arguments. */ |
553e2b22 AD |
351 | |
352 | #if YYPURE | |
5af1f549 | 353 | # if YYLSP_NEEDED |
b07b484a | 354 | # ifdef YYLEX_PARAM |
17da6427 | 355 | # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) |
b07b484a | 356 | # else |
17da6427 | 357 | # define YYLEX yylex (&yylval, &yylloc) |
b07b484a | 358 | # endif |
71da9eea | 359 | # else /* !YYLSP_NEEDED */ |
b07b484a | 360 | # ifdef YYLEX_PARAM |
17da6427 | 361 | # define YYLEX yylex (&yylval, YYLEX_PARAM) |
b07b484a | 362 | # else |
17da6427 | 363 | # define YYLEX yylex (&yylval) |
b07b484a | 364 | # endif |
71da9eea | 365 | # endif /* !YYLSP_NEEDED */ |
553e2b22 | 366 | #else /* !YYPURE */ |
17da6427 | 367 | # define YYLEX yylex () |
553e2b22 AD |
368 | #endif /* !YYPURE */ |
369 | ||
5a35a6cb | 370 | /* Enable debugging if requested. */ |
0d533154 | 371 | #if YYDEBUG |
7093d0f5 | 372 | # include <stdio.h> |
5a35a6cb AD |
373 | # define YYDPRINTF(Args) \ |
374 | do { \ | |
17da6427 | 375 | if (yydebug) \ |
5a35a6cb AD |
376 | fprintf Args; \ |
377 | } while (0) | |
378 | /* Nonzero means print parse trace. [The following comment makes no | |
379 | sense to me. Could someone clarify it? --akim] Since this is | |
380 | uninitialized, it does not stop multiple parsers from coexisting. | |
381 | */ | |
17da6427 | 382 | int yydebug; |
5a35a6cb AD |
383 | #else /* !YYDEBUG */ |
384 | # define YYDPRINTF(Args) | |
385 | #endif /* !YYDEBUG */ | |
386 | ||
387 | /* YYINITDEPTH -- initial size of the parser's stacks. */ | |
10fa2066 | 388 | #ifndef YYINITDEPTH |
a8289c62 | 389 | # define YYINITDEPTH %%initdepth |
10fa2066 RS |
390 | #endif |
391 | ||
5a35a6cb | 392 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
600f9b0c PE |
393 | if the built-in stack extension method is used). |
394 | ||
395 | Do not make this value too large; the results are undefined if | |
396 | SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) | |
397 | evaluated with infinite-precision integer arithmetic. */ | |
398 | ||
10fa2066 | 399 | #if YYMAXDEPTH == 0 |
b07b484a | 400 | # undef YYMAXDEPTH |
10fa2066 RS |
401 | #endif |
402 | ||
403 | #ifndef YYMAXDEPTH | |
a8289c62 | 404 | # define YYMAXDEPTH %%maxdepth |
10fa2066 | 405 | #endif |
a8289c62 | 406 | |
10fa2066 | 407 | \f |
a8289c62 | 408 | |
7093d0f5 AD |
409 | #if ! defined (yyoverflow) && ! defined (yymemcpy) |
410 | # if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ | |
411 | # define yymemcpy __builtin_memcpy | |
412 | # else /* not GNU C or C++ */ | |
10fa2066 RS |
413 | |
414 | /* This is the most reliable way to avoid incompatibilities | |
415 | in available built-in functions on various systems. */ | |
416 | static void | |
7093d0f5 AD |
417 | # if defined (__STDC__) || defined (__cplusplus) |
418 | yymemcpy (char *yyto, const char *yyfrom, YYSIZE_T yycount) | |
419 | # else | |
420 | yymemcpy (yyto, yyfrom, yycount) | |
421 | char *yyto; | |
422 | const char *yyfrom; | |
423 | YYSIZE_T yycount; | |
424 | # endif | |
10fa2066 | 425 | { |
7093d0f5 AD |
426 | register const char *yyf = yyfrom; |
427 | register char *yyt = yyto; | |
428 | register YYSIZE_T yyi = yycount; | |
10fa2066 | 429 | |
7093d0f5 AD |
430 | while (yyi-- != 0) |
431 | *yyt++ = *yyf++; | |
10fa2066 | 432 | } |
7093d0f5 | 433 | # endif |
bbb5bcc6 | 434 | #endif |
a8289c62 | 435 | |
7093d0f5 AD |
436 | #if YYERROR_VERBOSE |
437 | ||
438 | # ifndef yystrlen | |
439 | # if defined (__GLIBC__) && defined (_STRING_H) | |
440 | # define yystrlen strlen | |
441 | # else | |
442 | /* Return the length of YYSTR. */ | |
443 | static YYSIZE_T | |
444 | # if defined (__STDC__) || defined (__cplusplus) | |
445 | yystrlen (const char *yystr) | |
446 | # else | |
447 | yystrlen (yystr) | |
448 | const char *yystr; | |
449 | # endif | |
450 | { | |
451 | register const char *yys = yystr; | |
452 | ||
453 | while (*yys++ != '\0') | |
454 | continue; | |
455 | ||
456 | return yys - yystr - 1; | |
457 | } | |
458 | # endif | |
459 | # endif | |
460 | ||
461 | # ifndef yystpcpy | |
462 | # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) | |
463 | # define yystpcpy stpcpy | |
464 | # else | |
465 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in | |
466 | YYDEST. */ | |
467 | static char * | |
f11966ff PE |
468 | # if defined (__STDC__) || defined (__cplusplus) |
469 | yystpcpy (char *yydest, const char *yysrc) | |
470 | # else | |
7093d0f5 AD |
471 | yystpcpy (yydest, yysrc) |
472 | char *yydest; | |
473 | const char *yysrc; | |
7093d0f5 AD |
474 | # endif |
475 | { | |
476 | register char *yyd = yydest; | |
477 | register const char *yys = yysrc; | |
478 | ||
479 | while ((*yyd++ = *yys++) != '\0') | |
480 | continue; | |
481 | ||
482 | return yyd - 1; | |
483 | } | |
484 | # endif | |
485 | # endif | |
486 | ||
487 | #endif /* !YYERROR_VERBOSE */ | |
488 | ||
10fa2066 | 489 | \f |
a8289c62 | 490 | |
f508cb0a | 491 | #line %%line "%%skeleton" |
b658bf92 RS |
492 | |
493 | /* The user can define YYPARSE_PARAM as the name of an argument to be passed | |
494 | into yyparse. The argument should have type void *. | |
495 | It should actually point to an object. | |
496 | Grammar actions can access the variable by casting it | |
497 | to the proper pointer type. */ | |
498 | ||
499 | #ifdef YYPARSE_PARAM | |
b07b484a AD |
500 | # ifdef __cplusplus |
501 | # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM | |
502 | # define YYPARSE_PARAM_DECL | |
71da9eea | 503 | # else /* !__cplusplus */ |
b07b484a AD |
504 | # define YYPARSE_PARAM_ARG YYPARSE_PARAM |
505 | # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; | |
71da9eea AD |
506 | # endif /* !__cplusplus */ |
507 | #else /* !YYPARSE_PARAM */ | |
b07b484a AD |
508 | # define YYPARSE_PARAM_ARG |
509 | # define YYPARSE_PARAM_DECL | |
71da9eea | 510 | #endif /* !YYPARSE_PARAM */ |
b658bf92 | 511 | |
1b181651 PE |
512 | /* Prevent warning if -Wstrict-prototypes. */ |
513 | #ifdef __GNUC__ | |
b07b484a | 514 | # ifdef YYPARSE_PARAM |
17da6427 | 515 | int yyparse (void *); |
b07b484a | 516 | # else |
17da6427 | 517 | int yyparse (void); |
b07b484a | 518 | # endif |
1b181651 PE |
519 | #endif |
520 | ||
a35f64ea AD |
521 | /* YY_DECL_VARIABLES -- depending whether we use a pure parser, |
522 | variables are global, or local to YYPARSE. */ | |
523 | ||
7093d0f5 | 524 | #define YY_DECL_NON_LSP_VARIABLES \ |
a35f64ea | 525 | /* The lookahead symbol. */ \ |
17da6427 | 526 | int yychar; \ |
a35f64ea | 527 | \ |
e8cb70b9 | 528 | /* The semantic value of the lookahead symbol. */ \ |
17da6427 | 529 | YYSTYPE yylval; \ |
a35f64ea AD |
530 | \ |
531 | /* Number of parse errors so far. */ \ | |
17da6427 | 532 | int yynerrs; |
a35f64ea AD |
533 | |
534 | #if YYLSP_NEEDED | |
535 | # define YY_DECL_VARIABLES \ | |
7093d0f5 | 536 | YY_DECL_NON_LSP_VARIABLES \ |
a35f64ea AD |
537 | \ |
538 | /* Location data for the lookahead symbol. */ \ | |
539 | YYLTYPE yylloc; | |
540 | #else | |
541 | # define YY_DECL_VARIABLES \ | |
7093d0f5 | 542 | YY_DECL_NON_LSP_VARIABLES |
a35f64ea AD |
543 | #endif |
544 | ||
e8cb70b9 | 545 | /* If nonreentrant, generate the variables here. */ |
a35f64ea AD |
546 | |
547 | #if !YYPURE | |
548 | YY_DECL_VARIABLES | |
549 | #endif /* !YYPURE */ | |
550 | ||
10fa2066 | 551 | int |
17da6427 | 552 | yyparse (YYPARSE_PARAM_ARG) |
b658bf92 | 553 | YYPARSE_PARAM_DECL |
10fa2066 | 554 | { |
e8cb70b9 | 555 | /* If reentrant, generate the variables here. */ |
a35f64ea AD |
556 | #if YYPURE |
557 | YY_DECL_VARIABLES | |
558 | #endif /* !YYPURE */ | |
559 | ||
10fa2066 RS |
560 | register int yystate; |
561 | register int yyn; | |
600f9b0c | 562 | int yyresult; |
b07b484a AD |
563 | /* Number of tokens to shift before error messages enabled. */ |
564 | int yyerrstatus; | |
565 | /* Lookahead token as an internal (translated) token number. */ | |
566 | int yychar1 = 0; | |
10fa2066 | 567 | |
bb10be54 AD |
568 | /* Three stacks and their tools: |
569 | `yyss': related to states, | |
e9e4c321 | 570 | `yyvs': related to semantic values, |
bb10be54 AD |
571 | `yyls': related to locations. |
572 | ||
573 | Refer to the stacks thru separate pointers, to allow yyoverflow | |
574 | to reallocate them elsewhere. */ | |
575 | ||
e8cb70b9 | 576 | /* The state stack. */ |
b07b484a | 577 | short yyssa[YYINITDEPTH]; |
bb10be54 AD |
578 | short *yyss = yyssa; |
579 | register short *yyssp; | |
580 | ||
b07b484a AD |
581 | /* The semantic value stack. */ |
582 | YYSTYPE yyvsa[YYINITDEPTH]; | |
b07b484a | 583 | YYSTYPE *yyvs = yyvsa; |
bb10be54 | 584 | register YYSTYPE *yyvsp; |
10fa2066 | 585 | |
5af1f549 | 586 | #if YYLSP_NEEDED |
b07b484a AD |
587 | /* The location stack. */ |
588 | YYLTYPE yylsa[YYINITDEPTH]; | |
10fa2066 RS |
589 | YYLTYPE *yyls = yylsa; |
590 | YYLTYPE *yylsp; | |
bb10be54 | 591 | #endif |
10fa2066 | 592 | |
5af1f549 | 593 | #if YYLSP_NEEDED |
b07b484a | 594 | # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) |
10fa2066 | 595 | #else |
b07b484a | 596 | # define YYPOPSTACK (yyvsp--, yyssp--) |
10fa2066 RS |
597 | #endif |
598 | ||
7093d0f5 | 599 | YYSIZE_T yystacksize = YYINITDEPTH; |
10fa2066 | 600 | |
6666f98f AD |
601 | /* The variables used to return semantic value and location from the |
602 | action routines. */ | |
bb10be54 | 603 | YYSTYPE yyval; |
7093d0f5 | 604 | #if YYLSP_NEEDED |
6666f98f | 605 | YYLTYPE yyloc; |
7093d0f5 | 606 | #endif |
10fa2066 | 607 | |
6666f98f | 608 | /* When reducing, the number of symbols on the RHS of the reduced |
e8cb70b9 | 609 | rule. */ |
10fa2066 RS |
610 | int yylen; |
611 | ||
5a35a6cb | 612 | YYDPRINTF ((stderr, "Starting parse\n")); |
10fa2066 RS |
613 | |
614 | yystate = 0; | |
615 | yyerrstatus = 0; | |
17da6427 PB |
616 | yynerrs = 0; |
617 | yychar = YYEMPTY; /* Cause a token to be read. */ | |
10fa2066 RS |
618 | |
619 | /* Initialize stack pointers. | |
620 | Waste one element of value and location stack | |
621 | so that they stay on the same level as the state stack. | |
622 | The wasted elements are never initialized. */ | |
623 | ||
cbd89906 | 624 | yyssp = yyss; |
10fa2066 | 625 | yyvsp = yyvs; |
5af1f549 | 626 | #if YYLSP_NEEDED |
10fa2066 RS |
627 | yylsp = yyls; |
628 | #endif | |
cbd89906 | 629 | goto yysetstate; |
10fa2066 | 630 | |
71da9eea AD |
631 | /*------------------------------------------------------------. |
632 | | yynewstate -- Push a new state, which is found in yystate. | | |
633 | `------------------------------------------------------------*/ | |
342b8b6e | 634 | yynewstate: |
71da9eea AD |
635 | /* In all cases, when you get here, the value and location stacks |
636 | have just been pushed. so pushing a state here evens the stacks. | |
637 | */ | |
cbd89906 PE |
638 | yyssp++; |
639 | ||
342b8b6e | 640 | yysetstate: |
cbd89906 | 641 | *yyssp = yystate; |
10fa2066 RS |
642 | |
643 | if (yyssp >= yyss + yystacksize - 1) | |
644 | { | |
10fa2066 | 645 | /* Get the current used size of the three stacks, in elements. */ |
7093d0f5 | 646 | YYSIZE_T yysize = yyssp - yyss + 1; |
10fa2066 RS |
647 | |
648 | #ifdef yyoverflow | |
3d76b07d AD |
649 | { |
650 | /* Give user a chance to reallocate the stack. Use copies of | |
651 | these so that the &'s don't force the real ones into | |
652 | memory. */ | |
653 | YYSTYPE *yyvs1 = yyvs; | |
654 | short *yyss1 = yyss; | |
655 | ||
656 | /* Each stack pointer address is followed by the size of the | |
657 | data in use in that stack, in bytes. */ | |
5af1f549 | 658 | # if YYLSP_NEEDED |
3d76b07d AD |
659 | YYLTYPE *yyls1 = yyls; |
660 | /* This used to be a conditional around just the two extra args, | |
661 | but that might be undefined if yyoverflow is a macro. */ | |
662 | yyoverflow ("parser stack overflow", | |
7093d0f5 AD |
663 | &yyss1, yysize * sizeof (*yyssp), |
664 | &yyvs1, yysize * sizeof (*yyvsp), | |
665 | &yyls1, yysize * sizeof (*yylsp), | |
3d76b07d AD |
666 | &yystacksize); |
667 | yyls = yyls1; | |
b07b484a | 668 | # else |
3d76b07d | 669 | yyoverflow ("parser stack overflow", |
7093d0f5 AD |
670 | &yyss1, yysize * sizeof (*yyssp), |
671 | &yyvs1, yysize * sizeof (*yyvsp), | |
3d76b07d | 672 | &yystacksize); |
b07b484a | 673 | # endif |
3d76b07d AD |
674 | yyss = yyss1; |
675 | yyvs = yyvs1; | |
676 | } | |
10fa2066 RS |
677 | #else /* no yyoverflow */ |
678 | /* Extend the stack our own way. */ | |
679 | if (yystacksize >= YYMAXDEPTH) | |
600f9b0c | 680 | goto yyoverflowlab; |
10fa2066 RS |
681 | yystacksize *= 2; |
682 | if (yystacksize > YYMAXDEPTH) | |
683 | yystacksize = YYMAXDEPTH; | |
e9e4c321 | 684 | |
600f9b0c PE |
685 | { |
686 | short *yyss1 = yyss; | |
2729e106 PE |
687 | union yyalloc *yyptr = |
688 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); | |
600f9b0c PE |
689 | if (! yyptr) |
690 | goto yyoverflowlab; | |
691 | YYSTACK_RELOCATE (short, yyss); | |
692 | YYSTACK_RELOCATE (YYSTYPE, yyvs); | |
5af1f549 | 693 | # if YYLSP_NEEDED |
600f9b0c | 694 | YYSTACK_RELOCATE (YYLTYPE, yyls); |
b07b484a | 695 | # endif |
600f9b0c PE |
696 | # undef YYSTACK_RELOCATE |
697 | if (yyss1 != yyssa) | |
698 | YYSTACK_FREE (yyss1); | |
699 | } | |
10fa2066 RS |
700 | #endif /* no yyoverflow */ |
701 | ||
7093d0f5 AD |
702 | yyssp = yyss + yysize - 1; |
703 | yyvsp = yyvs + yysize - 1; | |
5af1f549 | 704 | #if YYLSP_NEEDED |
7093d0f5 | 705 | yylsp = yyls + yysize - 1; |
10fa2066 RS |
706 | #endif |
707 | ||
600f9b0c PE |
708 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
709 | (unsigned long int) yystacksize)); | |
10fa2066 RS |
710 | |
711 | if (yyssp >= yyss + yystacksize - 1) | |
712 | YYABORT; | |
713 | } | |
714 | ||
5a35a6cb | 715 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
10fa2066 RS |
716 | |
717 | goto yybackup; | |
71da9eea | 718 | |
71da9eea AD |
719 | /*-----------. |
720 | | yybackup. | | |
721 | `-----------*/ | |
722 | yybackup: | |
10fa2066 RS |
723 | |
724 | /* Do appropriate processing given the current state. */ | |
725 | /* Read a lookahead token if we need one and don't already have one. */ | |
726 | /* yyresume: */ | |
727 | ||
728 | /* First try to decide what to do without reference to lookahead token. */ | |
729 | ||
730 | yyn = yypact[yystate]; | |
731 | if (yyn == YYFLAG) | |
732 | goto yydefault; | |
733 | ||
734 | /* Not known => get a lookahead token if don't already have one. */ | |
735 | ||
736 | /* yychar is either YYEMPTY or YYEOF | |
737 | or a valid token in external form. */ | |
738 | ||
17da6427 | 739 | if (yychar == YYEMPTY) |
10fa2066 | 740 | { |
5a35a6cb | 741 | YYDPRINTF ((stderr, "Reading a token: ")); |
17da6427 | 742 | yychar = YYLEX; |
10fa2066 RS |
743 | } |
744 | ||
e8cb70b9 | 745 | /* Convert token to internal form (in yychar1) for indexing tables with. */ |
10fa2066 | 746 | |
17da6427 | 747 | if (yychar <= 0) /* This means end of input. */ |
10fa2066 RS |
748 | { |
749 | yychar1 = 0; | |
17da6427 | 750 | yychar = YYEOF; /* Don't call YYLEX any more. */ |
10fa2066 | 751 | |
5a35a6cb | 752 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
10fa2066 RS |
753 | } |
754 | else | |
755 | { | |
17da6427 | 756 | yychar1 = YYTRANSLATE (yychar); |
10fa2066 | 757 | |
0d533154 AD |
758 | #if YYDEBUG |
759 | /* We have to keep this `#if YYDEBUG', since we use variables | |
760 | which are defined only if `YYDEBUG' is set. */ | |
17da6427 | 761 | if (yydebug) |
10fa2066 | 762 | { |
17da6427 | 763 | fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); |
0d533154 AD |
764 | /* Give the individual parser a way to print the precise |
765 | meaning of a token, for further debugging info. */ | |
b07b484a | 766 | # ifdef YYPRINT |
17da6427 | 767 | YYPRINT (stderr, yychar, yylval); |
b07b484a | 768 | # endif |
10fa2066 RS |
769 | fprintf (stderr, ")\n"); |
770 | } | |
0d533154 | 771 | #endif |
10fa2066 RS |
772 | } |
773 | ||
774 | yyn += yychar1; | |
775 | if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) | |
776 | goto yydefault; | |
777 | ||
778 | yyn = yytable[yyn]; | |
779 | ||
780 | /* yyn is what to do for this token type in this state. | |
781 | Negative => reduce, -yyn is rule number. | |
782 | Positive => shift, yyn is new state. | |
783 | New state is final state => don't bother to shift, | |
784 | just return success. | |
785 | 0, or most negative number => error. */ | |
786 | ||
787 | if (yyn < 0) | |
788 | { | |
789 | if (yyn == YYFLAG) | |
790 | goto yyerrlab; | |
791 | yyn = -yyn; | |
792 | goto yyreduce; | |
793 | } | |
794 | else if (yyn == 0) | |
795 | goto yyerrlab; | |
796 | ||
797 | if (yyn == YYFINAL) | |
798 | YYACCEPT; | |
799 | ||
800 | /* Shift the lookahead token. */ | |
17da6427 | 801 | YYDPRINTF ((stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1])); |
10fa2066 RS |
802 | |
803 | /* Discard the token being shifted unless it is eof. */ | |
17da6427 PB |
804 | if (yychar != YYEOF) |
805 | yychar = YYEMPTY; | |
10fa2066 | 806 | |
17da6427 | 807 | *++yyvsp = yylval; |
5af1f549 | 808 | #if YYLSP_NEEDED |
10fa2066 RS |
809 | *++yylsp = yylloc; |
810 | #endif | |
811 | ||
71da9eea AD |
812 | /* Count tokens shifted since error; after three, turn off error |
813 | status. */ | |
814 | if (yyerrstatus) | |
815 | yyerrstatus--; | |
10fa2066 RS |
816 | |
817 | yystate = yyn; | |
818 | goto yynewstate; | |
819 | ||
10fa2066 | 820 | |
71da9eea AD |
821 | /*-----------------------------------------------------------. |
822 | | yydefault -- do the default action for the current state. | | |
823 | `-----------------------------------------------------------*/ | |
824 | yydefault: | |
10fa2066 RS |
825 | yyn = yydefact[yystate]; |
826 | if (yyn == 0) | |
827 | goto yyerrlab; | |
71da9eea | 828 | goto yyreduce; |
10fa2066 | 829 | |
71da9eea AD |
830 | |
831 | /*-----------------------------. | |
832 | | yyreduce -- Do a reduction. | | |
833 | `-----------------------------*/ | |
10fa2066 | 834 | yyreduce: |
71da9eea | 835 | /* yyn is the number of a rule to reduce with. */ |
10fa2066 | 836 | yylen = yyr2[yyn]; |
da9abf43 AD |
837 | |
838 | /* If YYLEN is nonzero, implement the default value of the action: | |
573c1d9f | 839 | `$$ = $1'. |
da9abf43 AD |
840 | |
841 | Otherwise, the following line sets YYVAL to the semantic value of | |
842 | the lookahead token. This behavior is undocumented and Bison | |
843 | users should not rely upon it. Assigning to YYVAL | |
844 | unconditionally makes the parser a bit smaller, and it avoids a | |
845 | GCC warning that YYVAL may be used uninitialized. */ | |
846 | yyval = yyvsp[1-yylen]; | |
3abcd459 | 847 | |
5af1f549 | 848 | #if YYLSP_NEEDED |
3abcd459 AD |
849 | /* Similarly for the default location. Let the user run additional |
850 | commands if for instance locations are ranges. */ | |
851 | yyloc = yylsp[1-yylen]; | |
ca96bc2d | 852 | YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); |
6666f98f | 853 | #endif |
10fa2066 | 854 | |
0de741ca AD |
855 | #if YYDEBUG |
856 | /* We have to keep this `#if YYDEBUG', since we use variables which | |
857 | are defined only if `YYDEBUG' is set. */ | |
17da6427 | 858 | if (yydebug) |
10fa2066 | 859 | { |
7093d0f5 | 860 | int yyi; |
10fa2066 RS |
861 | |
862 | fprintf (stderr, "Reducing via rule %d (line %d), ", | |
863 | yyn, yyrline[yyn]); | |
864 | ||
865 | /* Print the symbols being reduced, and their result. */ | |
7093d0f5 AD |
866 | for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) |
867 | fprintf (stderr, "%s ", yytname[yyrhs[yyi]]); | |
10fa2066 RS |
868 | fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); |
869 | } | |
870 | #endif | |
a8289c62 RA |
871 | switch (yyn) |
872 | { | |
1c8c2190 | 873 | %%action |
a8289c62 | 874 | } |
f508cb0a | 875 | #line %%line "%%skeleton" |
10fa2066 RS |
876 | \f |
877 | yyvsp -= yylen; | |
878 | yyssp -= yylen; | |
5af1f549 | 879 | #if YYLSP_NEEDED |
10fa2066 RS |
880 | yylsp -= yylen; |
881 | #endif | |
882 | ||
5a35a6cb | 883 | #if YYDEBUG |
17da6427 | 884 | if (yydebug) |
10fa2066 | 885 | { |
7093d0f5 | 886 | short *yyssp1 = yyss - 1; |
10fa2066 | 887 | fprintf (stderr, "state stack now"); |
7093d0f5 AD |
888 | while (yyssp1 != yyssp) |
889 | fprintf (stderr, " %d", *++yyssp1); | |
10fa2066 RS |
890 | fprintf (stderr, "\n"); |
891 | } | |
5a35a6cb | 892 | #endif |
10fa2066 RS |
893 | |
894 | *++yyvsp = yyval; | |
5af1f549 | 895 | #if YYLSP_NEEDED |
6666f98f | 896 | *++yylsp = yyloc; |
10fa2066 RS |
897 | #endif |
898 | ||
41aca2e0 AD |
899 | /* Now `shift' the result of the reduction. Determine what state |
900 | that goes to, based on the state we popped back to and the rule | |
901 | number reduced by. */ | |
10fa2066 RS |
902 | |
903 | yyn = yyr1[yyn]; | |
904 | ||
905 | yystate = yypgoto[yyn - YYNTBASE] + *yyssp; | |
906 | if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) | |
907 | yystate = yytable[yystate]; | |
908 | else | |
909 | yystate = yydefgoto[yyn - YYNTBASE]; | |
910 | ||
911 | goto yynewstate; | |
912 | ||
10fa2066 | 913 | |
71da9eea AD |
914 | /*------------------------------------. |
915 | | yyerrlab -- here on detecting error | | |
916 | `------------------------------------*/ | |
917 | yyerrlab: | |
918 | /* If not already recovering from an error, report this error. */ | |
919 | if (!yyerrstatus) | |
10fa2066 | 920 | { |
17da6427 | 921 | ++yynerrs; |
10fa2066 | 922 | |
8850be4b | 923 | #if YYERROR_VERBOSE |
10fa2066 RS |
924 | yyn = yypact[yystate]; |
925 | ||
926 | if (yyn > YYFLAG && yyn < YYLAST) | |
927 | { | |
7093d0f5 AD |
928 | YYSIZE_T yysize = 0; |
929 | char *yymsg; | |
930 | int yyx, yycount; | |
10fa2066 | 931 | |
7093d0f5 AD |
932 | yycount = 0; |
933 | /* Start YYX at -YYN if negative to avoid negative indexes in | |
f0473484 | 934 | YYCHECK. */ |
7093d0f5 AD |
935 | for (yyx = yyn < 0 ? -yyn : 0; |
936 | yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) | |
937 | if (yycheck[yyx + yyn] == yyx) | |
938 | yysize += yystrlen (yytname[yyx]) + 15, yycount++; | |
939 | yysize += yystrlen ("parse error, unexpected ") + 1; | |
940 | yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); | |
941 | yymsg = (char *) YYSTACK_ALLOC (yysize); | |
942 | if (yymsg != 0) | |
10fa2066 | 943 | { |
7093d0f5 AD |
944 | char *yyp = yystpcpy (yymsg, "parse error, unexpected "); |
945 | yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); | |
10fa2066 | 946 | |
7093d0f5 | 947 | if (yycount < 5) |
10fa2066 | 948 | { |
7093d0f5 AD |
949 | yycount = 0; |
950 | for (yyx = yyn < 0 ? -yyn : 0; | |
951 | yyx < (int) (sizeof (yytname) / sizeof (char *)); | |
952 | yyx++) | |
953 | if (yycheck[yyx + yyn] == yyx) | |
10fa2066 | 954 | { |
7093d0f5 AD |
955 | const char *yyq = ! yycount ? ", expecting " : " or "; |
956 | yyp = yystpcpy (yyp, yyq); | |
957 | yyp = yystpcpy (yyp, yytname[yyx]); | |
958 | yycount++; | |
10fa2066 RS |
959 | } |
960 | } | |
7093d0f5 AD |
961 | yyerror (yymsg); |
962 | YYSTACK_FREE (yymsg); | |
963 | } | |
964 | else | |
965 | yyerror ("parse error; also virtual memory exhausted"); | |
a8289c62 | 966 | } |
10fa2066 | 967 | else |
f11966ff | 968 | #endif /* defined (YYERROR_VERBOSE) */ |
17da6427 | 969 | yyerror ("parse error"); |
10fa2066 | 970 | } |
10fa2066 | 971 | goto yyerrlab1; |
10fa2066 | 972 | |
71da9eea | 973 | |
e8cb70b9 PB |
974 | /*----------------------------------------------------. |
975 | | yyerrlab1 -- error raised explicitly by an action. | | |
976 | `----------------------------------------------------*/ | |
71da9eea | 977 | yyerrlab1: |
10fa2066 RS |
978 | if (yyerrstatus == 3) |
979 | { | |
71da9eea AD |
980 | /* If just tried and failed to reuse lookahead token after an |
981 | error, discard it. */ | |
10fa2066 | 982 | |
e8cb70b9 | 983 | /* Return failure if at end of input. */ |
17da6427 | 984 | if (yychar == YYEOF) |
10fa2066 | 985 | YYABORT; |
5a35a6cb | 986 | YYDPRINTF ((stderr, "Discarding token %d (%s).\n", |
17da6427 PB |
987 | yychar, yytname[yychar1])); |
988 | yychar = YYEMPTY; | |
10fa2066 RS |
989 | } |
990 | ||
71da9eea AD |
991 | /* Else will try to reuse lookahead token after shifting the error |
992 | token. */ | |
10fa2066 | 993 | |
e8cb70b9 | 994 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
10fa2066 RS |
995 | |
996 | goto yyerrhandle; | |
997 | ||
10fa2066 | 998 | |
71da9eea AD |
999 | /*-------------------------------------------------------------------. |
1000 | | yyerrdefault -- current state does not do anything special for the | | |
1001 | | error token. | | |
1002 | `-------------------------------------------------------------------*/ | |
1003 | yyerrdefault: | |
10fa2066 RS |
1004 | #if 0 |
1005 | /* This is wrong; only states that explicitly want error tokens | |
1006 | should shift them. */ | |
71da9eea AD |
1007 | |
1008 | /* If its default is to accept any token, ok. Otherwise pop it. */ | |
1009 | yyn = yydefact[yystate]; | |
1010 | if (yyn) | |
1011 | goto yydefault; | |
10fa2066 RS |
1012 | #endif |
1013 | ||
10fa2066 | 1014 | |
71da9eea AD |
1015 | /*---------------------------------------------------------------. |
1016 | | yyerrpop -- pop the current state because it cannot handle the | | |
e8cb70b9 | 1017 | | error token. | |
71da9eea AD |
1018 | `---------------------------------------------------------------*/ |
1019 | yyerrpop: | |
1020 | if (yyssp == yyss) | |
1021 | YYABORT; | |
10fa2066 RS |
1022 | yyvsp--; |
1023 | yystate = *--yyssp; | |
5af1f549 | 1024 | #if YYLSP_NEEDED |
10fa2066 RS |
1025 | yylsp--; |
1026 | #endif | |
1027 | ||
5a35a6cb | 1028 | #if YYDEBUG |
17da6427 | 1029 | if (yydebug) |
10fa2066 | 1030 | { |
7093d0f5 | 1031 | short *yyssp1 = yyss - 1; |
10fa2066 | 1032 | fprintf (stderr, "Error: state stack now"); |
7093d0f5 AD |
1033 | while (yyssp1 != yyssp) |
1034 | fprintf (stderr, " %d", *++yyssp1); | |
10fa2066 RS |
1035 | fprintf (stderr, "\n"); |
1036 | } | |
5a35a6cb | 1037 | #endif |
10fa2066 | 1038 | |
71da9eea AD |
1039 | /*--------------. |
1040 | | yyerrhandle. | | |
1041 | `--------------*/ | |
1042 | yyerrhandle: | |
10fa2066 RS |
1043 | yyn = yypact[yystate]; |
1044 | if (yyn == YYFLAG) | |
1045 | goto yyerrdefault; | |
1046 | ||
1047 | yyn += YYTERROR; | |
1048 | if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) | |
1049 | goto yyerrdefault; | |
1050 | ||
1051 | yyn = yytable[yyn]; | |
1052 | if (yyn < 0) | |
1053 | { | |
1054 | if (yyn == YYFLAG) | |
1055 | goto yyerrpop; | |
1056 | yyn = -yyn; | |
1057 | goto yyreduce; | |
1058 | } | |
1059 | else if (yyn == 0) | |
1060 | goto yyerrpop; | |
1061 | ||
1062 | if (yyn == YYFINAL) | |
1063 | YYACCEPT; | |
1064 | ||
5a35a6cb | 1065 | YYDPRINTF ((stderr, "Shifting error token, ")); |
10fa2066 | 1066 | |
17da6427 | 1067 | *++yyvsp = yylval; |
5af1f549 | 1068 | #if YYLSP_NEEDED |
10fa2066 RS |
1069 | *++yylsp = yylloc; |
1070 | #endif | |
1071 | ||
1072 | yystate = yyn; | |
1073 | goto yynewstate; | |
70ddf897 | 1074 | |
71da9eea AD |
1075 | |
1076 | /*-------------------------------------. | |
1077 | | yyacceptlab -- YYACCEPT comes here. | | |
1078 | `-------------------------------------*/ | |
1079 | yyacceptlab: | |
600f9b0c PE |
1080 | yyresult = 0; |
1081 | goto yyreturn; | |
71da9eea AD |
1082 | |
1083 | /*-----------------------------------. | |
1084 | | yyabortlab -- YYABORT comes here. | | |
1085 | `-----------------------------------*/ | |
1086 | yyabortlab: | |
600f9b0c PE |
1087 | yyresult = 1; |
1088 | goto yyreturn; | |
1089 | ||
1090 | /*---------------------------------------------. | |
1091 | | yyoverflowab -- parser overflow comes here. | | |
1092 | `---------------------------------------------*/ | |
1093 | yyoverflowlab: | |
1094 | yyerror ("parser stack overflow"); | |
1095 | yyresult = 2; | |
1096 | /* Fall through. */ | |
1097 | ||
1098 | yyreturn: | |
1099 | #ifndef yyoverflow | |
1100 | if (yyss != yyssa) | |
1101 | YYSTACK_FREE (yyss); | |
70ddf897 | 1102 | #endif |
600f9b0c | 1103 | return yyresult; |
10fa2066 | 1104 | } |
ff48177d | 1105 | |
5b5d1929 | 1106 | #line %%input-line "%%filename" |
63c2d5de | 1107 | %%epilogue |