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