summaryrefslogtreecommitdiffstats
path: root/hl/src/H5LTanalyze.l
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2006-01-16 17:27:07 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2006-01-16 17:27:07 (GMT)
commitda37fca10b287d3a9dee57ca59e6c4bd733463ae (patch)
treec85b7e7a73ad1e1941629cfe701d546de4db4f0e /hl/src/H5LTanalyze.l
parentf78ed9a18d7f632a52c69e2cc508bf4c4ff6d6bc (diff)
downloadhdf5-da37fca10b287d3a9dee57ca59e6c4bd733463ae.zip
hdf5-da37fca10b287d3a9dee57ca59e6c4bd733463ae.tar.gz
hdf5-da37fca10b287d3a9dee57ca59e6c4bd733463ae.tar.bz2
[svn-r11882] Purpose: Revision
Description: Revise a few details of H5LTtext_to_dtype() and H5LTdtype_to_text(), 1. changed the DDL definition of string, opaque, and compound types. 2. added a new parameter of H5LT_lang_t type to these two functions. Platforms tested: h5committest and fuss.
Diffstat (limited to 'hl/src/H5LTanalyze.l')
-rw-r--r--hl/src/H5LTanalyze.l13
1 files changed, 9 insertions, 4 deletions
diff --git a/hl/src/H5LTanalyze.l b/hl/src/H5LTanalyze.l
index f7ea61e..02a4b04 100644
--- a/hl/src/H5LTanalyze.l
+++ b/hl/src/H5LTanalyze.l
@@ -37,10 +37,10 @@ extern hbool_t is_enum_memb;
/*variables for string type*/
extern hbool_t is_str_size;
-extern hbool_t is_str_pad;
/*variables for opaque type*/
extern hbool_t is_opq_size;
+extern hbool_t is_opq_tag;
hbool_t first_quote = 1;
@@ -101,6 +101,7 @@ 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);}
H5T_FORTRAN_S1 {return token(H5T_FORTRAN_S1_TOKEN);}
H5T_VARIABLE {return token(H5T_VARIABLE_TOKEN);}
@@ -112,10 +113,12 @@ H5T_VLEN {return token(H5T_VLEN_TOKEN);}
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) ||
- is_opq_size || (asindex>-1 && arr_stack[asindex].is_dim)) {
+ 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) ) {
yylval.ival = atoi(yytext);
return NUMBER;
} else
@@ -124,7 +127,8 @@ OPQ_SIZE {return token(OPQ_SIZE_TOKEN);}
"\"" {
/*if it's first quote, and is a compound field name or an enum symbol*/
- if((is_enum || (csindex>-1 && cmpd_stack[csindex].is_field)) && first_quote) {
+ 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*/
@@ -141,6 +145,7 @@ OPQ_SIZE {return token(OPQ_SIZE_TOKEN);}
"}" {return token('}');}
"[" {return token('[');}
"]" {return token(']');}
+":" {return token(':');}
";" {return token(';');}
[ \t\n]* ;
"\n" { return 0; }