47 #define YYBISON_VERSION "2.7"
50 #define YYSKELETON_NAME "yacc.c"
63 #define yyparse ppparse
65 #define yyerror pperror
68 #define yydebug ppdebug
69 #define yynerrs ppnerrs
84 #if !defined(__clang__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))
85 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
87 #pragma GCC diagnostic ignored "-Wuninitialized"
89 #elif defined(_MSC_VER)
90 #pragma warning(disable: 4065 4701)
102 #if defined(_MSC_VER)
108 #define YYENABLE_NLS 0
109 #define YYLTYPE_IS_TRIVIAL 1
110 #define YYSTYPE_IS_TRIVIAL 1
111 #define YYSTYPE_IS_DECLARED 1
130 # if defined __cplusplus && 201103L <= __cplusplus
131 # define YY_NULL nullptr
138 #ifdef YYERROR_VERBOSE
139 # undef YYERROR_VERBOSE
140 # define YYERROR_VERBOSE 1
142 # define YYERROR_VERBOSE 0
174 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
176 # define YYSTYPE_IS_TRIVIAL 1
177 # define yystype YYSTYPE
178 # define YYSTYPE_IS_DECLARED 1
183 #if defined __STDC__ || defined __cplusplus
184 int ppparse (
void *YYPARSE_PARAM);
189 #if defined __STDC__ || defined __cplusplus
214 #elif (defined __STDC__ || defined __C99__FUNC__ \
215 || defined __cplusplus || defined _MSC_VER)
234 # ifdef __SIZE_TYPE__
235 # define YYSIZE_T __SIZE_TYPE__
236 # elif defined size_t
237 # define YYSIZE_T size_t
238 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
239 || defined __cplusplus || defined _MSC_VER)
241 # define YYSIZE_T size_t
243 # define YYSIZE_T unsigned int
247 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
250 # if defined YYENABLE_NLS && YYENABLE_NLS
252 # include <libintl.h>
253 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
257 # define YY_(Msgid) Msgid
262 #if ! defined lint || defined __GNUC__
263 # define YYUSE(E) ((void) (E))
272 #if (defined __STDC__ || defined __C99__FUNC__ \
273 || defined __cplusplus || defined _MSC_VER)
286 #if ! defined yyoverflow || YYERROR_VERBOSE
290 # ifdef YYSTACK_USE_ALLOCA
291 # if YYSTACK_USE_ALLOCA
293 # define YYSTACK_ALLOC __builtin_alloca
294 # elif defined __BUILTIN_VA_ARG_INCR
297 # define YYSTACK_ALLOC __alloca
298 # elif defined _MSC_VER
300 # define alloca _alloca
302 # define YYSTACK_ALLOC alloca
303 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
304 || defined __cplusplus || defined _MSC_VER)
307 # ifndef EXIT_SUCCESS
308 # define EXIT_SUCCESS 0
315 # ifdef YYSTACK_ALLOC
317 # define YYSTACK_FREE(Ptr) do { ; } while (YYID (0))
318 # ifndef YYSTACK_ALLOC_MAXIMUM
323 # define YYSTACK_ALLOC_MAXIMUM 4032
326 # define YYSTACK_ALLOC YYMALLOC
327 # define YYSTACK_FREE YYFREE
328 # ifndef YYSTACK_ALLOC_MAXIMUM
329 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
331 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
332 && ! ((defined YYMALLOC || defined malloc) \
333 && (defined YYFREE || defined free)))
335 # ifndef EXIT_SUCCESS
336 # define EXIT_SUCCESS 0
340 # define YYMALLOC malloc
341 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
342 || defined __cplusplus || defined _MSC_VER)
348 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
349 || defined __cplusplus || defined _MSC_VER)
357 #if (! defined yyoverflow \
358 && (! defined __cplusplus \
359 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
369 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
373 # define YYSTACK_BYTES(N) \
374 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
375 + YYSTACK_GAP_MAXIMUM)
377 # define YYCOPY_NEEDED 1
384 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
387 YYSIZE_T yynewbytes; \
388 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
389 Stack = &yyptr->Stack_alloc; \
390 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
391 yyptr += yynewbytes / sizeof (*yyptr); \
397 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
401 # if defined __GNUC__ && 1 < __GNUC__
402 # define YYCOPY(Dst, Src, Count) \
403 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
405 # define YYCOPY(Dst, Src, Count) \
409 for (yyi = 0; yyi < (Count); yyi++) \
410 (Dst)[yyi] = (Src)[yyi]; \
433 #define YYMAXUTOK 267
435 #define YYTRANSLATE(YYX) \
436 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
441 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
442 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
443 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
444 2, 2, 2, 23, 2, 2, 2, 21, 8, 2,
445 25, 26, 19, 17, 2, 18, 2, 20, 2, 2,
446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
447 11, 2, 12, 2, 2, 2, 2, 2, 2, 2,
448 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
449 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
450 2, 2, 2, 2, 7, 2, 2, 2, 2, 2,
451 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
453 2, 2, 2, 2, 6, 2, 24, 2, 2, 2,
454 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
455 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
456 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
457 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
458 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
459 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
460 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
461 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
462 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
463 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
464 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
465 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
466 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
467 5, 9, 10, 13, 14, 15, 16, 22
475 0, 0, 3, 5, 7, 11, 15, 19, 23, 27,
476 31, 35, 39, 43, 47, 51, 55, 59, 63, 67,
477 71, 75, 79, 82, 85, 88, 91
483 28, 0, -1, 29, -1, 3, -1, 29, 4, 29,
484 -1, 29, 5, 29, -1, 29, 6, 29, -1, 29,
485 7, 29, -1, 29, 8, 29, -1, 29, 9, 29,
486 -1, 29, 10, 29, -1, 29, 13, 29, -1, 29,
487 14, 29, -1, 29, 12, 29, -1, 29, 11, 29,
488 -1, 29, 15, 29, -1, 29, 16, 29, -1, 29,
489 18, 29, -1, 29, 17, 29, -1, 29, 21, 29,
490 -1, 29, 20, 29, -1, 29, 19, 29, -1, 23,
491 29, -1, 24, 29, -1, 18, 29, -1, 17, 29,
498 0, 91, 91, 98, 99, 102, 105, 108, 111, 114,
499 117, 120, 123, 126, 129, 132, 135, 138, 141, 144,
500 157, 170, 173, 176, 179, 182, 185
504 #if YYDEBUG || YYERROR_VERBOSE || 0
507 static const char *
const yytname[] =
509 "$end",
"error",
"$undefined",
"TOK_CONST_INT",
"TOK_OP_OR",
510 "TOK_OP_AND",
"'|'",
"'^'",
"'&'",
"TOK_OP_NE",
"TOK_OP_EQ",
"'<'",
511 "'>'",
"TOK_OP_GE",
"TOK_OP_LE",
"TOK_OP_RIGHT",
"TOK_OP_LEFT",
"'+'",
512 "'-'",
"'*'",
"'/'",
"'%'",
"TOK_UNARY",
"'!'",
"'~'",
"'('",
"')'",
513 "$accept",
"input",
"expression",
YY_NULL
522 0, 256, 257, 258, 259, 260, 124, 94, 38, 261,
523 262, 60, 62, 263, 264, 265, 266, 43, 45, 42,
524 47, 37, 267, 33, 126, 40, 41
531 0, 27, 28, 29, 29, 29, 29, 29, 29, 29,
532 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
533 29, 29, 29, 29, 29, 29, 29
539 0, 2, 1, 1, 3, 3, 3, 3, 3, 3,
540 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
549 0, 3, 0, 0, 0, 0, 0, 0, 2, 25,
550 24, 22, 23, 0, 1, 0, 0, 0, 0, 0,
551 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
552 0, 0, 0, 26, 4, 5, 6, 7, 8, 9,
553 10, 14, 13, 11, 12, 15, 16, 18, 17, 21,
565 #define YYPACT_NINF -11
568 46, -11, 46, 46, 46, 46, 46, 12, 68, -11,
569 -11, -11, -11, 27, -11, 46, 46, 46, 46, 46,
570 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
571 46, 46, 46, -11, 85, 101, 116, 130, 143, 154,
572 154, -10, -10, -10, -10, 37, 37, 31, 31, -11,
585 #define YYTABLE_NINF -1
588 9, 10, 11, 12, 13, 26, 27, 28, 29, 30,
589 31, 32, 14, 34, 35, 36, 37, 38, 39, 40,
590 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
591 51, 15, 16, 17, 18, 19, 20, 21, 22, 23,
592 24, 25, 26, 27, 28, 29, 30, 31, 32, 1,
593 30, 31, 32, 33, 28, 29, 30, 31, 32, 0,
594 0, 0, 0, 2, 3, 0, 0, 0, 0, 4,
595 5, 6, 15, 16, 17, 18, 19, 20, 21, 22,
596 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
597 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
598 26, 27, 28, 29, 30, 31, 32, 17, 18, 19,
599 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
600 30, 31, 32, 18, 19, 20, 21, 22, 23, 24,
601 25, 26, 27, 28, 29, 30, 31, 32, 19, 20,
602 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
603 31, 32, 20, 21, 22, 23, 24, 25, 26, 27,
604 28, 29, 30, 31, 32, 22, 23, 24, 25, 26,
605 27, 28, 29, 30, 31, 32
608 #define yypact_value_is_default(Yystate) \
609 (!!((Yystate) == (-11)))
611 #define yytable_value_is_error(Yytable_value) \
616 2, 3, 4, 5, 6, 15, 16, 17, 18, 19,
617 20, 21, 0, 15, 16, 17, 18, 19, 20, 21,
618 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
619 32, 4, 5, 6, 7, 8, 9, 10, 11, 12,
620 13, 14, 15, 16, 17, 18, 19, 20, 21, 3,
621 19, 20, 21, 26, 17, 18, 19, 20, 21, -1,
622 -1, -1, -1, 17, 18, -1, -1, -1, -1, 23,
623 24, 25, 4, 5, 6, 7, 8, 9, 10, 11,
624 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
625 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
626 15, 16, 17, 18, 19, 20, 21, 6, 7, 8,
627 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
628 19, 20, 21, 7, 8, 9, 10, 11, 12, 13,
629 14, 15, 16, 17, 18, 19, 20, 21, 8, 9,
630 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
631 20, 21, 9, 10, 11, 12, 13, 14, 15, 16,
632 17, 18, 19, 20, 21, 11, 12, 13, 14, 15,
633 16, 17, 18, 19, 20, 21
640 0, 3, 17, 18, 23, 24, 25, 28, 29, 29,
641 29, 29, 29, 29, 0, 4, 5, 6, 7, 8,
642 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
643 19, 20, 21, 26, 29, 29, 29, 29, 29, 29,
644 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
648 #define yyerrok (yyerrstatus = 0)
649 #define yyclearin (yychar = YYEMPTY)
653 #define YYACCEPT goto yyacceptlab
654 #define YYABORT goto yyabortlab
655 #define YYERROR goto yyerrorlab
665 #define YYFAIL goto yyerrlab
673 #define YYRECOVERING() (!!yyerrstatus)
675 #define YYBACKUP(Token, Value) \
677 if (yychar == YYEMPTY) \
681 YYPOPSTACK (yylen); \
687 yyerror (context, YY_("syntax error: cannot back up")); \
694 #define YYERRCODE 256
698 #ifndef YY_LOCATION_PRINT
699 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
705 # define YYLEX yylex (&yylval, YYLEX_PARAM)
707 # define YYLEX yylex (&yylval, context)
715 # define YYFPRINTF fprintf
718 # define YYDPRINTF(Args) \
724 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
728 YYFPRINTF (stderr, "%s ", Title); \
729 yy_symbol_print (stderr, \
730 Type, Value, context); \
731 YYFPRINTF (stderr, "\n"); \
741 #if (defined __STDC__ || defined __C99__FUNC__ \
742 || defined __cplusplus || defined _MSC_VER)
747 yy_symbol_value_print (yyoutput, yytype, yyvaluep, context)
754 FILE *yyo = yyoutput;
761 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
777 #if (defined __STDC__ || defined __C99__FUNC__ \
778 || defined __cplusplus || defined _MSC_VER)
780 yy_symbol_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep, Context *context)
783 yy_symbol_print (yyoutput, yytype, yyvaluep, context)
791 YYFPRINTF (yyoutput,
"token %s (", yytname[yytype]);
793 YYFPRINTF (yyoutput,
"nterm %s (", yytname[yytype]);
795 yy_symbol_value_print (yyoutput, yytype, yyvaluep, context);
796 YYFPRINTF (yyoutput,
")");
804 #if (defined __STDC__ || defined __C99__FUNC__ \
805 || defined __cplusplus || defined _MSC_VER)
810 yy_stack_print (yybottom, yytop)
815 YYFPRINTF (stderr,
"Stack now");
816 for (; yybottom <= yytop; yybottom++)
818 int yybot = *yybottom;
819 YYFPRINTF (stderr,
" %d", yybot);
821 YYFPRINTF (stderr,
"\n");
824 # define YY_STACK_PRINT(Bottom, Top) \
827 yy_stack_print ((Bottom), (Top)); \
835 #if (defined __STDC__ || defined __C99__FUNC__ \
836 || defined __cplusplus || defined _MSC_VER)
838 yy_reduce_print (
YYSTYPE *
yyvsp,
int yyrule, Context *context)
841 yy_reduce_print (yyvsp, yyrule, context)
847 int yynrhs = yyr2[yyrule];
849 unsigned long int yylno = yyrline[yyrule];
850 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
853 for (yyi = 0; yyi < yynrhs; yyi++)
855 YYFPRINTF (stderr,
" $%d = ", yyi + 1);
856 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
857 &(yyvsp[(yyi + 1) - (yynrhs)])
859 YYFPRINTF (stderr,
"\n");
863 # define YY_REDUCE_PRINT(Rule) \
866 yy_reduce_print (yyvsp, Rule, context); \
873 # define YYDPRINTF(Args)
874 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
875 # define YY_STACK_PRINT(Bottom, Top)
876 # define YY_REDUCE_PRINT(Rule)
882 # define YYINITDEPTH 200
893 # define YYMAXDEPTH 10000
900 # if defined __GLIBC__ && defined _STRING_H
901 # define yystrlen strlen
904 #if (defined __STDC__ || defined __C99__FUNC__ \
905 || defined __cplusplus || defined _MSC_VER)
907 yystrlen (
const char *yystr)
915 for (yylen = 0; yystr[
yylen]; yylen++)
923 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
924 # define yystpcpy stpcpy
928 #if (defined __STDC__ || defined __C99__FUNC__ \
929 || defined __cplusplus || defined _MSC_VER)
931 yystpcpy (
char *yydest,
const char *yysrc)
934 yystpcpy (yydest, yysrc)
940 const char *yys = yysrc;
942 while ((*yyd++ = *yys++) !=
'\0')
959 yytnamerr (
char *yyres,
const char *yystr)
964 char const *yyp = yystr;
971 goto do_not_strip_quotes;
975 goto do_not_strip_quotes;
988 do_not_strip_quotes: ;
992 return yystrlen (yystr);
994 return yystpcpy (yyres, yystr) - yyres;
1012 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1014 const char *yyformat =
YY_NULL;
1016 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1050 int yyn = yypact[*
yyssp];
1051 yyarg[yycount++] = yytname[
yytoken];
1057 int yyxbegin = yyn < 0 ? -yyn : 0;
1059 int yychecklim =
YYLAST - yyn + 1;
1063 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1064 if (yycheck[yyx + yyn] == yyx && yyx !=
YYTERROR
1067 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1073 yyarg[yycount++] = yytname[yyx];
1076 if (! (yysize <= yysize1
1087 # define YYCASE_(N, S) \
1091 YYCASE_(0,
YY_(
"syntax error"));
1092 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
1093 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1094 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1095 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1096 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1101 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1107 if (*yymsg_alloc < yysize)
1109 *yymsg_alloc = 2 * yysize;
1110 if (! (yysize <= *yymsg_alloc
1122 while ((*yyp = *yyformat) !=
'\0')
1123 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1125 yyp += yytnamerr (yyp, yyarg[yyi++]);
1143 #if (defined __STDC__ || defined __C99__FUNC__ \
1144 || defined __cplusplus || defined _MSC_VER)
1149 yydestruct (yymsg, yytype, yyvaluep, context)
1178 #ifdef YYPARSE_PARAM
1179 #if (defined __STDC__ || defined __C99__FUNC__ \
1180 || defined __cplusplus || defined _MSC_VER)
1186 void *YYPARSE_PARAM;
1189 #if (defined __STDC__ || defined __C99__FUNC__ \
1190 || defined __cplusplus || defined _MSC_VER)
1204 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
1206 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1207 _Pragma ("GCC diagnostic push") \
1208 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
1209 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
1210 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
1211 _Pragma ("GCC diagnostic pop")
1216 # define YY_INITIAL_VALUE(Value) = Value
1218 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1219 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1220 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
1222 #ifndef YY_INITIAL_VALUE
1223 # define YY_INITIAL_VALUE(Value)
1266 char *yymsg = yymsgbuf;
1267 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1270 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1276 yyssp = yyss =
yyssa;
1277 yyvsp = yyvs =
yyvsa;
1280 YYDPRINTF ((stderr,
"Starting parse\n"));
1299 if (yyss + yystacksize - 1 <= yyssp)
1302 YYSIZE_T yysize = yyssp - yyss + 1;
1316 yyoverflow (
YY_(
"memory exhausted"),
1317 &yyss1, yysize *
sizeof (*yyssp),
1318 &yyvs1, yysize *
sizeof (*yyvsp),
1325 # ifndef YYSTACK_RELOCATE
1326 goto yyexhaustedlab;
1330 goto yyexhaustedlab;
1340 goto yyexhaustedlab;
1343 # undef YYSTACK_RELOCATE
1350 yyssp = yyss + yysize - 1;
1351 yyvsp = yyvs + yysize - 1;
1353 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1354 (
unsigned long int) yystacksize));
1356 if (yyss + yystacksize - 1 <= yyssp)
1360 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1385 YYDPRINTF ((stderr,
"Reading a token: "));
1391 yychar = yytoken =
YYEOF;
1392 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1403 if (yyn < 0 ||
YYLAST < yyn || yycheck[yyn] != yytoken)
1458 yyval = yyvsp[1-
yylen];
1467 *(context->result) = static_cast<int>((yyvsp[(1) - (1)]));
1475 (
yyval) = (yyvsp[(1) - (3)]) || (yyvsp[(3) - (3)]);
1482 (
yyval) = (yyvsp[(1) - (3)]) && (yyvsp[(3) - (3)]);
1489 (
yyval) = (yyvsp[(1) - (3)]) | (yyvsp[(3) - (3)]);
1496 (
yyval) = (yyvsp[(1) - (3)]) ^ (yyvsp[(3) - (3)]);
1503 (
yyval) = (yyvsp[(1) - (3)]) & (yyvsp[(3) - (3)]);
1510 (
yyval) = (yyvsp[(1) - (3)]) != (yyvsp[(3) - (3)]);
1517 (
yyval) = (yyvsp[(1) - (3)]) == (yyvsp[(3) - (3)]);
1524 (
yyval) = (yyvsp[(1) - (3)]) >= (yyvsp[(3) - (3)]);
1531 (
yyval) = (yyvsp[(1) - (3)]) <= (yyvsp[(3) - (3)]);
1538 (
yyval) = (yyvsp[(1) - (3)]) > (yyvsp[(3) - (3)]);
1545 (
yyval) = (yyvsp[(1) - (3)]) < (yyvsp[(3) - (3)]);
1552 (
yyval) = (yyvsp[(1) - (3)]) >> (yyvsp[(3) - (3)]);
1559 (
yyval) = (yyvsp[(1) - (3)]) << (yyvsp[(3) - (3)]);
1566 (
yyval) = (yyvsp[(1) - (3)]) - (yyvsp[(3) - (3)]);
1573 (
yyval) = (yyvsp[(1) - (3)]) + (yyvsp[(3) - (3)]);
1580 if ((yyvsp[(3) - (3)]) == 0) {
1581 std::ostringstream
stream;
1582 stream << (yyvsp[(1) - (3)]) <<
" % " << (yyvsp[(3) - (3)]);
1585 context->token->location,
1589 (
yyval) = (yyvsp[(1) - (3)]) % (yyvsp[(3) - (3)]);
1597 if ((yyvsp[(3) - (3)]) == 0) {
1598 std::ostringstream
stream;
1599 stream << (yyvsp[(1) - (3)]) <<
" / " << (yyvsp[(3) - (3)]);
1602 context->token->location,
1606 (
yyval) = (yyvsp[(1) - (3)]) / (yyvsp[(3) - (3)]);
1614 (
yyval) = (yyvsp[(1) - (3)]) * (yyvsp[(3) - (3)]);
1621 (
yyval) = ! (yyvsp[(2) - (2)]);
1628 (
yyval) = ~ (yyvsp[(2) - (2)]);
1635 (
yyval) = - (yyvsp[(2) - (2)]);
1642 (
yyval) = + (yyvsp[(2) - (2)]);
1649 (
yyval) = (yyvsp[(2) - (3)]);
1683 if (0 <= yystate && yystate <=
YYLAST && yycheck[yystate] == *yyssp)
1703 #if ! YYERROR_VERBOSE
1706 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1709 char const *yymsgp =
YY_(
"syntax error");
1710 int yysyntax_error_status;
1711 yysyntax_error_status = YYSYNTAX_ERROR;
1712 if (yysyntax_error_status == 0)
1714 else if (yysyntax_error_status == 1)
1716 if (yymsg != yymsgbuf)
1722 yymsg_alloc =
sizeof yymsgbuf;
1723 yysyntax_error_status = 2;
1727 yysyntax_error_status = YYSYNTAX_ERROR;
1732 if (yysyntax_error_status == 2)
1733 goto yyexhaustedlab;
1735 # undef YYSYNTAX_ERROR
1741 if (yyerrstatus == 3)
1746 if (yychar <=
YYEOF)
1749 if (yychar ==
YYEOF)
1755 yytoken, &
yylval, context);
1811 yystos[yystate], yyvsp, context);
1843 #if !defined yyoverflow || YYERROR_VERBOSE
1860 yytoken, &
yylval, context);
1866 while (yyssp != yyss)
1869 yystos[*yyssp], yyvsp, context);
1877 if (yymsg != yymsgbuf)
1881 return YYID (yyresult);
1893 switch (token->
type)
1897 unsigned int val = 0;
1898 if (!token->
uValue(&val))
1915 case '|': type =
'|';
break;
1916 case '^': type =
'^';
break;
1917 case '&': type =
'&';
break;
1918 case '>': type =
'>';
break;
1919 case '<': type =
'<';
break;
1920 case '-': type =
'-';
break;
1921 case '+': type =
'+';
break;
1922 case '%': type =
'%';
break;
1923 case '/': type =
'/';
break;
1924 case '*': type =
'*';
break;
1925 case '!': type =
'!';
break;
1926 case '~': type =
'~';
break;
1927 case '(': type =
'(';
break;
1928 case ')': type =
')';
break;
1934 if (type != 0) context->lexer->lex(token);
1939 void yyerror(Context* context,
const char* reason)
1942 context->token->location,
1950 mDiagnostics(diagnostics)
1957 context.diagnostics = mDiagnostics;
1958 context.lexer = mLexer;
1959 context.token = token;
#define YY_REDUCE_PRINT(Rule)
GLuint const GLfloat * val
GLint GLenum GLsizei GLsizei GLsizei GLint GLenum GLenum type
GLvoid **typedef void(GLAPIENTRY *PFNGLGETVERTEXATTRIBDVPROC)(GLuint
void * yyalloc(yy_size_t, yyscan_t yyscanner)
bool parse(Token *token, int *result)
#define YY_STACK_PRINT(Bottom, Top)
static const yytype_uint8 yytranslate[]
static YYSTYPE yyval_default
#define YYSTACK_ALLOC_MAXIMUM
yydestruct("Cleanup: discarding lookahead", yytoken,&yylval,&yylloc, context)
#define YY_INITIAL_VALUE(Value)
static const yytype_int8 yycheck[]
static const yytype_uint8 yytable[]
unsigned short int yytype_uint16
static void const char * yymsg
static const yytype_int16 yypact[]
static const yytype_uint8 yydefact[]
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
bool uValue(unsigned int *value) const
void report(ID id, const SourceLocation &loc, const std::string &text)
static const yytype_uint8 yyr2[]
#define yypact_value_is_default(Yystate)
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
static const yytype_int8 yypgoto[]
unsigned char yytype_uint8
GLsizei const GLcharARB ** string
#define yytable_value_is_error(Yytable_value)
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
yytype_int16 yyssa[YYINITDEPTH]
static const yytype_uint8 yyr1[]
static const yytype_uint8 yystos[]
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
YYSTYPE yyvsa[YYINITDEPTH]
static const yytype_int8 yydefgoto[]
ExpressionParser(Lexer *lexer, Diagnostics *diagnostics)