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