From a74d3573e5623bf4da6e346f830a7d0e25aeb313 Mon Sep 17 00:00:00 2001 From: Charlie Zender Date: Fri, 18 Feb 2022 11:00:37 -0800 Subject: [PATCH 1/7] First draft of BitRound implementation --- include/netcdf.h | 10 ++-- libdispatch/dvar.c | 26 ++++++---- libhdf5/hdf5open.c | 11 +++- libhdf5/hdf5var.c | 86 ++++++++++++++++++++++---------- libhdf5/nc4hdf.c | 9 +++- libnczarr/zvar.c | 94 ++++++++++++++++++++++++---------- libsrc4/nc4var.c | 108 ++++++++++++++++++++++++++++------------ nc_test4/tst_quantize.c | 4 +- 8 files changed, 247 insertions(+), 101 deletions(-) diff --git a/include/netcdf.h b/include/netcdf.h index b8540c6ab..c63a3aaa8 100644 --- a/include/netcdf.h +++ b/include/netcdf.h @@ -331,19 +331,23 @@ there. */ #define NC_NOQUANTIZE 0 /**< No quantization in use. */ #define NC_QUANTIZE_BITGROOM 1 /**< Use BitGroom quantization. */ #define NC_QUANTIZE_GRANULARBR 2 /**< Use Granular BitRound quantization. */ +#define NC_QUANTIZE_BITROUND 3 /**< Use BitRound quantization. */ /** When quantization is used for a variable, an attribute of the * appropriate name is added. */ -#define NC_QUANTIZE_BITGROOM_ATT_NAME "_QuantizeBitgroomNumberOfSignificantDigits" +#define NC_QUANTIZE_BITGROOM_ATT_NAME "_QuantizeBitGroomNumberOfSignificantDigits" #define NC_QUANTIZE_GRANULARBR_ATT_NAME "_QuantizeGranularBitRoundNumberOfSignificantDigits" +#define NC_QUANTIZE_BITROUND_ATT_NAME "_QuantizeBitRoundNumberOfSignificantBits" /** For quantization, the allowed value of number of significant - * digits for float. */ + * decimal and binary digits, respectively, for float. */ #define NC_QUANTIZE_MAX_FLOAT_NSD (7) +#define NC_QUANTIZE_MAX_FLOAT_NSB (23) /** For quantization, the allowed value of number of significant - * digits for double. */ + * decimal and binary digits, respectively, for double. */ #define NC_QUANTIZE_MAX_DOUBLE_NSD (15) +#define NC_QUANTIZE_MAX_DOUBLE_NSB (52) /** The netcdf version 3 functions all return integer error status. * These are the possible values, in addition to certain values from diff --git a/libdispatch/dvar.c b/libdispatch/dvar.c index f13f14c81..8ed6c46bb 100644 --- a/libdispatch/dvar.c +++ b/libdispatch/dvar.c @@ -469,7 +469,7 @@ nc_def_var_deflate(int ncid, int varid, int shuffle, int deflate, int deflate_le The data are quantized by setting unneeded bits to zeros or ones so that they may compress well. BitGroom sets bits alternately to 1/0, - while Granular BitRound (GBR) sets (more) bits to zeros. + while BitRound and Granular BitRound (GBR) round (more) bits to zeros Quantization is lossy (data are irretrievably altered), and it improves the compression ratio provided by a subsequent lossless compression filter. Quantization alone will not reduce the data size. @@ -479,9 +479,8 @@ nc_def_var_deflate(int ncid, int varid, int shuffle, int deflate, int deflate_le compression will result in significant improvent in the final data size. - This data quantization used the BitGroom algorithm. A notable - feature of BitGroom is that the data it processes remain in IEEE754 - format after quantization. Therefore the BitGroom algorithm does + A notable feature of all the quantization algorithms is data remain + in IEEE754 format afterwards. Therefore quantization algorithms do nothing when data are read. Quantization is only available for variables of type NC_FLOAT or @@ -489,8 +488,8 @@ nc_def_var_deflate(int ncid, int varid, int shuffle, int deflate, int deflate_le types return an error (NC_EINVAL). Variables that use quantize will have added an attribute with name - ::NC_QUANTIZE_ATT_NAME, which will contain the number of - significant digits. Users should not delete or change this + ::NC_QUANTIZE_[ALGORITHM_NAME]_ATT_NAME, which will contain the + number of significant digits. Users should not delete or change this attribute. This is the only record that quantize has been applied to the data. @@ -529,11 +528,16 @@ nc_def_var_deflate(int ncid, int varid, int shuffle, int deflate, int deflate_le @param ncid File ID. @param varid Variable ID. ::NC_GLOBAL may not be used. @param quantize_mode Quantization mode. May be ::NC_NOQUANTIZE or - ::NC_QUANTIZE_BITGROOM or ::NC_QUANTIZE_GRANULARBR. - @param nsd Number of significant digits. May be any integer from 1 - to ::NC_QUANTIZE_MAX_FLOAT_NSD (for variables of type ::NC_FLOAT) - or ::NC_QUANTIZE_MAX_DOUBLE_NSD (for variables of type - ::NC_DOUBLE). Ignored if quantize_mode = NC_NOQUANTIZE. + ::NC_QUANTIZE_BITGROOM or ::NC_QUANTIZE_GRANULARBR or + ::NC_QUANTIZE_BITROUND. + @param nsd Number of significant digits (either decimal or binary). + May be any integer from 1 to ::NC_QUANTIZE_MAX_FLOAT_NSD (for variables + of type ::NC_FLOAT) or ::NC_QUANTIZE_MAX_DOUBLE_NSD (for variables + of type ::NC_DOUBLE) for mode ::NC_QUANTIZE_BITGROOM and mode + ::NC_QUANTIZE_GRANULARBR. May be any integer from 1 to + ::NC_QUANTIZE_MAX_FLOAT_NSB (for variables of type ::NC_FLOAT) or + ::NC_QUANTIZE_MAX_DOUBLE_NSB (for variables of type ::NC_DOUBLE) + for mode ::NC_QUANTIZE_BITROUND. Ignored if quantize_mode = NC_NOQUANTIZE. @return ::NC_NOERR No error. @return ::NC_EGLOBAL Can't use ::NC_GLOBAL with this function. diff --git a/libhdf5/hdf5open.c b/libhdf5/hdf5open.c index f301d63e3..17c489b3b 100644 --- a/libhdf5/hdf5open.c +++ b/libhdf5/hdf5open.c @@ -1222,7 +1222,16 @@ static int get_quantize_info(NC_VAR_INFO_T *var) attid = H5Aopen_by_name(datasetid, ".", NC_QUANTIZE_GRANULARBR_ATT_NAME, H5P_DEFAULT, H5P_DEFAULT); if (attid > 0) + { var->quantize_mode = NC_QUANTIZE_GRANULARBR; + } + else + { + attid = H5Aopen_by_name(datasetid, ".", NC_QUANTIZE_BITROUND_ATT_NAME, + H5P_DEFAULT, H5P_DEFAULT); + if (attid > 0) + var->quantize_mode = NC_QUANTIZE_BITROUND; + } } /* If there is an attribute, read it for the nsd. */ @@ -2317,7 +2326,7 @@ read_type(NC_GRP_INFO_T *grp, hid_t hdf_typeid, char *type_name) * for both global and variable attributes. * * @param loc_id HDF5 attribute ID. - * @param att_name Name of the attrigute. + * @param att_name Name of the attribute. * @param ainfo HDF5 info struct for attribute. * @param att_data Pointer to an att_iter_info struct, which contains * pointers to the NC_GRP_INFO_T and (for variable attributes) the diff --git a/libhdf5/hdf5var.c b/libhdf5/hdf5var.c index d1eedcc73..967ec3fec 100644 --- a/libhdf5/hdf5var.c +++ b/libhdf5/hdf5var.c @@ -716,36 +716,54 @@ nc_def_var_extra(int ncid, int varid, int *shuffle, int *unused1, } /* Remember quantization settings. They will be used when data are - * written. */ + * written. + * Code block is identical to one in zvar.c---consider functionalizing */ if (quantize_mode) { - /* Only two valid mode settings. */ + /* Only four valid mode settings. */ if (*quantize_mode != NC_NOQUANTIZE && *quantize_mode != NC_QUANTIZE_BITGROOM && - *quantize_mode != NC_QUANTIZE_GRANULARBR) + *quantize_mode != NC_QUANTIZE_GRANULARBR && + *quantize_mode != NC_QUANTIZE_BITROUND) return NC_EINVAL; - if (*quantize_mode == NC_QUANTIZE_BITGROOM || *quantize_mode == NC_QUANTIZE_GRANULARBR) + if (*quantize_mode == NC_QUANTIZE_BITGROOM || + *quantize_mode == NC_QUANTIZE_GRANULARBR || + *quantize_mode == NC_QUANTIZE_BITROUND) { /* Only float and double types can have quantization. */ if (var->type_info->hdr.id != NC_FLOAT && var->type_info->hdr.id != NC_DOUBLE) return NC_EINVAL; - /* For bitgroom, number of significant digits is required. */ + + /* All quantization codecs require number of significant digits */ if (!nsd) return NC_EINVAL; /* NSD must be in range. */ if (*nsd <= 0) return NC_EINVAL; - if (var->type_info->hdr.id == NC_FLOAT && - *nsd > NC_QUANTIZE_MAX_FLOAT_NSD) - return NC_EINVAL; - if (var->type_info->hdr.id == NC_DOUBLE && - *nsd > NC_QUANTIZE_MAX_DOUBLE_NSD) - return NC_EINVAL; + if (*quantize_mode == NC_QUANTIZE_BITGROOM || + *quantize_mode == NC_QUANTIZE_GRANULARBR) + { + if (var->type_info->hdr.id == NC_FLOAT && + *nsd > NC_QUANTIZE_MAX_FLOAT_NSD) + return NC_EINVAL; + if (var->type_info->hdr.id == NC_DOUBLE && + *nsd > NC_QUANTIZE_MAX_DOUBLE_NSD) + return NC_EINVAL; + } + else if (*quantize_mode == NC_QUANTIZE_BITROUND) + { + if (var->type_info->hdr.id == NC_FLOAT && + *nsd > NC_QUANTIZE_MAX_FLOAT_NSB) + return NC_EINVAL; + if (var->type_info->hdr.id == NC_DOUBLE && + *nsd > NC_QUANTIZE_MAX_DOUBLE_NSB) + return NC_EINVAL; + } var->nsd = *nsd; } @@ -813,12 +831,25 @@ NC4_def_var_deflate(int ncid, int varid, int shuffle, int deflate, * error.) * * When quantize is turned on, and the number of significant digits - * has been specified, then the netCDF library will quantize according - * to the selected algorithm. BitGroom will apply all zeros or - * all ones (alternating) to bits which are not needed to specify the - * value to the number of significant digits. GranularBR will zero - * more bits than BG, and thus be more compressible and less accurate. - * Both will change the value of the data, and will make it more compressible. + * (NSD) has been specified, then the netCDF library will quantize according + * to the selected algorithm. BitGroom interprets NSD as decimal digits + * will apply all zeros or all ones (alternating) to bits which are not + * needed to specify the value to the number of significant decimal digits. + * BitGroom retain the same number of bits for all values of a variable. + * BitRound (BR) interprets NSD as binary digits (i.e., bits) and keeps the + * the user-specified number of significant bits then rounds the result + * to the nearest representable number according to IEEE rounding rules. + * BG and BR both retain a uniform number of significant bits for all + * values of a variable. Granular BitRound interprest NSD as decimal + * digits. GranularBR determines the number of bits to necessary to + * retain the user-specified number of significant digits individually + * for every value of the variable. GranularBR then applies the BR + * quantization algorithm on a granular, value-by-value, rather than + * uniformly for the entire variable. GranularBR quantizes more bits + * than BG, and is thus more compressive and less accurate than BG. + * BR knows bits and makes no guarantees about decimal precision. + * All quantization algorithms change the values of the data, and make + * it more compressible. * * Quantizing the data does not reduce the size of the data on disk, * but combining quantize with compression will allow for better @@ -830,10 +861,10 @@ NC4_def_var_deflate(int ncid, int varid, int shuffle, int deflate, * size. * * Variables which use quantize will have added an attribute with name - * ::NC_QUANTIZE_[ALG_NAME]_ATT_NAME, which will contain the number of - * significant digits. Users should not delete or change this - * attribute. This is the only record that quantize has been applied - * to the data. + * ::NC_QUANTIZE_BITGROOM_ATT_NAME, ::NC_QUANTIZE_GRANULARBR_ATT_NAME, + * or ::NC_QUANTIZE_BITROUND_ATT_NAME that contains the number of + * significant digits. Users should not delete or change this attribute. + * This is the only record that quantize has been applied to the data. * * As with the deflate settings, quantize settings may only be * modified before the first call to nc_enddef(). Once nc_enddef() is @@ -848,10 +879,15 @@ NC4_def_var_deflate(int ncid, int varid, int shuffle, int deflate, * @param ncid File ID. * @param varid Variable ID. NC_GLOBAL may not be used. * @param quantize_mode Quantization mode. May be ::NC_NOQUANTIZE or - * ::NC_QUANTIZE_BITGROOM or ::NC_QUANTIZE_GRANULARBR. - * @param nsd Number of significant digits. May be any integer from 1 - * to ::NC_QUANTIZE_MAX_FLOAT_NSD (for variables of type ::NC_FLOAT) or - * ::NC_QUANTIZE_MAX_DOUBLE_NSD (for variables of type ::NC_DOUBLE). + * ::NC_QUANTIZE_BITGROOM, ::NC_QUANTIZE_BITROUND or ::NC_QUANTIZE_GRANULARBR. + * @param nsd Number of significant digits (either decimal or binary). + * May be any integer from 1 to ::NC_QUANTIZE_MAX_FLOAT_NSD (for variables + * of type ::NC_FLOAT) or ::NC_QUANTIZE_MAX_DOUBLE_NSD (for variables + * of type ::NC_DOUBLE) for mode ::NC_QUANTIZE_BITGROOM and mode + * ::NC_QUANTIZE_GRANULARBR. May be any integer from 1 to + * ::NC_QUANTIZE_MAX_FLOAT_NSB (for variables of type ::NC_FLOAT) or + * ::NC_QUANTIZE_MAX_DOUBLE_NSB (for variables of type ::NC_DOUBLE) + * for mode ::NC_QUANTIZE_BITROUND. * * @returns ::NC_NOERR No error. * @returns ::NC_EBADID Bad ncid. diff --git a/libhdf5/nc4hdf.c b/libhdf5/nc4hdf.c index 819c056e4..4db9e1959 100644 --- a/libhdf5/nc4hdf.c +++ b/libhdf5/nc4hdf.c @@ -1020,7 +1020,9 @@ var_create_dataset(NC_GRP_INFO_T *grp, NC_VAR_INFO_T *var, nc_bool_t write_dimid } /* If quantization is in use, write an attribute indicating it, a - * single integer which is the number of significant digits. */ + * single integer which is the number of significant digits + * (NSD, for BitGroom and Granular BitRound) or number of significant bits + * (NSB, for BitRound). */ if (var->quantize_mode == NC_QUANTIZE_BITGROOM) if ((retval = nc4_put_att(var->container, var->hdr.id, NC_QUANTIZE_BITGROOM_ATT_NAME, NC_INT, 1, &var->nsd, NC_INT, 0))) @@ -1031,6 +1033,11 @@ var_create_dataset(NC_GRP_INFO_T *grp, NC_VAR_INFO_T *var, nc_bool_t write_dimid &var->nsd, NC_INT, 0))) BAIL(retval); + if (var->quantize_mode == NC_QUANTIZE_BITROUND) + if ((retval = nc4_put_att(var->container, var->hdr.id, NC_QUANTIZE_BITROUND_ATT_NAME, NC_INT, 1, + &var->nsd, NC_INT, 0))) + BAIL(retval); + /* Write attributes for this var. */ if ((retval = write_attlist(var->att, var->hdr.id, grp))) BAIL(retval); diff --git a/libnczarr/zvar.c b/libnczarr/zvar.c index d4325be8f..9f80ac101 100644 --- a/libnczarr/zvar.c +++ b/libnczarr/zvar.c @@ -769,34 +769,54 @@ ncz_def_var_extra(int ncid, int varid, int *shuffle, int *unused1, } /* Remember quantization settings. They will be used when data are - * written. */ + * written. + * Code block is identical to one in hdf5var.c---consider functionalizing */ if (quantize_mode) { - /* Only two valid mode settings. */ + /* Only four valid mode settings. */ if (*quantize_mode != NC_NOQUANTIZE && - *quantize_mode != NC_QUANTIZE_BITGROOM) + *quantize_mode != NC_QUANTIZE_BITGROOM && + *quantize_mode != NC_QUANTIZE_GRANULARBR && + *quantize_mode != NC_QUANTIZE_BITROUND) return NC_EINVAL; - if (*quantize_mode == NC_QUANTIZE_BITGROOM) - { + if (*quantize_mode == NC_QUANTIZE_BITGROOM || + *quantize_mode == NC_QUANTIZE_GRANULARBR || + *quantize_mode != NC_QUANTIZE_BITROUND) + { + /* Only float and double types can have quantization. */ if (var->type_info->hdr.id != NC_FLOAT && var->type_info->hdr.id != NC_DOUBLE) return NC_EINVAL; - /* For bitgroom, number of significant digits is required. */ + /* All quantization codecs require number of significant digits */ if (!nsd) return NC_EINVAL; /* NSD must be in range. */ if (*nsd <= 0) return NC_EINVAL; - if (var->type_info->hdr.id == NC_FLOAT && - *nsd > NC_QUANTIZE_MAX_FLOAT_NSD) - return NC_EINVAL; - if (var->type_info->hdr.id == NC_DOUBLE && - *nsd > NC_QUANTIZE_MAX_DOUBLE_NSD) - return NC_EINVAL; + + if (*quantize_mode == NC_QUANTIZE_BITGROOM || + *quantize_mode == NC_QUANTIZE_GRANULARBR) + { + if (var->type_info->hdr.id == NC_FLOAT && + *nsd > NC_QUANTIZE_MAX_FLOAT_NSD) + return NC_EINVAL; + if (var->type_info->hdr.id == NC_DOUBLE && + *nsd > NC_QUANTIZE_MAX_DOUBLE_NSD) + return NC_EINVAL; + } + else if (*quantize_mode == NC_QUANTIZE_BITROUND) + { + if (var->type_info->hdr.id == NC_FLOAT && + *nsd > NC_QUANTIZE_MAX_FLOAT_NSB) + return NC_EINVAL; + if (var->type_info->hdr.id == NC_DOUBLE && + *nsd > NC_QUANTIZE_MAX_DOUBLE_NSB) + return NC_EINVAL; + } var->nsd = *nsd; } @@ -1020,10 +1040,25 @@ NCZ_def_var_endian(int ncid, int varid, int endianness) * error.) * * When quantize is turned on, and the number of significant digits - * has been specified, then the netCDF library will apply all zeros or - * all ones (alternating) to bits which are not needed to specify the - * value to the number of significant digits. This will change the - * value of the data, but will make it more compressable. + * (NSD) has been specified, then the netCDF library will quantize according + * to the selected algorithm. BitGroom interprets NSD as decimal digits + * will apply all zeros or all ones (alternating) to bits which are not + * needed to specify the value to the number of significant decimal digits. + * BitGroom retain the same number of bits for all values of a variable. + * BitRound (BR) interprets NSD as binary digits (i.e., bits) and keeps the + * the user-specified number of significant bits then rounds the result + * to the nearest representable number according to IEEE rounding rules. + * BG and BR both retain a uniform number of significant bits for all + * values of a variable. Granular BitRound interprest NSD as decimal + * digits. GranularBR determines the number of bits to necessary to + * retain the user-specified number of significant digits individually + * for every value of the variable. GranularBR then applies the BR + * quantization algorithm on a granular, value-by-value, rather than + * uniformly for the entire variable. GranularBR quantizes more bits + * than BG, and is thus more compressive and less accurate than BG. + * BR knows bits and makes no guarantees about decimal precision. + * All quantization algorithms change the values of the data, and make + * it more compressible. * * Quantizing the data does not reduce the size of the data on disk, * but combining quantize with compression will allow for better @@ -1034,12 +1069,11 @@ NCZ_def_var_endian(int ncid, int varid, int endianness) * compression will result in significant improvent in the final data * size. * - * Variables which use quantize will have added an attribute with either the name - * ::NC_QUANTIZE_BITGROOM_ATT_NAME or ::NC_QUANTIZE_GRANULARBR, but in either case - * will contain the number of significant digits. - * Users should not delete or change this - * attribute. This is the only record that quantize has been applied - * to the data. + * Variables which use quantize will have added an attribute with name + * ::NC_QUANTIZE_BITGROOM_ATT_NAME, ::NC_QUANTIZE_GRANULARBR_ATT_NAME, + * or ::NC_QUANTIZE_BITROUND_ATT_NAME that contains the number of + * significant digits. Users should not delete or change this attribute. + * This is the only record that quantize has been applied to the data. * * As with the deflate settings, quantize settings may only be * modified before the first call to nc_enddef(). Once nc_enddef() is @@ -1054,10 +1088,15 @@ NCZ_def_var_endian(int ncid, int varid, int endianness) * @param ncid File ID. * @param varid Variable ID. NC_GLOBAL may not be used. * @param quantize_mode Quantization mode. May be ::NC_NOQUANTIZE or - * ::NC_QUANTIZE_BITGROOM or ::NC_QUANTIZE_GRANULARBR. - * @param nsd Number of significant digits. May be any integer from 1 - * to ::NC_QUANTIZE_MAX_FLOAT_NSD (for variables of type ::NC_FLOAT) or - * ::NC_QUANTIZE_MAX_DOUBLE_NSD (for variables of type ::NC_DOUBLE). + * ::NC_QUANTIZE_BITGROOM, ::NC_QUANTIZE_BITROUND or ::NC_QUANTIZE_GRANULARBR. + * @param nsd Number of significant digits (either decimal or binary). + * May be any integer from 1 to ::NC_QUANTIZE_MAX_FLOAT_NSD (for variables + * of type ::NC_FLOAT) or ::NC_QUANTIZE_MAX_DOUBLE_NSD (for variables + * of type ::NC_DOUBLE) for mode ::NC_QUANTIZE_BITGROOM and mode + * ::NC_QUANTIZE_GRANULARBR. May be any integer from 1 to + * ::NC_QUANTIZE_MAX_FLOAT_NSB (for variables of type ::NC_FLOAT) or + * ::NC_QUANTIZE_MAX_DOUBLE_NSB (for variables of type ::NC_DOUBLE) + * for mode ::NC_QUANTIZE_BITROUND. * * @returns ::NC_NOERR No error. * @returns ::NC_EBADID Bad ncid. @@ -1094,6 +1133,9 @@ NCZ_ensure_quantizer(int ncid, NC_VAR_INFO_T* var) } else if(NCZ_get_att(ncid,var->hdr.id,NC_QUANTIZE_GRANULARBR_ATT_NAME,&nsd,NC_INT)==NC_NOERR) { var->quantize_mode = NC_QUANTIZE_GRANULARBR; var->nsd = nsd; + } else if(NCZ_get_att(ncid,var->hdr.id,NC_QUANTIZE_BITROUND_ATT_NAME,&nsd,NC_INT)==NC_NOERR) { + var->quantize_mode = NC_QUANTIZE_BITROUND; + var->nsd = nsd; } else { var->quantize_mode = NC_NOQUANTIZE; var->nsd = 0; diff --git a/libsrc4/nc4var.c b/libsrc4/nc4var.c index c6c241059..1b41ba3b8 100644 --- a/libsrc4/nc4var.c +++ b/libsrc4/nc4var.c @@ -21,14 +21,6 @@ /** @internal Default size for unlimited dim chunksize. */ #define DEFAULT_1D_UNLIM_SIZE (4096) -/** @internal Minimum number of explicit significand bits to preserve - * when zeroing/bit-masking floating point values. Codes will preserve - * at least two explicit bits, IEEE significand representation - * contains one implicit bit Thus preserve a least three bits which is - * approximately one sigificant decimal digit Used in - * nco_ppc_bitmask() and nco_ppc_bitmask_scl() */ -#define NCO_PPC_BIT_XPL_NBR_MIN 2 - /* Define log_e for 10 and 2. Prefer constants defined in math.h, * however, GCC environments can have hard time defining M_LN10/M_LN2 * despite finding math.h */ @@ -41,13 +33,15 @@ /** Used in quantize code. Number of explicit bits in significand for * floats. Bits 0-22 of SP significands are explicit. Bit 23 is - * implicitly 1. */ + * implicitly 1. Currently redundant with NC_QUANTIZE_MAX_FLOAT_NSB */ + * and with limits.h/climit (FLT_MANT_DIG-1) */ #define BIT_XPL_NBR_SGN_FLT (23) /** Used in quantize code. Number of explicit bits in significand for - * doubles. Bits 0-52 of DP significands are explicit. Bit 53 is - * implicitly 1. */ -#define BIT_XPL_NBR_SGN_DBL (53) + * doubles. Bits 0-51 of DP significands are explicit. Bit 52 is + * implicitly 1. Currently redundant with NC_QUANTIZE_MAX_DOUBLE_NSB + * and with limits.h/climit (DBL_MANT_DIG-1) */ +#define BIT_XPL_NBR_SGN_DBL (52) /** Pointer union for floating point and bitmask types. */ typedef union { /* ptr_unn */ @@ -498,8 +492,8 @@ NC4_var_par_access(int ncid, int varid, int par_access) * values that overflow the type. * * This function applies quantization to float and double data, if - * desired. The code to do this is derived from the bitgroom filter in - * the CCR project (see + * desired. The code to do this is derived from the corresponding + * filter in the CCR project (e.g., * https://github.com/ccr/ccr/blob/master/hdf5_plugins/BITGROOM/src/H5Zbitgroom.c). * * @param src Pointer to source of data. @@ -510,11 +504,11 @@ NC4_var_par_access(int ncid, int varid, int par_access) * @param range_error Pointer that gets 1 if there was a range error. * @param fill_value The fill value. * @param strict_nc3 Non-zero if strict model in effect. - * @param quantize_mode May be ::NC_NOQUANTIZE or - * ::NC_QUANTIZE_BITGROOM or ::NC_QUANTIZE_GRANULARBR. - * @param nsd Number of significant diggits for quantizize. Ignored - * unless quantize_mode is ::NC_QUANTIZE_BITGROOM or - * ::NC_QUANTIZE_GRANULARBR. + * @param quantize_mode May be ::NC_NOQUANTIZE, ::NC_QUANTIZE_BITGROOM, + * ::NC_QUANTIZE_GRANULARBR, or ::NC_QUANTIZE_BITROUND. + * @param nsd Number of significant digits for quantize. Ignored + * unless quantize_mode is ::NC_QUANTIZE_BITGROOM, + * ::NC_QUANTIZE_GRANULARBR, or ::NC_QUANTIZE_BITROUND * * @returns ::NC_NOERR No error. * @returns ::NC_EBADTYPE Type not found. @@ -574,7 +568,7 @@ nc4_convert_type(const void *src, void *dest, const nc_type src_type, { assert(dest_type == NC_FLOAT || dest_type == NC_DOUBLE); - /* Parameters shared by both BitGroom and GranularBR */ + /* Parameters shared by all quantization codecs */ if (dest_type == NC_FLOAT) { /* Determine the fill value. */ @@ -595,18 +589,33 @@ nc4_convert_type(const void *src, void *dest, const nc_type src_type, } - /* Parameters BitGroom needs to be set once */ - if (quantize_mode == NC_QUANTIZE_BITGROOM) + /* Set parameters used by BitGroom and BitRound here, outside value loop. + Equivalent parameters used by GranularBR are set inside value loop, + since keep bits and thus masks can change for every value. */ + if (quantize_mode == NC_QUANTIZE_BITGROOM || + quantize_mode == NC_QUANTIZE_BITROUND ) { - /* How many bits to preserve? Being conservative, we round up the - * exact binary digits of precision. Add one because the first bit - * is implicit not explicit but corner cases prevent our taking - * advantage of this. */ + + if (quantize_mode == NC_QUANTIZE_BITGROOM){ + + /* BitGroom interprets nsd as number of significant decimal digits + * Must convert that to number of significant bits to preserve + * How many bits to preserve? Being conservative, we round up the + * exact binary digits of precision. Add one because the first bit + * is implicit not explicit but corner cases prevent our taking + * advantage of this. */ prc_bnr_xpl_rqr = (unsigned short)ceil(nsd * bit_per_dgt) + 1; if (dest_type == NC_DOUBLE) prc_bnr_xpl_rqr++; /* Seems necessary for double-precision * ppc=array(1.234567,1.0e-6,$dmn) */ + + else if (quantize_mode == NC_QUANTIZE_BITROUND){ + + /* BitRound interprets nsd as number of significant binary digits (bits) */ + prc_bnr_xpl_rqr = nsd; + + } if (dest_type == NC_FLOAT) { @@ -617,13 +626,17 @@ nc4_convert_type(const void *src, void *dest, const nc_type src_type, msk_f32_u32_zro = 0u; /* Zero all bits */ msk_f32_u32_zro = ~msk_f32_u32_zro; /* Turn all bits to ones */ - /* Bit Shave mask for AND: Left shift zeros into bits to be + /* BitShave mask for AND: Left shift zeros into bits to be * rounded, leave ones in untouched bits. */ msk_f32_u32_zro <<= bit_xpl_nbr_zro; - /* Bit Set mask for OR: Put ones into bits to be set, zeros in + /* BitSet mask for OR: Put ones into bits to be set, zeros in * untouched bits. */ msk_f32_u32_one = ~msk_f32_u32_zro; + + /* BitRound mask for ADD: Set one bit: the MSB of LSBs */ + msk_f32_u32_hshv=msk_f32_u32_one & (msk_f32_u32_zro >> 1); + } else { @@ -633,14 +646,17 @@ nc4_convert_type(const void *src, void *dest, const nc_type src_type, msk_f64_u64_zro = 0ul; /* Zero all bits. */ msk_f64_u64_zro = ~msk_f64_u64_zro; /* Turn all bits to ones. */ - /* Bit Shave mask for AND: Left shift zeros into bits to be + /* BitShave mask for AND: Left shift zeros into bits to be * rounded, leave ones in untouched bits. */ msk_f64_u64_zro <<= bit_xpl_nbr_zro; - /* Bit Set mask for OR: Put ones into bits to be set, zeros in + /* BitSet mask for OR: Put ones into bits to be set, zeros in * untouched bits. */ msk_f64_u64_one =~ msk_f64_u64_zro; + /* BitRound mask for ADD: Set one bit: the MSB of LSBs */ + msk_f64_u64_hshv = msk_f64_u64_one & (msk_f64_u64_zro >> 1); + } } @@ -1409,7 +1425,7 @@ nc4_convert_type(const void *src, void *dest, const nc_type src_type, { if (dest_type == NC_FLOAT) { - /* Bit-Groom: alternately shave and set LSBs */ + /* BitGroom: alternately shave and set LSBs */ op1.fp = (float *)dest; u32_ptr = op1.ui32p; for (idx = 0L; idx < len; idx += 2L) @@ -1421,7 +1437,7 @@ nc4_convert_type(const void *src, void *dest, const nc_type src_type, } else { - /* Bit-Groom: alternately shave and set LSBs. */ + /* BitGroom: alternately shave and set LSBs. */ op1.dp = (double *)dest; u64_ptr = op1.ui64p; for (idx = 0L; idx < len; idx += 2L) @@ -1433,6 +1449,34 @@ nc4_convert_type(const void *src, void *dest, const nc_type src_type, } } /* endif BitGroom */ + if (quantize_mode == NC_QUANTIZE_BITROUND) + { + if (dest_type == NC_FLOAT) + { + /* BitRound: Quantize to user-specified NSB with IEEE-rounding */ + op1.fp = (float *)dest; + u32_ptr = op1.ui32p; + for (idx = 0L; idx < len; idx++){ + if (op1.fp[idx] != mss_val_cmp_flt){ + u32_ptr[idx] += msk_f32_u32_hshv; /* Add 1 to the MSB of LSBs, carry 1 to mantissa or even exponent */ + u32_ptr[idx] &= msk_f32_u32_zro; /* Shave it */ + } + } + } + else + { + /* BitRound: Quantize to user-specified NSB with IEEE-rounding */ + op1.dp = (double *)dest; + u64_ptr = op1.ui64p; + for (idx = 0L; idx < len; idx++){ + if (op1.dp[idx] != mss_val_cmp_dbl){ + u64_ptr[idx] += msk_f64_u64_hshv; /* Add 1 to the MSB of LSBs, carry 1 to mantissa or even exponent */ + u64_ptr[idx] &= msk_f64_u64_zro; /* Shave it */ + } + } + } + } /* endif BitRound */ + if (quantize_mode == NC_QUANTIZE_GRANULARBR) { if (dest_type == NC_FLOAT) diff --git a/nc_test4/tst_quantize.c b/nc_test4/tst_quantize.c index 4abea412a..f4a1a7780 100644 --- a/nc_test4/tst_quantize.c +++ b/nc_test4/tst_quantize.c @@ -116,10 +116,10 @@ main(int argc, char **argv) if (nc_def_var_quantize(ncid, NC_GLOBAL, NC_QUANTIZE_BITGROOM, NSD_3) != NC_EGLOBAL) ERR; if (nc_def_var_quantize(ncid, varid2 + 1, NC_QUANTIZE_BITGROOM, NSD_3) != NC_ENOTVAR) ERR; /* Invalid values. */ - if (nc_def_var_quantize(ncid, varid1, NC_QUANTIZE_GRANULARBR + 1, NSD_3) != NC_EINVAL) ERR; + if (nc_def_var_quantize(ncid, varid1, NC_QUANTIZE_BITROUND + 1, NSD_3) != NC_EINVAL) ERR; if (nc_def_var_quantize(ncid, varid1, NC_QUANTIZE_BITGROOM, -1) != NC_EINVAL) ERR; if (nc_def_var_quantize(ncid, varid1, NC_QUANTIZE_BITGROOM, NC_QUANTIZE_MAX_FLOAT_NSD + 1) != NC_EINVAL) ERR; - if (nc_def_var_quantize(ncid, varid2, NC_QUANTIZE_GRANULARBR + 1, 3) != NC_EINVAL) ERR; + if (nc_def_var_quantize(ncid, varid2, NC_QUANTIZE_BITROUND + 1, 3) != NC_EINVAL) ERR; if (nc_def_var_quantize(ncid, varid2, NC_QUANTIZE_BITGROOM, -1) != NC_EINVAL) ERR; if (nc_def_var_quantize(ncid, varid2, NC_QUANTIZE_BITGROOM, NC_QUANTIZE_MAX_DOUBLE_NSD + 1) != NC_EINVAL) ERR; if (nc_def_var_quantize(ncid, varid2, NC_QUANTIZE_BITGROOM, 0) != NC_EINVAL) ERR; From 72eb8b2ce2bb5e5259ca3ebca54cb2b617e44978 Mon Sep 17 00:00:00 2001 From: Charlie Zender Date: Fri, 18 Feb 2022 12:06:28 -0800 Subject: [PATCH 2/7] Fix bone-headed stuff. tst_quantize and tst_filter remain borken. --- libsrc4/nc4var.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/libsrc4/nc4var.c b/libsrc4/nc4var.c index 1b41ba3b8..6ad539e91 100644 --- a/libsrc4/nc4var.c +++ b/libsrc4/nc4var.c @@ -33,7 +33,7 @@ /** Used in quantize code. Number of explicit bits in significand for * floats. Bits 0-22 of SP significands are explicit. Bit 23 is - * implicitly 1. Currently redundant with NC_QUANTIZE_MAX_FLOAT_NSB */ + * implicitly 1. Currently redundant with NC_QUANTIZE_MAX_FLOAT_NSB * and with limits.h/climit (FLT_MANT_DIG-1) */ #define BIT_XPL_NBR_SGN_FLT (23) @@ -565,29 +565,29 @@ nc4_convert_type(const void *src, void *dest, const nc_type src_type, /* If quantize is in use, set up some values. Quantize can only be * used when the destination type is NC_FLOAT or NC_DOUBLE. */ if (quantize_mode != NC_NOQUANTIZE) - { + { assert(dest_type == NC_FLOAT || dest_type == NC_DOUBLE); /* Parameters shared by all quantization codecs */ if (dest_type == NC_FLOAT) - { + { /* Determine the fill value. */ if (fill_value) - mss_val_cmp_flt = *(float *)fill_value; + mss_val_cmp_flt = *(float *)fill_value; else - mss_val_cmp_flt = NC_FILL_FLOAT; + mss_val_cmp_flt = NC_FILL_FLOAT; - } + } else - { + { /* Determine the fill value. */ if (fill_value) - mss_val_cmp_dbl = *(double *)fill_value; + mss_val_cmp_dbl = *(double *)fill_value; else - mss_val_cmp_dbl = NC_FILL_DOUBLE; + mss_val_cmp_dbl = NC_FILL_DOUBLE; - } + } /* Set parameters used by BitGroom and BitRound here, outside value loop. Equivalent parameters used by GranularBR are set inside value loop, @@ -596,7 +596,6 @@ nc4_convert_type(const void *src, void *dest, const nc_type src_type, quantize_mode == NC_QUANTIZE_BITROUND ) { - if (quantize_mode == NC_QUANTIZE_BITGROOM){ /* BitGroom interprets nsd as number of significant decimal digits @@ -659,9 +658,11 @@ nc4_convert_type(const void *src, void *dest, const nc_type src_type, } - } + } - } /* endif quantize */ + } + + } /* endif quantize */ /* OK, this is ugly. If you can think of anything better, I'm open to suggestions! @@ -1450,9 +1451,9 @@ nc4_convert_type(const void *src, void *dest, const nc_type src_type, } /* endif BitGroom */ if (quantize_mode == NC_QUANTIZE_BITROUND) - { + { if (dest_type == NC_FLOAT) - { + { /* BitRound: Quantize to user-specified NSB with IEEE-rounding */ op1.fp = (float *)dest; u32_ptr = op1.ui32p; @@ -1462,9 +1463,9 @@ nc4_convert_type(const void *src, void *dest, const nc_type src_type, u32_ptr[idx] &= msk_f32_u32_zro; /* Shave it */ } } - } + } else - { + { /* BitRound: Quantize to user-specified NSB with IEEE-rounding */ op1.dp = (double *)dest; u64_ptr = op1.ui64p; @@ -1474,8 +1475,8 @@ nc4_convert_type(const void *src, void *dest, const nc_type src_type, u64_ptr[idx] &= msk_f64_u64_zro; /* Shave it */ } } - } - } /* endif BitRound */ + } + } /* endif BitRound */ if (quantize_mode == NC_QUANTIZE_GRANULARBR) { From b4969df1ef9c1aae3740b31ca4bae90e17b63e72 Mon Sep 17 00:00:00 2001 From: Charlie Zender Date: Sat, 19 Feb 2022 14:48:08 -0800 Subject: [PATCH 3/7] Set bit_xpl_nbr_sgn_dbl=52 not 53. No longer add additional bit to prc_bnr_xpl_rqr for BitGroom NC_DOUBLE. Bugfix maintains original BG behavior, fixes corner case. --- libsrc4/nc4var.c | 13 ++++--------- nc_test4/tst_quantize.c | 27 ++++++++++++++------------- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/libsrc4/nc4var.c b/libsrc4/nc4var.c index 6ad539e91..62355041b 100644 --- a/libsrc4/nc4var.c +++ b/libsrc4/nc4var.c @@ -604,12 +604,9 @@ nc4_convert_type(const void *src, void *dest, const nc_type src_type, * exact binary digits of precision. Add one because the first bit * is implicit not explicit but corner cases prevent our taking * advantage of this. */ - prc_bnr_xpl_rqr = (unsigned short)ceil(nsd * bit_per_dgt) + 1; - if (dest_type == NC_DOUBLE) - prc_bnr_xpl_rqr++; /* Seems necessary for double-precision - * ppc=array(1.234567,1.0e-6,$dmn) */ + prc_bnr_xpl_rqr = (unsigned short)ceil(nsd * bit_per_dgt) + 1; - else if (quantize_mode == NC_QUANTIZE_BITROUND){ + }else if (quantize_mode == NC_QUANTIZE_BITROUND){ /* BitRound interprets nsd as number of significant binary digits (bits) */ prc_bnr_xpl_rqr = nsd; @@ -658,12 +655,10 @@ nc4_convert_type(const void *src, void *dest, const nc_type src_type, } - } - } - + } /* endif quantize */ - + /* OK, this is ugly. If you can think of anything better, I'm open to suggestions! diff --git a/nc_test4/tst_quantize.c b/nc_test4/tst_quantize.c index f4a1a7780..9c4d60d2c 100644 --- a/nc_test4/tst_quantize.c +++ b/nc_test4/tst_quantize.c @@ -10,6 +10,7 @@ Dennis Heimbigner, 1/16/22 */ +#include /* Define fabs(), powf(), round() */ #include #include "err_macros.h" #include "netcdf.h" @@ -66,7 +67,7 @@ pd(double myd) uint64_t u; } du; du.d = myd; - sprintf(pf_str, "0x%lx", (unsigned long)du.u); + sprintf(pf_str, "0x%llx", (unsigned long long)du.u); return pf_str; } @@ -292,8 +293,8 @@ fprintf(stderr,"\n>>> type url = |%s|\n",file_name); /* printf ("\nfloat_data: %10f : 0x%x float_data_in: %10f : 0x%x\n", */ /* float_data[0], fout.u, float_data[0], fin.u); */ if (fin.u != 0x3f8e3000) ERR; - /* printf ("\ndouble_data: %15g : 0x%16lx double_data_in: %15g : 0x%lx\n", */ - /* double_data[0], dfout.u, double_data[0], dfin.u); */ + /* printf ("\ndouble_data: %15g : 0x%16llx double_data_in: %15g : 0x%llx\n", */ + /* double_data[0], dfout.u, double_data[0], dfin.u);*/ if (dfin.u != 0x3ff1c60000000000) ERR; /* Close the file again. */ @@ -352,7 +353,7 @@ fprintf(stderr,"\n>>> type url = |%s|\n",file_name); /* printf ("\nfloat_data: %10f : 0x%x float_data_in: %10f : 0x%x\n", */ /* float_data[0], fout.u, float_data[0], fin.u); */ if (fin.u != 0x3f8e3000) ERR; - /* printf ("\ndouble_data: %15g : 0x%16lx double_data_in: %15g : 0x%lx\n", */ + /* printf ("\ndouble_data: %15g : 0x%16llx double_data_in: %15g : 0x%llx\n", */ /* double_data[0], dfout.u, double_data[0], dfin.u); */ if (dfin.u != 0x3ff1c60000000000) ERR; @@ -433,8 +434,8 @@ fprintf(stderr,"\n>>> type url = |%s|\n",file_name); if (fin.u != xpect[x].u) ERR; /* dfout.d = double_data[x]; */ dfin.d = double_in[x]; - /* printf("double_data: %15g : 0x%16lx double_data_in: %15g : 0x%16lx\n", */ - /* double_data[x], dfout.u, double_data[x], dfin.u); */ + /*printf("double_data: %15g : 0x%16llx double_data_in: %15g : 0x%16llx\n",*/ + /* double_data[x], dfout.u, double_data[x], dfin.u);*/ if (dfin.u != double_xpect[x].u) ERR; } @@ -549,7 +550,7 @@ fprintf(stderr,"\n>>> type url = |%s|\n",file_name); /* union FU fout; */ union FU xpect[DIM_LEN_5]; union DU dfin; - /* union DU dfout; */ + union DU dfout; union DU double_xpect[DIM_LEN_5]; xpect[0].u = 0x3f8e3000; xpect[1].u = 0x3f800fff; @@ -584,8 +585,8 @@ fprintf(stderr,"\n>>> type url = |%s|\n",file_name); if (fin.u != xpect[x].u) ERR; /* dfout.d = double_data[x]; */ dfin.d = double_in[x]; - /* printf("double_data: %15g : 0x%16lx double_data_in: %15g : 0x%16lx\n", */ - /* double_data[x], dfout.u, double_data[x], dfin.u); */ + /* printf("double_data: %15g : 0x%16llx double_data_in: %15g : 0x%16llx\n",*/ + /* double_data[x], dfout.u, double_data[x], dfin.u);*/ if (dfin.u != double_xpect[x].u) ERR; } @@ -872,8 +873,8 @@ fprintf(stderr,"\n>>> type url = |%s|\n",file_name); dfin.d = double_data_in[x]; /* printf ("%d float_data_in : %08.8f : 0x%x expected %08.8f : 0x%x\n", */ /* x, float_data_in[x], fin.u, xpect[x].f, xpect[x].u); */ - /* printf ("%d double_data_in : %15g : 0x%lx expected %15g : 0x%lx\n", */ - /* x, double_data_in[x], dfin.u, double_xpect[x].d, double_xpect[x].u); */ + /* printf ("%d double_data_in : %15g : 0x%llx expected %15g : 0x%llx\n",*/ + /* x, double_data_in[x], dfin.u, double_xpect[x].d, double_xpect[x].u);*/ if (fin.u != xpect[x].u) ERR; if (dfin.u != double_xpect[x].u) @@ -957,9 +958,9 @@ fprintf(stderr,"\n>>> type url = |%s|\n",file_name); for (i = 0; i < DIM_LEN_SIMPLE; i++) { - if (abs(float_data_in[i] - float_data[i]) > EPSILON) + if (fabs(float_data_in[i] - float_data[i]) > EPSILON) ERR; - if (abs(double_data_in[i] - double_data[i]) > EPSILON) + if (fabs(double_data_in[i] - double_data[i]) > EPSILON) ERR; } From 7b8c39f722039ca2724898e34c3edd23621174b2 Mon Sep 17 00:00:00 2001 From: Charlie Zender Date: Sat, 19 Feb 2022 15:55:36 -0800 Subject: [PATCH 4/7] Change name to _QuantizeGranularBitRoundNumberOfSignificantDigits. Change identifier from QUANTIZEBR to QUANTIZEGBR to make room for new BitRound token = BR. --- ncgen/genbin.c | 2 +- ncgen/genc.c | 2 +- ncgen/ncgen.h | 2 +- ncgen/ncgen.l | 2 +- ncgen/ncgen.y | 12 +- ncgen/ncgenl.c | 12 +- ncgen/ncgeny.c | 384 ++++++++++++++++++++++++------------------------- ncgen/ncgeny.h | 8 +- 8 files changed, 206 insertions(+), 218 deletions(-) diff --git a/ncgen/genbin.c b/ncgen/genbin.c index a12611629..5aef6cfdf 100644 --- a/ncgen/genbin.c +++ b/ncgen/genbin.c @@ -257,7 +257,7 @@ genbin_definespecialattributes(Symbol* var) } CHECK_ERR(stat); } - if(special->flags & (_QUANTIZEBG_FLAG | _QUANTIZEBR_FLAG)) { + if(special->flags & (_QUANTIZEBG_FLAG | _QUANTIZEGBR_FLAG)) { stat = nc_def_var_quantize(var->container->nc_id, var->nc_id, special->_Quantizer, special->_NSD); CHECK_ERR(stat); diff --git a/ncgen/genc.c b/ncgen/genc.c index a99ba4c2e..719316f9b 100644 --- a/ncgen/genc.c +++ b/ncgen/genc.c @@ -539,7 +539,7 @@ genc_definespecialattributes(Symbol* vsym) codelined(1,"CHECK_ERR(stat);"); } } - if(special->flags & (_QUANTIZEBG_FLAG | _QUANTIZEBR_FLAG)) { + if(special->flags & (_QUANTIZEBG_FLAG | _QUANTIZEGBR_FLAG)) { const char* alg = NULL; switch(special->_Quantizer) { case NC_QUANTIZE_BITGROOM: alg = "NC_QUANTIZE_BITGROOM"; diff --git a/ncgen/ncgen.h b/ncgen/ncgen.h index e2136ab5d..4f37e680c 100644 --- a/ncgen/ncgen.h +++ b/ncgen/ncgen.h @@ -81,7 +81,7 @@ various C global variables #define _FILTER_FLAG 0x1000 #define _CODECS_FLAG 0x2000 #define _QUANTIZEBG_FLAG 0x4000 -#define _QUANTIZEBR_FLAG 0x8000 +#define _QUANTIZEGBR_FLAG 0x8000 extern struct Specialtoken { char* name; diff --git a/ncgen/ncgen.l b/ncgen/ncgen.l index 576d65d62..46f646811 100644 --- a/ncgen/ncgen.l +++ b/ncgen/ncgen.l @@ -139,7 +139,7 @@ struct Specialtoken specials[] = { {"_Filter",_FILTER,_FILTER_FLAG}, {"_Codecs",_CODECS,_CODECS_FLAG}, {"_QuantizeBitGroomNumberOfSignificantDigits",_QUANTIZEBG,_QUANTIZEBG_FLAG}, -{"_QuantizeBitRoundNumberOfSignificantDigits",_QUANTIZEBR,_QUANTIZEBR_FLAG}, +{"_QuantizeGranularBitRoundNumberOfSignificantDigits",_QUANTIZEGBR,_QUANTIZEGBR_FLAG}, {NULL,0} /* null terminate */ }; diff --git a/ncgen/ncgen.y b/ncgen/ncgen.y index 215e8f6ad..53bb6a7b9 100644 --- a/ncgen/ncgen.y +++ b/ncgen/ncgen.y @@ -217,7 +217,7 @@ NCConstant* constant; _FILTER _CODECS _QUANTIZEBG - _QUANTIZEBR + _QUANTIZEGBR DATASETID %type ident typename primtype dimd varspec @@ -776,8 +776,8 @@ attrdecl: {$$ = makespecial(_CODECS_FLAG,$1,NULL,(void*)$5,ISCONST);} | ambiguous_ref ':' _QUANTIZEBG '=' constint {$$ = makespecial(_QUANTIZEBG_FLAG,$1,NULL,(void*)$5,ISCONST);} - | ambiguous_ref ':' _QUANTIZEBR '=' constint - {$$ = makespecial(_QUANTIZEBR_FLAG,$1,NULL,(void*)$5,ISCONST);} + | ambiguous_ref ':' _QUANTIZEGBR '=' constint + {$$ = makespecial(_QUANTIZEGBR_FLAG,$1,NULL,(void*)$5,ISCONST);} | ambiguous_ref ':' _NOFILL '=' constbool {$$ = makespecial(_NOFILL_FLAG,$1,NULL,(void*)$5,ISCONST);} | ':' _FORMAT '=' conststring @@ -1247,7 +1247,7 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst) case _SUPERBLOCK_FLAG: case _DEFLATE_FLAG: case _QUANTIZEBG_FLAG: - case _QUANTIZEBR_FLAG: + case _QUANTIZEGBR_FLAG: tmp = nullconst(); tmp->nctype = NC_INT; convert1(con,tmp); @@ -1349,10 +1349,10 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst) special->_NSD = idata; special->flags |= _QUANTIZEBG_FLAG; break; - case _QUANTIZEBR_FLAG: + case _QUANTIZEGBR_FLAG: special->_Quantizer = NC_QUANTIZE_GRANULARBR; special->_NSD = idata; - special->flags |= _QUANTIZEBR_FLAG; + special->flags |= _QUANTIZEGBR_FLAG; break; case _SHUFFLE_FLAG: special->_Shuffle = tf; diff --git a/ncgen/ncgenl.c b/ncgen/ncgenl.c index 5bf7fcce7..a94e3c3bb 100644 --- a/ncgen/ncgenl.c +++ b/ncgen/ncgenl.c @@ -1,5 +1,5 @@ -#line 3 "ncgenl.c" +#line 2 "ncgenl.c" #define YY_INT_ALIGNED short int @@ -1675,11 +1675,11 @@ struct Specialtoken specials[] = { {"_Filter",_FILTER,_FILTER_FLAG}, {"_Codecs",_CODECS,_CODECS_FLAG}, {"_QuantizeBitGroomNumberOfSignificantDigits",_QUANTIZEBG,_QUANTIZEBG_FLAG}, -{"_QuantizeBitRoundNumberOfSignificantDigits",_QUANTIZEBR,_QUANTIZEBR_FLAG}, +{"_QuantizeGranularBitRoundNumberOfSignificantDigits",_QUANTIZEGBR,_QUANTIZEGBR_FLAG}, {NULL,0} /* null terminate */ }; -#line 1683 "ncgenl.c" +#line 1682 "ncgenl.c" /* The most correct (validating) version of UTF8 character set (Taken from: http://www.w3.org/2005/03/23-lex-U) @@ -1722,7 +1722,7 @@ ID ([A-Za-z_]|{UTF8})([A-Z.@#\[\]a-z_0-9+-]|{UTF8})* /* Note: this definition of string will work for utf8 as well, although it is a very relaxed definition */ -#line 1726 "ncgenl.c" +#line 1725 "ncgenl.c" #define INITIAL 0 #define ST_C_COMMENT 1 @@ -1943,7 +1943,7 @@ YY_DECL { #line 225 "ncgen.l" -#line 1947 "ncgenl.c" +#line 1946 "ncgenl.c" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -2570,7 +2570,7 @@ YY_RULE_SETUP #line 597 "ncgen.l" ECHO; YY_BREAK -#line 2574 "ncgenl.c" +#line 2573 "ncgenl.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(TEXT): yyterminate(); diff --git a/ncgen/ncgeny.c b/ncgen/ncgeny.c index 464a8f79d..649e6a6cf 100644 --- a/ncgen/ncgeny.c +++ b/ncgen/ncgeny.c @@ -1,4 +1,4 @@ -/* A Bison parser, made by GNU Bison 3.7.5. */ +/* A Bison parser, made by GNU Bison 3.8.2. */ /* Bison implementation for Yacc-like parsers in C @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -46,10 +46,10 @@ USER NAME SPACE" below. */ /* Identify Bison output, and Bison version. */ -#define YYBISON 30705 +#define YYBISON 30802 /* Bison version string. */ -#define YYBISON_VERSION "3.7.5" +#define YYBISON_VERSION "3.8.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -302,7 +302,7 @@ enum yysymbol_kind_t YYSYMBOL__FILTER = 54, /* _FILTER */ YYSYMBOL__CODECS = 55, /* _CODECS */ YYSYMBOL__QUANTIZEBG = 56, /* _QUANTIZEBG */ - YYSYMBOL__QUANTIZEBR = 57, /* _QUANTIZEBR */ + YYSYMBOL__QUANTIZEGBR = 57, /* _QUANTIZEGBR */ YYSYMBOL_DATASETID = 58, /* DATASETID */ YYSYMBOL_59_ = 59, /* '{' */ YYSYMBOL_60_ = 60, /* '}' */ @@ -538,12 +538,18 @@ typedef int yy_state_fast_t; # define YY_USE(E) /* empty */ #endif -#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else @@ -763,7 +769,7 @@ static const yytype_int8 yytranslate[] = }; #if YYDEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { 0, 242, 242, 248, 250, 257, 264, 264, 267, 276, @@ -807,7 +813,7 @@ static const char *const yytname[] = "GROUP", "PATH", "FILLMARKER", "NIL", "_FILLVALUE", "_FORMAT", "_STORAGE", "_CHUNKSIZES", "_DEFLATELEVEL", "_SHUFFLE", "_ENDIANNESS", "_NOFILL", "_FLETCHER32", "_NCPROPS", "_ISNETCDF4", "_SUPERBLOCK", - "_FILTER", "_CODECS", "_QUANTIZEBG", "_QUANTIZEBR", "DATASETID", "'{'", + "_FILTER", "_CODECS", "_QUANTIZEBG", "_QUANTIZEGBR", "DATASETID", "'{'", "'}'", "';'", "','", "'='", "'('", "')'", "'*'", "':'", "$accept", "ncdesc", "datasetid", "rootgroup", "groupbody", "subgrouplist", "namedgroup", "$@1", "$@2", "typesection", "typedecls", "typename", @@ -831,21 +837,6 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_int16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 123, - 125, 59, 44, 61, 40, 41, 42, 58 -}; -#endif - #define YYPACT_NINF (-149) #define yypact_value_is_default(Yyn) \ @@ -856,8 +847,8 @@ static const yytype_int16 yytoknum[] = #define yytable_value_is_error(Yyn) \ 0 - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int16 yypact[] = { -10, -13, 46, -149, -3, -149, 237, -149, -149, -149, @@ -890,9 +881,9 @@ static const yytype_int16 yypact[] = -149, -149, -149 }; - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ +/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ static const yytype_uint8 yydefact[] = { 0, 0, 0, 3, 0, 1, 88, 2, 35, 36, @@ -925,7 +916,7 @@ static const yytype_uint8 yydefact[] = 73, 10, 81 }; - /* YYPGOTO[NTERM-NUM]. */ +/* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -149, -149, -149, -149, -8, -35, -149, -149, -149, -149, @@ -937,7 +928,7 @@ static const yytype_int16 yypgoto[] = -149, -148, -149, -41, -34, -73, -149, -22 }; - /* YYDEFGOTO[NTERM-NUM]. */ +/* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { 0, 2, 4, 7, 23, 36, 49, 192, 257, 40, @@ -949,9 +940,9 @@ static const yytype_int16 yydefgoto[] = 190, 114, 161, 86, 87, 88, 214, 30 }; - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ +/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { 35, 78, 106, 74, 89, 153, 75, 191, 80, 81, @@ -1050,8 +1041,8 @@ static const yytype_int16 yycheck[] = -1, -1, -1, -1, -1, -1, 39 }; - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ +/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of + state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 31, 69, 58, 70, 0, 59, 71, 4, 5, @@ -1084,7 +1075,7 @@ static const yytype_uint8 yystos[] = 106, 115, 111 }; - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_uint8 yyr1[] = { 0, 68, 69, 70, 71, 72, 73, 73, 75, 76, @@ -1105,7 +1096,7 @@ static const yytype_uint8 yyr1[] = 131, 131, 131, 132, 133, 133, 134, 134, 135 }; - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ static const yytype_int8 yyr2[] = { 0, 2, 3, 1, 4, 5, 0, 2, 0, 0, @@ -1135,6 +1126,7 @@ enum { YYENOMEM = -2 }; #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab #define YYRECOVERING() (!!yyerrstatus) @@ -1175,10 +1167,7 @@ do { \ YYFPRINTF Args; \ } while (0) -/* This macro is provided for backward compatibility. */ -# ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif + # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ @@ -1205,10 +1194,6 @@ yy_symbol_value_print (FILE *yyo, YY_USE (yyoutput); if (!yyvaluep) return; -# ifdef YYPRINT - if (yykind < YYNTOKENS) - YYPRINT (yyo, yytoknum[yykind], *yyvaluep); -# endif YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END @@ -1663,6 +1648,7 @@ yyparse (void) YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; @@ -1688,7 +1674,7 @@ yysetstate: if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE - goto yyexhaustedlab; + YYNOMEM; #else { /* Get the current used size of the three stacks, in elements. */ @@ -1716,7 +1702,7 @@ yysetstate: # else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + YYNOMEM; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; @@ -1727,7 +1713,7 @@ yysetstate: YY_CAST (union yyalloc *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) - goto yyexhaustedlab; + YYNOMEM; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE @@ -1749,6 +1735,7 @@ yysetstate: } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + if (yystate == YYFINAL) YYACCEPT; @@ -1863,13 +1850,13 @@ yyreduce: case 2: /* ncdesc: NETCDF datasetid rootgroup */ #line 245 "ncgen.y" {if (error_count > 0) YYABORT;} -#line 1867 "ncgeny.c" +#line 1854 "ncgeny.c" break; case 3: /* datasetid: DATASETID */ #line 248 "ncgen.y" {createrootgroup(datasetname);} -#line 1873 "ncgeny.c" +#line 1860 "ncgeny.c" break; case 8: /* $@1: %empty */ @@ -1881,25 +1868,25 @@ yyreduce: yyerror("duplicate group declaration within parent group for %s", id->name); } -#line 1885 "ncgeny.c" +#line 1872 "ncgeny.c" break; case 9: /* $@2: %empty */ #line 276 "ncgen.y" {listpop(groupstack);} -#line 1891 "ncgeny.c" +#line 1878 "ncgeny.c" break; case 12: /* typesection: TYPES */ #line 282 "ncgen.y" {} -#line 1897 "ncgeny.c" +#line 1884 "ncgeny.c" break; case 13: /* typesection: TYPES typedecls */ #line 284 "ncgen.y" {markcdf4("Type specification");} -#line 1903 "ncgeny.c" +#line 1890 "ncgeny.c" break; case 16: /* typename: ident */ @@ -1911,19 +1898,19 @@ yyreduce: (yyvsp[0].sym)->name); listpush(typdefs,(void*)(yyvsp[0].sym)); } -#line 1915 "ncgeny.c" +#line 1902 "ncgeny.c" break; case 17: /* type_or_attr_decl: typedecl */ #line 299 "ncgen.y" {} -#line 1921 "ncgeny.c" +#line 1908 "ncgeny.c" break; case 18: /* type_or_attr_decl: attrdecl ';' */ #line 299 "ncgen.y" {} -#line 1927 "ncgeny.c" +#line 1914 "ncgeny.c" break; case 25: /* enumdecl: primtype ENUM typename '{' enumidlist '}' */ @@ -1954,13 +1941,13 @@ yyreduce: } listsetlength(stack,stackbase);/* remove stack nodes*/ } -#line 1958 "ncgeny.c" +#line 1945 "ncgeny.c" break; case 26: /* enumidlist: enumid */ #line 342 "ncgen.y" {(yyval.mark)=listlength(stack); listpush(stack,(void*)(yyvsp[0].sym));} -#line 1964 "ncgeny.c" +#line 1951 "ncgeny.c" break; case 27: /* enumidlist: enumidlist ',' enumid */ @@ -1979,7 +1966,7 @@ yyreduce: } listpush(stack,(void*)(yyvsp[0].sym)); } -#line 1983 "ncgeny.c" +#line 1970 "ncgeny.c" break; case 28: /* enumid: ident '=' constint */ @@ -1990,7 +1977,7 @@ yyreduce: (yyvsp[-2].sym)->typ.econst=(yyvsp[0].constant); (yyval.sym)=(yyvsp[-2].sym); } -#line 1994 "ncgeny.c" +#line 1981 "ncgeny.c" break; case 29: /* opaquedecl: OPAQUE_ '(' INT_CONST ')' typename */ @@ -2004,7 +1991,7 @@ yyreduce: (yyvsp[0].sym)->typ.size=int32_val; (void)ncaux_class_alignment(NC_OPAQUE,&(yyvsp[0].sym)->typ.alignment); } -#line 2008 "ncgeny.c" +#line 1995 "ncgeny.c" break; case 30: /* vlendecl: typeref '(' '*' ')' typename */ @@ -2020,7 +2007,7 @@ yyreduce: (yyvsp[0].sym)->typ.size=VLENSIZE; (void)ncaux_class_alignment(NC_VLEN,&(yyvsp[0].sym)->typ.alignment); } -#line 2024 "ncgeny.c" +#line 2011 "ncgeny.c" break; case 31: /* compounddecl: COMPOUND typename '{' fields '}' */ @@ -2054,19 +2041,19 @@ yyreduce: } listsetlength(stack,stackbase);/* remove stack nodes*/ } -#line 2058 "ncgeny.c" +#line 2045 "ncgeny.c" break; case 32: /* fields: field ';' */ #line 428 "ncgen.y" {(yyval.mark)=(yyvsp[-1].mark);} -#line 2064 "ncgeny.c" +#line 2051 "ncgeny.c" break; case 33: /* fields: fields field ';' */ #line 429 "ncgen.y" {(yyval.mark)=(yyvsp[-2].mark);} -#line 2070 "ncgeny.c" +#line 2057 "ncgeny.c" break; case 34: /* field: typeref fieldlist */ @@ -2082,103 +2069,103 @@ yyreduce: f->typ.basetype = (yyvsp[-1].sym); } } -#line 2086 "ncgeny.c" +#line 2073 "ncgeny.c" break; case 35: /* primtype: CHAR_K */ #line 446 "ncgen.y" { (yyval.sym) = primsymbols[NC_CHAR]; } -#line 2092 "ncgeny.c" +#line 2079 "ncgeny.c" break; case 36: /* primtype: BYTE_K */ #line 447 "ncgen.y" { (yyval.sym) = primsymbols[NC_BYTE]; } -#line 2098 "ncgeny.c" +#line 2085 "ncgeny.c" break; case 37: /* primtype: SHORT_K */ #line 448 "ncgen.y" { (yyval.sym) = primsymbols[NC_SHORT]; } -#line 2104 "ncgeny.c" +#line 2091 "ncgeny.c" break; case 38: /* primtype: INT_K */ #line 449 "ncgen.y" { (yyval.sym) = primsymbols[NC_INT]; } -#line 2110 "ncgeny.c" +#line 2097 "ncgeny.c" break; case 39: /* primtype: FLOAT_K */ #line 450 "ncgen.y" { (yyval.sym) = primsymbols[NC_FLOAT]; } -#line 2116 "ncgeny.c" +#line 2103 "ncgeny.c" break; case 40: /* primtype: DOUBLE_K */ #line 451 "ncgen.y" { (yyval.sym) = primsymbols[NC_DOUBLE]; } -#line 2122 "ncgeny.c" +#line 2109 "ncgeny.c" break; case 41: /* primtype: UBYTE_K */ #line 452 "ncgen.y" { vercheck(NC_UBYTE); (yyval.sym) = primsymbols[NC_UBYTE]; } -#line 2128 "ncgeny.c" +#line 2115 "ncgeny.c" break; case 42: /* primtype: USHORT_K */ #line 453 "ncgen.y" { vercheck(NC_USHORT); (yyval.sym) = primsymbols[NC_USHORT]; } -#line 2134 "ncgeny.c" +#line 2121 "ncgeny.c" break; case 43: /* primtype: UINT_K */ #line 454 "ncgen.y" { vercheck(NC_UINT); (yyval.sym) = primsymbols[NC_UINT]; } -#line 2140 "ncgeny.c" +#line 2127 "ncgeny.c" break; case 44: /* primtype: INT64_K */ #line 455 "ncgen.y" { vercheck(NC_INT64); (yyval.sym) = primsymbols[NC_INT64]; } -#line 2146 "ncgeny.c" +#line 2133 "ncgeny.c" break; case 45: /* primtype: UINT64_K */ #line 456 "ncgen.y" { vercheck(NC_UINT64); (yyval.sym) = primsymbols[NC_UINT64]; } -#line 2152 "ncgeny.c" +#line 2139 "ncgeny.c" break; case 46: /* primtype: STRING_K */ #line 457 "ncgen.y" { vercheck(NC_STRING); (yyval.sym) = primsymbols[NC_STRING]; } -#line 2158 "ncgeny.c" +#line 2145 "ncgeny.c" break; case 48: /* dimsection: DIMENSIONS */ #line 461 "ncgen.y" {} -#line 2164 "ncgeny.c" +#line 2151 "ncgeny.c" break; case 49: /* dimsection: DIMENSIONS dimdecls */ #line 462 "ncgen.y" {} -#line 2170 "ncgeny.c" +#line 2157 "ncgeny.c" break; case 52: /* dim_or_attr_decl: dimdeclist */ #line 469 "ncgen.y" {} -#line 2176 "ncgeny.c" +#line 2163 "ncgeny.c" break; case 53: /* dim_or_attr_decl: attrdecl */ #line 469 "ncgen.y" {} -#line 2182 "ncgeny.c" +#line 2169 "ncgeny.c" break; case 56: /* dimdecl: dimd '=' constint */ @@ -2190,7 +2177,7 @@ fprintf(stderr,"dimension: %s = %llu\n",(yyvsp[-2].sym)->name,(unsigned long lon #endif reclaimconstant((yyvsp[0].constant)); } -#line 2194 "ncgeny.c" +#line 2181 "ncgeny.c" break; case 57: /* dimdecl: dimd '=' NC_UNLIMITED_K */ @@ -2202,7 +2189,7 @@ fprintf(stderr,"dimension: %s = %llu\n",(yyvsp[-2].sym)->name,(unsigned long lon fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); #endif } -#line 2206 "ncgeny.c" +#line 2193 "ncgeny.c" break; case 58: /* dimd: ident */ @@ -2216,31 +2203,31 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); (yyval.sym)=(yyvsp[0].sym); listpush(dimdefs,(void*)(yyvsp[0].sym)); } -#line 2220 "ncgeny.c" +#line 2207 "ncgeny.c" break; case 60: /* vasection: VARIABLES */ #line 507 "ncgen.y" {} -#line 2226 "ncgeny.c" +#line 2213 "ncgeny.c" break; case 61: /* vasection: VARIABLES vadecls */ #line 508 "ncgen.y" {} -#line 2232 "ncgeny.c" +#line 2219 "ncgeny.c" break; case 64: /* vadecl_or_attr: vardecl */ #line 515 "ncgen.y" {} -#line 2238 "ncgeny.c" +#line 2225 "ncgeny.c" break; case 65: /* vadecl_or_attr: attrdecl */ #line 515 "ncgen.y" {} -#line 2244 "ncgeny.c" +#line 2231 "ncgeny.c" break; case 66: /* vardecl: typeref varlist */ @@ -2264,7 +2251,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); } listsetlength(stack,stackbase);/* remove stack nodes*/ } -#line 2268 "ncgeny.c" +#line 2255 "ncgeny.c" break; case 67: /* varlist: varspec */ @@ -2272,13 +2259,13 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); {(yyval.mark)=listlength(stack); listpush(stack,(void*)(yyvsp[0].sym)); } -#line 2276 "ncgeny.c" +#line 2263 "ncgeny.c" break; case 68: /* varlist: varlist ',' varspec */ #line 544 "ncgen.y" {(yyval.mark)=(yyvsp[-2].mark); listpush(stack,(void*)(yyvsp[0].sym));} -#line 2282 "ncgeny.c" +#line 2269 "ncgeny.c" break; case 69: /* varspec: varident dimspec */ @@ -2309,31 +2296,31 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); listsetlength(stack,stackbase);/* remove stack nodes*/ (yyval.sym) = var; } -#line 2313 "ncgeny.c" +#line 2300 "ncgeny.c" break; case 70: /* dimspec: %empty */ #line 576 "ncgen.y" {(yyval.mark)=listlength(stack);} -#line 2319 "ncgeny.c" +#line 2306 "ncgeny.c" break; case 71: /* dimspec: '(' dimlist ')' */ #line 577 "ncgen.y" {(yyval.mark)=(yyvsp[-1].mark);} -#line 2325 "ncgeny.c" +#line 2312 "ncgeny.c" break; case 72: /* dimlist: dimref */ #line 580 "ncgen.y" {(yyval.mark)=listlength(stack); listpush(stack,(void*)(yyvsp[0].sym));} -#line 2331 "ncgeny.c" +#line 2318 "ncgeny.c" break; case 73: /* dimlist: dimlist ',' dimref */ #line 582 "ncgen.y" {(yyval.mark)=(yyvsp[-2].mark); listpush(stack,(void*)(yyvsp[0].sym));} -#line 2337 "ncgeny.c" +#line 2324 "ncgeny.c" break; case 74: /* dimref: path */ @@ -2348,7 +2335,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); } (yyval.sym)=dimsym; } -#line 2352 "ncgeny.c" +#line 2339 "ncgeny.c" break; case 75: /* fieldlist: fieldspec */ @@ -2356,13 +2343,13 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); {(yyval.mark)=listlength(stack); listpush(stack,(void*)(yyvsp[0].sym)); } -#line 2360 "ncgeny.c" +#line 2347 "ncgeny.c" break; case 76: /* fieldlist: fieldlist ',' fieldspec */ #line 604 "ncgen.y" {(yyval.mark)=(yyvsp[-2].mark); listpush(stack,(void*)(yyvsp[0].sym));} -#line 2366 "ncgeny.c" +#line 2353 "ncgeny.c" break; case 77: /* fieldspec: ident fielddimspec */ @@ -2393,31 +2380,31 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); listsetlength(stack,stackbase);/* remove stack nodes*/ (yyval.sym) = (yyvsp[-1].sym); } -#line 2397 "ncgeny.c" +#line 2384 "ncgeny.c" break; case 78: /* fielddimspec: %empty */ #line 637 "ncgen.y" {(yyval.mark)=listlength(stack);} -#line 2403 "ncgeny.c" +#line 2390 "ncgeny.c" break; case 79: /* fielddimspec: '(' fielddimlist ')' */ #line 638 "ncgen.y" {(yyval.mark)=(yyvsp[-1].mark);} -#line 2409 "ncgeny.c" +#line 2396 "ncgeny.c" break; case 80: /* fielddimlist: fielddim */ #line 642 "ncgen.y" {(yyval.mark)=listlength(stack); listpush(stack,(void*)(yyvsp[0].sym));} -#line 2415 "ncgeny.c" +#line 2402 "ncgeny.c" break; case 81: /* fielddimlist: fielddimlist ',' fielddim */ #line 644 "ncgen.y" {(yyval.mark)=(yyvsp[-2].mark); listpush(stack,(void*)(yyvsp[0].sym));} -#line 2421 "ncgeny.c" +#line 2408 "ncgeny.c" break; case 82: /* fielddim: UINT_CONST */ @@ -2431,7 +2418,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); (yyval.sym)->dim.isconstant = 1; (yyval.sym)->dim.declsize = uint32_val; } -#line 2435 "ncgeny.c" +#line 2422 "ncgeny.c" break; case 83: /* fielddim: INT_CONST */ @@ -2449,7 +2436,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); (yyval.sym)->dim.isconstant = 1; (yyval.sym)->dim.declsize = int32_val; } -#line 2453 "ncgeny.c" +#line 2440 "ncgeny.c" break; case 84: /* varref: ambiguous_ref */ @@ -2461,7 +2448,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); } (yyval.sym)=vsym; } -#line 2465 "ncgeny.c" +#line 2452 "ncgeny.c" break; case 85: /* typeref: ambiguous_ref */ @@ -2473,7 +2460,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); } (yyval.sym)=tsym; } -#line 2477 "ncgeny.c" +#line 2464 "ncgeny.c" break; case 86: /* ambiguous_ref: path */ @@ -2496,49 +2483,49 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); } (yyval.sym)=tvsym; } -#line 2500 "ncgeny.c" +#line 2487 "ncgeny.c" break; case 87: /* ambiguous_ref: primtype */ #line 719 "ncgen.y" {(yyval.sym)=(yyvsp[0].sym);} -#line 2506 "ncgeny.c" +#line 2493 "ncgeny.c" break; case 88: /* attrdecllist: %empty */ #line 726 "ncgen.y" {} -#line 2512 "ncgeny.c" +#line 2499 "ncgeny.c" break; case 89: /* attrdecllist: attrdecl ';' attrdecllist */ #line 726 "ncgen.y" {} -#line 2518 "ncgeny.c" +#line 2505 "ncgeny.c" break; case 90: /* attrdecl: ':' _NCPROPS '=' conststring */ #line 730 "ncgen.y" {(yyval.sym) = makespecial(_NCPROPS_FLAG,NULL,NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2524 "ncgeny.c" +#line 2511 "ncgeny.c" break; case 91: /* attrdecl: ':' _ISNETCDF4 '=' constbool */ #line 732 "ncgen.y" {(yyval.sym) = makespecial(_ISNETCDF4_FLAG,NULL,NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2530 "ncgeny.c" +#line 2517 "ncgeny.c" break; case 92: /* attrdecl: ':' _SUPERBLOCK '=' constint */ #line 734 "ncgen.y" {(yyval.sym) = makespecial(_SUPERBLOCK_FLAG,NULL,NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2536 "ncgeny.c" +#line 2523 "ncgeny.c" break; case 93: /* attrdecl: ':' ident '=' datalist */ #line 736 "ncgen.y" { (yyval.sym)=makeattribute((yyvsp[-2].sym),NULL,NULL,(yyvsp[0].datalist),ATTRGLOBAL);} -#line 2542 "ncgeny.c" +#line 2529 "ncgeny.c" break; case 94: /* attrdecl: typeref ambiguous_ref ':' ident '=' datalist */ @@ -2551,7 +2538,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); YYABORT; } } -#line 2555 "ncgeny.c" +#line 2542 "ncgeny.c" break; case 95: /* attrdecl: ambiguous_ref ':' ident '=' datalist */ @@ -2566,91 +2553,91 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); YYABORT; } } -#line 2570 "ncgeny.c" +#line 2557 "ncgeny.c" break; case 96: /* attrdecl: ambiguous_ref ':' _FILLVALUE '=' datalist */ #line 758 "ncgen.y" {(yyval.sym) = makespecial(_FILLVALUE_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].datalist),ISLIST);} -#line 2576 "ncgeny.c" +#line 2563 "ncgeny.c" break; case 97: /* attrdecl: typeref ambiguous_ref ':' _FILLVALUE '=' datalist */ #line 760 "ncgen.y" {(yyval.sym) = makespecial(_FILLVALUE_FLAG,(yyvsp[-4].sym),(yyvsp[-5].sym),(void*)(yyvsp[0].datalist),ISLIST);} -#line 2582 "ncgeny.c" +#line 2569 "ncgeny.c" break; case 98: /* attrdecl: ambiguous_ref ':' _STORAGE '=' conststring */ #line 762 "ncgen.y" {(yyval.sym) = makespecial(_STORAGE_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2588 "ncgeny.c" +#line 2575 "ncgeny.c" break; case 99: /* attrdecl: ambiguous_ref ':' _CHUNKSIZES '=' intlist */ #line 764 "ncgen.y" {(yyval.sym) = makespecial(_CHUNKSIZES_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].datalist),ISLIST);} -#line 2594 "ncgeny.c" +#line 2581 "ncgeny.c" break; case 100: /* attrdecl: ambiguous_ref ':' _FLETCHER32 '=' constbool */ #line 766 "ncgen.y" {(yyval.sym) = makespecial(_FLETCHER32_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2600 "ncgeny.c" +#line 2587 "ncgeny.c" break; case 101: /* attrdecl: ambiguous_ref ':' _DEFLATELEVEL '=' constint */ #line 768 "ncgen.y" {(yyval.sym) = makespecial(_DEFLATE_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2606 "ncgeny.c" +#line 2593 "ncgeny.c" break; case 102: /* attrdecl: ambiguous_ref ':' _SHUFFLE '=' constbool */ #line 770 "ncgen.y" {(yyval.sym) = makespecial(_SHUFFLE_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2612 "ncgeny.c" +#line 2599 "ncgeny.c" break; case 103: /* attrdecl: ambiguous_ref ':' _ENDIANNESS '=' conststring */ #line 772 "ncgen.y" {(yyval.sym) = makespecial(_ENDIAN_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2618 "ncgeny.c" +#line 2605 "ncgeny.c" break; case 104: /* attrdecl: ambiguous_ref ':' _FILTER '=' conststring */ #line 774 "ncgen.y" {(yyval.sym) = makespecial(_FILTER_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2624 "ncgeny.c" +#line 2611 "ncgeny.c" break; case 105: /* attrdecl: ambiguous_ref ':' _CODECS '=' conststring */ #line 776 "ncgen.y" {(yyval.sym) = makespecial(_CODECS_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2630 "ncgeny.c" +#line 2617 "ncgeny.c" break; case 106: /* attrdecl: ambiguous_ref ':' _QUANTIZEBG '=' constint */ #line 778 "ncgen.y" {(yyval.sym) = makespecial(_QUANTIZEBG_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2636 "ncgeny.c" +#line 2623 "ncgeny.c" break; - case 107: /* attrdecl: ambiguous_ref ':' _QUANTIZEBR '=' constint */ + case 107: /* attrdecl: ambiguous_ref ':' _QUANTIZEGBR '=' constint */ #line 780 "ncgen.y" - {(yyval.sym) = makespecial(_QUANTIZEBR_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2642 "ncgeny.c" + {(yyval.sym) = makespecial(_QUANTIZEGBR_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} +#line 2629 "ncgeny.c" break; case 108: /* attrdecl: ambiguous_ref ':' _NOFILL '=' constbool */ #line 782 "ncgen.y" {(yyval.sym) = makespecial(_NOFILL_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2648 "ncgeny.c" +#line 2635 "ncgeny.c" break; case 109: /* attrdecl: ':' _FORMAT '=' conststring */ #line 784 "ncgen.y" {(yyval.sym) = makespecial(_FORMAT_FLAG,NULL,NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2654 "ncgeny.c" +#line 2641 "ncgeny.c" break; case 110: /* path: ident */ @@ -2661,7 +2648,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); (yyvsp[0].sym)->is_prefixed=0; setpathcurrent((yyvsp[0].sym)); } -#line 2665 "ncgeny.c" +#line 2652 "ncgeny.c" break; case 111: /* path: PATH */ @@ -2672,269 +2659,269 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); (yyvsp[0].sym)->is_prefixed=1; /* path is set in ncgen.l*/ } -#line 2676 "ncgeny.c" +#line 2663 "ncgeny.c" break; case 113: /* datasection: DATA */ #line 805 "ncgen.y" {} -#line 2682 "ncgeny.c" +#line 2669 "ncgeny.c" break; case 114: /* datasection: DATA datadecls */ #line 806 "ncgen.y" {} -#line 2688 "ncgeny.c" +#line 2675 "ncgeny.c" break; case 117: /* datadecl: varref '=' datalist */ #line 814 "ncgen.y" {(yyvsp[-2].sym)->data = (yyvsp[0].datalist);} -#line 2694 "ncgeny.c" +#line 2681 "ncgeny.c" break; case 118: /* datalist: datalist0 */ #line 817 "ncgen.y" {(yyval.datalist) = (yyvsp[0].datalist);} -#line 2700 "ncgeny.c" +#line 2687 "ncgeny.c" break; case 119: /* datalist: datalist1 */ #line 818 "ncgen.y" {(yyval.datalist) = (yyvsp[0].datalist);} -#line 2706 "ncgeny.c" +#line 2693 "ncgeny.c" break; case 120: /* datalist0: %empty */ #line 822 "ncgen.y" {(yyval.datalist) = builddatalist(0);} -#line 2712 "ncgeny.c" +#line 2699 "ncgeny.c" break; case 121: /* datalist1: dataitem */ #line 826 "ncgen.y" {(yyval.datalist) = const2list((yyvsp[0].constant));} -#line 2718 "ncgeny.c" +#line 2705 "ncgeny.c" break; case 122: /* datalist1: datalist ',' dataitem */ #line 828 "ncgen.y" {dlappend((yyvsp[-2].datalist),((yyvsp[0].constant))); (yyval.datalist)=(yyvsp[-2].datalist); } -#line 2724 "ncgeny.c" +#line 2711 "ncgeny.c" break; case 123: /* dataitem: constdata */ #line 832 "ncgen.y" {(yyval.constant)=(yyvsp[0].constant);} -#line 2730 "ncgeny.c" +#line 2717 "ncgeny.c" break; case 124: /* dataitem: '{' datalist '}' */ #line 833 "ncgen.y" {(yyval.constant)=builddatasublist((yyvsp[-1].datalist));} -#line 2736 "ncgeny.c" +#line 2723 "ncgeny.c" break; case 125: /* constdata: simpleconstant */ #line 837 "ncgen.y" {(yyval.constant)=(yyvsp[0].constant);} -#line 2742 "ncgeny.c" +#line 2729 "ncgeny.c" break; case 126: /* constdata: OPAQUESTRING */ #line 838 "ncgen.y" {(yyval.constant)=makeconstdata(NC_OPAQUE);} -#line 2748 "ncgeny.c" +#line 2735 "ncgeny.c" break; case 127: /* constdata: FILLMARKER */ #line 839 "ncgen.y" {(yyval.constant)=makeconstdata(NC_FILLVALUE);} -#line 2754 "ncgeny.c" +#line 2741 "ncgeny.c" break; case 128: /* constdata: NIL */ #line 840 "ncgen.y" {(yyval.constant)=makeconstdata(NC_NIL);} -#line 2760 "ncgeny.c" +#line 2747 "ncgeny.c" break; case 129: /* constdata: econstref */ #line 841 "ncgen.y" {(yyval.constant)=(yyvsp[0].constant);} -#line 2766 "ncgeny.c" +#line 2753 "ncgeny.c" break; case 131: /* econstref: path */ #line 846 "ncgen.y" {(yyval.constant) = makeenumconstref((yyvsp[0].sym));} -#line 2772 "ncgeny.c" +#line 2759 "ncgeny.c" break; case 132: /* function: ident '(' arglist ')' */ #line 850 "ncgen.y" {(yyval.constant)=evaluate((yyvsp[-3].sym),(yyvsp[-1].datalist));} -#line 2778 "ncgeny.c" +#line 2765 "ncgeny.c" break; case 133: /* arglist: simpleconstant */ #line 855 "ncgen.y" {(yyval.datalist) = const2list((yyvsp[0].constant));} -#line 2784 "ncgeny.c" +#line 2771 "ncgeny.c" break; case 134: /* arglist: arglist ',' simpleconstant */ #line 857 "ncgen.y" {dlappend((yyvsp[-2].datalist),((yyvsp[0].constant))); (yyval.datalist)=(yyvsp[-2].datalist);} -#line 2790 "ncgeny.c" +#line 2777 "ncgeny.c" break; case 135: /* simpleconstant: CHAR_CONST */ #line 861 "ncgen.y" {(yyval.constant)=makeconstdata(NC_CHAR);} -#line 2796 "ncgeny.c" +#line 2783 "ncgeny.c" break; case 136: /* simpleconstant: BYTE_CONST */ #line 862 "ncgen.y" {(yyval.constant)=makeconstdata(NC_BYTE);} -#line 2802 "ncgeny.c" +#line 2789 "ncgeny.c" break; case 137: /* simpleconstant: SHORT_CONST */ #line 863 "ncgen.y" {(yyval.constant)=makeconstdata(NC_SHORT);} -#line 2808 "ncgeny.c" +#line 2795 "ncgeny.c" break; case 138: /* simpleconstant: INT_CONST */ #line 864 "ncgen.y" {(yyval.constant)=makeconstdata(NC_INT);} -#line 2814 "ncgeny.c" +#line 2801 "ncgeny.c" break; case 139: /* simpleconstant: INT64_CONST */ #line 865 "ncgen.y" {(yyval.constant)=makeconstdata(NC_INT64);} -#line 2820 "ncgeny.c" +#line 2807 "ncgeny.c" break; case 140: /* simpleconstant: UBYTE_CONST */ #line 866 "ncgen.y" {(yyval.constant)=makeconstdata(NC_UBYTE);} -#line 2826 "ncgeny.c" +#line 2813 "ncgeny.c" break; case 141: /* simpleconstant: USHORT_CONST */ #line 867 "ncgen.y" {(yyval.constant)=makeconstdata(NC_USHORT);} -#line 2832 "ncgeny.c" +#line 2819 "ncgeny.c" break; case 142: /* simpleconstant: UINT_CONST */ #line 868 "ncgen.y" {(yyval.constant)=makeconstdata(NC_UINT);} -#line 2838 "ncgeny.c" +#line 2825 "ncgeny.c" break; case 143: /* simpleconstant: UINT64_CONST */ #line 869 "ncgen.y" {(yyval.constant)=makeconstdata(NC_UINT64);} -#line 2844 "ncgeny.c" +#line 2831 "ncgeny.c" break; case 144: /* simpleconstant: FLOAT_CONST */ #line 870 "ncgen.y" {(yyval.constant)=makeconstdata(NC_FLOAT);} -#line 2850 "ncgeny.c" +#line 2837 "ncgeny.c" break; case 145: /* simpleconstant: DOUBLE_CONST */ #line 871 "ncgen.y" {(yyval.constant)=makeconstdata(NC_DOUBLE);} -#line 2856 "ncgeny.c" +#line 2843 "ncgeny.c" break; case 146: /* simpleconstant: TERMSTRING */ #line 872 "ncgen.y" {(yyval.constant)=makeconstdata(NC_STRING);} -#line 2862 "ncgeny.c" +#line 2849 "ncgeny.c" break; case 147: /* intlist: constint */ #line 876 "ncgen.y" {(yyval.datalist) = const2list((yyvsp[0].constant));} -#line 2868 "ncgeny.c" +#line 2855 "ncgeny.c" break; case 148: /* intlist: intlist ',' constint */ #line 877 "ncgen.y" {(yyval.datalist)=(yyvsp[-2].datalist); dlappend((yyvsp[-2].datalist),((yyvsp[0].constant)));} -#line 2874 "ncgeny.c" +#line 2861 "ncgeny.c" break; case 149: /* constint: INT_CONST */ #line 882 "ncgen.y" {(yyval.constant)=makeconstdata(NC_INT);} -#line 2880 "ncgeny.c" +#line 2867 "ncgeny.c" break; case 150: /* constint: UINT_CONST */ #line 884 "ncgen.y" {(yyval.constant)=makeconstdata(NC_UINT);} -#line 2886 "ncgeny.c" +#line 2873 "ncgeny.c" break; case 151: /* constint: INT64_CONST */ #line 886 "ncgen.y" {(yyval.constant)=makeconstdata(NC_INT64);} -#line 2892 "ncgeny.c" +#line 2879 "ncgeny.c" break; case 152: /* constint: UINT64_CONST */ #line 888 "ncgen.y" {(yyval.constant)=makeconstdata(NC_UINT64);} -#line 2898 "ncgeny.c" +#line 2885 "ncgeny.c" break; case 153: /* conststring: TERMSTRING */ #line 892 "ncgen.y" {(yyval.constant)=makeconstdata(NC_STRING);} -#line 2904 "ncgeny.c" +#line 2891 "ncgeny.c" break; case 154: /* constbool: conststring */ #line 896 "ncgen.y" {(yyval.constant)=(yyvsp[0].constant);} -#line 2910 "ncgeny.c" +#line 2897 "ncgeny.c" break; case 155: /* constbool: constint */ #line 897 "ncgen.y" {(yyval.constant)=(yyvsp[0].constant);} -#line 2916 "ncgeny.c" +#line 2903 "ncgeny.c" break; case 156: /* varident: IDENT */ #line 905 "ncgen.y" {(yyval.sym)=(yyvsp[0].sym);} -#line 2922 "ncgeny.c" +#line 2909 "ncgeny.c" break; case 157: /* varident: DATA */ #line 906 "ncgen.y" {(yyval.sym)=identkeyword((yyvsp[0].sym));} -#line 2928 "ncgeny.c" +#line 2915 "ncgeny.c" break; case 158: /* ident: IDENT */ #line 910 "ncgen.y" {(yyval.sym)=(yyvsp[0].sym);} -#line 2934 "ncgeny.c" +#line 2921 "ncgeny.c" break; -#line 2938 "ncgeny.c" +#line 2925 "ncgeny.c" default: break; } @@ -3010,7 +2997,7 @@ yyerrlab: } yyerror (yymsgp); if (yysyntax_error_status == YYENOMEM) - goto yyexhaustedlab; + YYNOMEM; } } @@ -3046,6 +3033,7 @@ yyerrorlab: label yyerrorlab therefore never appears in user code. */ if (0) YYERROR; + ++yynerrs; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ @@ -3106,7 +3094,7 @@ yyerrlab1: `-------------------------------------*/ yyacceptlab: yyresult = 0; - goto yyreturn; + goto yyreturnlab; /*-----------------------------------. @@ -3114,24 +3102,22 @@ yyacceptlab: `-----------------------------------*/ yyabortlab: yyresult = 1; - goto yyreturn; + goto yyreturnlab; -#if 1 -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ +/*-----------------------------------------------------------. +| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | +`-----------------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; - goto yyreturn; -#endif + goto yyreturnlab; -/*-------------------------------------------------------. -| yyreturn -- parsing is finished, clean up and return. | -`-------------------------------------------------------*/ -yyreturn: +/*----------------------------------------------------------. +| yyreturnlab -- parsing is finished, clean up and return. | +`----------------------------------------------------------*/ +yyreturnlab: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at @@ -3497,7 +3483,7 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst) case _SUPERBLOCK_FLAG: case _DEFLATE_FLAG: case _QUANTIZEBG_FLAG: - case _QUANTIZEBR_FLAG: + case _QUANTIZEGBR_FLAG: tmp = nullconst(); tmp->nctype = NC_INT; convert1(con,tmp); @@ -3599,10 +3585,10 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst) special->_NSD = idata; special->flags |= _QUANTIZEBG_FLAG; break; - case _QUANTIZEBR_FLAG: + case _QUANTIZEGBR_FLAG: special->_Quantizer = NC_QUANTIZE_GRANULARBR; special->_NSD = idata; - special->flags |= _QUANTIZEBR_FLAG; + special->flags |= _QUANTIZEGBR_FLAG; break; case _SHUFFLE_FLAG: special->_Shuffle = tf; diff --git a/ncgen/ncgeny.h b/ncgen/ncgeny.h index 009885edb..4ac829ff4 100644 --- a/ncgen/ncgeny.h +++ b/ncgen/ncgeny.h @@ -1,4 +1,4 @@ -/* A Bison parser, made by GNU Bison 3.7.5. */ +/* A Bison parser, made by GNU Bison 3.8.2. */ /* Bison interface for Yacc-like parsers in C @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -108,7 +108,7 @@ extern int ncgdebug; _FILTER = 309, /* _FILTER */ _CODECS = 310, /* _CODECS */ _QUANTIZEBG = 311, /* _QUANTIZEBG */ - _QUANTIZEBR = 312, /* _QUANTIZEBR */ + _QUANTIZEGBR = 312, /* _QUANTIZEGBR */ DATASETID = 313 /* DATASETID */ }; typedef enum yytokentype yytoken_kind_t; @@ -138,6 +138,8 @@ typedef union YYSTYPE YYSTYPE; extern YYSTYPE ncglval; + int ncgparse (void); + #endif /* !YY_NCG_NCGEN_TAB_H_INCLUDED */ From 3299ba534b00148b8a8fc452bf83e350a93f96f4 Mon Sep 17 00:00:00 2001 From: Charlie Zender Date: Sat, 19 Feb 2022 16:08:36 -0800 Subject: [PATCH 5/7] Add BitRound to ncgen --- ncgen/genbin.c | 2 +- ncgen/ncgen.h | 3 +- ncgen/ncgen.l | 3 +- ncgen/ncgen.y | 9 + ncgen/ncgenl.c | 982 +++++++++++++++++++----------------- ncgen/ncgeny.c | 1299 ++++++++++++++++++++++++------------------------ ncgen/ncgeny.h | 5 +- 7 files changed, 1188 insertions(+), 1115 deletions(-) diff --git a/ncgen/genbin.c b/ncgen/genbin.c index 5aef6cfdf..02bf908df 100644 --- a/ncgen/genbin.c +++ b/ncgen/genbin.c @@ -257,7 +257,7 @@ genbin_definespecialattributes(Symbol* var) } CHECK_ERR(stat); } - if(special->flags & (_QUANTIZEBG_FLAG | _QUANTIZEGBR_FLAG)) { + if(special->flags & (_QUANTIZEBG_FLAG | _QUANTIZEGBR_FLAG | _QUANTIZEBR_FLAG)) { stat = nc_def_var_quantize(var->container->nc_id, var->nc_id, special->_Quantizer, special->_NSD); CHECK_ERR(stat); diff --git a/ncgen/ncgen.h b/ncgen/ncgen.h index 4f37e680c..765543d04 100644 --- a/ncgen/ncgen.h +++ b/ncgen/ncgen.h @@ -81,7 +81,8 @@ various C global variables #define _FILTER_FLAG 0x1000 #define _CODECS_FLAG 0x2000 #define _QUANTIZEBG_FLAG 0x4000 -#define _QUANTIZEGBR_FLAG 0x8000 +#define _QUANTIZEGBR_FLAG 0x8000 +#define _QUANTIZEBR_FLAG 0x10000 extern struct Specialtoken { char* name; diff --git a/ncgen/ncgen.l b/ncgen/ncgen.l index 46f646811..8d9ae574b 100644 --- a/ncgen/ncgen.l +++ b/ncgen/ncgen.l @@ -140,6 +140,7 @@ struct Specialtoken specials[] = { {"_Codecs",_CODECS,_CODECS_FLAG}, {"_QuantizeBitGroomNumberOfSignificantDigits",_QUANTIZEBG,_QUANTIZEBG_FLAG}, {"_QuantizeGranularBitRoundNumberOfSignificantDigits",_QUANTIZEGBR,_QUANTIZEGBR_FLAG}, +{"_QuantizeBitRoundNumberOfSignificantDigits",_QUANTIZEBR,_QUANTIZEBR_FLAG}, {NULL,0} /* null terminate */ }; @@ -218,7 +219,7 @@ NUMBER [+-]?[0-9][0-9]*[Uu]?([BbSs]|[Ll]|[Ll][Ll])? DBLNUMBER [+-]?[0-9]*\.[0-9]*{exp}?[LlDd]?|[+-]?[0-9]*{exp}[LlDd]? FLTNUMBER [+-]?[0-9]*\.[0-9]*{exp}?[Ff]|[+-]?[0-9]*{exp}[Ff] -SPECIAL "_FillValue"|"_Format"|"_Storage"|"_ChunkSizes"|"_Fletcher32"|"_DeflateLevel"|"_Shuffle"|"_Endianness"|"_NoFill"|"_NCProperties"|"_IsNetcdf4"|"_SuperblockVersion"|"_Filter"|"_Codecs"|"_QuantizeBitgroomNumberOfSignificantDIgits"|"_QuantizeGranularBitRoundNumberOfSignificantDigits" +SPECIAL "_FillValue"|"_Format"|"_Storage"|"_ChunkSizes"|"_Fletcher32"|"_DeflateLevel"|"_Shuffle"|"_Endianness"|"_NoFill"|"_NCProperties"|"_IsNetcdf4"|"_SuperblockVersion"|"_Filter"|"_Codecs"|"_QuantizeBitgroomNumberOfSignificantDIgits"|"_QuantizeGranularBitRoundNumberOfSignificantDigits"|"_QuantizeBitRoundNumberOfSignificantDigits" USASCII [\x01-\x7F] diff --git a/ncgen/ncgen.y b/ncgen/ncgen.y index 53bb6a7b9..e56362488 100644 --- a/ncgen/ncgen.y +++ b/ncgen/ncgen.y @@ -218,6 +218,7 @@ NCConstant* constant; _CODECS _QUANTIZEBG _QUANTIZEGBR + _QUANTIZEBR DATASETID %type ident typename primtype dimd varspec @@ -778,6 +779,8 @@ attrdecl: {$$ = makespecial(_QUANTIZEBG_FLAG,$1,NULL,(void*)$5,ISCONST);} | ambiguous_ref ':' _QUANTIZEGBR '=' constint {$$ = makespecial(_QUANTIZEGBR_FLAG,$1,NULL,(void*)$5,ISCONST);} + | ambiguous_ref ':' _QUANTIZEBR '=' constint + {$$ = makespecial(_QUANTIZEBR_FLAG,$1,NULL,(void*)$5,ISCONST);} | ambiguous_ref ':' _NOFILL '=' constbool {$$ = makespecial(_NOFILL_FLAG,$1,NULL,(void*)$5,ISCONST);} | ':' _FORMAT '=' conststring @@ -1248,6 +1251,7 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst) case _DEFLATE_FLAG: case _QUANTIZEBG_FLAG: case _QUANTIZEGBR_FLAG: + case _QUANTIZEBR_FLAG: tmp = nullconst(); tmp->nctype = NC_INT; convert1(con,tmp); @@ -1354,6 +1358,11 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst) special->_NSD = idata; special->flags |= _QUANTIZEGBR_FLAG; break; + case _QUANTIZEBR_FLAG: + special->_Quantizer = NC_QUANTIZE_BITROUND; + special->_NSD = idata; + special->flags |= _QUANTIZEBR_FLAG; + break; case _SHUFFLE_FLAG: special->_Shuffle = tf; special->flags |= _SHUFFLE_FLAG; diff --git a/ncgen/ncgenl.c b/ncgen/ncgenl.c index a94e3c3bb..88be429e9 100644 --- a/ncgen/ncgenl.c +++ b/ncgen/ncgenl.c @@ -619,7 +619,7 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[509] = +static const flex_int16_t yy_accept[538] = { 0, 0, 0, 51, 51, 0, 0, 55, 53, 1, 49, 53, 53, 53, 53, 43, 37, 41, 41, 40, 40, @@ -676,7 +676,10 @@ static const flex_int16_t yy_accept[509] = 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 0 + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 0 } ; static const YY_CHAR yy_ec[256] = @@ -723,47 +726,47 @@ static const YY_CHAR yy_meta[73] = 11, 11 } ; -static const flex_int16_t yy_base[527] = +static const flex_int16_t yy_base[556] = { 0, - 0, 0, 406, 404, 342, 341, 380, 2942, 71, 2942, + 0, 0, 406, 404, 342, 341, 380, 3131, 71, 3131, 68, 326, 65, 66, 103, 89, 151, 326, 55, 65, 207, 69, 114, 166, 161, 129, 256, 169, 191, 199, 299, 175, 230, 233, 250, 264, 225, 267, 280, 275, - 287, 184, 286, 285, 284, 323, 317, 0, 2942, 83, - 88, 2942, 322, 317, 347, 0, 277, 357, 258, 0, - 2942, 368, 2942, 2942, 0, 336, 377, 245, 243, 242, - 264, 2942, 55, 152, 0, 345, 393, 229, 219, 218, + 287, 184, 286, 285, 284, 323, 317, 0, 3131, 83, + 88, 3131, 322, 317, 347, 0, 277, 357, 258, 0, + 3131, 368, 3131, 3131, 0, 336, 377, 245, 243, 242, + 264, 3131, 55, 152, 0, 345, 393, 229, 219, 218, 359, 79, 394, 362, 368, 383, 404, 394, 407, 414, 398, 429, 424, 440, 449, 446, 466, 462, 479, 482, 485, 492, 496, 504, 501, 515, 526, 534, 518, 537, 556, 540, 559, 548, 572, 578, 590, 582, 597, 602, - 612, 621, 628, 634, 216, 206, 266, 260, 2942, 0, - 2942, 260, 672, 259, 694, 701, 215, 720, 744, 0, + 612, 621, 628, 634, 216, 206, 266, 260, 3131, 0, + 3131, 260, 672, 259, 694, 701, 215, 720, 744, 0, 653, 552, 760, 195, 191, 190, 189, 184, 118, 182, 179, 702, 659, 707, 738, 743, 746, 752, 755, 761, 776, 764, 787, 795, 798, 801, 813, 806, 817, 836, 847, 832, 839, 855, 850, 862, 869, 886, 881, 892, 899, 902, 911, 918, 925, 934, 955, 943, 937, 950, - 975, 980, 990, 993, 987, 1023, 997, 1027, 159, 2942, + 975, 980, 990, 993, 987, 1023, 997, 1027, 159, 3131, - 89, 0, 2942, 40, 1030, 1068, 141, 139, 136, 134, - 133, 132, 979, 78, 2942, 130, 1034, 1045, 1048, 1053, + 89, 0, 3131, 40, 1030, 1068, 141, 139, 136, 134, + 133, 132, 979, 78, 3131, 130, 1034, 1045, 1048, 1053, 1078, 1064, 1090, 1069, 1094, 1087, 1101, 1112, 1125, 1120, 1131, 1138, 1134, 1143, 1168, 1151, 1176, 1164, 1173, 1183, 1207, 1194, 1187, 1190, 1213, 1227, 1232, 1220, 1224, 1244, 1257, 1237, 1250, 1263, 1267, 1270, 1282, 1287, 1300, 1304, - 1307, 1319, 1322, 188, 181, 2942, 130, 1339, 1379, 112, + 1307, 1319, 1322, 188, 181, 3131, 130, 1339, 1379, 112, 110, 109, 107, 103, 94, 1353, 1358, 1361, 1370, 1365, 1373, 1391, 1403, 1406, 1409, 1415, 1412, 1422, 1425, 1446, - 1455, 1458, 1462, 1466, 1470, 1479, 2942, 1492, 1496, 1476, + 1455, 1458, 1462, 1466, 1470, 1479, 3131, 1492, 1496, 1476, 1532, 1501, 1510, 1542, 1527, 1535, 1517, 1549, 1552, 1566, - 1558, 1573, 1582, 1588, 1596, 1592, 1604, 2942, 2942, 102, + 1558, 1573, 1582, 1588, 1596, 1592, 1604, 3131, 3131, 102, 85, 81, 69, 1618, 1599, 1614, 1608, 1644, 1653, 1630, 1650, 1638, 1660, 1656, 1686, 1676, 1664, 1690, 1697, 1700, - 1708, 1694, 1730, 1734, 1739, 1716, 2942, 1742, 1746, 1750, - 1755, 2942, 1764, 1780, 1785, 1772, 1790, 50, 31, 1796, + 1708, 1694, 1730, 1734, 1739, 1716, 3131, 1742, 1746, 1750, + 1755, 3131, 1764, 1780, 1785, 1772, 1790, 50, 31, 1796, 1804, 1815, 1820, 1826, 1829, 1834, 1837, 1859, 1846, 1867, 1870, 1877, 1883, 1902, 1891, 1909, 1913, 1916, 1921, 1933, 1926, 1946, 33, 1956, 1959, 1965, 1971, 1976, 1990, 1980, @@ -771,83 +774,89 @@ static const flex_int16_t yy_base[527] = 2058, 45, 2040, 2062, 2065, 2070, 2082, 2078, 2102, 2114, 2095, 2128, 2117, 2120, 2135, 2132, 2150, 2154, 2165, 2158, - 2170, 2184, 2189, 2176, 2942, 2195, 2208, 2219, 2225, 2228, - 2942, 2231, 2242, 2264, 2249, 2238, 2268, 2273, 2280, 2284, - 2303, 2306, 2289, 2319, 2310, 2314, 2322, 2329, 2336, 2372, - 2353, 2362, 2359, 2366, 2376, 2406, 2384, 2392, 2402, 2397, - 2416, 2423, 2427, 2432, 2442, 2453, 2438, 2458, 2462, 2449, - 2475, 2479, 2492, 2484, 2499, 2509, 2496, 2522, 2539, 2529, - 2534, 2515, 2545, 2555, 2560, 2565, 2571, 2577, 2581, 2591, - 2586, 2603, 2616, 2597, 2612, 2627, 2633, 2638, 2646, 2649, + 2170, 2184, 2189, 2176, 3131, 2195, 2208, 2219, 2225, 2228, + 3131, 2231, 2242, 2268, 2250, 2238, 2272, 2263, 2282, 2286, + 2298, 2293, 2305, 2312, 2316, 2323, 2335, 2346, 2342, 2353, + 2349, 2357, 2365, 2368, 2379, 2387, 2383, 2398, 2403, 2409, + 2420, 2423, 2439, 2453, 2434, 2458, 2465, 2445, 2470, 2477, + 2489, 2484, 2500, 2507, 2496, 2515, 2526, 2519, 2537, 2530, + 2540, 2551, 2556, 2562, 2573, 2582, 2592, 2598, 2604, 2586, + 2608, 2616, 2623, 2634, 2628, 2638, 2649, 2669, 2654, 2664, - 2652, 2668, 2659, 2682, 2689, 2664, 2685, 2942, 2761, 2775, - 2789, 2803, 2812, 2821, 2830, 2843, 2857, 2870, 2884, 2894, - 2900, 2908, 2910, 2916, 2922, 2928 + 2672, 2684, 2687, 2675, 2680, 2705, 2710, 2721, 2724, 2718, + 2735, 2740, 2728, 2760, 2361, 2765, 2771, 2774, 2777, 2780, + 2785, 2810, 2796, 2815, 2818, 2821, 2832, 2826, 2852, 2836, + 2875, 2858, 2862, 2867, 2872, 2878, 3131, 2950, 2964, 2978, + 2992, 3001, 3010, 3019, 3032, 3046, 3059, 3073, 3083, 3089, + 3097, 3099, 3105, 3111, 3117 } ; -static const flex_int16_t yy_def[527] = +static const flex_int16_t yy_def[556] = { 0, - 508, 1, 509, 509, 510, 510, 508, 508, 508, 508, - 511, 512, 508, 513, 508, 514, 508, 17, 515, 515, - 515, 515, 515, 515, 515, 508, 515, 515, 515, 515, - 21, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 508, 508, 508, 516, 516, 517, 508, 508, - 511, 508, 511, 508, 518, 15, 17, 508, 508, 15, - 508, 508, 508, 508, 519, 520, 508, 508, 508, 508, - 17, 508, 508, 508, 521, 515, 508, 508, 508, 508, - 515, 21, 21, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, + 537, 1, 538, 538, 539, 539, 537, 537, 537, 537, + 540, 541, 537, 542, 537, 543, 537, 17, 544, 544, + 544, 544, 544, 544, 544, 537, 544, 544, 544, 544, + 21, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 537, 537, 537, 545, 545, 546, 537, 537, + 540, 537, 540, 537, 547, 15, 17, 537, 537, 15, + 537, 537, 537, 537, 548, 549, 537, 537, 537, 537, + 17, 537, 537, 537, 550, 544, 537, 537, 537, 537, + 544, 21, 21, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 508, 508, 516, 516, 508, 517, - 508, 508, 508, 522, 508, 508, 508, 508, 508, 519, - 520, 523, 508, 508, 508, 508, 508, 508, 524, 508, - 508, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 508, 508, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 537, 537, 545, 545, 537, 546, + 537, 537, 537, 551, 537, 537, 537, 537, 537, 548, + 549, 552, 537, 537, 537, 537, 537, 537, 553, 537, + 537, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 537, 537, - 508, 525, 508, 508, 526, 508, 508, 508, 508, 508, - 508, 508, 524, 508, 508, 508, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 508, 508, 508, 508, 526, 508, 508, - 508, 508, 508, 508, 508, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 508, 515, 515, 515, + 537, 554, 537, 537, 555, 537, 537, 537, 537, 537, + 537, 537, 553, 537, 537, 537, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 537, 537, 537, 537, 555, 537, 537, + 537, 537, 537, 537, 537, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 537, 544, 544, 544, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 508, 508, 508, - 508, 508, 508, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 508, 515, 515, 515, - 515, 508, 515, 515, 515, 515, 515, 508, 508, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 508, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 537, 537, 537, + 537, 537, 537, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 537, 544, 544, 544, + 544, 537, 544, 544, 544, 544, 544, 537, 537, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 537, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, - 515, 508, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 508, 515, 515, 515, 515, 515, - 508, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, + 544, 537, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 537, 544, 544, 544, 544, 544, + 537, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, - 515, 515, 515, 515, 515, 515, 515, 0, 508, 508, - 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - 508, 508, 508, 508, 508, 508 + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 544, 0, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537 } ; -static const flex_int16_t yy_nxt[3015] = +static const flex_int16_t yy_nxt[3204] = { 0, 8, 9, 10, 9, 8, 11, 12, 8, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 8, @@ -878,312 +887,333 @@ static const flex_int16_t yy_nxt[3015] = 80, 77, 101, 103, 78, 79, 80, 216, 102, 77, 76, 104, 212, 78, 79, 80, 105, 66, 211, 210, 78, 79, 80, 141, 204, 200, 200, 77, 78, 79, - 80, 508, 77, 128, 199, 77, 78, 79, 80, 92, + 80, 537, 77, 128, 199, 77, 78, 79, 80, 92, 93, 94, 95, 114, 91, 96, 151, 150, 97, 109, 108, 98, 77, 99, 78, 79, 80, 76, 77, 78, - 79, 80, 78, 79, 80, 508, 77, 110, 111, 77, - 148, 147, 112, 66, 137, 115, 113, 77, 508, 78, - 79, 80, 77, 131, 508, 78, 79, 80, 129, 77, + 79, 80, 78, 79, 80, 537, 77, 110, 111, 77, + 148, 147, 112, 66, 137, 115, 113, 77, 537, 78, + 79, 80, 77, 131, 537, 78, 79, 80, 129, 77, 128, 116, 119, 78, 79, 80, 78, 79, 80, 120, 118, 121, 117, 122, 78, 79, 80, 142, 123, 78, 79, 80, 126, 125, 91, 106, 78, 79, 80, 133, - 133, 133, 133, 133, 133, 135, 135, 508, 55, 136, - 136, 136, 136, 136, 136, 136, 138, 138, 143, 508, + 133, 133, 133, 133, 133, 135, 135, 537, 55, 136, + 136, 136, 136, 136, 136, 136, 138, 138, 143, 537, 139, 139, 139, 139, 139, 139, 139, 77, 134, 66, 66, 66, 66, 66, 66, 66, 76, 76, 76, 76, 76, 77, 76, 76, 77, 144, 145, 146, 49, 49, 77, 47, 76, 47, 78, 79, 80, 156, 153, 155, - 154, 157, 152, 508, 153, 77, 159, 508, 78, 79, + 154, 157, 152, 537, 153, 77, 159, 537, 78, 79, 80, 78, 79, 80, 158, 76, 77, 78, 79, 80, - 77, 153, 508, 154, 160, 508, 77, 508, 153, 77, - 508, 508, 78, 79, 80, 508, 77, 508, 508, 508, - 76, 158, 508, 78, 79, 80, 77, 78, 79, 80, - 508, 77, 163, 78, 79, 80, 78, 79, 80, 508, - 161, 508, 77, 78, 79, 80, 162, 508, 77, 169, - 508, 77, 508, 78, 79, 80, 164, 508, 78, 79, + 77, 153, 537, 154, 160, 537, 77, 537, 153, 77, + 537, 537, 78, 79, 80, 537, 77, 537, 537, 537, + 76, 158, 537, 78, 79, 80, 77, 78, 79, 80, + 537, 77, 163, 78, 79, 80, 78, 79, 80, 537, + 161, 537, 77, 78, 79, 80, 162, 537, 77, 169, + 537, 77, 537, 78, 79, 80, 164, 537, 78, 79, - 80, 165, 508, 166, 77, 508, 167, 168, 77, 78, - 79, 80, 508, 508, 508, 78, 79, 80, 78, 79, - 80, 77, 508, 170, 77, 171, 508, 77, 508, 176, - 172, 78, 79, 80, 77, 78, 79, 80, 77, 508, - 508, 173, 174, 77, 175, 508, 77, 177, 78, 79, + 80, 165, 537, 166, 77, 537, 167, 168, 77, 78, + 79, 80, 537, 537, 537, 78, 79, 80, 78, 79, + 80, 77, 537, 170, 77, 171, 537, 77, 537, 176, + 172, 78, 79, 80, 77, 78, 79, 80, 77, 537, + 537, 173, 174, 77, 175, 537, 77, 177, 78, 79, 80, 78, 79, 80, 78, 79, 80, 77, 178, 179, - 77, 78, 79, 80, 180, 78, 79, 80, 77, 508, - 78, 79, 80, 78, 79, 80, 77, 508, 181, 77, - 184, 508, 77, 182, 78, 79, 80, 78, 79, 80, - 77, 183, 188, 185, 206, 78, 79, 80, 77, 508, + 77, 78, 79, 80, 180, 78, 79, 80, 77, 537, + 78, 79, 80, 78, 79, 80, 77, 537, 181, 77, + 184, 537, 77, 182, 78, 79, 80, 78, 79, 80, + 77, 183, 188, 185, 206, 78, 79, 80, 77, 537, - 508, 77, 187, 78, 79, 80, 78, 79, 80, 78, - 79, 80, 186, 158, 77, 508, 189, 78, 79, 80, + 537, 77, 187, 78, 79, 80, 78, 79, 80, 78, + 79, 80, 186, 158, 77, 537, 189, 78, 79, 80, 77, 207, 208, 209, 77, 78, 79, 80, 78, 79, - 80, 508, 77, 508, 508, 190, 508, 508, 508, 77, - 192, 78, 79, 80, 77, 508, 508, 78, 79, 80, - 191, 78, 79, 80, 77, 508, 508, 508, 194, 78, - 79, 80, 193, 77, 142, 508, 78, 79, 80, 195, - 77, 78, 79, 80, 508, 196, 77, 508, 200, 197, - 508, 78, 79, 80, 201, 201, 201, 201, 201, 201, - 78, 79, 80, 508, 198, 143, 508, 78, 79, 80, + 80, 537, 77, 537, 537, 190, 537, 537, 537, 77, + 192, 78, 79, 80, 77, 537, 537, 78, 79, 80, + 191, 78, 79, 80, 77, 537, 537, 537, 194, 78, + 79, 80, 193, 77, 142, 537, 78, 79, 80, 195, + 77, 78, 79, 80, 537, 196, 77, 537, 200, 197, + 537, 78, 79, 80, 201, 201, 201, 201, 201, 201, + 78, 79, 80, 537, 198, 143, 537, 78, 79, 80, - 508, 77, 508, 78, 79, 80, 136, 136, 136, 136, + 537, 77, 537, 78, 79, 80, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 508, 508, 144, 145, 146, 203, 508, 63, 78, 79, - 80, 203, 139, 139, 139, 139, 139, 139, 139, 508, - 508, 508, 508, 508, 77, 508, 508, 217, 203, 77, - 63, 508, 508, 508, 508, 203, 139, 139, 139, 139, + 537, 537, 144, 145, 146, 203, 537, 63, 78, 79, + 80, 203, 139, 139, 139, 139, 139, 139, 139, 537, + 537, 537, 537, 537, 77, 537, 537, 217, 203, 77, + 63, 537, 537, 537, 537, 203, 139, 139, 139, 139, 139, 139, 139, 141, 141, 141, 141, 141, 61, 221, - 63, 78, 79, 80, 61, 508, 78, 79, 80, 141, - 77, 508, 218, 508, 508, 77, 508, 508, 77, 508, - 223, 61, 219, 63, 77, 220, 508, 77, 61, 508, + 63, 78, 79, 80, 61, 537, 78, 79, 80, 141, + 77, 537, 218, 537, 537, 77, 537, 537, 77, 537, + 223, 61, 219, 63, 77, 220, 537, 77, 61, 537, - 508, 508, 141, 77, 222, 508, 77, 78, 79, 80, - 508, 225, 78, 79, 80, 78, 79, 80, 77, 508, - 508, 78, 79, 80, 78, 79, 80, 141, 508, 77, + 537, 537, 141, 77, 222, 537, 77, 78, 79, 80, + 537, 225, 78, 79, 80, 78, 79, 80, 77, 537, + 537, 78, 79, 80, 78, 79, 80, 141, 537, 77, 78, 79, 80, 78, 79, 80, 226, 77, 231, 224, - 77, 508, 227, 77, 508, 78, 79, 80, 77, 229, - 508, 232, 228, 508, 508, 77, 78, 79, 80, 77, - 508, 508, 233, 508, 78, 79, 80, 78, 79, 80, - 78, 79, 80, 230, 77, 78, 79, 80, 77, 508, - 508, 77, 78, 79, 80, 508, 78, 79, 80, 77, - 508, 234, 77, 508, 508, 235, 236, 77, 238, 508, + 77, 537, 227, 77, 537, 78, 79, 80, 77, 229, + 537, 232, 228, 537, 537, 77, 78, 79, 80, 77, + 537, 537, 233, 537, 78, 79, 80, 78, 79, 80, + 78, 79, 80, 230, 77, 78, 79, 80, 77, 537, + 537, 77, 78, 79, 80, 537, 78, 79, 80, 77, + 537, 234, 77, 537, 537, 235, 236, 77, 238, 537, - 508, 78, 79, 80, 77, 78, 79, 80, 78, 79, - 80, 77, 508, 237, 508, 508, 78, 79, 80, 78, + 537, 78, 79, 80, 77, 78, 79, 80, 78, 79, + 80, 77, 537, 237, 537, 537, 78, 79, 80, 78, 79, 80, 239, 77, 78, 79, 80, 240, 77, 242, - 241, 78, 79, 80, 77, 247, 508, 243, 78, 79, - 80, 77, 508, 508, 77, 508, 245, 508, 508, 508, - 78, 79, 80, 77, 244, 78, 79, 80, 508, 508, - 77, 78, 79, 80, 508, 508, 248, 77, 78, 79, - 80, 78, 79, 80, 246, 249, 77, 508, 250, 77, - 78, 79, 80, 222, 508, 77, 508, 78, 79, 80, - 508, 253, 77, 508, 78, 79, 80, 77, 508, 508, + 241, 78, 79, 80, 77, 247, 537, 243, 78, 79, + 80, 77, 537, 537, 77, 537, 245, 537, 537, 537, + 78, 79, 80, 77, 244, 78, 79, 80, 537, 537, + 77, 78, 79, 80, 537, 537, 248, 77, 78, 79, + 80, 78, 79, 80, 246, 249, 77, 537, 250, 77, + 78, 79, 80, 222, 537, 77, 537, 78, 79, 80, + 537, 253, 77, 537, 78, 79, 80, 77, 537, 537, - 508, 251, 252, 78, 79, 80, 78, 79, 80, 214, - 254, 508, 78, 79, 80, 508, 215, 77, 508, 78, - 79, 80, 77, 508, 78, 79, 80, 255, 257, 77, - 508, 508, 77, 214, 508, 77, 508, 508, 256, 77, - 215, 142, 508, 260, 78, 79, 80, 508, 508, 78, - 79, 80, 258, 508, 262, 259, 78, 79, 80, 78, + 537, 251, 252, 78, 79, 80, 78, 79, 80, 214, + 254, 537, 78, 79, 80, 537, 215, 77, 537, 78, + 79, 80, 77, 537, 78, 79, 80, 255, 257, 77, + 537, 537, 77, 214, 537, 77, 537, 537, 256, 77, + 215, 142, 537, 260, 78, 79, 80, 537, 537, 78, + 79, 80, 258, 537, 262, 259, 78, 79, 80, 78, 79, 80, 78, 79, 80, 77, 78, 79, 80, 77, - 508, 508, 269, 508, 508, 261, 77, 508, 508, 263, - 205, 205, 205, 205, 205, 205, 205, 77, 276, 508, - 77, 508, 78, 79, 80, 77, 78, 79, 80, 270, + 537, 537, 269, 537, 537, 261, 77, 537, 537, 263, + 205, 205, 205, 205, 205, 205, 205, 77, 276, 537, + 77, 537, 78, 79, 80, 77, 78, 79, 80, 270, - 271, 272, 279, 78, 79, 80, 77, 277, 508, 278, - 508, 77, 508, 508, 78, 79, 80, 78, 79, 80, - 77, 280, 78, 79, 80, 281, 508, 508, 508, 77, - 508, 508, 77, 78, 79, 80, 77, 508, 78, 79, - 80, 283, 282, 77, 508, 508, 508, 78, 79, 80, - 508, 508, 508, 284, 77, 508, 78, 79, 80, 78, - 79, 80, 77, 78, 79, 80, 285, 77, 508, 508, - 78, 79, 80, 77, 286, 288, 77, 508, 508, 289, - 77, 78, 79, 80, 508, 77, 291, 287, 508, 78, - 79, 80, 508, 77, 78, 79, 80, 508, 290, 292, + 271, 272, 279, 78, 79, 80, 77, 277, 537, 278, + 537, 77, 537, 537, 78, 79, 80, 78, 79, 80, + 77, 280, 78, 79, 80, 281, 537, 537, 537, 77, + 537, 537, 77, 78, 79, 80, 77, 537, 78, 79, + 80, 283, 282, 77, 537, 537, 537, 78, 79, 80, + 537, 537, 537, 284, 77, 537, 78, 79, 80, 78, + 79, 80, 77, 78, 79, 80, 285, 77, 537, 537, + 78, 79, 80, 77, 286, 288, 77, 537, 537, 289, + 77, 78, 79, 80, 537, 77, 291, 287, 537, 78, + 79, 80, 537, 77, 78, 79, 80, 537, 290, 292, 78, 79, 80, 78, 79, 80, 77, 78, 79, 80, - 77, 294, 78, 79, 80, 77, 508, 293, 77, 508, - 78, 79, 80, 508, 295, 77, 297, 508, 508, 77, - 508, 508, 77, 78, 79, 80, 77, 78, 79, 80, + 77, 294, 78, 79, 80, 77, 537, 293, 77, 537, + 78, 79, 80, 537, 295, 77, 297, 537, 537, 77, + 537, 537, 77, 78, 79, 80, 77, 78, 79, 80, 296, 299, 78, 79, 80, 78, 79, 80, 302, 77, - 298, 508, 78, 79, 80, 77, 78, 79, 80, 78, - 79, 80, 77, 78, 79, 80, 77, 508, 304, 77, - 303, 508, 508, 508, 77, 300, 78, 79, 80, 77, - 508, 508, 78, 79, 80, 301, 77, 508, 508, 78, + 298, 537, 78, 79, 80, 77, 78, 79, 80, 78, + 79, 80, 77, 78, 79, 80, 77, 537, 304, 77, + 303, 537, 537, 537, 77, 300, 78, 79, 80, 77, + 537, 537, 78, 79, 80, 301, 77, 537, 537, 78, 79, 80, 77, 78, 79, 80, 78, 79, 80, 77, 306, 78, 79, 80, 305, 77, 78, 79, 80, 77, - 508, 508, 77, 78, 79, 80, 309, 312, 508, 78, - 79, 80, 508, 308, 77, 307, 78, 79, 80, 77, - 508, 508, 78, 79, 80, 311, 78, 79, 80, 78, - 79, 80, 77, 310, 508, 508, 77, 508, 313, 77, - 142, 78, 79, 80, 314, 508, 78, 79, 80, 508, - 508, 77, 315, 508, 77, 508, 317, 508, 508, 78, - 79, 80, 508, 78, 79, 80, 78, 79, 80, 316, - 508, 269, 268, 268, 268, 268, 268, 325, 78, 79, - 80, 78, 79, 80, 328, 77, 327, 508, 268, 508, + 537, 537, 77, 78, 79, 80, 309, 312, 537, 78, + 79, 80, 537, 308, 77, 307, 78, 79, 80, 77, + 537, 537, 78, 79, 80, 311, 78, 79, 80, 78, + 79, 80, 77, 310, 537, 537, 77, 537, 313, 77, + 142, 78, 79, 80, 314, 537, 78, 79, 80, 537, + 537, 77, 315, 537, 77, 537, 317, 537, 537, 78, + 79, 80, 537, 78, 79, 80, 78, 79, 80, 316, + 537, 269, 268, 268, 268, 268, 268, 325, 78, 79, + 80, 78, 79, 80, 328, 77, 327, 537, 268, 537, - 77, 324, 508, 77, 508, 508, 508, 77, 270, 271, - 272, 508, 77, 326, 508, 77, 508, 508, 508, 508, - 508, 268, 78, 79, 80, 508, 329, 78, 79, 80, - 78, 79, 80, 77, 78, 79, 80, 330, 508, 78, + 77, 324, 537, 77, 537, 537, 537, 77, 270, 271, + 272, 537, 77, 326, 537, 77, 537, 537, 537, 537, + 537, 268, 78, 79, 80, 537, 329, 78, 79, 80, + 78, 79, 80, 77, 78, 79, 80, 330, 537, 78, 79, 80, 78, 79, 80, 77, 268, 331, 77, 333, - 332, 77, 508, 508, 77, 508, 508, 77, 335, 508, - 78, 79, 80, 334, 77, 508, 336, 77, 508, 508, - 508, 508, 78, 79, 80, 78, 79, 80, 78, 79, - 80, 78, 79, 80, 78, 79, 80, 337, 77, 508, - 508, 78, 79, 80, 78, 79, 80, 77, 508, 508, + 332, 77, 537, 537, 77, 537, 537, 77, 335, 537, + 78, 79, 80, 334, 77, 537, 336, 77, 537, 537, + 537, 537, 78, 79, 80, 78, 79, 80, 78, 79, + 80, 78, 79, 80, 78, 79, 80, 337, 77, 537, + 537, 78, 79, 80, 78, 79, 80, 77, 537, 537, - 77, 508, 508, 338, 77, 508, 508, 508, 77, 339, - 342, 341, 77, 508, 508, 78, 79, 80, 77, 508, - 340, 77, 508, 508, 78, 79, 80, 78, 79, 80, + 77, 537, 537, 338, 77, 537, 537, 537, 77, 339, + 342, 341, 77, 537, 537, 78, 79, 80, 77, 537, + 340, 77, 537, 537, 78, 79, 80, 78, 79, 80, 343, 78, 79, 80, 77, 78, 79, 80, 77, 78, 79, 80, 344, 77, 346, 78, 79, 80, 78, 79, - 80, 347, 77, 345, 508, 508, 508, 508, 348, 77, - 508, 78, 79, 80, 508, 78, 79, 80, 327, 77, - 78, 79, 80, 508, 77, 508, 327, 77, 508, 78, - 79, 80, 508, 349, 77, 352, 78, 79, 80, 353, - 508, 77, 508, 508, 77, 508, 78, 79, 80, 350, + 80, 347, 77, 345, 537, 537, 537, 537, 348, 77, + 537, 78, 79, 80, 537, 78, 79, 80, 327, 77, + 78, 79, 80, 537, 77, 537, 327, 77, 537, 78, + 79, 80, 537, 349, 77, 352, 78, 79, 80, 353, + 537, 77, 537, 537, 77, 537, 78, 79, 80, 350, - 77, 78, 79, 80, 78, 79, 80, 508, 77, 508, - 508, 78, 79, 80, 351, 77, 508, 508, 78, 79, - 80, 78, 79, 80, 77, 508, 508, 78, 79, 80, - 77, 508, 354, 508, 77, 78, 79, 80, 77, 508, - 508, 77, 78, 79, 80, 508, 77, 360, 355, 357, + 77, 78, 79, 80, 78, 79, 80, 537, 77, 537, + 537, 78, 79, 80, 351, 77, 537, 537, 78, 79, + 80, 78, 79, 80, 77, 537, 537, 78, 79, 80, + 77, 537, 354, 537, 77, 78, 79, 80, 77, 537, + 537, 77, 78, 79, 80, 537, 77, 360, 355, 357, 77, 78, 79, 80, 356, 361, 77, 78, 79, 80, - 77, 78, 79, 80, 508, 78, 79, 80, 78, 79, - 80, 508, 77, 78, 79, 80, 362, 78, 79, 80, - 77, 508, 363, 78, 79, 80, 77, 78, 79, 80, - 364, 365, 77, 508, 367, 77, 508, 508, 77, 78, + 77, 78, 79, 80, 537, 78, 79, 80, 78, 79, + 80, 537, 77, 78, 79, 80, 362, 78, 79, 80, + 77, 537, 363, 78, 79, 80, 77, 78, 79, 80, + 364, 365, 77, 537, 367, 77, 537, 537, 77, 78, - 79, 80, 77, 508, 368, 508, 77, 78, 79, 80, - 370, 508, 366, 78, 79, 80, 365, 508, 77, 78, + 79, 80, 77, 537, 368, 537, 77, 78, 79, 80, + 370, 537, 366, 78, 79, 80, 365, 537, 77, 78, 79, 80, 78, 79, 80, 78, 79, 80, 77, 78, 79, 80, 77, 78, 79, 80, 77, 369, 365, 77, - 508, 508, 77, 508, 374, 78, 79, 80, 371, 508, - 77, 365, 372, 508, 508, 78, 79, 80, 77, 78, + 537, 537, 77, 537, 374, 78, 79, 80, 371, 537, + 77, 365, 372, 537, 537, 78, 79, 80, 77, 78, 79, 80, 373, 78, 79, 80, 78, 79, 80, 78, - 79, 80, 77, 508, 508, 375, 77, 78, 79, 80, - 508, 77, 508, 508, 77, 78, 79, 80, 77, 508, - 376, 377, 77, 508, 508, 508, 508, 77, 508, 78, + 79, 80, 77, 537, 537, 375, 77, 78, 79, 80, + 537, 77, 537, 537, 77, 78, 79, 80, 77, 537, + 376, 377, 77, 537, 537, 537, 537, 77, 537, 78, - 79, 80, 378, 78, 79, 80, 77, 508, 78, 79, + 79, 80, 378, 78, 79, 80, 77, 537, 78, 79, 80, 78, 79, 80, 77, 78, 79, 80, 379, 78, - 79, 80, 77, 508, 78, 79, 80, 77, 380, 508, - 508, 508, 77, 78, 79, 80, 508, 508, 77, 508, - 508, 78, 79, 80, 382, 386, 77, 381, 508, 78, - 79, 80, 384, 219, 78, 79, 80, 77, 508, 78, - 79, 80, 77, 508, 508, 78, 79, 80, 77, 508, - 508, 77, 508, 78, 79, 80, 77, 508, 387, 77, - 385, 508, 388, 508, 78, 79, 80, 508, 77, 78, - 79, 80, 508, 389, 391, 78, 79, 80, 78, 79, + 79, 80, 77, 537, 78, 79, 80, 77, 380, 537, + 537, 537, 77, 78, 79, 80, 537, 537, 77, 537, + 537, 78, 79, 80, 382, 386, 77, 381, 537, 78, + 79, 80, 384, 219, 78, 79, 80, 77, 537, 78, + 79, 80, 77, 537, 537, 78, 79, 80, 77, 537, + 537, 77, 537, 78, 79, 80, 77, 537, 387, 77, + 385, 537, 388, 537, 78, 79, 80, 537, 77, 78, + 79, 80, 537, 389, 391, 78, 79, 80, 78, 79, - 80, 77, 508, 78, 79, 80, 78, 79, 80, 77, - 508, 508, 77, 390, 392, 78, 79, 80, 393, 77, - 508, 508, 508, 508, 508, 77, 508, 508, 78, 79, - 80, 365, 508, 77, 508, 508, 78, 79, 80, 78, - 79, 80, 508, 394, 77, 395, 78, 79, 80, 508, - 365, 77, 78, 79, 80, 77, 396, 508, 77, 508, - 78, 79, 80, 77, 508, 508, 508, 508, 77, 508, - 397, 78, 79, 80, 400, 77, 508, 508, 78, 79, + 80, 77, 537, 78, 79, 80, 78, 79, 80, 77, + 537, 537, 77, 390, 392, 78, 79, 80, 393, 77, + 537, 537, 537, 537, 537, 77, 537, 537, 78, 79, + 80, 365, 537, 77, 537, 537, 78, 79, 80, 78, + 79, 80, 537, 394, 77, 395, 78, 79, 80, 537, + 365, 77, 78, 79, 80, 77, 396, 537, 77, 537, + 78, 79, 80, 77, 537, 537, 537, 537, 77, 537, + 397, 78, 79, 80, 400, 77, 537, 537, 78, 79, 80, 398, 78, 79, 80, 78, 79, 80, 77, 404, - 78, 79, 80, 399, 401, 78, 79, 80, 77, 508, + 78, 79, 80, 399, 401, 78, 79, 80, 77, 537, - 508, 77, 78, 79, 80, 403, 406, 77, 219, 508, - 508, 508, 508, 77, 508, 78, 79, 80, 77, 508, - 508, 508, 77, 508, 508, 78, 79, 80, 78, 79, - 80, 508, 77, 508, 78, 79, 80, 405, 407, 77, + 537, 77, 78, 79, 80, 403, 406, 77, 219, 537, + 537, 537, 537, 77, 537, 78, 79, 80, 77, 537, + 537, 537, 77, 537, 537, 78, 79, 80, 78, 79, + 80, 537, 77, 537, 78, 79, 80, 405, 407, 77, 78, 79, 80, 408, 77, 78, 79, 80, 77, 78, - 79, 80, 77, 508, 508, 410, 77, 409, 412, 78, - 79, 80, 411, 77, 508, 508, 78, 79, 80, 77, - 508, 78, 79, 80, 77, 78, 79, 80, 413, 78, - 79, 80, 77, 78, 79, 80, 508, 77, 414, 508, - 78, 79, 80, 396, 77, 508, 78, 79, 80, 404, + 79, 80, 77, 537, 537, 410, 77, 409, 412, 78, + 79, 80, 411, 77, 537, 537, 78, 79, 80, 77, + 537, 78, 79, 80, 77, 78, 79, 80, 413, 78, + 79, 80, 77, 78, 79, 80, 537, 77, 414, 537, + 78, 79, 80, 396, 77, 537, 78, 79, 80, 404, - 77, 78, 79, 80, 77, 508, 508, 77, 508, 78, + 77, 78, 79, 80, 77, 537, 537, 77, 537, 78, 79, 80, 77, 416, 78, 79, 80, 419, 417, 415, - 77, 78, 79, 80, 77, 508, 365, 78, 79, 80, - 365, 78, 79, 80, 78, 79, 80, 77, 508, 78, - 79, 80, 508, 418, 77, 508, 508, 78, 79, 80, - 421, 78, 79, 80, 425, 422, 77, 420, 508, 77, - 508, 508, 77, 423, 78, 79, 80, 508, 508, 508, - 77, 78, 79, 80, 77, 508, 508, 77, 508, 365, - 508, 424, 508, 78, 79, 80, 78, 79, 80, 78, - 79, 80, 77, 365, 508, 431, 77, 78, 79, 80, + 77, 78, 79, 80, 77, 537, 365, 78, 79, 80, + 365, 78, 79, 80, 78, 79, 80, 77, 537, 78, + 79, 80, 537, 418, 77, 537, 537, 78, 79, 80, + 421, 78, 79, 80, 425, 422, 77, 420, 537, 77, + 537, 537, 77, 423, 78, 79, 80, 537, 537, 537, + 77, 78, 79, 80, 77, 537, 537, 77, 537, 365, + 537, 424, 537, 78, 79, 80, 78, 79, 80, 78, + 79, 80, 77, 365, 537, 431, 77, 78, 79, 80, - 77, 78, 79, 80, 78, 79, 80, 77, 508, 508, - 427, 508, 77, 508, 426, 365, 508, 508, 77, 78, + 77, 78, 79, 80, 78, 79, 80, 77, 537, 537, + 427, 537, 77, 537, 426, 365, 537, 537, 77, 78, 79, 80, 428, 78, 79, 80, 77, 78, 79, 80, - 508, 77, 508, 508, 78, 79, 80, 77, 508, 78, - 79, 80, 430, 432, 429, 78, 79, 80, 508, 508, - 77, 508, 508, 78, 79, 80, 433, 508, 78, 79, - 80, 77, 508, 508, 78, 79, 80, 77, 436, 435, - 77, 508, 508, 77, 508, 508, 508, 78, 79, 80, - 77, 434, 508, 508, 77, 365, 439, 508, 78, 79, - 80, 77, 508, 508, 78, 79, 80, 78, 79, 80, + 537, 77, 537, 537, 78, 79, 80, 77, 537, 78, + 79, 80, 430, 432, 429, 78, 79, 80, 537, 537, + 77, 537, 537, 78, 79, 80, 433, 537, 78, 79, + 80, 77, 537, 537, 78, 79, 80, 77, 436, 435, + 77, 537, 537, 77, 537, 537, 537, 78, 79, 80, + 77, 434, 537, 537, 77, 365, 440, 537, 78, 79, + 80, 537, 77, 537, 78, 79, 80, 78, 79, 80, - 78, 79, 80, 365, 508, 438, 77, 78, 79, 80, - 77, 78, 79, 80, 437, 77, 508, 508, 78, 79, - 80, 508, 77, 508, 508, 508, 77, 508, 440, 508, - 508, 77, 508, 78, 79, 80, 441, 78, 79, 80, - 442, 443, 78, 79, 80, 77, 446, 508, 77, 78, - 79, 80, 77, 78, 79, 80, 77, 444, 78, 79, - 80, 77, 448, 447, 77, 508, 508, 445, 452, 449, - 508, 77, 78, 79, 80, 78, 79, 80, 77, 78, - 79, 80, 450, 78, 79, 80, 451, 508, 78, 79, - 80, 78, 79, 80, 453, 77, 508, 508, 78, 79, + 78, 79, 80, 365, 437, 77, 439, 78, 79, 80, + 77, 78, 79, 80, 77, 537, 537, 537, 438, 78, + 79, 80, 537, 442, 77, 537, 537, 537, 77, 441, + 537, 537, 78, 79, 80, 77, 537, 78, 79, 80, + 77, 78, 79, 80, 537, 443, 444, 77, 537, 537, + 446, 78, 79, 80, 77, 78, 79, 80, 77, 447, + 537, 445, 78, 79, 80, 77, 537, 78, 79, 80, + 537, 537, 449, 448, 78, 79, 80, 77, 537, 451, + 450, 78, 79, 80, 77, 78, 79, 80, 77, 453, + 518, 77, 78, 79, 80, 77, 537, 457, 452, 77, - 80, 77, 508, 508, 77, 78, 79, 80, 77, 365, - 508, 455, 508, 508, 77, 508, 508, 508, 77, 508, - 459, 456, 78, 79, 80, 454, 77, 508, 78, 79, - 80, 78, 79, 80, 77, 78, 79, 80, 457, 77, - 460, 78, 79, 80, 77, 78, 79, 80, 77, 508, - 508, 458, 508, 78, 79, 80, 464, 462, 77, 461, - 508, 78, 79, 80, 508, 77, 78, 79, 80, 77, - 469, 78, 79, 80, 77, 78, 79, 80, 508, 463, - 77, 466, 508, 465, 77, 78, 79, 80, 508, 467, - 468, 77, 78, 79, 80, 77, 78, 79, 80, 472, + 458, 459, 537, 77, 78, 79, 80, 77, 454, 455, + 77, 78, 79, 80, 456, 78, 79, 80, 78, 79, + 80, 77, 78, 79, 80, 77, 78, 79, 80, 77, + 78, 79, 80, 537, 78, 79, 80, 78, 79, 80, + 77, 537, 537, 365, 537, 77, 460, 537, 78, 79, + 80, 77, 78, 79, 80, 462, 78, 79, 80, 537, + 537, 461, 77, 537, 463, 77, 537, 78, 79, 80, + 468, 537, 78, 79, 80, 464, 77, 537, 78, 79, + 80, 77, 537, 537, 466, 465, 537, 77, 537, 78, + 79, 80, 78, 79, 80, 77, 537, 537, 467, 537, - 77, 78, 79, 80, 77, 508, 508, 78, 79, 80, - 470, 78, 79, 80, 508, 508, 508, 77, 78, 79, - 80, 77, 78, 79, 80, 471, 77, 78, 79, 80, - 473, 78, 79, 80, 77, 474, 476, 475, 77, 508, - 508, 77, 508, 508, 78, 79, 80, 477, 78, 79, - 80, 77, 508, 78, 79, 80, 479, 77, 478, 484, - 508, 78, 79, 80, 77, 78, 79, 80, 78, 79, - 80, 77, 481, 508, 480, 482, 77, 508, 78, 79, - 80, 77, 485, 483, 78, 79, 80, 77, 508, 508, - 508, 78, 79, 80, 508, 508, 508, 77, 78, 79, + 77, 537, 471, 78, 79, 80, 469, 77, 78, 79, + 80, 537, 77, 470, 78, 79, 80, 475, 537, 77, + 537, 537, 78, 79, 80, 537, 77, 78, 79, 80, + 472, 77, 537, 476, 78, 79, 80, 473, 77, 78, + 79, 80, 77, 537, 537, 478, 78, 79, 80, 77, + 537, 537, 474, 78, 79, 80, 481, 77, 78, 79, + 80, 77, 483, 477, 479, 78, 79, 80, 77, 78, + 79, 80, 77, 480, 482, 537, 78, 79, 80, 77, + 537, 537, 77, 537, 78, 79, 80, 537, 78, 79, + 80, 537, 484, 77, 537, 78, 79, 80, 77, 78, - 80, 490, 77, 78, 79, 80, 508, 77, 78, 79, - 80, 486, 487, 77, 78, 79, 80, 508, 508, 77, - 492, 489, 508, 77, 78, 79, 80, 488, 77, 78, - 79, 80, 508, 77, 78, 79, 80, 491, 493, 77, - 78, 79, 80, 508, 508, 77, 78, 79, 80, 496, - 78, 79, 80, 494, 77, 78, 79, 80, 77, 508, - 78, 79, 80, 508, 497, 495, 78, 79, 80, 77, - 508, 508, 78, 79, 80, 77, 508, 508, 508, 499, - 77, 78, 79, 80, 508, 78, 79, 80, 77, 498, - 500, 77, 503, 508, 77, 508, 78, 79, 80, 365, + 79, 80, 537, 485, 77, 537, 78, 79, 80, 78, + 79, 80, 487, 537, 537, 77, 537, 537, 537, 486, + 78, 79, 80, 488, 77, 78, 79, 80, 77, 537, + 537, 78, 79, 80, 77, 537, 537, 489, 493, 537, + 77, 537, 78, 79, 80, 537, 77, 537, 490, 492, + 77, 78, 79, 80, 491, 78, 79, 80, 77, 537, + 494, 78, 79, 80, 495, 77, 537, 78, 79, 80, + 77, 537, 496, 78, 79, 80, 77, 78, 79, 80, + 77, 537, 537, 497, 537, 78, 79, 80, 498, 537, + 499, 77, 78, 79, 80, 537, 77, 78, 79, 80, - 508, 77, 78, 79, 80, 501, 77, 78, 79, 80, - 77, 504, 508, 508, 502, 78, 79, 80, 78, 79, - 80, 78, 79, 80, 77, 508, 507, 77, 78, 79, - 80, 77, 505, 78, 79, 80, 508, 78, 79, 80, - 508, 506, 508, 508, 508, 508, 365, 508, 508, 508, - 508, 78, 79, 80, 78, 79, 80, 508, 78, 79, - 80, 46, 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 51, + 502, 500, 501, 78, 79, 80, 77, 78, 79, 80, + 503, 77, 507, 537, 77, 537, 537, 77, 78, 79, + 80, 504, 77, 78, 79, 80, 77, 537, 505, 77, + 537, 506, 537, 78, 79, 80, 508, 537, 78, 79, + 80, 78, 79, 80, 78, 79, 80, 77, 537, 78, + 79, 80, 77, 78, 79, 80, 78, 79, 80, 514, + 77, 509, 510, 77, 515, 537, 77, 537, 513, 537, + 77, 537, 537, 537, 78, 79, 80, 77, 537, 78, + 79, 80, 77, 511, 516, 537, 512, 78, 79, 80, + 78, 79, 80, 78, 79, 80, 537, 78, 79, 80, + + 537, 537, 77, 537, 78, 79, 80, 77, 537, 78, + 79, 80, 517, 77, 537, 537, 77, 519, 537, 77, + 537, 520, 77, 537, 521, 537, 522, 77, 537, 78, + 79, 80, 523, 537, 78, 79, 80, 524, 77, 537, + 78, 79, 80, 78, 79, 80, 78, 79, 80, 78, + 79, 80, 77, 537, 78, 79, 80, 77, 526, 537, + 77, 537, 525, 77, 528, 78, 79, 80, 77, 537, + 529, 537, 537, 537, 77, 537, 537, 527, 77, 78, + 79, 80, 365, 537, 78, 79, 80, 78, 79, 80, + 78, 79, 80, 365, 77, 78, 79, 80, 531, 532, + + 77, 78, 79, 80, 77, 78, 79, 80, 530, 77, + 533, 537, 534, 537, 77, 537, 537, 77, 537, 535, + 77, 78, 79, 80, 537, 537, 537, 78, 79, 80, + 537, 78, 79, 80, 536, 537, 78, 79, 80, 365, + 537, 78, 79, 80, 78, 79, 80, 78, 79, 80, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 54, 54, 54, 54, 54, 54, 54, 54, - 51, 51, 51, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54, 57, 508, 57, - 508, 57, 508, 57, 66, 508, 508, 66, 508, 66, - 66, 66, 66, 66, 76, 76, 508, 76, 76, 76, - 76, 76, 76, 127, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, - 132, 508, 132, 132, 132, 132, 132, 132, 132, 132, - 132, 132, 132, 132, 140, 508, 140, 140, 140, 140, - 140, 140, 140, 140, 140, 140, 140, 140, 141, 141, + 54, 54, 54, 54, 54, 54, 57, 537, 57, 537, + 57, 537, 57, 66, 537, 537, 66, 537, 66, 66, + 66, 66, 66, 76, 76, 537, 76, 76, 76, 76, + 76, 76, 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, 130, 132, + 537, 132, 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 140, 537, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 149, 149, 149, 202, - 141, 141, 141, 141, 141, 141, 141, 149, 149, 149, - 202, 508, 508, 508, 508, 202, 202, 202, 205, 205, - 205, 205, 205, 213, 213, 213, 508, 508, 213, 265, - 265, 265, 268, 268, 268, 268, 268, 268, 268, 268, - 268, 7, 508, 508, 508, 508, 508, 508, 508, 508, - 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, + 537, 537, 537, 537, 202, 202, 202, 205, 205, 205, + 205, 205, 213, 213, 213, 537, 537, 213, 265, 265, + 265, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 7, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, - 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - 508, 508, 508, 508 + 537, 537, 537 } ; -static const flex_int16_t yy_chk[3015] = +static const flex_int16_t yy_chk[3204] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1436,87 +1466,108 @@ static const flex_int16_t yy_chk[3015] = 423, 428, 0, 0, 426, 426, 426, 429, 430, 429, 430, 0, 0, 432, 0, 0, 0, 427, 427, 427, 436, 428, 0, 0, 433, 432, 436, 0, 428, 428, - 428, 435, 0, 0, 429, 429, 429, 430, 430, 430, + 428, 0, 435, 0, 429, 429, 429, 430, 430, 430, - 432, 432, 432, 433, 0, 435, 434, 436, 436, 436, - 437, 433, 433, 433, 434, 438, 0, 0, 435, 435, - 435, 0, 439, 0, 0, 0, 440, 0, 437, 0, - 0, 443, 0, 434, 434, 434, 438, 437, 437, 437, - 439, 440, 438, 438, 438, 441, 443, 0, 442, 439, - 439, 439, 445, 440, 440, 440, 446, 441, 443, 443, - 443, 444, 445, 444, 447, 0, 0, 442, 449, 446, - 0, 448, 441, 441, 441, 442, 442, 442, 449, 445, - 445, 445, 447, 446, 446, 446, 448, 0, 444, 444, - 444, 447, 447, 447, 450, 451, 0, 0, 448, 448, + 432, 432, 432, 433, 434, 438, 435, 436, 436, 436, + 434, 433, 433, 433, 437, 0, 0, 0, 434, 435, + 435, 435, 0, 438, 439, 0, 0, 0, 440, 437, + 0, 0, 438, 438, 438, 442, 0, 434, 434, 434, + 441, 437, 437, 437, 0, 439, 440, 443, 0, 0, + 442, 439, 439, 439, 444, 440, 440, 440, 445, 443, + 0, 441, 442, 442, 442, 446, 0, 441, 441, 441, + 0, 0, 445, 444, 443, 443, 443, 447, 0, 447, + 446, 444, 444, 444, 449, 445, 445, 445, 448, 449, + 515, 451, 446, 446, 446, 450, 0, 453, 448, 452, - 448, 453, 0, 0, 452, 449, 449, 449, 454, 451, - 0, 453, 0, 0, 450, 0, 0, 0, 455, 0, - 457, 454, 451, 451, 451, 452, 457, 0, 453, 453, - 453, 452, 452, 452, 458, 454, 454, 454, 455, 460, - 458, 450, 450, 450, 459, 455, 455, 455, 456, 0, - 0, 456, 0, 457, 457, 457, 462, 460, 461, 459, - 0, 458, 458, 458, 0, 462, 460, 460, 460, 463, - 467, 459, 459, 459, 464, 456, 456, 456, 0, 461, - 467, 464, 0, 463, 465, 461, 461, 461, 0, 465, - 466, 470, 462, 462, 462, 466, 463, 463, 463, 470, + 454, 455, 0, 515, 447, 447, 447, 453, 450, 451, + 454, 449, 449, 449, 452, 448, 448, 448, 451, 451, + 451, 455, 450, 450, 450, 457, 452, 452, 452, 456, + 515, 515, 515, 0, 453, 453, 453, 454, 454, 454, + 458, 0, 0, 456, 0, 459, 457, 0, 455, 455, + 455, 460, 457, 457, 457, 459, 456, 456, 456, 0, + 0, 458, 461, 0, 460, 462, 0, 458, 458, 458, + 465, 0, 459, 459, 459, 461, 465, 0, 460, 460, + 460, 463, 0, 0, 463, 462, 0, 468, 0, 461, + 461, 461, 462, 462, 462, 464, 0, 0, 464, 0, - 468, 464, 464, 464, 469, 0, 0, 467, 467, 467, - 468, 465, 465, 465, 0, 0, 0, 471, 470, 470, - 470, 472, 466, 466, 466, 469, 474, 468, 468, 468, - 471, 469, 469, 469, 473, 472, 474, 473, 477, 0, - 0, 475, 0, 0, 471, 471, 471, 475, 472, 472, - 472, 476, 0, 474, 474, 474, 477, 482, 476, 482, - 0, 473, 473, 473, 478, 477, 477, 477, 475, 475, - 475, 480, 479, 0, 478, 480, 481, 0, 476, 476, - 476, 479, 483, 481, 482, 482, 482, 483, 0, 0, - 0, 478, 478, 478, 0, 0, 0, 484, 480, 480, + 466, 0, 468, 465, 465, 465, 466, 467, 463, 463, + 463, 0, 469, 467, 468, 468, 468, 472, 0, 470, + 0, 0, 464, 464, 464, 0, 472, 466, 466, 466, + 469, 471, 0, 473, 467, 467, 467, 470, 475, 469, + 469, 469, 473, 0, 0, 475, 470, 470, 470, 474, + 0, 0, 471, 472, 472, 472, 478, 476, 471, 471, + 471, 478, 480, 474, 476, 475, 475, 475, 477, 473, + 473, 473, 480, 477, 479, 0, 474, 474, 474, 479, + 0, 0, 481, 0, 476, 476, 476, 0, 478, 478, + 478, 0, 481, 482, 0, 477, 477, 477, 483, 480, - 480, 488, 485, 481, 481, 481, 0, 486, 479, 479, - 479, 484, 485, 487, 483, 483, 483, 0, 0, 488, - 490, 487, 0, 489, 484, 484, 484, 486, 491, 485, - 485, 485, 0, 490, 486, 486, 486, 489, 491, 494, - 487, 487, 487, 0, 0, 492, 488, 488, 488, 494, - 489, 489, 489, 492, 495, 491, 491, 491, 493, 0, - 490, 490, 490, 0, 495, 493, 494, 494, 494, 496, - 0, 0, 492, 492, 492, 497, 0, 0, 0, 497, - 498, 495, 495, 495, 0, 493, 493, 493, 499, 496, - 499, 500, 502, 0, 501, 0, 496, 496, 496, 498, + 480, 480, 0, 482, 484, 0, 479, 479, 479, 481, + 481, 481, 484, 0, 0, 485, 0, 0, 0, 483, + 482, 482, 482, 485, 486, 483, 483, 483, 490, 0, + 0, 484, 484, 484, 487, 0, 0, 486, 490, 0, + 488, 0, 485, 485, 485, 0, 489, 0, 487, 489, + 491, 486, 486, 486, 488, 490, 490, 490, 492, 0, + 491, 487, 487, 487, 492, 493, 0, 488, 488, 488, + 495, 0, 493, 489, 489, 489, 494, 491, 491, 491, + 496, 0, 0, 494, 0, 492, 492, 492, 495, 0, + 496, 497, 493, 493, 493, 0, 499, 495, 495, 495, - 0, 503, 497, 497, 497, 500, 506, 498, 498, 498, - 502, 503, 0, 0, 501, 499, 499, 499, 500, 500, - 500, 501, 501, 501, 504, 0, 506, 507, 503, 503, - 503, 505, 504, 506, 506, 506, 0, 502, 502, 502, - 0, 505, 0, 0, 0, 0, 507, 0, 0, 0, - 0, 504, 504, 504, 507, 507, 507, 0, 505, 505, - 505, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 509, 509, 509, 510, 510, 510, 510, 510, - 510, 510, 510, 510, 510, 510, 510, 510, 510, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, + 499, 497, 498, 494, 494, 494, 500, 496, 496, 496, + 500, 498, 504, 0, 501, 0, 0, 504, 497, 497, + 497, 501, 505, 499, 499, 499, 502, 0, 502, 503, + 0, 503, 0, 500, 500, 500, 505, 0, 498, 498, + 498, 501, 501, 501, 504, 504, 504, 506, 0, 505, + 505, 505, 507, 502, 502, 502, 503, 503, 503, 511, + 510, 506, 507, 508, 512, 0, 509, 0, 510, 0, + 513, 0, 0, 0, 506, 506, 506, 511, 0, 507, + 507, 507, 512, 508, 513, 0, 509, 510, 510, 510, + 508, 508, 508, 509, 509, 509, 0, 513, 513, 513, - 511, 511, 511, 512, 512, 512, 512, 512, 512, 512, - 512, 512, 512, 512, 512, 512, 512, 513, 0, 513, - 0, 513, 0, 513, 514, 0, 0, 514, 0, 514, - 514, 514, 514, 514, 515, 515, 0, 515, 515, 515, - 515, 515, 515, 516, 516, 516, 516, 516, 516, 516, - 516, 516, 516, 516, 516, 516, 516, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 518, 0, 518, 518, 518, 518, 518, 518, 518, 518, - 518, 518, 518, 518, 519, 0, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 520, 520, + 0, 0, 514, 0, 511, 511, 511, 516, 0, 512, + 512, 512, 514, 517, 0, 0, 518, 516, 0, 519, + 0, 517, 520, 0, 518, 0, 519, 521, 0, 514, + 514, 514, 520, 0, 516, 516, 516, 521, 523, 0, + 517, 517, 517, 518, 518, 518, 519, 519, 519, 520, + 520, 520, 522, 0, 521, 521, 521, 524, 523, 0, + 525, 0, 522, 526, 525, 523, 523, 523, 528, 0, + 528, 0, 0, 0, 527, 0, 0, 524, 530, 522, + 522, 522, 526, 0, 524, 524, 524, 525, 525, 525, + 526, 526, 526, 527, 529, 528, 528, 528, 530, 531, - 520, 520, 520, 520, 520, 520, 520, 521, 521, 521, - 522, 0, 0, 0, 0, 522, 522, 522, 523, 523, - 523, 523, 523, 524, 524, 524, 0, 0, 524, 525, - 525, 525, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 508, 508, 508, 508, 508, 508, 508, 508, 508, - 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, + 532, 527, 527, 527, 533, 530, 530, 530, 529, 534, + 532, 0, 533, 0, 535, 0, 0, 531, 0, 534, + 536, 529, 529, 529, 0, 0, 0, 532, 532, 532, + 0, 533, 533, 533, 535, 0, 534, 534, 534, 536, + 0, 535, 535, 535, 531, 531, 531, 536, 536, 536, + 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, + 538, 538, 538, 538, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 539, 539, 540, 540, + 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, + 540, 540, 541, 541, 541, 541, 541, 541, 541, 541, - 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, - 508, 508, 508, 508 + 541, 541, 541, 541, 541, 541, 542, 0, 542, 0, + 542, 0, 542, 543, 0, 0, 543, 0, 543, 543, + 543, 543, 543, 544, 544, 0, 544, 544, 544, 544, + 544, 544, 545, 545, 545, 545, 545, 545, 545, 545, + 545, 545, 545, 545, 545, 545, 546, 546, 546, 546, + 546, 546, 546, 546, 546, 546, 546, 546, 546, 547, + 0, 547, 547, 547, 547, 547, 547, 547, 547, 547, + 547, 547, 547, 548, 0, 548, 548, 548, 548, 548, + 548, 548, 548, 548, 548, 548, 548, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 550, 550, 550, 551, + + 0, 0, 0, 0, 551, 551, 551, 552, 552, 552, + 552, 552, 553, 553, 553, 0, 0, 553, 554, 554, + 554, 555, 555, 555, 555, 555, 555, 555, 555, 555, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + + 537, 537, 537 } ; static yy_state_type yy_last_accepting_state; @@ -1676,10 +1727,11 @@ struct Specialtoken specials[] = { {"_Codecs",_CODECS,_CODECS_FLAG}, {"_QuantizeBitGroomNumberOfSignificantDigits",_QUANTIZEBG,_QUANTIZEBG_FLAG}, {"_QuantizeGranularBitRoundNumberOfSignificantDigits",_QUANTIZEGBR,_QUANTIZEGBR_FLAG}, +{"_QuantizeBitRoundNumberOfSignificantDigits",_QUANTIZEBR,_QUANTIZEBR_FLAG}, {NULL,0} /* null terminate */ }; -#line 1682 "ncgenl.c" +#line 1734 "ncgenl.c" /* The most correct (validating) version of UTF8 character set (Taken from: http://www.w3.org/2005/03/23-lex-U) @@ -1722,7 +1774,7 @@ ID ([A-Za-z_]|{UTF8})([A-Z.@#\[\]a-z_0-9+-]|{UTF8})* /* Note: this definition of string will work for utf8 as well, although it is a very relaxed definition */ -#line 1725 "ncgenl.c" +#line 1777 "ncgenl.c" #define INITIAL 0 #define ST_C_COMMENT 1 @@ -1941,9 +1993,9 @@ YY_DECL } { -#line 225 "ncgen.l" +#line 226 "ncgen.l" -#line 1946 "ncgenl.c" +#line 1998 "ncgenl.c" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -1970,13 +2022,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 509 ) + if ( yy_current_state >= 538 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 2942 ); + while ( yy_base[yy_current_state] != 3131 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -2002,14 +2054,14 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 226 "ncgen.l" +#line 227 "ncgen.l" { /* whitespace */ break; } YY_BREAK case 2: YY_RULE_SETUP -#line 230 "ncgen.l" +#line 231 "ncgen.l" { /* comment */ break; } @@ -2017,7 +2069,7 @@ YY_RULE_SETUP case 3: /* rule 3 can match eol */ YY_RULE_SETUP -#line 234 "ncgen.l" +#line 235 "ncgen.l" {int len; char* s = NULL; /* In netcdf4, this will be used in a variety of places, so only remove escapes */ @@ -2041,7 +2093,7 @@ yytext[MAXTRST-1] = '\0'; YY_BREAK case 4: YY_RULE_SETUP -#line 255 "ncgen.l" +#line 256 "ncgen.l" { /* drop leading 0x; pad to even number of chars */ char* p = yytext+2; int len = yyleng - 2; @@ -2056,143 +2108,143 @@ YY_RULE_SETUP YY_BREAK case 5: YY_RULE_SETUP -#line 267 "ncgen.l" +#line 268 "ncgen.l" {return lexdebug(COMPOUND);} YY_BREAK case 6: YY_RULE_SETUP -#line 268 "ncgen.l" +#line 269 "ncgen.l" {return lexdebug(ENUM);} YY_BREAK case 7: YY_RULE_SETUP -#line 269 "ncgen.l" +#line 270 "ncgen.l" {return lexdebug(OPAQUE_);} YY_BREAK case 8: YY_RULE_SETUP -#line 271 "ncgen.l" +#line 272 "ncgen.l" {return lexdebug(FLOAT_K);} YY_BREAK case 9: YY_RULE_SETUP -#line 272 "ncgen.l" +#line 273 "ncgen.l" {return lexdebug(DOUBLE_K);} YY_BREAK case 10: YY_RULE_SETUP -#line 273 "ncgen.l" +#line 274 "ncgen.l" {return lexdebug(CHAR_K);} YY_BREAK case 11: YY_RULE_SETUP -#line 274 "ncgen.l" +#line 275 "ncgen.l" {return lexdebug(BYTE_K);} YY_BREAK case 12: YY_RULE_SETUP -#line 275 "ncgen.l" +#line 276 "ncgen.l" {return lexdebug(SHORT_K);} YY_BREAK case 13: YY_RULE_SETUP -#line 276 "ncgen.l" +#line 277 "ncgen.l" {return lexdebug(INT_K);} YY_BREAK case 14: YY_RULE_SETUP -#line 277 "ncgen.l" +#line 278 "ncgen.l" {return lexdebug(identcheck(UBYTE_K));} YY_BREAK case 15: YY_RULE_SETUP -#line 278 "ncgen.l" +#line 279 "ncgen.l" {return lexdebug(identcheck(USHORT_K));} YY_BREAK case 16: YY_RULE_SETUP -#line 279 "ncgen.l" +#line 280 "ncgen.l" {return lexdebug(identcheck(UINT_K));} YY_BREAK case 17: YY_RULE_SETUP -#line 280 "ncgen.l" +#line 281 "ncgen.l" {return lexdebug(identcheck(INT64_K));} YY_BREAK case 18: YY_RULE_SETUP -#line 281 "ncgen.l" +#line 282 "ncgen.l" {return lexdebug(identcheck(UINT64_K));} YY_BREAK case 19: YY_RULE_SETUP -#line 282 "ncgen.l" +#line 283 "ncgen.l" {return lexdebug(identcheck(STRING_K));} YY_BREAK case 20: YY_RULE_SETUP -#line 284 "ncgen.l" +#line 285 "ncgen.l" {return lexdebug(FLOAT_K);} YY_BREAK case 21: YY_RULE_SETUP -#line 285 "ncgen.l" +#line 286 "ncgen.l" {return lexdebug(INT_K);} YY_BREAK case 22: YY_RULE_SETUP -#line 286 "ncgen.l" +#line 287 "ncgen.l" {return lexdebug(INT_K);} YY_BREAK case 23: YY_RULE_SETUP -#line 287 "ncgen.l" +#line 288 "ncgen.l" {return lexdebug(identcheck(UINT_K));} YY_BREAK case 24: YY_RULE_SETUP -#line 288 "ncgen.l" +#line 289 "ncgen.l" {return lexdebug(identcheck(UINT_K));} YY_BREAK case 25: YY_RULE_SETUP -#line 291 "ncgen.l" +#line 292 "ncgen.l" {int32_val = -1; return lexdebug(NC_UNLIMITED_K);} YY_BREAK case 26: YY_RULE_SETUP -#line 294 "ncgen.l" +#line 295 "ncgen.l" {return lexdebug(TYPES);} YY_BREAK case 27: YY_RULE_SETUP -#line 295 "ncgen.l" +#line 296 "ncgen.l" {return lexdebug(DIMENSIONS);} YY_BREAK case 28: YY_RULE_SETUP -#line 296 "ncgen.l" +#line 297 "ncgen.l" {return lexdebug(VARIABLES);} YY_BREAK case 29: YY_RULE_SETUP -#line 297 "ncgen.l" +#line 298 "ncgen.l" {return lexdebug(DATA);} YY_BREAK case 30: YY_RULE_SETUP -#line 298 "ncgen.l" +#line 299 "ncgen.l" {return lexdebug(GROUP);} YY_BREAK case 31: YY_RULE_SETUP -#line 300 "ncgen.l" +#line 301 "ncgen.l" {BEGIN(TEXT);return lexdebug(NETCDF);} YY_BREAK case 32: YY_RULE_SETUP -#line 302 "ncgen.l" +#line 303 "ncgen.l" { /* missing value (pre-2.4 backward compatibility) */ if (yytext[0] == '-') { double_val = -INFINITY; @@ -2205,7 +2257,7 @@ YY_RULE_SETUP YY_BREAK case 33: YY_RULE_SETUP -#line 311 "ncgen.l" +#line 312 "ncgen.l" { /* missing value (pre-2.4 backward compatibility) */ double_val = NAN; specialconstants = 1; @@ -2214,7 +2266,7 @@ YY_RULE_SETUP YY_BREAK case 34: YY_RULE_SETUP -#line 317 "ncgen.l" +#line 318 "ncgen.l" {/* missing value (pre-2.4 backward compatibility)*/ if (yytext[0] == '-') { float_val = -INFINITYF; @@ -2227,7 +2279,7 @@ YY_RULE_SETUP YY_BREAK case 35: YY_RULE_SETUP -#line 326 "ncgen.l" +#line 327 "ncgen.l" { /* missing value (pre-2.4 backward compatibility) */ float_val = NANF; specialconstants = 1; @@ -2236,7 +2288,7 @@ YY_RULE_SETUP YY_BREAK case 36: YY_RULE_SETUP -#line 332 "ncgen.l" +#line 333 "ncgen.l" { #ifdef USE_NETCDF4 if(l_flag == L_C || l_flag == L_BINARY) @@ -2249,7 +2301,7 @@ YY_RULE_SETUP YY_BREAK case 37: YY_RULE_SETUP -#line 342 "ncgen.l" +#line 343 "ncgen.l" { bbClear(lextext); bbAppendn(lextext,(char*)yytext,yyleng+1); /* include null */ @@ -2260,7 +2312,7 @@ YY_RULE_SETUP YY_BREAK case 38: YY_RULE_SETUP -#line 351 "ncgen.l" +#line 352 "ncgen.l" {struct Specialtoken* st; bbClear(lextext); bbAppendn(lextext,(char*)yytext,yyleng+1); /* include null */ @@ -2274,7 +2326,7 @@ YY_RULE_SETUP case 39: /* rule 39 can match eol */ YY_RULE_SETUP -#line 361 "ncgen.l" +#line 362 "ncgen.l" { int c; char* p; char* q; @@ -2294,7 +2346,7 @@ YY_RULE_SETUP YY_BREAK case 40: YY_RULE_SETUP -#line 378 "ncgen.l" +#line 379 "ncgen.l" { char* id = NULL; int len; len = strlen(yytext); len = unescape(yytext,len,ISIDENT,&id); @@ -2309,7 +2361,7 @@ YY_RULE_SETUP YY_BREAK case 41: YY_RULE_SETUP -#line 390 "ncgen.l" +#line 391 "ncgen.l" { /* We need to try to see what size of integer ((u)int). @@ -2390,7 +2442,7 @@ done: return 0; YY_BREAK case 42: YY_RULE_SETUP -#line 468 "ncgen.l" +#line 469 "ncgen.l" { int c; int token = 0; @@ -2441,7 +2493,7 @@ YY_RULE_SETUP YY_BREAK case 43: YY_RULE_SETUP -#line 515 "ncgen.l" +#line 516 "ncgen.l" { if (sscanf((char*)yytext, "%le", &double_val) != 1) { sprintf(errstr,"bad long or double constant: %s",(char*)yytext); @@ -2452,7 +2504,7 @@ YY_RULE_SETUP YY_BREAK case 44: YY_RULE_SETUP -#line 522 "ncgen.l" +#line 523 "ncgen.l" { if (sscanf((char*)yytext, "%e", &float_val) != 1) { sprintf(errstr,"bad float constant: %s",(char*)yytext); @@ -2464,7 +2516,7 @@ YY_RULE_SETUP case 45: /* rule 45 can match eol */ YY_RULE_SETUP -#line 529 "ncgen.l" +#line 530 "ncgen.l" { (void) sscanf((char*)&yytext[1],"%c",&byte_val); return lexdebug(BYTE_CONST); @@ -2472,7 +2524,7 @@ YY_RULE_SETUP YY_BREAK case 46: YY_RULE_SETUP -#line 533 "ncgen.l" +#line 534 "ncgen.l" { int oct = unescapeoct(&yytext[2]); if(oct < 0) { @@ -2485,7 +2537,7 @@ YY_RULE_SETUP YY_BREAK case 47: YY_RULE_SETUP -#line 542 "ncgen.l" +#line 543 "ncgen.l" { int hex = unescapehex(&yytext[3]); if(byte_val < 0) { @@ -2498,7 +2550,7 @@ YY_RULE_SETUP YY_BREAK case 48: YY_RULE_SETUP -#line 551 "ncgen.l" +#line 552 "ncgen.l" { switch ((char)yytext[2]) { case 'a': byte_val = '\007'; break; /* not everyone under- @@ -2520,7 +2572,7 @@ YY_RULE_SETUP case 49: /* rule 49 can match eol */ YY_RULE_SETUP -#line 569 "ncgen.l" +#line 570 "ncgen.l" { lineno++ ; break; @@ -2528,7 +2580,7 @@ YY_RULE_SETUP YY_BREAK case 50: YY_RULE_SETUP -#line 574 "ncgen.l" +#line 575 "ncgen.l" {/*initial*/ BEGIN(ST_C_COMMENT); break; @@ -2537,21 +2589,21 @@ YY_RULE_SETUP case 51: /* rule 51 can match eol */ YY_RULE_SETUP -#line 579 "ncgen.l" +#line 580 "ncgen.l" {/* continuation */ break; } YY_BREAK case 52: YY_RULE_SETUP -#line 583 "ncgen.l" +#line 584 "ncgen.l" {/* final */ BEGIN(INITIAL); break; } YY_BREAK case YY_STATE_EOF(ST_C_COMMENT): -#line 588 "ncgen.l" +#line 589 "ncgen.l" {/* final, error */ fprintf(stderr,"unterminated /**/ comment"); BEGIN(INITIAL); @@ -2560,17 +2612,17 @@ case YY_STATE_EOF(ST_C_COMMENT): YY_BREAK case 53: YY_RULE_SETUP -#line 594 "ncgen.l" +#line 595 "ncgen.l" {/* Note: this next rule will not work for UTF8 characters */ return lexdebug(yytext[0]) ; } YY_BREAK case 54: YY_RULE_SETUP -#line 597 "ncgen.l" +#line 598 "ncgen.l" ECHO; YY_BREAK -#line 2573 "ncgenl.c" +#line 2625 "ncgenl.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(TEXT): yyterminate(); @@ -2868,7 +2920,7 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 509 ) + if ( yy_current_state >= 538 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -2896,11 +2948,11 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 509 ) + if ( yy_current_state >= 538 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 508); + yy_is_jam = (yy_current_state == 537); return yy_is_jam ? 0 : yy_current_state; } @@ -3576,7 +3628,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 597 "ncgen.l" +#line 598 "ncgen.l" static int lexdebug(int token) diff --git a/ncgen/ncgeny.c b/ncgen/ncgeny.c index 649e6a6cf..b44fdc224 100644 --- a/ncgen/ncgeny.c +++ b/ncgen/ncgeny.c @@ -303,84 +303,85 @@ enum yysymbol_kind_t YYSYMBOL__CODECS = 55, /* _CODECS */ YYSYMBOL__QUANTIZEBG = 56, /* _QUANTIZEBG */ YYSYMBOL__QUANTIZEGBR = 57, /* _QUANTIZEGBR */ - YYSYMBOL_DATASETID = 58, /* DATASETID */ - YYSYMBOL_59_ = 59, /* '{' */ - YYSYMBOL_60_ = 60, /* '}' */ - YYSYMBOL_61_ = 61, /* ';' */ - YYSYMBOL_62_ = 62, /* ',' */ - YYSYMBOL_63_ = 63, /* '=' */ - YYSYMBOL_64_ = 64, /* '(' */ - YYSYMBOL_65_ = 65, /* ')' */ - YYSYMBOL_66_ = 66, /* '*' */ - YYSYMBOL_67_ = 67, /* ':' */ - YYSYMBOL_YYACCEPT = 68, /* $accept */ - YYSYMBOL_ncdesc = 69, /* ncdesc */ - YYSYMBOL_datasetid = 70, /* datasetid */ - YYSYMBOL_rootgroup = 71, /* rootgroup */ - YYSYMBOL_groupbody = 72, /* groupbody */ - YYSYMBOL_subgrouplist = 73, /* subgrouplist */ - YYSYMBOL_namedgroup = 74, /* namedgroup */ - YYSYMBOL_75_1 = 75, /* $@1 */ - YYSYMBOL_76_2 = 76, /* $@2 */ - YYSYMBOL_typesection = 77, /* typesection */ - YYSYMBOL_typedecls = 78, /* typedecls */ - YYSYMBOL_typename = 79, /* typename */ - YYSYMBOL_type_or_attr_decl = 80, /* type_or_attr_decl */ - YYSYMBOL_typedecl = 81, /* typedecl */ - YYSYMBOL_optsemicolon = 82, /* optsemicolon */ - YYSYMBOL_enumdecl = 83, /* enumdecl */ - YYSYMBOL_enumidlist = 84, /* enumidlist */ - YYSYMBOL_enumid = 85, /* enumid */ - YYSYMBOL_opaquedecl = 86, /* opaquedecl */ - YYSYMBOL_vlendecl = 87, /* vlendecl */ - YYSYMBOL_compounddecl = 88, /* compounddecl */ - YYSYMBOL_fields = 89, /* fields */ - YYSYMBOL_field = 90, /* field */ - YYSYMBOL_primtype = 91, /* primtype */ - YYSYMBOL_dimsection = 92, /* dimsection */ - YYSYMBOL_dimdecls = 93, /* dimdecls */ - YYSYMBOL_dim_or_attr_decl = 94, /* dim_or_attr_decl */ - YYSYMBOL_dimdeclist = 95, /* dimdeclist */ - YYSYMBOL_dimdecl = 96, /* dimdecl */ - YYSYMBOL_dimd = 97, /* dimd */ - YYSYMBOL_vasection = 98, /* vasection */ - YYSYMBOL_vadecls = 99, /* vadecls */ - YYSYMBOL_vadecl_or_attr = 100, /* vadecl_or_attr */ - YYSYMBOL_vardecl = 101, /* vardecl */ - YYSYMBOL_varlist = 102, /* varlist */ - YYSYMBOL_varspec = 103, /* varspec */ - YYSYMBOL_dimspec = 104, /* dimspec */ - YYSYMBOL_dimlist = 105, /* dimlist */ - YYSYMBOL_dimref = 106, /* dimref */ - YYSYMBOL_fieldlist = 107, /* fieldlist */ - YYSYMBOL_fieldspec = 108, /* fieldspec */ - YYSYMBOL_fielddimspec = 109, /* fielddimspec */ - YYSYMBOL_fielddimlist = 110, /* fielddimlist */ - YYSYMBOL_fielddim = 111, /* fielddim */ - YYSYMBOL_varref = 112, /* varref */ - YYSYMBOL_typeref = 113, /* typeref */ - YYSYMBOL_ambiguous_ref = 114, /* ambiguous_ref */ - YYSYMBOL_attrdecllist = 115, /* attrdecllist */ - YYSYMBOL_attrdecl = 116, /* attrdecl */ - YYSYMBOL_path = 117, /* path */ - YYSYMBOL_datasection = 118, /* datasection */ - YYSYMBOL_datadecls = 119, /* datadecls */ - YYSYMBOL_datadecl = 120, /* datadecl */ - YYSYMBOL_datalist = 121, /* datalist */ - YYSYMBOL_datalist0 = 122, /* datalist0 */ - YYSYMBOL_datalist1 = 123, /* datalist1 */ - YYSYMBOL_dataitem = 124, /* dataitem */ - YYSYMBOL_constdata = 125, /* constdata */ - YYSYMBOL_econstref = 126, /* econstref */ - YYSYMBOL_function = 127, /* function */ - YYSYMBOL_arglist = 128, /* arglist */ - YYSYMBOL_simpleconstant = 129, /* simpleconstant */ - YYSYMBOL_intlist = 130, /* intlist */ - YYSYMBOL_constint = 131, /* constint */ - YYSYMBOL_conststring = 132, /* conststring */ - YYSYMBOL_constbool = 133, /* constbool */ - YYSYMBOL_varident = 134, /* varident */ - YYSYMBOL_ident = 135 /* ident */ + YYSYMBOL__QUANTIZEBR = 58, /* _QUANTIZEBR */ + YYSYMBOL_DATASETID = 59, /* DATASETID */ + YYSYMBOL_60_ = 60, /* '{' */ + YYSYMBOL_61_ = 61, /* '}' */ + YYSYMBOL_62_ = 62, /* ';' */ + YYSYMBOL_63_ = 63, /* ',' */ + YYSYMBOL_64_ = 64, /* '=' */ + YYSYMBOL_65_ = 65, /* '(' */ + YYSYMBOL_66_ = 66, /* ')' */ + YYSYMBOL_67_ = 67, /* '*' */ + YYSYMBOL_68_ = 68, /* ':' */ + YYSYMBOL_YYACCEPT = 69, /* $accept */ + YYSYMBOL_ncdesc = 70, /* ncdesc */ + YYSYMBOL_datasetid = 71, /* datasetid */ + YYSYMBOL_rootgroup = 72, /* rootgroup */ + YYSYMBOL_groupbody = 73, /* groupbody */ + YYSYMBOL_subgrouplist = 74, /* subgrouplist */ + YYSYMBOL_namedgroup = 75, /* namedgroup */ + YYSYMBOL_76_1 = 76, /* $@1 */ + YYSYMBOL_77_2 = 77, /* $@2 */ + YYSYMBOL_typesection = 78, /* typesection */ + YYSYMBOL_typedecls = 79, /* typedecls */ + YYSYMBOL_typename = 80, /* typename */ + YYSYMBOL_type_or_attr_decl = 81, /* type_or_attr_decl */ + YYSYMBOL_typedecl = 82, /* typedecl */ + YYSYMBOL_optsemicolon = 83, /* optsemicolon */ + YYSYMBOL_enumdecl = 84, /* enumdecl */ + YYSYMBOL_enumidlist = 85, /* enumidlist */ + YYSYMBOL_enumid = 86, /* enumid */ + YYSYMBOL_opaquedecl = 87, /* opaquedecl */ + YYSYMBOL_vlendecl = 88, /* vlendecl */ + YYSYMBOL_compounddecl = 89, /* compounddecl */ + YYSYMBOL_fields = 90, /* fields */ + YYSYMBOL_field = 91, /* field */ + YYSYMBOL_primtype = 92, /* primtype */ + YYSYMBOL_dimsection = 93, /* dimsection */ + YYSYMBOL_dimdecls = 94, /* dimdecls */ + YYSYMBOL_dim_or_attr_decl = 95, /* dim_or_attr_decl */ + YYSYMBOL_dimdeclist = 96, /* dimdeclist */ + YYSYMBOL_dimdecl = 97, /* dimdecl */ + YYSYMBOL_dimd = 98, /* dimd */ + YYSYMBOL_vasection = 99, /* vasection */ + YYSYMBOL_vadecls = 100, /* vadecls */ + YYSYMBOL_vadecl_or_attr = 101, /* vadecl_or_attr */ + YYSYMBOL_vardecl = 102, /* vardecl */ + YYSYMBOL_varlist = 103, /* varlist */ + YYSYMBOL_varspec = 104, /* varspec */ + YYSYMBOL_dimspec = 105, /* dimspec */ + YYSYMBOL_dimlist = 106, /* dimlist */ + YYSYMBOL_dimref = 107, /* dimref */ + YYSYMBOL_fieldlist = 108, /* fieldlist */ + YYSYMBOL_fieldspec = 109, /* fieldspec */ + YYSYMBOL_fielddimspec = 110, /* fielddimspec */ + YYSYMBOL_fielddimlist = 111, /* fielddimlist */ + YYSYMBOL_fielddim = 112, /* fielddim */ + YYSYMBOL_varref = 113, /* varref */ + YYSYMBOL_typeref = 114, /* typeref */ + YYSYMBOL_ambiguous_ref = 115, /* ambiguous_ref */ + YYSYMBOL_attrdecllist = 116, /* attrdecllist */ + YYSYMBOL_attrdecl = 117, /* attrdecl */ + YYSYMBOL_path = 118, /* path */ + YYSYMBOL_datasection = 119, /* datasection */ + YYSYMBOL_datadecls = 120, /* datadecls */ + YYSYMBOL_datadecl = 121, /* datadecl */ + YYSYMBOL_datalist = 122, /* datalist */ + YYSYMBOL_datalist0 = 123, /* datalist0 */ + YYSYMBOL_datalist1 = 124, /* datalist1 */ + YYSYMBOL_dataitem = 125, /* dataitem */ + YYSYMBOL_constdata = 126, /* constdata */ + YYSYMBOL_econstref = 127, /* econstref */ + YYSYMBOL_function = 128, /* function */ + YYSYMBOL_arglist = 129, /* arglist */ + YYSYMBOL_simpleconstant = 130, /* simpleconstant */ + YYSYMBOL_intlist = 131, /* intlist */ + YYSYMBOL_constint = 132, /* constint */ + YYSYMBOL_conststring = 133, /* conststring */ + YYSYMBOL_constbool = 134, /* constbool */ + YYSYMBOL_varident = 135, /* varident */ + YYSYMBOL_ident = 136 /* ident */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -708,19 +709,19 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 5 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 446 +#define YYLAST 420 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 68 +#define YYNTOKENS 69 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 68 /* YYNRULES -- Number of rules. */ -#define YYNRULES 158 +#define YYNRULES 159 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 273 +#define YYNSTATES 276 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 313 +#define YYMAXUTOK 314 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -738,15 +739,15 @@ static const yytype_int8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 64, 65, 66, 2, 62, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 67, 61, - 2, 63, 2, 2, 2, 2, 2, 2, 2, 2, + 65, 66, 67, 2, 63, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 68, 62, + 2, 64, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 59, 2, 60, 2, 2, 2, 2, + 2, 2, 2, 60, 2, 61, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -765,29 +766,29 @@ static const yytype_int8 yytranslate[] = 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58 + 55, 56, 57, 58, 59 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 242, 242, 248, 250, 257, 264, 264, 267, 276, - 266, 281, 282, 283, 287, 287, 289, 299, 299, 302, - 303, 304, 305, 308, 308, 311, 341, 343, 360, 369, - 381, 395, 428, 429, 432, 446, 447, 448, 449, 450, - 451, 452, 453, 454, 455, 456, 457, 460, 461, 462, - 465, 466, 469, 469, 471, 472, 476, 484, 494, 506, - 507, 508, 511, 512, 515, 515, 517, 539, 543, 547, - 576, 577, 580, 581, 585, 599, 603, 608, 637, 638, - 642, 643, 648, 658, 678, 689, 700, 719, 726, 726, - 729, 731, 733, 735, 737, 746, 757, 759, 761, 763, - 765, 767, 769, 771, 773, 775, 777, 779, 781, 783, - 788, 795, 804, 805, 806, 809, 810, 813, 817, 818, - 822, 826, 827, 832, 833, 837, 838, 839, 840, 841, - 842, 846, 850, 854, 856, 861, 862, 863, 864, 865, - 866, 867, 868, 869, 870, 871, 872, 876, 877, 881, - 883, 885, 887, 892, 896, 897, 905, 906, 910 + 0, 243, 243, 249, 251, 258, 265, 265, 268, 277, + 267, 282, 283, 284, 288, 288, 290, 300, 300, 303, + 304, 305, 306, 309, 309, 312, 342, 344, 361, 370, + 382, 396, 429, 430, 433, 447, 448, 449, 450, 451, + 452, 453, 454, 455, 456, 457, 458, 461, 462, 463, + 466, 467, 470, 470, 472, 473, 477, 485, 495, 507, + 508, 509, 512, 513, 516, 516, 518, 540, 544, 548, + 577, 578, 581, 582, 586, 600, 604, 609, 638, 639, + 643, 644, 649, 659, 679, 690, 701, 720, 727, 727, + 730, 732, 734, 736, 738, 747, 758, 760, 762, 764, + 766, 768, 770, 772, 774, 776, 778, 780, 782, 784, + 786, 791, 798, 807, 808, 809, 812, 813, 816, 820, + 821, 825, 829, 830, 835, 836, 840, 841, 842, 843, + 844, 845, 849, 853, 857, 859, 864, 865, 866, 867, + 868, 869, 870, 871, 872, 873, 874, 875, 879, 880, + 884, 886, 888, 890, 895, 899, 900, 908, 909, 913 }; #endif @@ -813,11 +814,11 @@ static const char *const yytname[] = "GROUP", "PATH", "FILLMARKER", "NIL", "_FILLVALUE", "_FORMAT", "_STORAGE", "_CHUNKSIZES", "_DEFLATELEVEL", "_SHUFFLE", "_ENDIANNESS", "_NOFILL", "_FLETCHER32", "_NCPROPS", "_ISNETCDF4", "_SUPERBLOCK", - "_FILTER", "_CODECS", "_QUANTIZEBG", "_QUANTIZEGBR", "DATASETID", "'{'", - "'}'", "';'", "','", "'='", "'('", "')'", "'*'", "':'", "$accept", - "ncdesc", "datasetid", "rootgroup", "groupbody", "subgrouplist", - "namedgroup", "$@1", "$@2", "typesection", "typedecls", "typename", - "type_or_attr_decl", "typedecl", "optsemicolon", "enumdecl", + "_FILTER", "_CODECS", "_QUANTIZEBG", "_QUANTIZEGBR", "_QUANTIZEBR", + "DATASETID", "'{'", "'}'", "';'", "','", "'='", "'('", "')'", "'*'", + "':'", "$accept", "ncdesc", "datasetid", "rootgroup", "groupbody", + "subgrouplist", "namedgroup", "$@1", "$@2", "typesection", "typedecls", + "typename", "type_or_attr_decl", "typedecl", "optsemicolon", "enumdecl", "enumidlist", "enumid", "opaquedecl", "vlendecl", "compounddecl", "fields", "field", "primtype", "dimsection", "dimdecls", "dim_or_attr_decl", "dimdeclist", "dimdecl", "dimd", "vasection", @@ -837,12 +838,12 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-149) +#define YYPACT_NINF (-153) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-159) +#define YYTABLE_NINF (-160) #define yytable_value_is_error(Yyn) \ 0 @@ -851,34 +852,34 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - -10, -13, 46, -149, -3, -149, 237, -149, -149, -149, - -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, - -149, -149, -4, -149, -149, 407, -12, 40, 18, -149, - -149, 29, 32, 33, 38, 39, -9, 24, 251, 224, - 56, 237, 86, 86, 43, 1, 333, 88, -149, -149, - -1, 42, 44, 45, 49, 53, 54, 57, 58, 60, - 61, 62, 63, 64, 88, 65, 224, -149, -149, 67, - 67, 67, 67, 71, 273, 69, 237, 101, -149, -149, - -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, - -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, - -149, -149, -149, -149, -149, 333, -149, 72, -149, -149, - -149, -149, -149, -149, -149, 76, 74, 78, 79, 333, - 86, 1, 1, 43, 86, 43, 43, 86, 86, 1, - 1, 333, 84, -149, 123, -149, -149, -149, -149, -149, - -149, 88, 80, -149, 237, 89, 85, -149, 90, -149, - 92, 237, 117, 16, 333, 408, -149, 333, 333, 72, - -149, 94, -149, -149, -149, -149, -149, -149, -149, -149, - -149, -149, 72, 407, 87, 100, 96, 102, -149, 88, - 41, 237, 103, -149, 371, -149, 407, -149, -149, -149, - -45, -149, 237, 72, 72, 1, 309, 104, 88, -149, - 88, 88, 88, -149, -149, -149, -149, -149, 105, -149, - 95, -149, 106, -149, 108, 107, -149, 407, 112, 408, - -149, -149, -149, -149, 113, -149, 115, -149, 111, -149, - 22, -149, 119, -149, -149, 2, -2, -149, 333, 122, - -149, -149, 129, -149, 88, 11, -149, -149, 88, 1, - -149, -149, -27, -149, -149, 72, -149, 91, -149, -149, - -149, 12, -149, -149, -149, -2, -149, 237, 11, -149, - -149, -149, -149 + -10, -24, 30, -153, -18, -153, 233, -153, -153, -153, + -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, + -153, -153, 20, -153, -153, 381, -4, 5, -16, -153, + -153, 4, 23, 45, 46, 50, -28, 51, 3, 197, + 89, 233, 74, 74, 80, 82, 307, 106, -153, -153, + -1, 63, 66, 67, 68, 69, 71, 72, 75, 77, + 78, 79, 81, 85, 86, 106, 87, 197, -153, -153, + 91, 91, 91, 91, 109, 246, 92, 233, 126, -153, + -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, + -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, + -153, -153, -153, -153, -153, -153, 307, -153, 94, -153, + -153, -153, -153, -153, -153, -153, 93, 99, 98, 100, + 307, 74, 82, 82, 80, 74, 80, 80, 74, 74, + 82, 82, 82, 307, 105, -153, 146, -153, -153, -153, + -153, -153, -153, 106, 102, -153, 233, 108, 110, -153, + 107, -153, 111, 233, 140, 27, 307, 256, -153, 307, + 307, 94, -153, 113, -153, -153, -153, -153, -153, -153, + -153, -153, -153, -153, -153, 94, 381, 114, 117, 118, + 112, -153, 106, 53, 233, 123, -153, 345, -153, 381, + -153, -153, -153, -43, -153, 233, 94, 94, 82, 282, + 124, 106, -153, 106, 106, 106, -153, -153, -153, -153, + -153, 125, -153, 120, -153, 127, -153, 128, 130, -153, + 381, 129, 256, -153, -153, -153, -153, 134, -153, 135, + -153, 149, -153, 62, -153, 136, -153, -153, -5, 1, + -153, 307, 154, -153, -153, 151, -153, 106, -3, -153, + -153, 106, 82, -153, -153, -34, -153, -153, 94, -153, + 131, -153, -153, -153, 14, -153, -153, -153, 1, -153, + 233, -3, -153, -153, -153, -153 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -888,56 +889,56 @@ static const yytype_uint8 yydefact[] = { 0, 0, 0, 3, 0, 1, 88, 2, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 158, 111, 0, 6, 87, 0, 85, 11, 0, 86, - 110, 0, 0, 0, 0, 0, 0, 0, 0, 12, - 47, 88, 0, 0, 0, 0, 120, 0, 4, 7, + 159, 112, 0, 6, 87, 0, 85, 11, 0, 86, + 111, 0, 0, 0, 0, 0, 0, 0, 0, 12, + 47, 88, 0, 0, 0, 0, 121, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 13, 14, 17, 23, - 23, 23, 23, 87, 0, 0, 48, 59, 89, 153, - 109, 90, 149, 151, 150, 152, 155, 154, 91, 92, - 146, 135, 136, 137, 138, 139, 140, 141, 142, 143, - 144, 145, 126, 127, 128, 120, 131, 93, 118, 119, - 121, 123, 129, 130, 125, 110, 0, 0, 0, 120, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 120, 0, 16, 0, 15, 24, 19, 22, 21, - 20, 0, 0, 18, 49, 0, 52, 54, 0, 53, - 110, 60, 112, 0, 0, 0, 8, 120, 120, 96, - 98, 99, 147, 101, 102, 103, 108, 100, 104, 105, - 106, 107, 95, 0, 0, 0, 0, 0, 50, 0, - 0, 61, 0, 64, 0, 65, 113, 5, 124, 122, - 0, 133, 88, 97, 94, 0, 0, 0, 0, 85, - 0, 0, 0, 51, 55, 58, 57, 56, 0, 62, - 156, 157, 66, 67, 70, 0, 84, 114, 0, 0, - 132, 6, 148, 31, 0, 32, 34, 75, 78, 29, - 0, 26, 0, 30, 63, 0, 0, 69, 120, 0, - 115, 134, 9, 33, 0, 0, 77, 25, 0, 0, - 156, 68, 0, 72, 74, 117, 116, 0, 76, 83, - 82, 0, 80, 27, 28, 0, 71, 88, 0, 79, - 73, 10, 81 + 0, 0, 0, 0, 0, 0, 0, 13, 14, 17, + 23, 23, 23, 23, 87, 0, 0, 48, 59, 89, + 154, 110, 90, 150, 152, 151, 153, 156, 155, 91, + 92, 147, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 127, 128, 129, 121, 132, 93, 119, + 120, 122, 124, 130, 131, 126, 111, 0, 0, 0, + 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 121, 0, 16, 0, 15, 24, 19, + 22, 21, 20, 0, 0, 18, 49, 0, 52, 54, + 0, 53, 111, 60, 113, 0, 0, 0, 8, 121, + 121, 96, 98, 99, 148, 101, 102, 103, 109, 100, + 104, 105, 106, 107, 108, 95, 0, 0, 0, 0, + 0, 50, 0, 0, 61, 0, 64, 0, 65, 114, + 5, 125, 123, 0, 134, 88, 97, 94, 0, 0, + 0, 0, 85, 0, 0, 0, 51, 55, 58, 57, + 56, 0, 62, 157, 158, 66, 67, 70, 0, 84, + 115, 0, 0, 133, 6, 149, 31, 0, 32, 34, + 75, 78, 29, 0, 26, 0, 30, 63, 0, 0, + 69, 121, 0, 116, 135, 9, 33, 0, 0, 77, + 25, 0, 0, 157, 68, 0, 72, 74, 118, 117, + 0, 76, 83, 82, 0, 80, 27, 28, 0, 71, + 88, 0, 79, 73, 10, 81 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -149, -149, -149, -149, -8, -35, -149, -149, -149, -149, - -149, -130, 121, -149, 28, -149, -149, -63, -149, -149, - -149, -149, -7, -26, -149, -149, 47, -149, 9, -149, - -149, -149, 14, -149, -149, -42, -149, -149, -75, -149, - -48, -149, -149, -71, -149, -36, -15, -40, -33, -44, - -149, -149, -19, -100, -149, -149, 50, -149, -149, -149, - -149, -148, -149, -41, -34, -73, -149, -22 + -153, -153, -153, -153, 22, -6, -153, -153, -153, -153, + -153, -136, 153, -153, 10, -153, -153, -25, -153, -153, + -153, -153, 24, -30, -153, -153, 76, -153, 39, -153, + -153, -153, 43, -153, -153, 25, -153, -153, -2, -153, + -19, -153, -153, -39, -153, -36, -21, -40, -33, -44, + -153, -153, 15, -94, -153, -153, 115, -153, -153, -153, + -153, -152, -153, -37, -29, 2, -153, -22 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - 0, 2, 4, 7, 23, 36, 49, 192, 257, 40, - 66, 132, 67, 68, 137, 69, 230, 231, 70, 71, - 72, 196, 197, 24, 77, 144, 145, 146, 147, 148, - 152, 181, 182, 183, 212, 213, 237, 252, 253, 226, - 227, 246, 261, 262, 215, 25, 26, 27, 28, 29, - 187, 217, 218, 107, 108, 109, 110, 111, 112, 113, - 190, 114, 161, 86, 87, 88, 214, 30 + 0, 2, 4, 7, 23, 36, 49, 195, 260, 40, + 67, 134, 68, 69, 139, 70, 233, 234, 71, 72, + 73, 199, 200, 24, 78, 146, 147, 148, 149, 150, + 154, 184, 185, 186, 215, 216, 240, 255, 256, 229, + 230, 249, 264, 265, 218, 25, 26, 27, 28, 29, + 190, 220, 221, 108, 109, 110, 111, 112, 113, 114, + 193, 115, 163, 87, 88, 89, 217, 30 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -945,155 +946,151 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 35, 78, 106, 74, 89, 153, 75, 191, 80, 81, - 37, 175, 20, 73, 20, 20, 63, 219, 250, 159, - 220, 1, 82, 83, 115, 116, 84, 85, 118, 47, - 74, 172, 259, 75, 211, 265, 260, 21, 266, 31, - 73, 117, 133, 149, 206, 3, 5, 32, 33, 34, - 164, 48, 166, 167, 150, 38, 6, 193, 194, 37, - 79, 106, 82, 83, 82, 83, 84, 85, 84, 85, - 229, 241, 233, 39, 268, 106, 188, 269, 154, 41, - 162, 163, 247, 115, 248, 76, 160, 106, 170, 171, - 165, 50, 42, 168, 169, 43, 44, 115, 138, 139, - 140, 45, 46, 79, 20, 119, 141, 120, 121, 115, - 106, 149, 122, 106, 106, 184, 123, 124, 185, 133, - 125, 126, 150, 127, 128, 129, 130, 131, 136, 134, - 143, 151, 115, 156, 154, 115, 115, 198, 255, 207, - 155, 157, 158, 173, 174, 184, 176, 179, 185, 186, - 178, 267, 200, 180, 222, -58, 195, 205, 199, 201, - 198, 202, -158, 203, 209, 225, 234, 47, 235, 37, - 238, 216, 236, 240, 243, 245, 228, 244, 133, 232, - 133, 199, 249, 256, 221, 263, 242, 135, 204, 224, - 270, 177, 254, 251, 106, 208, 258, 272, 239, 0, - 0, 0, 216, 0, 189, 0, 0, 0, 264, 0, - 0, 0, 0, 0, 0, 0, 115, 0, 0, 0, - 0, 254, 228, 0, 0, 0, 232, 271, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 0, 0, 0, 0, 64, 0, - 65, 0, 0, 21, 0, 0, 0, 20, 0, 0, - 0, 0, 0, 0, 0, 0, 21, 8, 9, 10, + 35, 79, 107, 75, 37, 194, 76, 178, 90, 74, + 47, 253, 155, 81, 82, 20, 64, 20, 262, 20, + 222, 1, 263, 223, 116, 117, 161, 214, 119, 268, + 5, 75, 269, 48, 76, 3, 20, 74, 39, 175, + 21, 118, 6, 135, 151, 51, 41, 52, 53, 54, + 55, 56, 57, 58, 37, 152, 209, 59, 60, 61, + 62, 63, 107, 31, 38, 196, 197, 232, 42, 236, + 244, 32, 33, 34, 83, 84, 107, 271, 85, 86, + 272, 140, 141, 142, 116, 164, 165, 43, 191, 107, + 156, 80, 162, 172, 173, 174, 167, 80, 116, 170, + 171, 83, 84, 83, 84, 85, 86, 85, 86, 44, + 45, 116, 107, 151, 46, 107, 107, 187, 77, 50, + 188, 135, 20, 250, 152, 251, 166, 120, 168, 169, + 121, 122, 123, 124, 116, 125, 126, 116, 116, 127, + 201, 128, 129, 130, 143, 131, 210, 258, 187, 132, + 133, 188, 136, 138, 145, 202, 153, 156, 157, 158, + 208, 225, 159, 201, 160, 176, 37, 177, 219, 179, + 181, 183, 189, 182, 206, -58, 198, 204, 202, 231, + 203, 135, 235, 135, 205, 212, 228, 237, -159, 47, + 238, 243, 270, 239, 241, 257, 246, 107, 247, 219, + 252, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 248, 267, 259, 224, 245, 116, + 137, 207, 180, 227, 257, 231, 266, 211, 261, 235, + 274, 65, 275, 66, 0, 242, 21, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 0, 22, 0, 51, 0, 52, 53, 54, 55, 56, - 57, 58, 0, 0, 22, 59, 60, 61, 62, 0, - 0, 0, 21, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 142, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 21, 20, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 0, 0, 0, 0, 0, 0, 0, 223, - 102, 0, 21, 103, 104, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 210, 0, 0, - 0, 0, 105, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 211, 0, 0, 0, 0, 0, 0, - 21, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 0, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 21 + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 254, 0, 22, 273, 0, 0, 0, + 0, 192, 21, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 21, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 0, + 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 144, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 21, 0, 20, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 0, 0, 0, 0, + 0, 0, 0, 226, 103, 0, 21, 104, 105, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 213, 0, 0, 0, 0, 0, 106, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 214, 0, 0, + 0, 0, 0, 0, 21, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 21 }; static const yytype_int16 yycheck[] = { - 22, 41, 46, 39, 45, 105, 39, 155, 42, 43, - 25, 141, 16, 39, 16, 16, 38, 62, 16, 119, - 65, 31, 21, 22, 46, 47, 25, 26, 50, 38, - 66, 131, 21, 66, 32, 62, 25, 39, 65, 43, - 66, 42, 64, 76, 3, 58, 0, 51, 52, 53, - 123, 60, 125, 126, 76, 67, 59, 157, 158, 74, - 17, 105, 21, 22, 21, 22, 25, 26, 25, 26, - 200, 219, 202, 33, 62, 119, 60, 65, 62, 61, - 121, 122, 60, 105, 62, 29, 120, 131, 129, 130, - 124, 67, 63, 127, 128, 63, 63, 119, 70, 71, - 72, 63, 63, 17, 16, 63, 35, 63, 63, 131, - 154, 144, 63, 157, 158, 151, 63, 63, 151, 141, - 63, 63, 144, 63, 63, 63, 63, 63, 61, 64, - 61, 30, 154, 59, 62, 157, 158, 173, 238, 180, - 64, 63, 63, 59, 21, 181, 66, 62, 181, 32, - 61, 60, 65, 63, 195, 63, 62, 179, 173, 59, - 196, 65, 67, 61, 61, 61, 61, 38, 62, 184, - 63, 186, 64, 61, 61, 64, 198, 62, 200, 201, - 202, 196, 63, 61, 192, 248, 221, 66, 179, 196, - 265, 144, 236, 235, 238, 181, 244, 268, 217, -1, - -1, -1, 217, -1, 154, -1, -1, -1, 249, -1, - -1, -1, -1, -1, -1, -1, 238, -1, -1, -1, - -1, 265, 244, -1, -1, -1, 248, 267, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, -1, -1, -1, -1, 34, -1, - 36, -1, -1, 39, -1, -1, -1, 16, -1, -1, - -1, -1, -1, -1, -1, -1, 39, 4, 5, 6, + 22, 41, 46, 39, 25, 157, 39, 143, 45, 39, + 38, 16, 106, 42, 43, 16, 38, 16, 21, 16, + 63, 31, 25, 66, 46, 47, 120, 32, 50, 63, + 0, 67, 66, 61, 67, 59, 16, 67, 33, 133, + 39, 42, 60, 65, 77, 42, 62, 44, 45, 46, + 47, 48, 49, 50, 75, 77, 3, 54, 55, 56, + 57, 58, 106, 43, 68, 159, 160, 203, 64, 205, + 222, 51, 52, 53, 21, 22, 120, 63, 25, 26, + 66, 71, 72, 73, 106, 122, 123, 64, 61, 133, + 63, 17, 121, 130, 131, 132, 125, 17, 120, 128, + 129, 21, 22, 21, 22, 25, 26, 25, 26, 64, + 64, 133, 156, 146, 64, 159, 160, 153, 29, 68, + 153, 143, 16, 61, 146, 63, 124, 64, 126, 127, + 64, 64, 64, 64, 156, 64, 64, 159, 160, 64, + 176, 64, 64, 64, 35, 64, 183, 241, 184, 64, + 64, 184, 65, 62, 62, 176, 30, 63, 65, 60, + 182, 198, 64, 199, 64, 60, 187, 21, 189, 67, + 62, 64, 32, 63, 62, 64, 63, 60, 199, 201, + 66, 203, 204, 205, 66, 62, 62, 62, 68, 38, + 63, 62, 61, 65, 64, 239, 62, 241, 63, 220, + 64, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 65, 252, 62, 195, 224, 241, + 67, 182, 146, 199, 268, 247, 251, 184, 247, 251, + 270, 34, 271, 36, -1, 220, 39, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, - -1, 67, -1, 42, -1, 44, 45, 46, 47, 48, - 49, 50, -1, -1, 67, 54, 55, 56, 57, -1, - -1, -1, 39, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 64, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 39, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, -1, -1, -1, -1, -1, -1, -1, 60, - 37, -1, 39, 40, 41, 4, 5, 6, 7, 8, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 238, -1, 68, 268, -1, -1, -1, + -1, 156, 39, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 39, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, -1, + -1, 68, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 65, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 39, -1, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, -1, -1, -1, -1, + -1, -1, -1, 61, 37, -1, 39, 40, 41, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, -1, -1, -1, -1, -1, 60, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 32, -1, -1, + -1, -1, -1, -1, 39, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, -1, -1, - -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 32, -1, -1, -1, -1, -1, -1, - 39, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, -1, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 39 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 39 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 31, 69, 58, 70, 0, 59, 71, 4, 5, + 0, 31, 70, 59, 71, 0, 60, 72, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 39, 67, 72, 91, 113, 114, 115, 116, 117, - 135, 43, 51, 52, 53, 135, 73, 114, 67, 33, - 77, 61, 63, 63, 63, 63, 63, 38, 60, 74, - 67, 42, 44, 45, 46, 47, 48, 49, 50, 54, - 55, 56, 57, 135, 34, 36, 78, 80, 81, 83, - 86, 87, 88, 91, 113, 116, 29, 92, 115, 17, - 132, 132, 21, 22, 25, 26, 131, 132, 133, 131, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 37, 40, 41, 59, 117, 121, 122, 123, - 124, 125, 126, 127, 129, 135, 135, 42, 135, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 79, 135, 64, 80, 61, 82, 82, 82, - 82, 35, 64, 61, 93, 94, 95, 96, 97, 116, - 135, 30, 98, 121, 62, 64, 59, 63, 63, 121, - 132, 130, 131, 131, 133, 132, 133, 133, 132, 132, - 131, 131, 121, 59, 21, 79, 66, 94, 61, 62, - 63, 99, 100, 101, 113, 116, 32, 118, 60, 124, - 128, 129, 75, 121, 121, 62, 89, 90, 113, 114, - 65, 59, 65, 61, 96, 135, 3, 131, 100, 61, - 16, 32, 102, 103, 134, 112, 114, 119, 120, 62, - 65, 72, 131, 60, 90, 61, 107, 108, 135, 79, - 84, 85, 135, 79, 61, 62, 64, 104, 63, 120, - 61, 129, 73, 61, 62, 64, 109, 60, 62, 63, - 16, 103, 105, 106, 117, 121, 61, 76, 108, 21, - 25, 110, 111, 85, 131, 62, 65, 60, 62, 65, - 106, 115, 111 + 16, 39, 68, 73, 92, 114, 115, 116, 117, 118, + 136, 43, 51, 52, 53, 136, 74, 115, 68, 33, + 78, 62, 64, 64, 64, 64, 64, 38, 61, 75, + 68, 42, 44, 45, 46, 47, 48, 49, 50, 54, + 55, 56, 57, 58, 136, 34, 36, 79, 81, 82, + 84, 87, 88, 89, 92, 114, 117, 29, 93, 116, + 17, 133, 133, 21, 22, 25, 26, 132, 133, 134, + 132, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 37, 40, 41, 60, 118, 122, 123, + 124, 125, 126, 127, 128, 130, 136, 136, 42, 136, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 80, 136, 65, 81, 62, 83, + 83, 83, 83, 35, 65, 62, 94, 95, 96, 97, + 98, 117, 136, 30, 99, 122, 63, 65, 60, 64, + 64, 122, 133, 131, 132, 132, 134, 133, 134, 134, + 133, 133, 132, 132, 132, 122, 60, 21, 80, 67, + 95, 62, 63, 64, 100, 101, 102, 114, 117, 32, + 119, 61, 125, 129, 130, 76, 122, 122, 63, 90, + 91, 114, 115, 66, 60, 66, 62, 97, 136, 3, + 132, 101, 62, 16, 32, 103, 104, 135, 113, 115, + 120, 121, 63, 66, 73, 132, 61, 91, 62, 108, + 109, 136, 80, 85, 86, 136, 80, 62, 63, 65, + 105, 64, 121, 62, 130, 74, 62, 63, 65, 110, + 61, 63, 64, 16, 104, 106, 107, 118, 122, 62, + 77, 109, 21, 25, 111, 112, 86, 132, 63, 66, + 61, 63, 66, 107, 116, 112 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_uint8 yyr1[] = { - 0, 68, 69, 70, 71, 72, 73, 73, 75, 76, - 74, 77, 77, 77, 78, 78, 79, 80, 80, 81, - 81, 81, 81, 82, 82, 83, 84, 84, 85, 86, - 87, 88, 89, 89, 90, 91, 91, 91, 91, 91, - 91, 91, 91, 91, 91, 91, 91, 92, 92, 92, - 93, 93, 94, 94, 95, 95, 96, 96, 97, 98, - 98, 98, 99, 99, 100, 100, 101, 102, 102, 103, - 104, 104, 105, 105, 106, 107, 107, 108, 109, 109, - 110, 110, 111, 111, 112, 113, 114, 114, 115, 115, - 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, - 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, - 117, 117, 118, 118, 118, 119, 119, 120, 121, 121, - 122, 123, 123, 124, 124, 125, 125, 125, 125, 125, - 125, 126, 127, 128, 128, 129, 129, 129, 129, 129, - 129, 129, 129, 129, 129, 129, 129, 130, 130, 131, - 131, 131, 131, 132, 133, 133, 134, 134, 135 + 0, 69, 70, 71, 72, 73, 74, 74, 76, 77, + 75, 78, 78, 78, 79, 79, 80, 81, 81, 82, + 82, 82, 82, 83, 83, 84, 85, 85, 86, 87, + 88, 89, 90, 90, 91, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 93, 93, 93, + 94, 94, 95, 95, 96, 96, 97, 97, 98, 99, + 99, 99, 100, 100, 101, 101, 102, 103, 103, 104, + 105, 105, 106, 106, 107, 108, 108, 109, 110, 110, + 111, 111, 112, 112, 113, 114, 115, 115, 116, 116, + 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, + 117, 118, 118, 119, 119, 119, 120, 120, 121, 122, + 122, 123, 124, 124, 125, 125, 126, 126, 126, 126, + 126, 126, 127, 128, 129, 129, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, 131, 131, + 132, 132, 132, 132, 133, 134, 134, 135, 135, 136 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -1109,12 +1106,12 @@ static const yytype_int8 yyr2[] = 0, 3, 1, 3, 1, 1, 3, 2, 0, 3, 1, 3, 1, 1, 1, 1, 1, 1, 0, 3, 4, 4, 4, 4, 6, 5, 5, 6, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, - 1, 1, 0, 1, 2, 2, 3, 3, 1, 1, - 0, 1, 3, 1, 3, 1, 1, 1, 1, 1, - 1, 1, 4, 1, 3, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1 + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 4, 1, 1, 0, 1, 2, 2, 3, 3, 1, + 1, 0, 1, 3, 1, 3, 1, 1, 1, 1, + 1, 1, 1, 4, 1, 3, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; @@ -1848,19 +1845,19 @@ yyreduce: switch (yyn) { case 2: /* ncdesc: NETCDF datasetid rootgroup */ -#line 245 "ncgen.y" +#line 246 "ncgen.y" {if (error_count > 0) YYABORT;} -#line 1854 "ncgeny.c" +#line 1851 "ncgeny.c" break; case 3: /* datasetid: DATASETID */ -#line 248 "ncgen.y" +#line 249 "ncgen.y" {createrootgroup(datasetname);} -#line 1860 "ncgeny.c" +#line 1857 "ncgeny.c" break; case 8: /* $@1: %empty */ -#line 267 "ncgen.y" +#line 268 "ncgen.y" { Symbol* id = (yyvsp[-1].sym); markcdf4("Group specification"); @@ -1868,29 +1865,29 @@ yyreduce: yyerror("duplicate group declaration within parent group for %s", id->name); } -#line 1872 "ncgeny.c" +#line 1869 "ncgeny.c" break; case 9: /* $@2: %empty */ -#line 276 "ncgen.y" +#line 277 "ncgen.y" {listpop(groupstack);} -#line 1878 "ncgeny.c" +#line 1875 "ncgeny.c" break; case 12: /* typesection: TYPES */ -#line 282 "ncgen.y" +#line 283 "ncgen.y" {} -#line 1884 "ncgeny.c" +#line 1881 "ncgeny.c" break; case 13: /* typesection: TYPES typedecls */ -#line 284 "ncgen.y" +#line 285 "ncgen.y" {markcdf4("Type specification");} -#line 1890 "ncgeny.c" +#line 1887 "ncgeny.c" break; case 16: /* typename: ident */ -#line 290 "ncgen.y" +#line 291 "ncgen.y" { /* Use when defining a type */ (yyvsp[0].sym)->objectclass = NC_TYPE; if(dupobjectcheck(NC_TYPE,(yyvsp[0].sym))) @@ -1898,23 +1895,23 @@ yyreduce: (yyvsp[0].sym)->name); listpush(typdefs,(void*)(yyvsp[0].sym)); } -#line 1902 "ncgeny.c" +#line 1899 "ncgeny.c" break; case 17: /* type_or_attr_decl: typedecl */ -#line 299 "ncgen.y" +#line 300 "ncgen.y" {} -#line 1908 "ncgeny.c" +#line 1905 "ncgeny.c" break; case 18: /* type_or_attr_decl: attrdecl ';' */ -#line 299 "ncgen.y" +#line 300 "ncgen.y" {} -#line 1914 "ncgeny.c" +#line 1911 "ncgeny.c" break; case 25: /* enumdecl: primtype ENUM typename '{' enumidlist '}' */ -#line 313 "ncgen.y" +#line 314 "ncgen.y" { int i; addtogroup((yyvsp[-3].sym)); /* sets prefix*/ @@ -1941,17 +1938,17 @@ yyreduce: } listsetlength(stack,stackbase);/* remove stack nodes*/ } -#line 1945 "ncgeny.c" +#line 1942 "ncgeny.c" break; case 26: /* enumidlist: enumid */ -#line 342 "ncgen.y" +#line 343 "ncgen.y" {(yyval.mark)=listlength(stack); listpush(stack,(void*)(yyvsp[0].sym));} -#line 1951 "ncgeny.c" +#line 1948 "ncgeny.c" break; case 27: /* enumidlist: enumidlist ',' enumid */ -#line 344 "ncgen.y" +#line 345 "ncgen.y" { int i; (yyval.mark)=(yyvsp[-2].mark); @@ -1966,22 +1963,22 @@ yyreduce: } listpush(stack,(void*)(yyvsp[0].sym)); } -#line 1970 "ncgeny.c" +#line 1967 "ncgeny.c" break; case 28: /* enumid: ident '=' constint */ -#line 361 "ncgen.y" +#line 362 "ncgen.y" { (yyvsp[-2].sym)->objectclass=NC_TYPE; (yyvsp[-2].sym)->subclass=NC_ECONST; (yyvsp[-2].sym)->typ.econst=(yyvsp[0].constant); (yyval.sym)=(yyvsp[-2].sym); } -#line 1981 "ncgeny.c" +#line 1978 "ncgeny.c" break; case 29: /* opaquedecl: OPAQUE_ '(' INT_CONST ')' typename */ -#line 370 "ncgen.y" +#line 371 "ncgen.y" { vercheck(NC_OPAQUE); addtogroup((yyvsp[0].sym)); /*sets prefix*/ @@ -1991,11 +1988,11 @@ yyreduce: (yyvsp[0].sym)->typ.size=int32_val; (void)ncaux_class_alignment(NC_OPAQUE,&(yyvsp[0].sym)->typ.alignment); } -#line 1995 "ncgeny.c" +#line 1992 "ncgeny.c" break; case 30: /* vlendecl: typeref '(' '*' ')' typename */ -#line 382 "ncgen.y" +#line 383 "ncgen.y" { Symbol* basetype = (yyvsp[-4].sym); vercheck(NC_VLEN); @@ -2007,11 +2004,11 @@ yyreduce: (yyvsp[0].sym)->typ.size=VLENSIZE; (void)ncaux_class_alignment(NC_VLEN,&(yyvsp[0].sym)->typ.alignment); } -#line 2011 "ncgeny.c" +#line 2008 "ncgeny.c" break; case 31: /* compounddecl: COMPOUND typename '{' fields '}' */ -#line 396 "ncgen.y" +#line 397 "ncgen.y" { int i,j; vercheck(NC_COMPOUND); @@ -2041,23 +2038,23 @@ yyreduce: } listsetlength(stack,stackbase);/* remove stack nodes*/ } -#line 2045 "ncgeny.c" +#line 2042 "ncgeny.c" break; case 32: /* fields: field ';' */ -#line 428 "ncgen.y" +#line 429 "ncgen.y" {(yyval.mark)=(yyvsp[-1].mark);} -#line 2051 "ncgeny.c" +#line 2048 "ncgeny.c" break; case 33: /* fields: fields field ';' */ -#line 429 "ncgen.y" +#line 430 "ncgen.y" {(yyval.mark)=(yyvsp[-2].mark);} -#line 2057 "ncgeny.c" +#line 2054 "ncgeny.c" break; case 34: /* field: typeref fieldlist */ -#line 433 "ncgen.y" +#line 434 "ncgen.y" { int i; (yyval.mark)=(yyvsp[0].mark); @@ -2069,107 +2066,107 @@ yyreduce: f->typ.basetype = (yyvsp[-1].sym); } } -#line 2073 "ncgeny.c" +#line 2070 "ncgeny.c" break; case 35: /* primtype: CHAR_K */ -#line 446 "ncgen.y" +#line 447 "ncgen.y" { (yyval.sym) = primsymbols[NC_CHAR]; } -#line 2079 "ncgeny.c" +#line 2076 "ncgeny.c" break; case 36: /* primtype: BYTE_K */ -#line 447 "ncgen.y" +#line 448 "ncgen.y" { (yyval.sym) = primsymbols[NC_BYTE]; } -#line 2085 "ncgeny.c" +#line 2082 "ncgeny.c" break; case 37: /* primtype: SHORT_K */ -#line 448 "ncgen.y" +#line 449 "ncgen.y" { (yyval.sym) = primsymbols[NC_SHORT]; } -#line 2091 "ncgeny.c" +#line 2088 "ncgeny.c" break; case 38: /* primtype: INT_K */ -#line 449 "ncgen.y" +#line 450 "ncgen.y" { (yyval.sym) = primsymbols[NC_INT]; } -#line 2097 "ncgeny.c" +#line 2094 "ncgeny.c" break; case 39: /* primtype: FLOAT_K */ -#line 450 "ncgen.y" +#line 451 "ncgen.y" { (yyval.sym) = primsymbols[NC_FLOAT]; } -#line 2103 "ncgeny.c" +#line 2100 "ncgeny.c" break; case 40: /* primtype: DOUBLE_K */ -#line 451 "ncgen.y" +#line 452 "ncgen.y" { (yyval.sym) = primsymbols[NC_DOUBLE]; } -#line 2109 "ncgeny.c" +#line 2106 "ncgeny.c" break; case 41: /* primtype: UBYTE_K */ -#line 452 "ncgen.y" +#line 453 "ncgen.y" { vercheck(NC_UBYTE); (yyval.sym) = primsymbols[NC_UBYTE]; } -#line 2115 "ncgeny.c" +#line 2112 "ncgeny.c" break; case 42: /* primtype: USHORT_K */ -#line 453 "ncgen.y" +#line 454 "ncgen.y" { vercheck(NC_USHORT); (yyval.sym) = primsymbols[NC_USHORT]; } -#line 2121 "ncgeny.c" +#line 2118 "ncgeny.c" break; case 43: /* primtype: UINT_K */ -#line 454 "ncgen.y" +#line 455 "ncgen.y" { vercheck(NC_UINT); (yyval.sym) = primsymbols[NC_UINT]; } -#line 2127 "ncgeny.c" +#line 2124 "ncgeny.c" break; case 44: /* primtype: INT64_K */ -#line 455 "ncgen.y" +#line 456 "ncgen.y" { vercheck(NC_INT64); (yyval.sym) = primsymbols[NC_INT64]; } -#line 2133 "ncgeny.c" +#line 2130 "ncgeny.c" break; case 45: /* primtype: UINT64_K */ -#line 456 "ncgen.y" +#line 457 "ncgen.y" { vercheck(NC_UINT64); (yyval.sym) = primsymbols[NC_UINT64]; } -#line 2139 "ncgeny.c" +#line 2136 "ncgeny.c" break; case 46: /* primtype: STRING_K */ -#line 457 "ncgen.y" +#line 458 "ncgen.y" { vercheck(NC_STRING); (yyval.sym) = primsymbols[NC_STRING]; } -#line 2145 "ncgeny.c" +#line 2142 "ncgeny.c" break; case 48: /* dimsection: DIMENSIONS */ -#line 461 "ncgen.y" +#line 462 "ncgen.y" {} -#line 2151 "ncgeny.c" +#line 2148 "ncgeny.c" break; case 49: /* dimsection: DIMENSIONS dimdecls */ -#line 462 "ncgen.y" +#line 463 "ncgen.y" {} -#line 2157 "ncgeny.c" +#line 2154 "ncgeny.c" break; case 52: /* dim_or_attr_decl: dimdeclist */ -#line 469 "ncgen.y" +#line 470 "ncgen.y" {} -#line 2163 "ncgeny.c" +#line 2160 "ncgeny.c" break; case 53: /* dim_or_attr_decl: attrdecl */ -#line 469 "ncgen.y" +#line 470 "ncgen.y" {} -#line 2169 "ncgeny.c" +#line 2166 "ncgeny.c" break; case 56: /* dimdecl: dimd '=' constint */ -#line 477 "ncgen.y" +#line 478 "ncgen.y" { (yyvsp[-2].sym)->dim.declsize = (size_t)extractint((yyvsp[0].constant)); #ifdef GENDEBUG1 @@ -2177,11 +2174,11 @@ fprintf(stderr,"dimension: %s = %llu\n",(yyvsp[-2].sym)->name,(unsigned long lon #endif reclaimconstant((yyvsp[0].constant)); } -#line 2181 "ncgeny.c" +#line 2178 "ncgeny.c" break; case 57: /* dimdecl: dimd '=' NC_UNLIMITED_K */ -#line 485 "ncgen.y" +#line 486 "ncgen.y" { (yyvsp[-2].sym)->dim.declsize = NC_UNLIMITED; (yyvsp[-2].sym)->dim.isunlimited = 1; @@ -2189,11 +2186,11 @@ fprintf(stderr,"dimension: %s = %llu\n",(yyvsp[-2].sym)->name,(unsigned long lon fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); #endif } -#line 2193 "ncgeny.c" +#line 2190 "ncgeny.c" break; case 58: /* dimd: ident */ -#line 495 "ncgen.y" +#line 496 "ncgen.y" { (yyvsp[0].sym)->objectclass=NC_DIM; if(dupobjectcheck(NC_DIM,(yyvsp[0].sym))) @@ -2203,35 +2200,35 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); (yyval.sym)=(yyvsp[0].sym); listpush(dimdefs,(void*)(yyvsp[0].sym)); } -#line 2207 "ncgeny.c" +#line 2204 "ncgeny.c" break; case 60: /* vasection: VARIABLES */ -#line 507 "ncgen.y" +#line 508 "ncgen.y" {} -#line 2213 "ncgeny.c" +#line 2210 "ncgeny.c" break; case 61: /* vasection: VARIABLES vadecls */ -#line 508 "ncgen.y" +#line 509 "ncgen.y" {} -#line 2219 "ncgeny.c" +#line 2216 "ncgeny.c" break; case 64: /* vadecl_or_attr: vardecl */ -#line 515 "ncgen.y" +#line 516 "ncgen.y" {} -#line 2225 "ncgeny.c" +#line 2222 "ncgeny.c" break; case 65: /* vadecl_or_attr: attrdecl */ -#line 515 "ncgen.y" +#line 516 "ncgen.y" {} -#line 2231 "ncgeny.c" +#line 2228 "ncgeny.c" break; case 66: /* vardecl: typeref varlist */ -#line 518 "ncgen.y" +#line 519 "ncgen.y" { int i; stackbase=(yyvsp[0].mark); @@ -2251,25 +2248,25 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); } listsetlength(stack,stackbase);/* remove stack nodes*/ } -#line 2255 "ncgeny.c" +#line 2252 "ncgeny.c" break; case 67: /* varlist: varspec */ -#line 540 "ncgen.y" +#line 541 "ncgen.y" {(yyval.mark)=listlength(stack); listpush(stack,(void*)(yyvsp[0].sym)); } -#line 2263 "ncgeny.c" +#line 2260 "ncgeny.c" break; case 68: /* varlist: varlist ',' varspec */ -#line 544 "ncgen.y" +#line 545 "ncgen.y" {(yyval.mark)=(yyvsp[-2].mark); listpush(stack,(void*)(yyvsp[0].sym));} -#line 2269 "ncgeny.c" +#line 2266 "ncgeny.c" break; case 69: /* varspec: varident dimspec */ -#line 548 "ncgen.y" +#line 549 "ncgen.y" { int i; Dimset dimset; @@ -2296,35 +2293,35 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); listsetlength(stack,stackbase);/* remove stack nodes*/ (yyval.sym) = var; } -#line 2300 "ncgeny.c" +#line 2297 "ncgeny.c" break; case 70: /* dimspec: %empty */ -#line 576 "ncgen.y" +#line 577 "ncgen.y" {(yyval.mark)=listlength(stack);} -#line 2306 "ncgeny.c" +#line 2303 "ncgeny.c" break; case 71: /* dimspec: '(' dimlist ')' */ -#line 577 "ncgen.y" +#line 578 "ncgen.y" {(yyval.mark)=(yyvsp[-1].mark);} -#line 2312 "ncgeny.c" +#line 2309 "ncgeny.c" break; case 72: /* dimlist: dimref */ -#line 580 "ncgen.y" +#line 581 "ncgen.y" {(yyval.mark)=listlength(stack); listpush(stack,(void*)(yyvsp[0].sym));} -#line 2318 "ncgeny.c" +#line 2315 "ncgeny.c" break; case 73: /* dimlist: dimlist ',' dimref */ -#line 582 "ncgen.y" +#line 583 "ncgen.y" {(yyval.mark)=(yyvsp[-2].mark); listpush(stack,(void*)(yyvsp[0].sym));} -#line 2324 "ncgeny.c" +#line 2321 "ncgeny.c" break; case 74: /* dimref: path */ -#line 586 "ncgen.y" +#line 587 "ncgen.y" {Symbol* dimsym = (yyvsp[0].sym); dimsym->objectclass = NC_DIM; /* Find the actual dimension*/ @@ -2335,25 +2332,25 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); } (yyval.sym)=dimsym; } -#line 2339 "ncgeny.c" +#line 2336 "ncgeny.c" break; case 75: /* fieldlist: fieldspec */ -#line 600 "ncgen.y" +#line 601 "ncgen.y" {(yyval.mark)=listlength(stack); listpush(stack,(void*)(yyvsp[0].sym)); } -#line 2347 "ncgeny.c" +#line 2344 "ncgeny.c" break; case 76: /* fieldlist: fieldlist ',' fieldspec */ -#line 604 "ncgen.y" +#line 605 "ncgen.y" {(yyval.mark)=(yyvsp[-2].mark); listpush(stack,(void*)(yyvsp[0].sym));} -#line 2353 "ncgeny.c" +#line 2350 "ncgeny.c" break; case 77: /* fieldspec: ident fielddimspec */ -#line 609 "ncgen.y" +#line 610 "ncgen.y" { int i; Dimset dimset; @@ -2380,35 +2377,35 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); listsetlength(stack,stackbase);/* remove stack nodes*/ (yyval.sym) = (yyvsp[-1].sym); } -#line 2384 "ncgeny.c" +#line 2381 "ncgeny.c" break; case 78: /* fielddimspec: %empty */ -#line 637 "ncgen.y" +#line 638 "ncgen.y" {(yyval.mark)=listlength(stack);} -#line 2390 "ncgeny.c" +#line 2387 "ncgeny.c" break; case 79: /* fielddimspec: '(' fielddimlist ')' */ -#line 638 "ncgen.y" +#line 639 "ncgen.y" {(yyval.mark)=(yyvsp[-1].mark);} -#line 2396 "ncgeny.c" +#line 2393 "ncgeny.c" break; case 80: /* fielddimlist: fielddim */ -#line 642 "ncgen.y" +#line 643 "ncgen.y" {(yyval.mark)=listlength(stack); listpush(stack,(void*)(yyvsp[0].sym));} -#line 2402 "ncgeny.c" +#line 2399 "ncgeny.c" break; case 81: /* fielddimlist: fielddimlist ',' fielddim */ -#line 644 "ncgen.y" +#line 645 "ncgen.y" {(yyval.mark)=(yyvsp[-2].mark); listpush(stack,(void*)(yyvsp[0].sym));} -#line 2408 "ncgeny.c" +#line 2405 "ncgeny.c" break; case 82: /* fielddim: UINT_CONST */ -#line 649 "ncgen.y" +#line 650 "ncgen.y" { /* Anonymous integer dimension. Can only occur in type definitions*/ char anon[32]; @@ -2418,11 +2415,11 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); (yyval.sym)->dim.isconstant = 1; (yyval.sym)->dim.declsize = uint32_val; } -#line 2422 "ncgeny.c" +#line 2419 "ncgeny.c" break; case 83: /* fielddim: INT_CONST */ -#line 659 "ncgen.y" +#line 660 "ncgen.y" { /* Anonymous integer dimension. Can only occur in type definitions*/ char anon[32]; @@ -2436,11 +2433,11 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); (yyval.sym)->dim.isconstant = 1; (yyval.sym)->dim.declsize = int32_val; } -#line 2440 "ncgeny.c" +#line 2437 "ncgeny.c" break; case 84: /* varref: ambiguous_ref */ -#line 679 "ncgen.y" +#line 680 "ncgen.y" {Symbol* vsym = (yyvsp[0].sym); if(vsym->objectclass != NC_VAR) { derror("Undefined or forward referenced variable: %s",vsym->name); @@ -2448,11 +2445,11 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); } (yyval.sym)=vsym; } -#line 2452 "ncgeny.c" +#line 2449 "ncgeny.c" break; case 85: /* typeref: ambiguous_ref */ -#line 690 "ncgen.y" +#line 691 "ncgen.y" {Symbol* tsym = (yyvsp[0].sym); if(tsym->objectclass != NC_TYPE) { derror("Undefined or forward referenced type: %s",tsym->name); @@ -2460,11 +2457,11 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); } (yyval.sym)=tsym; } -#line 2464 "ncgeny.c" +#line 2461 "ncgeny.c" break; case 86: /* ambiguous_ref: path */ -#line 701 "ncgen.y" +#line 702 "ncgen.y" {Symbol* tvsym = (yyvsp[0].sym); Symbol* sym; /* disambiguate*/ tvsym->objectclass = NC_VAR; @@ -2483,53 +2480,53 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); } (yyval.sym)=tvsym; } -#line 2487 "ncgeny.c" +#line 2484 "ncgeny.c" break; case 87: /* ambiguous_ref: primtype */ -#line 719 "ncgen.y" +#line 720 "ncgen.y" {(yyval.sym)=(yyvsp[0].sym);} -#line 2493 "ncgeny.c" +#line 2490 "ncgeny.c" break; case 88: /* attrdecllist: %empty */ -#line 726 "ncgen.y" +#line 727 "ncgen.y" {} -#line 2499 "ncgeny.c" +#line 2496 "ncgeny.c" break; case 89: /* attrdecllist: attrdecl ';' attrdecllist */ -#line 726 "ncgen.y" +#line 727 "ncgen.y" {} -#line 2505 "ncgeny.c" +#line 2502 "ncgeny.c" break; case 90: /* attrdecl: ':' _NCPROPS '=' conststring */ -#line 730 "ncgen.y" +#line 731 "ncgen.y" {(yyval.sym) = makespecial(_NCPROPS_FLAG,NULL,NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2511 "ncgeny.c" +#line 2508 "ncgeny.c" break; case 91: /* attrdecl: ':' _ISNETCDF4 '=' constbool */ -#line 732 "ncgen.y" +#line 733 "ncgen.y" {(yyval.sym) = makespecial(_ISNETCDF4_FLAG,NULL,NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2517 "ncgeny.c" +#line 2514 "ncgeny.c" break; case 92: /* attrdecl: ':' _SUPERBLOCK '=' constint */ -#line 734 "ncgen.y" +#line 735 "ncgen.y" {(yyval.sym) = makespecial(_SUPERBLOCK_FLAG,NULL,NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2523 "ncgeny.c" +#line 2520 "ncgeny.c" break; case 93: /* attrdecl: ':' ident '=' datalist */ -#line 736 "ncgen.y" +#line 737 "ncgen.y" { (yyval.sym)=makeattribute((yyvsp[-2].sym),NULL,NULL,(yyvsp[0].datalist),ATTRGLOBAL);} -#line 2529 "ncgeny.c" +#line 2526 "ncgeny.c" break; case 94: /* attrdecl: typeref ambiguous_ref ':' ident '=' datalist */ -#line 738 "ncgen.y" +#line 739 "ncgen.y" {Symbol* tsym = (yyvsp[-5].sym); Symbol* vsym = (yyvsp[-4].sym); Symbol* asym = (yyvsp[-2].sym); if(vsym->objectclass == NC_VAR) { (yyval.sym)=makeattribute(asym,vsym,tsym,(yyvsp[0].datalist),ATTRVAR); @@ -2538,11 +2535,11 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); YYABORT; } } -#line 2542 "ncgeny.c" +#line 2539 "ncgeny.c" break; case 95: /* attrdecl: ambiguous_ref ':' ident '=' datalist */ -#line 747 "ncgen.y" +#line 748 "ncgen.y" {Symbol* sym = (yyvsp[-4].sym); Symbol* asym = (yyvsp[-2].sym); if(sym->objectclass == NC_VAR) { (yyval.sym)=makeattribute(asym,sym,NULL,(yyvsp[0].datalist),ATTRVAR); @@ -2553,375 +2550,381 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); YYABORT; } } -#line 2557 "ncgeny.c" +#line 2554 "ncgeny.c" break; case 96: /* attrdecl: ambiguous_ref ':' _FILLVALUE '=' datalist */ -#line 758 "ncgen.y" +#line 759 "ncgen.y" {(yyval.sym) = makespecial(_FILLVALUE_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].datalist),ISLIST);} -#line 2563 "ncgeny.c" +#line 2560 "ncgeny.c" break; case 97: /* attrdecl: typeref ambiguous_ref ':' _FILLVALUE '=' datalist */ -#line 760 "ncgen.y" +#line 761 "ncgen.y" {(yyval.sym) = makespecial(_FILLVALUE_FLAG,(yyvsp[-4].sym),(yyvsp[-5].sym),(void*)(yyvsp[0].datalist),ISLIST);} -#line 2569 "ncgeny.c" +#line 2566 "ncgeny.c" break; case 98: /* attrdecl: ambiguous_ref ':' _STORAGE '=' conststring */ -#line 762 "ncgen.y" +#line 763 "ncgen.y" {(yyval.sym) = makespecial(_STORAGE_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2575 "ncgeny.c" +#line 2572 "ncgeny.c" break; case 99: /* attrdecl: ambiguous_ref ':' _CHUNKSIZES '=' intlist */ -#line 764 "ncgen.y" +#line 765 "ncgen.y" {(yyval.sym) = makespecial(_CHUNKSIZES_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].datalist),ISLIST);} -#line 2581 "ncgeny.c" +#line 2578 "ncgeny.c" break; case 100: /* attrdecl: ambiguous_ref ':' _FLETCHER32 '=' constbool */ -#line 766 "ncgen.y" +#line 767 "ncgen.y" {(yyval.sym) = makespecial(_FLETCHER32_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2587 "ncgeny.c" +#line 2584 "ncgeny.c" break; case 101: /* attrdecl: ambiguous_ref ':' _DEFLATELEVEL '=' constint */ -#line 768 "ncgen.y" +#line 769 "ncgen.y" {(yyval.sym) = makespecial(_DEFLATE_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2593 "ncgeny.c" +#line 2590 "ncgeny.c" break; case 102: /* attrdecl: ambiguous_ref ':' _SHUFFLE '=' constbool */ -#line 770 "ncgen.y" +#line 771 "ncgen.y" {(yyval.sym) = makespecial(_SHUFFLE_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2599 "ncgeny.c" +#line 2596 "ncgeny.c" break; case 103: /* attrdecl: ambiguous_ref ':' _ENDIANNESS '=' conststring */ -#line 772 "ncgen.y" +#line 773 "ncgen.y" {(yyval.sym) = makespecial(_ENDIAN_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2605 "ncgeny.c" +#line 2602 "ncgeny.c" break; case 104: /* attrdecl: ambiguous_ref ':' _FILTER '=' conststring */ -#line 774 "ncgen.y" +#line 775 "ncgen.y" {(yyval.sym) = makespecial(_FILTER_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2611 "ncgeny.c" +#line 2608 "ncgeny.c" break; case 105: /* attrdecl: ambiguous_ref ':' _CODECS '=' conststring */ -#line 776 "ncgen.y" +#line 777 "ncgen.y" {(yyval.sym) = makespecial(_CODECS_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2617 "ncgeny.c" +#line 2614 "ncgeny.c" break; case 106: /* attrdecl: ambiguous_ref ':' _QUANTIZEBG '=' constint */ -#line 778 "ncgen.y" +#line 779 "ncgen.y" {(yyval.sym) = makespecial(_QUANTIZEBG_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2623 "ncgeny.c" +#line 2620 "ncgeny.c" break; case 107: /* attrdecl: ambiguous_ref ':' _QUANTIZEGBR '=' constint */ -#line 780 "ncgen.y" +#line 781 "ncgen.y" {(yyval.sym) = makespecial(_QUANTIZEGBR_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2629 "ncgeny.c" +#line 2626 "ncgeny.c" break; - case 108: /* attrdecl: ambiguous_ref ':' _NOFILL '=' constbool */ -#line 782 "ncgen.y" + case 108: /* attrdecl: ambiguous_ref ':' _QUANTIZEBR '=' constint */ +#line 783 "ncgen.y" + {(yyval.sym) = makespecial(_QUANTIZEBR_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} +#line 2632 "ncgeny.c" + break; + + case 109: /* attrdecl: ambiguous_ref ':' _NOFILL '=' constbool */ +#line 785 "ncgen.y" {(yyval.sym) = makespecial(_NOFILL_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2635 "ncgeny.c" +#line 2638 "ncgeny.c" break; - case 109: /* attrdecl: ':' _FORMAT '=' conststring */ -#line 784 "ncgen.y" + case 110: /* attrdecl: ':' _FORMAT '=' conststring */ +#line 787 "ncgen.y" {(yyval.sym) = makespecial(_FORMAT_FLAG,NULL,NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2641 "ncgeny.c" +#line 2644 "ncgeny.c" break; - case 110: /* path: ident */ -#line 789 "ncgen.y" + case 111: /* path: ident */ +#line 792 "ncgen.y" { (yyval.sym)=(yyvsp[0].sym); (yyvsp[0].sym)->ref.is_ref=1; (yyvsp[0].sym)->is_prefixed=0; setpathcurrent((yyvsp[0].sym)); } -#line 2652 "ncgeny.c" +#line 2655 "ncgeny.c" break; - case 111: /* path: PATH */ -#line 796 "ncgen.y" + case 112: /* path: PATH */ +#line 799 "ncgen.y" { (yyval.sym)=(yyvsp[0].sym); (yyvsp[0].sym)->ref.is_ref=1; (yyvsp[0].sym)->is_prefixed=1; /* path is set in ncgen.l*/ } -#line 2663 "ncgeny.c" +#line 2666 "ncgeny.c" break; - case 113: /* datasection: DATA */ -#line 805 "ncgen.y" + case 114: /* datasection: DATA */ +#line 808 "ncgen.y" {} -#line 2669 "ncgeny.c" +#line 2672 "ncgeny.c" break; - case 114: /* datasection: DATA datadecls */ -#line 806 "ncgen.y" + case 115: /* datasection: DATA datadecls */ +#line 809 "ncgen.y" {} -#line 2675 "ncgeny.c" +#line 2678 "ncgeny.c" break; - case 117: /* datadecl: varref '=' datalist */ -#line 814 "ncgen.y" - {(yyvsp[-2].sym)->data = (yyvsp[0].datalist);} -#line 2681 "ncgeny.c" - break; - - case 118: /* datalist: datalist0 */ + case 118: /* datadecl: varref '=' datalist */ #line 817 "ncgen.y" - {(yyval.datalist) = (yyvsp[0].datalist);} -#line 2687 "ncgeny.c" + {(yyvsp[-2].sym)->data = (yyvsp[0].datalist);} +#line 2684 "ncgeny.c" break; - case 119: /* datalist: datalist1 */ -#line 818 "ncgen.y" + case 119: /* datalist: datalist0 */ +#line 820 "ncgen.y" {(yyval.datalist) = (yyvsp[0].datalist);} -#line 2693 "ncgeny.c" +#line 2690 "ncgeny.c" break; - case 120: /* datalist0: %empty */ -#line 822 "ncgen.y" + case 120: /* datalist: datalist1 */ +#line 821 "ncgen.y" + {(yyval.datalist) = (yyvsp[0].datalist);} +#line 2696 "ncgeny.c" + break; + + case 121: /* datalist0: %empty */ +#line 825 "ncgen.y" {(yyval.datalist) = builddatalist(0);} -#line 2699 "ncgeny.c" +#line 2702 "ncgeny.c" break; - case 121: /* datalist1: dataitem */ -#line 826 "ncgen.y" + case 122: /* datalist1: dataitem */ +#line 829 "ncgen.y" {(yyval.datalist) = const2list((yyvsp[0].constant));} -#line 2705 "ncgeny.c" +#line 2708 "ncgeny.c" break; - case 122: /* datalist1: datalist ',' dataitem */ -#line 828 "ncgen.y" + case 123: /* datalist1: datalist ',' dataitem */ +#line 831 "ncgen.y" {dlappend((yyvsp[-2].datalist),((yyvsp[0].constant))); (yyval.datalist)=(yyvsp[-2].datalist); } -#line 2711 "ncgeny.c" +#line 2714 "ncgeny.c" break; - case 123: /* dataitem: constdata */ -#line 832 "ncgen.y" + case 124: /* dataitem: constdata */ +#line 835 "ncgen.y" {(yyval.constant)=(yyvsp[0].constant);} -#line 2717 "ncgeny.c" +#line 2720 "ncgeny.c" break; - case 124: /* dataitem: '{' datalist '}' */ -#line 833 "ncgen.y" + case 125: /* dataitem: '{' datalist '}' */ +#line 836 "ncgen.y" {(yyval.constant)=builddatasublist((yyvsp[-1].datalist));} -#line 2723 "ncgeny.c" +#line 2726 "ncgeny.c" break; - case 125: /* constdata: simpleconstant */ -#line 837 "ncgen.y" - {(yyval.constant)=(yyvsp[0].constant);} -#line 2729 "ncgeny.c" - break; - - case 126: /* constdata: OPAQUESTRING */ -#line 838 "ncgen.y" - {(yyval.constant)=makeconstdata(NC_OPAQUE);} -#line 2735 "ncgeny.c" - break; - - case 127: /* constdata: FILLMARKER */ -#line 839 "ncgen.y" - {(yyval.constant)=makeconstdata(NC_FILLVALUE);} -#line 2741 "ncgeny.c" - break; - - case 128: /* constdata: NIL */ + case 126: /* constdata: simpleconstant */ #line 840 "ncgen.y" - {(yyval.constant)=makeconstdata(NC_NIL);} -#line 2747 "ncgeny.c" + {(yyval.constant)=(yyvsp[0].constant);} +#line 2732 "ncgeny.c" break; - case 129: /* constdata: econstref */ + case 127: /* constdata: OPAQUESTRING */ #line 841 "ncgen.y" + {(yyval.constant)=makeconstdata(NC_OPAQUE);} +#line 2738 "ncgeny.c" + break; + + case 128: /* constdata: FILLMARKER */ +#line 842 "ncgen.y" + {(yyval.constant)=makeconstdata(NC_FILLVALUE);} +#line 2744 "ncgeny.c" + break; + + case 129: /* constdata: NIL */ +#line 843 "ncgen.y" + {(yyval.constant)=makeconstdata(NC_NIL);} +#line 2750 "ncgeny.c" + break; + + case 130: /* constdata: econstref */ +#line 844 "ncgen.y" {(yyval.constant)=(yyvsp[0].constant);} -#line 2753 "ncgeny.c" +#line 2756 "ncgeny.c" break; - case 131: /* econstref: path */ -#line 846 "ncgen.y" + case 132: /* econstref: path */ +#line 849 "ncgen.y" {(yyval.constant) = makeenumconstref((yyvsp[0].sym));} -#line 2759 "ncgeny.c" +#line 2762 "ncgeny.c" break; - case 132: /* function: ident '(' arglist ')' */ -#line 850 "ncgen.y" + case 133: /* function: ident '(' arglist ')' */ +#line 853 "ncgen.y" {(yyval.constant)=evaluate((yyvsp[-3].sym),(yyvsp[-1].datalist));} -#line 2765 "ncgeny.c" +#line 2768 "ncgeny.c" break; - case 133: /* arglist: simpleconstant */ -#line 855 "ncgen.y" + case 134: /* arglist: simpleconstant */ +#line 858 "ncgen.y" {(yyval.datalist) = const2list((yyvsp[0].constant));} -#line 2771 "ncgeny.c" +#line 2774 "ncgeny.c" break; - case 134: /* arglist: arglist ',' simpleconstant */ -#line 857 "ncgen.y" + case 135: /* arglist: arglist ',' simpleconstant */ +#line 860 "ncgen.y" {dlappend((yyvsp[-2].datalist),((yyvsp[0].constant))); (yyval.datalist)=(yyvsp[-2].datalist);} -#line 2777 "ncgeny.c" +#line 2780 "ncgeny.c" break; - case 135: /* simpleconstant: CHAR_CONST */ -#line 861 "ncgen.y" - {(yyval.constant)=makeconstdata(NC_CHAR);} -#line 2783 "ncgeny.c" - break; - - case 136: /* simpleconstant: BYTE_CONST */ -#line 862 "ncgen.y" - {(yyval.constant)=makeconstdata(NC_BYTE);} -#line 2789 "ncgeny.c" - break; - - case 137: /* simpleconstant: SHORT_CONST */ -#line 863 "ncgen.y" - {(yyval.constant)=makeconstdata(NC_SHORT);} -#line 2795 "ncgeny.c" - break; - - case 138: /* simpleconstant: INT_CONST */ + case 136: /* simpleconstant: CHAR_CONST */ #line 864 "ncgen.y" - {(yyval.constant)=makeconstdata(NC_INT);} -#line 2801 "ncgeny.c" + {(yyval.constant)=makeconstdata(NC_CHAR);} +#line 2786 "ncgeny.c" break; - case 139: /* simpleconstant: INT64_CONST */ + case 137: /* simpleconstant: BYTE_CONST */ #line 865 "ncgen.y" - {(yyval.constant)=makeconstdata(NC_INT64);} -#line 2807 "ncgeny.c" + {(yyval.constant)=makeconstdata(NC_BYTE);} +#line 2792 "ncgeny.c" break; - case 140: /* simpleconstant: UBYTE_CONST */ + case 138: /* simpleconstant: SHORT_CONST */ #line 866 "ncgen.y" - {(yyval.constant)=makeconstdata(NC_UBYTE);} -#line 2813 "ncgeny.c" + {(yyval.constant)=makeconstdata(NC_SHORT);} +#line 2798 "ncgeny.c" break; - case 141: /* simpleconstant: USHORT_CONST */ + case 139: /* simpleconstant: INT_CONST */ #line 867 "ncgen.y" - {(yyval.constant)=makeconstdata(NC_USHORT);} -#line 2819 "ncgeny.c" + {(yyval.constant)=makeconstdata(NC_INT);} +#line 2804 "ncgeny.c" break; - case 142: /* simpleconstant: UINT_CONST */ + case 140: /* simpleconstant: INT64_CONST */ #line 868 "ncgen.y" - {(yyval.constant)=makeconstdata(NC_UINT);} -#line 2825 "ncgeny.c" + {(yyval.constant)=makeconstdata(NC_INT64);} +#line 2810 "ncgeny.c" break; - case 143: /* simpleconstant: UINT64_CONST */ + case 141: /* simpleconstant: UBYTE_CONST */ #line 869 "ncgen.y" - {(yyval.constant)=makeconstdata(NC_UINT64);} -#line 2831 "ncgeny.c" + {(yyval.constant)=makeconstdata(NC_UBYTE);} +#line 2816 "ncgeny.c" break; - case 144: /* simpleconstant: FLOAT_CONST */ + case 142: /* simpleconstant: USHORT_CONST */ #line 870 "ncgen.y" - {(yyval.constant)=makeconstdata(NC_FLOAT);} -#line 2837 "ncgeny.c" + {(yyval.constant)=makeconstdata(NC_USHORT);} +#line 2822 "ncgeny.c" break; - case 145: /* simpleconstant: DOUBLE_CONST */ + case 143: /* simpleconstant: UINT_CONST */ #line 871 "ncgen.y" - {(yyval.constant)=makeconstdata(NC_DOUBLE);} -#line 2843 "ncgeny.c" + {(yyval.constant)=makeconstdata(NC_UINT);} +#line 2828 "ncgeny.c" break; - case 146: /* simpleconstant: TERMSTRING */ + case 144: /* simpleconstant: UINT64_CONST */ #line 872 "ncgen.y" - {(yyval.constant)=makeconstdata(NC_STRING);} -#line 2849 "ncgeny.c" + {(yyval.constant)=makeconstdata(NC_UINT64);} +#line 2834 "ncgeny.c" break; - case 147: /* intlist: constint */ -#line 876 "ncgen.y" + case 145: /* simpleconstant: FLOAT_CONST */ +#line 873 "ncgen.y" + {(yyval.constant)=makeconstdata(NC_FLOAT);} +#line 2840 "ncgeny.c" + break; + + case 146: /* simpleconstant: DOUBLE_CONST */ +#line 874 "ncgen.y" + {(yyval.constant)=makeconstdata(NC_DOUBLE);} +#line 2846 "ncgeny.c" + break; + + case 147: /* simpleconstant: TERMSTRING */ +#line 875 "ncgen.y" + {(yyval.constant)=makeconstdata(NC_STRING);} +#line 2852 "ncgeny.c" + break; + + case 148: /* intlist: constint */ +#line 879 "ncgen.y" {(yyval.datalist) = const2list((yyvsp[0].constant));} -#line 2855 "ncgeny.c" +#line 2858 "ncgeny.c" break; - case 148: /* intlist: intlist ',' constint */ -#line 877 "ncgen.y" + case 149: /* intlist: intlist ',' constint */ +#line 880 "ncgen.y" {(yyval.datalist)=(yyvsp[-2].datalist); dlappend((yyvsp[-2].datalist),((yyvsp[0].constant)));} -#line 2861 "ncgeny.c" +#line 2864 "ncgeny.c" break; - case 149: /* constint: INT_CONST */ -#line 882 "ncgen.y" + case 150: /* constint: INT_CONST */ +#line 885 "ncgen.y" {(yyval.constant)=makeconstdata(NC_INT);} -#line 2867 "ncgeny.c" +#line 2870 "ncgeny.c" break; - case 150: /* constint: UINT_CONST */ -#line 884 "ncgen.y" + case 151: /* constint: UINT_CONST */ +#line 887 "ncgen.y" {(yyval.constant)=makeconstdata(NC_UINT);} -#line 2873 "ncgeny.c" +#line 2876 "ncgeny.c" break; - case 151: /* constint: INT64_CONST */ -#line 886 "ncgen.y" + case 152: /* constint: INT64_CONST */ +#line 889 "ncgen.y" {(yyval.constant)=makeconstdata(NC_INT64);} -#line 2879 "ncgeny.c" +#line 2882 "ncgeny.c" break; - case 152: /* constint: UINT64_CONST */ -#line 888 "ncgen.y" + case 153: /* constint: UINT64_CONST */ +#line 891 "ncgen.y" {(yyval.constant)=makeconstdata(NC_UINT64);} -#line 2885 "ncgeny.c" +#line 2888 "ncgeny.c" break; - case 153: /* conststring: TERMSTRING */ -#line 892 "ncgen.y" + case 154: /* conststring: TERMSTRING */ +#line 895 "ncgen.y" {(yyval.constant)=makeconstdata(NC_STRING);} -#line 2891 "ncgeny.c" +#line 2894 "ncgeny.c" break; - case 154: /* constbool: conststring */ -#line 896 "ncgen.y" + case 155: /* constbool: conststring */ +#line 899 "ncgen.y" {(yyval.constant)=(yyvsp[0].constant);} -#line 2897 "ncgeny.c" +#line 2900 "ncgeny.c" break; - case 155: /* constbool: constint */ -#line 897 "ncgen.y" + case 156: /* constbool: constint */ +#line 900 "ncgen.y" {(yyval.constant)=(yyvsp[0].constant);} -#line 2903 "ncgeny.c" +#line 2906 "ncgeny.c" break; - case 156: /* varident: IDENT */ -#line 905 "ncgen.y" + case 157: /* varident: IDENT */ +#line 908 "ncgen.y" {(yyval.sym)=(yyvsp[0].sym);} -#line 2909 "ncgeny.c" +#line 2912 "ncgeny.c" break; - case 157: /* varident: DATA */ -#line 906 "ncgen.y" + case 158: /* varident: DATA */ +#line 909 "ncgen.y" {(yyval.sym)=identkeyword((yyvsp[0].sym));} -#line 2915 "ncgeny.c" +#line 2918 "ncgeny.c" break; - case 158: /* ident: IDENT */ -#line 910 "ncgen.y" + case 159: /* ident: IDENT */ +#line 913 "ncgen.y" {(yyval.sym)=(yyvsp[0].sym);} -#line 2921 "ncgeny.c" +#line 2924 "ncgeny.c" break; -#line 2925 "ncgeny.c" +#line 2928 "ncgeny.c" default: break; } @@ -3145,7 +3148,7 @@ yyreturnlab: return yyresult; } -#line 913 "ncgen.y" +#line 916 "ncgen.y" #ifndef NO_STDARG @@ -3484,6 +3487,7 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst) case _DEFLATE_FLAG: case _QUANTIZEBG_FLAG: case _QUANTIZEGBR_FLAG: + case _QUANTIZEBR_FLAG: tmp = nullconst(); tmp->nctype = NC_INT; convert1(con,tmp); @@ -3590,6 +3594,11 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst) special->_NSD = idata; special->flags |= _QUANTIZEGBR_FLAG; break; + case _QUANTIZEBR_FLAG: + special->_Quantizer = NC_QUANTIZE_BITROUND; + special->_NSD = idata; + special->flags |= _QUANTIZEBR_FLAG; + break; case _SHUFFLE_FLAG: special->_Shuffle = tf; special->flags |= _SHUFFLE_FLAG; diff --git a/ncgen/ncgeny.h b/ncgen/ncgeny.h index 4ac829ff4..bc3b14033 100644 --- a/ncgen/ncgeny.h +++ b/ncgen/ncgeny.h @@ -109,7 +109,8 @@ extern int ncgdebug; _CODECS = 310, /* _CODECS */ _QUANTIZEBG = 311, /* _QUANTIZEBG */ _QUANTIZEGBR = 312, /* _QUANTIZEGBR */ - DATASETID = 313 /* DATASETID */ + _QUANTIZEBR = 313, /* _QUANTIZEBR */ + DATASETID = 314 /* DATASETID */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -127,7 +128,7 @@ int nctype; /* for tracking attribute list type*/ Datalist* datalist; NCConstant* constant; -#line 131 "ncgeny.h" +#line 132 "ncgeny.h" }; typedef union YYSTYPE YYSTYPE; From 4264ee817d6039d01740f3832b88c60896bfc5bc Mon Sep 17 00:00:00 2001 From: Charlie Zender Date: Sun, 20 Feb 2022 13:00:37 -0800 Subject: [PATCH 6/7] Add missing BitRound block to zsync.c --- libnczarr/zsync.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libnczarr/zsync.c b/libnczarr/zsync.c index fa864091b..d906ec440 100644 --- a/libnczarr/zsync.c +++ b/libnczarr/zsync.c @@ -727,6 +727,10 @@ ncz_sync_atts(NC_FILE_INFO_T* file, NC_OBJ* container, NCindex* attlist, int isc if((stat = NCJinsert(jatts,NC_QUANTIZE_GRANULARBR_ATT_NAME,jint))) goto done; jint = NULL; break; + case NC_QUANTIZE_BITROUND: + if((stat = NCJinsert(jatts,NC_QUANTIZE_BITROUND_ATT_NAME,jint))) goto done; + jint = NULL; + break; default: break; } } From d509396d16fd283f8f8d335e2de60c577273c8d7 Mon Sep 17 00:00:00 2001 From: Charlie Zender Date: Mon, 21 Feb 2022 10:07:57 -0800 Subject: [PATCH 7/7] Fix mis-copied comparator --- libnczarr/zvar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnczarr/zvar.c b/libnczarr/zvar.c index 9f80ac101..38a0bb12b 100644 --- a/libnczarr/zvar.c +++ b/libnczarr/zvar.c @@ -782,7 +782,7 @@ ncz_def_var_extra(int ncid, int varid, int *shuffle, int *unused1, if (*quantize_mode == NC_QUANTIZE_BITGROOM || *quantize_mode == NC_QUANTIZE_GRANULARBR || - *quantize_mode != NC_QUANTIZE_BITROUND) + *quantize_mode == NC_QUANTIZE_BITROUND) { /* Only float and double types can have quantization. */