netcdf-c/ncgen/ncgenyy.c
2012-05-05 22:31:24 +00:00

3038 lines
98 KiB
C

#define yy_create_buffer ncg_create_buffer
#define yy_delete_buffer ncg_delete_buffer
#define yy_scan_buffer ncg_scan_buffer
#define yy_scan_string ncg_scan_string
#define yy_scan_bytes ncg_scan_bytes
#define yy_flex_debug ncg_flex_debug
#define yy_init_buffer ncg_init_buffer
#define yy_flush_buffer ncg_flush_buffer
#define yy_load_buffer_state ncg_load_buffer_state
#define yy_switch_to_buffer ncg_switch_to_buffer
#define yyin ncgin
#define yyleng ncgleng
#define yylex ncglex
#define yyout ncgout
#define yyrestart ncgrestart
#define yytext ncgtext
#define yywrap ncgwrap
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
*/
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#ifdef __cplusplus
#include <stdlib.h>
#include <unistd.h>
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
#else /* ! __cplusplus */
#if __STDC__
#define YY_USE_PROTOS
#define YY_USE_CONST
#endif /* __STDC__ */
#endif /* ! __cplusplus */
#ifdef __TURBOC__
#pragma warn -rch
#pragma warn -use
#include <io.h>
#include <stdlib.h>
#define YY_USE_CONST
#define YY_USE_PROTOS
#endif
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
#ifdef YY_USE_PROTOS
#define YY_PROTO(proto) proto
#else
#define YY_PROTO(proto) ()
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
/* Promotes a possibly negative, possibly signed char to an unsigned
* integer for use as an array index. If the signed char is negative,
* we want to instead treat it as an 8-bit unsigned char, hence the
* double cast.
*/
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN yy_start = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START ((yy_start - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#define YY_BUF_SIZE 16384
typedef struct yy_buffer_state *YY_BUFFER_STATE;
extern int yyleng;
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
/* The funky do-while in the following #define is used to turn the definition
* int a single C statement (which needs a semi-colon terminator). This
* avoids problems with code like:
*
* if ( condition_holds )
* yyless( 5 );
* else
* do_something_else();
*
* Prior to using the do-while the compiler would get upset at the
* "else" because it interpreted the "if" statement as being all
* done when it reached the ';' after the yyless() call.
*/
/* Return all but the first 'n' matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
*yy_cp = yy_hold_char; \
YY_RESTORE_YY_MORE_OFFSET \
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, yytext_ptr )
/* The following is because we cannot portably get our hands on size_t
* (without autoconf's help, which isn't available because we want
* flex-generated scanners to compile on their own).
*/
typedef unsigned int yy_size_t;
struct yy_buffer_state
{
FILE *yy_input_file;
char *yy_ch_buf; /* input buffer */
char *yy_buf_pos; /* current position in input buffer */
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
yy_size_t yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
* delete it.
*/
int yy_is_our_buffer;
/* Whether this is an "interactive" input source; if so, and
* if we're using stdio for input, then we want to use getc()
* instead of fread(), to make sure we stop fetching input after
* each newline.
*/
int yy_is_interactive;
/* Whether we're considered to be at the beginning of a line.
* If so, '^' rules will be active on the next match, otherwise
* not.
*/
int yy_at_bol;
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
int yy_fill_buffer;
int yy_buffer_status;
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to process
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
* shouldn't try reading from the input source any more. We might
* still have a bunch of tokens to match, though, because of
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
* (via yyrestart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
};
static YY_BUFFER_STATE yy_current_buffer = 0;
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
*/
#define YY_CURRENT_BUFFER yy_current_buffer
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 1; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* Flag which is used to allow yywrap()'s to do buffer switches
* instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
void yyrestart YY_PROTO(( FILE *input_file ));
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
static void yy_flex_free YY_PROTO(( void * ));
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_at_bol = at_bol; \
}
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
typedef unsigned char YY_CHAR;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
extern char *yytext;
#define yytext_ptr yytext
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
yytext_ptr = yy_bp; \
yyleng = (int) (yy_cp - yy_bp); \
yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 49
#define YY_END_OF_BUFFER 50
static yyconst short int yy_accept[447] =
{ 0,
0, 0, 46, 46, 0, 0, 50, 48, 1, 44,
48, 48, 48, 48, 38, 30, 34, 34, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 48, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 48, 48,
48, 46, 49, 32, 49, 1, 0, 3, 0, 0,
0, 38, 34, 0, 0, 38, 38, 0, 39, 45,
2, 30, 0, 0, 0, 0, 34, 35, 36, 0,
33, 0, 0, 0, 0, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
0, 0, 46, 0, 47, 32, 40, 0, 0, 0,
34, 0, 38, 0, 0, 38, 2, 30, 0, 0,
0, 0, 0, 0, 0, 36, 4, 0, 0, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
14, 33, 33, 33, 27, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 14, 33, 27, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 0, 43, 41, 0,
0, 38, 0, 30, 0, 0, 0, 0, 0, 0,
0, 4, 37, 0, 10, 9, 33, 33, 33, 33,
6, 33, 33, 33, 33, 28, 33, 14, 33, 29,
33, 8, 33, 33, 33, 33, 15, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 15, 33, 33, 33, 33, 41, 0, 42,
0, 28, 0, 30, 0, 0, 0, 0, 0, 0,
0, 33, 33, 33, 33, 33, 16, 33, 33, 33,
33, 12, 33, 33, 11, 33, 33, 15, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 23,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 0, 0, 0, 0, 33, 33, 18,
33, 33, 33, 33, 25, 7, 5, 5, 17, 33,
33, 13, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 24, 33, 20, 33, 33, 33, 0, 0,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 31, 33, 33, 33, 33, 33,
33, 0, 5, 33, 26, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 26, 26, 19, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 22, 33, 21, 33, 0
} ;
static yyconst int yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 2, 2, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 4, 5, 6, 5, 5, 5, 5, 7, 5,
5, 8, 9, 5, 10, 11, 12, 13, 14, 15,
16, 17, 14, 18, 14, 19, 19, 20, 5, 5,
5, 5, 5, 21, 22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 31, 43, 44, 31,
5, 45, 5, 5, 46, 5, 47, 48, 49, 50,
51, 52, 53, 54, 55, 31, 56, 57, 58, 59,
60, 61, 62, 63, 64, 65, 66, 67, 31, 43,
68, 69, 70, 5, 5, 5, 1, 71, 71, 71,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
71, 72, 72, 72, 72, 72, 72, 72, 72, 72,
72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
72, 72, 72, 72, 1, 1, 1, 1, 1, 1,
1, 1, 1, 73, 73, 73, 73, 73, 73, 73,
73, 73, 73, 73, 73, 73, 73, 73, 73, 74,
74, 74, 74, 74, 74, 74, 74, 1, 1, 1,
1, 1, 1, 1, 1
} ;
static yyconst int yy_meta[75] =
{ 0,
1, 1, 2, 1, 1, 1, 3, 4, 5, 5,
5, 6, 7, 7, 7, 7, 7, 7, 7, 1,
5, 8, 8, 8, 8, 8, 8, 9, 9, 9,
9, 10, 9, 9, 9, 9, 9, 9, 10, 9,
9, 9, 9, 9, 9, 9, 8, 8, 8, 8,
8, 8, 9, 9, 9, 9, 10, 9, 9, 9,
9, 9, 9, 10, 9, 9, 9, 9, 9, 11,
1, 9, 9, 9
} ;
static yyconst short int yy_base[464] =
{ 0,
0, 0, 330, 329, 266, 264, 331, 2548, 73, 2548,
70, 284, 67, 81, 120, 108, 172, 285, 56, 68,
133, 167, 233, 152, 158, 82, 76, 86, 188, 224,
236, 269, 277, 245, 220, 280, 45, 199, 269, 285,
288, 318, 294, 325, 328, 311, 358, 362, 255, 253,
252, 313, 308, 0, 2548, 85, 99, 2548, 312, 305,
410, 0, 443, 428, 241, 0, 2548, 470, 2548, 2548,
0, 376, 495, 228, 224, 220, 236, 2548, 348, 0,
423, 497, 206, 205, 192, 453, 477, 473, 483, 488,
492, 165, 543, 499, 524, 518, 534, 531, 447, 540,
554, 564, 572, 575, 578, 590, 557, 587, 598, 609,
595, 612, 620, 628, 631, 651, 654, 644, 665, 668,
684, 662, 687, 698, 702, 705, 718, 721, 728, 724,
737, 741, 758, 761, 771, 778, 781, 791, 784, 797,
187, 186, 247, 242, 2548, 0, 2548, 238, 859, 230,
0, 865, 872, 183, 892, 917, 0, 847, 822, 908,
163, 157, 151, 150, 148, 2548, 137, 147, 145, 892,
903, 907, 910, 915, 853, 918, 923, 928, 940, 958,
980, 963, 966, 948, 971, 989, 996, 1004, 1010, 984,
1019, 1026, 1040, 974, 1030, 1015, 1034, 1022, 1052, 1060,
1056, 1090, 1065, 1076, 1071, 1095, 1106, 1101, 1109, 1114,
1144, 1126, 1152, 1132, 1149, 1166, 1157, 1163, 1169, 1182,
1199, 1202, 1189, 1205, 1208, 1214, 139, 2548, 2548, 1276,
201, 2548, 36, 1239, 1282, 129, 125, 108, 102, 96,
95, 1270, 2548, 94, 1258, 1263, 1269, 1273, 1278, 1281,
1284, 1299, 1295, 1303, 1321, 1314, 1325, 1317, 1336, 1329,
1351, 1333, 1340, 1355, 1366, 1390, 1400, 1376, 1386, 1396,
1406, 1409, 1412, 1430, 1426, 1443, 1450, 1461, 1447, 1469,
1466, 1473, 1483, 1491, 1509, 1505, 1487, 1499, 1521, 1524,
1535, 1539, 1570, 1557, 1546, 1560, 1577, 2548, 157, 2548,
156, 2548, 102, 1580, 1651, 86, 80, 72, 55, 54,
53, 1594, 1603, 1591, 1627, 1615, 1634, 1657, 1637, 1646,
1660, 1640, 1650, 1670, 1653, 1700, 1708, 1683, 1716, 1719,
1693, 1703, 1713, 1726, 1734, 1749, 1752, 1758, 1766, 2548,
1769, 1783, 1775, 1799, 1790, 1806, 1809, 1816, 1820, 1823,
1829, 1840, 1859, 64, 43, 39, 38, 1853, 1863, 1846,
1870, 1879, 1883, 1889, 1894, 1900, 1905, 1914, 1919, 1939,
1930, 1924, 1944, 1936, 1955, 1960, 1970, 1974, 1949, 1980,
1985, 1990, 2548, 2004, 2548, 2010, 2015, 2024, 43, 35,
2040, 2021, 2027, 2057, 2047, 2065, 2060, 2073, 2080, 2095,
2090, 2083, 2103, 2098, 2106, 2114, 2138, 2121, 2128, 2145,
2152, 35, 2159, 2162, 2168, 2182, 2171, 2203, 2178, 2214,
2217, 2192, 2208, 2224, 2228, 2239, 38, 2234, 2247, 2254,
2259, 2250, 2264, 2300, 2280, 2297, 2284, 2294, 2314, 2319,
2310, 2548, 2330, 2548, 2340, 2548, 2414, 2425, 2436, 2447,
2455, 2461, 2471, 2482, 2492, 2503, 2510, 2514, 2520, 2521,
2525, 2533, 2537
} ;
static yyconst short int yy_def[464] =
{ 0,
446, 1, 447, 447, 448, 448, 446, 446, 446, 446,
449, 450, 446, 446, 446, 451, 446, 17, 452, 452,
452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
452, 446, 452, 452, 452, 452, 23, 452, 452, 452,
452, 452, 452, 452, 452, 452, 452, 452, 446, 446,
446, 453, 453, 454, 446, 446, 449, 446, 449, 446,
455, 15, 446, 446, 446, 15, 446, 446, 446, 446,
456, 457, 446, 446, 446, 446, 17, 446, 446, 458,
452, 446, 446, 446, 446, 452, 452, 452, 452, 452,
452, 23, 23, 452, 452, 452, 452, 452, 452, 452,
452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
446, 446, 453, 453, 446, 454, 446, 446, 446, 459,
63, 446, 446, 446, 446, 446, 456, 457, 460, 446,
446, 446, 446, 446, 446, 446, 461, 446, 446, 452,
452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
452, 452, 452, 452, 452, 452, 446, 446, 446, 446,
462, 446, 446, 463, 446, 446, 446, 446, 446, 446,
446, 461, 446, 446, 452, 452, 452, 452, 452, 452,
452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
452, 452, 452, 452, 452, 452, 452, 446, 446, 446,
446, 446, 446, 463, 446, 446, 446, 446, 446, 446,
446, 452, 452, 452, 452, 452, 452, 452, 452, 452,
452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
452, 452, 452, 452, 452, 452, 452, 452, 452, 446,
452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
452, 452, 452, 446, 446, 446, 446, 452, 452, 452,
452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
452, 452, 446, 452, 446, 452, 452, 452, 446, 446,
452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
452, 446, 452, 452, 452, 452, 452, 452, 452, 452,
452, 452, 452, 452, 452, 452, 446, 452, 452, 452,
452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
452, 446, 452, 446, 452, 0, 446, 446, 446, 446,
446, 446, 446, 446, 446, 446, 446, 446, 446, 446,
446, 446, 446
} ;
static yyconst short int yy_nxt[2623] =
{ 0,
8, 9, 10, 9, 8, 11, 12, 8, 13, 14,
15, 16, 17, 18, 18, 18, 18, 18, 18, 8,
8, 19, 20, 21, 22, 23, 24, 19, 19, 25,
19, 26, 19, 27, 28, 19, 19, 29, 30, 19,
31, 19, 19, 19, 32, 33, 19, 34, 35, 36,
37, 38, 39, 19, 40, 19, 41, 19, 42, 43,
19, 19, 44, 45, 46, 47, 48, 19, 19, 8,
8, 49, 50, 51, 56, 58, 56, 62, 81, 63,
63, 63, 63, 63, 63, 63, 56, 302, 56, 302,
303, 62, 64, 63, 63, 63, 63, 63, 63, 63,
82, 100, 427, 124, 58, 304, 64, 412, 234, 390,
65, 86, 82, 304, 59, 70, 99, 64, 389, 71,
82, 102, 101, 158, 357, 234, 82, 83, 84, 85,
82, 64, 66, 66, 66, 66, 66, 66, 66, 83,
84, 85, 356, 59, 67, 68, 69, 83, 84, 85,
355, 67, 73, 83, 84, 85, 304, 83, 84, 85,
354, 87, 300, 298, 81, 72, 311, 88, 243, 67,
68, 69, 158, 81, 81, 243, 67, 82, 310, 74,
75, 76, 62, 95, 77, 77, 77, 77, 77, 77,
77, 97, 89, 243, 78, 309, 82, 64, 81, 234,
243, 90, 82, 78, 83, 84, 85, 300, 96, 112,
78, 82, 79, 103, 80, 244, 98, 81, 241, 78,
72, 240, 64, 83, 84, 85, 91, 239, 78, 83,
84, 85, 82, 158, 233, 78, 228, 79, 83, 84,
85, 92, 92, 82, 228, 93, 93, 93, 93, 93,
93, 93, 104, 446, 144, 125, 227, 112, 107, 83,
84, 85, 169, 105, 82, 108, 94, 109, 82, 110,
83, 84, 85, 120, 111, 168, 81, 82, 446, 89,
82, 112, 112, 112, 112, 112, 112, 112, 106, 82,
165, 83, 84, 85, 164, 83, 84, 85, 72, 154,
113, 114, 115, 116, 83, 84, 85, 83, 84, 85,
117, 147, 119, 82, 446, 118, 83, 84, 85, 145,
144, 82, 142, 141, 82, 112, 121, 446, 61, 82,
446, 126, 82, 55, 122, 55, 53, 53, 82, 123,
83, 84, 85, 127, 446, 446, 446, 128, 83, 84,
85, 83, 84, 85, 131, 82, 83, 84, 85, 83,
84, 85, 82, 446, 129, 83, 84, 85, 130, 82,
166, 446, 82, 446, 446, 132, 446, 446, 134, 166,
446, 133, 83, 84, 85, 446, 166, 159, 446, 83,
84, 85, 106, 446, 446, 166, 83, 84, 85, 83,
84, 85, 82, 446, 166, 135, 82, 446, 140, 446,
446, 166, 136, 446, 137, 446, 138, 446, 446, 446,
160, 139, 149, 149, 149, 149, 149, 149, 446, 83,
84, 85, 446, 83, 84, 85, 152, 152, 446, 446,
153, 153, 153, 153, 153, 153, 153, 161, 162, 163,
446, 446, 150, 62, 446, 151, 151, 151, 151, 151,
151, 151, 446, 446, 446, 78, 446, 82, 64, 446,
446, 446, 446, 446, 78, 446, 446, 446, 155, 155,
183, 78, 156, 156, 156, 156, 156, 156, 156, 446,
78, 82, 170, 64, 83, 84, 85, 82, 171, 78,
81, 81, 81, 81, 81, 172, 78, 72, 72, 72,
72, 72, 72, 72, 446, 446, 81, 82, 83, 84,
85, 82, 446, 446, 83, 84, 85, 82, 174, 446,
446, 446, 82, 446, 446, 446, 82, 446, 446, 178,
173, 81, 446, 82, 83, 84, 85, 446, 83, 84,
85, 81, 81, 446, 83, 84, 85, 175, 179, 83,
84, 85, 82, 83, 84, 85, 81, 176, 82, 177,
83, 84, 85, 181, 176, 82, 81, 180, 82, 184,
446, 446, 182, 446, 82, 186, 446, 185, 446, 83,
84, 85, 176, 187, 177, 83, 84, 85, 82, 176,
191, 82, 83, 84, 85, 83, 84, 85, 82, 188,
446, 83, 84, 85, 446, 189, 82, 446, 446, 82,
192, 446, 82, 195, 446, 83, 84, 85, 83, 84,
85, 82, 193, 446, 82, 83, 84, 85, 446, 82,
194, 446, 82, 83, 84, 85, 83, 84, 85, 83,
84, 85, 190, 82, 446, 446, 82, 446, 83, 84,
85, 83, 84, 85, 82, 446, 83, 84, 85, 83,
84, 85, 82, 196, 446, 82, 446, 446, 197, 446,
83, 84, 85, 83, 84, 85, 446, 446, 82, 198,
446, 83, 84, 85, 446, 82, 446, 203, 82, 83,
84, 85, 83, 84, 85, 199, 82, 200, 204, 82,
201, 446, 82, 202, 206, 83, 84, 85, 446, 208,
446, 446, 83, 84, 85, 83, 84, 85, 82, 205,
446, 82, 446, 83, 84, 85, 83, 84, 85, 83,
84, 85, 82, 446, 446, 446, 82, 446, 207, 82,
446, 446, 209, 446, 446, 83, 84, 85, 83, 84,
85, 211, 82, 210, 212, 82, 446, 446, 82, 83,
84, 85, 82, 83, 84, 85, 83, 84, 85, 214,
446, 82, 213, 217, 446, 82, 215, 218, 216, 83,
84, 85, 83, 84, 85, 83, 84, 85, 446, 83,
84, 85, 82, 446, 446, 82, 446, 446, 83, 84,
85, 446, 83, 84, 85, 82, 446, 219, 446, 446,
446, 220, 82, 446, 446, 82, 446, 446, 82, 83,
84, 85, 83, 84, 85, 82, 222, 225, 221, 446,
223, 82, 83, 84, 85, 446, 446, 224, 446, 83,
84, 85, 83, 84, 85, 83, 84, 85, 159, 226,
446, 446, 83, 84, 85, 229, 235, 446, 83, 84,
85, 230, 230, 230, 230, 230, 230, 153, 153, 153,
153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
153, 160, 446, 236, 237, 238, 232, 82, 69, 446,
250, 446, 446, 232, 156, 156, 156, 156, 156, 156,
156, 158, 158, 158, 158, 158, 446, 245, 161, 162,
163, 232, 446, 69, 83, 84, 85, 158, 232, 156,
156, 156, 156, 156, 156, 156, 82, 249, 446, 446,
246, 67, 247, 69, 446, 446, 446, 82, 67, 446,
446, 82, 158, 446, 82, 446, 446, 446, 446, 82,
251, 252, 82, 83, 84, 85, 67, 82, 69, 446,
248, 259, 82, 67, 83, 84, 85, 158, 83, 84,
85, 83, 84, 85, 82, 446, 83, 84, 85, 83,
84, 85, 82, 258, 83, 84, 85, 254, 446, 83,
84, 85, 82, 269, 253, 255, 446, 82, 446, 446,
82, 83, 84, 85, 256, 82, 446, 257, 82, 83,
84, 85, 260, 446, 82, 261, 446, 262, 82, 83,
84, 85, 446, 82, 83, 84, 85, 83, 84, 85,
82, 263, 83, 84, 85, 83, 84, 85, 82, 265,
264, 83, 84, 85, 82, 83, 84, 85, 266, 82,
83, 84, 85, 82, 270, 267, 82, 83, 84, 85,
82, 273, 446, 268, 82, 83, 84, 85, 82, 446,
271, 83, 84, 85, 82, 272, 83, 84, 85, 446,
83, 84, 85, 83, 84, 85, 82, 83, 84, 85,
82, 83, 84, 85, 82, 83, 84, 85, 274, 82,
275, 83, 84, 85, 446, 82, 277, 446, 276, 446,
82, 245, 446, 83, 84, 85, 446, 83, 84, 85,
278, 83, 84, 85, 82, 279, 83, 84, 85, 82,
446, 446, 83, 84, 85, 82, 446, 83, 84, 85,
82, 281, 280, 82, 446, 446, 282, 246, 82, 446,
446, 83, 84, 85, 446, 446, 83, 84, 85, 285,
82, 251, 83, 84, 85, 446, 82, 83, 84, 85,
83, 84, 85, 446, 258, 83, 84, 85, 82, 287,
283, 284, 446, 82, 446, 446, 82, 83, 84, 85,
260, 82, 286, 83, 84, 85, 446, 82, 446, 446,
82, 446, 446, 82, 288, 83, 84, 85, 289, 262,
83, 84, 85, 83, 84, 85, 82, 446, 83, 84,
85, 290, 291, 82, 83, 84, 85, 83, 84, 85,
83, 84, 85, 82, 446, 446, 82, 294, 446, 82,
159, 446, 82, 83, 84, 85, 446, 446, 82, 295,
83, 84, 85, 292, 446, 446, 293, 296, 297, 446,
83, 84, 85, 83, 84, 85, 83, 84, 85, 83,
84, 85, 298, 305, 446, 83, 84, 85, 299, 299,
299, 299, 299, 299, 234, 234, 234, 234, 234, 234,
234, 243, 82, 312, 446, 446, 446, 82, 243, 314,
306, 307, 308, 82, 446, 446, 446, 82, 446, 317,
446, 446, 82, 446, 446, 82, 243, 446, 82, 83,
84, 85, 313, 243, 83, 84, 85, 315, 262, 82,
83, 84, 85, 82, 83, 84, 85, 82, 318, 83,
84, 85, 83, 84, 85, 83, 84, 85, 82, 316,
320, 82, 446, 446, 446, 82, 83, 84, 85, 82,
83, 84, 85, 82, 83, 84, 85, 82, 323, 322,
82, 446, 446, 319, 82, 83, 84, 85, 83, 84,
85, 321, 83, 84, 85, 82, 83, 84, 85, 82,
83, 84, 85, 328, 83, 84, 85, 83, 84, 85,
82, 83, 84, 85, 324, 325, 446, 326, 329, 446,
82, 446, 83, 84, 85, 327, 83, 84, 85, 446,
82, 446, 446, 330, 82, 446, 446, 83, 84, 85,
82, 446, 446, 446, 82, 446, 446, 83, 84, 85,
82, 446, 446, 82, 446, 446, 82, 83, 84, 85,
446, 83, 84, 85, 331, 332, 333, 83, 84, 85,
82, 83, 84, 85, 82, 446, 446, 83, 84, 85,
83, 84, 85, 83, 84, 85, 334, 82, 340, 446,
335, 82, 446, 446, 82, 446, 446, 83, 84, 85,
336, 83, 84, 85, 337, 82, 446, 446, 446, 339,
82, 345, 338, 82, 83, 84, 85, 82, 83, 84,
85, 83, 84, 85, 341, 317, 446, 82, 446, 342,
446, 82, 83, 84, 85, 82, 446, 83, 84, 85,
83, 84, 85, 82, 83, 84, 85, 262, 346, 82,
446, 343, 446, 82, 83, 84, 85, 344, 83, 84,
85, 446, 83, 84, 85, 82, 446, 446, 82, 446,
83, 84, 85, 446, 446, 446, 83, 84, 85, 82,
83, 84, 85, 82, 446, 446, 347, 349, 322, 325,
82, 159, 83, 84, 85, 83, 84, 85, 348, 446,
446, 82, 446, 351, 82, 446, 83, 84, 85, 328,
83, 84, 85, 446, 82, 446, 360, 83, 84, 85,
350, 82, 352, 353, 305, 446, 446, 446, 83, 84,
85, 83, 84, 85, 358, 82, 446, 446, 82, 446,
446, 83, 84, 85, 362, 446, 446, 82, 83, 84,
85, 306, 307, 308, 304, 304, 304, 304, 304, 82,
446, 446, 83, 84, 85, 83, 84, 85, 359, 446,
304, 82, 365, 446, 83, 84, 85, 361, 82, 446,
446, 82, 363, 446, 82, 366, 83, 84, 85, 367,
82, 364, 446, 446, 82, 304, 446, 82, 83, 84,
85, 82, 446, 446, 82, 83, 84, 85, 83, 84,
85, 83, 84, 85, 82, 446, 369, 83, 84, 85,
304, 83, 84, 85, 83, 84, 85, 82, 83, 84,
85, 83, 84, 85, 368, 370, 446, 82, 446, 446,
446, 83, 84, 85, 82, 371, 446, 82, 373, 374,
446, 446, 82, 446, 83, 84, 85, 82, 372, 375,
82, 446, 446, 82, 83, 84, 85, 376, 446, 446,
82, 83, 84, 85, 83, 84, 85, 446, 82, 83,
84, 85, 377, 446, 83, 84, 85, 83, 84, 85,
83, 84, 85, 82, 383, 378, 82, 83, 84, 85,
446, 446, 82, 446, 446, 83, 84, 85, 379, 380,
82, 446, 381, 82, 446, 446, 365, 446, 446, 82,
83, 84, 85, 83, 84, 85, 446, 82, 446, 83,
84, 85, 382, 360, 82, 385, 369, 83, 84, 85,
83, 84, 85, 82, 446, 446, 83, 84, 85, 384,
82, 446, 446, 82, 83, 84, 85, 365, 446, 366,
82, 83, 84, 85, 82, 446, 446, 82, 446, 446,
83, 84, 85, 82, 446, 386, 446, 83, 84, 85,
83, 84, 85, 387, 82, 446, 391, 83, 84, 85,
82, 83, 84, 85, 83, 84, 85, 82, 446, 393,
83, 84, 85, 82, 372, 446, 388, 82, 446, 446,
446, 83, 84, 85, 82, 446, 446, 83, 84, 85,
258, 392, 446, 82, 83, 84, 85, 82, 446, 446,
83, 84, 85, 82, 83, 84, 85, 394, 82, 446,
446, 83, 84, 85, 82, 396, 446, 446, 446, 82,
83, 84, 85, 395, 83, 84, 85, 446, 82, 446,
83, 84, 85, 82, 398, 83, 84, 85, 82, 399,
446, 83, 84, 85, 82, 446, 83, 84, 85, 397,
82, 446, 400, 82, 446, 83, 84, 85, 82, 446,
83, 84, 85, 82, 446, 83, 84, 85, 446, 82,
401, 83, 84, 85, 82, 405, 403, 83, 84, 85,
83, 84, 85, 402, 82, 83, 84, 85, 82, 446,
83, 84, 85, 404, 82, 446, 83, 84, 85, 82,
446, 83, 84, 85, 82, 446, 406, 407, 405, 446,
446, 83, 84, 85, 408, 83, 84, 85, 82, 446,
446, 83, 84, 85, 82, 446, 83, 84, 85, 82,
409, 83, 84, 85, 413, 82, 258, 446, 82, 446,
413, 82, 446, 446, 446, 83, 84, 85, 446, 410,
411, 83, 84, 85, 82, 414, 83, 84, 85, 446,
446, 82, 83, 84, 85, 83, 84, 85, 83, 84,
85, 82, 416, 446, 82, 418, 446, 446, 256, 82,
328, 83, 84, 85, 415, 446, 446, 82, 83, 84,
85, 446, 417, 446, 82, 446, 446, 82, 83, 84,
85, 83, 84, 85, 82, 446, 83, 84, 85, 82,
420, 421, 82, 446, 83, 84, 85, 82, 423, 419,
82, 83, 84, 85, 83, 84, 85, 446, 82, 422,
446, 83, 84, 85, 405, 82, 83, 84, 85, 83,
84, 85, 82, 446, 83, 84, 85, 83, 84, 85,
424, 446, 82, 446, 446, 83, 84, 85, 405, 82,
328, 446, 83, 84, 85, 425, 82, 446, 446, 83,
84, 85, 426, 82, 446, 446, 82, 413, 446, 83,
84, 85, 82, 428, 446, 82, 83, 84, 85, 256,
446, 413, 82, 83, 84, 85, 82, 429, 446, 446,
83, 84, 85, 83, 84, 85, 82, 446, 446, 83,
84, 85, 83, 84, 85, 431, 430, 82, 446, 83,
84, 85, 82, 83, 84, 85, 446, 433, 82, 446,
446, 82, 446, 83, 84, 85, 446, 432, 82, 446,
434, 446, 82, 446, 83, 84, 85, 429, 82, 83,
84, 85, 435, 82, 446, 83, 84, 85, 83, 84,
85, 82, 446, 446, 82, 83, 84, 85, 82, 83,
84, 85, 436, 82, 437, 83, 84, 85, 82, 438,
83, 84, 85, 439, 405, 440, 442, 446, 83, 84,
85, 83, 84, 85, 82, 83, 84, 85, 82, 444,
83, 84, 85, 405, 446, 83, 84, 85, 82, 446,
446, 82, 446, 441, 82, 446, 446, 405, 446, 446,
446, 83, 84, 85, 82, 83, 84, 85, 82, 446,
443, 446, 446, 82, 446, 83, 84, 85, 83, 84,
85, 83, 84, 85, 82, 446, 446, 405, 446, 446,
445, 83, 84, 85, 82, 83, 84, 85, 446, 446,
83, 84, 85, 446, 446, 446, 405, 446, 446, 446,
446, 83, 84, 85, 446, 446, 446, 446, 446, 446,
446, 83, 84, 85, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 54, 54, 54, 54, 54,
54, 54, 54, 54, 54, 54, 57, 57, 57, 57,
57, 57, 57, 57, 57, 57, 57, 60, 60, 60,
60, 60, 60, 60, 60, 60, 60, 60, 72, 446,
72, 446, 72, 72, 72, 81, 446, 81, 81, 81,
81, 143, 143, 143, 143, 143, 143, 143, 143, 143,
143, 143, 146, 146, 146, 146, 146, 146, 146, 146,
146, 146, 148, 446, 148, 148, 148, 148, 148, 148,
148, 148, 148, 157, 446, 157, 157, 157, 157, 157,
157, 157, 157, 157, 158, 158, 158, 158, 158, 158,
167, 167, 231, 446, 446, 446, 231, 231, 234, 234,
234, 242, 242, 446, 242, 301, 446, 446, 446, 301,
301, 304, 304, 304, 304, 304, 304, 7, 446, 446,
446, 446, 446, 446, 446, 446, 446, 446, 446, 446,
446, 446, 446, 446, 446, 446, 446, 446, 446, 446,
446, 446, 446, 446, 446, 446, 446, 446, 446, 446,
446, 446, 446, 446, 446, 446, 446, 446, 446, 446,
446, 446, 446, 446, 446, 446, 446, 446, 446, 446,
446, 446, 446, 446, 446, 446, 446, 446, 446, 446,
446, 446, 446, 446, 446, 446, 446, 446, 446, 446,
446, 446
} ;
static yyconst short int yy_chk[2623] =
{ 0,
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, 1,
1, 1, 1, 1, 9, 11, 9, 13, 37, 13,
13, 13, 13, 13, 13, 13, 56, 233, 56, 427,
233, 14, 13, 14, 14, 14, 14, 14, 14, 14,
19, 27, 412, 37, 57, 390, 14, 389, 357, 356,
14, 20, 20, 355, 11, 16, 26, 13, 354, 16,
27, 28, 27, 311, 310, 309, 26, 19, 19, 19,
28, 14, 15, 15, 15, 15, 15, 15, 15, 20,
20, 20, 308, 57, 15, 15, 15, 27, 27, 27,
307, 15, 16, 26, 26, 26, 306, 28, 28, 28,
303, 21, 301, 299, 244, 241, 240, 21, 167, 15,
15, 15, 239, 92, 92, 167, 15, 21, 238, 16,
16, 16, 17, 24, 17, 17, 17, 17, 17, 17,
17, 25, 21, 167, 17, 237, 24, 17, 92, 236,
167, 22, 25, 17, 21, 21, 21, 231, 24, 227,
17, 22, 17, 29, 17, 169, 25, 168, 165, 17,
164, 163, 17, 24, 24, 24, 22, 162, 17, 25,
25, 25, 29, 161, 154, 17, 150, 17, 22, 22,
22, 23, 23, 38, 148, 23, 23, 23, 23, 23,
23, 23, 30, 144, 143, 38, 142, 141, 31, 29,
29, 29, 85, 30, 35, 31, 23, 31, 30, 31,
38, 38, 38, 35, 31, 84, 83, 23, 77, 35,
31, 32, 32, 32, 32, 32, 32, 32, 30, 34,
76, 35, 35, 35, 75, 30, 30, 30, 74, 65,
33, 33, 33, 33, 23, 23, 23, 31, 31, 31,
33, 60, 34, 39, 59, 33, 34, 34, 34, 53,
52, 33, 51, 50, 36, 49, 36, 18, 12, 40,
7, 39, 41, 6, 36, 5, 4, 3, 43, 36,
39, 39, 39, 40, 0, 0, 0, 41, 33, 33,
33, 36, 36, 36, 43, 46, 40, 40, 40, 41,
41, 41, 42, 0, 42, 43, 43, 43, 42, 44,
79, 0, 45, 0, 0, 44, 0, 0, 46, 79,
0, 45, 46, 46, 46, 0, 79, 72, 0, 42,
42, 42, 45, 0, 0, 79, 44, 44, 44, 45,
45, 45, 47, 0, 79, 47, 48, 0, 48, 0,
0, 79, 47, 0, 47, 0, 47, 0, 0, 0,
72, 47, 61, 61, 61, 61, 61, 61, 0, 47,
47, 47, 0, 48, 48, 48, 64, 64, 0, 0,
64, 64, 64, 64, 64, 64, 64, 72, 72, 72,
0, 0, 61, 63, 0, 63, 63, 63, 63, 63,
63, 63, 0, 0, 0, 63, 0, 81, 63, 0,
0, 0, 0, 0, 63, 0, 0, 0, 68, 68,
99, 63, 68, 68, 68, 68, 68, 68, 68, 0,
63, 99, 86, 63, 81, 81, 81, 86, 87, 63,
82, 82, 82, 82, 82, 88, 63, 73, 73, 73,
73, 73, 73, 73, 0, 0, 82, 88, 99, 99,
99, 87, 0, 0, 86, 86, 86, 89, 90, 0,
0, 0, 90, 0, 0, 0, 91, 0, 0, 94,
89, 82, 0, 94, 88, 88, 88, 0, 87, 87,
87, 93, 93, 0, 89, 89, 89, 91, 95, 90,
90, 90, 96, 91, 91, 91, 82, 93, 95, 93,
94, 94, 94, 97, 93, 98, 93, 96, 97, 100,
0, 0, 98, 0, 100, 102, 0, 101, 0, 96,
96, 96, 93, 103, 93, 95, 95, 95, 101, 93,
107, 107, 98, 98, 98, 97, 97, 97, 102, 104,
0, 100, 100, 100, 0, 105, 103, 0, 0, 104,
108, 0, 105, 111, 0, 101, 101, 101, 107, 107,
107, 108, 109, 0, 106, 102, 102, 102, 0, 111,
110, 0, 109, 103, 103, 103, 104, 104, 104, 105,
105, 105, 106, 110, 0, 0, 112, 0, 108, 108,
108, 106, 106, 106, 113, 0, 111, 111, 111, 109,
109, 109, 114, 113, 0, 115, 0, 0, 114, 0,
110, 110, 110, 112, 112, 112, 0, 0, 118, 115,
0, 113, 113, 113, 0, 116, 0, 118, 117, 114,
114, 114, 115, 115, 115, 116, 122, 116, 118, 119,
116, 0, 120, 117, 120, 118, 118, 118, 0, 122,
0, 0, 116, 116, 116, 117, 117, 117, 121, 119,
0, 123, 0, 122, 122, 122, 119, 119, 119, 120,
120, 120, 124, 0, 0, 0, 125, 0, 121, 126,
0, 0, 123, 0, 0, 121, 121, 121, 123, 123,
123, 125, 127, 124, 126, 128, 0, 0, 130, 124,
124, 124, 129, 125, 125, 125, 126, 126, 126, 128,
0, 131, 127, 131, 0, 132, 129, 132, 130, 127,
127, 127, 128, 128, 128, 130, 130, 130, 0, 129,
129, 129, 133, 0, 0, 134, 0, 0, 131, 131,
131, 0, 132, 132, 132, 135, 0, 133, 0, 0,
0, 134, 136, 0, 0, 137, 0, 0, 139, 133,
133, 133, 134, 134, 134, 138, 136, 139, 135, 0,
137, 140, 135, 135, 135, 0, 0, 138, 0, 136,
136, 136, 137, 137, 137, 139, 139, 139, 158, 140,
0, 0, 138, 138, 138, 149, 159, 0, 140, 140,
140, 149, 149, 149, 149, 149, 149, 152, 152, 152,
152, 152, 152, 152, 153, 153, 153, 153, 153, 153,
153, 158, 0, 159, 159, 159, 153, 175, 153, 0,
175, 0, 0, 153, 155, 155, 155, 155, 155, 155,
155, 160, 160, 160, 160, 160, 0, 170, 158, 158,
158, 153, 0, 153, 175, 175, 175, 160, 153, 156,
156, 156, 156, 156, 156, 156, 170, 174, 0, 0,
171, 156, 172, 156, 0, 0, 0, 171, 156, 0,
0, 172, 160, 0, 173, 0, 0, 0, 0, 174,
178, 179, 176, 170, 170, 170, 156, 177, 156, 0,
173, 184, 178, 156, 171, 171, 171, 160, 172, 172,
172, 173, 173, 173, 179, 0, 174, 174, 174, 176,
176, 176, 184, 183, 177, 177, 177, 181, 0, 178,
178, 178, 180, 194, 180, 181, 0, 182, 0, 0,
183, 179, 179, 179, 182, 185, 0, 182, 194, 184,
184, 184, 185, 0, 181, 186, 0, 187, 190, 180,
180, 180, 0, 186, 182, 182, 182, 183, 183, 183,
187, 188, 185, 185, 185, 194, 194, 194, 188, 190,
189, 181, 181, 181, 189, 190, 190, 190, 191, 196,
186, 186, 186, 191, 195, 192, 198, 187, 187, 187,
192, 198, 0, 193, 195, 188, 188, 188, 197, 0,
196, 189, 189, 189, 193, 197, 196, 196, 196, 0,
191, 191, 191, 198, 198, 198, 199, 192, 192, 192,
201, 195, 195, 195, 200, 197, 197, 197, 199, 203,
200, 193, 193, 193, 0, 205, 202, 0, 201, 0,
204, 205, 0, 199, 199, 199, 0, 201, 201, 201,
203, 200, 200, 200, 202, 204, 203, 203, 203, 206,
0, 0, 205, 205, 205, 208, 0, 204, 204, 204,
207, 208, 207, 209, 0, 0, 209, 206, 210, 0,
0, 202, 202, 202, 0, 0, 206, 206, 206, 213,
212, 210, 208, 208, 208, 0, 214, 207, 207, 207,
209, 209, 209, 0, 214, 210, 210, 210, 211, 216,
211, 212, 0, 215, 0, 0, 213, 212, 212, 212,
215, 217, 213, 214, 214, 214, 0, 218, 0, 0,
216, 0, 0, 219, 216, 211, 211, 211, 217, 218,
215, 215, 215, 213, 213, 213, 220, 0, 217, 217,
217, 219, 220, 223, 218, 218, 218, 216, 216, 216,
219, 219, 219, 221, 0, 0, 222, 223, 0, 224,
234, 0, 225, 220, 220, 220, 0, 0, 226, 224,
223, 223, 223, 221, 0, 0, 222, 225, 226, 0,
221, 221, 221, 222, 222, 222, 224, 224, 224, 225,
225, 225, 230, 234, 0, 226, 226, 226, 230, 230,
230, 230, 230, 230, 235, 235, 235, 235, 235, 235,
235, 242, 245, 247, 0, 0, 0, 246, 242, 249,
234, 234, 234, 247, 0, 0, 0, 248, 0, 254,
0, 0, 249, 0, 0, 250, 242, 0, 251, 245,
245, 245, 248, 242, 246, 246, 246, 250, 252, 253,
247, 247, 247, 252, 248, 248, 248, 254, 255, 249,
249, 249, 250, 250, 250, 251, 251, 251, 256, 253,
259, 258, 0, 0, 0, 255, 253, 253, 253, 257,
252, 252, 252, 260, 254, 254, 254, 262, 264, 263,
259, 0, 0, 257, 263, 256, 256, 256, 258, 258,
258, 261, 255, 255, 255, 261, 257, 257, 257, 264,
260, 260, 260, 268, 262, 262, 262, 259, 259, 259,
265, 263, 263, 263, 265, 266, 0, 267, 269, 0,
268, 0, 261, 261, 261, 267, 264, 264, 264, 0,
269, 0, 0, 270, 266, 0, 0, 265, 265, 265,
270, 0, 0, 0, 267, 0, 0, 268, 268, 268,
271, 0, 0, 272, 0, 0, 273, 269, 269, 269,
0, 266, 266, 266, 271, 272, 273, 270, 270, 270,
275, 267, 267, 267, 274, 0, 0, 271, 271, 271,
272, 272, 272, 273, 273, 273, 274, 276, 280, 0,
275, 279, 0, 0, 277, 0, 0, 275, 275, 275,
276, 274, 274, 274, 277, 278, 0, 0, 0, 279,
281, 287, 278, 280, 276, 276, 276, 282, 279, 279,
279, 277, 277, 277, 281, 285, 0, 283, 0, 282,
0, 287, 278, 278, 278, 284, 0, 281, 281, 281,
280, 280, 280, 288, 282, 282, 282, 283, 288, 286,
0, 284, 0, 285, 283, 283, 283, 286, 287, 287,
287, 0, 284, 284, 284, 289, 0, 0, 290, 0,
288, 288, 288, 0, 0, 0, 286, 286, 286, 291,
285, 285, 285, 292, 0, 0, 289, 293, 290, 292,
295, 304, 289, 289, 289, 290, 290, 290, 291, 0,
0, 294, 0, 295, 296, 0, 291, 291, 291, 294,
292, 292, 292, 0, 293, 0, 314, 295, 295, 295,
293, 297, 296, 297, 304, 0, 0, 0, 294, 294,
294, 296, 296, 296, 312, 314, 0, 0, 312, 0,
0, 293, 293, 293, 316, 0, 0, 313, 297, 297,
297, 304, 304, 304, 305, 305, 305, 305, 305, 316,
0, 0, 314, 314, 314, 312, 312, 312, 313, 0,
305, 315, 320, 0, 313, 313, 313, 315, 317, 0,
0, 319, 318, 0, 322, 321, 316, 316, 316, 323,
320, 319, 0, 0, 323, 305, 0, 325, 315, 315,
315, 318, 0, 0, 321, 317, 317, 317, 319, 319,
319, 322, 322, 322, 324, 0, 326, 320, 320, 320,
305, 323, 323, 323, 325, 325, 325, 328, 318, 318,
318, 321, 321, 321, 324, 327, 0, 331, 0, 0,
0, 324, 324, 324, 326, 329, 0, 332, 331, 332,
0, 0, 327, 0, 328, 328, 328, 333, 330, 333,
329, 0, 0, 330, 331, 331, 331, 334, 0, 0,
334, 326, 326, 326, 332, 332, 332, 0, 335, 327,
327, 327, 335, 0, 333, 333, 333, 329, 329, 329,
330, 330, 330, 336, 343, 336, 337, 334, 334, 334,
0, 0, 338, 0, 0, 335, 335, 335, 337, 338,
339, 0, 339, 341, 0, 0, 345, 0, 0, 343,
336, 336, 336, 337, 337, 337, 0, 342, 0, 338,
338, 338, 341, 342, 345, 348, 349, 339, 339, 339,
341, 341, 341, 344, 0, 0, 343, 343, 343, 344,
346, 0, 0, 347, 342, 342, 342, 346, 0, 347,
348, 345, 345, 345, 349, 0, 0, 350, 0, 0,
344, 344, 344, 351, 0, 350, 0, 346, 346, 346,
347, 347, 347, 351, 352, 0, 358, 348, 348, 348,
360, 349, 349, 349, 350, 350, 350, 358, 0, 361,
351, 351, 351, 353, 352, 0, 353, 359, 0, 0,
0, 352, 352, 352, 361, 0, 0, 360, 360, 360,
363, 359, 0, 362, 358, 358, 358, 363, 0, 0,
353, 353, 353, 364, 359, 359, 359, 362, 365, 0,
0, 361, 361, 361, 366, 367, 0, 0, 0, 367,
362, 362, 362, 364, 363, 363, 363, 0, 368, 0,
364, 364, 364, 369, 370, 365, 365, 365, 372, 371,
0, 366, 366, 366, 371, 0, 367, 367, 367, 368,
374, 0, 373, 370, 0, 368, 368, 368, 373, 0,
369, 369, 369, 379, 0, 372, 372, 372, 0, 375,
374, 371, 371, 371, 376, 379, 376, 374, 374, 374,
370, 370, 370, 375, 377, 373, 373, 373, 378, 0,
379, 379, 379, 377, 380, 0, 375, 375, 375, 381,
0, 376, 376, 376, 382, 0, 380, 381, 378, 0,
0, 377, 377, 377, 382, 378, 378, 378, 384, 0,
0, 380, 380, 380, 386, 0, 381, 381, 381, 387,
386, 382, 382, 382, 391, 392, 384, 0, 388, 0,
392, 393, 0, 0, 0, 384, 384, 384, 0, 387,
388, 386, 386, 386, 391, 393, 387, 387, 387, 0,
0, 395, 392, 392, 392, 388, 388, 388, 393, 393,
393, 394, 396, 0, 397, 399, 0, 0, 394, 396,
398, 391, 391, 391, 395, 0, 0, 398, 395, 395,
395, 0, 397, 0, 399, 0, 0, 402, 394, 394,
394, 397, 397, 397, 401, 0, 396, 396, 396, 400,
401, 402, 404, 0, 398, 398, 398, 403, 404, 400,
405, 399, 399, 399, 402, 402, 402, 0, 406, 403,
0, 401, 401, 401, 406, 408, 400, 400, 400, 404,
404, 404, 409, 0, 403, 403, 403, 405, 405, 405,
408, 0, 407, 0, 0, 406, 406, 406, 407, 410,
409, 0, 408, 408, 408, 410, 411, 0, 0, 409,
409, 409, 411, 413, 0, 0, 414, 416, 0, 407,
407, 407, 415, 414, 0, 417, 410, 410, 410, 415,
0, 417, 419, 411, 411, 411, 416, 418, 0, 0,
413, 413, 413, 414, 414, 414, 422, 0, 0, 415,
415, 415, 417, 417, 417, 420, 419, 418, 0, 419,
419, 419, 423, 416, 416, 416, 0, 422, 420, 0,
0, 421, 0, 422, 422, 422, 0, 421, 424, 0,
423, 0, 425, 0, 418, 418, 418, 425, 428, 423,
423, 423, 424, 426, 0, 420, 420, 420, 421, 421,
421, 429, 0, 0, 432, 424, 424, 424, 430, 425,
425, 425, 426, 431, 430, 428, 428, 428, 433, 431,
426, 426, 426, 432, 433, 434, 436, 0, 429, 429,
429, 432, 432, 432, 435, 430, 430, 430, 437, 441,
431, 431, 431, 440, 0, 433, 433, 433, 438, 0,
0, 436, 0, 435, 434, 0, 0, 437, 0, 0,
0, 435, 435, 435, 441, 437, 437, 437, 439, 0,
438, 0, 0, 440, 0, 438, 438, 438, 436, 436,
436, 434, 434, 434, 443, 0, 0, 439, 0, 0,
443, 441, 441, 441, 445, 439, 439, 439, 0, 0,
440, 440, 440, 0, 0, 0, 445, 0, 0, 0,
0, 443, 443, 443, 0, 0, 0, 0, 0, 0,
0, 445, 445, 445, 447, 447, 447, 447, 447, 447,
447, 447, 447, 447, 447, 448, 448, 448, 448, 448,
448, 448, 448, 448, 448, 448, 449, 449, 449, 449,
449, 449, 449, 449, 449, 449, 449, 450, 450, 450,
450, 450, 450, 450, 450, 450, 450, 450, 451, 0,
451, 0, 451, 451, 451, 452, 0, 452, 452, 452,
452, 453, 453, 453, 453, 453, 453, 453, 453, 453,
453, 453, 454, 454, 454, 454, 454, 454, 454, 454,
454, 454, 455, 0, 455, 455, 455, 455, 455, 455,
455, 455, 455, 456, 0, 456, 456, 456, 456, 456,
456, 456, 456, 456, 457, 457, 457, 457, 457, 457,
458, 458, 459, 0, 0, 0, 459, 459, 460, 460,
460, 461, 461, 0, 461, 462, 0, 0, 0, 462,
462, 463, 463, 463, 463, 463, 463, 446, 446, 446,
446, 446, 446, 446, 446, 446, 446, 446, 446, 446,
446, 446, 446, 446, 446, 446, 446, 446, 446, 446,
446, 446, 446, 446, 446, 446, 446, 446, 446, 446,
446, 446, 446, 446, 446, 446, 446, 446, 446, 446,
446, 446, 446, 446, 446, 446, 446, 446, 446, 446,
446, 446, 446, 446, 446, 446, 446, 446, 446, 446,
446, 446, 446, 446, 446, 446, 446, 446, 446, 446,
446, 446
} ;
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
*/
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "ncgen.l"
#define INITIAL 0
#line 2 "ncgen.l"
/*********************************************************************
* Copyright 1993, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Id: ncgen.l,v 1.24 2009/09/25 18:22:35 dmh Exp $
*********************************************************************/
/* Problems:
1. Ideally, we assume the input is true ut8.
Unfortunately, we may actually get iso-latin-8859-1.
This means that there will be ambiguity about the characters
in the range 128-255 because they will look like n-byte unicode
when they are 1-byte 8859 characters. Because of our encoding,
8859 characters above 128 will be handles as n-byte utf8 and so
will probably not lex correctly.
Solution: assume utf8 and note in the documentation that
ISO8859 is specifically unsupported.
2. The netcdf function NC_check_name in string.c must be modified to
conform to the use of UTF8.
3. We actually have three tests for UTF8 of increasing correctness
(in the sense that the least correct will allow some sequences that
are technically illegal UTF8).
The tests are derived from the table at
http://www.w3.org/2005/03/23-lex-U
We include lexical definitions for all three, but use the second version.
4. Single character constants enclosed in '...' cannot be
utf-8, so we assume they are the one case where US-Ascii (7-bit) is used.
We could use ISO-8859-1, but that conflicts with UTF-8 above value 127.
*/
/* lex specification for tokens for ncgen */
/* Fill value used by ncdump from version 2.4 and later. Should match
definition of FILL_STRING in ../ncdump/vardata.h */
#define FILL_STRING "_"
#define XDR_INT32_MIN (-2147483647-1)
#define XDR_INT32_MAX 2147483647
#define XDR_INT64_MIN (-9223372036854775807LL-1)
#define XDR_INT64_MAX (9223372036854775807LL)
char errstr[100]; /* for short error messages */
int lineno; /* line number for error messages */
Bytebuffer* lextext; /* name or string with escapes removed */
#define YY_BREAK /* defining as nothing eliminates unreachable
statement warnings from flex output,
but make sure every action ends with
"return" or "break"! */
int specialconstants; /* 1 if nan, nanf, infinity, etc is used */
double double_val; /* last double value read */
float float_val; /* last float value read */
long long int64_val; /* last int64 value read */
int int32_val; /* last int32 value read */
short int16_val; /* last short value read */
unsigned long long uint64_val; /* last int64 value read */
unsigned int uint32_val; /* last int32 value read */
unsigned short uint16_val; /* last short value read */
char char_val; /* last char value read */
signed char byte_val; /* last byte value read */
unsigned char ubyte_val; /* last byte value read */
static Symbol* makepath(char* text);
static int lexdebug(int);
static int parseLL(char* text);
static struct Specialtoken {
char* name;
int token;
} specials[] = {
{"_FillValue",_FILLVALUE},
{"_Format",_FORMAT},
{"_Storage",_STORAGE},
{"_ChunkSizes",_CHUNKSIZES},
{"_Fletcher32",_FLETCHER32},
{"_DeflateLevel",_DEFLATELEVEL},
{"_Shuffle",_SHUFFLE},
{"_Endianness",_ENDIANNESS},
{"_NoFill",_NOFILL},
{NULL,0} /* null terminate */
};
#define ST_C_COMMENT 1
#define TEXT 2
/* The most correct (validating) version of UTF8 character set
(Taken from: http://www.w3.org/2005/03/23-lex-U)
The lines of the expression cover the UTF8 characters as follows:
1. non-overlong 2-byte
2. excluding overlongs
3. straight 3-byte
4. excluding surrogates
5. straight 3-byte
6. planes 1-3
7. planes 4-15
8. plane 16
UTF8 ([\xC2-\xDF][\x80-\xBF]) \
| (\xE0[\xA0-\xBF][\x80-\xBF]) \
| ([\xE1-\xEC][\x80-\xBF][\x80-\xBF]) \
| (\xED[\x80-\x9F][\x80-\xBF]) \
| ([\xEE-\xEF][\x80-\xBF][\x80-\xBF]) \
| (\xF0[\x90-\xBF][\x80-\xBF][\x80-\xBF]) \
| ([\xF1-\xF3][\x80-\xBF][\x80-\xBF][\x80-\xBF]) \
| (\xF4[\x80-\x8F][\x80-\xBF][\x80-\xBF]) \
*/
/* Wish there was some way to ifdef lex files */
/*The most relaxed version of UTF8 (not used)
UTF8 ([\xC0-\xD6].)|([\xE0-\xEF]..)|([\xF0-\xF7]...)
*/
/*The partially relaxed version of UTF8, and the one used here */
/* The old definition of ID
ID ([A-Za-z_]|{UTF8})([A-Z.@#\[\]a-z_0-9+-]|{UTF8})*
*/
/* Don't permit control characters or '/' in names, but other special
chars OK if escaped. Note that to preserve backwards
compatibility, none of the characters _.@+- should be escaped, as
they were previously permitted in names without escaping. */
/* New definition to conform to a subset of string.c */
/* Capture a datasetidentifier */
/* DATASETID ([a-zA-Z0-9!#$%&*:;<=>?/^|~_.@+-]|{UTF8})* */
/* Note: this definition of string will work for utf8 as well,
although it is a very relaxed definition
*/
#line 1240 "lex.ncg.c"
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap YY_PROTO(( void ));
#else
extern int yywrap YY_PROTO(( void ));
#endif
#endif
#ifndef YY_NO_UNPUT
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif
#ifndef yytext_ptr
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
#endif
#if YY_STACK_USED
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
#ifndef YY_NO_PUSH_STATE
static void yy_push_state YY_PROTO(( int new_state ));
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state YY_PROTO(( void ));
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state YY_PROTO(( void ));
#endif
#else
#define YY_NO_PUSH_STATE 1
#define YY_NO_POP_STATE 1
#define YY_NO_TOP_STATE 1
#endif
#ifdef YY_MALLOC_DECL
YY_MALLOC_DECL
#else
#if __STDC__
#ifndef __cplusplus
#include <stdlib.h>
#endif
#else
/* Just try to get by without declaring the routines. This will fail
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
* or sizeof(void*) != sizeof(int).
*/
#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
#endif
/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result".
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
if ( yy_current_buffer->yy_is_interactive ) \
{ \
int c = '*', n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
&& ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" );
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
* we don't want an extra ';' after the "return" because that will cause
* some compilers to complain about unreachable statements.
*/
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif
/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif
/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
#define YY_DECL int yylex YY_PROTO(( void ))
#endif
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif
#define YY_RULE_SETUP \
YY_USER_ACTION
YY_DECL
{
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
#line 165 "ncgen.l"
#line 1393 "lex.ncg.c"
if ( yy_init )
{
yy_init = 0;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
if ( ! yy_start )
yy_start = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
if ( ! yyout )
yyout = stdout;
if ( ! yy_current_buffer )
yy_current_buffer =
yy_create_buffer( yyin, YY_BUF_SIZE );
yy_load_buffer_state();
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = yy_c_buf_p;
/* Support of yytext. */
*yy_cp = yy_hold_char;
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp = yy_cp;
yy_current_state = yy_start;
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 447 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_base[yy_current_state] != 2548 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
if ( yy_act == 0 )
{ /* have to back up */
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
yy_act = yy_accept[yy_current_state];
}
YY_DO_BEFORE_ACTION;
do_action: /* This label is used only to access EOF actions. */
switch ( yy_act )
{ /* beginning of action switch */
case 0: /* must back up */
/* undo the effects of YY_DO_BEFORE_ACTION */
*yy_cp = yy_hold_char;
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
goto yy_find_action;
case 1:
YY_RULE_SETUP
#line 166 "ncgen.l"
{ /* whitespace */
break;
}
YY_BREAK
case 2:
YY_RULE_SETUP
#line 170 "ncgen.l"
{ /* comment */
break;
}
YY_BREAK
case 3:
YY_RULE_SETUP
#line 174 "ncgen.l"
{
/* In netcdf4, this will be used in a variety
of places, so only remove escapes */
/*
if(yyleng > MAXTRST) {
yyerror("string too long, truncated\n");
yytext[MAXTRST-1] = '\0';
}
*/
/* Assumes expand escapes also does normalization */
bbClear(lextext);
expand_escapes(lextext,(char *)yytext,yyleng);
bbNull(lextext);
return lexdebug(TERMSTRING);
}
YY_BREAK
case 4:
YY_RULE_SETUP
#line 190 "ncgen.l"
{ /* drop leading 0x; pad to even number of chars */
char* p = yytext+2;
int len = yyleng - 2;
bbClear(lextext);
bbAppendn(lextext,p,len);
if((len % 2) == 1) bbAppend(lextext,'0');
bbNull(lextext);
/* convert all chars to lower case */
for(p=bbContents(lextext);*p;p++) *p = tolower(*p);
return lexdebug(OPAQUESTRING);
}
YY_BREAK
case 5:
YY_RULE_SETUP
#line 202 "ncgen.l"
{return lexdebug(COMPOUND);}
YY_BREAK
case 6:
YY_RULE_SETUP
#line 203 "ncgen.l"
{return lexdebug(ENUM);}
YY_BREAK
case 7:
YY_RULE_SETUP
#line 204 "ncgen.l"
{return lexdebug(OPAQUE);}
YY_BREAK
case 8:
YY_RULE_SETUP
#line 206 "ncgen.l"
{return lexdebug(FLOAT_K);}
YY_BREAK
case 9:
YY_RULE_SETUP
#line 207 "ncgen.l"
{return lexdebug(CHAR_K);}
YY_BREAK
case 10:
YY_RULE_SETUP
#line 208 "ncgen.l"
{return lexdebug(BYTE_K);}
YY_BREAK
case 11:
YY_RULE_SETUP
#line 209 "ncgen.l"
{return lexdebug(UBYTE_K);}
YY_BREAK
case 12:
YY_RULE_SETUP
#line 210 "ncgen.l"
{return lexdebug(SHORT_K);}
YY_BREAK
case 13:
YY_RULE_SETUP
#line 211 "ncgen.l"
{return lexdebug(USHORT_K);}
YY_BREAK
case 14:
YY_RULE_SETUP
#line 212 "ncgen.l"
{return lexdebug(INT_K);}
YY_BREAK
case 15:
YY_RULE_SETUP
#line 213 "ncgen.l"
{return lexdebug(UINT_K);}
YY_BREAK
case 16:
YY_RULE_SETUP
#line 214 "ncgen.l"
{return lexdebug(INT64_K);}
YY_BREAK
case 17:
YY_RULE_SETUP
#line 215 "ncgen.l"
{return lexdebug(UINT64_K);}
YY_BREAK
case 18:
YY_RULE_SETUP
#line 216 "ncgen.l"
{return lexdebug(DOUBLE_K);}
YY_BREAK
case 19:
YY_RULE_SETUP
#line 217 "ncgen.l"
{int32_val = -1;
return lexdebug(NC_UNLIMITED_K);}
YY_BREAK
case 20:
YY_RULE_SETUP
#line 220 "ncgen.l"
{return lexdebug(TYPES);}
YY_BREAK
case 21:
YY_RULE_SETUP
#line 221 "ncgen.l"
{return lexdebug(DIMENSIONS);}
YY_BREAK
case 22:
YY_RULE_SETUP
#line 222 "ncgen.l"
{return lexdebug(VARIABLES);}
YY_BREAK
case 23:
YY_RULE_SETUP
#line 223 "ncgen.l"
{return lexdebug(DATA);}
YY_BREAK
case 24:
YY_RULE_SETUP
#line 224 "ncgen.l"
{return lexdebug(GROUP);}
YY_BREAK
case 25:
YY_RULE_SETUP
#line 226 "ncgen.l"
{BEGIN(TEXT);return lexdebug(NETCDF);}
YY_BREAK
case 26:
YY_RULE_SETUP
#line 228 "ncgen.l"
{ /* missing value (pre-2.4 backward compatibility) */
if (yytext[0] == '-') {
double_val = NEGINFINITE;
} else {
double_val = INFINITE;
}
specialconstants = 1;
return lexdebug(DOUBLE_CONST);
}
YY_BREAK
case 27:
YY_RULE_SETUP
#line 237 "ncgen.l"
{ /* missing value (pre-2.4 backward compatibility) */
double_val = NAN;
specialconstants = 1;
return lexdebug(DOUBLE_CONST);
}
YY_BREAK
case 28:
YY_RULE_SETUP
#line 243 "ncgen.l"
{/* missing value (pre-2.4 backward compatibility)*/
if (yytext[0] == '-') {
float_val = NEGINFINITEF;
} else {
float_val = INFINITEF;
}
specialconstants = 1;
return lexdebug(FLOAT_CONST);
}
YY_BREAK
case 29:
YY_RULE_SETUP
#line 252 "ncgen.l"
{ /* missing value (pre-2.4 backward compatibility) */
float_val = NANF;
specialconstants = 1;
return lexdebug(FLOAT_CONST);
}
YY_BREAK
case 30:
YY_RULE_SETUP
#line 258 "ncgen.l"
{
bbClear(lextext);
bbAppendn(lextext,(char*)yytext,yyleng+1); /* include null */
bbNull(lextext);
yylval.sym = makepath(bbContents(lextext));
return lexdebug(PATH);
}
YY_BREAK
case 31:
YY_RULE_SETUP
#line 267 "ncgen.l"
{struct Specialtoken* st;
bbClear(lextext);
bbAppendn(lextext,(char*)yytext,yyleng+1); /* include null */
bbNull(lextext);
for(st=specials;st->name;st++) {
if(strcmp(bbContents(lextext),st->name)==0) {return lexdebug(st->token);}
}
return 0;
}
YY_BREAK
case 32:
YY_RULE_SETUP
#line 277 "ncgen.l"
{
int c;
char* p; char* q;
/* copy the trimmed name */
bbClear(lextext);
bbAppendn(lextext,(char*)yytext,yyleng+1); /* include null */
bbNull(lextext);
p = bbContents(lextext);
q = p;
while((c=*p++)) {if(c > ' ') *q++ = c;}
*q = '\0';
datasetname = bbDup(lextext);
BEGIN(INITIAL);
return lexdebug(DATASETID);
}
YY_BREAK
case 33:
YY_RULE_SETUP
#line 293 "ncgen.l"
{ char* id;
bbClear(lextext);
bbAppendn(lextext,(char*)yytext,yyleng+1); /* include null */
bbNull(lextext);
id = bbContents(lextext);
deescapify(id);
if (STREQ(id, FILL_STRING)) return lexdebug(FILLMARKER);
yylval.sym = install(id);
return lexdebug(IDENT);
}
YY_BREAK
case 34:
YY_RULE_SETUP
#line 304 "ncgen.l"
{
/* We need to try to see what size of integer ((u)int). */
/* Technically, the user should specify, but... */
/* If out of any integer range, then complain */
switch (parseLL(yytext)) {
case 0:
return lexdebug(INT64_CONST); /* meaningless */
case -1:
#ifdef USE_NETCDF4
if(int64_val >= NC_MIN_INT) {
int32_val = (int)int64_val;
return lexdebug(INT_CONST);
} else
return lexdebug(INT64_CONST);
#else
/* Convert to int32, unless overflow then complain */
if(int64_val >=NC_MIN_INT) {
int32_val = (int)int64_val;
} else {
sprintf(errstr,"32 bit integer constant out of range: %s",(char*)yytext);
yyerror(errstr);
}
return lexdebug(INT_CONST);
#endif
case 1:
#ifdef USE_NETCDF4
if(uint64_val <= NC_MAX_INT) {
int32_val = (int)uint64_val;
return lexdebug(INT_CONST);
} else if(uint64_val <= NC_MAX_UINT) {
uint32_val = (unsigned int)uint64_val;
return lexdebug(UINT_CONST);
} else if(uint64_val <= NC_MAX_INT64) {
int64_val = (long long)uint64_val;
return lexdebug(INT64_CONST);
} else
return lexdebug(UINT64_CONST);
#else
/* Convert to int32 but complain if overflow */
if(uint64_val > NC_MAX_INT) {
sprintf(errstr,"32 bit integer constant out of range: %s",(char*)yytext);
yyerror(errstr);
}
int32_val = (int)uint64_val;
return lexdebug(INT_CONST);
#endif
}
}
YY_BREAK
case 35:
YY_RULE_SETUP
#line 353 "ncgen.l"
{ /* The number may be signed or unsigned (signed has priority) */
int slen = strlen(yytext);
int tag = yytext[slen-1];
int token = 0;
switch (tag) {
case 'B': case 'b':
if (sscanf((char*)yytext, "%d", &int32_val) != 1) {
sprintf(errstr,"bad byte constant: %s",(char*)yytext);
yyerror(errstr);
} else if(int32_val >= NC_MIN_BYTE && int32_val <= NC_MAX_BYTE) {
byte_val = (signed char)int32_val;
token = BYTE_CONST;
} else if(int32_val >= 0 && int32_val <= NC_MAX_UBYTE) {
ubyte_val = (unsigned char)int32_val;
token = UBYTE_CONST;
} else {
sprintf(errstr,"bad byte constant: %s",(char*)yytext);
yyerror(errstr);
}
break;
case 'S': case 's':
if (sscanf((char*)yytext, "%d", &int32_val) != 1) {
sprintf(errstr,"bad short constant: %s",(char*)yytext);
yyerror(errstr);
} else if(int32_val >= NC_MIN_SHORT && int32_val <= NC_MAX_SHORT) {
int16_val = (signed short)int32_val;
token = SHORT_CONST;
} else if(int32_val >= 0 && int32_val <= NC_MAX_USHORT) {
uint16_val = (unsigned short)int32_val;
token = USHORT_CONST;
} else {
sprintf(errstr,"bad short constant: %s",(char*)yytext);
yyerror(errstr);
}
break;
case 'L': case 'l':
switch(parseLL(yytext)) {
case 0:
sprintf(errstr,"bad int64 constant: %s",(char*)yytext);
yyerror(errstr);
break;
case -1: token = INT64_CONST; break;
case 1: token = UINT64_CONST; break;
}
break;
default:/*(optionally)signed string of digits; treat like int*/
sprintf(errstr,"bad numeric constant: %s",(char*)yytext);
yyerror(errstr);
}
return lexdebug(token);
}
YY_BREAK
case 36:
YY_RULE_SETUP
#line 405 "ncgen.l"
{
int slen = strlen(yytext);
int tag = yytext[slen-1];
int token = 0;
switch (tag) {
case 'B': case 'b':
if (sscanf((char*)yytext, "%u", &uint32_val) != 1
|| uint32_val > NC_MAX_UBYTE) {
sprintf(errstr,"bad unsigned byte constant: %s",(char*)yytext);
yyerror(errstr);
}
ubyte_val = (unsigned char)uint32_val;
token = UBYTE_CONST;
break;
case 'S': case 's':
if (sscanf((char*)yytext, "%u", &uint32_val) != 1
|| uint32_val > NC_MAX_USHORT) {
sprintf(errstr,"bad unsigned short constant: %s",(char*)yytext);
yyerror(errstr);
}
uint16_val = (unsigned short)uint32_val;
token = USHORT_CONST;
break;
case 'L': case 'l':
if (sscanf((char*)yytext, "%llu", &uint64_val) != 1) {
sprintf(errstr,"bad unsigned int64 constant: %s",(char*)yytext);
yyerror(errstr);
}
token = UINT64_CONST;
break;
default: /* string of digits; treat like int */
if (sscanf((char*)yytext, "%u", &uint32_val) != 1) {
sprintf(errstr,"bad unsigned int constant: %s",(char*)yytext);
yyerror(errstr);
}
token = UINT_CONST;
}
return lexdebug(token);
}
YY_BREAK
case 37:
YY_RULE_SETUP
#line 444 "ncgen.l"
{
int c;
int token = 0;
int slen = strlen(yytext);
int tag = yytext[slen-1];
char* hex = yytext+2; /* point to first true hex digit */
int xlen = (slen - 3); /* true hex length */
yytext[slen-1] = '\0';
if(xlen > 16) { /* truncate hi order digits */
hex += (xlen - 16);
}
/* convert to an unsigned long long */
uint64_val = 0;
while((c=*hex++)) {
unsigned int hexdigit = (c <= '9'?(c-'0'):(c-'a')+0xa);
uint64_val = ((uint64_val << 4) | hexdigit);
}
switch (tag) {
case 'S': case 's':
uint16_val = (unsigned short)uint64_val;
token = USHORT_CONST;
break;
case 'L': case 'l':
token = UINT64_CONST;
break;
default: /* should never happen */
if (sscanf((char*)yytext, "%i", &uint32_val) != 1) {
sprintf(errstr,"bad unsigned int constant: %s",(char*)yytext);
yyerror(errstr);
}
token = UINT_CONST;
}
return lexdebug(token);
}
YY_BREAK
case 38:
YY_RULE_SETUP
#line 478 "ncgen.l"
{
if (sscanf((char*)yytext, "%le", &double_val) != 1) {
sprintf(errstr,"bad long or double constant: %s",(char*)yytext);
yyerror(errstr);
}
return lexdebug(DOUBLE_CONST);
}
YY_BREAK
case 39:
YY_RULE_SETUP
#line 485 "ncgen.l"
{
if (sscanf((char*)yytext, "%e", &float_val) != 1) {
sprintf(errstr,"bad float constant: %s",(char*)yytext);
yyerror(errstr);
}
return lexdebug(FLOAT_CONST);
}
YY_BREAK
case 40:
YY_RULE_SETUP
#line 492 "ncgen.l"
{
(void) sscanf((char*)&yytext[1],"%c",&byte_val);
return lexdebug(BYTE_CONST);
}
YY_BREAK
case 41:
YY_RULE_SETUP
#line 496 "ncgen.l"
{
byte_val = (char) strtol((char*)&yytext[2], (char **) 0, 8);
return lexdebug(BYTE_CONST);
}
YY_BREAK
case 42:
YY_RULE_SETUP
#line 500 "ncgen.l"
{
byte_val = (char) strtol((char*)&yytext[3], (char **) 0, 16);
return lexdebug(BYTE_CONST);
}
YY_BREAK
case 43:
YY_RULE_SETUP
#line 504 "ncgen.l"
{
switch ((char)yytext[2]) {
case 'a': byte_val = '\007'; break; /* not everyone under-
* stands '\a' yet */
case 'b': byte_val = '\b'; break;
case 'f': byte_val = '\f'; break;
case 'n': byte_val = '\n'; break;
case 'r': byte_val = '\r'; break;
case 't': byte_val = '\t'; break;
case 'v': byte_val = '\v'; break;
case '\\': byte_val = '\\'; break;
case '?': byte_val = '\177'; break;
case '\'': byte_val = '\''; break;
default: byte_val = (char)yytext[2];
}
return lexdebug(BYTE_CONST);
}
YY_BREAK
case 44:
YY_RULE_SETUP
#line 522 "ncgen.l"
{
lineno++ ;
break;
}
YY_BREAK
case 45:
YY_RULE_SETUP
#line 527 "ncgen.l"
{/*initial*/
BEGIN(ST_C_COMMENT);
break;
}
YY_BREAK
case 46:
YY_RULE_SETUP
#line 532 "ncgen.l"
{/* continuation */
break;
}
YY_BREAK
case 47:
YY_RULE_SETUP
#line 536 "ncgen.l"
{/* final */
BEGIN(INITIAL);
break;
}
YY_BREAK
case YY_STATE_EOF(ST_C_COMMENT):
#line 541 "ncgen.l"
{/* final, error */
fprintf(stderr,"unterminated /**/ comment");
BEGIN(INITIAL);
break;
}
YY_BREAK
case 48:
YY_RULE_SETUP
#line 547 "ncgen.l"
{/* Note: this next rule will not work for UTF8 characters */
return lexdebug(yytext[0]) ;
}
YY_BREAK
case 49:
YY_RULE_SETUP
#line 550 "ncgen.l"
ECHO;
YY_BREAK
#line 2037 "lex.ncg.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(TEXT):
yyterminate();
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB char. */
int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
*yy_cp = yy_hold_char;
YY_RESTORE_YY_MORE_OFFSET
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
* yylex(). If so, then we have to assure
* consistency between yy_current_buffer and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
yy_n_chars = yy_current_buffer->yy_n_chars;
yy_current_buffer->yy_input_file = yyin;
yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
* of the first EOB in the buffer, since yy_c_buf_p will
* already have been incremented past the NUL character
* (since all states make transitions on EOB to the
* end-of-buffer state). Contrast this with the test
* in input().
*/
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
{ /* This was really a NUL. */
yy_state_type yy_next_state;
yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
* yy_get_previous_state() go ahead and do it
* for us because it doesn't know how to deal
* with the possibility of jamming (and we don't
* want to build jamming into it because then it
* will run more slowly).
*/
yy_next_state = yy_try_NUL_trans( yy_current_state );
yy_bp = yytext_ptr + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
yy_cp = ++yy_c_buf_p;
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
yy_cp = yy_c_buf_p;
goto yy_find_action;
}
}
else switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
yy_did_buffer_switch_on_eof = 0;
if ( yywrap() )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
* yytext, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
}
else
{
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
}
break;
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p =
yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
yy_c_buf_p =
&yy_current_buffer->yy_ch_buf[yy_n_chars];
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_find_action;
}
break;
}
default:
YY_FATAL_ERROR(
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
* Returns a code representing an action:
* EOB_ACT_LAST_MATCH -
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
static int yy_get_next_buffer()
{
register char *dest = yy_current_buffer->yy_ch_buf;
register char *source = yytext_ptr;
register int number_to_move, i;
int ret_val;
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
if ( yy_current_buffer->yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
{
/* We matched a single character, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
}
else
{
/* We matched some text prior to the EOB, first
* process it.
*/
return EOB_ACT_LAST_MATCH;
}
}
/* Try to read more data. */
/* First move last chars to start of buffer. */
number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
yy_current_buffer->yy_n_chars = yy_n_chars = 0;
else
{
int num_to_read =
yy_current_buffer->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
#ifdef YY_USES_REJECT
YY_FATAL_ERROR(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
#else
/* just a shorter name for the current buffer */
YY_BUFFER_STATE b = yy_current_buffer;
int yy_c_buf_p_offset =
(int) (yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
else
b->yy_buf_size *= 2;
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
yy_flex_realloc( (void *) b->yy_ch_buf,
b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
b->yy_ch_buf = 0;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = yy_current_buffer->yy_buf_size -
number_to_move - 1;
#endif
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
yy_n_chars, num_to_read );
yy_current_buffer->yy_n_chars = yy_n_chars;
}
if ( yy_n_chars == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
yyrestart( yyin );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
yy_current_buffer->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
else
ret_val = EOB_ACT_CONTINUE_SCAN;
yy_n_chars += number_to_move;
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
return ret_val;
}
/* yy_get_previous_state - get the state just before the EOB char was reached */
static yy_state_type yy_get_previous_state()
{
register yy_state_type yy_current_state;
register char *yy_cp;
yy_current_state = yy_start;
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 447 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
}
return yy_current_state;
}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
{
register int yy_is_jam;
register char *yy_cp = yy_c_buf_p;
register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 447 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 446);
return yy_is_jam ? 0 : yy_current_state;
}
#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
register char *yy_bp;
#endif
{
register char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
register int number_to_move = yy_n_chars + 2;
register char *dest = &yy_current_buffer->yy_ch_buf[
yy_current_buffer->yy_buf_size + 2];
register char *source =
&yy_current_buffer->yy_ch_buf[number_to_move];
while ( source > yy_current_buffer->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
yy_current_buffer->yy_n_chars =
yy_n_chars = yy_current_buffer->yy_buf_size;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
*--yy_cp = (char) c;
yytext_ptr = yy_bp;
yy_hold_char = *yy_cp;
yy_c_buf_p = yy_cp;
}
#endif /* ifndef YY_NO_UNPUT */
#ifdef __cplusplus
static int yyinput()
#else
static int input()
#endif
{
int c;
*yy_c_buf_p = yy_hold_char;
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
/* This was really a NUL. */
*yy_c_buf_p = '\0';
else
{ /* need more input */
int offset = yy_c_buf_p - yytext_ptr;
++yy_c_buf_p;
switch ( yy_get_next_buffer() )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
* sees that we've accumulated a
* token and flags that we need to
* try matching the token before
* proceeding. But for input(),
* there's no matching to consider.
* So convert the EOB_ACT_LAST_MATCH
* to EOB_ACT_END_OF_FILE.
*/
/* Reset buffer status. */
yyrestart( yyin );
/* fall through */
case EOB_ACT_END_OF_FILE:
{
if ( yywrap() )
return EOF;
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
#else
return input();
#endif
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p = yytext_ptr + offset;
break;
}
}
}
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
*yy_c_buf_p = '\0'; /* preserve yytext */
yy_hold_char = *++yy_c_buf_p;
return c;
}
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
{
if ( ! yy_current_buffer )
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
yy_init_buffer( yy_current_buffer, input_file );
yy_load_buffer_state();
}
#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
{
if ( yy_current_buffer == new_buffer )
return;
if ( yy_current_buffer )
{
/* Flush out information for old buffer. */
*yy_c_buf_p = yy_hold_char;
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
yy_current_buffer->yy_n_chars = yy_n_chars;
}
yy_current_buffer = new_buffer;
yy_load_buffer_state();
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
yy_did_buffer_switch_on_eof = 1;
}
#ifdef YY_USE_PROTOS
void yy_load_buffer_state( void )
#else
void yy_load_buffer_state()
#endif
{
yy_n_chars = yy_current_buffer->yy_n_chars;
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
yyin = yy_current_buffer->yy_input_file;
yy_hold_char = *yy_c_buf_p;
}
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
yy_init_buffer( b, file );
return b;
}
#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
if ( b == yy_current_buffer )
yy_current_buffer = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
yy_flex_free( (void *) b->yy_ch_buf );
yy_flex_free( (void *) b );
}
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
extern int isatty YY_PROTO(( int ));
#endif
#endif
#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
#else
void yy_init_buffer( b, file )
YY_BUFFER_STATE b;
FILE *file;
#endif
{
yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
#if YY_ALWAYS_INTERACTIVE
b->yy_is_interactive = 1;
#else
#if YY_NEVER_INTERACTIVE
b->yy_is_interactive = 0;
#else
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
#endif
#endif
}
#ifdef YY_USE_PROTOS
void yy_flush_buffer( YY_BUFFER_STATE b )
#else
void yy_flush_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
b->yy_n_chars = 0;
/* We always need two end-of-buffer characters. The first causes
* a transition to the end-of-buffer state. The second causes
* a jam in that state.
*/
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
b->yy_buf_pos = &b->yy_ch_buf[0];
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == yy_current_buffer )
yy_load_buffer_state();
}
#ifndef YY_NO_SCAN_BUFFER
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
#else
YY_BUFFER_STATE yy_scan_buffer( base, size )
char *base;
yy_size_t size;
#endif
{
YY_BUFFER_STATE b;
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return 0;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
b->yy_input_file = 0;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
yy_switch_to_buffer( b );
return b;
}
#endif
#ifndef YY_NO_SCAN_STRING
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
#else
YY_BUFFER_STATE yy_scan_string( yy_str )
yyconst char *yy_str;
#endif
{
int len;
for ( len = 0; yy_str[len]; ++len )
;
return yy_scan_bytes( yy_str, len );
}
#endif
#ifndef YY_NO_SCAN_BYTES
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
#else
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
yyconst char *bytes;
int len;
#endif
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = len + 2;
buf = (char *) yy_flex_alloc( n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < len; ++i )
buf[i] = bytes[i];
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
b = yy_scan_buffer( buf, n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
*/
b->yy_is_our_buffer = 1;
return b;
}
#endif
#ifndef YY_NO_PUSH_STATE
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
static void yy_push_state( new_state )
int new_state;
#endif
{
if ( yy_start_stack_ptr >= yy_start_stack_depth )
{
yy_size_t new_size;
yy_start_stack_depth += YY_START_STACK_INCR;
new_size = yy_start_stack_depth * sizeof( int );
if ( ! yy_start_stack )
yy_start_stack = (int *) yy_flex_alloc( new_size );
else
yy_start_stack = (int *) yy_flex_realloc(
(void *) yy_start_stack, new_size );
if ( ! yy_start_stack )
YY_FATAL_ERROR(
"out of memory expanding start-condition stack" );
}
yy_start_stack[yy_start_stack_ptr++] = YY_START;
BEGIN(new_state);
}
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state()
{
if ( --yy_start_stack_ptr < 0 )
YY_FATAL_ERROR( "start-condition stack underflow" );
BEGIN(yy_start_stack[yy_start_stack_ptr]);
}
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state()
{
return yy_start_stack[yy_start_stack_ptr - 1];
}
#endif
#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif
#ifdef YY_USE_PROTOS
static void yy_fatal_error( yyconst char msg[] )
#else
static void yy_fatal_error( msg )
char msg[];
#endif
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* Redefine yyless() so it works in section 3 code. */
#undef yyless
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
yytext[yyleng] = yy_hold_char; \
yy_c_buf_p = yytext + n; \
yy_hold_char = *yy_c_buf_p; \
*yy_c_buf_p = '\0'; \
yyleng = n; \
} \
while ( 0 )
/* Internal utility routines. */
#ifndef yytext_ptr
#ifdef YY_USE_PROTOS
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
#else
static void yy_flex_strncpy( s1, s2, n )
char *s1;
yyconst char *s2;
int n;
#endif
{
register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
#ifdef YY_USE_PROTOS
static int yy_flex_strlen( yyconst char *s )
#else
static int yy_flex_strlen( s )
yyconst char *s;
#endif
{
register int n;
for ( n = 0; s[n]; ++n )
;
return n;
}
#endif
#ifdef YY_USE_PROTOS
static void *yy_flex_alloc( yy_size_t size )
#else
static void *yy_flex_alloc( size )
yy_size_t size;
#endif
{
return (void *) malloc( size );
}
#ifdef YY_USE_PROTOS
static void *yy_flex_realloc( void *ptr, yy_size_t size )
#else
static void *yy_flex_realloc( ptr, size )
void *ptr;
yy_size_t size;
#endif
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
* because both ANSI C and C++ allow castless assignment from
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
}
#ifdef YY_USE_PROTOS
static void yy_flex_free( void *ptr )
#else
static void yy_flex_free( ptr )
void *ptr;
#endif
{
free( ptr );
}
#if YY_MAIN
int main()
{
yylex();
return 0;
}
#endif
#line 550 "ncgen.l"
static int
lexdebug(int token)
{
if(debug >= 2)
{
fprintf(stderr,"Token=%d |%s|\n",token,yytext);
}
return token;
}
int
lex_init(void)
{
lineno = 1;
lextext = bbNew();
if(0) unput(0); /* keep -Wall quiet */
return 0;
}
static Symbol*
makepath(char* text0)
{
/* Convert path to a sequence of symbols */
/* use last name as symbol name (with '/' as exception) */
Symbol* sym = NULL;
/* walk the path converting to a sequence of symbols */
if(strcmp(text0,"/")==0) {
/* special case of root reference */
sym = rootgroup;
} else {
List* prefix = listnew();
/* split the text into IDENT chunks, convert to symbols */
Symbol* container = rootgroup;
char *ident, *p;
char* text = strdup(text0);
int c,issuffix;
ident=text+1; p=ident; /* skip leading '/' */
do {
issuffix=0;
switch ((c=*p)) {
default: p++; break;
case '\\': p++; if(*p == '/') p++; break;
case '\0': /* treat null terminator like trailing '/' (mostly) */
issuffix=1; /* this is the last ident in the path */
/*fall thru */
case '/':
*p='\0';
deescapify(ident);
if(!issuffix) {
sym = lookupingroup(NC_GRP,ident,container);
if(sym == NULL) {
sprintf(errstr,"Undefined or forward referenced group: %s",ident);
yyerror(errstr);
sym = rootgroup;
} else {
listpush(prefix,(elem_t)sym);
}
} else
{
sym = install(ident);
sym->objectclass = NC_GRP;
sym->is_ref = 1;
sym->ref = NULL;
sym->container = container;
sym->subnodes = listnew();
}
container = sym;
ident=p+1; p=ident;
break;
}
} while(c != '\0');
sym->objectclass = NC_NAT; /*make caller set correctly */
sym->prefix = prefix;
free(text);
}
return sym;
}
static int
parseLL(char* text)
{
int result = 0;
#if defined(HAVE_STRTOLL) && defined(HAVE_STRTOULL)
extern int errno;
char* endptr;
errno = 0; endptr = NULL;
if(text[0] == '-') {
int64_val = strtoll(text,&endptr,10);
result = -1; /* negative int64_val */
} else {
uint64_val = strtoull(text,&endptr,10);
result = 1; /* positive uint64_val */
}
if(result == 0) {
sprintf(errstr,"Unparseable 64 bit integer constant: %s",(char*)text);
yyerror(errstr);
} else if(errno == ERANGE) {
sprintf(errstr,"64 bit integer constant out of range: %s",(char*)text);
yyerror(errstr);
result = 0; /* out of range */
}
#else /*!(defined HAVE_STRTOLL && defined HAVE_STRTOULL)*/
if(text[0] == '-') {
sscanf((char*)text, "%lld", &int64_val);
result = -1; /* negative int64_val */
} else {
sscanf((char*)text, "%llu", &uint64_val);
result = 1; /* positive uint64_val */
}
/* Have no useful way to detect out of range */
#endif /*!(defined HAVE_STRTOLL && defined HAVE_STRTOULL)*/
return result;
}