modules/rpsl/members_rs.tab.c
/* [<][>][^][v][top][bottom][index][help] */
FUNCTIONS
This source file includes following functions.
- YYTRANSLATE
- YYRECOVERING
- YYBACKUP
- __yy_memcpy
- __yy_memcpy
- __yy_memcpy
- yyparse
- members_rserror
1
2 /* A Bison parser, made from members_rs.y
3 by GNU Bison version 1.28 */
4
5 #define YYBISON 1 /* Identify Bison output. */
6
7 #define yyparse members_rsparse
8 #define yylex members_rslex
9 #define yyerror members_rserror
10 #define yylval members_rslval
11 #define yychar members_rschar
12 #define yydebug members_rsdebug
13 #define yynerrs members_rsnerrs
14 #define TKN_ASNO 257
15 #define TKN_PRFXV4 258
16 #define TKN_PRFXV4RNG 259
17 #define TKN_RSNAME 260
18 #define TKN_ASNAME 261
19 #define OP_MS 262
20
21 #line 1 "members_rs.y"
22
23 /*
24 filename: members_rs.y
25
26 description:
27 Defines the grammar for an RPSL members_rs attribute.
28
29 notes:
30 Defines tokens for the associated lexer, members_rs.l.
31 */
32
33 /******************
34 Copyright (c) 2002 RIPE NCC
35
36 All Rights Reserved
37
38 Permission to use, copy, modify, and distribute this software and its
39 documentation for any purpose and without fee is hereby granted,
40 provided that the above copyright notice appear in all copies and that
41 both that copyright notice and this permission notice appear in
42 supporting documentation, and that the name of the author not be
43 used in advertising or publicity pertaining to distribution of the
44 software without specific, written prior permission.
45
46 THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
47 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL
48 AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
49 DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
50 AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
51 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
52 ***************************************/
53
54 #include <stdlib.h>
55
56 int yyerror(const char *s);
57 #ifndef YYSTYPE
58 #define YYSTYPE int
59 #endif
60 #include <stdio.h>
61
62 #ifndef __cplusplus
63 #ifndef __STDC__
64 #define const
65 #endif
66 #endif
67
68
69
70 #define YYFINAL 14
71 #define YYFLAG -32768
72 #define YYNTBASE 10
73
74 #define YYTRANSLATE(x) ((unsigned)(x) <= 262 ? yytranslate[x] : 12)
/* [<][>][^][v][top][bottom][index][help] */
75
76 static const char yytranslate[] = { 0,
77 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
78 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
79 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
80 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
81 2, 2, 2, 9, 2, 2, 2, 2, 2, 2,
82 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
83 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
84 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
85 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
86 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
87 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
88 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
89 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
90 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
91 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
92 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
93 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
94 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
95 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
96 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
97 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
98 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
99 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
100 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
101 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
102 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
103 7, 8
104 };
105
106 #if YYDEBUG != 0
107 static const short yyprhs[] = { 0,
108 0, 4, 6, 8, 11, 13, 16, 18, 20, 22
109 };
110
111 static const short yyrhs[] = { 10,
112 9, 11, 0, 11, 0, 3, 0, 3, 8, 0,
113 7, 0, 7, 8, 0, 4, 0, 5, 0, 6,
114 0, 6, 8, 0
115 };
116
117 #endif
118
119 #if YYDEBUG != 0
120 static const short yyrline[] = { 0,
121 42, 43, 46, 47, 48, 49, 50, 51, 52, 53
122 };
123 #endif
124
125
126 #if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
127
128 static const char * const yytname[] = { "$","error","$undefined.","TKN_ASNO",
129 "TKN_PRFXV4","TKN_PRFXV4RNG","TKN_RSNAME","TKN_ASNAME","OP_MS","','","members_rs",
130 "members_item", NULL
131 };
132 #endif
133
134 static const short yyr1[] = { 0,
135 10, 10, 11, 11, 11, 11, 11, 11, 11, 11
136 };
137
138 static const short yyr2[] = { 0,
139 3, 1, 1, 2, 1, 2, 1, 1, 1, 2
140 };
141
142 static const short yydefact[] = { 0,
143 3, 7, 8, 9, 5, 0, 2, 4, 10, 6,
144 0, 1, 0, 0
145 };
146
147 static const short yydefgoto[] = { 6,
148 7
149 };
150
151 static const short yypact[] = { -2,
152 -1,-32768,-32768, 2, 3, 0,-32768,-32768,-32768,-32768,
153 -2,-32768, 6,-32768
154 };
155
156 static const short yypgoto[] = {-32768,
157 -3
158 };
159
160
161 #define YYLAST 11
162
163
164 static const short yytable[] = { 13,
165 1, 2, 3, 4, 5, 14, 8, 12, 11, 9,
166 10
167 };
168
169 static const short yycheck[] = { 0,
170 3, 4, 5, 6, 7, 0, 8, 11, 9, 8,
171 8
172 };
173 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
174 #line 3 "/usr/local/share/bison.simple"
175 /* This file comes from bison-1.28. */
176
177 /* Skeleton output parser for bison,
178 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
179
180 This program is free software; you can redistribute it and/or modify
181 it under the terms of the GNU General Public License as published by
182 the Free Software Foundation; either version 2, or (at your option)
183 any later version.
184
185 This program is distributed in the hope that it will be useful,
186 but WITHOUT ANY WARRANTY; without even the implied warranty of
187 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
188 GNU General Public License for more details.
189
190 You should have received a copy of the GNU General Public License
191 along with this program; if not, write to the Free Software
192 Foundation, Inc., 59 Temple Place - Suite 330,
193 Boston, MA 02111-1307, USA. */
194
195 /* As a special exception, when this file is copied by Bison into a
196 Bison output file, you may use that output file without restriction.
197 This special exception was added by the Free Software Foundation
198 in version 1.24 of Bison. */
199
200 /* This is the parser code that is written into each bison parser
201 when the %semantic_parser declaration is not specified in the grammar.
202 It was written by Richard Stallman by simplifying the hairy parser
203 used when %semantic_parser is specified. */
204
205 #ifndef YYSTACK_USE_ALLOCA
206 #ifdef alloca
207 #define YYSTACK_USE_ALLOCA
208 #else /* alloca not defined */
209 #ifdef __GNUC__
210 #define YYSTACK_USE_ALLOCA
211 #define alloca __builtin_alloca
212 #else /* not GNU C. */
213 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
214 #define YYSTACK_USE_ALLOCA
215 #include <alloca.h>
216 #else /* not sparc */
217 /* We think this test detects Watcom and Microsoft C. */
218 /* This used to test MSDOS, but that is a bad idea
219 since that symbol is in the user namespace. */
220 #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
221 #if 0 /* No need for malloc.h, which pollutes the namespace;
222 instead, just don't use alloca. */
223 #include <malloc.h>
224 #endif
225 #else /* not MSDOS, or __TURBOC__ */
226 #if defined(_AIX)
227 /* I don't know what this was needed for, but it pollutes the namespace.
228 So I turned it off. rms, 2 May 1997. */
229 /* #include <malloc.h> */
230 #pragma alloca
231 #define YYSTACK_USE_ALLOCA
232 #else /* not MSDOS, or __TURBOC__, or _AIX */
233 #if 0
234 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
235 and on HPUX 10. Eventually we can turn this on. */
236 #define YYSTACK_USE_ALLOCA
237 #define alloca __builtin_alloca
238 #endif /* __hpux */
239 #endif
240 #endif /* not _AIX */
241 #endif /* not MSDOS, or __TURBOC__ */
242 #endif /* not sparc */
243 #endif /* not GNU C */
244 #endif /* alloca not defined */
245 #endif /* YYSTACK_USE_ALLOCA not defined */
246
247 #ifdef YYSTACK_USE_ALLOCA
248 #define YYSTACK_ALLOC alloca
249 #else
250 #define YYSTACK_ALLOC malloc
251 #endif
252
253 /* Note: there must be only one dollar sign in this file.
254 It is replaced by the list of actions, each action
255 as one case of the switch. */
256
257 #define yyerrok (yyerrstatus = 0)
258 #define yyclearin (yychar = YYEMPTY)
259 #define YYEMPTY -2
260 #define YYEOF 0
261 #define YYACCEPT goto yyacceptlab
262 #define YYABORT goto yyabortlab
263 #define YYERROR goto yyerrlab1
264 /* Like YYERROR except do call yyerror.
265 This remains here temporarily to ease the
266 transition to the new meaning of YYERROR, for GCC.
267 Once GCC version 2 has supplanted version 1, this can go. */
268 #define YYFAIL goto yyerrlab
269 #define YYRECOVERING() (!!yyerrstatus)
/* [<][>][^][v][top][bottom][index][help] */
270 #define YYBACKUP(token, value) \
/* [<][>][^][v][top][bottom][index][help] */
271 do \
272 if (yychar == YYEMPTY && yylen == 1) \
273 { yychar = (token), yylval = (value); \
274 yychar1 = YYTRANSLATE (yychar); \
275 YYPOPSTACK; \
276 goto yybackup; \
277 } \
278 else \
279 { yyerror ("syntax error: cannot back up"); YYERROR; } \
280 while (0)
281
282 #define YYTERROR 1
283 #define YYERRCODE 256
284
285 #ifndef YYPURE
286 #define YYLEX yylex()
287 #endif
288
289 #ifdef YYPURE
290 #ifdef YYLSP_NEEDED
291 #ifdef YYLEX_PARAM
292 #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
293 #else
294 #define YYLEX yylex(&yylval, &yylloc)
295 #endif
296 #else /* not YYLSP_NEEDED */
297 #ifdef YYLEX_PARAM
298 #define YYLEX yylex(&yylval, YYLEX_PARAM)
299 #else
300 #define YYLEX yylex(&yylval)
301 #endif
302 #endif /* not YYLSP_NEEDED */
303 #endif
304
305 /* If nonreentrant, generate the variables here */
306
307 #ifndef YYPURE
308
309 int yychar; /* the lookahead symbol */
310 YYSTYPE yylval; /* the semantic value of the */
311 /* lookahead symbol */
312
313 #ifdef YYLSP_NEEDED
314 YYLTYPE yylloc; /* location data for the lookahead */
315 /* symbol */
316 #endif
317
318 int yynerrs; /* number of parse errors so far */
319 #endif /* not YYPURE */
320
321 #if YYDEBUG != 0
322 int yydebug; /* nonzero means print parse trace */
323 /* Since this is uninitialized, it does not stop multiple parsers
324 from coexisting. */
325 #endif
326
327 /* YYINITDEPTH indicates the initial size of the parser's stacks */
328
329 #ifndef YYINITDEPTH
330 #define YYINITDEPTH 200
331 #endif
332
333 /* YYMAXDEPTH is the maximum size the stacks can grow to
334 (effective only if the built-in stack extension method is used). */
335
336 #if YYMAXDEPTH == 0
337 #undef YYMAXDEPTH
338 #endif
339
340 #ifndef YYMAXDEPTH
341 #define YYMAXDEPTH 10000
342 #endif
343
344 /* Define __yy_memcpy. Note that the size argument
345 should be passed with type unsigned int, because that is what the non-GCC
346 definitions require. With GCC, __builtin_memcpy takes an arg
347 of type size_t, but it can handle unsigned int. */
348
349 #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
350 #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
/* [<][>][^][v][top][bottom][index][help] */
351 #else /* not GNU C or C++ */
352 #ifndef __cplusplus
353
354 /* This is the most reliable way to avoid incompatibilities
355 in available built-in functions on various systems. */
356 static void
357 __yy_memcpy (to, from, count)
/* [<][>][^][v][top][bottom][index][help] */
358 char *to;
359 char *from;
360 unsigned int count;
361 {
362 register char *f = from;
363 register char *t = to;
364 register int i = count;
365
366 while (i-- > 0)
367 *t++ = *f++;
368 }
369
370 #else /* __cplusplus */
371
372 /* This is the most reliable way to avoid incompatibilities
373 in available built-in functions on various systems. */
374 static void
375 __yy_memcpy (char *to, char *from, unsigned int count)
/* [<][>][^][v][top][bottom][index][help] */
376 {
377 register char *t = to;
378 register char *f = from;
379 register int i = count;
380
381 while (i-- > 0)
382 *t++ = *f++;
383 }
384
385 #endif
386 #endif
387
388 #line 217 "/usr/local/share/bison.simple"
389
390 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
391 into yyparse. The argument should have type void *.
392 It should actually point to an object.
393 Grammar actions can access the variable by casting it
394 to the proper pointer type. */
395
396 #ifdef YYPARSE_PARAM
397 #ifdef __cplusplus
398 #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
399 #define YYPARSE_PARAM_DECL
400 #else /* not __cplusplus */
401 #define YYPARSE_PARAM_ARG YYPARSE_PARAM
402 #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
403 #endif /* not __cplusplus */
404 #else /* not YYPARSE_PARAM */
405 #define YYPARSE_PARAM_ARG
406 #define YYPARSE_PARAM_DECL
407 #endif /* not YYPARSE_PARAM */
408
409 /* Prevent warning if -Wstrict-prototypes. */
410 #ifdef __GNUC__
411 #ifdef YYPARSE_PARAM
412 int yyparse (void *);
413 #else
414 int yyparse (void);
415 #endif
416 #endif
417
418 int
419 yyparse(YYPARSE_PARAM_ARG)
/* [<][>][^][v][top][bottom][index][help] */
420 YYPARSE_PARAM_DECL
421 {
422 register int yystate;
423 register int yyn;
424 register short *yyssp;
425 register YYSTYPE *yyvsp;
426 int yyerrstatus; /* number of tokens to shift before error messages enabled */
427 int yychar1 = 0; /* lookahead token as an internal (translated) token number */
428
429 short yyssa[YYINITDEPTH]; /* the state stack */
430 YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
431
432 short *yyss = yyssa; /* refer to the stacks thru separate pointers */
433 YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
434
435 #ifdef YYLSP_NEEDED
436 YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
437 YYLTYPE *yyls = yylsa;
438 YYLTYPE *yylsp;
439
440 #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
441 #else
442 #define YYPOPSTACK (yyvsp--, yyssp--)
443 #endif
444
445 int yystacksize = YYINITDEPTH;
446 int yyfree_stacks = 0;
447
448 #ifdef YYPURE
449 int yychar;
450 YYSTYPE yylval;
451 int yynerrs;
452 #ifdef YYLSP_NEEDED
453 YYLTYPE yylloc;
454 #endif
455 #endif
456
457 YYSTYPE yyval; /* the variable used to return */
458 /* semantic values from the action */
459 /* routines */
460
461 int yylen;
462
463 #if YYDEBUG != 0
464 if (yydebug)
465 fprintf(stderr, "Starting parse\n");
466 #endif
467
468 yystate = 0;
469 yyerrstatus = 0;
470 yynerrs = 0;
471 yychar = YYEMPTY; /* Cause a token to be read. */
472
473 /* Initialize stack pointers.
474 Waste one element of value and location stack
475 so that they stay on the same level as the state stack.
476 The wasted elements are never initialized. */
477
478 yyssp = yyss - 1;
479 yyvsp = yyvs;
480 #ifdef YYLSP_NEEDED
481 yylsp = yyls;
482 #endif
483
484 /* Push a new state, which is found in yystate . */
485 /* In all cases, when you get here, the value and location stacks
486 have just been pushed. so pushing a state here evens the stacks. */
487 yynewstate:
488
489 *++yyssp = yystate;
490
491 if (yyssp >= yyss + yystacksize - 1)
492 {
493 /* Give user a chance to reallocate the stack */
494 /* Use copies of these so that the &'s don't force the real ones into memory. */
495 YYSTYPE *yyvs1 = yyvs;
496 short *yyss1 = yyss;
497 #ifdef YYLSP_NEEDED
498 YYLTYPE *yyls1 = yyls;
499 #endif
500
501 /* Get the current used size of the three stacks, in elements. */
502 int size = yyssp - yyss + 1;
503
504 #ifdef yyoverflow
505 /* Each stack pointer address is followed by the size of
506 the data in use in that stack, in bytes. */
507 #ifdef YYLSP_NEEDED
508 /* This used to be a conditional around just the two extra args,
509 but that might be undefined if yyoverflow is a macro. */
510 yyoverflow("parser stack overflow",
511 &yyss1, size * sizeof (*yyssp),
512 &yyvs1, size * sizeof (*yyvsp),
513 &yyls1, size * sizeof (*yylsp),
514 &yystacksize);
515 #else
516 yyoverflow("parser stack overflow",
517 &yyss1, size * sizeof (*yyssp),
518 &yyvs1, size * sizeof (*yyvsp),
519 &yystacksize);
520 #endif
521
522 yyss = yyss1; yyvs = yyvs1;
523 #ifdef YYLSP_NEEDED
524 yyls = yyls1;
525 #endif
526 #else /* no yyoverflow */
527 /* Extend the stack our own way. */
528 if (yystacksize >= YYMAXDEPTH)
529 {
530 yyerror("parser stack overflow");
531 if (yyfree_stacks)
532 {
533 free (yyss);
534 free (yyvs);
535 #ifdef YYLSP_NEEDED
536 free (yyls);
537 #endif
538 }
539 return 2;
540 }
541 yystacksize *= 2;
542 if (yystacksize > YYMAXDEPTH)
543 yystacksize = YYMAXDEPTH;
544 #ifndef YYSTACK_USE_ALLOCA
545 yyfree_stacks = 1;
546 #endif
547 yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
548 __yy_memcpy ((char *)yyss, (char *)yyss1,
549 size * (unsigned int) sizeof (*yyssp));
550 yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
551 __yy_memcpy ((char *)yyvs, (char *)yyvs1,
552 size * (unsigned int) sizeof (*yyvsp));
553 #ifdef YYLSP_NEEDED
554 yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
555 __yy_memcpy ((char *)yyls, (char *)yyls1,
556 size * (unsigned int) sizeof (*yylsp));
557 #endif
558 #endif /* no yyoverflow */
559
560 yyssp = yyss + size - 1;
561 yyvsp = yyvs + size - 1;
562 #ifdef YYLSP_NEEDED
563 yylsp = yyls + size - 1;
564 #endif
565
566 #if YYDEBUG != 0
567 if (yydebug)
568 fprintf(stderr, "Stack size increased to %d\n", yystacksize);
569 #endif
570
571 if (yyssp >= yyss + yystacksize - 1)
572 YYABORT;
573 }
574
575 #if YYDEBUG != 0
576 if (yydebug)
577 fprintf(stderr, "Entering state %d\n", yystate);
578 #endif
579
580 goto yybackup;
581 yybackup:
582
583 /* Do appropriate processing given the current state. */
584 /* Read a lookahead token if we need one and don't already have one. */
585 /* yyresume: */
586
587 /* First try to decide what to do without reference to lookahead token. */
588
589 yyn = yypact[yystate];
590 if (yyn == YYFLAG)
591 goto yydefault;
592
593 /* Not known => get a lookahead token if don't already have one. */
594
595 /* yychar is either YYEMPTY or YYEOF
596 or a valid token in external form. */
597
598 if (yychar == YYEMPTY)
599 {
600 #if YYDEBUG != 0
601 if (yydebug)
602 fprintf(stderr, "Reading a token: ");
603 #endif
604 yychar = YYLEX;
605 }
606
607 /* Convert token to internal form (in yychar1) for indexing tables with */
608
609 if (yychar <= 0) /* This means end of input. */
610 {
611 yychar1 = 0;
612 yychar = YYEOF; /* Don't call YYLEX any more */
613
614 #if YYDEBUG != 0
615 if (yydebug)
616 fprintf(stderr, "Now at end of input.\n");
617 #endif
618 }
619 else
620 {
621 yychar1 = YYTRANSLATE(yychar);
622
623 #if YYDEBUG != 0
624 if (yydebug)
625 {
626 fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
627 /* Give the individual parser a way to print the precise meaning
628 of a token, for further debugging info. */
629 #ifdef YYPRINT
630 YYPRINT (stderr, yychar, yylval);
631 #endif
632 fprintf (stderr, ")\n");
633 }
634 #endif
635 }
636
637 yyn += yychar1;
638 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
639 goto yydefault;
640
641 yyn = yytable[yyn];
642
643 /* yyn is what to do for this token type in this state.
644 Negative => reduce, -yyn is rule number.
645 Positive => shift, yyn is new state.
646 New state is final state => don't bother to shift,
647 just return success.
648 0, or most negative number => error. */
649
650 if (yyn < 0)
651 {
652 if (yyn == YYFLAG)
653 goto yyerrlab;
654 yyn = -yyn;
655 goto yyreduce;
656 }
657 else if (yyn == 0)
658 goto yyerrlab;
659
660 if (yyn == YYFINAL)
661 YYACCEPT;
662
663 /* Shift the lookahead token. */
664
665 #if YYDEBUG != 0
666 if (yydebug)
667 fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
668 #endif
669
670 /* Discard the token being shifted unless it is eof. */
671 if (yychar != YYEOF)
672 yychar = YYEMPTY;
673
674 *++yyvsp = yylval;
675 #ifdef YYLSP_NEEDED
676 *++yylsp = yylloc;
677 #endif
678
679 /* count tokens shifted since error; after three, turn off error status. */
680 if (yyerrstatus) yyerrstatus--;
681
682 yystate = yyn;
683 goto yynewstate;
684
685 /* Do the default action for the current state. */
686 yydefault:
687
688 yyn = yydefact[yystate];
689 if (yyn == 0)
690 goto yyerrlab;
691
692 /* Do a reduction. yyn is the number of a rule to reduce with. */
693 yyreduce:
694 yylen = yyr2[yyn];
695 if (yylen > 0)
696 yyval = yyvsp[1-yylen]; /* implement default value of the action */
697
698 #if YYDEBUG != 0
699 if (yydebug)
700 {
701 int i;
702
703 fprintf (stderr, "Reducing via rule %d (line %d), ",
704 yyn, yyrline[yyn]);
705
706 /* Print the symbols being reduced, and their result. */
707 for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
708 fprintf (stderr, "%s ", yytname[yyrhs[i]]);
709 fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
710 }
711 #endif
712
713
714 switch (yyn) {
715
716 }
717 /* the action file gets copied in in place of this dollarsign */
718 #line 543 "/usr/local/share/bison.simple"
719
720 yyvsp -= yylen;
721 yyssp -= yylen;
722 #ifdef YYLSP_NEEDED
723 yylsp -= yylen;
724 #endif
725
726 #if YYDEBUG != 0
727 if (yydebug)
728 {
729 short *ssp1 = yyss - 1;
730 fprintf (stderr, "state stack now");
731 while (ssp1 != yyssp)
732 fprintf (stderr, " %d", *++ssp1);
733 fprintf (stderr, "\n");
734 }
735 #endif
736
737 *++yyvsp = yyval;
738
739 #ifdef YYLSP_NEEDED
740 yylsp++;
741 if (yylen == 0)
742 {
743 yylsp->first_line = yylloc.first_line;
744 yylsp->first_column = yylloc.first_column;
745 yylsp->last_line = (yylsp-1)->last_line;
746 yylsp->last_column = (yylsp-1)->last_column;
747 yylsp->text = 0;
748 }
749 else
750 {
751 yylsp->last_line = (yylsp+yylen-1)->last_line;
752 yylsp->last_column = (yylsp+yylen-1)->last_column;
753 }
754 #endif
755
756 /* Now "shift" the result of the reduction.
757 Determine what state that goes to,
758 based on the state we popped back to
759 and the rule number reduced by. */
760
761 yyn = yyr1[yyn];
762
763 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
764 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
765 yystate = yytable[yystate];
766 else
767 yystate = yydefgoto[yyn - YYNTBASE];
768
769 goto yynewstate;
770
771 yyerrlab: /* here on detecting error */
772
773 if (! yyerrstatus)
774 /* If not already recovering from an error, report this error. */
775 {
776 ++yynerrs;
777
778 #ifdef YYERROR_VERBOSE
779 yyn = yypact[yystate];
780
781 if (yyn > YYFLAG && yyn < YYLAST)
782 {
783 int size = 0;
784 char *msg;
785 int x, count;
786
787 count = 0;
788 /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
789 for (x = (yyn < 0 ? -yyn : 0);
790 x < (sizeof(yytname) / sizeof(char *)); x++)
791 if (yycheck[x + yyn] == x)
792 size += strlen(yytname[x]) + 15, count++;
793 msg = (char *) malloc(size + 15);
794 if (msg != 0)
795 {
796 strcpy(msg, "parse error");
797
798 if (count < 5)
799 {
800 count = 0;
801 for (x = (yyn < 0 ? -yyn : 0);
802 x < (sizeof(yytname) / sizeof(char *)); x++)
803 if (yycheck[x + yyn] == x)
804 {
805 strcat(msg, count == 0 ? ", expecting `" : " or `");
806 strcat(msg, yytname[x]);
807 strcat(msg, "'");
808 count++;
809 }
810 }
811 yyerror(msg);
812 free(msg);
813 }
814 else
815 yyerror ("parse error; also virtual memory exceeded");
816 }
817 else
818 #endif /* YYERROR_VERBOSE */
819 yyerror("parse error");
820 }
821
822 goto yyerrlab1;
823 yyerrlab1: /* here on error raised explicitly by an action */
824
825 if (yyerrstatus == 3)
826 {
827 /* if just tried and failed to reuse lookahead token after an error, discard it. */
828
829 /* return failure if at end of input */
830 if (yychar == YYEOF)
831 YYABORT;
832
833 #if YYDEBUG != 0
834 if (yydebug)
835 fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
836 #endif
837
838 yychar = YYEMPTY;
839 }
840
841 /* Else will try to reuse lookahead token
842 after shifting the error token. */
843
844 yyerrstatus = 3; /* Each real token shifted decrements this */
845
846 goto yyerrhandle;
847
848 yyerrdefault: /* current state does not do anything special for the error token. */
849
850 #if 0
851 /* This is wrong; only states that explicitly want error tokens
852 should shift them. */
853 yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
854 if (yyn) goto yydefault;
855 #endif
856
857 yyerrpop: /* pop the current state because it cannot handle the error token */
858
859 if (yyssp == yyss) YYABORT;
860 yyvsp--;
861 yystate = *--yyssp;
862 #ifdef YYLSP_NEEDED
863 yylsp--;
864 #endif
865
866 #if YYDEBUG != 0
867 if (yydebug)
868 {
869 short *ssp1 = yyss - 1;
870 fprintf (stderr, "Error: state stack now");
871 while (ssp1 != yyssp)
872 fprintf (stderr, " %d", *++ssp1);
873 fprintf (stderr, "\n");
874 }
875 #endif
876
877 yyerrhandle:
878
879 yyn = yypact[yystate];
880 if (yyn == YYFLAG)
881 goto yyerrdefault;
882
883 yyn += YYTERROR;
884 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
885 goto yyerrdefault;
886
887 yyn = yytable[yyn];
888 if (yyn < 0)
889 {
890 if (yyn == YYFLAG)
891 goto yyerrpop;
892 yyn = -yyn;
893 goto yyreduce;
894 }
895 else if (yyn == 0)
896 goto yyerrpop;
897
898 if (yyn == YYFINAL)
899 YYACCEPT;
900
901 #if YYDEBUG != 0
902 if (yydebug)
903 fprintf(stderr, "Shifting error token, ");
904 #endif
905
906 *++yyvsp = yylval;
907 #ifdef YYLSP_NEEDED
908 *++yylsp = yylloc;
909 #endif
910
911 yystate = yyn;
912 goto yynewstate;
913
914 yyacceptlab:
915 /* YYACCEPT comes here. */
916 if (yyfree_stacks)
917 {
918 free (yyss);
919 free (yyvs);
920 #ifdef YYLSP_NEEDED
921 free (yyls);
922 #endif
923 }
924 return 0;
925
926 yyabortlab:
927 /* YYABORT comes here. */
928 if (yyfree_stacks)
929 {
930 free (yyss);
931 free (yyvs);
932 #ifdef YYLSP_NEEDED
933 free (yyls);
934 #endif
935 }
936 return 1;
937 }
938 #line 56 "members_rs.y"
939
940
941 #undef members_rserror
942 #undef yyerror
943
944 int
945 members_rserror (const char *s)
/* [<][>][^][v][top][bottom][index][help] */
946 {
947 yyerror(s);
948 return 0;
949 }
950