diff options
-rw-r--r-- | hl/src/H5LT.c | 9 | ||||
-rw-r--r-- | hl/src/H5LT.h | 4 | ||||
-rw-r--r-- | hl/src/H5LTanalyze.l | 10 | ||||
-rw-r--r-- | hl/src/H5LTparse.y | 3 | ||||
-rw-r--r-- | hl/src/lex.yy.c | 148 | ||||
-rw-r--r-- | hl/src/y.tab.c | 143 | ||||
-rw-r--r-- | hl/test/test_lite.c | 2 |
7 files changed, 164 insertions, 155 deletions
diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c index 0a694d9..08ac5b8 100644 --- a/hl/src/H5LT.c +++ b/hl/src/H5LT.c @@ -16,6 +16,10 @@ #include <string.h> #include <stdlib.h> +/* For Lex and Yacc */ +int input_len; +char *myinput; + /*------------------------------------------------------------------------- * * internal functions @@ -1997,14 +2001,15 @@ out: */ hid_t H5LTtext_to_dtype(const char *text) { - + extern int yyparse(void); hid_t type_id; hsize_t i; input_len = strlen(text); myinput = strdup(text); - type_id = yyparse(); + if((type_id = yyparse())<0) + goto out; free(myinput); input_len = 0; diff --git a/hl/src/H5LT.h b/hl/src/H5LT.h index 7a53a0d..f01e012 100644 --- a/hl/src/H5LT.h +++ b/hl/src/H5LT.h @@ -39,10 +39,6 @@ extern "C" { #endif -/* For Lex and Yacc */ -int input_len; -char *myinput; - /*------------------------------------------------------------------------- * * Make dataset functions diff --git a/hl/src/H5LTanalyze.l b/hl/src/H5LTanalyze.l index 364272f..51d8bb5 100644 --- a/hl/src/H5LTanalyze.l +++ b/hl/src/H5LTanalyze.l @@ -2,6 +2,8 @@ #include <string.h> #include<hdf5.h> #include "y.tab.h" + +int my_yyinput(char *, int); #undef YY_INPUT #define YY_INPUT(b, r, ms) (r=my_yyinput(b, ms)) #define token(x) (int)x @@ -11,7 +13,7 @@ extern int input_len; #define STACK_SIZE 16 /*variables for compound type*/ -extern struct cmpd_info { +struct cmpd_info { hid_t id; hbool_t is_field; hbool_t first_memb; @@ -20,7 +22,7 @@ extern struct cmpd_info cmpd_stack[STACK_SIZE]; extern int csindex; /*variables for array type*/ -extern struct arr_info { +struct arr_info { hsize_t dims[H5S_MAX_RANK]; int ndim; hbool_t is_dim; @@ -150,12 +152,12 @@ int my_yyinput(char *buf, int max_size) return ret; } -yyerror(msg) +int yyerror(char *msg) { printf("ERROR: %s before \"%s\".\n", msg, yytext); } -yywrap() +int yywrap() { return(1); } diff --git a/hl/src/H5LTparse.y b/hl/src/H5LTparse.y index 54824a9..26b7c8b 100644 --- a/hl/src/H5LTparse.y +++ b/hl/src/H5LTparse.y @@ -3,6 +3,9 @@ #include<string.h> #include<hdf5.h> +extern int yylex(); +extern int yyerror(char *); + #define STACK_SIZE 16 /*structure for compound type information*/ diff --git a/hl/src/lex.yy.c b/hl/src/lex.yy.c index 54829ed..06b288b 100644 --- a/hl/src/lex.yy.c +++ b/hl/src/lex.yy.c @@ -736,6 +736,8 @@ char *yytext; #include <string.h> #include<hdf5.h> #include "y.tab.h" + +int my_yyinput(char *, int); #undef YY_INPUT #define YY_INPUT(b, r, ms) (r=my_yyinput(b, ms)) #define token(x) (int)x @@ -745,7 +747,7 @@ extern int input_len; #define STACK_SIZE 16 /*variables for compound type*/ -extern struct cmpd_info { +struct cmpd_info { hid_t id; hbool_t is_field; hbool_t first_memb; @@ -754,7 +756,7 @@ extern struct cmpd_info cmpd_stack[STACK_SIZE]; extern int csindex; /*variables for array type*/ -extern struct arr_info { +struct arr_info { hsize_t dims[H5S_MAX_RANK]; int ndim; hbool_t is_dim; @@ -778,7 +780,7 @@ hbool_t first_quote = 1; #define TAG_STRING 1 -#line 782 "lex.yy.c" +#line 784 "lex.yy.c" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -929,10 +931,10 @@ YY_DECL register char *yy_cp = NULL, *yy_bp = NULL; register int yy_act; -#line 49 "H5LTanalyze.l" +#line 51 "H5LTanalyze.l" -#line 936 "lex.yy.c" +#line 938 "lex.yy.c" if ( yy_init ) { @@ -1018,272 +1020,272 @@ do_action: /* This label is used only to access EOF actions. */ { /* beginning of action switch */ case 1: YY_RULE_SETUP -#line 51 "H5LTanalyze.l" +#line 53 "H5LTanalyze.l" {return token(H5T_STD_I8BE_TOKEN);} YY_BREAK case 2: YY_RULE_SETUP -#line 52 "H5LTanalyze.l" +#line 54 "H5LTanalyze.l" {return token(H5T_STD_I8LE_TOKEN);} YY_BREAK case 3: YY_RULE_SETUP -#line 53 "H5LTanalyze.l" +#line 55 "H5LTanalyze.l" {return token(H5T_STD_I16BE_TOKEN);} YY_BREAK case 4: YY_RULE_SETUP -#line 54 "H5LTanalyze.l" +#line 56 "H5LTanalyze.l" {return token(H5T_STD_I16LE_TOKEN);} YY_BREAK case 5: YY_RULE_SETUP -#line 55 "H5LTanalyze.l" +#line 57 "H5LTanalyze.l" {return token(H5T_STD_I32BE_TOKEN);} YY_BREAK case 6: YY_RULE_SETUP -#line 56 "H5LTanalyze.l" +#line 58 "H5LTanalyze.l" {return token(H5T_STD_I32LE_TOKEN);} YY_BREAK case 7: YY_RULE_SETUP -#line 57 "H5LTanalyze.l" +#line 59 "H5LTanalyze.l" {return token(H5T_STD_I64BE_TOKEN);} YY_BREAK case 8: YY_RULE_SETUP -#line 58 "H5LTanalyze.l" +#line 60 "H5LTanalyze.l" {return token(H5T_STD_I64LE_TOKEN);} YY_BREAK case 9: YY_RULE_SETUP -#line 60 "H5LTanalyze.l" +#line 62 "H5LTanalyze.l" {return token(H5T_STD_U8BE_TOKEN);} YY_BREAK case 10: YY_RULE_SETUP -#line 61 "H5LTanalyze.l" +#line 63 "H5LTanalyze.l" {return token(H5T_STD_U8LE_TOKEN);} YY_BREAK case 11: YY_RULE_SETUP -#line 62 "H5LTanalyze.l" +#line 64 "H5LTanalyze.l" {return token(H5T_STD_U16BE_TOKEN);} YY_BREAK case 12: YY_RULE_SETUP -#line 63 "H5LTanalyze.l" +#line 65 "H5LTanalyze.l" {return token(H5T_STD_U16LE_TOKEN);} YY_BREAK case 13: YY_RULE_SETUP -#line 64 "H5LTanalyze.l" +#line 66 "H5LTanalyze.l" {return token(H5T_STD_U32BE_TOKEN);} YY_BREAK case 14: YY_RULE_SETUP -#line 65 "H5LTanalyze.l" +#line 67 "H5LTanalyze.l" {return token(H5T_STD_U32LE_TOKEN);} YY_BREAK case 15: YY_RULE_SETUP -#line 66 "H5LTanalyze.l" +#line 68 "H5LTanalyze.l" {return token(H5T_STD_U64BE_TOKEN);} YY_BREAK case 16: YY_RULE_SETUP -#line 67 "H5LTanalyze.l" +#line 69 "H5LTanalyze.l" {return token(H5T_STD_U64LE_TOKEN);} YY_BREAK case 17: YY_RULE_SETUP -#line 69 "H5LTanalyze.l" +#line 71 "H5LTanalyze.l" {return token(H5T_NATIVE_CHAR_TOKEN);} YY_BREAK case 18: YY_RULE_SETUP -#line 70 "H5LTanalyze.l" +#line 72 "H5LTanalyze.l" {return token(H5T_NATIVE_SCHAR_TOKEN);} YY_BREAK case 19: YY_RULE_SETUP -#line 71 "H5LTanalyze.l" +#line 73 "H5LTanalyze.l" {return token(H5T_NATIVE_UCHAR_TOKEN);} YY_BREAK case 20: YY_RULE_SETUP -#line 72 "H5LTanalyze.l" +#line 74 "H5LTanalyze.l" {return token(H5T_NATIVE_SHORT_TOKEN);} YY_BREAK case 21: YY_RULE_SETUP -#line 73 "H5LTanalyze.l" +#line 75 "H5LTanalyze.l" {return token(H5T_NATIVE_USHORT_TOKEN);} YY_BREAK case 22: YY_RULE_SETUP -#line 74 "H5LTanalyze.l" +#line 76 "H5LTanalyze.l" {return token(H5T_NATIVE_INT_TOKEN);} YY_BREAK case 23: YY_RULE_SETUP -#line 75 "H5LTanalyze.l" +#line 77 "H5LTanalyze.l" {return token(H5T_NATIVE_UINT_TOKEN);} YY_BREAK case 24: YY_RULE_SETUP -#line 76 "H5LTanalyze.l" +#line 78 "H5LTanalyze.l" {return token(H5T_NATIVE_LONG_TOKEN);} YY_BREAK case 25: YY_RULE_SETUP -#line 77 "H5LTanalyze.l" +#line 79 "H5LTanalyze.l" {return token(H5T_NATIVE_ULONG_TOKEN);} YY_BREAK case 26: YY_RULE_SETUP -#line 78 "H5LTanalyze.l" +#line 80 "H5LTanalyze.l" {return token(H5T_NATIVE_LLONG_TOKEN);} YY_BREAK case 27: YY_RULE_SETUP -#line 79 "H5LTanalyze.l" +#line 81 "H5LTanalyze.l" {return token(H5T_NATIVE_ULLONG_TOKEN);} YY_BREAK case 28: YY_RULE_SETUP -#line 81 "H5LTanalyze.l" +#line 83 "H5LTanalyze.l" {return token(H5T_IEEE_F32BE_TOKEN);} YY_BREAK case 29: YY_RULE_SETUP -#line 82 "H5LTanalyze.l" +#line 84 "H5LTanalyze.l" {return token(H5T_IEEE_F32LE_TOKEN);} YY_BREAK case 30: YY_RULE_SETUP -#line 83 "H5LTanalyze.l" +#line 85 "H5LTanalyze.l" {return token(H5T_IEEE_F64BE_TOKEN);} YY_BREAK case 31: YY_RULE_SETUP -#line 84 "H5LTanalyze.l" +#line 86 "H5LTanalyze.l" {return token(H5T_IEEE_F64LE_TOKEN);} YY_BREAK case 32: YY_RULE_SETUP -#line 85 "H5LTanalyze.l" +#line 87 "H5LTanalyze.l" {return token(H5T_NATIVE_FLOAT_TOKEN);} YY_BREAK case 33: YY_RULE_SETUP -#line 86 "H5LTanalyze.l" +#line 88 "H5LTanalyze.l" {return token(H5T_NATIVE_DOUBLE_TOKEN);} YY_BREAK case 34: YY_RULE_SETUP -#line 87 "H5LTanalyze.l" +#line 89 "H5LTanalyze.l" {return token(H5T_NATIVE_LDOUBLE_TOKEN);} YY_BREAK case 35: YY_RULE_SETUP -#line 89 "H5LTanalyze.l" +#line 91 "H5LTanalyze.l" {return token(H5T_STRING_TOKEN);} YY_BREAK case 36: YY_RULE_SETUP -#line 90 "H5LTanalyze.l" +#line 92 "H5LTanalyze.l" {return token(STRSIZE_TOKEN);} YY_BREAK case 37: YY_RULE_SETUP -#line 91 "H5LTanalyze.l" +#line 93 "H5LTanalyze.l" {return token(STRPAD_TOKEN);} YY_BREAK case 38: YY_RULE_SETUP -#line 92 "H5LTanalyze.l" +#line 94 "H5LTanalyze.l" {return token(CSET_TOKEN);} YY_BREAK case 39: YY_RULE_SETUP -#line 93 "H5LTanalyze.l" +#line 95 "H5LTanalyze.l" {return token(CTYPE_TOKEN);} YY_BREAK case 40: YY_RULE_SETUP -#line 94 "H5LTanalyze.l" +#line 96 "H5LTanalyze.l" {return token(H5T_STR_NULLTERM_TOKEN);} YY_BREAK case 41: YY_RULE_SETUP -#line 95 "H5LTanalyze.l" +#line 97 "H5LTanalyze.l" {return token(H5T_STR_NULLPAD_TOKEN);} YY_BREAK case 42: YY_RULE_SETUP -#line 96 "H5LTanalyze.l" +#line 98 "H5LTanalyze.l" {return token(H5T_STR_SPACEPAD_TOKEN);} YY_BREAK case 43: YY_RULE_SETUP -#line 97 "H5LTanalyze.l" +#line 99 "H5LTanalyze.l" {return token(H5T_CSET_ASCII_TOKEN);} YY_BREAK case 44: YY_RULE_SETUP -#line 98 "H5LTanalyze.l" +#line 100 "H5LTanalyze.l" {return token(H5T_C_S1_TOKEN);} YY_BREAK case 45: YY_RULE_SETUP -#line 99 "H5LTanalyze.l" +#line 101 "H5LTanalyze.l" {return token(H5T_FORTRAN_S1_TOKEN);} YY_BREAK case 46: YY_RULE_SETUP -#line 100 "H5LTanalyze.l" +#line 102 "H5LTanalyze.l" {return token(H5T_VARIABLE_TOKEN);} YY_BREAK case 47: YY_RULE_SETUP -#line 102 "H5LTanalyze.l" +#line 104 "H5LTanalyze.l" {return token(H5T_COMPOUND_TOKEN);} YY_BREAK case 48: YY_RULE_SETUP -#line 103 "H5LTanalyze.l" +#line 105 "H5LTanalyze.l" {return token(H5T_ENUM_TOKEN);} YY_BREAK case 49: YY_RULE_SETUP -#line 104 "H5LTanalyze.l" +#line 106 "H5LTanalyze.l" {return token(H5T_ARRAY_TOKEN);} YY_BREAK case 50: YY_RULE_SETUP -#line 105 "H5LTanalyze.l" +#line 107 "H5LTanalyze.l" {return token(H5T_VLEN_TOKEN);} YY_BREAK case 51: YY_RULE_SETUP -#line 107 "H5LTanalyze.l" +#line 109 "H5LTanalyze.l" {return token(H5T_OPAQUE_TOKEN);} YY_BREAK case 52: YY_RULE_SETUP -#line 108 "H5LTanalyze.l" +#line 110 "H5LTanalyze.l" {return token(OPQ_SIZE_TOKEN);} YY_BREAK case 53: YY_RULE_SETUP -#line 109 "H5LTanalyze.l" +#line 111 "H5LTanalyze.l" {return token(OPQ_TAG_TOKEN);} YY_BREAK case 54: YY_RULE_SETUP -#line 111 "H5LTanalyze.l" +#line 113 "H5LTanalyze.l" { if(is_str_size || (is_enum && is_enum_memb) || is_opq_size || (asindex>-1 && arr_stack[asindex].is_dim)) { @@ -1295,7 +1297,7 @@ YY_RULE_SETUP YY_BREAK case 55: YY_RULE_SETUP -#line 120 "H5LTanalyze.l" +#line 122 "H5LTanalyze.l" { /*if it's first quote, and is a opaque tag or an enum symbol*/ if((is_opq_tag || is_enum || (csindex>-1 && cmpd_stack[csindex].is_field)) && first_quote) { @@ -1308,7 +1310,7 @@ YY_RULE_SETUP YY_BREAK case 56: YY_RULE_SETUP -#line 129 "H5LTanalyze.l" +#line 131 "H5LTanalyze.l" { yylval.sval = strdup(yytext); BEGIN INITIAL; @@ -1317,45 +1319,45 @@ YY_RULE_SETUP YY_BREAK case 57: YY_RULE_SETUP -#line 135 "H5LTanalyze.l" +#line 137 "H5LTanalyze.l" {return token('{');} YY_BREAK case 58: YY_RULE_SETUP -#line 136 "H5LTanalyze.l" +#line 138 "H5LTanalyze.l" {return token('}');} YY_BREAK case 59: YY_RULE_SETUP -#line 137 "H5LTanalyze.l" +#line 139 "H5LTanalyze.l" {return token('[');} YY_BREAK case 60: YY_RULE_SETUP -#line 138 "H5LTanalyze.l" +#line 140 "H5LTanalyze.l" {return token(']');} YY_BREAK case 61: YY_RULE_SETUP -#line 139 "H5LTanalyze.l" +#line 141 "H5LTanalyze.l" {return token(';');} YY_BREAK case 62: YY_RULE_SETUP -#line 140 "H5LTanalyze.l" +#line 142 "H5LTanalyze.l" ; YY_BREAK case 63: YY_RULE_SETUP -#line 141 "H5LTanalyze.l" +#line 143 "H5LTanalyze.l" { return 0; } YY_BREAK case 64: YY_RULE_SETUP -#line 143 "H5LTanalyze.l" +#line 145 "H5LTanalyze.l" ECHO; YY_BREAK -#line 1359 "lex.yy.c" +#line 1361 "lex.yy.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(TAG_STRING): yyterminate(); @@ -2231,7 +2233,7 @@ int main() return 0; } #endif -#line 143 "H5LTanalyze.l" +#line 145 "H5LTanalyze.l" int my_yyinput(char *buf, int max_size) { @@ -2242,12 +2244,12 @@ int my_yyinput(char *buf, int max_size) return ret; } -yyerror(msg) +int yyerror(char *msg) { printf("ERROR: %s before \"%s\".\n", msg, yytext); } -yywrap() +int yywrap() { return(1); } diff --git a/hl/src/y.tab.c b/hl/src/y.tab.c index 20d6fbd..dc4e1c7 100644 --- a/hl/src/y.tab.c +++ b/hl/src/y.tab.c @@ -18,6 +18,9 @@ static int yygrowstack(); #include<string.h> #include<hdf5.h> +extern int yylex(); +extern int yyerror(char *); + #define STACK_SIZE 16 /*structure for compound type information*/ @@ -54,12 +57,12 @@ char* enum_memb_symbol; /*enum member symbol string*/ hbool_t is_opq_size = 0; /*flag to lexer for opaque type size*/ hbool_t is_opq_tag = 0; /*flag to lexer for opaque type tag*/ -#line 43 "H5LTparse.y" +#line 46 "H5LTparse.y" typedef union { int ival; /*for integer token*/ char *sval; /*for compound member name*/ } YYSTYPE; -#line 63 "y.tab.c" +#line 66 "y.tab.c" #define YYERRCODE 256 #define H5T_STD_I8BE_TOKEN 257 #define H5T_STD_I8LE_TOKEN 258 @@ -609,155 +612,155 @@ yyreduce: switch (yyn) { case 1: -#line 75 "H5LTparse.y" +#line 78 "H5LTparse.y" { memset(arr_stack, 0, STACK_SIZE*sizeof(struct arr_info)); /*initialize here?*/ } break; case 2: -#line 76 "H5LTparse.y" +#line 79 "H5LTparse.y" { return yyval.ival;} break; case 12: -#line 90 "H5LTparse.y" +#line 93 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_STD_I8BE); } break; case 13: -#line 91 "H5LTparse.y" +#line 94 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_STD_I8LE); } break; case 14: -#line 92 "H5LTparse.y" +#line 95 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_STD_I16BE); } break; case 15: -#line 93 "H5LTparse.y" +#line 96 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_STD_I16LE); } break; case 16: -#line 94 "H5LTparse.y" +#line 97 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_STD_I32BE); } break; case 17: -#line 95 "H5LTparse.y" +#line 98 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_STD_I32LE); } break; case 18: -#line 96 "H5LTparse.y" +#line 99 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_STD_I64BE); } break; case 19: -#line 97 "H5LTparse.y" +#line 100 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_STD_I64LE); } break; case 20: -#line 98 "H5LTparse.y" +#line 101 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_STD_U8BE); } break; case 21: -#line 99 "H5LTparse.y" +#line 102 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_STD_U8LE); } break; case 22: -#line 100 "H5LTparse.y" +#line 103 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_STD_U16BE); } break; case 23: -#line 101 "H5LTparse.y" +#line 104 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_STD_U16LE); } break; case 24: -#line 102 "H5LTparse.y" +#line 105 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_STD_U32BE); } break; case 25: -#line 103 "H5LTparse.y" +#line 106 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_STD_U32LE); } break; case 26: -#line 104 "H5LTparse.y" +#line 107 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_STD_U64BE); } break; case 27: -#line 105 "H5LTparse.y" +#line 108 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_STD_U64LE); } break; case 28: -#line 106 "H5LTparse.y" +#line 109 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_NATIVE_CHAR); } break; case 29: -#line 107 "H5LTparse.y" +#line 110 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_NATIVE_SCHAR); } break; case 30: -#line 108 "H5LTparse.y" +#line 111 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_NATIVE_UCHAR); } break; case 31: -#line 109 "H5LTparse.y" +#line 112 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_NATIVE_SHORT); } break; case 32: -#line 110 "H5LTparse.y" +#line 113 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_NATIVE_USHORT); } break; case 33: -#line 111 "H5LTparse.y" +#line 114 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_NATIVE_INT); } break; case 34: -#line 112 "H5LTparse.y" +#line 115 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_NATIVE_UINT); } break; case 35: -#line 113 "H5LTparse.y" +#line 116 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_NATIVE_LONG); } break; case 36: -#line 114 "H5LTparse.y" +#line 117 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_NATIVE_ULONG); } break; case 37: -#line 115 "H5LTparse.y" +#line 118 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_NATIVE_LLONG); } break; case 38: -#line 116 "H5LTparse.y" +#line 119 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_NATIVE_ULLONG); } break; case 39: -#line 119 "H5LTparse.y" +#line 122 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_IEEE_F32BE); } break; case 40: -#line 120 "H5LTparse.y" +#line 123 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_IEEE_F32LE); } break; case 41: -#line 121 "H5LTparse.y" +#line 124 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_IEEE_F64BE); } break; case 42: -#line 122 "H5LTparse.y" +#line 125 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_IEEE_F64LE); } break; case 43: -#line 123 "H5LTparse.y" +#line 126 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_NATIVE_FLOAT); } break; case 44: -#line 124 "H5LTparse.y" +#line 127 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_NATIVE_DOUBLE); } break; case 45: -#line 125 "H5LTparse.y" +#line 128 "H5LTparse.y" { yyval.ival = H5Tcopy(H5T_NATIVE_LDOUBLE); } break; case 46: -#line 129 "H5LTparse.y" +#line 132 "H5LTparse.y" { csindex++; cmpd_stack[csindex].id = H5Tcreate(H5T_COMPOUND, 1); /*temporarily set size to 1*/ } break; case 47: -#line 131 "H5LTparse.y" +#line 134 "H5LTparse.y" { yyval.ival = cmpd_stack[csindex].id; cmpd_stack[csindex].id = 0; cmpd_stack[csindex].first_memb = 1; @@ -765,11 +768,11 @@ case 47: } break; case 50: -#line 140 "H5LTparse.y" +#line 143 "H5LTparse.y" { cmpd_stack[csindex].is_field = 1; /*notify lexer a compound member is parsed*/ } break; case 51: -#line 142 "H5LTparse.y" +#line 145 "H5LTparse.y" { int origin_size, new_size; hid_t dtype_id = cmpd_stack[csindex].id; @@ -795,11 +798,11 @@ case 51: } break; case 53: -#line 169 "H5LTparse.y" +#line 172 "H5LTparse.y" { asindex++; /*pushd onto the stack*/ } break; case 54: -#line 171 "H5LTparse.y" +#line 174 "H5LTparse.y" { yyval.ival = H5Tarray_create(yyvsp[-1].ival, arr_stack[asindex].ndims, arr_stack[asindex].dims, NULL); arr_stack[asindex].ndims = 0; @@ -808,11 +811,11 @@ case 54: } break; case 57: -#line 181 "H5LTparse.y" +#line 184 "H5LTparse.y" { arr_stack[asindex].is_dim = 1; /*notice lexer of dimension size*/ } break; case 58: -#line 182 "H5LTparse.y" +#line 185 "H5LTparse.y" { int ndims = arr_stack[asindex].ndims; arr_stack[asindex].dims[ndims] = (hsize_t)yylval.ival; arr_stack[asindex].ndims++; @@ -820,15 +823,15 @@ case 58: } break; case 61: -#line 193 "H5LTparse.y" +#line 196 "H5LTparse.y" { yyval.ival = H5Tvlen_create(yyvsp[-1].ival); H5Tclose(yyvsp[-1].ival); } break; case 62: -#line 198 "H5LTparse.y" +#line 201 "H5LTparse.y" { is_opq_size = 1; } break; case 63: -#line 199 "H5LTparse.y" +#line 202 "H5LTparse.y" { size_t size = (size_t)yylval.ival; yyval.ival = H5Tcreate(H5T_OPAQUE, size); @@ -836,22 +839,22 @@ case 63: } break; case 64: -#line 204 "H5LTparse.y" +#line 207 "H5LTparse.y" { is_opq_tag = 1; } break; case 65: -#line 205 "H5LTparse.y" +#line 208 "H5LTparse.y" { H5Tset_tag(yyvsp[-6].ival, yylval.sval); is_opq_tag = 0; } break; case 66: -#line 209 "H5LTparse.y" +#line 212 "H5LTparse.y" { yyval.ival = yyvsp[-8].ival; } break; case 69: -#line 219 "H5LTparse.y" +#line 222 "H5LTparse.y" { if(yyvsp[-1].ival == H5T_C_S1_TOKEN) yyval.ival = H5Tcopy(H5T_C_S1); @@ -860,11 +863,11 @@ case 69: } break; case 70: -#line 225 "H5LTparse.y" +#line 228 "H5LTparse.y" { is_str_size = 1; } break; case 71: -#line 226 "H5LTparse.y" +#line 229 "H5LTparse.y" { if(yyvsp[-1].ival == H5T_VARIABLE_TOKEN) H5Tset_size(yyvsp[-4].ival, H5T_VARIABLE); @@ -874,7 +877,7 @@ case 71: } break; case 72: -#line 234 "H5LTparse.y" +#line 237 "H5LTparse.y" { if(yyvsp[-1].ival == H5T_STR_NULLTERM_TOKEN) H5Tset_strpad(yyvsp[-8].ival, H5T_STR_NULLTERM); @@ -885,61 +888,61 @@ case 72: } break; case 73: -#line 243 "H5LTparse.y" +#line 246 "H5LTparse.y" { if(yyvsp[-1].ival == H5T_CSET_ASCII_TOKEN) H5Tset_cset(yyvsp[-12].ival, H5T_CSET_ASCII); } break; case 74: -#line 247 "H5LTparse.y" +#line 250 "H5LTparse.y" { yyval.ival = yyvsp[-14].ival; } break; case 75: -#line 250 "H5LTparse.y" +#line 253 "H5LTparse.y" {yyval.ival = H5T_VARIABLE_TOKEN;} break; case 77: -#line 253 "H5LTparse.y" +#line 256 "H5LTparse.y" {yyval.ival = H5T_STR_NULLTERM_TOKEN;} break; case 78: -#line 254 "H5LTparse.y" +#line 257 "H5LTparse.y" {yyval.ival = H5T_STR_NULLPAD_TOKEN;} break; case 79: -#line 255 "H5LTparse.y" +#line 258 "H5LTparse.y" {yyval.ival = H5T_STR_SPACEPAD_TOKEN;} break; case 80: -#line 257 "H5LTparse.y" +#line 260 "H5LTparse.y" {yyval.ival = H5T_CSET_ASCII_TOKEN;} break; case 81: -#line 259 "H5LTparse.y" +#line 262 "H5LTparse.y" {yyval.ival = H5T_C_S1_TOKEN;} break; case 82: -#line 260 "H5LTparse.y" +#line 263 "H5LTparse.y" {yyval.ival = H5T_FORTRAN_S1_TOKEN;} break; case 83: -#line 264 "H5LTparse.y" +#line 267 "H5LTparse.y" { is_enum = 1; enum_id = H5Tenum_create(yyvsp[-1].ival); H5Tclose(yyvsp[-1].ival); } break; case 84: -#line 266 "H5LTparse.y" +#line 269 "H5LTparse.y" { is_enum = 0; /*reset*/ yyval.ival = enum_id; } break; case 87: -#line 271 "H5LTparse.y" +#line 274 "H5LTparse.y" { is_enum_memb = 1; /*indicate member of enum*/ enum_memb_symbol = strdup(yylval.sval); } break; case 88: -#line 276 "H5LTparse.y" +#line 279 "H5LTparse.y" { int memb_val; if(is_enum && is_enum_memb) { /*if it's an enum member*/ @@ -949,7 +952,7 @@ case 88: } } break; -#line 953 "y.tab.c" +#line 956 "y.tab.c" } yyssp -= yym; yystate = *yyssp; diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c index 6b10919..144bfea 100644 --- a/hl/test/test_lite.c +++ b/hl/test/test_lite.c @@ -14,10 +14,8 @@ #include <stdlib.h> - #include "H5LT.h" - #define FILE_NAME "test_lite1.h5" #define FILE_NAME2 "test_lite2.h5" |