
#line 3 "infinicamproto.c"

#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

#define yy_create_buffer infini_create_buffer
#define yy_delete_buffer infini_delete_buffer
#define yy_flex_debug infini_flex_debug
#define yy_init_buffer infini_init_buffer
#define yy_flush_buffer infini_flush_buffer
#define yy_load_buffer_state infini_load_buffer_state
#define yy_switch_to_buffer infini_switch_to_buffer
#define yyin infiniin
#define yyleng infinileng
#define yylex infinilex
#define yylineno infinilineno
#define yyout infiniout
#define yyrestart infinirestart
#define yytext infinitext
#define yywrap infiniwrap
#define yyalloc infinialloc
#define yyrealloc infinirealloc
#define yyfree infinifree

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif

/* First, we deal with  platform-specific or compiler-specific issues. */

/* begin standard C headers. */
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>

/* end standard C headers. */

/* flex integer type definitions */

#ifndef FLEXINT_H
#define FLEXINT_H

/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */

#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L

/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
 * if you want the limit (max/min) macros for int types. 
 */
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
#endif

#include <inttypes.h>
typedef int8_t flex_int8_t;
typedef uint8_t flex_uint8_t;
typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t; 
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */

/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN               (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN              (-32767-1)
#endif
#ifndef INT32_MIN
#define INT32_MIN              (-2147483647-1)
#endif
#ifndef INT8_MAX
#define INT8_MAX               (127)
#endif
#ifndef INT16_MAX
#define INT16_MAX              (32767)
#endif
#ifndef INT32_MAX
#define INT32_MAX              (2147483647)
#endif
#ifndef UINT8_MAX
#define UINT8_MAX              (255U)
#endif
#ifndef UINT16_MAX
#define UINT16_MAX             (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX             (4294967295U)
#endif

#endif /* ! FLEXINT_H */

#ifdef __cplusplus

/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST

#else	/* ! __cplusplus */

/* C99 requires __STDC__ to be defined as 1. */
#if defined (__STDC__)

#define YY_USE_CONST

#endif	/* defined (__STDC__) */
#endif	/* ! __cplusplus */

#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif

/* Returned upon end-of-file. */
#define YY_NULL 0

/* Promotes a possibly negative, possibly signed char to an unsigned
 * integer for use as an array index.  If the signed char is negative,
 * we want to instead treat it as an 8-bit unsigned char, hence the
 * double cast.
 */
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)

/* Enter a start condition.  This macro really ought to take a parameter,
 * but we do it the disgusting crufty way forced on us by the ()-less
 * definition of BEGIN.
 */
#define BEGIN (yy_start) = 1 + 2 *

/* Translate the current start state into a value that can be later handed
 * to BEGIN to return to the state.  The YYSTATE alias is for lex
 * compatibility.
 */
#define YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START

/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)

/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE infinirestart(infiniin  )

#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#define YY_BUF_SIZE 16384
#endif

/* The state buf must be large enough to hold one state per character in the main buffer.
 */
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif

extern int infinileng;

extern FILE *infiniin, *infiniout;

#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2

    /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
     *       access to the local variable yy_act. Since yyless() is a macro, it would break
     *       existing scanners that call yyless() from OUTSIDE infinilex. 
     *       One obvious solution it to make yy_act a global. I tried that, and saw
     *       a 5% performance hit in a non-infinilineno scanner, because yy_act is
     *       normally declared as a register variable-- so it is not worth it.
     */
    #define  YY_LESS_LINENO(n) \
            do { \
                int yyl;\
                for ( yyl = n; yyl < infinileng; ++yyl )\
                    if ( infinitext[yyl] == '\n' )\
                        --infinilineno;\
            }while(0)
    
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up infinitext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		*yy_cp = (yy_hold_char); \
		YY_RESTORE_YY_MORE_OFFSET \
		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up infinitext again */ \
		} \
	while ( 0 )

#define unput(c) yyunput( c, (yytext_ptr)  )

#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif

#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
	{
	FILE *yy_input_file;

	char *yy_ch_buf;		/* input buffer */
	char *yy_buf_pos;		/* current position in input buffer */

	/* Size of input buffer in bytes, not including room for EOB
	 * characters.
	 */
	yy_size_t yy_buf_size;

	/* Number of characters read into yy_ch_buf, not including EOB
	 * characters.
	 */
	int yy_n_chars;

	/* Whether we "own" the buffer - i.e., we know we created it,
	 * and can realloc() it to grow it, and should free() it to
	 * delete it.
	 */
	int yy_is_our_buffer;

	/* Whether this is an "interactive" input source; if so, and
	 * if we're using stdio for input, then we want to use getc()
	 * instead of fread(), to make sure we stop fetching input after
	 * each newline.
	 */
	int yy_is_interactive;

	/* Whether we're considered to be at the beginning of a line.
	 * If so, '^' rules will be active on the next match, otherwise
	 * not.
	 */
	int yy_at_bol;

    int yy_bs_lineno; /**< The line count. */
    int yy_bs_column; /**< The column count. */
    
	/* Whether to try to fill the input buffer when we reach the
	 * end of it.
	 */
	int yy_fill_buffer;

	int yy_buffer_status;

#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
	/* When an EOF's been seen but there's still some text to process
	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
	 * shouldn't try reading from the input source any more.  We might
	 * still have a bunch of tokens to match, though, because of
	 * possible backing-up.
	 *
	 * When we actually see the EOF, we change the status to "new"
	 * (via infinirestart()), so that the user can continue scanning by
	 * just pointing infiniin at a new input file.
	 */
#define YY_BUFFER_EOF_PENDING 2

	};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

/* Stack of input buffers. */
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */

/* We provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state".
 *
 * Returns the top of the stack, or NULL.
 */
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
                          : NULL)

/* Same as previous macro, but useful when we know that the buffer stack is not
 * NULL or when we need an lvalue. For internal use only.
 */
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]

/* yy_hold_char holds the character lost when infinitext is formed. */
static char yy_hold_char;
static int yy_n_chars;		/* number of characters read into yy_ch_buf */
int infinileng;

/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 0;		/* whether we need to initialize */
static int yy_start = 0;	/* start state number */

/* Flag which is used to allow infiniwrap()'s to do buffer switches
 * instead of setting up a fresh infiniin.  A bit of a hack ...
 */
static int yy_did_buffer_switch_on_eof;

void infinirestart (FILE *input_file  );
void infini_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
YY_BUFFER_STATE infini_create_buffer (FILE *file,int size  );
void infini_delete_buffer (YY_BUFFER_STATE b  );
void infini_flush_buffer (YY_BUFFER_STATE b  );
void infinipush_buffer_state (YY_BUFFER_STATE new_buffer  );
void infinipop_buffer_state (void );

static void infiniensure_buffer_stack (void );
static void infini_load_buffer_state (void );
static void infini_init_buffer (YY_BUFFER_STATE b,FILE *file  );

#define YY_FLUSH_BUFFER infini_flush_buffer(YY_CURRENT_BUFFER )

YY_BUFFER_STATE infini_scan_buffer (char *base,yy_size_t size  );
YY_BUFFER_STATE infini_scan_string (yyconst char *yy_str  );
YY_BUFFER_STATE infini_scan_bytes (yyconst char *bytes,int len  );

void *infinialloc (yy_size_t  );
void *infinirealloc (void *,yy_size_t  );
void infinifree (void *  );

#define yy_new_buffer infini_create_buffer

#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){ \
        infiniensure_buffer_stack (); \
		YY_CURRENT_BUFFER_LVALUE =    \
            infini_create_buffer(infiniin,YY_BUF_SIZE ); \
	} \
	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
	}

#define yy_set_bol(at_bol) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){\
        infiniensure_buffer_stack (); \
		YY_CURRENT_BUFFER_LVALUE =    \
            infini_create_buffer(infiniin,YY_BUF_SIZE ); \
	} \
	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
	}

#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

/* Begin user sect3 */

#define infiniwrap(n) 1
#define YY_SKIP_YYWRAP

typedef unsigned char YY_CHAR;

FILE *infiniin = (FILE *) 0, *infiniout = (FILE *) 0;

typedef int yy_state_type;

extern int infinilineno;

int infinilineno = 1;

extern char *infinitext;
#define yytext_ptr infinitext

static yy_state_type yy_get_previous_state (void );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
static int yy_get_next_buffer (void );
static void yy_fatal_error (yyconst char msg[]  );

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up infinitext.
 */
#define YY_DO_BEFORE_ACTION \
	(yytext_ptr) = yy_bp; \
	infinileng = (size_t) (yy_cp - yy_bp); \
	(yy_hold_char) = *yy_cp; \
	*yy_cp = '\0'; \
	(yy_c_buf_p) = yy_cp;

#define YY_NUM_RULES 54
#define YY_END_OF_BUFFER 55
/* 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[271] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
       55,   51,    1,   52,   51,   51,    1,    2,   53,   51,
       51,   51,   51,   51,   51,   51,   51,   51,   51,   51,
       51,   51,   51,   51,   51,   16,    1,   17,   16,   16,
       16,   24,    1,   25,   24,   24,   24,    8,    1,    9,
        8,    8,    8,   12,    1,   13,   12,   12,   12,   32,
        1,   33,   32,   32,   32,   36,    1,   37,   36,   36,
       36,   40,    1,   41,   40,   40,   40,   49,    1,   48,
       46,   49,   49,    1,   45,    0,    0,   50,    1,    2,

        2,    0,    0,    0,    0,    0,    0,    0,   26,   28,
       14,    0,   27,   29,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,   14,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,   49,    1,   47,   49,   49,   49,    0,   44,
        2,    0,    0,    0,    0,   22,    0,    0,   14,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,   15,    0,    0,   23,    0,    0,
        6,    0,    0,    0,   11,    0,    0,   31,    0,    0,
       35,    0,    0,   39,    0,   49,   44,    2,    0,   10,

        0,    0,   22,    0,    0,    5,    0,    0,    0,   42,
        0,    3,   43,    0,    0,    0,    0,    2,    0,   10,
        0,    0,    0,    0,    0,    5,    0,    0,    0,    0,
        0,    0,    0,    0,    2,    0,    0,    0,    0,   30,
        0,   38,    0,    4,    0,    0,   34,    0,    0,    0,
       30,    0,   38,    0,   34,    0,    0,    0,    0,    0,
        7,    0,   19,    0,    0,   18,   20,    0,   21,    0
    } ;

static yyconst flex_int32_t yy_ec[256] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    2,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    4,    1,    1,    5,    1,    6,    7,    8,    9,
        9,   10,   10,   10,   10,   10,   10,    1,    1,    1,
        1,    1,    1,    1,   11,   12,   13,   14,   15,   16,
        1,   17,   18,    1,    1,   19,    1,   20,   21,   22,
       23,   24,   25,   26,   27,    1,   28,    1,    1,    1,
        1,   29,    1,    1,    1,    1,   30,   31,   32,   33,

       34,   16,   35,   36,   37,   38,   39,   40,    1,   41,
       42,   43,   44,   45,   46,   47,   48,    1,    1,   49,
        1,    1,   50,    1,   51,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,

        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1
    } ;

static yyconst flex_int32_t yy_meta[52] =
    {   0,
        1,    1,    1,    2,    3,    1,    3,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    3,
        3,    3,    3,    3,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1
    } ;

static yyconst flex_int16_t yy_base[287] =
    {   0,
        0,   28,   56,    0,   10,   15,   17,   22,   47,   76,
       88,  104,  106,  112,  117,  119,  126,  128,   39,  141,
      602,  603,  599,  603,    1,    6,  151,  142,  603,    7,
       42,  580,  577,  126,    8,    1,  566,  557,  134,   11,
      553,  565,  139,   16,   60,  603,  592,  603,   65,    8,
      178,  603,  591,  603,  107,  163,  185,  603,  590,  603,
      171,  192,  194,  603,  589,  603,  199,  204,  206,  603,
      588,  603,  211,  216,  218,  603,  587,  603,  223,  228,
      230,  603,  586,  603,  235,  240,  242,    0,  585,    0,
      580,  247,  252,  583,  603,  581,  254,  603,  256,  252,

      260,  558,  564,  570,  575,  547,  521,  505,  603,  603,
       45,  519,  603,  603,  499,  500,  482,  481,  489,  483,
      483,  487,  490,  474,  481,  179,  486,  269,  276,  283,
      290,  297,  304,  311,  321,  328,  335,  342,  349,  359,
      366,  373,    0,  515,  603,  318,  356,    0,  513,  603,
      375,  489,  499,  501,  462,  485,  459,  468,  464,  450,
      458,  425,  410,  419,  395,  402,  388,  389,  379,  368,
      378,  378,  402,  387,  603,  394,  401,  603,  411,  418,
      603,  425,    0,  432,  603,  439,  446,  603,  453,  463,
      603,  470,  477,  603,  484,  384,    0,  486,  399,  395,

       60,  348,  374,  355,  324,  350,  322,  295,  285,  603,
      319,  603,  603,  284,  282,  266,    0,  491,  284,  301,
      260,  254,  252,  274,  244,  280,  257,  228,  500,  228,
      218,  201,  202,    0,  603,  218,  194,  201,  223,  222,
      180,  210,  503,  603,  166,    0,  202,  169,  167,  170,
      182,  158,  125,   85,  122,   86,   63,   72,   55,  140,
      603,   26,  603,   44,   28,  603,  603,   22,  603,  603,
      535,  538,  541,  544,  547,  550,  553,  556,  559,  562,
      565,  568,  570,  572,  574,  576
    } ;

static yyconst flex_int16_t yy_def[287] =
    {   0,
      271,  271,  271,    3,  272,  272,  273,  273,  274,  274,
      275,  275,  276,  276,  277,  277,  278,  278,  279,  279,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  280,  280,  280,
      270,  280,  280,  270,  270,  281,  270,  270,  270,  270,

      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  280,  280,  270,  282,  280,  280,  281,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  283,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  282,  280,  270,  270,  270,

      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  284,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  285,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  286,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,    0,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270
    } ;

static yyconst flex_int16_t yy_nxt[655] =
    {   0,
      270,   23,   24,  270,   95,   25,   96,   97,   98,   97,
       98,   47,   48,  113,  114,   49,   47,   48,   53,   54,
       49,  102,   55,   53,   54,  103,  111,   55,   26,   27,
       24,  112,  269,   25,   28,   28,   28,   28,   50,  268,
       89,   90,   91,   50,   92,   56,  159,  121,   59,   60,
       56,  122,   61,  104,  267,  126,   26,   23,   29,   51,
      127,   25,  160,  105,   51,  266,   57,   93,   95,   30,
       96,   57,  265,   31,   32,   62,   33,   59,   60,   34,
       35,   61,   36,  264,   26,   37,  260,   38,   39,   65,
       66,  113,  114,   67,  221,   40,   63,   41,   42,  222,

       43,   44,  263,   45,   62,   65,   66,   71,   72,   67,
       95,   73,   96,   71,   72,  262,   68,   73,   77,   78,
       77,   78,   79,  255,   79,   63,  253,   83,   84,   83,
       84,   85,   68,   85,   74,  261,  108,   69,  109,  110,
       74,  260,   89,   90,   91,   80,   92,   80,  101,  101,
      101,  101,   99,   69,   86,   75,   86,  100,  100,  100,
      100,   75,  259,  117,   97,   98,   81,  118,   81,   93,
      109,  110,  125,  119,   95,   87,   96,   87,  120,  128,
      159,  129,  129,  251,  129,  129,  130,  258,  131,  131,
      261,  131,  131,   97,   98,  132,  257,  133,  133,  256,

      134,  133,   95,  255,   96,   97,   98,  135,  247,  136,
      136,  253,  136,  136,   95,  172,   96,   97,   98,  137,
      252,  138,  138,  251,  138,  138,   95,  250,   96,   97,
       98,  139,  249,  140,  140,  248,  140,  140,   95,  247,
       96,   97,   98,  141,  242,  142,  142,  212,  142,  142,
       95,  240,  146,  147,  148,   97,   98,   99,  101,  101,
      101,  101,  100,  100,  100,  100,  151,  151,  151,  151,
      174,  245,  129,  129,  212,  129,  129,  176,  242,  129,
      129,  226,  129,  129,  177,  241,  131,  131,  240,  131,
      131,  179,  239,  131,  131,  238,  131,  131,  180,  237,

      133,  133,  220,  134,  133,  182,  236,  133,  133,  233,
      133,  133,  182,  232,  133,  133,  231,  133,  133,  175,
      197,  149,  184,  230,  136,  136,  175,  136,  136,  186,
      229,  136,  136,  178,  136,  136,  187,  228,  138,  138,
      178,  138,  138,  189,  227,  138,  138,  181,  138,  138,
      190,  226,  140,  140,  181,  140,  140,  147,  148,  183,
      192,  181,  140,  140,  225,  140,  140,  193,  224,  142,
      142,  185,  142,  142,  195,  203,  142,  142,  185,  142,
      142,  198,  198,  198,  198,  188,  197,  149,  174,  223,
      129,  129,  188,  129,  129,  176,  220,  129,  129,  191,

      129,  129,  177,  219,  131,  131,  216,  131,  131,  191,
      206,  215,  179,  212,  131,  131,  194,  131,  131,  180,
      214,  133,  133,  194,  134,  133,  182,  213,  133,  133,
      212,  133,  133,  184,  200,  136,  136,  175,  136,  136,
      186,  211,  136,  136,  175,  136,  136,  187,  210,  138,
      138,  178,  138,  138,  189,  209,  138,  138,  208,  138,
      138,  178,  207,  206,  190,  159,  140,  140,  181,  140,
      140,  192,  205,  140,  140,  181,  140,  140,  193,  204,
      142,  142,  185,  142,  142,  195,  203,  142,  142,  185,
      142,  142,  218,  218,  218,  218,  188,  235,  235,  235,

      235,  243,  202,  188,  243,  201,  244,  244,  244,  244,
      244,  244,  200,  191,  199,  150,  144,  173,  171,  170,
      191,  169,  156,  168,  167,  166,  165,  194,  164,  163,
      162,  161,  158,  157,  194,   22,   22,   22,   46,   46,
       46,   52,   52,   52,   58,   58,   58,   64,   64,   64,
       70,   70,   70,   76,   76,   76,   82,   82,   82,   88,
       88,   88,  143,  156,  143,  149,  149,  149,  196,  196,
      196,  217,  217,  234,  234,  246,  246,  254,  254,  155,
      154,  153,  152,  150,   94,  145,  144,   94,   94,   94,
       94,   94,   94,   94,  124,  123,  116,  115,  107,  106,

       94,  270,   21,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270
    } ;

static yyconst flex_int16_t yy_chk[655] =
    {   0,
        0,    1,    1,    0,   25,    1,   25,   26,   26,   50,
       50,    5,    5,   36,   36,    5,    6,    6,    7,    7,
        6,   30,    7,    8,    8,   30,   35,    8,    1,    2,
        2,   35,  268,    2,    2,    2,    2,    2,    5,  265,
       19,   19,   19,    6,   19,    7,  111,   40,    9,    9,
        8,   40,    9,   31,  264,   44,    2,    3,    3,    5,
       44,    3,  111,   31,    6,  262,    7,   19,   49,    3,
       49,    8,  259,    3,    3,    9,    3,   10,   10,    3,
        3,   10,    3,  258,    3,    3,  254,    3,    3,   11,
       11,   45,   45,   11,  201,    3,    9,    3,    3,  201,

        3,    3,  257,    3,   10,   12,   12,   13,   13,   12,
       55,   13,   55,   14,   14,  256,   11,   14,   15,   15,
       16,   16,   15,  255,   16,   10,  253,   17,   17,   18,
       18,   17,   12,   18,   13,  254,   34,   11,   34,   34,
       14,  260,   20,   20,   20,   15,   20,   16,   28,   28,
       28,   28,   27,   12,   17,   13,   18,   27,   27,   27,
       27,   14,  252,   39,   56,   56,   15,   39,   16,   20,
       43,   43,   43,   39,   61,   17,   61,   18,   39,   51,
      126,   51,   51,  251,   51,   51,   57,  250,   57,   57,
      260,   57,   57,   62,   62,   63,  249,   63,   63,  248,

       63,   63,   67,  247,   67,   68,   68,   69,  245,   69,
       69,  242,   69,   69,   73,  126,   73,   74,   74,   75,
      241,   75,   75,  240,   75,   75,   79,  239,   79,   80,
       80,   81,  238,   81,   81,  237,   81,   81,   85,  236,
       85,   86,   86,   87,  233,   87,   87,  232,   87,   87,
       92,  231,   92,   93,   93,   97,   97,   99,  100,  100,
      100,  100,   99,   99,   99,   99,  101,  101,  101,  101,
      128,  230,  128,  128,  228,  128,  128,  129,  227,  129,
      129,  226,  129,  129,  130,  225,  130,  130,  224,  130,
      130,  131,  223,  131,  131,  222,  131,  131,  132,  221,

      132,  132,  220,  132,  132,  133,  219,  133,  133,  216,
      133,  133,  134,  215,  134,  134,  214,  134,  134,  128,
      146,  146,  135,  211,  135,  135,  129,  135,  135,  136,
      209,  136,  136,  130,  136,  136,  137,  208,  137,  137,
      131,  137,  137,  138,  207,  138,  138,  132,  138,  138,
      139,  206,  139,  139,  133,  139,  139,  147,  147,  134,
      140,  134,  140,  140,  205,  140,  140,  141,  204,  141,
      141,  135,  141,  141,  142,  203,  142,  142,  136,  142,
      142,  151,  151,  151,  151,  137,  196,  196,  174,  202,
      174,  174,  138,  174,  174,  176,  200,  176,  176,  139,

      176,  176,  177,  199,  177,  177,  173,  177,  177,  140,
      172,  171,  179,  170,  179,  179,  141,  179,  179,  180,
      169,  180,  180,  142,  180,  180,  182,  168,  182,  182,
      167,  182,  182,  184,  166,  184,  184,  174,  184,  184,
      186,  165,  186,  186,  176,  186,  186,  187,  164,  187,
      187,  177,  187,  187,  189,  163,  189,  189,  162,  189,
      189,  179,  161,  160,  190,  159,  190,  190,  180,  190,
      190,  192,  158,  192,  192,  182,  192,  192,  193,  157,
      193,  193,  184,  193,  193,  195,  156,  195,  195,  186,
      195,  195,  198,  198,  198,  198,  187,  218,  218,  218,

      218,  229,  155,  189,  243,  154,  229,  229,  229,  243,
      243,  243,  153,  190,  152,  149,  144,  127,  125,  124,
      192,  123,  122,  121,  120,  119,  118,  193,  117,  116,
      115,  112,  108,  107,  195,  271,  271,  271,  272,  272,
      272,  273,  273,  273,  274,  274,  274,  275,  275,  275,
      276,  276,  276,  277,  277,  277,  278,  278,  278,  279,
      279,  279,  280,  106,  280,  281,  281,  281,  282,  282,
      282,  283,  283,  284,  284,  285,  285,  286,  286,  105,
      104,  103,  102,   96,   94,   91,   89,   83,   77,   71,
       65,   59,   53,   47,   42,   41,   38,   37,   33,   32,

       23,   21,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  270,  270
    } ;

/* Table of booleans, true if rule could match eol. */
static yyconst flex_int32_t yy_rule_can_match_eol[55] =
    {   0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 
    0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 
    0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0,     };

static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;

extern int infini_flex_debug;
int infini_flex_debug = 0;

/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *infinitext;
#line 1 "infinicamproto.l"
/*
 * Copyright (c) 2003 Endace Technology Ltd, Hamilton, New Zealand.
 * All rights reserved.
 *
 * This source code is proprietary to Endace Technology Ltd and no part
 * of it may be redistributed, published or disclosed except as outlined
 * in the written contract supplied with this product.
 *
 * $Id: infinicamproto.c 13619 2010-12-30 01:59:23Z karthik.sharma $
 * This file defines the key words which will create the high level rule 
 */
#define YY_NO_INPUT 1
 
#line 28 "infinicamproto.l"
#include <stdio.h>
#include <stdlib.h>
#include "infiniband_proto.h"

static FILE *out;

	/*
	 * Debugging the gramer defines and general output 
	 * INFINI_RULE_PRINT: will output the actual recognized rules with out extra lines and comments 
	 * INFINILEX_DEBUG: Used for intial of the rule and print out of the result 
	 * INFINILEX_DEBUG_R: used for the actual rules and individual states 
	 * INFINILEX_DEBUG_COMMENT : used for comments debbuging and empty lines 
	*/
#define INFINI_RULE_PRINT 0
#define INFINILEX_DEBUG 0
#define INFINILEX_DEBUG_R 0
#define INFINILEX_DEBUG_COMMENT 0

//this is done so multipl parsers to be able to be used in the same application 
//each pareser just have to change this define and the prefix in the option 

#define yy_filter_rule infini_filter_rule

infiniband_filter_rule_t yy_filter_rule;

uint32_t 	yy_infini_tag;
uint32_t 	yy_infini_action;
uint32_t 	yy_infini_steer;


/* supporting fuunction to be moved to some part of the library  */
#line 62 "infinicamproto.l"
	
#define BINARY_TOKEN_TO_DATAMASK( token, bits, data,  mask ) 			\
 do {									\
	unsigned int count = 0;						\
	unsigned int index;						\
	int          buf_index;						\
									\
	if ( token == NULL ) return 0; 					\
	/* protection to work only with 1 to 64 bits */ 		\
	if ( (bits > 64) || (bits < 1) ) return 0; 			\
									\
	count = strlen(token);						\
									\
	/* we require this due we store everything in host order*/ 	\
	buf_index = bits - 1;						\
									\
	/* Create the entry in host byte order then convert to network byte order. */ \
	for (index = 0; index < count; index++)				\
	{								\
		if ((token[index] == '{') || (token[index] == '}'))	\
		{							\
			/* Do nothing. */				\
		} 							\
		else if ((token[index] == ' ') || (token[index] == '\t'))\
		{							\
			/* Do nothing. added for spaces*/		\
		}							\
		else if (token[index] == '0')				\
		{							\
			/* Data bit is already 0. */			\
			*data &= ~(1 << buf_index);			\
									\
			/* Set mask bit to 1. */			\
			*mask |= (1 << buf_index);			\
									\
			buf_index--;					\
		}							\
		else if (token[index] == '1')				\
		{							\
			/* Set data bit to 1. */			\
			*data |= (1 << buf_index);			\
			/* Set mask bit to 1. */			\
			*mask |= (1 << buf_index);			\
									\
			buf_index--;					\
		}							\
		else if( (token[index] == '-') || (token[index] == '*'))	\
		{							\
			/* Set data bit to  0. */			\
			*data &= ~(1 << buf_index);			\
			/* Set Mask bit to  0. */			\
			*mask &= ~(1 << buf_index);			\
			buf_index--;					\
		}							\
		else							\
		{							\
			return 0;					\
		};							\
	};								\
									\
	/* assert(buf_index == -1);	*/				\
	/* case we provided more bits then allowed */			\
	if (buf_index != -1)						\
		return 0;						\
									\
	return 1;							\
} while(0);  								
	
//TODO: FIXME:
#define HEX_TOKEN_TO_DATAMASK( token, bits, data,  mask ) 		\
 do {									\
	unsigned int count = 0;						\
	unsigned int index;						\
	int          buf_index;						\
	uint64_t nible_mask;						\
									\
	if ( token == NULL ) return 0; 					\
	/* protection to work only with 1 to 64 bits */ 		\
	if ( (bits > 64) || (bits < 1) ) return 0; 			\
									\
	count = strlen(token);						\
	/* protection from empty strings */				\
	if ( count < 1 ) return 0; 					\
									\
	/* we require this due we store everything in host order*/ 	\
	buf_index = 0;							\
	/* Create the entry in host byte order then  we invert the proccecing. */ \
	for (index = count-1; index >= 0; index--)				\
	{								\
	/* calculates the nible mask in case we have 11 bits 2 nibles(16) */	\
		nible_mask = 0xF; 					\
		if( (bits - buf_index) < 4 ) {				\
			nible_mask = 0xF >>  (bits - buf_index);	\
		}; 							\
									\
		if ((token[index] == '{') || (token[index] == '}'))	\
		{							\
			/* Do nothing. */				\
		} 							\
		else if( (token[index] == ' ') || (token[index] == '\t') || (token[index] == 0))	\
		{							\
			/* Do nothing. added for spaces*/		\
		}							\
		else if ((token[index] == 'x') || (token[index] == '\t'))\
		{							\
			/* we expect 0x000 procesing backwards 		\
			 and as soon as we get to x we are finished */	\
			return 1;					\
		}							\
		else if( (token[index] >= '0')  && (token[index] < '9') )	\
		{							\
			/* Set data bits. */				\
			*data |= ((token[index]-'0') << buf_index)&nible_mask;	\
			*data &= ~(((token[index]-'0') << buf_index)&nible_mask);	\
			/* Set mask 4 bits to 0xf. */			\
			*mask |= (0xF << buf_index);			\
			buf_index+=4;					\
		}							\
		else if( (token[index] >= 'a') || (token[index] <= 'f'))	\
		{							\
			/* Set data bits. */				\
			*data |= ((token[index]-'a') << buf_index)&nible_mask;	\
			*data &= ~(((token[index]-'a') << buf_index)&nible_mask);	\
			/* Set mask 4 bits to 0xf. */			\
			*mask |= (nible_mask << buf_index);		\
									\
			buf_index+=4;					\
		}							\
		else if (token[index] == '-'|| token[index] == '*')	\
		{							\
			/* Address bit is already 0. */			\
			/* Mask bit is already 0. */			\
			buf_index+=4;					\
		}							\
		else							\
		{							\
			return 0;					\
		};							\
	};								\
									\
	/* case we provided more or less nibles then allowed */		\
	if ((buf_index - bits) > 0 )					\
		return 0;						\
	if( (bits - buf_index) > 3 )					\
		return 0;						\
									\
	return 1;							\
} while(0);  								

		
/**
 * Internal Functions to parse a bit mask in format "-1-0-" and to return mask and data value works with up to 64 bit data and mask 
 * the matching will ignore the following symbols '{' , space , tab, '}'
 *     ------------------------------------------
 * Where '-' can be replaced with either '0' or '1'.
 *
 * @param[in]  token    Pointer to the string token being parsed.
 * @param[in]  bits     how many bits are expected and how many bits will be returned in the result 
 * @param[in]  data     pinter to 64 bit data which will be returned 
 * @param[in]  mask     pinter to 64 bit data which will be returned 
 *
 * @returns data         is the data in host order 
 * @returns mask         is the mask in host order 
 * @returns              Returns true if the token contained a valid value, otherwise
 *                       false is returned.
 *
 * @sa 
 */

int bit_entry_8(const char * token, int bits, uint8_t * data, uint8_t * mask )
{

	BINARY_TOKEN_TO_DATAMASK( token, bits, data, mask );
};

int bit_entry_16(const char * token, int bits, uint16_t * data, uint16_t * mask )
{

	BINARY_TOKEN_TO_DATAMASK( token, bits, data, mask );
};

int bit_entry_32(const char * token, int bits, uint32_t * data, uint32_t * mask )
{

	BINARY_TOKEN_TO_DATAMASK( token, bits, data, mask);
}
int bit_entry_64(const char * token, int bits, uint64_t * data, uint64_t * mask )
{

	BINARY_TOKEN_TO_DATAMASK( token, bits, data, mask);
}
	 
int hex_entry_16(const char * token, int bits, uint16_t * data, uint16_t * mask )
{

	HEX_TOKEN_TO_DATAMASK( token, bits, data, mask );
};


#line 971 "infinicamproto.c"

#define INITIAL 0
#define S_infini_rule 1
#define S_sl 2
#define S_lnh 3
#define S_slid 4
#define S_dlid 5
#define S_opcode 6
#define S_dest_qp 7
#define S_src_qp 8
#define S_comment 9

#ifndef YY_NO_UNISTD_H
/* Special case for "unistd.h", since it is non-ANSI. We include it way
 * down here because we want the user's section 1 to have been scanned first.
 * The user has a chance to override it with an option.
 */
#include <unistd.h>
#endif

#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif

static int yy_init_globals (void );

/* Accessor methods to globals.
   These are made visible to non-reentrant scanners for convenience. */

int infinilex_destroy (void );

int infiniget_debug (void );

void infiniset_debug (int debug_flag  );

YY_EXTRA_TYPE infiniget_extra (void );

void infiniset_extra (YY_EXTRA_TYPE user_defined  );

FILE *infiniget_in (void );

void infiniset_in  (FILE * in_str  );

FILE *infiniget_out (void );

void infiniset_out  (FILE * out_str  );

int infiniget_leng (void );

char *infiniget_text (void );

int infiniget_lineno (void );

void infiniset_lineno (int line_number  );

/* Macros after this point can all be overridden by user definitions in
 * section 1.
 */

#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int infiniwrap (void );
#else
extern int infiniwrap (void );
#endif
#endif

#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int );
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * );
#endif

#ifndef YY_NO_INPUT

#ifdef __cplusplus
static int yyinput (void );
#else
static int input (void );
#endif

#endif

        static int yy_start_stack_ptr = 0;
        static int yy_start_stack_depth = 0;
        static int *yy_start_stack = NULL;
    
    static void yy_push_state (int new_state );
    
    static void yy_pop_state (void );
    
    static int yy_top_state (void );
    
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
#endif

/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO do { if (fwrite( infinitext, infinileng, 1, infiniout )) {} } while (0)
#endif

/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 * is returned in "result".
 */
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
		{ \
		int c = '*'; \
		unsigned n; \
		for ( n = 0; n < max_size && \
			     (c = getc( infiniin )) != EOF && c != '\n'; ++n ) \
			buf[n] = (char) c; \
		if ( c == '\n' ) \
			buf[n++] = (char) c; \
		if ( c == EOF && ferror( infiniin ) ) \
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
		result = n; \
		} \
	else \
		{ \
		errno=0; \
		while ( (result = fread(buf, 1, max_size, infiniin))==0 && ferror(infiniin)) \
			{ \
			if( errno != EINTR) \
				{ \
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
				break; \
				} \
			errno=0; \
			clearerr(infiniin); \
			} \
		}\
\

#endif

/* No semi-colon after return; correct usage is to write "yyterminate();" -
 * we don't want an extra ';' after the "return" because that will cause
 * some compilers to complain about unreachable statements.
 */
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif

/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif

/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif

/* end tables serialization structures and prototypes */

/* Default declaration of generated scanner - a define so the user can
 * easily add parameters.
 */
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1

extern int infinilex (void);

#define YY_DECL int infinilex (void)
#endif /* !YY_DECL */

/* Code executed at the beginning of each rule, after infinitext and infinileng
 * 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 \
	if ( infinileng > 0 ) \
		YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
				(infinitext[infinileng - 1] == '\n'); \
	YY_USER_ACTION

/** The main scanner function which does all the work.
 */
YY_DECL
{
	register yy_state_type yy_current_state;
	register char *yy_cp, *yy_bp;
	register int yy_act;
    
#line 263 "infinicamproto.l"

	/* ignore spaces at any level */		
#line 1176 "infinicamproto.c"

	if ( !(yy_init) )
		{
		(yy_init) = 1;

#ifdef YY_USER_INIT
		YY_USER_INIT;
#endif

		if ( ! (yy_start) )
			(yy_start) = 1;	/* first start state */

		if ( ! infiniin )
			infiniin = stdin;

		if ( ! infiniout )
			infiniout = stdout;

		if ( ! YY_CURRENT_BUFFER ) {
			infiniensure_buffer_stack ();
			YY_CURRENT_BUFFER_LVALUE =
				infini_create_buffer(infiniin,YY_BUF_SIZE );
		}

		infini_load_buffer_state( );
		}

	while ( 1 )		/* loops until end-of-file is reached */
		{
		yy_cp = (yy_c_buf_p);

		/* Support of infinitext. */
		*yy_cp = (yy_hold_char);

		/* yy_bp points to the position in yy_ch_buf of the start of
		 * the current run.
		 */
		yy_bp = yy_cp;

		yy_current_state = (yy_start);
		yy_current_state += YY_AT_BOL();
yy_match:
		do
			{
			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
			if ( yy_accept[yy_current_state] )
				{
				(yy_last_accepting_state) = yy_current_state;
				(yy_last_accepting_cpos) = yy_cp;
				}
			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
				{
				yy_current_state = (int) yy_def[yy_current_state];
				if ( yy_current_state >= 271 )
					yy_c = yy_meta[(unsigned int) yy_c];
				}
			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
			++yy_cp;
			}
		while ( yy_base[yy_current_state] != 603 );

yy_find_action:
		yy_act = yy_accept[yy_current_state];
		if ( yy_act == 0 )
			{ /* have to back up */
			yy_cp = (yy_last_accepting_cpos);
			yy_current_state = (yy_last_accepting_state);
			yy_act = yy_accept[yy_current_state];
			}

		YY_DO_BEFORE_ACTION;

		if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
			{
			int yyl;
			for ( yyl = 0; yyl < infinileng; ++yyl )
				if ( infinitext[yyl] == '\n' )
					   
    infinilineno++;
;
			}

do_action:	/* This label is used only to access EOF actions. */

		switch ( yy_act )
	{ /* beginning of action switch */
			case 0: /* must back up */
			/* undo the effects of YY_DO_BEFORE_ACTION */
			*yy_cp = (yy_hold_char);
			yy_cp = (yy_last_accepting_cpos);
			yy_current_state = (yy_last_accepting_state);
			goto yy_find_action;

case 1:
YY_RULE_SETUP
#line 265 "infinicamproto.l"
;
	YY_BREAK
/* Start of rule and a TAG recognition */
case 2:
YY_RULE_SETUP
#line 269 "infinicamproto.l"
{
			//clear the current rule to all zero
			memset(&yy_filter_rule,0,sizeof(yy_filter_rule));
	 		yy_filter_rule.user_tag = atoi(infinitext);
			BEGIN(S_infini_rule);
	#if INFINILEX_DEBUG
	 		fprintf(out,"START RULE: user tag: %d line_no: %d",yy_filter_rule.user_tag,infinilineno );
	 		fprintf(out, "\n");
	#endif 
		}
	YY_BREAK
/* Action for the filter */		
case 3:
YY_RULE_SETUP
#line 280 "infinicamproto.l"
{
			yy_filter_rule.action = ( (infinitext[0] == 'a') || (infinitext[0] == 'p') )?0:1;
			#if INFINI_RULE_PRINT
			fprintf( out,"ACTION: %d line_no: %d\n",yy_filter_rule.action, infinilineno );
			#endif 
		};
	YY_BREAK
/* stream for the filter the current infiniband supports only 0*/
case 4:
YY_RULE_SETUP
#line 287 "infinicamproto.l"
{
			yy_filter_rule.user_class = atoi(&infinitext[6]);
			#if INFINI_RULE_PRINT
			fprintf( out,"Steer: %d line_no: %d\n",yy_infini_steer, infinilineno );
			#endif
		};
	YY_BREAK
/* SLID Support  
	 * 
	 * 
	 */
case 5:
YY_RULE_SETUP
#line 298 "infinicamproto.l"
{ 	
				//call back method for specific FW if it is supported  can be added here and initialized before the scanner is used 
				//if (!yyval.yysupported(T_INFINIBAND_SLID) ) 
				//{ return or error message 
				//}
			BEGIN(S_slid); 
			#if INFINILEX_DEBUG_R
			ECHO; //example for debugging 
			fprintf( out, "->RECOGNIZED line_no: %d\n",infinilineno );
			#endif 	  
		}
	YY_BREAK
case 6:
YY_RULE_SETUP
#line 310 "infinicamproto.l"
{ 
		#if INFINILEX_DEBUG_R
		//example for debugging the expressions after the main key word is recognised
		ECHO;
		fprintf( out, "->RECOGNIZED line_no: %d\n",infinilineno ); 
		#endif 
		
		if (! bit_entry_16 ( infinitext, 16 , 
			&yy_filter_rule.src_local_id.data, 
			&yy_filter_rule.src_local_id.mask) )
		{	
			fprintf(out, "ERROR: Bad SLID parameter line_no: %d\n",infinilineno );
			return T_ERROR_CONVERT;
		};
		#if INFINI_RULE_PRINT
		fprintf( out, "SLID 0x%04x,0x%04x line_no: %d\n",yy_filter_rule.src_local_id.data, yy_filter_rule.src_local_id.mask, infinilineno );
		#endif 
		BEGIN(S_infini_rule);
	}
	YY_BREAK
case 7:
YY_RULE_SETUP
#line 330 "infinicamproto.l"
{
		#if INFINILEX_DEBUG_R
		//used for debugging the expressions 
		ECHO;
		fprintf( out, "->RECOGNIZED line_no: %d\n",infinilineno ); 
		#endif 
		
		if (! hex_entry_16 ( infinitext, 16 , 
			&yy_filter_rule.src_local_id.data, 
			&yy_filter_rule.src_local_id.mask) )
		{		
			fprintf(out, "ERROR: Bad Hex pattern for SLID line_no: %d\n",infinilineno );
			return T_ERROR;
		};
		#if INFINI_RULE_PRINT
		fprintf( out, "SLID 0x%04x,0x%04x line_no: %d\n",yy_filter_rule.src_local_id.data, yy_filter_rule.src_local_id.mask, infinilineno ); 
		#endif 
		BEGIN(S_infini_rule);
}
	YY_BREAK
case 8:
YY_RULE_SETUP
#line 350 "infinicamproto.l"
{
			fprintf(out,"ERROR: unexpected symbol %s on line: %d after SLID pattern '{----------------}' expected! \n",infinitext, infinilineno);
			return T_ERROR_CONVERT;
		}	
	YY_BREAK
case 9:
/* rule 9 can match eol */
YY_RULE_SETUP
#line 354 "infinicamproto.l"
{
			fprintf(out,"ERROR: unexpected end of line on line: %d ! \n", infinilineno-1);
			return T_ERROR_CONVERT;
		}	
	YY_BREAK
/* 
	 * dlid rules
	 *
	 */
case 10:
YY_RULE_SETUP
#line 364 "infinicamproto.l"
{ 	
			BEGIN(S_dlid); 
		}
	YY_BREAK
case 11:
YY_RULE_SETUP
#line 368 "infinicamproto.l"
{ 
		#if INFINILEX_DEBUG_R
		//used for debugging the expressions 
		ECHO;
		fprintf( out, "->RECOGNIZED line_no: %d\n",infinilineno ); 
		#endif 
		
		if (! bit_entry_16 ( infinitext, 16 , 
			&yy_filter_rule.dest_local_id.data, 
			&yy_filter_rule.dest_local_id.mask) )
		{		
			fprintf( out, "ERROR: Bad DLID parameter line_no: %d\n",infinilineno );
			return T_ERROR;
		};
		#if INFINI_RULE_PRINT
		fprintf( out, "DLID 0x%04x,0x%04x line_no: %d\n",yy_filter_rule.dest_local_id.data, yy_filter_rule.dest_local_id.mask, infinilineno );
		#endif 
		BEGIN(S_infini_rule);
	}
	YY_BREAK
case 12:
YY_RULE_SETUP
#line 387 "infinicamproto.l"
{
			fprintf( out,"ERROR: wrong format starting with %s on line: %d after DLID  '{----------------}' expected! \n",infinitext, infinilineno);
			return T_ERROR;
	}	
	YY_BREAK
case 13:
/* rule 13 can match eol */
YY_RULE_SETUP
#line 391 "infinicamproto.l"
{
			fprintf(out,"ERROR: unexpected enf of line on line: %d ! \n", infinilineno-1);
			return T_ERROR;
	}	
	YY_BREAK
/* 
	 * sl rules
	 *
	 */
case 14:
YY_RULE_SETUP
#line 401 "infinicamproto.l"
{ 	
			BEGIN(S_sl); 
		}
	YY_BREAK
case 15:
YY_RULE_SETUP
#line 405 "infinicamproto.l"
{ 
		
		if (! bit_entry_8 ( infinitext, 4 , 
			&yy_filter_rule.service_level.data, 
			&yy_filter_rule.service_level.mask) )
		{		
			fprintf( out, "ERROR: Bad SL parameter line_no: %d\n",infinilineno );
			return T_ERROR;
		};
		#if INFINI_RULE_PRINT
		fprintf( out, "SL 0x%04x,0x%04x line_no: %d\n",yy_filter_rule.service_level.data, yy_filter_rule.service_level.mask, infinilineno );
		#endif 
		BEGIN(S_infini_rule);
	}
	YY_BREAK
case 16:
YY_RULE_SETUP
#line 419 "infinicamproto.l"
{
			fprintf( out,"ERROR: wrong format starting with %s on line: %d after SL  '{----}' expected! \n",infinitext, infinilineno);
			return T_ERROR;
	}	
	YY_BREAK
case 17:
/* rule 17 can match eol */
YY_RULE_SETUP
#line 423 "infinicamproto.l"
{
			fprintf(out,"ERROR: unexpected enf of line on line: %d ! \n", infinilineno-1);
			return T_ERROR;
	}	
	YY_BREAK
/* 
	 * lnh rules
	 *
	 */
case 18:
YY_RULE_SETUP
#line 434 "infinicamproto.l"
{
		yy_filter_rule.lnh.data = 0x3;
		yy_filter_rule.lnh.mask = 0x3;
		}
	YY_BREAK
case 19:
YY_RULE_SETUP
#line 438 "infinicamproto.l"
{
		yy_filter_rule.lnh.data = 0x2;
		yy_filter_rule.lnh.mask = 0x3;
		}
	YY_BREAK
case 20:
YY_RULE_SETUP
#line 442 "infinicamproto.l"
{
		yy_filter_rule.lnh.data = 0x1;
		yy_filter_rule.lnh.mask = 0x3;
		}
	YY_BREAK
case 21:
YY_RULE_SETUP
#line 446 "infinicamproto.l"
{
		yy_filter_rule.lnh.data = 0x0;
		yy_filter_rule.lnh.mask = 0x3;
		}
	YY_BREAK
case 22:
YY_RULE_SETUP
#line 451 "infinicamproto.l"
{ 
			BEGIN(S_lnh); 
		}			
	YY_BREAK
case 23:
YY_RULE_SETUP
#line 454 "infinicamproto.l"
{ 
		
		if (! bit_entry_8 ( infinitext, 2 , &yy_filter_rule.lnh.data, 
			&yy_filter_rule.lnh.mask ) )
		{		
			fprintf( out, "ERROR: Bad LNH parameter line_no: %d\n",infinilineno );
			return T_ERROR;
		};
		#if INFINI_RULE_PRINT
		fprintf( out, "LNH 0x%04x,0x%04x line_no: %d\n",yy_filter_rule.lnh.data, yy_filter_rule.lnh.mask, infinilineno );
		#endif 
		BEGIN(S_infini_rule);
	}
	YY_BREAK
case 24:
YY_RULE_SETUP
#line 467 "infinicamproto.l"
{
			fprintf( out,"ERROR: wrong format starting with %s on line: %d after LNH  '{----}' expected! \n",infinitext, infinilineno);
			return T_ERROR;
	}	
	YY_BREAK
case 25:
/* rule 25 can match eol */
YY_RULE_SETUP
#line 471 "infinicamproto.l"
{
			fprintf(out,"ERROR: unexpected enf of line on line: %d ! \n", infinilineno-1);
			return T_ERROR;
	}	
	YY_BREAK
/* BTH Header */
/* opcode related keywords
	 * RC,UC,RD,UD will setup 
	 * only the top 3 bits, to values according the spec, out of the 8 and the rest will be 0 for the core data
	 * For the mask the top 3 bits will be set to 1 and the rest will be 0(dont care)
	 * This is just a simplified interface for the opcode 
	 */
case 26:
YY_RULE_SETUP
#line 483 "infinicamproto.l"
{
		yy_filter_rule.opcode.data = 0x00;
		yy_filter_rule.opcode.mask = 0xE0;
		}
	YY_BREAK
case 27:
YY_RULE_SETUP
#line 487 "infinicamproto.l"
{
		yy_filter_rule.opcode.data = 0x20;
		yy_filter_rule.opcode.mask = 0xE0;
		}
	YY_BREAK
case 28:
YY_RULE_SETUP
#line 491 "infinicamproto.l"
{
		yy_filter_rule.opcode.data = 0x40;
		yy_filter_rule.opcode.mask = 0xE0;
		}
	YY_BREAK
case 29:
YY_RULE_SETUP
#line 495 "infinicamproto.l"
{
		yy_filter_rule.opcode.data = 0x60;
		yy_filter_rule.opcode.mask = 0xE0;
		}
	YY_BREAK
case 30:
YY_RULE_SETUP
#line 501 "infinicamproto.l"
{ 
			BEGIN(S_opcode); 
		}			
	YY_BREAK
case 31:
YY_RULE_SETUP
#line 504 "infinicamproto.l"
{ 
		
		if (! bit_entry_8 ( infinitext, 8 , 
		      	&yy_filter_rule.opcode.data, 
			&yy_filter_rule.opcode.mask ) )
		{		
			fprintf( out, "ERROR: Bad OPCODE parameter line_no: %d\n",infinilineno );
			return T_ERROR;
		};
		#if INFINI_RULE_PRINT
		fprintf( out, "OPCODE 0x%04x,0x%04x line_no: %d\n",yy_filter_rule.opcode.data, yy_filter_rule.opcode.mask, infinilineno );
		#endif 
		BEGIN(S_infini_rule);
	}
	YY_BREAK
case 32:
YY_RULE_SETUP
#line 518 "infinicamproto.l"
{
			fprintf( out,"ERROR: wrong format starting with %s on line: %d after OPCODE  '{----}' expected! \n",infinitext, infinilineno);
			return T_ERROR;
	}	
	YY_BREAK
case 33:
/* rule 33 can match eol */
YY_RULE_SETUP
#line 522 "infinicamproto.l"
{
			fprintf(out,"ERROR: unexpected enf of line on line: %d ! \n", infinilineno);
			return T_ERROR;
	}	
	YY_BREAK
case 34:
YY_RULE_SETUP
#line 527 "infinicamproto.l"
{ 
			BEGIN(S_dest_qp); 
		}			
	YY_BREAK
case 35:
YY_RULE_SETUP
#line 530 "infinicamproto.l"
{ 
		
		if (! bit_entry_32 ( infinitext, 24 , 
			&yy_filter_rule.dest_qp.data, 
			&yy_filter_rule.dest_qp.mask ) )
		{		
			fprintf( out, "ERROR: Bad DEST-QP parameter line_no: %d\n",infinilineno );
			return T_ERROR;
		};
		#if INFINI_RULE_PRINT
		fprintf( out, "DEST_QP 0x%04x,0x%04x line_no: %d\n",yy_filter_rule.dest_qp.data, yy_filter_rule.dest_qp.mask, infinilineno );
		#endif
		BEGIN(S_infini_rule);
	}
	YY_BREAK
case 36:
YY_RULE_SETUP
#line 544 "infinicamproto.l"
{
			fprintf( out,"ERROR: wrong format starting with %s on line: %d after DEST-QP  '{----}' expected! \n",infinitext, infinilineno);
			return T_ERROR;
	}	
	YY_BREAK
case 37:
/* rule 37 can match eol */
YY_RULE_SETUP
#line 548 "infinicamproto.l"
{
			fprintf(out,"ERROR: unexpected enf of line on line: %d ! \n", infinilineno-1);
			return T_ERROR;
	}	
	YY_BREAK
/*
	 * DETH Header
	 * 
	 */
case 38:
YY_RULE_SETUP
#line 557 "infinicamproto.l"
{ 
			BEGIN(S_src_qp); 
		}			
	YY_BREAK
case 39:
YY_RULE_SETUP
#line 560 "infinicamproto.l"
{ 	
		if (! bit_entry_32 ( infinitext, 24 , 
			&yy_filter_rule.src_qp.data, 
			&yy_filter_rule.src_qp.mask ) )
		{		
			fprintf( out, "ERROR: Bad SRC-QP parameter line_no: %d\n",infinilineno );
			return T_ERROR;
		};
		#if INFINI_RULE_PRINT
		fprintf( out, "SRC-QP 0x%04x,0x%04x line_no: %d\n",yy_filter_rule.src_qp.data, yy_filter_rule.src_qp.mask, infinilineno );
		#endif
		BEGIN(S_infini_rule);
	}
	YY_BREAK
case 40:
YY_RULE_SETUP
#line 573 "infinicamproto.l"
{
			fprintf( out,"ERROR: wrong format starting with %s on line: %d after SRC-QP  '{----}' expected! \n",infinitext, infinilineno);
			return T_ERROR;
	}	
	YY_BREAK
case 41:
/* rule 41 can match eol */
YY_RULE_SETUP
#line 577 "infinicamproto.l"
{
			fprintf(out,"ERROR: unexpected enf of line on line: %d ! \n", infinilineno-1);
			return T_ERROR;
	}	
	YY_BREAK
/* Implementation for adding comments in the rules 
	 *  single line commnet // to the end of the line 
	 * multiline comment from / * to the * / at any place multiple lines 
	 * and the status is at the point of begining of comment
	 */
/** Action for the filter */		
case 42:
YY_RULE_SETUP
#line 588 "infinicamproto.l"
{
			yy_filter_rule.link_id.data = 1;
			yy_filter_rule.link_id.mask = 0x1;
			#if INFINI_RULE_PRINT
			fprintf( out,"ACTION: %d line_no: %d\n",yy_filter_rule.action, infinilineno );
			#endif 
		};	
	YY_BREAK
case 43:
YY_RULE_SETUP
#line 596 "infinicamproto.l"
{
			yy_filter_rule.link_id.data = 0;
			yy_filter_rule.link_id.mask = 0x1;
			#if INFINI_RULE_PRINT
			fprintf( out,"ACTION: %d line_no: %d\n",yy_filter_rule.action, infinilineno );
			#endif 
		};
	YY_BREAK
case 44:
/* rule 44 can match eol */
YY_RULE_SETUP
#line 604 "infinicamproto.l"
{	
	#if INFINILEX_DEBUG_COMMENT
			fprintf( out, "Single line Comment lineno:%d ", infinilineno-1); 
			ECHO;
			fprintf( out,"\n");
	#endif
		}	
	YY_BREAK
case 45:
YY_RULE_SETUP
#line 611 "infinicamproto.l"
{
			yy_push_state(S_comment);
	#if INFINILEX_DEBUG_COMMENT
			fprintf( out, "SATRT Multy line Commentlineno:%d\n", infinilineno); 
	#endif 
		}
	YY_BREAK
/* warning there is a rule which may overight this one <*>.  */				
case 46:
YY_RULE_SETUP
#line 618 "infinicamproto.l"
; 
	YY_BREAK
case 47:
YY_RULE_SETUP
#line 619 "infinicamproto.l"
{
			yy_pop_state();
	#if INFINILEX_DEBUG_COMMENT
			fprintf( out, "FINISH Multy line Commentlineno:%d\n", infinilineno); 
	#endif
  
		}
	YY_BREAK
case 48:
/* rule 48 can match eol */
YY_RULE_SETUP
#line 626 "infinicamproto.l"
; 
	YY_BREAK
case 49:
/* rule 49 can match eol */
YY_RULE_SETUP
#line 627 "infinicamproto.l"
; 
	YY_BREAK
/* Common things like:
	* A. concatenate multiple lines for one rule \ \n 
	* B. unrecognized charecters any 
	* C. new line and new rule \n,
	*/
case 50:
/* rule 50 can match eol */
YY_RULE_SETUP
#line 635 "infinicamproto.l"
{
			#if INFINILEX_DEBUG_COMMENT
			fprintf( out, "RULE continue to a new lineno:%d\n", infinilineno ); 
			#endif 
			}
	YY_BREAK
case 51:
YY_RULE_SETUP
#line 640 "infinicamproto.l"
{
			fprintf( out, "\nUnrecognized character: %s lineno:%d\n", infinitext, infinilineno ); 
			return T_ERROR;
	}
	YY_BREAK
case 52:
/* rule 52 can match eol */
YY_RULE_SETUP
#line 645 "infinicamproto.l"
{
	#if INFINILEX_DEBUG_COMMENT
		fprintf( out,"Empty line just skip:%d\n",infinilineno-1);
	#endif 
	}
	YY_BREAK
case 53:
/* rule 53 can match eol */
YY_RULE_SETUP
#line 651 "infinicamproto.l"
{
	#if INFINILEX_DEBUG
		fprintf( out, "User tag: %d, action: %s, steering: %d \n", 
   	    		yy_filter_rule.user_tag, (yy_filter_rule.action == 0)?"through":"drop" , yy_filter_rule.user_class );
		fprintf( out, "service_level data: 0x%01x, service_level mask: 0x%01x \n", 
   	    		yy_filter_rule.service_level.data, yy_filter_rule.service_level.mask );
		fprintf( out, "lnh.data: 0x%01x, lnh.mask: 0x%01x\n", 
			yy_filter_rule.lnh.data, yy_filter_rule.lnh.mask);
		fprintf( out, "src_local_id.data: 0x%04x, src_local_id.mask: 0x%04x\n", 
			yy_filter_rule.src_local_id.data, yy_filter_rule.src_local_id.mask);
	    	fprintf( out, "dest_local_id.data: 0x%04x, dest_local_id.mask: 0x%04x\n", 
			yy_filter_rule.dest_local_id.data, yy_filter_rule.dest_local_id.mask);
	    	fprintf( out, "opcode.data: 0x%01x, opcode.mask: 0x%01x\n", 
			yy_filter_rule.opcode.data, yy_filter_rule.opcode.mask);
	    	fprintf( out, "dest_qp.data: 0x%06x, dest_qp.mask: 0x%06x \n", 
			yy_filter_rule.dest_qp.data, yy_filter_rule.dest_qp.mask);
	/* DETH Header classification fields */
	    	fprintf( out, "src_qp.data: 0x%06x, src_qp.mask: 0x%06x \n", 
			yy_filter_rule.src_qp.data, yy_filter_rule.src_qp.mask);
		fprintf( out,"END of rule: on lineno:%d\n",infinilineno-1);
	#endif
		BEGIN(INITIAL);
		/* 
		 * This can be used to change the default behavior 
		 * if you disable the return will retutn at the end of the file or error 
		 * usfull for debugging to be set to 0 or in case we change the sacnner to return set instead of a single rule
		 */
		#if 1
		 return T_RULE_DONE;
		#endif 
	}
	YY_BREAK
case YY_STATE_EOF(S_infini_rule):
#line 682 "infinicamproto.l"
{
	#if INFINILEX_DEBUG
		fprintf( out, "User tag: %d, action: %s, steering: %d \n", 
   	    		yy_filter_rule.user_tag, (yy_filter_rule.action == 0)?"through":"drop" , yy_filter_rule.user_class );
		fprintf( out, "service_level data: 0x%01x, service_level mask: 0x%01x \n", 
   	    		yy_filter_rule.service_level.data, yy_filter_rule.service_level.mask );
		fprintf( out, "lnh.data: 0x%01x, lnh.mask: 0x%01x\n", 
			yy_filter_rule.lnh.data, yy_filter_rule.lnh.mask);
		fprintf( out, "src_local_id.data: 0x%04x, src_local_id.mask: 0x%04x\n", 
			yy_filter_rule.src_local_id.data, yy_filter_rule.src_local_id.mask);
	    	fprintf( out, "dest_local_id.data: 0x%04x, dest_local_id.mask: 0x%04x\n", 
			yy_filter_rule.dest_local_id.data, yy_filter_rule.dest_local_id.mask);
	    	fprintf( out, "opcode.data: 0x%01x, opcode.mask: 0x%01x\n", 
			yy_filter_rule.opcode.data, yy_filter_rule.opcode.mask);
	    	fprintf( out, "dest_qp.data: 0x%06x, dest_qp.mask: 0x%06x \n", 
			yy_filter_rule.dest_qp.data, yy_filter_rule.dest_qp.mask);
	/* DETH Header classification fields */
	    	fprintf( out, "src_qp.data: 0x%06x, src_qp.mask: 0x%06x \n", 
			yy_filter_rule.src_qp.data, yy_filter_rule.src_qp.mask);
		fprintf( out,"END of rule: on lineno:%d\n",infinilineno-1);
	#endif
		BEGIN(INITIAL);

		/* 
         *   Adding the end of file rules so that it accepts the last rule in a file if there 
         *   is no  new line 
		 */
		return T_RULE_DONE;
	}
	YY_BREAK
case 54:
YY_RULE_SETUP
#line 712 "infinicamproto.l"
ECHO;
	YY_BREAK
#line 1921 "infinicamproto.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(S_sl):
case YY_STATE_EOF(S_lnh):
case YY_STATE_EOF(S_slid):
case YY_STATE_EOF(S_dlid):
case YY_STATE_EOF(S_opcode):
case YY_STATE_EOF(S_dest_qp):
case YY_STATE_EOF(S_src_qp):
case YY_STATE_EOF(S_comment):
	yyterminate();

	case YY_END_OF_BUFFER:
		{
		/* Amount of text matched not including the EOB char. */
		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;

		/* Undo the effects of YY_DO_BEFORE_ACTION. */
		*yy_cp = (yy_hold_char);
		YY_RESTORE_YY_MORE_OFFSET

		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
			{
			/* We're scanning a new file or input source.  It's
			 * possible that this happened because the user
			 * just pointed infiniin at a new source and called
			 * infinilex().  If so, then we have to assure
			 * consistency between YY_CURRENT_BUFFER and our
			 * globals.  Here is the right place to do so, because
			 * this is the first action (other than possibly a
			 * back-up) that will match for the new input source.
			 */
			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
			YY_CURRENT_BUFFER_LVALUE->yy_input_file = infiniin;
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
			}

		/* Note that here we test for yy_c_buf_p "<=" to the position
		 * of the first EOB in the buffer, since yy_c_buf_p will
		 * already have been incremented past the NUL character
		 * (since all states make transitions on EOB to the
		 * end-of-buffer state).  Contrast this with the test
		 * in input().
		 */
		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
			{ /* This was really a NUL. */
			yy_state_type yy_next_state;

			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;

			yy_current_state = yy_get_previous_state(  );

			/* Okay, we're now positioned to make the NUL
			 * transition.  We couldn't have
			 * yy_get_previous_state() go ahead and do it
			 * for us because it doesn't know how to deal
			 * with the possibility of jamming (and we don't
			 * want to build jamming into it because then it
			 * will run more slowly).
			 */

			yy_next_state = yy_try_NUL_trans( yy_current_state );

			yy_bp = (yytext_ptr) + YY_MORE_ADJ;

			if ( yy_next_state )
				{
				/* Consume the NUL. */
				yy_cp = ++(yy_c_buf_p);
				yy_current_state = yy_next_state;
				goto yy_match;
				}

			else
				{
				yy_cp = (yy_c_buf_p);
				goto yy_find_action;
				}
			}

		else switch ( yy_get_next_buffer(  ) )
			{
			case EOB_ACT_END_OF_FILE:
				{
				(yy_did_buffer_switch_on_eof) = 0;

				if ( infiniwrap( ) )
					{
					/* Note: because we've taken care in
					 * yy_get_next_buffer() to have set up
					 * infinitext, we can now set up
					 * yy_c_buf_p so that if some total
					 * hoser (like flex itself) wants to
					 * call the scanner after we return the
					 * YY_NULL, it'll still work - another
					 * YY_NULL will get returned.
					 */
					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;

					yy_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

				else
					{
					if ( ! (yy_did_buffer_switch_on_eof) )
						YY_NEW_FILE;
					}
				break;
				}

			case EOB_ACT_CONTINUE_SCAN:
				(yy_c_buf_p) =
					(yytext_ptr) + yy_amount_of_matched_text;

				yy_current_state = yy_get_previous_state(  );

				yy_cp = (yy_c_buf_p);
				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
				goto yy_match;

			case EOB_ACT_LAST_MATCH:
				(yy_c_buf_p) =
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];

				yy_current_state = yy_get_previous_state(  );

				yy_cp = (yy_c_buf_p);
				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
				goto yy_find_action;
			}
		break;
		}

	default:
		YY_FATAL_ERROR(
			"fatal flex scanner internal error--no action found" );
	} /* end of action switch */
		} /* end of scanning one token */
} /* end of infinilex */

/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *	EOB_ACT_LAST_MATCH -
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *	EOB_ACT_END_OF_FILE - end of file
 */
static int yy_get_next_buffer (void)
{
    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
	register char *source = (yytext_ptr);
	register int number_to_move, i;
	int ret_val;

	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
		YY_FATAL_ERROR(
		"fatal flex scanner internal error--end of buffer missed" );

	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
		{ /* Don't try to fill the buffer, so this is an EOF. */
		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
			{
			/* We matched a single character, the EOB, so
			 * treat this as a final EOF.
			 */
			return EOB_ACT_END_OF_FILE;
			}

		else
			{
			/* We matched some text prior to the EOB, first
			 * process it.
			 */
			return EOB_ACT_LAST_MATCH;
			}
		}

	/* Try to read more data. */

	/* First move last chars to start of buffer. */
	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;

	for ( i = 0; i < number_to_move; ++i )
		*(dest++) = *(source++);

	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
		/* don't do the read, it's not guaranteed to return an EOF,
		 * just force an EOF
		 */
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;

	else
		{
			int num_to_read =
			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;

		while ( num_to_read <= 0 )
			{ /* Not enough room in the buffer - grow it. */

			/* just a shorter name for the current buffer */
			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;

			int yy_c_buf_p_offset =
				(int) ((yy_c_buf_p) - b->yy_ch_buf);

			if ( b->yy_is_our_buffer )
				{
				int new_size = b->yy_buf_size * 2;

				if ( new_size <= 0 )
					b->yy_buf_size += b->yy_buf_size / 8;
				else
					b->yy_buf_size *= 2;

				b->yy_ch_buf = (char *)
					/* Include room in for 2 EOB chars. */
					infinirealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
				}
			else
				/* Can't grow it, we don't own it. */
				b->yy_ch_buf = 0;

			if ( ! b->yy_ch_buf )
				YY_FATAL_ERROR(
				"fatal error - scanner input buffer overflow" );

			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];

			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
						number_to_move - 1;

			}

		if ( num_to_read > YY_READ_BUF_SIZE )
			num_to_read = YY_READ_BUF_SIZE;

		/* Read in more data. */
		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
			(yy_n_chars), (size_t) num_to_read );

		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
		}

	if ( (yy_n_chars) == 0 )
		{
		if ( number_to_move == YY_MORE_ADJ )
			{
			ret_val = EOB_ACT_END_OF_FILE;
			infinirestart(infiniin  );
			}

		else
			{
			ret_val = EOB_ACT_LAST_MATCH;
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
				YY_BUFFER_EOF_PENDING;
			}
		}

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

	if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
		/* Extend the array by 50%, plus the number we really need. */
		yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) infinirealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
	}

	(yy_n_chars) += number_to_move;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;

	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];

	return ret_val;
}

/* yy_get_previous_state - get the state just before the EOB char was reached */

    static yy_state_type yy_get_previous_state (void)
{
	register yy_state_type yy_current_state;
	register char *yy_cp;
    
	yy_current_state = (yy_start);
	yy_current_state += YY_AT_BOL();

	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
		{
		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
		if ( yy_accept[yy_current_state] )
			{
			(yy_last_accepting_state) = yy_current_state;
			(yy_last_accepting_cpos) = yy_cp;
			}
		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
			{
			yy_current_state = (int) yy_def[yy_current_state];
			if ( yy_current_state >= 271 )
				yy_c = yy_meta[(unsigned int) yy_c];
			}
		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
		}

	return yy_current_state;
}

/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *	next_state = yy_try_NUL_trans( current_state );
 */
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
{
	register int yy_is_jam;
    	register char *yy_cp = (yy_c_buf_p);

	register YY_CHAR yy_c = 1;
	if ( yy_accept[yy_current_state] )
		{
		(yy_last_accepting_state) = yy_current_state;
		(yy_last_accepting_cpos) = yy_cp;
		}
	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
		{
		yy_current_state = (int) yy_def[yy_current_state];
		if ( yy_current_state >= 271 )
			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 == 270);

	return yy_is_jam ? 0 : yy_current_state;
}

#ifndef YY_NO_INPUT
#ifdef __cplusplus
    static int yyinput (void)
#else
    static int input  (void)
#endif

{
	int c;
    
	*(yy_c_buf_p) = (yy_hold_char);

	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
		{
		/* yy_c_buf_p now points to the character we want to return.
		 * If this occurs *before* the EOB characters, then it's a
		 * valid NUL; if not, then we've hit the end of the buffer.
		 */
		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
			/* This was really a NUL. */
			*(yy_c_buf_p) = '\0';

		else
			{ /* need more input */
			int offset = (yy_c_buf_p) - (yytext_ptr);
			++(yy_c_buf_p);

			switch ( yy_get_next_buffer(  ) )
				{
				case EOB_ACT_LAST_MATCH:
					/* This happens because yy_g_n_b()
					 * sees that we've accumulated a
					 * token and flags that we need to
					 * try matching the token before
					 * proceeding.  But for input(),
					 * there's no matching to consider.
					 * So convert the EOB_ACT_LAST_MATCH
					 * to EOB_ACT_END_OF_FILE.
					 */

					/* Reset buffer status. */
					infinirestart(infiniin );

					/*FALLTHROUGH*/

				case EOB_ACT_END_OF_FILE:
					{
					if ( infiniwrap( ) )
						return EOF;

					if ( ! (yy_did_buffer_switch_on_eof) )
						YY_NEW_FILE;
#ifdef __cplusplus
					return yyinput();
#else
					return input();
#endif
					}

				case EOB_ACT_CONTINUE_SCAN:
					(yy_c_buf_p) = (yytext_ptr) + offset;
					break;
				}
			}
		}

	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
	*(yy_c_buf_p) = '\0';	/* preserve infinitext */
	(yy_hold_char) = *++(yy_c_buf_p);

	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
	if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )
		   
    infinilineno++;
;

	return c;
}
#endif	/* ifndef YY_NO_INPUT */

/** Immediately switch to a different input stream.
 * @param input_file A readable stream.
 * 
 * @note This function does not reset the start condition to @c INITIAL .
 */
    void infinirestart  (FILE * input_file )
{
    
	if ( ! YY_CURRENT_BUFFER ){
        infiniensure_buffer_stack ();
		YY_CURRENT_BUFFER_LVALUE =
            infini_create_buffer(infiniin,YY_BUF_SIZE );
	}

	infini_init_buffer(YY_CURRENT_BUFFER,input_file );
	infini_load_buffer_state( );
}

/** Switch to a different input buffer.
 * @param new_buffer The new input buffer.
 * 
 */
    void infini_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
{
    
	/* TODO. We should be able to replace this entire function body
	 * with
	 *		infinipop_buffer_state();
	 *		infinipush_buffer_state(new_buffer);
     */
	infiniensure_buffer_stack ();
	if ( YY_CURRENT_BUFFER == new_buffer )
		return;

	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*(yy_c_buf_p) = (yy_hold_char);
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
		}

	YY_CURRENT_BUFFER_LVALUE = new_buffer;
	infini_load_buffer_state( );

	/* We don't actually know whether we did this switch during
	 * EOF (infiniwrap()) processing, but the only time this flag
	 * is looked at is after infiniwrap() is called, so it's safe
	 * to go ahead and always set it.
	 */
	(yy_did_buffer_switch_on_eof) = 1;
}

static void infini_load_buffer_state  (void)
{
    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
	infiniin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
	(yy_hold_char) = *(yy_c_buf_p);
}

/** Allocate and initialize an input buffer state.
 * @param file A readable stream.
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 * 
 * @return the allocated buffer state.
 */
    YY_BUFFER_STATE infini_create_buffer  (FILE * file, int  size )
{
	YY_BUFFER_STATE b;
    
	b = (YY_BUFFER_STATE) infinialloc(sizeof( struct yy_buffer_state )  );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in infini_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 *) infinialloc(b->yy_buf_size + 2  );
	if ( ! b->yy_ch_buf )
		YY_FATAL_ERROR( "out of dynamic memory in infini_create_buffer()" );

	b->yy_is_our_buffer = 1;

	infini_init_buffer(b,file );

	return b;
}

/** Destroy the buffer.
 * @param b a buffer created with infini_create_buffer()
 * 
 */
    void infini_delete_buffer (YY_BUFFER_STATE  b )
{
    
	if ( ! b )
		return;

	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;

	if ( b->yy_is_our_buffer )
		infinifree((void *) b->yy_ch_buf  );

	infinifree((void *) b  );
}

#ifndef __cplusplus
extern int isatty (int );
#endif /* __cplusplus */
    
/* Initializes or reinitializes a buffer.
 * This function is sometimes called more than once on the same buffer,
 * such as during a infinirestart() or at EOF.
 */
    static void infini_init_buffer  (YY_BUFFER_STATE  b, FILE * file )

{
	int oerrno = errno;
    
	infini_flush_buffer(b );

	b->yy_input_file = file;
	b->yy_fill_buffer = 1;

    /* If b is the current buffer, then infini_init_buffer was _probably_
     * called from infinirestart() or through yy_get_next_buffer.
     * In that case, we don't want to reset the lineno or column.
     */
    if (b != YY_CURRENT_BUFFER){
        b->yy_bs_lineno = 1;
        b->yy_bs_column = 0;
    }

        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
    
	errno = oerrno;
}

/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 * 
 */
    void infini_flush_buffer (YY_BUFFER_STATE  b )
{
    	if ( ! b )
		return;

	b->yy_n_chars = 0;

	/* We always need two end-of-buffer characters.  The first causes
	 * a transition to the end-of-buffer state.  The second causes
	 * a jam in that state.
	 */
	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;

	b->yy_buf_pos = &b->yy_ch_buf[0];

	b->yy_at_bol = 1;
	b->yy_buffer_status = YY_BUFFER_NEW;

	if ( b == YY_CURRENT_BUFFER )
		infini_load_buffer_state( );
}

/** Pushes the new state onto the stack. The new state becomes
 *  the current state. This function will allocate the stack
 *  if necessary.
 *  @param new_buffer The new state.
 *  
 */
void infinipush_buffer_state (YY_BUFFER_STATE new_buffer )
{
    	if (new_buffer == NULL)
		return;

	infiniensure_buffer_stack();

	/* This block is copied from infini_switch_to_buffer. */
	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*(yy_c_buf_p) = (yy_hold_char);
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
		}

	/* Only push if top exists. Otherwise, replace top. */
	if (YY_CURRENT_BUFFER)
		(yy_buffer_stack_top)++;
	YY_CURRENT_BUFFER_LVALUE = new_buffer;

	/* copied from infini_switch_to_buffer. */
	infini_load_buffer_state( );
	(yy_did_buffer_switch_on_eof) = 1;
}

/** Removes and deletes the top of the stack, if present.
 *  The next element becomes the new top.
 *  
 */
void infinipop_buffer_state (void)
{
    	if (!YY_CURRENT_BUFFER)
		return;

	infini_delete_buffer(YY_CURRENT_BUFFER );
	YY_CURRENT_BUFFER_LVALUE = NULL;
	if ((yy_buffer_stack_top) > 0)
		--(yy_buffer_stack_top);

	if (YY_CURRENT_BUFFER) {
		infini_load_buffer_state( );
		(yy_did_buffer_switch_on_eof) = 1;
	}
}

/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */
static void infiniensure_buffer_stack (void)
{
	int num_to_alloc;
    
	if (!(yy_buffer_stack)) {

		/* First allocation is just for 2 elements, since we don't know if this
		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
		 * immediate realloc on the next call.
         */
		num_to_alloc = 1;
		(yy_buffer_stack) = (struct yy_buffer_state**)infinialloc
								(num_to_alloc * sizeof(struct yy_buffer_state*)
								);
		if ( ! (yy_buffer_stack) )
			YY_FATAL_ERROR( "out of dynamic memory in infiniensure_buffer_stack()" );
								  
		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
				
		(yy_buffer_stack_max) = num_to_alloc;
		(yy_buffer_stack_top) = 0;
		return;
	}

	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){

		/* Increase the buffer to prepare for a possible push. */
		int grow_size = 8 /* arbitrary grow size */;

		num_to_alloc = (yy_buffer_stack_max) + grow_size;
		(yy_buffer_stack) = (struct yy_buffer_state**)infinirealloc
								((yy_buffer_stack),
								num_to_alloc * sizeof(struct yy_buffer_state*)
								);
		if ( ! (yy_buffer_stack) )
			YY_FATAL_ERROR( "out of dynamic memory in infiniensure_buffer_stack()" );

		/* zero only the new slots.*/
		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
		(yy_buffer_stack_max) = num_to_alloc;
	}
}

/** Setup the input buffer state to scan directly from a user-specified character buffer.
 * @param base the character buffer
 * @param size the size in bytes of the character buffer
 * 
 * @return the newly allocated buffer state object. 
 */
YY_BUFFER_STATE infini_scan_buffer  (char * base, yy_size_t  size )
{
	YY_BUFFER_STATE b;
    
	if ( size < 2 ||
	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
	     base[size-1] != YY_END_OF_BUFFER_CHAR )
		/* They forgot to leave room for the EOB's. */
		return 0;

	b = (YY_BUFFER_STATE) infinialloc(sizeof( struct yy_buffer_state )  );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in infini_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;

	infini_switch_to_buffer(b  );

	return b;
}

/** Setup the input buffer state to scan a string. The next call to infinilex() will
 * scan from a @e copy of @a str.
 * @param yystr a NUL-terminated string to scan
 * 
 * @return the newly allocated buffer state object.
 * @note If you want to scan bytes that may contain NUL values, then use
 *       infini_scan_bytes() instead.
 */
YY_BUFFER_STATE infini_scan_string (yyconst char * yystr )
{
    
	return infini_scan_bytes(yystr,strlen(yystr) );
}

/** Setup the input buffer state to scan the given bytes. The next call to infinilex() will
 * scan from a @e copy of @a bytes.
 * @param bytes the byte buffer to scan
 * @param len the number of bytes in the buffer pointed to by @a bytes.
 * 
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE infini_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
{
	YY_BUFFER_STATE b;
	char *buf;
	yy_size_t n;
	int i;
    
	/* Get memory for full buffer, including space for trailing EOB's. */
	n = _yybytes_len + 2;
	buf = (char *) infinialloc(n  );
	if ( ! buf )
		YY_FATAL_ERROR( "out of dynamic memory in infini_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 = infini_scan_buffer(buf,n );
	if ( ! b )
		YY_FATAL_ERROR( "bad buffer in infini_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;
}

    static void yy_push_state (int  new_state )
{
    	if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
		{
		yy_size_t new_size;

		(yy_start_stack_depth) += YY_START_STACK_INCR;
		new_size = (yy_start_stack_depth) * sizeof( int );

		if ( ! (yy_start_stack) )
			(yy_start_stack) = (int *) infinialloc(new_size  );

		else
			(yy_start_stack) = (int *) infinirealloc((void *) (yy_start_stack),new_size  );

		if ( ! (yy_start_stack) )
			YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
		}

	(yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;

	BEGIN(new_state);
}

    static void yy_pop_state  (void)
{
    	if ( --(yy_start_stack_ptr) < 0 )
		YY_FATAL_ERROR( "start-condition stack underflow" );

	BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
}

    static int yy_top_state  (void)
{
    	return (yy_start_stack)[(yy_start_stack_ptr) - 1];
}

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

static void yy_fatal_error (yyconst char* msg )
{
    	(void) fprintf( stderr, "%s\n", msg );
	exit( YY_EXIT_FAILURE );
}

/* Redefine yyless() so it works in section 3 code. */

#undef yyless
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up infinitext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		infinitext[infinileng] = (yy_hold_char); \
		(yy_c_buf_p) = infinitext + yyless_macro_arg; \
		(yy_hold_char) = *(yy_c_buf_p); \
		*(yy_c_buf_p) = '\0'; \
		infinileng = yyless_macro_arg; \
		} \
	while ( 0 )

/* Accessor  methods (get/set functions) to struct members. */

/** Get the current line number.
 * 
 */
int infiniget_lineno  (void)
{
        
    return infinilineno;
}

/** Get the input stream.
 * 
 */
FILE *infiniget_in  (void)
{
        return infiniin;
}

/** Get the output stream.
 * 
 */
FILE *infiniget_out  (void)
{
        return infiniout;
}

/** Get the length of the current token.
 * 
 */
int infiniget_leng  (void)
{
        return infinileng;
}

/** Get the current token.
 * 
 */

char *infiniget_text  (void)
{
        return infinitext;
}

/** Set the current line number.
 * @param line_number
 * 
 */
void infiniset_lineno (int  line_number )
{
    
    infinilineno = line_number;
}

/** Set the input stream. This does not discard the current
 * input buffer.
 * @param in_str A readable stream.
 * 
 * @see infini_switch_to_buffer
 */
void infiniset_in (FILE *  in_str )
{
        infiniin = in_str ;
}

void infiniset_out (FILE *  out_str )
{
        infiniout = out_str ;
}

int infiniget_debug  (void)
{
        return infini_flex_debug;
}

void infiniset_debug (int  bdebug )
{
        infini_flex_debug = bdebug ;
}

static int yy_init_globals (void)
{
        /* Initialization is the same as for the non-reentrant scanner.
     * This function is called from infinilex_destroy(), so don't allocate here.
     */

    /* We do not touch infinilineno unless the option is enabled. */
    infinilineno =  1;
    
    (yy_buffer_stack) = 0;
    (yy_buffer_stack_top) = 0;
    (yy_buffer_stack_max) = 0;
    (yy_c_buf_p) = (char *) 0;
    (yy_init) = 0;
    (yy_start) = 0;

    (yy_start_stack_ptr) = 0;
    (yy_start_stack_depth) = 0;
    (yy_start_stack) =  NULL;

/* Defined in main.c */
#ifdef YY_STDINIT
    infiniin = stdin;
    infiniout = stdout;
#else
    infiniin = (FILE *) 0;
    infiniout = (FILE *) 0;
#endif

    /* For future reference: Set errno on error, since we are called by
     * infinilex_init()
     */
    return 0;
}

/* infinilex_destroy is for both reentrant and non-reentrant scanners. */
int infinilex_destroy  (void)
{
    
    /* Pop the buffer stack, destroying each element. */
	while(YY_CURRENT_BUFFER){
		infini_delete_buffer(YY_CURRENT_BUFFER  );
		YY_CURRENT_BUFFER_LVALUE = NULL;
		infinipop_buffer_state();
	}

	/* Destroy the stack itself. */
	infinifree((yy_buffer_stack) );
	(yy_buffer_stack) = NULL;

    /* Destroy the start condition stack. */
        infinifree((yy_start_stack)  );
        (yy_start_stack) = NULL;

    /* Reset the globals. This is important in a non-reentrant scanner so the next time
     * infinilex() is called, initialization will occur. */
    yy_init_globals( );

    return 0;
}

/*
 * Internal utility routines.
 */

#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
{
	register int i;
	for ( i = 0; i < n; ++i )
		s1[i] = s2[i];
}
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s )
{
	register int n;
	for ( n = 0; s[n]; ++n )
		;

	return n;
}
#endif

void *infinialloc (yy_size_t  size )
{
	return (void *) malloc( size );
}

void *infinirealloc  (void * ptr, yy_size_t  size )
{
	/* The cast to (char *) in the following accommodates both
	 * implementations that use char* generic pointers, and those
	 * that use void* generic pointers.  It works with the latter
	 * because both ANSI C and C++ allow castless assignment from
	 * any pointer type to void*, and deal with argument conversions
	 * as though doing an assignment.
	 */
	return (void *) realloc( (char *) ptr, size );
}

void infinifree (void * ptr )
{
	free( (char *) ptr );	/* see infinirealloc() for (char *) cast */
}

#define YYTABLES_NAME "yytables"

#line 712 "infinicamproto.l"


			
int scanner_set_stdout(FILE *scanner_out) {
		out = scanner_out;
		return 0;
}


int scanner_set_topstate(void) {
	return yy_top_state();
}
		


