]>
Dogcows Code - chaz/openbox/blob - util/epist/yacc_parser.cc
1 /* A Bison parser, made from epist.y
4 #define YYBISON 1 /* Identify Bison output. */
22 #define YYPARSE_PARAM parser_obj
32 void yyerror(const char *c
) {
33 printf("ERROR: %s\n", c
);
50 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
51 #define YYTRANSLATE(x) ((unsigned)(x) <= 265 ? yytranslate[x] : 26)
53 /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
54 static const char yytranslate
[] =
56 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
57 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
58 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
59 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
60 2, 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, 1, 3, 4, 5,
86 static const short yyprhs
[] =
88 0, 0, 1, 4, 7, 9, 11, 16, 21, 26,
89 29, 31, 33, 34, 38, 40, 42, 44, 46, 48,
90 50, 51, 53, 56, 58, 60, 61, 64
92 static const short yyrhs
[] =
94 -1, 12, 13, 0, 12, 16, 0, 14, 0, 15,
95 0, 17, 9, 22, 5, 0, 17, 18, 12, 19,
96 0, 23, 3, 24, 4, 0, 20, 21, 0, 3,
97 0, 4, 0, 0, 10, 6, 20, 0, 3, 0,
98 4, 0, 6, 0, 5, 0, 7, 0, 9, 0,
99 0, 7, 0, 6, 7, 0, 8, 0, 11, 0,
100 0, 24, 25, 0, 9, 22, 5, 0
106 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
107 static const short yyrline
[] =
109 0, 27, 28, 29, 32, 33, 36, 45, 52, 56,
110 60, 64, 68, 69, 72, 74, 75, 76, 77, 78,
111 81, 82, 83, 84, 87, 91, 92, 95
116 #if (YYDEBUG) || defined YYERROR_VERBOSE
118 /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
119 static const char *const yytname
[] =
121 "$", "error", "$undefined.", "OBRACE", "EBRACE", "SEMICOLON", "DASH",
122 "NUMBER", "QUOTES", "WORD", "BINDING", "OPTIONS", "commands", "command",
123 "action_command", "chain_command", "options_block", "binding", "obrace",
124 "ebrace", "binding_w_modifier", "bind_key", "parameter",
125 "options_keyword", "options", "option", 0
129 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
130 static const short yyr1
[] =
132 0, 12, 12, 12, 13, 13, 14, 15, 16, 17,
133 18, 19, 20, 20, 21, 21, 21, 21, 21, 21,
134 22, 22, 22, 22, 23, 24, 24, 25
137 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
138 static const short yyr2
[] =
140 0, 0, 2, 2, 1, 1, 4, 4, 4, 2,
141 1, 1, 0, 3, 1, 1, 1, 1, 1, 1,
142 0, 1, 2, 1, 1, 0, 2, 3
145 /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
146 doesn't specify something else to do. Zero means the default is an
148 static const short yydefact
[] =
150 1, 12, 0, 24, 2, 4, 5, 3, 0, 0,
151 0, 12, 10, 20, 1, 14, 15, 17, 16, 18,
152 19, 9, 25, 13, 0, 21, 23, 0, 12, 0,
153 22, 6, 11, 7, 8, 20, 26, 0, 27, 0,
157 static const short yydefgoto
[] =
159 1, 4, 5, 6, 7, 8, 14, 33, 9, 21,
163 static const short yypact
[] =
165 -32768, 0, -1,-32768,-32768,-32768,-32768,-32768, 14, 9,
166 3, 10,-32768, -4,-32768,-32768,-32768,-32768,-32768,-32768,
167 -32768,-32768,-32768,-32768, 2,-32768,-32768, 16, -3, 15,
168 -32768,-32768,-32768,-32768,-32768, -4,-32768, 17,-32768, 25,
172 static const short yypgoto
[] =
174 12,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 18,-32768,
175 -8,-32768,-32768,-32768
182 static const short yytable
[] =
184 39, 32, 24, 25, 26, 11, 22, 2, 3, 30,
185 2, 3, 15, 16, 17, 18, 19, 12, 20, 34,
186 2, 31, 38, 13, 35, 40, 28, 37, 0, 23
189 static const short yycheck
[] =
191 0, 4, 6, 7, 8, 6, 3, 10, 11, 7,
192 10, 11, 3, 4, 5, 6, 7, 3, 9, 4,
193 10, 5, 5, 9, 9, 0, 14, 35, -1, 11
195 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
196 #line 3 "/usr/share/bison/bison.simple"
198 /* Skeleton output parser for bison,
200 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
203 This program is free software; you can redistribute it and/or modify
204 it under the terms of the GNU General Public License as published by
205 the Free Software Foundation; either version 2, or (at your option)
208 This program is distributed in the hope that it will be useful,
209 but WITHOUT ANY WARRANTY; without even the implied warranty of
210 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
211 GNU General Public License for more details.
213 You should have received a copy of the GNU General Public License
214 along with this program; if not, write to the Free Software
215 Foundation, Inc., 59 Temple Place - Suite 330,
216 Boston, MA 02111-1307, USA. */
218 /* As a special exception, when this file is copied by Bison into a
219 Bison output file, you may use that output file without restriction.
220 This special exception was added by the Free Software Foundation
221 in version 1.24 of Bison. */
223 /* This is the parser code that is written into each bison parser when
224 the %semantic_parser declaration is not specified in the grammar.
225 It was written by Richard Stallman by simplifying the hairy parser
226 used when %semantic_parser is specified. */
228 /* All symbols defined below should begin with yy or YY, to avoid
229 infringing on user name space. This should be done even for local
230 variables, as they might otherwise be expanded by user macros.
231 There are some unavoidable exceptions within include files to
232 define necessary library symbols; they are noted "INFRINGES ON
233 USER NAME SPACE" below. */
235 #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
237 /* The parser invokes alloca or malloc; define the necessary symbols. */
239 # if YYSTACK_USE_ALLOCA
240 # define YYSTACK_ALLOC alloca
242 # ifndef YYSTACK_USE_ALLOCA
243 # if defined (alloca) || defined (_ALLOCA_H)
244 # define YYSTACK_ALLOC alloca
247 # define YYSTACK_ALLOC __builtin_alloca
253 # ifdef YYSTACK_ALLOC
254 /* Pacify GCC's `empty if-body' warning. */
255 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
257 # if defined (__STDC__) || defined (__cplusplus)
258 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
259 # define YYSIZE_T size_t
261 # define YYSTACK_ALLOC malloc
262 # define YYSTACK_FREE free
265 /* A type that is properly aligned for any stack member. */
275 /* The size of the maximum gap between one aligned stack and the next. */
276 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
278 /* The size of an array large to enough to hold all stacks, each with
281 # define YYSTACK_BYTES(N) \
282 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
283 + 2 * YYSTACK_GAP_MAX)
285 # define YYSTACK_BYTES(N) \
286 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
290 /* Relocate the TYPE STACK from its old location to the new one. The
291 local variables YYSIZE and YYSTACKSIZE give the old and new number of
292 elements in the stack, and YYPTR gives the new location of the
293 stack. Advance YYPTR to a properly aligned location for the next
295 # define YYSTACK_RELOCATE(Type, Stack) \
298 YYSIZE_T yynewbytes; \
299 yymemcpy ((char *) yyptr, (char *) (Stack), \
300 yysize * (YYSIZE_T) sizeof (Type)); \
301 Stack = &yyptr->Stack; \
302 yynewbytes = yystacksize * sizeof (Type) + YYSTACK_GAP_MAX; \
303 yyptr += yynewbytes / sizeof (*yyptr); \
307 #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
310 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
311 # define YYSIZE_T __SIZE_TYPE__
313 #if ! defined (YYSIZE_T) && defined (size_t)
314 # define YYSIZE_T size_t
316 #if ! defined (YYSIZE_T)
317 # if defined (__STDC__) || defined (__cplusplus)
318 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
319 # define YYSIZE_T size_t
322 #if ! defined (YYSIZE_T)
323 # define YYSIZE_T unsigned int
326 #define yyerrok (yyerrstatus = 0)
327 #define yyclearin (yychar = YYEMPTY)
330 #define YYACCEPT goto yyacceptlab
331 #define YYABORT goto yyabortlab
332 #define YYERROR goto yyerrlab1
333 /* Like YYERROR except do call yyerror. This remains here temporarily
334 to ease the transition to the new meaning of YYERROR, for GCC.
335 Once GCC version 2 has supplanted version 1, this can go. */
336 #define YYFAIL goto yyerrlab
337 #define YYRECOVERING() (!!yyerrstatus)
338 #define YYBACKUP(Token, Value) \
340 if (yychar == YYEMPTY && yylen == 1) \
344 yychar1 = YYTRANSLATE (yychar); \
350 yyerror ("syntax error: cannot back up"); \
356 #define YYERRCODE 256
359 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
362 When YYLLOC_DEFAULT is run, CURRENT is set the location of the
363 first token. By default, to implement support for ranges, extend
364 its range to the last symbol. */
366 #ifndef YYLLOC_DEFAULT
367 # define YYLLOC_DEFAULT(Current, Rhs, N) \
368 Current.last_line = Rhs[N].last_line; \
369 Current.last_column = Rhs[N].last_column;
373 /* YYLEX -- calling `yylex' with the right arguments. */
378 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
380 # define YYLEX yylex (&yylval, &yylloc)
382 # else /* !YYLSP_NEEDED */
384 # define YYLEX yylex (&yylval, YYLEX_PARAM)
386 # define YYLEX yylex (&yylval)
388 # endif /* !YYLSP_NEEDED */
390 # define YYLEX yylex ()
394 /* Enable debugging if requested. */
398 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
399 # define YYFPRINTF fprintf
402 # define YYDPRINTF(Args) \
407 /* Nonzero means print parse trace. It is left uninitialized so that
408 multiple parsers can coexist. */
411 # define YYDPRINTF(Args)
412 #endif /* !YYDEBUG */
414 /* YYINITDEPTH -- initial size of the parser's stacks. */
416 # define YYINITDEPTH 200
419 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
420 if the built-in stack extension method is used).
422 Do not make this value too large; the results are undefined if
423 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
424 evaluated with infinite-precision integer arithmetic. */
431 # define YYMAXDEPTH 10000
434 #if ! defined (yyoverflow) && ! defined (yymemcpy)
435 # if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
436 # define yymemcpy __builtin_memcpy
437 # else /* not GNU C or C++ */
439 /* This is the most reliable way to avoid incompatibilities
440 in available built-in functions on various systems. */
442 # if defined (__STDC__) || defined (__cplusplus)
443 yymemcpy (char *yyto
, const char *yyfrom
, YYSIZE_T yycount
)
445 yymemcpy (yyto
, yyfrom
, yycount
)
451 register const char *yyf
= yyfrom
;
452 register char *yyt
= yyto
;
453 register YYSIZE_T yyi
= yycount
;
461 #ifdef YYERROR_VERBOSE
464 # if defined (__GLIBC__) && defined (_STRING_H)
465 # define yystrlen strlen
467 /* Return the length of YYSTR. */
469 # if defined (__STDC__) || defined (__cplusplus)
470 yystrlen (const char *yystr
)
476 register const char *yys
= yystr
;
478 while (*yys
++ != '\0')
481 return yys
- yystr
- 1;
487 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
488 # define yystpcpy stpcpy
490 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
493 # if defined (__STDC__) || defined (__cplusplus)
494 yystpcpy (char *yydest
, const char *yysrc
)
496 yystpcpy (yydest
, yysrc
)
501 register char *yyd
= yydest
;
502 register const char *yys
= yysrc
;
504 while ((*yyd
++ = *yys
++) != '\0')
513 #line 319 "/usr/share/bison/bison.simple"
516 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
517 into yyparse. The argument should have type void *.
518 It should actually point to an object.
519 Grammar actions can access the variable by casting it
520 to the proper pointer type. */
523 # if defined (__STDC__) || defined (__cplusplus)
524 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
525 # define YYPARSE_PARAM_DECL
527 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
528 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
530 #else /* !YYPARSE_PARAM */
531 # define YYPARSE_PARAM_ARG
532 # define YYPARSE_PARAM_DECL
533 #endif /* !YYPARSE_PARAM */
535 /* Prevent warning if -Wstrict-prototypes. */
537 # ifdef YYPARSE_PARAM
538 int yyparse (void *);
544 /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
545 variables are global, or local to YYPARSE. */
547 #define YY_DECL_NON_LSP_VARIABLES \
548 /* The lookahead symbol. */ \
551 /* The semantic value of the lookahead symbol. */ \
554 /* Number of parse errors so far. */ \
558 # define YY_DECL_VARIABLES \
559 YY_DECL_NON_LSP_VARIABLES \
561 /* Location data for the lookahead symbol. */ \
564 # define YY_DECL_VARIABLES \
565 YY_DECL_NON_LSP_VARIABLES
569 /* If nonreentrant, generate the variables here. */
576 yyparse (YYPARSE_PARAM_ARG
)
579 /* If reentrant, generate the variables here. */
584 register int yystate
;
587 /* Number of tokens to shift before error messages enabled. */
589 /* Lookahead token as an internal (translated) token number. */
592 /* Three stacks and their tools:
593 `yyss': related to states,
594 `yyvs': related to semantic values,
595 `yyls': related to locations.
597 Refer to the stacks thru separate pointers, to allow yyoverflow
598 to reallocate them elsewhere. */
600 /* The state stack. */
601 short yyssa
[YYINITDEPTH
];
603 register short *yyssp
;
605 /* The semantic value stack. */
606 YYSTYPE yyvsa
[YYINITDEPTH
];
607 YYSTYPE
*yyvs
= yyvsa
;
608 register YYSTYPE
*yyvsp
;
611 /* The location stack. */
612 YYLTYPE yylsa
[YYINITDEPTH
];
613 YYLTYPE
*yyls
= yylsa
;
618 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
620 # define YYPOPSTACK (yyvsp--, yyssp--)
623 YYSIZE_T yystacksize
= YYINITDEPTH
;
626 /* The variables used to return semantic value and location from the
633 /* When reducing, the number of symbols on the RHS of the reduced
637 YYDPRINTF ((stderr
, "Starting parse\n"));
642 yychar
= YYEMPTY
; /* Cause a token to be read. */
644 /* Initialize stack pointers.
645 Waste one element of value and location stack
646 so that they stay on the same level as the state stack.
647 The wasted elements are never initialized. */
656 /*------------------------------------------------------------.
657 | yynewstate -- Push a new state, which is found in yystate. |
658 `------------------------------------------------------------*/
660 /* In all cases, when you get here, the value and location stacks
661 have just been pushed. so pushing a state here evens the stacks.
668 if (yyssp
>= yyss
+ yystacksize
- 1)
670 /* Get the current used size of the three stacks, in elements. */
671 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
675 /* Give user a chance to reallocate the stack. Use copies of
676 these so that the &'s don't force the real ones into
678 YYSTYPE
*yyvs1
= yyvs
;
681 /* Each stack pointer address is followed by the size of the
682 data in use in that stack, in bytes. */
684 YYLTYPE
*yyls1
= yyls
;
685 /* This used to be a conditional around just the two extra args,
686 but that might be undefined if yyoverflow is a macro. */
687 yyoverflow ("parser stack overflow",
688 &yyss1
, yysize
* sizeof (*yyssp
),
689 &yyvs1
, yysize
* sizeof (*yyvsp
),
690 &yyls1
, yysize
* sizeof (*yylsp
),
694 yyoverflow ("parser stack overflow",
695 &yyss1
, yysize
* sizeof (*yyssp
),
696 &yyvs1
, yysize
* sizeof (*yyvsp
),
702 #else /* no yyoverflow */
703 /* Extend the stack our own way. */
704 if (yystacksize
>= YYMAXDEPTH
)
707 if (yystacksize
> YYMAXDEPTH
)
708 yystacksize
= YYMAXDEPTH
;
712 union yyalloc
*yyptr
=
713 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
716 YYSTACK_RELOCATE (short, yyss
);
717 YYSTACK_RELOCATE (YYSTYPE
, yyvs
);
719 YYSTACK_RELOCATE (YYLTYPE
, yyls
);
721 # undef YYSTACK_RELOCATE
723 YYSTACK_FREE (yyss1
);
725 #endif /* no yyoverflow */
727 yyssp
= yyss
+ yysize
- 1;
728 yyvsp
= yyvs
+ yysize
- 1;
730 yylsp
= yyls
+ yysize
- 1;
733 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
734 (unsigned long int) yystacksize
));
736 if (yyssp
>= yyss
+ yystacksize
- 1)
740 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
750 /* Do appropriate processing given the current state. */
751 /* Read a lookahead token if we need one and don't already have one. */
754 /* First try to decide what to do without reference to lookahead token. */
756 yyn
= yypact
[yystate
];
760 /* Not known => get a lookahead token if don't already have one. */
762 /* yychar is either YYEMPTY or YYEOF
763 or a valid token in external form. */
765 if (yychar
== YYEMPTY
)
767 YYDPRINTF ((stderr
, "Reading a token: "));
771 /* Convert token to internal form (in yychar1) for indexing tables with */
773 if (yychar
<= 0) /* This means end of input. */
776 yychar
= YYEOF
; /* Don't call YYLEX any more */
778 YYDPRINTF ((stderr
, "Now at end of input.\n"));
782 yychar1
= YYTRANSLATE (yychar
);
785 /* We have to keep this `#if YYDEBUG', since we use variables
786 which are defined only if `YYDEBUG' is set. */
789 YYFPRINTF (stderr
, "Next token is %d (%s",
790 yychar
, yytname
[yychar1
]);
791 /* Give the individual parser a way to print the precise
792 meaning of a token, for further debugging info. */
794 YYPRINT (stderr
, yychar
, yylval
);
796 YYFPRINTF (stderr
, ")\n");
802 if (yyn
< 0 || yyn
> YYLAST
|| yycheck
[yyn
] != yychar1
)
807 /* yyn is what to do for this token type in this state.
808 Negative => reduce, -yyn is rule number.
809 Positive => shift, yyn is new state.
810 New state is final state => don't bother to shift,
812 0, or most negative number => error. */
827 /* Shift the lookahead token. */
828 YYDPRINTF ((stderr
, "Shifting token %d (%s), ",
829 yychar
, yytname
[yychar1
]));
831 /* Discard the token being shifted unless it is eof. */
840 /* Count tokens shifted since error; after three, turn off error
849 /*-----------------------------------------------------------.
850 | yydefault -- do the default action for the current state. |
851 `-----------------------------------------------------------*/
853 yyn
= yydefact
[yystate
];
859 /*-----------------------------.
860 | yyreduce -- Do a reduction. |
861 `-----------------------------*/
863 /* yyn is the number of a rule to reduce with. */
866 /* If YYLEN is nonzero, implement the default value of the action:
869 Otherwise, the following line sets YYVAL to the semantic value of
870 the lookahead token. This behavior is undocumented and Bison
871 users should not rely upon it. Assigning to YYVAL
872 unconditionally makes the parser a bit smaller, and it avoids a
873 GCC warning that YYVAL may be used uninitialized. */
874 yyval
= yyvsp
[1-yylen
];
877 /* Similarly for the default location. Let the user run additional
878 commands if for instance locations are ranges. */
879 yyloc
= yylsp
[1-yylen
];
880 YYLLOC_DEFAULT (yyloc
, (yylsp
- yylen
), yylen
);
884 /* We have to keep this `#if YYDEBUG', since we use variables which
885 are defined only if `YYDEBUG' is set. */
890 YYFPRINTF (stderr
, "Reducing via rule %d (line %d), ",
893 /* Print the symbols being reduced, and their result. */
894 for (yyi
= yyprhs
[yyn
]; yyrhs
[yyi
] > 0; yyi
++)
895 YYFPRINTF (stderr
, "%s ", yytname
[yyrhs
[yyi
]]);
896 YYFPRINTF (stderr
, " -> %s\n", yytname
[yyr1
[yyn
]]);
905 ((parser
*)parser_obj
)->setAction(yyvsp
[-2]);
906 ((parser
*)parser_obj
)->endAction();
912 ((parser
*)parser_obj
)->endChain();
917 { ((parser
*)parser_obj
)->startChain(); ;
921 { /* ((parser*)parser_obj)->endChain(); */ ;
925 { ((parser
*)parser_obj
)->addModifier(yyvsp
[-2]); ;
929 { ((parser
*)parser_obj
)->setKey(yyvsp
[0]); ;
933 { ((parser
*)parser_obj
)->setKey(yyvsp
[0]); ;
937 { ((parser
*)parser_obj
)->setKey(yyvsp
[0]); ;
941 { ((parser
*)parser_obj
)->setKey(yyvsp
[0]); ;
945 { ((parser
*)parser_obj
)->setKey(yyvsp
[0]); ;
949 { ((parser
*)parser_obj
)->setKey(yyvsp
[0]); ;
953 { ((parser
*)parser_obj
)->setArgumentNum(yyvsp
[0]); ;
957 { ((parser
*)parser_obj
)->setArgumentNegNum(yyvsp
[0]); ;
961 { ((parser
*)parser_obj
)->setArgumentStr(yyvsp
[0]); ;
965 { ((parser
*)parser_obj
)->setOption(yyvsp
[-2]); ;
969 #line 705 "/usr/share/bison/bison.simple"
981 short *yyssp1
= yyss
- 1;
982 YYFPRINTF (stderr
, "state stack now");
983 while (yyssp1
!= yyssp
)
984 YYFPRINTF (stderr
, " %d", *++yyssp1
);
985 YYFPRINTF (stderr
, "\n");
994 /* Now `shift' the result of the reduction. Determine what state
995 that goes to, based on the state we popped back to and the rule
996 number reduced by. */
1000 yystate
= yypgoto
[yyn
- YYNTBASE
] + *yyssp
;
1001 if (yystate
>= 0 && yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
1002 yystate
= yytable
[yystate
];
1004 yystate
= yydefgoto
[yyn
- YYNTBASE
];
1009 /*------------------------------------.
1010 | yyerrlab -- here on detecting error |
1011 `------------------------------------*/
1013 /* If not already recovering from an error, report this error. */
1018 #ifdef YYERROR_VERBOSE
1019 yyn
= yypact
[yystate
];
1021 if (yyn
> YYFLAG
&& yyn
< YYLAST
)
1023 YYSIZE_T yysize
= 0;
1028 /* Start YYX at -YYN if negative to avoid negative indexes in
1030 for (yyx
= yyn
< 0 ? -yyn
: 0;
1031 yyx
< (int) (sizeof (yytname
) / sizeof (char *)); yyx
++)
1032 if (yycheck
[yyx
+ yyn
] == yyx
)
1033 yysize
+= yystrlen (yytname
[yyx
]) + 15, yycount
++;
1034 yysize
+= yystrlen ("parse error, unexpected ") + 1;
1035 yysize
+= yystrlen (yytname
[YYTRANSLATE (yychar
)]);
1036 yymsg
= (char *) YYSTACK_ALLOC (yysize
);
1039 char *yyp
= yystpcpy (yymsg
, "parse error, unexpected ");
1040 yyp
= yystpcpy (yyp
, yytname
[YYTRANSLATE (yychar
)]);
1045 for (yyx
= yyn
< 0 ? -yyn
: 0;
1046 yyx
< (int) (sizeof (yytname
) / sizeof (char *));
1048 if (yycheck
[yyx
+ yyn
] == yyx
)
1050 const char *yyq
= ! yycount
? ", expecting " : " or ";
1051 yyp
= yystpcpy (yyp
, yyq
);
1052 yyp
= yystpcpy (yyp
, yytname
[yyx
]);
1057 YYSTACK_FREE (yymsg
);
1060 yyerror ("parse error; also virtual memory exhausted");
1063 #endif /* defined (YYERROR_VERBOSE) */
1064 yyerror ("parse error");
1069 /*--------------------------------------------------.
1070 | yyerrlab1 -- error raised explicitly by an action |
1071 `--------------------------------------------------*/
1073 if (yyerrstatus
== 3)
1075 /* If just tried and failed to reuse lookahead token after an
1076 error, discard it. */
1078 /* return failure if at end of input */
1079 if (yychar
== YYEOF
)
1081 YYDPRINTF ((stderr
, "Discarding token %d (%s).\n",
1082 yychar
, yytname
[yychar1
]));
1086 /* Else will try to reuse lookahead token after shifting the error
1089 yyerrstatus
= 3; /* Each real token shifted decrements this */
1094 /*-------------------------------------------------------------------.
1095 | yyerrdefault -- current state does not do anything special for the |
1097 `-------------------------------------------------------------------*/
1100 /* This is wrong; only states that explicitly want error tokens
1101 should shift them. */
1103 /* If its default is to accept any token, ok. Otherwise pop it. */
1104 yyn
= yydefact
[yystate
];
1110 /*---------------------------------------------------------------.
1111 | yyerrpop -- pop the current state because it cannot handle the |
1113 `---------------------------------------------------------------*/
1126 short *yyssp1
= yyss
- 1;
1127 YYFPRINTF (stderr
, "Error: state stack now");
1128 while (yyssp1
!= yyssp
)
1129 YYFPRINTF (stderr
, " %d", *++yyssp1
);
1130 YYFPRINTF (stderr
, "\n");
1138 yyn
= yypact
[yystate
];
1143 if (yyn
< 0 || yyn
> YYLAST
|| yycheck
[yyn
] != YYTERROR
)
1160 YYDPRINTF ((stderr
, "Shifting error token, "));
1171 /*-------------------------------------.
1172 | yyacceptlab -- YYACCEPT comes here. |
1173 `-------------------------------------*/
1178 /*-----------------------------------.
1179 | yyabortlab -- YYABORT comes here. |
1180 `-----------------------------------*/
1185 /*---------------------------------------------.
1186 | yyoverflowab -- parser overflow comes here. |
1187 `---------------------------------------------*/
1189 yyerror ("parser stack overflow");
1196 YYSTACK_FREE (yyss
);
This page took 0.094495 seconds and 4 git commands to generate.