47 #define YYBISON_VERSION "3.0.1"
50 #define YYSKELETON_NAME "yacc.c"
63 #define yyparse he5ddsparse
64 #define yylex he5ddslex
65 #define yyerror he5ddserror
66 #define yydebug he5ddsdebug
67 #define yynerrs he5ddsnerrs
69 #define yylval he5ddslval
70 #define yychar he5ddschar
74 #line 75 "he5dds.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_HE5DDS_HE5DDS_TAB_HH_INCLUDED
95 # define YY_HE5DDS_HE5DDS_TAB_HH_INCLUDED
107 #define YYSTYPE char *
131 #line 132 "he5dds.tab.cc"
167 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
169 # define YYSTYPE_IS_TRIVIAL 1
170 # define YYSTYPE_IS_DECLARED 1
182 #line 183 "he5dds.tab.cc"
196 #line 197 "he5dds.tab.cc"
227 # ifdef __SIZE_TYPE__
228 # define YYSIZE_T __SIZE_TYPE__
229 # elif defined size_t
230 # define YYSIZE_T size_t
231 # elif ! defined YYSIZE_T
233 # define YYSIZE_T size_t
235 # define YYSIZE_T unsigned int
239 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
242 # if defined YYENABLE_NLS && YYENABLE_NLS
244 # include <libintl.h>
245 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
249 # define YY_(Msgid) Msgid
254 # if (defined __GNUC__ \
255 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
256 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
257 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
259 # define YY_ATTRIBUTE(Spec)
263 #ifndef YY_ATTRIBUTE_PURE
264 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
267 #ifndef YY_ATTRIBUTE_UNUSED
268 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
271 #if !defined _Noreturn \
272 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
273 # if defined _MSC_VER && 1200 <= _MSC_VER
274 # define _Noreturn __declspec (noreturn)
276 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
281 #if ! defined lint || defined __GNUC__
282 # define YYUSE(E) ((void) (E))
287 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
289 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
290 _Pragma ("GCC diagnostic push") \
291 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
292 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
293 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
294 _Pragma ("GCC diagnostic pop")
296 # define YY_INITIAL_VALUE(Value) Value
298 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
299 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
300 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
302 #ifndef YY_INITIAL_VALUE
303 # define YY_INITIAL_VALUE(Value)
307 #if ! defined yyoverflow || YYERROR_VERBOSE
311 # ifdef YYSTACK_USE_ALLOCA
312 # if YYSTACK_USE_ALLOCA
314 # define YYSTACK_ALLOC __builtin_alloca
315 # elif defined __BUILTIN_VA_ARG_INCR
318 # define YYSTACK_ALLOC __alloca
319 # elif defined _MSC_VER
321 # define alloca _alloca
323 # define YYSTACK_ALLOC alloca
324 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
327 # ifndef EXIT_SUCCESS
328 # define EXIT_SUCCESS 0
335 # ifdef YYSTACK_ALLOC
337 # define YYSTACK_FREE(Ptr) do { ; } while (0)
338 # ifndef YYSTACK_ALLOC_MAXIMUM
343 # define YYSTACK_ALLOC_MAXIMUM 4032
346 # define YYSTACK_ALLOC YYMALLOC
347 # define YYSTACK_FREE YYFREE
348 # ifndef YYSTACK_ALLOC_MAXIMUM
349 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
351 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
352 && ! ((defined YYMALLOC || defined malloc) \
353 && (defined YYFREE || defined free)))
355 # ifndef EXIT_SUCCESS
356 # define EXIT_SUCCESS 0
360 # define YYMALLOC malloc
361 # if ! defined malloc && ! defined EXIT_SUCCESS
367 # if ! defined free && ! defined EXIT_SUCCESS
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)
395 # define YYCOPY_NEEDED 1
402 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
405 YYSIZE_T yynewbytes; \
406 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
407 Stack = &yyptr->Stack_alloc; \
408 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
409 yyptr += yynewbytes / sizeof (*yyptr); \
415 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
419 # if defined __GNUC__ && 1 < __GNUC__
420 # define YYCOPY(Dst, Src, Count) \
421 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
423 # define YYCOPY(Dst, Src, Count) \
427 for (yyi = 0; yyi < (Count); yyi++) \
428 (Dst)[yyi] = (Src)[yyi]; \
447 #define YYNSTATES 108
452 #define YYMAXUTOK 282
454 #define YYTRANSLATE(YYX) \
455 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
461 0, 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, 28, 2, 2, 2, 2, 2,
465 29, 30, 2, 2, 31, 2, 2, 2, 2, 2,
466 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
467 2, 32, 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, 2, 2, 2, 2,
485 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
486 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
487 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
488 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
496 0, 110, 110, 111, 112, 113, 114, 115, 116, 117,
497 122, 123, 126, 127, 161, 191, 223, 224, 225, 226,
498 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
499 238, 245, 252, 253, 256, 280, 297, 314, 322, 332,
500 354, 353, 363, 400, 420, 451, 478, 477, 489, 488,
501 497, 582, 605, 632, 646, 654, 666
505 #if YYDEBUG || YYERROR_VERBOSE || 0
508 static const char *
const yytname[] =
510 "$end",
"error",
"$undefined",
"GROUP",
"END_GROUP",
"OBJECT",
511 "END_OBJECT",
"GRID_NAME",
"SWATH_NAME",
"ZA_NAME",
"DEFAULT",
"XDIM",
512 "YDIM",
"UPPERLEFTPT",
"LOWERRIGHTPT",
"PIXELREGISTRATION",
"PROJECTION",
513 "GRIDORIGIN",
"DIMENSION_NAME",
"DIMENSION_SIZE",
"DATA_FIELD_NAME",
514 "GEO_FIELD_NAME",
"DATA_TYPE",
"DIMENSION_LIST",
"COMPRESSION_TYPE",
515 "INT",
"FLOAT",
"STR",
"'\"'",
"'('",
"')'",
"','",
"'='",
"$accept",
516 "attribute_list",
"dataseq",
"dataseq1",
"data",
"attribute",
517 "attribute_grid_name",
"attribute_swath_name",
"attribute_za_name",
518 "attribute_dimension_name",
"attribute_dimension_size",
519 "attribute_dimension_list",
"$@1",
"attribute_data_field_name",
520 "attribute_geo_field_name",
"attribute_xdim",
"attribute_ydim",
"group",
521 "$@2",
"object",
"$@3",
"projection",
"attribute_pixelregistration",
522 "attribute_gridorigin",
"attribute_upperleft",
"attribute_lowerright",
YY_NULLPTR
531 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
532 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
533 275, 276, 277, 278, 279, 280, 281, 282, 34, 40,
538 #define YYPACT_NINF -32
540 #define yypact_value_is_default(Yystate) \
541 (!!((Yystate) == (-32)))
543 #define YYTABLE_NINF -1
545 #define yytable_value_is_error(Yytable_value) \
552 -32, 0, -32, -31, -22, -6, 26, 41, 10, 51,
553 -4, 21, 59, 55, 61, 57, 58, 60, 62, -32,
554 -32, 63, 64, -32, -32, -32, -32, -32, -32, -32,
555 -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
556 -32, 66, 70, 71, 72, 73, -32, -32, -32, 65,
557 -32, 75, -32, 76, -32, -23, 77, 78, 79, 80,
558 81, 49, -32, -32, -32, -32, -32, 82, 83, -32,
559 -32, -32, -32, -32, -32, 49, -32, -32, 84, 54,
560 -32, -32, -32, 89, 90, -32, 91, -32, -32, -32,
561 52, -32, 25, 48, 74, 87, -32, -32, 54, 86,
562 88, -32, -32, -32, 94, 95, -32, -32
570 2, 0, 1, 0, 0, 0, 0, 0, 0, 0,
571 0, 0, 0, 0, 0, 0, 0, 0, 0, 29,
572 40, 0, 0, 4, 16, 32, 33, 19, 20, 21,
573 22, 23, 17, 18, 5, 3, 28, 26, 27, 24,
574 25, 0, 0, 0, 0, 0, 44, 45, 54, 0,
575 56, 0, 51, 0, 52, 0, 0, 0, 0, 0,
576 0, 6, 46, 48, 34, 35, 36, 0, 0, 50,
577 38, 37, 39, 42, 43, 6, 31, 7, 0, 12,
578 30, 2, 2, 0, 0, 41, 0, 13, 14, 15,
579 0, 10, 0, 0, 0, 0, 8, 9, 12, 0,
580 0, 53, 55, 11, 0, 0, 47, 49
586 -32, 3, 32, -32, 11, -32, -32, -32, -32, -32,
587 -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
588 -32, -32, -32, -32, -32, -32
594 -1, 1, 80, 90, 91, 23, 24, 25, 26, 27,
595 28, 29, 59, 30, 31, 32, 33, 34, 81, 35,
596 82, 36, 37, 38, 39, 40
604 2, 41, 70, 3, 71, 4, 48, 5, 6, 7,
605 42, 8, 9, 10, 11, 12, 13, 14, 15, 16,
606 17, 18, 19, 20, 21, 49, 43, 22, 3, 99,
607 4, 50, 5, 6, 7, 46, 8, 9, 10, 11,
608 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
609 51, 3, 22, 4, 100, 5, 6, 7, 44, 8,
610 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
611 19, 20, 21, 45, 77, 22, 47, 78, 79, 87,
612 88, 89, 97, 98, 92, 93, 52, 53, 54, 55,
613 56, 67, 57, 62, 58, 60, 61, 63, 64, 65,
614 66, 68, 72, 69, 101, 73, 74, 85, 76, 103,
615 0, 86, 75, 83, 84, 94, 95, 102, 104, 96,
621 0, 32, 25, 3, 27, 5, 10, 7, 8, 9,
622 32, 11, 12, 13, 14, 15, 16, 17, 18, 19,
623 20, 21, 22, 23, 24, 29, 32, 27, 3, 4,
624 5, 10, 7, 8, 9, 25, 11, 12, 13, 14,
625 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
626 29, 3, 27, 5, 6, 7, 8, 9, 32, 11,
627 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
628 22, 23, 24, 32, 25, 27, 25, 28, 29, 25,
629 26, 27, 30, 31, 81, 82, 27, 32, 27, 32,
630 32, 26, 32, 27, 32, 32, 32, 27, 27, 27,
631 27, 26, 25, 27, 30, 27, 27, 75, 27, 98,
632 -1, 27, 32, 31, 31, 26, 26, 30, 32, 28,
640 0, 34, 0, 3, 5, 7, 8, 9, 11, 12,
641 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
642 23, 24, 27, 38, 39, 40, 41, 42, 43, 44,
643 46, 47, 48, 49, 50, 52, 54, 55, 56, 57,
644 58, 32, 32, 32, 32, 32, 25, 25, 10, 29,
645 10, 29, 27, 32, 27, 32, 32, 32, 32, 45,
646 32, 32, 27, 27, 27, 27, 27, 26, 26, 27,
647 25, 27, 25, 27, 27, 32, 27, 25, 28, 29,
648 35, 51, 53, 31, 31, 35, 27, 25, 26, 27,
649 36, 37, 34, 34, 26, 26, 28, 30, 31, 4,
650 6, 30, 30, 37, 32, 32, 27, 27
656 0, 33, 34, 34, 34, 34, 35, 35, 35, 35,
657 36, 36, 37, 37, 37, 37, 38, 38, 38, 38,
658 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
659 38, 38, 38, 38, 39, 40, 41, 42, 42, 43,
660 45, 44, 46, 47, 48, 49, 51, 50, 53, 52,
661 54, 55, 56, 57, 57, 58, 58
667 0, 2, 0, 2, 2, 2, 0, 1, 3, 3,
668 1, 3, 0, 1, 1, 1, 1, 1, 1, 1,
669 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
670 3, 3, 1, 1, 3, 3, 3, 3, 3, 3,
671 0, 4, 3, 3, 2, 2, 0, 8, 0, 8,
676 #define yyerrok (yyerrstatus = 0)
677 #define yyclearin (yychar = YYEMPTY)
681 #define YYACCEPT goto yyacceptlab
682 #define YYABORT goto yyabortlab
683 #define YYERROR goto yyerrorlab
686 #define YYRECOVERING() (!!yyerrstatus)
688 #define YYBACKUP(Token, Value) \
690 if (yychar == YYEMPTY) \
694 YYPOPSTACK (yylen); \
700 yyerror (he5parser, YY_("syntax error: cannot back up")); \
707 #define YYERRCODE 256
716 # define YYFPRINTF fprintf
719 # define YYDPRINTF(Args) \
726 #ifndef YY_LOCATION_PRINT
727 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
731 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
735 YYFPRINTF (stderr, "%s ", Title); \
736 yy_symbol_print (stderr, \
737 Type, Value, he5parser); \
738 YYFPRINTF (stderr, "\n"); \
748 yy_symbol_value_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep,
HE5Parser *he5parser)
750 FILE *yyo = yyoutput;
757 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
768 yy_symbol_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep,
HE5Parser *he5parser)
771 yytype <
YYNTOKENS ?
"token" :
"nterm", yytname[yytype]);
773 yy_symbol_value_print (yyoutput, yytype, yyvaluep, he5parser);
786 for (; yybottom <= yytop; yybottom++)
788 int yybot = *yybottom;
794 # define YY_STACK_PRINT(Bottom, Top) \
797 yy_stack_print ((Bottom), (Top)); \
808 unsigned long int yylno = yyrline[yyrule];
809 int yynrhs = yyr2[yyrule];
811 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
814 for (yyi = 0; yyi < yynrhs; yyi++)
817 yy_symbol_print (stderr,
818 yystos[yyssp[yyi + 1 - yynrhs]],
819 &(yyvsp[(yyi + 1) - (yynrhs)])
825 # define YY_REDUCE_PRINT(Rule) \
828 yy_reduce_print (yyssp, yyvsp, Rule, he5parser); \
835 # define YYDPRINTF(Args)
836 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
837 # define YY_STACK_PRINT(Bottom, Top)
838 # define YY_REDUCE_PRINT(Rule)
844 # define YYINITDEPTH 200
855 # define YYMAXDEPTH 10000
862 # if defined __GLIBC__ && defined _STRING_H
863 # define yystrlen strlen
867 yystrlen (
const char *yystr)
870 for (yylen = 0; yystr[yylen]; yylen++)
878 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
879 # define yystpcpy stpcpy
884 yystpcpy (
char *yydest,
const char *yysrc)
887 const char *yys = yysrc;
889 while ((*yyd++ = *yys++) !=
'\0')
906 yytnamerr (
char *yyres,
const char *yystr)
911 char const *yyp = yystr;
918 goto do_not_strip_quotes;
922 goto do_not_strip_quotes;
935 do_not_strip_quotes: ;
939 return yystrlen (yystr);
941 return yystpcpy (yyres, yystr) - yyres;
954 yysyntax_error (
YYSIZE_T *yymsg_alloc,
char **yymsg,
959 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
963 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
993 int yyn = yypact[*yyssp];
994 yyarg[yycount++] = yytname[yytoken];
1000 int yyxbegin = yyn < 0 ? -yyn : 0;
1002 int yychecklim =
YYLAST - yyn + 1;
1006 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1007 if (yycheck[yyx + yyn] == yyx && yyx !=
YYTERROR
1010 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1016 yyarg[yycount++] = yytname[yyx];
1019 if (! (yysize <= yysize1
1030 # define YYCASE_(N, S) \
1034 YYCASE_(0,
YY_(
"syntax error"));
1035 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
1036 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1037 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1038 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1039 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1044 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1050 if (*yymsg_alloc < yysize)
1052 *yymsg_alloc = 2 * yysize;
1053 if (! (yysize <= *yymsg_alloc
1065 while ((*yyp = *yyformat) !=
'\0')
1066 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1068 yyp += yytnamerr (yyp, yyarg[yyi++]);
1086 yydestruct (
const char *yymsg,
int yytype,
YYSTYPE *yyvaluep,
HE5Parser *he5parser)
1152 char *yymsg = yymsgbuf;
1153 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1156 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1162 yyssp = yyss = yyssa;
1163 yyvsp = yyvs = yyvsa;
1166 YYDPRINTF ((stderr,
"Starting parse\n"));
1185 if (yyss + yystacksize - 1 <= yyssp)
1188 YYSIZE_T yysize = yyssp - yyss + 1;
1202 yyoverflow (
YY_(
"memory exhausted"),
1203 &yyss1, yysize *
sizeof (*yyssp),
1204 &yyvs1, yysize *
sizeof (*yyvsp),
1211 # ifndef YYSTACK_RELOCATE
1212 goto yyexhaustedlab;
1216 goto yyexhaustedlab;
1226 goto yyexhaustedlab;
1229 # undef YYSTACK_RELOCATE
1236 yyssp = yyss + yysize - 1;
1237 yyvsp = yyvs + yysize - 1;
1239 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1240 (
unsigned long int) yystacksize));
1242 if (yyss + yystacksize - 1 <= yyssp)
1246 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1262 yyn = yypact[yystate];
1271 YYDPRINTF ((stderr,
"Reading a token: "));
1275 if (yychar <=
YYEOF)
1277 yychar = yytoken =
YYEOF;
1278 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1289 if (yyn < 0 ||
YYLAST < yyn || yycheck[yyn] != yytoken)
1323 yyn = yydefact[yystate];
1344 yyval = yyvsp[1-yylen];
1351 #line 128 "he5dds.yy"
1354 cout <<
"data: " << (yyvsp[0])
1356 << ((
HE5Parser*)(he5parser))->parser_state
1363 a = a.append((yyval));
1369 p->
grid_list.back().data_var_list.back().dim_list.push_back(d);
1375 p->
swath_list.back().geo_var_list.back().dim_list.push_back(d);
1377 p->
swath_list.back().data_var_list.back().dim_list.push_back(d);
1381 p->
za_list.back().data_var_list.back().dim_list.push_back(d);
1385 #line 1386 "he5dds.tab.cc"
1389 #line 162 "he5dds.yy"
1392 cout <<
"data: " << (yyvsp[0])
1394 << ((
HE5Parser*)(he5parser))->parser_state
1397 switch(((
HE5Parser*)(he5parser))->parser_state){
1399 ((
HE5Parser*)(he5parser))->parser_state = 1;
1400 ((
HE5Parser*)(he5parser))->point_left = atof((yyvsp[0]));
1403 ((
HE5Parser*)(he5parser))->parser_state = 2;
1404 ((
HE5Parser*)(he5parser))->point_upper = atof((yyvsp[0]));
1407 ((
HE5Parser*)(he5parser))->parser_state = 3;
1408 ((
HE5Parser*)(he5parser))->point_right = atof((yyvsp[0]));
1411 ((
HE5Parser*)(he5parser))->parser_state = 4;
1412 ((
HE5Parser*)(he5parser))->point_lower = atof((yyvsp[0]));
1418 #line 1419 "he5dds.tab.cc"
1422 #line 192 "he5dds.yy"
1427 a = a.append((yyval));
1433 p->
grid_list.back().data_var_list.back().dim_list.push_back(d);
1439 p->
swath_list.back().geo_var_list.back().dim_list.push_back(d);
1441 p->
swath_list.back().data_var_list.back().dim_list.push_back(d);
1445 p->
za_list.back().data_var_list.back().dim_list.push_back(d);
1451 #line 1452 "he5dds.tab.cc"
1455 #line 239 "he5dds.yy"
1458 cout <<
"Rule STR '=' dataseq:" << (yyvsp[-1]) << endl;
1461 #line 1462 "he5dds.tab.cc"
1465 #line 246 "he5dds.yy"
1468 cout <<
"Rule COMPRESSION_TYPE '=' STR:" << (yyvsp[-1]) << endl;
1472 #line 1473 "he5dds.tab.cc"
1476 #line 257 "he5dds.yy"
1490 cout <<
"Grid Name is:" << (yyvsp[0]) << endl;
1494 g.
name = (yyvsp[0]);
1498 #line 1499 "he5dds.tab.cc"
1502 #line 281 "he5dds.yy"
1508 cout <<
"Swath Name is:" << (yyvsp[0]) << endl;
1512 s.
name = (yyvsp[0]);
1517 #line 1518 "he5dds.tab.cc"
1521 #line 298 "he5dds.yy"
1527 cout <<
"Zonal Average Name is:" << (yyvsp[0]) << endl;
1531 z.
name = (yyvsp[0]);
1535 #line 1536 "he5dds.tab.cc"
1539 #line 315 "he5dds.yy"
1547 #line 1548 "he5dds.tab.cc"
1551 #line 323 "he5dds.yy"
1559 #line 1560 "he5dds.tab.cc"
1563 #line 333 "he5dds.yy"
1568 d.
size = atoi((yyvsp[0]));
1572 p->
grid_list.back().dim_list.push_back(d);
1578 p->
za_list.back().dim_list.push_back(d);
1582 #line 1583 "he5dds.tab.cc"
1586 #line 354 "he5dds.yy"
1588 ((
HE5Parser*)(he5parser))->parser_state = 10;
1590 #line 1591 "he5dds.tab.cc"
1594 #line 358 "he5dds.yy"
1596 ((
HE5Parser*)(he5parser))->parser_state = 11;
1598 #line 1599 "he5dds.tab.cc"
1602 #line 364 "he5dds.yy"
1605 cout << (yyvsp[0]) << endl;
1610 v.
name = (yyvsp[0]);
1613 switch(p->structure_state){
1616 p->grid_list.back().data_var_list.push_back(v);
1620 p->swath_list.back().data_var_list.push_back(v);
1625 p->za_list.back().data_var_list.push_back(v);
1629 p->err_msg =
"Unexpected parser structure state.";
1636 #line 1637 "he5dds.tab.cc"
1640 #line 401 "he5dds.yy"
1646 v.
name = (yyvsp[0]);
1647 p->
swath_list.back().geo_var_list.push_back(v);
1651 p->
err_msg =
"Geo field variable is defined on non-Swath structure:" + string((yyvsp[0]));
1657 #line 1658 "he5dds.tab.cc"
1661 #line 421 "he5dds.yy"
1665 cout <<
"XDim is:" << atoi((yyvsp[0])) << endl;
1671 d.
size = atoi((yyvsp[0]));
1674 p->
grid_list.back().dim_list.push_back(d);
1686 p->
za_list.back().dim_list.push_back(d);
1690 #line 1691 "he5dds.tab.cc"
1694 #line 452 "he5dds.yy"
1698 cout <<
"YDim is:" << atoi((yyvsp[0])) << endl;
1704 d.
size = atoi((yyvsp[0]));
1707 p->
grid_list.back().dim_list.push_back(d);
1713 p->
za_list.back().dim_list.push_back(d);
1716 #line 1717 "he5dds.tab.cc"
1720 #line 478 "he5dds.yy"
1723 cout <<
"GROUP=" << (yyvsp[0]) << endl;
1726 #line 1727 "he5dds.tab.cc"
1730 #line 489 "he5dds.yy"
1733 cout << (yyvsp[0]) << endl;
1736 #line 1737 "he5dds.tab.cc"
1740 #line 498 "he5dds.yy"
1744 cerr <<
"Got projection " << (yyvsp[0]) << endl;
1747 if(strncmp(
"HE5_GCTP_GEO", (yyvsp[0]), 12)==0)
1749 else if(strncmp(
"HE5_GCTP_UTM", (yyvsp[0]), 12)==0)
1751 else if(strncmp(
"HE5_GCTP_SPCS", (yyvsp[0]), 13)==0)
1753 else if(strncmp(
"HE5_GCTP_ALBERS", (yyvsp[0]), 15)==0)
1755 else if(strncmp(
"HE5_GCTP_LAMCC", (yyvsp[0]), 14)==0)
1757 else if(strncmp(
"HE5_GCTP_MERCAT", (yyvsp[0]), 15)==0)
1759 else if(strncmp(
"HE5_GCTP_PS", (yyvsp[0]), 11)==0)
1761 else if(strncmp(
"HE5_GCTP_POLYC", (yyvsp[0]), 14)==0)
1763 else if(strncmp(
"HE5_GCTP_EQUIDC", (yyvsp[0]), 15)==0)
1765 else if(strncmp(
"HE5_GCTP_TM", (yyvsp[0]), 11)==0)
1767 else if(strncmp(
"HE5_GCTP_STEREO", (yyvsp[0]), 15)==0)
1769 else if(strncmp(
"HE5_GCTP_LAMAZ", (yyvsp[0]), 14)==0)
1771 else if(strncmp(
"HE5_GCTP_AZMEQD", (yyvsp[0]), 15)==0)
1773 else if(strncmp(
"HE5_GCTP_GNOMON", (yyvsp[0]), 15)==0)
1775 else if(strncmp(
"HE5_GCTP_ORTHO", (yyvsp[0]), 14)==0)
1777 else if(strncmp(
"HE5_GCTP_GVNSP", (yyvsp[0]), 14)==0)
1779 else if(strncmp(
"HE5_GCTP_SNSOID", (yyvsp[0]), 15)==0)
1781 else if(strncmp(
"HE5_GCTP_EQRECT", (yyvsp[0]), 15)==0)
1783 else if(strncmp(
"HE5_GCTP_MILLER", (yyvsp[0]), 15)==0)
1785 else if(strncmp(
"HE5_GCTP_VGRINT", (yyvsp[0]), 15)==0)
1787 else if(strncmp(
"HE5_GCTP_HOM", (yyvsp[0]), 12)==0)
1789 else if(strncmp(
"HE5_GCTP_ROBIN", (yyvsp[0]), 14)==0)
1791 else if(strncmp(
"HE5_GCTP_SOM", (yyvsp[0]), 12)==0)
1793 else if(strncmp(
"HE5_GCTP_ALASKA", (yyvsp[0]), 15)==0)
1795 else if(strncmp(
"HE5_GCTP_GOOD", (yyvsp[0]), 13)==0)
1797 else if(strncmp(
"HE5_GCTP_MOLL", (yyvsp[0]), 13)==0)
1799 else if(strncmp(
"HE5_GCTP_IMOLL", (yyvsp[0]), 14)==0)
1801 else if(strncmp(
"HE5_GCTP_HAMMER", (yyvsp[0]), 15)==0)
1803 else if(strncmp(
"HE5_GCTP_WAGIV", (yyvsp[0]), 14)==0)
1805 else if(strncmp(
"HE5_GCTP_WAGVII", (yyvsp[0]), 15)==0)
1807 else if(strncmp(
"HE5_GCTP_OBLEQA", (yyvsp[0]), 15)==0)
1809 else if(strncmp(
"HE5_GCTP_CEA", (yyvsp[0]), 12)==0)
1811 else if(strncmp(
"HE5_GCTP_BCEA", (yyvsp[0]), 13)==0)
1813 else if(strncmp(
"HE5_GCTP_ISINUS", (yyvsp[0]), 15)==0)
1816 p->
err_msg = std::string(
"") +
1817 "An unknown projection is detected in StructMetadata." +
1818 "The projection code is " + (yyvsp[0]) +
".";
1823 #line 1824 "he5dds.tab.cc"
1827 #line 583 "he5dds.yy"
1836 if(strncmp(
"HE5_HDFE_CENTER", (yyvsp[0]), 15)==0)
1838 else if(strncmp(
"HE5_HDFE_CORNER", (yyvsp[0]), 15)==0)
1843 "Wrong PixelRegistration Value";
1848 #line 1849 "he5dds.tab.cc"
1852 #line 606 "he5dds.yy"
1859 if(strncmp(
"HE5_HDFE_GD_UL", (yyvsp[0]), 14)==0)
1861 else if(strncmp(
"HE5_HDFE_GD_UR", (yyvsp[0]), 14)==0)
1863 else if(strncmp(
"HE5_HDFE_GD_LL", (yyvsp[0]), 14)==0)
1865 else if(strncmp(
"HE5_HDFE_GD_LR", (yyvsp[0]), 14)==0)
1871 "Wrong Grid Origin Value:" + string((yyvsp[0]));
1877 #line 1878 "he5dds.tab.cc"
1881 #line 633 "he5dds.yy"
1884 fprintf(stdout,
"## %s %f %f\n", (yyvsp[-5]), atof((yyvsp[-3])), atof((yyvsp[-1])));
1895 #line 1896 "he5dds.tab.cc"
1899 #line 647 "he5dds.yy"
1902 fprintf(stderr,
"## %s %s\n", (yyvsp[-1]), (yyvsp[0]));
1905 #line 1906 "he5dds.tab.cc"
1909 #line 655 "he5dds.yy"
1912 fprintf(stdout,
"## %s %f %f\n", (yyvsp[-5]), atof((yyvsp[-3])), atof((yyvsp[-1])));
1921 #line 1922 "he5dds.tab.cc"
1925 #line 667 "he5dds.yy"
1928 #line 1929 "he5dds.tab.cc"
1932 #line 1933 "he5dds.tab.cc"
1960 yystate = yypgoto[yyn -
YYNTOKENS] + *yyssp;
1961 if (0 <= yystate && yystate <=
YYLAST && yycheck[yystate] == *yyssp)
1962 yystate = yytable[yystate];
1981 #if ! YYERROR_VERBOSE
1984 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1987 char const *yymsgp =
YY_(
"syntax error");
1988 int yysyntax_error_status;
1989 yysyntax_error_status = YYSYNTAX_ERROR;
1990 if (yysyntax_error_status == 0)
1992 else if (yysyntax_error_status == 1)
1994 if (yymsg != yymsgbuf)
2000 yymsg_alloc =
sizeof yymsgbuf;
2001 yysyntax_error_status = 2;
2005 yysyntax_error_status = YYSYNTAX_ERROR;
2010 if (yysyntax_error_status == 2)
2011 goto yyexhaustedlab;
2013 # undef YYSYNTAX_ERROR
2019 if (yyerrstatus == 3)
2024 if (yychar <=
YYEOF)
2027 if (yychar ==
YYEOF)
2032 yydestruct (
"Error: discarding",
2033 yytoken, &yylval, he5parser);
2071 yyn = yypact[yystate];
2088 yydestruct (
"Error: popping",
2089 yystos[yystate], yyvsp, he5parser);
2121 #if !defined yyoverflow || YYERROR_VERBOSE
2126 yyerror (he5parser,
YY_(
"memory exhausted"));
2137 yydestruct (
"Cleanup: discarding lookahead",
2138 yytoken, &yylval, he5parser);
2144 while (yyssp != yyss)
2146 yydestruct (
"Cleanup: popping",
2147 yystos[*yyssp], yyvsp, he5parser);
2155 if (yymsg != yymsgbuf)
2160 #line 671 "he5dds.yy"
2169 cerr <<
"he5dds.y ERROR: " << s << endl;
unsigned char yytype_uint8
float point_right
The rightmost coordinate value of a Grid.
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
#define YYSTACK_ALLOC_MAXIMUM
EOS5GridPRType pixelregistration
#define yytable_value_is_error(Yytable_value)
unsigned short int yytype_uint16
vector< HE5Swath > swath_list
float point_left
The leftmost coordinate value of a Grid.
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
EOS5GridPCType projection
EOS5GridPRType
This file defines a few enum types used by HDF-EOS5 products.
unsigned short int yytype_uint16
float point_lower
The bottom coordinate value of a Grid.
#define YY_STACK_PRINT(Bottom, Top)
string err_msg
Have any parse error message.
float point_upper
The top coordinate value of a Grid.
EOS5GridOriginType gridorigin
int parser_state
Have the StructMetadata parser's state.
int structure_state
Have the parser's state in terms of structure.
int he5ddsparse(HE5Parser *he5parser)
A class for parsing NASA HDF-EOS5 StructMetadata.
#define yypact_value_is_default(Yystate)
#define YY_REDUCE_PRINT(Rule)
vector< HE5Grid > grid_list
void he5ddserror(HE5Parser *he5parser, char *s)
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
unsigned char yytype_uint8