ncdf4a13/ncgen/ncgentab.c File Reference

#include <stdlib.h>
#include <string.h>
#include <netcdf.h>
#include "generic.h"
#include "ncgen.h"
#include "genlib.h"
#include "ncgenyy.c"

Include dependency graph for ncgentab.c:

Go to the source code of this file.

Classes

struct  Symbol

Defines

#define YYBYACC   1
#define YYMAJOR   1
#define YYMINOR   9
#define YYLEX   yylex()
#define YYEMPTY   -1
#define yyclearin   (yychar=(YYEMPTY))
#define yyerrok   (yyerrflag=0)
#define YYRECOVERING()   (yyerrflag!=0)
#define YYPREFIX   "yy"
#define STREQ(a, b)   (*(a) == *(b) && strcmp((a), (b)) == 0)
#define NC_UNSPECIFIED   ((nc_type)0)
#define YYSTYPE   YYSTYPE1
#define YYERRCODE   256
#define NC_UNLIMITED_K   257
#define BYTE_K   258
#define CHAR_K   259
#define SHORT_K   260
#define INT_K   261
#define FLOAT_K   262
#define DOUBLE_K   263
#define IDENT   264
#define TERMSTRING   265
#define BYTE_CONST   266
#define CHAR_CONST   267
#define SHORT_CONST   268
#define INT_CONST   269
#define FLOAT_CONST   270
#define DOUBLE_CONST   271
#define DIMENSIONS   272
#define VARIABLES   273
#define NETCDF   274
#define DATA   275
#define FILLVALUE   276
#define YYTABLESIZE   226
#define YYFINAL   2
#define YYDEBUG   0
#define YYMAXTOKEN   276
#define YYSTACKSIZE   10000
#define YYMAXDEPTH   10000
#define YYINITSTACKSIZE   200
#define YYABORT   goto yyabort
#define YYREJECT   goto yyabort
#define YYACCEPT   goto yyaccept
#define YYERROR   goto yyerrlab
#define YYPARSE_PARAM_ARG
#define YYPARSE_PARAM_DECL

Typedefs

typedef SymbolYYSTYPE1

Functions

static int yygrowstack ()
int yyerror (char *s)
int yywrap (void)
YYSTYPE lookup (const char *sname)
YYSTYPE install (const char *sname)
void clearout (void)
int yyparse (YYPARSE_PARAM_ARG)

Variables

static char const yyrcsid [] = "$FreeBSD: src/usr.bin/yacc/skeleton.c,v 1.28 2000/01/17 02:04:06 bde Exp $"
static char SccsId [] = "$Id: ncgentab.c,v 1.15 2005/02/17 23:24:25 ed Exp $"
YYSTYPE symlist
int derror_count
int lineno
static int not_a_string
static char termstring [MAXTRST]
static double double_val
static float float_val
static int int_val
static short short_val
static char char_val
static signed char byte_val
static nc_type type_code
static nc_type atype_code
static char * netcdfname
static void * att_space
static nc_type valtype
static char * char_valp
static signed char * byte_valp
static short * short_valp
static int * int_valp
static float * float_valp
static double * double_valp
static void * rec_cur
static void * rec_start
const short yylhs []
const short yylen []
const short yydefred []
const short yydgoto []
const short yysindex []
const short yyrindex []
const short yygindex []
const short yytable []
const short yycheck []
int yydebug
int yynerrs
int yyerrflag
int yychar
short * yyssp
YYSTYPE * yyvsp
YYSTYPE yyval
YYSTYPE yylval
short * yyss
short * yysslim
YYSTYPE * yyvs
int yystacksize


Define Documentation

#define BYTE_CONST   266
 

Definition at line 81 of file ncgentab.c.

#define BYTE_K   258
 

Definition at line 73 of file ncgentab.c.

#define CHAR_CONST   267
 

Definition at line 82 of file ncgentab.c.

#define CHAR_K   259
 

Definition at line 74 of file ncgentab.c.

#define DATA   275
 

Definition at line 90 of file ncgentab.c.

#define DIMENSIONS   272
 

Definition at line 87 of file ncgentab.c.

#define DOUBLE_CONST   271
 

Definition at line 86 of file ncgentab.c.

#define DOUBLE_K   263
 

Definition at line 78 of file ncgentab.c.

#define FILLVALUE   276
 

Definition at line 91 of file ncgentab.c.

#define FLOAT_CONST   270
 

Definition at line 85 of file ncgentab.c.

#define FLOAT_K   262
 

Definition at line 77 of file ncgentab.c.

#define IDENT   264
 

Definition at line 79 of file ncgentab.c.

#define INT_CONST   269
 

Definition at line 84 of file ncgentab.c.

#define INT_K   261
 

Definition at line 76 of file ncgentab.c.

#define NC_UNLIMITED_K   257
 

Definition at line 72 of file ncgentab.c.

#define NC_UNSPECIFIED   ((nc_type)0)
 

Definition at line 39 of file ncgentab.c.

#define NETCDF   274
 

Definition at line 89 of file ncgentab.c.

#define SHORT_CONST   268
 

Definition at line 83 of file ncgentab.c.

#define SHORT_K   260
 

Definition at line 75 of file ncgentab.c.

#define STREQ a,
 )     (*(a) == *(b) && strcmp((a), (b)) == 0)
 

Definition at line 38 of file ncgentab.c.

#define TERMSTRING   265
 

Definition at line 80 of file ncgentab.c.

#define VARIABLES   273
 

Definition at line 88 of file ncgentab.c.

#define YYABORT   goto yyabort
 

Definition at line 449 of file ncgentab.c.

Referenced by yyparse().

#define YYACCEPT   goto yyaccept
 

Definition at line 451 of file ncgentab.c.

#define YYBYACC   1
 

Definition at line 6 of file ncgentab.c.

#define yyclearin   (yychar=(YYEMPTY))
 

Definition at line 11 of file ncgentab.c.

#define YYDEBUG   0
 

Definition at line 216 of file ncgentab.c.

#define YYEMPTY   -1
 

Definition at line 10 of file ncgentab.c.

#define YYERRCODE   256
 

Definition at line 71 of file ncgentab.c.

Referenced by yyparse().

#define yyerrok   (yyerrflag=0)
 

Definition at line 12 of file ncgentab.c.

#define YYERROR   goto yyerrlab
 

Definition at line 452 of file ncgentab.c.

#define YYFINAL   2
 

Definition at line 214 of file ncgentab.c.

Referenced by yyparse().

#define YYINITSTACKSIZE   200
 

Definition at line 330 of file ncgentab.c.

Referenced by yygrowstack().

#define YYLEX   yylex()
 

Definition at line 9 of file ncgentab.c.

#define YYMAJOR   1
 

Definition at line 7 of file ncgentab.c.

#define YYMAXDEPTH   10000
 

Definition at line 327 of file ncgentab.c.

Referenced by yygrowstack().

#define YYMAXTOKEN   276
 

Definition at line 218 of file ncgentab.c.

Referenced by yyparse().

#define YYMINOR   9
 

Definition at line 8 of file ncgentab.c.

#define YYPARSE_PARAM_ARG
 

Definition at line 459 of file ncgentab.c.

#define YYPARSE_PARAM_DECL
 

Definition at line 460 of file ncgentab.c.

#define YYPREFIX   "yy"
 

Definition at line 15 of file ncgentab.c.

Referenced by yyparse().

 
#define YYRECOVERING  )     (yyerrflag!=0)
 

Definition at line 13 of file ncgentab.c.

#define YYREJECT   goto yyabort
 

Definition at line 450 of file ncgentab.c.

#define YYSTACKSIZE   10000
 

Definition at line 326 of file ncgentab.c.

#define YYSTYPE   YYSTYPE1
 

Definition at line 41 of file ncgentab.c.

Referenced by clearout(), install(), lookup(), and yygrowstack().

#define YYTABLESIZE   226
 

Definition at line 163 of file ncgentab.c.

Referenced by yyparse().


Typedef Documentation

typedef struct Symbol * YYSTYPE1
 


Function Documentation

void clearout void   ) 
 

Definition at line 403 of file ncgentab.c.

References Symbol::name, Symbol::next, symlist, and YYSTYPE.

Referenced by init_netcdf().

00404 {
00405     YYSTYPE sp, tp;
00406     for (sp = symlist; sp != (YYSTYPE) 0;) {
00407         tp = sp -> next;
00408         free (sp -> name);
00409         free ((char *) sp);
00410         sp = tp;
00411     }
00412     symlist = 0;
00413 }

YYSTYPE install const char *  sname  ) 
 

Definition at line 386 of file ncgentab.c.

References emalloc(), Symbol::is_att, Symbol::is_dim, Symbol::is_var, Symbol::name, Symbol::next, symlist, and YYSTYPE.

00388 {
00389     YYSTYPE sp;
00390 
00391     sp = (YYSTYPE) emalloc (sizeof (struct Symbol));
00392     sp -> name = (char *) emalloc (strlen (sname) + 1);/* +1 for '\0' */
00393     (void) strcpy (sp -> name, sname);
00394     sp -> next = symlist;       /* put at front of list */
00395     sp -> is_dim = 0;
00396     sp -> is_var = 0;
00397     sp -> is_att = 0;
00398     symlist = sp;
00399     return sp;
00400 }

YYSTYPE lookup const char *  sname  ) 
 

Definition at line 375 of file ncgentab.c.

References Symbol::name, Symbol::next, STREQ, symlist, and YYSTYPE.

00377 {
00378     YYSTYPE sp;
00379     for (sp = symlist; sp != (YYSTYPE) 0; sp = sp -> next)
00380         if (STREQ(sp -> name, sname)) {
00381             return sp;
00382         }
00383     return 0;                   /* 0 ==> not found */
00384 }

int yyerror char *  s  ) 
 

Definition at line 352 of file ncgentab.c.

References derror().

00354 {
00355         derror(s);
00356 #ifndef vms
00357         return -1;
00358 #endif
00359 }

static int yygrowstack  )  [static]
 

Definition at line 419 of file ncgentab.c.

References YYINITSTACKSIZE, YYMAXDEPTH, yyss, yysslim, yyssp, yystacksize, YYSTYPE, yyvs, and yyvsp.

Referenced by yyparse().

00420 {
00421     int newsize, i;
00422     short *newss;
00423     YYSTYPE *newvs;
00424 
00425     if ((newsize = yystacksize) == 0)
00426         newsize = YYINITSTACKSIZE;
00427     else if (newsize >= YYMAXDEPTH)
00428         return -1;
00429     else if ((newsize *= 2) > YYMAXDEPTH)
00430         newsize = YYMAXDEPTH;
00431     i = yyssp - yyss;
00432     newss = yyss ? (short *)realloc(yyss, newsize * sizeof *newss) :
00433       (short *)malloc(newsize * sizeof *newss);
00434     if (newss == NULL)
00435         return -1;
00436     yyss = newss;
00437     yyssp = newss + i;
00438     newvs = yyvs ? (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs) :
00439       (YYSTYPE *)malloc(newsize * sizeof *newvs);
00440     if (newvs == NULL)
00441         return -1;
00442     yyvs = newvs;
00443     yyvsp = newvs + i;
00444     yystacksize = newsize;
00445     yysslim = yyss + newsize - 1;
00446     return 0;
00447 }

int yyparse YYPARSE_PARAM_ARG   ) 
 

Definition at line 476 of file ncgentab.c.

References _FillValue, att_space, atype_code, byte_val, byte_valp, char_val, char_valp, close_netcdf(), decodify(), define_netcdf(), derror(), derror_count, dimnum, vars::dims, double_val, double_valp, generic::doublev, emalloc(), erealloc(), vars::fill_value, float_val, float_valp, grow_aarray(), grow_darray(), grow_iarray(), grow_varray(), vars::has_data, init_netcdf(), int_val, int_valp, Symbol::is_dim, len, MAX_NC_ATTSIZE, vars::name, Symbol::name, natts, NC_BYTE, NC_CHAR, NC_DOUBLE, nc_fill(), NC_FILL_DOUBLE, NC_FILL_FLOAT, NC_FLOAT, nc_getfill(), NC_GLOBAL, NC_INT, NC_MAX_VAR_DIMS, nc_putfill(), NC_SHORT, NC_UNLIMITED, NC_UNSPECIFIED, nctype(), nctypesize(), vars::ndims, ndims, netcdfname, not_a_string, nvars, nvdims, put_variable(), rec_cur, rec_dim, rec_len, rec_start, short_val, short_valp, STREQ, termstring, type, vars::type, type_code, valnum, valtype, var_len, var_size, varnum, YYABORT, yychar, yycheck, yydebug, yydefred, yydgoto, YYERRCODE, yyerrflag, yyerror(), YYFINAL, yygindex, yygrowstack(), yylen, yylhs, yylval, YYMAXTOKEN, yynerrs, YYPREFIX, yyrindex, yysindex, yyss, yysslim, yyssp, yytable, YYTABLESIZE, yyval, yyvs, and yyvsp.

00478 {
00479     register int yym, yyn, yystate;
00480 #if YYDEBUG
00481     register const char *yys;
00482 
00483     if ((yys = getenv("YYDEBUG")))
00484     {
00485         yyn = *yys;
00486         if (yyn >= '0' && yyn <= '9')
00487             yydebug = yyn - '0';
00488     }
00489 #endif
00490 
00491     yynerrs = 0;
00492     yyerrflag = 0;
00493     yychar = (-1);
00494 
00495     if (yyss == NULL && yygrowstack()) goto yyoverflow;
00496     yyssp = yyss;
00497     yyvsp = yyvs;
00498     *yyssp = yystate = 0;
00499 
00500 yyloop:
00501     if ((yyn = yydefred[yystate])) goto yyreduce;
00502     if (yychar < 0)
00503     {
00504         if ((yychar = yylex()) < 0) yychar = 0;
00505 #if YYDEBUG
00506         if (yydebug)
00507         {
00508             yys = 0;
00509             if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
00510             if (!yys) yys = "illegal-symbol";
00511             printf("%sdebug: state %d, reading %d (%s)\n",
00512                     YYPREFIX, yystate, yychar, yys);
00513         }
00514 #endif
00515     }
00516     if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
00517             yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
00518     {
00519 #if YYDEBUG
00520         if (yydebug)
00521             printf("%sdebug: state %d, shifting to state %d\n",
00522                     YYPREFIX, yystate, yytable[yyn]);
00523 #endif
00524         if (yyssp >= yysslim && yygrowstack())
00525         {
00526             goto yyoverflow;
00527         }
00528         *++yyssp = yystate = yytable[yyn];
00529         *++yyvsp = yylval;
00530         yychar = (-1);
00531         if (yyerrflag > 0)  --yyerrflag;
00532         goto yyloop;
00533     }
00534     if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
00535             yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
00536     {
00537         yyn = yytable[yyn];
00538         goto yyreduce;
00539     }
00540     if (yyerrflag) goto yyinrecovery;
00541 #if defined(lint) || defined(__GNUC__)
00542     goto yynewerror;
00543 #endif
00544 yynewerror:
00545     yyerror("syntax error");
00546 #if defined(lint) || defined(__GNUC__)
00547     goto yyerrlab;
00548 #endif
00549 yyerrlab:
00550     ++yynerrs;
00551 yyinrecovery:
00552     if (yyerrflag < 3)
00553     {
00554         yyerrflag = 3;
00555         for (;;)
00556         {
00557             if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
00558                     yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
00559             {
00560 #if YYDEBUG
00561                 if (yydebug)
00562                     printf("%sdebug: state %d, error recovery shifting\
00563  to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
00564 #endif
00565                 if (yyssp >= yysslim && yygrowstack())
00566                 {
00567                     goto yyoverflow;
00568                 }
00569                 *++yyssp = yystate = yytable[yyn];
00570                 *++yyvsp = yylval;
00571                 goto yyloop;
00572             }
00573             else
00574             {
00575 #if YYDEBUG
00576                 if (yydebug)
00577                     printf("%sdebug: error recovery discarding state %d\n",
00578                             YYPREFIX, *yyssp);
00579 #endif
00580                 if (yyssp <= yyss) goto yyabort;
00581                 --yyssp;
00582                 --yyvsp;
00583             }
00584         }
00585     }
00586     else
00587     {
00588         if (yychar == 0) goto yyabort;
00589 #if YYDEBUG
00590         if (yydebug)
00591         {
00592             yys = 0;
00593             if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
00594             if (!yys) yys = "illegal-symbol";
00595             printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
00596                     YYPREFIX, yystate, yychar, yys);
00597         }
00598 #endif
00599         yychar = (-1);
00600         goto yyloop;
00601     }
00602 yyreduce:
00603 #if YYDEBUG
00604     if (yydebug)
00605         printf("%sdebug: state %d, reducing by rule %d (%s)\n",
00606                 YYPREFIX, yystate, yyn, yyrule[yyn]);
00607 #endif
00608     yym = yylen[yyn];
00609     yyval = yyvsp[1-yym];
00610     switch (yyn)
00611     {
00612 case 1:
00613 #line 97 "ncgen.y"
00614 { init_netcdf(); }
00615 break;
00616 case 2:
00617 #line 100 "ncgen.y"
00618 {
00619                        if (derror_count == 0)
00620                          define_netcdf(netcdfname);
00621                        if (derror_count > 0)
00622                            exit(6);
00623                    }
00624 break;
00625 case 3:
00626 #line 108 "ncgen.y"
00627 {
00628                        if (derror_count == 0)
00629                          close_netcdf();
00630                    }
00631 break;
00632 case 10:
00633 #line 123 "ncgen.y"
00634 { if (int_val <= 0)
00635                          derror("dimension length must be positive");
00636                      dims[ndims].size = int_val;
00637                      ndims++;
00638                    }
00639 break;
00640 case 11:
00641 #line 129 "ncgen.y"
00642 { /* for rare case where 2^31 < dimsize < 2^32 */
00643                        if (double_val <= 0)
00644                          derror("dimension length must be positive");
00645                        if (double_val > 4294967295.0)
00646                          derror("dimension too large");
00647                        if (double_val - (size_t) double_val > 0)
00648                          derror("dimension length must be an integer");
00649                        dims[ndims].size = (size_t) double_val;
00650                        ndims++;
00651                    }
00652 break;
00653 case 12:
00654 #line 140 "ncgen.y"
00655 {  if (rec_dim != -1)
00656                          derror("only one NC_UNLIMITED dimension allowed");
00657                      rec_dim = ndims; /* the unlimited (record) dimension */
00658                      dims[ndims].size = NC_UNLIMITED;
00659                      ndims++;
00660                    }
00661 break;
00662 case 13:
00663 #line 148 "ncgen.y"
00664 { if (yyvsp[0]->is_dim == 1) {
00665                         derror( "duplicate dimension declaration for %s",
00666                                 yyvsp[0]->name);
00667                      }
00668                      yyvsp[0]->is_dim = 1;
00669                      yyvsp[0]->dnum = ndims;
00670                      /* make sure dims array will hold dimensions */
00671                      grow_darray(ndims,  /* must hold ndims+1 dims */
00672                                  &dims); /* grow as needed */
00673                      dims[ndims].name = (char *) emalloc(strlen(yyvsp[0]->name)+1);
00674                      (void) strcpy(dims[ndims].name, yyvsp[0]->name);
00675                      /* name for use in generated Fortran and C variables */
00676                      dims[ndims].lname = decodify(yyvsp[0]->name);
00677                    }
00678 break;
00679 case 26:
00680 #line 181 "ncgen.y"
00681 { type_code = NC_BYTE; }
00682 break;
00683 case 27:
00684 #line 182 "ncgen.y"
00685 { type_code = NC_CHAR; }
00686 break;
00687 case 28:
00688 #line 183 "ncgen.y"
00689 { type_code = NC_SHORT; }
00690 break;
00691 case 29:
00692 #line 184 "ncgen.y"
00693 { type_code = NC_INT; }
00694 break;
00695 case 30:
00696 #line 185 "ncgen.y"
00697 { type_code = NC_FLOAT; }
00698 break;
00699 case 31:
00700 #line 186 "ncgen.y"
00701 { type_code = NC_DOUBLE; }
00702 break;
00703 case 34:
00704 #line 192 "ncgen.y"
00705 {
00706                     static struct vars dummyvar;
00707 
00708                     dummyvar.name = "dummy";
00709                     dummyvar.type = NC_DOUBLE;
00710                     dummyvar.ndims = 0;
00711                     dummyvar.dims = 0;
00712                     dummyvar.fill_value.doublev = NC_FILL_DOUBLE;
00713                     dummyvar.has_data = 0;
00714 
00715                     nvdims = 0;
00716                     /* make sure variable not re-declared */
00717                     if (yyvsp[0]->is_var == 1) {
00718                        derror( "duplicate variable declaration for %s",
00719                                yyvsp[0]->name);
00720                     }
00721                     yyvsp[0]->is_var = 1;
00722                     yyvsp[0]->vnum = nvars;
00723                     /* make sure vars array will hold variables */
00724                     grow_varray(nvars,  /* must hold nvars+1 vars */
00725                                 &vars); /* grow as needed */
00726                     vars[nvars] = dummyvar; /* to make Purify happy */
00727                     vars[nvars].name = (char *) emalloc(strlen(yyvsp[0]->name)+1);
00728                     (void) strcpy(vars[nvars].name, yyvsp[0]->name);
00729                     /* name for use in generated Fortran and C variables */
00730                     vars[nvars].lname = decodify(yyvsp[0]->name);
00731                     vars[nvars].type = type_code;
00732                     /* set default fill value.  You can override this with
00733                      * the variable attribute "_FillValue". */
00734                     nc_getfill(type_code, &vars[nvars].fill_value);
00735                     vars[nvars].has_data = 0; /* has no data (yet) */
00736                    }
00737 break;
00738 case 35:
00739 #line 225 "ncgen.y"
00740 {
00741                     vars[nvars].ndims = nvdims;
00742                     nvars++;
00743                    }
00744 break;
00745 case 41:
00746 #line 239 "ncgen.y"
00747 {
00748                     if (nvdims >= NC_MAX_VAR_DIMS) {
00749                        derror("%s has too many dimensions",vars[nvars].name);
00750                     }
00751                     if (yyvsp[0]->is_dim == 1)
00752                        dimnum = yyvsp[0]->dnum;
00753                     else {
00754                        derror( "%s is not declared as a dimension",
00755                                yyvsp[0]->name);
00756                        dimnum = ndims;
00757                     }
00758                     if (rec_dim != -1 && dimnum == rec_dim && nvdims != 0) {
00759                        derror("unlimited dimension must be first");
00760                     }
00761                     grow_iarray(nvdims, /* must hold nvdims+1 ints */
00762                                 &vars[nvars].dims); /* grow as needed */
00763                     vars[nvars].dims[nvdims] = dimnum;
00764                     nvdims++;
00765                    }
00766 break;
00767 case 42:
00768 #line 260 "ncgen.y"
00769 {
00770                        valnum = 0;
00771                        valtype = NC_UNSPECIFIED;
00772                        /* get a large block for attributes, realloc later */
00773                        att_space = emalloc(MAX_NC_ATTSIZE);
00774                        /* make all kinds of pointers point to it */
00775                        char_valp = (char *) att_space;
00776                        byte_valp = (signed char *) att_space;
00777                        short_valp = (short *) att_space;
00778                        int_valp = (int *) att_space;
00779                        float_valp = (float *) att_space;
00780                        double_valp = (double *) att_space;
00781                    }
00782 break;
00783 case 43:
00784 #line 274 "ncgen.y"
00785 {
00786                        {        /* check if duplicate attribute for this var */
00787                            int i;
00788                            for(i=0; i<natts; i++) { /* expensive */
00789                                if(atts[i].var == varnum &&
00790                                   STREQ(atts[i].name,atts[natts].name)) {
00791                                    derror("duplicate attribute %s:%s",
00792                                           vars[varnum].name,atts[natts].name);
00793                                }
00794                            }
00795                        }
00796                        atts[natts].var = varnum ;
00797                        atts[natts].type = valtype;
00798                        atts[natts].len = valnum;
00799                        /* shrink space down to what was really needed */
00800                        att_space = erealloc(att_space, valnum*nctypesize(valtype));
00801                        atts[natts].val = att_space;
00802                        if (STREQ(atts[natts].name, _FillValue) &&
00803                            atts[natts].var != NC_GLOBAL) {
00804                            nc_putfill(atts[natts].type,
00805                                        atts[natts].val,
00806                                        &vars[atts[natts].var].fill_value);
00807                            if(atts[natts].type != vars[atts[natts].var].type) {
00808                                derror("variable %s: %s type mismatch",
00809                                       vars[atts[natts].var].name, _FillValue);
00810                            }
00811                        }
00812                        natts++;
00813                    }
00814 break;
00815 case 45:
00816 #line 306 "ncgen.y"
00817 {
00818                     varnum = NC_GLOBAL;  /* handle of "global" attribute */
00819                    }
00820 break;
00821 case 46:
00822 #line 312 "ncgen.y"
00823 { if (yyvsp[0]->is_var == 1)
00824                        varnum = yyvsp[0]->vnum;
00825                     else {
00826                       derror("%s not declared as a variable, fatal error",
00827                              yyvsp[0]->name);
00828                       YYABORT;
00829                       }
00830                    }
00831 break;
00832 case 47:
00833 #line 322 "ncgen.y"
00834 {
00835                        /* make sure atts array will hold attributes */
00836                        grow_aarray(natts,  /* must hold natts+1 atts */
00837                                    &atts); /* grow as needed */
00838                        atts[natts].name = (char *) emalloc(strlen(yyvsp[0]->name)+1);
00839                        (void) strcpy(atts[natts].name,yyvsp[0]->name);
00840                        /* name for use in generated Fortran and C variables */
00841                        atts[natts].lname = decodify(yyvsp[0]->name);
00842                    }
00843 break;
00844 case 50:
00845 #line 336 "ncgen.y"
00846 {
00847                     if (valtype == NC_UNSPECIFIED)
00848                       valtype = atype_code;
00849                     if (valtype != atype_code)
00850                       derror("values for attribute must be all of same type");
00851                    }
00852 break;
00853 case 51:
00854 #line 345 "ncgen.y"
00855 {
00856                        atype_code = NC_CHAR;
00857                        *char_valp++ = char_val;
00858                        valnum++;
00859                    }
00860 break;
00861 case 52:
00862 #line 351 "ncgen.y"
00863 {
00864                        atype_code = NC_CHAR;
00865                        {
00866                            /* don't null-terminate attribute strings */
00867                            size_t len = strlen(termstring);
00868                            if (len == 0) /* need null if that's only value */
00869                                len = 1;
00870                            (void)strncpy(char_valp,termstring,len);
00871                            valnum += len;
00872                            char_valp += len;
00873                        }
00874                    }
00875 break;
00876 case 53:
00877 #line 364 "ncgen.y"
00878 {
00879                        atype_code = NC_BYTE;
00880                        *byte_valp++ = byte_val;
00881                        valnum++;
00882                    }
00883 break;
00884 case 54:
00885 #line 370 "ncgen.y"
00886 {
00887                        atype_code = NC_SHORT;
00888                        *short_valp++ = short_val;
00889                        valnum++;
00890                    }
00891 break;
00892 case 55:
00893 #line 376 "ncgen.y"
00894 {
00895                        atype_code = NC_INT;
00896                        *int_valp++ = int_val;
00897                        valnum++;
00898                    }
00899 break;
00900 case 56:
00901 #line 382 "ncgen.y"
00902 {
00903                        atype_code = NC_FLOAT;
00904                        *float_valp++ = float_val;
00905                        valnum++;
00906                    }
00907 break;
00908 case 57:
00909 #line 388 "ncgen.y"
00910 {
00911                        atype_code = NC_DOUBLE;
00912                        *double_valp++ = double_val;
00913                        valnum++;
00914                    }
00915 break;
00916 case 63:
00917 #line 404 "ncgen.y"
00918 {
00919                        valtype = vars[varnum].type; /* variable type */
00920                        valnum = 0;      /* values accumulated for variable */
00921                        vars[varnum].has_data = 1;
00922                        /* compute dimensions product */
00923                        var_size = nctypesize(valtype);
00924                        if (vars[varnum].ndims == 0) { /* scalar */
00925                            var_len = 1;
00926                        } else if (vars[varnum].dims[0] == rec_dim) {
00927                            var_len = 1; /* one record for unlimited vars */
00928                        } else {
00929                            var_len = dims[vars[varnum].dims[0]].size;
00930                        }
00931                        for(dimnum = 1; dimnum < vars[varnum].ndims; dimnum++)
00932                          var_len = var_len*dims[vars[varnum].dims[dimnum]].size;
00933                        /* allocate memory for variable data */
00934                        if (var_len*var_size != (size_t)(var_len*var_size)) {
00935                            derror("variable %s too large for memory",
00936                                   vars[varnum].name);
00937                            exit(9);
00938                        }
00939                        rec_len = var_len;
00940                        rec_start = malloc ((size_t)(rec_len*var_size));
00941                        if (rec_start == 0) {
00942                            derror ("out of memory\n");
00943                            exit(3);
00944                        }
00945                        rec_cur = rec_start;
00946                        switch (valtype) {
00947                          case NC_CHAR:
00948                            char_valp = (char *) rec_start;
00949                            break;
00950                          case NC_BYTE:
00951                            byte_valp = (signed char *) rec_start;
00952                            break;
00953                          case NC_SHORT:
00954                            short_valp = (short *) rec_start;
00955                            break;
00956                          case NC_INT:
00957                            int_valp = (int *) rec_start;
00958                            break;
00959                          case NC_FLOAT:
00960                            float_valp = (float *) rec_start;
00961                            break;
00962                          case NC_DOUBLE:
00963                            double_valp = (double *) rec_start;
00964                            break;
00965                        }
00966                  }
00967 break;
00968 case 64:
00969 #line 454 "ncgen.y"
00970 {
00971                        if (valnum < var_len) { /* leftovers */
00972                            nc_fill(valtype,
00973                                     var_len - valnum,
00974                                     rec_cur,
00975                                     vars[varnum].fill_value);
00976                        }
00977                        /* put out var_len values */
00978                        /* vars[varnum].nrecs = valnum / rec_len; */
00979                        vars[varnum].nrecs = var_len / rec_len;
00980                        if (derror_count == 0)
00981                            put_variable(rec_start);
00982                        free ((char *) rec_start);
00983                  }
00984 break;
00985 case 67:
00986 #line 473 "ncgen.y"
00987 {
00988                        if(valnum >= var_len) {
00989                            if (vars[varnum].dims[0] != rec_dim) { /* not recvar */
00990                                derror("too many values for this variable, %d >= %d",
00991                                       valnum, var_len);
00992                                exit (4);
00993                            } else { /* a record variable, so grow data
00994                                       container and increment var_len by
00995                                       multiple of record size */
00996                                ptrdiff_t rec_inc = (char *)rec_cur
00997                                    - (char *)rec_start;
00998                                var_len = rec_len * (1 + valnum / rec_len);
00999                                rec_start = erealloc(rec_start, var_len*var_size);
01000                                rec_cur = (char *)rec_start + rec_inc;
01001                                char_valp = (char *) rec_cur;
01002                                byte_valp = (signed char *) rec_cur;
01003                                short_valp = (short *) rec_cur;
01004                                int_valp = (int *) rec_cur;
01005                                float_valp = (float *) rec_cur;
01006                                double_valp = (double *) rec_cur;
01007                            }
01008                        }
01009                        not_a_string = 1;
01010                    }
01011 break;
01012 case 68:
01013 #line 498 "ncgen.y"
01014 {
01015                        if (not_a_string) {
01016                            switch (valtype) {
01017                              case NC_CHAR:
01018                                rec_cur = (void *) char_valp;
01019                                break;
01020                              case NC_BYTE:
01021                                rec_cur = (void *) byte_valp;
01022                                break;
01023                              case NC_SHORT:
01024                                rec_cur = (void *) short_valp;
01025                                break;
01026                              case NC_INT:
01027                                rec_cur = (void *) int_valp;
01028                                break;
01029                              case NC_FLOAT:
01030                                rec_cur = (void *) float_valp;
01031                                break;
01032                              case NC_DOUBLE:
01033                                rec_cur = (void *) double_valp;
01034                                break;
01035                            }
01036                        }
01037                    }
01038 break;
01039 case 69:
01040 #line 525 "ncgen.y"
01041 {
01042                        atype_code = NC_CHAR;
01043                        switch (valtype) {
01044                          case NC_CHAR:
01045                            *char_valp++ = char_val;
01046                            break;
01047                          case NC_BYTE:
01048                            *byte_valp++ = char_val;
01049                            break;
01050                          case NC_SHORT:
01051                            *short_valp++ = char_val;
01052                            break;
01053                          case NC_INT:
01054                            *int_valp++ = char_val;
01055                            break;
01056                          case NC_FLOAT:
01057                            *float_valp++ = char_val;
01058                            break;
01059                          case NC_DOUBLE:
01060                            *double_valp++ = char_val;
01061                            break;
01062                        }
01063                        valnum++;
01064                    }
01065 break;
01066 case 70:
01067 #line 550 "ncgen.y"
01068 {
01069                        not_a_string = 0;
01070                        atype_code = NC_CHAR;
01071                        {
01072                            size_t len = strlen(termstring);
01073 
01074                            if(valnum + len > var_len) {
01075                                if (vars[varnum].dims[0] != rec_dim) {
01076                                    derror("too many values for this variable, %d>%d", 
01077                                           valnum+len, var_len);
01078                                    exit (5);
01079                                } else {/* a record variable so grow it */
01080                                    ptrdiff_t rec_inc = (char *)rec_cur
01081                                        - (char *)rec_start;
01082                                    var_len += rec_len * (len + valnum - var_len)/rec_len;
01083                                    rec_start = erealloc(rec_start, var_len*var_size);
01084                                    rec_cur = (char *)rec_start + rec_inc;
01085                                    char_valp = (char *) rec_cur;
01086                                }
01087                            }
01088                            switch (valtype) {
01089                              case NC_CHAR:
01090                                {
01091                                    int ld;
01092                                    size_t i, sl;
01093                                    (void)strncpy(char_valp,termstring,len);
01094                                    ld = vars[varnum].ndims-1;
01095                                    if (ld > 0) {/* null-fill to size of last dim */
01096                                        sl = dims[vars[varnum].dims[ld]].size;
01097                                        for (i =len;i<sl;i++)
01098                                            char_valp[i] = '\0';
01099                                        if (sl < len)
01100                                            sl = len;
01101                                        valnum += sl;
01102                                        char_valp += sl;
01103                                    } else { /* scalar or 1D strings */
01104                                        valnum += len;
01105                                        char_valp += len;
01106                                    }
01107                                    rec_cur = (void *) char_valp;
01108                                }
01109                                break;
01110                              case NC_BYTE:
01111                              case NC_SHORT:
01112                              case NC_INT:
01113                              case NC_FLOAT:
01114                              case NC_DOUBLE:
01115                                derror("string value invalid for %s variable",
01116                                       nctype(valtype));
01117                                break;
01118                            }
01119                        }
01120                    }
01121 break;
01122 case 71:
01123 #line 604 "ncgen.y"
01124 {
01125                        atype_code = NC_BYTE;
01126                        switch (valtype) {
01127                          case NC_CHAR:
01128                            *char_valp++ = byte_val;
01129                            break;
01130                          case NC_BYTE:
01131                            *byte_valp++ = byte_val;
01132                            break;
01133                          case NC_SHORT:
01134                            *short_valp++ = byte_val;
01135                            break;
01136                          case NC_INT:
01137                            *int_valp++ = byte_val;
01138                            break;
01139                          case NC_FLOAT:
01140                            *float_valp++ = byte_val;
01141                            break;
01142                          case NC_DOUBLE:
01143                            *double_valp++ = byte_val;
01144                            break;
01145                        }
01146                        valnum++;
01147                    }
01148 break;
01149 case 72:
01150 #line 629 "ncgen.y"
01151 {
01152                        atype_code = NC_SHORT;
01153                        switch (valtype) {
01154                          case NC_CHAR:
01155                            *char_valp++ = short_val;
01156                            break;
01157                          case NC_BYTE:
01158                            *byte_valp++ = short_val;
01159                            break;
01160                          case NC_SHORT:
01161                            *short_valp++ = short_val;
01162                            break;
01163                          case NC_INT:
01164                            *int_valp++ = short_val;
01165                            break;
01166                          case NC_FLOAT:
01167                            *float_valp++ = short_val;
01168                            break;
01169                          case NC_DOUBLE:
01170                            *double_valp++ = short_val;
01171                            break;
01172                        }
01173                        valnum++;
01174                    }
01175 break;
01176 case 73:
01177 #line 654 "ncgen.y"
01178 {
01179                        atype_code = NC_INT;
01180                        switch (valtype) {
01181                          case NC_CHAR:
01182                            *char_valp++ = int_val;
01183                            break;
01184                          case NC_BYTE:
01185                            *byte_valp++ = int_val;
01186                            break;
01187                          case NC_SHORT:
01188                            *short_valp++ = int_val;
01189                            break;
01190                          case NC_INT:
01191                            *int_valp++ = int_val;
01192                            break;
01193                          case NC_FLOAT:
01194                            *float_valp++ = int_val;
01195                            break;
01196                          case NC_DOUBLE:
01197                            *double_valp++ = int_val;
01198                            break;
01199                        }
01200                        valnum++;
01201                    }
01202 break;
01203 case 74:
01204 #line 679 "ncgen.y"
01205 {
01206                        atype_code = NC_FLOAT;
01207                        switch (valtype) {
01208                          case NC_CHAR:
01209                            *char_valp++ = float_val;
01210                            break;
01211                          case NC_BYTE:
01212                            *byte_valp++ = float_val;
01213                            break;
01214                          case NC_SHORT:
01215                            *short_valp++ = float_val;
01216                            break;
01217                          case NC_INT:
01218                            *int_valp++ = float_val;
01219                            break;
01220                          case NC_FLOAT:
01221                            *float_valp++ = float_val;
01222                            break;
01223                          case NC_DOUBLE:
01224                            *double_valp++ = float_val;
01225                            break;
01226                        }
01227                        valnum++;
01228                    }
01229 break;
01230 case 75:
01231 #line 704 "ncgen.y"
01232 {
01233                        atype_code = NC_DOUBLE;
01234                        switch (valtype) {
01235                          case NC_CHAR:
01236                            *char_valp++ = double_val;
01237                            break;
01238                          case NC_BYTE:
01239                            *byte_valp++ = double_val;
01240                            break;
01241                          case NC_SHORT:
01242                            *short_valp++ = double_val;
01243                            break;
01244                          case NC_INT:
01245                            *int_valp++ = double_val;
01246                            break;
01247                          case NC_FLOAT:
01248                            if (double_val == NC_FILL_DOUBLE)
01249                              *float_valp++ = NC_FILL_FLOAT;
01250                            else
01251                              *float_valp++ = double_val;
01252                            break;
01253                          case NC_DOUBLE:
01254                            *double_valp++ = double_val;
01255                            break;
01256                        }
01257                        valnum++;
01258                    }
01259 break;
01260 case 76:
01261 #line 732 "ncgen.y"
01262 {
01263                        /* store fill_value */
01264                        switch (valtype) {
01265                        case NC_CHAR:
01266                            nc_fill(valtype, 1, (void *)char_valp++,
01267                                    vars[varnum].fill_value);
01268                            break;
01269                        case NC_BYTE:
01270                            nc_fill(valtype, 1, (void *)byte_valp++,
01271                                    vars[varnum].fill_value);
01272                            break;
01273                        case NC_SHORT:
01274                            nc_fill(valtype, 1, (void *)short_valp++,
01275                                    vars[varnum].fill_value);
01276                            break;
01277                        case NC_INT:
01278                            nc_fill(valtype, 1, (void *)int_valp++,
01279                                    vars[varnum].fill_value);
01280                            break;
01281                        case NC_FLOAT:
01282                            nc_fill(valtype, 1, (void *)float_valp++,
01283                                    vars[varnum].fill_value);
01284                            break;
01285                        case NC_DOUBLE:
01286                            nc_fill(valtype, 1, (void *)double_valp++,
01287                                    vars[varnum].fill_value);
01288                            break;
01289                        }
01290                        valnum++;
01291                    }
01292 break;
01293 #line 1294 "y.tab.c"
01294     }
01295     yyssp -= yym;
01296     yystate = *yyssp;
01297     yyvsp -= yym;
01298     yym = yylhs[yyn];
01299     if (yystate == 0 && yym == 0)
01300     {
01301 #if YYDEBUG
01302         if (yydebug)
01303             printf("%sdebug: after reduction, shifting from state 0 to\
01304  state %d\n", YYPREFIX, YYFINAL);
01305 #endif
01306         yystate = YYFINAL;
01307         *++yyssp = YYFINAL;
01308         *++yyvsp = yyval;
01309         if (yychar < 0)
01310         {
01311             if ((yychar = yylex()) < 0) yychar = 0;
01312 #if YYDEBUG
01313             if (yydebug)
01314             {
01315                 yys = 0;
01316                 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
01317                 if (!yys) yys = "illegal-symbol";
01318                 printf("%sdebug: state %d, reading %d (%s)\n",
01319                         YYPREFIX, YYFINAL, yychar, yys);
01320             }
01321 #endif
01322         }
01323         if (yychar == 0) goto yyaccept;
01324         goto yyloop;
01325     }
01326     if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
01327             yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
01328         yystate = yytable[yyn];
01329     else
01330         yystate = yydgoto[yym];
01331 #if YYDEBUG
01332     if (yydebug)
01333         printf("%sdebug: after reduction, shifting from state %d \
01334 to state %d\n", YYPREFIX, *yyssp, yystate);
01335 #endif
01336     if (yyssp >= yysslim && yygrowstack())
01337     {
01338         goto yyoverflow;
01339     }
01340     *++yyssp = yystate;
01341     *++yyvsp = yyval;
01342     goto yyloop;
01343 yyoverflow:
01344     yyerror("yacc stack overflow");
01345 yyabort:
01346     return (1);
01347 yyaccept:
01348     return (0);
01349 }

int yywrap void   ) 
 

Definition at line 367 of file ncgentab.c.

00368 {
00369     return  1;
00370 }


Variable Documentation

void* att_space [static]
 

Definition at line 59 of file ncgentab.c.

Referenced by yyparse().

nc_type atype_code [static]
 

Definition at line 57 of file ncgentab.c.

Referenced by yyparse().

signed char byte_val [static]
 

Definition at line 54 of file ncgentab.c.

Referenced by yyparse().

signed char* byte_valp [static]
 

Definition at line 63 of file ncgentab.c.

Referenced by yyparse().

char char_val [static]
 

Definition at line 53 of file ncgentab.c.

Referenced by yyparse().

char* char_valp [static]
 

Definition at line 62 of file ncgentab.c.

Referenced by nc_fill(), and yyparse().

int derror_count
 

Definition at line 30 of file genlib.c.

Referenced by check_err(), derror(), and yyparse().

double double_val [static]
 

Definition at line 49 of file ncgentab.c.

Referenced by yyparse().

double* double_valp [static]
 

Definition at line 67 of file ncgentab.c.

Referenced by nc_fill(), and yyparse().

float float_val [static]
 

Definition at line 50 of file ncgentab.c.

Referenced by yyparse().

float* float_valp [static]
 

Definition at line 66 of file ncgentab.c.

Referenced by nc_fill(), and yyparse().

int int_val [static]
 

Definition at line 51 of file ncgentab.c.

Referenced by yyparse().

int* int_valp [static]
 

Definition at line 65 of file ncgentab.c.

Referenced by yyparse().

int lineno
 

Definition at line 29 of file genlib.c.

Referenced by derror().

char* netcdfname [static]
 

Definition at line 58 of file ncgentab.c.

Referenced by yyparse().

int not_a_string [static]
 

Definition at line 47 of file ncgentab.c.

Referenced by yyparse().

void* rec_cur [static]
 

Definition at line 68 of file ncgentab.c.

Referenced by yyparse().

void* rec_start [static]
 

Definition at line 69 of file ncgentab.c.

Referenced by yyparse().

char SccsId[] = "$Id: ncgentab.c,v 1.15 2005/02/17 23:24:25 ed Exp $" [static]
 

Definition at line 18 of file ncgentab.c.

short short_val [static]
 

Definition at line 52 of file ncgentab.c.

Referenced by yyparse().

short* short_valp [static]
 

Definition at line 64 of file ncgentab.c.

Referenced by nc_fill(), and yyparse().

YYSTYPE symlist
 

Definition at line 42 of file ncgentab.c.

Referenced by clearout(), install(), and lookup().

char termstring[MAXTRST] [static]
 

Definition at line 48 of file ncgentab.c.

Referenced by yyparse().

nc_type type_code [static]
 

Definition at line 56 of file ncgentab.c.

Referenced by yyparse().

nc_type valtype [static]
 

Definition at line 60 of file ncgentab.c.

Referenced by yyparse().

int yychar
 

Definition at line 334 of file ncgentab.c.

Referenced by yyparse().

const short yycheck[]
 

Initial value:

 {                                      58,
   58,   58,  125,   58,  125,  125,   37,   14,   44,   44,
   44,   55,  274,  123,   41,  257,   78,   44,  272,   58,
   64,  264,   59,   59,   59,   59,   33,  269,   90,  271,
   61,  265,  266,  267,  268,  269,  270,  271,   61,  264,
   58,  264,  276,  265,  266,  267,  268,  269,  270,  271,
   59,  275,   44,   59,  125,   59,   61,   40,   44,   59,
   44,   59,   61,   59,  125,  125,  125,  125,   59,  125,
   59,    8,   25,   33,   17,   90,   61,   44,   -1,   96,
   83,   -1,   64,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,  275,   -1,  275,  275,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,  264,   -1,  264,   -1,  264,
   -1,   -1,   -1,   -1,  273,  273,  275,  275,  273,  258,
  259,  260,  261,  262,  263,  264,
}

Definition at line 189 of file ncgentab.c.

Referenced by yyparse().

int yydebug
 

Definition at line 331 of file ncgentab.c.

Referenced by yyparse().

const short yydefred[]
 

Initial value:

 {                                      0,
    0,    0,    1,    0,    0,    0,   14,    0,    0,    8,
    0,   13,   36,    0,    0,    2,    0,   24,    0,   46,
   42,    0,    0,    6,    0,    0,   26,   27,   28,   29,
   30,   31,    0,    0,   20,   21,    0,   47,   45,    0,
    0,   22,    0,    0,    7,    9,   12,   10,   11,    0,
   18,    0,   32,   34,    0,    0,   23,    0,   44,   19,
    0,    0,   63,    0,    0,    3,   52,   53,   51,   54,
   55,   56,   57,    0,   48,   50,   33,    0,   35,    0,
    0,   61,    0,   41,    0,   39,   67,   62,   49,    0,
   38,    0,   65,    0,   40,   67,   70,   71,   69,   72,
   73,   74,   75,   76,   68,   66,
}

Definition at line 112 of file ncgentab.c.

Referenced by yyparse().

const short yydgoto[]
 

Initial value:

 {                                       2,
    6,    4,   16,   56,   40,    8,    9,   10,   11,   12,
   33,   17,   34,   35,   18,   19,   37,   52,   53,   20,
   79,   62,   85,   86,   21,   43,   74,   22,   39,   75,
   76,   64,   65,   80,   92,   93,  105,   94,
}

Definition at line 125 of file ncgentab.c.

Referenced by yyparse().

int yyerrflag
 

Definition at line 333 of file ncgentab.c.

Referenced by yyparse().

const short yygindex[]
 

Initial value:

 {                                      0,
    0,    0,    0,    0,    0,    0,   64,   48,    0,  -61,
    0,    0,   41,    0,   -6,   58,    0,    0,   16,  -30,
    0,    0,    0,  -14,    0,    0,    0,  -43,   34,   -2,
    0,    0,   19,    0,    0,  -16,    0,    0,
}

Definition at line 157 of file ncgentab.c.

Referenced by yyparse().

const short yylen[]
 

Initial value:

 {                                         2,
    0,    0,    8,    0,    2,    2,    3,    1,    3,    3,
    3,    3,    1,    1,    0,    2,    1,    2,    3,    1,
    1,    2,    3,    1,    2,    1,    1,    1,    1,    1,
    1,    1,    3,    0,    3,    1,    0,    3,    1,    3,
    1,    0,    4,    3,    2,    1,    1,    1,    3,    1,
    1,    1,    1,    1,    1,    1,    1,    0,    2,    1,
    2,    3,    0,    4,    1,    3,    0,    2,    1,    1,
    1,    1,    1,    1,    1,    1,
}

Definition at line 102 of file ncgentab.c.

Referenced by yyparse().

const short yylhs[]
 

Initial value:

 {                                        -1,
    2,    5,    0,    1,    1,    6,    6,    7,    7,    8,
    8,    8,    9,   10,    3,    3,    3,   11,   11,   13,
   13,   12,   12,   16,   14,   17,   17,   17,   17,   17,
   17,   18,   18,   22,   19,   20,   21,   21,   23,   23,
   24,   26,   15,   25,   25,   28,   29,   27,   27,   30,
   31,   31,   31,   31,   31,   31,   31,    4,    4,    4,
   32,   32,   34,   33,   35,   35,   38,   36,   37,   37,
   37,   37,   37,   37,   37,   37,
}

Definition at line 92 of file ncgentab.c.

Referenced by yyparse().

YYSTYPE yylval
 

Definition at line 338 of file ncgentab.c.

Referenced by yyparse().

int yynerrs
 

Definition at line 332 of file ncgentab.c.

Referenced by yyparse().

char const yyrcsid[] = "$FreeBSD: src/usr.bin/yacc/skeleton.c,v 1.28 2000/01/17 02:04:06 bde Exp $" [static]
 

Definition at line 3 of file ncgentab.c.

const short yyrindex[]
 

Initial value:

 {                                      0,
    0,    0,    0,  -58,    0, -122,    0,  -57,    0,    0,
    0,    0,    0,    0,    0,    0, -120,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0, -119,    0,    0,    0,    0,    0,    0,  -60,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    5,    0,    0,  -59,    0,    0,    0,    0,    0,
    0,  -33,    0,  -55,    0,    0,    0,    0,    0,    0,
    0,    0,    0,   10,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,   12,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,
}

Definition at line 144 of file ncgentab.c.

Referenced by yyparse().

const short yysindex[]
 

Initial value:

 {                                   -261,
 -109,    0,    0, -253, -242,  -54,    0, -242,  -35,    0,
  -22,    0,    0,  -38, -224,    0,  -56,    0,  -36,    0,
    0,  -17,  -34,    0, -242, -241,    0,    0,    0,    0,
    0,    0,  -38,   -8,    0,    0, -222,    0,    0, -223,
   -5,    0,   -4, -224,    0,    0,    0,    0,    0,   -3,
    0,    9,    0,    0, -222,  -70,    0, -221,    0,    0,
 -222,   18,    0, -222,    1,    0,    0,    0,    0,    0,
    0,    0,    0,   15,    0,    0,    0, -242,    0,    2,
    3,    0, -221,    0,  -26,    0,    0,    0,    0, -242,
    0,   17,    0, -233,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,
}

Definition at line 131 of file ncgentab.c.

Referenced by yyparse().

short* yyss
 

Definition at line 339 of file ncgentab.c.

Referenced by yygrowstack(), and yyparse().

short* yysslim
 

Definition at line 340 of file ncgentab.c.

Referenced by yygrowstack(), and yyparse().

short* yyssp
 

Definition at line 335 of file ncgentab.c.

Referenced by yygrowstack(), and yyparse().

int yystacksize
 

Definition at line 342 of file ncgentab.c.

Referenced by yygrowstack().

const short yytable[]
 

Initial value:

 {                                       4,
    5,   15,   15,   15,   17,   16,   54,   36,   25,   25,
   37,   63,    1,    3,   91,   47,   84,   90,    5,   15,
   63,    7,   42,   24,   45,   37,   36,   48,   84,   49,
   54,   97,   98,   99,  100,  101,  102,  103,   26,   38,
   44,   13,  104,   67,   68,   69,   70,   71,   72,   73,
   51,   55,   61,   57,   66,   60,   58,   78,   83,   82,
   96,   88,   87,   25,   58,   60,    4,    5,   43,   59,
   64,   23,   46,   50,   41,   95,   77,   59,    0,  106,
   89,    0,   81,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,   15,    0,   17,   16,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    4,    0,   13,    0,   13,
    0,    0,    0,    0,    4,    5,    4,    5,   14,   27,
   28,   29,   30,   31,   32,   13,
}

Definition at line 164 of file ncgentab.c.

Referenced by yyparse().

YYSTYPE yyval
 

Definition at line 337 of file ncgentab.c.

Referenced by yyparse().

YYSTYPE* yyvs
 

Definition at line 341 of file ncgentab.c.

Referenced by yygrowstack(), and yyparse().

YYSTYPE* yyvsp
 

Definition at line 336 of file ncgentab.c.

Referenced by yygrowstack(), and yyparse().


Generated on Thu Mar 16 18:12:24 2006 for nco by  doxygen 1.4.4