netcdf-c/ncgen/ncgenyy.c
Dennis Heimbigner fec4cdb230 Fixed the following Jira minor bugs:
NCF-42: _Format attribute sometimes being ignored
NCF-43: Fixed unsigned long long parsing.
NCF-47: Make opendap code properly handle illegal names like "x.y" by
        supressing them
NCF-49: check for uint type
NCF-50: properly handle username:pwd embedded in urls.
2011-05-12 17:51:32 +00:00

3270 lines
107 KiB
C

#line 3 "lex.ncg.c"
#define YY_INT_ALIGNED short int
/* A lexical scanner generated by flex */
#define yy_create_buffer ncg_create_buffer
#define yy_delete_buffer ncg_delete_buffer
#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 yylineno ncglineno
#define yyout ncgout
#define yyrestart ncgrestart
#define yytext ncgtext
#define yywrap ncgwrap
#define yyalloc ncgalloc
#define yyrealloc ncgrealloc
#define yyfree ncgfree
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
/* end standard C headers. */
/* flex integer type definitions */
#ifndef FLEXINT_H
#define FLEXINT_H
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
* if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
#endif
#include <inttypes.h>
typedef int8_t flex_int8_t;
typedef uint8_t flex_uint8_t;
typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN (-32767-1)
#endif
#ifndef INT32_MIN
#define INT32_MIN (-2147483647-1)
#endif
#ifndef INT8_MAX
#define INT8_MAX (127)
#endif
#ifndef INT16_MAX
#define INT16_MAX (32767)
#endif
#ifndef INT32_MAX
#define INT32_MAX (2147483647)
#endif
#ifndef UINT8_MAX
#define UINT8_MAX (255U)
#endif
#ifndef UINT16_MAX
#define UINT16_MAX (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX (4294967295U)
#endif
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
#else /* ! __cplusplus */
/* C99 requires __STDC__ to be defined as 1. */
#if defined (__STDC__)
#define YY_USE_CONST
#endif /* defined (__STDC__) */
#endif /* ! __cplusplus */
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#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 ncgrestart(ncgin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#define YY_BUF_SIZE 16384
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
*/
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
extern int ncgleng;
extern FILE *ncgin, *ncgout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
#define YY_LESS_LINENO(n)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up ncgtext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = (yy_hold_char); \
YY_RESTORE_YY_MORE_OFFSET \
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up ncgtext again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
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;
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
/* 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 ncgrestart()), so that the user can continue scanning by
* just pointing ncgin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
/* Stack of input buffers. */
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
/* 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".
*
* Returns the top of the stack, or NULL.
*/
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
/* yy_hold_char holds the character lost when ncgtext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
int ncgleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* Flag which is used to allow ncgwrap()'s to do buffer switches
* instead of setting up a fresh ncgin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
void ncgrestart (FILE *input_file );
void ncg_switch_to_buffer (YY_BUFFER_STATE new_buffer );
YY_BUFFER_STATE ncg_create_buffer (FILE *file,int size );
void ncg_delete_buffer (YY_BUFFER_STATE b );
void ncg_flush_buffer (YY_BUFFER_STATE b );
void ncgpush_buffer_state (YY_BUFFER_STATE new_buffer );
void ncgpop_buffer_state (void );
static void ncgensure_buffer_stack (void );
static void ncg_load_buffer_state (void );
static void ncg_init_buffer (YY_BUFFER_STATE b,FILE *file );
#define YY_FLUSH_BUFFER ncg_flush_buffer(YY_CURRENT_BUFFER )
YY_BUFFER_STATE ncg_scan_buffer (char *base,yy_size_t size );
YY_BUFFER_STATE ncg_scan_string (yyconst char *yy_str );
YY_BUFFER_STATE ncg_scan_bytes (yyconst char *bytes,int len );
void *ncgalloc (yy_size_t );
void *ncgrealloc (void *,yy_size_t );
void ncgfree (void * );
#define yy_new_buffer ncg_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
ncgensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
ncg_create_buffer(ncgin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
ncgensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
ncg_create_buffer(ncgin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
/* Begin user sect3 */
typedef unsigned char YY_CHAR;
FILE *ncgin = (FILE *) 0, *ncgout = (FILE *) 0;
typedef int yy_state_type;
extern int ncglineno;
int ncglineno = 1;
extern char *ncgtext;
#define yytext_ptr ncgtext
static yy_state_type yy_get_previous_state (void );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
static int yy_get_next_buffer (void );
static void yy_fatal_error (yyconst char msg[] );
/* Done after the current pattern has been matched and before the
* corresponding action - sets up ncgtext.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
ncgleng = (size_t) (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
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
{
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
static yyconst flex_int16_t 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 flex_int32_t 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 flex_int32_t 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 flex_int16_t 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 flex_int16_t 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 flex_int16_t 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 flex_int16_t 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;
extern int ncg_flex_debug;
int ncg_flex_debug = 0;
/* 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 *ncgtext;
#line 1 "ncgen.l"
#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.
*/
/* 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 */
char* 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 */
};
/* 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 1322 "lex.ncg.c"
#define INITIAL 0
#define ST_C_COMMENT 1
#define TEXT 2
#ifndef YY_NO_UNISTD_H
/* Special case for "unistd.h", since it is non-ANSI. We include it way
* down here because we want the user's section 1 to have been scanned first.
* The user has a chance to override it with an option.
*/
#include <unistd.h>
#endif
#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif
static int yy_init_globals (void );
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
int ncglex_destroy (void );
int ncgget_debug (void );
void ncgset_debug (int debug_flag );
YY_EXTRA_TYPE ncgget_extra (void );
void ncgset_extra (YY_EXTRA_TYPE user_defined );
FILE *ncgget_in (void );
void ncgset_in (FILE * in_str );
FILE *ncgget_out (void );
void ncgset_out (FILE * out_str );
int ncgget_leng (void );
char *ncgget_text (void );
int ncgget_lineno (void );
void ncgset_lineno (int line_number );
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int ncgwrap (void );
#else
extern int ncgwrap (void );
#endif
#endif
static void yyunput (int c,char *buf_ptr );
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * );
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (void );
#else
static int input (void );
#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 do { if (fwrite( ncgtext, ncgleng, 1, ncgout )) {} } while (0)
#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_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
unsigned n; \
for ( n = 0; n < max_size && \
(c = getc( ncgin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( ncgin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
while ( (result = fread(buf, 1, max_size, ncgin))==0 && ferror(ncgin)) \
{ \
if( errno != EINTR) \
{ \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
break; \
} \
errno=0; \
clearerr(ncgin); \
} \
}\
\
#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
/* end tables serialization structures and prototypes */
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
extern int ncglex (void);
#define YY_DECL int ncglex (void)
#endif /* !YY_DECL */
/* Code executed at the beginning of each rule, after ncgtext and ncgleng
* 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
/** The main scanner function which does all the work.
*/
YY_DECL
{
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
#line 160 "ncgen.l"
#line 1508 "lex.ncg.c"
if ( !(yy_init) )
{
(yy_init) = 1;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
if ( ! (yy_start) )
(yy_start) = 1; /* first start state */
if ( ! ncgin )
ncgin = stdin;
if ( ! ncgout )
ncgout = stdout;
if ( ! YY_CURRENT_BUFFER ) {
ncgensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
ncg_create_buffer(ncgin,YY_BUF_SIZE );
}
ncg_load_buffer_state( );
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = (yy_c_buf_p);
/* Support of ncgtext. */
*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 161 "ncgen.l"
{ /* whitespace */
break;
}
YY_BREAK
case 2:
YY_RULE_SETUP
#line 165 "ncgen.l"
{ /* comment */
break;
}
YY_BREAK
case 3:
/* rule 3 can match eol */
YY_RULE_SETUP
#line 169 "ncgen.l"
{
/* In netcdf4, this will be used in a variety
of places, so only remove escapes */
/*
if(ncgleng > MAXTRST) {
yyerror("string too long, truncated\n");
ncgtext[MAXTRST-1] = '\0';
}
*/
lextext = emalloc(1+4*ncgleng); /* should be max
needed */
/* Assumes expand escapes also does normalization */
expand_escapes(lextext,(char *)ncgtext,ncgleng);
return lexdebug(TERMSTRING);
}
YY_BREAK
case 4:
YY_RULE_SETUP
#line 185 "ncgen.l"
{ /* drop leading 0x; pad to even number of chars */
char* p = ncgtext+2;
int len = ncgleng - 2;
int padlen = len;
if((padlen % 2) == 1) padlen++;
lextext = emalloc(1+padlen);
strncpy(lextext,p,len+1); /*include null */
lextext[len] = '0'; /* assume padding */
lextext[padlen] = '\0'; /* make sure null terminated */
/* convert all chars to lower case */
for(p=lextext;*p;p++) *p = tolower(*p);
return lexdebug(OPAQUESTRING);
}
YY_BREAK
case 5:
YY_RULE_SETUP
#line 199 "ncgen.l"
{return lexdebug(COMPOUND);}
YY_BREAK
case 6:
YY_RULE_SETUP
#line 200 "ncgen.l"
{return lexdebug(ENUM);}
YY_BREAK
case 7:
YY_RULE_SETUP
#line 201 "ncgen.l"
{return lexdebug(OPAQUE);}
YY_BREAK
case 8:
YY_RULE_SETUP
#line 203 "ncgen.l"
{return lexdebug(FLOAT_K);}
YY_BREAK
case 9:
YY_RULE_SETUP
#line 204 "ncgen.l"
{return lexdebug(CHAR_K);}
YY_BREAK
case 10:
YY_RULE_SETUP
#line 205 "ncgen.l"
{return lexdebug(BYTE_K);}
YY_BREAK
case 11:
YY_RULE_SETUP
#line 206 "ncgen.l"
{return lexdebug(UBYTE_K);}
YY_BREAK
case 12:
YY_RULE_SETUP
#line 207 "ncgen.l"
{return lexdebug(SHORT_K);}
YY_BREAK
case 13:
YY_RULE_SETUP
#line 208 "ncgen.l"
{return lexdebug(USHORT_K);}
YY_BREAK
case 14:
YY_RULE_SETUP
#line 209 "ncgen.l"
{return lexdebug(INT_K);}
YY_BREAK
case 15:
YY_RULE_SETUP
#line 210 "ncgen.l"
{return lexdebug(UINT_K);}
YY_BREAK
case 16:
YY_RULE_SETUP
#line 211 "ncgen.l"
{return lexdebug(INT64_K);}
YY_BREAK
case 17:
YY_RULE_SETUP
#line 212 "ncgen.l"
{return lexdebug(UINT64_K);}
YY_BREAK
case 18:
YY_RULE_SETUP
#line 213 "ncgen.l"
{return lexdebug(DOUBLE_K);}
YY_BREAK
case 19:
YY_RULE_SETUP
#line 214 "ncgen.l"
{int32_val = -1;
return lexdebug(NC_UNLIMITED_K);}
YY_BREAK
case 20:
YY_RULE_SETUP
#line 217 "ncgen.l"
{return lexdebug(TYPES);}
YY_BREAK
case 21:
YY_RULE_SETUP
#line 218 "ncgen.l"
{return lexdebug(DIMENSIONS);}
YY_BREAK
case 22:
YY_RULE_SETUP
#line 219 "ncgen.l"
{return lexdebug(VARIABLES);}
YY_BREAK
case 23:
YY_RULE_SETUP
#line 220 "ncgen.l"
{return lexdebug(DATA);}
YY_BREAK
case 24:
YY_RULE_SETUP
#line 221 "ncgen.l"
{return lexdebug(GROUP);}
YY_BREAK
case 25:
YY_RULE_SETUP
#line 223 "ncgen.l"
{BEGIN(TEXT);return lexdebug(NETCDF);}
YY_BREAK
case 26:
YY_RULE_SETUP
#line 225 "ncgen.l"
{ /* missing value (pre-2.4 backward compatibility) */
if (ncgtext[0] == '-') {
double_val = NEGINFINITE;
} else {
double_val = INFINITE;
}
specialconstants = 1;
return lexdebug(DOUBLE_CONST);
}
YY_BREAK
case 27:
YY_RULE_SETUP
#line 234 "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 240 "ncgen.l"
{/* missing value (pre-2.4 backward compatibility)*/
if (ncgtext[0] == '-') {
float_val = NEGINFINITEF;
} else {
float_val = INFINITEF;
}
specialconstants = 1;
return lexdebug(FLOAT_CONST);
}
YY_BREAK
case 29:
YY_RULE_SETUP
#line 249 "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 255 "ncgen.l"
{
lextext = emalloc(1+4*ncgleng); /* should be max needed */
strncpy(lextext,(char*)ncgtext,ncgleng+1); /* include null */
yylval.sym = makepath(lextext);
free(lextext);
return lexdebug(PATH);
}
YY_BREAK
case 31:
YY_RULE_SETUP
#line 264 "ncgen.l"
{struct Specialtoken* st;
lextext = emalloc(1+4*ncgleng); /* should be max needed */
strncpy(lextext,(char*)ncgtext,ncgleng+1); /* include null */
for(st=specials;st->name;st++) {
if(strcmp(lextext,st->name)==0) {return lexdebug(st->token);}
}
return 0;
}
YY_BREAK
case 32:
/* rule 32 can match eol */
YY_RULE_SETUP
#line 273 "ncgen.l"
{
int c;
char* p; char* q;
lextext = emalloc(1+4*ncgleng); /* should be max needed */
/* copy the trimmed name */
strncpy(lextext,(char*)ncgtext,ncgleng+1); /* include null */
p = lextext;
q = lextext;
while((c=*p++)) {if(c > ' ') *q++ = c;}
*q = '\0';
datasetname = lextext;
BEGIN(INITIAL);
return lexdebug(DATASETID);
}
YY_BREAK
case 33:
YY_RULE_SETUP
#line 288 "ncgen.l"
{
lextext = emalloc(1+4*ncgleng); /* should be max needed */
strncpy(lextext,(char*)ncgtext,ncgleng+1); /* include null */
deescapify(lextext);
if (STREQ((char *)lextext, FILL_STRING)) return lexdebug(FILLMARKER);
yylval.sym = install(lextext);
return lexdebug(IDENT);
}
YY_BREAK
case 34:
YY_RULE_SETUP
#line 297 "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(ncgtext)) {
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*)ncgtext);
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*)ncgtext);
yyerror(errstr);
}
int32_val = (int)uint64_val;
return lexdebug(INT_CONST);
#endif
}
}
YY_BREAK
case 35:
YY_RULE_SETUP
#line 346 "ncgen.l"
{ /* The number may be signed or unsigned (signed has priority) */
int slen = strlen(ncgtext);
int tag = ncgtext[slen-1];
int token = 0;
switch (tag) {
case 'B': case 'b':
if (sscanf((char*)ncgtext, "%d", &int32_val) != 1) {
sprintf(errstr,"bad byte constant: %s",(char*)ncgtext);
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*)ncgtext);
yyerror(errstr);
}
break;
case 'S': case 's':
if (sscanf((char*)ncgtext, "%d", &int32_val) != 1) {
sprintf(errstr,"bad short constant: %s",(char*)ncgtext);
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*)ncgtext);
yyerror(errstr);
}
break;
case 'L': case 'l':
switch(parseLL(ncgtext)) {
case 0:
sprintf(errstr,"bad int64 constant: %s",(char*)ncgtext);
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*)ncgtext);
yyerror(errstr);
}
return lexdebug(token);
}
YY_BREAK
case 36:
YY_RULE_SETUP
#line 398 "ncgen.l"
{
int slen = strlen(ncgtext);
int tag = ncgtext[slen-1];
int token = 0;
switch (tag) {
case 'B': case 'b':
if (sscanf((char*)ncgtext, "%u", &uint32_val) != 1
|| uint32_val > NC_MAX_UBYTE) {
sprintf(errstr,"bad unsigned byte constant: %s",(char*)ncgtext);
yyerror(errstr);
}
ubyte_val = (unsigned char)uint32_val;
token = UBYTE_CONST;
break;
case 'S': case 's':
if (sscanf((char*)ncgtext, "%u", &uint32_val) != 1
|| uint32_val > NC_MAX_USHORT) {
sprintf(errstr,"bad unsigned short constant: %s",(char*)ncgtext);
yyerror(errstr);
}
uint16_val = (unsigned short)uint32_val;
token = USHORT_CONST;
break;
case 'L': case 'l':
if (sscanf((char*)ncgtext, "%llu", &uint64_val) != 1) {
sprintf(errstr,"bad unsigned int64 constant: %s",(char*)ncgtext);
yyerror(errstr);
}
token = UINT64_CONST;
break;
default: /* string of digits; treat like int */
if (sscanf((char*)ncgtext, "%u", &uint32_val) != 1) {
sprintf(errstr,"bad unsigned int constant: %s",(char*)ncgtext);
yyerror(errstr);
}
token = UINT_CONST;
}
return lexdebug(token);
}
YY_BREAK
case 37:
YY_RULE_SETUP
#line 437 "ncgen.l"
{
int c;
int token = 0;
int slen = strlen(ncgtext);
int tag = ncgtext[slen-1];
char* hex = ncgtext+2; /* point to first true hex digit */
int xlen = (slen - 3); /* true hex length */
ncgtext[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*)ncgtext, "%i", &uint32_val) != 1) {
sprintf(errstr,"bad unsigned int constant: %s",(char*)ncgtext);
yyerror(errstr);
}
token = UINT_CONST;
}
return lexdebug(token);
}
YY_BREAK
case 38:
YY_RULE_SETUP
#line 471 "ncgen.l"
{
if (sscanf((char*)ncgtext, "%le", &double_val) != 1) {
sprintf(errstr,"bad long or double constant: %s",(char*)ncgtext);
yyerror(errstr);
}
return lexdebug(DOUBLE_CONST);
}
YY_BREAK
case 39:
YY_RULE_SETUP
#line 478 "ncgen.l"
{
if (sscanf((char*)ncgtext, "%e", &float_val) != 1) {
sprintf(errstr,"bad float constant: %s",(char*)ncgtext);
yyerror(errstr);
}
return lexdebug(FLOAT_CONST);
}
YY_BREAK
case 40:
/* rule 40 can match eol */
YY_RULE_SETUP
#line 485 "ncgen.l"
{
(void) sscanf((char*)&ncgtext[1],"%c",&byte_val);
return lexdebug(BYTE_CONST);
}
YY_BREAK
case 41:
YY_RULE_SETUP
#line 489 "ncgen.l"
{
byte_val = (char) strtol((char*)&ncgtext[2], (char **) 0, 8);
return lexdebug(BYTE_CONST);
}
YY_BREAK
case 42:
YY_RULE_SETUP
#line 493 "ncgen.l"
{
byte_val = (char) strtol((char*)&ncgtext[3], (char **) 0, 16);
return lexdebug(BYTE_CONST);
}
YY_BREAK
case 43:
YY_RULE_SETUP
#line 497 "ncgen.l"
{
switch ((char)ncgtext[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)ncgtext[2];
}
return lexdebug(BYTE_CONST);
}
YY_BREAK
case 44:
/* rule 44 can match eol */
YY_RULE_SETUP
#line 515 "ncgen.l"
{
lineno++ ;
break;
}
YY_BREAK
case 45:
YY_RULE_SETUP
#line 520 "ncgen.l"
{/*initial*/
BEGIN(ST_C_COMMENT);
break;
}
YY_BREAK
case 46:
/* rule 46 can match eol */
YY_RULE_SETUP
#line 525 "ncgen.l"
{/* continuation */
break;
}
YY_BREAK
case 47:
YY_RULE_SETUP
#line 529 "ncgen.l"
{/* final */
BEGIN(INITIAL);
break;
}
YY_BREAK
case YY_STATE_EOF(ST_C_COMMENT):
#line 534 "ncgen.l"
{/* final, error */
fprintf(stderr,"unterminated /**/ comment");
BEGIN(INITIAL);
break;
}
YY_BREAK
case 48:
YY_RULE_SETUP
#line 540 "ncgen.l"
{/* Note: this next rule will not work for UTF8 characters */
return lexdebug(ncgtext[0]) ;
}
YY_BREAK
case 49:
YY_RULE_SETUP
#line 543 "ncgen.l"
ECHO;
YY_BREAK
#line 2155 "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_LVALUE->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 ncgin at a new source and called
* ncglex(). 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_LVALUE->yy_n_chars;
YY_CURRENT_BUFFER_LVALUE->yy_input_file = ncgin;
YY_CURRENT_BUFFER_LVALUE->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_LVALUE->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 ( ncgwrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
* ncgtext, 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_LVALUE->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 ncglex */
/* 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 (void)
{
register char *dest = YY_CURRENT_BUFFER_LVALUE->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_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
if ( YY_CURRENT_BUFFER_LVALUE->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_LVALUE->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_LVALUE->yy_n_chars = (yy_n_chars) = 0;
else
{
int num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* 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. */
ncgrealloc((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_LVALUE->yy_buf_size -
number_to_move - 1;
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
(yy_n_chars), (size_t) num_to_read );
YY_CURRENT_BUFFER_LVALUE->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;
ncgrestart(ncgin );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
else
ret_val = EOB_ACT_CONTINUE_SCAN;
if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) ncgrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
}
(yy_n_chars) += number_to_move;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->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 (void)
{
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 );
*/
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
{
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;
}
static void yyunput (int c, register char * yy_bp )
{
register char *yy_cp;
yy_cp = (yy_c_buf_p);
/* undo effects of setting up ncgtext */
*yy_cp = (yy_hold_char);
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->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_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
register char *source =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->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;
}
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (void)
#else
static int input (void)
#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_LVALUE->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. */
ncgrestart(ncgin );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
if ( ncgwrap( ) )
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 ncgtext */
(yy_hold_char) = *++(yy_c_buf_p);
return c;
}
#endif /* ifndef YY_NO_INPUT */
/** Immediately switch to a different input stream.
* @param input_file A readable stream.
*
* @note This function does not reset the start condition to @c INITIAL .
*/
void ncgrestart (FILE * input_file )
{
if ( ! YY_CURRENT_BUFFER ){
ncgensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
ncg_create_buffer(ncgin,YY_BUF_SIZE );
}
ncg_init_buffer(YY_CURRENT_BUFFER,input_file );
ncg_load_buffer_state( );
}
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*/
void ncg_switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
/* TODO. We should be able to replace this entire function body
* with
* ncgpop_buffer_state();
* ncgpush_buffer_state(new_buffer);
*/
ncgensure_buffer_stack ();
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_LVALUE->yy_buf_pos = (yy_c_buf_p);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
ncg_load_buffer_state( );
/* We don't actually know whether we did this switch during
* EOF (ncgwrap()) processing, but the only time this flag
* is looked at is after ncgwrap() is called, so it's safe
* to go ahead and always set it.
*/
(yy_did_buffer_switch_on_eof) = 1;
}
static void ncg_load_buffer_state (void)
{
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
ncgin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
(yy_hold_char) = *(yy_c_buf_p);
}
/** Allocate and initialize an input buffer state.
* @param file A readable stream.
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
*
* @return the allocated buffer state.
*/
YY_BUFFER_STATE ncg_create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) ncgalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in ncg_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 *) ncgalloc(b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in ncg_create_buffer()" );
b->yy_is_our_buffer = 1;
ncg_init_buffer(b,file );
return b;
}
/** Destroy the buffer.
* @param b a buffer created with ncg_create_buffer()
*
*/
void ncg_delete_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
return;
if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
ncgfree((void *) b->yy_ch_buf );
ncgfree((void *) b );
}
#ifndef __cplusplus
extern int isatty (int );
#endif /* __cplusplus */
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a ncgrestart() or at EOF.
*/
static void ncg_init_buffer (YY_BUFFER_STATE b, FILE * file )
{
int oerrno = errno;
ncg_flush_buffer(b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
/* If b is the current buffer, then ncg_init_buffer was _probably_
* called from ncgrestart() or through yy_get_next_buffer.
* In that case, we don't want to reset the lineno or column.
*/
if (b != YY_CURRENT_BUFFER){
b->yy_bs_lineno = 1;
b->yy_bs_column = 0;
}
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
errno = oerrno;
}
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
*
*/
void ncg_flush_buffer (YY_BUFFER_STATE b )
{
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 )
ncg_load_buffer_state( );
}
/** Pushes the new state onto the stack. The new state becomes
* the current state. This function will allocate the stack
* if necessary.
* @param new_buffer The new state.
*
*/
void ncgpush_buffer_state (YY_BUFFER_STATE new_buffer )
{
if (new_buffer == NULL)
return;
ncgensure_buffer_stack();
/* This block is copied from ncg_switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
*(yy_c_buf_p) = (yy_hold_char);
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
/* Only push if top exists. Otherwise, replace top. */
if (YY_CURRENT_BUFFER)
(yy_buffer_stack_top)++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
/* copied from ncg_switch_to_buffer. */
ncg_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
/** Removes and deletes the top of the stack, if present.
* The next element becomes the new top.
*
*/
void ncgpop_buffer_state (void)
{
if (!YY_CURRENT_BUFFER)
return;
ncg_delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
if ((yy_buffer_stack_top) > 0)
--(yy_buffer_stack_top);
if (YY_CURRENT_BUFFER) {
ncg_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
static void ncgensure_buffer_stack (void)
{
int num_to_alloc;
if (!(yy_buffer_stack)) {
/* First allocation is just for 2 elements, since we don't know if this
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
num_to_alloc = 1;
(yy_buffer_stack) = (struct yy_buffer_state**)ncgalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
YY_FATAL_ERROR( "out of dynamic memory in ncgensure_buffer_stack()" );
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
(yy_buffer_stack_max) = num_to_alloc;
(yy_buffer_stack_top) = 0;
return;
}
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
/* Increase the buffer to prepare for a possible push. */
int grow_size = 8 /* arbitrary grow size */;
num_to_alloc = (yy_buffer_stack_max) + grow_size;
(yy_buffer_stack) = (struct yy_buffer_state**)ncgrealloc
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
YY_FATAL_ERROR( "out of dynamic memory in ncgensure_buffer_stack()" );
/* zero only the new slots.*/
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
(yy_buffer_stack_max) = num_to_alloc;
}
}
/** Setup the input buffer state to scan directly from a user-specified character buffer.
* @param base the character buffer
* @param size the size in bytes of the character buffer
*
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE ncg_scan_buffer (char * base, yy_size_t size )
{
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) ncgalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in ncg_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;
ncg_switch_to_buffer(b );
return b;
}
/** Setup the input buffer state to scan a string. The next call to ncglex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
*
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
* ncg_scan_bytes() instead.
*/
YY_BUFFER_STATE ncg_scan_string (yyconst char * yystr )
{
return ncg_scan_bytes(yystr,strlen(yystr) );
}
/** Setup the input buffer state to scan the given bytes. The next call to ncglex() will
* scan from a @e copy of @a bytes.
* @param bytes the byte buffer to scan
* @param len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE ncg_scan_bytes (yyconst char * yybytes, int _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
buf = (char *) ncgalloc(n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in ncg_scan_bytes()" );
for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
b = ncg_scan_buffer(buf,n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in ncg_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;
}
#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif
static void yy_fatal_error (yyconst char* msg )
{
(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 ncgtext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
ncgtext[ncgleng] = (yy_hold_char); \
(yy_c_buf_p) = ncgtext + yyless_macro_arg; \
(yy_hold_char) = *(yy_c_buf_p); \
*(yy_c_buf_p) = '\0'; \
ncgleng = yyless_macro_arg; \
} \
while ( 0 )
/* Accessor methods (get/set functions) to struct members. */
/** Get the current line number.
*
*/
int ncgget_lineno (void)
{
return ncglineno;
}
/** Get the input stream.
*
*/
FILE *ncgget_in (void)
{
return ncgin;
}
/** Get the output stream.
*
*/
FILE *ncgget_out (void)
{
return ncgout;
}
/** Get the length of the current token.
*
*/
int ncgget_leng (void)
{
return ncgleng;
}
/** Get the current token.
*
*/
char *ncgget_text (void)
{
return ncgtext;
}
/** Set the current line number.
* @param line_number
*
*/
void ncgset_lineno (int line_number )
{
ncglineno = line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
* @param in_str A readable stream.
*
* @see ncg_switch_to_buffer
*/
void ncgset_in (FILE * in_str )
{
ncgin = in_str ;
}
void ncgset_out (FILE * out_str )
{
ncgout = out_str ;
}
int ncgget_debug (void)
{
return ncg_flex_debug;
}
void ncgset_debug (int bdebug )
{
ncg_flex_debug = bdebug ;
}
static int yy_init_globals (void)
{
/* Initialization is the same as for the non-reentrant scanner.
* This function is called from ncglex_destroy(), so don't allocate here.
*/
(yy_buffer_stack) = 0;
(yy_buffer_stack_top) = 0;
(yy_buffer_stack_max) = 0;
(yy_c_buf_p) = (char *) 0;
(yy_init) = 0;
(yy_start) = 0;
/* Defined in main.c */
#ifdef YY_STDINIT
ncgin = stdin;
ncgout = stdout;
#else
ncgin = (FILE *) 0;
ncgout = (FILE *) 0;
#endif
/* For future reference: Set errno on error, since we are called by
* ncglex_init()
*/
return 0;
}
/* ncglex_destroy is for both reentrant and non-reentrant scanners. */
int ncglex_destroy (void)
{
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
ncg_delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
ncgpop_buffer_state();
}
/* Destroy the stack itself. */
ncgfree((yy_buffer_stack) );
(yy_buffer_stack) = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
* ncglex() is called, initialization will occur. */
yy_init_globals( );
return 0;
}
/*
* Internal utility routines.
*/
#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
{
register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s )
{
register int n;
for ( n = 0; s[n]; ++n )
;
return n;
}
#endif
void *ncgalloc (yy_size_t size )
{
return (void *) malloc( size );
}
void *ncgrealloc (void * ptr, yy_size_t size )
{
/* 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 );
}
void ncgfree (void * ptr )
{
free( (char *) ptr ); /* see ncgrealloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
#line 543 "ncgen.l"
static int
lexdebug(int token)
{
if(debug >= 2)
{
fprintf(stderr,"Token=%d |%s|\n",token,ncgtext);
}
return token;
}
int
lex_init(void)
{
lineno = 1;
lextext = NULL;
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;
}