49 #define YYBISON_VERSION "2.4.1"
52 #define YYSKELETON_NAME "yacc.c"
64 #define YYLSP_NEEDED 0
67 #define yyparse dataset_parse
68 #define yylex dataset_lex
69 #define yyerror dataset_error
70 #define yylval dataset_lval
71 #define yychar dataset_char
72 #define yydebug dataset_debug
73 #define yynerrs dataset_nerrs
79 #line 3 "parse_dataset.y"
113 #define YYERROR_VERBOSE 42
115 #define YYMAXDEPTH 10000000
128 #line 129 "parse_dataset.cpp"
136 #ifdef YYERROR_VERBOSE
137 # undef YYERROR_VERBOSE
138 # define YYERROR_VERBOSE 1
140 # define YYERROR_VERBOSE 0
144 #ifndef YYTOKEN_TABLE
145 # define YYTOKEN_TABLE 0
170 #define InvalidCharacter 258
171 #define Identifier 259
177 #define IndepBegin 265
186 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
191 #line 65 "parse_dataset.y"
207 #line 208 "parse_dataset.cpp"
209 # define YYSTYPE_IS_TRIVIAL 1
210 # define yystype YYSTYPE
211 # define YYSTYPE_IS_DECLARED 1
219 #line 220 "parse_dataset.cpp"
233 #elif (defined __STDC__ || defined __C99__FUNC__ \
234 || defined __cplusplus || defined _MSC_VER)
253 # ifdef __SIZE_TYPE__
254 # define YYSIZE_T __SIZE_TYPE__
255 # elif defined size_t
256 # define YYSIZE_T size_t
257 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
258 || defined __cplusplus || defined _MSC_VER)
260 # define YYSIZE_T size_t
262 # define YYSIZE_T unsigned int
266 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
271 # include <libintl.h>
272 # define YY_(msgid) dgettext ("bison-runtime", msgid)
276 # define YY_(msgid) msgid
281 #if ! defined lint || defined __GNUC__
282 # define YYUSE(e) ((void) (e))
291 #if (defined __STDC__ || defined __C99__FUNC__ \
292 || defined __cplusplus || defined _MSC_VER)
305 #if ! defined yyoverflow || YYERROR_VERBOSE
309 # ifdef YYSTACK_USE_ALLOCA
310 # if YYSTACK_USE_ALLOCA
312 # define YYSTACK_ALLOC __builtin_alloca
313 # elif defined __BUILTIN_VA_ARG_INCR
316 # define YYSTACK_ALLOC __alloca
317 # elif defined _MSC_VER
319 # define alloca _alloca
321 # define YYSTACK_ALLOC alloca
322 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
323 || defined __cplusplus || defined _MSC_VER)
333 # ifdef YYSTACK_ALLOC
335 # define YYSTACK_FREE(Ptr) do { ; } while (YYID (0))
336 # ifndef YYSTACK_ALLOC_MAXIMUM
341 # define YYSTACK_ALLOC_MAXIMUM 4032
344 # define YYSTACK_ALLOC YYMALLOC
345 # define YYSTACK_FREE YYFREE
346 # ifndef YYSTACK_ALLOC_MAXIMUM
347 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
349 # if (defined __cplusplus && ! defined _STDLIB_H \
350 && ! ((defined YYMALLOC || defined malloc) \
351 && (defined YYFREE || defined free)))
358 # define YYMALLOC malloc
359 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
360 || defined __cplusplus || defined _MSC_VER)
366 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
367 || defined __cplusplus || defined _MSC_VER)
375 #if (! defined yyoverflow \
376 && (! defined __cplusplus \
377 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
387 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
391 # define YYSTACK_BYTES(N) \
392 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
393 + YYSTACK_GAP_MAXIMUM)
398 # if defined __GNUC__ && 1 < __GNUC__
399 # define YYCOPY(To, From, Count) \
400 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
402 # define YYCOPY(To, From, Count) \
406 for (yyi = 0; yyi < (Count); yyi++) \
407 (To)[yyi] = (From)[yyi]; \
418 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
421 YYSIZE_T yynewbytes; \
422 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
423 Stack = &yyptr->Stack_alloc; \
424 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
425 yyptr += yynewbytes / sizeof (*yyptr); \
447 #define YYMAXUTOK 269
449 #define YYTRANSLATE(YYX) \
450 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
455 0, 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 15, 2, 16, 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, 2, 2, 2, 2,
467 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
468 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
469 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
470 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
471 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
472 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
473 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
474 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
475 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
476 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
477 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
478 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
479 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
480 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
481 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
489 0, 0, 3, 6, 9, 10, 13, 16, 26, 36,
490 37, 40, 43, 46, 49, 50
496 18, 0, -1, 19, 20, -1, 14, 9, -1, -1,
497 21, 20, -1, 9, 20, -1, 15, 11, 4, 23,
498 16, 22, 15, 13, 16, -1, 15, 10, 4, 8,
499 16, 22, 15, 12, 16, -1, -1, 5, 22, -1,
500 7, 22, -1, 6, 22, -1, 9, 22, -1, -1,
507 0, 89, 89, 93, 98, 99, 100, 104, 114, 125,
508 126, 129, 132, 135, 138, 139
512 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
515 static const char *
const yytname[] =
517 "$end",
"error",
"$undefined",
"InvalidCharacter",
"Identifier",
"REAL",
518 "IMAG",
"COMPLEX",
"Integer",
"Eol",
"IndepBegin",
"DepBegin",
519 "IndepEnd",
"DepEnd",
"Version",
"'<'",
"'>'",
"$accept",
"Input",
520 "VersionLine",
"VariableList",
"Variable",
"FloatList",
"IdentifierList", 0
529 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
530 265, 266, 267, 268, 269, 60, 62
537 0, 17, 18, 19, 20, 20, 20, 21, 21, 22,
538 22, 22, 22, 22, 23, 23
544 0, 2, 2, 2, 0, 2, 2, 9, 9, 0,
553 0, 0, 0, 4, 3, 1, 4, 0, 2, 4,
554 6, 0, 0, 5, 0, 14, 0, 14, 0, 9,
555 15, 9, 9, 9, 9, 9, 0, 0, 10, 12,
556 11, 13, 0, 0, 0, 0, 8, 7
562 -1, 2, 3, 8, 9, 26, 18
567 #define YYPACT_NINF -21
570 -2, 8, 14, -9, -21, -21, -9, 5, -21, -9,
571 -21, 15, 16, -21, 10, 17, 6, 17, 7, 2,
572 -21, 2, 2, 2, 2, 2, 9, 11, -21, -21,
573 -21, -21, 13, 18, 12, 19, -21, -21
579 -21, -21, -21, 4, -21, -20, 20
586 #define YYTABLE_NINF -1
589 6, 27, 28, 29, 30, 31, 7, 22, 23, 24,
590 10, 25, 1, 13, 5, 11, 12, 4, 16, 14,
591 15, 17, 19, 21, 32, 34, 33, 0, 36, 0,
592 0, 35, 0, 0, 0, 37, 0, 20
597 9, 21, 22, 23, 24, 25, 15, 5, 6, 7,
598 6, 9, 14, 9, 0, 10, 11, 9, 8, 4,
599 4, 4, 16, 16, 15, 12, 15, -1, 16, -1,
600 -1, 13, -1, -1, -1, 16, -1, 17
607 0, 14, 18, 19, 9, 0, 9, 15, 20, 21,
608 20, 10, 11, 20, 4, 4, 8, 4, 23, 16,
609 23, 16, 5, 6, 7, 9, 22, 22, 22, 22,
610 22, 22, 15, 15, 12, 13, 16, 16
613 #define yyerrok (yyerrstatus = 0)
614 #define yyclearin (yychar = YYEMPTY)
618 #define YYACCEPT goto yyacceptlab
619 #define YYABORT goto yyabortlab
620 #define YYERROR goto yyerrorlab
627 #define YYFAIL goto yyerrlab
629 #define YYRECOVERING() (!!yyerrstatus)
631 #define YYBACKUP(Token, Value) \
633 if (yychar == YYEMPTY && yylen == 1) \
637 yytoken = YYTRANSLATE (yychar); \
643 yyerror (YY_("syntax error: cannot back up")); \
650 #define YYERRCODE 256
657 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
658 #ifndef YYLLOC_DEFAULT
659 # define YYLLOC_DEFAULT(Current, Rhs, N) \
663 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
664 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
665 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
666 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
670 (Current).first_line = (Current).last_line = \
671 YYRHSLOC (Rhs, 0).last_line; \
672 (Current).first_column = (Current).last_column = \
673 YYRHSLOC (Rhs, 0).last_column; \
683 #ifndef YY_LOCATION_PRINT
684 # if YYLTYPE_IS_TRIVIAL
685 # define YY_LOCATION_PRINT(File, Loc) \
686 fprintf (File, "%d.%d-%d.%d", \
687 (Loc).first_line, (Loc).first_column, \
688 (Loc).last_line, (Loc).last_column)
690 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
698 # define YYLEX yylex (YYLEX_PARAM)
700 # define YYLEX yylex ()
708 # define YYFPRINTF fprintf
711 # define YYDPRINTF(Args) \
717 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
721 YYFPRINTF (stderr, "%s ", Title); \
722 yy_symbol_print (stderr, \
724 YYFPRINTF (stderr, "\n"); \
734 #if (defined __STDC__ || defined __C99__FUNC__ \
735 || defined __cplusplus || defined _MSC_VER)
740 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
750 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
766 #if (defined __STDC__ || defined __C99__FUNC__ \
767 || defined __cplusplus || defined _MSC_VER)
769 yy_symbol_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep)
772 yy_symbol_print (yyoutput, yytype, yyvaluep)
775 YYSTYPE const * const yyvaluep;
779 YYFPRINTF (yyoutput,
"token %s (", yytname[yytype]);
781 YYFPRINTF (yyoutput,
"nterm %s (", yytname[yytype]);
783 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
792 #if (defined __STDC__ || defined __C99__FUNC__ \
793 || defined __cplusplus || defined _MSC_VER)
798 yy_stack_print (yybottom, yytop)
804 for (; yybottom <=
yytop; yybottom++)
806 int yybot = *yybottom;
812 # define YY_STACK_PRINT(Bottom, Top) \
815 yy_stack_print ((Bottom), (Top)); \
823 #if (defined __STDC__ || defined __C99__FUNC__ \
824 || defined __cplusplus || defined _MSC_VER)
829 yy_reduce_print (yyvsp, yyrule)
834 int yynrhs = yyr2[
yyrule];
837 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
840 for (yyi = 0; yyi < yynrhs; yyi++)
843 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
844 &(yyvsp[(yyi + 1) - (yynrhs)])
850 # define YY_REDUCE_PRINT(Rule) \
853 yy_reduce_print (yyvsp, Rule); \
860 # define YYDPRINTF(Args)
861 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
862 # define YY_STACK_PRINT(Bottom, Top)
863 # define YY_REDUCE_PRINT(Rule)
869 # define YYINITDEPTH 200
880 # define YYMAXDEPTH 10000
888 # if defined __GLIBC__ && defined _STRING_H
889 # define yystrlen strlen
892 #if (defined __STDC__ || defined __C99__FUNC__ \
893 || defined __cplusplus || defined _MSC_VER)
895 yystrlen (
const char *yystr)
903 for (yylen = 0; yystr[
yylen]; yylen++)
911 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
912 # define yystpcpy stpcpy
916 #if (defined __STDC__ || defined __C99__FUNC__ \
917 || defined __cplusplus || defined _MSC_VER)
919 yystpcpy (
char *yydest,
const char *
yysrc)
922 yystpcpy (yydest, yysrc)
930 while ((*yyd++ = *yys++) !=
'\0')
947 yytnamerr (
char *yyres,
const char *yystr)
952 char const *yyp = yystr;
959 goto do_not_strip_quotes;
963 goto do_not_strip_quotes;
976 do_not_strip_quotes: ;
980 return yystrlen (yystr);
982 return yystpcpy (yyres, yystr) - yyres;
994 yysyntax_error (
char *yyresult,
int yystate,
int yychar)
996 int yyn = yypact[yystate];
1003 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1006 int yysize_overflow = 0;
1007 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1008 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1014 YY_(
"syntax error, unexpected %s");
1015 YY_(
"syntax error, unexpected %s, expecting %s");
1016 YY_(
"syntax error, unexpected %s, expecting %s or %s");
1017 YY_(
"syntax error, unexpected %s, expecting %s or %s or %s");
1018 YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s");
1022 static char const yyunexpected[] =
"syntax error, unexpected %s";
1023 static char const yyexpecting[] =
", expecting %s";
1024 static char const yyor[] =
" or %s";
1025 char yyformat[
sizeof yyunexpected
1026 +
sizeof yyexpecting - 1
1027 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1028 * (
sizeof yyor - 1))];
1029 char const *yyprefix = yyexpecting;
1033 int yyxbegin = yyn < 0 ? -yyn : 0;
1036 int yychecklim =
YYLAST - yyn + 1;
1040 yyarg[0] = yytname[
yytype];
1041 yyfmt = yystpcpy (yyformat, yyunexpected);
1043 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1044 if (yycheck[yyx + yyn] == yyx && yyx !=
YYTERROR)
1046 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1050 yyformat[
sizeof yyunexpected - 1] =
'\0';
1053 yyarg[yycount++] = yytname[yyx];
1054 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1055 yysize_overflow |= (yysize1 < yysize);
1057 yyfmt = yystpcpy (yyfmt, yyprefix);
1061 yyf =
YY_(yyformat);
1062 yysize1 = yysize + yystrlen (yyf);
1063 yysize_overflow |= (yysize1 < yysize);
1066 if (yysize_overflow)
1074 char *yyp = yyresult;
1076 while ((*yyp = *yyf) !=
'\0')
1078 if (*yyp ==
'%' && yyf[1] ==
's' && yyi < yycount)
1080 yyp += yytnamerr (yyp, yyarg[yyi++]);
1101 #if (defined __STDC__ || defined __C99__FUNC__ \
1102 || defined __cplusplus || defined _MSC_VER)
1104 yydestruct (
const char *yymsg,
int yytype,
YYSTYPE *yyvaluep)
1107 yydestruct (yymsg, yytype, yyvaluep)
1128 #ifdef YYPARSE_PARAM
1129 #if defined __STDC__ || defined __cplusplus
1130 int yyparse (
void *YYPARSE_PARAM);
1135 #if defined __STDC__ || defined __cplusplus
1158 #ifdef YYPARSE_PARAM
1159 #if (defined __STDC__ || defined __C99__FUNC__ \
1160 || defined __cplusplus || defined _MSC_VER)
1166 void *YYPARSE_PARAM;
1169 #if (defined __STDC__ || defined __C99__FUNC__ \
1170 || defined __cplusplus || defined _MSC_VER)
1216 char *yymsg = yymsgbuf;
1217 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1220 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1231 YYDPRINTF ((stderr,
"Starting parse\n"));
1258 if (yyss + yystacksize - 1 <= yyssp)
1261 YYSIZE_T yysize = yyssp - yyss + 1;
1275 yyoverflow (
YY_(
"memory exhausted"),
1276 &yyss1, yysize *
sizeof (*yyssp),
1277 &yyvs1, yysize *
sizeof (*yyvsp),
1284 # ifndef YYSTACK_RELOCATE
1285 goto yyexhaustedlab;
1289 goto yyexhaustedlab;
1299 goto yyexhaustedlab;
1302 # undef YYSTACK_RELOCATE
1309 yyssp = yyss + yysize - 1;
1310 yyvsp = yyvs + yysize - 1;
1312 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1313 (
unsigned long int) yystacksize));
1315 if (yyss + yystacksize - 1 <= yyssp)
1319 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1335 yyn = yypact[yystate];
1344 YYDPRINTF ((stderr,
"Reading a token: "));
1348 if (yychar <=
YYEOF)
1350 yychar = yytoken =
YYEOF;
1351 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1362 if (yyn < 0 ||
YYLAST < yyn || yycheck[yyn] != yytoken)
1394 yyn = yydefact[yystate];
1415 yyval = yyvsp[1-
yylen];
1424 #line 89 "parse_dataset.y"
1431 #line 93 "parse_dataset.y"
1440 #line 98 "parse_dataset.y"
1447 #line 99 "parse_dataset.y"
1454 #line 100 "parse_dataset.y"
1461 #line 104 "parse_dataset.y"
1470 free ((yyvsp[(3) - (9)].ident));
1477 #line 114 "parse_dataset.y"
1485 free ((yyvsp[(3) - (9)].ident));
1492 #line 125 "parse_dataset.y"
1499 #line 126 "parse_dataset.y"
1508 #line 129 "parse_dataset.y"
1517 #line 132 "parse_dataset.y"
1526 #line 135 "parse_dataset.y"
1533 #line 138 "parse_dataset.y"
1540 #line 139 "parse_dataset.y"
1543 free ((yyvsp[(1) - (2)].ident));
1550 #line 1551 "parse_dataset.cpp"
1567 yystate = yypgoto[yyn -
YYNTOKENS] + *yyssp;
1568 if (0 <= yystate && yystate <=
YYLAST && yycheck[yystate] == *yyssp)
1569 yystate = yytable[yystate];
1584 #if ! YYERROR_VERBOSE
1588 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1594 if (yymsg != yymsgbuf)
1602 yymsg_alloc =
sizeof yymsgbuf;
1606 if (0 < yysize && yysize <= yymsg_alloc)
1608 (void) yysyntax_error (yymsg, yystate, yychar);
1615 goto yyexhaustedlab;
1623 if (yyerrstatus == 3)
1628 if (yychar <=
YYEOF)
1631 if (yychar ==
YYEOF)
1636 yydestruct (
"Error: discarding",
1675 yyn = yypact[yystate];
1692 yydestruct (
"Error: popping",
1693 yystos[yystate], yyvsp);
1723 #if !defined(yyoverflow) || YYERROR_VERBOSE
1735 yydestruct (
"Cleanup: discarding lookahead",
1741 while (yyssp != yyss)
1743 yydestruct (
"Cleanup: popping",
1744 yystos[*yyssp], yyvsp);
1752 if (yymsg != yymsgbuf)
1756 return YYID (yyresult);
1762 #line 145 "parse_dataset.y"