diff --git a/cf b/cf index b634c90ad..3623cf70d 100644 --- a/cf +++ b/cf @@ -1,7 +1,7 @@ #!/bin/bash #X="-x" -#HDF5=1 +HDF5=1 DAP=1 #CDMR=1 diff --git a/examples/CDL/create_sample_files.sh b/examples/CDL/create_sample_files.sh index 320c6cc05..f2fa5a529 100755 --- a/examples/CDL/create_sample_files.sh +++ b/examples/CDL/create_sample_files.sh @@ -6,13 +6,13 @@ set -e echo "" echo "*** Creating example data files from CDL scripts." echo "*** creating simple_xy.nc..." -../../ncgen/ncgen -o simple_xy.nc $srcdir/simple_xy.cdl +../../ncgen/ncgen -b -o simple_xy.nc $srcdir/simple_xy.cdl echo "*** checking sfc_pres_temp.nc..." -../../ncgen/ncgen -o sfc_pres_temp.nc $srcdir/sfc_pres_temp.cdl +../../ncgen/ncgen -b -o sfc_pres_temp.nc $srcdir/sfc_pres_temp.cdl echo "*** checking pres_temp_4D.nc..." -../../ncgen/ncgen -o pres_temp_4D.nc $srcdir/pres_temp_4D.cdl +../../ncgen/ncgen -b -o pres_temp_4D.nc $srcdir/pres_temp_4D.cdl echo "*** All example creations worked!" exit 0 diff --git a/ncdump/run_tests.sh b/ncdump/run_tests.sh index b9690c262..b3314cefe 100755 --- a/ncdump/run_tests.sh +++ b/ncdump/run_tests.sh @@ -6,7 +6,7 @@ set -e echo "" echo "*** Testing ncgen and ncdump using some test CDL files." echo "*** creating tst_small.nc from ref_tst_small.cdl..." -../ncgen/ncgen -o tst_small.nc $srcdir/ref_tst_small.cdl +../ncgen/ncgen -b -o tst_small.nc $srcdir/ref_tst_small.cdl echo "*** creating tst_small.cdl from tst_small.nc..." ./ncdump tst_small.nc > tst_small.cdl diff -w tst_small.cdl $srcdir/ref_tst_small.cdl diff --git a/ncdump/tst_ncgen4_cycle.sh b/ncdump/tst_ncgen4_cycle.sh index 0fb03c025..ecb94f11c 100755 --- a/ncdump/tst_ncgen4_cycle.sh +++ b/ncdump/tst_ncgen4_cycle.sh @@ -33,12 +33,12 @@ for x in ${TESTSET} ; do else rm -f ${x}.nc ${x}.dmp # step 1: use original cdl to build the .nc - ${builddir}/../ncgen/ncgen -k${KFLAG} -o ${x}.nc ${cdl}/${x}.cdl + ${builddir}/../ncgen/ncgen -b -k${KFLAG} -o ${x}.nc ${cdl}/${x}.cdl # step 2: dump .nc file ${builddir}/../ncdump/ncdump ${headflag} ${specflag} ${x}.nc > ${x}.dmp # step 3: use ncdump output to (re-)build the .nc rm -f ${x}.nc - ${builddir}/../ncgen/ncgen -k${KFLAG} -o ${x}.nc ${x}.dmp + ${builddir}/../ncgen/ncgen -b -k${KFLAG} -o ${x}.nc ${x}.dmp # step 4: dump .nc file again ${builddir}/../ncdump/ncdump ${headflag} ${specflag} ${x}.nc > ${x}.dmp2 # compare the two ncdump outputs diff --git a/ncdump/tst_ncgen4_diff.sh b/ncdump/tst_ncgen4_diff.sh index 9181532d3..7f5ba35bc 100755 --- a/ncdump/tst_ncgen4_diff.sh +++ b/ncdump/tst_ncgen4_diff.sh @@ -31,7 +31,7 @@ for x in ${TESTSET} ; do if test "x${t}" = "x${x}" ; then isxfail=1; fi done rm -f ${x}.nc ${x}.dmp - ${builddir}/../ncgen/ncgen -k${KFLAG} -o ${x}.nc ${cdl}/${x}.cdl + ${builddir}/../ncgen/ncgen -b -k${KFLAG} -o ${x}.nc ${cdl}/${x}.cdl # dump .nc file ${builddir}/../ncdump/ncdump ${headflag} ${specflag} ${x}.nc > ${x}.dmp # compare the expected (silently if XFAIL) diff --git a/ncgen/main.c b/ncgen/main.c index 22a55980d..57e141962 100644 --- a/ncgen/main.c +++ b/ncgen/main.c @@ -18,9 +18,6 @@ extern void init_netcdf(void); extern void parse_init(void); extern int ncgparse(void); -/* Default is netcdf-3 mode 1 */ -#define DFALTCMODE 0 - /* For error messages */ char* progname; char* cdlname; @@ -34,6 +31,7 @@ int binary_flag; int f77_flag; int cml_flag; int java_flag; /* 1=> use netcdf java interface (=>usingclassic)*/ +int syntax_only; size_t nciterbuffersize; @@ -156,6 +154,7 @@ main( kflag_flag = 0; cmode_modifier = 0; nofill_flag = 0; + syntax_only = 0; mainname = "main"; nciterbuffersize = 0; @@ -258,15 +257,15 @@ main( } /* check for multiple or no language spec */ - if(c_flag) languages++; if(binary_flag) languages++; + if(c_flag) languages++; if(f77_flag)languages++; if(cml_flag) languages++; if(java_flag) languages++; if(languages > 1) { fprintf(stderr,"Please specify only one language\n"); } else if(languages == 0) { - binary_flag = 1; /* binary is default */ + syntax_only = 1; } /* Compute/default the iterator buffer size */ @@ -382,7 +381,8 @@ main( #endif processsemantics(); - define_netcdf(); + if(!syntax_only) + define_netcdf(); return 0; } diff --git a/ncgen/ncgen.y b/ncgen/ncgen.y index 7d30b5863..b84e8cbb8 100644 --- a/ncgen/ncgen.y +++ b/ncgen/ncgen.y @@ -6,6 +6,8 @@ /* yacc source for "ncgen", a netCDL parser and netCDF generator */ +%error-verbose + %{ /* static char SccsId[] = "$Id: ncgen.y,v 1.42 2010/05/18 21:32:46 dmh Exp $"; diff --git a/ncgen/ncgentab.c b/ncgen/ncgentab.c index ee4a57a82..28427ee2d 100644 --- a/ncgen/ncgentab.c +++ b/ncgen/ncgentab.c @@ -75,7 +75,7 @@ /* Copy the first part of user declarations. */ /* Line 189 of yacc.c */ -#line 9 "ncgen.y" +#line 11 "ncgen.y" /* static char SccsId[] = "$Id: ncgen.y,v 1.42 2010/05/18 21:32:46 dmh Exp $"; @@ -202,7 +202,7 @@ extern int lex_init(void); # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else -# define YYERROR_VERBOSE 0 +# define YYERROR_VERBOSE 1 #endif /* Enabling the token table. */ @@ -274,7 +274,7 @@ typedef union YYSTYPE { /* Line 214 of yacc.c */ -#line 124 "ncgen.y" +#line 126 "ncgen.y" Symbol* sym; unsigned long size; /* allow for zero size to indicate e.g. UNLIMITED*/ @@ -639,21 +639,21 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 199, 199, 205, 212, 219, 219, 222, 231, 221, - 236, 237, 238, 242, 242, 244, 254, 254, 257, 258, - 259, 260, 263, 263, 266, 296, 298, 315, 324, 336, - 350, 383, 384, 387, 401, 402, 403, 404, 405, 406, - 407, 408, 409, 410, 411, 414, 415, 416, 419, 420, - 423, 423, 425, 426, 430, 434, 442, 452, 464, 476, - 477, 478, 481, 482, 485, 485, 487, 509, 513, 517, - 544, 545, 548, 549, 553, 567, 571, 576, 605, 606, - 610, 611, 616, 626, 646, 657, 668, 687, 694, 694, - 697, 699, 708, 719, 721, 723, 725, 727, 729, 731, - 733, 735, 737, 744, 750, 759, 760, 761, 764, 765, - 768, 772, 773, 777, 781, 782, 787, 788, 792, 793, - 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, - 804, 805, 806, 810, 811, 815, 817, 819, 821, 826, - 830, 831 + 0, 201, 201, 207, 214, 221, 221, 224, 233, 223, + 238, 239, 240, 244, 244, 246, 256, 256, 259, 260, + 261, 262, 265, 265, 268, 298, 300, 317, 326, 338, + 352, 385, 386, 389, 403, 404, 405, 406, 407, 408, + 409, 410, 411, 412, 413, 416, 417, 418, 421, 422, + 425, 425, 427, 428, 432, 436, 444, 454, 466, 478, + 479, 480, 483, 484, 487, 487, 489, 511, 515, 519, + 546, 547, 550, 551, 555, 569, 573, 578, 607, 608, + 612, 613, 618, 628, 648, 659, 670, 689, 696, 696, + 699, 701, 710, 721, 723, 725, 727, 729, 731, 733, + 735, 737, 739, 746, 752, 761, 762, 763, 766, 767, + 770, 774, 775, 779, 783, 784, 789, 790, 794, 795, + 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, + 806, 807, 808, 812, 813, 817, 819, 821, 823, 828, + 832, 833 }; #endif @@ -1760,14 +1760,14 @@ yyreduce: case 2: /* Line 1464 of yacc.c */ -#line 202 "ncgen.y" +#line 204 "ncgen.y" {if (derror_count > 0) exit(6);;} break; case 7: /* Line 1464 of yacc.c */ -#line 222 "ncgen.y" +#line 224 "ncgen.y" { Symbol* id = (yyvsp[(2) - (3)].sym); markcdf4("Group specification"); @@ -1780,28 +1780,28 @@ yyreduce: case 8: /* Line 1464 of yacc.c */ -#line 231 "ncgen.y" +#line 233 "ncgen.y" {listpop(groupstack);;} break; case 11: /* Line 1464 of yacc.c */ -#line 237 "ncgen.y" +#line 239 "ncgen.y" {;} break; case 12: /* Line 1464 of yacc.c */ -#line 239 "ncgen.y" +#line 241 "ncgen.y" {markcdf4("Type specification");;} break; case 15: /* Line 1464 of yacc.c */ -#line 245 "ncgen.y" +#line 247 "ncgen.y" { /* Use when defining a type */ (yyvsp[(1) - (1)].sym)->objectclass = NC_TYPE; if(dupobjectcheck(NC_TYPE,(yyvsp[(1) - (1)].sym))) @@ -1814,21 +1814,21 @@ yyreduce: case 16: /* Line 1464 of yacc.c */ -#line 254 "ncgen.y" +#line 256 "ncgen.y" {;} break; case 17: /* Line 1464 of yacc.c */ -#line 254 "ncgen.y" +#line 256 "ncgen.y" {;} break; case 24: /* Line 1464 of yacc.c */ -#line 268 "ncgen.y" +#line 270 "ncgen.y" { int i; addtogroup((yyvsp[(3) - (6)].sym)); /* sets prefix*/ @@ -1860,14 +1860,14 @@ yyreduce: case 25: /* Line 1464 of yacc.c */ -#line 297 "ncgen.y" +#line 299 "ncgen.y" {(yyval.mark)=listlength(stack); listpush(stack,(elem_t)(yyvsp[(1) - (1)].sym));;} break; case 26: /* Line 1464 of yacc.c */ -#line 299 "ncgen.y" +#line 301 "ncgen.y" { int i; (yyval.mark)=(yyvsp[(1) - (3)].mark); @@ -1887,7 +1887,7 @@ yyreduce: case 27: /* Line 1464 of yacc.c */ -#line 316 "ncgen.y" +#line 318 "ncgen.y" { (yyvsp[(1) - (3)].sym)->objectclass=NC_TYPE; (yyvsp[(1) - (3)].sym)->subclass=NC_ECONST; @@ -1899,7 +1899,7 @@ yyreduce: case 28: /* Line 1464 of yacc.c */ -#line 325 "ncgen.y" +#line 327 "ncgen.y" { vercheck(NC_OPAQUE); addtogroup((yyvsp[(5) - (5)].sym)); /*sets prefix*/ @@ -1914,7 +1914,7 @@ yyreduce: case 29: /* Line 1464 of yacc.c */ -#line 337 "ncgen.y" +#line 339 "ncgen.y" { Symbol* basetype = (yyvsp[(1) - (5)].sym); vercheck(NC_VLEN); @@ -1931,7 +1931,7 @@ yyreduce: case 30: /* Line 1464 of yacc.c */ -#line 351 "ncgen.y" +#line 353 "ncgen.y" { int i,j; vercheck(NC_COMPOUND); @@ -1966,21 +1966,21 @@ yyreduce: case 31: /* Line 1464 of yacc.c */ -#line 383 "ncgen.y" +#line 385 "ncgen.y" {(yyval.mark)=(yyvsp[(1) - (2)].mark);;} break; case 32: /* Line 1464 of yacc.c */ -#line 384 "ncgen.y" +#line 386 "ncgen.y" {(yyval.mark)=(yyvsp[(1) - (3)].mark);;} break; case 33: /* Line 1464 of yacc.c */ -#line 388 "ncgen.y" +#line 390 "ncgen.y" { int i; (yyval.mark)=(yyvsp[(2) - (2)].mark); @@ -1997,112 +1997,112 @@ yyreduce: case 34: /* Line 1464 of yacc.c */ -#line 401 "ncgen.y" +#line 403 "ncgen.y" { (yyval.sym) = primsymbols[NC_CHAR]; ;} break; case 35: /* Line 1464 of yacc.c */ -#line 402 "ncgen.y" +#line 404 "ncgen.y" { (yyval.sym) = primsymbols[NC_BYTE]; ;} break; case 36: /* Line 1464 of yacc.c */ -#line 403 "ncgen.y" +#line 405 "ncgen.y" { (yyval.sym) = primsymbols[NC_SHORT]; ;} break; case 37: /* Line 1464 of yacc.c */ -#line 404 "ncgen.y" +#line 406 "ncgen.y" { (yyval.sym) = primsymbols[NC_INT]; ;} break; case 38: /* Line 1464 of yacc.c */ -#line 405 "ncgen.y" +#line 407 "ncgen.y" { (yyval.sym) = primsymbols[NC_FLOAT]; ;} break; case 39: /* Line 1464 of yacc.c */ -#line 406 "ncgen.y" +#line 408 "ncgen.y" { (yyval.sym) = primsymbols[NC_DOUBLE]; ;} break; case 40: /* Line 1464 of yacc.c */ -#line 407 "ncgen.y" +#line 409 "ncgen.y" { vercheck(NC_UBYTE); (yyval.sym) = primsymbols[NC_UBYTE]; ;} break; case 41: /* Line 1464 of yacc.c */ -#line 408 "ncgen.y" +#line 410 "ncgen.y" { vercheck(NC_USHORT); (yyval.sym) = primsymbols[NC_USHORT]; ;} break; case 42: /* Line 1464 of yacc.c */ -#line 409 "ncgen.y" +#line 411 "ncgen.y" { vercheck(NC_UINT); (yyval.sym) = primsymbols[NC_UINT]; ;} break; case 43: /* Line 1464 of yacc.c */ -#line 410 "ncgen.y" +#line 412 "ncgen.y" { vercheck(NC_INT64); (yyval.sym) = primsymbols[NC_INT64]; ;} break; case 44: /* Line 1464 of yacc.c */ -#line 411 "ncgen.y" +#line 413 "ncgen.y" { vercheck(NC_UINT64); (yyval.sym) = primsymbols[NC_UINT64]; ;} break; case 46: /* Line 1464 of yacc.c */ -#line 415 "ncgen.y" +#line 417 "ncgen.y" {;} break; case 47: /* Line 1464 of yacc.c */ -#line 416 "ncgen.y" +#line 418 "ncgen.y" {;} break; case 50: /* Line 1464 of yacc.c */ -#line 423 "ncgen.y" +#line 425 "ncgen.y" {;} break; case 51: /* Line 1464 of yacc.c */ -#line 423 "ncgen.y" +#line 425 "ncgen.y" {;} break; case 54: /* Line 1464 of yacc.c */ -#line 431 "ncgen.y" +#line 433 "ncgen.y" { (yyvsp[(1) - (3)].sym)->dim.declsize = (size_t)uint32_val; ;} @@ -2111,7 +2111,7 @@ yyreduce: case 55: /* Line 1464 of yacc.c */ -#line 435 "ncgen.y" +#line 437 "ncgen.y" { if(int32_val <= 0) { derror("dimension size must be positive"); @@ -2124,7 +2124,7 @@ yyreduce: case 56: /* Line 1464 of yacc.c */ -#line 443 "ncgen.y" +#line 445 "ncgen.y" { /* for rare case where 2^31 < dimsize < 2^32 */ if (double_val <= 0) yyerror("dimension length must be positive"); @@ -2139,7 +2139,7 @@ yyreduce: case 57: /* Line 1464 of yacc.c */ -#line 453 "ncgen.y" +#line 455 "ncgen.y" { if(usingclassic) { /* check for multiple UNLIMITED decls*/ @@ -2154,7 +2154,7 @@ yyreduce: case 58: /* Line 1464 of yacc.c */ -#line 465 "ncgen.y" +#line 467 "ncgen.y" { (yyvsp[(1) - (1)].sym)->objectclass=NC_DIM; if(dupobjectcheck(NC_DIM,(yyvsp[(1) - (1)].sym))) @@ -2169,35 +2169,35 @@ yyreduce: case 60: /* Line 1464 of yacc.c */ -#line 477 "ncgen.y" +#line 479 "ncgen.y" {;} break; case 61: /* Line 1464 of yacc.c */ -#line 478 "ncgen.y" +#line 480 "ncgen.y" {;} break; case 64: /* Line 1464 of yacc.c */ -#line 485 "ncgen.y" +#line 487 "ncgen.y" {;} break; case 65: /* Line 1464 of yacc.c */ -#line 485 "ncgen.y" +#line 487 "ncgen.y" {;} break; case 66: /* Line 1464 of yacc.c */ -#line 488 "ncgen.y" +#line 490 "ncgen.y" { int i; stackbase=(yyvsp[(2) - (2)].mark); @@ -2222,7 +2222,7 @@ yyreduce: case 67: /* Line 1464 of yacc.c */ -#line 510 "ncgen.y" +#line 512 "ncgen.y" {(yyval.mark)=listlength(stack); listpush(stack,(elem_t)(yyvsp[(1) - (1)].sym)); ;} @@ -2231,14 +2231,14 @@ yyreduce: case 68: /* Line 1464 of yacc.c */ -#line 514 "ncgen.y" +#line 516 "ncgen.y" {(yyval.mark)=(yyvsp[(1) - (3)].mark); listpush(stack,(elem_t)(yyvsp[(3) - (3)].sym));;} break; case 69: /* Line 1464 of yacc.c */ -#line 518 "ncgen.y" +#line 520 "ncgen.y" { int i; Dimset dimset; @@ -2268,35 +2268,35 @@ yyreduce: case 70: /* Line 1464 of yacc.c */ -#line 544 "ncgen.y" +#line 546 "ncgen.y" {(yyval.mark)=listlength(stack);;} break; case 71: /* Line 1464 of yacc.c */ -#line 545 "ncgen.y" +#line 547 "ncgen.y" {(yyval.mark)=(yyvsp[(2) - (3)].mark);;} break; case 72: /* Line 1464 of yacc.c */ -#line 548 "ncgen.y" +#line 550 "ncgen.y" {(yyval.mark)=listlength(stack); listpush(stack,(elem_t)(yyvsp[(1) - (1)].sym));;} break; case 73: /* Line 1464 of yacc.c */ -#line 550 "ncgen.y" +#line 552 "ncgen.y" {(yyval.mark)=(yyvsp[(1) - (3)].mark); listpush(stack,(elem_t)(yyvsp[(3) - (3)].sym));;} break; case 74: /* Line 1464 of yacc.c */ -#line 554 "ncgen.y" +#line 556 "ncgen.y" {Symbol* dimsym = (yyvsp[(1) - (1)].sym); dimsym->objectclass = NC_DIM; /* Find the actual dimension*/ @@ -2312,7 +2312,7 @@ yyreduce: case 75: /* Line 1464 of yacc.c */ -#line 568 "ncgen.y" +#line 570 "ncgen.y" {(yyval.mark)=listlength(stack); listpush(stack,(elem_t)(yyvsp[(1) - (1)].sym)); ;} @@ -2321,14 +2321,14 @@ yyreduce: case 76: /* Line 1464 of yacc.c */ -#line 572 "ncgen.y" +#line 574 "ncgen.y" {(yyval.mark)=(yyvsp[(1) - (3)].mark); listpush(stack,(elem_t)(yyvsp[(3) - (3)].sym));;} break; case 77: /* Line 1464 of yacc.c */ -#line 577 "ncgen.y" +#line 579 "ncgen.y" { int i; Dimset dimset; @@ -2360,35 +2360,35 @@ yyreduce: case 78: /* Line 1464 of yacc.c */ -#line 605 "ncgen.y" +#line 607 "ncgen.y" {(yyval.mark)=listlength(stack);;} break; case 79: /* Line 1464 of yacc.c */ -#line 606 "ncgen.y" +#line 608 "ncgen.y" {(yyval.mark)=(yyvsp[(2) - (3)].mark);;} break; case 80: /* Line 1464 of yacc.c */ -#line 610 "ncgen.y" +#line 612 "ncgen.y" {(yyval.mark)=listlength(stack); listpush(stack,(elem_t)(yyvsp[(1) - (1)].sym));;} break; case 81: /* Line 1464 of yacc.c */ -#line 612 "ncgen.y" +#line 614 "ncgen.y" {(yyval.mark)=(yyvsp[(1) - (3)].mark); listpush(stack,(elem_t)(yyvsp[(3) - (3)].sym));;} break; case 82: /* Line 1464 of yacc.c */ -#line 617 "ncgen.y" +#line 619 "ncgen.y" { /* Anonymous integer dimension. Can only occur in type definitions*/ char anon[32]; @@ -2403,7 +2403,7 @@ yyreduce: case 83: /* Line 1464 of yacc.c */ -#line 627 "ncgen.y" +#line 629 "ncgen.y" { /* Anonymous integer dimension. Can only occur in type definitions*/ char anon[32]; @@ -2422,7 +2422,7 @@ yyreduce: case 84: /* Line 1464 of yacc.c */ -#line 647 "ncgen.y" +#line 649 "ncgen.y" {Symbol* vsym = (yyvsp[(1) - (1)].sym); if(vsym->objectclass != NC_VAR) { derror("Undefined or forward referenced variable: %s",vsym->name); @@ -2435,7 +2435,7 @@ yyreduce: case 85: /* Line 1464 of yacc.c */ -#line 658 "ncgen.y" +#line 660 "ncgen.y" {Symbol* tsym = (yyvsp[(1) - (1)].sym); if(tsym->objectclass != NC_TYPE) { derror("Undefined or forward referenced type: %s",tsym->name); @@ -2448,7 +2448,7 @@ yyreduce: case 86: /* Line 1464 of yacc.c */ -#line 669 "ncgen.y" +#line 671 "ncgen.y" {Symbol* tvsym = (yyvsp[(1) - (1)].sym); Symbol* sym; /* disambiguate*/ tvsym->objectclass = NC_VAR; @@ -2472,35 +2472,35 @@ yyreduce: case 87: /* Line 1464 of yacc.c */ -#line 687 "ncgen.y" +#line 689 "ncgen.y" {(yyval.sym)=(yyvsp[(1) - (1)].sym);;} break; case 88: /* Line 1464 of yacc.c */ -#line 694 "ncgen.y" +#line 696 "ncgen.y" {;} break; case 89: /* Line 1464 of yacc.c */ -#line 694 "ncgen.y" +#line 696 "ncgen.y" {;} break; case 90: /* Line 1464 of yacc.c */ -#line 698 "ncgen.y" +#line 700 "ncgen.y" { (yyval.sym)=makeattribute((yyvsp[(2) - (4)].sym),NULL,NULL,(yyvsp[(4) - (4)].datalist),ATTRGLOBAL);;} break; case 91: /* Line 1464 of yacc.c */ -#line 700 "ncgen.y" +#line 702 "ncgen.y" {Symbol* tsym = (yyvsp[(1) - (6)].sym); Symbol* vsym = (yyvsp[(2) - (6)].sym); Symbol* asym = (yyvsp[(4) - (6)].sym); if(vsym->objectclass == NC_VAR) { (yyval.sym)=makeattribute(asym,vsym,tsym,(yyvsp[(6) - (6)].datalist),ATTRVAR); @@ -2514,7 +2514,7 @@ yyreduce: case 92: /* Line 1464 of yacc.c */ -#line 709 "ncgen.y" +#line 711 "ncgen.y" {Symbol* sym = (yyvsp[(1) - (5)].sym); Symbol* asym = (yyvsp[(3) - (5)].sym); if(sym->objectclass == NC_VAR) { (yyval.sym)=makeattribute(asym,sym,NULL,(yyvsp[(5) - (5)].datalist),ATTRVAR); @@ -2530,70 +2530,70 @@ yyreduce: case 93: /* Line 1464 of yacc.c */ -#line 720 "ncgen.y" +#line 722 "ncgen.y" {(yyval.sym) = makespecial(_FILLVALUE_FLAG,(yyvsp[(1) - (5)].sym),NULL,(void*)(yyvsp[(5) - (5)].datalist),0);;} break; case 94: /* Line 1464 of yacc.c */ -#line 722 "ncgen.y" +#line 724 "ncgen.y" {(yyval.sym) = makespecial(_FILLVALUE_FLAG,(yyvsp[(2) - (6)].sym),(yyvsp[(1) - (6)].sym),(void*)(yyvsp[(6) - (6)].datalist),0);;} break; case 95: /* Line 1464 of yacc.c */ -#line 724 "ncgen.y" +#line 726 "ncgen.y" {(yyval.sym) = makespecial(_STORAGE_FLAG,(yyvsp[(1) - (5)].sym),NULL,(void*)&(yyvsp[(5) - (5)].constant),1);;} break; case 96: /* Line 1464 of yacc.c */ -#line 726 "ncgen.y" +#line 728 "ncgen.y" {(yyval.sym) = makespecial(_CHUNKSIZES_FLAG,(yyvsp[(1) - (5)].sym),NULL,(void*)(yyvsp[(5) - (5)].datalist),0);;} break; case 97: /* Line 1464 of yacc.c */ -#line 728 "ncgen.y" +#line 730 "ncgen.y" {(yyval.sym) = makespecial(_FLETCHER32_FLAG,(yyvsp[(1) - (5)].sym),NULL,(void*)&(yyvsp[(5) - (5)].constant),1);;} break; case 98: /* Line 1464 of yacc.c */ -#line 730 "ncgen.y" +#line 732 "ncgen.y" {(yyval.sym) = makespecial(_DEFLATE_FLAG,(yyvsp[(1) - (5)].sym),NULL,(void*)&(yyvsp[(5) - (5)].constant),1);;} break; case 99: /* Line 1464 of yacc.c */ -#line 732 "ncgen.y" +#line 734 "ncgen.y" {(yyval.sym) = makespecial(_SHUFFLE_FLAG,(yyvsp[(1) - (5)].sym),NULL,(void*)&(yyvsp[(5) - (5)].constant),1);;} break; case 100: /* Line 1464 of yacc.c */ -#line 734 "ncgen.y" +#line 736 "ncgen.y" {(yyval.sym) = makespecial(_ENDIAN_FLAG,(yyvsp[(1) - (5)].sym),NULL,(void*)&(yyvsp[(5) - (5)].constant),1);;} break; case 101: /* Line 1464 of yacc.c */ -#line 736 "ncgen.y" +#line 738 "ncgen.y" {(yyval.sym) = makespecial(_NOFILL_FLAG,(yyvsp[(1) - (5)].sym),NULL,(void*)&(yyvsp[(5) - (5)].constant),1);;} break; case 102: /* Line 1464 of yacc.c */ -#line 738 "ncgen.y" +#line 740 "ncgen.y" { (yyval.sym) = makespecial(_FORMAT_FLAG,NULL,NULL,(void*)&(yyvsp[(4) - (4)].constant),1); ;} @@ -2602,7 +2602,7 @@ yyreduce: case 103: /* Line 1464 of yacc.c */ -#line 745 "ncgen.y" +#line 747 "ncgen.y" { (yyval.sym)=(yyvsp[(1) - (1)].sym); (yyvsp[(1) - (1)].sym)->is_ref=1; @@ -2613,7 +2613,7 @@ yyreduce: case 104: /* Line 1464 of yacc.c */ -#line 751 "ncgen.y" +#line 753 "ncgen.y" { (yyval.sym)=(yyvsp[(1) - (1)].sym); (yyvsp[(1) - (1)].sym)->is_ref=1; @@ -2625,238 +2625,238 @@ yyreduce: case 106: /* Line 1464 of yacc.c */ -#line 760 "ncgen.y" +#line 762 "ncgen.y" {;} break; case 107: /* Line 1464 of yacc.c */ -#line 761 "ncgen.y" +#line 763 "ncgen.y" {;} break; case 110: /* Line 1464 of yacc.c */ -#line 769 "ncgen.y" +#line 771 "ncgen.y" {(yyvsp[(1) - (3)].sym)->data = (yyvsp[(3) - (3)].datalist);;} break; case 111: /* Line 1464 of yacc.c */ -#line 772 "ncgen.y" +#line 774 "ncgen.y" {(yyval.datalist) = (yyvsp[(1) - (1)].datalist);;} break; case 112: /* Line 1464 of yacc.c */ -#line 773 "ncgen.y" +#line 775 "ncgen.y" {(yyval.datalist) = (yyvsp[(1) - (1)].datalist);;} break; case 113: /* Line 1464 of yacc.c */ -#line 777 "ncgen.y" +#line 779 "ncgen.y" {(yyval.datalist) = builddatalist(0);;} break; case 114: /* Line 1464 of yacc.c */ -#line 781 "ncgen.y" +#line 783 "ncgen.y" {(yyval.datalist) = builddatalist(0); datalistextend((yyval.datalist),&((yyvsp[(1) - (1)].constant)));;} break; case 115: /* Line 1464 of yacc.c */ -#line 783 "ncgen.y" +#line 785 "ncgen.y" {datalistextend((yyvsp[(1) - (3)].datalist),&((yyvsp[(3) - (3)].constant))); (yyval.datalist)=(yyvsp[(1) - (3)].datalist);;} break; case 116: /* Line 1464 of yacc.c */ -#line 787 "ncgen.y" +#line 789 "ncgen.y" {(yyval.constant)=(yyvsp[(1) - (1)].constant);;} break; case 117: /* Line 1464 of yacc.c */ -#line 788 "ncgen.y" +#line 790 "ncgen.y" {(yyval.constant)=builddatasublist((yyvsp[(2) - (3)].datalist));;} break; case 118: /* Line 1464 of yacc.c */ -#line 792 "ncgen.y" +#line 794 "ncgen.y" {(yyval.constant)=makeconstdata(NC_CHAR);;} break; case 119: /* Line 1464 of yacc.c */ -#line 793 "ncgen.y" +#line 795 "ncgen.y" {(yyval.constant)=makeconstdata(NC_BYTE);;} break; case 120: /* Line 1464 of yacc.c */ -#line 794 "ncgen.y" +#line 796 "ncgen.y" {(yyval.constant)=makeconstdata(NC_SHORT);;} break; case 121: /* Line 1464 of yacc.c */ -#line 795 "ncgen.y" +#line 797 "ncgen.y" {(yyval.constant)=makeconstdata(NC_INT);;} break; case 122: /* Line 1464 of yacc.c */ -#line 796 "ncgen.y" +#line 798 "ncgen.y" {(yyval.constant)=makeconstdata(NC_INT64);;} break; case 123: /* Line 1464 of yacc.c */ -#line 797 "ncgen.y" +#line 799 "ncgen.y" {(yyval.constant)=makeconstdata(NC_UBYTE);;} break; case 124: /* Line 1464 of yacc.c */ -#line 798 "ncgen.y" +#line 800 "ncgen.y" {(yyval.constant)=makeconstdata(NC_USHORT);;} break; case 125: /* Line 1464 of yacc.c */ -#line 799 "ncgen.y" +#line 801 "ncgen.y" {(yyval.constant)=makeconstdata(NC_UINT);;} break; case 126: /* Line 1464 of yacc.c */ -#line 800 "ncgen.y" +#line 802 "ncgen.y" {(yyval.constant)=makeconstdata(NC_UINT64);;} break; case 127: /* Line 1464 of yacc.c */ -#line 801 "ncgen.y" +#line 803 "ncgen.y" {(yyval.constant)=makeconstdata(NC_FLOAT);;} break; case 128: /* Line 1464 of yacc.c */ -#line 802 "ncgen.y" +#line 804 "ncgen.y" {(yyval.constant)=makeconstdata(NC_DOUBLE);;} break; case 129: /* Line 1464 of yacc.c */ -#line 803 "ncgen.y" +#line 805 "ncgen.y" {(yyval.constant)=makeconstdata(NC_STRING);;} break; case 130: /* Line 1464 of yacc.c */ -#line 804 "ncgen.y" +#line 806 "ncgen.y" {(yyval.constant)=makeconstdata(NC_OPAQUE);;} break; case 131: /* Line 1464 of yacc.c */ -#line 805 "ncgen.y" +#line 807 "ncgen.y" {(yyval.constant)=makeenumconst((yyvsp[(1) - (1)].sym));;} break; case 132: /* Line 1464 of yacc.c */ -#line 806 "ncgen.y" +#line 808 "ncgen.y" {(yyval.constant)=makeconstdata(NC_FILLVALUE);;} break; case 133: /* Line 1464 of yacc.c */ -#line 810 "ncgen.y" +#line 812 "ncgen.y" {(yyval.datalist) = builddatalist(0); datalistextend((yyval.datalist),&((yyvsp[(1) - (1)].constant)));;} break; case 134: /* Line 1464 of yacc.c */ -#line 811 "ncgen.y" +#line 813 "ncgen.y" {(yyval.datalist)=(yyvsp[(1) - (3)].datalist); datalistextend((yyvsp[(1) - (3)].datalist),&((yyvsp[(3) - (3)].constant)));;} break; case 135: /* Line 1464 of yacc.c */ -#line 816 "ncgen.y" +#line 818 "ncgen.y" {(yyval.constant)=makeconstdata(NC_INT);;} break; case 136: /* Line 1464 of yacc.c */ -#line 818 "ncgen.y" +#line 820 "ncgen.y" {(yyval.constant)=makeconstdata(NC_UINT);;} break; case 137: /* Line 1464 of yacc.c */ -#line 820 "ncgen.y" +#line 822 "ncgen.y" {(yyval.constant)=makeconstdata(NC_INT64);;} break; case 138: /* Line 1464 of yacc.c */ -#line 822 "ncgen.y" +#line 824 "ncgen.y" {(yyval.constant)=makeconstdata(NC_UINT64);;} break; case 139: /* Line 1464 of yacc.c */ -#line 826 "ncgen.y" +#line 828 "ncgen.y" {(yyval.constant)=makeconstdata(NC_STRING);;} break; case 140: /* Line 1464 of yacc.c */ -#line 830 "ncgen.y" +#line 832 "ncgen.y" {(yyval.constant)=(yyvsp[(1) - (1)].constant);;} break; case 141: /* Line 1464 of yacc.c */ -#line 831 "ncgen.y" +#line 833 "ncgen.y" {(yyval.constant)=(yyvsp[(1) - (1)].constant);;} break; @@ -3075,7 +3075,7 @@ yyreturn: /* Line 1684 of yacc.c */ -#line 835 "ncgen.y" +#line 837 "ncgen.y" #ifndef NO_STDARG