47 #define YYBISON_VERSION "3.0.1"
50 #define YYSKELETON_NAME "yacc.c"
63 #define yyparse hdfeosparse
64 #define yylex hdfeoslex
65 #define yyerror hdfeoserror
66 #define yydebug hdfeosdebug
67 #define yynerrs hdfeosnerrs
69 #define yylval hdfeoslval
70 #define yychar hdfeoschar
74 #line 75 "hdfeos.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_HDFEOS_HDFEOS_TAB_HH_INCLUDED
95 # define YY_HDFEOS_HDFEOS_TAB_HH_INCLUDED
107 #define YYSTYPE char *
130 #include "trace_new.h"
140 #define ATTR_OBJ(arg) ((AttrTable *)((parser_arg *)(arg))->_object)
141 #define ERROR_OBJ(arg) ((parser_arg *)(arg))->_error
142 #define STATUS(arg) ((parser_arg *)(arg))->_status
149 #line 150 "hdfeos.tab.cc"
169 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
171 # define YYSTYPE_IS_TRIVIAL 1
172 # define YYSTYPE_IS_DECLARED 1
184 #line 185 "hdfeos.tab.cc"
191 static string last_grid_swath;
192 static int commentnum=0;
196 static vector<AttrTable *> *attr_tab_stack;
200 #define TOP_OF_STACK (attr_tab_stack->back())
201 #define SECOND_IN_STACK ((*attr_tab_stack)[attr_tab_stack->size()-2])
202 #define PUSH(x) (attr_tab_stack->push_back(x))
203 #define POP (attr_tab_stack->pop_back())
204 #define STACK_LENGTH (attr_tab_stack->size())
205 #define STACK_EMPTY (attr_tab_stack->empty())
207 #define TYPE_NAME_VALUE(x) type << " " << name << " " << (x)
210 static const char *NO_DAS_MSG =
211 "The attribute object returned from the dataset was null\n\
212 Check that the URL is correct.";
218 static void process_group(parser_arg *arg,
const string &s);
221 #line 222 "hdfeos.tab.cc"
252 # ifdef __SIZE_TYPE__
253 # define YYSIZE_T __SIZE_TYPE__
254 # elif defined size_t
255 # define YYSIZE_T size_t
256 # elif ! defined YYSIZE_T
258 # define YYSIZE_T size_t
260 # define YYSIZE_T unsigned int
264 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
267 # if defined YYENABLE_NLS && YYENABLE_NLS
269 # include <libintl.h>
270 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
274 # define YY_(Msgid) Msgid
279 # if (defined __GNUC__ \
280 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
281 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
282 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
284 # define YY_ATTRIBUTE(Spec)
288 #ifndef YY_ATTRIBUTE_PURE
289 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
292 #ifndef YY_ATTRIBUTE_UNUSED
293 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
296 #if !defined _Noreturn \
297 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
298 # if defined _MSC_VER && 1200 <= _MSC_VER
299 # define _Noreturn __declspec (noreturn)
301 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
306 #if ! defined lint || defined __GNUC__
307 # define YYUSE(E) ((void) (E))
312 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
314 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
315 _Pragma ("GCC diagnostic push") \
316 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
317 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
318 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
319 _Pragma ("GCC diagnostic pop")
321 # define YY_INITIAL_VALUE(Value) Value
323 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
324 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
325 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
327 #ifndef YY_INITIAL_VALUE
328 # define YY_INITIAL_VALUE(Value)
332 #if ! defined yyoverflow || YYERROR_VERBOSE
336 # ifdef YYSTACK_USE_ALLOCA
337 # if YYSTACK_USE_ALLOCA
339 # define YYSTACK_ALLOC __builtin_alloca
340 # elif defined __BUILTIN_VA_ARG_INCR
343 # define YYSTACK_ALLOC __alloca
344 # elif defined _MSC_VER
346 # define alloca _alloca
348 # define YYSTACK_ALLOC alloca
349 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
352 # ifndef EXIT_SUCCESS
353 # define EXIT_SUCCESS 0
360 # ifdef YYSTACK_ALLOC
362 # define YYSTACK_FREE(Ptr) do { ; } while (0)
363 # ifndef YYSTACK_ALLOC_MAXIMUM
368 # define YYSTACK_ALLOC_MAXIMUM 4032
371 # define YYSTACK_ALLOC YYMALLOC
372 # define YYSTACK_FREE YYFREE
373 # ifndef YYSTACK_ALLOC_MAXIMUM
374 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
376 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
377 && ! ((defined YYMALLOC || defined malloc) \
378 && (defined YYFREE || defined free)))
380 # ifndef EXIT_SUCCESS
381 # define EXIT_SUCCESS 0
385 # define YYMALLOC malloc
386 # if ! defined malloc && ! defined EXIT_SUCCESS
392 # if ! defined free && ! defined EXIT_SUCCESS
400 #if (! defined yyoverflow \
401 && (! defined __cplusplus \
402 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
412 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
416 # define YYSTACK_BYTES(N) \
417 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
418 + YYSTACK_GAP_MAXIMUM)
420 # define YYCOPY_NEEDED 1
427 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
430 YYSIZE_T yynewbytes; \
431 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
432 Stack = &yyptr->Stack_alloc; \
433 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
434 yyptr += yynewbytes / sizeof (*yyptr); \
440 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
444 # if defined __GNUC__ && 1 < __GNUC__
445 # define YYCOPY(Dst, Src, Count) \
446 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
448 # define YYCOPY(Dst, Src, Count) \
452 for (yyi = 0; yyi < (Count); yyi++) \
453 (Dst)[yyi] = (Src)[yyi]; \
477 #define YYMAXUTOK 266
479 #define YYTRANSLATE(YYX) \
480 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
486 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
487 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
488 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
489 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
490 13, 14, 2, 2, 15, 2, 2, 2, 2, 2,
491 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
492 2, 12, 2, 2, 2, 2, 2, 2, 2, 2,
493 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
494 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
495 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
496 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
497 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
498 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
499 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
500 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
501 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
502 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
503 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
504 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
505 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
506 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
507 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
508 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
509 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
510 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
511 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
512 5, 6, 7, 8, 9, 10, 11
519 0, 172, 172, 172, 177, 181, 185, 180, 193, 197,
520 192, 205, 204, 210, 233, 258, 259, 260, 263, 264,
521 265, 266, 272, 273, 276, 300, 320, 337, 356, 373,
526 #if YYDEBUG || YYERROR_VERBOSE || 0
529 static const char *
const yytname[] =
531 "$end",
"error",
"$undefined",
"GROUP",
"END_GROUP",
"OBJECT",
532 "END_OBJECT",
"END",
"INT",
"FLOAT",
"STR",
"COMMENT",
"'='",
"'('",
533 "')'",
"','",
"$accept",
"attributes",
"$@1",
"attribute",
"$@2",
"$@3",
534 "$@4",
"$@5",
"$@6",
"attr_list",
"data",
"data2",
"ints",
"floats",
535 "floatints",
"float_or_int",
"strs",
YY_NULLPTR
544 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
545 265, 266, 61, 40, 41, 44
549 #define YYPACT_NINF -9
551 #define yypact_value_is_default(Yystate) \
552 (!!((Yystate) == (-9)))
554 #define YYTABLE_NINF -16
556 #define yytable_value_is_error(Yytable_value) \
563 -9, 2, 52, -9, -9, -8, 11, -9, -9, -9,
564 -9, 1, 4, 14, -9, -9, 51, 5, 19, -9,
565 -9, -9, 9, -9, 6, 17, 23, -9, 30, 41,
566 -9, -9, 25, 33, -9, 23, 35, 36, 39, -9,
567 46, 48, -9, 28, -9, -9, -9, 44, 53, -9,
576 2, 0, 0, 1, 14, 0, 0, 11, 13, 4,
577 3, 0, 0, 0, 5, 8, 0, 0, 0, 24,
578 26, 32, 0, 12, 18, 19, 20, 16, 0, 0,
579 31, 30, 0, 22, 28, 23, 0, 0, 0, 17,
580 0, 0, 21, 0, 25, 27, 33, 0, 0, 29,
587 -9, -9, -9, -1, -9, -9, -9, -9, -9, 40,
588 -9, -9, -9, -9, -9, 26, 49
594 -1, 1, 2, 27, 17, 40, 18, 41, 13, 28,
595 23, 32, 24, 25, 33, 34, 26
603 9, 10, 3, 4, 11, 5, 4, 6, 5, -15,
604 6, 14, 7, 8, 15, 7, 8, 30, 31, 21,
605 4, 36, 5, 12, 6, -15, 16, 39, 39, 7,
606 8, 4, 37, 5, -6, 6, 30, 31, 38, 42,
607 7, 8, 4, 44, 5, 45, 6, -9, 43, 46,
608 47, 7, 8, 4, 48, 5, 50, 6, 29, 19,
609 20, 21, 7, 8, 22, 51, 52, 53, 0, 49,
615 1, 2, 0, 1, 12, 3, 1, 5, 3, 4,
616 5, 10, 10, 11, 10, 10, 11, 8, 9, 10,
617 1, 15, 3, 12, 5, 6, 12, 28, 29, 10,
618 11, 1, 15, 3, 4, 5, 8, 9, 15, 14,
619 10, 11, 1, 8, 3, 9, 5, 6, 15, 10,
620 4, 10, 11, 1, 6, 3, 12, 5, 18, 8,
621 9, 10, 10, 11, 13, 12, 10, 10, -1, 43,
629 0, 17, 18, 0, 1, 3, 5, 10, 11, 19,
630 19, 12, 12, 24, 10, 10, 12, 20, 22, 8,
631 9, 10, 13, 26, 28, 29, 32, 19, 25, 25,
632 8, 9, 27, 30, 31, 32, 15, 15, 15, 19,
633 21, 23, 14, 15, 8, 9, 10, 4, 6, 31,
640 0, 16, 18, 17, 17, 20, 21, 19, 22, 23,
641 19, 24, 19, 19, 19, 25, 25, 25, 26, 26,
642 26, 26, 27, 27, 28, 28, 29, 29, 30, 30,
649 0, 2, 0, 2, 2, 0, 0, 9, 0, 0,
650 9, 0, 4, 1, 1, 0, 1, 2, 1, 1,
651 1, 3, 1, 1, 1, 3, 1, 3, 1, 3,
656 #define yyerrok (yyerrstatus = 0)
657 #define yyclearin (yychar = YYEMPTY)
661 #define YYACCEPT goto yyacceptlab
662 #define YYABORT goto yyabortlab
663 #define YYERROR goto yyerrorlab
666 #define YYRECOVERING() (!!yyerrstatus)
668 #define YYBACKUP(Token, Value) \
670 if (yychar == YYEMPTY) \
674 YYPOPSTACK (yylen); \
680 yyerror (arg, YY_("syntax error: cannot back up")); \
687 #define YYERRCODE 256
696 # define YYFPRINTF fprintf
699 # define YYDPRINTF(Args) \
706 #ifndef YY_LOCATION_PRINT
707 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
711 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
715 YYFPRINTF (stderr, "%s ", Title); \
716 yy_symbol_print (stderr, \
718 YYFPRINTF (stderr, "\n"); \
728 yy_symbol_value_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep, parser_arg *arg)
730 FILE *yyo = yyoutput;
737 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
748 yy_symbol_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep, parser_arg *arg)
751 yytype <
YYNTOKENS ?
"token" :
"nterm", yytname[yytype]);
753 yy_symbol_value_print (yyoutput, yytype, yyvaluep, arg);
766 for (; yybottom <= yytop; yybottom++)
768 int yybot = *yybottom;
774 # define YY_STACK_PRINT(Bottom, Top) \
777 yy_stack_print ((Bottom), (Top)); \
788 unsigned long int yylno = yyrline[yyrule];
789 int yynrhs = yyr2[yyrule];
791 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
794 for (yyi = 0; yyi < yynrhs; yyi++)
797 yy_symbol_print (stderr,
798 yystos[yyssp[yyi + 1 - yynrhs]],
799 &(yyvsp[(yyi + 1) - (yynrhs)])
805 # define YY_REDUCE_PRINT(Rule) \
808 yy_reduce_print (yyssp, yyvsp, Rule, arg); \
815 # define YYDPRINTF(Args)
816 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
817 # define YY_STACK_PRINT(Bottom, Top)
818 # define YY_REDUCE_PRINT(Rule)
824 # define YYINITDEPTH 200
835 # define YYMAXDEPTH 10000
842 # if defined __GLIBC__ && defined _STRING_H
843 # define yystrlen strlen
847 yystrlen (
const char *yystr)
850 for (yylen = 0; yystr[yylen]; yylen++)
858 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
859 # define yystpcpy stpcpy
864 yystpcpy (
char *yydest,
const char *yysrc)
867 const char *yys = yysrc;
869 while ((*yyd++ = *yys++) !=
'\0')
886 yytnamerr (
char *yyres,
const char *yystr)
891 char const *yyp = yystr;
898 goto do_not_strip_quotes;
902 goto do_not_strip_quotes;
915 do_not_strip_quotes: ;
919 return yystrlen (yystr);
921 return yystpcpy (yyres, yystr) - yyres;
934 yysyntax_error (
YYSIZE_T *yymsg_alloc,
char **yymsg,
939 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
943 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
973 int yyn = yypact[*yyssp];
974 yyarg[yycount++] = yytname[yytoken];
980 int yyxbegin = yyn < 0 ? -yyn : 0;
982 int yychecklim =
YYLAST - yyn + 1;
986 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
987 if (yycheck[yyx + yyn] == yyx && yyx !=
YYTERROR
990 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
996 yyarg[yycount++] = yytname[yyx];
999 if (! (yysize <= yysize1
1010 # define YYCASE_(N, S) \
1014 YYCASE_(0,
YY_(
"syntax error"));
1015 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
1016 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1017 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1018 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1019 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1024 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1030 if (*yymsg_alloc < yysize)
1032 *yymsg_alloc = 2 * yysize;
1033 if (! (yysize <= *yymsg_alloc
1045 while ((*yyp = *yyformat) !=
'\0')
1046 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1048 yyp += yytnamerr (yyp, yyarg[yyi++]);
1066 yydestruct (
const char *yymsg,
int yytype,
YYSTYPE *yyvaluep, parser_arg *arg)
1132 char *yymsg = yymsgbuf;
1133 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1136 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1142 yyssp = yyss = yyssa;
1143 yyvsp = yyvs = yyvsa;
1146 YYDPRINTF ((stderr,
"Starting parse\n"));
1165 if (yyss + yystacksize - 1 <= yyssp)
1168 YYSIZE_T yysize = yyssp - yyss + 1;
1182 yyoverflow (
YY_(
"memory exhausted"),
1183 &yyss1, yysize *
sizeof (*yyssp),
1184 &yyvs1, yysize *
sizeof (*yyvsp),
1191 # ifndef YYSTACK_RELOCATE
1192 goto yyexhaustedlab;
1196 goto yyexhaustedlab;
1206 goto yyexhaustedlab;
1209 # undef YYSTACK_RELOCATE
1216 yyssp = yyss + yysize - 1;
1217 yyvsp = yyvs + yysize - 1;
1219 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1220 (
unsigned long int) yystacksize));
1222 if (yyss + yystacksize - 1 <= yyssp)
1226 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1242 yyn = yypact[yystate];
1251 YYDPRINTF ((stderr,
"Reading a token: "));
1255 if (yychar <=
YYEOF)
1257 yychar = yytoken =
YYEOF;
1258 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1269 if (yyn < 0 ||
YYLAST < yyn || yycheck[yyn] != yytoken)
1303 yyn = yydefact[yystate];
1324 yyval = yyvsp[1-yylen];
1331 #line 172 "hdfeos.yy"
1333 if (!attr_tab_stack)
1334 attr_tab_stack =
new vector<AttrTable *>;
1336 #line 1337 "hdfeos.tab.cc"
1340 #line 181 "hdfeos.yy"
1342 process_group((parser_arg *)arg, (yyvsp[0]));
1344 #line 1345 "hdfeos.tab.cc"
1348 #line 185 "hdfeos.yy"
1354 #line 1355 "hdfeos.tab.cc"
1358 #line 193 "hdfeos.yy"
1360 process_group((parser_arg *)arg, (yyvsp[0]));
1362 #line 1363 "hdfeos.tab.cc"
1366 #line 197 "hdfeos.yy"
1372 #line 1373 "hdfeos.tab.cc"
1376 #line 205 "hdfeos.yy"
1380 #line 1381 "hdfeos.tab.cc"
1384 #line 210 "hdfeos.yy"
1387 name <<
"comment" << commentnum++;
1388 #ifdef ATTR_STRING_QUOTE_FIX
1389 comment << (yyvsp[0]);
1391 comment <<
"\"" << (yyvsp[0]) <<
"\"";
1393 BESDEBUG(
"h4",name.str() <<
":" << comment.str() << endl);
1400 if (!a->append_attr(name.str(),
"String", comment.str())) {
1402 msg <<
"`" << name.str() <<
"' previously defined.";
1403 parse_error((parser_arg *)arg, msg.str().c_str());
1407 #line 1408 "hdfeos.tab.cc"
1411 #line 234 "hdfeos.yy"
1418 #ifdef ATTR_STRING_QUOTE_FIX
1419 a->append_attr(name.c_str(),
"String",
"Error processing EOS attributes");
1421 a->append_attr(name.c_str(),
"String",
"\"Error processing EOS attributes\"");
1425 arg->set_status(
FALSE);
1434 #line 1435 "hdfeos.tab.cc"
1438 #line 277 "hdfeos.yy"
1448 if (!(check_int32((yyvsp[0]))
1449 || check_uint32((yyvsp[0])))) {
1451 msg <<
"`" << (yyvsp[0]) <<
"' is not an Int32 value.";
1452 parse_error((parser_arg *)arg, msg.str().c_str());
1455 else if (!
TOP_OF_STACK->append_attr(name,
"Int32", (yyvsp[0]))) {
1457 msg <<
"`" << name <<
"' previously defined.";
1458 parse_error((parser_arg *)arg, msg.str().c_str());
1462 #line 1463 "hdfeos.tab.cc"
1466 #line 301 "hdfeos.yy"
1470 if (!(check_int32((yyvsp[0]))
1471 || check_uint32((yyvsp[0])))) {
1473 msg <<
"`" << (yyvsp[0]) <<
"' is not an Int32 value.";
1474 parse_error((parser_arg *)arg, msg.str().c_str());
1477 else if (!
TOP_OF_STACK->append_attr(name, type, (yyvsp[0]))) {
1479 msg <<
"`" << name <<
"' previously defined.";
1480 parse_error((parser_arg *)arg, msg.str().c_str());
1484 #line 1485 "hdfeos.tab.cc"
1488 #line 321 "hdfeos.yy"
1492 if (!check_float64((yyvsp[0]))) {
1494 msg <<
"`" << (yyvsp[0]) <<
"' is not a Float64 value.";
1495 parse_error((parser_arg *)arg, msg.str().c_str());
1498 else if (!
TOP_OF_STACK->append_attr(name, type, (yyvsp[0]))) {
1500 msg <<
"`" << name <<
"' previously defined.";
1501 parse_error((parser_arg *)arg, msg.str().c_str());
1505 #line 1506 "hdfeos.tab.cc"
1509 #line 338 "hdfeos.yy"
1513 if (!check_float64((yyvsp[0]))) {
1515 msg <<
"`" << (yyvsp[-2]) <<
"' is not a Float64 value.";
1516 parse_error((parser_arg *)arg, msg.str().c_str());
1519 else if (!
TOP_OF_STACK->append_attr(name, type, (yyvsp[0]))) {
1521 msg <<
"`" << name <<
"' previously defined.";
1522 parse_error((parser_arg *)arg, msg.str().c_str());
1526 #line 1527 "hdfeos.tab.cc"
1530 #line 357 "hdfeos.yy"
1534 if (!check_float64((yyvsp[0]))) {
1536 msg <<
"`" << (yyvsp[0]) <<
"' is not a Float64 value.";
1537 parse_error((parser_arg *)arg, msg.str().c_str());
1540 else if (!
TOP_OF_STACK->append_attr(name, type, (yyvsp[0]))) {
1542 msg <<
"`" << name <<
"' previously defined.";
1543 parse_error((parser_arg *)arg, msg.str().c_str());
1547 #line 1548 "hdfeos.tab.cc"
1551 #line 374 "hdfeos.yy"
1555 if (!check_float64((yyvsp[0]))) {
1557 msg <<
"`" << (yyvsp[0]) <<
"' is not a Float64 value.";
1558 parse_error((parser_arg *)arg, msg.str().c_str());
1561 else if (!
TOP_OF_STACK->append_attr(name, type, (yyvsp[0]))) {
1563 msg <<
"`" << name <<
"' previously defined.";
1564 parse_error((parser_arg *)arg, msg.str().c_str());
1568 #line 1569 "hdfeos.tab.cc"
1572 #line 396 "hdfeos.yy"
1576 if (!
TOP_OF_STACK->append_attr(name, type, (yyvsp[0]))) {
1578 msg <<
"`" << name <<
"' previously defined.";
1579 parse_error((parser_arg *)arg, msg.str().c_str());
1583 if (name==
"GridName" || name==
"SwathName" || name==
"PointName") {
1585 string newname = (yyvsp[0])+1;
1586 newname.erase(newname.end()-1);
1588 string::size_type space = 0;
1589 while((space = newname.find_first_of(
' ', space)) != newname.npos) {
1590 newname[space] =
'_';
1596 #line 1597 "hdfeos.tab.cc"
1600 #line 420 "hdfeos.yy"
1604 if (!
TOP_OF_STACK->append_attr(name, type, (yyvsp[0]))) {
1606 msg <<
"`" << name <<
"' previously defined.";
1607 parse_error((parser_arg *)arg, msg.str().c_str());
1611 #line 1612 "hdfeos.tab.cc"
1615 #line 1616 "hdfeos.tab.cc"
1643 yystate = yypgoto[yyn -
YYNTOKENS] + *yyssp;
1644 if (0 <= yystate && yystate <=
YYLAST && yycheck[yystate] == *yyssp)
1645 yystate = yytable[yystate];
1664 #if ! YYERROR_VERBOSE
1667 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1670 char const *yymsgp =
YY_(
"syntax error");
1671 int yysyntax_error_status;
1672 yysyntax_error_status = YYSYNTAX_ERROR;
1673 if (yysyntax_error_status == 0)
1675 else if (yysyntax_error_status == 1)
1677 if (yymsg != yymsgbuf)
1683 yymsg_alloc =
sizeof yymsgbuf;
1684 yysyntax_error_status = 2;
1688 yysyntax_error_status = YYSYNTAX_ERROR;
1693 if (yysyntax_error_status == 2)
1694 goto yyexhaustedlab;
1696 # undef YYSYNTAX_ERROR
1702 if (yyerrstatus == 3)
1707 if (yychar <=
YYEOF)
1710 if (yychar ==
YYEOF)
1715 yydestruct (
"Error: discarding",
1716 yytoken, &yylval, arg);
1754 yyn = yypact[yystate];
1771 yydestruct (
"Error: popping",
1772 yystos[yystate], yyvsp, arg);
1804 #if !defined yyoverflow || YYERROR_VERBOSE
1820 yydestruct (
"Cleanup: discarding lookahead",
1821 yytoken, &yylval, arg);
1827 while (yyssp != yyss)
1829 yydestruct (
"Cleanup: popping",
1830 yystos[*yyssp], yyvsp, arg);
1838 if (yymsg != yymsgbuf)
1843 #line 432 "hdfeos.yy"
1859 build_fqn(AttrTable *at,
string fqn)
1863 if (!at || !at->get_parent() || at->get_name().empty())
1866 return build_fqn(at->get_parent(), at->get_name() + string(
".") + fqn);
1870 process_group(parser_arg * arg,
const string &
id)
1873 BESDEBUG(
"h4",
"Processing ID: " <<
id << endl);
1877 at =
ATTR_OBJ(arg)->get_attr_table(
id);
1879 at =
ATTR_OBJ(arg)->append_container(
id);
1886 if (
id.find(
"GRID_") == 0 ||
id.find(
"SWATH_") == 0 ||
1887 id.find(
"POINT_") == 0) {
1888 last_grid_swath = id;
1892 BESDEBUG(
"h4",
" Pushed attr_tab: " << at << endl);
#define yypact_value_is_default(Yystate)
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define YY_STACK_PRINT(Bottom, Top)
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
unsigned char yytype_uint8
unsigned short int yytype_uint16
void hdfeoserror(parser_arg *arg, const char *s)
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
#define TYPE_NAME_VALUE(x)
static class NCMLUtil overview
#define yytable_value_is_error(Yytable_value)
#define YYSTACK_ALLOC_MAXIMUM
#define YY_REDUCE_PRINT(Rule)
unsigned short int yytype_uint16
#define BESDEBUG(x, y)
macro used to send debug information to the debug stream
int hdfeosparse(parser_arg *arg)
unsigned char yytype_uint8
#define YYSTACK_RELOCATE(Stack_alloc, Stack)