]>
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 | { | |
144 | short yys; | |
145 | YYSTYPE yyv; | |
7093d0f5 | 146 | # if YYLSP_NEEDED |
600f9b0c | 147 | YYLTYPE yyl; |
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; \ | |
175 | yymemcpy (yyptr, (char *) (Stack), \ | |
176 | yysize * (YYSIZE_T) sizeof (Type)); \ | |
177 | (Stack) = (Type *) yyptr; \ | |
178 | yynewbytes = yystacksize * sizeof (Type) + YYSTACK_GAP_MAX; \ | |
179 | yynewbytes -= yynewbytes % sizeof (union yyalloc); \ | |
180 | yyptr += yynewbytes; \ | |
181 | } \ | |
182 | while (0) | |
183 | ||
184 | #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ | |
8850be4b | 185 | |
e8cb70b9 | 186 | /* Tokens. */ |
a8289c62 RA |
187 | %%tokendef |
188 | ||
189 | #define YYFINAL %%final | |
190 | #define YYFLAG %%flag | |
191 | #define YYNTBASE %%ntbase | |
192 | #define YYLAST %%last | |
193 | ||
194 | #define YYNTOKENS %%ntokens | |
195 | #define YYNNTS %%nnts | |
196 | #define YYNRULES %%nrules | |
197 | #define YYNSTATES %%nstates | |
198 | #define YYMAXUTOK %%maxtok | |
199 | ||
200 | /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ | |
201 | #define YYTRANSLATE(x) ((unsigned)(x) <= %%maxtok ? yytranslate[x] : %%nsym) | |
202 | ||
203 | /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ | |
204 | static const char yytranslate[] = | |
205 | { | |
206 | %%translate | |
207 | }; | |
208 | ||
209 | #if YYDEBUG | |
210 | static const short yyprhs[] = | |
211 | { | |
212 | %%prhs | |
213 | }; | |
214 | ||
215 | static const short yyrhs[] = | |
216 | { | |
217 | %%rhs | |
218 | }; | |
219 | ||
220 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ | |
221 | static const short yyrline[] = | |
222 | { | |
223 | %%rline | |
224 | }; | |
225 | #endif | |
226 | ||
8850be4b | 227 | #if YYDEBUG || YYERROR_VERBOSE |
e8cb70b9 PB |
228 | /* YYTNME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ |
229 | static const char *const yytname[] = | |
a8289c62 RA |
230 | { |
231 | %%tname | |
232 | }; | |
233 | #endif | |
234 | ||
235 | /* YYTOKNUM[YYN] -- Index in YYTNAME corresponding to YYLEX. */ | |
236 | static const short yytoknum[] = | |
237 | { | |
238 | %%toknum | |
239 | }; | |
240 | ||
241 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ | |
242 | static const short yyr1[] = | |
243 | { | |
244 | %%r1 | |
245 | }; | |
246 | ||
247 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ | |
248 | static const short yyr2[] = | |
249 | { | |
250 | %%r2 | |
251 | }; | |
252 | ||
253 | /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE | |
254 | doesn't specify something else to do. Zero means the default is an | |
255 | error. */ | |
256 | static const short yydefact[] = | |
257 | { | |
258 | %%defact | |
259 | }; | |
260 | ||
261 | static const short yydefgoto[] = | |
262 | { | |
263 | %%defgoto | |
264 | }; | |
265 | ||
266 | static const short yypact[] = | |
267 | { | |
268 | %%pact | |
269 | }; | |
270 | ||
271 | static const short yypgoto[] = | |
272 | { | |
273 | %%pgoto | |
274 | }; | |
275 | ||
276 | static const short yytable[] = | |
277 | { | |
278 | %%table | |
279 | }; | |
280 | ||
281 | static const short yycheck[] = | |
282 | { | |
283 | %%check | |
284 | }; | |
285 | ||
7093d0f5 AD |
286 | |
287 | #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) | |
288 | # define YYSIZE_T __SIZE_TYPE__ | |
289 | #endif | |
290 | #if ! defined (YYSIZE_T) && defined (size_t) | |
291 | # define YYSIZE_T size_t | |
292 | #endif | |
293 | #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus)) | |
294 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ | |
295 | # define YYSIZE_T size_t | |
296 | #endif | |
297 | #if ! defined (YYSIZE_T) | |
298 | # define YYSIZE_T unsigned int | |
299 | #endif | |
300 | ||
10fa2066 | 301 | #define yyerrok (yyerrstatus = 0) |
17da6427 | 302 | #define yyclearin (yychar = YYEMPTY) |
10fa2066 RS |
303 | #define YYEMPTY -2 |
304 | #define YYEOF 0 | |
a8289c62 | 305 | |
70ddf897 | 306 | #define YYACCEPT goto yyacceptlab |
a8289c62 | 307 | #define YYABORT goto yyabortlab |
10fa2066 | 308 | #define YYERROR goto yyerrlab1 |
a8289c62 | 309 | |
71da9eea AD |
310 | /* Like YYERROR except do call yyerror. This remains here temporarily |
311 | to ease the transition to the new meaning of YYERROR, for GCC. | |
10fa2066 | 312 | Once GCC version 2 has supplanted version 1, this can go. */ |
a8289c62 | 313 | |
10fa2066 | 314 | #define YYFAIL goto yyerrlab |
a8289c62 | 315 | |
10fa2066 | 316 | #define YYRECOVERING() (!!yyerrstatus) |
a8289c62 | 317 | |
69b4e0c5 | 318 | #define YYBACKUP(Token, Value) \ |
10fa2066 | 319 | do \ |
17da6427 | 320 | if (yychar == YYEMPTY && yylen == 1) \ |
71da9eea | 321 | { \ |
17da6427 PB |
322 | yychar = (Token); \ |
323 | yylval = (Value); \ | |
324 | yychar1 = YYTRANSLATE (yychar); \ | |
10fa2066 RS |
325 | YYPOPSTACK; \ |
326 | goto yybackup; \ | |
327 | } \ | |
328 | else \ | |
71da9eea | 329 | { \ |
17da6427 | 330 | yyerror ("syntax error: cannot back up"); \ |
71da9eea AD |
331 | YYERROR; \ |
332 | } \ | |
10fa2066 RS |
333 | while (0) |
334 | ||
335 | #define YYTERROR 1 | |
336 | #define YYERRCODE 256 | |
337 | ||
3abcd459 AD |
338 | /* YYLLOC_DEFAULT -- Compute the default location (before the actions |
339 | are run). | |
340 | ||
341 | When YYLLOC_DEFAULT is run, CURRENT is set the location of the | |
342 | first token. By default, to implement support for ranges, extend | |
343 | its range to the last symbol. */ | |
344 | ||
345 | #ifndef YYLLOC_DEFAULT | |
ca96bc2d MA |
346 | # define YYLLOC_DEFAULT(Current, Rhs, N) \ |
347 | Current.last_line = Rhs[N].last_line; \ | |
348 | Current.last_column = Rhs[N].last_column; | |
3abcd459 AD |
349 | #endif |
350 | ||
3abcd459 | 351 | /* YYLEX -- calling `yylex' with the right arguments. */ |
553e2b22 AD |
352 | |
353 | #if YYPURE | |
5af1f549 | 354 | # if YYLSP_NEEDED |
b07b484a | 355 | # ifdef YYLEX_PARAM |
17da6427 | 356 | # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) |
b07b484a | 357 | # else |
17da6427 | 358 | # define YYLEX yylex (&yylval, &yylloc) |
b07b484a | 359 | # endif |
71da9eea | 360 | # else /* !YYLSP_NEEDED */ |
b07b484a | 361 | # ifdef YYLEX_PARAM |
17da6427 | 362 | # define YYLEX yylex (&yylval, YYLEX_PARAM) |
b07b484a | 363 | # else |
17da6427 | 364 | # define YYLEX yylex (&yylval) |
b07b484a | 365 | # endif |
71da9eea | 366 | # endif /* !YYLSP_NEEDED */ |
553e2b22 | 367 | #else /* !YYPURE */ |
17da6427 | 368 | # define YYLEX yylex () |
553e2b22 AD |
369 | #endif /* !YYPURE */ |
370 | ||
5a35a6cb | 371 | /* Enable debugging if requested. */ |
0d533154 | 372 | #if YYDEBUG |
7093d0f5 | 373 | # include <stdio.h> |
5a35a6cb AD |
374 | # define YYDPRINTF(Args) \ |
375 | do { \ | |
17da6427 | 376 | if (yydebug) \ |
5a35a6cb AD |
377 | fprintf Args; \ |
378 | } while (0) | |
379 | /* Nonzero means print parse trace. [The following comment makes no | |
380 | sense to me. Could someone clarify it? --akim] Since this is | |
381 | uninitialized, it does not stop multiple parsers from coexisting. | |
382 | */ | |
17da6427 | 383 | int yydebug; |
5a35a6cb AD |
384 | #else /* !YYDEBUG */ |
385 | # define YYDPRINTF(Args) | |
386 | #endif /* !YYDEBUG */ | |
387 | ||
388 | /* YYINITDEPTH -- initial size of the parser's stacks. */ | |
10fa2066 | 389 | #ifndef YYINITDEPTH |
a8289c62 | 390 | # define YYINITDEPTH %%initdepth |
10fa2066 RS |
391 | #endif |
392 | ||
5a35a6cb | 393 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
600f9b0c PE |
394 | if the built-in stack extension method is used). |
395 | ||
396 | Do not make this value too large; the results are undefined if | |
397 | SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) | |
398 | evaluated with infinite-precision integer arithmetic. */ | |
399 | ||
10fa2066 | 400 | #if YYMAXDEPTH == 0 |
b07b484a | 401 | # undef YYMAXDEPTH |
10fa2066 RS |
402 | #endif |
403 | ||
404 | #ifndef YYMAXDEPTH | |
a8289c62 | 405 | # define YYMAXDEPTH %%maxdepth |
10fa2066 | 406 | #endif |
a8289c62 | 407 | |
10fa2066 | 408 | \f |
a8289c62 | 409 | |
7093d0f5 AD |
410 | #if ! defined (yyoverflow) && ! defined (yymemcpy) |
411 | # if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ | |
412 | # define yymemcpy __builtin_memcpy | |
413 | # else /* not GNU C or C++ */ | |
10fa2066 RS |
414 | |
415 | /* This is the most reliable way to avoid incompatibilities | |
416 | in available built-in functions on various systems. */ | |
417 | static void | |
7093d0f5 AD |
418 | # if defined (__STDC__) || defined (__cplusplus) |
419 | yymemcpy (char *yyto, const char *yyfrom, YYSIZE_T yycount) | |
420 | # else | |
421 | yymemcpy (yyto, yyfrom, yycount) | |
422 | char *yyto; | |
423 | const char *yyfrom; | |
424 | YYSIZE_T yycount; | |
425 | # endif | |
10fa2066 | 426 | { |
7093d0f5 AD |
427 | register const char *yyf = yyfrom; |
428 | register char *yyt = yyto; | |
429 | register YYSIZE_T yyi = yycount; | |
10fa2066 | 430 | |
7093d0f5 AD |
431 | while (yyi-- != 0) |
432 | *yyt++ = *yyf++; | |
10fa2066 | 433 | } |
7093d0f5 | 434 | # endif |
bbb5bcc6 | 435 | #endif |
a8289c62 | 436 | |
7093d0f5 AD |
437 | #if YYERROR_VERBOSE |
438 | ||
439 | # ifndef yystrlen | |
440 | # if defined (__GLIBC__) && defined (_STRING_H) | |
441 | # define yystrlen strlen | |
442 | # else | |
443 | /* Return the length of YYSTR. */ | |
444 | static YYSIZE_T | |
445 | # if defined (__STDC__) || defined (__cplusplus) | |
446 | yystrlen (const char *yystr) | |
447 | # else | |
448 | yystrlen (yystr) | |
449 | const char *yystr; | |
450 | # endif | |
451 | { | |
452 | register const char *yys = yystr; | |
453 | ||
454 | while (*yys++ != '\0') | |
455 | continue; | |
456 | ||
457 | return yys - yystr - 1; | |
458 | } | |
459 | # endif | |
460 | # endif | |
461 | ||
462 | # ifndef yystpcpy | |
463 | # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) | |
464 | # define yystpcpy stpcpy | |
465 | # else | |
466 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in | |
467 | YYDEST. */ | |
468 | static char * | |
469 | # ifndef __cplusplus | |
470 | yystpcpy (yydest, yysrc) | |
471 | char *yydest; | |
472 | const char *yysrc; | |
473 | # else | |
474 | yystpcpy (char *yydest, const char *yysrc) | |
475 | # endif | |
476 | { | |
477 | register char *yyd = yydest; | |
478 | register const char *yys = yysrc; | |
479 | ||
480 | while ((*yyd++ = *yys++) != '\0') | |
481 | continue; | |
482 | ||
483 | return yyd - 1; | |
484 | } | |
485 | # endif | |
486 | # endif | |
487 | ||
488 | #endif /* !YYERROR_VERBOSE */ | |
489 | ||
10fa2066 | 490 | \f |
a8289c62 | 491 | |
f508cb0a | 492 | #line %%line "%%skeleton" |
b658bf92 RS |
493 | |
494 | /* The user can define YYPARSE_PARAM as the name of an argument to be passed | |
495 | into yyparse. The argument should have type void *. | |
496 | It should actually point to an object. | |
497 | Grammar actions can access the variable by casting it | |
498 | to the proper pointer type. */ | |
499 | ||
500 | #ifdef YYPARSE_PARAM | |
b07b484a AD |
501 | # ifdef __cplusplus |
502 | # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM | |
503 | # define YYPARSE_PARAM_DECL | |
71da9eea | 504 | # else /* !__cplusplus */ |
b07b484a AD |
505 | # define YYPARSE_PARAM_ARG YYPARSE_PARAM |
506 | # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; | |
71da9eea AD |
507 | # endif /* !__cplusplus */ |
508 | #else /* !YYPARSE_PARAM */ | |
b07b484a AD |
509 | # define YYPARSE_PARAM_ARG |
510 | # define YYPARSE_PARAM_DECL | |
71da9eea | 511 | #endif /* !YYPARSE_PARAM */ |
b658bf92 | 512 | |
1b181651 PE |
513 | /* Prevent warning if -Wstrict-prototypes. */ |
514 | #ifdef __GNUC__ | |
b07b484a | 515 | # ifdef YYPARSE_PARAM |
17da6427 | 516 | int yyparse (void *); |
b07b484a | 517 | # else |
17da6427 | 518 | int yyparse (void); |
b07b484a | 519 | # endif |
1b181651 PE |
520 | #endif |
521 | ||
a35f64ea AD |
522 | /* YY_DECL_VARIABLES -- depending whether we use a pure parser, |
523 | variables are global, or local to YYPARSE. */ | |
524 | ||
7093d0f5 | 525 | #define YY_DECL_NON_LSP_VARIABLES \ |
a35f64ea | 526 | /* The lookahead symbol. */ \ |
17da6427 | 527 | int yychar; \ |
a35f64ea | 528 | \ |
e8cb70b9 | 529 | /* The semantic value of the lookahead symbol. */ \ |
17da6427 | 530 | YYSTYPE yylval; \ |
a35f64ea AD |
531 | \ |
532 | /* Number of parse errors so far. */ \ | |
17da6427 | 533 | int yynerrs; |
a35f64ea AD |
534 | |
535 | #if YYLSP_NEEDED | |
536 | # define YY_DECL_VARIABLES \ | |
7093d0f5 | 537 | YY_DECL_NON_LSP_VARIABLES \ |
a35f64ea AD |
538 | \ |
539 | /* Location data for the lookahead symbol. */ \ | |
540 | YYLTYPE yylloc; | |
541 | #else | |
542 | # define YY_DECL_VARIABLES \ | |
7093d0f5 | 543 | YY_DECL_NON_LSP_VARIABLES |
a35f64ea AD |
544 | #endif |
545 | ||
e8cb70b9 | 546 | /* If nonreentrant, generate the variables here. */ |
a35f64ea AD |
547 | |
548 | #if !YYPURE | |
549 | YY_DECL_VARIABLES | |
550 | #endif /* !YYPURE */ | |
551 | ||
10fa2066 | 552 | int |
17da6427 | 553 | yyparse (YYPARSE_PARAM_ARG) |
b658bf92 | 554 | YYPARSE_PARAM_DECL |
10fa2066 | 555 | { |
e8cb70b9 | 556 | /* If reentrant, generate the variables here. */ |
a35f64ea AD |
557 | #if YYPURE |
558 | YY_DECL_VARIABLES | |
559 | #endif /* !YYPURE */ | |
560 | ||
10fa2066 RS |
561 | register int yystate; |
562 | register int yyn; | |
600f9b0c | 563 | int yyresult; |
b07b484a AD |
564 | /* Number of tokens to shift before error messages enabled. */ |
565 | int yyerrstatus; | |
566 | /* Lookahead token as an internal (translated) token number. */ | |
567 | int yychar1 = 0; | |
10fa2066 | 568 | |
bb10be54 AD |
569 | /* Three stacks and their tools: |
570 | `yyss': related to states, | |
e9e4c321 | 571 | `yyvs': related to semantic values, |
bb10be54 AD |
572 | `yyls': related to locations. |
573 | ||
574 | Refer to the stacks thru separate pointers, to allow yyoverflow | |
575 | to reallocate them elsewhere. */ | |
576 | ||
e8cb70b9 | 577 | /* The state stack. */ |
b07b484a | 578 | short yyssa[YYINITDEPTH]; |
bb10be54 AD |
579 | short *yyss = yyssa; |
580 | register short *yyssp; | |
581 | ||
b07b484a AD |
582 | /* The semantic value stack. */ |
583 | YYSTYPE yyvsa[YYINITDEPTH]; | |
b07b484a | 584 | YYSTYPE *yyvs = yyvsa; |
bb10be54 | 585 | register YYSTYPE *yyvsp; |
10fa2066 | 586 | |
5af1f549 | 587 | #if YYLSP_NEEDED |
b07b484a AD |
588 | /* The location stack. */ |
589 | YYLTYPE yylsa[YYINITDEPTH]; | |
10fa2066 RS |
590 | YYLTYPE *yyls = yylsa; |
591 | YYLTYPE *yylsp; | |
bb10be54 | 592 | #endif |
10fa2066 | 593 | |
5af1f549 | 594 | #if YYLSP_NEEDED |
b07b484a | 595 | # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) |
10fa2066 | 596 | #else |
b07b484a | 597 | # define YYPOPSTACK (yyvsp--, yyssp--) |
10fa2066 RS |
598 | #endif |
599 | ||
7093d0f5 | 600 | YYSIZE_T yystacksize = YYINITDEPTH; |
10fa2066 | 601 | |
6666f98f AD |
602 | /* The variables used to return semantic value and location from the |
603 | action routines. */ | |
bb10be54 | 604 | YYSTYPE yyval; |
7093d0f5 | 605 | #if YYLSP_NEEDED |
6666f98f | 606 | YYLTYPE yyloc; |
7093d0f5 | 607 | #endif |
10fa2066 | 608 | |
6666f98f | 609 | /* When reducing, the number of symbols on the RHS of the reduced |
e8cb70b9 | 610 | rule. */ |
10fa2066 RS |
611 | int yylen; |
612 | ||
5a35a6cb | 613 | YYDPRINTF ((stderr, "Starting parse\n")); |
10fa2066 RS |
614 | |
615 | yystate = 0; | |
616 | yyerrstatus = 0; | |
17da6427 PB |
617 | yynerrs = 0; |
618 | yychar = YYEMPTY; /* Cause a token to be read. */ | |
10fa2066 RS |
619 | |
620 | /* Initialize stack pointers. | |
621 | Waste one element of value and location stack | |
622 | so that they stay on the same level as the state stack. | |
623 | The wasted elements are never initialized. */ | |
624 | ||
cbd89906 | 625 | yyssp = yyss; |
10fa2066 | 626 | yyvsp = yyvs; |
5af1f549 | 627 | #if YYLSP_NEEDED |
10fa2066 RS |
628 | yylsp = yyls; |
629 | #endif | |
cbd89906 | 630 | goto yysetstate; |
10fa2066 | 631 | |
71da9eea AD |
632 | /*------------------------------------------------------------. |
633 | | yynewstate -- Push a new state, which is found in yystate. | | |
634 | `------------------------------------------------------------*/ | |
342b8b6e | 635 | yynewstate: |
71da9eea AD |
636 | /* In all cases, when you get here, the value and location stacks |
637 | have just been pushed. so pushing a state here evens the stacks. | |
638 | */ | |
cbd89906 PE |
639 | yyssp++; |
640 | ||
342b8b6e | 641 | yysetstate: |
cbd89906 | 642 | *yyssp = yystate; |
10fa2066 RS |
643 | |
644 | if (yyssp >= yyss + yystacksize - 1) | |
645 | { | |
10fa2066 | 646 | /* Get the current used size of the three stacks, in elements. */ |
7093d0f5 | 647 | YYSIZE_T yysize = yyssp - yyss + 1; |
10fa2066 RS |
648 | |
649 | #ifdef yyoverflow | |
3d76b07d AD |
650 | { |
651 | /* Give user a chance to reallocate the stack. Use copies of | |
652 | these so that the &'s don't force the real ones into | |
653 | memory. */ | |
654 | YYSTYPE *yyvs1 = yyvs; | |
655 | short *yyss1 = yyss; | |
656 | ||
657 | /* Each stack pointer address is followed by the size of the | |
658 | data in use in that stack, in bytes. */ | |
5af1f549 | 659 | # if YYLSP_NEEDED |
3d76b07d AD |
660 | YYLTYPE *yyls1 = yyls; |
661 | /* This used to be a conditional around just the two extra args, | |
662 | but that might be undefined if yyoverflow is a macro. */ | |
663 | yyoverflow ("parser stack overflow", | |
7093d0f5 AD |
664 | &yyss1, yysize * sizeof (*yyssp), |
665 | &yyvs1, yysize * sizeof (*yyvsp), | |
666 | &yyls1, yysize * sizeof (*yylsp), | |
3d76b07d AD |
667 | &yystacksize); |
668 | yyls = yyls1; | |
b07b484a | 669 | # else |
3d76b07d | 670 | yyoverflow ("parser stack overflow", |
7093d0f5 AD |
671 | &yyss1, yysize * sizeof (*yyssp), |
672 | &yyvs1, yysize * sizeof (*yyvsp), | |
3d76b07d | 673 | &yystacksize); |
b07b484a | 674 | # endif |
3d76b07d AD |
675 | yyss = yyss1; |
676 | yyvs = yyvs1; | |
677 | } | |
10fa2066 RS |
678 | #else /* no yyoverflow */ |
679 | /* Extend the stack our own way. */ | |
680 | if (yystacksize >= YYMAXDEPTH) | |
600f9b0c | 681 | goto yyoverflowlab; |
10fa2066 RS |
682 | yystacksize *= 2; |
683 | if (yystacksize > YYMAXDEPTH) | |
684 | yystacksize = YYMAXDEPTH; | |
e9e4c321 | 685 | |
600f9b0c PE |
686 | { |
687 | short *yyss1 = yyss; | |
688 | char *yyptr = (char *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); | |
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 |
8850be4b | 968 | #endif /* 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 |