Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hdf5 merge issue 486 v112 #489

Merged
merged 33 commits into from
Mar 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
bcaf211
Snapshot version 1.12 release 1-3. Update version to 1.12.1-4.
lrknox Nov 23, 2020
9b9ef60
Merge branch 'hdf5_1_12' of https://github.com/HDFGroup/hdf5 into hdf…
lrknox Nov 26, 2020
7a78fd1
First cut of the H5 public API documentation. (#80)
gheber Nov 18, 2020
ba77da0
Full set of current H5F documentation. (#105)
gheber Nov 21, 2020
3c0394b
Doxygen - added (mostly) beginner functions (#112)
bljhdf Nov 23, 2020
3360ebd
Add src/H5module.h to MANIFEST.
lrknox Nov 26, 2020
5be0fe8
Merge branch 'hdf5_1_12' of https://github.com/HDFGroup/hdf5 into hdf…
lrknox Dec 11, 2020
a1ec23d
Merge branch 'hdf5_1_12' of https://github.com/HDFGroup/hdf5 into hdf…
lrknox Dec 14, 2020
0937643
Merge branch 'hdf5_1_12' of https://github.com/HDFGroup/hdf5 into hdf…
lrknox Dec 17, 2020
93f4ce1
close #195. (#196)
hyoklee Dec 17, 2020
d9fcbec
Merge branch 'hdf5_1_12' of https://github.com/HDFGroup/hdf5 into hdf…
lrknox Dec 26, 2020
16ca6d1
Avoid aligned access for references by decoding into temporary buffer…
qkoziol Dec 19, 2020
acfe570
Merge branch 'hdf5_1_12' of https://github.com/HDFGroup/hdf5 into hdf…
lrknox Jan 6, 2021
edf801c
Modify temporary rpath for testing in java example scripts. (#230)
lrknox Dec 29, 2020
3736bd1
Merge branch 'hdf5_1_12' of https://github.com/HDFGroup/hdf5 into hdf…
lrknox Jan 9, 2021
dbc345b
Merge branch 'hdf5_1_12' of https://github.com/HDFGroup/hdf5 into hdf…
lrknox Feb 23, 2021
3af66dd
Fix undefined left shifting of negative numbers (#338)
seanm Feb 19, 2021
67d2ada
Merge branch 'hdf5_1_12' of https://github.com/HDFGroup/hdf5 into hdf…
lrknox Mar 10, 2021
febde7c
Fixes various warnings noticed on Windows (#425)
derobins Mar 5, 2021
ac550e1
Merge branch 'hdf5_1_12' of https://github.com/HDFGroup/hdf5 into hdf…
lrknox Mar 10, 2021
9840892
Applied clang-tidy readability-non-const-parameter warning fixes auto…
seanm Mar 9, 2021
e391ca0
Added C++11 override keyword where appropriate (#433)
seanm Mar 10, 2021
aaa4929
Various clang tidy warning fixes (#448)
seanm Mar 10, 2021
c7ae947
Removed checks/workarounds for pre-C++89 compatibility (#449)
seanm Mar 10, 2021
eb95b11
Fixed all clang-tidy bugprone-suspicious-string-compare warnings (#451)
seanm Mar 10, 2021
80d2a1d
Remove 2 functions incorrectly merged from develop in a cherry-pick m…
lrknox Mar 11, 2021
fb6f838
Merge branch 'hdf5_1_12' of https://github.com/HDFGroup/hdf5 into hdf…
lrknox Mar 21, 2021
bfdc7df
Simplified hl parsing (#399)
gnuoyd Mar 15, 2021
a7647a0
Removed workarounds for pre-standard inline keyword (#423)
seanm Mar 12, 2021
d286ab4
Replaces checks for fork, etc. with checks for unistd.h (#457)
derobins Mar 11, 2021
bfc49df
develop JNI export references and java updates (#467)
byrnHDF Mar 12, 2021
fe348c2
Merge branch 'hdf5_1_12' of https://github.com/HDFGroup/hdf5 into hdf…
lrknox Mar 24, 2021
8bda1d2
Update h5LT files with latest flex and Bison available on jelly (#502)
lrknox Mar 24, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,842 changes: 923 additions & 919 deletions hl/src/H5LTanalyze.c

Large diffs are not rendered by default.

91 changes: 29 additions & 62 deletions hl/src/H5LTanalyze.l
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@
*/

%{
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <hdf5.h>

#include "H5private.h"
#include "H5LTparse.h"

static char *trim_quotes(const char *);
int my_yyinput(char *, int);
#undef YY_INPUT
#define YY_INPUT(b, r, ms) (r=my_yyinput(b, ms))
Expand All @@ -37,43 +41,8 @@ int my_yyinput(char *, int);
extern char *myinput;
extern size_t input_len;

#define STACK_SIZE 16

/*variables for compound type*/
struct cmpd_info {
hid_t id;
hbool_t is_field;
hbool_t first_memb;
};
extern struct cmpd_info cmpd_stack[STACK_SIZE];
extern int csindex;

/*variables for array type*/
struct arr_info {
hsize_t dims[H5S_MAX_RANK];
int ndim;
hbool_t is_dim;
};
extern struct arr_info arr_stack[STACK_SIZE];
extern int asindex;

/*variables for enumerate type*/
extern hbool_t is_enum;
extern hbool_t is_enum_memb;

/*variables for string type*/
extern hbool_t is_str_size;

/*variables for opaque type*/
extern hbool_t is_opq_size;
extern hbool_t is_opq_tag;

hbool_t first_quote = 1;

%}

%s TAG_STRING

%%

H5T_STD_I8BE {return hid(H5T_STD_I8BE_TOKEN);}
Expand Down Expand Up @@ -138,32 +107,12 @@ 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) ||
is_opq_size || (asindex>-1 && arr_stack[asindex].is_dim) ||
(csindex>-1 && cmpd_stack[csindex].is_field) ) {
H5LTyylval.ival = atoi(yytext);
return NUMBER;
} else
REJECT;
H5LTyylval.ival = HDatoi(yytext);
return NUMBER;
}

"\"" {
/*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))
&& first_quote) {
first_quote = 0;
BEGIN TAG_STRING;
} else /*if it's second quote*/
first_quote = 1;
return token('"');
}
<TAG_STRING>[^\"]+ {
#ifdef H5_HAVE_WIN32_API
H5LTyylval.sval = _strdup(yytext);
#else /* H5_HAVE_WIN32_API */
H5LTyylval.sval = strdup(yytext);
#endif /* H5_HAVE_WIN32_API */
BEGIN INITIAL;
["][^\"]+["] {
H5LTyylval.sval = trim_quotes(yytext);
return STRING;
}

Expand All @@ -174,21 +123,39 @@ OPQ_TAG {return token(OPQ_TAG_TOKEN);}
":" {return token(':');}
";" {return token(';');}
[ \t\n]* ;
"\n" { return 0; }

%%

/* Allocate a copy of `quoted` with the double quote character at
* the beginning and the one at the end both removed. The caller is
* responsible for free()ing the copy.
*/
static char *
trim_quotes(const char *quoted)
{
size_t len = HDstrlen(quoted);
char *trimmed;

HDassert(quoted[0] == '"' && quoted[len - 1] == '"');

trimmed = HDstrdup(quoted + 1);
trimmed[len - 2] = '\0';

return trimmed;
}

int my_yyinput(char *buf, int max_size)
{
int ret;

memcpy(buf, myinput, input_len);
HDmemcpy(buf, myinput, input_len);
ret = (int)input_len;
return ret;
}

int H5LTyyerror(const char *msg)
{
printf("ERROR: %s before \"%s\".\n", msg, yytext);
HDprintf("ERROR: %s before \"%s\".\n", msg, yytext);
return 0;
}

Expand Down
Loading