diff --git a/libdap2/CMakeLists.txt b/libdap2/CMakeLists.txt index 9e09abe070..7900152b68 100644 --- a/libdap2/CMakeLists.txt +++ b/libdap2/CMakeLists.txt @@ -4,11 +4,11 @@ # University Corporation for Atmospheric Research/Unidata. # See netcdf-c/COPYRIGHT file for more info. -SET(dap2_SOURCES constraints.c dapcvt.c dapodom.c daputil.c ncdaperr.c cdf.c cache.c dapdump.c dapdebug.c dapattr.c ncd2dispatch.c getvara.c dceconstraints.c dcetab.c dceparse.c dcelex.c) +SET(dap2_SOURCES constraints.c dapcvt.c dapodom.c daputil.c ncdaperr.c cdf.c cache.c dapdump.c dapdebug.c dapattr.c ncd2dispatch.c getvara.c dceconstraints.c dce.tab.c dceparse.c dcelex.c) -## +## # Turn off inclusion of particular files when using the cmake-native -# option to turn on Unity Builds. +# option to turn on Unity Builds. # # For more information, see: # * https://github.com/Unidata/netcdf-c/pull/2839/ diff --git a/libdap2/Makefile.am b/libdap2/Makefile.am index 35abca9615..fff63da406 100644 --- a/libdap2/Makefile.am +++ b/libdap2/Makefile.am @@ -17,12 +17,12 @@ LDADD= SRC= constraints.c dapcvt.c dapodom.c daputil.c \ ncdaperr.c cdf.c cache.c dapdump.c dapdebug.c dapattr.c \ -ncd2dispatch.c getvara.c dceconstraints.c dcetab.c \ +ncd2dispatch.c getvara.c dceconstraints.c dce.tab.c \ dceparse.c dcelex.c HDRS= nccommon.h constraints.h ncd2dispatch.h dapincludes.h \ dapodom.h getvara.h dapnc.h daputil.h dapdebug.h dapdump.h \ -dceconstraints.h dcetab.h dceparselex.h +dceconstraints.h dce.tab.h dceparselex.h if NETCDF_ENABLE_DAP @@ -54,7 +54,5 @@ endif # NETCDF_ENABLE_DAP EXTRA_DIST += dce.y makece:: - bison -v -d -t -p dce dce.y - rm -f dcetab.c dcetab.h - sed -e 's/dce[.]tab[.]c/dcetab.c/g' -e 's/dce[.]tab[.]h/dcetab.h/g' dcetab.c - sed -e 's/dce[.]tab[.]c/dcetab.c/g' -e 's/dce[.]tab[.]h/dcetab.h/g' dcetab.h + rm -f dce.tab.c dce.tab.h + bison --debug --defines -p dce dce.y diff --git a/libdap2/dcetab.c b/libdap2/dce.tab.c similarity index 97% rename from libdap2/dcetab.c rename to libdap2/dce.tab.c index 72361d9abd..5872072197 100644 --- a/libdap2/dcetab.c +++ b/libdap2/dce.tab.c @@ -84,7 +84,7 @@ #include "dceconstraints.h" #include "dceparselex.h" -#line 88 "dcetab.c" +#line 88 "dce.tab.c" # ifndef YY_CAST # ifdef __cplusplus @@ -107,7 +107,7 @@ # endif # endif -#include "dcetab.h" +#include "dce.tab.h" /* Symbol kind. */ enum yysymbol_kind_t { @@ -1182,317 +1182,317 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); case 8: /* projections: projectionlist */ #line 43 "dce.y" {projections(parsestate,yyvsp[0]);} -#line 1186 "dcetab.c" +#line 1186 "dce.tab.c" break; case 9: /* selections: clauselist */ #line 47 "dce.y" {selections(parsestate,yyvsp[0]);} -#line 1192 "dcetab.c" +#line 1192 "dce.tab.c" break; case 10: /* projectionlist: projection */ #line 52 "dce.y" {yyval=projectionlist(parsestate,(Object)null,yyvsp[0]);} -#line 1198 "dcetab.c" +#line 1198 "dce.tab.c" break; case 11: /* projectionlist: projectionlist ',' projection */ #line 54 "dce.y" {yyval=projectionlist(parsestate,yyvsp[-2],yyvsp[0]);} -#line 1204 "dcetab.c" +#line 1204 "dce.tab.c" break; case 12: /* projection: segmentlist */ #line 59 "dce.y" {yyval=projection(parsestate,yyvsp[0]);} -#line 1210 "dcetab.c" +#line 1210 "dce.tab.c" break; case 13: /* projection: function */ #line 61 "dce.y" {yyval=projection(parsestate,yyvsp[0]);} -#line 1216 "dcetab.c" +#line 1216 "dce.tab.c" break; case 14: /* function: ident '(' ')' */ #line 66 "dce.y" {yyval=function(parsestate,yyvsp[-2],null);} -#line 1222 "dcetab.c" +#line 1222 "dce.tab.c" break; case 15: /* function: ident '(' arg_list ')' */ #line 68 "dce.y" {yyval=function(parsestate,yyvsp[-3],yyvsp[-1]);} -#line 1228 "dcetab.c" +#line 1228 "dce.tab.c" break; case 16: /* segmentlist: segment */ #line 73 "dce.y" {yyval=segmentlist(parsestate,null,yyvsp[0]);} -#line 1234 "dcetab.c" +#line 1234 "dce.tab.c" break; case 17: /* segmentlist: segmentlist '.' segment */ #line 75 "dce.y" {yyval=segmentlist(parsestate,yyvsp[-2],yyvsp[0]);} -#line 1240 "dcetab.c" +#line 1240 "dce.tab.c" break; case 18: /* segment: word */ #line 80 "dce.y" {yyval=segment(parsestate,yyvsp[0],null);} -#line 1246 "dcetab.c" +#line 1246 "dce.tab.c" break; case 19: /* segment: word rangelist */ #line 82 "dce.y" {yyval=segment(parsestate,yyvsp[-1],yyvsp[0]);} -#line 1252 "dcetab.c" +#line 1252 "dce.tab.c" break; case 20: /* rangelist: range */ #line 87 "dce.y" {yyval=rangelist(parsestate,null,yyvsp[0]);} -#line 1258 "dcetab.c" +#line 1258 "dce.tab.c" break; case 21: /* rangelist: rangelist range */ #line 89 "dce.y" {yyval=rangelist(parsestate,yyvsp[-1],yyvsp[0]);} -#line 1264 "dcetab.c" +#line 1264 "dce.tab.c" break; case 22: /* range: '[' number ']' */ #line 94 "dce.y" {yyval=range(parsestate,yyvsp[-1],null,null);} -#line 1270 "dcetab.c" +#line 1270 "dce.tab.c" break; case 23: /* range: '[' number ':' number ']' */ #line 96 "dce.y" {yyval=range(parsestate,yyvsp[-3],null,yyvsp[-1]);} -#line 1276 "dcetab.c" +#line 1276 "dce.tab.c" break; case 24: /* range: '[' number ':' number ':' number ']' */ #line 98 "dce.y" {yyval=range(parsestate,yyvsp[-5],yyvsp[-3],yyvsp[-1]);} -#line 1282 "dcetab.c" +#line 1282 "dce.tab.c" break; case 25: /* range1: '[' number ']' */ #line 102 "dce.y" {yyval = range1(parsestate,yyvsp[-1]);} -#line 1288 "dcetab.c" +#line 1288 "dce.tab.c" break; case 26: /* clauselist: sel_clause */ #line 108 "dce.y" {yyval=clauselist(parsestate,null,yyvsp[0]);} -#line 1294 "dcetab.c" +#line 1294 "dce.tab.c" break; case 27: /* clauselist: clauselist sel_clause */ #line 110 "dce.y" {yyval=clauselist(parsestate,yyvsp[-1],yyvsp[0]);} -#line 1300 "dcetab.c" +#line 1300 "dce.tab.c" break; case 28: /* sel_clause: '&' value rel_op '{' value_list '}' */ #line 115 "dce.y" {yyval=sel_clause(parsestate,1,yyvsp[-4],yyvsp[-3],yyvsp[-1]);} -#line 1306 "dcetab.c" +#line 1306 "dce.tab.c" break; case 29: /* sel_clause: '&' value rel_op value */ #line 117 "dce.y" {yyval=sel_clause(parsestate,2,yyvsp[-2],yyvsp[-1],yyvsp[0]);} -#line 1312 "dcetab.c" +#line 1312 "dce.tab.c" break; case 30: /* sel_clause: '&' boolfunction */ #line 119 "dce.y" {yyval=yyvsp[-1];} -#line 1318 "dcetab.c" +#line 1318 "dce.tab.c" break; case 31: /* value_list: value */ #line 124 "dce.y" {yyval=value_list(parsestate,null,yyvsp[0]);} -#line 1324 "dcetab.c" +#line 1324 "dce.tab.c" break; case 32: /* value_list: value_list ',' value */ #line 126 "dce.y" {yyval=value_list(parsestate,yyvsp[-2],yyvsp[0]);} -#line 1330 "dcetab.c" +#line 1330 "dce.tab.c" break; case 33: /* value: var */ #line 131 "dce.y" {yyval=value(parsestate,yyvsp[0]);} -#line 1336 "dcetab.c" +#line 1336 "dce.tab.c" break; case 34: /* value: function */ #line 133 "dce.y" {yyval=value(parsestate,yyvsp[0]);} -#line 1342 "dcetab.c" +#line 1342 "dce.tab.c" break; case 35: /* value: constant */ #line 135 "dce.y" {yyval=value(parsestate,yyvsp[0]);} -#line 1348 "dcetab.c" +#line 1348 "dce.tab.c" break; case 36: /* constant: number */ #line 140 "dce.y" {yyval=constant(parsestate,yyvsp[0],SCAN_NUMBERCONST);} -#line 1354 "dcetab.c" +#line 1354 "dce.tab.c" break; case 37: /* constant: string */ #line 142 "dce.y" {yyval=constant(parsestate,yyvsp[0],SCAN_STRINGCONST);} -#line 1360 "dcetab.c" +#line 1360 "dce.tab.c" break; case 38: /* var: indexpath */ #line 147 "dce.y" {yyval=var(parsestate,yyvsp[0]);} -#line 1366 "dcetab.c" +#line 1366 "dce.tab.c" break; case 39: /* indexpath: index */ #line 152 "dce.y" {yyval=indexpath(parsestate,null,yyvsp[0]);} -#line 1372 "dcetab.c" +#line 1372 "dce.tab.c" break; case 40: /* indexpath: indexpath '.' index */ #line 154 "dce.y" {yyval=indexpath(parsestate,yyvsp[-2],yyvsp[0]);} -#line 1378 "dcetab.c" +#line 1378 "dce.tab.c" break; case 41: /* index: word */ #line 159 "dce.y" {yyval=indexer(parsestate,yyvsp[0],null);} -#line 1384 "dcetab.c" +#line 1384 "dce.tab.c" break; case 42: /* index: word array_indices */ #line 161 "dce.y" {yyval=indexer(parsestate,yyvsp[-1],yyvsp[0]);} -#line 1390 "dcetab.c" +#line 1390 "dce.tab.c" break; case 43: /* array_indices: range1 */ #line 166 "dce.y" {yyval=array_indices(parsestate,null,yyvsp[0]);} -#line 1396 "dcetab.c" +#line 1396 "dce.tab.c" break; case 44: /* array_indices: array_indices range1 */ #line 168 "dce.y" {yyval=array_indices(parsestate,yyvsp[-1],yyvsp[0]);} -#line 1402 "dcetab.c" +#line 1402 "dce.tab.c" break; case 45: /* boolfunction: ident '(' ')' */ #line 173 "dce.y" {yyval=function(parsestate,yyvsp[-2],null);} -#line 1408 "dcetab.c" +#line 1408 "dce.tab.c" break; case 46: /* boolfunction: ident '(' arg_list ')' */ #line 175 "dce.y" {yyval=function(parsestate,yyvsp[-3],yyvsp[-1]);} -#line 1414 "dcetab.c" +#line 1414 "dce.tab.c" break; case 47: /* arg_list: value */ #line 180 "dce.y" {yyval=arg_list(parsestate,null,yyvsp[0]);} -#line 1420 "dcetab.c" +#line 1420 "dce.tab.c" break; case 48: /* arg_list: value_list ',' value */ #line 182 "dce.y" {yyval=arg_list(parsestate,yyvsp[-2],yyvsp[0]);} -#line 1426 "dcetab.c" +#line 1426 "dce.tab.c" break; case 49: /* rel_op: '=' */ #line 186 "dce.y" {yyval=makeselectiontag(CEO_EQ);} -#line 1432 "dcetab.c" +#line 1432 "dce.tab.c" break; case 50: /* rel_op: '>' */ #line 187 "dce.y" {yyval=makeselectiontag(CEO_GT);} -#line 1438 "dcetab.c" +#line 1438 "dce.tab.c" break; case 51: /* rel_op: '<' */ #line 188 "dce.y" {yyval=makeselectiontag(CEO_LT);} -#line 1444 "dcetab.c" +#line 1444 "dce.tab.c" break; case 52: /* rel_op: '!' '=' */ #line 189 "dce.y" {yyval=makeselectiontag(CEO_NEQ);} -#line 1450 "dcetab.c" +#line 1450 "dce.tab.c" break; case 53: /* rel_op: '>' '=' */ #line 190 "dce.y" {yyval=makeselectiontag(CEO_GE);} -#line 1456 "dcetab.c" +#line 1456 "dce.tab.c" break; case 54: /* rel_op: '<' '=' */ #line 191 "dce.y" {yyval=makeselectiontag(CEO_LE);} -#line 1462 "dcetab.c" +#line 1462 "dce.tab.c" break; case 55: /* rel_op: '=' '~' */ #line 192 "dce.y" {yyval=makeselectiontag(CEO_RE);} -#line 1468 "dcetab.c" +#line 1468 "dce.tab.c" break; case 56: /* ident: word */ #line 196 "dce.y" {yyval = yyvsp[0];} -#line 1474 "dcetab.c" +#line 1474 "dce.tab.c" break; case 57: /* word: SCAN_WORD */ #line 200 "dce.y" {yyval = checkobject(yyvsp[0]);} -#line 1480 "dcetab.c" +#line 1480 "dce.tab.c" break; case 58: /* number: SCAN_NUMBERCONST */ #line 204 "dce.y" {yyval = checkobject(yyvsp[0]);} -#line 1486 "dcetab.c" +#line 1486 "dce.tab.c" break; case 59: /* string: SCAN_STRINGCONST */ #line 208 "dce.y" {yyval = checkobject(yyvsp[0]);} -#line 1492 "dcetab.c" +#line 1492 "dce.tab.c" break; -#line 1496 "dcetab.c" +#line 1496 "dce.tab.c" default: break; } diff --git a/libdap2/dcetab.h b/libdap2/dce.tab.h similarity index 100% rename from libdap2/dcetab.h rename to libdap2/dce.tab.h diff --git a/libdap2/dceparselex.h b/libdap2/dceparselex.h index 41530e275f..20c4607721 100644 --- a/libdap2/dceparselex.h +++ b/libdap2/dceparselex.h @@ -10,7 +10,7 @@ struct DCEparsestate; typedef struct DCEparsestate DCEparsestate; -#include "dcetab.h" +#include "dce.tab.h" #ifdef _WIN32 @@ -51,7 +51,7 @@ struct DCEparsestate { essentially the same role as the typical bison %union declaration */ - + extern int ceerror(DCEparsestate*,char*); extern void ce_parse_error(DCEparsestate*,const char *fmt, ...); diff --git a/ncgen/CMakeLists.txt b/ncgen/CMakeLists.txt index 0ee650dda8..f04a3f563b 100644 --- a/ncgen/CMakeLists.txt +++ b/ncgen/CMakeLists.txt @@ -17,14 +17,14 @@ SET(ncgen_FILES bindata.c bytebuffer.c cdata.c cvt.c data.c debug.c dump.c escapes.c f77data.c genbin.c genc.c genchar.c generate.c generr.c genf77.c genj.c genlib.c getfill.c jdata.c list.c -main.c ncgeny.c semantics.c +main.c ncgen.tab.c semantics.c util.c bytebuffer.h data.h debug.h dump.h generate.h generr.h genlib.h includes.h list.h -ncgen.h ncgeny.h util.h ${XGETOPTSRC}) +ncgen.h ncgen.tab.h util.h ${XGETOPTSRC}) -## +## # Turn off inclusion of particular files when using the cmake-native -# option to turn on Unity Builds. +# option to turn on Unity Builds. # # For more information, see: # * https://github.com/Unidata/netcdf-c/pull/2839/ diff --git a/ncgen/Makefile.am b/ncgen/Makefile.am index 49a3d64976..a5de69e171 100644 --- a/ncgen/Makefile.am +++ b/ncgen/Makefile.am @@ -13,10 +13,10 @@ ncgen_SOURCES = bindata.c bytebuffer.c cdata.c cvt.c data.c \ debug.c dump.c escapes.c f77data.c genbin.c \ genc.c genchar.c generate.c generr.c genf77.c \ genj.c genlib.c getfill.c jdata.c list.c \ -main.c ncgeny.c semantics.c \ +main.c ncgen.tab.c semantics.c \ util.c bytebuffer.h data.h debug.h dump.h \ generate.h generr.h genlib.h includes.h list.h \ -ncgen.h ncgeny.h util.h +ncgen.h ncgen.tab.h util.h # Obsolete OBSOLETE = odom.c odom.h jdatastd.c jdatajni.c genjni.c cdfdata.c cmldata.c @@ -63,8 +63,6 @@ makeparser:: rm -f ncgenl.c lex.ncg.c flex -Pncg -8 ncgen.l sed -e s/lex.ncg.c/ncgenl.c/g ncgenl.c - bison -pncg -t -d ncgen.y - rm -f ncgeny.c ncgeny.h - sed -e s/ncgen.tab.c/ncgeny.c/g -e s/ncgen.tab.h/ncgeny.h/g ncgeny.c - sed -e s/ncgen.tab.c/ncgeny.c/g -e s/ncgen.tab.h/ncgeny.h/g ncgeny.h - rm -f lex.ncg.c ncgen.tab.h ncgen.tab.c + rm -f lex.ncg.c + rm ncgen.tab.y ncgen.tab.h + bison --debug --defines -p ncg ncgen.y diff --git a/ncgen/ncgen.l b/ncgen/ncgen.l index 6718e5f40c..6d425a5c60 100644 --- a/ncgen/ncgen.l +++ b/ncgen/ncgen.l @@ -36,7 +36,7 @@ definition of FILL_STRING in ../ncdump/vardata.h */ #include "ncgen.h" -#include "ncgeny.h" +#include "ncgen.tab.h" #include "isnan.h" #define FILL_STRING "_" @@ -916,7 +916,7 @@ identcheck(int token) } break; default: - break; + break; } return token; } diff --git a/ncgen/ncgeny.c b/ncgen/ncgen.tab.c similarity index 97% rename from ncgen/ncgeny.c rename to ncgen/ncgen.tab.c index 3a37ff971f..8798bc0d6f 100644 --- a/ncgen/ncgeny.c +++ b/ncgen/ncgen.tab.c @@ -81,7 +81,7 @@ static char SccsId[] = "$Id: ncgen.y,v 1.42 2010/05/18 21:32:46 dmh Exp $"; */ #include "includes.h" #include "netcdf_aux.h" -#include "ncgeny.h" +#include "ncgen.tab.h" #include "ncgen.h" #ifdef USE_NETCDF4 #include "netcdf_filter.h" @@ -217,7 +217,7 @@ static void yyerror(fmt,va_alist) const char* fmt; va_dcl; extern int lex_init(void); -#line 221 "ncgeny.c" +#line 221 "ncgen.tab.c" # ifndef YY_CAST # ifdef __cplusplus @@ -240,7 +240,7 @@ extern int lex_init(void); # endif # endif -#include "ncgeny.h" +#include "ncgen.tab.h" /* Symbol kind. */ enum yysymbol_kind_t { @@ -1847,13 +1847,13 @@ yyparse (void) case 2: /* ncdesc: NETCDF datasetid rootgroup */ #line 246 "ncgen.y" {if (error_count > 0) YYABORT;} -#line 1851 "ncgeny.c" +#line 1851 "ncgen.tab.c" break; case 3: /* datasetid: DATASETID */ #line 249 "ncgen.y" {createrootgroup(datasetname);} -#line 1857 "ncgeny.c" +#line 1857 "ncgen.tab.c" break; case 8: /* $@1: %empty */ @@ -1865,25 +1865,25 @@ yyparse (void) yyerror("duplicate group declaration within parent group for %s", id->name); } -#line 1869 "ncgeny.c" +#line 1869 "ncgen.tab.c" break; case 9: /* $@2: %empty */ #line 277 "ncgen.y" {listpop(groupstack);} -#line 1875 "ncgeny.c" +#line 1875 "ncgen.tab.c" break; case 12: /* typesection: TYPES */ #line 283 "ncgen.y" {} -#line 1881 "ncgeny.c" +#line 1881 "ncgen.tab.c" break; case 13: /* typesection: TYPES typedecls */ #line 285 "ncgen.y" {markcdf4("Type specification");} -#line 1887 "ncgeny.c" +#line 1887 "ncgen.tab.c" break; case 16: /* typename: ident */ @@ -1895,19 +1895,19 @@ yyparse (void) (yyvsp[0].sym)->name); listpush(typdefs,(void*)(yyvsp[0].sym)); } -#line 1899 "ncgeny.c" +#line 1899 "ncgen.tab.c" break; case 17: /* type_or_attr_decl: typedecl */ #line 300 "ncgen.y" {} -#line 1905 "ncgeny.c" +#line 1905 "ncgen.tab.c" break; case 18: /* type_or_attr_decl: attrdecl ';' */ #line 300 "ncgen.y" {} -#line 1911 "ncgeny.c" +#line 1911 "ncgen.tab.c" break; case 25: /* enumdecl: primtype ENUM typename '{' enumidlist '}' */ @@ -1938,13 +1938,13 @@ yyparse (void) } listsetlength(stack,stackbase);/* remove stack nodes*/ } -#line 1942 "ncgeny.c" +#line 1942 "ncgen.tab.c" break; case 26: /* enumidlist: enumid */ #line 343 "ncgen.y" {(yyval.mark)=listlength(stack); listpush(stack,(void*)(yyvsp[0].sym));} -#line 1948 "ncgeny.c" +#line 1948 "ncgen.tab.c" break; case 27: /* enumidlist: enumidlist ',' enumid */ @@ -1963,7 +1963,7 @@ yyparse (void) } listpush(stack,(void*)(yyvsp[0].sym)); } -#line 1967 "ncgeny.c" +#line 1967 "ncgen.tab.c" break; case 28: /* enumid: ident '=' constint */ @@ -1974,7 +1974,7 @@ yyparse (void) (yyvsp[-2].sym)->typ.econst=(yyvsp[0].constant); (yyval.sym)=(yyvsp[-2].sym); } -#line 1978 "ncgeny.c" +#line 1978 "ncgen.tab.c" break; case 29: /* opaquedecl: OPAQUE_ '(' INT_CONST ')' typename */ @@ -1988,7 +1988,7 @@ yyparse (void) (yyvsp[0].sym)->typ.size=(size_t)int32_val; (void)ncaux_class_alignment(NC_OPAQUE,&(yyvsp[0].sym)->typ.alignment); } -#line 1992 "ncgeny.c" +#line 1992 "ncgen.tab.c" break; case 30: /* vlendecl: typeref '(' '*' ')' typename */ @@ -2004,7 +2004,7 @@ yyparse (void) (yyvsp[0].sym)->typ.size=VLENSIZE; (void)ncaux_class_alignment(NC_VLEN,&(yyvsp[0].sym)->typ.alignment); } -#line 2008 "ncgeny.c" +#line 2008 "ncgen.tab.c" break; case 31: /* compounddecl: COMPOUND typename '{' fields '}' */ @@ -2038,19 +2038,19 @@ yyparse (void) } listsetlength(stack,stackbase);/* remove stack nodes*/ } -#line 2042 "ncgeny.c" +#line 2042 "ncgen.tab.c" break; case 32: /* fields: field ';' */ #line 429 "ncgen.y" {(yyval.mark)=(yyvsp[-1].mark);} -#line 2048 "ncgeny.c" +#line 2048 "ncgen.tab.c" break; case 33: /* fields: fields field ';' */ #line 430 "ncgen.y" {(yyval.mark)=(yyvsp[-2].mark);} -#line 2054 "ncgeny.c" +#line 2054 "ncgen.tab.c" break; case 34: /* field: typeref fieldlist */ @@ -2066,103 +2066,103 @@ yyparse (void) f->typ.basetype = (yyvsp[-1].sym); } } -#line 2070 "ncgeny.c" +#line 2070 "ncgen.tab.c" break; case 35: /* primtype: CHAR_K */ #line 447 "ncgen.y" { (yyval.sym) = primsymbols[NC_CHAR]; } -#line 2076 "ncgeny.c" +#line 2076 "ncgen.tab.c" break; case 36: /* primtype: BYTE_K */ #line 448 "ncgen.y" { (yyval.sym) = primsymbols[NC_BYTE]; } -#line 2082 "ncgeny.c" +#line 2082 "ncgen.tab.c" break; case 37: /* primtype: SHORT_K */ #line 449 "ncgen.y" { (yyval.sym) = primsymbols[NC_SHORT]; } -#line 2088 "ncgeny.c" +#line 2088 "ncgen.tab.c" break; case 38: /* primtype: INT_K */ #line 450 "ncgen.y" { (yyval.sym) = primsymbols[NC_INT]; } -#line 2094 "ncgeny.c" +#line 2094 "ncgen.tab.c" break; case 39: /* primtype: FLOAT_K */ #line 451 "ncgen.y" { (yyval.sym) = primsymbols[NC_FLOAT]; } -#line 2100 "ncgeny.c" +#line 2100 "ncgen.tab.c" break; case 40: /* primtype: DOUBLE_K */ #line 452 "ncgen.y" { (yyval.sym) = primsymbols[NC_DOUBLE]; } -#line 2106 "ncgeny.c" +#line 2106 "ncgen.tab.c" break; case 41: /* primtype: UBYTE_K */ #line 453 "ncgen.y" { vercheck(NC_UBYTE); (yyval.sym) = primsymbols[NC_UBYTE]; } -#line 2112 "ncgeny.c" +#line 2112 "ncgen.tab.c" break; case 42: /* primtype: USHORT_K */ #line 454 "ncgen.y" { vercheck(NC_USHORT); (yyval.sym) = primsymbols[NC_USHORT]; } -#line 2118 "ncgeny.c" +#line 2118 "ncgen.tab.c" break; case 43: /* primtype: UINT_K */ #line 455 "ncgen.y" { vercheck(NC_UINT); (yyval.sym) = primsymbols[NC_UINT]; } -#line 2124 "ncgeny.c" +#line 2124 "ncgen.tab.c" break; case 44: /* primtype: INT64_K */ #line 456 "ncgen.y" { vercheck(NC_INT64); (yyval.sym) = primsymbols[NC_INT64]; } -#line 2130 "ncgeny.c" +#line 2130 "ncgen.tab.c" break; case 45: /* primtype: UINT64_K */ #line 457 "ncgen.y" { vercheck(NC_UINT64); (yyval.sym) = primsymbols[NC_UINT64]; } -#line 2136 "ncgeny.c" +#line 2136 "ncgen.tab.c" break; case 46: /* primtype: STRING_K */ #line 458 "ncgen.y" { vercheck(NC_STRING); (yyval.sym) = primsymbols[NC_STRING]; } -#line 2142 "ncgeny.c" +#line 2142 "ncgen.tab.c" break; case 48: /* dimsection: DIMENSIONS */ #line 462 "ncgen.y" {} -#line 2148 "ncgeny.c" +#line 2148 "ncgen.tab.c" break; case 49: /* dimsection: DIMENSIONS dimdecls */ #line 463 "ncgen.y" {} -#line 2154 "ncgeny.c" +#line 2154 "ncgen.tab.c" break; case 52: /* dim_or_attr_decl: dimdeclist */ #line 470 "ncgen.y" {} -#line 2160 "ncgeny.c" +#line 2160 "ncgen.tab.c" break; case 53: /* dim_or_attr_decl: attrdecl */ #line 470 "ncgen.y" {} -#line 2166 "ncgeny.c" +#line 2166 "ncgen.tab.c" break; case 56: /* dimdecl: dimd '=' constint */ @@ -2174,7 +2174,7 @@ fprintf(stderr,"dimension: %s = %llu\n",(yyvsp[-2].sym)->name,(unsigned long lon #endif reclaimconstant((yyvsp[0].constant)); } -#line 2178 "ncgeny.c" +#line 2178 "ncgen.tab.c" break; case 57: /* dimdecl: dimd '=' NC_UNLIMITED_K */ @@ -2186,7 +2186,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 2190 "ncgeny.c" +#line 2190 "ncgen.tab.c" break; case 58: /* dimd: ident */ @@ -2200,31 +2200,31 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); (yyval.sym)=(yyvsp[0].sym); listpush(dimdefs,(void*)(yyvsp[0].sym)); } -#line 2204 "ncgeny.c" +#line 2204 "ncgen.tab.c" break; case 60: /* vasection: VARIABLES */ #line 508 "ncgen.y" {} -#line 2210 "ncgeny.c" +#line 2210 "ncgen.tab.c" break; case 61: /* vasection: VARIABLES vadecls */ #line 509 "ncgen.y" {} -#line 2216 "ncgeny.c" +#line 2216 "ncgen.tab.c" break; case 64: /* vadecl_or_attr: vardecl */ #line 516 "ncgen.y" {} -#line 2222 "ncgeny.c" +#line 2222 "ncgen.tab.c" break; case 65: /* vadecl_or_attr: attrdecl */ #line 516 "ncgen.y" {} -#line 2228 "ncgeny.c" +#line 2228 "ncgen.tab.c" break; case 66: /* vardecl: typeref varlist */ @@ -2248,7 +2248,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); } listsetlength(stack,stackbase);/* remove stack nodes*/ } -#line 2252 "ncgeny.c" +#line 2252 "ncgen.tab.c" break; case 67: /* varlist: varspec */ @@ -2256,13 +2256,13 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); {(yyval.mark)=listlength(stack); listpush(stack,(void*)(yyvsp[0].sym)); } -#line 2260 "ncgeny.c" +#line 2260 "ncgen.tab.c" break; case 68: /* varlist: varlist ',' varspec */ #line 545 "ncgen.y" {(yyval.mark)=(yyvsp[-2].mark); listpush(stack,(void*)(yyvsp[0].sym));} -#line 2266 "ncgeny.c" +#line 2266 "ncgen.tab.c" break; case 69: /* varspec: varident dimspec */ @@ -2293,31 +2293,31 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); listsetlength(stack,stackbase);/* remove stack nodes*/ (yyval.sym) = var; } -#line 2297 "ncgeny.c" +#line 2297 "ncgen.tab.c" break; case 70: /* dimspec: %empty */ #line 577 "ncgen.y" {(yyval.mark)=listlength(stack);} -#line 2303 "ncgeny.c" +#line 2303 "ncgen.tab.c" break; case 71: /* dimspec: '(' dimlist ')' */ #line 578 "ncgen.y" {(yyval.mark)=(yyvsp[-1].mark);} -#line 2309 "ncgeny.c" +#line 2309 "ncgen.tab.c" break; case 72: /* dimlist: dimref */ #line 581 "ncgen.y" {(yyval.mark)=listlength(stack); listpush(stack,(void*)(yyvsp[0].sym));} -#line 2315 "ncgeny.c" +#line 2315 "ncgen.tab.c" break; case 73: /* dimlist: dimlist ',' dimref */ #line 583 "ncgen.y" {(yyval.mark)=(yyvsp[-2].mark); listpush(stack,(void*)(yyvsp[0].sym));} -#line 2321 "ncgeny.c" +#line 2321 "ncgen.tab.c" break; case 74: /* dimref: path */ @@ -2332,7 +2332,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); } (yyval.sym)=dimsym; } -#line 2336 "ncgeny.c" +#line 2336 "ncgen.tab.c" break; case 75: /* fieldlist: fieldspec */ @@ -2340,13 +2340,13 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); {(yyval.mark)=listlength(stack); listpush(stack,(void*)(yyvsp[0].sym)); } -#line 2344 "ncgeny.c" +#line 2344 "ncgen.tab.c" break; case 76: /* fieldlist: fieldlist ',' fieldspec */ #line 605 "ncgen.y" {(yyval.mark)=(yyvsp[-2].mark); listpush(stack,(void*)(yyvsp[0].sym));} -#line 2350 "ncgeny.c" +#line 2350 "ncgen.tab.c" break; case 77: /* fieldspec: ident fielddimspec */ @@ -2377,31 +2377,31 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); listsetlength(stack,stackbase);/* remove stack nodes*/ (yyval.sym) = (yyvsp[-1].sym); } -#line 2381 "ncgeny.c" +#line 2381 "ncgen.tab.c" break; case 78: /* fielddimspec: %empty */ #line 638 "ncgen.y" {(yyval.mark)=listlength(stack);} -#line 2387 "ncgeny.c" +#line 2387 "ncgen.tab.c" break; case 79: /* fielddimspec: '(' fielddimlist ')' */ #line 639 "ncgen.y" {(yyval.mark)=(yyvsp[-1].mark);} -#line 2393 "ncgeny.c" +#line 2393 "ncgen.tab.c" break; case 80: /* fielddimlist: fielddim */ #line 643 "ncgen.y" {(yyval.mark)=listlength(stack); listpush(stack,(void*)(yyvsp[0].sym));} -#line 2399 "ncgeny.c" +#line 2399 "ncgen.tab.c" break; case 81: /* fielddimlist: fielddimlist ',' fielddim */ #line 645 "ncgen.y" {(yyval.mark)=(yyvsp[-2].mark); listpush(stack,(void*)(yyvsp[0].sym));} -#line 2405 "ncgeny.c" +#line 2405 "ncgen.tab.c" break; case 82: /* fielddim: UINT_CONST */ @@ -2415,7 +2415,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); (yyval.sym)->dim.isconstant = 1; (yyval.sym)->dim.declsize = uint32_val; } -#line 2419 "ncgeny.c" +#line 2419 "ncgen.tab.c" break; case 83: /* fielddim: INT_CONST */ @@ -2433,7 +2433,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); (yyval.sym)->dim.isconstant = 1; (yyval.sym)->dim.declsize = (size_t)int32_val; } -#line 2437 "ncgeny.c" +#line 2437 "ncgen.tab.c" break; case 84: /* varref: ambiguous_ref */ @@ -2445,7 +2445,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); } (yyval.sym)=vsym; } -#line 2449 "ncgeny.c" +#line 2449 "ncgen.tab.c" break; case 85: /* typeref: ambiguous_ref */ @@ -2457,7 +2457,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); } (yyval.sym)=tsym; } -#line 2461 "ncgeny.c" +#line 2461 "ncgen.tab.c" break; case 86: /* ambiguous_ref: path */ @@ -2480,49 +2480,49 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); } (yyval.sym)=tvsym; } -#line 2484 "ncgeny.c" +#line 2484 "ncgen.tab.c" break; case 87: /* ambiguous_ref: primtype */ #line 720 "ncgen.y" {(yyval.sym)=(yyvsp[0].sym);} -#line 2490 "ncgeny.c" +#line 2490 "ncgen.tab.c" break; case 88: /* attrdecllist: %empty */ #line 727 "ncgen.y" {} -#line 2496 "ncgeny.c" +#line 2496 "ncgen.tab.c" break; case 89: /* attrdecllist: attrdecl ';' attrdecllist */ #line 727 "ncgen.y" {} -#line 2502 "ncgeny.c" +#line 2502 "ncgen.tab.c" break; case 90: /* attrdecl: ':' _NCPROPS '=' conststring */ #line 731 "ncgen.y" {(yyval.sym) = makespecial(_NCPROPS_FLAG,NULL,NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2508 "ncgeny.c" +#line 2508 "ncgen.tab.c" break; case 91: /* attrdecl: ':' _ISNETCDF4 '=' constbool */ #line 733 "ncgen.y" {(yyval.sym) = makespecial(_ISNETCDF4_FLAG,NULL,NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2514 "ncgeny.c" +#line 2514 "ncgen.tab.c" break; case 92: /* attrdecl: ':' _SUPERBLOCK '=' constint */ #line 735 "ncgen.y" {(yyval.sym) = makespecial(_SUPERBLOCK_FLAG,NULL,NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2520 "ncgeny.c" +#line 2520 "ncgen.tab.c" break; case 93: /* attrdecl: ':' ident '=' datalist */ #line 737 "ncgen.y" { (yyval.sym)=makeattribute((yyvsp[-2].sym),NULL,NULL,(yyvsp[0].datalist),ATTRGLOBAL);} -#line 2526 "ncgeny.c" +#line 2526 "ncgen.tab.c" break; case 94: /* attrdecl: typeref ambiguous_ref ':' ident '=' datalist */ @@ -2535,7 +2535,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); YYABORT; } } -#line 2539 "ncgeny.c" +#line 2539 "ncgen.tab.c" break; case 95: /* attrdecl: ambiguous_ref ':' ident '=' datalist */ @@ -2550,97 +2550,97 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); YYABORT; } } -#line 2554 "ncgeny.c" +#line 2554 "ncgen.tab.c" break; case 96: /* attrdecl: ambiguous_ref ':' _FILLVALUE '=' datalist */ #line 759 "ncgen.y" {(yyval.sym) = makespecial(_FILLVALUE_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].datalist),ISLIST);} -#line 2560 "ncgeny.c" +#line 2560 "ncgen.tab.c" break; case 97: /* attrdecl: typeref ambiguous_ref ':' _FILLVALUE '=' datalist */ #line 761 "ncgen.y" {(yyval.sym) = makespecial(_FILLVALUE_FLAG,(yyvsp[-4].sym),(yyvsp[-5].sym),(void*)(yyvsp[0].datalist),ISLIST);} -#line 2566 "ncgeny.c" +#line 2566 "ncgen.tab.c" break; case 98: /* attrdecl: ambiguous_ref ':' _STORAGE '=' conststring */ #line 763 "ncgen.y" {(yyval.sym) = makespecial(_STORAGE_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2572 "ncgeny.c" +#line 2572 "ncgen.tab.c" break; case 99: /* attrdecl: ambiguous_ref ':' _CHUNKSIZES '=' intlist */ #line 765 "ncgen.y" {(yyval.sym) = makespecial(_CHUNKSIZES_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].datalist),ISLIST);} -#line 2578 "ncgeny.c" +#line 2578 "ncgen.tab.c" break; case 100: /* attrdecl: ambiguous_ref ':' _FLETCHER32 '=' constbool */ #line 767 "ncgen.y" {(yyval.sym) = makespecial(_FLETCHER32_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2584 "ncgeny.c" +#line 2584 "ncgen.tab.c" break; case 101: /* attrdecl: ambiguous_ref ':' _DEFLATELEVEL '=' constint */ #line 769 "ncgen.y" {(yyval.sym) = makespecial(_DEFLATE_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2590 "ncgeny.c" +#line 2590 "ncgen.tab.c" break; case 102: /* attrdecl: ambiguous_ref ':' _SHUFFLE '=' constbool */ #line 771 "ncgen.y" {(yyval.sym) = makespecial(_SHUFFLE_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2596 "ncgeny.c" +#line 2596 "ncgen.tab.c" break; case 103: /* attrdecl: ambiguous_ref ':' _ENDIANNESS '=' conststring */ #line 773 "ncgen.y" {(yyval.sym) = makespecial(_ENDIAN_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2602 "ncgeny.c" +#line 2602 "ncgen.tab.c" break; case 104: /* attrdecl: ambiguous_ref ':' _FILTER '=' conststring */ #line 775 "ncgen.y" {(yyval.sym) = makespecial(_FILTER_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2608 "ncgeny.c" +#line 2608 "ncgen.tab.c" break; case 105: /* attrdecl: ambiguous_ref ':' _CODECS '=' conststring */ #line 777 "ncgen.y" {(yyval.sym) = makespecial(_CODECS_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2614 "ncgeny.c" +#line 2614 "ncgen.tab.c" break; case 106: /* attrdecl: ambiguous_ref ':' _QUANTIZEBG '=' constint */ #line 779 "ncgen.y" {(yyval.sym) = makespecial(_QUANTIZEBG_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2620 "ncgeny.c" +#line 2620 "ncgen.tab.c" break; case 107: /* attrdecl: ambiguous_ref ':' _QUANTIZEGBR '=' constint */ #line 781 "ncgen.y" {(yyval.sym) = makespecial(_QUANTIZEGBR_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2626 "ncgeny.c" +#line 2626 "ncgen.tab.c" break; 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" +#line 2632 "ncgen.tab.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 2638 "ncgeny.c" +#line 2638 "ncgen.tab.c" break; case 110: /* attrdecl: ':' _FORMAT '=' conststring */ #line 787 "ncgen.y" {(yyval.sym) = makespecial(_FORMAT_FLAG,NULL,NULL,(void*)(yyvsp[0].constant),ISCONST);} -#line 2644 "ncgeny.c" +#line 2644 "ncgen.tab.c" break; case 111: /* path: ident */ @@ -2651,7 +2651,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); (yyvsp[0].sym)->is_prefixed=0; setpathcurrent((yyvsp[0].sym)); } -#line 2655 "ncgeny.c" +#line 2655 "ncgen.tab.c" break; case 112: /* path: PATH */ @@ -2662,269 +2662,269 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name); (yyvsp[0].sym)->is_prefixed=1; /* path is set in ncgen.l*/ } -#line 2666 "ncgeny.c" +#line 2666 "ncgen.tab.c" break; case 114: /* datasection: DATA */ #line 808 "ncgen.y" {} -#line 2672 "ncgeny.c" +#line 2672 "ncgen.tab.c" break; case 115: /* datasection: DATA datadecls */ #line 809 "ncgen.y" {} -#line 2678 "ncgeny.c" +#line 2678 "ncgen.tab.c" break; case 118: /* datadecl: varref '=' datalist */ #line 817 "ncgen.y" {(yyvsp[-2].sym)->data = (yyvsp[0].datalist);} -#line 2684 "ncgeny.c" +#line 2684 "ncgen.tab.c" break; case 119: /* datalist: datalist0 */ #line 820 "ncgen.y" {(yyval.datalist) = (yyvsp[0].datalist);} -#line 2690 "ncgeny.c" +#line 2690 "ncgen.tab.c" break; case 120: /* datalist: datalist1 */ #line 821 "ncgen.y" {(yyval.datalist) = (yyvsp[0].datalist);} -#line 2696 "ncgeny.c" +#line 2696 "ncgen.tab.c" break; case 121: /* datalist0: %empty */ #line 825 "ncgen.y" {(yyval.datalist) = builddatalist(0);} -#line 2702 "ncgeny.c" +#line 2702 "ncgen.tab.c" break; case 122: /* datalist1: dataitem */ #line 829 "ncgen.y" {(yyval.datalist) = const2list((yyvsp[0].constant));} -#line 2708 "ncgeny.c" +#line 2708 "ncgen.tab.c" break; case 123: /* datalist1: datalist ',' dataitem */ #line 831 "ncgen.y" {dlappend((yyvsp[-2].datalist),((yyvsp[0].constant))); (yyval.datalist)=(yyvsp[-2].datalist); } -#line 2714 "ncgeny.c" +#line 2714 "ncgen.tab.c" break; case 124: /* dataitem: constdata */ #line 835 "ncgen.y" {(yyval.constant)=(yyvsp[0].constant);} -#line 2720 "ncgeny.c" +#line 2720 "ncgen.tab.c" break; case 125: /* dataitem: '{' datalist '}' */ #line 836 "ncgen.y" {(yyval.constant)=builddatasublist((yyvsp[-1].datalist));} -#line 2726 "ncgeny.c" +#line 2726 "ncgen.tab.c" break; case 126: /* constdata: simpleconstant */ #line 840 "ncgen.y" {(yyval.constant)=(yyvsp[0].constant);} -#line 2732 "ncgeny.c" +#line 2732 "ncgen.tab.c" break; case 127: /* constdata: OPAQUESTRING */ #line 841 "ncgen.y" {(yyval.constant)=makeconstdata(NC_OPAQUE);} -#line 2738 "ncgeny.c" +#line 2738 "ncgen.tab.c" break; case 128: /* constdata: FILLMARKER */ #line 842 "ncgen.y" {(yyval.constant)=makeconstdata(NC_FILLVALUE);} -#line 2744 "ncgeny.c" +#line 2744 "ncgen.tab.c" break; case 129: /* constdata: NIL */ #line 843 "ncgen.y" {(yyval.constant)=makeconstdata(NC_NIL);} -#line 2750 "ncgeny.c" +#line 2750 "ncgen.tab.c" break; case 130: /* constdata: econstref */ #line 844 "ncgen.y" {(yyval.constant)=(yyvsp[0].constant);} -#line 2756 "ncgeny.c" +#line 2756 "ncgen.tab.c" break; case 132: /* econstref: path */ #line 849 "ncgen.y" {(yyval.constant) = makeenumconstref((yyvsp[0].sym));} -#line 2762 "ncgeny.c" +#line 2762 "ncgen.tab.c" break; case 133: /* function: ident '(' arglist ')' */ #line 853 "ncgen.y" {(yyval.constant)=evaluate((yyvsp[-3].sym),(yyvsp[-1].datalist));} -#line 2768 "ncgeny.c" +#line 2768 "ncgen.tab.c" break; case 134: /* arglist: simpleconstant */ #line 858 "ncgen.y" {(yyval.datalist) = const2list((yyvsp[0].constant));} -#line 2774 "ncgeny.c" +#line 2774 "ncgen.tab.c" break; case 135: /* arglist: arglist ',' simpleconstant */ #line 860 "ncgen.y" {dlappend((yyvsp[-2].datalist),((yyvsp[0].constant))); (yyval.datalist)=(yyvsp[-2].datalist);} -#line 2780 "ncgeny.c" +#line 2780 "ncgen.tab.c" break; case 136: /* simpleconstant: CHAR_CONST */ #line 864 "ncgen.y" {(yyval.constant)=makeconstdata(NC_CHAR);} -#line 2786 "ncgeny.c" +#line 2786 "ncgen.tab.c" break; case 137: /* simpleconstant: BYTE_CONST */ #line 865 "ncgen.y" {(yyval.constant)=makeconstdata(NC_BYTE);} -#line 2792 "ncgeny.c" +#line 2792 "ncgen.tab.c" break; case 138: /* simpleconstant: SHORT_CONST */ #line 866 "ncgen.y" {(yyval.constant)=makeconstdata(NC_SHORT);} -#line 2798 "ncgeny.c" +#line 2798 "ncgen.tab.c" break; case 139: /* simpleconstant: INT_CONST */ #line 867 "ncgen.y" {(yyval.constant)=makeconstdata(NC_INT);} -#line 2804 "ncgeny.c" +#line 2804 "ncgen.tab.c" break; case 140: /* simpleconstant: INT64_CONST */ #line 868 "ncgen.y" {(yyval.constant)=makeconstdata(NC_INT64);} -#line 2810 "ncgeny.c" +#line 2810 "ncgen.tab.c" break; case 141: /* simpleconstant: UBYTE_CONST */ #line 869 "ncgen.y" {(yyval.constant)=makeconstdata(NC_UBYTE);} -#line 2816 "ncgeny.c" +#line 2816 "ncgen.tab.c" break; case 142: /* simpleconstant: USHORT_CONST */ #line 870 "ncgen.y" {(yyval.constant)=makeconstdata(NC_USHORT);} -#line 2822 "ncgeny.c" +#line 2822 "ncgen.tab.c" break; case 143: /* simpleconstant: UINT_CONST */ #line 871 "ncgen.y" {(yyval.constant)=makeconstdata(NC_UINT);} -#line 2828 "ncgeny.c" +#line 2828 "ncgen.tab.c" break; case 144: /* simpleconstant: UINT64_CONST */ #line 872 "ncgen.y" {(yyval.constant)=makeconstdata(NC_UINT64);} -#line 2834 "ncgeny.c" +#line 2834 "ncgen.tab.c" break; case 145: /* simpleconstant: FLOAT_CONST */ #line 873 "ncgen.y" {(yyval.constant)=makeconstdata(NC_FLOAT);} -#line 2840 "ncgeny.c" +#line 2840 "ncgen.tab.c" break; case 146: /* simpleconstant: DOUBLE_CONST */ #line 874 "ncgen.y" {(yyval.constant)=makeconstdata(NC_DOUBLE);} -#line 2846 "ncgeny.c" +#line 2846 "ncgen.tab.c" break; case 147: /* simpleconstant: TERMSTRING */ #line 875 "ncgen.y" {(yyval.constant)=makeconstdata(NC_STRING);} -#line 2852 "ncgeny.c" +#line 2852 "ncgen.tab.c" break; case 148: /* intlist: constint */ #line 879 "ncgen.y" {(yyval.datalist) = const2list((yyvsp[0].constant));} -#line 2858 "ncgeny.c" +#line 2858 "ncgen.tab.c" break; case 149: /* intlist: intlist ',' constint */ #line 880 "ncgen.y" {(yyval.datalist)=(yyvsp[-2].datalist); dlappend((yyvsp[-2].datalist),((yyvsp[0].constant)));} -#line 2864 "ncgeny.c" +#line 2864 "ncgen.tab.c" break; case 150: /* constint: INT_CONST */ #line 885 "ncgen.y" {(yyval.constant)=makeconstdata(NC_INT);} -#line 2870 "ncgeny.c" +#line 2870 "ncgen.tab.c" break; case 151: /* constint: UINT_CONST */ #line 887 "ncgen.y" {(yyval.constant)=makeconstdata(NC_UINT);} -#line 2876 "ncgeny.c" +#line 2876 "ncgen.tab.c" break; case 152: /* constint: INT64_CONST */ #line 889 "ncgen.y" {(yyval.constant)=makeconstdata(NC_INT64);} -#line 2882 "ncgeny.c" +#line 2882 "ncgen.tab.c" break; case 153: /* constint: UINT64_CONST */ #line 891 "ncgen.y" {(yyval.constant)=makeconstdata(NC_UINT64);} -#line 2888 "ncgeny.c" +#line 2888 "ncgen.tab.c" break; case 154: /* conststring: TERMSTRING */ #line 895 "ncgen.y" {(yyval.constant)=makeconstdata(NC_STRING);} -#line 2894 "ncgeny.c" +#line 2894 "ncgen.tab.c" break; case 155: /* constbool: conststring */ #line 899 "ncgen.y" {(yyval.constant)=(yyvsp[0].constant);} -#line 2900 "ncgeny.c" +#line 2900 "ncgen.tab.c" break; case 156: /* constbool: constint */ #line 900 "ncgen.y" {(yyval.constant)=(yyvsp[0].constant);} -#line 2906 "ncgeny.c" +#line 2906 "ncgen.tab.c" break; case 157: /* varident: IDENT */ #line 908 "ncgen.y" {(yyval.sym)=(yyvsp[0].sym);} -#line 2912 "ncgeny.c" +#line 2912 "ncgen.tab.c" break; case 158: /* varident: DATA */ #line 909 "ncgen.y" {(yyval.sym)=identkeyword((yyvsp[0].sym));} -#line 2918 "ncgeny.c" +#line 2918 "ncgen.tab.c" break; case 159: /* ident: IDENT */ #line 913 "ncgen.y" {(yyval.sym)=(yyvsp[0].sym);} -#line 2924 "ncgeny.c" +#line 2924 "ncgen.tab.c" break; -#line 2928 "ncgeny.c" +#line 2928 "ncgen.tab.c" default: break; } diff --git a/ncgen/ncgeny.h b/ncgen/ncgen.tab.h similarity index 99% rename from ncgen/ncgeny.h rename to ncgen/ncgen.tab.h index eb71a91e65..616fd2c2d2 100644 --- a/ncgen/ncgeny.h +++ b/ncgen/ncgen.tab.h @@ -128,7 +128,7 @@ int nctype; /* for tracking attribute list type*/ Datalist* datalist; NCConstant* constant; -#line 132 "ncgeny.h" +#line 132 "ncgen.tab.h" }; typedef union YYSTYPE YYSTYPE; diff --git a/ncgen/ncgen.y b/ncgen/ncgen.y index 5f21b84f5d..4514175ab1 100644 --- a/ncgen/ncgen.y +++ b/ncgen/ncgen.y @@ -14,7 +14,7 @@ static char SccsId[] = "$Id: ncgen.y,v 1.42 2010/05/18 21:32:46 dmh Exp $"; */ #include "includes.h" #include "netcdf_aux.h" -#include "ncgeny.h" +#include "ncgen.tab.h" #include "ncgen.h" #ifdef USE_NETCDF4 #include "netcdf_filter.h" diff --git a/ncgen/ncgenl.c b/ncgen/ncgenl.c index 95ab09e2b3..05f327ca62 100644 --- a/ncgen/ncgenl.c +++ b/ncgen/ncgenl.c @@ -1,5 +1,5 @@ -#line 2 "ncgenl.c" +#line 3 "ncgenl.c" #define YY_INT_ALIGNED short int @@ -1623,7 +1623,7 @@ char *yytext; definition of FILL_STRING in ../ncdump/vardata.h */ #include "ncgen.h" -#include "ncgeny.h" +#include "ncgen.tab.h" #include "isnan.h" #define FILL_STRING "_" @@ -1731,7 +1731,7 @@ struct Specialtoken specials[] = { {NULL,0} /* null terminate */ }; -#line 1734 "ncgenl.c" +#line 1735 "ncgenl.c" /* The most correct (validating) version of UTF8 character set (Taken from: http://www.w3.org/2005/03/23-lex-U) @@ -1774,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 1777 "ncgenl.c" +#line 1778 "ncgenl.c" #define INITIAL 0 #define ST_C_COMMENT 1 @@ -1995,7 +1995,7 @@ YY_DECL { #line 226 "ncgen.l" -#line 1998 "ncgenl.c" +#line 1999 "ncgenl.c" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -2624,7 +2624,7 @@ YY_RULE_SETUP #line 600 "ncgen.l" ECHO; YY_BREAK -#line 2627 "ncgenl.c" +#line 2628 "ncgenl.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(TEXT): yyterminate(); @@ -3950,7 +3950,7 @@ identcheck(int token) } break; default: - break; + break; } return token; } diff --git a/oc2/CMakeLists.txt b/oc2/CMakeLists.txt index 01b2e998ee..3ae1d76ac1 100644 --- a/oc2/CMakeLists.txt +++ b/oc2/CMakeLists.txt @@ -4,7 +4,7 @@ # University Corporation for Atmospheric Research/Unidata. # See netcdf-c/COPYRIGHT file for more info. -set(oc_SOURCES oc.c daplex.c dapparse.c dapy.c occompile.c occurlfunctions.c ocdata.c ocdebug.c ocdump.c ocinternal.c ocnode.c ochttp.c ocread.c ocutil.c xxdr.c) +set(oc_SOURCES oc.c daplex.c dapparse.c dap.tab.c occompile.c occurlfunctions.c ocdata.c ocdebug.c ocdump.c ocinternal.c ocnode.c ochttp.c ocread.c ocutil.c xxdr.c) add_library(oc2 OBJECT ${oc_SOURCES}) diff --git a/oc2/Makefile.am b/oc2/Makefile.am index cf74b3deac..28f9241d1a 100644 --- a/oc2/Makefile.am +++ b/oc2/Makefile.am @@ -12,7 +12,7 @@ AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/include # OC Sources; include the dapy.[ch] to avoid the need for bison by user SRC=oc.c \ -daplex.c dapparse.c dapy.c \ +daplex.c dapparse.c dap.tab.c \ occompile.c occurlfunctions.c \ ocdata.c ocdebug.c ocdump.c \ ocinternal.c ocnode.c \ @@ -21,7 +21,7 @@ ocread.c ocutil.c \ xxdr.c HDRS=oc.h ocx.h \ -dapparselex.h dapy.h \ +dapparselex.h dap.tab.h \ occompile.h occonstraints.h occurlfunctions.h \ ocdata.h ocdatatypes.h ocdebug.h ocdump.h \ ocinternal.h ocnode.h \ @@ -40,8 +40,5 @@ liboc_la_CPPFLAGS = $(AM_CPPFLAGS) # autoconf will forcibly delete files of the name *.tab.* makeparser:: - rm -f dap.tab.c dap.tab.h dapy.c dapy.h - bison --debug -d -p dap dap.y - sed -e 's/dap[.]tab[.]c/dapy.c/g' -e 's/dap[.]tab[.]h/dapy.h/g' dapy.c - mv dap.tab.h dapy.h - rm -f dap.tab.c + rm -f dap.tab.c dap.tab.h + bison --debug --defines -p dap dap.y diff --git a/oc2/dapy.c b/oc2/dap.tab.c similarity index 97% rename from oc2/dapy.c rename to oc2/dap.tab.c index ec27df86fa..ea913c8dd3 100644 --- a/oc2/dapy.c +++ b/oc2/dap.tab.c @@ -76,10 +76,10 @@ #include "config.h" #include "dapparselex.h" -#include "dapy.h" +#include "dap.tab.h" int dapdebug = 0; -#line 83 "dapy.c" +#line 83 "dap.tab.c" # ifndef YY_CAST # ifdef __cplusplus @@ -102,7 +102,7 @@ int dapdebug = 0; # endif # endif -#include "dapy.h" +#include "dap.tab.h" /* Symbol kind. */ enum yysymbol_kind_t { @@ -1581,611 +1581,611 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); case 6: /* start: error */ #line 58 "dap.y" {dap_unrecognizedresponse(parsestate); YYABORT;} -#line 1585 "dapy.c" +#line 1585 "dap.tab.c" break; case 7: /* dataset: SCAN_DATASET */ #line 63 "dap.y" {dap_tagparse(parsestate,SCAN_DATASET);} -#line 1591 "dapy.c" +#line 1591 "dap.tab.c" break; case 8: /* attr: SCAN_ATTR */ #line 67 "dap.y" {dap_tagparse(parsestate,SCAN_ATTR);} -#line 1597 "dapy.c" +#line 1597 "dap.tab.c" break; case 9: /* err: SCAN_ERROR */ #line 71 "dap.y" {dap_tagparse(parsestate,SCAN_ERROR);} -#line 1603 "dapy.c" +#line 1603 "dap.tab.c" break; case 10: /* datasetbody: '{' declarations '}' datasetname ';' */ #line 76 "dap.y" {dap_datasetbody(parsestate,yyvsp[-1],yyvsp[-3]);} -#line 1609 "dapy.c" +#line 1609 "dap.tab.c" break; case 11: /* declarations: %empty */ #line 81 "dap.y" {yyval=dap_declarations(parsestate,null,null);} -#line 1615 "dapy.c" +#line 1615 "dap.tab.c" break; case 12: /* declarations: declarations declaration */ #line 82 "dap.y" {yyval=dap_declarations(parsestate,yyvsp[-1],yyvsp[0]);} -#line 1621 "dapy.c" +#line 1621 "dap.tab.c" break; case 13: /* declaration: base_type var_name array_decls ';' */ #line 89 "dap.y" {yyval=dap_makebase(parsestate,yyvsp[-2],yyvsp[-3],yyvsp[-1]);} -#line 1627 "dapy.c" +#line 1627 "dap.tab.c" break; case 14: /* declaration: SCAN_STRUCTURE '{' declarations '}' var_name array_decls ';' */ #line 91 "dap.y" {if((yyval=dap_makestructure(parsestate,yyvsp[-2],yyvsp[-1],yyvsp[-4]))==null) {YYABORT;}} -#line 1633 "dapy.c" +#line 1633 "dap.tab.c" break; case 15: /* declaration: SCAN_SEQUENCE '{' declarations '}' var_name ';' */ #line 93 "dap.y" {if((yyval=dap_makesequence(parsestate,yyvsp[-1],yyvsp[-3]))==null) {YYABORT;}} -#line 1639 "dapy.c" +#line 1639 "dap.tab.c" break; case 16: /* declaration: SCAN_GRID '{' SCAN_ARRAY ':' declaration SCAN_MAPS ':' declarations '}' var_name ';' */ #line 96 "dap.y" {if((yyval=dap_makegrid(parsestate,yyvsp[-1],yyvsp[-6],yyvsp[-3]))==null) {YYABORT;}} -#line 1645 "dapy.c" +#line 1645 "dap.tab.c" break; case 17: /* declaration: error */ #line 98 "dap.y" {dapsemanticerror(parsestate,OC_EBADTYPE,"Unrecognized type"); YYABORT;} -#line 1651 "dapy.c" +#line 1651 "dap.tab.c" break; case 18: /* base_type: SCAN_BYTE */ #line 103 "dap.y" {yyval=(Object)SCAN_BYTE;} -#line 1657 "dapy.c" +#line 1657 "dap.tab.c" break; case 19: /* base_type: SCAN_INT16 */ #line 104 "dap.y" {yyval=(Object)SCAN_INT16;} -#line 1663 "dapy.c" +#line 1663 "dap.tab.c" break; case 20: /* base_type: SCAN_UINT16 */ #line 105 "dap.y" {yyval=(Object)SCAN_UINT16;} -#line 1669 "dapy.c" +#line 1669 "dap.tab.c" break; case 21: /* base_type: SCAN_INT32 */ #line 106 "dap.y" {yyval=(Object)SCAN_INT32;} -#line 1675 "dapy.c" +#line 1675 "dap.tab.c" break; case 22: /* base_type: SCAN_UINT32 */ #line 107 "dap.y" {yyval=(Object)SCAN_UINT32;} -#line 1681 "dapy.c" +#line 1681 "dap.tab.c" break; case 23: /* base_type: SCAN_FLOAT32 */ #line 108 "dap.y" {yyval=(Object)SCAN_FLOAT32;} -#line 1687 "dapy.c" +#line 1687 "dap.tab.c" break; case 24: /* base_type: SCAN_FLOAT64 */ #line 109 "dap.y" {yyval=(Object)SCAN_FLOAT64;} -#line 1693 "dapy.c" +#line 1693 "dap.tab.c" break; case 25: /* base_type: SCAN_URL */ #line 110 "dap.y" {yyval=(Object)SCAN_URL;} -#line 1699 "dapy.c" +#line 1699 "dap.tab.c" break; case 26: /* base_type: SCAN_STRING */ #line 111 "dap.y" {yyval=(Object)SCAN_STRING;} -#line 1705 "dapy.c" +#line 1705 "dap.tab.c" break; case 27: /* array_decls: %empty */ #line 115 "dap.y" {yyval=dap_arraydecls(parsestate,null,null);} -#line 1711 "dapy.c" +#line 1711 "dap.tab.c" break; case 28: /* array_decls: array_decls array_decl */ #line 116 "dap.y" {yyval=dap_arraydecls(parsestate,yyvsp[-1],yyvsp[0]);} -#line 1717 "dapy.c" +#line 1717 "dap.tab.c" break; case 29: /* array_decl: '[' WORD_WORD ']' */ #line 120 "dap.y" {yyval=dap_arraydecl(parsestate,null,yyvsp[-1]);} -#line 1723 "dapy.c" +#line 1723 "dap.tab.c" break; case 30: /* array_decl: '[' '=' WORD_WORD ']' */ #line 121 "dap.y" {yyval=dap_arraydecl(parsestate,null,yyvsp[-1]);} -#line 1729 "dapy.c" +#line 1729 "dap.tab.c" break; case 31: /* array_decl: '[' name '=' WORD_WORD ']' */ #line 122 "dap.y" {yyval=dap_arraydecl(parsestate,yyvsp[-3],yyvsp[-1]);} -#line 1735 "dapy.c" +#line 1735 "dap.tab.c" break; case 32: /* array_decl: error */ #line 124 "dap.y" {dapsemanticerror(parsestate,OC_EDIMSIZE,"Illegal dimension declaration"); YYABORT;} -#line 1741 "dapy.c" +#line 1741 "dap.tab.c" break; case 33: /* datasetname: var_name */ #line 128 "dap.y" {yyval=yyvsp[0];} -#line 1747 "dapy.c" +#line 1747 "dap.tab.c" break; case 34: /* datasetname: error */ #line 130 "dap.y" {dapsemanticerror(parsestate,OC_EDDS,"Illegal dataset declaration"); YYABORT;} -#line 1753 "dapy.c" +#line 1753 "dap.tab.c" break; case 35: /* var_name: name */ #line 133 "dap.y" {yyval=yyvsp[0];} -#line 1759 "dapy.c" +#line 1759 "dap.tab.c" break; case 36: /* attributebody: '{' attr_list '}' */ #line 136 "dap.y" {dap_attributebody(parsestate,yyvsp[-1]);} -#line 1765 "dapy.c" +#line 1765 "dap.tab.c" break; case 37: /* attributebody: error */ #line 138 "dap.y" {dapsemanticerror(parsestate,OC_EDAS,"Illegal DAS body"); YYABORT;} -#line 1771 "dapy.c" +#line 1771 "dap.tab.c" break; case 38: /* attr_list: %empty */ #line 142 "dap.y" {yyval=dap_attrlist(parsestate,null,null);} -#line 1777 "dapy.c" +#line 1777 "dap.tab.c" break; case 39: /* attr_list: attr_list attribute */ #line 143 "dap.y" {yyval=dap_attrlist(parsestate,yyvsp[-1],yyvsp[0]);} -#line 1783 "dapy.c" +#line 1783 "dap.tab.c" break; case 40: /* attribute: alias ';' */ #line 147 "dap.y" {yyval=null;} -#line 1789 "dapy.c" +#line 1789 "dap.tab.c" break; case 41: /* attribute: SCAN_BYTE name bytes ';' */ #line 149 "dap.y" {yyval=dap_attribute(parsestate,yyvsp[-2],yyvsp[-1],(Object)SCAN_BYTE);} -#line 1795 "dapy.c" +#line 1795 "dap.tab.c" break; case 42: /* attribute: SCAN_INT16 name int16 ';' */ #line 151 "dap.y" {yyval=dap_attribute(parsestate,yyvsp[-2],yyvsp[-1],(Object)SCAN_INT16);} -#line 1801 "dapy.c" +#line 1801 "dap.tab.c" break; case 43: /* attribute: SCAN_UINT16 name uint16 ';' */ #line 153 "dap.y" {yyval=dap_attribute(parsestate,yyvsp[-2],yyvsp[-1],(Object)SCAN_UINT16);} -#line 1807 "dapy.c" +#line 1807 "dap.tab.c" break; case 44: /* attribute: SCAN_INT32 name int32 ';' */ #line 155 "dap.y" {yyval=dap_attribute(parsestate,yyvsp[-2],yyvsp[-1],(Object)SCAN_INT32);} -#line 1813 "dapy.c" +#line 1813 "dap.tab.c" break; case 45: /* attribute: SCAN_UINT32 name uint32 ';' */ #line 157 "dap.y" {yyval=dap_attribute(parsestate,yyvsp[-2],yyvsp[-1],(Object)SCAN_UINT32);} -#line 1819 "dapy.c" +#line 1819 "dap.tab.c" break; case 46: /* attribute: SCAN_FLOAT32 name float32 ';' */ #line 159 "dap.y" {yyval=dap_attribute(parsestate,yyvsp[-2],yyvsp[-1],(Object)SCAN_FLOAT32);} -#line 1825 "dapy.c" +#line 1825 "dap.tab.c" break; case 47: /* attribute: SCAN_FLOAT64 name float64 ';' */ #line 161 "dap.y" {yyval=dap_attribute(parsestate,yyvsp[-2],yyvsp[-1],(Object)SCAN_FLOAT64);} -#line 1831 "dapy.c" +#line 1831 "dap.tab.c" break; case 48: /* attribute: SCAN_STRING name strs ';' */ #line 163 "dap.y" {yyval=dap_attribute(parsestate,yyvsp[-2],yyvsp[-1],(Object)SCAN_STRING);} -#line 1837 "dapy.c" +#line 1837 "dap.tab.c" break; case 49: /* attribute: SCAN_URL name urls ';' */ #line 165 "dap.y" {yyval=dap_attribute(parsestate,yyvsp[-2],yyvsp[-1],(Object)SCAN_URL);} -#line 1843 "dapy.c" +#line 1843 "dap.tab.c" break; case 50: /* attribute: name '{' attr_list '}' */ #line 166 "dap.y" {yyval=dap_attrset(parsestate,yyvsp[-3],yyvsp[-1]);} -#line 1849 "dapy.c" +#line 1849 "dap.tab.c" break; case 51: /* attribute: error */ #line 168 "dap.y" {dapsemanticerror(parsestate,OC_EDAS,"Illegal attribute"); YYABORT;} -#line 1855 "dapy.c" +#line 1855 "dap.tab.c" break; case 52: /* bytes: WORD_WORD */ #line 172 "dap.y" {yyval=dap_attrvalue(parsestate,null,yyvsp[0],(Object)SCAN_BYTE);} -#line 1861 "dapy.c" +#line 1861 "dap.tab.c" break; case 53: /* bytes: bytes ',' WORD_WORD */ #line 174 "dap.y" {yyval=dap_attrvalue(parsestate,yyvsp[-2],yyvsp[0],(Object)SCAN_BYTE);} -#line 1867 "dapy.c" +#line 1867 "dap.tab.c" break; case 54: /* int16: WORD_WORD */ #line 177 "dap.y" {yyval=dap_attrvalue(parsestate,null,yyvsp[0],(Object)SCAN_INT16);} -#line 1873 "dapy.c" +#line 1873 "dap.tab.c" break; case 55: /* int16: int16 ',' WORD_WORD */ #line 179 "dap.y" {yyval=dap_attrvalue(parsestate,yyvsp[-2],yyvsp[0],(Object)SCAN_INT16);} -#line 1879 "dapy.c" +#line 1879 "dap.tab.c" break; case 56: /* uint16: WORD_WORD */ #line 182 "dap.y" {yyval=dap_attrvalue(parsestate,null,yyvsp[0],(Object)SCAN_UINT16);} -#line 1885 "dapy.c" +#line 1885 "dap.tab.c" break; case 57: /* uint16: uint16 ',' WORD_WORD */ #line 184 "dap.y" {yyval=dap_attrvalue(parsestate,yyvsp[-2],yyvsp[0],(Object)SCAN_UINT16);} -#line 1891 "dapy.c" +#line 1891 "dap.tab.c" break; case 58: /* int32: WORD_WORD */ #line 187 "dap.y" {yyval=dap_attrvalue(parsestate,null,yyvsp[0],(Object)SCAN_INT32);} -#line 1897 "dapy.c" +#line 1897 "dap.tab.c" break; case 59: /* int32: int32 ',' WORD_WORD */ #line 189 "dap.y" {yyval=dap_attrvalue(parsestate,yyvsp[-2],yyvsp[0],(Object)SCAN_INT32);} -#line 1903 "dapy.c" +#line 1903 "dap.tab.c" break; case 60: /* uint32: WORD_WORD */ #line 192 "dap.y" {yyval=dap_attrvalue(parsestate,null,yyvsp[0],(Object)SCAN_UINT32);} -#line 1909 "dapy.c" +#line 1909 "dap.tab.c" break; case 61: /* uint32: uint32 ',' WORD_WORD */ #line 193 "dap.y" {yyval=dap_attrvalue(parsestate,yyvsp[-2],yyvsp[0],(Object)SCAN_UINT32);} -#line 1915 "dapy.c" +#line 1915 "dap.tab.c" break; case 62: /* float32: WORD_WORD */ #line 196 "dap.y" {yyval=dap_attrvalue(parsestate,null,yyvsp[0],(Object)SCAN_FLOAT32);} -#line 1921 "dapy.c" +#line 1921 "dap.tab.c" break; case 63: /* float32: float32 ',' WORD_WORD */ #line 197 "dap.y" {yyval=dap_attrvalue(parsestate,yyvsp[-2],yyvsp[0],(Object)SCAN_FLOAT32);} -#line 1927 "dapy.c" +#line 1927 "dap.tab.c" break; case 64: /* float64: WORD_WORD */ #line 200 "dap.y" {yyval=dap_attrvalue(parsestate,null,yyvsp[0],(Object)SCAN_FLOAT64);} -#line 1933 "dapy.c" +#line 1933 "dap.tab.c" break; case 65: /* float64: float64 ',' WORD_WORD */ #line 201 "dap.y" {yyval=dap_attrvalue(parsestate,yyvsp[-2],yyvsp[0],(Object)SCAN_FLOAT64);} -#line 1939 "dapy.c" +#line 1939 "dap.tab.c" break; case 66: /* strs: str_or_id */ #line 204 "dap.y" {yyval=dap_attrvalue(parsestate,null,yyvsp[0],(Object)SCAN_STRING);} -#line 1945 "dapy.c" +#line 1945 "dap.tab.c" break; case 67: /* strs: strs ',' str_or_id */ #line 205 "dap.y" {yyval=dap_attrvalue(parsestate,yyvsp[-2],yyvsp[0],(Object)SCAN_STRING);} -#line 1951 "dapy.c" +#line 1951 "dap.tab.c" break; case 68: /* urls: url */ #line 209 "dap.y" {yyval=dap_attrvalue(parsestate,null,yyvsp[0],(Object)SCAN_URL);} -#line 1957 "dapy.c" +#line 1957 "dap.tab.c" break; case 69: /* urls: urls ',' url */ #line 210 "dap.y" {yyval=dap_attrvalue(parsestate,yyvsp[-2],yyvsp[0],(Object)SCAN_URL);} -#line 1963 "dapy.c" +#line 1963 "dap.tab.c" break; case 70: /* url: str_or_id */ #line 214 "dap.y" {yyval=yyvsp[0];} -#line 1969 "dapy.c" +#line 1969 "dap.tab.c" break; case 71: /* str_or_id: name */ #line 218 "dap.y" {yyval=yyvsp[0];} -#line 1975 "dapy.c" +#line 1975 "dap.tab.c" break; case 72: /* str_or_id: WORD_STRING */ #line 219 "dap.y" {yyval=yyvsp[0];} -#line 1981 "dapy.c" +#line 1981 "dap.tab.c" break; case 73: /* alias: SCAN_ALIAS WORD_WORD WORD_WORD */ #line 230 "dap.y" {yyval=yyvsp[-1]; yyval=yyvsp[0]; yyval=null;} -#line 1987 "dapy.c" +#line 1987 "dap.tab.c" break; case 74: /* errorbody: '{' errorcode errormsg errorptype errorprog '}' ';' */ #line 235 "dap.y" {dap_errorbody(parsestate,yyvsp[-5],yyvsp[-4],yyvsp[-3],yyvsp[-2]);} -#line 1993 "dapy.c" +#line 1993 "dap.tab.c" break; case 75: /* errorcode: %empty */ #line 238 "dap.y" {yyval=null;} -#line 1999 "dapy.c" +#line 1999 "dap.tab.c" break; case 76: /* errorcode: SCAN_CODE '=' WORD_WORD ';' */ #line 238 "dap.y" {yyval=yyvsp[-1];} -#line 2005 "dapy.c" +#line 2005 "dap.tab.c" break; case 77: /* errormsg: %empty */ #line 239 "dap.y" {yyval=null;} -#line 2011 "dapy.c" +#line 2011 "dap.tab.c" break; case 78: /* errormsg: SCAN_MESSAGE '=' WORD_STRING ';' */ #line 239 "dap.y" {yyval=yyvsp[-1];} -#line 2017 "dapy.c" +#line 2017 "dap.tab.c" break; case 79: /* errorptype: %empty */ #line 240 "dap.y" {yyval=null;} -#line 2023 "dapy.c" +#line 2023 "dap.tab.c" break; case 80: /* errorptype: SCAN_PTYPE '=' WORD_WORD ';' */ #line 240 "dap.y" {yyval=yyvsp[-1];} -#line 2029 "dapy.c" +#line 2029 "dap.tab.c" break; case 81: /* errorprog: %empty */ #line 241 "dap.y" {yyval=null;} -#line 2035 "dapy.c" +#line 2035 "dap.tab.c" break; case 82: /* errorprog: SCAN_PROG '=' WORD_WORD ';' */ #line 241 "dap.y" {yyval=yyvsp[-1];} -#line 2041 "dapy.c" +#line 2041 "dap.tab.c" break; case 83: /* name: WORD_WORD */ #line 247 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2047 "dapy.c" +#line 2047 "dap.tab.c" break; case 84: /* name: SCAN_ALIAS */ #line 248 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2053 "dapy.c" +#line 2053 "dap.tab.c" break; case 85: /* name: SCAN_ARRAY */ #line 249 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2059 "dapy.c" +#line 2059 "dap.tab.c" break; case 86: /* name: SCAN_ATTR */ #line 250 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2065 "dapy.c" +#line 2065 "dap.tab.c" break; case 87: /* name: SCAN_BYTE */ #line 251 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2071 "dapy.c" +#line 2071 "dap.tab.c" break; case 88: /* name: SCAN_DATASET */ #line 252 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2077 "dapy.c" +#line 2077 "dap.tab.c" break; case 89: /* name: SCAN_DATA */ #line 253 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2083 "dapy.c" +#line 2083 "dap.tab.c" break; case 90: /* name: SCAN_ERROR */ #line 254 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2089 "dapy.c" +#line 2089 "dap.tab.c" break; case 91: /* name: SCAN_FLOAT32 */ #line 255 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2095 "dapy.c" +#line 2095 "dap.tab.c" break; case 92: /* name: SCAN_FLOAT64 */ #line 256 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2101 "dapy.c" +#line 2101 "dap.tab.c" break; case 93: /* name: SCAN_GRID */ #line 257 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2107 "dapy.c" +#line 2107 "dap.tab.c" break; case 94: /* name: SCAN_INT16 */ #line 258 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2113 "dapy.c" +#line 2113 "dap.tab.c" break; case 95: /* name: SCAN_INT32 */ #line 259 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2119 "dapy.c" +#line 2119 "dap.tab.c" break; case 96: /* name: SCAN_MAPS */ #line 260 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2125 "dapy.c" +#line 2125 "dap.tab.c" break; case 97: /* name: SCAN_SEQUENCE */ #line 261 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2131 "dapy.c" +#line 2131 "dap.tab.c" break; case 98: /* name: SCAN_STRING */ #line 262 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2137 "dapy.c" +#line 2137 "dap.tab.c" break; case 99: /* name: SCAN_STRUCTURE */ #line 263 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2143 "dapy.c" +#line 2143 "dap.tab.c" break; case 100: /* name: SCAN_UINT16 */ #line 264 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2149 "dapy.c" +#line 2149 "dap.tab.c" break; case 101: /* name: SCAN_UINT32 */ #line 265 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2155 "dapy.c" +#line 2155 "dap.tab.c" break; case 102: /* name: SCAN_URL */ #line 266 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2161 "dapy.c" +#line 2161 "dap.tab.c" break; case 103: /* name: SCAN_CODE */ #line 267 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2167 "dapy.c" +#line 2167 "dap.tab.c" break; case 104: /* name: SCAN_MESSAGE */ #line 268 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2173 "dapy.c" +#line 2173 "dap.tab.c" break; case 105: /* name: SCAN_PROG */ #line 269 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2179 "dapy.c" +#line 2179 "dap.tab.c" break; case 106: /* name: SCAN_PTYPE */ #line 270 "dap.y" {yyval=dapdecode(parsestate->lexstate,yyvsp[0]);} -#line 2185 "dapy.c" +#line 2185 "dap.tab.c" break; -#line 2189 "dapy.c" +#line 2189 "dap.tab.c" default: break; } diff --git a/oc2/dapy.h b/oc2/dap.tab.h similarity index 100% rename from oc2/dapy.h rename to oc2/dap.tab.h diff --git a/oc2/dap.y b/oc2/dap.y index 11bb9db353..0cef981c0e 100644 --- a/oc2/dap.y +++ b/oc2/dap.y @@ -11,7 +11,7 @@ %{ #include "config.h" #include "dapparselex.h" -#include "dapy.h" +#include "dap.tab.h" int dapdebug = 0; %} diff --git a/oc2/daplex.c b/oc2/daplex.c index 84ea4c967c..e6c6e36c3a 100644 --- a/oc2/daplex.c +++ b/oc2/daplex.c @@ -8,7 +8,7 @@ #include "oc.h" #include "dapparselex.h" -#include "dapy.h" +#include "dap.tab.h" #undef URLCVT /* NEVER turn this on */ diff --git a/oc2/dapparse.c b/oc2/dapparse.c index 84103c5661..b63a490e71 100644 --- a/oc2/dapparse.c +++ b/oc2/dapparse.c @@ -4,7 +4,7 @@ #include "config.h" #include "dapparselex.h" -#include "dapy.h" +#include "dap.tab.h" #include /* Forward */