Blame src/tokenparser.c

Packit 9f0df5
Packit 9f0df5
#line 3 "tokenparser.c"
Packit 9f0df5
Packit 9f0df5
#define  YY_INT_ALIGNED short int
Packit 9f0df5
Packit 9f0df5
/* A lexical scanner generated by flex */
Packit 9f0df5
Packit 9f0df5
#define FLEX_SCANNER
Packit 9f0df5
#define YY_FLEX_MAJOR_VERSION 2
Packit 9f0df5
#define YY_FLEX_MINOR_VERSION 6
Packit 9f0df5
#define YY_FLEX_SUBMINOR_VERSION 1
Packit 9f0df5
#if YY_FLEX_SUBMINOR_VERSION > 0
Packit 9f0df5
#define FLEX_BETA
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
/* First, we deal with  platform-specific or compiler-specific issues. */
Packit 9f0df5
Packit 9f0df5
/* begin standard C headers. */
Packit 9f0df5
#include <stdio.h>
Packit 9f0df5
#include <string.h>
Packit 9f0df5
#include <errno.h>
Packit 9f0df5
#include <stdlib.h>
Packit 9f0df5
Packit 9f0df5
/* end standard C headers. */
Packit 9f0df5
Packit 9f0df5
/* flex integer type definitions */
Packit 9f0df5
Packit 9f0df5
#ifndef FLEXINT_H
Packit 9f0df5
#define FLEXINT_H
Packit 9f0df5
Packit 9f0df5
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
Packit 9f0df5
Packit 9f0df5
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
Packit 9f0df5
Packit 9f0df5
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
Packit 9f0df5
 * if you want the limit (max/min) macros for int types. 
Packit 9f0df5
 */
Packit 9f0df5
#ifndef __STDC_LIMIT_MACROS
Packit 9f0df5
#define __STDC_LIMIT_MACROS 1
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
#include <inttypes.h>
Packit 9f0df5
typedef int8_t flex_int8_t;
Packit 9f0df5
typedef uint8_t flex_uint8_t;
Packit 9f0df5
typedef int16_t flex_int16_t;
Packit 9f0df5
typedef uint16_t flex_uint16_t;
Packit 9f0df5
typedef int32_t flex_int32_t;
Packit 9f0df5
typedef uint32_t flex_uint32_t;
Packit 9f0df5
#else
Packit 9f0df5
typedef signed char flex_int8_t;
Packit 9f0df5
typedef short int flex_int16_t;
Packit 9f0df5
typedef int flex_int32_t;
Packit 9f0df5
typedef unsigned char flex_uint8_t; 
Packit 9f0df5
typedef unsigned short int flex_uint16_t;
Packit 9f0df5
typedef unsigned int flex_uint32_t;
Packit 9f0df5
Packit 9f0df5
/* Limits of integral types. */
Packit 9f0df5
#ifndef INT8_MIN
Packit 9f0df5
#define INT8_MIN               (-128)
Packit 9f0df5
#endif
Packit 9f0df5
#ifndef INT16_MIN
Packit 9f0df5
#define INT16_MIN              (-32767-1)
Packit 9f0df5
#endif
Packit 9f0df5
#ifndef INT32_MIN
Packit 9f0df5
#define INT32_MIN              (-2147483647-1)
Packit 9f0df5
#endif
Packit 9f0df5
#ifndef INT8_MAX
Packit 9f0df5
#define INT8_MAX               (127)
Packit 9f0df5
#endif
Packit 9f0df5
#ifndef INT16_MAX
Packit 9f0df5
#define INT16_MAX              (32767)
Packit 9f0df5
#endif
Packit 9f0df5
#ifndef INT32_MAX
Packit 9f0df5
#define INT32_MAX              (2147483647)
Packit 9f0df5
#endif
Packit 9f0df5
#ifndef UINT8_MAX
Packit 9f0df5
#define UINT8_MAX              (255U)
Packit 9f0df5
#endif
Packit 9f0df5
#ifndef UINT16_MAX
Packit 9f0df5
#define UINT16_MAX             (65535U)
Packit 9f0df5
#endif
Packit 9f0df5
#ifndef UINT32_MAX
Packit 9f0df5
#define UINT32_MAX             (4294967295U)
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
#endif /* ! C99 */
Packit 9f0df5
Packit 9f0df5
#endif /* ! FLEXINT_H */
Packit 9f0df5
Packit 9f0df5
/* TODO: this is always defined, so inline it */
Packit 9f0df5
#define yyconst const
Packit 9f0df5
Packit 9f0df5
#if defined(__GNUC__) && __GNUC__ >= 3
Packit 9f0df5
#define yynoreturn __attribute__((__noreturn__))
Packit 9f0df5
#else
Packit 9f0df5
#define yynoreturn
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
/* Returned upon end-of-file. */
Packit 9f0df5
#define YY_NULL 0
Packit 9f0df5
Packit 9f0df5
/* Promotes a possibly negative, possibly signed char to an unsigned
Packit 9f0df5
 * integer for use as an array index.  If the signed char is negative,
Packit 9f0df5
 * we want to instead treat it as an 8-bit unsigned char, hence the
Packit 9f0df5
 * double cast.
Packit 9f0df5
 */
Packit 9f0df5
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
Packit 9f0df5
Packit 9f0df5
/* Enter a start condition.  This macro really ought to take a parameter,
Packit 9f0df5
 * but we do it the disgusting crufty way forced on us by the ()-less
Packit 9f0df5
 * definition of BEGIN.
Packit 9f0df5
 */
Packit 9f0df5
#define BEGIN (yy_start) = 1 + 2 *
Packit 9f0df5
Packit 9f0df5
/* Translate the current start state into a value that can be later handed
Packit 9f0df5
 * to BEGIN to return to the state.  The YYSTATE alias is for lex
Packit 9f0df5
 * compatibility.
Packit 9f0df5
 */
Packit 9f0df5
#define YY_START (((yy_start) - 1) / 2)
Packit 9f0df5
#define YYSTATE YY_START
Packit 9f0df5
Packit 9f0df5
/* Action number for EOF rule of a given start state. */
Packit 9f0df5
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
Packit 9f0df5
Packit 9f0df5
/* Special action meaning "start processing a new file". */
Packit 9f0df5
#define YY_NEW_FILE yyrestart(yyin  )
Packit 9f0df5
Packit 9f0df5
#define YY_END_OF_BUFFER_CHAR 0
Packit 9f0df5
Packit 9f0df5
/* Size of default input buffer. */
Packit 9f0df5
#ifndef YY_BUF_SIZE
Packit 9f0df5
#ifdef __ia64__
Packit 9f0df5
/* On IA-64, the buffer size is 16k, not 8k.
Packit 9f0df5
 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
Packit 9f0df5
 * Ditto for the __ia64__ case accordingly.
Packit 9f0df5
 */
Packit 9f0df5
#define YY_BUF_SIZE 32768
Packit 9f0df5
#else
Packit 9f0df5
#define YY_BUF_SIZE 16384
Packit 9f0df5
#endif /* __ia64__ */
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
/* The state buf must be large enough to hold one state per character in the main buffer.
Packit 9f0df5
 */
Packit 9f0df5
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
Packit 9f0df5
Packit 9f0df5
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
Packit 9f0df5
#define YY_TYPEDEF_YY_BUFFER_STATE
Packit 9f0df5
typedef struct yy_buffer_state *YY_BUFFER_STATE;
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
#ifndef YY_TYPEDEF_YY_SIZE_T
Packit 9f0df5
#define YY_TYPEDEF_YY_SIZE_T
Packit 9f0df5
typedef size_t yy_size_t;
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
extern int yyleng;
Packit 9f0df5
Packit 9f0df5
extern FILE *yyin, *yyout;
Packit 9f0df5
Packit 9f0df5
#define EOB_ACT_CONTINUE_SCAN 0
Packit 9f0df5
#define EOB_ACT_END_OF_FILE 1
Packit 9f0df5
#define EOB_ACT_LAST_MATCH 2
Packit 9f0df5
Packit 9f0df5
    #define YY_LESS_LINENO(n)
Packit 9f0df5
    #define YY_LINENO_REWIND_TO(ptr)
Packit 9f0df5
    
Packit 9f0df5
/* Return all but the first "n" matched characters back to the input stream. */
Packit 9f0df5
#define yyless(n) \
Packit 9f0df5
	do \
Packit 9f0df5
		{ \
Packit 9f0df5
		/* Undo effects of setting up yytext. */ \
Packit 9f0df5
        int yyless_macro_arg = (n); \
Packit 9f0df5
        YY_LESS_LINENO(yyless_macro_arg);\
Packit 9f0df5
		*yy_cp = (yy_hold_char); \
Packit 9f0df5
		YY_RESTORE_YY_MORE_OFFSET \
Packit 9f0df5
		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
Packit 9f0df5
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
Packit 9f0df5
		} \
Packit 9f0df5
	while ( 0 )
Packit 9f0df5
Packit 9f0df5
#define unput(c) yyunput( c, (yytext_ptr)  )
Packit 9f0df5
Packit 9f0df5
#ifndef YY_STRUCT_YY_BUFFER_STATE
Packit 9f0df5
#define YY_STRUCT_YY_BUFFER_STATE
Packit 9f0df5
struct yy_buffer_state
Packit 9f0df5
	{
Packit 9f0df5
	FILE *yy_input_file;
Packit 9f0df5
Packit 9f0df5
	char *yy_ch_buf;		/* input buffer */
Packit 9f0df5
	char *yy_buf_pos;		/* current position in input buffer */
Packit 9f0df5
Packit 9f0df5
	/* Size of input buffer in bytes, not including room for EOB
Packit 9f0df5
	 * characters.
Packit 9f0df5
	 */
Packit 9f0df5
	int yy_buf_size;
Packit 9f0df5
Packit 9f0df5
	/* Number of characters read into yy_ch_buf, not including EOB
Packit 9f0df5
	 * characters.
Packit 9f0df5
	 */
Packit 9f0df5
	int yy_n_chars;
Packit 9f0df5
Packit 9f0df5
	/* Whether we "own" the buffer - i.e., we know we created it,
Packit 9f0df5
	 * and can realloc() it to grow it, and should free() it to
Packit 9f0df5
	 * delete it.
Packit 9f0df5
	 */
Packit 9f0df5
	int yy_is_our_buffer;
Packit 9f0df5
Packit 9f0df5
	/* Whether this is an "interactive" input source; if so, and
Packit 9f0df5
	 * if we're using stdio for input, then we want to use getc()
Packit 9f0df5
	 * instead of fread(), to make sure we stop fetching input after
Packit 9f0df5
	 * each newline.
Packit 9f0df5
	 */
Packit 9f0df5
	int yy_is_interactive;
Packit 9f0df5
Packit 9f0df5
	/* Whether we're considered to be at the beginning of a line.
Packit 9f0df5
	 * If so, '^' rules will be active on the next match, otherwise
Packit 9f0df5
	 * not.
Packit 9f0df5
	 */
Packit 9f0df5
	int yy_at_bol;
Packit 9f0df5
Packit 9f0df5
    int yy_bs_lineno; /**< The line count. */
Packit 9f0df5
    int yy_bs_column; /**< The column count. */
Packit 9f0df5
    
Packit 9f0df5
	/* Whether to try to fill the input buffer when we reach the
Packit 9f0df5
	 * end of it.
Packit 9f0df5
	 */
Packit 9f0df5
	int yy_fill_buffer;
Packit 9f0df5
Packit 9f0df5
	int yy_buffer_status;
Packit 9f0df5
Packit 9f0df5
#define YY_BUFFER_NEW 0
Packit 9f0df5
#define YY_BUFFER_NORMAL 1
Packit 9f0df5
	/* When an EOF's been seen but there's still some text to process
Packit 9f0df5
	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
Packit 9f0df5
	 * shouldn't try reading from the input source any more.  We might
Packit 9f0df5
	 * still have a bunch of tokens to match, though, because of
Packit 9f0df5
	 * possible backing-up.
Packit 9f0df5
	 *
Packit 9f0df5
	 * When we actually see the EOF, we change the status to "new"
Packit 9f0df5
	 * (via yyrestart()), so that the user can continue scanning by
Packit 9f0df5
	 * just pointing yyin at a new input file.
Packit 9f0df5
	 */
Packit 9f0df5
#define YY_BUFFER_EOF_PENDING 2
Packit 9f0df5
Packit 9f0df5
	};
Packit 9f0df5
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
Packit 9f0df5
Packit 9f0df5
/* Stack of input buffers. */
Packit 9f0df5
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
Packit 9f0df5
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
Packit 9f0df5
static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
Packit 9f0df5
Packit 9f0df5
/* We provide macros for accessing buffer states in case in the
Packit 9f0df5
 * future we want to put the buffer states in a more general
Packit 9f0df5
 * "scanner state".
Packit 9f0df5
 *
Packit 9f0df5
 * Returns the top of the stack, or NULL.
Packit 9f0df5
 */
Packit 9f0df5
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
Packit 9f0df5
                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
Packit 9f0df5
                          : NULL)
Packit 9f0df5
Packit 9f0df5
/* Same as previous macro, but useful when we know that the buffer stack is not
Packit 9f0df5
 * NULL or when we need an lvalue. For internal use only.
Packit 9f0df5
 */
Packit 9f0df5
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
Packit 9f0df5
Packit 9f0df5
/* yy_hold_char holds the character lost when yytext is formed. */
Packit 9f0df5
static char yy_hold_char;
Packit 9f0df5
static int yy_n_chars;		/* number of characters read into yy_ch_buf */
Packit 9f0df5
int yyleng;
Packit 9f0df5
Packit 9f0df5
/* Points to current character in buffer. */
Packit 9f0df5
static char *yy_c_buf_p = NULL;
Packit 9f0df5
static int yy_init = 0;		/* whether we need to initialize */
Packit 9f0df5
static int yy_start = 0;	/* start state number */
Packit 9f0df5
Packit 9f0df5
/* Flag which is used to allow yywrap()'s to do buffer switches
Packit 9f0df5
 * instead of setting up a fresh yyin.  A bit of a hack ...
Packit 9f0df5
 */
Packit 9f0df5
static int yy_did_buffer_switch_on_eof;
Packit 9f0df5
Packit 9f0df5
void yyrestart (FILE *input_file  );
Packit 9f0df5
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
Packit 9f0df5
YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
Packit 9f0df5
void yy_delete_buffer (YY_BUFFER_STATE b  );
Packit 9f0df5
void yy_flush_buffer (YY_BUFFER_STATE b  );
Packit 9f0df5
void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
Packit 9f0df5
void yypop_buffer_state (void );
Packit 9f0df5
Packit 9f0df5
static void yyensure_buffer_stack (void );
Packit 9f0df5
static void yy_load_buffer_state (void );
Packit 9f0df5
static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
Packit 9f0df5
Packit 9f0df5
#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
Packit 9f0df5
Packit 9f0df5
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
Packit 9f0df5
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
Packit 9f0df5
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  );
Packit 9f0df5
Packit 9f0df5
void *yyalloc (yy_size_t  );
Packit 9f0df5
void *yyrealloc (void *,yy_size_t  );
Packit 9f0df5
void yyfree (void *  );
Packit 9f0df5
Packit 9f0df5
#define yy_new_buffer yy_create_buffer
Packit 9f0df5
Packit 9f0df5
#define yy_set_interactive(is_interactive) \
Packit 9f0df5
	{ \
Packit 9f0df5
	if ( ! YY_CURRENT_BUFFER ){ \
Packit 9f0df5
        yyensure_buffer_stack (); \
Packit 9f0df5
		YY_CURRENT_BUFFER_LVALUE =    \
Packit 9f0df5
            yy_create_buffer(yyin,YY_BUF_SIZE ); \
Packit 9f0df5
	} \
Packit 9f0df5
	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
Packit 9f0df5
	}
Packit 9f0df5
Packit 9f0df5
#define yy_set_bol(at_bol) \
Packit 9f0df5
	{ \
Packit 9f0df5
	if ( ! YY_CURRENT_BUFFER ){\
Packit 9f0df5
        yyensure_buffer_stack (); \
Packit 9f0df5
		YY_CURRENT_BUFFER_LVALUE =    \
Packit 9f0df5
            yy_create_buffer(yyin,YY_BUF_SIZE ); \
Packit 9f0df5
	} \
Packit 9f0df5
	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
Packit 9f0df5
	}
Packit 9f0df5
Packit 9f0df5
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
Packit 9f0df5
Packit 9f0df5
/* Begin user sect3 */
Packit 9f0df5
Packit 9f0df5
#define yywrap() (/*CONSTCOND*/1)
Packit 9f0df5
#define YY_SKIP_YYWRAP
Packit 9f0df5
Packit 9f0df5
typedef unsigned char YY_CHAR;
Packit 9f0df5
Packit 9f0df5
FILE *yyin = NULL, *yyout = NULL;
Packit 9f0df5
Packit 9f0df5
typedef int yy_state_type;
Packit 9f0df5
Packit 9f0df5
extern int yylineno;
Packit 9f0df5
Packit 9f0df5
int yylineno = 1;
Packit 9f0df5
Packit 9f0df5
extern char *yytext;
Packit 9f0df5
#ifdef yytext_ptr
Packit 9f0df5
#undef yytext_ptr
Packit 9f0df5
#endif
Packit 9f0df5
#define yytext_ptr yytext
Packit 9f0df5
Packit 9f0df5
static yy_state_type yy_get_previous_state (void );
Packit 9f0df5
static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
Packit 9f0df5
static int yy_get_next_buffer (void );
Packit 9f0df5
static void yynoreturn yy_fatal_error (yyconst char* msg  );
Packit 9f0df5
Packit 9f0df5
/* Done after the current pattern has been matched and before the
Packit 9f0df5
 * corresponding action - sets up yytext.
Packit 9f0df5
 */
Packit 9f0df5
#define YY_DO_BEFORE_ACTION \
Packit 9f0df5
	(yytext_ptr) = yy_bp; \
Packit 9f0df5
	yyleng = (int) (yy_cp - yy_bp); \
Packit 9f0df5
	(yy_hold_char) = *yy_cp; \
Packit 9f0df5
	*yy_cp = '\0'; \
Packit 9f0df5
	(yy_c_buf_p) = yy_cp;
Packit 9f0df5
Packit 9f0df5
#define YY_NUM_RULES 7
Packit 9f0df5
#define YY_END_OF_BUFFER 8
Packit 9f0df5
/* This struct is not used in this scanner,
Packit 9f0df5
   but its presence is necessary. */
Packit 9f0df5
struct yy_trans_info
Packit 9f0df5
	{
Packit 9f0df5
	flex_int32_t yy_verify;
Packit 9f0df5
	flex_int32_t yy_nxt;
Packit 9f0df5
	};
Packit 9f0df5
static yyconst flex_int16_t yy_accept[39] =
Packit 9f0df5
    {   0,
Packit 9f0df5
        0,    0,    8,    6,    4,    2,    1,    6,    1,    0,
Packit 9f0df5
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
Packit 9f0df5
        0,    0,    0,    0,    0,    0,    0,    0,    0,    3,
Packit 9f0df5
        0,    0,    0,    0,    0,    0,    5,    0
Packit 9f0df5
    } ;
Packit 9f0df5
Packit 9f0df5
static yyconst YY_CHAR yy_ec[256] =
Packit 9f0df5
    {   0,
Packit 9f0df5
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
Packit 9f0df5
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 9f0df5
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 9f0df5
        1,    2,    4,    4,    5,    4,    4,    4,    4,    4,
Packit 9f0df5
        4,    4,    4,    4,    4,    4,    6,    7,    7,    7,
Packit 9f0df5
        7,    7,    7,    7,    7,    7,    7,    4,    4,    8,
Packit 9f0df5
        4,    9,    4,    4,   10,   10,   10,   10,   10,   10,
Packit 9f0df5
       10,   10,   10,   10,   10,   10,   10,   10,   10,   10,
Packit 9f0df5
       10,   10,   10,   10,   10,   10,   10,   10,   10,   10,
Packit 9f0df5
        4,    1,    4,    4,    4,    1,   11,   11,   11,   11,
Packit 9f0df5
Packit 9f0df5
       12,   11,   13,   11,   14,   11,   15,   11,   11,   16,
Packit 9f0df5
       11,   11,   11,   17,   18,   19,   11,   11,   11,   11,
Packit 9f0df5
       20,   11,    1,    1,    1,    4,    1,    1,    1,    1,
Packit 9f0df5
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 9f0df5
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 9f0df5
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 9f0df5
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 9f0df5
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 9f0df5
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 9f0df5
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 9f0df5
Packit 9f0df5
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 9f0df5
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 9f0df5
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 9f0df5
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 9f0df5
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 9f0df5
        1,    1,    1,    1,    1
Packit 9f0df5
    } ;
Packit 9f0df5
Packit 9f0df5
static yyconst YY_CHAR yy_meta[21] =
Packit 9f0df5
    {   0,
Packit 9f0df5
        1,    2,    3,    4,    4,    4,    2,    1,    1,    2,
Packit 9f0df5
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2
Packit 9f0df5
    } ;
Packit 9f0df5
Packit 9f0df5
static yyconst flex_uint16_t yy_base[43] =
Packit 9f0df5
    {   0,
Packit 9f0df5
        0,    7,   49,   50,   50,   50,    0,    1,    0,   36,
Packit 9f0df5
       28,   26,   28,   35,   29,    0,   26,   33,   27,   33,
Packit 9f0df5
       29,   22,    0,   24,   27,   14,   27,   23,   13,   50,
Packit 9f0df5
       10,    9,    4,    1,    0,    2,   50,   50,   19,   23,
Packit 9f0df5
        2,   26
Packit 9f0df5
    } ;
Packit 9f0df5
Packit 9f0df5
static yyconst flex_int16_t yy_def[43] =
Packit 9f0df5
    {   0,
Packit 9f0df5
       39,   39,   38,   38,   38,   38,   40,   38,   40,   38,
Packit 9f0df5
       38,   38,   38,   38,   38,   41,   38,   41,   38,   38,
Packit 9f0df5
       38,   38,   42,   38,   42,   38,   38,   38,   38,   38,
Packit 9f0df5
       38,   38,   38,   38,   38,   38,   38,    0,   38,   38,
Packit 9f0df5
       38,   38
Packit 9f0df5
    } ;
Packit 9f0df5
Packit 9f0df5
static yyconst flex_uint16_t yy_nxt[71] =
Packit 9f0df5
    {   0,
Packit 9f0df5
       38,    5,    6,   18,    7,   38,   38,    8,    5,    6,
Packit 9f0df5
       37,    7,   36,   38,    8,   10,   35,   34,   11,    4,
Packit 9f0df5
        4,    4,    4,    9,    9,   33,    9,   25,   32,   25,
Packit 9f0df5
       31,   30,   29,   28,   27,   26,   24,   23,   22,   21,
Packit 9f0df5
       20,   19,   17,   16,   15,   14,   13,   12,   38,    3,
Packit 9f0df5
       38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
Packit 9f0df5
       38,   38,   38,   38,   38,   38,   38,   38,   38,   38
Packit 9f0df5
    } ;
Packit 9f0df5
Packit 9f0df5
static yyconst flex_int16_t yy_chk[71] =
Packit 9f0df5
    {   0,
Packit 9f0df5
        0,    1,    1,   41,    1,    0,    0,    1,    2,    2,
Packit 9f0df5
       36,    2,   35,    0,    2,    8,   34,   33,    8,   39,
Packit 9f0df5
       39,   39,   39,   40,   40,   32,   40,   42,   31,   42,
Packit 9f0df5
       29,   28,   27,   26,   25,   24,   22,   21,   20,   19,
Packit 9f0df5
       18,   17,   15,   14,   13,   12,   11,   10,    3,   38,
Packit 9f0df5
       38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
Packit 9f0df5
       38,   38,   38,   38,   38,   38,   38,   38,   38,   38
Packit 9f0df5
    } ;
Packit 9f0df5
Packit 9f0df5
static yy_state_type yy_last_accepting_state;
Packit 9f0df5
static char *yy_last_accepting_cpos;
Packit 9f0df5
Packit 9f0df5
extern int yy_flex_debug;
Packit 9f0df5
int yy_flex_debug = 0;
Packit 9f0df5
Packit 9f0df5
/* The intent behind this definition is that it'll catch
Packit 9f0df5
 * any uses of REJECT which flex missed.
Packit 9f0df5
 */
Packit 9f0df5
#define REJECT reject_used_but_not_detected
Packit 9f0df5
#define yymore() yymore_used_but_not_detected
Packit 9f0df5
#define YY_MORE_ADJ 0
Packit 9f0df5
#define YY_RESTORE_YY_MORE_OFFSET
Packit 9f0df5
char *yytext;
Packit 9f0df5
#line 1 "tokenparser.l"
Packit 9f0df5
/*
Packit 9f0df5
 * Reads lexical config files and updates database.
Packit 9f0df5
 *
Packit 9f0df5
 * MUSCLE SmartCard Development ( http://pcsclite.alioth.debian.org/pcsclite.html )
Packit 9f0df5
 *
Packit 9f0df5
 * Copyright (C) 2001-2003
Packit 9f0df5
 *  David Corcoran <corcoran@musclecard.com>
Packit 9f0df5
 * Copyright (C) 2003-2010
Packit 9f0df5
 *  Ludovic Rousseau <ludovic.rousseau@free.fr>
Packit 9f0df5
 *
Packit 9f0df5
Redistribution and use in source and binary forms, with or without
Packit 9f0df5
modification, are permitted provided that the following conditions
Packit 9f0df5
are met:
Packit 9f0df5
Packit 9f0df5
1. Redistributions of source code must retain the above copyright
Packit 9f0df5
   notice, this list of conditions and the following disclaimer.
Packit 9f0df5
2. Redistributions in binary form must reproduce the above copyright
Packit 9f0df5
   notice, this list of conditions and the following disclaimer in the
Packit 9f0df5
   documentation and/or other materials provided with the distribution.
Packit 9f0df5
3. The name of the author may not be used to endorse or promote products
Packit 9f0df5
   derived from this software without specific prior written permission.
Packit 9f0df5
Packit 9f0df5
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
Packit 9f0df5
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
Packit 9f0df5
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
Packit 9f0df5
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
Packit 9f0df5
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
Packit 9f0df5
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
Packit 9f0df5
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
Packit 9f0df5
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Packit 9f0df5
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
Packit 9f0df5
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Packit 9f0df5
 */
Packit 9f0df5
/**
Packit 9f0df5
 * @file
Packit 9f0df5
 * @brief provides parsing functions for Info.plist files
Packit 9f0df5
 * platforms
Packit 9f0df5
 */
Packit 9f0df5
#line 42 "tokenparser.l"
Packit 9f0df5
Packit 9f0df5
#include "config.h"
Packit 9f0df5
#include <stdio.h>
Packit 9f0df5
#include <string.h>
Packit 9f0df5
#include <errno.h>
Packit 9f0df5
#define NDEBUG
Packit 9f0df5
#include <assert.h>
Packit 9f0df5
Packit 9f0df5
#include "simclist.h"
Packit 9f0df5
#include "debuglog.h"
Packit 9f0df5
#include "parser.h"
Packit 9f0df5
Packit 9f0df5
static void eval_key(char *pcToken, list_t *list_key);
Packit 9f0df5
static void eval_value(char *pcToken, list_t *list_values);
Packit 9f0df5
void tperrorCheck (char *pcToken_error);
Packit 9f0df5
Packit 9f0df5
static list_t *ListKeys;
Packit 9f0df5
static list_t *ListValues;
Packit 9f0df5
Packit 9f0df5
#define YY_NO_INPUT 1
Packit 9f0df5
#line 536 "tokenparser.c"
Packit 9f0df5
Packit 9f0df5
#define INITIAL 0
Packit 9f0df5
Packit 9f0df5
#ifndef YY_NO_UNISTD_H
Packit 9f0df5
/* Special case for "unistd.h", since it is non-ANSI. We include it way
Packit 9f0df5
 * down here because we want the user's section 1 to have been scanned first.
Packit 9f0df5
 * The user has a chance to override it with an option.
Packit 9f0df5
 */
Packit 9f0df5
#include <unistd.h>
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
#ifndef YY_EXTRA_TYPE
Packit 9f0df5
#define YY_EXTRA_TYPE void *
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
static int yy_init_globals (void );
Packit 9f0df5
Packit 9f0df5
/* Accessor methods to globals.
Packit 9f0df5
   These are made visible to non-reentrant scanners for convenience. */
Packit 9f0df5
Packit 9f0df5
int yylex_destroy (void );
Packit 9f0df5
Packit 9f0df5
int yyget_debug (void );
Packit 9f0df5
Packit 9f0df5
void yyset_debug (int debug_flag  );
Packit 9f0df5
Packit 9f0df5
YY_EXTRA_TYPE yyget_extra (void );
Packit 9f0df5
Packit 9f0df5
void yyset_extra (YY_EXTRA_TYPE user_defined  );
Packit 9f0df5
Packit 9f0df5
FILE *yyget_in (void );
Packit 9f0df5
Packit 9f0df5
void yyset_in  (FILE * _in_str  );
Packit 9f0df5
Packit 9f0df5
FILE *yyget_out (void );
Packit 9f0df5
Packit 9f0df5
void yyset_out  (FILE * _out_str  );
Packit 9f0df5
Packit 9f0df5
			int yyget_leng (void );
Packit 9f0df5
Packit 9f0df5
char *yyget_text (void );
Packit 9f0df5
Packit 9f0df5
int yyget_lineno (void );
Packit 9f0df5
Packit 9f0df5
void yyset_lineno (int _line_number  );
Packit 9f0df5
Packit 9f0df5
/* Macros after this point can all be overridden by user definitions in
Packit 9f0df5
 * section 1.
Packit 9f0df5
 */
Packit 9f0df5
Packit 9f0df5
#ifndef YY_SKIP_YYWRAP
Packit 9f0df5
#ifdef __cplusplus
Packit 9f0df5
extern "C" int yywrap (void );
Packit 9f0df5
#else
Packit 9f0df5
extern int yywrap (void );
Packit 9f0df5
#endif
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
#ifndef YY_NO_UNPUT
Packit 9f0df5
    
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
#ifndef yytext_ptr
Packit 9f0df5
static void yy_flex_strncpy (char *,yyconst char *,int );
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
#ifdef YY_NEED_STRLEN
Packit 9f0df5
static int yy_flex_strlen (yyconst char * );
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
#ifndef YY_NO_INPUT
Packit 9f0df5
Packit 9f0df5
#ifdef __cplusplus
Packit 9f0df5
static int yyinput (void );
Packit 9f0df5
#else
Packit 9f0df5
static int input (void );
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
/* Amount of stuff to slurp up with each read. */
Packit 9f0df5
#ifndef YY_READ_BUF_SIZE
Packit 9f0df5
#ifdef __ia64__
Packit 9f0df5
/* On IA-64, the buffer size is 16k, not 8k */
Packit 9f0df5
#define YY_READ_BUF_SIZE 16384
Packit 9f0df5
#else
Packit 9f0df5
#define YY_READ_BUF_SIZE 8192
Packit 9f0df5
#endif /* __ia64__ */
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
/* Copy whatever the last rule matched to the standard output. */
Packit 9f0df5
#ifndef ECHO
Packit 9f0df5
/* This used to be an fputs(), but since the string might contain NUL's,
Packit 9f0df5
 * we now use fwrite().
Packit 9f0df5
 */
Packit 9f0df5
#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
Packit 9f0df5
 * is returned in "result".
Packit 9f0df5
 */
Packit 9f0df5
#ifndef YY_INPUT
Packit 9f0df5
#define YY_INPUT(buf,result,max_size) \
Packit 9f0df5
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
Packit 9f0df5
		{ \
Packit 9f0df5
		int c = '*'; \
Packit 9f0df5
		size_t n; \
Packit 9f0df5
		for ( n = 0; n < max_size && \
Packit 9f0df5
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
Packit 9f0df5
			buf[n] = (char) c; \
Packit 9f0df5
		if ( c == '\n' ) \
Packit 9f0df5
			buf[n++] = (char) c; \
Packit 9f0df5
		if ( c == EOF && ferror( yyin ) ) \
Packit 9f0df5
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
Packit 9f0df5
		result = n; \
Packit 9f0df5
		} \
Packit 9f0df5
	else \
Packit 9f0df5
		{ \
Packit 9f0df5
		errno=0; \
Packit 9f0df5
		while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
Packit 9f0df5
			{ \
Packit 9f0df5
			if( errno != EINTR) \
Packit 9f0df5
				{ \
Packit 9f0df5
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
Packit 9f0df5
				break; \
Packit 9f0df5
				} \
Packit 9f0df5
			errno=0; \
Packit 9f0df5
			clearerr(yyin); \
Packit 9f0df5
			} \
Packit 9f0df5
		}\
Packit 9f0df5
\
Packit 9f0df5
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
/* No semi-colon after return; correct usage is to write "yyterminate();" -
Packit 9f0df5
 * we don't want an extra ';' after the "return" because that will cause
Packit 9f0df5
 * some compilers to complain about unreachable statements.
Packit 9f0df5
 */
Packit 9f0df5
#ifndef yyterminate
Packit 9f0df5
#define yyterminate() return YY_NULL
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
/* Number of entries by which start-condition stack grows. */
Packit 9f0df5
#ifndef YY_START_STACK_INCR
Packit 9f0df5
#define YY_START_STACK_INCR 25
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
/* Report a fatal error. */
Packit 9f0df5
#ifndef YY_FATAL_ERROR
Packit 9f0df5
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
/* end tables serialization structures and prototypes */
Packit 9f0df5
Packit 9f0df5
/* Default declaration of generated scanner - a define so the user can
Packit 9f0df5
 * easily add parameters.
Packit 9f0df5
 */
Packit 9f0df5
#ifndef YY_DECL
Packit 9f0df5
#define YY_DECL_IS_OURS 1
Packit 9f0df5
Packit 9f0df5
extern int yylex (void);
Packit 9f0df5
Packit 9f0df5
#define YY_DECL int yylex (void)
Packit 9f0df5
#endif /* !YY_DECL */
Packit 9f0df5
Packit 9f0df5
/* Code executed at the beginning of each rule, after yytext and yyleng
Packit 9f0df5
 * have been set up.
Packit 9f0df5
 */
Packit 9f0df5
#ifndef YY_USER_ACTION
Packit 9f0df5
#define YY_USER_ACTION
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
/* Code executed at the end of each rule. */
Packit 9f0df5
#ifndef YY_BREAK
Packit 9f0df5
#define YY_BREAK /*LINTED*/break;
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
#define YY_RULE_SETUP \
Packit 9f0df5
	YY_USER_ACTION
Packit 9f0df5
Packit 9f0df5
/** The main scanner function which does all the work.
Packit 9f0df5
 */
Packit 9f0df5
YY_DECL
Packit 9f0df5
{
Packit 9f0df5
	yy_state_type yy_current_state;
Packit 9f0df5
	char *yy_cp, *yy_bp;
Packit 9f0df5
	int yy_act;
Packit 9f0df5
    
Packit 9f0df5
	if ( !(yy_init) )
Packit 9f0df5
		{
Packit 9f0df5
		(yy_init) = 1;
Packit 9f0df5
Packit 9f0df5
#ifdef YY_USER_INIT
Packit 9f0df5
		YY_USER_INIT;
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
		if ( ! (yy_start) )
Packit 9f0df5
			(yy_start) = 1;	/* first start state */
Packit 9f0df5
Packit 9f0df5
		if ( ! yyin )
Packit 9f0df5
			yyin = stdin;
Packit 9f0df5
Packit 9f0df5
		if ( ! yyout )
Packit 9f0df5
			yyout = stdout;
Packit 9f0df5
Packit 9f0df5
		if ( ! YY_CURRENT_BUFFER ) {
Packit 9f0df5
			yyensure_buffer_stack ();
Packit 9f0df5
			YY_CURRENT_BUFFER_LVALUE =
Packit 9f0df5
				yy_create_buffer(yyin,YY_BUF_SIZE );
Packit 9f0df5
		}
Packit 9f0df5
Packit 9f0df5
		yy_load_buffer_state( );
Packit 9f0df5
		}
Packit 9f0df5
Packit 9f0df5
	{
Packit 9f0df5
#line 67 "tokenparser.l"
Packit 9f0df5
Packit 9f0df5
Packit 9f0df5
#line 755 "tokenparser.c"
Packit 9f0df5
Packit 9f0df5
	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
Packit 9f0df5
		{
Packit 9f0df5
		yy_cp = (yy_c_buf_p);
Packit 9f0df5
Packit 9f0df5
		/* Support of yytext. */
Packit 9f0df5
		*yy_cp = (yy_hold_char);
Packit 9f0df5
Packit 9f0df5
		/* yy_bp points to the position in yy_ch_buf of the start of
Packit 9f0df5
		 * the current run.
Packit 9f0df5
		 */
Packit 9f0df5
		yy_bp = yy_cp;
Packit 9f0df5
Packit 9f0df5
		yy_current_state = (yy_start);
Packit 9f0df5
yy_match:
Packit 9f0df5
		do
Packit 9f0df5
			{
Packit 9f0df5
			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
Packit 9f0df5
			if ( yy_accept[yy_current_state] )
Packit 9f0df5
				{
Packit 9f0df5
				(yy_last_accepting_state) = yy_current_state;
Packit 9f0df5
				(yy_last_accepting_cpos) = yy_cp;
Packit 9f0df5
				}
Packit 9f0df5
			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
Packit 9f0df5
				{
Packit 9f0df5
				yy_current_state = (int) yy_def[yy_current_state];
Packit 9f0df5
				if ( yy_current_state >= 39 )
Packit 9f0df5
					yy_c = yy_meta[(unsigned int) yy_c];
Packit 9f0df5
				}
Packit 9f0df5
			yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
Packit 9f0df5
			++yy_cp;
Packit 9f0df5
			}
Packit 9f0df5
		while ( yy_base[yy_current_state] != 50 );
Packit 9f0df5
Packit 9f0df5
yy_find_action:
Packit 9f0df5
		yy_act = yy_accept[yy_current_state];
Packit 9f0df5
		if ( yy_act == 0 )
Packit 9f0df5
			{ /* have to back up */
Packit 9f0df5
			yy_cp = (yy_last_accepting_cpos);
Packit 9f0df5
			yy_current_state = (yy_last_accepting_state);
Packit 9f0df5
			yy_act = yy_accept[yy_current_state];
Packit 9f0df5
			}
Packit 9f0df5
Packit 9f0df5
		YY_DO_BEFORE_ACTION;
Packit 9f0df5
Packit 9f0df5
do_action:	/* This label is used only to access EOF actions. */
Packit 9f0df5
Packit 9f0df5
		switch ( yy_act )
Packit 9f0df5
	{ /* beginning of action switch */
Packit 9f0df5
			case 0: /* must back up */
Packit 9f0df5
			/* undo the effects of YY_DO_BEFORE_ACTION */
Packit 9f0df5
			*yy_cp = (yy_hold_char);
Packit 9f0df5
			yy_cp = (yy_last_accepting_cpos);
Packit 9f0df5
			yy_current_state = (yy_last_accepting_state);
Packit 9f0df5
			goto yy_find_action;
Packit 9f0df5
Packit 9f0df5
case 1:
Packit 9f0df5
YY_RULE_SETUP
Packit 9f0df5
#line 69 "tokenparser.l"
Packit 9f0df5
{}
Packit 9f0df5
	YY_BREAK
Packit 9f0df5
case 2:
Packit 9f0df5
/* rule 2 can match eol */
Packit 9f0df5
YY_RULE_SETUP
Packit 9f0df5
#line 70 "tokenparser.l"
Packit 9f0df5
{}
Packit 9f0df5
	YY_BREAK
Packit 9f0df5
case 3:
Packit 9f0df5
YY_RULE_SETUP
Packit 9f0df5
#line 71 "tokenparser.l"
Packit 9f0df5
{ eval_key(yytext, ListKeys); }
Packit 9f0df5
	YY_BREAK
Packit 9f0df5
case 4:
Packit 9f0df5
YY_RULE_SETUP
Packit 9f0df5
#line 72 "tokenparser.l"
Packit 9f0df5
{}
Packit 9f0df5
	YY_BREAK
Packit 9f0df5
case 5:
Packit 9f0df5
YY_RULE_SETUP
Packit 9f0df5
#line 73 "tokenparser.l"
Packit 9f0df5
{ eval_value(yytext, ListValues); }
Packit 9f0df5
	YY_BREAK
Packit 9f0df5
case 6:
Packit 9f0df5
YY_RULE_SETUP
Packit 9f0df5
#line 74 "tokenparser.l"
Packit 9f0df5
{ tperrorCheck(yytext); }
Packit 9f0df5
	YY_BREAK
Packit 9f0df5
case 7:
Packit 9f0df5
YY_RULE_SETUP
Packit 9f0df5
#line 75 "tokenparser.l"
Packit 9f0df5
ECHO;
Packit 9f0df5
	YY_BREAK
Packit 9f0df5
#line 848 "tokenparser.c"
Packit 9f0df5
case YY_STATE_EOF(INITIAL):
Packit 9f0df5
	yyterminate();
Packit 9f0df5
Packit 9f0df5
	case YY_END_OF_BUFFER:
Packit 9f0df5
		{
Packit 9f0df5
		/* Amount of text matched not including the EOB char. */
Packit 9f0df5
		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
Packit 9f0df5
Packit 9f0df5
		/* Undo the effects of YY_DO_BEFORE_ACTION. */
Packit 9f0df5
		*yy_cp = (yy_hold_char);
Packit 9f0df5
		YY_RESTORE_YY_MORE_OFFSET
Packit 9f0df5
Packit 9f0df5
		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
Packit 9f0df5
			{
Packit 9f0df5
			/* We're scanning a new file or input source.  It's
Packit 9f0df5
			 * possible that this happened because the user
Packit 9f0df5
			 * just pointed yyin at a new source and called
Packit 9f0df5
			 * yylex().  If so, then we have to assure
Packit 9f0df5
			 * consistency between YY_CURRENT_BUFFER and our
Packit 9f0df5
			 * globals.  Here is the right place to do so, because
Packit 9f0df5
			 * this is the first action (other than possibly a
Packit 9f0df5
			 * back-up) that will match for the new input source.
Packit 9f0df5
			 */
Packit 9f0df5
			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
Packit 9f0df5
			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
Packit 9f0df5
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
Packit 9f0df5
			}
Packit 9f0df5
Packit 9f0df5
		/* Note that here we test for yy_c_buf_p "<=" to the position
Packit 9f0df5
		 * of the first EOB in the buffer, since yy_c_buf_p will
Packit 9f0df5
		 * already have been incremented past the NUL character
Packit 9f0df5
		 * (since all states make transitions on EOB to the
Packit 9f0df5
		 * end-of-buffer state).  Contrast this with the test
Packit 9f0df5
		 * in input().
Packit 9f0df5
		 */
Packit 9f0df5
		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
Packit 9f0df5
			{ /* This was really a NUL. */
Packit 9f0df5
			yy_state_type yy_next_state;
Packit 9f0df5
Packit 9f0df5
			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
Packit 9f0df5
Packit 9f0df5
			yy_current_state = yy_get_previous_state(  );
Packit 9f0df5
Packit 9f0df5
			/* Okay, we're now positioned to make the NUL
Packit 9f0df5
			 * transition.  We couldn't have
Packit 9f0df5
			 * yy_get_previous_state() go ahead and do it
Packit 9f0df5
			 * for us because it doesn't know how to deal
Packit 9f0df5
			 * with the possibility of jamming (and we don't
Packit 9f0df5
			 * want to build jamming into it because then it
Packit 9f0df5
			 * will run more slowly).
Packit 9f0df5
			 */
Packit 9f0df5
Packit 9f0df5
			yy_next_state = yy_try_NUL_trans( yy_current_state );
Packit 9f0df5
Packit 9f0df5
			yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Packit 9f0df5
Packit 9f0df5
			if ( yy_next_state )
Packit 9f0df5
				{
Packit 9f0df5
				/* Consume the NUL. */
Packit 9f0df5
				yy_cp = ++(yy_c_buf_p);
Packit 9f0df5
				yy_current_state = yy_next_state;
Packit 9f0df5
				goto yy_match;
Packit 9f0df5
				}
Packit 9f0df5
Packit 9f0df5
			else
Packit 9f0df5
				{
Packit 9f0df5
				yy_cp = (yy_c_buf_p);
Packit 9f0df5
				goto yy_find_action;
Packit 9f0df5
				}
Packit 9f0df5
			}
Packit 9f0df5
Packit 9f0df5
		else switch ( yy_get_next_buffer(  ) )
Packit 9f0df5
			{
Packit 9f0df5
			case EOB_ACT_END_OF_FILE:
Packit 9f0df5
				{
Packit 9f0df5
				(yy_did_buffer_switch_on_eof) = 0;
Packit 9f0df5
Packit 9f0df5
				if ( yywrap( ) )
Packit 9f0df5
					{
Packit 9f0df5
					/* Note: because we've taken care in
Packit 9f0df5
					 * yy_get_next_buffer() to have set up
Packit 9f0df5
					 * yytext, we can now set up
Packit 9f0df5
					 * yy_c_buf_p so that if some total
Packit 9f0df5
					 * hoser (like flex itself) wants to
Packit 9f0df5
					 * call the scanner after we return the
Packit 9f0df5
					 * YY_NULL, it'll still work - another
Packit 9f0df5
					 * YY_NULL will get returned.
Packit 9f0df5
					 */
Packit 9f0df5
					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
Packit 9f0df5
Packit 9f0df5
					yy_act = YY_STATE_EOF(YY_START);
Packit 9f0df5
					goto do_action;
Packit 9f0df5
					}
Packit 9f0df5
Packit 9f0df5
				else
Packit 9f0df5
					{
Packit 9f0df5
					if ( ! (yy_did_buffer_switch_on_eof) )
Packit 9f0df5
						YY_NEW_FILE;
Packit 9f0df5
					}
Packit 9f0df5
				break;
Packit 9f0df5
				}
Packit 9f0df5
Packit 9f0df5
			case EOB_ACT_CONTINUE_SCAN:
Packit 9f0df5
				(yy_c_buf_p) =
Packit 9f0df5
					(yytext_ptr) + yy_amount_of_matched_text;
Packit 9f0df5
Packit 9f0df5
				yy_current_state = yy_get_previous_state(  );
Packit 9f0df5
Packit 9f0df5
				yy_cp = (yy_c_buf_p);
Packit 9f0df5
				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Packit 9f0df5
				goto yy_match;
Packit 9f0df5
Packit 9f0df5
			case EOB_ACT_LAST_MATCH:
Packit 9f0df5
				(yy_c_buf_p) =
Packit 9f0df5
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
Packit 9f0df5
Packit 9f0df5
				yy_current_state = yy_get_previous_state(  );
Packit 9f0df5
Packit 9f0df5
				yy_cp = (yy_c_buf_p);
Packit 9f0df5
				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Packit 9f0df5
				goto yy_find_action;
Packit 9f0df5
			}
Packit 9f0df5
		break;
Packit 9f0df5
		}
Packit 9f0df5
Packit 9f0df5
	default:
Packit 9f0df5
		YY_FATAL_ERROR(
Packit 9f0df5
			"fatal flex scanner internal error--no action found" );
Packit 9f0df5
	} /* end of action switch */
Packit 9f0df5
		} /* end of scanning one token */
Packit 9f0df5
	} /* end of user's declarations */
Packit 9f0df5
} /* end of yylex */
Packit 9f0df5
Packit 9f0df5
/* yy_get_next_buffer - try to read in a new buffer
Packit 9f0df5
 *
Packit 9f0df5
 * Returns a code representing an action:
Packit 9f0df5
 *	EOB_ACT_LAST_MATCH -
Packit 9f0df5
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
Packit 9f0df5
 *	EOB_ACT_END_OF_FILE - end of file
Packit 9f0df5
 */
Packit 9f0df5
static int yy_get_next_buffer (void)
Packit 9f0df5
{
Packit 9f0df5
    	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
Packit 9f0df5
	char *source = (yytext_ptr);
Packit 9f0df5
	yy_size_t number_to_move, i;
Packit 9f0df5
	int ret_val;
Packit 9f0df5
Packit 9f0df5
	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
Packit 9f0df5
		YY_FATAL_ERROR(
Packit 9f0df5
		"fatal flex scanner internal error--end of buffer missed" );
Packit 9f0df5
Packit 9f0df5
	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
Packit 9f0df5
		{ /* Don't try to fill the buffer, so this is an EOF. */
Packit 9f0df5
		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
Packit 9f0df5
			{
Packit 9f0df5
			/* We matched a single character, the EOB, so
Packit 9f0df5
			 * treat this as a final EOF.
Packit 9f0df5
			 */
Packit 9f0df5
			return EOB_ACT_END_OF_FILE;
Packit 9f0df5
			}
Packit 9f0df5
Packit 9f0df5
		else
Packit 9f0df5
			{
Packit 9f0df5
			/* We matched some text prior to the EOB, first
Packit 9f0df5
			 * process it.
Packit 9f0df5
			 */
Packit 9f0df5
			return EOB_ACT_LAST_MATCH;
Packit 9f0df5
			}
Packit 9f0df5
		}
Packit 9f0df5
Packit 9f0df5
	/* Try to read more data. */
Packit 9f0df5
Packit 9f0df5
	/* First move last chars to start of buffer. */
Packit 9f0df5
	number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1;
Packit 9f0df5
Packit 9f0df5
	for ( i = 0; i < number_to_move; ++i )
Packit 9f0df5
		*(dest++) = *(source++);
Packit 9f0df5
Packit 9f0df5
	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
Packit 9f0df5
		/* don't do the read, it's not guaranteed to return an EOF,
Packit 9f0df5
		 * just force an EOF
Packit 9f0df5
		 */
Packit 9f0df5
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
Packit 9f0df5
Packit 9f0df5
	else
Packit 9f0df5
		{
Packit 9f0df5
			int num_to_read =
Packit 9f0df5
			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
Packit 9f0df5
Packit 9f0df5
		while ( num_to_read <= 0 )
Packit 9f0df5
			{ /* Not enough room in the buffer - grow it. */
Packit 9f0df5
Packit 9f0df5
			/* just a shorter name for the current buffer */
Packit 9f0df5
			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
Packit 9f0df5
Packit 9f0df5
			int yy_c_buf_p_offset =
Packit 9f0df5
				(int) ((yy_c_buf_p) - b->yy_ch_buf);
Packit 9f0df5
Packit 9f0df5
			if ( b->yy_is_our_buffer )
Packit 9f0df5
				{
Packit 9f0df5
				int new_size = b->yy_buf_size * 2;
Packit 9f0df5
Packit 9f0df5
				if ( new_size <= 0 )
Packit 9f0df5
					b->yy_buf_size += b->yy_buf_size / 8;
Packit 9f0df5
				else
Packit 9f0df5
					b->yy_buf_size *= 2;
Packit 9f0df5
Packit 9f0df5
				b->yy_ch_buf = (char *)
Packit 9f0df5
					/* Include room in for 2 EOB chars. */
Packit 9f0df5
					yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
Packit 9f0df5
				}
Packit 9f0df5
			else
Packit 9f0df5
				/* Can't grow it, we don't own it. */
Packit 9f0df5
				b->yy_ch_buf = NULL;
Packit 9f0df5
Packit 9f0df5
			if ( ! b->yy_ch_buf )
Packit 9f0df5
				YY_FATAL_ERROR(
Packit 9f0df5
				"fatal error - scanner input buffer overflow" );
Packit 9f0df5
Packit 9f0df5
			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
Packit 9f0df5
Packit 9f0df5
			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
Packit 9f0df5
						number_to_move - 1;
Packit 9f0df5
Packit 9f0df5
			}
Packit 9f0df5
Packit 9f0df5
		if ( num_to_read > YY_READ_BUF_SIZE )
Packit 9f0df5
			num_to_read = YY_READ_BUF_SIZE;
Packit 9f0df5
Packit 9f0df5
		/* Read in more data. */
Packit 9f0df5
		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
Packit 9f0df5
			(yy_n_chars), num_to_read );
Packit 9f0df5
Packit 9f0df5
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Packit 9f0df5
		}
Packit 9f0df5
Packit 9f0df5
	if ( (yy_n_chars) == 0 )
Packit 9f0df5
		{
Packit 9f0df5
		if ( number_to_move == YY_MORE_ADJ )
Packit 9f0df5
			{
Packit 9f0df5
			ret_val = EOB_ACT_END_OF_FILE;
Packit 9f0df5
			yyrestart(yyin  );
Packit 9f0df5
			}
Packit 9f0df5
Packit 9f0df5
		else
Packit 9f0df5
			{
Packit 9f0df5
			ret_val = EOB_ACT_LAST_MATCH;
Packit 9f0df5
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
Packit 9f0df5
				YY_BUFFER_EOF_PENDING;
Packit 9f0df5
			}
Packit 9f0df5
		}
Packit 9f0df5
Packit 9f0df5
	else
Packit 9f0df5
		ret_val = EOB_ACT_CONTINUE_SCAN;
Packit 9f0df5
Packit 9f0df5
	if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
Packit 9f0df5
		/* Extend the array by 50%, plus the number we really need. */
Packit 9f0df5
		int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
Packit 9f0df5
		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
Packit 9f0df5
		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
Packit 9f0df5
			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
Packit 9f0df5
	}
Packit 9f0df5
Packit 9f0df5
	(yy_n_chars) += number_to_move;
Packit 9f0df5
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
Packit 9f0df5
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
Packit 9f0df5
Packit 9f0df5
	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
Packit 9f0df5
Packit 9f0df5
	return ret_val;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/* yy_get_previous_state - get the state just before the EOB char was reached */
Packit 9f0df5
Packit 9f0df5
    static yy_state_type yy_get_previous_state (void)
Packit 9f0df5
{
Packit 9f0df5
	yy_state_type yy_current_state;
Packit 9f0df5
	char *yy_cp;
Packit 9f0df5
    
Packit 9f0df5
	yy_current_state = (yy_start);
Packit 9f0df5
Packit 9f0df5
	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
Packit 9f0df5
		{
Packit 9f0df5
		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
Packit 9f0df5
		if ( yy_accept[yy_current_state] )
Packit 9f0df5
			{
Packit 9f0df5
			(yy_last_accepting_state) = yy_current_state;
Packit 9f0df5
			(yy_last_accepting_cpos) = yy_cp;
Packit 9f0df5
			}
Packit 9f0df5
		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
Packit 9f0df5
			{
Packit 9f0df5
			yy_current_state = (int) yy_def[yy_current_state];
Packit 9f0df5
			if ( yy_current_state >= 39 )
Packit 9f0df5
				yy_c = yy_meta[(unsigned int) yy_c];
Packit 9f0df5
			}
Packit 9f0df5
		yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
Packit 9f0df5
		}
Packit 9f0df5
Packit 9f0df5
	return yy_current_state;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/* yy_try_NUL_trans - try to make a transition on the NUL character
Packit 9f0df5
 *
Packit 9f0df5
 * synopsis
Packit 9f0df5
 *	next_state = yy_try_NUL_trans( current_state );
Packit 9f0df5
 */
Packit 9f0df5
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
Packit 9f0df5
{
Packit 9f0df5
	int yy_is_jam;
Packit 9f0df5
    	char *yy_cp = (yy_c_buf_p);
Packit 9f0df5
Packit 9f0df5
	YY_CHAR yy_c = 1;
Packit 9f0df5
	if ( yy_accept[yy_current_state] )
Packit 9f0df5
		{
Packit 9f0df5
		(yy_last_accepting_state) = yy_current_state;
Packit 9f0df5
		(yy_last_accepting_cpos) = yy_cp;
Packit 9f0df5
		}
Packit 9f0df5
	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
Packit 9f0df5
		{
Packit 9f0df5
		yy_current_state = (int) yy_def[yy_current_state];
Packit 9f0df5
		if ( yy_current_state >= 39 )
Packit 9f0df5
			yy_c = yy_meta[(unsigned int) yy_c];
Packit 9f0df5
		}
Packit 9f0df5
	yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
Packit 9f0df5
	yy_is_jam = (yy_current_state == 38);
Packit 9f0df5
Packit 9f0df5
		return yy_is_jam ? 0 : yy_current_state;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
#ifndef YY_NO_UNPUT
Packit 9f0df5
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
#ifndef YY_NO_INPUT
Packit 9f0df5
#ifdef __cplusplus
Packit 9f0df5
    static int yyinput (void)
Packit 9f0df5
#else
Packit 9f0df5
    static int input  (void)
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
{
Packit 9f0df5
	int c;
Packit 9f0df5
    
Packit 9f0df5
	*(yy_c_buf_p) = (yy_hold_char);
Packit 9f0df5
Packit 9f0df5
	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
Packit 9f0df5
		{
Packit 9f0df5
		/* yy_c_buf_p now points to the character we want to return.
Packit 9f0df5
		 * If this occurs *before* the EOB characters, then it's a
Packit 9f0df5
		 * valid NUL; if not, then we've hit the end of the buffer.
Packit 9f0df5
		 */
Packit 9f0df5
		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
Packit 9f0df5
			/* This was really a NUL. */
Packit 9f0df5
			*(yy_c_buf_p) = '\0';
Packit 9f0df5
Packit 9f0df5
		else
Packit 9f0df5
			{ /* need more input */
Packit 9f0df5
			int offset = (yy_c_buf_p) - (yytext_ptr);
Packit 9f0df5
			++(yy_c_buf_p);
Packit 9f0df5
Packit 9f0df5
			switch ( yy_get_next_buffer(  ) )
Packit 9f0df5
				{
Packit 9f0df5
				case EOB_ACT_LAST_MATCH:
Packit 9f0df5
					/* This happens because yy_g_n_b()
Packit 9f0df5
					 * sees that we've accumulated a
Packit 9f0df5
					 * token and flags that we need to
Packit 9f0df5
					 * try matching the token before
Packit 9f0df5
					 * proceeding.  But for input(),
Packit 9f0df5
					 * there's no matching to consider.
Packit 9f0df5
					 * So convert the EOB_ACT_LAST_MATCH
Packit 9f0df5
					 * to EOB_ACT_END_OF_FILE.
Packit 9f0df5
					 */
Packit 9f0df5
Packit 9f0df5
					/* Reset buffer status. */
Packit 9f0df5
					yyrestart(yyin );
Packit 9f0df5
Packit 9f0df5
					/*FALLTHROUGH*/
Packit 9f0df5
Packit 9f0df5
				case EOB_ACT_END_OF_FILE:
Packit 9f0df5
					{
Packit 9f0df5
					if ( yywrap( ) )
Packit 9f0df5
						return 0;
Packit 9f0df5
Packit 9f0df5
					if ( ! (yy_did_buffer_switch_on_eof) )
Packit 9f0df5
						YY_NEW_FILE;
Packit 9f0df5
#ifdef __cplusplus
Packit 9f0df5
					return yyinput();
Packit 9f0df5
#else
Packit 9f0df5
					return input();
Packit 9f0df5
#endif
Packit 9f0df5
					}
Packit 9f0df5
Packit 9f0df5
				case EOB_ACT_CONTINUE_SCAN:
Packit 9f0df5
					(yy_c_buf_p) = (yytext_ptr) + offset;
Packit 9f0df5
					break;
Packit 9f0df5
				}
Packit 9f0df5
			}
Packit 9f0df5
		}
Packit 9f0df5
Packit 9f0df5
	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
Packit 9f0df5
	*(yy_c_buf_p) = '\0';	/* preserve yytext */
Packit 9f0df5
	(yy_hold_char) = *++(yy_c_buf_p);
Packit 9f0df5
Packit 9f0df5
	return c;
Packit 9f0df5
}
Packit 9f0df5
#endif	/* ifndef YY_NO_INPUT */
Packit 9f0df5
Packit 9f0df5
/** Immediately switch to a different input stream.
Packit 9f0df5
 * @param input_file A readable stream.
Packit 9f0df5
 * 
Packit 9f0df5
 * @note This function does not reset the start condition to @c INITIAL .
Packit 9f0df5
 */
Packit 9f0df5
    void yyrestart  (FILE * input_file )
Packit 9f0df5
{
Packit 9f0df5
    
Packit 9f0df5
	if ( ! YY_CURRENT_BUFFER ){
Packit 9f0df5
        yyensure_buffer_stack ();
Packit 9f0df5
		YY_CURRENT_BUFFER_LVALUE =
Packit 9f0df5
            yy_create_buffer(yyin,YY_BUF_SIZE );
Packit 9f0df5
	}
Packit 9f0df5
Packit 9f0df5
	yy_init_buffer(YY_CURRENT_BUFFER,input_file );
Packit 9f0df5
	yy_load_buffer_state( );
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/** Switch to a different input buffer.
Packit 9f0df5
 * @param new_buffer The new input buffer.
Packit 9f0df5
 * 
Packit 9f0df5
 */
Packit 9f0df5
    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
Packit 9f0df5
{
Packit 9f0df5
    
Packit 9f0df5
	/* TODO. We should be able to replace this entire function body
Packit 9f0df5
	 * with
Packit 9f0df5
	 *		yypop_buffer_state();
Packit 9f0df5
	 *		yypush_buffer_state(new_buffer);
Packit 9f0df5
     */
Packit 9f0df5
	yyensure_buffer_stack ();
Packit 9f0df5
	if ( YY_CURRENT_BUFFER == new_buffer )
Packit 9f0df5
		return;
Packit 9f0df5
Packit 9f0df5
	if ( YY_CURRENT_BUFFER )
Packit 9f0df5
		{
Packit 9f0df5
		/* Flush out information for old buffer. */
Packit 9f0df5
		*(yy_c_buf_p) = (yy_hold_char);
Packit 9f0df5
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
Packit 9f0df5
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Packit 9f0df5
		}
Packit 9f0df5
Packit 9f0df5
	YY_CURRENT_BUFFER_LVALUE = new_buffer;
Packit 9f0df5
	yy_load_buffer_state( );
Packit 9f0df5
Packit 9f0df5
	/* We don't actually know whether we did this switch during
Packit 9f0df5
	 * EOF (yywrap()) processing, but the only time this flag
Packit 9f0df5
	 * is looked at is after yywrap() is called, so it's safe
Packit 9f0df5
	 * to go ahead and always set it.
Packit 9f0df5
	 */
Packit 9f0df5
	(yy_did_buffer_switch_on_eof) = 1;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
static void yy_load_buffer_state  (void)
Packit 9f0df5
{
Packit 9f0df5
    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
Packit 9f0df5
	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
Packit 9f0df5
	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
Packit 9f0df5
	(yy_hold_char) = *(yy_c_buf_p);
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/** Allocate and initialize an input buffer state.
Packit 9f0df5
 * @param file A readable stream.
Packit 9f0df5
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
Packit 9f0df5
 * 
Packit 9f0df5
 * @return the allocated buffer state.
Packit 9f0df5
 */
Packit 9f0df5
    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
Packit 9f0df5
{
Packit 9f0df5
	YY_BUFFER_STATE b;
Packit 9f0df5
    
Packit 9f0df5
	b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
Packit 9f0df5
	if ( ! b )
Packit 9f0df5
		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
Packit 9f0df5
Packit 9f0df5
	b->yy_buf_size = (yy_size_t)size;
Packit 9f0df5
Packit 9f0df5
	/* yy_ch_buf has to be 2 characters longer than the size given because
Packit 9f0df5
	 * we need to put in 2 end-of-buffer characters.
Packit 9f0df5
	 */
Packit 9f0df5
	b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
Packit 9f0df5
	if ( ! b->yy_ch_buf )
Packit 9f0df5
		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
Packit 9f0df5
Packit 9f0df5
	b->yy_is_our_buffer = 1;
Packit 9f0df5
Packit 9f0df5
	yy_init_buffer(b,file );
Packit 9f0df5
Packit 9f0df5
	return b;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/** Destroy the buffer.
Packit 9f0df5
 * @param b a buffer created with yy_create_buffer()
Packit 9f0df5
 * 
Packit 9f0df5
 */
Packit 9f0df5
    void yy_delete_buffer (YY_BUFFER_STATE  b )
Packit 9f0df5
{
Packit 9f0df5
    
Packit 9f0df5
	if ( ! b )
Packit 9f0df5
		return;
Packit 9f0df5
Packit 9f0df5
	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
Packit 9f0df5
		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
Packit 9f0df5
Packit 9f0df5
	if ( b->yy_is_our_buffer )
Packit 9f0df5
		yyfree((void *) b->yy_ch_buf  );
Packit 9f0df5
Packit 9f0df5
	yyfree((void *) b  );
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/* Initializes or reinitializes a buffer.
Packit 9f0df5
 * This function is sometimes called more than once on the same buffer,
Packit 9f0df5
 * such as during a yyrestart() or at EOF.
Packit 9f0df5
 */
Packit 9f0df5
    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
Packit 9f0df5
Packit 9f0df5
{
Packit 9f0df5
	int oerrno = errno;
Packit 9f0df5
    
Packit 9f0df5
	yy_flush_buffer(b );
Packit 9f0df5
Packit 9f0df5
	b->yy_input_file = file;
Packit 9f0df5
	b->yy_fill_buffer = 1;
Packit 9f0df5
Packit 9f0df5
    /* If b is the current buffer, then yy_init_buffer was _probably_
Packit 9f0df5
     * called from yyrestart() or through yy_get_next_buffer.
Packit 9f0df5
     * In that case, we don't want to reset the lineno or column.
Packit 9f0df5
     */
Packit 9f0df5
    if (b != YY_CURRENT_BUFFER){
Packit 9f0df5
        b->yy_bs_lineno = 1;
Packit 9f0df5
        b->yy_bs_column = 0;
Packit 9f0df5
    }
Packit 9f0df5
Packit 9f0df5
        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
Packit 9f0df5
    
Packit 9f0df5
	errno = oerrno;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
Packit 9f0df5
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
Packit 9f0df5
 * 
Packit 9f0df5
 */
Packit 9f0df5
    void yy_flush_buffer (YY_BUFFER_STATE  b )
Packit 9f0df5
{
Packit 9f0df5
    	if ( ! b )
Packit 9f0df5
		return;
Packit 9f0df5
Packit 9f0df5
	b->yy_n_chars = 0;
Packit 9f0df5
Packit 9f0df5
	/* We always need two end-of-buffer characters.  The first causes
Packit 9f0df5
	 * a transition to the end-of-buffer state.  The second causes
Packit 9f0df5
	 * a jam in that state.
Packit 9f0df5
	 */
Packit 9f0df5
	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
Packit 9f0df5
	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
Packit 9f0df5
Packit 9f0df5
	b->yy_buf_pos = &b->yy_ch_buf[0];
Packit 9f0df5
Packit 9f0df5
	b->yy_at_bol = 1;
Packit 9f0df5
	b->yy_buffer_status = YY_BUFFER_NEW;
Packit 9f0df5
Packit 9f0df5
	if ( b == YY_CURRENT_BUFFER )
Packit 9f0df5
		yy_load_buffer_state( );
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/** Pushes the new state onto the stack. The new state becomes
Packit 9f0df5
 *  the current state. This function will allocate the stack
Packit 9f0df5
 *  if necessary.
Packit 9f0df5
 *  @param new_buffer The new state.
Packit 9f0df5
 *  
Packit 9f0df5
 */
Packit 9f0df5
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
Packit 9f0df5
{
Packit 9f0df5
    	if (new_buffer == NULL)
Packit 9f0df5
		return;
Packit 9f0df5
Packit 9f0df5
	yyensure_buffer_stack();
Packit 9f0df5
Packit 9f0df5
	/* This block is copied from yy_switch_to_buffer. */
Packit 9f0df5
	if ( YY_CURRENT_BUFFER )
Packit 9f0df5
		{
Packit 9f0df5
		/* Flush out information for old buffer. */
Packit 9f0df5
		*(yy_c_buf_p) = (yy_hold_char);
Packit 9f0df5
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
Packit 9f0df5
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Packit 9f0df5
		}
Packit 9f0df5
Packit 9f0df5
	/* Only push if top exists. Otherwise, replace top. */
Packit 9f0df5
	if (YY_CURRENT_BUFFER)
Packit 9f0df5
		(yy_buffer_stack_top)++;
Packit 9f0df5
	YY_CURRENT_BUFFER_LVALUE = new_buffer;
Packit 9f0df5
Packit 9f0df5
	/* copied from yy_switch_to_buffer. */
Packit 9f0df5
	yy_load_buffer_state( );
Packit 9f0df5
	(yy_did_buffer_switch_on_eof) = 1;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/** Removes and deletes the top of the stack, if present.
Packit 9f0df5
 *  The next element becomes the new top.
Packit 9f0df5
 *  
Packit 9f0df5
 */
Packit 9f0df5
void yypop_buffer_state (void)
Packit 9f0df5
{
Packit 9f0df5
    	if (!YY_CURRENT_BUFFER)
Packit 9f0df5
		return;
Packit 9f0df5
Packit 9f0df5
	yy_delete_buffer(YY_CURRENT_BUFFER );
Packit 9f0df5
	YY_CURRENT_BUFFER_LVALUE = NULL;
Packit 9f0df5
	if ((yy_buffer_stack_top) > 0)
Packit 9f0df5
		--(yy_buffer_stack_top);
Packit 9f0df5
Packit 9f0df5
	if (YY_CURRENT_BUFFER) {
Packit 9f0df5
		yy_load_buffer_state( );
Packit 9f0df5
		(yy_did_buffer_switch_on_eof) = 1;
Packit 9f0df5
	}
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/* Allocates the stack if it does not exist.
Packit 9f0df5
 *  Guarantees space for at least one push.
Packit 9f0df5
 */
Packit 9f0df5
static void yyensure_buffer_stack (void)
Packit 9f0df5
{
Packit 9f0df5
	int num_to_alloc;
Packit 9f0df5
    
Packit 9f0df5
	if (!(yy_buffer_stack)) {
Packit 9f0df5
Packit 9f0df5
		/* First allocation is just for 2 elements, since we don't know if this
Packit 9f0df5
		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
Packit 9f0df5
		 * immediate realloc on the next call.
Packit 9f0df5
         */
Packit 9f0df5
      num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
Packit 9f0df5
		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
Packit 9f0df5
								(num_to_alloc * sizeof(struct yy_buffer_state*)
Packit 9f0df5
								);
Packit 9f0df5
		if ( ! (yy_buffer_stack) )
Packit 9f0df5
			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
Packit 9f0df5
								  
Packit 9f0df5
		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
Packit 9f0df5
				
Packit 9f0df5
		(yy_buffer_stack_max) = num_to_alloc;
Packit 9f0df5
		(yy_buffer_stack_top) = 0;
Packit 9f0df5
		return;
Packit 9f0df5
	}
Packit 9f0df5
Packit 9f0df5
	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
Packit 9f0df5
Packit 9f0df5
		/* Increase the buffer to prepare for a possible push. */
Packit 9f0df5
		yy_size_t grow_size = 8 /* arbitrary grow size */;
Packit 9f0df5
Packit 9f0df5
		num_to_alloc = (yy_buffer_stack_max) + grow_size;
Packit 9f0df5
		(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
Packit 9f0df5
								((yy_buffer_stack),
Packit 9f0df5
								num_to_alloc * sizeof(struct yy_buffer_state*)
Packit 9f0df5
								);
Packit 9f0df5
		if ( ! (yy_buffer_stack) )
Packit 9f0df5
			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
Packit 9f0df5
Packit 9f0df5
		/* zero only the new slots.*/
Packit 9f0df5
		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
Packit 9f0df5
		(yy_buffer_stack_max) = num_to_alloc;
Packit 9f0df5
	}
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/** Setup the input buffer state to scan directly from a user-specified character buffer.
Packit 9f0df5
 * @param base the character buffer
Packit 9f0df5
 * @param size the size in bytes of the character buffer
Packit 9f0df5
 * 
Packit 9f0df5
 * @return the newly allocated buffer state object. 
Packit 9f0df5
 */
Packit 9f0df5
YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
Packit 9f0df5
{
Packit 9f0df5
	YY_BUFFER_STATE b;
Packit 9f0df5
    
Packit 9f0df5
	if ( size < 2 ||
Packit 9f0df5
	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
Packit 9f0df5
	     base[size-1] != YY_END_OF_BUFFER_CHAR )
Packit 9f0df5
		/* They forgot to leave room for the EOB's. */
Packit 9f0df5
		return NULL;
Packit 9f0df5
Packit 9f0df5
	b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
Packit 9f0df5
	if ( ! b )
Packit 9f0df5
		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
Packit 9f0df5
Packit 9f0df5
	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
Packit 9f0df5
	b->yy_buf_pos = b->yy_ch_buf = base;
Packit 9f0df5
	b->yy_is_our_buffer = 0;
Packit 9f0df5
	b->yy_input_file = NULL;
Packit 9f0df5
	b->yy_n_chars = b->yy_buf_size;
Packit 9f0df5
	b->yy_is_interactive = 0;
Packit 9f0df5
	b->yy_at_bol = 1;
Packit 9f0df5
	b->yy_fill_buffer = 0;
Packit 9f0df5
	b->yy_buffer_status = YY_BUFFER_NEW;
Packit 9f0df5
Packit 9f0df5
	yy_switch_to_buffer(b  );
Packit 9f0df5
Packit 9f0df5
	return b;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/** Setup the input buffer state to scan a string. The next call to yylex() will
Packit 9f0df5
 * scan from a @e copy of @a str.
Packit 9f0df5
 * @param yystr a NUL-terminated string to scan
Packit 9f0df5
 * 
Packit 9f0df5
 * @return the newly allocated buffer state object.
Packit 9f0df5
 * @note If you want to scan bytes that may contain NUL values, then use
Packit 9f0df5
 *       yy_scan_bytes() instead.
Packit 9f0df5
 */
Packit 9f0df5
YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
Packit 9f0df5
{
Packit 9f0df5
    
Packit 9f0df5
	return yy_scan_bytes(yystr,(int) strlen(yystr) );
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
Packit 9f0df5
 * scan from a @e copy of @a bytes.
Packit 9f0df5
 * @param yybytes the byte buffer to scan
Packit 9f0df5
 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
Packit 9f0df5
 * 
Packit 9f0df5
 * @return the newly allocated buffer state object.
Packit 9f0df5
 */
Packit 9f0df5
YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
Packit 9f0df5
{
Packit 9f0df5
	YY_BUFFER_STATE b;
Packit 9f0df5
	char *buf;
Packit 9f0df5
	yy_size_t n;
Packit 9f0df5
	yy_size_t i;
Packit 9f0df5
    
Packit 9f0df5
	/* Get memory for full buffer, including space for trailing EOB's. */
Packit 9f0df5
	n = (yy_size_t) _yybytes_len + 2;
Packit 9f0df5
	buf = (char *) yyalloc(n  );
Packit 9f0df5
	if ( ! buf )
Packit 9f0df5
		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
Packit 9f0df5
Packit 9f0df5
	for ( i = 0; i < _yybytes_len; ++i )
Packit 9f0df5
		buf[i] = yybytes[i];
Packit 9f0df5
Packit 9f0df5
	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
Packit 9f0df5
Packit 9f0df5
	b = yy_scan_buffer(buf,n );
Packit 9f0df5
	if ( ! b )
Packit 9f0df5
		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
Packit 9f0df5
Packit 9f0df5
	/* It's okay to grow etc. this buffer, and we should throw it
Packit 9f0df5
	 * away when we're done.
Packit 9f0df5
	 */
Packit 9f0df5
	b->yy_is_our_buffer = 1;
Packit 9f0df5
Packit 9f0df5
	return b;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
#ifndef YY_EXIT_FAILURE
Packit 9f0df5
#define YY_EXIT_FAILURE 2
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
static void yynoreturn yy_fatal_error (yyconst char* msg )
Packit 9f0df5
{
Packit 9f0df5
			(void) fprintf( stderr, "%s\n", msg );
Packit 9f0df5
	exit( YY_EXIT_FAILURE );
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/* Redefine yyless() so it works in section 3 code. */
Packit 9f0df5
Packit 9f0df5
#undef yyless
Packit 9f0df5
#define yyless(n) \
Packit 9f0df5
	do \
Packit 9f0df5
		{ \
Packit 9f0df5
		/* Undo effects of setting up yytext. */ \
Packit 9f0df5
        int yyless_macro_arg = (n); \
Packit 9f0df5
        YY_LESS_LINENO(yyless_macro_arg);\
Packit 9f0df5
		yytext[yyleng] = (yy_hold_char); \
Packit 9f0df5
		(yy_c_buf_p) = yytext + yyless_macro_arg; \
Packit 9f0df5
		(yy_hold_char) = *(yy_c_buf_p); \
Packit 9f0df5
		*(yy_c_buf_p) = '\0'; \
Packit 9f0df5
		yyleng = yyless_macro_arg; \
Packit 9f0df5
		} \
Packit 9f0df5
	while ( 0 )
Packit 9f0df5
Packit 9f0df5
/* Accessor  methods (get/set functions) to struct members. */
Packit 9f0df5
Packit 9f0df5
/** Get the current line number.
Packit 9f0df5
 * 
Packit 9f0df5
 */
Packit 9f0df5
int yyget_lineno  (void)
Packit 9f0df5
{
Packit 9f0df5
        
Packit 9f0df5
    return yylineno;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/** Get the input stream.
Packit 9f0df5
 * 
Packit 9f0df5
 */
Packit 9f0df5
FILE *yyget_in  (void)
Packit 9f0df5
{
Packit 9f0df5
        return yyin;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/** Get the output stream.
Packit 9f0df5
 * 
Packit 9f0df5
 */
Packit 9f0df5
FILE *yyget_out  (void)
Packit 9f0df5
{
Packit 9f0df5
        return yyout;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/** Get the length of the current token.
Packit 9f0df5
 * 
Packit 9f0df5
 */
Packit 9f0df5
int yyget_leng  (void)
Packit 9f0df5
{
Packit 9f0df5
        return yyleng;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/** Get the current token.
Packit 9f0df5
 * 
Packit 9f0df5
 */
Packit 9f0df5
Packit 9f0df5
char *yyget_text  (void)
Packit 9f0df5
{
Packit 9f0df5
        return yytext;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/** Set the current line number.
Packit 9f0df5
 * @param _line_number line number
Packit 9f0df5
 * 
Packit 9f0df5
 */
Packit 9f0df5
void yyset_lineno (int  _line_number )
Packit 9f0df5
{
Packit 9f0df5
    
Packit 9f0df5
    yylineno = _line_number;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/** Set the input stream. This does not discard the current
Packit 9f0df5
 * input buffer.
Packit 9f0df5
 * @param _in_str A readable stream.
Packit 9f0df5
 * 
Packit 9f0df5
 * @see yy_switch_to_buffer
Packit 9f0df5
 */
Packit 9f0df5
void yyset_in (FILE *  _in_str )
Packit 9f0df5
{
Packit 9f0df5
        yyin = _in_str ;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
void yyset_out (FILE *  _out_str )
Packit 9f0df5
{
Packit 9f0df5
        yyout = _out_str ;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
int yyget_debug  (void)
Packit 9f0df5
{
Packit 9f0df5
        return yy_flex_debug;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
void yyset_debug (int  _bdebug )
Packit 9f0df5
{
Packit 9f0df5
        yy_flex_debug = _bdebug ;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
static int yy_init_globals (void)
Packit 9f0df5
{
Packit 9f0df5
        /* Initialization is the same as for the non-reentrant scanner.
Packit 9f0df5
     * This function is called from yylex_destroy(), so don't allocate here.
Packit 9f0df5
     */
Packit 9f0df5
Packit 9f0df5
    (yy_buffer_stack) = NULL;
Packit 9f0df5
    (yy_buffer_stack_top) = 0;
Packit 9f0df5
    (yy_buffer_stack_max) = 0;
Packit 9f0df5
    (yy_c_buf_p) = NULL;
Packit 9f0df5
    (yy_init) = 0;
Packit 9f0df5
    (yy_start) = 0;
Packit 9f0df5
Packit 9f0df5
/* Defined in main.c */
Packit 9f0df5
#ifdef YY_STDINIT
Packit 9f0df5
    yyin = stdin;
Packit 9f0df5
    yyout = stdout;
Packit 9f0df5
#else
Packit 9f0df5
    yyin = NULL;
Packit 9f0df5
    yyout = NULL;
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
    /* For future reference: Set errno on error, since we are called by
Packit 9f0df5
     * yylex_init()
Packit 9f0df5
     */
Packit 9f0df5
    return 0;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
Packit 9f0df5
int yylex_destroy  (void)
Packit 9f0df5
{
Packit 9f0df5
    
Packit 9f0df5
    /* Pop the buffer stack, destroying each element. */
Packit 9f0df5
	while(YY_CURRENT_BUFFER){
Packit 9f0df5
		yy_delete_buffer(YY_CURRENT_BUFFER  );
Packit 9f0df5
		YY_CURRENT_BUFFER_LVALUE = NULL;
Packit 9f0df5
		yypop_buffer_state();
Packit 9f0df5
	}
Packit 9f0df5
Packit 9f0df5
	/* Destroy the stack itself. */
Packit 9f0df5
	yyfree((yy_buffer_stack) );
Packit 9f0df5
	(yy_buffer_stack) = NULL;
Packit 9f0df5
Packit 9f0df5
    /* Reset the globals. This is important in a non-reentrant scanner so the next time
Packit 9f0df5
     * yylex() is called, initialization will occur. */
Packit 9f0df5
    yy_init_globals( );
Packit 9f0df5
Packit 9f0df5
    return 0;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/*
Packit 9f0df5
 * Internal utility routines.
Packit 9f0df5
 */
Packit 9f0df5
Packit 9f0df5
#ifndef yytext_ptr
Packit 9f0df5
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
Packit 9f0df5
{
Packit 9f0df5
		
Packit 9f0df5
	int i;
Packit 9f0df5
	for ( i = 0; i < n; ++i )
Packit 9f0df5
		s1[i] = s2[i];
Packit 9f0df5
}
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
#ifdef YY_NEED_STRLEN
Packit 9f0df5
static int yy_flex_strlen (yyconst char * s )
Packit 9f0df5
{
Packit 9f0df5
	int n;
Packit 9f0df5
	for ( n = 0; s[n]; ++n )
Packit 9f0df5
		;
Packit 9f0df5
Packit 9f0df5
	return n;
Packit 9f0df5
}
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
void *yyalloc (yy_size_t  size )
Packit 9f0df5
{
Packit 9f0df5
			return malloc(size);
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
void *yyrealloc  (void * ptr, yy_size_t  size )
Packit 9f0df5
{
Packit 9f0df5
		
Packit 9f0df5
	/* The cast to (char *) in the following accommodates both
Packit 9f0df5
	 * implementations that use char* generic pointers, and those
Packit 9f0df5
	 * that use void* generic pointers.  It works with the latter
Packit 9f0df5
	 * because both ANSI C and C++ allow castless assignment from
Packit 9f0df5
	 * any pointer type to void*, and deal with argument conversions
Packit 9f0df5
	 * as though doing an assignment.
Packit 9f0df5
	 */
Packit 9f0df5
	return realloc(ptr, size);
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
void yyfree (void * ptr )
Packit 9f0df5
{
Packit 9f0df5
			free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
#define YYTABLES_NAME "yytables"
Packit 9f0df5
Packit 9f0df5
#line 75 "tokenparser.l"
Packit 9f0df5
Packit 9f0df5
Packit 9f0df5
Packit 9f0df5
Packit 9f0df5
static void eval_key(char *pcToken, list_t *list_key)
Packit 9f0df5
{
Packit 9f0df5
	struct bundleElt *elt;
Packit 9f0df5
	int r;
Packit 9f0df5
	size_t len;
Packit 9f0df5
Packit 9f0df5
	/* create a new list element */
Packit 9f0df5
	elt = malloc(sizeof(*elt));
Packit 9f0df5
	assert(elt);
Packit 9f0df5
Packit 9f0df5
	/* <key>foobar</key>
Packit 9f0df5
	 * 012345 : 5 is the first key character index */
Packit 9f0df5
Packit 9f0df5
	/* calculate the argument length */
Packit 9f0df5
	for (len=0; pcToken[len+5] != '<'; len++)
Packit 9f0df5
		;
Packit 9f0df5
	len++;	/* final NULL byte */
Packit 9f0df5
Packit 9f0df5
	elt->key = malloc(len);
Packit 9f0df5
	memcpy(elt->key, &pcToken[5], len-1);
Packit 9f0df5
	elt->key[len-1] = '\0';
Packit 9f0df5
Packit 9f0df5
	r = list_init(&elt->values);
Packit 9f0df5
	assert(r >= 0);
Packit 9f0df5
	(void)r;
Packit 9f0df5
Packit 9f0df5
	/* add the key/values */
Packit 9f0df5
	list_append(list_key, elt);
Packit 9f0df5
Packit 9f0df5
	/* set the list to store the values */
Packit 9f0df5
	ListValues = &elt->values;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
static void eval_value(char *pcToken, list_t *list_values)
Packit 9f0df5
{
Packit 9f0df5
	int r;
Packit 9f0df5
	size_t len;
Packit 9f0df5
	char *value;
Packit 9f0df5
	char *amp;
Packit 9f0df5
Packit 9f0df5
	/* <string>foobar</string>
Packit 9f0df5
	 * 012345678 : 8 is the first string character index */
Packit 9f0df5
Packit 9f0df5
	/* calculate the argument length */
Packit 9f0df5
	for (len=0; pcToken[len+8] != '<'; len++)
Packit 9f0df5
		;
Packit 9f0df5
	len++;	/* final NULL byte */
Packit 9f0df5
Packit 9f0df5
	value = malloc(len);
Packit 9f0df5
	assert(value);
Packit 9f0df5
Packit 9f0df5
	memcpy(value, &pcToken[8], len-1);
Packit 9f0df5
	value[len-1] = '\0';
Packit 9f0df5
Packit 9f0df5
	/* for all & in the string */
Packit 9f0df5
	amp = value;
Packit 9f0df5
	while ((amp = strstr(amp, "&")) != NULL)
Packit 9f0df5
	{
Packit 9f0df5
		char *p;
Packit 9f0df5
Packit 9f0df5
		/* just skip "amp;" substring (4 letters) */
Packit 9f0df5
		for (p = amp+1; *(p+4); p++)
Packit 9f0df5
		{
Packit 9f0df5
			*p = *(p+4);
Packit 9f0df5
		}
Packit 9f0df5
		/* terminate the now shorter string */
Packit 9f0df5
		*p = '\0';
Packit 9f0df5
Packit 9f0df5
		/* skip the & and continue */
Packit 9f0df5
		amp++;
Packit 9f0df5
	}
Packit 9f0df5
Packit 9f0df5
	r = list_append(list_values, value);
Packit 9f0df5
	assert(r >= 0);
Packit 9f0df5
	(void)r;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
void tperrorCheck (char *token_error)
Packit 9f0df5
{
Packit 9f0df5
    (void)token_error;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/**
Packit 9f0df5
 * Find an optional key in a configuration file
Packit 9f0df5
 * No error is logged if the key is not found
Packit 9f0df5
 *
Packit 9f0df5
 * @param l list generated by bundleParse()
Packit 9f0df5
 * @param key searched key
Packit 9f0df5
 * @param[out] values list of token value (if key found)
Packit 9f0df5
 * @retval 0 OK
Packit 9f0df5
 * @retval 1 key not found
Packit 9f0df5
 */
Packit 9f0df5
int LTPBundleFindValueWithKey(list_t *l, const char *key, list_t **values)
Packit 9f0df5
{
Packit 9f0df5
	unsigned int i;
Packit 9f0df5
	int ret = 1;
Packit 9f0df5
Packit 9f0df5
	for (i=0; i < list_size(l); i++)
Packit 9f0df5
	{
Packit 9f0df5
		struct bundleElt *elt;
Packit 9f0df5
Packit 9f0df5
		elt = list_get_at(l, i);
Packit 9f0df5
		assert(elt);
Packit 9f0df5
Packit 9f0df5
		if (0 == strcmp(elt->key, key))
Packit 9f0df5
		{
Packit 9f0df5
			*values = &elt->values;
Packit 9f0df5
			ret = 0;
Packit 9f0df5
		}
Packit 9f0df5
	}
Packit 9f0df5
Packit 9f0df5
	return ret;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
Packit 9f0df5
/**
Packit 9f0df5
 * Parse a Info.plist file and file a list
Packit 9f0df5
 *
Packit 9f0df5
 * @param fileName file name
Packit 9f0df5
 * @param l list containing the results
Packit 9f0df5
 * @retval -1 configuration file not found
Packit 9f0df5
 * @retval 0 OK
Packit 9f0df5
 */
Packit 9f0df5
int bundleParse(const char *fileName, list_t *l)
Packit 9f0df5
{
Packit 9f0df5
	FILE *file = NULL;
Packit 9f0df5
	int r;
Packit 9f0df5
#ifndef NDEBUG
Packit 9f0df5
	int i;
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
	file = fopen(fileName, "r");
Packit 9f0df5
	if (!file)
Packit 9f0df5
	{
Packit 9f0df5
		Log3(PCSC_LOG_CRITICAL, "Could not open bundle file %s: %s",
Packit 9f0df5
			fileName, strerror(errno));
Packit 9f0df5
		return 1;
Packit 9f0df5
	}
Packit 9f0df5
Packit 9f0df5
	r = list_init(l);
Packit 9f0df5
	assert(r >= 0);
Packit 9f0df5
	(void)r;
Packit 9f0df5
Packit 9f0df5
	ListKeys = l;
Packit 9f0df5
	yyin = file;
Packit 9f0df5
Packit 9f0df5
	do
Packit 9f0df5
	{
Packit 9f0df5
		(void)yylex();
Packit 9f0df5
	} while (!feof(file));
Packit 9f0df5
	yylex_destroy();
Packit 9f0df5
Packit 9f0df5
	(void)fclose(file);
Packit 9f0df5
Packit 9f0df5
#ifndef NDEBUG
Packit 9f0df5
	printf("size: %d\n", list_size(l));
Packit 9f0df5
	for (i=0; i < list_size(l); i++)
Packit 9f0df5
	{
Packit 9f0df5
		struct bundleElt *elt;
Packit 9f0df5
		unsigned int j;
Packit 9f0df5
Packit 9f0df5
		elt = list_get_at(l, i);
Packit 9f0df5
		assert(elt);
Packit 9f0df5
		printf("Key: %s\n", elt->key);
Packit 9f0df5
Packit 9f0df5
		for (j=0; j<list_size(&elt->values); j++)
Packit 9f0df5
		{
Packit 9f0df5
			char *v = list_get_at(&elt->values, j);
Packit 9f0df5
			printf(" value: %s\n", v);
Packit 9f0df5
		}
Packit 9f0df5
	}
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
	return 0;
Packit 9f0df5
}
Packit 9f0df5
Packit 9f0df5
/**
Packit 9f0df5
 * Free the list created by bundleParse()
Packit 9f0df5
 *
Packit 9f0df5
 * @param l list containing the results
Packit 9f0df5
 */
Packit 9f0df5
void bundleRelease(list_t *l)
Packit 9f0df5
{
Packit 9f0df5
	unsigned int i;
Packit 9f0df5
Packit 9f0df5
	for (i=0; i < list_size(l); i++)
Packit 9f0df5
	{
Packit 9f0df5
		struct bundleElt *elt;
Packit 9f0df5
		unsigned int j;
Packit 9f0df5
Packit 9f0df5
		elt = list_get_at(l, i);
Packit 9f0df5
		assert(elt);
Packit 9f0df5
Packit 9f0df5
		/* free all the values */
Packit 9f0df5
		for (j=0; j<list_size(&elt->values); j++)
Packit 9f0df5
			free(list_get_at(&elt->values, j));
Packit 9f0df5
		list_destroy(&elt->values);
Packit 9f0df5
Packit 9f0df5
		/* free the key */
Packit 9f0df5
		free(elt->key);
Packit 9f0df5
		free(elt);
Packit 9f0df5
	}
Packit 9f0df5
Packit 9f0df5
	list_destroy(l);
Packit 9f0df5
}
Packit 9f0df5