47 #define YYBISON_VERSION "3.0.1"
50 #define YYSKELETON_NAME "yacc.c"
63 #define yyparse he5dasparse
64 #define yylex he5daslex
65 #define yyerror he5daserror
66 #define yydebug he5dasdebug
67 #define yynerrs he5dasnerrs
69 #define yylval he5daslval
70 #define yychar he5daschar
74 #line 75 "he5das.tab.cc"
77 # if defined __cplusplus && 201103L <= __cplusplus
78 # define YY_NULLPTR nullptr
85 #ifdef YYERROR_VERBOSE
86 # undef YYERROR_VERBOSE
87 # define YYERROR_VERBOSE 1
89 # define YYERROR_VERBOSE 0
94 #ifndef YY_HE5DAS_HE5DAS_TAB_HH_INCLUDED
95 # define YY_HE5DAS_HE5DAS_TAB_HH_INCLUDED
106 #define YYSTYPE char *
115 #define ATTR_OBJ(arg) ((AttrTable *)((parser_arg *)(arg))->_object)
116 #define POP (attr_tab_stack->pop_back())
117 #define PUSH(x) (attr_tab_stack->push_back(x))
118 #define STACK_EMPTY (attr_tab_stack->empty())
119 #define TYPE_NAME_VALUE(x) type << " " << name << " " << (x)
120 #define TOP_OF_STACK (attr_tab_stack->back())
141 #line 142 "he5das.tab.cc"
160 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
162 # define YYSTYPE_IS_TRIVIAL 1
163 # define YYSTYPE_IS_DECLARED 1
175 #line 176 "he5das.tab.cc"
182 static int commentnum=0;
184 static vector<AttrTable *> *attr_tab_stack;
185 static string NO_DAS_MSG =
186 "The attribute object returned from the dataset was null\n\
187 Check that the URL is correct.";
191 static void process_group(parser_arg *arg,
const string &s);
194 #line 195 "he5das.tab.cc"
225 # ifdef __SIZE_TYPE__
226 # define YYSIZE_T __SIZE_TYPE__
227 # elif defined size_t
228 # define YYSIZE_T size_t
229 # elif ! defined YYSIZE_T
231 # define YYSIZE_T size_t
233 # define YYSIZE_T unsigned int
237 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
240 # if defined YYENABLE_NLS && YYENABLE_NLS
242 # include <libintl.h>
243 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
247 # define YY_(Msgid) Msgid
252 # if (defined __GNUC__ \
253 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
254 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
255 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
257 # define YY_ATTRIBUTE(Spec)
261 #ifndef YY_ATTRIBUTE_PURE
262 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
265 #ifndef YY_ATTRIBUTE_UNUSED
266 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
269 #if !defined _Noreturn \
270 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
271 # if defined _MSC_VER && 1200 <= _MSC_VER
272 # define _Noreturn __declspec (noreturn)
274 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
279 #if ! defined lint || defined __GNUC__
280 # define YYUSE(E) ((void) (E))
285 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
287 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
288 _Pragma ("GCC diagnostic push") \
289 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
290 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
291 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
292 _Pragma ("GCC diagnostic pop")
294 # define YY_INITIAL_VALUE(Value) Value
296 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
297 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
298 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
300 #ifndef YY_INITIAL_VALUE
301 # define YY_INITIAL_VALUE(Value)
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 EXIT_SUCCESS
325 # ifndef EXIT_SUCCESS
326 # define EXIT_SUCCESS 0
333 # ifdef YYSTACK_ALLOC
335 # define YYSTACK_FREE(Ptr) do { ; } while (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 EXIT_SUCCESS \
350 && ! ((defined YYMALLOC || defined malloc) \
351 && (defined YYFREE || defined free)))
353 # ifndef EXIT_SUCCESS
354 # define EXIT_SUCCESS 0
358 # define YYMALLOC malloc
359 # if ! defined malloc && ! defined EXIT_SUCCESS
365 # if ! defined free && ! defined EXIT_SUCCESS
373 #if (! defined yyoverflow \
374 && (! defined __cplusplus \
375 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
385 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
389 # define YYSTACK_BYTES(N) \
390 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
391 + YYSTACK_GAP_MAXIMUM)
393 # define YYCOPY_NEEDED 1
400 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
403 YYSIZE_T yynewbytes; \
404 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
405 Stack = &yyptr->Stack_alloc; \
406 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
407 yyptr += yynewbytes / sizeof (*yyptr); \
413 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
417 # if defined __GNUC__ && 1 < __GNUC__
418 # define YYCOPY(Dst, Src, Count) \
419 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
421 # define YYCOPY(Dst, Src, Count) \
425 for (yyi = 0; yyi < (Count); yyi++) \
426 (Dst)[yyi] = (Src)[yyi]; \
450 #define YYMAXUTOK 265
452 #define YYTRANSLATE(YYX) \
453 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
459 0, 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 12, 13, 2, 2, 14, 2, 2, 2, 2, 2,
464 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
465 2, 11, 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, 2, 2, 2, 2,
481 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
482 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
483 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
484 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
492 0, 146, 146, 146, 151, 156, 160, 155, 167, 171,
493 166, 178, 177, 182, 199, 215, 216, 217, 220, 221,
494 222, 223, 229, 230, 233, 257, 277, 294, 313, 330,
499 #if YYDEBUG || YYERROR_VERBOSE || 0
502 static const char *
const yytname[] =
504 "$end",
"error",
"$undefined",
"DAS_GROUP",
"DAS_END_GROUP",
505 "DAS_OBJECT",
"DAS_END_OBJECT",
"DAS_INT",
"DAS_FLOAT",
"DAS_STR",
506 "DAS_COMMENT",
"'='",
"'('",
"')'",
"','",
"$accept",
"attributes",
507 "$@1",
"attribute",
"$@2",
"$@3",
"$@4",
"$@5",
"$@6",
"attr_list",
508 "data",
"data2",
"ints",
"floats",
"floatints",
"float_or_int",
"strs",
YY_NULLPTR
517 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
522 #define YYPACT_NINF -8
524 #define yypact_value_is_default(Yystate) \
525 (!!((Yystate) == (-8)))
527 #define YYTABLE_NINF -16
529 #define yytable_value_is_error(Yytable_value) \
536 -8, 2, 48, -8, -8, -7, 6, -8, -8, -8,
537 -8, 4, 10, 11, -8, -8, 47, 5, 15, -8,
538 -8, -8, 27, -8, 9, 12, 16, -8, 28, 38,
539 -8, -8, 29, 26, -8, 16, 39, 37, 41, -8,
540 58, 46, -8, 53, -8, -8, -8, 52, 54, -8,
549 2, 0, 0, 1, 14, 0, 0, 11, 13, 4,
550 3, 0, 0, 0, 5, 8, 0, 0, 0, 24,
551 26, 32, 0, 12, 18, 19, 20, 16, 0, 0,
552 31, 30, 0, 22, 28, 23, 0, 0, 0, 17,
553 0, 0, 21, 0, 25, 27, 33, 0, 0, 29,
560 -8, -8, -8, -1, -8, -8, -8, -8, -8, 49,
561 -8, -8, -8, -8, -8, 25, 50
567 -1, 1, 2, 27, 17, 40, 18, 41, 13, 28,
568 23, 32, 24, 25, 33, 34, 26
576 9, 10, 3, 4, 11, 5, 4, 6, 5, -15,
577 6, 7, 8, 14, 7, 8, 4, 12, 5, 15,
578 6, -15, 16, 36, 7, 8, 37, 39, 39, 4,
579 38, 5, -6, 6, 30, 31, 21, 7, 8, 4,
580 43, 5, 42, 6, -9, 45, 44, 7, 8, 4,
581 46, 5, 48, 6, 19, 20, 21, 7, 8, 22,
582 30, 31, 47, 50, 52, 51, 53, 29, 49, 0,
588 1, 2, 0, 1, 11, 3, 1, 5, 3, 4,
589 5, 9, 10, 9, 9, 10, 1, 11, 3, 9,
590 5, 6, 11, 14, 9, 10, 14, 28, 29, 1,
591 14, 3, 4, 5, 7, 8, 9, 9, 10, 1,
592 14, 3, 13, 5, 6, 8, 7, 9, 10, 1,
593 9, 3, 6, 5, 7, 8, 9, 9, 10, 12,
594 7, 8, 4, 11, 9, 11, 9, 18, 43, -1,
602 0, 16, 17, 0, 1, 3, 5, 9, 10, 18,
603 18, 11, 11, 23, 9, 9, 11, 19, 21, 7,
604 8, 9, 12, 25, 27, 28, 31, 18, 24, 24,
605 7, 8, 26, 29, 30, 31, 14, 14, 14, 18,
606 20, 22, 13, 14, 7, 8, 9, 4, 6, 30,
613 0, 15, 17, 16, 16, 19, 20, 18, 21, 22,
614 18, 23, 18, 18, 18, 24, 24, 24, 25, 25,
615 25, 25, 26, 26, 27, 27, 28, 28, 29, 29,
622 0, 2, 0, 2, 2, 0, 0, 9, 0, 0,
623 9, 0, 4, 1, 1, 0, 1, 2, 1, 1,
624 1, 3, 1, 1, 1, 3, 1, 3, 1, 3,
629 #define yyerrok (yyerrstatus = 0)
630 #define yyclearin (yychar = YYEMPTY)
634 #define YYACCEPT goto yyacceptlab
635 #define YYABORT goto yyabortlab
636 #define YYERROR goto yyerrorlab
639 #define YYRECOVERING() (!!yyerrstatus)
641 #define YYBACKUP(Token, Value) \
643 if (yychar == YYEMPTY) \
647 YYPOPSTACK (yylen); \
653 yyerror (arg, YY_("syntax error: cannot back up")); \
660 #define YYERRCODE 256
669 # define YYFPRINTF fprintf
672 # define YYDPRINTF(Args) \
679 #ifndef YY_LOCATION_PRINT
680 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
684 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
688 YYFPRINTF (stderr, "%s ", Title); \
689 yy_symbol_print (stderr, \
691 YYFPRINTF (stderr, "\n"); \
701 yy_symbol_value_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep, parser_arg *arg)
703 FILE *yyo = yyoutput;
710 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
721 yy_symbol_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep, parser_arg *arg)
724 yytype <
YYNTOKENS ?
"token" :
"nterm", yytname[yytype]);
726 yy_symbol_value_print (yyoutput, yytype, yyvaluep, arg);
739 for (; yybottom <= yytop; yybottom++)
741 int yybot = *yybottom;
747 # define YY_STACK_PRINT(Bottom, Top) \
750 yy_stack_print ((Bottom), (Top)); \
761 unsigned long int yylno = yyrline[yyrule];
762 int yynrhs = yyr2[yyrule];
764 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
767 for (yyi = 0; yyi < yynrhs; yyi++)
770 yy_symbol_print (stderr,
771 yystos[yyssp[yyi + 1 - yynrhs]],
772 &(yyvsp[(yyi + 1) - (yynrhs)])
778 # define YY_REDUCE_PRINT(Rule) \
781 yy_reduce_print (yyssp, yyvsp, Rule, arg); \
788 # define YYDPRINTF(Args)
789 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
790 # define YY_STACK_PRINT(Bottom, Top)
791 # define YY_REDUCE_PRINT(Rule)
797 # define YYINITDEPTH 200
808 # define YYMAXDEPTH 10000
815 # if defined __GLIBC__ && defined _STRING_H
816 # define yystrlen strlen
820 yystrlen (
const char *yystr)
823 for (yylen = 0; yystr[yylen]; yylen++)
831 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
832 # define yystpcpy stpcpy
837 yystpcpy (
char *yydest,
const char *yysrc)
840 const char *yys = yysrc;
842 while ((*yyd++ = *yys++) !=
'\0')
859 yytnamerr (
char *yyres,
const char *yystr)
864 char const *yyp = yystr;
871 goto do_not_strip_quotes;
875 goto do_not_strip_quotes;
888 do_not_strip_quotes: ;
892 return yystrlen (yystr);
894 return yystpcpy (yyres, yystr) - yyres;
907 yysyntax_error (
YYSIZE_T *yymsg_alloc,
char **yymsg,
912 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
916 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
946 int yyn = yypact[*yyssp];
947 yyarg[yycount++] = yytname[yytoken];
953 int yyxbegin = yyn < 0 ? -yyn : 0;
955 int yychecklim =
YYLAST - yyn + 1;
959 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
960 if (yycheck[yyx + yyn] == yyx && yyx !=
YYTERROR
963 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
969 yyarg[yycount++] = yytname[yyx];
972 if (! (yysize <= yysize1
983 # define YYCASE_(N, S) \
987 YYCASE_(0,
YY_(
"syntax error"));
988 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
989 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
990 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
991 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
992 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
997 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1003 if (*yymsg_alloc < yysize)
1005 *yymsg_alloc = 2 * yysize;
1006 if (! (yysize <= *yymsg_alloc
1018 while ((*yyp = *yyformat) !=
'\0')
1019 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1021 yyp += yytnamerr (yyp, yyarg[yyi++]);
1039 yydestruct (
const char *yymsg,
int yytype,
YYSTYPE *yyvaluep, parser_arg *arg)
1105 char *yymsg = yymsgbuf;
1106 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1109 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1115 yyssp = yyss = yyssa;
1116 yyvsp = yyvs = yyvsa;
1119 YYDPRINTF ((stderr,
"Starting parse\n"));
1138 if (yyss + yystacksize - 1 <= yyssp)
1141 YYSIZE_T yysize = yyssp - yyss + 1;
1155 yyoverflow (
YY_(
"memory exhausted"),
1156 &yyss1, yysize *
sizeof (*yyssp),
1157 &yyvs1, yysize *
sizeof (*yyvsp),
1164 # ifndef YYSTACK_RELOCATE
1165 goto yyexhaustedlab;
1169 goto yyexhaustedlab;
1179 goto yyexhaustedlab;
1182 # undef YYSTACK_RELOCATE
1189 yyssp = yyss + yysize - 1;
1190 yyvsp = yyvs + yysize - 1;
1192 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1193 (
unsigned long int) yystacksize));
1195 if (yyss + yystacksize - 1 <= yyssp)
1199 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1215 yyn = yypact[yystate];
1224 YYDPRINTF ((stderr,
"Reading a token: "));
1228 if (yychar <=
YYEOF)
1230 yychar = yytoken =
YYEOF;
1231 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1242 if (yyn < 0 ||
YYLAST < yyn || yycheck[yyn] != yytoken)
1276 yyn = yydefact[yystate];
1297 yyval = yyvsp[1-yylen];
1304 #line 146 "he5das.yy"
1306 if (!attr_tab_stack)
1307 attr_tab_stack =
new vector<AttrTable *>;
1309 #line 1310 "he5das.tab.cc"
1313 #line 156 "he5das.yy"
1315 process_group((parser_arg *)arg, (yyvsp[0]));
1317 #line 1318 "he5das.tab.cc"
1321 #line 160 "he5das.yy"
1324 DBG(cerr <<
" Popped attr_tab: " <<
TOP_OF_STACK << endl);
1327 #line 1328 "he5das.tab.cc"
1331 #line 167 "he5das.yy"
1333 process_group((parser_arg *)arg, (yyvsp[0]));
1335 #line 1336 "he5das.tab.cc"
1339 #line 171 "he5das.yy"
1342 DBG(cerr <<
" Popped attr_tab: " <<
TOP_OF_STACK << endl);
1345 #line 1346 "he5das.tab.cc"
1349 #line 178 "he5das.yy"
1353 #line 1354 "he5das.tab.cc"
1357 #line 182 "he5das.yy"
1360 name <<
"comment" << commentnum++;
1361 cerr << name.str() <<
":" << (yyvsp[0]) << endl;
1367 if (!a->append_attr(name.str(),
"String", (yyvsp[0]))) {
1369 msg <<
"`" << name.str() <<
"' previously defined.";
1370 parse_error((parser_arg *)arg, msg.str().c_str());
1375 #line 1376 "he5das.tab.cc"
1379 #line 199 "he5das.yy"
1386 a->append_attr(name.c_str(),
"String",
1387 "\"Error processing EOS attributes\"");
1388 parse_error((parser_arg *)arg, NO_DAS_MSG.c_str());
1393 #line 1394 "he5das.tab.cc"
1397 #line 234 "he5das.yy"
1406 DBG(cerr <<
" to AttrTable: " <<
TOP_OF_STACK << endl);
1407 if (!(check_int32((yyvsp[0]))
1408 || check_uint32((yyvsp[0])))) {
1410 msg <<
"`" << (yyvsp[0]) <<
"' is not an Int32 value.";
1411 parse_error((parser_arg *)arg, msg.str().c_str());
1414 else if (!
TOP_OF_STACK->append_attr(name,
"Int32", (yyvsp[0]))) {
1416 msg <<
"`" << name <<
"' previously defined.";
1417 parse_error((parser_arg *)arg, msg.str().c_str());
1421 #line 1422 "he5das.tab.cc"
1425 #line 258 "he5das.yy"
1429 if (!(check_int32((yyvsp[0]))
1430 || check_uint32((yyvsp[-2])))) {
1432 msg <<
"`" << (yyvsp[-2]) <<
"' is not an Int32 value.";
1433 parse_error((parser_arg *)arg, msg.str().c_str());
1436 else if (!
TOP_OF_STACK->append_attr(name, type, (yyvsp[0]))) {
1438 msg <<
"`" << name <<
"' previously defined.";
1439 parse_error((parser_arg *)arg, msg.str().c_str());
1443 #line 1444 "he5das.tab.cc"
1447 #line 278 "he5das.yy"
1451 if (!check_float64((yyvsp[0]))) {
1453 msg <<
"`" << (yyvsp[0]) <<
"' is not a Float64 value.";
1454 parse_error((parser_arg *)arg, msg.str().c_str());
1457 else if (!
TOP_OF_STACK->append_attr(name, type, (yyvsp[0]))) {
1459 msg <<
"`" << name <<
"' previously defined.";
1460 parse_error((parser_arg *)arg, msg.str().c_str());
1464 #line 1465 "he5das.tab.cc"
1468 #line 295 "he5das.yy"
1472 if (!check_float64((yyvsp[0]))) {
1474 msg <<
"`" << (yyvsp[-2]) <<
"' is not a Float64 value.";
1475 parse_error((parser_arg *)arg, msg.str().c_str());
1478 else if (!
TOP_OF_STACK->append_attr(name, type, (yyvsp[0]))) {
1480 msg <<
"`" << name <<
"' previously defined.";
1481 parse_error((parser_arg *)arg, msg.str().c_str());
1485 #line 1486 "he5das.tab.cc"
1489 #line 314 "he5das.yy"
1493 if (!check_float64((yyvsp[0]))) {
1495 msg <<
"`" << (yyvsp[0]) <<
"' is not a Float64 value.";
1496 parse_error((parser_arg *)arg, msg.str().c_str());
1499 else if (!
TOP_OF_STACK->append_attr(name, type, (yyvsp[0]))) {
1501 msg <<
"`" << name <<
"' previously defined.";
1502 parse_error((parser_arg *)arg, msg.str().c_str());
1506 #line 1507 "he5das.tab.cc"
1510 #line 331 "he5das.yy"
1514 if (!check_float64((yyvsp[0]))) {
1516 msg <<
"`" << (yyvsp[-2]) <<
"' is not a Float64 value.";
1517 parse_error((parser_arg *)arg, msg.str().c_str());
1520 else if (!
TOP_OF_STACK->append_attr(name, type, (yyvsp[0]))) {
1522 msg <<
"`" << name <<
"' previously defined.";
1523 parse_error((parser_arg *)arg, msg.str().c_str());
1527 #line 1528 "he5das.tab.cc"
1531 #line 353 "he5das.yy"
1535 if (!
TOP_OF_STACK->append_attr(name, type, (yyvsp[0]))) {
1537 msg <<
"`" << name <<
"' previously defined.";
1538 parse_error((parser_arg *)arg, msg.str().c_str());
1542 #line 1543 "he5das.tab.cc"
1546 #line 364 "he5das.yy"
1550 if (!
TOP_OF_STACK->append_attr(name, type, (yyvsp[0]))) {
1552 msg <<
"`" << name <<
"' previously defined.";
1553 parse_error((parser_arg *)arg, msg.str().c_str());
1557 #line 1558 "he5das.tab.cc"
1561 #line 1562 "he5das.tab.cc"
1589 yystate = yypgoto[yyn -
YYNTOKENS] + *yyssp;
1590 if (0 <= yystate && yystate <=
YYLAST && yycheck[yystate] == *yyssp)
1591 yystate = yytable[yystate];
1610 #if ! YYERROR_VERBOSE
1613 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1616 char const *yymsgp =
YY_(
"syntax error");
1617 int yysyntax_error_status;
1618 yysyntax_error_status = YYSYNTAX_ERROR;
1619 if (yysyntax_error_status == 0)
1621 else if (yysyntax_error_status == 1)
1623 if (yymsg != yymsgbuf)
1629 yymsg_alloc =
sizeof yymsgbuf;
1630 yysyntax_error_status = 2;
1634 yysyntax_error_status = YYSYNTAX_ERROR;
1639 if (yysyntax_error_status == 2)
1640 goto yyexhaustedlab;
1642 # undef YYSYNTAX_ERROR
1648 if (yyerrstatus == 3)
1653 if (yychar <=
YYEOF)
1656 if (yychar ==
YYEOF)
1661 yydestruct (
"Error: discarding",
1662 yytoken, &yylval, arg);
1700 yyn = yypact[yystate];
1717 yydestruct (
"Error: popping",
1718 yystos[yystate], yyvsp, arg);
1750 #if !defined yyoverflow || YYERROR_VERBOSE
1766 yydestruct (
"Cleanup: discarding lookahead",
1767 yytoken, &yylval, arg);
1773 while (yyssp != yyss)
1775 yydestruct (
"Cleanup: popping",
1776 yystos[*yyssp], yyvsp, arg);
1784 if (yymsg != yymsgbuf)
1789 #line 375 "he5das.yy"
1806 process_group(parser_arg * arg,
const string &
id)
1809 DBG(cerr <<
"Processing ID: " <<
id << endl);
1813 at =
ATTR_OBJ(arg)->get_attr_table(
id);
1815 at =
ATTR_OBJ(arg)->append_container(
id);
1822 DBG(cerr <<
" Pushed attr_tab: " << at << endl);
unsigned char yytype_uint8
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
#define yytable_value_is_error(Yytable_value)
static class NCMLUtil overview
#define YYSTACK_ALLOC_MAXIMUM
unsigned short int yytype_uint16
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
unsigned short int yytype_uint16
int he5dasparse(parser_arg *arg)
#define YY_STACK_PRINT(Bottom, Top)
#define yypact_value_is_default(Yystate)
#define TYPE_NAME_VALUE(x)
#define YY_REDUCE_PRINT(Rule)
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
void he5daserror(parser_arg *arg, char *s)
unsigned char yytype_uint8