summaryrefslogtreecommitdiffstats
path: root/hl/src/H5LTanalyze.l
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2020-10-06 16:56:59 (GMT)
committerGitHub <noreply@github.com>2020-10-06 16:56:59 (GMT)
commitc0e087a65a2f1ab354d3016bc29262eeec722d6f (patch)
treef01a0153167d084012568904bf8ca5a591ec1444 /hl/src/H5LTanalyze.l
parent2384233b73921a2e1754d04141d9d6d54451ec26 (diff)
downloadhdf5-c0e087a65a2f1ab354d3016bc29262eeec722d6f.zip
hdf5-c0e087a65a2f1ab354d3016bc29262eeec722d6f.tar.gz
hdf5-c0e087a65a2f1ab354d3016bc29262eeec722d6f.tar.bz2
Fix VFD h5repacktest (#20)
* h5repacktest VFD fix and formatting changes * Fix memory leak in H5PL__find_plugin_in_path When encountering a directory, the current loop iteration was skipped without freeing the memory allocated for the path. * Refactor parser GCC diagnostic statements * genparser on jelly with default bison/flex Co-authored-by: Michael Kuhn <michael.kuhn@ovgu.de>
Diffstat (limited to 'hl/src/H5LTanalyze.l')
-rw-r--r--hl/src/H5LTanalyze.l32
1 files changed, 10 insertions, 22 deletions
diff --git a/hl/src/H5LTanalyze.l b/hl/src/H5LTanalyze.l
index cdd5b0d..04d3321 100644
--- a/hl/src/H5LTanalyze.l
+++ b/hl/src/H5LTanalyze.l
@@ -23,18 +23,6 @@
#include <hdf5.h>
#include "H5LTparse.h"
-/* Turn off suggest const & malloc attribute warnings in gcc */
-#if defined __GNUC__ && 402 <= __GNUC__ * 100 + __GNUC_MINOR__
-#pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
-#endif
-
-/* Turn off null dereference warnings in gcc.
- * We have no control over this generated code.
- */
-#if defined __GNUC__ && 600 <= __GNUC__ * 100
-#pragma GCC diagnostic ignored "-Wnull-dereference"
-#endif
-
int my_yyinput(char *, int);
#undef YY_INPUT
#define YY_INPUT(b, r, ms) (r=my_yyinput(b, ms))
@@ -131,9 +119,9 @@ STRSIZE {return token(STRSIZE_TOKEN);}
STRPAD {return token(STRPAD_TOKEN);}
CSET {return token(CSET_TOKEN);}
CTYPE {return token(CTYPE_TOKEN);}
-H5T_STR_NULLTERM {return token(H5T_STR_NULLTERM_TOKEN);}
-H5T_STR_NULLPAD {return token(H5T_STR_NULLPAD_TOKEN);}
-H5T_STR_SPACEPAD {return token(H5T_STR_SPACEPAD_TOKEN);}
+H5T_STR_NULLTERM {return token(H5T_STR_NULLTERM_TOKEN);}
+H5T_STR_NULLPAD {return token(H5T_STR_NULLPAD_TOKEN);}
+H5T_STR_SPACEPAD {return token(H5T_STR_SPACEPAD_TOKEN);}
H5T_CSET_ASCII {return token(H5T_CSET_ASCII_TOKEN);}
H5T_CSET_UTF8 {return token(H5T_CSET_UTF8_TOKEN);}
H5T_C_S1 {return token(H5T_C_S1_TOKEN);}
@@ -149,19 +137,19 @@ H5T_OPAQUE {return token(H5T_OPAQUE_TOKEN);}
OPQ_SIZE {return token(OPQ_SIZE_TOKEN);}
OPQ_TAG {return token(OPQ_TAG_TOKEN);}
-[0-9]+ {
- if( is_str_size || (is_enum && is_enum_memb) ||
+[0-9]+ {
+ if( is_str_size || (is_enum && is_enum_memb) ||
is_opq_size || (asindex>-1 && arr_stack[asindex].is_dim) ||
(csindex>-1 && cmpd_stack[csindex].is_field) ) {
H5LTyylval.ival = atoi(yytext);
- return NUMBER;
+ return NUMBER;
} else
REJECT;
}
"\"" {
/*if it's first quote, and is a compound field name or an enum symbol*/
- if((is_opq_tag || is_enum || (csindex>-1 && cmpd_stack[csindex].is_field))
+ if((is_opq_tag || is_enum || (csindex>-1 && cmpd_stack[csindex].is_field))
&& first_quote) {
first_quote = 0;
BEGIN TAG_STRING;
@@ -178,7 +166,7 @@ OPQ_TAG {return token(OPQ_TAG_TOKEN);}
BEGIN INITIAL;
return STRING;
}
-
+
"{" {return token('{');}
"}" {return token('}');}
"[" {return token('[');}
@@ -192,8 +180,8 @@ OPQ_TAG {return token(OPQ_TAG_TOKEN);}
int my_yyinput(char *buf, int max_size)
{
int ret;
-
- memcpy(buf, myinput, input_len);
+
+ memcpy(buf, myinput, input_len);
ret = (int)input_len;
return ret;
}