mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-21 08:39:46 +08:00
CMake: Add option to always automatically regenerate ncgen
source
Also: - ensure `flex` and `bison` are available - run commands from top level directory so `#line` directives in generated files include the `ncgen` subdirectory -- gives better tracing of warnings - include `sed` commands for fixing filename in `#line` directives
This commit is contained in:
parent
0c6fd78251
commit
6d6f1a82a0
@ -442,6 +442,7 @@ ENDIF(NOT ENABLE_V2_API)
|
||||
|
||||
# Option to build utilities
|
||||
OPTION(BUILD_UTILITIES "Build ncgen, ncgen3, ncdump." ON)
|
||||
option(GENERATE_NCGEN "Automatically regenerate ncgen C files if required" OFF)
|
||||
|
||||
# Option to use MMAP
|
||||
OPTION(ENABLE_MMAP "Use MMAP." ON)
|
||||
|
@ -83,23 +83,26 @@ SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CLEANFILES}")
|
||||
# Otherwise never invoked, but records how to do it.
|
||||
# BTW: note that renaming is essential because otherwise
|
||||
# autoconf will forcibly delete files of the name *.tab.*
|
||||
if (GENERATE_NCGEN)
|
||||
find_program(FLEX flex REQUIRED)
|
||||
find_program(BISON bison REQUIRED)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ncgentab.h
|
||||
COMMAND flex -Pncg -8 ncgen.l
|
||||
COMMAND rm -f ncgenl.c
|
||||
COMMAND mv lex.ncg.c ncgenl.c
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/ncgeny.h ${CMAKE_CURRENT_SOURCE_DIR}/ncgeny.c ${CMAKE_CURRENT_SOURCE_DIR}/ncgenl.c
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
|
||||
COMMAND bison -pncg -t -d ncgen.y
|
||||
COMMAND rm -f ncgeny.c ncgeny.h
|
||||
COMMAND mv ncgen.tab.c ncgeny.c
|
||||
COMMAND mv ncgen.tab.h ncgeny.h
|
||||
COMMAND mv ncgeny.h ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND mv ncgeny.c ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND mv ncgenl.c ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND ${FLEX} -Pncg -8 ncgen/ncgen.l
|
||||
COMMAND mv lex.ncg.c "${CMAKE_CURRENT_SOURCE_DIR}/ncgenl.c"
|
||||
|
||||
)
|
||||
ADD_CUSTOM_TARGET(makeparser DEPENDS ncgentab.h)
|
||||
COMMAND ${BISON} -pncg -t -d ncgen/ncgen.y
|
||||
COMMAND mv ncgen.tab.c "${CMAKE_CURRENT_SOURCE_DIR}/ncgeny.c"
|
||||
COMMAND mv ncgen.tab.h "${CMAKE_CURRENT_SOURCE_DIR}/ncgeny.h"
|
||||
COMMAND sed -i s/ncgen.tab/ncgeny/ "${CMAKE_CURRENT_SOURCE_DIR}/ncgeny.c"
|
||||
COMMAND sed -i s/lex.ncg/ncgenl/ "${CMAKE_CURRENT_SOURCE_DIR}/ncgenl.c"
|
||||
COMMAND sed -i s/ncgen.tab/ncgeny/ "${CMAKE_CURRENT_SOURCE_DIR}/ncgeny.h"
|
||||
VERBATIM
|
||||
)
|
||||
endif()
|
||||
|
||||
## Specify files to be distributed by 'make dist'
|
||||
FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.c ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)
|
||||
|
132
ncgen/ncgenl.c
132
ncgen/ncgenl.c
@ -1,5 +1,5 @@
|
||||
|
||||
#line 3 "ncgenl.c"
|
||||
#line 2 "ncgenl.c"
|
||||
|
||||
#define YY_INT_ALIGNED short int
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
#define yy_flex_debug ncg_flex_debug
|
||||
#define yyin ncgin
|
||||
#define yyleng ncgleng
|
||||
#define yylex ncglex
|
||||
#define yyncgenllex
|
||||
#define yylineno ncglineno
|
||||
#define yyout ncgout
|
||||
#define yyrestart ncgrestart
|
||||
@ -113,7 +113,7 @@
|
||||
#ifdef yylex
|
||||
#define ncglex_ALREADY_DEFINED
|
||||
#else
|
||||
#define yylex ncglex
|
||||
#define yyncgenllex
|
||||
#endif
|
||||
|
||||
#ifdef yyrestart
|
||||
@ -1584,8 +1584,8 @@ int yy_flex_debug = 0;
|
||||
#define YY_MORE_ADJ 0
|
||||
#define YY_RESTORE_YY_MORE_OFFSET
|
||||
char *yytext;
|
||||
#line 1 "ncgen.l"
|
||||
#line 2 "ncgen.l"
|
||||
#line 1 "ncgen/ncgen.l"
|
||||
#line 2 "ncgen/ncgen.l"
|
||||
/*********************************************************************
|
||||
* Copyright 1993, UCAR/Unidata
|
||||
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
|
||||
@ -1731,7 +1731,7 @@ struct Specialtoken specials[] = {
|
||||
{NULL,0} /* null terminate */
|
||||
};
|
||||
|
||||
#line 1735 "ncgenl.c"
|
||||
#line 1734 "ncgenl.c"
|
||||
|
||||
/* The most correct (validating) version of UTF8 character set
|
||||
(Taken from: http://www.w3.org/2005/03/23-lex-U)
|
||||
@ -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 1778 "ncgenl.c"
|
||||
#line 1777 "ncgenl.c"
|
||||
|
||||
#define INITIAL 0
|
||||
#define ST_C_COMMENT 1
|
||||
@ -1993,9 +1993,9 @@ YY_DECL
|
||||
}
|
||||
|
||||
{
|
||||
#line 226 "ncgen.l"
|
||||
#line 226 "ncgen/ncgen.l"
|
||||
|
||||
#line 1999 "ncgenl.c"
|
||||
#line 1998 "ncgenl.c"
|
||||
|
||||
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
|
||||
{
|
||||
@ -2054,14 +2054,14 @@ do_action: /* This label is used only to access EOF actions. */
|
||||
|
||||
case 1:
|
||||
YY_RULE_SETUP
|
||||
#line 227 "ncgen.l"
|
||||
#line 227 "ncgen/ncgen.l"
|
||||
{ /* whitespace */
|
||||
break;
|
||||
}
|
||||
YY_BREAK
|
||||
case 2:
|
||||
YY_RULE_SETUP
|
||||
#line 231 "ncgen.l"
|
||||
#line 231 "ncgen/ncgen.l"
|
||||
{ /* comment */
|
||||
break;
|
||||
}
|
||||
@ -2069,7 +2069,7 @@ YY_RULE_SETUP
|
||||
case 3:
|
||||
/* rule 3 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 235 "ncgen.l"
|
||||
#line 235 "ncgen/ncgen.l"
|
||||
{int len; char* s = NULL;
|
||||
/* In netcdf4, this will be used in a variety
|
||||
of places, so only remove escapes */
|
||||
@ -2093,7 +2093,7 @@ yytext[MAXTRST-1] = '\0';
|
||||
YY_BREAK
|
||||
case 4:
|
||||
YY_RULE_SETUP
|
||||
#line 256 "ncgen.l"
|
||||
#line 256 "ncgen/ncgen.l"
|
||||
{ /* drop leading 0x; pad to even number of chars */
|
||||
char* p = yytext+2;
|
||||
int len = yyleng - 2;
|
||||
@ -2108,143 +2108,143 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 5:
|
||||
YY_RULE_SETUP
|
||||
#line 268 "ncgen.l"
|
||||
#line 268 "ncgen/ncgen.l"
|
||||
{return lexdebug(COMPOUND);}
|
||||
YY_BREAK
|
||||
case 6:
|
||||
YY_RULE_SETUP
|
||||
#line 269 "ncgen.l"
|
||||
#line 269 "ncgen/ncgen.l"
|
||||
{return lexdebug(ENUM);}
|
||||
YY_BREAK
|
||||
case 7:
|
||||
YY_RULE_SETUP
|
||||
#line 270 "ncgen.l"
|
||||
#line 270 "ncgen/ncgen.l"
|
||||
{return lexdebug(OPAQUE_);}
|
||||
YY_BREAK
|
||||
case 8:
|
||||
YY_RULE_SETUP
|
||||
#line 272 "ncgen.l"
|
||||
#line 272 "ncgen/ncgen.l"
|
||||
{return lexdebug(FLOAT_K);}
|
||||
YY_BREAK
|
||||
case 9:
|
||||
YY_RULE_SETUP
|
||||
#line 273 "ncgen.l"
|
||||
#line 273 "ncgen/ncgen.l"
|
||||
{return lexdebug(DOUBLE_K);}
|
||||
YY_BREAK
|
||||
case 10:
|
||||
YY_RULE_SETUP
|
||||
#line 274 "ncgen.l"
|
||||
#line 274 "ncgen/ncgen.l"
|
||||
{return lexdebug(CHAR_K);}
|
||||
YY_BREAK
|
||||
case 11:
|
||||
YY_RULE_SETUP
|
||||
#line 275 "ncgen.l"
|
||||
#line 275 "ncgen/ncgen.l"
|
||||
{return lexdebug(BYTE_K);}
|
||||
YY_BREAK
|
||||
case 12:
|
||||
YY_RULE_SETUP
|
||||
#line 276 "ncgen.l"
|
||||
#line 276 "ncgen/ncgen.l"
|
||||
{return lexdebug(SHORT_K);}
|
||||
YY_BREAK
|
||||
case 13:
|
||||
YY_RULE_SETUP
|
||||
#line 277 "ncgen.l"
|
||||
#line 277 "ncgen/ncgen.l"
|
||||
{return lexdebug(INT_K);}
|
||||
YY_BREAK
|
||||
case 14:
|
||||
YY_RULE_SETUP
|
||||
#line 278 "ncgen.l"
|
||||
#line 278 "ncgen/ncgen.l"
|
||||
{return lexdebug(identcheck(UBYTE_K));}
|
||||
YY_BREAK
|
||||
case 15:
|
||||
YY_RULE_SETUP
|
||||
#line 279 "ncgen.l"
|
||||
#line 279 "ncgen/ncgen.l"
|
||||
{return lexdebug(identcheck(USHORT_K));}
|
||||
YY_BREAK
|
||||
case 16:
|
||||
YY_RULE_SETUP
|
||||
#line 280 "ncgen.l"
|
||||
#line 280 "ncgen/ncgen.l"
|
||||
{return lexdebug(identcheck(UINT_K));}
|
||||
YY_BREAK
|
||||
case 17:
|
||||
YY_RULE_SETUP
|
||||
#line 281 "ncgen.l"
|
||||
#line 281 "ncgen/ncgen.l"
|
||||
{return lexdebug(identcheck(INT64_K));}
|
||||
YY_BREAK
|
||||
case 18:
|
||||
YY_RULE_SETUP
|
||||
#line 282 "ncgen.l"
|
||||
#line 282 "ncgen/ncgen.l"
|
||||
{return lexdebug(identcheck(UINT64_K));}
|
||||
YY_BREAK
|
||||
case 19:
|
||||
YY_RULE_SETUP
|
||||
#line 283 "ncgen.l"
|
||||
#line 283 "ncgen/ncgen.l"
|
||||
{return lexdebug(identcheck(STRING_K));}
|
||||
YY_BREAK
|
||||
case 20:
|
||||
YY_RULE_SETUP
|
||||
#line 285 "ncgen.l"
|
||||
#line 285 "ncgen/ncgen.l"
|
||||
{return lexdebug(FLOAT_K);}
|
||||
YY_BREAK
|
||||
case 21:
|
||||
YY_RULE_SETUP
|
||||
#line 286 "ncgen.l"
|
||||
#line 286 "ncgen/ncgen.l"
|
||||
{return lexdebug(INT_K);}
|
||||
YY_BREAK
|
||||
case 22:
|
||||
YY_RULE_SETUP
|
||||
#line 287 "ncgen.l"
|
||||
#line 287 "ncgen/ncgen.l"
|
||||
{return lexdebug(INT_K);}
|
||||
YY_BREAK
|
||||
case 23:
|
||||
YY_RULE_SETUP
|
||||
#line 288 "ncgen.l"
|
||||
#line 288 "ncgen/ncgen.l"
|
||||
{return lexdebug(identcheck(UINT_K));}
|
||||
YY_BREAK
|
||||
case 24:
|
||||
YY_RULE_SETUP
|
||||
#line 289 "ncgen.l"
|
||||
#line 289 "ncgen/ncgen.l"
|
||||
{return lexdebug(identcheck(UINT_K));}
|
||||
YY_BREAK
|
||||
case 25:
|
||||
YY_RULE_SETUP
|
||||
#line 292 "ncgen.l"
|
||||
#line 292 "ncgen/ncgen.l"
|
||||
{int32_val = -1;
|
||||
return lexdebug(NC_UNLIMITED_K);}
|
||||
YY_BREAK
|
||||
case 26:
|
||||
YY_RULE_SETUP
|
||||
#line 295 "ncgen.l"
|
||||
#line 295 "ncgen/ncgen.l"
|
||||
{return lexdebug(TYPES);}
|
||||
YY_BREAK
|
||||
case 27:
|
||||
YY_RULE_SETUP
|
||||
#line 296 "ncgen.l"
|
||||
#line 296 "ncgen/ncgen.l"
|
||||
{return lexdebug(DIMENSIONS);}
|
||||
YY_BREAK
|
||||
case 28:
|
||||
YY_RULE_SETUP
|
||||
#line 297 "ncgen.l"
|
||||
#line 297 "ncgen/ncgen.l"
|
||||
{return lexdebug(VARIABLES);}
|
||||
YY_BREAK
|
||||
case 29:
|
||||
YY_RULE_SETUP
|
||||
#line 298 "ncgen.l"
|
||||
#line 298 "ncgen/ncgen.l"
|
||||
{return lexdebug(DATA);}
|
||||
YY_BREAK
|
||||
case 30:
|
||||
YY_RULE_SETUP
|
||||
#line 299 "ncgen.l"
|
||||
#line 299 "ncgen/ncgen.l"
|
||||
{return lexdebug(GROUP);}
|
||||
YY_BREAK
|
||||
case 31:
|
||||
YY_RULE_SETUP
|
||||
#line 301 "ncgen.l"
|
||||
#line 301 "ncgen/ncgen.l"
|
||||
{BEGIN(TEXT);return lexdebug(NETCDF);}
|
||||
YY_BREAK
|
||||
case 32:
|
||||
YY_RULE_SETUP
|
||||
#line 303 "ncgen.l"
|
||||
#line 303 "ncgen/ncgen.l"
|
||||
{ /* missing value (pre-2.4 backward compatibility) */
|
||||
if (yytext[0] == '-') {
|
||||
double_val = -INFINITY;
|
||||
@ -2257,7 +2257,7 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 33:
|
||||
YY_RULE_SETUP
|
||||
#line 312 "ncgen.l"
|
||||
#line 312 "ncgen/ncgen.l"
|
||||
{ /* missing value (pre-2.4 backward compatibility) */
|
||||
double_val = NAN;
|
||||
specialconstants = 1;
|
||||
@ -2266,7 +2266,7 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 34:
|
||||
YY_RULE_SETUP
|
||||
#line 318 "ncgen.l"
|
||||
#line 318 "ncgen/ncgen.l"
|
||||
{/* missing value (pre-2.4 backward compatibility)*/
|
||||
if (yytext[0] == '-') {
|
||||
float_val = -INFINITYF;
|
||||
@ -2279,7 +2279,7 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 35:
|
||||
YY_RULE_SETUP
|
||||
#line 327 "ncgen.l"
|
||||
#line 327 "ncgen/ncgen.l"
|
||||
{ /* missing value (pre-2.4 backward compatibility) */
|
||||
float_val = NANF;
|
||||
specialconstants = 1;
|
||||
@ -2288,7 +2288,7 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 36:
|
||||
YY_RULE_SETUP
|
||||
#line 333 "ncgen.l"
|
||||
#line 333 "ncgen/ncgen.l"
|
||||
{
|
||||
#ifdef USE_NETCDF4
|
||||
if(l_flag == L_C || l_flag == L_BINARY)
|
||||
@ -2301,7 +2301,7 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 37:
|
||||
YY_RULE_SETUP
|
||||
#line 343 "ncgen.l"
|
||||
#line 343 "ncgen/ncgen.l"
|
||||
{
|
||||
bbClear(lextext);
|
||||
bbAppendn(lextext,(char*)yytext,yyleng+1); /* include null */
|
||||
@ -2312,7 +2312,7 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 38:
|
||||
YY_RULE_SETUP
|
||||
#line 352 "ncgen.l"
|
||||
#line 352 "ncgen/ncgen.l"
|
||||
{struct Specialtoken* st;
|
||||
bbClear(lextext);
|
||||
bbAppendn(lextext,(char*)yytext,yyleng+1); /* include null */
|
||||
@ -2326,7 +2326,7 @@ YY_RULE_SETUP
|
||||
case 39:
|
||||
/* rule 39 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 362 "ncgen.l"
|
||||
#line 362 "ncgen/ncgen.l"
|
||||
{
|
||||
int c;
|
||||
char* p; char* q;
|
||||
@ -2346,7 +2346,7 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 40:
|
||||
YY_RULE_SETUP
|
||||
#line 379 "ncgen.l"
|
||||
#line 379 "ncgen/ncgen.l"
|
||||
{ char* id = NULL; int len;
|
||||
len = strlen(yytext);
|
||||
len = unescape(yytext,len,ISIDENT,&id);
|
||||
@ -2361,7 +2361,7 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 41:
|
||||
YY_RULE_SETUP
|
||||
#line 391 "ncgen.l"
|
||||
#line 391 "ncgen/ncgen.l"
|
||||
{
|
||||
/*
|
||||
We need to try to see what size of integer ((u)int).
|
||||
@ -2442,7 +2442,7 @@ done: return 0;
|
||||
YY_BREAK
|
||||
case 42:
|
||||
YY_RULE_SETUP
|
||||
#line 469 "ncgen.l"
|
||||
#line 469 "ncgen/ncgen.l"
|
||||
{
|
||||
int c;
|
||||
int token = 0;
|
||||
@ -2494,7 +2494,7 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 43:
|
||||
YY_RULE_SETUP
|
||||
#line 517 "ncgen.l"
|
||||
#line 517 "ncgen/ncgen.l"
|
||||
{
|
||||
if (sscanf((char*)yytext, "%le", &double_val) != 1) {
|
||||
sprintf(errstr,"bad long or double constant: %s",(char*)yytext);
|
||||
@ -2505,7 +2505,7 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 44:
|
||||
YY_RULE_SETUP
|
||||
#line 524 "ncgen.l"
|
||||
#line 524 "ncgen/ncgen.l"
|
||||
{
|
||||
if (sscanf((char*)yytext, "%e", &float_val) != 1) {
|
||||
sprintf(errstr,"bad float constant: %s",(char*)yytext);
|
||||
@ -2517,7 +2517,7 @@ YY_RULE_SETUP
|
||||
case 45:
|
||||
/* rule 45 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 531 "ncgen.l"
|
||||
#line 531 "ncgen/ncgen.l"
|
||||
{
|
||||
(void) sscanf((char*)&yytext[1],"%c",&byte_val);
|
||||
return lexdebug(BYTE_CONST);
|
||||
@ -2525,7 +2525,7 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 46:
|
||||
YY_RULE_SETUP
|
||||
#line 535 "ncgen.l"
|
||||
#line 535 "ncgen/ncgen.l"
|
||||
{
|
||||
int oct = unescapeoct(&yytext[2]);
|
||||
if(oct < 0) {
|
||||
@ -2538,7 +2538,7 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 47:
|
||||
YY_RULE_SETUP
|
||||
#line 544 "ncgen.l"
|
||||
#line 544 "ncgen/ncgen.l"
|
||||
{
|
||||
int hex = unescapehex(&yytext[3]);
|
||||
if(byte_val < 0) {
|
||||
@ -2551,7 +2551,7 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 48:
|
||||
YY_RULE_SETUP
|
||||
#line 553 "ncgen.l"
|
||||
#line 553 "ncgen/ncgen.l"
|
||||
{
|
||||
switch ((char)yytext[2]) {
|
||||
case 'a': byte_val = '\007'; break; /* not everyone under-
|
||||
@ -2574,7 +2574,7 @@ YY_RULE_SETUP
|
||||
case 49:
|
||||
/* rule 49 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 572 "ncgen.l"
|
||||
#line 572 "ncgen/ncgen.l"
|
||||
{
|
||||
lineno++ ;
|
||||
break;
|
||||
@ -2582,7 +2582,7 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 50:
|
||||
YY_RULE_SETUP
|
||||
#line 577 "ncgen.l"
|
||||
#line 577 "ncgen/ncgen.l"
|
||||
{/*initial*/
|
||||
BEGIN(ST_C_COMMENT);
|
||||
break;
|
||||
@ -2591,21 +2591,21 @@ YY_RULE_SETUP
|
||||
case 51:
|
||||
/* rule 51 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 582 "ncgen.l"
|
||||
#line 582 "ncgen/ncgen.l"
|
||||
{/* continuation */
|
||||
break;
|
||||
}
|
||||
YY_BREAK
|
||||
case 52:
|
||||
YY_RULE_SETUP
|
||||
#line 586 "ncgen.l"
|
||||
#line 586 "ncgen/ncgen.l"
|
||||
{/* final */
|
||||
BEGIN(INITIAL);
|
||||
break;
|
||||
}
|
||||
YY_BREAK
|
||||
case YY_STATE_EOF(ST_C_COMMENT):
|
||||
#line 591 "ncgen.l"
|
||||
#line 591 "ncgen/ncgen.l"
|
||||
{/* final, error */
|
||||
fprintf(stderr,"unterminated /**/ comment");
|
||||
BEGIN(INITIAL);
|
||||
@ -2614,17 +2614,17 @@ case YY_STATE_EOF(ST_C_COMMENT):
|
||||
YY_BREAK
|
||||
case 53:
|
||||
YY_RULE_SETUP
|
||||
#line 597 "ncgen.l"
|
||||
#line 597 "ncgen/ncgen.l"
|
||||
{/* Note: this next rule will not work for UTF8 characters */
|
||||
return lexdebug(yytext[0]) ;
|
||||
}
|
||||
YY_BREAK
|
||||
case 54:
|
||||
YY_RULE_SETUP
|
||||
#line 600 "ncgen.l"
|
||||
#line 600 "ncgen/ncgen.l"
|
||||
ECHO;
|
||||
YY_BREAK
|
||||
#line 2628 "ncgenl.c"
|
||||
#line 2627 "ncgenl.c"
|
||||
case YY_STATE_EOF(INITIAL):
|
||||
case YY_STATE_EOF(TEXT):
|
||||
yyterminate();
|
||||
@ -3630,7 +3630,7 @@ void yyfree (void * ptr )
|
||||
|
||||
#define YYTABLES_NAME "yytables"
|
||||
|
||||
#line 600 "ncgen.l"
|
||||
#line 600 "ncgen/ncgen.l"
|
||||
|
||||
static int
|
||||
lexdebug(int token)
|
||||
|
268
ncgen/ncgeny.c
268
ncgen/ncgeny.c
@ -74,7 +74,7 @@
|
||||
#define yychar ncgchar
|
||||
|
||||
/* First part of user prologue. */
|
||||
#line 11 "ncgen.y"
|
||||
#line 11 "ncgen/ncgen.y"
|
||||
|
||||
/*
|
||||
static char SccsId[] = "$Id: ncgen.y,v 1.42 2010/05/18 21:32:46 dmh Exp $";
|
||||
@ -1845,19 +1845,19 @@ yyreduce:
|
||||
switch (yyn)
|
||||
{
|
||||
case 2: /* ncdesc: NETCDF datasetid rootgroup */
|
||||
#line 246 "ncgen.y"
|
||||
#line 246 "ncgen/ncgen.y"
|
||||
{if (error_count > 0) YYABORT;}
|
||||
#line 1851 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 3: /* datasetid: DATASETID */
|
||||
#line 249 "ncgen.y"
|
||||
#line 249 "ncgen/ncgen.y"
|
||||
{createrootgroup(datasetname);}
|
||||
#line 1857 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 8: /* $@1: %empty */
|
||||
#line 268 "ncgen.y"
|
||||
#line 268 "ncgen/ncgen.y"
|
||||
{
|
||||
Symbol* id = (yyvsp[-1].sym);
|
||||
markcdf4("Group specification");
|
||||
@ -1869,25 +1869,25 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 9: /* $@2: %empty */
|
||||
#line 277 "ncgen.y"
|
||||
#line 277 "ncgen/ncgen.y"
|
||||
{listpop(groupstack);}
|
||||
#line 1875 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 12: /* typesection: TYPES */
|
||||
#line 283 "ncgen.y"
|
||||
#line 283 "ncgen/ncgen.y"
|
||||
{}
|
||||
#line 1881 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 13: /* typesection: TYPES typedecls */
|
||||
#line 285 "ncgen.y"
|
||||
#line 285 "ncgen/ncgen.y"
|
||||
{markcdf4("Type specification");}
|
||||
#line 1887 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 16: /* typename: ident */
|
||||
#line 291 "ncgen.y"
|
||||
#line 291 "ncgen/ncgen.y"
|
||||
{ /* Use when defining a type */
|
||||
(yyvsp[0].sym)->objectclass = NC_TYPE;
|
||||
if(dupobjectcheck(NC_TYPE,(yyvsp[0].sym)))
|
||||
@ -1899,19 +1899,19 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 17: /* type_or_attr_decl: typedecl */
|
||||
#line 300 "ncgen.y"
|
||||
#line 300 "ncgen/ncgen.y"
|
||||
{}
|
||||
#line 1905 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 18: /* type_or_attr_decl: attrdecl ';' */
|
||||
#line 300 "ncgen.y"
|
||||
#line 300 "ncgen/ncgen.y"
|
||||
{}
|
||||
#line 1911 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 25: /* enumdecl: primtype ENUM typename '{' enumidlist '}' */
|
||||
#line 314 "ncgen.y"
|
||||
#line 314 "ncgen/ncgen.y"
|
||||
{
|
||||
int i;
|
||||
addtogroup((yyvsp[-3].sym)); /* sets prefix*/
|
||||
@ -1942,13 +1942,13 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 26: /* enumidlist: enumid */
|
||||
#line 343 "ncgen.y"
|
||||
#line 343 "ncgen/ncgen.y"
|
||||
{(yyval.mark)=listlength(stack); listpush(stack,(void*)(yyvsp[0].sym));}
|
||||
#line 1948 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 27: /* enumidlist: enumidlist ',' enumid */
|
||||
#line 345 "ncgen.y"
|
||||
#line 345 "ncgen/ncgen.y"
|
||||
{
|
||||
int i;
|
||||
(yyval.mark)=(yyvsp[-2].mark);
|
||||
@ -1967,7 +1967,7 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 28: /* enumid: ident '=' constint */
|
||||
#line 362 "ncgen.y"
|
||||
#line 362 "ncgen/ncgen.y"
|
||||
{
|
||||
(yyvsp[-2].sym)->objectclass=NC_TYPE;
|
||||
(yyvsp[-2].sym)->subclass=NC_ECONST;
|
||||
@ -1978,7 +1978,7 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 29: /* opaquedecl: OPAQUE_ '(' INT_CONST ')' typename */
|
||||
#line 371 "ncgen.y"
|
||||
#line 371 "ncgen/ncgen.y"
|
||||
{
|
||||
vercheck(NC_OPAQUE);
|
||||
addtogroup((yyvsp[0].sym)); /*sets prefix*/
|
||||
@ -1992,7 +1992,7 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 30: /* vlendecl: typeref '(' '*' ')' typename */
|
||||
#line 383 "ncgen.y"
|
||||
#line 383 "ncgen/ncgen.y"
|
||||
{
|
||||
Symbol* basetype = (yyvsp[-4].sym);
|
||||
vercheck(NC_VLEN);
|
||||
@ -2008,7 +2008,7 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 31: /* compounddecl: COMPOUND typename '{' fields '}' */
|
||||
#line 397 "ncgen.y"
|
||||
#line 397 "ncgen/ncgen.y"
|
||||
{
|
||||
int i,j;
|
||||
vercheck(NC_COMPOUND);
|
||||
@ -2042,19 +2042,19 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 32: /* fields: field ';' */
|
||||
#line 429 "ncgen.y"
|
||||
#line 429 "ncgen/ncgen.y"
|
||||
{(yyval.mark)=(yyvsp[-1].mark);}
|
||||
#line 2048 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 33: /* fields: fields field ';' */
|
||||
#line 430 "ncgen.y"
|
||||
#line 430 "ncgen/ncgen.y"
|
||||
{(yyval.mark)=(yyvsp[-2].mark);}
|
||||
#line 2054 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 34: /* field: typeref fieldlist */
|
||||
#line 434 "ncgen.y"
|
||||
#line 434 "ncgen/ncgen.y"
|
||||
{
|
||||
int i;
|
||||
(yyval.mark)=(yyvsp[0].mark);
|
||||
@ -2070,103 +2070,103 @@ yyreduce:
|
||||
break;
|
||||
|
||||
case 35: /* primtype: CHAR_K */
|
||||
#line 447 "ncgen.y"
|
||||
#line 447 "ncgen/ncgen.y"
|
||||
{ (yyval.sym) = primsymbols[NC_CHAR]; }
|
||||
#line 2076 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 36: /* primtype: BYTE_K */
|
||||
#line 448 "ncgen.y"
|
||||
#line 448 "ncgen/ncgen.y"
|
||||
{ (yyval.sym) = primsymbols[NC_BYTE]; }
|
||||
#line 2082 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 37: /* primtype: SHORT_K */
|
||||
#line 449 "ncgen.y"
|
||||
#line 449 "ncgen/ncgen.y"
|
||||
{ (yyval.sym) = primsymbols[NC_SHORT]; }
|
||||
#line 2088 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 38: /* primtype: INT_K */
|
||||
#line 450 "ncgen.y"
|
||||
#line 450 "ncgen/ncgen.y"
|
||||
{ (yyval.sym) = primsymbols[NC_INT]; }
|
||||
#line 2094 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 39: /* primtype: FLOAT_K */
|
||||
#line 451 "ncgen.y"
|
||||
#line 451 "ncgen/ncgen.y"
|
||||
{ (yyval.sym) = primsymbols[NC_FLOAT]; }
|
||||
#line 2100 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 40: /* primtype: DOUBLE_K */
|
||||
#line 452 "ncgen.y"
|
||||
#line 452 "ncgen/ncgen.y"
|
||||
{ (yyval.sym) = primsymbols[NC_DOUBLE]; }
|
||||
#line 2106 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 41: /* primtype: UBYTE_K */
|
||||
#line 453 "ncgen.y"
|
||||
#line 453 "ncgen/ncgen.y"
|
||||
{ vercheck(NC_UBYTE); (yyval.sym) = primsymbols[NC_UBYTE]; }
|
||||
#line 2112 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 42: /* primtype: USHORT_K */
|
||||
#line 454 "ncgen.y"
|
||||
#line 454 "ncgen/ncgen.y"
|
||||
{ vercheck(NC_USHORT); (yyval.sym) = primsymbols[NC_USHORT]; }
|
||||
#line 2118 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 43: /* primtype: UINT_K */
|
||||
#line 455 "ncgen.y"
|
||||
#line 455 "ncgen/ncgen.y"
|
||||
{ vercheck(NC_UINT); (yyval.sym) = primsymbols[NC_UINT]; }
|
||||
#line 2124 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 44: /* primtype: INT64_K */
|
||||
#line 456 "ncgen.y"
|
||||
#line 456 "ncgen/ncgen.y"
|
||||
{ vercheck(NC_INT64); (yyval.sym) = primsymbols[NC_INT64]; }
|
||||
#line 2130 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 45: /* primtype: UINT64_K */
|
||||
#line 457 "ncgen.y"
|
||||
#line 457 "ncgen/ncgen.y"
|
||||
{ vercheck(NC_UINT64); (yyval.sym) = primsymbols[NC_UINT64]; }
|
||||
#line 2136 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 46: /* primtype: STRING_K */
|
||||
#line 458 "ncgen.y"
|
||||
#line 458 "ncgen/ncgen.y"
|
||||
{ vercheck(NC_STRING); (yyval.sym) = primsymbols[NC_STRING]; }
|
||||
#line 2142 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 48: /* dimsection: DIMENSIONS */
|
||||
#line 462 "ncgen.y"
|
||||
#line 462 "ncgen/ncgen.y"
|
||||
{}
|
||||
#line 2148 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 49: /* dimsection: DIMENSIONS dimdecls */
|
||||
#line 463 "ncgen.y"
|
||||
#line 463 "ncgen/ncgen.y"
|
||||
{}
|
||||
#line 2154 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 52: /* dim_or_attr_decl: dimdeclist */
|
||||
#line 470 "ncgen.y"
|
||||
#line 470 "ncgen/ncgen.y"
|
||||
{}
|
||||
#line 2160 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 53: /* dim_or_attr_decl: attrdecl */
|
||||
#line 470 "ncgen.y"
|
||||
#line 470 "ncgen/ncgen.y"
|
||||
{}
|
||||
#line 2166 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 56: /* dimdecl: dimd '=' constint */
|
||||
#line 478 "ncgen.y"
|
||||
#line 478 "ncgen/ncgen.y"
|
||||
{
|
||||
(yyvsp[-2].sym)->dim.declsize = (size_t)extractint((yyvsp[0].constant));
|
||||
#ifdef GENDEBUG1
|
||||
@ -2178,7 +2178,7 @@ fprintf(stderr,"dimension: %s = %llu\n",(yyvsp[-2].sym)->name,(unsigned long lon
|
||||
break;
|
||||
|
||||
case 57: /* dimdecl: dimd '=' NC_UNLIMITED_K */
|
||||
#line 486 "ncgen.y"
|
||||
#line 486 "ncgen/ncgen.y"
|
||||
{
|
||||
(yyvsp[-2].sym)->dim.declsize = NC_UNLIMITED;
|
||||
(yyvsp[-2].sym)->dim.isunlimited = 1;
|
||||
@ -2190,7 +2190,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name);
|
||||
break;
|
||||
|
||||
case 58: /* dimd: ident */
|
||||
#line 496 "ncgen.y"
|
||||
#line 496 "ncgen/ncgen.y"
|
||||
{
|
||||
(yyvsp[0].sym)->objectclass=NC_DIM;
|
||||
if(dupobjectcheck(NC_DIM,(yyvsp[0].sym)))
|
||||
@ -2204,31 +2204,31 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name);
|
||||
break;
|
||||
|
||||
case 60: /* vasection: VARIABLES */
|
||||
#line 508 "ncgen.y"
|
||||
#line 508 "ncgen/ncgen.y"
|
||||
{}
|
||||
#line 2210 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 61: /* vasection: VARIABLES vadecls */
|
||||
#line 509 "ncgen.y"
|
||||
#line 509 "ncgen/ncgen.y"
|
||||
{}
|
||||
#line 2216 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 64: /* vadecl_or_attr: vardecl */
|
||||
#line 516 "ncgen.y"
|
||||
#line 516 "ncgen/ncgen.y"
|
||||
{}
|
||||
#line 2222 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 65: /* vadecl_or_attr: attrdecl */
|
||||
#line 516 "ncgen.y"
|
||||
#line 516 "ncgen/ncgen.y"
|
||||
{}
|
||||
#line 2228 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 66: /* vardecl: typeref varlist */
|
||||
#line 519 "ncgen.y"
|
||||
#line 519 "ncgen/ncgen.y"
|
||||
{
|
||||
int i;
|
||||
stackbase=(yyvsp[0].mark);
|
||||
@ -2252,7 +2252,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name);
|
||||
break;
|
||||
|
||||
case 67: /* varlist: varspec */
|
||||
#line 541 "ncgen.y"
|
||||
#line 541 "ncgen/ncgen.y"
|
||||
{(yyval.mark)=listlength(stack);
|
||||
listpush(stack,(void*)(yyvsp[0].sym));
|
||||
}
|
||||
@ -2260,13 +2260,13 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name);
|
||||
break;
|
||||
|
||||
case 68: /* varlist: varlist ',' varspec */
|
||||
#line 545 "ncgen.y"
|
||||
#line 545 "ncgen/ncgen.y"
|
||||
{(yyval.mark)=(yyvsp[-2].mark); listpush(stack,(void*)(yyvsp[0].sym));}
|
||||
#line 2266 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 69: /* varspec: varident dimspec */
|
||||
#line 549 "ncgen.y"
|
||||
#line 549 "ncgen/ncgen.y"
|
||||
{
|
||||
int i;
|
||||
Dimset dimset;
|
||||
@ -2297,31 +2297,31 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name);
|
||||
break;
|
||||
|
||||
case 70: /* dimspec: %empty */
|
||||
#line 577 "ncgen.y"
|
||||
#line 577 "ncgen/ncgen.y"
|
||||
{(yyval.mark)=listlength(stack);}
|
||||
#line 2303 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 71: /* dimspec: '(' dimlist ')' */
|
||||
#line 578 "ncgen.y"
|
||||
#line 578 "ncgen/ncgen.y"
|
||||
{(yyval.mark)=(yyvsp[-1].mark);}
|
||||
#line 2309 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 72: /* dimlist: dimref */
|
||||
#line 581 "ncgen.y"
|
||||
#line 581 "ncgen/ncgen.y"
|
||||
{(yyval.mark)=listlength(stack); listpush(stack,(void*)(yyvsp[0].sym));}
|
||||
#line 2315 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 73: /* dimlist: dimlist ',' dimref */
|
||||
#line 583 "ncgen.y"
|
||||
#line 583 "ncgen/ncgen.y"
|
||||
{(yyval.mark)=(yyvsp[-2].mark); listpush(stack,(void*)(yyvsp[0].sym));}
|
||||
#line 2321 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 74: /* dimref: path */
|
||||
#line 587 "ncgen.y"
|
||||
#line 587 "ncgen/ncgen.y"
|
||||
{Symbol* dimsym = (yyvsp[0].sym);
|
||||
dimsym->objectclass = NC_DIM;
|
||||
/* Find the actual dimension*/
|
||||
@ -2336,7 +2336,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name);
|
||||
break;
|
||||
|
||||
case 75: /* fieldlist: fieldspec */
|
||||
#line 601 "ncgen.y"
|
||||
#line 601 "ncgen/ncgen.y"
|
||||
{(yyval.mark)=listlength(stack);
|
||||
listpush(stack,(void*)(yyvsp[0].sym));
|
||||
}
|
||||
@ -2344,13 +2344,13 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name);
|
||||
break;
|
||||
|
||||
case 76: /* fieldlist: fieldlist ',' fieldspec */
|
||||
#line 605 "ncgen.y"
|
||||
#line 605 "ncgen/ncgen.y"
|
||||
{(yyval.mark)=(yyvsp[-2].mark); listpush(stack,(void*)(yyvsp[0].sym));}
|
||||
#line 2350 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 77: /* fieldspec: ident fielddimspec */
|
||||
#line 610 "ncgen.y"
|
||||
#line 610 "ncgen/ncgen.y"
|
||||
{
|
||||
int i;
|
||||
Dimset dimset;
|
||||
@ -2381,31 +2381,31 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name);
|
||||
break;
|
||||
|
||||
case 78: /* fielddimspec: %empty */
|
||||
#line 638 "ncgen.y"
|
||||
#line 638 "ncgen/ncgen.y"
|
||||
{(yyval.mark)=listlength(stack);}
|
||||
#line 2387 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 79: /* fielddimspec: '(' fielddimlist ')' */
|
||||
#line 639 "ncgen.y"
|
||||
#line 639 "ncgen/ncgen.y"
|
||||
{(yyval.mark)=(yyvsp[-1].mark);}
|
||||
#line 2393 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 80: /* fielddimlist: fielddim */
|
||||
#line 643 "ncgen.y"
|
||||
#line 643 "ncgen/ncgen.y"
|
||||
{(yyval.mark)=listlength(stack); listpush(stack,(void*)(yyvsp[0].sym));}
|
||||
#line 2399 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 81: /* fielddimlist: fielddimlist ',' fielddim */
|
||||
#line 645 "ncgen.y"
|
||||
#line 645 "ncgen/ncgen.y"
|
||||
{(yyval.mark)=(yyvsp[-2].mark); listpush(stack,(void*)(yyvsp[0].sym));}
|
||||
#line 2405 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 82: /* fielddim: UINT_CONST */
|
||||
#line 650 "ncgen.y"
|
||||
#line 650 "ncgen/ncgen.y"
|
||||
{ /* Anonymous integer dimension.
|
||||
Can only occur in type definitions*/
|
||||
char anon[32];
|
||||
@ -2419,7 +2419,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name);
|
||||
break;
|
||||
|
||||
case 83: /* fielddim: INT_CONST */
|
||||
#line 660 "ncgen.y"
|
||||
#line 660 "ncgen/ncgen.y"
|
||||
{ /* Anonymous integer dimension.
|
||||
Can only occur in type definitions*/
|
||||
char anon[32];
|
||||
@ -2437,7 +2437,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name);
|
||||
break;
|
||||
|
||||
case 84: /* varref: ambiguous_ref */
|
||||
#line 680 "ncgen.y"
|
||||
#line 680 "ncgen/ncgen.y"
|
||||
{Symbol* vsym = (yyvsp[0].sym);
|
||||
if(vsym->objectclass != NC_VAR) {
|
||||
derror("Undefined or forward referenced variable: %s",vsym->name);
|
||||
@ -2449,7 +2449,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name);
|
||||
break;
|
||||
|
||||
case 85: /* typeref: ambiguous_ref */
|
||||
#line 691 "ncgen.y"
|
||||
#line 691 "ncgen/ncgen.y"
|
||||
{Symbol* tsym = (yyvsp[0].sym);
|
||||
if(tsym->objectclass != NC_TYPE) {
|
||||
derror("Undefined or forward referenced type: %s",tsym->name);
|
||||
@ -2461,7 +2461,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name);
|
||||
break;
|
||||
|
||||
case 86: /* ambiguous_ref: path */
|
||||
#line 702 "ncgen.y"
|
||||
#line 702 "ncgen/ncgen.y"
|
||||
{Symbol* tvsym = (yyvsp[0].sym); Symbol* sym;
|
||||
/* disambiguate*/
|
||||
tvsym->objectclass = NC_VAR;
|
||||
@ -2484,49 +2484,49 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name);
|
||||
break;
|
||||
|
||||
case 87: /* ambiguous_ref: primtype */
|
||||
#line 720 "ncgen.y"
|
||||
#line 720 "ncgen/ncgen.y"
|
||||
{(yyval.sym)=(yyvsp[0].sym);}
|
||||
#line 2490 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 88: /* attrdecllist: %empty */
|
||||
#line 727 "ncgen.y"
|
||||
#line 727 "ncgen/ncgen.y"
|
||||
{}
|
||||
#line 2496 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 89: /* attrdecllist: attrdecl ';' attrdecllist */
|
||||
#line 727 "ncgen.y"
|
||||
#line 727 "ncgen/ncgen.y"
|
||||
{}
|
||||
#line 2502 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 90: /* attrdecl: ':' _NCPROPS '=' conststring */
|
||||
#line 731 "ncgen.y"
|
||||
#line 731 "ncgen/ncgen.y"
|
||||
{(yyval.sym) = makespecial(_NCPROPS_FLAG,NULL,NULL,(void*)(yyvsp[0].constant),ISCONST);}
|
||||
#line 2508 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 91: /* attrdecl: ':' _ISNETCDF4 '=' constbool */
|
||||
#line 733 "ncgen.y"
|
||||
#line 733 "ncgen/ncgen.y"
|
||||
{(yyval.sym) = makespecial(_ISNETCDF4_FLAG,NULL,NULL,(void*)(yyvsp[0].constant),ISCONST);}
|
||||
#line 2514 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 92: /* attrdecl: ':' _SUPERBLOCK '=' constint */
|
||||
#line 735 "ncgen.y"
|
||||
#line 735 "ncgen/ncgen.y"
|
||||
{(yyval.sym) = makespecial(_SUPERBLOCK_FLAG,NULL,NULL,(void*)(yyvsp[0].constant),ISCONST);}
|
||||
#line 2520 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 93: /* attrdecl: ':' ident '=' datalist */
|
||||
#line 737 "ncgen.y"
|
||||
#line 737 "ncgen/ncgen.y"
|
||||
{ (yyval.sym)=makeattribute((yyvsp[-2].sym),NULL,NULL,(yyvsp[0].datalist),ATTRGLOBAL);}
|
||||
#line 2526 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 94: /* attrdecl: typeref ambiguous_ref ':' ident '=' datalist */
|
||||
#line 739 "ncgen.y"
|
||||
#line 739 "ncgen/ncgen.y"
|
||||
{Symbol* tsym = (yyvsp[-5].sym); Symbol* vsym = (yyvsp[-4].sym); Symbol* asym = (yyvsp[-2].sym);
|
||||
if(vsym->objectclass == NC_VAR) {
|
||||
(yyval.sym)=makeattribute(asym,vsym,tsym,(yyvsp[0].datalist),ATTRVAR);
|
||||
@ -2539,7 +2539,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name);
|
||||
break;
|
||||
|
||||
case 95: /* attrdecl: ambiguous_ref ':' ident '=' datalist */
|
||||
#line 748 "ncgen.y"
|
||||
#line 748 "ncgen/ncgen.y"
|
||||
{Symbol* sym = (yyvsp[-4].sym); Symbol* asym = (yyvsp[-2].sym);
|
||||
if(sym->objectclass == NC_VAR) {
|
||||
(yyval.sym)=makeattribute(asym,sym,NULL,(yyvsp[0].datalist),ATTRVAR);
|
||||
@ -2554,97 +2554,97 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name);
|
||||
break;
|
||||
|
||||
case 96: /* attrdecl: ambiguous_ref ':' _FILLVALUE '=' datalist */
|
||||
#line 759 "ncgen.y"
|
||||
#line 759 "ncgen/ncgen.y"
|
||||
{(yyval.sym) = makespecial(_FILLVALUE_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].datalist),ISLIST);}
|
||||
#line 2560 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 97: /* attrdecl: typeref ambiguous_ref ':' _FILLVALUE '=' datalist */
|
||||
#line 761 "ncgen.y"
|
||||
#line 761 "ncgen/ncgen.y"
|
||||
{(yyval.sym) = makespecial(_FILLVALUE_FLAG,(yyvsp[-4].sym),(yyvsp[-5].sym),(void*)(yyvsp[0].datalist),ISLIST);}
|
||||
#line 2566 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 98: /* attrdecl: ambiguous_ref ':' _STORAGE '=' conststring */
|
||||
#line 763 "ncgen.y"
|
||||
#line 763 "ncgen/ncgen.y"
|
||||
{(yyval.sym) = makespecial(_STORAGE_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);}
|
||||
#line 2572 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 99: /* attrdecl: ambiguous_ref ':' _CHUNKSIZES '=' intlist */
|
||||
#line 765 "ncgen.y"
|
||||
#line 765 "ncgen/ncgen.y"
|
||||
{(yyval.sym) = makespecial(_CHUNKSIZES_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].datalist),ISLIST);}
|
||||
#line 2578 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 100: /* attrdecl: ambiguous_ref ':' _FLETCHER32 '=' constbool */
|
||||
#line 767 "ncgen.y"
|
||||
#line 767 "ncgen/ncgen.y"
|
||||
{(yyval.sym) = makespecial(_FLETCHER32_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);}
|
||||
#line 2584 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 101: /* attrdecl: ambiguous_ref ':' _DEFLATELEVEL '=' constint */
|
||||
#line 769 "ncgen.y"
|
||||
#line 769 "ncgen/ncgen.y"
|
||||
{(yyval.sym) = makespecial(_DEFLATE_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);}
|
||||
#line 2590 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 102: /* attrdecl: ambiguous_ref ':' _SHUFFLE '=' constbool */
|
||||
#line 771 "ncgen.y"
|
||||
#line 771 "ncgen/ncgen.y"
|
||||
{(yyval.sym) = makespecial(_SHUFFLE_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);}
|
||||
#line 2596 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 103: /* attrdecl: ambiguous_ref ':' _ENDIANNESS '=' conststring */
|
||||
#line 773 "ncgen.y"
|
||||
#line 773 "ncgen/ncgen.y"
|
||||
{(yyval.sym) = makespecial(_ENDIAN_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);}
|
||||
#line 2602 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 104: /* attrdecl: ambiguous_ref ':' _FILTER '=' conststring */
|
||||
#line 775 "ncgen.y"
|
||||
#line 775 "ncgen/ncgen.y"
|
||||
{(yyval.sym) = makespecial(_FILTER_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);}
|
||||
#line 2608 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 105: /* attrdecl: ambiguous_ref ':' _CODECS '=' conststring */
|
||||
#line 777 "ncgen.y"
|
||||
#line 777 "ncgen/ncgen.y"
|
||||
{(yyval.sym) = makespecial(_CODECS_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);}
|
||||
#line 2614 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 106: /* attrdecl: ambiguous_ref ':' _QUANTIZEBG '=' constint */
|
||||
#line 779 "ncgen.y"
|
||||
#line 779 "ncgen/ncgen.y"
|
||||
{(yyval.sym) = makespecial(_QUANTIZEBG_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);}
|
||||
#line 2620 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 107: /* attrdecl: ambiguous_ref ':' _QUANTIZEGBR '=' constint */
|
||||
#line 781 "ncgen.y"
|
||||
#line 781 "ncgen/ncgen.y"
|
||||
{(yyval.sym) = makespecial(_QUANTIZEGBR_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);}
|
||||
#line 2626 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 108: /* attrdecl: ambiguous_ref ':' _QUANTIZEBR '=' constint */
|
||||
#line 783 "ncgen.y"
|
||||
#line 783 "ncgen/ncgen.y"
|
||||
{(yyval.sym) = makespecial(_QUANTIZEBR_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);}
|
||||
#line 2632 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 109: /* attrdecl: ambiguous_ref ':' _NOFILL '=' constbool */
|
||||
#line 785 "ncgen.y"
|
||||
#line 785 "ncgen/ncgen.y"
|
||||
{(yyval.sym) = makespecial(_NOFILL_FLAG,(yyvsp[-4].sym),NULL,(void*)(yyvsp[0].constant),ISCONST);}
|
||||
#line 2638 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 110: /* attrdecl: ':' _FORMAT '=' conststring */
|
||||
#line 787 "ncgen.y"
|
||||
#line 787 "ncgen/ncgen.y"
|
||||
{(yyval.sym) = makespecial(_FORMAT_FLAG,NULL,NULL,(void*)(yyvsp[0].constant),ISCONST);}
|
||||
#line 2644 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 111: /* path: ident */
|
||||
#line 792 "ncgen.y"
|
||||
#line 792 "ncgen/ncgen.y"
|
||||
{
|
||||
(yyval.sym)=(yyvsp[0].sym);
|
||||
(yyvsp[0].sym)->ref.is_ref=1;
|
||||
@ -2655,7 +2655,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name);
|
||||
break;
|
||||
|
||||
case 112: /* path: PATH */
|
||||
#line 799 "ncgen.y"
|
||||
#line 799 "ncgen/ncgen.y"
|
||||
{
|
||||
(yyval.sym)=(yyvsp[0].sym);
|
||||
(yyvsp[0].sym)->ref.is_ref=1;
|
||||
@ -2666,259 +2666,259 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name);
|
||||
break;
|
||||
|
||||
case 114: /* datasection: DATA */
|
||||
#line 808 "ncgen.y"
|
||||
#line 808 "ncgen/ncgen.y"
|
||||
{}
|
||||
#line 2672 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 115: /* datasection: DATA datadecls */
|
||||
#line 809 "ncgen.y"
|
||||
#line 809 "ncgen/ncgen.y"
|
||||
{}
|
||||
#line 2678 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 118: /* datadecl: varref '=' datalist */
|
||||
#line 817 "ncgen.y"
|
||||
#line 817 "ncgen/ncgen.y"
|
||||
{(yyvsp[-2].sym)->data = (yyvsp[0].datalist);}
|
||||
#line 2684 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 119: /* datalist: datalist0 */
|
||||
#line 820 "ncgen.y"
|
||||
#line 820 "ncgen/ncgen.y"
|
||||
{(yyval.datalist) = (yyvsp[0].datalist);}
|
||||
#line 2690 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 120: /* datalist: datalist1 */
|
||||
#line 821 "ncgen.y"
|
||||
#line 821 "ncgen/ncgen.y"
|
||||
{(yyval.datalist) = (yyvsp[0].datalist);}
|
||||
#line 2696 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 121: /* datalist0: %empty */
|
||||
#line 825 "ncgen.y"
|
||||
#line 825 "ncgen/ncgen.y"
|
||||
{(yyval.datalist) = builddatalist(0);}
|
||||
#line 2702 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 122: /* datalist1: dataitem */
|
||||
#line 829 "ncgen.y"
|
||||
#line 829 "ncgen/ncgen.y"
|
||||
{(yyval.datalist) = const2list((yyvsp[0].constant));}
|
||||
#line 2708 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 123: /* datalist1: datalist ',' dataitem */
|
||||
#line 831 "ncgen.y"
|
||||
#line 831 "ncgen/ncgen.y"
|
||||
{dlappend((yyvsp[-2].datalist),((yyvsp[0].constant))); (yyval.datalist)=(yyvsp[-2].datalist); }
|
||||
#line 2714 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 124: /* dataitem: constdata */
|
||||
#line 835 "ncgen.y"
|
||||
#line 835 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=(yyvsp[0].constant);}
|
||||
#line 2720 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 125: /* dataitem: '{' datalist '}' */
|
||||
#line 836 "ncgen.y"
|
||||
#line 836 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=builddatasublist((yyvsp[-1].datalist));}
|
||||
#line 2726 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 126: /* constdata: simpleconstant */
|
||||
#line 840 "ncgen.y"
|
||||
#line 840 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=(yyvsp[0].constant);}
|
||||
#line 2732 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 127: /* constdata: OPAQUESTRING */
|
||||
#line 841 "ncgen.y"
|
||||
#line 841 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=makeconstdata(NC_OPAQUE);}
|
||||
#line 2738 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 128: /* constdata: FILLMARKER */
|
||||
#line 842 "ncgen.y"
|
||||
#line 842 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=makeconstdata(NC_FILLVALUE);}
|
||||
#line 2744 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 129: /* constdata: NIL */
|
||||
#line 843 "ncgen.y"
|
||||
#line 843 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=makeconstdata(NC_NIL);}
|
||||
#line 2750 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 130: /* constdata: econstref */
|
||||
#line 844 "ncgen.y"
|
||||
#line 844 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=(yyvsp[0].constant);}
|
||||
#line 2756 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 132: /* econstref: path */
|
||||
#line 849 "ncgen.y"
|
||||
#line 849 "ncgen/ncgen.y"
|
||||
{(yyval.constant) = makeenumconstref((yyvsp[0].sym));}
|
||||
#line 2762 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 133: /* function: ident '(' arglist ')' */
|
||||
#line 853 "ncgen.y"
|
||||
#line 853 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=evaluate((yyvsp[-3].sym),(yyvsp[-1].datalist));}
|
||||
#line 2768 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 134: /* arglist: simpleconstant */
|
||||
#line 858 "ncgen.y"
|
||||
#line 858 "ncgen/ncgen.y"
|
||||
{(yyval.datalist) = const2list((yyvsp[0].constant));}
|
||||
#line 2774 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 135: /* arglist: arglist ',' simpleconstant */
|
||||
#line 860 "ncgen.y"
|
||||
#line 860 "ncgen/ncgen.y"
|
||||
{dlappend((yyvsp[-2].datalist),((yyvsp[0].constant))); (yyval.datalist)=(yyvsp[-2].datalist);}
|
||||
#line 2780 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 136: /* simpleconstant: CHAR_CONST */
|
||||
#line 864 "ncgen.y"
|
||||
#line 864 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=makeconstdata(NC_CHAR);}
|
||||
#line 2786 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 137: /* simpleconstant: BYTE_CONST */
|
||||
#line 865 "ncgen.y"
|
||||
#line 865 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=makeconstdata(NC_BYTE);}
|
||||
#line 2792 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 138: /* simpleconstant: SHORT_CONST */
|
||||
#line 866 "ncgen.y"
|
||||
#line 866 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=makeconstdata(NC_SHORT);}
|
||||
#line 2798 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 139: /* simpleconstant: INT_CONST */
|
||||
#line 867 "ncgen.y"
|
||||
#line 867 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=makeconstdata(NC_INT);}
|
||||
#line 2804 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 140: /* simpleconstant: INT64_CONST */
|
||||
#line 868 "ncgen.y"
|
||||
#line 868 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=makeconstdata(NC_INT64);}
|
||||
#line 2810 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 141: /* simpleconstant: UBYTE_CONST */
|
||||
#line 869 "ncgen.y"
|
||||
#line 869 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=makeconstdata(NC_UBYTE);}
|
||||
#line 2816 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 142: /* simpleconstant: USHORT_CONST */
|
||||
#line 870 "ncgen.y"
|
||||
#line 870 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=makeconstdata(NC_USHORT);}
|
||||
#line 2822 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 143: /* simpleconstant: UINT_CONST */
|
||||
#line 871 "ncgen.y"
|
||||
#line 871 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=makeconstdata(NC_UINT);}
|
||||
#line 2828 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 144: /* simpleconstant: UINT64_CONST */
|
||||
#line 872 "ncgen.y"
|
||||
#line 872 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=makeconstdata(NC_UINT64);}
|
||||
#line 2834 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 145: /* simpleconstant: FLOAT_CONST */
|
||||
#line 873 "ncgen.y"
|
||||
#line 873 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=makeconstdata(NC_FLOAT);}
|
||||
#line 2840 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 146: /* simpleconstant: DOUBLE_CONST */
|
||||
#line 874 "ncgen.y"
|
||||
#line 874 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=makeconstdata(NC_DOUBLE);}
|
||||
#line 2846 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 147: /* simpleconstant: TERMSTRING */
|
||||
#line 875 "ncgen.y"
|
||||
#line 875 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=makeconstdata(NC_STRING);}
|
||||
#line 2852 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 148: /* intlist: constint */
|
||||
#line 879 "ncgen.y"
|
||||
#line 879 "ncgen/ncgen.y"
|
||||
{(yyval.datalist) = const2list((yyvsp[0].constant));}
|
||||
#line 2858 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 149: /* intlist: intlist ',' constint */
|
||||
#line 880 "ncgen.y"
|
||||
#line 880 "ncgen/ncgen.y"
|
||||
{(yyval.datalist)=(yyvsp[-2].datalist); dlappend((yyvsp[-2].datalist),((yyvsp[0].constant)));}
|
||||
#line 2864 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 150: /* constint: INT_CONST */
|
||||
#line 885 "ncgen.y"
|
||||
#line 885 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=makeconstdata(NC_INT);}
|
||||
#line 2870 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 151: /* constint: UINT_CONST */
|
||||
#line 887 "ncgen.y"
|
||||
#line 887 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=makeconstdata(NC_UINT);}
|
||||
#line 2876 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 152: /* constint: INT64_CONST */
|
||||
#line 889 "ncgen.y"
|
||||
#line 889 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=makeconstdata(NC_INT64);}
|
||||
#line 2882 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 153: /* constint: UINT64_CONST */
|
||||
#line 891 "ncgen.y"
|
||||
#line 891 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=makeconstdata(NC_UINT64);}
|
||||
#line 2888 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 154: /* conststring: TERMSTRING */
|
||||
#line 895 "ncgen.y"
|
||||
#line 895 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=makeconstdata(NC_STRING);}
|
||||
#line 2894 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 155: /* constbool: conststring */
|
||||
#line 899 "ncgen.y"
|
||||
#line 899 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=(yyvsp[0].constant);}
|
||||
#line 2900 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 156: /* constbool: constint */
|
||||
#line 900 "ncgen.y"
|
||||
#line 900 "ncgen/ncgen.y"
|
||||
{(yyval.constant)=(yyvsp[0].constant);}
|
||||
#line 2906 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 157: /* varident: IDENT */
|
||||
#line 908 "ncgen.y"
|
||||
#line 908 "ncgen/ncgen.y"
|
||||
{(yyval.sym)=(yyvsp[0].sym);}
|
||||
#line 2912 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 158: /* varident: DATA */
|
||||
#line 909 "ncgen.y"
|
||||
#line 909 "ncgen/ncgen.y"
|
||||
{(yyval.sym)=identkeyword((yyvsp[0].sym));}
|
||||
#line 2918 "ncgeny.c"
|
||||
break;
|
||||
|
||||
case 159: /* ident: IDENT */
|
||||
#line 913 "ncgen.y"
|
||||
#line 913 "ncgen/ncgen.y"
|
||||
{(yyval.sym)=(yyvsp[0].sym);}
|
||||
#line 2924 "ncgeny.c"
|
||||
break;
|
||||
@ -3148,7 +3148,7 @@ yyreturnlab:
|
||||
return yyresult;
|
||||
}
|
||||
|
||||
#line 916 "ncgen.y"
|
||||
#line 916 "ncgen/ncgen.y"
|
||||
|
||||
|
||||
#ifndef NO_STDARG
|
||||
|
@ -119,7 +119,7 @@ extern int ncgdebug;
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
union YYSTYPE
|
||||
{
|
||||
#line 156 "ncgen.y"
|
||||
#line 156 "ncgen/ncgen.y"
|
||||
|
||||
Symbol* sym;
|
||||
unsigned long size; /* allow for zero size to indicate e.g. UNLIMITED*/
|
||||
|
Loading…
Reference in New Issue
Block a user