1 /* A Bison parser, made by GNU Bison 3.0.2. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 /* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
36 /* All symbols defined below should begin with yy or YY, to avoid
37 infringing on user name space. This should be done even for local
38 variables, as they might otherwise be expanded by user macros.
39 There are some unavoidable exceptions within include files to
40 define necessary library symbols; they are noted "INFRINGES ON
41 USER NAME SPACE" below. */
43 /* Identify Bison output. */
47 #define YYBISON_VERSION "3.0.2"
50 #define YYSKELETON_NAME "yacc.c"
62 /* Substitute the variable and function names. */
63 #define yyparse null_parse
64 #define yylex null_lex
65 #define yyerror null_error
66 #define yydebug null_debug
67 #define yynerrs null_nerrs
69 #define yylval null_lval
70 #define yychar null_char
72 /* Copy the first part of user declarations. */
73 #line 1 "../../fsinfo/null_gram.y" /* yacc.c:339 */
75 void yyerror(const char *fmt, ...);
76 extern int yylex(void);
78 #line 79 "null_gram.c" /* yacc.c:339 */
81 # if defined __cplusplus && 201103L <= __cplusplus
82 # define YY_NULLPTR nullptr
88 /* Enabling verbose error messages. */
89 #ifdef YYERROR_VERBOSE
90 # undef YYERROR_VERBOSE
91 # define YYERROR_VERBOSE 1
93 # define YYERROR_VERBOSE 0
96 /* In a future release of Bison, this section will be replaced
97 by #include "y.tab.h". */
98 #ifndef YY_NULL_NULL_GRAM_H_INCLUDED
99 # define YY_NULL_NULL_GRAM_H_INCLUDED
105 extern int null_debug;
110 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
112 # define YYSTYPE_IS_TRIVIAL 1
113 # define YYSTYPE_IS_DECLARED 1
117 extern YYSTYPE null_lval;
119 int null_parse (void);
121 #endif /* !YY_NULL_NULL_GRAM_H_INCLUDED */
123 /* Copy the second part of user declarations. */
125 #line 126 "null_gram.c" /* yacc.c:358 */
132 typedef YYTYPE_UINT8 yytype_uint8;
134 typedef unsigned char yytype_uint8;
138 typedef YYTYPE_INT8 yytype_int8;
140 typedef signed char yytype_int8;
144 typedef YYTYPE_UINT16 yytype_uint16;
146 typedef unsigned short int yytype_uint16;
150 typedef YYTYPE_INT16 yytype_int16;
152 typedef short int yytype_int16;
156 # ifdef __SIZE_TYPE__
157 # define YYSIZE_T __SIZE_TYPE__
158 # elif defined size_t
159 # define YYSIZE_T size_t
160 # elif ! defined YYSIZE_T
161 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
162 # define YYSIZE_T size_t
164 # define YYSIZE_T unsigned int
168 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
171 # if defined YYENABLE_NLS && YYENABLE_NLS
173 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
174 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
178 # define YY_(Msgid) Msgid
183 # if (defined __GNUC__ \
184 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
185 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
186 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
188 # define YY_ATTRIBUTE(Spec) /* empty */
192 #ifndef YY_ATTRIBUTE_PURE
193 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
196 #ifndef YY_ATTRIBUTE_UNUSED
197 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
200 #if !defined _Noreturn \
201 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
202 # if defined _MSC_VER && 1200 <= _MSC_VER
203 # define _Noreturn __declspec (noreturn)
205 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
209 /* Suppress unused-variable warnings by "using" E. */
210 #if ! defined lint || defined __GNUC__
211 # define YYUSE(E) ((void) (E))
213 # define YYUSE(E) /* empty */
216 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
217 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
218 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
219 _Pragma ("GCC diagnostic push") \
220 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
221 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
222 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
223 _Pragma ("GCC diagnostic pop")
225 # define YY_INITIAL_VALUE(Value) Value
227 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
228 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
229 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
231 #ifndef YY_INITIAL_VALUE
232 # define YY_INITIAL_VALUE(Value) /* Nothing. */
236 #if ! defined yyoverflow || YYERROR_VERBOSE
238 /* The parser invokes alloca or malloc; define the necessary symbols. */
240 # ifdef YYSTACK_USE_ALLOCA
241 # if YYSTACK_USE_ALLOCA
243 # define YYSTACK_ALLOC __builtin_alloca
244 # elif defined __BUILTIN_VA_ARG_INCR
245 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
247 # define YYSTACK_ALLOC __alloca
248 # elif defined _MSC_VER
249 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
250 # define alloca _alloca
252 # define YYSTACK_ALLOC alloca
253 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
254 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
255 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
256 # ifndef EXIT_SUCCESS
257 # define EXIT_SUCCESS 0
264 # ifdef YYSTACK_ALLOC
265 /* Pacify GCC's 'empty if-body' warning. */
266 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
267 # ifndef YYSTACK_ALLOC_MAXIMUM
268 /* The OS might guarantee only one guard page at the bottom of the stack,
269 and a page size can be as small as 4096 bytes. So we cannot safely
270 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
271 to allow for a few compiler-allocated temporary stack slots. */
272 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
275 # define YYSTACK_ALLOC YYMALLOC
276 # define YYSTACK_FREE YYFREE
277 # ifndef YYSTACK_ALLOC_MAXIMUM
278 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
280 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
281 && ! ((defined YYMALLOC || defined malloc) \
282 && (defined YYFREE || defined free)))
283 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
284 # ifndef EXIT_SUCCESS
285 # define EXIT_SUCCESS 0
289 # define YYMALLOC malloc
290 # if ! defined malloc && ! defined EXIT_SUCCESS
291 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
296 # if ! defined free && ! defined EXIT_SUCCESS
297 void free (void *); /* INFRINGES ON USER NAME SPACE */
301 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
304 #if (! defined yyoverflow \
305 && (! defined __cplusplus \
306 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
308 /* A type that is properly aligned for any stack member. */
311 yytype_int16 yyss_alloc;
315 /* The size of the maximum gap between one aligned stack and the next. */
316 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
318 /* The size of an array large to enough to hold all stacks, each with
320 # define YYSTACK_BYTES(N) \
321 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
322 + YYSTACK_GAP_MAXIMUM)
324 # define YYCOPY_NEEDED 1
326 /* Relocate STACK from its old location to the new one. The
327 local variables YYSIZE and YYSTACKSIZE give the old and new number of
328 elements in the stack, and YYPTR gives the new location of the
329 stack. Advance YYPTR to a properly aligned location for the next
331 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
334 YYSIZE_T yynewbytes; \
335 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
336 Stack = &yyptr->Stack_alloc; \
337 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
338 yyptr += yynewbytes / sizeof (*yyptr); \
344 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
345 /* Copy COUNT objects from SRC to DST. The source and destination do
348 # if defined __GNUC__ && 1 < __GNUC__
349 # define YYCOPY(Dst, Src, Count) \
350 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
352 # define YYCOPY(Dst, Src, Count) \
356 for (yyi = 0; yyi < (Count); yyi++) \
357 (Dst)[yyi] = (Src)[yyi]; \
362 #endif /* !YYCOPY_NEEDED */
364 /* YYFINAL -- State number of the termination state. */
366 /* YYLAST -- Last index in YYTABLE. */
369 /* YYNTOKENS -- Number of terminals. */
371 /* YYNNTS -- Number of nonterminals. */
373 /* YYNRULES -- Number of rules. */
375 /* YYNSTATES -- Number of states. */
378 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
379 by yylex, with out-of-bounds checking. */
381 #define YYMAXUTOK 257
383 #define YYTRANSLATE(YYX) \
384 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
386 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
387 as returned by yylex, without out-of-bounds checking. */
388 static const yytype_uint8 yytranslate[] =
390 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
391 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
392 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
393 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
394 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
395 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
396 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
397 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
398 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
399 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
400 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
401 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
402 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
403 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
404 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
405 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
406 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
407 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
408 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
409 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
410 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
411 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
412 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
413 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
414 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
415 2, 2, 2, 2, 2, 2, 1, 2
419 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
420 static const yytype_uint8 yyrline[] =
426 #if YYDEBUG || YYERROR_VERBOSE || 0
427 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
428 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
429 static const char *const yytname[] =
431 "$end", "error", "$undefined", "$accept", "token", YY_NULLPTR
436 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
437 (internal) symbol number NUM (which must be that of a token). */
438 static const yytype_uint16 yytoknum[] =
444 #define YYPACT_NINF -1
446 #define yypact_value_is_default(Yystate) \
447 (!!((Yystate) == (-1)))
449 #define YYTABLE_NINF -1
451 #define yytable_value_is_error(Yytable_value) \
454 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
456 static const yytype_int8 yypact[] =
461 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
462 Performed when YYTABLE does not specify something else to do. Zero
463 means the default is an error. */
464 static const yytype_uint8 yydefact[] =
469 /* YYPGOTO[NTERM-NUM]. */
470 static const yytype_int8 yypgoto[] =
475 /* YYDEFGOTO[NTERM-NUM]. */
476 static const yytype_int8 yydefgoto[] =
481 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
482 positive, shift that token. If negative, reduce the rule whose
483 number is the opposite. If YYTABLE_NINF, syntax error. */
484 static const yytype_uint8 yytable[] =
489 static const yytype_uint8 yycheck[] =
494 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
495 symbol of state STATE-NUM. */
496 static const yytype_uint8 yystos[] =
501 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
502 static const yytype_uint8 yyr1[] =
507 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
508 static const yytype_uint8 yyr2[] =
514 #define yyerrok (yyerrstatus = 0)
515 #define yyclearin (yychar = YYEMPTY)
519 #define YYACCEPT goto yyacceptlab
520 #define YYABORT goto yyabortlab
521 #define YYERROR goto yyerrorlab
524 #define YYRECOVERING() (!!yyerrstatus)
526 #define YYBACKUP(Token, Value) \
528 if (yychar == YYEMPTY) \
532 YYPOPSTACK (yylen); \
538 yyerror (YY_("syntax error: cannot back up")); \
543 /* Error token number */
545 #define YYERRCODE 256
549 /* Enable debugging if requested. */
553 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
554 # define YYFPRINTF fprintf
557 # define YYDPRINTF(Args) \
563 /* This macro is provided for backward compatibility. */
564 #ifndef YY_LOCATION_PRINT
565 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
569 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
573 YYFPRINTF (stderr, "%s ", Title); \
574 yy_symbol_print (stderr, \
576 YYFPRINTF (stderr, "\n"); \
581 /*----------------------------------------.
582 | Print this symbol's value on YYOUTPUT. |
583 `----------------------------------------*/
586 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
588 FILE *yyo = yyoutput;
593 if (yytype < YYNTOKENS)
594 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
600 /*--------------------------------.
601 | Print this symbol on YYOUTPUT. |
602 `--------------------------------*/
605 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
607 YYFPRINTF (yyoutput, "%s %s (",
608 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
610 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
611 YYFPRINTF (yyoutput, ")");
614 /*------------------------------------------------------------------.
615 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
617 `------------------------------------------------------------------*/
620 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
622 YYFPRINTF (stderr, "Stack now");
623 for (; yybottom <= yytop; yybottom++)
625 int yybot = *yybottom;
626 YYFPRINTF (stderr, " %d", yybot);
628 YYFPRINTF (stderr, "\n");
631 # define YY_STACK_PRINT(Bottom, Top) \
634 yy_stack_print ((Bottom), (Top)); \
638 /*------------------------------------------------.
639 | Report that the YYRULE is going to be reduced. |
640 `------------------------------------------------*/
643 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
645 unsigned long int yylno = yyrline[yyrule];
646 int yynrhs = yyr2[yyrule];
648 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
650 /* The symbols being reduced. */
651 for (yyi = 0; yyi < yynrhs; yyi++)
653 YYFPRINTF (stderr, " $%d = ", yyi + 1);
654 yy_symbol_print (stderr,
655 yystos[yyssp[yyi + 1 - yynrhs]],
656 &(yyvsp[(yyi + 1) - (yynrhs)])
658 YYFPRINTF (stderr, "\n");
662 # define YY_REDUCE_PRINT(Rule) \
665 yy_reduce_print (yyssp, yyvsp, Rule); \
668 /* Nonzero means print parse trace. It is left uninitialized so that
669 multiple parsers can coexist. */
672 # define YYDPRINTF(Args)
673 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
674 # define YY_STACK_PRINT(Bottom, Top)
675 # define YY_REDUCE_PRINT(Rule)
676 #endif /* !YYDEBUG */
679 /* YYINITDEPTH -- initial size of the parser's stacks. */
681 # define YYINITDEPTH 200
684 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
685 if the built-in stack extension method is used).
687 Do not make this value too large; the results are undefined if
688 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
689 evaluated with infinite-precision integer arithmetic. */
692 # define YYMAXDEPTH 10000
699 # if defined __GLIBC__ && defined _STRING_H
700 # define yystrlen strlen
702 /* Return the length of YYSTR. */
704 yystrlen (const char *yystr)
707 for (yylen = 0; yystr[yylen]; yylen++)
715 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
716 # define yystpcpy stpcpy
718 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
721 yystpcpy (char *yydest, const char *yysrc)
724 const char *yys = yysrc;
726 while ((*yyd++ = *yys++) != '\0')
735 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
736 quotes and backslashes, so that it's suitable for yyerror. The
737 heuristic is that double-quoting is unnecessary unless the string
738 contains an apostrophe, a comma, or backslash (other than
739 backslash-backslash). YYSTR is taken from yytname. If YYRES is
740 null, do not copy; instead, return the length of what the result
743 yytnamerr (char *yyres, const char *yystr)
748 char const *yyp = yystr;
755 goto do_not_strip_quotes;
759 goto do_not_strip_quotes;
772 do_not_strip_quotes: ;
776 return yystrlen (yystr);
778 return yystpcpy (yyres, yystr) - yyres;
782 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
783 about the unexpected token YYTOKEN for the state stack whose top is
786 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
787 not large enough to hold the message. In that case, also set
788 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
789 required number of bytes is too large to store. */
791 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
792 yytype_int16 *yyssp, int yytoken)
794 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
795 YYSIZE_T yysize = yysize0;
796 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
797 /* Internationalized format string. */
798 const char *yyformat = YY_NULLPTR;
799 /* Arguments of yyformat. */
800 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
801 /* Number of reported tokens (one for the "unexpected", one per
805 /* There are many possibilities here to consider:
806 - If this state is a consistent state with a default action, then
807 the only way this function was invoked is if the default action
808 is an error action. In that case, don't check for expected
809 tokens because there are none.
810 - The only way there can be no lookahead present (in yychar) is if
811 this state is a consistent state with a default action. Thus,
812 detecting the absence of a lookahead is sufficient to determine
813 that there is no unexpected or expected token to report. In that
814 case, just report a simple "syntax error".
815 - Don't assume there isn't a lookahead just because this state is a
816 consistent state with a default action. There might have been a
817 previous inconsistent state, consistent state with a non-default
818 action, or user semantic action that manipulated yychar.
819 - Of course, the expected token list depends on states to have
820 correct lookahead information, and it depends on the parser not
821 to perform extra reductions after fetching a lookahead from the
822 scanner and before detecting a syntax error. Thus, state merging
823 (from LALR or IELR) and default reductions corrupt the expected
824 token list. However, the list is correct for canonical LR with
825 one exception: it will still contain any token that will not be
826 accepted due to an error action in a later state.
828 if (yytoken != YYEMPTY)
830 int yyn = yypact[*yyssp];
831 yyarg[yycount++] = yytname[yytoken];
832 if (!yypact_value_is_default (yyn))
834 /* Start YYX at -YYN if negative to avoid negative indexes in
835 YYCHECK. In other words, skip the first -YYN actions for
836 this state because they are default actions. */
837 int yyxbegin = yyn < 0 ? -yyn : 0;
838 /* Stay within bounds of both yycheck and yytname. */
839 int yychecklim = YYLAST - yyn + 1;
840 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
843 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
844 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
845 && !yytable_value_is_error (yytable[yyx + yyn]))
847 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
853 yyarg[yycount++] = yytname[yyx];
855 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
856 if (! (yysize <= yysize1
857 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
867 # define YYCASE_(N, S) \
871 YYCASE_(0, YY_("syntax error"));
872 YYCASE_(1, YY_("syntax error, unexpected %s"));
873 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
874 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
875 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
876 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
881 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
882 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
887 if (*yymsg_alloc < yysize)
889 *yymsg_alloc = 2 * yysize;
890 if (! (yysize <= *yymsg_alloc
891 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
892 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
896 /* Avoid sprintf, as that infringes on the user's name space.
897 Don't have undefined behavior even if the translation
898 produced a string with the wrong number of "%s"s. */
902 while ((*yyp = *yyformat) != '\0')
903 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
905 yyp += yytnamerr (yyp, yyarg[yyi++]);
916 #endif /* YYERROR_VERBOSE */
918 /*-----------------------------------------------.
919 | Release the memory associated to this symbol. |
920 `-----------------------------------------------*/
923 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
928 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
930 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
932 YY_IGNORE_MAYBE_UNINITIALIZED_END
938 /* The lookahead symbol. */
941 /* The semantic value of the lookahead symbol. */
943 /* Number of syntax errors so far. */
955 /* Number of tokens to shift before error messages enabled. */
958 /* The stacks and their tools:
959 'yyss': related to states.
960 'yyvs': related to semantic values.
962 Refer to the stacks through separate pointers, to allow yyoverflow
963 to reallocate them elsewhere. */
965 /* The state stack. */
966 yytype_int16 yyssa[YYINITDEPTH];
970 /* The semantic value stack. */
971 YYSTYPE yyvsa[YYINITDEPTH];
975 YYSIZE_T yystacksize;
979 /* Lookahead token as an internal (translated) token number. */
981 /* The variables used to return semantic value and location from the
986 /* Buffer for error messages, and its allocated size. */
988 char *yymsg = yymsgbuf;
989 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
992 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
994 /* The number of symbols on the RHS of the reduced rule.
995 Keep to zero when no symbol should be popped. */
998 yyssp = yyss = yyssa;
999 yyvsp = yyvs = yyvsa;
1000 yystacksize = YYINITDEPTH;
1002 YYDPRINTF ((stderr, "Starting parse\n"));
1007 yychar = YYEMPTY; /* Cause a token to be read. */
1010 /*------------------------------------------------------------.
1011 | yynewstate -- Push a new state, which is found in yystate. |
1012 `------------------------------------------------------------*/
1014 /* In all cases, when you get here, the value and location stacks
1015 have just been pushed. So pushing a state here evens the stacks. */
1021 if (yyss + yystacksize - 1 <= yyssp)
1023 /* Get the current used size of the three stacks, in elements. */
1024 YYSIZE_T yysize = yyssp - yyss + 1;
1028 /* Give user a chance to reallocate the stack. Use copies of
1029 these so that the &'s don't force the real ones into
1031 YYSTYPE *yyvs1 = yyvs;
1032 yytype_int16 *yyss1 = yyss;
1034 /* Each stack pointer address is followed by the size of the
1035 data in use in that stack, in bytes. This used to be a
1036 conditional around just the two extra args, but that might
1037 be undefined if yyoverflow is a macro. */
1038 yyoverflow (YY_("memory exhausted"),
1039 &yyss1, yysize * sizeof (*yyssp),
1040 &yyvs1, yysize * sizeof (*yyvsp),
1046 #else /* no yyoverflow */
1047 # ifndef YYSTACK_RELOCATE
1048 goto yyexhaustedlab;
1050 /* Extend the stack our own way. */
1051 if (YYMAXDEPTH <= yystacksize)
1052 goto yyexhaustedlab;
1054 if (YYMAXDEPTH < yystacksize)
1055 yystacksize = YYMAXDEPTH;
1058 yytype_int16 *yyss1 = yyss;
1059 union yyalloc *yyptr =
1060 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1062 goto yyexhaustedlab;
1063 YYSTACK_RELOCATE (yyss_alloc, yyss);
1064 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1065 # undef YYSTACK_RELOCATE
1067 YYSTACK_FREE (yyss1);
1070 #endif /* no yyoverflow */
1072 yyssp = yyss + yysize - 1;
1073 yyvsp = yyvs + yysize - 1;
1075 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1076 (unsigned long int) yystacksize));
1078 if (yyss + yystacksize - 1 <= yyssp)
1082 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1084 if (yystate == YYFINAL)
1094 /* Do appropriate processing given the current state. Read a
1095 lookahead token if we need one and don't already have one. */
1097 /* First try to decide what to do without reference to lookahead token. */
1098 yyn = yypact[yystate];
1099 if (yypact_value_is_default (yyn))
1102 /* Not known => get a lookahead token if don't already have one. */
1104 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1105 if (yychar == YYEMPTY)
1107 YYDPRINTF ((stderr, "Reading a token: "));
1111 if (yychar <= YYEOF)
1113 yychar = yytoken = YYEOF;
1114 YYDPRINTF ((stderr, "Now at end of input.\n"));
1118 yytoken = YYTRANSLATE (yychar);
1119 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1122 /* If the proper action on seeing token YYTOKEN is to reduce or to
1123 detect an error, take that action. */
1125 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1130 if (yytable_value_is_error (yyn))
1136 /* Count tokens shifted since error; after three, turn off error
1141 /* Shift the lookahead token. */
1142 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1144 /* Discard the shifted token. */
1148 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1150 YY_IGNORE_MAYBE_UNINITIALIZED_END
1155 /*-----------------------------------------------------------.
1156 | yydefault -- do the default action for the current state. |
1157 `-----------------------------------------------------------*/
1159 yyn = yydefact[yystate];
1165 /*-----------------------------.
1166 | yyreduce -- Do a reduction. |
1167 `-----------------------------*/
1169 /* yyn is the number of a rule to reduce with. */
1172 /* If YYLEN is nonzero, implement the default value of the action:
1175 Otherwise, the following line sets YYVAL to garbage.
1176 This behavior is undocumented and Bison
1177 users should not rely upon it. Assigning to YYVAL
1178 unconditionally makes the parser a bit smaller, and it avoids a
1179 GCC warning that YYVAL may be used uninitialized. */
1180 yyval = yyvsp[1-yylen];
1183 YY_REDUCE_PRINT (yyn);
1187 #line 1188 "null_gram.c" /* yacc.c:1646 */
1190 /* User semantic actions sometimes alter yychar, and that requires
1191 that yytoken be updated with the new translation. We take the
1192 approach of translating immediately before every use of yytoken.
1193 One alternative is translating here after every semantic action,
1194 but that translation would be missed if the semantic action invokes
1195 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1196 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1197 incorrect destructor might then be invoked immediately. In the
1198 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1199 to an incorrect destructor call or verbose syntax error message
1200 before the lookahead is translated. */
1201 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1205 YY_STACK_PRINT (yyss, yyssp);
1209 /* Now 'shift' the result of the reduction. Determine what state
1210 that goes to, based on the state we popped back to and the rule
1211 number reduced by. */
1215 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1216 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1217 yystate = yytable[yystate];
1219 yystate = yydefgoto[yyn - YYNTOKENS];
1224 /*--------------------------------------.
1225 | yyerrlab -- here on detecting error. |
1226 `--------------------------------------*/
1228 /* Make sure we have latest lookahead translation. See comments at
1229 user semantic actions for why this is necessary. */
1230 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1232 /* If not already recovering from an error, report this error. */
1236 #if ! YYERROR_VERBOSE
1237 yyerror (YY_("syntax error"));
1239 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1242 char const *yymsgp = YY_("syntax error");
1243 int yysyntax_error_status;
1244 yysyntax_error_status = YYSYNTAX_ERROR;
1245 if (yysyntax_error_status == 0)
1247 else if (yysyntax_error_status == 1)
1249 if (yymsg != yymsgbuf)
1250 YYSTACK_FREE (yymsg);
1251 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1255 yymsg_alloc = sizeof yymsgbuf;
1256 yysyntax_error_status = 2;
1260 yysyntax_error_status = YYSYNTAX_ERROR;
1265 if (yysyntax_error_status == 2)
1266 goto yyexhaustedlab;
1268 # undef YYSYNTAX_ERROR
1274 if (yyerrstatus == 3)
1276 /* If just tried and failed to reuse lookahead token after an
1277 error, discard it. */
1279 if (yychar <= YYEOF)
1281 /* Return failure if at end of input. */
1282 if (yychar == YYEOF)
1287 yydestruct ("Error: discarding",
1293 /* Else will try to reuse lookahead token after shifting the error
1298 /*---------------------------------------------------.
1299 | yyerrorlab -- error raised explicitly by YYERROR. |
1300 `---------------------------------------------------*/
1303 /* Pacify compilers like GCC when the user code never invokes
1304 YYERROR and the label yyerrorlab therefore never appears in user
1306 if (/*CONSTCOND*/ 0)
1309 /* Do not reclaim the symbols of the rule whose action triggered
1313 YY_STACK_PRINT (yyss, yyssp);
1318 /*-------------------------------------------------------------.
1319 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1320 `-------------------------------------------------------------*/
1322 yyerrstatus = 3; /* Each real token shifted decrements this. */
1326 yyn = yypact[yystate];
1327 if (!yypact_value_is_default (yyn))
1330 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1338 /* Pop the current state because it cannot handle the error token. */
1343 yydestruct ("Error: popping",
1344 yystos[yystate], yyvsp);
1347 YY_STACK_PRINT (yyss, yyssp);
1350 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1352 YY_IGNORE_MAYBE_UNINITIALIZED_END
1355 /* Shift the error token. */
1356 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1362 /*-------------------------------------.
1363 | yyacceptlab -- YYACCEPT comes here. |
1364 `-------------------------------------*/
1369 /*-----------------------------------.
1370 | yyabortlab -- YYABORT comes here. |
1371 `-----------------------------------*/
1376 #if !defined yyoverflow || YYERROR_VERBOSE
1377 /*-------------------------------------------------.
1378 | yyexhaustedlab -- memory exhaustion comes here. |
1379 `-------------------------------------------------*/
1381 yyerror (YY_("memory exhausted"));
1387 if (yychar != YYEMPTY)
1389 /* Make sure we have latest lookahead translation. See comments at
1390 user semantic actions for why this is necessary. */
1391 yytoken = YYTRANSLATE (yychar);
1392 yydestruct ("Cleanup: discarding lookahead",
1395 /* Do not reclaim the symbols of the rule whose action triggered
1396 this YYABORT or YYACCEPT. */
1398 YY_STACK_PRINT (yyss, yyssp);
1399 while (yyssp != yyss)
1401 yydestruct ("Cleanup: popping",
1402 yystos[*yyssp], yyvsp);
1407 YYSTACK_FREE (yyss);
1410 if (yymsg != yymsgbuf)
1411 YYSTACK_FREE (yymsg);