1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-27 17:48:38 +02:00
2010-01-24 09:19:39 +00:00

4106 lines
151 KiB
C

#ifdef HAVE_CONFIG_H
#include <raptor_config.h>
#endif
#ifdef WIN32
#include <win32_raptor_config.h>
#endif
#line 10 "n3_lexer.c"
#line 12 "n3_lexer.c"
#define YY_INT_ALIGNED short int
/* A lexical scanner generated by flex */
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 33
#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 __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 */
#if __STDC__
#define YY_USE_CONST
#endif /* __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)
/* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T
#define YY_TYPEDEF_YY_SCANNER_T
typedef void* yyscan_t;
#endif
/* For convenience, these vars (plus the bison vars far below)
are macros in the reentrant scanner. */
#define yyin yyg->yyin_r
#define yyout yyg->yyout_r
#define yyextra yyg->yyextra_r
#define yyleng yyg->yyleng_r
#define yytext yyg->yytext_r
#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
#define yy_flex_debug yyg->yy_flex_debug_r
int n3_lexer_lex_init (yyscan_t* scanner);
/* 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 yyg->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 ((yyg->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 n3_lexer_restart(yyin ,yyscanner )
#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
#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 yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = yyg->yy_hold_char; \
YY_RESTORE_YY_MORE_OFFSET \
yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
/* 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).
*/
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef unsigned int 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 n3_lexer_restart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
/* 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 ( yyg->yy_buffer_stack \
? yyg->yy_buffer_stack[yyg->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 yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
void n3_lexer_restart (FILE *input_file ,yyscan_t yyscanner );
void n3_lexer__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
YY_BUFFER_STATE n3_lexer__create_buffer (FILE *file,int size ,yyscan_t yyscanner );
void n3_lexer__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void n3_lexer__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void n3_lexer_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
void n3_lexer_pop_buffer_state (yyscan_t yyscanner );
static void n3_lexer_ensure_buffer_stack (yyscan_t yyscanner );
static void n3_lexer__load_buffer_state (yyscan_t yyscanner );
static void n3_lexer__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
#define YY_FLUSH_BUFFER n3_lexer__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
YY_BUFFER_STATE n3_lexer__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE n3_lexer__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
YY_BUFFER_STATE n3_lexer__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
void *n3_lexer_alloc (yy_size_t ,yyscan_t yyscanner );
void *n3_lexer_realloc (void *,yy_size_t ,yyscan_t yyscanner );
void n3_lexer_free (void * ,yyscan_t yyscanner );
#define yy_new_buffer n3_lexer__create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
n3_lexer_ensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \
n3_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
n3_lexer_ensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \
n3_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
} \
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;
typedef int yy_state_type;
#define yytext_ptr yytext_r
static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
static int yy_get_next_buffer (yyscan_t yyscanner );
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
yyg->yytext_ptr = yy_bp; \
yyleng = (size_t) (yy_cp - yy_bp); \
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 33
#define YY_END_OF_BUFFER 34
/* 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[615] =
{ 0,
0, 0, 0, 0, 18, 18, 34, 32, 2, 1,
1, 32, 31, 32, 12, 13, 32, 5, 4, 23,
20, 6, 32, 10, 29, 7, 32, 8, 32, 32,
3, 27, 24, 26, 27, 18, 18, 18, 18, 2,
1, 0, 15, 0, 31, 30, 30, 0, 14, 0,
0, 23, 21, 21, 0, 20, 0, 28, 0, 29,
0, 20, 0, 11, 0, 24, 0, 0, 25, 18,
18, 18, 0, 18, 18, 18, 18, 15, 16, 0,
21, 0, 0, 22, 20, 0, 0, 19, 17, 18,
0, 18, 18, 0, 18, 0, 22, 0, 22, 0,
19, 0, 18, 0, 18, 18, 18, 18, 18, 18,
0, 18, 18, 18, 18, 18, 0, 18, 0, 18,
18, 18, 18, 18, 18, 0, 18, 18, 0, 18,
18, 0, 18, 18, 18, 18, 18, 18, 0, 18,
18, 0, 18, 0, 18, 0, 18, 18, 18, 18,
18, 18, 0, 18, 18, 0, 18, 18, 0, 18,
18, 18, 18, 18, 18, 0, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 9, 18, 0, 18,
18, 18, 18, 18, 18, 0, 18, 18, 0, 18,
18, 0, 18, 18, 18, 18, 18, 18, 0, 18,
18, 18, 18, 18, 18, 0, 18, 18, 18, 18,
18, 18, 0, 18, 18, 0, 18, 18, 0, 18,
18, 18, 18, 18, 18, 0, 18, 18, 0, 18,
18, 0, 18, 18, 18, 18, 18, 18, 0, 18,
18, 0, 18, 18, 0, 18, 18, 18, 18, 18,
18, 0, 18, 18, 18, 18, 18, 18, 0, 18,
18, 18, 18, 18, 18, 0, 18, 18, 0, 18,
18, 0, 18, 18, 18, 18, 18, 18, 0, 18,
18, 0, 18, 18, 0, 18, 18, 18, 18, 18,
18, 0, 18, 18, 0, 18, 18, 0, 18, 18,
18, 18, 18, 18, 0, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 0, 18, 18,
18, 18, 18, 18, 0, 18, 18, 0, 18, 18,
0, 18, 18, 18, 18, 18, 18, 0, 18, 18,
18, 18, 18, 18, 0, 18, 18, 18, 18, 18,
18, 0, 18, 18, 0, 18, 18, 0, 18, 18,
18, 18, 18, 18, 0, 18, 18, 0, 18, 18,
0, 18, 18, 18, 18, 18, 18, 0, 18, 18,
0, 18, 18, 0, 18, 18, 18, 18, 18, 18,
0, 18, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 0, 18, 18, 18, 18, 18, 18,
0, 18, 18, 0, 18, 18, 0, 18, 18, 18,
18, 18, 18, 0, 18, 18, 18, 18, 18, 18,
0, 18, 18, 18, 18, 18, 18, 0, 18, 18,
0, 18, 18, 0, 18, 18, 18, 18, 18, 18,
0, 18, 18, 0, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
2, 1, 4, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 1, 5, 6, 1, 1, 1, 7, 8,
9, 1, 10, 11, 12, 13, 1, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 15, 16, 17,
1, 18, 1, 19, 20, 20, 20, 20, 21, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
20, 20, 20, 20, 22, 20, 20, 20, 20, 20,
23, 24, 25, 26, 27, 1, 28, 20, 20, 20,
29, 30, 20, 20, 31, 20, 20, 20, 20, 20,
20, 32, 20, 33, 20, 20, 34, 20, 20, 35,
20, 20, 1, 1, 1, 1, 1, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36
} ;
static yyconst flex_int32_t yy_meta[37] =
{ 0,
1, 1, 2, 3, 4, 1, 1, 1, 1, 1,
1, 5, 5, 5, 6, 1, 1, 1, 1, 7,
7, 7, 1, 7, 1, 1, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7
} ;
static yyconst flex_int16_t yy_base[1023] =
{ 0,
0, 0, 36, 0, 70, 71, 581, 4932, 578, 4932,
551, 72, 75, 73, 4932, 4932, 68, 4932, 534, 70,
0, 4932, 524, 509, 74, 4932, 73, 4932, 508, 514,
77, 4932, 517, 4932, 87, 82, 90, 501, 100, 498,
4932, 99, 492, 0, 104, 4932, 493, 102, 4932, 0,
477, 98, 104, 107, 125, 470, 447, 4932, 428, 0,
102, 0, 116, 4932, 0, 455, 117, 125, 4932, 117,
139, 140, 449, 141, 143, 144, 147, 4932, 4932, 141,
140, 146, 439, 416, 416, 412, 395, 406, 4932, 167,
0, 170, 174, 0, 177, 404, 401, 393, 379, 360,
376, 375, 178, 0, 181, 182, 185, 190, 205, 213,
0, 214, 217, 218, 222, 223, 342, 227, 0, 228,
240, 250, 254, 255, 258, 0, 262, 263, 0, 267,
152, 266, 268, 230, 280, 275, 290, 295, 358, 300,
303, 352, 307, 319, 308, 0, 313, 312, 318, 335,
325, 340, 0, 341, 347, 0, 348, 353, 0, 357,
363, 371, 375, 380, 381, 0, 389, 393, 397, 398,
403, 407, 411, 423, 431, 434, 435, 438, 439, 443,
447, 446, 461, 470, 471, 474, 4932, 475, 0, 479,
483, 484, 487, 499, 507, 0, 511, 512, 0, 515,
519, 0, 522, 523, 527, 535, 547, 550, 0, 555,
558, 559, 562, 563, 567, 0, 570, 573, 585, 590,
595, 596, 0, 603, 602, 0, 608, 612, 330, 626,
630, 635, 640, 641, 644, 322, 648, 652, 278, 653,
664, 0, 668, 675, 676, 681, 680, 686, 0, 690,
693, 0, 703, 704, 0, 708, 715, 716, 726, 730,
731, 0, 740, 741, 744, 748, 753, 754, 0, 764,
768, 776, 780, 784, 788, 0, 791, 792, 0, 796,
800, 274, 804, 816, 824, 828, 829, 832, 246, 836,
839, 237, 842, 854, 0, 862, 866, 869, 870, 874,
877, 0, 878, 882, 0, 886, 892, 0, 900, 904,
908, 914, 918, 922, 0, 928, 932, 936, 942, 946,
950, 954, 958, 962, 966, 972, 976, 980, 984, 988,
994, 998, 1002, 1006, 1010, 1014, 270, 0, 1005, 302,
1018, 1019, 1028, 1032, 0, 1042, 1043, 0, 1046, 1054,
0, 1055, 1058, 1066, 1069, 1070, 1078, 0, 1082, 1081,
1093, 1096, 1104, 1105, 0, 1109, 1108, 1116, 1120, 1121,
1131, 0, 1134, 1143, 0, 1147, 1146, 236, 1154, 1158,
1159, 1169, 1170, 1174, 204, 1182, 1181, 197, 1187, 1194,
0, 1205, 1209, 1210, 1214, 1217, 1220, 0, 1221, 1225,
0, 1232, 1237, 0, 1247, 1248, 1254, 1255, 1259, 1260,
0, 1270, 1271, 1277, 1283, 1282, 315, 1288, 1291, 1294,
1295, 1305, 1306, 1311, 1317, 1318, 1329, 1323, 1333, 1341,
1345, 1349, 1353, 0, 1356, 1357, 1361, 1365, 1369, 1379,
0, 1383, 1389, 0, 1392, 1395, 0, 1399, 1403, 1406,
1407, 1415, 1419, 0, 1429, 1432, 1433, 1437, 1441, 1442,
0, 1445, 1449, 1457, 1465, 1469, 1472, 0, 1473, 1477,
0, 1480, 1481, 194, 1487, 1495, 1503, 1507, 1510, 1513,
193, 1520, 1519, 186, 1523, 1527, 1535, 1543, 1547, 1550,
1557, 1558, 1561, 343, 1565, 1564, 1570, 1573, 1587, 1596,
1600, 1599, 1603, 1607, 1611, 1612, 1623, 1627, 1634, 1635,
1639, 1643, 1647, 1650, 1657, 1661, 1667, 210, 1670, 1675,
1679, 1683, 1684, 1687, 1693, 1697, 1707, 1711, 1717, 1720,
1723, 1727, 1731, 1734, 1735, 1743, 1747, 1751, 1757, 1761,
1765, 1769, 1773, 1779, 1783, 1787, 1791, 1795, 1799, 1803,
1807, 1811, 1815, 1819, 1825, 1829, 1833, 1837, 1841, 1847,
1851, 1855, 1861, 1865, 1869, 1873, 1877, 1883, 1887, 1891,
1897, 1901, 1905, 1909, 1913, 1919, 1923, 1927, 1933, 1937,
1941, 1945, 1949, 1955, 1959, 1963, 1969, 1973, 1977, 1981,
1985, 1991, 1995, 1999, 2003, 2007, 2011, 2015, 2019, 2023,
2027, 2031, 2037, 2041, 2045, 2049, 2053, 2059, 2063, 2067,
2071, 2075, 2079, 4932, 2109, 2116, 2123, 2130, 152, 2137,
2140, 2143, 2146, 2153, 2160, 2163, 109, 2170, 2177, 2180,
2187, 2194, 2201, 2208, 2215, 2222, 2229, 2236, 2243, 2250,
2257, 2264, 2271, 2278, 2285, 2292, 2299, 2306, 2313, 2320,
2327, 2334, 2341, 2348, 2355, 2362, 2369, 2376, 2383, 2390,
2397, 2404, 2411, 2418, 2425, 2432, 2439, 2446, 2453, 2460,
2467, 2474, 2481, 2488, 2495, 2502, 2509, 2516, 2523, 2530,
2537, 2544, 2551, 2558, 2565, 2572, 2579, 2586, 2593, 2600,
2607, 2614, 2621, 2628, 2635, 2642, 2649, 2656, 2663, 2670,
2677, 2684, 2691, 2698, 2705, 2712, 2719, 2726, 2733, 2740,
2747, 2754, 2761, 2768, 2775, 2782, 2789, 2796, 2803, 2810,
2817, 2824, 2831, 2838, 2845, 2852, 2859, 2866, 2873, 2880,
2887, 2894, 2901, 2908, 2915, 2922, 2929, 2936, 2943, 2950,
2957, 2964, 2971, 2978, 2985, 2992, 2999, 3006, 3013, 3020,
3027, 3034, 3041, 3048, 3055, 3062, 3069, 3076, 3083, 3090,
3097, 3104, 3111, 3118, 3125, 3132, 3139, 3146, 3153, 3160,
3167, 3174, 3181, 3188, 3195, 3202, 3209, 3216, 3223, 3230,
3237, 3244, 3251, 3258, 3265, 3272, 3279, 3286, 3293, 3300,
3307, 3314, 3321, 3328, 3335, 3342, 3349, 3356, 3363, 3370,
3377, 3384, 3391, 3398, 3405, 3412, 3419, 3426, 3433, 3440,
3447, 3454, 3461, 3468, 3475, 3482, 3489, 3496, 3503, 3510,
3517, 3524, 3531, 3538, 3545, 3552, 3559, 3566, 3573, 3580,
3587, 3594, 3601, 3608, 3615, 3622, 3629, 3636, 3643, 3650,
3657, 3664, 3671, 3678, 3685, 3692, 3699, 3706, 3713, 3720,
3727, 3734, 3741, 3748, 3755, 3762, 3769, 3776, 3783, 3790,
3797, 3804, 3811, 3818, 3825, 3832, 3839, 3846, 3853, 3860,
3867, 3874, 3881, 3888, 3895, 3902, 3909, 3916, 3923, 3930,
3937, 3944, 3951, 3958, 3965, 3972, 3979, 3986, 3993, 4000,
4007, 4014, 4021, 4028, 4035, 4042, 4049, 4056, 4063, 4070,
4077, 4084, 4091, 4098, 4105, 4112, 4119, 4126, 4133, 4140,
4147, 4154, 4161, 4168, 4175, 4182, 4189, 4196, 4203, 4210,
4217, 4224, 4231, 4238, 4245, 4252, 4259, 4266, 4273, 4280,
4287, 4294, 4301, 4308, 4315, 4322, 4329, 4336, 4343, 4350,
4357, 4364, 4371, 4378, 4385, 4392, 4399, 4406, 4413, 4420,
4427, 4434, 4441, 4448, 4455, 4462, 4469, 4476, 4483, 4490,
4497, 4504, 4511, 4518, 4525, 4532, 4539, 4546, 4553, 4560,
4567, 4574, 4581, 4588, 4595, 4602, 4609, 4616, 4623, 4630,
4637, 4644, 4651, 4658, 4665, 4672, 4679, 4686, 4693, 4700,
4707, 4714, 4721, 4728, 4735, 4742, 4749, 4756, 4763, 4770,
4777, 4784, 4791, 4798, 4805, 4812, 4819, 4826, 4833, 4840,
4847, 4854, 4861, 4868, 4875, 4882, 4889, 4896, 4903, 4910,
4917, 4924
} ;
static yyconst flex_int16_t yy_def[1023] =
{ 0,
614, 1, 614, 3, 615, 615, 614, 614, 614, 614,
614, 616, 617, 618, 614, 614, 614, 614, 614, 614,
619, 614, 620, 614, 621, 614, 622, 614, 614, 614,
621, 614, 614, 614, 623, 624, 624, 614, 625, 614,
614, 616, 614, 616, 617, 614, 614, 618, 614, 618,
614, 614, 614, 614, 614, 626, 620, 614, 614, 31,
622, 619, 622, 614, 627, 614, 623, 623, 614, 624,
624, 625, 614, 624, 628, 625, 629, 614, 614, 614,
614, 614, 614, 614, 626, 626, 614, 630, 614, 631,
632, 633, 634, 635, 636, 614, 614, 614, 614, 614,
630, 630, 637, 638, 639, 637, 640, 639, 641, 642,
643, 644, 642, 645, 644, 646, 614, 647, 648, 649,
647, 650, 649, 651, 652, 653, 654, 655, 656, 657,
625, 624, 658, 625, 659, 658, 660, 633, 631, 661,
636, 634, 662, 614, 663, 664, 665, 663, 666, 665,
667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
674, 677, 676, 678, 679, 680, 681, 679, 682, 681,
683, 684, 625, 685, 631, 633, 634, 636, 686, 687,
688, 689, 690, 691, 692, 693, 614, 694, 695, 696,
694, 697, 696, 698, 699, 700, 701, 702, 703, 704,
705, 706, 707, 705, 708, 707, 709, 710, 711, 712,
710, 713, 712, 714, 715, 716, 717, 715, 718, 717,
719, 720, 721, 722, 723, 724, 725, 696, 694, 726,
696, 727, 726, 728, 701, 699, 729, 704, 702, 730,
731, 732, 733, 731, 734, 733, 735, 736, 737, 738,
739, 740, 741, 742, 743, 744, 742, 745, 744, 746,
747, 748, 749, 747, 750, 749, 751, 752, 753, 754,
752, 755, 754, 756, 757, 758, 759, 760, 761, 762,
733, 731, 763, 733, 764, 763, 765, 738, 736, 766,
741, 739, 767, 768, 769, 770, 768, 771, 770, 772,
773, 774, 775, 776, 777, 778, 779, 780, 781, 779,
782, 781, 783, 784, 785, 786, 784, 787, 786, 788,
731, 789, 733, 790, 736, 738, 739, 741, 791, 792,
793, 794, 795, 796, 797, 798, 799, 800, 801, 799,
802, 801, 803, 804, 805, 806, 807, 808, 809, 810,
811, 812, 810, 813, 812, 814, 815, 816, 817, 815,
818, 817, 819, 820, 821, 822, 820, 823, 822, 824,
825, 826, 827, 828, 829, 830, 801, 799, 831, 801,
832, 831, 833, 806, 804, 834, 809, 807, 835, 836,
837, 838, 836, 839, 838, 840, 841, 842, 843, 844,
845, 846, 847, 848, 849, 847, 850, 849, 851, 852,
853, 854, 852, 855, 854, 856, 799, 857, 801, 858,
804, 806, 807, 809, 859, 860, 861, 862, 863, 864,
865, 866, 867, 868, 869, 867, 870, 869, 871, 872,
873, 874, 875, 876, 877, 878, 879, 880, 878, 881,
880, 882, 883, 884, 885, 883, 886, 885, 887, 888,
889, 890, 888, 891, 890, 892, 893, 894, 895, 896,
897, 898, 869, 867, 899, 869, 900, 899, 901, 874,
872, 902, 877, 875, 903, 904, 905, 906, 907, 908,
909, 910, 911, 912, 913, 914, 915, 916, 917, 918,
919, 920, 921, 922, 923, 924, 925, 926, 927, 928,
929, 930, 931, 932, 933, 934, 935, 936, 937, 912,
938, 939, 916, 940, 918, 941, 942, 943, 944, 945,
946, 947, 948, 949, 950, 951, 952, 953, 954, 955,
956, 957, 958, 959, 960, 961, 962, 963, 964, 965,
966, 967, 968, 969, 970, 971, 972, 951, 973, 974,
975, 954, 976, 956, 977, 978, 979, 980, 981, 982,
983, 984, 985, 986, 987, 988, 989, 990, 991, 992,
993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002,
1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 986,
1012, 1013, 990, 1014, 992, 1015, 1016, 1017, 1018, 1019,
1020, 1021, 1022, 0, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614
} ;
static yyconst flex_int16_t yy_nxt[4969] =
{ 0,
8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 17, 19, 20, 21, 22, 23, 8, 24, 25,
25, 25, 26, 27, 28, 29, 30, 31, 25, 25,
25, 25, 25, 25, 25, 27, 32, 33, 32, 32,
32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
34, 32, 32, 32, 32, 35, 35, 35, 32, 35,
32, 32, 32, 35, 35, 35, 35, 35, 35, 35,
35, 35, 37, 37, 38, 38, 43, 46, 47, 49,
51, 52, 54, 52, 71, 61, 61, 62, 62, 61,
55, 62, 71, 39, 39, 44, 50, 63, 55, 68,
63, 69, 74, 78, 70, 72, 46, 47, 49, 63,
54, 52, 63, 72, 61, 88, 614, 53, 55, 71,
81, 75, 44, 76, 80, 50, 55, 82, 61, 68,
62, 69, 80, 77, 83, 82, 83, 68, 84, 614,
72, 71, 74, 71, 70, 71, 74, 91, 70, 71,
96, 94, 96, 81, 97, 98, 70, 98, 56, 99,
82, 75, 72, 76, 72, 75, 92, 76, 82, 71,
95, 104, 74, 77, 103, 76, 71, 77, 111, 74,
71, 110, 119, 74, 71, 118, 119, 71, 614, 126,
105, 107, 74, 108, 118, 614, 614, 112, 114, 614,
115, 120, 122, 109, 123, 120, 614, 71, 127, 129,
116, 122, 71, 123, 124, 71, 74, 132, 131, 71,
71, 132, 139, 124, 74, 71, 131, 142, 130, 71,
74, 146, 145, 72, 70, 135, 133, 136, 614, 614,
133, 140, 71, 135, 146, 136, 143, 137, 614, 149,
147, 150, 71, 76, 153, 137, 74, 71, 145, 156,
71, 151, 159, 147, 74, 71, 158, 166, 614, 74,
70, 165, 71, 154, 70, 149, 614, 150, 157, 71,
614, 160, 71, 162, 90, 163, 167, 151, 169, 172,
170, 173, 71, 76, 93, 164, 172, 71, 173, 103,
171, 174, 74, 176, 106, 71, 70, 110, 174, 74,
71, 113, 189, 178, 71, 74, 189, 188, 108, 70,
71, 180, 196, 181, 614, 76, 115, 71, 184, 199,
185, 190, 614, 182, 192, 190, 193, 74, 76, 188,
186, 197, 71, 74, 202, 201, 194, 70, 200, 71,
74, 209, 208, 187, 614, 71, 192, 216, 193, 74,
614, 215, 205, 203, 206, 71, 76, 216, 194, 212,
210, 213, 144, 71, 207, 223, 217, 74, 219, 215,
220, 214, 71, 71, 226, 229, 217, 102, 102, 117,
221, 74, 99, 228, 224, 71, 219, 229, 220, 71,
74, 236, 228, 227, 230, 71, 99, 239, 221, 71,
232, 91, 233, 74, 97, 70, 230, 97, 102, 232,
237, 233, 234, 100, 86, 71, 240, 94, 86, 84,
92, 234, 75, 71, 76, 104, 74, 71, 103, 111,
74, 71, 110, 119, 77, 71, 95, 126, 71, 74,
129, 118, 84, 89, 105, 107, 66, 108, 112, 114,
87, 115, 120, 71, 58, 132, 127, 109, 122, 130,
123, 116, 71, 74, 139, 131, 71, 71, 142, 242,
124, 74, 86, 241, 133, 71, 71, 242, 249, 74,
53, 241, 135, 140, 136, 46, 79, 143, 243, 40,
245, 71, 246, 252, 137, 73, 243, 250, 245, 71,
246, 255, 247, 74, 71, 254, 262, 74, 66, 261,
247, 71, 253, 269, 74, 71, 268, 269, 65, 71,
256, 276, 258, 64, 259, 263, 265, 74, 266, 268,
59, 58, 270, 272, 260, 273, 270, 53, 267, 71,
277, 279, 71, 41, 282, 274, 272, 74, 273, 281,
71, 71, 282, 289, 74, 71, 281, 292, 274, 71,
280, 295, 74, 283, 294, 71, 285, 295, 286, 40,
614, 283, 290, 285, 614, 286, 293, 71, 287, 302,
296, 298, 74, 299, 294, 287, 296, 71, 71, 305,
308, 614, 614, 300, 71, 74, 315, 307, 303, 614,
74, 298, 314, 299, 71, 614, 241, 614, 306, 309,
614, 614, 614, 300, 311, 316, 312, 614, 74, 318,
244, 319, 71, 614, 241, 246, 313, 71, 614, 248,
614, 320, 74, 71, 244, 251, 71, 322, 254, 323,
74, 614, 257, 246, 71, 74, 261, 264, 326, 324,
614, 322, 614, 323, 328, 614, 71, 259, 338, 330,
74, 331, 337, 324, 334, 266, 335, 71, 71, 338,
345, 332, 71, 74, 348, 337, 336, 339, 71, 341,
351, 342, 74, 614, 350, 71, 614, 358, 339, 346,
614, 343, 341, 349, 342, 74, 71, 357, 365, 352,
74, 354, 364, 355, 343, 614, 359, 71, 71, 365,
372, 614, 614, 356, 361, 614, 362, 366, 74, 368,
364, 369, 71, 71, 375, 378, 363, 614, 366, 373,
614, 370, 74, 71, 377, 378, 71, 368, 385, 369,
74, 614, 377, 376, 379, 71, 71, 388, 391, 370,
614, 381, 614, 382, 379, 614, 74, 386, 390, 381,
71, 382, 391, 383, 614, 614, 389, 392, 71, 614,
398, 383, 74, 614, 390, 394, 71, 395, 401, 614,
71, 392, 404, 74, 71, 403, 411, 396, 74, 399,
410, 394, 71, 395, 337, 614, 74, 402, 340, 614,
614, 405, 407, 396, 408, 412, 614, 414, 71, 415,
337, 614, 614, 342, 409, 418, 71, 419, 344, 416,
74, 71, 340, 347, 71, 614, 350, 420, 74, 342,
353, 71, 614, 357, 74, 614, 360, 422, 614, 418,
614, 419, 424, 614, 614, 355, 71, 426, 434, 427,
614, 420, 362, 430, 74, 431, 433, 614, 71, 428,
434, 71, 74, 441, 433, 432, 71, 435, 444, 71,
74, 447, 446, 437, 71, 438, 454, 614, 74, 435,
453, 437, 442, 438, 71, 439, 461, 445, 614, 450,
448, 451, 74, 439, 460, 455, 71, 457, 461, 458,
71, 452, 468, 614, 614, 462, 74, 614, 460, 459,
71, 464, 471, 465, 71, 614, 474, 462, 614, 614,
74, 469, 473, 466, 71, 464, 474, 465, 71, 614,
481, 472, 614, 614, 74, 475, 473, 466, 71, 477,
484, 478, 71, 614, 338, 475, 71, 614, 345, 482,
74, 479, 337, 477, 71, 478, 348, 614, 71, 485,
351, 614, 614, 339, 74, 479, 350, 346, 71, 341,
358, 342, 74, 614, 357, 349, 71, 614, 365, 352,
71, 343, 372, 354, 614, 355, 74, 614, 364, 359,
71, 361, 375, 362, 71, 356, 378, 366, 71, 71,
385, 373, 74, 363, 377, 368, 71, 369, 388, 614,
71, 376, 90, 71, 614, 379, 172, 370, 173, 386,
71, 381, 93, 382, 71, 614, 103, 389, 174, 614,
172, 176, 173, 383, 74, 71, 106, 110, 74, 614,
113, 178, 174, 614, 614, 108, 71, 74, 118, 121,
71, 614, 118, 180, 614, 181, 115, 184, 71, 185,
125, 74, 71, 121, 128, 182, 487, 123, 488, 186,
71, 123, 131, 71, 74, 131, 134, 614, 489, 491,
487, 614, 488, 493, 614, 71, 614, 138, 74, 614,
134, 136, 489, 495, 136, 496, 71, 71, 141, 145,
71, 74, 145, 148, 614, 497, 499, 495, 71, 496,
152, 614, 74, 71, 148, 155, 614, 501, 150, 497,
503, 150, 504, 71, 614, 158, 74, 614, 161, 507,
614, 503, 505, 504, 509, 71, 614, 165, 71, 74,
71, 168, 614, 505, 163, 511, 74, 512, 74, 614,
71, 71, 71, 175, 614, 614, 170, 513, 515, 173,
516, 74, 71, 74, 177, 519, 71, 520, 106, 614,
517, 173, 523, 71, 74, 113, 179, 521, 614, 74,
519, 183, 520, 525, 614, 614, 71, 181, 188, 614,
614, 614, 521, 527, 185, 528, 614, 74, 531, 191,
532, 71, 71, 188, 195, 529, 74, 193, 191, 71,
533, 198, 71, 74, 201, 204, 535, 71, 536, 208,
614, 614, 193, 539, 74, 535, 211, 536, 537, 71,
541, 215, 543, 206, 544, 614, 614, 537, 213, 74,
71, 218, 215, 547, 545, 548, 71, 74, 222, 218,
220, 71, 71, 225, 228, 549, 614, 614, 551, 614,
552, 220, 74, 71, 231, 228, 551, 555, 552, 71,
553, 235, 557, 233, 71, 74, 238, 231, 553, 614,
71, 559, 90, 560, 233, 71, 71, 71, 93, 103,
563, 614, 614, 561, 559, 565, 560, 74, 71, 106,
110, 176, 172, 74, 173, 113, 561, 178, 108, 71,
71, 118, 125, 614, 174, 71, 180, 128, 181, 115,
614, 74, 184, 121, 185, 71, 614, 131, 182, 614,
123, 491, 614, 71, 186, 138, 493, 74, 614, 134,
487, 71, 488, 141, 614, 71, 136, 241, 74, 71,
244, 241, 489, 71, 499, 248, 495, 74, 496, 244,
614, 71, 501, 251, 614, 614, 246, 322, 497, 323,
246, 71, 614, 254, 326, 74, 322, 257, 323, 324,
614, 71, 328, 261, 74, 614, 264, 71, 324, 268,
614, 74, 259, 271, 330, 71, 331, 268, 71, 74,
275, 271, 266, 334, 614, 335, 332, 71, 273, 278,
567, 71, 568, 281, 614, 336, 273, 614, 567, 571,
568, 74, 569, 284, 71, 71, 281, 288, 573, 74,
569, 284, 286, 71, 71, 291, 294, 74, 614, 297,
575, 71, 576, 294, 614, 286, 579, 614, 575, 71,
576, 301, 577, 614, 581, 299, 583, 74, 584, 297,
577, 71, 299, 304, 71, 74, 307, 310, 585, 71,
587, 314, 74, 71, 317, 244, 583, 614, 584, 74,
614, 321, 589, 614, 591, 312, 592, 71, 585, 244,
319, 595, 614, 596, 323, 71, 593, 325, 599, 74,
600, 321, 71, 597, 327, 71, 614, 257, 323, 614,
601, 71, 74, 264, 329, 74, 603, 333, 599, 71,
600, 146, 614, 605, 614, 614, 331, 71, 614, 153,
601, 607, 335, 608, 611, 74, 612, 145, 614, 71,
147, 156, 71, 609, 159, 614, 613, 614, 154, 74,
71, 158, 166, 74, 149, 165, 150, 71, 71, 90,
157, 614, 71, 160, 93, 71, 151, 103, 162, 614,
163, 167, 169, 614, 170, 172, 614, 173, 176, 74,
164, 106, 614, 178, 171, 614, 108, 174, 71, 614,
110, 71, 74, 189, 113, 71, 614, 196, 180, 74,
181, 188, 614, 71, 71, 199, 202, 614, 614, 115,
182, 184, 190, 185, 614, 74, 197, 201, 192, 71,
193, 209, 614, 186, 200, 203, 74, 71, 208, 216,
194, 71, 614, 223, 205, 74, 206, 215, 614, 71,
210, 226, 71, 614, 229, 212, 207, 213, 217, 71,
614, 236, 224, 74, 219, 228, 220, 214, 614, 71,
227, 239, 71, 230, 91, 614, 221, 74, 614, 70,
237, 71, 232, 94, 233, 71, 74, 104, 103, 71,
240, 111, 614, 92, 234, 74, 75, 110, 76, 71,
614, 119, 95, 614, 614, 107, 105, 108, 77, 71,
112, 126, 614, 74, 114, 118, 115, 109, 614, 71,
120, 129, 71, 614, 132, 71, 116, 139, 614, 74,
127, 131, 122, 71, 123, 142, 71, 71, 242, 249,
130, 614, 614, 133, 124, 74, 140, 241, 135, 71,
136, 252, 614, 71, 143, 255, 614, 243, 250, 74,
137, 254, 614, 71, 245, 262, 246, 74, 614, 261,
253, 71, 614, 269, 256, 71, 247, 276, 258, 614,
259, 74, 614, 268, 263, 71, 265, 279, 266, 71,
260, 282, 270, 71, 614, 289, 277, 74, 267, 281,
272, 71, 273, 292, 614, 71, 280, 295, 614, 71,
283, 302, 274, 74, 290, 294, 285, 71, 286, 305,
614, 71, 293, 308, 614, 614, 296, 74, 287, 307,
303, 71, 298, 315, 299, 74, 614, 314, 306, 71,
614, 241, 309, 71, 300, 248, 311, 614, 312, 74,
614, 244, 316, 71, 318, 251, 319, 71, 313, 254,
246, 614, 614, 74, 326, 257, 320, 71, 322, 261,
323, 74, 614, 264, 328, 71, 614, 391, 259, 71,
324, 398, 330, 614, 331, 74, 614, 390, 266, 71,
334, 401, 335, 71, 332, 404, 392, 614, 614, 74,
399, 403, 336, 71, 394, 411, 395, 74, 614, 410,
402, 71, 614, 337, 405, 71, 396, 344, 407, 614,
408, 74, 614, 340, 412, 71, 414, 347, 415, 71,
409, 350, 342, 614, 614, 74, 422, 353, 416, 71,
418, 357, 419, 74, 614, 360, 424, 71, 614, 434,
355, 71, 420, 441, 426, 614, 427, 74, 614, 433,
362, 71, 430, 444, 431, 71, 428, 447, 435, 614,
614, 74, 442, 446, 432, 71, 437, 454, 438, 74,
614, 453, 445, 71, 614, 461, 448, 71, 439, 468,
450, 614, 451, 74, 614, 460, 455, 71, 457, 471,
458, 71, 452, 474, 462, 71, 614, 481, 469, 74,
459, 473, 464, 71, 465, 484, 614, 71, 472, 338,
614, 71, 475, 345, 466, 74, 482, 337, 477, 71,
478, 348, 614, 71, 485, 351, 614, 614, 339, 74,
479, 350, 346, 71, 341, 358, 342, 74, 614, 357,
349, 71, 614, 365, 352, 71, 343, 372, 354, 614,
355, 74, 614, 364, 359, 71, 361, 375, 362, 71,
356, 378, 366, 71, 614, 385, 373, 74, 363, 377,
368, 71, 369, 388, 614, 614, 376, 614, 614, 614,
379, 614, 370, 614, 386, 614, 381, 614, 382, 614,
614, 614, 389, 614, 614, 614, 614, 614, 383, 36,
36, 36, 36, 36, 36, 36, 42, 614, 614, 42,
42, 42, 42, 45, 45, 45, 45, 45, 45, 45,
48, 614, 614, 48, 48, 48, 48, 57, 57, 57,
57, 57, 57, 57, 60, 60, 60, 63, 63, 63,
67, 67, 67, 70, 70, 70, 614, 70, 70, 70,
71, 71, 71, 71, 71, 71, 71, 85, 614, 85,
90, 90, 90, 90, 90, 90, 90, 93, 93, 93,
93, 93, 93, 93, 101, 614, 101, 103, 103, 103,
103, 103, 103, 103, 104, 614, 104, 104, 104, 104,
104, 106, 106, 106, 106, 106, 106, 106, 110, 110,
110, 110, 110, 110, 110, 111, 614, 111, 111, 111,
111, 111, 113, 113, 113, 113, 113, 113, 113, 118,
118, 118, 118, 118, 118, 118, 119, 614, 119, 119,
119, 119, 119, 121, 121, 121, 121, 121, 121, 121,
125, 125, 125, 125, 125, 125, 125, 128, 128, 128,
128, 128, 128, 128, 131, 131, 131, 131, 131, 131,
131, 132, 614, 132, 132, 132, 132, 132, 134, 134,
134, 134, 134, 134, 134, 138, 138, 138, 138, 138,
138, 138, 141, 141, 141, 141, 141, 141, 141, 145,
145, 145, 145, 145, 145, 145, 146, 614, 146, 146,
146, 146, 146, 148, 148, 148, 148, 148, 148, 148,
152, 152, 152, 152, 152, 152, 152, 155, 155, 155,
155, 155, 155, 155, 158, 158, 158, 158, 158, 158,
158, 159, 614, 159, 159, 159, 159, 159, 161, 161,
161, 161, 161, 161, 161, 165, 165, 165, 165, 165,
165, 165, 166, 614, 166, 166, 166, 166, 166, 168,
168, 168, 168, 168, 168, 168, 74, 74, 74, 74,
74, 74, 74, 175, 175, 175, 175, 175, 175, 175,
177, 177, 177, 177, 177, 177, 177, 179, 179, 179,
179, 179, 179, 179, 183, 183, 183, 183, 183, 183,
183, 188, 188, 188, 188, 188, 188, 188, 189, 614,
189, 189, 189, 189, 189, 191, 191, 191, 191, 191,
191, 191, 195, 195, 195, 195, 195, 195, 195, 198,
198, 198, 198, 198, 198, 198, 201, 201, 201, 201,
201, 201, 201, 202, 614, 202, 202, 202, 202, 202,
204, 204, 204, 204, 204, 204, 204, 208, 208, 208,
208, 208, 208, 208, 209, 614, 209, 209, 209, 209,
209, 211, 211, 211, 211, 211, 211, 211, 215, 215,
215, 215, 215, 215, 215, 216, 614, 216, 216, 216,
216, 216, 218, 218, 218, 218, 218, 218, 218, 222,
222, 222, 222, 222, 222, 222, 225, 225, 225, 225,
225, 225, 225, 228, 228, 228, 228, 228, 228, 228,
229, 614, 229, 229, 229, 229, 229, 231, 231, 231,
231, 231, 231, 231, 235, 235, 235, 235, 235, 235,
235, 238, 238, 238, 238, 238, 238, 238, 90, 90,
90, 90, 90, 90, 90, 93, 93, 93, 93, 93,
93, 93, 118, 118, 118, 118, 118, 118, 118, 125,
125, 125, 125, 125, 125, 125, 121, 121, 121, 121,
121, 121, 121, 128, 128, 128, 128, 128, 128, 128,
131, 131, 131, 131, 131, 131, 131, 138, 138, 138,
138, 138, 138, 138, 134, 134, 134, 134, 134, 134,
134, 141, 141, 141, 141, 141, 141, 141, 241, 241,
241, 241, 241, 241, 241, 242, 614, 242, 242, 242,
242, 242, 244, 244, 244, 244, 244, 244, 244, 248,
248, 248, 248, 248, 248, 248, 251, 251, 251, 251,
251, 251, 251, 254, 254, 254, 254, 254, 254, 254,
255, 614, 255, 255, 255, 255, 255, 257, 257, 257,
257, 257, 257, 257, 261, 261, 261, 261, 261, 261,
261, 262, 614, 262, 262, 262, 262, 262, 264, 264,
264, 264, 264, 264, 264, 268, 268, 268, 268, 268,
268, 268, 269, 614, 269, 269, 269, 269, 269, 271,
271, 271, 271, 271, 271, 271, 275, 275, 275, 275,
275, 275, 275, 278, 278, 278, 278, 278, 278, 278,
281, 281, 281, 281, 281, 281, 281, 282, 614, 282,
282, 282, 282, 282, 284, 284, 284, 284, 284, 284,
284, 288, 288, 288, 288, 288, 288, 288, 291, 291,
291, 291, 291, 291, 291, 294, 294, 294, 294, 294,
294, 294, 295, 614, 295, 295, 295, 295, 295, 297,
297, 297, 297, 297, 297, 297, 301, 301, 301, 301,
301, 301, 301, 304, 304, 304, 304, 304, 304, 304,
307, 307, 307, 307, 307, 307, 307, 308, 614, 308,
308, 308, 308, 308, 310, 310, 310, 310, 310, 310,
310, 314, 314, 314, 314, 314, 314, 314, 315, 614,
315, 315, 315, 315, 315, 317, 317, 317, 317, 317,
317, 317, 321, 321, 321, 321, 321, 321, 321, 325,
325, 325, 325, 325, 325, 325, 327, 327, 327, 327,
327, 327, 327, 329, 329, 329, 329, 329, 329, 329,
333, 333, 333, 333, 333, 333, 333, 337, 337, 337,
337, 337, 337, 337, 338, 614, 338, 338, 338, 338,
338, 340, 340, 340, 340, 340, 340, 340, 344, 344,
344, 344, 344, 344, 344, 347, 347, 347, 347, 347,
347, 347, 350, 350, 350, 350, 350, 350, 350, 351,
614, 351, 351, 351, 351, 351, 353, 353, 353, 353,
353, 353, 353, 357, 357, 357, 357, 357, 357, 357,
358, 614, 358, 358, 358, 358, 358, 360, 360, 360,
360, 360, 360, 360, 364, 364, 364, 364, 364, 364,
364, 365, 614, 365, 365, 365, 365, 365, 367, 367,
367, 367, 367, 367, 367, 371, 371, 371, 371, 371,
371, 371, 374, 374, 374, 374, 374, 374, 374, 377,
377, 377, 377, 377, 377, 377, 378, 614, 378, 378,
378, 378, 378, 380, 380, 380, 380, 380, 380, 380,
384, 384, 384, 384, 384, 384, 384, 387, 387, 387,
387, 387, 387, 387, 390, 390, 390, 390, 390, 390,
390, 391, 614, 391, 391, 391, 391, 391, 393, 393,
393, 393, 393, 393, 393, 397, 397, 397, 397, 397,
397, 397, 400, 400, 400, 400, 400, 400, 400, 403,
403, 403, 403, 403, 403, 403, 404, 614, 404, 404,
404, 404, 404, 406, 406, 406, 406, 406, 406, 406,
410, 410, 410, 410, 410, 410, 410, 411, 614, 411,
411, 411, 411, 411, 413, 413, 413, 413, 413, 413,
413, 417, 417, 417, 417, 417, 417, 417, 421, 421,
421, 421, 421, 421, 421, 423, 423, 423, 423, 423,
423, 423, 425, 425, 425, 425, 425, 425, 425, 429,
429, 429, 429, 429, 429, 429, 433, 433, 433, 433,
433, 433, 433, 434, 614, 434, 434, 434, 434, 434,
436, 436, 436, 436, 436, 436, 436, 440, 440, 440,
440, 440, 440, 440, 443, 443, 443, 443, 443, 443,
443, 446, 446, 446, 446, 446, 446, 446, 447, 614,
447, 447, 447, 447, 447, 449, 449, 449, 449, 449,
449, 449, 453, 453, 453, 453, 453, 453, 453, 454,
614, 454, 454, 454, 454, 454, 456, 456, 456, 456,
456, 456, 456, 460, 460, 460, 460, 460, 460, 460,
461, 614, 461, 461, 461, 461, 461, 463, 463, 463,
463, 463, 463, 463, 467, 467, 467, 467, 467, 467,
467, 470, 470, 470, 470, 470, 470, 470, 473, 473,
473, 473, 473, 473, 473, 474, 614, 474, 474, 474,
474, 474, 476, 476, 476, 476, 476, 476, 476, 480,
480, 480, 480, 480, 480, 480, 483, 483, 483, 483,
483, 483, 483, 344, 344, 344, 344, 344, 344, 344,
347, 347, 347, 347, 347, 347, 347, 364, 364, 364,
364, 364, 364, 364, 371, 371, 371, 371, 371, 371,
371, 367, 367, 367, 367, 367, 367, 367, 374, 374,
374, 374, 374, 374, 374, 377, 377, 377, 377, 377,
377, 377, 384, 384, 384, 384, 384, 384, 384, 380,
380, 380, 380, 380, 380, 380, 387, 387, 387, 387,
387, 387, 387, 71, 71, 71, 71, 71, 71, 71,
70, 614, 70, 70, 70, 70, 70, 74, 74, 74,
74, 74, 74, 74, 175, 175, 175, 175, 175, 175,
175, 177, 177, 177, 177, 177, 177, 177, 106, 106,
106, 106, 106, 106, 106, 103, 614, 103, 103, 103,
103, 103, 179, 179, 179, 179, 179, 179, 179, 113,
113, 113, 113, 113, 113, 113, 110, 614, 110, 110,
110, 110, 110, 183, 183, 183, 183, 183, 183, 183,
121, 121, 121, 121, 121, 121, 121, 118, 614, 118,
118, 118, 118, 118, 486, 486, 486, 486, 486, 486,
486, 490, 490, 490, 490, 490, 490, 490, 492, 492,
492, 492, 492, 492, 492, 134, 134, 134, 134, 134,
134, 134, 131, 614, 131, 131, 131, 131, 131, 494,
494, 494, 494, 494, 494, 494, 498, 498, 498, 498,
498, 498, 498, 500, 500, 500, 500, 500, 500, 500,
148, 148, 148, 148, 148, 148, 148, 145, 614, 145,
145, 145, 145, 145, 502, 502, 502, 502, 502, 502,
502, 506, 506, 506, 506, 506, 506, 506, 508, 508,
508, 508, 508, 508, 508, 161, 161, 161, 161, 161,
161, 161, 158, 614, 158, 158, 158, 158, 158, 510,
510, 510, 510, 510, 510, 510, 168, 168, 168, 168,
168, 168, 168, 165, 614, 165, 165, 165, 165, 165,
514, 514, 514, 514, 514, 514, 514, 518, 518, 518,
518, 518, 518, 518, 522, 522, 522, 522, 522, 522,
522, 524, 524, 524, 524, 524, 524, 524, 526, 526,
526, 526, 526, 526, 526, 530, 530, 530, 530, 530,
530, 530, 191, 191, 191, 191, 191, 191, 191, 188,
614, 188, 188, 188, 188, 188, 534, 534, 534, 534,
534, 534, 534, 538, 538, 538, 538, 538, 538, 538,
540, 540, 540, 540, 540, 540, 540, 204, 204, 204,
204, 204, 204, 204, 201, 614, 201, 201, 201, 201,
201, 542, 542, 542, 542, 542, 542, 542, 211, 211,
211, 211, 211, 211, 211, 208, 614, 208, 208, 208,
208, 208, 546, 546, 546, 546, 546, 546, 546, 218,
218, 218, 218, 218, 218, 218, 215, 614, 215, 215,
215, 215, 215, 550, 550, 550, 550, 550, 550, 550,
554, 554, 554, 554, 554, 554, 554, 556, 556, 556,
556, 556, 556, 556, 231, 231, 231, 231, 231, 231,
231, 228, 614, 228, 228, 228, 228, 228, 558, 558,
558, 558, 558, 558, 558, 562, 562, 562, 562, 562,
562, 562, 564, 564, 564, 564, 564, 564, 564, 175,
175, 175, 175, 175, 175, 175, 177, 177, 177, 177,
177, 177, 177, 121, 121, 121, 121, 121, 121, 121,
490, 490, 490, 490, 490, 490, 490, 486, 486, 486,
486, 486, 486, 486, 492, 492, 492, 492, 492, 492,
492, 134, 134, 134, 134, 134, 134, 134, 498, 498,
498, 498, 498, 498, 498, 494, 494, 494, 494, 494,
494, 494, 500, 500, 500, 500, 500, 500, 500, 244,
244, 244, 244, 244, 244, 244, 241, 614, 241, 241,
241, 241, 241, 321, 321, 321, 321, 321, 321, 321,
325, 325, 325, 325, 325, 325, 325, 327, 327, 327,
327, 327, 327, 327, 257, 257, 257, 257, 257, 257,
257, 254, 614, 254, 254, 254, 254, 254, 329, 329,
329, 329, 329, 329, 329, 264, 264, 264, 264, 264,
264, 264, 261, 614, 261, 261, 261, 261, 261, 333,
333, 333, 333, 333, 333, 333, 271, 271, 271, 271,
271, 271, 271, 268, 614, 268, 268, 268, 268, 268,
566, 566, 566, 566, 566, 566, 566, 570, 570, 570,
570, 570, 570, 570, 572, 572, 572, 572, 572, 572,
572, 284, 284, 284, 284, 284, 284, 284, 281, 614,
281, 281, 281, 281, 281, 574, 574, 574, 574, 574,
574, 574, 578, 578, 578, 578, 578, 578, 578, 580,
580, 580, 580, 580, 580, 580, 297, 297, 297, 297,
297, 297, 297, 294, 614, 294, 294, 294, 294, 294,
582, 582, 582, 582, 582, 582, 582, 586, 586, 586,
586, 586, 586, 586, 588, 588, 588, 588, 588, 588,
588, 310, 310, 310, 310, 310, 310, 310, 307, 614,
307, 307, 307, 307, 307, 590, 590, 590, 590, 590,
590, 590, 317, 317, 317, 317, 317, 317, 317, 314,
614, 314, 314, 314, 314, 314, 594, 594, 594, 594,
594, 594, 594, 598, 598, 598, 598, 598, 598, 598,
602, 602, 602, 602, 602, 602, 602, 604, 604, 604,
604, 604, 604, 604, 606, 606, 606, 606, 606, 606,
606, 610, 610, 610, 610, 610, 610, 610, 145, 145,
145, 145, 145, 145, 145, 152, 152, 152, 152, 152,
152, 152, 148, 148, 148, 148, 148, 148, 148, 155,
155, 155, 155, 155, 155, 155, 158, 158, 158, 158,
158, 158, 158, 161, 161, 161, 161, 161, 161, 161,
165, 165, 165, 165, 165, 165, 165, 168, 168, 168,
168, 168, 168, 168, 71, 71, 71, 71, 71, 71,
71, 175, 175, 175, 175, 175, 175, 175, 74, 74,
74, 74, 74, 74, 74, 177, 177, 177, 177, 177,
177, 177, 106, 106, 106, 106, 106, 106, 106, 179,
179, 179, 179, 179, 179, 179, 113, 113, 113, 113,
113, 113, 113, 183, 183, 183, 183, 183, 183, 183,
188, 188, 188, 188, 188, 188, 188, 195, 195, 195,
195, 195, 195, 195, 191, 191, 191, 191, 191, 191,
191, 198, 198, 198, 198, 198, 198, 198, 201, 201,
201, 201, 201, 201, 201, 204, 204, 204, 204, 204,
204, 204, 208, 208, 208, 208, 208, 208, 208, 211,
211, 211, 211, 211, 211, 211, 215, 215, 215, 215,
215, 215, 215, 222, 222, 222, 222, 222, 222, 222,
218, 218, 218, 218, 218, 218, 218, 225, 225, 225,
225, 225, 225, 225, 228, 228, 228, 228, 228, 228,
228, 235, 235, 235, 235, 235, 235, 235, 231, 231,
231, 231, 231, 231, 231, 238, 238, 238, 238, 238,
238, 238, 70, 70, 70, 614, 70, 70, 70, 90,
90, 90, 90, 90, 90, 90, 93, 93, 93, 93,
93, 93, 93, 103, 103, 103, 103, 103, 103, 103,
110, 110, 110, 110, 110, 110, 110, 118, 118, 118,
118, 118, 118, 118, 125, 125, 125, 125, 125, 125,
125, 121, 121, 121, 121, 121, 121, 121, 128, 128,
128, 128, 128, 128, 128, 131, 131, 131, 131, 131,
131, 131, 138, 138, 138, 138, 138, 138, 138, 134,
134, 134, 134, 134, 134, 134, 141, 141, 141, 141,
141, 141, 141, 241, 241, 241, 241, 241, 241, 241,
248, 248, 248, 248, 248, 248, 248, 244, 244, 244,
244, 244, 244, 244, 251, 251, 251, 251, 251, 251,
251, 254, 254, 254, 254, 254, 254, 254, 257, 257,
257, 257, 257, 257, 257, 261, 261, 261, 261, 261,
261, 261, 264, 264, 264, 264, 264, 264, 264, 268,
268, 268, 268, 268, 268, 268, 275, 275, 275, 275,
275, 275, 275, 271, 271, 271, 271, 271, 271, 271,
278, 278, 278, 278, 278, 278, 278, 281, 281, 281,
281, 281, 281, 281, 288, 288, 288, 288, 288, 288,
288, 284, 284, 284, 284, 284, 284, 284, 291, 291,
291, 291, 291, 291, 291, 294, 294, 294, 294, 294,
294, 294, 301, 301, 301, 301, 301, 301, 301, 297,
297, 297, 297, 297, 297, 297, 304, 304, 304, 304,
304, 304, 304, 307, 307, 307, 307, 307, 307, 307,
310, 310, 310, 310, 310, 310, 310, 314, 314, 314,
314, 314, 314, 314, 317, 317, 317, 317, 317, 317,
317, 325, 325, 325, 325, 325, 325, 325, 321, 321,
321, 321, 321, 321, 321, 327, 327, 327, 327, 327,
327, 327, 329, 329, 329, 329, 329, 329, 329, 333,
333, 333, 333, 333, 333, 333, 390, 390, 390, 390,
390, 390, 390, 397, 397, 397, 397, 397, 397, 397,
393, 393, 393, 393, 393, 393, 393, 400, 400, 400,
400, 400, 400, 400, 403, 403, 403, 403, 403, 403,
403, 406, 406, 406, 406, 406, 406, 406, 410, 410,
410, 410, 410, 410, 410, 413, 413, 413, 413, 413,
413, 413, 340, 340, 340, 340, 340, 340, 340, 421,
421, 421, 421, 421, 421, 421, 417, 417, 417, 417,
417, 417, 417, 423, 423, 423, 423, 423, 423, 423,
353, 353, 353, 353, 353, 353, 353, 425, 425, 425,
425, 425, 425, 425, 360, 360, 360, 360, 360, 360,
360, 429, 429, 429, 429, 429, 429, 429, 433, 433,
433, 433, 433, 433, 433, 440, 440, 440, 440, 440,
440, 440, 436, 436, 436, 436, 436, 436, 436, 443,
443, 443, 443, 443, 443, 443, 446, 446, 446, 446,
446, 446, 446, 449, 449, 449, 449, 449, 449, 449,
453, 453, 453, 453, 453, 453, 453, 456, 456, 456,
456, 456, 456, 456, 460, 460, 460, 460, 460, 460,
460, 467, 467, 467, 467, 467, 467, 467, 463, 463,
463, 463, 463, 463, 463, 470, 470, 470, 470, 470,
470, 470, 473, 473, 473, 473, 473, 473, 473, 480,
480, 480, 480, 480, 480, 480, 476, 476, 476, 476,
476, 476, 476, 483, 483, 483, 483, 483, 483, 483,
337, 337, 337, 337, 337, 337, 337, 344, 344, 344,
344, 344, 344, 344, 347, 347, 347, 347, 347, 347,
347, 350, 350, 350, 350, 350, 350, 350, 357, 357,
357, 357, 357, 357, 357, 364, 364, 364, 364, 364,
364, 364, 371, 371, 371, 371, 371, 371, 371, 367,
367, 367, 367, 367, 367, 367, 374, 374, 374, 374,
374, 374, 374, 377, 377, 377, 377, 377, 377, 377,
384, 384, 384, 384, 384, 384, 384, 380, 380, 380,
380, 380, 380, 380, 387, 387, 387, 387, 387, 387,
387, 7, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614
} ;
static yyconst flex_int16_t yy_chk[4969] =
{ 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, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 5, 6, 5, 6, 12, 13, 13, 14,
17, 17, 20, 20, 36, 27, 25, 27, 25, 31,
20, 31, 37, 5, 6, 12, 14, 25, 20, 35,
31, 35, 39, 42, 39, 36, 45, 45, 48, 25,
52, 52, 31, 37, 61, 627, 61, 53, 52, 70,
54, 39, 42, 39, 53, 48, 52, 54, 63, 67,
63, 67, 53, 39, 55, 54, 55, 68, 55, 68,
70, 71, 72, 74, 72, 75, 76, 75, 76, 77,
80, 77, 80, 81, 80, 82, 131, 82, 619, 82,
81, 72, 71, 72, 74, 76, 75, 76, 81, 90,
77, 90, 92, 72, 92, 131, 93, 76, 93, 95,
103, 95, 103, 105, 106, 105, 106, 107, 484, 107,
90, 92, 108, 92, 108, 481, 474, 93, 95, 388,
95, 103, 105, 92, 105, 106, 385, 109, 107, 109,
95, 108, 518, 108, 105, 110, 112, 110, 112, 113,
114, 113, 114, 108, 115, 116, 115, 116, 109, 118,
120, 118, 120, 518, 134, 112, 110, 112, 378, 292,
113, 114, 121, 115, 121, 115, 116, 112, 289, 120,
118, 120, 122, 134, 122, 115, 123, 124, 123, 124,
125, 120, 125, 121, 127, 128, 127, 128, 132, 130,
132, 130, 133, 122, 337, 123, 282, 123, 124, 136,
239, 125, 135, 127, 135, 127, 128, 123, 130, 133,
130, 133, 137, 337, 137, 127, 136, 138, 136, 138,
130, 133, 140, 135, 140, 141, 340, 141, 136, 143,
145, 143, 145, 137, 148, 147, 148, 147, 138, 417,
149, 140, 149, 140, 236, 340, 141, 151, 143, 151,
143, 145, 229, 140, 147, 148, 147, 150, 417, 150,
143, 149, 152, 154, 152, 154, 147, 494, 151, 155,
157, 155, 157, 144, 142, 158, 150, 158, 150, 160,
139, 160, 154, 152, 154, 161, 494, 161, 150, 157,
155, 157, 117, 162, 154, 162, 158, 163, 160, 163,
160, 157, 164, 165, 164, 165, 161, 102, 101, 100,
160, 167, 99, 167, 162, 168, 163, 168, 163, 169,
170, 169, 170, 164, 165, 171, 98, 171, 163, 172,
167, 172, 167, 173, 97, 173, 168, 96, 88, 170,
169, 170, 167, 87, 86, 174, 171, 174, 85, 84,
172, 170, 173, 175, 173, 175, 176, 177, 176, 177,
178, 179, 178, 179, 173, 180, 174, 180, 182, 181,
182, 181, 83, 73, 175, 176, 66, 176, 177, 178,
59, 178, 179, 183, 57, 183, 180, 176, 181, 182,
181, 178, 184, 185, 184, 185, 186, 188, 186, 188,
181, 190, 56, 190, 183, 191, 192, 191, 192, 193,
51, 193, 185, 184, 185, 47, 43, 186, 188, 40,
190, 194, 190, 194, 185, 38, 191, 192, 193, 195,
193, 195, 190, 197, 198, 197, 198, 200, 33, 200,
193, 201, 194, 201, 203, 204, 203, 204, 30, 205,
195, 205, 197, 29, 197, 198, 200, 206, 200, 206,
24, 23, 201, 203, 197, 203, 204, 19, 200, 207,
205, 207, 208, 11, 208, 203, 206, 210, 206, 210,
211, 212, 211, 212, 213, 214, 213, 214, 206, 215,
207, 215, 217, 208, 217, 218, 210, 218, 210, 9,
7, 211, 212, 213, 0, 213, 214, 219, 210, 219,
215, 217, 220, 217, 220, 213, 218, 221, 222, 221,
222, 0, 0, 217, 225, 224, 225, 224, 219, 0,
227, 220, 227, 220, 228, 0, 228, 0, 221, 222,
0, 0, 0, 220, 224, 225, 224, 0, 230, 227,
230, 227, 231, 0, 231, 228, 224, 232, 0, 232,
0, 227, 233, 234, 233, 234, 235, 230, 235, 230,
237, 0, 237, 231, 238, 240, 238, 240, 232, 230,
0, 233, 0, 233, 234, 0, 241, 235, 241, 237,
243, 237, 243, 233, 240, 238, 240, 244, 245, 244,
245, 237, 247, 246, 247, 246, 240, 241, 248, 243,
248, 243, 250, 0, 250, 251, 0, 251, 244, 245,
0, 243, 246, 247, 246, 253, 254, 253, 254, 248,
256, 250, 256, 250, 246, 0, 251, 257, 258, 257,
258, 0, 0, 250, 253, 0, 253, 254, 259, 256,
259, 256, 260, 261, 260, 261, 253, 0, 257, 258,
0, 256, 263, 264, 263, 264, 265, 259, 265, 259,
266, 0, 266, 260, 261, 267, 268, 267, 268, 259,
0, 263, 0, 263, 264, 0, 270, 265, 270, 266,
271, 266, 271, 263, 0, 0, 267, 268, 272, 0,
272, 266, 273, 0, 273, 270, 274, 270, 274, 0,
275, 271, 275, 277, 278, 277, 278, 270, 280, 272,
280, 273, 281, 273, 281, 0, 283, 274, 283, 0,
0, 275, 277, 273, 277, 278, 0, 280, 284, 280,
284, 0, 0, 281, 277, 283, 285, 283, 285, 280,
286, 287, 286, 287, 288, 0, 288, 283, 290, 284,
290, 291, 0, 291, 293, 0, 293, 285, 0, 286,
0, 286, 287, 0, 0, 288, 294, 290, 294, 290,
0, 286, 291, 293, 296, 293, 296, 0, 297, 290,
297, 298, 299, 298, 299, 293, 300, 294, 300, 301,
303, 301, 303, 296, 304, 296, 304, 0, 306, 297,
306, 299, 298, 299, 307, 296, 307, 300, 0, 303,
301, 303, 309, 299, 309, 304, 310, 306, 310, 306,
311, 303, 311, 0, 0, 307, 312, 0, 312, 306,
313, 309, 313, 309, 314, 0, 314, 310, 0, 0,
316, 311, 316, 309, 317, 312, 317, 312, 318, 0,
318, 313, 0, 0, 319, 314, 319, 312, 320, 316,
320, 316, 321, 0, 321, 317, 322, 0, 322, 318,
323, 316, 323, 319, 324, 319, 324, 0, 325, 320,
325, 0, 0, 321, 326, 319, 326, 322, 327, 323,
327, 323, 328, 0, 328, 324, 329, 0, 329, 325,
330, 323, 330, 326, 0, 326, 331, 0, 331, 327,
332, 328, 332, 328, 333, 326, 333, 329, 334, 339,
334, 330, 335, 328, 335, 331, 336, 331, 336, 0,
341, 332, 341, 342, 0, 333, 339, 331, 339, 334,
343, 335, 343, 335, 344, 0, 344, 336, 339, 0,
342, 341, 342, 335, 346, 347, 346, 347, 349, 0,
349, 343, 342, 0, 0, 344, 350, 352, 350, 352,
353, 0, 353, 346, 0, 346, 347, 349, 354, 349,
354, 355, 356, 355, 356, 346, 352, 350, 352, 349,
357, 353, 357, 360, 359, 360, 359, 0, 352, 354,
355, 0, 355, 356, 0, 361, 0, 361, 362, 0,
362, 357, 355, 359, 360, 359, 363, 364, 363, 364,
367, 366, 367, 366, 0, 359, 361, 362, 368, 362,
368, 0, 369, 370, 369, 370, 0, 363, 364, 362,
366, 367, 366, 371, 0, 371, 373, 0, 373, 368,
0, 369, 366, 369, 370, 374, 0, 374, 377, 376,
377, 376, 0, 369, 371, 373, 379, 373, 379, 0,
380, 381, 380, 381, 0, 0, 374, 373, 376, 377,
376, 382, 383, 382, 383, 379, 384, 379, 384, 0,
376, 380, 381, 387, 386, 387, 386, 379, 0, 389,
382, 389, 382, 383, 0, 0, 390, 384, 390, 0,
0, 0, 382, 386, 387, 386, 0, 392, 389, 392,
389, 393, 394, 393, 394, 386, 395, 390, 395, 396,
389, 396, 397, 399, 397, 399, 392, 400, 392, 400,
0, 0, 393, 394, 402, 395, 402, 395, 392, 403,
396, 403, 399, 397, 399, 0, 0, 395, 400, 405,
406, 405, 406, 402, 399, 402, 407, 408, 407, 408,
403, 409, 410, 409, 410, 402, 0, 0, 405, 0,
405, 406, 412, 413, 412, 413, 408, 407, 408, 414,
405, 414, 409, 410, 416, 415, 416, 415, 408, 0,
418, 412, 418, 412, 413, 419, 420, 421, 420, 421,
414, 0, 0, 412, 415, 416, 415, 422, 423, 422,
423, 418, 419, 424, 419, 424, 415, 420, 421, 425,
426, 425, 426, 0, 419, 428, 422, 428, 422, 423,
0, 427, 424, 427, 424, 429, 0, 429, 422, 0,
425, 426, 0, 430, 424, 430, 428, 431, 0, 431,
427, 432, 427, 432, 0, 433, 429, 433, 435, 436,
435, 436, 427, 437, 430, 437, 431, 438, 431, 438,
0, 439, 432, 439, 0, 0, 433, 435, 431, 435,
436, 440, 0, 440, 437, 442, 438, 442, 438, 435,
0, 443, 439, 443, 445, 0, 445, 446, 438, 446,
0, 448, 440, 448, 442, 449, 442, 449, 450, 451,
450, 451, 443, 445, 0, 445, 442, 452, 446, 452,
448, 453, 448, 453, 0, 445, 449, 0, 451, 450,
451, 455, 448, 455, 456, 457, 456, 457, 452, 458,
451, 458, 453, 459, 460, 459, 460, 462, 0, 462,
455, 463, 455, 463, 0, 456, 457, 0, 458, 464,
458, 464, 455, 0, 459, 460, 462, 465, 462, 465,
458, 466, 463, 466, 467, 469, 467, 469, 462, 470,
464, 470, 472, 473, 472, 473, 465, 0, 465, 475,
0, 475, 466, 0, 469, 467, 469, 476, 465, 476,
470, 472, 0, 472, 473, 477, 469, 477, 475, 478,
475, 478, 479, 472, 479, 480, 0, 480, 476, 0,
475, 483, 482, 483, 482, 485, 477, 485, 478, 486,
478, 486, 0, 479, 0, 0, 480, 487, 0, 487,
478, 482, 483, 482, 485, 488, 485, 488, 0, 489,
486, 489, 490, 482, 490, 0, 485, 0, 487, 491,
492, 491, 492, 493, 488, 493, 488, 495, 496, 495,
489, 0, 497, 490, 497, 498, 488, 498, 491, 0,
491, 492, 493, 0, 493, 496, 0, 496, 495, 499,
491, 499, 0, 497, 493, 0, 498, 496, 500, 0,
500, 502, 501, 502, 501, 503, 0, 503, 499, 504,
499, 504, 0, 505, 506, 505, 506, 0, 0, 500,
499, 501, 502, 501, 0, 507, 503, 507, 504, 508,
504, 508, 0, 501, 505, 506, 509, 510, 509, 510,
504, 511, 0, 511, 507, 512, 507, 512, 0, 513,
508, 513, 514, 0, 514, 509, 507, 509, 510, 515,
0, 515, 511, 516, 512, 516, 512, 509, 0, 517,
513, 517, 519, 514, 519, 0, 512, 520, 0, 520,
515, 521, 516, 521, 516, 522, 523, 522, 523, 524,
517, 524, 0, 519, 516, 525, 520, 525, 520, 526,
0, 526, 521, 0, 0, 523, 522, 523, 520, 527,
524, 527, 0, 528, 525, 528, 525, 523, 0, 529,
526, 529, 530, 0, 530, 531, 525, 531, 0, 532,
527, 532, 528, 533, 528, 533, 534, 535, 534, 535,
529, 0, 0, 530, 528, 536, 531, 536, 532, 537,
532, 537, 0, 538, 533, 538, 0, 534, 535, 539,
532, 539, 0, 540, 536, 540, 536, 541, 0, 541,
537, 542, 0, 542, 538, 543, 536, 543, 539, 0,
539, 544, 0, 544, 540, 545, 541, 545, 541, 546,
539, 546, 542, 547, 0, 547, 543, 548, 541, 548,
544, 549, 544, 549, 0, 550, 545, 550, 0, 551,
546, 551, 544, 552, 547, 552, 548, 553, 548, 553,
0, 554, 549, 554, 0, 0, 550, 555, 548, 555,
551, 556, 552, 556, 552, 557, 0, 557, 553, 558,
0, 558, 554, 559, 552, 559, 555, 0, 555, 560,
0, 560, 556, 561, 557, 561, 557, 562, 555, 562,
558, 0, 0, 563, 559, 563, 557, 564, 560, 564,
560, 565, 0, 565, 561, 566, 0, 566, 562, 567,
560, 567, 563, 0, 563, 568, 0, 568, 564, 569,
565, 569, 565, 570, 563, 570, 566, 0, 0, 571,
567, 571, 565, 572, 568, 572, 568, 573, 0, 573,
569, 574, 0, 574, 570, 575, 568, 575, 571, 0,
571, 576, 0, 576, 572, 577, 573, 577, 573, 578,
571, 578, 574, 0, 0, 579, 575, 579, 573, 580,
576, 580, 576, 581, 0, 581, 577, 582, 0, 582,
578, 583, 576, 583, 579, 0, 579, 584, 0, 584,
580, 585, 581, 585, 581, 586, 579, 586, 582, 0,
0, 587, 583, 587, 581, 588, 584, 588, 584, 589,
0, 589, 585, 590, 0, 590, 586, 591, 584, 591,
587, 0, 587, 592, 0, 592, 588, 593, 589, 593,
589, 594, 587, 594, 590, 595, 0, 595, 591, 596,
589, 596, 592, 597, 592, 597, 0, 598, 593, 598,
0, 599, 594, 599, 592, 600, 595, 600, 596, 601,
596, 601, 0, 602, 597, 602, 0, 0, 598, 603,
596, 603, 599, 604, 600, 604, 600, 605, 0, 605,
601, 606, 0, 606, 602, 607, 600, 607, 603, 0,
603, 608, 0, 608, 604, 609, 605, 609, 605, 610,
603, 610, 606, 611, 0, 611, 607, 612, 605, 612,
608, 613, 608, 613, 0, 0, 609, 0, 0, 0,
610, 0, 608, 0, 611, 0, 612, 0, 612, 0,
0, 0, 613, 0, 0, 0, 0, 0, 612, 615,
615, 615, 615, 615, 615, 615, 616, 0, 0, 616,
616, 616, 616, 617, 617, 617, 617, 617, 617, 617,
618, 0, 0, 618, 618, 618, 618, 620, 620, 620,
620, 620, 620, 620, 621, 621, 621, 622, 622, 622,
623, 623, 623, 624, 624, 624, 0, 624, 624, 624,
625, 625, 625, 625, 625, 625, 625, 626, 0, 626,
628, 628, 628, 628, 628, 628, 628, 629, 629, 629,
629, 629, 629, 629, 630, 0, 630, 631, 631, 631,
631, 631, 631, 631, 632, 0, 632, 632, 632, 632,
632, 633, 633, 633, 633, 633, 633, 633, 634, 634,
634, 634, 634, 634, 634, 635, 0, 635, 635, 635,
635, 635, 636, 636, 636, 636, 636, 636, 636, 637,
637, 637, 637, 637, 637, 637, 638, 0, 638, 638,
638, 638, 638, 639, 639, 639, 639, 639, 639, 639,
640, 640, 640, 640, 640, 640, 640, 641, 641, 641,
641, 641, 641, 641, 642, 642, 642, 642, 642, 642,
642, 643, 0, 643, 643, 643, 643, 643, 644, 644,
644, 644, 644, 644, 644, 645, 645, 645, 645, 645,
645, 645, 646, 646, 646, 646, 646, 646, 646, 647,
647, 647, 647, 647, 647, 647, 648, 0, 648, 648,
648, 648, 648, 649, 649, 649, 649, 649, 649, 649,
650, 650, 650, 650, 650, 650, 650, 651, 651, 651,
651, 651, 651, 651, 652, 652, 652, 652, 652, 652,
652, 653, 0, 653, 653, 653, 653, 653, 654, 654,
654, 654, 654, 654, 654, 655, 655, 655, 655, 655,
655, 655, 656, 0, 656, 656, 656, 656, 656, 657,
657, 657, 657, 657, 657, 657, 658, 658, 658, 658,
658, 658, 658, 659, 659, 659, 659, 659, 659, 659,
660, 660, 660, 660, 660, 660, 660, 661, 661, 661,
661, 661, 661, 661, 662, 662, 662, 662, 662, 662,
662, 663, 663, 663, 663, 663, 663, 663, 664, 0,
664, 664, 664, 664, 664, 665, 665, 665, 665, 665,
665, 665, 666, 666, 666, 666, 666, 666, 666, 667,
667, 667, 667, 667, 667, 667, 668, 668, 668, 668,
668, 668, 668, 669, 0, 669, 669, 669, 669, 669,
670, 670, 670, 670, 670, 670, 670, 671, 671, 671,
671, 671, 671, 671, 672, 0, 672, 672, 672, 672,
672, 673, 673, 673, 673, 673, 673, 673, 674, 674,
674, 674, 674, 674, 674, 675, 0, 675, 675, 675,
675, 675, 676, 676, 676, 676, 676, 676, 676, 677,
677, 677, 677, 677, 677, 677, 678, 678, 678, 678,
678, 678, 678, 679, 679, 679, 679, 679, 679, 679,
680, 0, 680, 680, 680, 680, 680, 681, 681, 681,
681, 681, 681, 681, 682, 682, 682, 682, 682, 682,
682, 683, 683, 683, 683, 683, 683, 683, 684, 684,
684, 684, 684, 684, 684, 685, 685, 685, 685, 685,
685, 685, 686, 686, 686, 686, 686, 686, 686, 687,
687, 687, 687, 687, 687, 687, 688, 688, 688, 688,
688, 688, 688, 689, 689, 689, 689, 689, 689, 689,
690, 690, 690, 690, 690, 690, 690, 691, 691, 691,
691, 691, 691, 691, 692, 692, 692, 692, 692, 692,
692, 693, 693, 693, 693, 693, 693, 693, 694, 694,
694, 694, 694, 694, 694, 695, 0, 695, 695, 695,
695, 695, 696, 696, 696, 696, 696, 696, 696, 697,
697, 697, 697, 697, 697, 697, 698, 698, 698, 698,
698, 698, 698, 699, 699, 699, 699, 699, 699, 699,
700, 0, 700, 700, 700, 700, 700, 701, 701, 701,
701, 701, 701, 701, 702, 702, 702, 702, 702, 702,
702, 703, 0, 703, 703, 703, 703, 703, 704, 704,
704, 704, 704, 704, 704, 705, 705, 705, 705, 705,
705, 705, 706, 0, 706, 706, 706, 706, 706, 707,
707, 707, 707, 707, 707, 707, 708, 708, 708, 708,
708, 708, 708, 709, 709, 709, 709, 709, 709, 709,
710, 710, 710, 710, 710, 710, 710, 711, 0, 711,
711, 711, 711, 711, 712, 712, 712, 712, 712, 712,
712, 713, 713, 713, 713, 713, 713, 713, 714, 714,
714, 714, 714, 714, 714, 715, 715, 715, 715, 715,
715, 715, 716, 0, 716, 716, 716, 716, 716, 717,
717, 717, 717, 717, 717, 717, 718, 718, 718, 718,
718, 718, 718, 719, 719, 719, 719, 719, 719, 719,
720, 720, 720, 720, 720, 720, 720, 721, 0, 721,
721, 721, 721, 721, 722, 722, 722, 722, 722, 722,
722, 723, 723, 723, 723, 723, 723, 723, 724, 0,
724, 724, 724, 724, 724, 725, 725, 725, 725, 725,
725, 725, 726, 726, 726, 726, 726, 726, 726, 727,
727, 727, 727, 727, 727, 727, 728, 728, 728, 728,
728, 728, 728, 729, 729, 729, 729, 729, 729, 729,
730, 730, 730, 730, 730, 730, 730, 731, 731, 731,
731, 731, 731, 731, 732, 0, 732, 732, 732, 732,
732, 733, 733, 733, 733, 733, 733, 733, 734, 734,
734, 734, 734, 734, 734, 735, 735, 735, 735, 735,
735, 735, 736, 736, 736, 736, 736, 736, 736, 737,
0, 737, 737, 737, 737, 737, 738, 738, 738, 738,
738, 738, 738, 739, 739, 739, 739, 739, 739, 739,
740, 0, 740, 740, 740, 740, 740, 741, 741, 741,
741, 741, 741, 741, 742, 742, 742, 742, 742, 742,
742, 743, 0, 743, 743, 743, 743, 743, 744, 744,
744, 744, 744, 744, 744, 745, 745, 745, 745, 745,
745, 745, 746, 746, 746, 746, 746, 746, 746, 747,
747, 747, 747, 747, 747, 747, 748, 0, 748, 748,
748, 748, 748, 749, 749, 749, 749, 749, 749, 749,
750, 750, 750, 750, 750, 750, 750, 751, 751, 751,
751, 751, 751, 751, 752, 752, 752, 752, 752, 752,
752, 753, 0, 753, 753, 753, 753, 753, 754, 754,
754, 754, 754, 754, 754, 755, 755, 755, 755, 755,
755, 755, 756, 756, 756, 756, 756, 756, 756, 757,
757, 757, 757, 757, 757, 757, 758, 0, 758, 758,
758, 758, 758, 759, 759, 759, 759, 759, 759, 759,
760, 760, 760, 760, 760, 760, 760, 761, 0, 761,
761, 761, 761, 761, 762, 762, 762, 762, 762, 762,
762, 763, 763, 763, 763, 763, 763, 763, 764, 764,
764, 764, 764, 764, 764, 765, 765, 765, 765, 765,
765, 765, 766, 766, 766, 766, 766, 766, 766, 767,
767, 767, 767, 767, 767, 767, 768, 768, 768, 768,
768, 768, 768, 769, 0, 769, 769, 769, 769, 769,
770, 770, 770, 770, 770, 770, 770, 771, 771, 771,
771, 771, 771, 771, 772, 772, 772, 772, 772, 772,
772, 773, 773, 773, 773, 773, 773, 773, 774, 0,
774, 774, 774, 774, 774, 775, 775, 775, 775, 775,
775, 775, 776, 776, 776, 776, 776, 776, 776, 777,
0, 777, 777, 777, 777, 777, 778, 778, 778, 778,
778, 778, 778, 779, 779, 779, 779, 779, 779, 779,
780, 0, 780, 780, 780, 780, 780, 781, 781, 781,
781, 781, 781, 781, 782, 782, 782, 782, 782, 782,
782, 783, 783, 783, 783, 783, 783, 783, 784, 784,
784, 784, 784, 784, 784, 785, 0, 785, 785, 785,
785, 785, 786, 786, 786, 786, 786, 786, 786, 787,
787, 787, 787, 787, 787, 787, 788, 788, 788, 788,
788, 788, 788, 789, 789, 789, 789, 789, 789, 789,
790, 790, 790, 790, 790, 790, 790, 791, 791, 791,
791, 791, 791, 791, 792, 792, 792, 792, 792, 792,
792, 793, 793, 793, 793, 793, 793, 793, 794, 794,
794, 794, 794, 794, 794, 795, 795, 795, 795, 795,
795, 795, 796, 796, 796, 796, 796, 796, 796, 797,
797, 797, 797, 797, 797, 797, 798, 798, 798, 798,
798, 798, 798, 799, 799, 799, 799, 799, 799, 799,
800, 0, 800, 800, 800, 800, 800, 801, 801, 801,
801, 801, 801, 801, 802, 802, 802, 802, 802, 802,
802, 803, 803, 803, 803, 803, 803, 803, 804, 804,
804, 804, 804, 804, 804, 805, 0, 805, 805, 805,
805, 805, 806, 806, 806, 806, 806, 806, 806, 807,
807, 807, 807, 807, 807, 807, 808, 0, 808, 808,
808, 808, 808, 809, 809, 809, 809, 809, 809, 809,
810, 810, 810, 810, 810, 810, 810, 811, 0, 811,
811, 811, 811, 811, 812, 812, 812, 812, 812, 812,
812, 813, 813, 813, 813, 813, 813, 813, 814, 814,
814, 814, 814, 814, 814, 815, 815, 815, 815, 815,
815, 815, 816, 0, 816, 816, 816, 816, 816, 817,
817, 817, 817, 817, 817, 817, 818, 818, 818, 818,
818, 818, 818, 819, 819, 819, 819, 819, 819, 819,
820, 820, 820, 820, 820, 820, 820, 821, 0, 821,
821, 821, 821, 821, 822, 822, 822, 822, 822, 822,
822, 823, 823, 823, 823, 823, 823, 823, 824, 824,
824, 824, 824, 824, 824, 825, 825, 825, 825, 825,
825, 825, 826, 0, 826, 826, 826, 826, 826, 827,
827, 827, 827, 827, 827, 827, 828, 828, 828, 828,
828, 828, 828, 829, 0, 829, 829, 829, 829, 829,
830, 830, 830, 830, 830, 830, 830, 831, 831, 831,
831, 831, 831, 831, 832, 832, 832, 832, 832, 832,
832, 833, 833, 833, 833, 833, 833, 833, 834, 834,
834, 834, 834, 834, 834, 835, 835, 835, 835, 835,
835, 835, 836, 836, 836, 836, 836, 836, 836, 837,
0, 837, 837, 837, 837, 837, 838, 838, 838, 838,
838, 838, 838, 839, 839, 839, 839, 839, 839, 839,
840, 840, 840, 840, 840, 840, 840, 841, 841, 841,
841, 841, 841, 841, 842, 0, 842, 842, 842, 842,
842, 843, 843, 843, 843, 843, 843, 843, 844, 844,
844, 844, 844, 844, 844, 845, 0, 845, 845, 845,
845, 845, 846, 846, 846, 846, 846, 846, 846, 847,
847, 847, 847, 847, 847, 847, 848, 0, 848, 848,
848, 848, 848, 849, 849, 849, 849, 849, 849, 849,
850, 850, 850, 850, 850, 850, 850, 851, 851, 851,
851, 851, 851, 851, 852, 852, 852, 852, 852, 852,
852, 853, 0, 853, 853, 853, 853, 853, 854, 854,
854, 854, 854, 854, 854, 855, 855, 855, 855, 855,
855, 855, 856, 856, 856, 856, 856, 856, 856, 857,
857, 857, 857, 857, 857, 857, 858, 858, 858, 858,
858, 858, 858, 859, 859, 859, 859, 859, 859, 859,
860, 860, 860, 860, 860, 860, 860, 861, 861, 861,
861, 861, 861, 861, 862, 862, 862, 862, 862, 862,
862, 863, 863, 863, 863, 863, 863, 863, 864, 864,
864, 864, 864, 864, 864, 865, 865, 865, 865, 865,
865, 865, 866, 866, 866, 866, 866, 866, 866, 867,
867, 867, 867, 867, 867, 867, 868, 0, 868, 868,
868, 868, 868, 869, 869, 869, 869, 869, 869, 869,
870, 870, 870, 870, 870, 870, 870, 871, 871, 871,
871, 871, 871, 871, 872, 872, 872, 872, 872, 872,
872, 873, 0, 873, 873, 873, 873, 873, 874, 874,
874, 874, 874, 874, 874, 875, 875, 875, 875, 875,
875, 875, 876, 0, 876, 876, 876, 876, 876, 877,
877, 877, 877, 877, 877, 877, 878, 878, 878, 878,
878, 878, 878, 879, 0, 879, 879, 879, 879, 879,
880, 880, 880, 880, 880, 880, 880, 881, 881, 881,
881, 881, 881, 881, 882, 882, 882, 882, 882, 882,
882, 883, 883, 883, 883, 883, 883, 883, 884, 0,
884, 884, 884, 884, 884, 885, 885, 885, 885, 885,
885, 885, 886, 886, 886, 886, 886, 886, 886, 887,
887, 887, 887, 887, 887, 887, 888, 888, 888, 888,
888, 888, 888, 889, 0, 889, 889, 889, 889, 889,
890, 890, 890, 890, 890, 890, 890, 891, 891, 891,
891, 891, 891, 891, 892, 892, 892, 892, 892, 892,
892, 893, 893, 893, 893, 893, 893, 893, 894, 0,
894, 894, 894, 894, 894, 895, 895, 895, 895, 895,
895, 895, 896, 896, 896, 896, 896, 896, 896, 897,
0, 897, 897, 897, 897, 897, 898, 898, 898, 898,
898, 898, 898, 899, 899, 899, 899, 899, 899, 899,
900, 900, 900, 900, 900, 900, 900, 901, 901, 901,
901, 901, 901, 901, 902, 902, 902, 902, 902, 902,
902, 903, 903, 903, 903, 903, 903, 903, 904, 904,
904, 904, 904, 904, 904, 905, 905, 905, 905, 905,
905, 905, 906, 906, 906, 906, 906, 906, 906, 907,
907, 907, 907, 907, 907, 907, 908, 908, 908, 908,
908, 908, 908, 909, 909, 909, 909, 909, 909, 909,
910, 910, 910, 910, 910, 910, 910, 911, 911, 911,
911, 911, 911, 911, 912, 912, 912, 912, 912, 912,
912, 913, 913, 913, 913, 913, 913, 913, 914, 914,
914, 914, 914, 914, 914, 915, 915, 915, 915, 915,
915, 915, 916, 916, 916, 916, 916, 916, 916, 917,
917, 917, 917, 917, 917, 917, 918, 918, 918, 918,
918, 918, 918, 919, 919, 919, 919, 919, 919, 919,
920, 920, 920, 920, 920, 920, 920, 921, 921, 921,
921, 921, 921, 921, 922, 922, 922, 922, 922, 922,
922, 923, 923, 923, 923, 923, 923, 923, 924, 924,
924, 924, 924, 924, 924, 925, 925, 925, 925, 925,
925, 925, 926, 926, 926, 926, 926, 926, 926, 927,
927, 927, 927, 927, 927, 927, 928, 928, 928, 928,
928, 928, 928, 929, 929, 929, 929, 929, 929, 929,
930, 930, 930, 930, 930, 930, 930, 931, 931, 931,
931, 931, 931, 931, 932, 932, 932, 932, 932, 932,
932, 933, 933, 933, 933, 933, 933, 933, 934, 934,
934, 934, 934, 934, 934, 935, 935, 935, 935, 935,
935, 935, 936, 936, 936, 0, 936, 936, 936, 937,
937, 937, 937, 937, 937, 937, 938, 938, 938, 938,
938, 938, 938, 939, 939, 939, 939, 939, 939, 939,
940, 940, 940, 940, 940, 940, 940, 941, 941, 941,
941, 941, 941, 941, 942, 942, 942, 942, 942, 942,
942, 943, 943, 943, 943, 943, 943, 943, 944, 944,
944, 944, 944, 944, 944, 945, 945, 945, 945, 945,
945, 945, 946, 946, 946, 946, 946, 946, 946, 947,
947, 947, 947, 947, 947, 947, 948, 948, 948, 948,
948, 948, 948, 949, 949, 949, 949, 949, 949, 949,
950, 950, 950, 950, 950, 950, 950, 951, 951, 951,
951, 951, 951, 951, 952, 952, 952, 952, 952, 952,
952, 953, 953, 953, 953, 953, 953, 953, 954, 954,
954, 954, 954, 954, 954, 955, 955, 955, 955, 955,
955, 955, 956, 956, 956, 956, 956, 956, 956, 957,
957, 957, 957, 957, 957, 957, 958, 958, 958, 958,
958, 958, 958, 959, 959, 959, 959, 959, 959, 959,
960, 960, 960, 960, 960, 960, 960, 961, 961, 961,
961, 961, 961, 961, 962, 962, 962, 962, 962, 962,
962, 963, 963, 963, 963, 963, 963, 963, 964, 964,
964, 964, 964, 964, 964, 965, 965, 965, 965, 965,
965, 965, 966, 966, 966, 966, 966, 966, 966, 967,
967, 967, 967, 967, 967, 967, 968, 968, 968, 968,
968, 968, 968, 969, 969, 969, 969, 969, 969, 969,
970, 970, 970, 970, 970, 970, 970, 971, 971, 971,
971, 971, 971, 971, 972, 972, 972, 972, 972, 972,
972, 973, 973, 973, 973, 973, 973, 973, 974, 974,
974, 974, 974, 974, 974, 975, 975, 975, 975, 975,
975, 975, 976, 976, 976, 976, 976, 976, 976, 977,
977, 977, 977, 977, 977, 977, 978, 978, 978, 978,
978, 978, 978, 979, 979, 979, 979, 979, 979, 979,
980, 980, 980, 980, 980, 980, 980, 981, 981, 981,
981, 981, 981, 981, 982, 982, 982, 982, 982, 982,
982, 983, 983, 983, 983, 983, 983, 983, 984, 984,
984, 984, 984, 984, 984, 985, 985, 985, 985, 985,
985, 985, 986, 986, 986, 986, 986, 986, 986, 987,
987, 987, 987, 987, 987, 987, 988, 988, 988, 988,
988, 988, 988, 989, 989, 989, 989, 989, 989, 989,
990, 990, 990, 990, 990, 990, 990, 991, 991, 991,
991, 991, 991, 991, 992, 992, 992, 992, 992, 992,
992, 993, 993, 993, 993, 993, 993, 993, 994, 994,
994, 994, 994, 994, 994, 995, 995, 995, 995, 995,
995, 995, 996, 996, 996, 996, 996, 996, 996, 997,
997, 997, 997, 997, 997, 997, 998, 998, 998, 998,
998, 998, 998, 999, 999, 999, 999, 999, 999, 999,
1000, 1000, 1000, 1000, 1000, 1000, 1000, 1001, 1001, 1001,
1001, 1001, 1001, 1001, 1002, 1002, 1002, 1002, 1002, 1002,
1002, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1004, 1004,
1004, 1004, 1004, 1004, 1004, 1005, 1005, 1005, 1005, 1005,
1005, 1005, 1006, 1006, 1006, 1006, 1006, 1006, 1006, 1007,
1007, 1007, 1007, 1007, 1007, 1007, 1008, 1008, 1008, 1008,
1008, 1008, 1008, 1009, 1009, 1009, 1009, 1009, 1009, 1009,
1010, 1010, 1010, 1010, 1010, 1010, 1010, 1011, 1011, 1011,
1011, 1011, 1011, 1011, 1012, 1012, 1012, 1012, 1012, 1012,
1012, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1014, 1014,
1014, 1014, 1014, 1014, 1014, 1015, 1015, 1015, 1015, 1015,
1015, 1015, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1017,
1017, 1017, 1017, 1017, 1017, 1017, 1018, 1018, 1018, 1018,
1018, 1018, 1018, 1019, 1019, 1019, 1019, 1019, 1019, 1019,
1020, 1020, 1020, 1020, 1020, 1020, 1020, 1021, 1021, 1021,
1021, 1021, 1021, 1021, 1022, 1022, 1022, 1022, 1022, 1022,
1022, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614, 614, 614,
614, 614, 614, 614, 614, 614, 614, 614
} ;
/* 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
#line 1 "./n3_lexer.l"
/* -*- Mode: c; c-basic-offset: 2 -*-
*
* n3_lexer.l - Raptor Notation 3 lexer - making tokens for grammar generator
*
* Copyright (C) 2003-2006, David Beckett http://purl.org/net/dajobe/
* Copyright (C) 2003-2005, University of Bristol, UK http://www.bristol.ac.uk/
*
* This package is Free Software and part of Redland http://librdf.org/
*
* It is licensed under the following three licenses as alternatives:
* 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version
* 2. GNU General Public License (GPL) V2 or any newer version
* 3. Apache License, V2.0 or any newer version
*
* You may not use this file except in compliance with at least one of
* the above three licenses.
*
* See LICENSE.html or LICENSE.txt at the top of this package for the
* complete terms and further detail along with the license texts for
* the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively.
*
*
* This is an incomplete Notation 3 parser.
*
* To generate the C files from this source, rather than use the
* shipped n3_lexer.c/.h needs a patched version of flex 2.5.31 such
* as the one available in Debian GNU/Linux. Details below
* near the %option descriptions.
*
*/
/* recognise 8-bits */
/* all symbols prefixed by this */
/* This is not needed, flex is invoked -on3_lexer.c */
/* %option outfile="n3_lexer.c" */
/* Emit a C header file for prototypes
* Only available in flex 2.5.13 or newer.
* It was renamed to header-file in flex 2.5.19
*/
/* Do not emit #include <unistd.h>
* Only available in flex 2.5.7 or newer.
* Broken in flex 2.5.31 without patches.
*/
#define YY_NO_UNISTD_H 1
/* Never interactive */
/* No isatty() check */
/* Batch scanner */
/* Never use yyunput */
/* Supply our own alloc/realloc/free functions */
/* Re-entrant scanner */
/* definitions */
#line 75 "./n3_lexer.l"
/* NOTE: These headers are NOT included here but are inserted by
* fix-flex since otherwise it appears far too late in the generated C
*/
/*
#ifdef HAVE_CONFIG_H
#include <raptor_config.h>
#endif
#ifdef WIN32
#include <win32_raptor_config.h>
#endif
*/
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdarg.h>
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <raptor.h>
#include <raptor_internal.h>
#include <n3_parser.h>
#include <n3_common.h>
/* Prototypes */
static unsigned char *n3_copy_token(unsigned char *text, size_t len);
static unsigned char *n3_copy_string_token(raptor_parser* rdf_parser, unsigned char *text, size_t len, int delim);
void n3_lexer_syntax_error(void* rdf_parser, const char *msg, ...) RAPTOR_PRINTF_FORMAT(2, 3);
#ifdef RAPTOR_DEBUG
const char * n3_token_print(int token, YYSTYPE *lval);
#endif
int n3_lexer_lex (YYSTYPE *n3_parser_lval, yyscan_t yyscanner);
#define YY_DECL int n3_lexer_lex (YYSTYPE *n3_parser_lval, yyscan_t yyscanner)
#ifdef __cplusplus
#define INPUT_FN yyinput
#else
#define INPUT_FN input
#endif
/* Missing n3_lexer.c/h prototypes */
int n3_lexer_get_column(yyscan_t yyscanner);
void n3_lexer_set_column(int column_no , yyscan_t yyscanner);
static void n3_lexer_cleanup(yyscan_t yyscanner);
/* fatal error handler declaration */
#define YY_FATAL_ERROR(msg) n3_lexer_fatal_error(msg, yyscanner)
static void n3_lexer_fatal_error(yyconst char *msg, yyscan_t yyscanner);
/* Out-of-memory reporting macro.
* Do not report as fatal error - we don't want an abort(),
* instead return EOF with yyterminate() and let the parser clean up.
*/
#define N3_LEXER_OOM() do { \
n3_syntax_error(rdf_parser, n3_lexer_oom_text); \
yyterminate(); \
} while(0)
static const char n3_lexer_oom_text[]="n3_lexer: Out of memory";
/* from SPARQL */
/* similar to SPARQL but no need for <= check here */
#line 1954 "n3_lexer.c"
#define INITIAL 0
#define PREF 1
#define LITERAL 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.
*/
#ifndef YY_NO_UNISTD_H
#include <unistd.h>
#endif
#endif
#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif
/* Holds the entire state of the reentrant scanner. */
struct yyguts_t
{
/* User-defined. Not touched by flex. */
YY_EXTRA_TYPE yyextra_r;
/* The rest are the same as the globals declared in the non-reentrant scanner. */
FILE *yyin_r, *yyout_r;
size_t yy_buffer_stack_top; /**< index of top of stack. */
size_t yy_buffer_stack_max; /**< capacity of stack. */
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
char yy_hold_char;
int yy_n_chars;
int yyleng_r;
char *yy_c_buf_p;
int yy_init;
int yy_start;
int yy_did_buffer_switch_on_eof;
int yy_start_stack_ptr;
int yy_start_stack_depth;
int *yy_start_stack;
yy_state_type yy_last_accepting_state;
char* yy_last_accepting_cpos;
int yylineno_r;
int yy_flex_debug_r;
char *yytext_r;
int yy_more_flag;
int yy_more_len;
}; /* end struct yyguts_t */
static int yy_init_globals (yyscan_t yyscanner );
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
int n3_lexer_lex_destroy (yyscan_t yyscanner );
int n3_lexer_get_debug (yyscan_t yyscanner );
void n3_lexer_set_debug (int debug_flag ,yyscan_t yyscanner );
YY_EXTRA_TYPE n3_lexer_get_extra (yyscan_t yyscanner );
void n3_lexer_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
FILE *n3_lexer_get_in (yyscan_t yyscanner );
void n3_lexer_set_in (FILE * in_str ,yyscan_t yyscanner );
FILE *n3_lexer_get_out (yyscan_t yyscanner );
void n3_lexer_set_out (FILE * out_str ,yyscan_t yyscanner );
int n3_lexer_get_leng (yyscan_t yyscanner );
char *n3_lexer_get_text (yyscan_t yyscanner );
int n3_lexer_get_lineno (yyscan_t yyscanner );
void n3_lexer_set_lineno (int line_number ,yyscan_t yyscanner );
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int n3_lexer_wrap (yyscan_t yyscanner );
#else
extern int n3_lexer_wrap (yyscan_t yyscanner );
#endif
#endif
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (yyscan_t yyscanner );
#else
static int input (yyscan_t yyscanner );
#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_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
size_t 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 \
{ \
errno=0; \
while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
break; \
} \
errno=0; \
clearerr(yyin); \
} \
}\
\
#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 , yyscanner)
#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 n3_lexer_lex (yyscan_t yyscanner);
#define YY_DECL int n3_lexer_lex (yyscan_t yyscanner)
#endif /* !YY_DECL */
/* 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
/** 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;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
#line 171 "./n3_lexer.l"
/* rules */
raptor_parser *rdf_parser=(raptor_parser*)yyextra;
raptor_n3_parser* n3_parser=(raptor_n3_parser*)rdf_parser->context;
#line 2180 "n3_lexer.c"
if ( !yyg->yy_init )
{
yyg->yy_init = 1;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
if ( ! yyg->yy_start )
yyg->yy_start = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
if ( ! yyout )
yyout = stdout;
if ( ! YY_CURRENT_BUFFER ) {
n3_lexer_ensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE =
n3_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
}
n3_lexer__load_buffer_state(yyscanner );
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = yyg->yy_c_buf_p;
/* Support of yytext. */
*yy_cp = yyg->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 = yyg->yy_start;
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
yyg->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 >= 615 )
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_current_state != 614 );
yy_cp = yyg->yy_last_accepting_cpos;
yy_current_state = yyg->yy_last_accepting_state;
yy_find_action:
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 = yyg->yy_hold_char;
yy_cp = yyg->yy_last_accepting_cpos;
yy_current_state = yyg->yy_last_accepting_state;
goto yy_find_action;
case 1:
/* rule 1 can match eol */
YY_RULE_SETUP
#line 177 "./n3_lexer.l"
{ n3_parser->lineno++; }
YY_BREAK
case 2:
YY_RULE_SETUP
#line 179 "./n3_lexer.l"
{ /* empty */ }
YY_BREAK
case 3:
YY_RULE_SETUP
#line 181 "./n3_lexer.l"
{ return A; }
YY_BREAK
case 4:
YY_RULE_SETUP
#line 183 "./n3_lexer.l"
{ return DOT; }
YY_BREAK
case 5:
YY_RULE_SETUP
#line 184 "./n3_lexer.l"
{ return COMMA; }
YY_BREAK
case 6:
YY_RULE_SETUP
#line 185 "./n3_lexer.l"
{ return SEMICOLON; }
YY_BREAK
case 7:
YY_RULE_SETUP
#line 186 "./n3_lexer.l"
{ return LEFT_SQUARE; }
YY_BREAK
case 8:
YY_RULE_SETUP
#line 187 "./n3_lexer.l"
{ return RIGHT_SQUARE; }
YY_BREAK
case 9:
YY_RULE_SETUP
#line 188 "./n3_lexer.l"
{ BEGIN(PREF); return PREFIX; }
YY_BREAK
case 10:
YY_RULE_SETUP
#line 189 "./n3_lexer.l"
{ return AT; }
YY_BREAK
case 11:
YY_RULE_SETUP
#line 190 "./n3_lexer.l"
{ return HAT; }
YY_BREAK
case 12:
YY_RULE_SETUP
#line 191 "./n3_lexer.l"
{ return LEFT_ROUND; }
YY_BREAK
case 13:
YY_RULE_SETUP
#line 192 "./n3_lexer.l"
{ return RIGHT_ROUND; }
YY_BREAK
case 14:
YY_RULE_SETUP
#line 195 "./n3_lexer.l"
{ n3_parser_lval->string=n3_copy_string_token(rdf_parser, (unsigned char*)yytext+1, yyleng-2, '\"'); /* ' */
if(!n3_parser_lval->string)
N3_LEXER_OOM();
return STRING_LITERAL; }
YY_BREAK
case 15:
YY_RULE_SETUP
#line 200 "./n3_lexer.l"
{ n3_parser_lval->string=n3_copy_string_token(rdf_parser, (unsigned char*)yytext+1, yyleng-2, '"'); /* ' */
if(!n3_parser_lval->string)
N3_LEXER_OOM();
return STRING_LITERAL; }
YY_BREAK
case 16:
YY_RULE_SETUP
#line 205 "./n3_lexer.l"
{ BEGIN(LITERAL);
n3_parser->sb=raptor_new_stringbuffer();
if(!n3_parser->sb)
N3_LEXER_OOM();
}
YY_BREAK
case 17:
YY_RULE_SETUP
#line 211 "./n3_lexer.l"
{
size_t len;
BEGIN(INITIAL);
len=raptor_stringbuffer_length(n3_parser->sb);
n3_parser_lval->string=(unsigned char *)RAPTOR_MALLOC(cstring, len+1);
if(!n3_parser_lval->string)
N3_LEXER_OOM();
raptor_stringbuffer_copy_to_string(n3_parser->sb, (unsigned char*)n3_parser_lval->string, len);
n3_parser_lval->string[len]='\0';
raptor_free_stringbuffer(n3_parser->sb);
n3_parser->sb=NULL;
return STRING_LITERAL; }
YY_BREAK
case 18:
/* rule 18 can match eol */
YY_RULE_SETUP
#line 226 "./n3_lexer.l"
{
if (*yytext == EOF) {
BEGIN(INITIAL);
n3_syntax_error(rdf_parser, "End of file in middle of literal");
raptor_free_stringbuffer(n3_parser->sb);
n3_parser->sb=NULL;
return EOF;
}
if(raptor_stringbuffer_append_turtle_string(n3_parser->sb, (unsigned char*)yytext, yyleng, '"', (raptor_simple_message_handler)n3_lexer_syntax_error, rdf_parser)) { /* " */
BEGIN(INITIAL);
raptor_free_stringbuffer(n3_parser->sb);
n3_parser->sb=NULL;
N3_LEXER_OOM();
}
}
YY_BREAK
case 19:
YY_RULE_SETUP
#line 244 "./n3_lexer.l"
{ n3_parser_lval->string=n3_copy_token((unsigned char*)yytext+2, yyleng-2);
if(!n3_parser_lval->string)
N3_LEXER_OOM();
return BLANK_LITERAL; }
YY_BREAK
case 20:
YY_RULE_SETUP
#line 249 "./n3_lexer.l"
{ n3_parser_lval->uri=n3_qname_to_uri(rdf_parser, (unsigned char*)yytext, yyleng);
if(!n3_parser_lval->uri)
N3_LEXER_OOM();
return QNAME_LITERAL; }
YY_BREAK
case 21:
YY_RULE_SETUP
#line 254 "./n3_lexer.l"
{ n3_parser_lval->string=n3_copy_token((unsigned char*)yytext, yyleng);
if(!n3_parser_lval->string)
N3_LEXER_OOM();
return DECIMAL_LITERAL;
}
YY_BREAK
case 22:
YY_RULE_SETUP
#line 260 "./n3_lexer.l"
{
double d;
int n;
n=sscanf((const char*)yytext, "%lf", &d);
if(n != 1) {
n3_syntax_error(rdf_parser, "N3 syntax error - Illegal floating point constant %s", yytext);
yyterminate();
}
n3_parser_lval->floating=d;
return FLOATING_LITERAL;
}
YY_BREAK
case 23:
YY_RULE_SETUP
#line 273 "./n3_lexer.l"
{ n3_parser_lval->integer=atoi(yytext);
return INTEGER_LITERAL; }
YY_BREAK
case 24:
YY_RULE_SETUP
#line 276 "./n3_lexer.l"
{ /* eat up leading whitespace */ }
YY_BREAK
case 25:
YY_RULE_SETUP
#line 277 "./n3_lexer.l"
{ n3_parser_lval->string=n3_copy_token((unsigned char*)yytext, yyleng);
if(!n3_parser_lval->string)
N3_LEXER_OOM();
BEGIN(INITIAL);
return IDENTIFIER; }
YY_BREAK
case 26:
YY_RULE_SETUP
#line 282 "./n3_lexer.l"
{ BEGIN(INITIAL);
n3_parser_lval->string=n3_copy_token((unsigned char*)yytext, 0);
if(!n3_parser_lval->string)
N3_LEXER_OOM();
return IDENTIFIER; }
YY_BREAK
case 27:
/* rule 27 can match eol */
YY_RULE_SETUP
#line 288 "./n3_lexer.l"
{ BEGIN(INITIAL);
if (*yytext == EOF)
return EOF;
n3_syntax_error(rdf_parser, "syntax error at '%c' - @prefix name must end in :", *yytext);
yyterminate(); }
YY_BREAK
case 28:
/* rule 28 can match eol */
YY_RULE_SETUP
#line 296 "./n3_lexer.l"
{ if(yyleng == 2)
n3_parser_lval->uri=raptor_uri_copy(rdf_parser->base_uri);
else {
yytext[yyleng-1]='\0';
n3_parser_lval->uri=raptor_new_uri_relative_to_base(rdf_parser->base_uri, (const unsigned char*)yytext+1);
if(!n3_parser_lval->uri)
N3_LEXER_OOM();
}
return URI_LITERAL; }
YY_BREAK
case 29:
YY_RULE_SETUP
#line 306 "./n3_lexer.l"
{ n3_parser_lval->string=n3_copy_token((unsigned char*)yytext, yyleng);
if(!n3_parser_lval->string)
N3_LEXER_OOM();
return IDENTIFIER; }
YY_BREAK
case 30:
/* rule 30 can match eol */
YY_RULE_SETUP
#line 311 "./n3_lexer.l"
{ /* # comment */
n3_parser->lineno++;
}
YY_BREAK
case 31:
YY_RULE_SETUP
#line 315 "./n3_lexer.l"
{ /* # comment on the last line with no terminating newline */
}
YY_BREAK
case 32:
YY_RULE_SETUP
#line 318 "./n3_lexer.l"
{ if (*yytext == EOF)
return EOF;
n3_syntax_error(rdf_parser, "syntax error at '%c'", *yytext);
yyterminate();
}
YY_BREAK
case 33:
YY_RULE_SETUP
#line 325 "./n3_lexer.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
#line 2522 "n3_lexer.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(PREF):
case YY_STATE_EOF(LITERAL):
yyterminate();
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB char. */
int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
*yy_cp = yyg->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 yyin at a new source and called
* n3_lexer_lex(). 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.
*/
yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
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 ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
{ /* This was really a NUL. */
yy_state_type yy_next_state;
yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state( yyscanner );
/* 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 , yyscanner);
yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
yy_cp = ++yyg->yy_c_buf_p;
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
yy_cp = yyg->yy_last_accepting_cpos;
yy_current_state = yyg->yy_last_accepting_state;
goto yy_find_action;
}
}
else switch ( yy_get_next_buffer( yyscanner ) )
{
case EOB_ACT_END_OF_FILE:
{
yyg->yy_did_buffer_switch_on_eof = 0;
if ( n3_lexer_wrap(yyscanner ) )
{
/* 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.
*/
yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
}
else
{
if ( ! yyg->yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
}
break;
}
case EOB_ACT_CONTINUE_SCAN:
yyg->yy_c_buf_p =
yyg->yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state( yyscanner );
yy_cp = yyg->yy_c_buf_p;
yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
yyg->yy_c_buf_p =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
yy_current_state = yy_get_previous_state( yyscanner );
yy_cp = yyg->yy_c_buf_p;
yy_bp = yyg->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 n3_lexer_lex */
/* 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 (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
register char *source = yyg->yytext_ptr;
register int number_to_move, i;
int ret_val;
if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->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 ( yyg->yy_c_buf_p - yyg->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) (yyg->yy_c_buf_p - yyg->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 = yyg->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) (yyg->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. */
n3_lexer_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
}
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" );
yyg->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]),
yyg->yy_n_chars, (size_t) num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
if ( yyg->yy_n_chars == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
n3_lexer_restart(yyin ,yyscanner);
}
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;
yyg->yy_n_chars += number_to_move;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
yyg->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 (yyscan_t yyscanner)
{
register yy_state_type yy_current_state;
register char *yy_cp;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_current_state = yyg->yy_start;
for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->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] )
{
yyg->yy_last_accepting_state = yy_current_state;
yyg->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 >= 615 )
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 , yyscan_t yyscanner)
{
register int yy_is_jam;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
register char *yy_cp = yyg->yy_c_buf_p;
register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
yyg->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 >= 615 )
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 == 614);
return yy_is_jam ? 0 : yy_current_state;
}
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (yyscan_t yyscanner)
#else
static int input (yyscan_t yyscanner)
#endif
{
int c;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
*yyg->yy_c_buf_p = yyg->yy_hold_char;
if ( *yyg->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 ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
/* This was really a NUL. */
*yyg->yy_c_buf_p = '\0';
else
{ /* need more input */
int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
{
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. */
n3_lexer_restart(yyin ,yyscanner);
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
if ( n3_lexer_wrap(yyscanner ) )
return EOF;
if ( ! yyg->yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput(yyscanner);
#else
return input(yyscanner);
#endif
}
case EOB_ACT_CONTINUE_SCAN:
yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
break;
}
}
}
c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
*yyg->yy_c_buf_p = '\0'; /* preserve yytext */
yyg->yy_hold_char = *++yyg->yy_c_buf_p;
return c;
}
#endif /* ifndef YY_NO_INPUT */
/** Immediately switch to a different input stream.
* @param input_file A readable stream.
* @param yyscanner The scanner object.
* @note This function does not reset the start condition to @c INITIAL .
*/
void n3_lexer_restart (FILE * input_file , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! YY_CURRENT_BUFFER ){
n3_lexer_ensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE =
n3_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
}
n3_lexer__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
n3_lexer__load_buffer_state(yyscanner );
}
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
* @param yyscanner The scanner object.
*/
void n3_lexer__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* TODO. We should be able to replace this entire function body
* with
* n3_lexer_pop_buffer_state();
* n3_lexer_push_buffer_state(new_buffer);
*/
n3_lexer_ensure_buffer_stack (yyscanner);
if ( YY_CURRENT_BUFFER == new_buffer )
return;
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
*yyg->yy_c_buf_p = yyg->yy_hold_char;
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
n3_lexer__load_buffer_state(yyscanner );
/* We don't actually know whether we did this switch during
* EOF (n3_lexer_wrap()) processing, but the only time this flag
* is looked at is after n3_lexer_wrap() is called, so it's safe
* to go ahead and always set it.
*/
yyg->yy_did_buffer_switch_on_eof = 1;
}
static void n3_lexer__load_buffer_state (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
yyg->yy_hold_char = *yyg->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.
* @param yyscanner The scanner object.
* @return the allocated buffer state.
*/
YY_BUFFER_STATE n3_lexer__create_buffer (FILE * file, int size , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) n3_lexer_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in n3_lexer__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 *) n3_lexer_alloc(b->yy_buf_size + 2 ,yyscanner );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in n3_lexer__create_buffer()" );
b->yy_is_our_buffer = 1;
n3_lexer__init_buffer(b,file ,yyscanner);
return b;
}
/** Destroy the buffer.
* @param b a buffer created with n3_lexer__create_buffer()
* @param yyscanner The scanner object.
*/
void n3_lexer__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
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 )
n3_lexer_free((void *) b->yy_ch_buf ,yyscanner );
n3_lexer_free((void *) b ,yyscanner );
}
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a n3_lexer_restart() or at EOF.
*/
static void n3_lexer__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
{
int oerrno = errno;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
n3_lexer__flush_buffer(b ,yyscanner);
b->yy_input_file = file;
b->yy_fill_buffer = 1;
/* If b is the current buffer, then n3_lexer__init_buffer was _probably_
* called from n3_lexer_restart() 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 = 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.
* @param yyscanner The scanner object.
*/
void n3_lexer__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
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 )
n3_lexer__load_buffer_state(yyscanner );
}
/** 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.
* @param yyscanner The scanner object.
*/
void n3_lexer_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (new_buffer == NULL)
return;
n3_lexer_ensure_buffer_stack(yyscanner);
/* This block is copied from n3_lexer__switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
*yyg->yy_c_buf_p = yyg->yy_hold_char;
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
/* Only push if top exists. Otherwise, replace top. */
if (YY_CURRENT_BUFFER)
yyg->yy_buffer_stack_top++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
/* copied from n3_lexer__switch_to_buffer. */
n3_lexer__load_buffer_state(yyscanner );
yyg->yy_did_buffer_switch_on_eof = 1;
}
/** Removes and deletes the top of the stack, if present.
* The next element becomes the new top.
* @param yyscanner The scanner object.
*/
void n3_lexer_pop_buffer_state (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!YY_CURRENT_BUFFER)
return;
n3_lexer__delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
YY_CURRENT_BUFFER_LVALUE = NULL;
if (yyg->yy_buffer_stack_top > 0)
--yyg->yy_buffer_stack_top;
if (YY_CURRENT_BUFFER) {
n3_lexer__load_buffer_state(yyscanner );
yyg->yy_did_buffer_switch_on_eof = 1;
}
}
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
static void n3_lexer_ensure_buffer_stack (yyscan_t yyscanner)
{
int num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->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;
yyg->yy_buffer_stack = (struct yy_buffer_state**)n3_lexer_alloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
if(!yyg->yy_buffer_stack)
YY_FATAL_ERROR("ouf of memory - lexer yy_buffer_stack");
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
yyg->yy_buffer_stack_max = num_to_alloc;
yyg->yy_buffer_stack_top = 0;
return;
}
if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
/* Increase the buffer to prepare for a possible push. */
int grow_size = 8 /* arbitrary grow size */;
num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
yyg->yy_buffer_stack = (struct yy_buffer_state**)n3_lexer_realloc
(yyg->yy_buffer_stack,
num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
/* zero only the new slots.*/
if(!yyg->yy_buffer_stack)
YY_FATAL_ERROR("ouf of memory - lexer yy_buffer_stack");
memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
yyg->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
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE n3_lexer__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
{
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) n3_lexer_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in n3_lexer__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;
n3_lexer__switch_to_buffer(b ,yyscanner );
return b;
}
/** Setup the input buffer state to scan a string. The next call to n3_lexer_lex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
* n3_lexer__scan_bytes() instead.
*/
YY_BUFFER_STATE n3_lexer__scan_string (yyconst char * yystr , yyscan_t yyscanner)
{
return n3_lexer__scan_bytes(yystr,strlen(yystr) ,yyscanner);
}
/** Setup the input buffer state to scan the given bytes. The next call to n3_lexer_lex() 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.
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE n3_lexer__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
{
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 *) n3_lexer_alloc(n ,yyscanner );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in n3_lexer__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 = n3_lexer__scan_buffer(buf,n ,yyscanner);
if ( ! b )
YY_FATAL_ERROR( "bad buffer in n3_lexer__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
/* Redefine yyless() so it works in section 3 code. */
#undef yyless
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
yytext[yyleng] = yyg->yy_hold_char; \
yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
yyg->yy_hold_char = *yyg->yy_c_buf_p; \
*yyg->yy_c_buf_p = '\0'; \
yyleng = yyless_macro_arg; \
} \
while ( 0 )
/* Accessor methods (get/set functions) to struct members. */
/** Get the user-defined data for this scanner.
* @param yyscanner The scanner object.
*/
YY_EXTRA_TYPE n3_lexer_get_extra (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyextra;
}
/** Get the current line number.
* @param yyscanner The scanner object.
*/
int n3_lexer_get_lineno (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (! YY_CURRENT_BUFFER)
return 0;
return yylineno;
}
/** Get the current column number.
* @param yyscanner The scanner object.
*/
int n3_lexer_get_column (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (! YY_CURRENT_BUFFER)
return 0;
return yycolumn;
}
/** Get the input stream.
* @param yyscanner The scanner object.
*/
FILE *n3_lexer_get_in (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyin;
}
/** Get the output stream.
* @param yyscanner The scanner object.
*/
FILE *n3_lexer_get_out (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyout;
}
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
int n3_lexer_get_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
}
/** Get the current token.
* @param yyscanner The scanner object.
*/
char *n3_lexer_get_text (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yytext;
}
/** Set the user-defined data. This data is never touched by the scanner.
* @param user_defined The data to be associated with this scanner.
* @param yyscanner The scanner object.
*/
void n3_lexer_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyextra = user_defined ;
}
/** Set the current line number.
* @param line_number
* @param yyscanner The scanner object.
*/
void n3_lexer_set_lineno (int line_number , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* lineno is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
YY_FATAL_ERROR("n3_lexer_set_lineno called with no buffer");
yylineno = line_number;
}
/** Set the current column.
* @param line_number
* @param yyscanner The scanner object.
*/
void n3_lexer_set_column (int column_no , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* column is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
YY_FATAL_ERROR("n3_lexer_set_column called with no buffer");
yycolumn = column_no;
}
/** Set the input stream. This does not discard the current
* input buffer.
* @param in_str A readable stream.
* @param yyscanner The scanner object.
* @see n3_lexer__switch_to_buffer
*/
void n3_lexer_set_in (FILE * in_str , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyin = in_str ;
}
void n3_lexer_set_out (FILE * out_str , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyout = out_str ;
}
int n3_lexer_get_debug (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yy_flex_debug;
}
void n3_lexer_set_debug (int bdebug , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_flex_debug = bdebug ;
}
/* Accessor methods for yylval and yylloc */
/* User-visible API */
/* n3_lexer_lex_init is special because it creates the scanner itself, so it is
* the ONLY reentrant function that doesn't take the scanner as the last argument.
* That's why we explicitly handle the declaration, instead of using our macros.
*/
int n3_lexer_lex_init(yyscan_t* ptr_yy_globals)
{
if (ptr_yy_globals == NULL){
errno = EINVAL;
return 1;
}
*ptr_yy_globals = (yyscan_t) n3_lexer_alloc ( sizeof( struct yyguts_t ), NULL );
if (*ptr_yy_globals == NULL){
errno = ENOMEM;
return 1;
}
/* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
return yy_init_globals ( *ptr_yy_globals );
}
static int yy_init_globals (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* Initialization is the same as for the non-reentrant scanner.
* This function is called from n3_lexer_lex_destroy(), so don't allocate here.
*/
yyg->yy_buffer_stack = 0;
yyg->yy_buffer_stack_top = 0;
yyg->yy_buffer_stack_max = 0;
yyg->yy_c_buf_p = (char *) 0;
yyg->yy_init = 0;
yyg->yy_start = 0;
yyg->yy_start_stack_ptr = 0;
yyg->yy_start_stack_depth = 0;
yyg->yy_start_stack = NULL;
/* Defined in main.c */
#ifdef YY_STDINIT
yyin = stdin;
yyout = stdout;
#else
yyin = (FILE *) 0;
yyout = (FILE *) 0;
#endif
/* For future reference: Set errno on error, since we are called by
* n3_lexer_lex_init()
*/
return 0;
}
/* n3_lexer_lex_destroy is for both reentrant and non-reentrant scanners. */
int n3_lexer_lex_destroy (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
n3_lexer__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
YY_CURRENT_BUFFER_LVALUE = NULL;
n3_lexer_pop_buffer_state(yyscanner);
}
/* Destroy the stack itself. */
n3_lexer_free(yyg->yy_buffer_stack ,yyscanner);
yyg->yy_buffer_stack = NULL;
/* Destroy the start condition stack. */
n3_lexer_free(yyg->yy_start_stack ,yyscanner );
yyg->yy_start_stack = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
* n3_lexer_lex() is called, initialization will occur. */
yy_init_globals( yyscanner);
/* Destroy the main struct (reentrant only). */
/* clean up leaks if any before freeing yyscanner */
n3_lexer_cleanup(yyscanner);
n3_lexer_free ( yyscanner , yyscanner );
yyscanner = NULL;
return 0;
}
/*
* Internal utility routines.
*/
#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
{
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 , yyscan_t yyscanner)
{
register int n;
for ( n = 0; s[n]; ++n )
;
return n;
}
#endif
#define YYTABLES_NAME "yytables"
#line 325 "./n3_lexer.l"
/* user code */
int
n3_lexer_wrap (yyscan_t yyscanner) {
return 1;
}
static unsigned char *
n3_copy_token(unsigned char *text, size_t len)
{
unsigned char *s;
if(!len)
len=strlen((const char*)text);
s=(unsigned char *)RAPTOR_MALLOC(cstring, len+1);
if(s) {
strncpy((char*)s, (const char*)text, len);
s[len] = '\0';
}
return s;
}
static unsigned char *
n3_copy_string_token(raptor_parser* rdf_parser,
unsigned char *string, size_t len, int delim)
{
raptor_stringbuffer* sb=NULL;
int rc;
if(len) {
sb=raptor_new_stringbuffer();
if(!sb)
return NULL;
rc=raptor_stringbuffer_append_turtle_string(sb, string, len, delim,
(raptor_simple_message_handler)n3_lexer_syntax_error,
rdf_parser);
if(rc) {
raptor_free_stringbuffer(sb);
return NULL;
}
len=raptor_stringbuffer_length(sb);
}
string=(unsigned char *)RAPTOR_MALLOC(cstring, len+1);
if(string) {
if(sb) {
raptor_stringbuffer_copy_to_string(sb, string, len+1);
}
string[len]='\0';
}
if(sb)
raptor_free_stringbuffer(sb);
return string;
}
void
n3_lexer_syntax_error(void* ctx, const char *message, ...)
{
raptor_parser* rdf_parser=(raptor_parser *)ctx;
raptor_n3_parser* n3_parser=(raptor_n3_parser*)rdf_parser->context;
va_list arguments;
rdf_parser->locator.line=n3_parser->lineno;
#ifdef RAPTOR_N3_USE_ERROR_COLUMNS
rdf_parser->locator.column=n3_lexer_get_column(yyscanner);
#endif
va_start(arguments, message);
raptor_parser_error_varargs(((raptor_parser*)rdf_parser), message, arguments);
va_end(arguments);
}
/*
* n3_lexer_fatal_error:
* @msg:
* @yyscanner:
*
* INTERNAL - replacement for the generated error handler.
*/
static void n3_lexer_fatal_error(yyconst char *msg, yyscan_t yyscanner)
{
raptor_parser *rdf_parser=NULL;
if(yyscanner)
rdf_parser=(raptor_parser *)n3_lexer_get_extra(yyscanner);
if(rdf_parser)
/* avoid "format not a string literal and no format arguments" warning with %s */
raptor_parser_fatal_error(rdf_parser, "%s", msg);
else {
fputs(msg, stderr);
fputc('\n', stderr);
}
abort();
}
/* Define LEXER_ALLOC_TRACKING to enable allocated memory tracking
* - fixes lexer memory leak when ensure_buffer_stack fails
*/
#ifdef LEXER_ALLOC_TRACKING
typedef struct {
/* Number of void* slots allocated */
int lexer_allocs_size;
/* Allocted void* slots follow in memory after this header */
} lexer_alloc_tracker_header;
/* Initial alloc tracker slot array size - 2 seems to be enough for almost all cases */
static const int initial_lexer_allocs_size=2;
#endif
/*
* n3_lexer_cleanup:
* @yyscanner:
*
* INTERNAL - Clean up unfreed lexer allocs if LEXER_ALLOC_TRACKING is enabled.
*/
static void n3_lexer_cleanup(yyscan_t yyscanner)
{
#ifdef LEXER_ALLOC_TRACKING
raptor_parser *rdf_parser;
lexer_alloc_tracker_header *tracker;
void **lexer_allocs;
int i;
if(!yyscanner)
return;
rdf_parser=(raptor_parser *)n3_lexer_get_extra(yyscanner);
if(!rdf_parser)
return;
tracker=(lexer_alloc_tracker_header *)rdf_parser->lexer_user_data;
if(!tracker)
return;
lexer_allocs=(void**)&tracker[1];
for(i=0; i<tracker->lexer_allocs_size; ++i) {
if(lexer_allocs[i])
free(lexer_allocs[i]);
lexer_allocs[i]=NULL;
}
free(rdf_parser->lexer_user_data);
rdf_parser->lexer_user_data=NULL;
#endif
}
/*
* n3_lexer_alloc:
* @size
* @yyscanner
*
* INTERNAL - alloc replacement.
* Tracks allocated cells if LEXER_ALLOC_TRACKING is enabled.
*/
void *n3_lexer_alloc(yy_size_t size, yyscan_t yyscanner)
{
#ifdef LEXER_ALLOC_TRACKING
raptor_parser *rdf_parser;
lexer_alloc_tracker_header *tracker;
void **lexer_allocs;
int i;
void *ptr;
/* yyscanner not initialized -> probably initializing yyscanner itself
* -> just malloc without tracking
*/
if(!yyscanner)
return malloc(size);
rdf_parser=(raptor_parser *)n3_lexer_get_extra(yyscanner);
if(!rdf_parser)
YY_FATAL_ERROR("lexer_alloc: yyscanner extra not initialized");
/* try to allocate tracker if it does not exist */
tracker=(lexer_alloc_tracker_header *)rdf_parser->lexer_user_data;
if(!tracker) {
/* allocate tracker header + array of void* slots */
tracker=calloc(1, sizeof(lexer_alloc_tracker_header)+initial_lexer_allocs_size*sizeof(void*));
if(!tracker)
YY_FATAL_ERROR("lexer_alloc: cannot allocate tracker");
tracker->lexer_allocs_size=initial_lexer_allocs_size;
rdf_parser->lexer_user_data=(void *)tracker;
}
lexer_allocs=(void**)&tracker[1];
/* allocate memory */
ptr=malloc(size);
/* find a free slot for ptr */
for(i=0; i<tracker->lexer_allocs_size; ++i) {
if(!lexer_allocs[i]) {
lexer_allocs[i]=ptr;
break;
}
}
/* no free slots -> grow tracker slot array */
if(i>=tracker->lexer_allocs_size) {
int j;
void **dest;
tracker=calloc(1, sizeof(lexer_alloc_tracker_header)+i*2*sizeof(void*));
if(!tracker) {
if(ptr)
free(ptr);
YY_FATAL_ERROR("lexer_alloc: cannot grow tracker");
}
tracker->lexer_allocs_size=i*2;
/* copy data from old tracker */
dest=(void**)&tracker[1];
for(j=0; j<i; ++j) {
dest[j]=lexer_allocs[j];
}
/* set new item to first free slot */
dest[j]=ptr;
/* free old tracker and replace with new one */
free(rdf_parser->lexer_user_data);
rdf_parser->lexer_user_data=tracker;
}
return ptr;
#else
return malloc(size);
#endif
}
/*
* n3_lexer_realloc:
*
* INTERNAL - realloc replacement
* Tracks allocated cells if LEXER_ALLOC_TRACKING is enabled.
*/
void *n3_lexer_realloc(void *ptr, yy_size_t size, yyscan_t yyscanner)
{
#ifdef LEXER_ALLOC_TRACKING
raptor_parser *rdf_parser;
lexer_alloc_tracker_header *tracker;
void **lexer_allocs;
int i;
void *newptr;
if(!yyscanner)
YY_FATAL_ERROR("lexer_realloc: yyscanner not initialized");
rdf_parser=(raptor_parser *)n3_lexer_get_extra(yyscanner);
if(!rdf_parser)
YY_FATAL_ERROR("lexer_realloc: yyscanner extra not initialized");
tracker=(lexer_alloc_tracker_header *)rdf_parser->lexer_user_data;
if(!tracker)
YY_FATAL_ERROR("lexer_realloc: no alloc tracker");
lexer_allocs=(void**)&tracker[1];
/* find the old slot for ptr */
for(i=0; i<tracker->lexer_allocs_size; ++i) {
if(lexer_allocs[i]==ptr)
break;
}
/* no old slot -> error */
if(i>=tracker->lexer_allocs_size)
YY_FATAL_ERROR("lexer_realloc: cell not in tracker");
/* realloc */
newptr=realloc((char*)ptr, size);
/* replace entry in tracker */
lexer_allocs[i]=newptr;
return newptr;
#else
return realloc((char*)ptr, size);
#endif
}
/*
* n3_lexer_free:
*
* INTERNAL - free replacement.
* Checks for NULL pointer to be freed unlike the default lexer free function.
* Tracks allocated cells if LEXER_ALLOC_TRACKING is enabled.
*/
void n3_lexer_free(void *ptr, yyscan_t yyscanner)
{
#ifdef LEXER_ALLOC_TRACKING
raptor_parser *rdf_parser;
lexer_alloc_tracker_header *tracker;
void **lexer_allocs;
int i;
/* do not free NULL */
if(!ptr)
return;
/* free ptr even if we would encounter an error */
free(ptr);
/* yyscanner is allocated with n3_lexer_alloc() but it's never stored in the tracker
* - we need yyscanner to access the tracker */
if(!yyscanner || ptr==yyscanner)
return;
rdf_parser=(raptor_parser *)n3_lexer_get_extra(yyscanner);
if(!rdf_parser)
return;
tracker=(lexer_alloc_tracker_header *)rdf_parser->lexer_user_data;
if(!tracker)
return;
lexer_allocs=(void**)&tracker[1];
/* find the slot for ptr */
for(i=0; i<tracker->lexer_allocs_size; ++i) {
if(lexer_allocs[i]==ptr)
break;
}
/* no slot -> error */
if(i>=tracker->lexer_allocs_size)
YY_FATAL_ERROR("lexer_free: cell not in tracker");
/* remove entry from tracker */
lexer_allocs[i]=NULL;
#else
if(ptr)
free(ptr);
#endif
}
#ifdef RAPTOR_DEBUG
const char *
n3_token_print(int token, YYSTYPE *lval)
{
static char buffer[2048];
if(!token)
return "<<EOF>>";
switch(token) {
case PREFIX:
return "PREFIX";
case A:
return "A";
case DOT:
return "DOT";
case COMMA:
return "COMMA";
case SEMICOLON:
return "SEMICOLON";
case LEFT_SQUARE:
return "LEFT_SQUARE";
case RIGHT_SQUARE:
return "RIGHT_SQUARE";
case AT:
return "AT";
case HAT:
return "HAT";
case STRING_LITERAL:
sprintf(buffer, "STRING_LITERAL(%s)", lval->string);
return buffer;
case URI_LITERAL:
sprintf(buffer, "URI_LITERAL(%s)",
(lval->uri ? (char*)raptor_uri_as_string(lval->uri) : ""));
return buffer;
case BLANK_LITERAL:
sprintf(buffer, "BLANK_LITERAL(%s)", lval->string);
return buffer;
case QNAME_LITERAL:
sprintf(buffer, "QNAME_LITERAL(%s)",
(lval->uri ? (char*)raptor_uri_as_string(lval->uri) : ""));
return buffer;
case INTEGER_LITERAL:
sprintf(buffer, "INTEGER_LITERAL(%d)", lval->integer);
return buffer;
case FLOATING_LITERAL:
sprintf(buffer, "FLOATING_LITERAL(%1g)", lval->floating);
return buffer;
case IDENTIFIER:
sprintf(buffer, "IDENTIFIER(%s)",
(lval->string ? (char*)lval->string : ""));
return buffer;
case DECIMAL_LITERAL:
sprintf(buffer, "DECIMAL_LITERAL(%s)", lval->string);
return buffer;
case ERROR_TOKEN:
return "ERROR";
default:
fprintf(stderr, "n3_token_print: UNKNOWN token %d - add a new case\n", token);
abort();
}
}
#endif
#ifdef STANDALONE
static void
n3_token_free(int token, YYSTYPE *lval)
{
if(!token)
return;
switch(token) {
case STRING_LITERAL:
case BLANK_LITERAL:
case IDENTIFIER:
if(lval->string)
RAPTOR_FREE(cstring, lval->string);
break;
case URI_LITERAL:
case QNAME_LITERAL:
if(lval->uri)
raptor_free_uri(lval->uri);
break;
default:
break;
}
}
int
main(int argc, char *argv[])
{
raptor_parser rdf_parser;
raptor_n3_parser n3_parser;
yyscan_t scanner;
int token=EOF;
FILE *fh;
YYSTYPE lval;
const unsigned char *uri_string;
char *filename=NULL;
raptor_init();
if(argc > 1) {
filename=argv[1];
fh=fopen(filename, "r");
if(!fh) {
fprintf(stderr, "%s: Cannot open file %s - %s\n", argv[0], filename,
strerror(errno));
exit(1);
}
} else {
filename="<stdin>";
fh=stdin;
}
memset(&rdf_parser, 0, sizeof(raptor_parser));
memset(&n3_parser, 0, sizeof(raptor_n3_parser));
n3_lexer_lex_init(&n3_parser.scanner);
scanner=n3_parser.scanner;
n3_lexer_set_in(fh, scanner);
n3_lexer_set_extra(&rdf_parser, scanner);
/* Initialise enough of the parser and locator to get error messages */
rdf_parser.context=&n3_parser;
n3_parser.lineno=1;
rdf_parser.locator.file=filename;
rdf_parser.locator.column= -1;
uri_string=raptor_uri_filename_to_uri_string(filename);
rdf_parser.base_uri=raptor_new_uri(uri_string);
RAPTOR_FREE(cstring, (void*)uri_string);
while(1) {
memset(&lval, 0, sizeof(YYSTYPE));
if(n3_lexer_get_text(scanner) != NULL)
printf("yyinput '%s'\n", n3_lexer_get_text(scanner));
token=n3_lexer_lex(&lval,scanner);
#ifdef RAPTOR_DEBUG
printf("token %s\n", n3_token_print(token, &lval));
#else
printf("token %d\n", token);
#endif
n3_token_free(token, &lval);
if(!token || token == EOF || token == ERROR_TOKEN)
break;
}
n3_lexer_lex_destroy(scanner);
raptor_free_uri(rdf_parser.base_uri);
raptor_finish();
if(token == ERROR_TOKEN)
return 1;
return 0;
}
#endif