]>
Dogcows Code - chaz/openbox/blob - util/epist/yacc_parser.cc
a22ff282aa7b79b660831277de13e040fa7f2c5f
1 /* A Bison parser, made from epist.y
4 #define YYBISON 1 /* Identify Bison output. */
19 # include "../../config.h"
20 #endif // HAVE_CONFIG_H
26 #define YYPARSE_PARAM parser_obj
36 void yyerror(const char *c
) {
37 printf("ERROR: %s\n", c
);
54 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
55 #define YYTRANSLATE(x) ((unsigned)(x) <= 265 ? yytranslate[x] : 26)
57 /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
58 static const char yytranslate
[] =
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,
90 static const short yyprhs
[] =
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
96 static const short yyrhs
[] =
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
110 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
111 static const short yyrline
[] =
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
120 #if (YYDEBUG) || defined YYERROR_VERBOSE
122 /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
123 static const char *const yytname
[] =
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
133 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
134 static const short yyr1
[] =
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
141 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
142 static const short yyr2
[] =
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
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
152 static const short yydefact
[] =
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,
161 static const short yydefgoto
[] =
163 1, 4, 5, 6, 7, 8, 14, 33, 9, 21,
167 static const short yypact
[] =
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,
176 static const short yypgoto
[] =
178 12,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 18,-32768,
179 -8,-32768,-32768,-32768
186 static const short yytable
[] =
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
193 static const short yycheck
[] =
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
199 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
200 #line 3 "/usr/share/bison/bison.simple"
202 /* Skeleton output parser for bison,
204 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
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)
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.
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. */
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. */
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. */
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. */
239 #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
241 /* The parser invokes alloca or malloc; define the necessary symbols. */
243 # if YYSTACK_USE_ALLOCA
244 # define YYSTACK_ALLOC alloca
246 # ifndef YYSTACK_USE_ALLOCA
247 # if defined (alloca) || defined (_ALLOCA_H)
248 # define YYSTACK_ALLOC alloca
251 # define YYSTACK_ALLOC __builtin_alloca
257 # ifdef YYSTACK_ALLOC
258 /* Pacify GCC's `empty if-body' warning. */
259 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
261 # if defined (__STDC__) || defined (__cplusplus)
262 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
263 # define YYSIZE_T size_t
265 # define YYSTACK_ALLOC malloc
266 # define YYSTACK_FREE free
269 /* A type that is properly aligned for any stack member. */
279 /* The size of the maximum gap between one aligned stack and the next. */
280 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
282 /* The size of an array large to enough to hold all stacks, each with
285 # define YYSTACK_BYTES(N) \
286 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
287 + 2 * YYSTACK_GAP_MAX)
289 # define YYSTACK_BYTES(N) \
290 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
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
299 # define YYSTACK_RELOCATE(Type, Stack) \
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); \
311 #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
314 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
315 # define YYSIZE_T __SIZE_TYPE__
317 #if ! defined (YYSIZE_T) && defined (size_t)
318 # define YYSIZE_T size_t
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
326 #if ! defined (YYSIZE_T)
327 # define YYSIZE_T unsigned int
330 #define yyerrok (yyerrstatus = 0)
331 #define yyclearin (yychar = YYEMPTY)
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) \
344 if (yychar == YYEMPTY && yylen == 1) \
348 yychar1 = YYTRANSLATE (yychar); \
354 yyerror ("syntax error: cannot back up"); \
360 #define YYERRCODE 256
363 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
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. */
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;
377 /* YYLEX -- calling `yylex' with the right arguments. */
382 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
384 # define YYLEX yylex (&yylval, &yylloc)
386 # else /* !YYLSP_NEEDED */
388 # define YYLEX yylex (&yylval, YYLEX_PARAM)
390 # define YYLEX yylex (&yylval)
392 # endif /* !YYLSP_NEEDED */
394 # define YYLEX yylex ()
398 /* Enable debugging if requested. */
402 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
403 # define YYFPRINTF fprintf
406 # define YYDPRINTF(Args) \
411 /* Nonzero means print parse trace. It is left uninitialized so that
412 multiple parsers can coexist. */
415 # define YYDPRINTF(Args)
416 #endif /* !YYDEBUG */
418 /* YYINITDEPTH -- initial size of the parser's stacks. */
420 # define YYINITDEPTH 200
423 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
424 if the built-in stack extension method is used).
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. */
435 # define YYMAXDEPTH 10000
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++ */
443 /* This is the most reliable way to avoid incompatibilities
444 in available built-in functions on various systems. */
446 # if defined (__STDC__) || defined (__cplusplus)
447 yymemcpy (char *yyto
, const char *yyfrom
, YYSIZE_T yycount
)
449 yymemcpy (yyto
, yyfrom
, yycount
)
455 register const char *yyf
= yyfrom
;
456 register char *yyt
= yyto
;
457 register YYSIZE_T yyi
= yycount
;
465 #ifdef YYERROR_VERBOSE
468 # if defined (__GLIBC__) && defined (_STRING_H)
469 # define yystrlen strlen
471 /* Return the length of YYSTR. */
473 # if defined (__STDC__) || defined (__cplusplus)
474 yystrlen (const char *yystr
)
480 register const char *yys
= yystr
;
482 while (*yys
++ != '\0')
485 return yys
- yystr
- 1;
491 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
492 # define yystpcpy stpcpy
494 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
497 # if defined (__STDC__) || defined (__cplusplus)
498 yystpcpy (char *yydest
, const char *yysrc
)
500 yystpcpy (yydest
, yysrc
)
505 register char *yyd
= yydest
;
506 register const char *yys
= yysrc
;
508 while ((*yyd
++ = *yys
++) != '\0')
517 #line 319 "/usr/share/bison/bison.simple"
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. */
527 # if defined (__STDC__) || defined (__cplusplus)
528 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
529 # define YYPARSE_PARAM_DECL
531 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
532 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
534 #else /* !YYPARSE_PARAM */
535 # define YYPARSE_PARAM_ARG
536 # define YYPARSE_PARAM_DECL
537 #endif /* !YYPARSE_PARAM */
539 /* Prevent warning if -Wstrict-prototypes. */
541 # ifdef YYPARSE_PARAM
542 int yyparse (void *);
548 /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
549 variables are global, or local to YYPARSE. */
551 #define YY_DECL_NON_LSP_VARIABLES \
552 /* The lookahead symbol. */ \
555 /* The semantic value of the lookahead symbol. */ \
558 /* Number of parse errors so far. */ \
562 # define YY_DECL_VARIABLES \
563 YY_DECL_NON_LSP_VARIABLES \
565 /* Location data for the lookahead symbol. */ \
568 # define YY_DECL_VARIABLES \
569 YY_DECL_NON_LSP_VARIABLES
573 /* If nonreentrant, generate the variables here. */
580 yyparse (YYPARSE_PARAM_ARG
)
583 /* If reentrant, generate the variables here. */
588 register int yystate
;
591 /* Number of tokens to shift before error messages enabled. */
593 /* Lookahead token as an internal (translated) token number. */
596 /* Three stacks and their tools:
597 `yyss': related to states,
598 `yyvs': related to semantic values,
599 `yyls': related to locations.
601 Refer to the stacks thru separate pointers, to allow yyoverflow
602 to reallocate them elsewhere. */
604 /* The state stack. */
605 short yyssa
[YYINITDEPTH
];
607 register short *yyssp
;
609 /* The semantic value stack. */
610 YYSTYPE yyvsa
[YYINITDEPTH
];
611 YYSTYPE
*yyvs
= yyvsa
;
612 register YYSTYPE
*yyvsp
;
615 /* The location stack. */
616 YYLTYPE yylsa
[YYINITDEPTH
];
617 YYLTYPE
*yyls
= yylsa
;
622 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
624 # define YYPOPSTACK (yyvsp--, yyssp--)
627 YYSIZE_T yystacksize
= YYINITDEPTH
;
630 /* The variables used to return semantic value and location from the
637 /* When reducing, the number of symbols on the RHS of the reduced
641 YYDPRINTF ((stderr
, "Starting parse\n"));
646 yychar
= YYEMPTY
; /* Cause a token to be read. */
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. */
660 /*------------------------------------------------------------.
661 | yynewstate -- Push a new state, which is found in yystate. |
662 `------------------------------------------------------------*/
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.
672 if (yyssp
>= yyss
+ yystacksize
- 1)
674 /* Get the current used size of the three stacks, in elements. */
675 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
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
682 YYSTYPE
*yyvs1
= yyvs
;
685 /* Each stack pointer address is followed by the size of the
686 data in use in that stack, in bytes. */
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
),
698 yyoverflow ("parser stack overflow",
699 &yyss1
, yysize
* sizeof (*yyssp
),
700 &yyvs1
, yysize
* sizeof (*yyvsp
),
706 #else /* no yyoverflow */
707 /* Extend the stack our own way. */
708 if (yystacksize
>= YYMAXDEPTH
)
711 if (yystacksize
> YYMAXDEPTH
)
712 yystacksize
= YYMAXDEPTH
;
716 union yyalloc
*yyptr
=
717 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
720 YYSTACK_RELOCATE (short, yyss
);
721 YYSTACK_RELOCATE (YYSTYPE
, yyvs
);
723 YYSTACK_RELOCATE (YYLTYPE
, yyls
);
725 # undef YYSTACK_RELOCATE
727 YYSTACK_FREE (yyss1
);
729 #endif /* no yyoverflow */
731 yyssp
= yyss
+ yysize
- 1;
732 yyvsp
= yyvs
+ yysize
- 1;
734 yylsp
= yyls
+ yysize
- 1;
737 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
738 (unsigned long int) yystacksize
));
740 if (yyssp
>= yyss
+ yystacksize
- 1)
744 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
754 /* Do appropriate processing given the current state. */
755 /* Read a lookahead token if we need one and don't already have one. */
758 /* First try to decide what to do without reference to lookahead token. */
760 yyn
= yypact
[yystate
];
764 /* Not known => get a lookahead token if don't already have one. */
766 /* yychar is either YYEMPTY or YYEOF
767 or a valid token in external form. */
769 if (yychar
== YYEMPTY
)
771 YYDPRINTF ((stderr
, "Reading a token: "));
775 /* Convert token to internal form (in yychar1) for indexing tables with */
777 if (yychar
<= 0) /* This means end of input. */
780 yychar
= YYEOF
; /* Don't call YYLEX any more */
782 YYDPRINTF ((stderr
, "Now at end of input.\n"));
786 yychar1
= YYTRANSLATE (yychar
);
789 /* We have to keep this `#if YYDEBUG', since we use variables
790 which are defined only if `YYDEBUG' is set. */
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. */
798 YYPRINT (stderr
, yychar
, yylval
);
800 YYFPRINTF (stderr
, ")\n");
806 if (yyn
< 0 || yyn
> YYLAST
|| yycheck
[yyn
] != yychar1
)
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,
816 0, or most negative number => error. */
831 /* Shift the lookahead token. */
832 YYDPRINTF ((stderr
, "Shifting token %d (%s), ",
833 yychar
, yytname
[yychar1
]));
835 /* Discard the token being shifted unless it is eof. */
844 /* Count tokens shifted since error; after three, turn off error
853 /*-----------------------------------------------------------.
854 | yydefault -- do the default action for the current state. |
855 `-----------------------------------------------------------*/
857 yyn
= yydefact
[yystate
];
863 /*-----------------------------.
864 | yyreduce -- Do a reduction. |
865 `-----------------------------*/
867 /* yyn is the number of a rule to reduce with. */
870 /* If YYLEN is nonzero, implement the default value of the action:
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
];
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
);
888 /* We have to keep this `#if YYDEBUG', since we use variables which
889 are defined only if `YYDEBUG' is set. */
894 YYFPRINTF (stderr
, "Reducing via rule %d (line %d), ",
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
]]);
909 ((parser
*)parser_obj
)->setAction(yyvsp
[-2]);
910 ((parser
*)parser_obj
)->endAction();
916 ((parser
*)parser_obj
)->endChain();
921 { ((parser
*)parser_obj
)->startChain(); ;
925 { /* ((parser*)parser_obj)->endChain(); */ ;
929 { ((parser
*)parser_obj
)->addModifier(yyvsp
[-2]); ;
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
)->setKey(yyvsp
[0]); ;
957 { ((parser
*)parser_obj
)->setArgumentNum(yyvsp
[0]); ;
961 { ((parser
*)parser_obj
)->setArgumentNegNum(yyvsp
[0]); ;
965 { ((parser
*)parser_obj
)->setArgumentStr(yyvsp
[0]); ;
969 { ((parser
*)parser_obj
)->setOption(yyvsp
[-2]); ;
973 #line 705 "/usr/share/bison/bison.simple"
985 short *yyssp1
= yyss
- 1;
986 YYFPRINTF (stderr
, "state stack now");
987 while (yyssp1
!= yyssp
)
988 YYFPRINTF (stderr
, " %d", *++yyssp1
);
989 YYFPRINTF (stderr
, "\n");
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. */
1004 yystate
= yypgoto
[yyn
- YYNTBASE
] + *yyssp
;
1005 if (yystate
>= 0 && yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
1006 yystate
= yytable
[yystate
];
1008 yystate
= yydefgoto
[yyn
- YYNTBASE
];
1013 /*------------------------------------.
1014 | yyerrlab -- here on detecting error |
1015 `------------------------------------*/
1017 /* If not already recovering from an error, report this error. */
1022 #ifdef YYERROR_VERBOSE
1023 yyn
= yypact
[yystate
];
1025 if (yyn
> YYFLAG
&& yyn
< YYLAST
)
1027 YYSIZE_T yysize
= 0;
1032 /* Start YYX at -YYN if negative to avoid negative indexes in
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
);
1043 char *yyp
= yystpcpy (yymsg
, "parse error, unexpected ");
1044 yyp
= yystpcpy (yyp
, yytname
[YYTRANSLATE (yychar
)]);
1049 for (yyx
= yyn
< 0 ? -yyn
: 0;
1050 yyx
< (int) (sizeof (yytname
) / sizeof (char *));
1052 if (yycheck
[yyx
+ yyn
] == yyx
)
1054 const char *yyq
= ! yycount
? ", expecting " : " or ";
1055 yyp
= yystpcpy (yyp
, yyq
);
1056 yyp
= yystpcpy (yyp
, yytname
[yyx
]);
1061 YYSTACK_FREE (yymsg
);
1064 yyerror ("parse error; also virtual memory exhausted");
1067 #endif /* defined (YYERROR_VERBOSE) */
1068 yyerror ("parse error");
1073 /*--------------------------------------------------.
1074 | yyerrlab1 -- error raised explicitly by an action |
1075 `--------------------------------------------------*/
1077 if (yyerrstatus
== 3)
1079 /* If just tried and failed to reuse lookahead token after an
1080 error, discard it. */
1082 /* return failure if at end of input */
1083 if (yychar
== YYEOF
)
1085 YYDPRINTF ((stderr
, "Discarding token %d (%s).\n",
1086 yychar
, yytname
[yychar1
]));
1090 /* Else will try to reuse lookahead token after shifting the error
1093 yyerrstatus
= 3; /* Each real token shifted decrements this */
1098 /*-------------------------------------------------------------------.
1099 | yyerrdefault -- current state does not do anything special for the |
1101 `-------------------------------------------------------------------*/
1104 /* This is wrong; only states that explicitly want error tokens
1105 should shift them. */
1107 /* If its default is to accept any token, ok. Otherwise pop it. */
1108 yyn
= yydefact
[yystate
];
1114 /*---------------------------------------------------------------.
1115 | yyerrpop -- pop the current state because it cannot handle the |
1117 `---------------------------------------------------------------*/
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");
1142 yyn
= yypact
[yystate
];
1147 if (yyn
< 0 || yyn
> YYLAST
|| yycheck
[yyn
] != YYTERROR
)
1164 YYDPRINTF ((stderr
, "Shifting error token, "));
1175 /*-------------------------------------.
1176 | yyacceptlab -- YYACCEPT comes here. |
1177 `-------------------------------------*/
1182 /*-----------------------------------.
1183 | yyabortlab -- YYABORT comes here. |
1184 `-----------------------------------*/
1189 /*---------------------------------------------.
1190 | yyoverflowab -- parser overflow comes here. |
1191 `---------------------------------------------*/
1193 yyerror ("parser stack overflow");
1200 YYSTACK_FREE (yyss
);
This page took 0.10004 seconds and 4 git commands to generate.