"Fossies" - the Fresh Open Source Software Archive

Member "udunits-2.2.28/lib/scanner.c" (8 Dec 2020, 79888 Bytes) of package /linux/privat/udunits-2.2.28.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "scanner.c" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.2.26_vs_2.2.28.

    1 
    2 #line 3 "<stdout>"
    3 
    4 #define  YY_INT_ALIGNED short int
    5 
    6 /* A lexical scanner generated by flex */
    7 
    8 /* %not-for-header */
    9 
   10 /* %if-c-only */
   11 /* %if-not-reentrant */
   12 #define yy_create_buffer ut_create_buffer
   13 #define yy_delete_buffer ut_delete_buffer
   14 #define yy_flex_debug ut_flex_debug
   15 #define yy_init_buffer ut_init_buffer
   16 #define yy_flush_buffer ut_flush_buffer
   17 #define yy_load_buffer_state ut_load_buffer_state
   18 #define yy_switch_to_buffer ut_switch_to_buffer
   19 #define yyin utin
   20 #define yyleng utleng
   21 #define yylex utlex
   22 #define yylineno utlineno
   23 #define yyout utout
   24 #define yyrestart utrestart
   25 #define yytext uttext
   26 #define yywrap utwrap
   27 #define yyalloc utalloc
   28 #define yyrealloc utrealloc
   29 #define yyfree utfree
   30 
   31 /* %endif */
   32 /* %endif */
   33 /* %ok-for-header */
   34 
   35 #define FLEX_SCANNER
   36 #define YY_FLEX_MAJOR_VERSION 2
   37 #define YY_FLEX_MINOR_VERSION 5
   38 #define YY_FLEX_SUBMINOR_VERSION 37
   39 #if YY_FLEX_SUBMINOR_VERSION > 0
   40 #define FLEX_BETA
   41 #endif
   42 
   43 /* %if-c++-only */
   44 /* %endif */
   45 
   46 /* %if-c-only */
   47     
   48 /* %endif */
   49 
   50 /* %if-c-only */
   51 
   52 /* %endif */
   53 
   54 /* First, we deal with  platform-specific or compiler-specific issues. */
   55 
   56 /* begin standard C headers. */
   57 /* %if-c-only */
   58 #include <stdio.h>
   59 #include <string.h>
   60 #include <errno.h>
   61 #include <stdlib.h>
   62 /* %endif */
   63 
   64 /* %if-tables-serialization */
   65 /* %endif */
   66 /* end standard C headers. */
   67 
   68 /* %if-c-or-c++ */
   69 /* flex integer type definitions */
   70 
   71 #ifndef FLEXINT_H
   72 #define FLEXINT_H
   73 
   74 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
   75 
   76 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
   77 
   78 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
   79  * if you want the limit (max/min) macros for int types. 
   80  */
   81 #ifndef __STDC_LIMIT_MACROS
   82 #define __STDC_LIMIT_MACROS 1
   83 #endif
   84 
   85 #include <inttypes.h>
   86 typedef int8_t flex_int8_t;
   87 typedef uint8_t flex_uint8_t;
   88 typedef int16_t flex_int16_t;
   89 typedef uint16_t flex_uint16_t;
   90 typedef int32_t flex_int32_t;
   91 typedef uint32_t flex_uint32_t;
   92 #else
   93 typedef signed char flex_int8_t;
   94 typedef short int flex_int16_t;
   95 typedef int flex_int32_t;
   96 typedef unsigned char flex_uint8_t; 
   97 typedef unsigned short int flex_uint16_t;
   98 typedef unsigned int flex_uint32_t;
   99 
  100 /* Limits of integral types. */
  101 #ifndef INT8_MIN
  102 #define INT8_MIN               (-128)
  103 #endif
  104 #ifndef INT16_MIN
  105 #define INT16_MIN              (-32767-1)
  106 #endif
  107 #ifndef INT32_MIN
  108 #define INT32_MIN              (-2147483647-1)
  109 #endif
  110 #ifndef INT8_MAX
  111 #define INT8_MAX               (127)
  112 #endif
  113 #ifndef INT16_MAX
  114 #define INT16_MAX              (32767)
  115 #endif
  116 #ifndef INT32_MAX
  117 #define INT32_MAX              (2147483647)
  118 #endif
  119 #ifndef UINT8_MAX
  120 #define UINT8_MAX              (255U)
  121 #endif
  122 #ifndef UINT16_MAX
  123 #define UINT16_MAX             (65535U)
  124 #endif
  125 #ifndef UINT32_MAX
  126 #define UINT32_MAX             (4294967295U)
  127 #endif
  128 
  129 #endif /* ! C99 */
  130 
  131 #endif /* ! FLEXINT_H */
  132 
  133 /* %endif */
  134 
  135 /* %if-c++-only */
  136 /* %endif */
  137 
  138 #ifdef __cplusplus
  139 
  140 /* The "const" storage-class-modifier is valid. */
  141 #define YY_USE_CONST
  142 
  143 #else   /* ! __cplusplus */
  144 
  145 /* C99 requires __STDC__ to be defined as 1. */
  146 #if defined (__STDC__)
  147 
  148 #define YY_USE_CONST
  149 
  150 #endif  /* defined (__STDC__) */
  151 #endif  /* ! __cplusplus */
  152 
  153 #ifdef YY_USE_CONST
  154 #define yyconst const
  155 #else
  156 #define yyconst
  157 #endif
  158 
  159 /* %not-for-header */
  160 
  161 /* Returned upon end-of-file. */
  162 #define YY_NULL 0
  163 /* %ok-for-header */
  164 
  165 /* %not-for-header */
  166 
  167 /* Promotes a possibly negative, possibly signed char to an unsigned
  168  * integer for use as an array index.  If the signed char is negative,
  169  * we want to instead treat it as an 8-bit unsigned char, hence the
  170  * double cast.
  171  */
  172 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
  173 /* %ok-for-header */
  174 
  175 /* %if-reentrant */
  176 /* %endif */
  177 
  178 /* %if-not-reentrant */
  179 
  180 /* %endif */
  181 
  182 /* Enter a start condition.  This macro really ought to take a parameter,
  183  * but we do it the disgusting crufty way forced on us by the ()-less
  184  * definition of BEGIN.
  185  */
  186 #define BEGIN (yy_start) = 1 + 2 *
  187 
  188 /* Translate the current start state into a value that can be later handed
  189  * to BEGIN to return to the state.  The YYSTATE alias is for lex
  190  * compatibility.
  191  */
  192 #define YY_START (((yy_start) - 1) / 2)
  193 #define YYSTATE YY_START
  194 
  195 /* Action number for EOF rule of a given start state. */
  196 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  197 
  198 /* Special action meaning "start processing a new file". */
  199 #define YY_NEW_FILE utrestart(utin  )
  200 
  201 #define YY_END_OF_BUFFER_CHAR 0
  202 
  203 /* Size of default input buffer. */
  204 #ifndef YY_BUF_SIZE
  205 #define YY_BUF_SIZE 16384
  206 #endif
  207 
  208 /* The state buf must be large enough to hold one state per character in the main buffer.
  209  */
  210 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
  211 
  212 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
  213 #define YY_TYPEDEF_YY_BUFFER_STATE
  214 typedef struct yy_buffer_state *YY_BUFFER_STATE;
  215 #endif
  216 
  217 #ifndef YY_TYPEDEF_YY_SIZE_T
  218 #define YY_TYPEDEF_YY_SIZE_T
  219 typedef size_t yy_size_t;
  220 #endif
  221 
  222 /* %if-not-reentrant */
  223 extern yy_size_t utleng;
  224 /* %endif */
  225 
  226 /* %if-c-only */
  227 /* %if-not-reentrant */
  228 extern FILE *utin, *utout;
  229 /* %endif */
  230 /* %endif */
  231 
  232 #define EOB_ACT_CONTINUE_SCAN 0
  233 #define EOB_ACT_END_OF_FILE 1
  234 #define EOB_ACT_LAST_MATCH 2
  235 
  236     #define YY_LESS_LINENO(n)
  237     
  238 /* Return all but the first "n" matched characters back to the input stream. */
  239 #define yyless(n) \
  240     do \
  241         { \
  242         /* Undo effects of setting up uttext. */ \
  243         int yyless_macro_arg = (n); \
  244         YY_LESS_LINENO(yyless_macro_arg);\
  245         *yy_cp = (yy_hold_char); \
  246         YY_RESTORE_YY_MORE_OFFSET \
  247         (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
  248         YY_DO_BEFORE_ACTION; /* set up uttext again */ \
  249         } \
  250     while ( 0 )
  251 
  252 #define unput(c) yyunput( c, (yytext_ptr)  )
  253 
  254 #ifndef YY_STRUCT_YY_BUFFER_STATE
  255 #define YY_STRUCT_YY_BUFFER_STATE
  256 struct yy_buffer_state
  257     {
  258 /* %if-c-only */
  259     FILE *yy_input_file;
  260 /* %endif */
  261 
  262 /* %if-c++-only */
  263 /* %endif */
  264 
  265     char *yy_ch_buf;        /* input buffer */
  266     char *yy_buf_pos;       /* current position in input buffer */
  267 
  268     /* Size of input buffer in bytes, not including room for EOB
  269      * characters.
  270      */
  271     yy_size_t yy_buf_size;
  272 
  273     /* Number of characters read into yy_ch_buf, not including EOB
  274      * characters.
  275      */
  276     yy_size_t yy_n_chars;
  277 
  278     /* Whether we "own" the buffer - i.e., we know we created it,
  279      * and can realloc() it to grow it, and should free() it to
  280      * delete it.
  281      */
  282     int yy_is_our_buffer;
  283 
  284     /* Whether this is an "interactive" input source; if so, and
  285      * if we're using stdio for input, then we want to use getc()
  286      * instead of fread(), to make sure we stop fetching input after
  287      * each newline.
  288      */
  289     int yy_is_interactive;
  290 
  291     /* Whether we're considered to be at the beginning of a line.
  292      * If so, '^' rules will be active on the next match, otherwise
  293      * not.
  294      */
  295     int yy_at_bol;
  296 
  297     int yy_bs_lineno; /**< The line count. */
  298     int yy_bs_column; /**< The column count. */
  299     
  300     /* Whether to try to fill the input buffer when we reach the
  301      * end of it.
  302      */
  303     int yy_fill_buffer;
  304 
  305     int yy_buffer_status;
  306 
  307 #define YY_BUFFER_NEW 0
  308 #define YY_BUFFER_NORMAL 1
  309     /* When an EOF's been seen but there's still some text to process
  310      * then we mark the buffer as YY_EOF_PENDING, to indicate that we
  311      * shouldn't try reading from the input source any more.  We might
  312      * still have a bunch of tokens to match, though, because of
  313      * possible backing-up.
  314      *
  315      * When we actually see the EOF, we change the status to "new"
  316      * (via utrestart()), so that the user can continue scanning by
  317      * just pointing utin at a new input file.
  318      */
  319 #define YY_BUFFER_EOF_PENDING 2
  320 
  321     };
  322 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
  323 
  324 /* %if-c-only Standard (non-C++) definition */
  325 /* %not-for-header */
  326 
  327 /* %if-not-reentrant */
  328 
  329 /* Stack of input buffers. */
  330 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
  331 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
  332 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
  333 /* %endif */
  334 /* %ok-for-header */
  335 
  336 /* %endif */
  337 
  338 /* We provide macros for accessing buffer states in case in the
  339  * future we want to put the buffer states in a more general
  340  * "scanner state".
  341  *
  342  * Returns the top of the stack, or NULL.
  343  */
  344 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
  345                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
  346                           : NULL)
  347 
  348 /* Same as previous macro, but useful when we know that the buffer stack is not
  349  * NULL or when we need an lvalue. For internal use only.
  350  */
  351 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
  352 
  353 /* %if-c-only Standard (non-C++) definition */
  354 
  355 /* %if-not-reentrant */
  356 /* %not-for-header */
  357 
  358 /* yy_hold_char holds the character lost when uttext is formed. */
  359 static char yy_hold_char;
  360 static yy_size_t yy_n_chars;        /* number of characters read into yy_ch_buf */
  361 yy_size_t utleng;
  362 
  363 /* Points to current character in buffer. */
  364 static char *yy_c_buf_p = (char *) 0;
  365 static int yy_init = 0;     /* whether we need to initialize */
  366 static int yy_start = 0;    /* start state number */
  367 
  368 /* Flag which is used to allow utwrap()'s to do buffer switches
  369  * instead of setting up a fresh utin.  A bit of a hack ...
  370  */
  371 static int yy_did_buffer_switch_on_eof;
  372 /* %ok-for-header */
  373 
  374 /* %endif */
  375 
  376 void utrestart (FILE *input_file  );
  377 void ut_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
  378 YY_BUFFER_STATE ut_create_buffer (FILE *file,int size  );
  379 void ut_delete_buffer (YY_BUFFER_STATE b  );
  380 void ut_flush_buffer (YY_BUFFER_STATE b  );
  381 void utpush_buffer_state (YY_BUFFER_STATE new_buffer  );
  382 void utpop_buffer_state (void );
  383 
  384 static void utensure_buffer_stack (void );
  385 static void ut_load_buffer_state (void );
  386 static void ut_init_buffer (YY_BUFFER_STATE b,FILE *file  );
  387 
  388 #define YY_FLUSH_BUFFER ut_flush_buffer(YY_CURRENT_BUFFER )
  389 
  390 YY_BUFFER_STATE ut_scan_buffer (char *base,yy_size_t size  );
  391 YY_BUFFER_STATE ut_scan_string (yyconst char *yy_str  );
  392 YY_BUFFER_STATE ut_scan_bytes (yyconst char *bytes,yy_size_t len  );
  393 
  394 /* %endif */
  395 
  396 void *utalloc (yy_size_t  );
  397 void *utrealloc (void *,yy_size_t  );
  398 void utfree (void *  );
  399 
  400 #define yy_new_buffer ut_create_buffer
  401 
  402 #define yy_set_interactive(is_interactive) \
  403     { \
  404     if ( ! YY_CURRENT_BUFFER ){ \
  405         utensure_buffer_stack (); \
  406         YY_CURRENT_BUFFER_LVALUE =    \
  407             ut_create_buffer(utin,YY_BUF_SIZE ); \
  408     } \
  409     YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
  410     }
  411 
  412 #define yy_set_bol(at_bol) \
  413     { \
  414     if ( ! YY_CURRENT_BUFFER ){\
  415         utensure_buffer_stack (); \
  416         YY_CURRENT_BUFFER_LVALUE =    \
  417             ut_create_buffer(utin,YY_BUF_SIZE ); \
  418     } \
  419     YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
  420     }
  421 
  422 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
  423 
  424 /* %% [1.0] uttext/utin/utout/yy_state_type/utlineno etc. def's & init go here */
  425 /* Begin user sect3 */
  426 
  427 #define utwrap() 1
  428 #define YY_SKIP_YYWRAP
  429 
  430 #define FLEX_DEBUG
  431 
  432 typedef unsigned char YY_CHAR;
  433 
  434 FILE *utin = (FILE *) 0, *utout = (FILE *) 0;
  435 
  436 typedef int yy_state_type;
  437 
  438 extern int utlineno;
  439 
  440 int utlineno = 1;
  441 
  442 extern char *uttext;
  443 #define yytext_ptr uttext
  444 
  445 /* %if-c-only Standard (non-C++) definition */
  446 
  447 static yy_state_type yy_get_previous_state (void );
  448 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
  449 static int yy_get_next_buffer (void );
  450 static void yy_fatal_error (yyconst char msg[]  );
  451 
  452 /* %endif */
  453 
  454 /* Done after the current pattern has been matched and before the
  455  * corresponding action - sets up uttext.
  456  */
  457 #define YY_DO_BEFORE_ACTION \
  458     (yytext_ptr) = yy_bp; \
  459 /* %% [2.0] code to fiddle uttext and utleng for yymore() goes here \ */\
  460     utleng = (size_t) (yy_cp - yy_bp); \
  461     (yy_hold_char) = *yy_cp; \
  462     *yy_cp = '\0'; \
  463 /* %% [3.0] code to copy yytext_ptr to uttext[] goes here, if %array \ */\
  464     (yy_c_buf_p) = yy_cp;
  465 
  466 /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
  467 #define YY_NUM_RULES 20
  468 #define YY_END_OF_BUFFER 21
  469 /* This struct is not used in this scanner,
  470    but its presence is necessary. */
  471 struct yy_trans_info
  472     {
  473     flex_int32_t yy_verify;
  474     flex_int32_t yy_nxt;
  475     };
  476 static yyconst flex_int16_t yy_accept[271] =
  477     {   0,
  478         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  479        21,   19,    3,   20,   18,    3,   19,    3,    3,    2,
  480        14,    1,   18,   18,   18,   18,   18,   18,   19,   18,
  481        19,   19,   19,   19,   19,   19,    3,    3,   14,   19,
  482        19,   19,   19,   19,   19,   19,   19,   19,   19,    7,
  483        19,    9,    9,    9,   19,   12,   19,    3,    2,    1,
  484         0,    0,    0,    0,    0,    0,    0,   14,   13,    2,
  485        13,    0,    1,    0,   18,   18,    0,    0,    0,    0,
  486        18,   18,   18,   18,    0,    4,   18,   18,   18,   18,
  487        18,    5,    3,    0,    0,   14,    0,    0,    0,    0,
  488 
  489         0,    0,    0,    0,    0,    0,    7,    7,    0,    7,
  490         7,    7,    7,    9,    9,    9,    9,    9,    0,    9,
  491         9,   11,   12,    0,    0,   13,    0,   13,   18,    0,
  492        18,    2,    1,   18,    0,    0,    0,    0,    0,    0,
  493         0,    0,    5,   18,    0,    0,    0,    5,    0,    0,
  494         6,    6,    7,    7,    7,    7,    7,    7,    7,    7,
  495         7,    7,    7,    9,    9,    9,    8,    8,    9,    9,
  496         9,    9,   10,    0,   13,   18,   18,    0,    0,    0,
  497         0,    0,    0,    0,    0,    0,    0,    0,    6,    0,
  498         6,    7,    7,    7,    7,    7,    7,    7,    7,    7,
  499 
  500         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
  501         7,    9,    9,    8,    0,   17,   15,   16,    0,    0,
  502         6,    6,    6,   14,    7,    7,    7,    7,    7,    7,
  503         7,   14,    7,    7,    7,    7,    7,    7,    7,    7,
  504         7,    7,    7,    9,    8,    8,    8,   17,    0,   15,
  505         0,   16,    0,    5,    7,    7,    7,   14,    7,    7,
  506         7,    7,    7,    7,    8,   17,   15,   16,    8,    0
  507     } ;
  508 
  509 static yyconst flex_int32_t yy_ec[256] =
  510     {   0,
  511         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
  512         2,    2,    2,    1,    1,    1,    1,    1,    1,    1,
  513         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  514         1,    2,    1,    4,    1,    1,    5,    1,    6,    7,
  515         1,    8,    9,    1,   10,   11,   12,   13,   14,   15,
  516        16,   17,   17,   18,   19,   19,   19,   20,    1,    1,
  517         1,    1,    1,   21,   22,   23,   24,   23,   25,   26,
  518        23,   23,   27,   23,   23,   23,   28,   29,   30,   31,
  519        23,   32,   33,   34,   23,   23,   23,   23,   23,   23,
  520         1,    1,    1,   35,   23,    1,   22,   36,   24,   23,
  521 
  522        25,   26,   37,   23,   27,   23,   23,   38,   28,   39,
  523        40,   31,   23,   32,   33,   41,   23,   23,   23,   23,
  524        23,   23,    1,    1,    1,    1,    1,   42,   43,   42,
  525        42,   42,   42,   42,   42,   42,   42,   42,   42,   42,
  526        42,   42,   42,   42,   42,   42,   42,   42,   42,   42,
  527        44,   45,   45,   45,   45,   45,   45,   45,   45,   46,
  528        45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
  529        45,   45,   47,   45,   45,   48,   45,   49,   50,   51,
  530        52,   51,   53,   54,   55,   56,   57,   58,   58,   58,
  531        58,    1,    1,   59,   60,    1,    1,    1,    1,   61,
  532 
  533        61,   61,   61,   61,   61,   61,   61,   61,   61,   61,
  534        61,   61,   61,   61,   61,   61,   61,   61,   61,   61,
  535        61,   61,   61,   62,   62,   63,   62,   62,   62,   62,
  536        62,   62,   62,   62,   62,   62,   62,   62,   62,    1,
  537         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  538         1,    1,    1,    1,    1
  539     } ;
  540 
  541 static yyconst flex_int32_t yy_meta[64] =
  542     {   0,
  543         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  544         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  545         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  546         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  547         1,    2,    2,    3,    2,    2,    2,    2,    2,    2,
  548         2,    2,    3,    2,    2,    2,    2,    2,    1,    1,
  549         1,    1,    1
  550     } ;
  551 
  552 static yyconst flex_int16_t yy_base[276] =
  553     {   0,
  554         0,    0,   62,  124,  185,  221,  257,  293,  330,    0,
  555      1072, 1261,   80, 1261, 1261, 1055,  150,  159,  101, 1058,
  556       194, 1057,  381, 1032,   59,   41,   43,   60,  232,  145,
  557       231,    0,   45,    0, 1014,  239,  274, 1261,  300, 1030,
  558      1023, 1029, 1016, 1003,   68,   98,  984,  309,  353,  443,
  559       360,  414,  465,  473,  367,  481,   76,  500, 1024, 1023,
  560       992,  974,  972,  954,  940,  500,  433,  523,  536,  927,
  561       549,  562,  925,  881,  876,  180,  145,    0,   46,    0,
  562       203,   77,  875,  189,  569,  576,  218,  327,  328,  123,
  563       860,   95, 1261,  136,  554,  600,  145,  186,  851,  839,
  564 
  565       188,  261,  262,  292,  816,  572,    0,  839,  617,  635,
  566       668,  116, 1261,  690,  698,  838,  717,  725,  625,  744,
  567       751,  648,  758,  658,  770,  777,  707,  790,  236,  306,
  568       272,  295,  331,  334,  385,  423,  462,  433,  464,  471,
  569       456,  777,  411,  413,  792,  700,  677,  242,  445,  680,
  570       808,  525,  841,  874,  510,    0,  907,  515,  323,    0,
  571       530,    0,    0,  813,  929,  947,  937,  727,  957,  967,
  572       545,  353,  820,  831,  854,  722,  365,  656,  655,  657,
  573       622,  749,  548,  826,  848,  517,  525,  495,  505,  897,
  574      1261,  985, 1018,  642,    0, 1051,  784,  388,    0,  798,
  575 
  576         0,    0,    0,    0,    0,  410,    0,    0,    0,    0,
  577         0,  975, 1073,  461,  998,  780,  799,  862,  994,  919,
  578      1080, 1037,  188, 1090, 1114,  848,  742, 1147,  891,  556,
  579         0, 1127,    0,    0,    0,    0,    0,  608,    0,  995,
  580         0,    0,    0, 1169, 1178,  917,  814,  436,  434,  424,
  581       386,  302,  283,  981,    0, 1196,  677, 1209, 1008,    0,
  582         0,  736,  269,    0, 1227,  263,  150,  142, 1234, 1261,
  583      1253,  108, 1255,   94, 1257
  584     } ;
  585 
  586 static yyconst flex_int16_t yy_def[276] =
  587     {   0,
  588       270,    1,  271,  271,  271,  271,  271,  271,    1,    9,
  589       270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
  590       270,  270,  270,   23,   23,   23,   23,   23,  270,   23,
  591       270,  272,  272,  273,  273,  270,  270,  270,  270,  270,
  592       270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
  593       270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
  594       270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
  595       270,  270,  270,   23,   23,   23,  270,  274,  274,  275,
  596        23,   23,   23,   23,  270,  270,   23,   23,   23,   23,
  597        23,  270,  270,  272,  270,  270,  270,  270,  270,  270,
  598 
  599       270,  270,  270,  270,  270,  270,   50,  270,  270,  270,
  600       270,  111,  270,  270,  270,  270,  270,  270,  270,  270,
  601       270,  270,  270,  270,  270,  270,  270,  270,   23,  274,
  602        23,   23,   23,   23,  270,  270,  270,  270,  270,  270,
  603       270,  270,   23,   23,  270,  270,  270,  270,  270,  270,
  604       270,  270,  270,  270,  154,  155,  270,  157,  155,  155,
  605       155,  157,  158,  270,  270,  270,  270,  270,  270,  270,
  606       270,  270,  270,  270,  270,   23,   23,  270,  270,  270,
  607       270,  270,  270,  270,  270,  275,  270,  270,  270,  270,
  608       270,  270,  270,  193,  194,  270,  196,  194,  194,  194,
  609 
  610       196,  197,  194,  196,  197,  194,  194,  200,  196,  197,
  611       193,  270,  270,  270,  270,  270,  270,  270,  274,  270,
  612       270,  270,  270,  270,  270,  225,  194,  270,  228,  226,
  613       226,  270,  228,  229,  227,  228,  229,  226,  226,  200,
  614       228,  229,  225,  270,  270,  270,  270,  270,  270,  270,
  615       270,  270,  270,   23,  226,  270,  256,  270,  226,  226,
  616       256,  256,  259,  259,  270,  270,  270,  270,  270,    0,
  617       270,  270,  270,  270,  270
  618     } ;
  619 
  620 static yyconst flex_int16_t yy_nxt[1325] =
  621     {   0,
  622        12,   13,   14,   15,   15,   15,   12,   16,   17,   18,
  623        19,   20,   21,   21,   21,   21,   21,   21,   21,   12,
  624        22,   23,   24,   24,   24,   25,   24,   24,   24,   24,
  625        26,   27,   28,   24,   29,   24,   24,   30,   24,   24,
  626        24,   12,   12,   12,   12,   12,   12,   12,   12,   12,
  627        12,   12,   12,   12,   12,   12,   12,   12,   31,   32,
  628        33,   34,   35,   13,   14,   82,   75,   83,   75,   16,
  629        36,   37,   38,   20,   39,   39,   39,   39,   39,   39,
  630        39,   58,   22,   40,   75,   75,   84,   41,   91,   75,
  631        81,   59,   42,   43,   44,   75,   29,   91,   75,   45,
  632 
  633        60,   61,   75,  102,  103,   62,  104,  105,  132,   91,
  634        63,   64,   65,   69,   69,   69,   69,   69,   69,   69,
  635        46,   91,   91,   91,   47,   13,   14,   91,  161,  162,
  636       163,   16,   36,   37,   38,   20,   39,   39,   39,   39,
  637        39,   39,   39,  252,   22,   40,   92,   92,   75,   41,
  638        93,  250,   92,  141,   42,   43,   44,  142,   29,   88,
  639        67,   45,   68,   68,   68,   68,   68,   68,   68,   67,
  640        75,   68,   68,   68,   68,   68,   68,   68,  145,   91,
  641        87,   88,   46,   89,   90,  145,   47,   14,   91,  189,
  642        75,   75,   75,   48,   48,   49,   75,   50,   50,   50,
  643 
  644        50,   50,   50,   50,   71,   75,   68,   68,   68,   68,
  645        68,   68,   68,  129,   75,  146,  147,  134,   72,  135,
  646       129,  191,   45,   14,  136,  146,  147,  134,   75,   48,
  647        48,   49,  131,   50,   50,   50,   50,   50,   50,   50,
  648        85,   85,  131,   75,   86,   86,   86,   86,   86,   86,
  649        86,   96,   96,   96,   96,   96,   96,   96,   45,   14,
  650       176,   75,  135,  137,  248,   51,   51,  136,  138,   52,
  651        52,   53,   54,   54,   54,   54,   91,   91,   91,   92,
  652        92,   68,   91,   93,  268,   92,   96,   96,   96,   96,
  653        96,   96,   96,  139,   45,   14,   70,   75,  140,  133,
  654 
  655       141,   51,   51,  252,  142,   52,   52,   53,   54,   54,
  656        54,   54,   96,   96,   96,   96,   96,   96,   96,   67,
  657        75,  107,  107,  107,  107,  107,  107,  107,  137,  139,
  658        45,   12,   73,  138,  140,  208,  209,   12,   55,   55,
  659        12,   12,   56,   56,   56,   56,   56,   56,   56,   75,
  660        12,   24,   75,   75,  116,   24,   75,  177,   75,   75,
  661        24,   24,   24,  212,   12,   69,   69,   69,   69,   69,
  662        69,   69,  114,  114,  115,  115,  115,  115,  115,  122,
  663       122,  122,  122,  122,  122,  122,  135,  267,   57,  133,
  664        75,  136,   34,   74,   74,   74,   74,   74,   74,   74,
  665 
  666       240,  241,   75,   75,   75,   75,   76,   75,   75,   75,
  667        75,   75,   75,   75,   75,  116,   75,   75,   75,   75,
  668        75,   75,  240,  241,  178,  250,  117,  117,  117,  117,
  669       117,  118,  118,  119,  180,  266,   75,  248,   75,   77,
  670        78,   79,   80,   80,  108,   69,   69,   69,   69,   69,
  671        69,   69,  109,   71,  179,  110,  111,  112,  112,  112,
  672       112,  112,  214,  137,  181,  139,  116,   72,  138,  185,
  673       140,  185,  182,  186,  116,  186,  113,  117,  117,  117,
  674       117,  120,  121,  121,  119,  120,  120,  120,  120,  120,
  675       121,  121,  119,  123,  123,  123,  123,  123,  123,  123,
  676 
  677       124,   58,  183,  141,   92,   92,  189,  142,   85,   85,
  678        92,   59,   86,   86,   86,   86,   86,   86,   86,   60,
  679        60,   61,  200,  201,  202,   62,  189,  208,  209,  210,
  680        63,   64,   65,   71,  190,   68,   68,   68,   68,   68,
  681        68,   68,  192,  211,  199,  199,  116,   72,   69,   69,
  682        69,   69,   69,   69,   69,  212,   60,  172,  191,  219,
  683       125,  126,  126,  126,  126,  126,  126,  126,  263,  264,
  684       127,  127,  218,  125,  128,  128,  128,  128,  128,  128,
  685       128,   86,   86,   86,   86,   86,   86,   86,   86,   86,
  686        86,   86,   86,   86,   86,   91,   91,   91,   91,   91,
  687 
  688        91,  143,   91,   91,  143,  143,  143,  143,  143,  144,
  689       144,   91,   96,   96,   96,   96,   96,   96,   96,  148,
  690       263,  264,  148,  148,  148,  148,  148,  149,  149,  150,
  691       151,  152,  152,  152,  152,  152,  108,  167,  167,  167,
  692       167,  167,  168,  168,  109,   71,  217,  153,  154,  155,
  693       155,  155,  155,  155,  232,  233,  234,  178,  180,   72,
  694       122,  122,  122,  122,  122,  122,  122,  124,  113,  108,
  695       173,  173,  173,  173,  173,  173,  173,  109,   71,  216,
  696       156,  157,  158,  159,  160,  160,  160,  179,  181,   68,
  697        68,  116,   72,  152,  152,  152,  152,  152,  152,  116,
  698 
  699       188,  113,  117,  117,  117,  117,  117,  118,  118,  119,
  700       120,  120,  120,  120,  120,  121,  121,  119,  116,  128,
  701       128,  128,  128,  128,  128,  128,  116,   60,  214,  164,
  702       164,  164,  164,  164,  165,  166,  119,  164,  164,  164,
  703       164,  164,  165,  166,  119,  116,  215,   75,   68,   68,
  704       182,  270,  116,  133,  258,  234,  169,  169,  169,  169,
  705       169,  165,  166,  170,  170,  170,  170,  170,  171,  172,
  706       123,  123,  123,  123,  123,  123,  123,  124,  174,  174,
  707       183,  248,  175,  175,  175,  175,  175,  175,  175,  126,
  708       126,  126,  126,  126,  126,  126,  240,  241,  242,  249,
  709 
  710       250,  125,  128,  128,  128,  128,  128,  128,  128,  189,
  711       224,  243,  231,  231,  116,  214,  187,  190,  251,  184,
  712       152,  152,  152,  212,  265,  169,  169,  169,  169,  169,
  713       165,  166,  173,  173,  173,  173,  173,  173,  173,  116,
  714       108,  191,  108,  175,  175,  175,  175,  175,  175,  175,
  715       109,   71,  103,  192,  193,  194,  194,  194,  194,  194,
  716       258,  259,  259,  252,   60,   72,  175,  175,  175,  175,
  717       175,  175,  175,  148,  113,  108,  148,  148,  148,  148,
  718       148,  253,   59,  109,   71,   75,  195,  196,  197,  198,
  719       199,  199,  199,   75,   75,   75,   92,   92,   72,   75,
  720 
  721       133,   75,   92,  263,  264,  264,   75,  113,  108,  220,
  722       221,  221,  222,  223,  223,  223,  109,   71,  214,  203,
  723       204,  205,  206,  207,  207,  207,   73,  265,   70,  247,
  724       116,   72,  223,  223,  223,  223,  223,  223,  214,  212,
  725       113,  213,  170,  170,  170,  170,  171,  172,  116,  168,
  726       168,  168,  168,  168,  168,  168,  215,  212,  116,  170,
  727       170,  170,  170,  170,  171,  172,  101,  212,  116,  170,
  728       170,  170,  170,  170,  171,  172,  116,  212,  100,  172,
  729       172,  172,  172,  172,  172,  172,  108,  244,  244,  244,
  730       244,  244,  244,  244,  109,   71,   99,  224,  225,  226,
  731 
  732       226,  226,  226,  226,  270,   98,   75,   68,  231,   72,
  733       245,  245,  245,  245,  245,  246,  247,   97,  113,  108,
  734       257,  257,  257,  257,   73,   70,  106,  109,   71,  101,
  735       227,  228,  229,  230,  231,  231,  231,   75,  189,  185,
  736       100,  254,   72,  186,  254,  254,  254,  254,  254,  223,
  737       223,  113,  108,   99,   98,   97,   95,   75,   73,   70,
  738       109,   71,   66,  235,  236,  237,  238,  239,  239,  239,
  739       191,  270,  270,  270,  116,   72,  270,  270,  270,  270,
  740       270,  189,  270,  212,  113,  172,  172,  172,  172,  172,
  741       172,  172,  223,  223,  223,  223,  223,  223,  223,  270,
  742 
  743        71,  270,   68,  226,  226,  226,  226,  226,  226,  270,
  744       270,  270,  270,  191,   72,  108,  270,  270,  270,  270,
  745       270,  270,  270,  270,   71,  270,  255,  234,  234,  256,
  746       257,  257,  257,  270,  270,  270,  270,   71,   72,   68,
  747       231,  231,  231,  231,  231,  231,  270,  113,  108,  270,
  748       270,   72,  270,  270,  270,  270,  270,   71,  270,  260,
  749       242,  242,  261,  262,  262,  262,  270,  270,  270,  270,
  750       116,   72,  270,  270,  270,  270,  270,  270,  270,  214,
  751       113,  244,  244,  244,  244,  244,  244,  244,  265,  270,
  752       247,  247,  247,  247,  247,  247,  247,  108,  270,  270,
  753 
  754       270,  270,  270,  270,  270,  270,   71,  270,  257,  257,
  755        68,   68,   68,   68,   68,  270,  270,  270,  270,   71,
  756        72,   68,  257,  257,  257,  257,  257,  257,  214,  113,
  757       270,  270,  270,   72,  270,  214,  270,  270,  270,  269,
  758       269,  269,  269,  269,  269,  269,  269,  269,  269,  269,
  759       269,  269,  269,   12,   12,   12,   94,   94,  130,  130,
  760        11,  270,  270,  270,  270,  270,  270,  270,  270,  270,
  761       270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
  762       270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
  763       270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
  764 
  765       270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
  766       270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
  767       270,  270,  270,  270
  768     } ;
  769 
  770 static yyconst flex_int16_t yy_chk[1325] =
  771     {   0,
  772         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  773         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  774         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  775         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  776         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  777         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  778         1,    1,    1,    3,    3,   26,   26,   27,   27,    3,
  779         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
  780         3,   13,    3,    3,   25,   28,   28,    3,   33,   79,
  781        25,   13,    3,    3,    3,  274,    3,   33,   79,    3,
  782 
  783        13,   13,   82,   45,   45,   13,   45,   45,   82,  272,
  784        13,   13,   13,   19,   19,   19,   19,   19,   19,   19,
  785         3,   57,   57,   57,    3,    4,    4,   57,  112,  112,
  786       112,    4,    4,    4,    4,    4,    4,    4,    4,    4,
  787         4,    4,    4,  268,    4,    4,   46,   46,   90,    4,
  788        46,  267,   46,   92,    4,    4,    4,   92,    4,   90,
  789        17,    4,   17,   17,   17,   17,   17,   17,   17,   18,
  790        30,   18,   18,   18,   18,   18,   18,   18,   97,   94,
  791        30,   30,    4,   30,   30,   97,    4,    5,   94,  223,
  792        77,   77,   77,    5,    5,    5,   77,    5,    5,    5,
  793 
  794         5,    5,    5,    5,   21,   76,   21,   21,   21,   21,
  795        21,   21,   21,   76,   84,   98,  101,   84,   21,   87,
  796        76,  223,    5,    6,   87,   98,  101,   84,   81,    6,
  797         6,    6,   81,    6,    6,    6,    6,    6,    6,    6,
  798        29,   29,   81,   87,   29,   29,   29,   29,   29,   29,
  799        29,   36,   36,   36,   36,   36,   36,   36,    6,    7,
  800       129,  129,  102,  103,  266,    7,    7,  102,  103,    7,
  801         7,    7,    7,    7,    7,    7,   31,   31,   31,   31,
  802        31,  263,   31,   31,  253,   31,   37,   37,   37,   37,
  803        37,   37,   37,  104,    7,    8,  132,  131,  104,  131,
  804 
  805       148,    8,    8,  252,  148,    8,    8,    8,    8,    8,
  806         8,    8,   39,   39,   39,   39,   39,   39,   39,   48,
  807       132,   48,   48,   48,   48,   48,   48,   48,   88,   89,
  808         8,    9,  133,   88,   89,  159,  159,    9,    9,    9,
  809         9,    9,    9,    9,    9,    9,    9,    9,    9,  130,
  810         9,    9,   88,   89,  172,    9,  133,  134,  130,  134,
  811         9,    9,    9,  172,    9,   49,   49,   49,   49,   49,
  812        49,   49,   51,   51,   51,   51,   51,   51,   51,   55,
  813        55,   55,   55,   55,   55,   55,  135,  251,    9,  177,
  814       177,  135,    9,   23,   23,   23,   23,   23,   23,   23,
  815 
  816       198,  198,   23,   23,   23,   23,   23,   23,   23,   23,
  817        23,   23,   23,   23,   23,   52,   23,   23,   23,   23,
  818        23,   23,  206,  206,  136,  250,   52,   52,   52,   52,
  819        52,   52,   52,   52,  138,  249,  143,  248,  144,   23,
  820        23,   23,   23,   23,   50,   67,   67,   67,   67,   67,
  821        67,   67,   50,   50,  136,   50,   50,   50,   50,   50,
  822        50,   50,  214,  137,  138,  139,   53,   50,  137,  143,
  823       139,  144,  140,  143,   54,  144,   50,   53,   53,   53,
  824        53,   53,   53,   53,   53,   54,   54,   54,   54,   54,
  825        54,   54,   54,   56,   56,   56,   56,   56,   56,   56,
  826 
  827        56,   58,  140,  149,  141,  141,  189,  149,   66,   66,
  828       141,   58,   66,   66,   66,   66,   66,   66,   66,  188,
  829        58,   58,  155,  155,  155,   58,  152,  158,  158,  158,
  830        58,   58,   58,   68,  152,   68,   68,   68,   68,   68,
  831        68,   68,  161,  161,  161,  161,  171,   68,   69,   69,
  832        69,   69,   69,   69,   69,  171,  187,  171,  152,  186,
  833        69,   71,   71,   71,   71,   71,   71,   71,  230,  230,
  834        72,   72,  183,   71,   72,   72,   72,   72,   72,   72,
  835        72,   85,   85,   85,   85,   85,   85,   85,   86,   86,
  836        86,   86,   86,   86,   86,   95,   95,   95,   95,   95,
  837 
  838        95,   95,   95,   95,   95,   95,   95,   95,   95,   95,
  839        95,   95,   96,   96,   96,   96,   96,   96,   96,  106,
  840       238,  238,  106,  106,  106,  106,  106,  106,  106,  109,
  841       109,  109,  109,  109,  109,  109,  110,  119,  119,  119,
  842       119,  119,  119,  119,  110,  110,  181,  110,  110,  110,
  843       110,  110,  110,  110,  194,  194,  194,  178,  180,  110,
  844       122,  122,  122,  122,  122,  122,  122,  122,  110,  111,
  845       124,  124,  124,  124,  124,  124,  124,  111,  111,  179,
  846       111,  111,  111,  111,  111,  111,  111,  178,  180,  257,
  847       257,  114,  111,  150,  150,  150,  150,  150,  150,  115,
  848 
  849       147,  111,  114,  114,  114,  114,  114,  114,  114,  114,
  850       115,  115,  115,  115,  115,  115,  115,  115,  117,  127,
  851       127,  127,  127,  127,  127,  127,  118,  146,  168,  117,
  852       117,  117,  117,  117,  117,  117,  117,  118,  118,  118,
  853       118,  118,  118,  118,  118,  120,  168,  176,  262,  262,
  854       182,  227,  121,  176,  227,  227,  120,  120,  120,  120,
  855       120,  120,  120,  121,  121,  121,  121,  121,  121,  121,
  856       123,  123,  123,  123,  123,  123,  123,  123,  125,  125,
  857       182,  216,  125,  125,  125,  125,  125,  125,  125,  126,
  858       126,  126,  126,  126,  126,  126,  197,  197,  197,  216,
  859 
  860       217,  126,  128,  128,  128,  128,  128,  128,  128,  151,
  861       200,  200,  200,  200,  164,  247,  145,  151,  217,  142,
  862       151,  151,  151,  164,  247,  164,  164,  164,  164,  164,
  863       164,  164,  173,  173,  173,  173,  173,  173,  173,  116,
  864       108,  151,  153,  174,  174,  174,  174,  174,  174,  174,
  865       153,  153,  105,  153,  153,  153,  153,  153,  153,  153,
  866       226,  226,  226,  218,  100,  153,  175,  175,  175,  175,
  867       175,  175,  175,  184,  153,  154,  184,  184,  184,  184,
  868       184,  218,   99,  154,  154,   91,  154,  154,  154,  154,
  869       154,  154,  154,  185,  185,  185,  185,  185,  154,  185,
  870 
  871        83,   75,  185,  229,  229,  229,   74,  154,  157,  190,
  872       190,  190,  190,  190,  190,  190,  157,  157,  246,  157,
  873       157,  157,  157,  157,  157,  157,   73,  246,   70,  246,
  874       165,  157,  220,  220,  220,  220,  220,  220,  167,  165,
  875       157,  165,  165,  165,  165,  165,  165,  165,  166,  167,
  876       167,  167,  167,  167,  167,  167,  167,  166,  169,  166,
  877       166,  166,  166,  166,  166,  166,   65,  169,  170,  169,
  878       169,  169,  169,  169,  169,  169,  212,  170,   64,  170,
  879       170,  170,  170,  170,  170,  170,  192,  212,  212,  212,
  880       212,  212,  212,  212,  192,  192,   63,  192,  192,  192,
  881 
  882       192,  192,  192,  192,  240,   62,  254,  240,  240,  192,
  883       215,  215,  215,  215,  215,  215,  215,   61,  192,  193,
  884       259,  259,  259,  259,   60,   59,   47,  193,  193,   44,
  885       193,  193,  193,  193,  193,  193,  193,  219,  222,  254,
  886        43,  219,  193,  254,  219,  219,  219,  219,  219,  222,
  887       222,  193,  196,   42,   41,   40,   35,   24,   22,   20,
  888       196,  196,   16,  196,  196,  196,  196,  196,  196,  196,
  889       222,   11,    0,    0,  213,  196,    0,    0,    0,    0,
  890         0,  221,    0,  213,  196,  213,  213,  213,  213,  213,
  891       213,  213,  221,  221,  221,  221,  221,  221,  221,    0,
  892 
  893       224,    0,  224,  224,  224,  224,  224,  224,  224,    0,
  894         0,    0,    0,  221,  224,  225,    0,    0,    0,    0,
  895         0,    0,    0,    0,  225,    0,  225,  225,  225,  225,
  896       225,  225,  225,    0,    0,    0,    0,  232,  225,  232,
  897       232,  232,  232,  232,  232,  232,    0,  225,  228,    0,
  898         0,  232,    0,    0,    0,    0,    0,  228,    0,  228,
  899       228,  228,  228,  228,  228,  228,    0,    0,    0,    0,
  900       244,  228,    0,    0,    0,    0,    0,    0,    0,  245,
  901       228,  244,  244,  244,  244,  244,  244,  244,  245,    0,
  902       245,  245,  245,  245,  245,  245,  245,  256,    0,    0,
  903 
  904         0,    0,    0,    0,    0,    0,  256,    0,  256,  256,
  905       256,  256,  256,  256,  256,    0,    0,    0,    0,  258,
  906       256,  258,  258,  258,  258,  258,  258,  258,  265,  256,
  907         0,    0,    0,  258,    0,  269,    0,    0,    0,  265,
  908       265,  265,  265,  265,  265,  265,  269,  269,  269,  269,
  909       269,  269,  269,  271,  271,  271,  273,  273,  275,  275,
  910       270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
  911       270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
  912       270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
  913       270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
  914 
  915       270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
  916       270,  270,  270,  270,  270,  270,  270,  270,  270,  270,
  917       270,  270,  270,  270
  918     } ;
  919 
  920 static yy_state_type yy_last_accepting_state;
  921 static char *yy_last_accepting_cpos;
  922 
  923 extern int ut_flex_debug;
  924 int ut_flex_debug = 1;
  925 
  926 static yyconst flex_int16_t yy_rule_linenum[20] =
  927     {   0,
  928       152,  157,  162,  167,  182,  244,  249,  260,  266,  272,
  929       278,  288,  298,  303,  321,  326,  331,  336,  343
  930     } ;
  931 
  932 /* The intent behind this definition is that it'll catch
  933  * any uses of REJECT which flex missed.
  934  */
  935 #define REJECT reject_used_but_not_detected
  936 #define yymore() yymore_used_but_not_detected
  937 #define YY_MORE_ADJ 0
  938 #define YY_RESTORE_YY_MORE_OFFSET
  939 char *uttext;
  940 #line 1 "scanner.l"
  941 /*
  942  * Copyright 2014 University Corporation for Atmospheric Research
  943  *
  944  * This file is part of the UDUNITS-2 package.  See the file COPYRIGHT
  945  * in the top-level source-directory of the package for copying and
  946  * redistribution conditions.
  947  */
  948 /*
  949  * lex(1) specification for tokens for the Unidata units package, UDUNITS2.
  950  */
  951 #line 15 "scanner.l"
  952 
  953 #include <ctype.h>
  954 #include <errno.h>
  955 #include <limits.h>
  956 #include <math.h>
  957 #include <stddef.h>
  958 #include <stdio.h>
  959 #include <stdlib.h>
  960 #include <string.h>
  961 #include <time.h>
  962 
  963 /**
  964  * Decodes a date.
  965  *
  966  * @param[in]  text     The text specifying the date to be decoded.
  967  * @param[in]  format   The format to use for decoding. The order is year (int),
  968  *                      month (int), and day (int).
  969  * @param[out] date     The date corresponding to the input.
  970  * @retval     DATE     Success
  971  * @retval     ERR      Error
  972  */
  973 static int decodeDate(
  974     const char* const   text,
  975     const char* const   format,
  976     double* const       date)
  977 {
  978     int     year;
  979     int     month = 1;
  980     int     day = 1;
  981 
  982     (void)sscanf(text, format, &year, &month, &day);
  983     *date = ut_encode_date(year, month, day);
  984     return DATE;
  985 }
  986 
  987 /**
  988  * Decodes a clock-time.
  989  *
  990  * @param[in] text      The text specifying the clock-time to be decoded.
  991  * @param[in] format    The format to use for decoding. The order is hour (int),
  992  *                      minute (int), and second (double).
  993  * @return              The clock-time corresponding to the input.
  994  */
  995 static double decodeClock(
  996     const char* const   text,
  997     const char* const   format)
  998 {
  999     int         hour = 0;
 1000     int         minute = 0;
 1001     double      second = 0;
 1002 
 1003     (void)sscanf(text, format, &hour, &minute, &second);
 1004     if (hour < 0) {
 1005         minute = -minute;
 1006         second = -second;
 1007     }
 1008     return ut_encode_clock(hour, minute, second);
 1009 }
 1010 
 1011 /**
 1012  * Decodes a real value.
 1013  *
 1014  * @param[in]  text     Text to be decoded.
 1015  * @param[out] value    Decoded value.
 1016  * @retval     REAL     Success.
 1017  * @retval     ERR      Failure.
 1018  */
 1019 static int decodeReal(
 1020     const char* const text,
 1021     double* const     value)
 1022 {
 1023     errno = 0;
 1024     *value = strtod(text, NULL);
 1025 
 1026     if (errno == 0)
 1027         return REAL;
 1028 
 1029     ut_handle_error_message("Invalid real: \"%s\"", text);
 1030     return ERR;
 1031 }
 1032 
 1033 
 1034 #line 1035 "<stdout>"
 1035 
 1036 #define INITIAL 0
 1037 #define ID_SEEN 1
 1038 #define SHIFT_SEEN 2
 1039 #define DATE_SEEN 3
 1040 #define CLOCK_SEEN 4
 1041 
 1042 #ifndef YY_NO_UNISTD_H
 1043 /* Special case for "unistd.h", since it is non-ANSI. We include it way
 1044  * down here because we want the user's section 1 to have been scanned first.
 1045  * The user has a chance to override it with an option.
 1046  */
 1047 /* %if-c-only */
 1048 #include <unistd.h>
 1049 /* %endif */
 1050 /* %if-c++-only */
 1051 /* %endif */
 1052 #endif
 1053 
 1054 #ifndef YY_EXTRA_TYPE
 1055 #define YY_EXTRA_TYPE void *
 1056 #endif
 1057 
 1058 /* %if-c-only Reentrant structure and macros (non-C++). */
 1059 /* %if-reentrant */
 1060 /* %if-c-only */
 1061 
 1062 static int yy_init_globals (void );
 1063 
 1064 /* %endif */
 1065 /* %if-reentrant */
 1066 /* %endif */
 1067 /* %endif End reentrant structures and macros. */
 1068 
 1069 /* Accessor methods to globals.
 1070    These are made visible to non-reentrant scanners for convenience. */
 1071 
 1072 int utlex_destroy (void );
 1073 
 1074 int utget_debug (void );
 1075 
 1076 void utset_debug (int debug_flag  );
 1077 
 1078 YY_EXTRA_TYPE utget_extra (void );
 1079 
 1080 void utset_extra (YY_EXTRA_TYPE user_defined  );
 1081 
 1082 FILE *utget_in (void );
 1083 
 1084 void utset_in  (FILE * in_str  );
 1085 
 1086 FILE *utget_out (void );
 1087 
 1088 void utset_out  (FILE * out_str  );
 1089 
 1090 yy_size_t utget_leng (void );
 1091 
 1092 char *utget_text (void );
 1093 
 1094 int utget_lineno (void );
 1095 
 1096 void utset_lineno (int line_number  );
 1097 
 1098 /* %if-bison-bridge */
 1099 /* %endif */
 1100 
 1101 /* Macros after this point can all be overridden by user definitions in
 1102  * section 1.
 1103  */
 1104 
 1105 #ifndef YY_SKIP_YYWRAP
 1106 #ifdef __cplusplus
 1107 extern "C" int utwrap (void );
 1108 #else
 1109 extern int utwrap (void );
 1110 #endif
 1111 #endif
 1112 
 1113 /* %not-for-header */
 1114 
 1115     static void yyunput (int c,char *buf_ptr  );
 1116     
 1117 /* %ok-for-header */
 1118 
 1119 /* %endif */
 1120 
 1121 #ifndef yytext_ptr
 1122 static void yy_flex_strncpy (char *,yyconst char *,int );
 1123 #endif
 1124 
 1125 #ifdef YY_NEED_STRLEN
 1126 static int yy_flex_strlen (yyconst char * );
 1127 #endif
 1128 
 1129 #ifndef YY_NO_INPUT
 1130 /* %if-c-only Standard (non-C++) definition */
 1131 /* %not-for-header */
 1132 
 1133 #ifdef __cplusplus
 1134 static int yyinput (void );
 1135 #else
 1136 static int input (void );
 1137 #endif
 1138 /* %ok-for-header */
 1139 
 1140 /* %endif */
 1141 #endif
 1142 
 1143 /* %if-c-only */
 1144 
 1145 /* %endif */
 1146 
 1147 /* Amount of stuff to slurp up with each read. */
 1148 #ifndef YY_READ_BUF_SIZE
 1149 #define YY_READ_BUF_SIZE 8192
 1150 #endif
 1151 
 1152 /* Copy whatever the last rule matched to the standard output. */
 1153 #ifndef ECHO
 1154 /* %if-c-only Standard (non-C++) definition */
 1155 /* This used to be an fputs(), but since the string might contain NUL's,
 1156  * we now use fwrite().
 1157  */
 1158 #define ECHO do { if (fwrite( uttext, utleng, 1, utout )) {} } while (0)
 1159 /* %endif */
 1160 /* %if-c++-only C++ definition */
 1161 /* %endif */
 1162 #endif
 1163 
 1164 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 1165  * is returned in "result".
 1166  */
 1167 #ifndef YY_INPUT
 1168 #define YY_INPUT(buf,result,max_size) \
 1169 /* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
 1170     if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
 1171         { \
 1172         int c = '*'; \
 1173         size_t n; \
 1174         for ( n = 0; n < max_size && \
 1175                  (c = getc( utin )) != EOF && c != '\n'; ++n ) \
 1176             buf[n] = (char) c; \
 1177         if ( c == '\n' ) \
 1178             buf[n++] = (char) c; \
 1179         if ( c == EOF && ferror( utin ) ) \
 1180             YY_FATAL_ERROR( "input in flex scanner failed" ); \
 1181         result = n; \
 1182         } \
 1183     else \
 1184         { \
 1185         errno=0; \
 1186         while ( (result = fread(buf, 1, max_size, utin))==0 && ferror(utin)) \
 1187             { \
 1188             if( errno != EINTR) \
 1189                 { \
 1190                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
 1191                 break; \
 1192                 } \
 1193             errno=0; \
 1194             clearerr(utin); \
 1195             } \
 1196         }\
 1197 \
 1198 /* %if-c++-only C++ definition \ */\
 1199 /* %endif */
 1200 
 1201 #endif
 1202 
 1203 /* No semi-colon after return; correct usage is to write "yyterminate();" -
 1204  * we don't want an extra ';' after the "return" because that will cause
 1205  * some compilers to complain about unreachable statements.
 1206  */
 1207 #ifndef yyterminate
 1208 #define yyterminate() return YY_NULL
 1209 #endif
 1210 
 1211 /* Number of entries by which start-condition stack grows. */
 1212 #ifndef YY_START_STACK_INCR
 1213 #define YY_START_STACK_INCR 25
 1214 #endif
 1215 
 1216 /* Report a fatal error. */
 1217 #ifndef YY_FATAL_ERROR
 1218 /* %if-c-only */
 1219 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
 1220 /* %endif */
 1221 /* %if-c++-only */
 1222 /* %endif */
 1223 #endif
 1224 
 1225 /* %if-tables-serialization structures and prototypes */
 1226 /* %not-for-header */
 1227 
 1228 /* %ok-for-header */
 1229 
 1230 /* %not-for-header */
 1231 
 1232 /* %tables-yydmap generated elements */
 1233 /* %endif */
 1234 /* end tables serialization structures and prototypes */
 1235 
 1236 /* %ok-for-header */
 1237 
 1238 /* Default declaration of generated scanner - a define so the user can
 1239  * easily add parameters.
 1240  */
 1241 #ifndef YY_DECL
 1242 #define YY_DECL_IS_OURS 1
 1243 /* %if-c-only Standard (non-C++) definition */
 1244 
 1245 extern int utlex (void);
 1246 
 1247 #define YY_DECL int utlex (void)
 1248 /* %endif */
 1249 /* %if-c++-only C++ definition */
 1250 /* %endif */
 1251 #endif /* !YY_DECL */
 1252 
 1253 /* Code executed at the beginning of each rule, after uttext and utleng
 1254  * have been set up.
 1255  */
 1256 #ifndef YY_USER_ACTION
 1257 #define YY_USER_ACTION
 1258 #endif
 1259 
 1260 /* Code executed at the end of each rule. */
 1261 #ifndef YY_BREAK
 1262 #define YY_BREAK break;
 1263 #endif
 1264 
 1265 /* %% [6.0] YY_RULE_SETUP definition goes here */
 1266 #define YY_RULE_SETUP \
 1267     YY_USER_ACTION
 1268 
 1269 /* %not-for-header */
 1270 
 1271 /** The main scanner function which does all the work.
 1272  */
 1273 YY_DECL
 1274 {
 1275     register yy_state_type yy_current_state;
 1276     register char *yy_cp, *yy_bp;
 1277     register int yy_act;
 1278     
 1279 /* %% [7.0] user's declarations go here */
 1280 #line 146 "scanner.l"
 1281 
 1282     if (_restartScanner) {
 1283     BEGIN INITIAL;
 1284     _restartScanner = 0;
 1285     }
 1286 
 1287 #line 1288 "<stdout>"
 1288 
 1289     if ( !(yy_init) )
 1290         {
 1291         (yy_init) = 1;
 1292 
 1293 #ifdef YY_USER_INIT
 1294         YY_USER_INIT;
 1295 #endif
 1296 
 1297         if ( ! (yy_start) )
 1298             (yy_start) = 1; /* first start state */
 1299 
 1300         if ( ! utin )
 1301 /* %if-c-only */
 1302             utin = stdin;
 1303 /* %endif */
 1304 /* %if-c++-only */
 1305 /* %endif */
 1306 
 1307         if ( ! utout )
 1308 /* %if-c-only */
 1309             utout = stdout;
 1310 /* %endif */
 1311 /* %if-c++-only */
 1312 /* %endif */
 1313 
 1314         if ( ! YY_CURRENT_BUFFER ) {
 1315             utensure_buffer_stack ();
 1316             YY_CURRENT_BUFFER_LVALUE =
 1317                 ut_create_buffer(utin,YY_BUF_SIZE );
 1318         }
 1319 
 1320         ut_load_buffer_state( );
 1321         }
 1322 
 1323     while ( 1 )     /* loops until end-of-file is reached */
 1324         {
 1325 /* %% [8.0] yymore()-related code goes here */
 1326         yy_cp = (yy_c_buf_p);
 1327 
 1328         /* Support of uttext. */
 1329         *yy_cp = (yy_hold_char);
 1330 
 1331         /* yy_bp points to the position in yy_ch_buf of the start of
 1332          * the current run.
 1333          */
 1334         yy_bp = yy_cp;
 1335 
 1336 /* %% [9.0] code to set up and find next match goes here */
 1337         yy_current_state = (yy_start);
 1338 yy_match:
 1339         do
 1340             {
 1341             register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
 1342             if ( yy_accept[yy_current_state] )
 1343                 {
 1344                 (yy_last_accepting_state) = yy_current_state;
 1345                 (yy_last_accepting_cpos) = yy_cp;
 1346                 }
 1347             while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 1348                 {
 1349                 yy_current_state = (int) yy_def[yy_current_state];
 1350                 if ( yy_current_state >= 271 )
 1351                     yy_c = yy_meta[(unsigned int) yy_c];
 1352                 }
 1353             yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 1354             ++yy_cp;
 1355             }
 1356         while ( yy_base[yy_current_state] != 1261 );
 1357 
 1358 yy_find_action:
 1359 /* %% [10.0] code to find the action number goes here */
 1360         yy_act = yy_accept[yy_current_state];
 1361         if ( yy_act == 0 )
 1362             { /* have to back up */
 1363             yy_cp = (yy_last_accepting_cpos);
 1364             yy_current_state = (yy_last_accepting_state);
 1365             yy_act = yy_accept[yy_current_state];
 1366             }
 1367 
 1368         YY_DO_BEFORE_ACTION;
 1369 
 1370 /* %% [11.0] code for utlineno update goes here */
 1371 
 1372 do_action:  /* This label is used only to access EOF actions. */
 1373 
 1374 /* %% [12.0] debug code goes here */
 1375         if ( ut_flex_debug )
 1376             {
 1377             if ( yy_act == 0 )
 1378                 fprintf( stderr, "--scanner backing up\n" );
 1379             else if ( yy_act < 20 )
 1380                 fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
 1381                          (long)yy_rule_linenum[yy_act], uttext );
 1382             else if ( yy_act == 20 )
 1383                 fprintf( stderr, "--accepting default rule (\"%s\")\n",
 1384                          uttext );
 1385             else if ( yy_act == 21 )
 1386                 fprintf( stderr, "--(end of buffer or a NUL)\n" );
 1387             else
 1388                 fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
 1389             }
 1390 
 1391         switch ( yy_act )
 1392     { /* beginning of action switch */
 1393 /* %% [13.0] actions go here */
 1394             case 0: /* must back up */
 1395             /* undo the effects of YY_DO_BEFORE_ACTION */
 1396             *yy_cp = (yy_hold_char);
 1397             yy_cp = (yy_last_accepting_cpos);
 1398             yy_current_state = (yy_last_accepting_state);
 1399             goto yy_find_action;
 1400 
 1401 case 1:
 1402 YY_RULE_SETUP
 1403 #line 152 "scanner.l"
 1404 {
 1405     BEGIN SHIFT_SEEN;
 1406     return SHIFT;
 1407 }
 1408     YY_BREAK
 1409 case 2:
 1410 YY_RULE_SETUP
 1411 #line 157 "scanner.l"
 1412 {
 1413     BEGIN INITIAL;
 1414     return DIVIDE;
 1415 }
 1416     YY_BREAK
 1417 case 3:
 1418 YY_RULE_SETUP
 1419 #line 162 "scanner.l"
 1420 {
 1421     BEGIN INITIAL;
 1422     return MULTIPLY;
 1423 }
 1424     YY_BREAK
 1425 case 4:
 1426 YY_RULE_SETUP
 1427 #line 167 "scanner.l"
 1428 {
 1429     int     status;
 1430 
 1431     if (sscanf(uttext, "%*[*^]%ld", &yylval.ival) != 1) {
 1432         ut_handle_error_message("Invalid integer\n", stderr);
 1433 
 1434     status  = ERR;
 1435     }
 1436     else {
 1437     status  = EXPONENT;
 1438     }
 1439 
 1440     return status;
 1441 }
 1442     YY_BREAK
 1443 case 5:
 1444 YY_RULE_SETUP
 1445 #line 182 "scanner.l"
 1446 {
 1447     int     status = EXPONENT;
 1448     int     exponent = 0;
 1449     int     sign = 1;
 1450     char*   cp = uttext;
 1451 
 1452     if (strncmp(cp, "\xe2\x81\xba", 3) == 0) {
 1453     cp += 3;
 1454     }
 1455     else if (strncmp(cp, "\xe2\x81\xbb", 3) == 0) {
 1456     sign = -1;
 1457     cp += 3;
 1458     }
 1459 
 1460     while (cp < uttext + utleng) {
 1461     int j;
 1462     static struct {
 1463         const char* string;
 1464         const int   len;
 1465     } utf8_exponents[] = {
 1466         {"\xe2\x81\xb0", 3},        /* 0 */
 1467         {"\xc2\xb9",     2},        /* 1 */
 1468         {"\xc2\xb2",     2},        /* 2 */
 1469         {"\xc2\xb3",     2},        /* 3 */
 1470         {"\xe2\x81\xb4", 3},        /* 4 */
 1471         {"\xe2\x81\xb5", 3},        /* 5 */
 1472         {"\xe2\x81\xb6", 3},        /* 6 */
 1473         {"\xe2\x81\xb7", 3},        /* 7 */
 1474         {"\xe2\x81\xb8", 3},        /* 8 */
 1475         {"\xe2\x81\xb9", 3},        /* 9 */
 1476     };
 1477 
 1478         if (exponent > INT_MAX/10) {
 1479             status = ERR;
 1480             break;
 1481         }
 1482 
 1483     exponent *= 10;
 1484 
 1485     for (j = 0; j < 10; j++) {
 1486         int len = utf8_exponents[j].len;
 1487 
 1488         if (strncmp(cp, utf8_exponents[j].string, len) == 0) {
 1489         exponent += j;
 1490         cp += len;
 1491         break;
 1492         }
 1493     }
 1494 
 1495     if (j >= 10) {
 1496         status = ERR;
 1497         break;
 1498     }
 1499     }
 1500 
 1501     if (status == EXPONENT)
 1502     yylval.ival = sign * exponent;
 1503 
 1504     BEGIN INITIAL;
 1505     return status;
 1506 }
 1507     YY_BREAK
 1508 case 6:
 1509 YY_RULE_SETUP
 1510 #line 244 "scanner.l"
 1511 {
 1512     BEGIN DATE_SEEN;
 1513     return decodeDate((char*)uttext, "%d-%d-%d", &yylval.rval);
 1514 }
 1515     YY_BREAK
 1516 case 7:
 1517 YY_RULE_SETUP
 1518 #line 249 "scanner.l"
 1519 {
 1520     if (_isTime) {
 1521         BEGIN DATE_SEEN;
 1522         return decodeDate((char*)uttext, "%4d%2d%2d", &yylval.rval);
 1523     }
 1524     else {
 1525         BEGIN INITIAL;
 1526         return decodeReal((char*)uttext, &yylval.rval);
 1527     }
 1528 }
 1529     YY_BREAK
 1530 case 8:
 1531 YY_RULE_SETUP
 1532 #line 260 "scanner.l"
 1533 {
 1534     yylval.rval = decodeClock((char*)uttext, "%d:%d:%lf");
 1535     BEGIN CLOCK_SEEN;
 1536     return CLOCK;
 1537 }
 1538     YY_BREAK
 1539 case 9:
 1540 YY_RULE_SETUP
 1541 #line 266 "scanner.l"
 1542 {
 1543     yylval.rval = decodeClock((char*)uttext, "%2d%2d%lf");
 1544     BEGIN CLOCK_SEEN;
 1545     return CLOCK;
 1546 }
 1547     YY_BREAK
 1548 case 10:
 1549 YY_RULE_SETUP
 1550 #line 272 "scanner.l"
 1551 {
 1552     yylval.rval = decodeClock((char*)uttext, "%d:%d");
 1553     BEGIN INITIAL;
 1554     return CLOCK;
 1555 }
 1556     YY_BREAK
 1557 case 11:
 1558 YY_RULE_SETUP
 1559 #line 278 "scanner.l"
 1560 {
 1561     yylval.rval = (utleng <= 3)
 1562                         ? decodeClock((char*)uttext, "%d")
 1563                         : (utleng == 4)
 1564                             ? decodeClock((char*)uttext, "%2d%d")
 1565                             : decodeClock((char*)uttext, "%3d%d");
 1566     BEGIN INITIAL;
 1567     return CLOCK;
 1568 }
 1569     YY_BREAK
 1570 case 12:
 1571 YY_RULE_SETUP
 1572 #line 288 "scanner.l"
 1573 {
 1574     yylval.rval = (utleng <= 2)
 1575                         ? decodeClock((char*)uttext, "%d")
 1576                         : (utleng == 3)
 1577                             ? decodeClock((char*)uttext, "%1d%d")
 1578                             : decodeClock((char*)uttext, "%2d%d");
 1579     BEGIN INITIAL;
 1580     return CLOCK;
 1581 }
 1582     YY_BREAK
 1583 case 13:
 1584 YY_RULE_SETUP
 1585 #line 298 "scanner.l"
 1586 {
 1587     BEGIN INITIAL;
 1588     return decodeReal((char*)uttext, &yylval.rval);
 1589 }
 1590     YY_BREAK
 1591 case 14:
 1592 YY_RULE_SETUP
 1593 #line 303 "scanner.l"
 1594 {
 1595     int     status;
 1596 
 1597     errno   = 0;
 1598     yylval.ival = atol((char*)uttext);
 1599 
 1600     if (errno == 0) {
 1601     status  = INT;
 1602     } else {
 1603         ut_handle_error_message("Invalid integer\n", stderr);
 1604 
 1605     status  = ERR;
 1606     }
 1607 
 1608     BEGIN INITIAL;
 1609     return status;
 1610 }
 1611     YY_BREAK
 1612 case 15:
 1613 YY_RULE_SETUP
 1614 #line 321 "scanner.l"
 1615 {
 1616     yylval.rval = 10;
 1617     return LOGREF;
 1618 }
 1619     YY_BREAK
 1620 case 16:
 1621 YY_RULE_SETUP
 1622 #line 326 "scanner.l"
 1623 {
 1624     yylval.rval = M_E;
 1625     return LOGREF;
 1626 }
 1627     YY_BREAK
 1628 case 17:
 1629 YY_RULE_SETUP
 1630 #line 331 "scanner.l"
 1631 {
 1632     yylval.rval = 2;
 1633     return LOGREF;
 1634 }
 1635     YY_BREAK
 1636 case 18:
 1637 YY_RULE_SETUP
 1638 #line 336 "scanner.l"
 1639 {
 1640     yylval.id = strdup((char*)uttext);
 1641 
 1642     BEGIN ID_SEEN;
 1643     return ID;
 1644 }
 1645     YY_BREAK
 1646 case 19:
 1647 YY_RULE_SETUP
 1648 #line 343 "scanner.l"
 1649 {
 1650     BEGIN INITIAL;
 1651     return uttext[0];
 1652 }
 1653     YY_BREAK
 1654 case 20:
 1655 YY_RULE_SETUP
 1656 #line 348 "scanner.l"
 1657 ECHO;
 1658     YY_BREAK
 1659 #line 1660 "<stdout>"
 1660 case YY_STATE_EOF(INITIAL):
 1661 case YY_STATE_EOF(ID_SEEN):
 1662 case YY_STATE_EOF(SHIFT_SEEN):
 1663 case YY_STATE_EOF(DATE_SEEN):
 1664 case YY_STATE_EOF(CLOCK_SEEN):
 1665     yyterminate();
 1666 
 1667     case YY_END_OF_BUFFER:
 1668         {
 1669         /* Amount of text matched not including the EOB char. */
 1670         int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
 1671 
 1672         /* Undo the effects of YY_DO_BEFORE_ACTION. */
 1673         *yy_cp = (yy_hold_char);
 1674         YY_RESTORE_YY_MORE_OFFSET
 1675 
 1676         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
 1677             {
 1678             /* We're scanning a new file or input source.  It's
 1679              * possible that this happened because the user
 1680              * just pointed utin at a new source and called
 1681              * utlex().  If so, then we have to assure
 1682              * consistency between YY_CURRENT_BUFFER and our
 1683              * globals.  Here is the right place to do so, because
 1684              * this is the first action (other than possibly a
 1685              * back-up) that will match for the new input source.
 1686              */
 1687             (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
 1688             YY_CURRENT_BUFFER_LVALUE->yy_input_file = utin;
 1689             YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
 1690             }
 1691 
 1692         /* Note that here we test for yy_c_buf_p "<=" to the position
 1693          * of the first EOB in the buffer, since yy_c_buf_p will
 1694          * already have been incremented past the NUL character
 1695          * (since all states make transitions on EOB to the
 1696          * end-of-buffer state).  Contrast this with the test
 1697          * in input().
 1698          */
 1699         if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
 1700             { /* This was really a NUL. */
 1701             yy_state_type yy_next_state;
 1702 
 1703             (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
 1704 
 1705             yy_current_state = yy_get_previous_state(  );
 1706 
 1707             /* Okay, we're now positioned to make the NUL
 1708              * transition.  We couldn't have
 1709              * yy_get_previous_state() go ahead and do it
 1710              * for us because it doesn't know how to deal
 1711              * with the possibility of jamming (and we don't
 1712              * want to build jamming into it because then it
 1713              * will run more slowly).
 1714              */
 1715 
 1716             yy_next_state = yy_try_NUL_trans( yy_current_state );
 1717 
 1718             yy_bp = (yytext_ptr) + YY_MORE_ADJ;
 1719 
 1720             if ( yy_next_state )
 1721                 {
 1722                 /* Consume the NUL. */
 1723                 yy_cp = ++(yy_c_buf_p);
 1724                 yy_current_state = yy_next_state;
 1725                 goto yy_match;
 1726                 }
 1727 
 1728             else
 1729                 {
 1730 /* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
 1731                 yy_cp = (yy_c_buf_p);
 1732                 goto yy_find_action;
 1733                 }
 1734             }
 1735 
 1736         else switch ( yy_get_next_buffer(  ) )
 1737             {
 1738             case EOB_ACT_END_OF_FILE:
 1739                 {
 1740                 (yy_did_buffer_switch_on_eof) = 0;
 1741 
 1742                 if ( utwrap( ) )
 1743                     {
 1744                     /* Note: because we've taken care in
 1745                      * yy_get_next_buffer() to have set up
 1746                      * uttext, we can now set up
 1747                      * yy_c_buf_p so that if some total
 1748                      * hoser (like flex itself) wants to
 1749                      * call the scanner after we return the
 1750                      * YY_NULL, it'll still work - another
 1751                      * YY_NULL will get returned.
 1752                      */
 1753                     (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
 1754 
 1755                     yy_act = YY_STATE_EOF(YY_START);
 1756                     goto do_action;
 1757                     }
 1758 
 1759                 else
 1760                     {
 1761                     if ( ! (yy_did_buffer_switch_on_eof) )
 1762                         YY_NEW_FILE;
 1763                     }
 1764                 break;
 1765                 }
 1766 
 1767             case EOB_ACT_CONTINUE_SCAN:
 1768                 (yy_c_buf_p) =
 1769                     (yytext_ptr) + yy_amount_of_matched_text;
 1770 
 1771                 yy_current_state = yy_get_previous_state(  );
 1772 
 1773                 yy_cp = (yy_c_buf_p);
 1774                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
 1775                 goto yy_match;
 1776 
 1777             case EOB_ACT_LAST_MATCH:
 1778                 (yy_c_buf_p) =
 1779                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
 1780 
 1781                 yy_current_state = yy_get_previous_state(  );
 1782 
 1783                 yy_cp = (yy_c_buf_p);
 1784                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
 1785                 goto yy_find_action;
 1786             }
 1787         break;
 1788         }
 1789 
 1790     default:
 1791         YY_FATAL_ERROR(
 1792             "fatal flex scanner internal error--no action found" );
 1793     } /* end of action switch */
 1794         } /* end of scanning one token */
 1795 } /* end of utlex */
 1796 /* %ok-for-header */
 1797 
 1798 /* %if-c++-only */
 1799 /* %not-for-header */
 1800 
 1801 /* %ok-for-header */
 1802 
 1803 /* %endif */
 1804 
 1805 /* yy_get_next_buffer - try to read in a new buffer
 1806  *
 1807  * Returns a code representing an action:
 1808  *  EOB_ACT_LAST_MATCH -
 1809  *  EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 1810  *  EOB_ACT_END_OF_FILE - end of file
 1811  */
 1812 /* %if-c-only */
 1813 static int yy_get_next_buffer (void)
 1814 /* %endif */
 1815 /* %if-c++-only */
 1816 /* %endif */
 1817 {
 1818         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
 1819     register char *source = (yytext_ptr);
 1820     register int number_to_move, i;
 1821     int ret_val;
 1822 
 1823     if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
 1824         YY_FATAL_ERROR(
 1825         "fatal flex scanner internal error--end of buffer missed" );
 1826 
 1827     if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
 1828         { /* Don't try to fill the buffer, so this is an EOF. */
 1829         if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
 1830             {
 1831             /* We matched a single character, the EOB, so
 1832              * treat this as a final EOF.
 1833              */
 1834             return EOB_ACT_END_OF_FILE;
 1835             }
 1836 
 1837         else
 1838             {
 1839             /* We matched some text prior to the EOB, first
 1840              * process it.
 1841              */
 1842             return EOB_ACT_LAST_MATCH;
 1843             }
 1844         }
 1845 
 1846     /* Try to read more data. */
 1847 
 1848     /* First move last chars to start of buffer. */
 1849     number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
 1850 
 1851     for ( i = 0; i < number_to_move; ++i )
 1852         *(dest++) = *(source++);
 1853 
 1854     if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
 1855         /* don't do the read, it's not guaranteed to return an EOF,
 1856          * just force an EOF
 1857          */
 1858         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
 1859 
 1860     else
 1861         {
 1862             yy_size_t num_to_read =
 1863             YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
 1864 
 1865         while ( num_to_read <= 0 )
 1866             { /* Not enough room in the buffer - grow it. */
 1867 
 1868             /* just a shorter name for the current buffer */
 1869             YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
 1870 
 1871             int yy_c_buf_p_offset =
 1872                 (int) ((yy_c_buf_p) - b->yy_ch_buf);
 1873 
 1874             if ( b->yy_is_our_buffer )
 1875                 {
 1876                 yy_size_t new_size = b->yy_buf_size * 2;
 1877 
 1878                 if ( new_size <= 0 )
 1879                     b->yy_buf_size += b->yy_buf_size / 8;
 1880                 else
 1881                     b->yy_buf_size *= 2;
 1882 
 1883                 b->yy_ch_buf = (char *)
 1884                     /* Include room in for 2 EOB chars. */
 1885                     utrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
 1886                 }
 1887             else
 1888                 /* Can't grow it, we don't own it. */
 1889                 b->yy_ch_buf = 0;
 1890 
 1891             if ( ! b->yy_ch_buf )
 1892                 YY_FATAL_ERROR(
 1893                 "fatal error - scanner input buffer overflow" );
 1894 
 1895             (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
 1896 
 1897             num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
 1898                         number_to_move - 1;
 1899 
 1900             }
 1901 
 1902         if ( num_to_read > YY_READ_BUF_SIZE )
 1903             num_to_read = YY_READ_BUF_SIZE;
 1904 
 1905         /* Read in more data. */
 1906         YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
 1907             (yy_n_chars), num_to_read );
 1908 
 1909         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
 1910         }
 1911 
 1912     if ( (yy_n_chars) == 0 )
 1913         {
 1914         if ( number_to_move == YY_MORE_ADJ )
 1915             {
 1916             ret_val = EOB_ACT_END_OF_FILE;
 1917             utrestart(utin  );
 1918             }
 1919 
 1920         else
 1921             {
 1922             ret_val = EOB_ACT_LAST_MATCH;
 1923             YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
 1924                 YY_BUFFER_EOF_PENDING;
 1925             }
 1926         }
 1927 
 1928     else
 1929         ret_val = EOB_ACT_CONTINUE_SCAN;
 1930 
 1931     if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
 1932         /* Extend the array by 50%, plus the number we really need. */
 1933         yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
 1934         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) utrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
 1935         if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
 1936             YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
 1937     }
 1938 
 1939     (yy_n_chars) += number_to_move;
 1940     YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
 1941     YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
 1942 
 1943     (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
 1944 
 1945     return ret_val;
 1946 }
 1947 
 1948 /* yy_get_previous_state - get the state just before the EOB char was reached */
 1949 
 1950 /* %if-c-only */
 1951 /* %not-for-header */
 1952 
 1953     static yy_state_type yy_get_previous_state (void)
 1954 /* %endif */
 1955 /* %if-c++-only */
 1956 /* %endif */
 1957 {
 1958     register yy_state_type yy_current_state;
 1959     register char *yy_cp;
 1960     
 1961 /* %% [15.0] code to get the start state into yy_current_state goes here */
 1962     yy_current_state = (yy_start);
 1963 
 1964     for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
 1965         {
 1966 /* %% [16.0] code to find the next state goes here */
 1967         register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
 1968         if ( yy_accept[yy_current_state] )
 1969             {
 1970             (yy_last_accepting_state) = yy_current_state;
 1971             (yy_last_accepting_cpos) = yy_cp;
 1972             }
 1973         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 1974             {
 1975             yy_current_state = (int) yy_def[yy_current_state];
 1976             if ( yy_current_state >= 271 )
 1977                 yy_c = yy_meta[(unsigned int) yy_c];
 1978             }
 1979         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 1980         }
 1981 
 1982     return yy_current_state;
 1983 }
 1984 
 1985 /* yy_try_NUL_trans - try to make a transition on the NUL character
 1986  *
 1987  * synopsis
 1988  *  next_state = yy_try_NUL_trans( current_state );
 1989  */
 1990 /* %if-c-only */
 1991     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
 1992 /* %endif */
 1993 /* %if-c++-only */
 1994 /* %endif */
 1995 {
 1996     register int yy_is_jam;
 1997     /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
 1998     register char *yy_cp = (yy_c_buf_p);
 1999 
 2000     register YY_CHAR yy_c = 1;
 2001     if ( yy_accept[yy_current_state] )
 2002         {
 2003         (yy_last_accepting_state) = yy_current_state;
 2004         (yy_last_accepting_cpos) = yy_cp;
 2005         }
 2006     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 2007         {
 2008         yy_current_state = (int) yy_def[yy_current_state];
 2009         if ( yy_current_state >= 271 )
 2010             yy_c = yy_meta[(unsigned int) yy_c];
 2011         }
 2012     yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 2013     yy_is_jam = (yy_current_state == 270);
 2014 
 2015         return yy_is_jam ? 0 : yy_current_state;
 2016 }
 2017 
 2018 /* %if-c-only */
 2019 
 2020     static void yyunput (int c, register char * yy_bp )
 2021 /* %endif */
 2022 /* %if-c++-only */
 2023 /* %endif */
 2024 {
 2025     register char *yy_cp;
 2026     
 2027     yy_cp = (yy_c_buf_p);
 2028 
 2029     /* undo effects of setting up uttext */
 2030     *yy_cp = (yy_hold_char);
 2031 
 2032     if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
 2033         { /* need to shift things up to make room */
 2034         /* +2 for EOB chars. */
 2035         register yy_size_t number_to_move = (yy_n_chars) + 2;
 2036         register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
 2037                     YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
 2038         register char *source =
 2039                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
 2040 
 2041         while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
 2042             *--dest = *--source;
 2043 
 2044         yy_cp += (int) (dest - source);
 2045         yy_bp += (int) (dest - source);
 2046         YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
 2047             (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
 2048 
 2049         if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
 2050             YY_FATAL_ERROR( "flex scanner push-back overflow" );
 2051         }
 2052 
 2053     *--yy_cp = (char) c;
 2054 
 2055 /* %% [18.0] update utlineno here */
 2056 
 2057     (yytext_ptr) = yy_bp;
 2058     (yy_hold_char) = *yy_cp;
 2059     (yy_c_buf_p) = yy_cp;
 2060 }
 2061 /* %if-c-only */
 2062 
 2063 /* %endif */
 2064 
 2065 /* %if-c-only */
 2066 #ifndef YY_NO_INPUT
 2067 #ifdef __cplusplus
 2068     static int yyinput (void)
 2069 #else
 2070     static int input  (void)
 2071 #endif
 2072 
 2073 /* %endif */
 2074 /* %if-c++-only */
 2075 /* %endif */
 2076 {
 2077     int c;
 2078     
 2079     *(yy_c_buf_p) = (yy_hold_char);
 2080 
 2081     if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
 2082         {
 2083         /* yy_c_buf_p now points to the character we want to return.
 2084          * If this occurs *before* the EOB characters, then it's a
 2085          * valid NUL; if not, then we've hit the end of the buffer.
 2086          */
 2087         if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
 2088             /* This was really a NUL. */
 2089             *(yy_c_buf_p) = '\0';
 2090 
 2091         else
 2092             { /* need more input */
 2093             yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
 2094             ++(yy_c_buf_p);
 2095 
 2096             switch ( yy_get_next_buffer(  ) )
 2097                 {
 2098                 case EOB_ACT_LAST_MATCH:
 2099                     /* This happens because yy_g_n_b()
 2100                      * sees that we've accumulated a
 2101                      * token and flags that we need to
 2102                      * try matching the token before
 2103                      * proceeding.  But for input(),
 2104                      * there's no matching to consider.
 2105                      * So convert the EOB_ACT_LAST_MATCH
 2106                      * to EOB_ACT_END_OF_FILE.
 2107                      */
 2108 
 2109                     /* Reset buffer status. */
 2110                     utrestart(utin );
 2111 
 2112                     /*FALLTHROUGH*/
 2113 
 2114                 case EOB_ACT_END_OF_FILE:
 2115                     {
 2116                     if ( utwrap( ) )
 2117                         return EOF;
 2118 
 2119                     if ( ! (yy_did_buffer_switch_on_eof) )
 2120                         YY_NEW_FILE;
 2121 #ifdef __cplusplus
 2122                     return yyinput();
 2123 #else
 2124                     return input();
 2125 #endif
 2126                     }
 2127 
 2128                 case EOB_ACT_CONTINUE_SCAN:
 2129                     (yy_c_buf_p) = (yytext_ptr) + offset;
 2130                     break;
 2131                 }
 2132             }
 2133         }
 2134 
 2135     c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
 2136     *(yy_c_buf_p) = '\0';   /* preserve uttext */
 2137     (yy_hold_char) = *++(yy_c_buf_p);
 2138 
 2139 /* %% [19.0] update BOL and utlineno */
 2140 
 2141     return c;
 2142 }
 2143 /* %if-c-only */
 2144 #endif  /* ifndef YY_NO_INPUT */
 2145 /* %endif */
 2146 
 2147 /** Immediately switch to a different input stream.
 2148  * @param input_file A readable stream.
 2149  * 
 2150  * @note This function does not reset the start condition to @c INITIAL .
 2151  */
 2152 /* %if-c-only */
 2153     void utrestart  (FILE * input_file )
 2154 /* %endif */
 2155 /* %if-c++-only */
 2156 /* %endif */
 2157 {
 2158     
 2159     if ( ! YY_CURRENT_BUFFER ){
 2160         utensure_buffer_stack ();
 2161         YY_CURRENT_BUFFER_LVALUE =
 2162             ut_create_buffer(utin,YY_BUF_SIZE );
 2163     }
 2164 
 2165     ut_init_buffer(YY_CURRENT_BUFFER,input_file );
 2166     ut_load_buffer_state( );
 2167 }
 2168 
 2169 /** Switch to a different input buffer.
 2170  * @param new_buffer The new input buffer.
 2171  * 
 2172  */
 2173 /* %if-c-only */
 2174     void ut_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
 2175 /* %endif */
 2176 /* %if-c++-only */
 2177 /* %endif */
 2178 {
 2179     
 2180     /* TODO. We should be able to replace this entire function body
 2181      * with
 2182      *      utpop_buffer_state();
 2183      *      utpush_buffer_state(new_buffer);
 2184      */
 2185     utensure_buffer_stack ();
 2186     if ( YY_CURRENT_BUFFER == new_buffer )
 2187         return;
 2188 
 2189     if ( YY_CURRENT_BUFFER )
 2190         {
 2191         /* Flush out information for old buffer. */
 2192         *(yy_c_buf_p) = (yy_hold_char);
 2193         YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
 2194         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
 2195         }
 2196 
 2197     YY_CURRENT_BUFFER_LVALUE = new_buffer;
 2198     ut_load_buffer_state( );
 2199 
 2200     /* We don't actually know whether we did this switch during
 2201      * EOF (utwrap()) processing, but the only time this flag
 2202      * is looked at is after utwrap() is called, so it's safe
 2203      * to go ahead and always set it.
 2204      */
 2205     (yy_did_buffer_switch_on_eof) = 1;
 2206 }
 2207 
 2208 /* %if-c-only */
 2209 static void ut_load_buffer_state  (void)
 2210 /* %endif */
 2211 /* %if-c++-only */
 2212 /* %endif */
 2213 {
 2214         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
 2215     (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
 2216     utin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
 2217     (yy_hold_char) = *(yy_c_buf_p);
 2218 }
 2219 
 2220 /** Allocate and initialize an input buffer state.
 2221  * @param file A readable stream.
 2222  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 2223  * 
 2224  * @return the allocated buffer state.
 2225  */
 2226 /* %if-c-only */
 2227     YY_BUFFER_STATE ut_create_buffer  (FILE * file, int  size )
 2228 /* %endif */
 2229 /* %if-c++-only */
 2230 /* %endif */
 2231 {
 2232     YY_BUFFER_STATE b;
 2233     
 2234     b = (YY_BUFFER_STATE) utalloc(sizeof( struct yy_buffer_state )  );
 2235     if ( ! b )
 2236         YY_FATAL_ERROR( "out of dynamic memory in ut_create_buffer()" );
 2237 
 2238     b->yy_buf_size = size;
 2239 
 2240     /* yy_ch_buf has to be 2 characters longer than the size given because
 2241      * we need to put in 2 end-of-buffer characters.
 2242      */
 2243     b->yy_ch_buf = (char *) utalloc(b->yy_buf_size + 2  );
 2244     if ( ! b->yy_ch_buf )
 2245         YY_FATAL_ERROR( "out of dynamic memory in ut_create_buffer()" );
 2246 
 2247     b->yy_is_our_buffer = 1;
 2248 
 2249     ut_init_buffer(b,file );
 2250 
 2251     return b;
 2252 }
 2253 
 2254 /** Destroy the buffer.
 2255  * @param b a buffer created with ut_create_buffer()
 2256  * 
 2257  */
 2258 /* %if-c-only */
 2259     void ut_delete_buffer (YY_BUFFER_STATE  b )
 2260 /* %endif */
 2261 /* %if-c++-only */
 2262 /* %endif */
 2263 {
 2264     
 2265     if ( ! b )
 2266         return;
 2267 
 2268     if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
 2269         YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
 2270 
 2271     if ( b->yy_is_our_buffer )
 2272         utfree((void *) b->yy_ch_buf  );
 2273 
 2274     utfree((void *) b  );
 2275 }
 2276 
 2277 /* Initializes or reinitializes a buffer.
 2278  * This function is sometimes called more than once on the same buffer,
 2279  * such as during a utrestart() or at EOF.
 2280  */
 2281 /* %if-c-only */
 2282     static void ut_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
 2283 /* %endif */
 2284 /* %if-c++-only */
 2285 /* %endif */
 2286 
 2287 {
 2288     int oerrno = errno;
 2289     
 2290     ut_flush_buffer(b );
 2291 
 2292     b->yy_input_file = file;
 2293     b->yy_fill_buffer = 1;
 2294 
 2295     /* If b is the current buffer, then ut_init_buffer was _probably_
 2296      * called from utrestart() or through yy_get_next_buffer.
 2297      * In that case, we don't want to reset the lineno or column.
 2298      */
 2299     if (b != YY_CURRENT_BUFFER){
 2300         b->yy_bs_lineno = 1;
 2301         b->yy_bs_column = 0;
 2302     }
 2303 
 2304 /* %if-c-only */
 2305 
 2306         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
 2307     
 2308 /* %endif */
 2309 /* %if-c++-only */
 2310 /* %endif */
 2311     errno = oerrno;
 2312 }
 2313 
 2314 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 2315  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 2316  * 
 2317  */
 2318 /* %if-c-only */
 2319     void ut_flush_buffer (YY_BUFFER_STATE  b )
 2320 /* %endif */
 2321 /* %if-c++-only */
 2322 /* %endif */
 2323 {
 2324         if ( ! b )
 2325         return;
 2326 
 2327     b->yy_n_chars = 0;
 2328 
 2329     /* We always need two end-of-buffer characters.  The first causes
 2330      * a transition to the end-of-buffer state.  The second causes
 2331      * a jam in that state.
 2332      */
 2333     b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
 2334     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
 2335 
 2336     b->yy_buf_pos = &b->yy_ch_buf[0];
 2337 
 2338     b->yy_at_bol = 1;
 2339     b->yy_buffer_status = YY_BUFFER_NEW;
 2340 
 2341     if ( b == YY_CURRENT_BUFFER )
 2342         ut_load_buffer_state( );
 2343 }
 2344 
 2345 /* %if-c-or-c++ */
 2346 /** Pushes the new state onto the stack. The new state becomes
 2347  *  the current state. This function will allocate the stack
 2348  *  if necessary.
 2349  *  @param new_buffer The new state.
 2350  *  
 2351  */
 2352 /* %if-c-only */
 2353 void utpush_buffer_state (YY_BUFFER_STATE new_buffer )
 2354 /* %endif */
 2355 /* %if-c++-only */
 2356 /* %endif */
 2357 {
 2358         if (new_buffer == NULL)
 2359         return;
 2360 
 2361     utensure_buffer_stack();
 2362 
 2363     /* This block is copied from ut_switch_to_buffer. */
 2364     if ( YY_CURRENT_BUFFER )
 2365         {
 2366         /* Flush out information for old buffer. */
 2367         *(yy_c_buf_p) = (yy_hold_char);
 2368         YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
 2369         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
 2370         }
 2371 
 2372     /* Only push if top exists. Otherwise, replace top. */
 2373     if (YY_CURRENT_BUFFER)
 2374         (yy_buffer_stack_top)++;
 2375     YY_CURRENT_BUFFER_LVALUE = new_buffer;
 2376 
 2377     /* copied from ut_switch_to_buffer. */
 2378     ut_load_buffer_state( );
 2379     (yy_did_buffer_switch_on_eof) = 1;
 2380 }
 2381 /* %endif */
 2382 
 2383 /* %if-c-or-c++ */
 2384 /** Removes and deletes the top of the stack, if present.
 2385  *  The next element becomes the new top.
 2386  *  
 2387  */
 2388 /* %if-c-only */
 2389 void utpop_buffer_state (void)
 2390 /* %endif */
 2391 /* %if-c++-only */
 2392 /* %endif */
 2393 {
 2394         if (!YY_CURRENT_BUFFER)
 2395         return;
 2396 
 2397     ut_delete_buffer(YY_CURRENT_BUFFER );
 2398     YY_CURRENT_BUFFER_LVALUE = NULL;
 2399     if ((yy_buffer_stack_top) > 0)
 2400         --(yy_buffer_stack_top);
 2401 
 2402     if (YY_CURRENT_BUFFER) {
 2403         ut_load_buffer_state( );
 2404         (yy_did_buffer_switch_on_eof) = 1;
 2405     }
 2406 }
 2407 /* %endif */
 2408 
 2409 /* %if-c-or-c++ */
 2410 /* Allocates the stack if it does not exist.
 2411  *  Guarantees space for at least one push.
 2412  */
 2413 /* %if-c-only */
 2414 static void utensure_buffer_stack (void)
 2415 /* %endif */
 2416 /* %if-c++-only */
 2417 /* %endif */
 2418 {
 2419     yy_size_t num_to_alloc;
 2420     
 2421     if (!(yy_buffer_stack)) {
 2422 
 2423         /* First allocation is just for 2 elements, since we don't know if this
 2424          * scanner will even need a stack. We use 2 instead of 1 to avoid an
 2425          * immediate realloc on the next call.
 2426          */
 2427         num_to_alloc = 1;
 2428         (yy_buffer_stack) = (struct yy_buffer_state**)utalloc
 2429                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
 2430                                 );
 2431         if ( ! (yy_buffer_stack) )
 2432             YY_FATAL_ERROR( "out of dynamic memory in utensure_buffer_stack()" );
 2433                                   
 2434         memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
 2435                 
 2436         (yy_buffer_stack_max) = num_to_alloc;
 2437         (yy_buffer_stack_top) = 0;
 2438         return;
 2439     }
 2440 
 2441     if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
 2442 
 2443         /* Increase the buffer to prepare for a possible push. */
 2444         int grow_size = 8 /* arbitrary grow size */;
 2445 
 2446         num_to_alloc = (yy_buffer_stack_max) + grow_size;
 2447         (yy_buffer_stack) = (struct yy_buffer_state**)utrealloc
 2448                                 ((yy_buffer_stack),
 2449                                 num_to_alloc * sizeof(struct yy_buffer_state*)
 2450                                 );
 2451         if ( ! (yy_buffer_stack) )
 2452             YY_FATAL_ERROR( "out of dynamic memory in utensure_buffer_stack()" );
 2453 
 2454         /* zero only the new slots.*/
 2455         memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
 2456         (yy_buffer_stack_max) = num_to_alloc;
 2457     }
 2458 }
 2459 /* %endif */
 2460 
 2461 /* %if-c-only */
 2462 /** Setup the input buffer state to scan directly from a user-specified character buffer.
 2463  * @param base the character buffer
 2464  * @param size the size in bytes of the character buffer
 2465  * 
 2466  * @return the newly allocated buffer state object. 
 2467  */
 2468 YY_BUFFER_STATE ut_scan_buffer  (char * base, yy_size_t  size )
 2469 {
 2470     YY_BUFFER_STATE b;
 2471     
 2472     if ( size < 2 ||
 2473          base[size-2] != YY_END_OF_BUFFER_CHAR ||
 2474          base[size-1] != YY_END_OF_BUFFER_CHAR )
 2475         /* They forgot to leave room for the EOB's. */
 2476         return 0;
 2477 
 2478     b = (YY_BUFFER_STATE) utalloc(sizeof( struct yy_buffer_state )  );
 2479     if ( ! b )
 2480         YY_FATAL_ERROR( "out of dynamic memory in ut_scan_buffer()" );
 2481 
 2482     b->yy_buf_size = size - 2;  /* "- 2" to take care of EOB's */
 2483     b->yy_buf_pos = b->yy_ch_buf = base;
 2484     b->yy_is_our_buffer = 0;
 2485     b->yy_input_file = 0;
 2486     b->yy_n_chars = b->yy_buf_size;
 2487     b->yy_is_interactive = 0;
 2488     b->yy_at_bol = 1;
 2489     b->yy_fill_buffer = 0;
 2490     b->yy_buffer_status = YY_BUFFER_NEW;
 2491 
 2492     ut_switch_to_buffer(b  );
 2493 
 2494     return b;
 2495 }
 2496 /* %endif */
 2497 
 2498 /* %if-c-only */
 2499 /** Setup the input buffer state to scan a string. The next call to utlex() will
 2500  * scan from a @e copy of @a str.
 2501  * @param yystr a NUL-terminated string to scan
 2502  * 
 2503  * @return the newly allocated buffer state object.
 2504  * @note If you want to scan bytes that may contain NUL values, then use
 2505  *       ut_scan_bytes() instead.
 2506  */
 2507 YY_BUFFER_STATE ut_scan_string (yyconst char * yystr )
 2508 {
 2509     
 2510     return ut_scan_bytes(yystr,strlen(yystr) );
 2511 }
 2512 /* %endif */
 2513 
 2514 /* %if-c-only */
 2515 /** Setup the input buffer state to scan the given bytes. The next call to utlex() will
 2516  * scan from a @e copy of @a bytes.
 2517  * @param yybytes the byte buffer to scan
 2518  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
 2519  * 
 2520  * @return the newly allocated buffer state object.
 2521  */
 2522 YY_BUFFER_STATE ut_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
 2523 {
 2524     YY_BUFFER_STATE b;
 2525     char *buf;
 2526     yy_size_t n;
 2527     int i;
 2528     
 2529     /* Get memory for full buffer, including space for trailing EOB's. */
 2530     n = _yybytes_len + 2;
 2531     buf = (char *) utalloc(n  );
 2532     if ( ! buf )
 2533         YY_FATAL_ERROR( "out of dynamic memory in ut_scan_bytes()" );
 2534 
 2535     for ( i = 0; i < _yybytes_len; ++i )
 2536         buf[i] = yybytes[i];
 2537 
 2538     buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
 2539 
 2540     b = ut_scan_buffer(buf,n );
 2541     if ( ! b )
 2542         YY_FATAL_ERROR( "bad buffer in ut_scan_bytes()" );
 2543 
 2544     /* It's okay to grow etc. this buffer, and we should throw it
 2545      * away when we're done.
 2546      */
 2547     b->yy_is_our_buffer = 1;
 2548 
 2549     return b;
 2550 }
 2551 /* %endif */
 2552 
 2553 #ifndef YY_EXIT_FAILURE
 2554 #define YY_EXIT_FAILURE 2
 2555 #endif
 2556 
 2557 /* %if-c-only */
 2558 static void yy_fatal_error (yyconst char* msg )
 2559 {
 2560         (void) fprintf( stderr, "%s\n", msg );
 2561     exit( YY_EXIT_FAILURE );
 2562 }
 2563 /* %endif */
 2564 /* %if-c++-only */
 2565 /* %endif */
 2566 
 2567 /* Redefine yyless() so it works in section 3 code. */
 2568 
 2569 #undef yyless
 2570 #define yyless(n) \
 2571     do \
 2572         { \
 2573         /* Undo effects of setting up uttext. */ \
 2574         int yyless_macro_arg = (n); \
 2575         YY_LESS_LINENO(yyless_macro_arg);\
 2576         uttext[utleng] = (yy_hold_char); \
 2577         (yy_c_buf_p) = uttext + yyless_macro_arg; \
 2578         (yy_hold_char) = *(yy_c_buf_p); \
 2579         *(yy_c_buf_p) = '\0'; \
 2580         utleng = yyless_macro_arg; \
 2581         } \
 2582     while ( 0 )
 2583 
 2584 /* Accessor  methods (get/set functions) to struct members. */
 2585 
 2586 /* %if-c-only */
 2587 /* %if-reentrant */
 2588 /* %endif */
 2589 
 2590 /** Get the current line number.
 2591  * 
 2592  */
 2593 int utget_lineno  (void)
 2594 {
 2595         
 2596     return utlineno;
 2597 }
 2598 
 2599 /** Get the input stream.
 2600  * 
 2601  */
 2602 FILE *utget_in  (void)
 2603 {
 2604         return utin;
 2605 }
 2606 
 2607 /** Get the output stream.
 2608  * 
 2609  */
 2610 FILE *utget_out  (void)
 2611 {
 2612         return utout;
 2613 }
 2614 
 2615 /** Get the length of the current token.
 2616  * 
 2617  */
 2618 yy_size_t utget_leng  (void)
 2619 {
 2620         return utleng;
 2621 }
 2622 
 2623 /** Get the current token.
 2624  * 
 2625  */
 2626 
 2627 char *utget_text  (void)
 2628 {
 2629         return uttext;
 2630 }
 2631 
 2632 /* %if-reentrant */
 2633 /* %endif */
 2634 
 2635 /** Set the current line number.
 2636  * @param line_number
 2637  * 
 2638  */
 2639 void utset_lineno (int  line_number )
 2640 {
 2641     
 2642     utlineno = line_number;
 2643 }
 2644 
 2645 /** Set the input stream. This does not discard the current
 2646  * input buffer.
 2647  * @param in_str A readable stream.
 2648  * 
 2649  * @see ut_switch_to_buffer
 2650  */
 2651 void utset_in (FILE *  in_str )
 2652 {
 2653         utin = in_str ;
 2654 }
 2655 
 2656 void utset_out (FILE *  out_str )
 2657 {
 2658         utout = out_str ;
 2659 }
 2660 
 2661 int utget_debug  (void)
 2662 {
 2663         return ut_flex_debug;
 2664 }
 2665 
 2666 void utset_debug (int  bdebug )
 2667 {
 2668         ut_flex_debug = bdebug ;
 2669 }
 2670 
 2671 /* %endif */
 2672 
 2673 /* %if-reentrant */
 2674 /* %if-bison-bridge */
 2675 /* %endif */
 2676 /* %endif if-c-only */
 2677 
 2678 /* %if-c-only */
 2679 static int yy_init_globals (void)
 2680 {
 2681         /* Initialization is the same as for the non-reentrant scanner.
 2682      * This function is called from utlex_destroy(), so don't allocate here.
 2683      */
 2684 
 2685     (yy_buffer_stack) = 0;
 2686     (yy_buffer_stack_top) = 0;
 2687     (yy_buffer_stack_max) = 0;
 2688     (yy_c_buf_p) = (char *) 0;
 2689     (yy_init) = 0;
 2690     (yy_start) = 0;
 2691 
 2692 /* Defined in main.c */
 2693 #ifdef YY_STDINIT
 2694     utin = stdin;
 2695     utout = stdout;
 2696 #else
 2697     utin = (FILE *) 0;
 2698     utout = (FILE *) 0;
 2699 #endif
 2700 
 2701     /* For future reference: Set errno on error, since we are called by
 2702      * utlex_init()
 2703      */
 2704     return 0;
 2705 }
 2706 /* %endif */
 2707 
 2708 /* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
 2709 /* utlex_destroy is for both reentrant and non-reentrant scanners. */
 2710 int utlex_destroy  (void)
 2711 {
 2712     
 2713     /* Pop the buffer stack, destroying each element. */
 2714     while(YY_CURRENT_BUFFER){
 2715         ut_delete_buffer(YY_CURRENT_BUFFER  );
 2716         YY_CURRENT_BUFFER_LVALUE = NULL;
 2717         utpop_buffer_state();
 2718     }
 2719 
 2720     /* Destroy the stack itself. */
 2721     utfree((yy_buffer_stack) );
 2722     (yy_buffer_stack) = NULL;
 2723 
 2724     /* Reset the globals. This is important in a non-reentrant scanner so the next time
 2725      * utlex() is called, initialization will occur. */
 2726     yy_init_globals( );
 2727 
 2728 /* %if-reentrant */
 2729 /* %endif */
 2730     return 0;
 2731 }
 2732 /* %endif */
 2733 
 2734 /*
 2735  * Internal utility routines.
 2736  */
 2737 
 2738 #ifndef yytext_ptr
 2739 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
 2740 {
 2741     register int i;
 2742     for ( i = 0; i < n; ++i )
 2743         s1[i] = s2[i];
 2744 }
 2745 #endif
 2746 
 2747 #ifdef YY_NEED_STRLEN
 2748 static int yy_flex_strlen (yyconst char * s )
 2749 {
 2750     register int n;
 2751     for ( n = 0; s[n]; ++n )
 2752         ;
 2753 
 2754     return n;
 2755 }
 2756 #endif
 2757 
 2758 void *utalloc (yy_size_t  size )
 2759 {
 2760     return (void *) malloc( size );
 2761 }
 2762 
 2763 void *utrealloc  (void * ptr, yy_size_t  size )
 2764 {
 2765     /* The cast to (char *) in the following accommodates both
 2766      * implementations that use char* generic pointers, and those
 2767      * that use void* generic pointers.  It works with the latter
 2768      * because both ANSI C and C++ allow castless assignment from
 2769      * any pointer type to void*, and deal with argument conversions
 2770      * as though doing an assignment.
 2771      */
 2772     return (void *) realloc( (char *) ptr, size );
 2773 }
 2774 
 2775 void utfree (void * ptr )
 2776 {
 2777     free( (char *) ptr );   /* see utrealloc() for (char *) cast */
 2778 }
 2779 
 2780 /* %if-tables-serialization definitions */
 2781 /* %define-yytables   The name for this specific scanner's tables. */
 2782 #define YYTABLES_NAME "yytables"
 2783 /* %endif */
 2784 
 2785 /* %ok-for-header */
 2786 
 2787 #line 348 "scanner.l"
 2788 
 2789 
 2790