LCOV - code coverage report
Current view: top level - build/synthesis - CalLibraryGram.lcc (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 150 397 37.8 %
Date: 2024-12-11 20:54:31 Functions: 10 34 29.4 %

          Line data    Source code
       1             : #line 2 "/source/casa6/casatools/src/code/build/synthesis/CalLibraryGram.lcc"
       2             : 
       3             : #line 4 "/source/casa6/casatools/src/code/build/synthesis/CalLibraryGram.lcc"
       4             : 
       5             : #define  YY_INT_ALIGNED short int
       6             : 
       7             : /* A lexical scanner generated by flex */
       8             : 
       9             : #define yy_create_buffer CalLibraryGram_create_buffer
      10             : #define yy_delete_buffer CalLibraryGram_delete_buffer
      11             : #define yy_flex_debug CalLibraryGram_flex_debug
      12             : #define yy_init_buffer CalLibraryGram_init_buffer
      13             : #define yy_flush_buffer CalLibraryGram_flush_buffer
      14             : #define yy_load_buffer_state CalLibraryGram_load_buffer_state
      15             : #define yy_switch_to_buffer CalLibraryGram_switch_to_buffer
      16             : #define yyin CalLibraryGramin
      17             : #define yyleng CalLibraryGramleng
      18             : #define yylex CalLibraryGramlex
      19             : #define yylineno CalLibraryGramlineno
      20             : #define yyout CalLibraryGramout
      21             : #define yyrestart CalLibraryGramrestart
      22             : #define yytext CalLibraryGramtext
      23             : #define yywrap CalLibraryGramwrap
      24             : #define yyalloc CalLibraryGramalloc
      25             : #define yyrealloc CalLibraryGramrealloc
      26             : #define yyfree CalLibraryGramfree
      27             : 
      28             : #define FLEX_SCANNER
      29             : #define YY_FLEX_MAJOR_VERSION 2
      30             : #define YY_FLEX_MINOR_VERSION 6
      31             : #define YY_FLEX_SUBMINOR_VERSION 1
      32             : #if YY_FLEX_SUBMINOR_VERSION > 0
      33             : #define FLEX_BETA
      34             : #endif
      35             : 
      36             : /* First, we deal with  platform-specific or compiler-specific issues. */
      37             : 
      38             : /* begin standard C headers. */
      39             : #include <stdio.h>
      40             : #include <string.h>
      41             : #include <errno.h>
      42             : #include <stdlib.h>
      43             : 
      44             : /* end standard C headers. */
      45             : 
      46             : /* flex integer type definitions */
      47             : 
      48             : #ifndef FLEXINT_H
      49             : #define FLEXINT_H
      50             : 
      51             : /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
      52             : 
      53             : #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
      54             : 
      55             : /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
      56             :  * if you want the limit (max/min) macros for int types. 
      57             :  */
      58             : #ifndef __STDC_LIMIT_MACROS
      59             : #define __STDC_LIMIT_MACROS 1
      60             : #endif
      61             : 
      62             : #include <inttypes.h>
      63             : typedef int8_t flex_int8_t;
      64             : typedef uint8_t flex_uint8_t;
      65             : typedef int16_t flex_int16_t;
      66             : typedef uint16_t flex_uint16_t;
      67             : typedef int32_t flex_int32_t;
      68             : typedef uint32_t flex_uint32_t;
      69             : #else
      70             : typedef signed char flex_int8_t;
      71             : typedef short int flex_int16_t;
      72             : typedef int flex_int32_t;
      73             : typedef unsigned char flex_uint8_t; 
      74             : typedef unsigned short int flex_uint16_t;
      75             : typedef unsigned int flex_uint32_t;
      76             : 
      77             : /* Limits of integral types. */
      78             : #ifndef INT8_MIN
      79             : #define INT8_MIN               (-128)
      80             : #endif
      81             : #ifndef INT16_MIN
      82             : #define INT16_MIN              (-32767-1)
      83             : #endif
      84             : #ifndef INT32_MIN
      85             : #define INT32_MIN              (-2147483647-1)
      86             : #endif
      87             : #ifndef INT8_MAX
      88             : #define INT8_MAX               (127)
      89             : #endif
      90             : #ifndef INT16_MAX
      91             : #define INT16_MAX              (32767)
      92             : #endif
      93             : #ifndef INT32_MAX
      94             : #define INT32_MAX              (2147483647)
      95             : #endif
      96             : #ifndef UINT8_MAX
      97             : #define UINT8_MAX              (255U)
      98             : #endif
      99             : #ifndef UINT16_MAX
     100             : #define UINT16_MAX             (65535U)
     101             : #endif
     102             : #ifndef UINT32_MAX
     103             : #define UINT32_MAX             (4294967295U)
     104             : #endif
     105             : 
     106             : #endif /* ! C99 */
     107             : 
     108             : #endif /* ! FLEXINT_H */
     109             : 
     110             : /* TODO: this is always defined, so inline it */
     111             : #define yyconst const
     112             : 
     113             : #if defined(__GNUC__) && __GNUC__ >= 3
     114             : #define yynoreturn __attribute__((__noreturn__))
     115             : #else
     116             : #define yynoreturn
     117             : #endif
     118             : 
     119             : /* Returned upon end-of-file. */
     120             : #define YY_NULL 0
     121             : 
     122             : /* Promotes a possibly negative, possibly signed char to an unsigned
     123             :  * integer for use as an array index.  If the signed char is negative,
     124             :  * we want to instead treat it as an 8-bit unsigned char, hence the
     125             :  * double cast.
     126             :  */
     127             : #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
     128             : 
     129             : /* Enter a start condition.  This macro really ought to take a parameter,
     130             :  * but we do it the disgusting crufty way forced on us by the ()-less
     131             :  * definition of BEGIN.
     132             :  */
     133             : #define BEGIN (yy_start) = 1 + 2 *
     134             : 
     135             : /* Translate the current start state into a value that can be later handed
     136             :  * to BEGIN to return to the state.  The YYSTATE alias is for lex
     137             :  * compatibility.
     138             :  */
     139             : #define YY_START (((yy_start) - 1) / 2)
     140             : #define YYSTATE YY_START
     141             : 
     142             : /* Action number for EOF rule of a given start state. */
     143             : #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
     144             : 
     145             : /* Special action meaning "start processing a new file". */
     146             : #define YY_NEW_FILE CalLibraryGramrestart(CalLibraryGramin  )
     147             : 
     148             : #define YY_END_OF_BUFFER_CHAR 0
     149             : 
     150             : /* Size of default input buffer. */
     151             : #ifndef YY_BUF_SIZE
     152             : #ifdef __ia64__
     153             : /* On IA-64, the buffer size is 16k, not 8k.
     154             :  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
     155             :  * Ditto for the __ia64__ case accordingly.
     156             :  */
     157             : #define YY_BUF_SIZE 32768
     158             : #else
     159             : #define YY_BUF_SIZE 16384
     160             : #endif /* __ia64__ */
     161             : #endif
     162             : 
     163             : /* The state buf must be large enough to hold one state per character in the main buffer.
     164             :  */
     165             : #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
     166             : 
     167             : #ifndef YY_TYPEDEF_YY_BUFFER_STATE
     168             : #define YY_TYPEDEF_YY_BUFFER_STATE
     169             : typedef struct yy_buffer_state *YY_BUFFER_STATE;
     170             : #endif
     171             : 
     172             : #ifndef YY_TYPEDEF_YY_SIZE_T
     173             : #define YY_TYPEDEF_YY_SIZE_T
     174             : typedef size_t yy_size_t;
     175             : #endif
     176             : 
     177             : extern int CalLibraryGramleng;
     178             : 
     179             : extern FILE *CalLibraryGramin, *CalLibraryGramout;
     180             : 
     181             : #define EOB_ACT_CONTINUE_SCAN 0
     182             : #define EOB_ACT_END_OF_FILE 1
     183             : #define EOB_ACT_LAST_MATCH 2
     184             : 
     185             :     #define YY_LESS_LINENO(n)
     186             :     #define YY_LINENO_REWIND_TO(ptr)
     187             :     
     188             : /* Return all but the first "n" matched characters back to the input stream. */
     189             : #define yyless(n) \
     190             :         do \
     191             :                 { \
     192             :                 /* Undo effects of setting up CalLibraryGramtext. */ \
     193             :         yy_size_t yyless_macro_arg = (n); \
     194             :         YY_LESS_LINENO(yyless_macro_arg);\
     195             :                 *yy_cp = (yy_hold_char); \
     196             :                 YY_RESTORE_YY_MORE_OFFSET \
     197             :                 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
     198             :                 YY_DO_BEFORE_ACTION; /* set up CalLibraryGramtext again */ \
     199             :                 } \
     200             :         while ( 0 )
     201             : 
     202             : #define unput(c) yyunput( c, (yytext_ptr)  )
     203             : 
     204             : #ifndef YY_STRUCT_YY_BUFFER_STATE
     205             : #define YY_STRUCT_YY_BUFFER_STATE
     206             : struct yy_buffer_state
     207             :         {
     208             :         FILE *yy_input_file;
     209             : 
     210             :         char *yy_ch_buf;                /* input buffer */
     211             :         char *yy_buf_pos;               /* current position in input buffer */
     212             : 
     213             :         /* Size of input buffer in bytes, not including room for EOB
     214             :          * characters.
     215             :          */
     216             :         int yy_buf_size;
     217             : 
     218             :         /* Number of characters read into yy_ch_buf, not including EOB
     219             :          * characters.
     220             :          */
     221             :         int yy_n_chars;
     222             : 
     223             :         /* Whether we "own" the buffer - i.e., we know we created it,
     224             :          * and can realloc() it to grow it, and should free() it to
     225             :          * delete it.
     226             :          */
     227             :         int yy_is_our_buffer;
     228             : 
     229             :         /* Whether this is an "interactive" input source; if so, and
     230             :          * if we're using stdio for input, then we want to use getc()
     231             :          * instead of fread(), to make sure we stop fetching input after
     232             :          * each newline.
     233             :          */
     234             :         int yy_is_interactive;
     235             : 
     236             :         /* Whether we're considered to be at the beginning of a line.
     237             :          * If so, '^' rules will be active on the next match, otherwise
     238             :          * not.
     239             :          */
     240             :         int yy_at_bol;
     241             : 
     242             :     int yy_bs_lineno; /**< The line count. */
     243             :     int yy_bs_column; /**< The column count. */
     244             :     
     245             :         /* Whether to try to fill the input buffer when we reach the
     246             :          * end of it.
     247             :          */
     248             :         int yy_fill_buffer;
     249             : 
     250             :         int yy_buffer_status;
     251             : 
     252             : #define YY_BUFFER_NEW 0
     253             : #define YY_BUFFER_NORMAL 1
     254             :         /* When an EOF's been seen but there's still some text to process
     255             :          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
     256             :          * shouldn't try reading from the input source any more.  We might
     257             :          * still have a bunch of tokens to match, though, because of
     258             :          * possible backing-up.
     259             :          *
     260             :          * When we actually see the EOF, we change the status to "new"
     261             :          * (via CalLibraryGramrestart()), so that the user can continue scanning by
     262             :          * just pointing CalLibraryGramin at a new input file.
     263             :          */
     264             : #define YY_BUFFER_EOF_PENDING 2
     265             : 
     266             :         };
     267             : #endif /* !YY_STRUCT_YY_BUFFER_STATE */
     268             : 
     269             : /* Stack of input buffers. */
     270             : static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
     271             : static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
     272             : static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
     273             : 
     274             : /* We provide macros for accessing buffer states in case in the
     275             :  * future we want to put the buffer states in a more general
     276             :  * "scanner state".
     277             :  *
     278             :  * Returns the top of the stack, or NULL.
     279             :  */
     280             : #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
     281             :                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
     282             :                           : NULL)
     283             : 
     284             : /* Same as previous macro, but useful when we know that the buffer stack is not
     285             :  * NULL or when we need an lvalue. For internal use only.
     286             :  */
     287             : #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
     288             : 
     289             : /* yy_hold_char holds the character lost when CalLibraryGramtext is formed. */
     290             : static char yy_hold_char;
     291             : static int yy_n_chars;          /* number of characters read into yy_ch_buf */
     292             : int CalLibraryGramleng;
     293             : 
     294             : /* Points to current character in buffer. */
     295             : static char *yy_c_buf_p = NULL;
     296             : static int yy_init = 0;         /* whether we need to initialize */
     297             : static int yy_start = 0;        /* start state number */
     298             : 
     299             : /* Flag which is used to allow CalLibraryGramwrap()'s to do buffer switches
     300             :  * instead of setting up a fresh CalLibraryGramin.  A bit of a hack ...
     301             :  */
     302             : static int yy_did_buffer_switch_on_eof;
     303             : 
     304             : void CalLibraryGramrestart (FILE *input_file  );
     305             : void CalLibraryGram_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
     306             : YY_BUFFER_STATE CalLibraryGram_create_buffer (FILE *file,int size  );
     307             : void CalLibraryGram_delete_buffer (YY_BUFFER_STATE b  );
     308             : void CalLibraryGram_flush_buffer (YY_BUFFER_STATE b  );
     309             : void CalLibraryGrampush_buffer_state (YY_BUFFER_STATE new_buffer  );
     310             : void CalLibraryGrampop_buffer_state (void );
     311             : 
     312             : static void CalLibraryGramensure_buffer_stack (void );
     313             : static void CalLibraryGram_load_buffer_state (void );
     314             : static void CalLibraryGram_init_buffer (YY_BUFFER_STATE b,FILE *file  );
     315             : 
     316             : #define YY_FLUSH_BUFFER CalLibraryGram_flush_buffer(YY_CURRENT_BUFFER )
     317             : 
     318             : YY_BUFFER_STATE CalLibraryGram_scan_buffer (char *base,yy_size_t size  );
     319             : YY_BUFFER_STATE CalLibraryGram_scan_string (yyconst char *yy_str  );
     320             : YY_BUFFER_STATE CalLibraryGram_scan_bytes (yyconst char *bytes,int len  );
     321             : 
     322             : void *CalLibraryGramalloc (yy_size_t  );
     323             : void *CalLibraryGramrealloc (void *,yy_size_t  );
     324             : void CalLibraryGramfree (void *  );
     325             : 
     326             : #define yy_new_buffer CalLibraryGram_create_buffer
     327             : 
     328             : #define yy_set_interactive(is_interactive) \
     329             :         { \
     330             :         if ( ! YY_CURRENT_BUFFER ){ \
     331             :         CalLibraryGramensure_buffer_stack (); \
     332             :                 YY_CURRENT_BUFFER_LVALUE =    \
     333             :             CalLibraryGram_create_buffer(CalLibraryGramin,YY_BUF_SIZE ); \
     334             :         } \
     335             :         YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
     336             :         }
     337             : 
     338             : #define yy_set_bol(at_bol) \
     339             :         { \
     340             :         if ( ! YY_CURRENT_BUFFER ){\
     341             :         CalLibraryGramensure_buffer_stack (); \
     342             :                 YY_CURRENT_BUFFER_LVALUE =    \
     343             :             CalLibraryGram_create_buffer(CalLibraryGramin,YY_BUF_SIZE ); \
     344             :         } \
     345             :         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
     346             :         }
     347             : 
     348             : #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
     349             : 
     350             : typedef unsigned char YY_CHAR;
     351             : 
     352             : FILE *CalLibraryGramin = NULL, *CalLibraryGramout = NULL;
     353             : 
     354             : typedef int yy_state_type;
     355             : 
     356             : extern int CalLibraryGramlineno;
     357             : 
     358             : int CalLibraryGramlineno = 1;
     359             : 
     360             : extern char *CalLibraryGramtext;
     361             : #ifdef yytext_ptr
     362             : #undef yytext_ptr
     363             : #endif
     364             : #define yytext_ptr CalLibraryGramtext
     365             : 
     366             : static yy_state_type yy_get_previous_state (void );
     367             : static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
     368             : static int yy_get_next_buffer (void );
     369             : static void yynoreturn yy_fatal_error (yyconst char* msg  );
     370             : 
     371             : /* Done after the current pattern has been matched and before the
     372             :  * corresponding action - sets up CalLibraryGramtext.
     373             :  */
     374             : #define YY_DO_BEFORE_ACTION \
     375             :         (yytext_ptr) = yy_bp; \
     376             :         CalLibraryGramleng = (int) (yy_cp - yy_bp); \
     377             :         (yy_hold_char) = *yy_cp; \
     378             :         *yy_cp = '\0'; \
     379             :         (yy_c_buf_p) = yy_cp;
     380             : 
     381             : #define YY_NUM_RULES 17
     382             : #define YY_END_OF_BUFFER 18
     383             : /* This struct is not used in this scanner,
     384             :    but its presence is necessary. */
     385             : struct yy_trans_info
     386             :         {
     387             :         flex_int32_t yy_verify;
     388             :         flex_int32_t yy_nxt;
     389             :         };
     390             : static yyconst flex_int16_t yy_accept[54] =
     391             :     {   0,
     392             :         0,    0,    0,    0,   18,   16,    1,    9,   16,   16,
     393             :         9,    7,    8,   10,    5,    4,   12,   10,   10,    1,
     394             :         2,   16,   17,   13,   14,   15,    0,   11,    0,    0,
     395             :         7,   10,   10,   10,   10,   10,    0,    0,    0,    3,
     396             :        14,    0,    0,    6,   10,   10,   10,   10,   10,    4,
     397             :        10,    5,    0
     398             :     } ;
     399             : 
     400             : static yyconst YY_CHAR yy_ec[256] =
     401             :     {   0,
     402             :         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
     403             :         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     404             :         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     405             :         1,    4,    1,    5,    6,    1,    1,    1,    7,    1,
     406             :         1,    1,    1,    8,    1,    9,    1,   10,   10,   10,
     407             :        10,   10,   10,   10,   10,   10,   10,    1,    1,    1,
     408             :        11,    1,    1,    1,   12,   12,   12,   12,   12,   13,
     409             :        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
     410             :        12,   12,   12,   14,   12,   12,   12,   12,   12,   12,
     411             :        15,    1,   16,    1,    1,    1,   17,   12,   12,   12,
     412             : 
     413             :        18,   19,   12,   12,   12,   12,   12,   20,   12,   12,
     414             :        12,   12,   12,   21,   22,   23,   24,   12,   12,   12,
     415             :        12,   12,    1,    1,    1,    1,    1,    1,    1,    1,
     416             :         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     417             :         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     418             :         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     419             :         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     420             :         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     421             :         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     422             :         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     423             : 
     424             :         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     425             :         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     426             :         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     427             :         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     428             :         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     429             :         1,    1,    1,    1,    1
     430             :     } ;
     431             : 
     432             : static yyconst YY_CHAR yy_meta[25] =
     433             :     {   0,
     434             :         1,    1,    2,    1,    1,    1,    1,    1,    3,    3,
     435             :         1,    3,    3,    3,    1,    1,    3,    3,    3,    3,
     436             :         3,    3,    3,    3
     437             :     } ;
     438             : 
     439             : static yyconst flex_uint16_t yy_base[59] =
     440             :     {   0,
     441             :         0,   23,   26,   39,  105,  106,  106,  106,   99,   96,
     442             :       106,   22,  106,   93,   24,   19,  106,   28,   29,   42,
     443             :       106,   98,  106,  106,   90,  106,   94,   46,   91,   87,
     444             :        47,   87,   43,   30,   49,   50,   58,   92,   91,  106,
     445             :        83,   83,   78,   65,   56,   52,   57,   58,   59,   64,
     446             :        62,   63,  106,   80,   83,   86,   32,   89
     447             :     } ;
     448             : 
     449             : static yyconst flex_int16_t yy_def[59] =
     450             :     {   0,
     451             :        53,    1,   54,   54,   53,   53,   53,   53,   55,   56,
     452             :        53,   57,   53,   57,   57,   57,   53,   57,   57,   53,
     453             :        53,   58,   53,   53,   53,   53,   55,   53,   56,   53,
     454             :        57,   57,   57,   57,   57,   57,   53,   58,   58,   53,
     455             :        53,   55,   56,   53,   57,   57,   57,   57,   57,   57,
     456             :        57,   57,    0,   53,   53,   53,   53,   53
     457             :     } ;
     458             : 
     459             : static yyconst flex_uint16_t yy_nxt[131] =
     460             :     {   0,
     461             :         6,    7,    8,    7,    9,    6,   10,   11,    6,   12,
     462             :        13,   14,   15,   16,   17,    6,   14,   14,   18,   14,
     463             :        14,   14,   19,   14,   20,   21,   20,   53,   22,   24,
     464             :        30,   31,   53,   24,   32,   25,   53,   53,   53,   34,
     465             :        33,   26,   24,   37,   35,   37,   24,   38,   25,   36,
     466             :        42,   53,   43,   46,   26,   30,   31,   53,   53,   37,
     467             :        53,   37,   45,   38,   53,   53,   53,   53,   47,   50,
     468             :        53,   53,   53,   48,   44,   50,   52,   49,   51,   52,
     469             :        23,   23,   23,   27,   28,   27,   29,   28,   29,   39,
     470             :        39,   39,   41,   40,   40,   53,   44,   28,   28,   41,
     471             : 
     472             :        40,   53,   28,   28,   53,    5,   53,   53,   53,   53,
     473             :        53,   53,   53,   53,   53,   53,   53,   53,   53,   53,
     474             :        53,   53,   53,   53,   53,   53,   53,   53,   53,   53
     475             :     } ;
     476             : 
     477             : static yyconst flex_int16_t yy_chk[131] =
     478             :     {   0,
     479             :         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     480             :         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
     481             :         1,    1,    1,    1,    2,    2,    2,   16,    2,    3,
     482             :        12,   12,   15,    3,   57,    3,   18,   19,   34,   16,
     483             :        15,    3,    4,   20,   18,   20,    4,   20,    4,   19,
     484             :        28,   33,   28,   34,    4,   31,   31,   35,   36,   37,
     485             :        46,   37,   33,   37,   45,   47,   48,   49,   35,   46,
     486             :        51,   52,   50,   36,   44,   48,   49,   45,   47,   51,
     487             :        54,   54,   54,   55,   43,   55,   56,   42,   56,   58,
     488             :        58,   58,   41,   39,   38,   32,   30,   29,   27,   25,
     489             : 
     490             :        22,   14,   10,    9,    5,   53,   53,   53,   53,   53,
     491             :        53,   53,   53,   53,   53,   53,   53,   53,   53,   53,
     492             :        53,   53,   53,   53,   53,   53,   53,   53,   53,   53
     493             :     } ;
     494             : 
     495             : static yy_state_type yy_last_accepting_state;
     496             : static char *yy_last_accepting_cpos;
     497             : 
     498             : extern int CalLibraryGram_flex_debug;
     499             : int CalLibraryGram_flex_debug = 0;
     500             : 
     501             : /* The intent behind this definition is that it'll catch
     502             :  * any uses of REJECT which flex missed.
     503             :  */
     504             : #define REJECT reject_used_but_not_detected
     505             : #define yymore() yymore_used_but_not_detected
     506             : #define YY_MORE_ADJ 0
     507             : #define YY_RESTORE_YY_MORE_OFFSET
     508             : char *CalLibraryGramtext;
     509             : #line 1 "CalLibrary/CalLibraryGram.ll"
     510             : /* -*- C -*-
     511             :     CalLibraryGram.ll: Lexical analyzer for cal library files
     512             :     Copyright (C) 2015
     513             :     Associated Universities, Inc. Washington DC, USA.
     514             : 
     515             :     This library is free software; you can redistribute it and/or modify it
     516             :     under the terms of the GNU Library General Public License as published by
     517             :     the Free Software Foundation; either version 2 of the License, or (at your
     518             :     option) any later version.
     519             : 
     520             :     This library is distributed in the hope that it will be useful, but WITHOUT
     521             :     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
     522             :     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
     523             :     License for more details.
     524             : 
     525             :     You should have received a copy of the GNU Library General Public License
     526             :     along with this library; if not, write to the Free Software Foundation,
     527             :     Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
     528             : 
     529             :     Correspondence concerning AIPS++ should be addressed as follows:
     530             :            Internet email: casa-feedback@nrao.edu.
     531             :            Postal address: AIPS++ Project Office
     532             :                            National Radio Astronomy Observatory
     533             :                            520 Edgemont Road
     534             :                            Charlottesville, VA 22903-2475 USA
     535             : */
     536             : /* yy_unput is not used, so let flex not generate it, otherwise picky
     537             :    compilers will issue warnings. */
     538             : #line 33 "CalLibrary/CalLibraryGram.ll"
     539             : #undef YY_INPUT
     540             : #define YY_INPUT(buf,result,max_size) result = calLibraryGramInput(buf, max_size)
     541             : #undef YY_DECL
     542             : #define YY_DECL int CalLibraryGramlex (YYSTYPE* lvalp)
     543             : #include <string.h>
     544             : 
     545             : #line 546 "/source/casa6/casatools/src/code/build/synthesis/CalLibraryGram.lcc"
     546             : 
     547             : #define INITIAL 0
     548             : #define ORDERED_LIST 1
     549             : 
     550             : #ifndef YY_NO_UNISTD_H
     551             : /* Special case for "unistd.h", since it is non-ANSI. We include it way
     552             :  * down here because we want the user's section 1 to have been scanned first.
     553             :  * The user has a chance to override it with an option.
     554             :  */
     555             : #include <unistd.h>
     556             : #endif
     557             : 
     558             : #ifndef YY_EXTRA_TYPE
     559             : #define YY_EXTRA_TYPE void *
     560             : #endif
     561             : 
     562             : static int yy_init_globals (void );
     563             : 
     564             : /* Accessor methods to globals.
     565             :    These are made visible to non-reentrant scanners for convenience. */
     566             : 
     567             : int CalLibraryGramlex_destroy (void );
     568             : 
     569             : int CalLibraryGramget_debug (void );
     570             : 
     571             : void CalLibraryGramset_debug (int debug_flag  );
     572             : 
     573             : YY_EXTRA_TYPE CalLibraryGramget_extra (void );
     574             : 
     575             : void CalLibraryGramset_extra (YY_EXTRA_TYPE user_defined  );
     576             : 
     577             : FILE *CalLibraryGramget_in (void );
     578             : 
     579             : void CalLibraryGramset_in  (FILE * _in_str  );
     580             : 
     581             : FILE *CalLibraryGramget_out (void );
     582             : 
     583             : void CalLibraryGramset_out  (FILE * _out_str  );
     584             : 
     585             :                         int CalLibraryGramget_leng (void );
     586             : 
     587             : char *CalLibraryGramget_text (void );
     588             : 
     589             : int CalLibraryGramget_lineno (void );
     590             : 
     591             : void CalLibraryGramset_lineno (int _line_number  );
     592             : 
     593             : /* Macros after this point can all be overridden by user definitions in
     594             :  * section 1.
     595             :  */
     596             : 
     597             : #ifndef YY_SKIP_YYWRAP
     598             : #ifdef __cplusplus
     599             : extern "C" int CalLibraryGramwrap (void );
     600             : #else
     601             : extern int CalLibraryGramwrap (void );
     602             : #endif
     603             : #endif
     604             : 
     605             : #ifndef YY_NO_UNPUT
     606             :     
     607             : #endif
     608             : 
     609             : #ifndef yytext_ptr
     610             : static void yy_flex_strncpy (char *,yyconst char *,int );
     611             : #endif
     612             : 
     613             : #ifdef YY_NEED_STRLEN
     614             : static int yy_flex_strlen (yyconst char * );
     615             : #endif
     616             : 
     617             : #ifndef YY_NO_INPUT
     618             : 
     619             : #ifdef __cplusplus
     620             : static int yyinput (void );
     621             : #else
     622             : static int input (void );
     623             : #endif
     624             : 
     625             : #endif
     626             : 
     627             : /* Amount of stuff to slurp up with each read. */
     628             : #ifndef YY_READ_BUF_SIZE
     629             : #ifdef __ia64__
     630             : /* On IA-64, the buffer size is 16k, not 8k */
     631             : #define YY_READ_BUF_SIZE 16384
     632             : #else
     633             : #define YY_READ_BUF_SIZE 8192
     634             : #endif /* __ia64__ */
     635             : #endif
     636             : 
     637             : /* Copy whatever the last rule matched to the standard output. */
     638             : #ifndef ECHO
     639             : /* This used to be an fputs(), but since the string might contain NUL's,
     640             :  * we now use fwrite().
     641             :  */
     642             : #define ECHO do { if (fwrite( CalLibraryGramtext, (size_t) CalLibraryGramleng, 1, CalLibraryGramout )) {} } while (0)
     643             : #endif
     644             : 
     645             : /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
     646             :  * is returned in "result".
     647             :  */
     648             : #ifndef YY_INPUT
     649             : #define YY_INPUT(buf,result,max_size) \
     650             :         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
     651             :                 { \
     652             :                 int c = '*'; \
     653             :                 int n; \
     654             :                 for ( n = 0; n < max_size && \
     655             :                              (c = getc( CalLibraryGramin )) != EOF && c != '\n'; ++n ) \
     656             :                         buf[n] = (char) c; \
     657             :                 if ( c == '\n' ) \
     658             :                         buf[n++] = (char) c; \
     659             :                 if ( c == EOF && ferror( CalLibraryGramin ) ) \
     660             :                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
     661             :                 result = n; \
     662             :                 } \
     663             :         else \
     664             :                 { \
     665             :                 errno=0; \
     666             :                 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, CalLibraryGramin)) == 0 && ferror(CalLibraryGramin)) \
     667             :                         { \
     668             :                         if( errno != EINTR) \
     669             :                                 { \
     670             :                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
     671             :                                 break; \
     672             :                                 } \
     673             :                         errno=0; \
     674             :                         clearerr(CalLibraryGramin); \
     675             :                         } \
     676             :                 }\
     677             : \
     678             : 
     679             : #endif
     680             : 
     681             : /* No semi-colon after return; correct usage is to write "yyterminate();" -
     682             :  * we don't want an extra ';' after the "return" because that will cause
     683             :  * some compilers to complain about unreachable statements.
     684             :  */
     685             : #ifndef yyterminate
     686             : #define yyterminate() return YY_NULL
     687             : #endif
     688             : 
     689             : /* Number of entries by which start-condition stack grows. */
     690             : #ifndef YY_START_STACK_INCR
     691             : #define YY_START_STACK_INCR 25
     692             : #endif
     693             : 
     694             : /* Report a fatal error. */
     695             : #ifndef YY_FATAL_ERROR
     696             : #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
     697             : #endif
     698             : 
     699             : /* end tables serialization structures and prototypes */
     700             : 
     701             : /* Default declaration of generated scanner - a define so the user can
     702             :  * easily add parameters.
     703             :  */
     704             : #ifndef YY_DECL
     705             : #define YY_DECL_IS_OURS 1
     706             : 
     707             : extern int CalLibraryGramlex (void);
     708             : 
     709             : #define YY_DECL int CalLibraryGramlex (void)
     710             : #endif /* !YY_DECL */
     711             : 
     712             : /* Code executed at the beginning of each rule, after CalLibraryGramtext and CalLibraryGramleng
     713             :  * have been set up.
     714             :  */
     715             : #ifndef YY_USER_ACTION
     716             : #define YY_USER_ACTION
     717             : #endif
     718             : 
     719             : /* Code executed at the end of each rule. */
     720             : #ifndef YY_BREAK
     721             : #define YY_BREAK /*LINTED*/break;
     722             : #endif
     723             : 
     724             : #define YY_RULE_SETUP \
     725             :         if ( CalLibraryGramleng > 0 ) \
     726             :                 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
     727             :                                 (CalLibraryGramtext[CalLibraryGramleng - 1] == '\n'); \
     728             :         YY_USER_ACTION
     729             : 
     730             : /** The main scanner function which does all the work.
     731             :  */
     732         264 : YY_DECL
     733             : {
     734             :         yy_state_type yy_current_state;
     735             :         char *yy_cp, *yy_bp;
     736             :         int yy_act;
     737             :     
     738         264 :         if ( !(yy_init) )
     739             :                 {
     740           2 :                 (yy_init) = 1;
     741             : 
     742             : #ifdef YY_USER_INIT
     743             :                 YY_USER_INIT;
     744             : #endif
     745             : 
     746           2 :                 if ( ! (yy_start) )
     747           0 :                         (yy_start) = 1; /* first start state */
     748             : 
     749           2 :                 if ( ! CalLibraryGramin )
     750           2 :                         CalLibraryGramin = stdin;
     751             : 
     752           2 :                 if ( ! CalLibraryGramout )
     753           2 :                         CalLibraryGramout = stdout;
     754             : 
     755           2 :                 if ( ! YY_CURRENT_BUFFER ) {
     756           0 :                         CalLibraryGramensure_buffer_stack ();
     757           0 :                         YY_CURRENT_BUFFER_LVALUE =
     758           0 :                                 CalLibraryGram_create_buffer(CalLibraryGramin,YY_BUF_SIZE );
     759             :                 }
     760             : 
     761           2 :                 CalLibraryGram_load_buffer_state( );
     762             :                 }
     763             : 
     764             :         {
     765             : #line 45 "CalLibrary/CalLibraryGram.ll"
     766             : 
     767             : #line 768 "/source/casa6/casatools/src/code/build/synthesis/CalLibraryGram.lcc"
     768             : 
     769             :         while ( /*CONSTCOND*/1 )                /* loops until end-of-file is reached */
     770             :                 {
     771         342 :                 yy_cp = (yy_c_buf_p);
     772             : 
     773             :                 /* Support of CalLibraryGramtext. */
     774         342 :                 *yy_cp = (yy_hold_char);
     775             : 
     776             :                 /* yy_bp points to the position in yy_ch_buf of the start of
     777             :                  * the current run.
     778             :                  */
     779         342 :                 yy_bp = yy_cp;
     780             : 
     781         342 :                 yy_current_state = (yy_start);
     782         342 :                 yy_current_state += YY_AT_BOL();
     783         356 : yy_match:
     784             :                 do
     785             :                         {
     786        1669 :                         YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
     787        1669 :                         if ( yy_accept[yy_current_state] )
     788             :                                 {
     789         688 :                                 (yy_last_accepting_state) = yy_current_state;
     790         688 :                                 (yy_last_accepting_cpos) = yy_cp;
     791             :                                 }
     792        3017 :                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
     793             :                                 {
     794        1348 :                                 yy_current_state = (int) yy_def[yy_current_state];
     795        1348 :                                 if ( yy_current_state >= 54 )
     796        1121 :                                         yy_c = yy_meta[(unsigned int) yy_c];
     797             :                                 }
     798        1669 :                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
     799        1669 :                         ++yy_cp;
     800             :                         }
     801        1669 :                 while ( yy_base[yy_current_state] != 106 );
     802             : 
     803         356 : yy_find_action:
     804         356 :                 yy_act = yy_accept[yy_current_state];
     805         356 :                 if ( yy_act == 0 )
     806             :                         { /* have to back up */
     807         179 :                         yy_cp = (yy_last_accepting_cpos);
     808         179 :                         yy_current_state = (yy_last_accepting_state);
     809         179 :                         yy_act = yy_accept[yy_current_state];
     810             :                         }
     811             : 
     812         356 :                 YY_DO_BEFORE_ACTION;
     813             : 
     814         370 : do_action:      /* This label is used only to access EOF actions. */
     815             : 
     816         370 :                 switch ( yy_act )
     817             :         { /* beginning of action switch */
     818           0 :                         case 0: /* must back up */
     819             :                         /* undo the effects of YY_DO_BEFORE_ACTION */
     820           0 :                         *yy_cp = (yy_hold_char);
     821           0 :                         yy_cp = (yy_last_accepting_cpos);
     822           0 :                         yy_current_state = (yy_last_accepting_state);
     823           0 :                         goto yy_find_action;
     824             : 
     825          62 : case 1:
     826          62 : YY_RULE_SETUP
     827             : #line 46 "CalLibrary/CalLibraryGram.ll"
     828             : ;
     829             :         YY_BREAK
     830             : case 2:
     831             : /* rule 2 can match eol */
     832             : YY_RULE_SETUP
     833             : #line 47 "CalLibrary/CalLibraryGram.ll"
     834             : { ++(calLibLineNum()); }
     835             :         YY_BREAK
     836             : case 3:
     837             : /* rule 3 can match eol */
     838             : YY_RULE_SETUP
     839             : #line 48 "CalLibrary/CalLibraryGram.ll"
     840             : { ++(calLibLineNum()); } // comment
     841             :         YY_BREAK
     842             : case 4:
     843             : YY_RULE_SETUP
     844             : #line 49 "CalLibrary/CalLibraryGram.ll"
     845             : { lvalp->bval = true; return BOOLEAN; }
     846             :         YY_BREAK
     847             : case 5:
     848             : YY_RULE_SETUP
     849             : #line 50 "CalLibrary/CalLibraryGram.ll"
     850             : { lvalp->bval = false; return BOOLEAN; }
     851             :         YY_BREAK
     852             : case 6:
     853             : YY_RULE_SETUP
     854             : #line 51 "CalLibrary/CalLibraryGram.ll"
     855             : { lvalp->fval = atof(CalLibraryGramtext); return FLOAT; }
     856             :         YY_BREAK
     857             : case 7:
     858             : YY_RULE_SETUP
     859             : #line 52 "CalLibrary/CalLibraryGram.ll"
     860             : { lvalp->ival = atoi(CalLibraryGramtext); return INT; }
     861             :         YY_BREAK
     862             : case 8:
     863             : YY_RULE_SETUP
     864             : #line 53 "CalLibrary/CalLibraryGram.ll"
     865             : { return EQ; }
     866             :         YY_BREAK
     867             : case 9:
     868             : /* rule 9 can match eol */
     869             : YY_RULE_SETUP
     870             : #line 54 "CalLibrary/CalLibraryGram.ll"
     871             : { ++(calLibLineNum()); return ENDL; }
     872             :         YY_BREAK
     873             : case 10:
     874             : YY_RULE_SETUP
     875             : #line 56 "CalLibrary/CalLibraryGram.ll"
     876             : {
     877             :         // copy in case CalLibraryGramtext changes underneath us:
     878             :         lvalp->sval = strdup(CalLibraryGramtext);
     879             :         return STRING; }
     880             :         YY_BREAK
     881             : case 11:
     882             : YY_RULE_SETUP
     883             : #line 60 "CalLibrary/CalLibraryGram.ll"
     884             : {
     885             :         // copy in case CalLibraryGramtext changes underneath us:
     886             :         std::string str = strdup(CalLibraryGramtext);
     887             :     char * cstr = new char[CalLibraryGramleng];
     888             :         strcpy(cstr, str.substr(1, CalLibraryGramleng - 2).c_str());
     889             :         lvalp->sval = cstr;
     890             :         return STRING; }
     891             :         YY_BREAK
     892             : case 12:
     893             : YY_RULE_SETUP
     894             : #line 68 "CalLibrary/CalLibraryGram.ll"
     895             : { BEGIN(ORDERED_LIST); }   // begin ordered list
     896             :         YY_BREAK
     897             : case 13:
     898             : YY_RULE_SETUP
     899             : #line 69 "CalLibrary/CalLibraryGram.ll"
     900             : ;                          // ignore spaces and commas
     901             :         YY_BREAK
     902             : case 14:
     903             : YY_RULE_SETUP
     904             : #line 70 "CalLibrary/CalLibraryGram.ll"
     905             : { lvalp->idx_int = atoi(CalLibraryGramtext);
     906             :                         return ARRAY_INT; }
     907             :         YY_BREAK
     908             : case 15:
     909             : YY_RULE_SETUP
     910             : #line 72 "CalLibrary/CalLibraryGram.ll"
     911             : { BEGIN(INITIAL);          // end of list, back to normal
     912             :                         return END_LIST; }
     913             :         YY_BREAK
     914             : case 16:
     915             : YY_RULE_SETUP
     916             : #line 75 "CalLibrary/CalLibraryGram.ll"
     917             : ;
     918             :         YY_BREAK
     919             : case 17:
     920             : YY_RULE_SETUP
     921             : #line 76 "CalLibrary/CalLibraryGram.ll"
     922             : ECHO;
     923             :         YY_BREAK
     924             : #line 925 "/source/casa6/casatools/src/code/build/synthesis/CalLibraryGram.lcc"
     925          14 : case YY_STATE_EOF(INITIAL):
     926             : case YY_STATE_EOF(ORDERED_LIST):
     927          14 :         yyterminate();
     928             : 
     929          28 :         case YY_END_OF_BUFFER:
     930             :                 {
     931             :                 /* Amount of text matched not including the EOB char. */
     932          28 :                 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
     933             : 
     934             :                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
     935          28 :                 *yy_cp = (yy_hold_char);
     936             :                 YY_RESTORE_YY_MORE_OFFSET
     937             : 
     938          28 :                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
     939             :                         {
     940             :                         /* We're scanning a new file or input source.  It's
     941             :                          * possible that this happened because the user
     942             :                          * just pointed CalLibraryGramin at a new source and called
     943             :                          * CalLibraryGramlex().  If so, then we have to assure
     944             :                          * consistency between YY_CURRENT_BUFFER and our
     945             :                          * globals.  Here is the right place to do so, because
     946             :                          * this is the first action (other than possibly a
     947             :                          * back-up) that will match for the new input source.
     948             :                          */
     949          14 :                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
     950          14 :                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = CalLibraryGramin;
     951          14 :                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
     952             :                         }
     953             : 
     954             :                 /* Note that here we test for yy_c_buf_p "<=" to the position
     955             :                  * of the first EOB in the buffer, since yy_c_buf_p will
     956             :                  * already have been incremented past the NUL character
     957             :                  * (since all states make transitions on EOB to the
     958             :                  * end-of-buffer state).  Contrast this with the test
     959             :                  * in input().
     960             :                  */
     961          28 :                 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
     962             :                         { /* This was really a NUL. */
     963             :                         yy_state_type yy_next_state;
     964             : 
     965           0 :                         (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
     966             : 
     967           0 :                         yy_current_state = yy_get_previous_state(  );
     968             : 
     969             :                         /* Okay, we're now positioned to make the NUL
     970             :                          * transition.  We couldn't have
     971             :                          * yy_get_previous_state() go ahead and do it
     972             :                          * for us because it doesn't know how to deal
     973             :                          * with the possibility of jamming (and we don't
     974             :                          * want to build jamming into it because then it
     975             :                          * will run more slowly).
     976             :                          */
     977             : 
     978           0 :                         yy_next_state = yy_try_NUL_trans( yy_current_state );
     979             : 
     980           0 :                         yy_bp = (yytext_ptr) + YY_MORE_ADJ;
     981             : 
     982           0 :                         if ( yy_next_state )
     983             :                                 {
     984             :                                 /* Consume the NUL. */
     985           0 :                                 yy_cp = ++(yy_c_buf_p);
     986           0 :                                 yy_current_state = yy_next_state;
     987           0 :                                 goto yy_match;
     988             :                                 }
     989             : 
     990             :                         else
     991             :                                 {
     992           0 :                                 yy_cp = (yy_c_buf_p);
     993           0 :                                 goto yy_find_action;
     994             :                                 }
     995             :                         }
     996             : 
     997          28 :                 else switch ( yy_get_next_buffer(  ) )
     998             :                         {
     999          14 :                         case EOB_ACT_END_OF_FILE:
    1000             :                                 {
    1001          14 :                                 (yy_did_buffer_switch_on_eof) = 0;
    1002             : 
    1003          14 :                                 if ( CalLibraryGramwrap( ) )
    1004             :                                         {
    1005             :                                         /* Note: because we've taken care in
    1006             :                                          * yy_get_next_buffer() to have set up
    1007             :                                          * CalLibraryGramtext, we can now set up
    1008             :                                          * yy_c_buf_p so that if some total
    1009             :                                          * hoser (like flex itself) wants to
    1010             :                                          * call the scanner after we return the
    1011             :                                          * YY_NULL, it'll still work - another
    1012             :                                          * YY_NULL will get returned.
    1013             :                                          */
    1014          14 :                                         (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
    1015             : 
    1016          14 :                                         yy_act = YY_STATE_EOF(YY_START);
    1017          14 :                                         goto do_action;
    1018             :                                         }
    1019             : 
    1020             :                                 else
    1021             :                                         {
    1022           0 :                                         if ( ! (yy_did_buffer_switch_on_eof) )
    1023           0 :                                                 YY_NEW_FILE;
    1024             :                                         }
    1025           0 :                                 break;
    1026             :                                 }
    1027             : 
    1028          14 :                         case EOB_ACT_CONTINUE_SCAN:
    1029          14 :                                 (yy_c_buf_p) =
    1030          14 :                                         (yytext_ptr) + yy_amount_of_matched_text;
    1031             : 
    1032          14 :                                 yy_current_state = yy_get_previous_state(  );
    1033             : 
    1034          14 :                                 yy_cp = (yy_c_buf_p);
    1035          14 :                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
    1036          14 :                                 goto yy_match;
    1037             : 
    1038           0 :                         case EOB_ACT_LAST_MATCH:
    1039           0 :                                 (yy_c_buf_p) =
    1040           0 :                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
    1041             : 
    1042           0 :                                 yy_current_state = yy_get_previous_state(  );
    1043             : 
    1044           0 :                                 yy_cp = (yy_c_buf_p);
    1045           0 :                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
    1046           0 :                                 goto yy_find_action;
    1047             :                         }
    1048           0 :                 break;
    1049             :                 }
    1050             : 
    1051           0 :         default:
    1052           0 :                 YY_FATAL_ERROR(
    1053             :                         "fatal flex scanner internal error--no action found" );
    1054             :         } /* end of action switch */
    1055          78 :                 } /* end of scanning one token */
    1056             :         } /* end of user's declarations */
    1057             : } /* end of CalLibraryGramlex */
    1058             : 
    1059             : /* yy_get_next_buffer - try to read in a new buffer
    1060             :  *
    1061             :  * Returns a code representing an action:
    1062             :  *      EOB_ACT_LAST_MATCH -
    1063             :  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
    1064             :  *      EOB_ACT_END_OF_FILE - end of file
    1065             :  */
    1066          28 : static int yy_get_next_buffer (void)
    1067             : {
    1068          28 :         char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
    1069          28 :         char *source = (yytext_ptr);
    1070             :         yy_size_t number_to_move, i;
    1071             :         int ret_val;
    1072             : 
    1073          28 :         if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
    1074           0 :                 YY_FATAL_ERROR(
    1075             :                 "fatal flex scanner internal error--end of buffer missed" );
    1076             : 
    1077          28 :         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
    1078             :                 { /* Don't try to fill the buffer, so this is an EOF. */
    1079           0 :                 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
    1080             :                         {
    1081             :                         /* We matched a single character, the EOB, so
    1082             :                          * treat this as a final EOF.
    1083             :                          */
    1084           0 :                         return EOB_ACT_END_OF_FILE;
    1085             :                         }
    1086             : 
    1087             :                 else
    1088             :                         {
    1089             :                         /* We matched some text prior to the EOB, first
    1090             :                          * process it.
    1091             :                          */
    1092           0 :                         return EOB_ACT_LAST_MATCH;
    1093             :                         }
    1094             :                 }
    1095             : 
    1096             :         /* Try to read more data. */
    1097             : 
    1098             :         /* First move last chars to start of buffer. */
    1099          28 :         number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1;
    1100             : 
    1101          28 :         for ( i = 0; i < number_to_move; ++i )
    1102           0 :                 *(dest++) = *(source++);
    1103             : 
    1104          28 :         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
    1105             :                 /* don't do the read, it's not guaranteed to return an EOF,
    1106             :                  * just force an EOF
    1107             :                  */
    1108           0 :                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
    1109             : 
    1110             :         else
    1111             :                 {
    1112          28 :                         int num_to_read =
    1113          28 :                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
    1114             : 
    1115          28 :                 while ( num_to_read <= 0 )
    1116             :                         { /* Not enough room in the buffer - grow it. */
    1117             : 
    1118             :                         /* just a shorter name for the current buffer */
    1119           0 :                         YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
    1120             : 
    1121           0 :                         int yy_c_buf_p_offset =
    1122           0 :                                 (int) ((yy_c_buf_p) - b->yy_ch_buf);
    1123             : 
    1124           0 :                         if ( b->yy_is_our_buffer )
    1125             :                                 {
    1126           0 :                                 int new_size = b->yy_buf_size * 2;
    1127             : 
    1128           0 :                                 if ( new_size <= 0 )
    1129           0 :                                         b->yy_buf_size += b->yy_buf_size / 8;
    1130             :                                 else
    1131           0 :                                         b->yy_buf_size *= 2;
    1132             : 
    1133           0 :                                 b->yy_ch_buf = (char *)
    1134             :                                         /* Include room in for 2 EOB chars. */
    1135           0 :                                         CalLibraryGramrealloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2)  );
    1136             :                                 }
    1137             :                         else
    1138             :                                 /* Can't grow it, we don't own it. */
    1139           0 :                                 b->yy_ch_buf = NULL;
    1140             : 
    1141           0 :                         if ( ! b->yy_ch_buf )
    1142           0 :                                 YY_FATAL_ERROR(
    1143             :                                 "fatal error - scanner input buffer overflow" );
    1144             : 
    1145           0 :                         (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
    1146             : 
    1147           0 :                         num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
    1148           0 :                                                 number_to_move - 1;
    1149             : 
    1150             :                         }
    1151             : 
    1152          28 :                 if ( num_to_read > YY_READ_BUF_SIZE )
    1153          28 :                         num_to_read = YY_READ_BUF_SIZE;
    1154             : 
    1155             :                 /* Read in more data. */
    1156          28 :                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
    1157             :                         (yy_n_chars), num_to_read );
    1158             : 
    1159          28 :                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
    1160             :                 }
    1161             : 
    1162          28 :         if ( (yy_n_chars) == 0 )
    1163             :                 {
    1164          14 :                 if ( number_to_move == YY_MORE_ADJ )
    1165             :                         {
    1166          14 :                         ret_val = EOB_ACT_END_OF_FILE;
    1167          14 :                         CalLibraryGramrestart(CalLibraryGramin  );
    1168             :                         }
    1169             : 
    1170             :                 else
    1171             :                         {
    1172           0 :                         ret_val = EOB_ACT_LAST_MATCH;
    1173           0 :                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
    1174             :                                 YY_BUFFER_EOF_PENDING;
    1175             :                         }
    1176             :                 }
    1177             : 
    1178             :         else
    1179          14 :                 ret_val = EOB_ACT_CONTINUE_SCAN;
    1180             : 
    1181          28 :         if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
    1182             :                 /* Extend the array by 50%, plus the number we really need. */
    1183           0 :                 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
    1184           0 :                 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) CalLibraryGramrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size  );
    1185           0 :                 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
    1186           0 :                         YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
    1187             :         }
    1188             : 
    1189          28 :         (yy_n_chars) += number_to_move;
    1190          28 :         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
    1191          28 :         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
    1192             : 
    1193          28 :         (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
    1194             : 
    1195          28 :         return ret_val;
    1196             : }
    1197             : 
    1198             : /* yy_get_previous_state - get the state just before the EOB char was reached */
    1199             : 
    1200          14 :     static yy_state_type yy_get_previous_state (void)
    1201             : {
    1202             :         yy_state_type yy_current_state;
    1203             :         char *yy_cp;
    1204             :     
    1205          14 :         yy_current_state = (yy_start);
    1206          14 :         yy_current_state += YY_AT_BOL();
    1207             : 
    1208          14 :         for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
    1209             :                 {
    1210           0 :                 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
    1211           0 :                 if ( yy_accept[yy_current_state] )
    1212             :                         {
    1213           0 :                         (yy_last_accepting_state) = yy_current_state;
    1214           0 :                         (yy_last_accepting_cpos) = yy_cp;
    1215             :                         }
    1216           0 :                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
    1217             :                         {
    1218           0 :                         yy_current_state = (int) yy_def[yy_current_state];
    1219           0 :                         if ( yy_current_state >= 54 )
    1220           0 :                                 yy_c = yy_meta[(unsigned int) yy_c];
    1221             :                         }
    1222           0 :                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
    1223             :                 }
    1224             : 
    1225          14 :         return yy_current_state;
    1226             : }
    1227             : 
    1228             : /* yy_try_NUL_trans - try to make a transition on the NUL character
    1229             :  *
    1230             :  * synopsis
    1231             :  *      next_state = yy_try_NUL_trans( current_state );
    1232             :  */
    1233           0 :     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
    1234             : {
    1235             :         int yy_is_jam;
    1236           0 :         char *yy_cp = (yy_c_buf_p);
    1237             : 
    1238           0 :         YY_CHAR yy_c = 1;
    1239           0 :         if ( yy_accept[yy_current_state] )
    1240             :                 {
    1241           0 :                 (yy_last_accepting_state) = yy_current_state;
    1242           0 :                 (yy_last_accepting_cpos) = yy_cp;
    1243             :                 }
    1244           0 :         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
    1245             :                 {
    1246           0 :                 yy_current_state = (int) yy_def[yy_current_state];
    1247           0 :                 if ( yy_current_state >= 54 )
    1248           0 :                         yy_c = yy_meta[(unsigned int) yy_c];
    1249             :                 }
    1250           0 :         yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
    1251           0 :         yy_is_jam = (yy_current_state == 53);
    1252             : 
    1253           0 :                 return yy_is_jam ? 0 : yy_current_state;
    1254             : }
    1255             : 
    1256             : #ifndef YY_NO_UNPUT
    1257             : 
    1258             : #endif
    1259             : 
    1260             : #ifndef YY_NO_INPUT
    1261             : #ifdef __cplusplus
    1262           0 :     static int yyinput (void)
    1263             : #else
    1264             :     static int input  (void)
    1265             : #endif
    1266             : 
    1267             : {
    1268             :         int c;
    1269             :     
    1270           0 :         *(yy_c_buf_p) = (yy_hold_char);
    1271             : 
    1272           0 :         if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
    1273             :                 {
    1274             :                 /* yy_c_buf_p now points to the character we want to return.
    1275             :                  * If this occurs *before* the EOB characters, then it's a
    1276             :                  * valid NUL; if not, then we've hit the end of the buffer.
    1277             :                  */
    1278           0 :                 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
    1279             :                         /* This was really a NUL. */
    1280           0 :                         *(yy_c_buf_p) = '\0';
    1281             : 
    1282             :                 else
    1283             :                         { /* need more input */
    1284           0 :                         int offset = (yy_c_buf_p) - (yytext_ptr);
    1285           0 :                         ++(yy_c_buf_p);
    1286             : 
    1287           0 :                         switch ( yy_get_next_buffer(  ) )
    1288             :                                 {
    1289           0 :                                 case EOB_ACT_LAST_MATCH:
    1290             :                                         /* This happens because yy_g_n_b()
    1291             :                                          * sees that we've accumulated a
    1292             :                                          * token and flags that we need to
    1293             :                                          * try matching the token before
    1294             :                                          * proceeding.  But for input(),
    1295             :                                          * there's no matching to consider.
    1296             :                                          * So convert the EOB_ACT_LAST_MATCH
    1297             :                                          * to EOB_ACT_END_OF_FILE.
    1298             :                                          */
    1299             : 
    1300             :                                         /* Reset buffer status. */
    1301           0 :                                         CalLibraryGramrestart(CalLibraryGramin );
    1302             : 
    1303             :                                         /*FALLTHROUGH*/
    1304             : 
    1305           0 :                                 case EOB_ACT_END_OF_FILE:
    1306             :                                         {
    1307           0 :                                         if ( CalLibraryGramwrap( ) )
    1308           0 :                                                 return 0;
    1309             : 
    1310           0 :                                         if ( ! (yy_did_buffer_switch_on_eof) )
    1311           0 :                                                 YY_NEW_FILE;
    1312             : #ifdef __cplusplus
    1313           0 :                                         return yyinput();
    1314             : #else
    1315             :                                         return input();
    1316             : #endif
    1317             :                                         }
    1318             : 
    1319           0 :                                 case EOB_ACT_CONTINUE_SCAN:
    1320           0 :                                         (yy_c_buf_p) = (yytext_ptr) + offset;
    1321           0 :                                         break;
    1322             :                                 }
    1323             :                         }
    1324             :                 }
    1325             : 
    1326           0 :         c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
    1327           0 :         *(yy_c_buf_p) = '\0';   /* preserve CalLibraryGramtext */
    1328           0 :         (yy_hold_char) = *++(yy_c_buf_p);
    1329             : 
    1330           0 :         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
    1331             : 
    1332           0 :         return c;
    1333             : }
    1334             : #endif  /* ifndef YY_NO_INPUT */
    1335             : 
    1336             : /** Immediately switch to a different input stream.
    1337             :  * @param input_file A readable stream.
    1338             :  * 
    1339             :  * @note This function does not reset the start condition to @c INITIAL .
    1340             :  */
    1341          28 :     void CalLibraryGramrestart  (FILE * input_file )
    1342             : {
    1343             :     
    1344          28 :         if ( ! YY_CURRENT_BUFFER ){
    1345           2 :         CalLibraryGramensure_buffer_stack ();
    1346           4 :                 YY_CURRENT_BUFFER_LVALUE =
    1347           2 :             CalLibraryGram_create_buffer(CalLibraryGramin,YY_BUF_SIZE );
    1348             :         }
    1349             : 
    1350          28 :         CalLibraryGram_init_buffer(YY_CURRENT_BUFFER,input_file );
    1351          28 :         CalLibraryGram_load_buffer_state( );
    1352          28 : }
    1353             : 
    1354             : /** Switch to a different input buffer.
    1355             :  * @param new_buffer The new input buffer.
    1356             :  * 
    1357             :  */
    1358           0 :     void CalLibraryGram_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
    1359             : {
    1360             :     
    1361             :         /* TODO. We should be able to replace this entire function body
    1362             :          * with
    1363             :          *              CalLibraryGrampop_buffer_state();
    1364             :          *              CalLibraryGrampush_buffer_state(new_buffer);
    1365             :      */
    1366           0 :         CalLibraryGramensure_buffer_stack ();
    1367           0 :         if ( YY_CURRENT_BUFFER == new_buffer )
    1368           0 :                 return;
    1369             : 
    1370           0 :         if ( YY_CURRENT_BUFFER )
    1371             :                 {
    1372             :                 /* Flush out information for old buffer. */
    1373           0 :                 *(yy_c_buf_p) = (yy_hold_char);
    1374           0 :                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
    1375           0 :                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
    1376             :                 }
    1377             : 
    1378           0 :         YY_CURRENT_BUFFER_LVALUE = new_buffer;
    1379           0 :         CalLibraryGram_load_buffer_state( );
    1380             : 
    1381             :         /* We don't actually know whether we did this switch during
    1382             :          * EOF (CalLibraryGramwrap()) processing, but the only time this flag
    1383             :          * is looked at is after CalLibraryGramwrap() is called, so it's safe
    1384             :          * to go ahead and always set it.
    1385             :          */
    1386           0 :         (yy_did_buffer_switch_on_eof) = 1;
    1387             : }
    1388             : 
    1389          58 : static void CalLibraryGram_load_buffer_state  (void)
    1390             : {
    1391          58 :         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
    1392          58 :         (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
    1393          58 :         CalLibraryGramin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
    1394          58 :         (yy_hold_char) = *(yy_c_buf_p);
    1395          58 : }
    1396             : 
    1397             : /** Allocate and initialize an input buffer state.
    1398             :  * @param file A readable stream.
    1399             :  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
    1400             :  * 
    1401             :  * @return the allocated buffer state.
    1402             :  */
    1403           2 :     YY_BUFFER_STATE CalLibraryGram_create_buffer  (FILE * file, int  size )
    1404             : {
    1405             :         YY_BUFFER_STATE b;
    1406             :     
    1407           2 :         b = (YY_BUFFER_STATE) CalLibraryGramalloc(sizeof( struct yy_buffer_state )  );
    1408           2 :         if ( ! b )
    1409           0 :                 YY_FATAL_ERROR( "out of dynamic memory in CalLibraryGram_create_buffer()" );
    1410             : 
    1411           2 :         b->yy_buf_size = size;
    1412             : 
    1413             :         /* yy_ch_buf has to be 2 characters longer than the size given because
    1414             :          * we need to put in 2 end-of-buffer characters.
    1415             :          */
    1416           2 :         b->yy_ch_buf = (char *) CalLibraryGramalloc((yy_size_t) (b->yy_buf_size + 2)  );
    1417           2 :         if ( ! b->yy_ch_buf )
    1418           0 :                 YY_FATAL_ERROR( "out of dynamic memory in CalLibraryGram_create_buffer()" );
    1419             : 
    1420           2 :         b->yy_is_our_buffer = 1;
    1421             : 
    1422           2 :         CalLibraryGram_init_buffer(b,file );
    1423             : 
    1424           2 :         return b;
    1425             : }
    1426             : 
    1427             : /** Destroy the buffer.
    1428             :  * @param b a buffer created with CalLibraryGram_create_buffer()
    1429             :  * 
    1430             :  */
    1431           0 :     void CalLibraryGram_delete_buffer (YY_BUFFER_STATE  b )
    1432             : {
    1433             :     
    1434           0 :         if ( ! b )
    1435           0 :                 return;
    1436             : 
    1437           0 :         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
    1438           0 :                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
    1439             : 
    1440           0 :         if ( b->yy_is_our_buffer )
    1441           0 :                 CalLibraryGramfree((void *) b->yy_ch_buf  );
    1442             : 
    1443           0 :         CalLibraryGramfree((void *) b  );
    1444             : }
    1445             : 
    1446             : /* Initializes or reinitializes a buffer.
    1447             :  * This function is sometimes called more than once on the same buffer,
    1448             :  * such as during a CalLibraryGramrestart() or at EOF.
    1449             :  */
    1450          30 :     static void CalLibraryGram_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
    1451             : 
    1452             : {
    1453          30 :         int oerrno = errno;
    1454             :     
    1455          30 :         CalLibraryGram_flush_buffer(b );
    1456             : 
    1457          30 :         b->yy_input_file = file;
    1458          30 :         b->yy_fill_buffer = 1;
    1459             : 
    1460             :     /* If b is the current buffer, then CalLibraryGram_init_buffer was _probably_
    1461             :      * called from CalLibraryGramrestart() or through yy_get_next_buffer.
    1462             :      * In that case, we don't want to reset the lineno or column.
    1463             :      */
    1464          30 :     if (b != YY_CURRENT_BUFFER){
    1465           2 :         b->yy_bs_lineno = 1;
    1466           2 :         b->yy_bs_column = 0;
    1467             :     }
    1468             : 
    1469          30 :         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
    1470             :     
    1471          30 :         errno = oerrno;
    1472          30 : }
    1473             : 
    1474             : /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
    1475             :  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
    1476             :  * 
    1477             :  */
    1478          30 :     void CalLibraryGram_flush_buffer (YY_BUFFER_STATE  b )
    1479             : {
    1480          30 :         if ( ! b )
    1481           0 :                 return;
    1482             : 
    1483          30 :         b->yy_n_chars = 0;
    1484             : 
    1485             :         /* We always need two end-of-buffer characters.  The first causes
    1486             :          * a transition to the end-of-buffer state.  The second causes
    1487             :          * a jam in that state.
    1488             :          */
    1489          30 :         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
    1490          30 :         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
    1491             : 
    1492          30 :         b->yy_buf_pos = &b->yy_ch_buf[0];
    1493             : 
    1494          30 :         b->yy_at_bol = 1;
    1495          30 :         b->yy_buffer_status = YY_BUFFER_NEW;
    1496             : 
    1497          30 :         if ( b == YY_CURRENT_BUFFER )
    1498          28 :                 CalLibraryGram_load_buffer_state( );
    1499             : }
    1500             : 
    1501             : /** Pushes the new state onto the stack. The new state becomes
    1502             :  *  the current state. This function will allocate the stack
    1503             :  *  if necessary.
    1504             :  *  @param new_buffer The new state.
    1505             :  *  
    1506             :  */
    1507           0 : void CalLibraryGrampush_buffer_state (YY_BUFFER_STATE new_buffer )
    1508             : {
    1509           0 :         if (new_buffer == NULL)
    1510           0 :                 return;
    1511             : 
    1512           0 :         CalLibraryGramensure_buffer_stack();
    1513             : 
    1514             :         /* This block is copied from CalLibraryGram_switch_to_buffer. */
    1515           0 :         if ( YY_CURRENT_BUFFER )
    1516             :                 {
    1517             :                 /* Flush out information for old buffer. */
    1518           0 :                 *(yy_c_buf_p) = (yy_hold_char);
    1519           0 :                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
    1520           0 :                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
    1521             :                 }
    1522             : 
    1523             :         /* Only push if top exists. Otherwise, replace top. */
    1524           0 :         if (YY_CURRENT_BUFFER)
    1525           0 :                 (yy_buffer_stack_top)++;
    1526           0 :         YY_CURRENT_BUFFER_LVALUE = new_buffer;
    1527             : 
    1528             :         /* copied from CalLibraryGram_switch_to_buffer. */
    1529           0 :         CalLibraryGram_load_buffer_state( );
    1530           0 :         (yy_did_buffer_switch_on_eof) = 1;
    1531             : }
    1532             : 
    1533             : /** Removes and deletes the top of the stack, if present.
    1534             :  *  The next element becomes the new top.
    1535             :  *  
    1536             :  */
    1537           0 : void CalLibraryGrampop_buffer_state (void)
    1538             : {
    1539           0 :         if (!YY_CURRENT_BUFFER)
    1540           0 :                 return;
    1541             : 
    1542           0 :         CalLibraryGram_delete_buffer(YY_CURRENT_BUFFER );
    1543           0 :         YY_CURRENT_BUFFER_LVALUE = NULL;
    1544           0 :         if ((yy_buffer_stack_top) > 0)
    1545           0 :                 --(yy_buffer_stack_top);
    1546             : 
    1547           0 :         if (YY_CURRENT_BUFFER) {
    1548           0 :                 CalLibraryGram_load_buffer_state( );
    1549           0 :                 (yy_did_buffer_switch_on_eof) = 1;
    1550             :         }
    1551             : }
    1552             : 
    1553             : /* Allocates the stack if it does not exist.
    1554             :  *  Guarantees space for at least one push.
    1555             :  */
    1556           2 : static void CalLibraryGramensure_buffer_stack (void)
    1557             : {
    1558             :         int num_to_alloc;
    1559             :     
    1560           2 :         if (!(yy_buffer_stack)) {
    1561             : 
    1562             :                 /* First allocation is just for 2 elements, since we don't know if this
    1563             :                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
    1564             :                  * immediate realloc on the next call.
    1565             :          */
    1566           2 :       num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
    1567           2 :                 (yy_buffer_stack) = (struct yy_buffer_state**)CalLibraryGramalloc
    1568           2 :                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
    1569             :                                                                 );
    1570           2 :                 if ( ! (yy_buffer_stack) )
    1571           0 :                         YY_FATAL_ERROR( "out of dynamic memory in CalLibraryGramensure_buffer_stack()" );
    1572             :                                                                   
    1573           2 :                 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
    1574             :                                 
    1575           2 :                 (yy_buffer_stack_max) = num_to_alloc;
    1576           2 :                 (yy_buffer_stack_top) = 0;
    1577           2 :                 return;
    1578             :         }
    1579             : 
    1580           0 :         if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
    1581             : 
    1582             :                 /* Increase the buffer to prepare for a possible push. */
    1583           0 :                 yy_size_t grow_size = 8 /* arbitrary grow size */;
    1584             : 
    1585           0 :                 num_to_alloc = (yy_buffer_stack_max) + grow_size;
    1586           0 :                 (yy_buffer_stack) = (struct yy_buffer_state**)CalLibraryGramrealloc
    1587           0 :                                                                 ((yy_buffer_stack),
    1588           0 :                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
    1589             :                                                                 );
    1590           0 :                 if ( ! (yy_buffer_stack) )
    1591           0 :                         YY_FATAL_ERROR( "out of dynamic memory in CalLibraryGramensure_buffer_stack()" );
    1592             : 
    1593             :                 /* zero only the new slots.*/
    1594           0 :                 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
    1595           0 :                 (yy_buffer_stack_max) = num_to_alloc;
    1596             :         }
    1597             : }
    1598             : 
    1599             : /** Setup the input buffer state to scan directly from a user-specified character buffer.
    1600             :  * @param base the character buffer
    1601             :  * @param size the size in bytes of the character buffer
    1602             :  * 
    1603             :  * @return the newly allocated buffer state object. 
    1604             :  */
    1605           0 : YY_BUFFER_STATE CalLibraryGram_scan_buffer  (char * base, yy_size_t  size )
    1606             : {
    1607             :         YY_BUFFER_STATE b;
    1608             :     
    1609           0 :         if ( size < 2 ||
    1610           0 :              base[size-2] != YY_END_OF_BUFFER_CHAR ||
    1611           0 :              base[size-1] != YY_END_OF_BUFFER_CHAR )
    1612             :                 /* They forgot to leave room for the EOB's. */
    1613           0 :                 return NULL;
    1614             : 
    1615           0 :         b = (YY_BUFFER_STATE) CalLibraryGramalloc(sizeof( struct yy_buffer_state )  );
    1616           0 :         if ( ! b )
    1617           0 :                 YY_FATAL_ERROR( "out of dynamic memory in CalLibraryGram_scan_buffer()" );
    1618             : 
    1619           0 :         b->yy_buf_size = (int) (size - 2);   /* "- 2" to take care of EOB's */
    1620           0 :         b->yy_buf_pos = b->yy_ch_buf = base;
    1621           0 :         b->yy_is_our_buffer = 0;
    1622           0 :         b->yy_input_file = NULL;
    1623           0 :         b->yy_n_chars = b->yy_buf_size;
    1624           0 :         b->yy_is_interactive = 0;
    1625           0 :         b->yy_at_bol = 1;
    1626           0 :         b->yy_fill_buffer = 0;
    1627           0 :         b->yy_buffer_status = YY_BUFFER_NEW;
    1628             : 
    1629           0 :         CalLibraryGram_switch_to_buffer(b  );
    1630             : 
    1631           0 :         return b;
    1632             : }
    1633             : 
    1634             : /** Setup the input buffer state to scan a string. The next call to CalLibraryGramlex() will
    1635             :  * scan from a @e copy of @a str.
    1636             :  * @param yystr a NUL-terminated string to scan
    1637             :  * 
    1638             :  * @return the newly allocated buffer state object.
    1639             :  * @note If you want to scan bytes that may contain NUL values, then use
    1640             :  *       CalLibraryGram_scan_bytes() instead.
    1641             :  */
    1642           0 : YY_BUFFER_STATE CalLibraryGram_scan_string (yyconst char * yystr )
    1643             : {
    1644             :     
    1645           0 :         return CalLibraryGram_scan_bytes(yystr,(int) strlen(yystr) );
    1646             : }
    1647             : 
    1648             : /** Setup the input buffer state to scan the given bytes. The next call to CalLibraryGramlex() will
    1649             :  * scan from a @e copy of @a bytes.
    1650             :  * @param yybytes the byte buffer to scan
    1651             :  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
    1652             :  * 
    1653             :  * @return the newly allocated buffer state object.
    1654             :  */
    1655           0 : YY_BUFFER_STATE CalLibraryGram_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
    1656             : {
    1657             :         YY_BUFFER_STATE b;
    1658             :         char *buf;
    1659             :         yy_size_t n;
    1660             :         int i;
    1661             :     
    1662             :         /* Get memory for full buffer, including space for trailing EOB's. */
    1663           0 :         n = (yy_size_t) (_yybytes_len + 2);
    1664           0 :         buf = (char *) CalLibraryGramalloc(n  );
    1665           0 :         if ( ! buf )
    1666           0 :                 YY_FATAL_ERROR( "out of dynamic memory in CalLibraryGram_scan_bytes()" );
    1667             : 
    1668           0 :         for ( i = 0; i < _yybytes_len; ++i )
    1669           0 :                 buf[i] = yybytes[i];
    1670             : 
    1671           0 :         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
    1672             : 
    1673           0 :         b = CalLibraryGram_scan_buffer(buf,n );
    1674           0 :         if ( ! b )
    1675           0 :                 YY_FATAL_ERROR( "bad buffer in CalLibraryGram_scan_bytes()" );
    1676             : 
    1677             :         /* It's okay to grow etc. this buffer, and we should throw it
    1678             :          * away when we're done.
    1679             :          */
    1680           0 :         b->yy_is_our_buffer = 1;
    1681             : 
    1682           0 :         return b;
    1683             : }
    1684             : 
    1685             : #ifndef YY_EXIT_FAILURE
    1686             : #define YY_EXIT_FAILURE 2
    1687             : #endif
    1688             : 
    1689           0 : static void yynoreturn yy_fatal_error (yyconst char* msg )
    1690             : {
    1691           0 :                         (void) fprintf( stderr, "%s\n", msg );
    1692           0 :         exit( YY_EXIT_FAILURE );
    1693             : }
    1694             : 
    1695             : /* Redefine yyless() so it works in section 3 code. */
    1696             : 
    1697             : #undef yyless
    1698             : #define yyless(n) \
    1699             :         do \
    1700             :                 { \
    1701             :                 /* Undo effects of setting up CalLibraryGramtext. */ \
    1702             :         yy_size_t yyless_macro_arg = (n); \
    1703             :         YY_LESS_LINENO(yyless_macro_arg);\
    1704             :                 CalLibraryGramtext[CalLibraryGramleng] = (yy_hold_char); \
    1705             :                 (yy_c_buf_p) = CalLibraryGramtext + yyless_macro_arg; \
    1706             :                 (yy_hold_char) = *(yy_c_buf_p); \
    1707             :                 *(yy_c_buf_p) = '\0'; \
    1708             :                 CalLibraryGramleng = yyless_macro_arg; \
    1709             :                 } \
    1710             :         while ( 0 )
    1711             : 
    1712             : /* Accessor  methods (get/set functions) to struct members. */
    1713             : 
    1714             : /** Get the current line number.
    1715             :  * 
    1716             :  */
    1717           0 : int CalLibraryGramget_lineno  (void)
    1718             : {
    1719             :         
    1720           0 :     return CalLibraryGramlineno;
    1721             : }
    1722             : 
    1723             : /** Get the input stream.
    1724             :  * 
    1725             :  */
    1726           0 : FILE *CalLibraryGramget_in  (void)
    1727             : {
    1728           0 :         return CalLibraryGramin;
    1729             : }
    1730             : 
    1731             : /** Get the output stream.
    1732             :  * 
    1733             :  */
    1734           0 : FILE *CalLibraryGramget_out  (void)
    1735             : {
    1736           0 :         return CalLibraryGramout;
    1737             : }
    1738             : 
    1739             : /** Get the length of the current token.
    1740             :  * 
    1741             :  */
    1742           0 : int CalLibraryGramget_leng  (void)
    1743             : {
    1744           0 :         return CalLibraryGramleng;
    1745             : }
    1746             : 
    1747             : /** Get the current token.
    1748             :  * 
    1749             :  */
    1750             : 
    1751           0 : char *CalLibraryGramget_text  (void)
    1752             : {
    1753           0 :         return CalLibraryGramtext;
    1754             : }
    1755             : 
    1756             : /** Set the current line number.
    1757             :  * @param _line_number line number
    1758             :  * 
    1759             :  */
    1760           0 : void CalLibraryGramset_lineno (int  _line_number )
    1761             : {
    1762             :     
    1763           0 :     CalLibraryGramlineno = _line_number;
    1764           0 : }
    1765             : 
    1766             : /** Set the input stream. This does not discard the current
    1767             :  * input buffer.
    1768             :  * @param _in_str A readable stream.
    1769             :  * 
    1770             :  * @see CalLibraryGram_switch_to_buffer
    1771             :  */
    1772           0 : void CalLibraryGramset_in (FILE *  _in_str )
    1773             : {
    1774           0 :         CalLibraryGramin = _in_str ;
    1775           0 : }
    1776             : 
    1777           0 : void CalLibraryGramset_out (FILE *  _out_str )
    1778             : {
    1779           0 :         CalLibraryGramout = _out_str ;
    1780           0 : }
    1781             : 
    1782           0 : int CalLibraryGramget_debug  (void)
    1783             : {
    1784           0 :         return CalLibraryGram_flex_debug;
    1785             : }
    1786             : 
    1787           0 : void CalLibraryGramset_debug (int  _bdebug )
    1788             : {
    1789           0 :         CalLibraryGram_flex_debug = _bdebug ;
    1790           0 : }
    1791             : 
    1792           0 : static int yy_init_globals (void)
    1793             : {
    1794             :         /* Initialization is the same as for the non-reentrant scanner.
    1795             :      * This function is called from CalLibraryGramlex_destroy(), so don't allocate here.
    1796             :      */
    1797             : 
    1798           0 :     (yy_buffer_stack) = NULL;
    1799           0 :     (yy_buffer_stack_top) = 0;
    1800           0 :     (yy_buffer_stack_max) = 0;
    1801           0 :     (yy_c_buf_p) = NULL;
    1802           0 :     (yy_init) = 0;
    1803           0 :     (yy_start) = 0;
    1804             : 
    1805             : /* Defined in main.c */
    1806             : #ifdef YY_STDINIT
    1807             :     CalLibraryGramin = stdin;
    1808             :     CalLibraryGramout = stdout;
    1809             : #else
    1810           0 :     CalLibraryGramin = NULL;
    1811           0 :     CalLibraryGramout = NULL;
    1812             : #endif
    1813             : 
    1814             :     /* For future reference: Set errno on error, since we are called by
    1815             :      * CalLibraryGramlex_init()
    1816             :      */
    1817           0 :     return 0;
    1818             : }
    1819             : 
    1820             : /* CalLibraryGramlex_destroy is for both reentrant and non-reentrant scanners. */
    1821           0 : int CalLibraryGramlex_destroy  (void)
    1822             : {
    1823             :     
    1824             :     /* Pop the buffer stack, destroying each element. */
    1825           0 :         while(YY_CURRENT_BUFFER){
    1826           0 :                 CalLibraryGram_delete_buffer(YY_CURRENT_BUFFER  );
    1827           0 :                 YY_CURRENT_BUFFER_LVALUE = NULL;
    1828           0 :                 CalLibraryGrampop_buffer_state();
    1829             :         }
    1830             : 
    1831             :         /* Destroy the stack itself. */
    1832           0 :         CalLibraryGramfree((yy_buffer_stack) );
    1833           0 :         (yy_buffer_stack) = NULL;
    1834             : 
    1835             :     /* Reset the globals. This is important in a non-reentrant scanner so the next time
    1836             :      * CalLibraryGramlex() is called, initialization will occur. */
    1837           0 :     yy_init_globals( );
    1838             : 
    1839           0 :     return 0;
    1840             : }
    1841             : 
    1842             : /*
    1843             :  * Internal utility routines.
    1844             :  */
    1845             : 
    1846             : #ifndef yytext_ptr
    1847             : static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
    1848             : {
    1849             :                 
    1850             :         int i;
    1851             :         for ( i = 0; i < n; ++i )
    1852             :                 s1[i] = s2[i];
    1853             : }
    1854             : #endif
    1855             : 
    1856             : #ifdef YY_NEED_STRLEN
    1857             : static int yy_flex_strlen (yyconst char * s )
    1858             : {
    1859             :         int n;
    1860             :         for ( n = 0; s[n]; ++n )
    1861             :                 ;
    1862             : 
    1863             :         return n;
    1864             : }
    1865             : #endif
    1866             : 
    1867           6 : void *CalLibraryGramalloc (yy_size_t  size )
    1868             : {
    1869           6 :                         return malloc(size);
    1870             : }
    1871             : 
    1872           0 : void *CalLibraryGramrealloc  (void * ptr, yy_size_t  size )
    1873             : {
    1874             :                 
    1875             :         /* The cast to (char *) in the following accommodates both
    1876             :          * implementations that use char* generic pointers, and those
    1877             :          * that use void* generic pointers.  It works with the latter
    1878             :          * because both ANSI C and C++ allow castless assignment from
    1879             :          * any pointer type to void*, and deal with argument conversions
    1880             :          * as though doing an assignment.
    1881             :          */
    1882           0 :         return realloc(ptr, size);
    1883             : }
    1884             : 
    1885           0 : void CalLibraryGramfree (void * ptr )
    1886             : {
    1887           0 :                         free( (char *) ptr );   /* see CalLibraryGramrealloc() for (char *) cast */
    1888           0 : }
    1889             : 
    1890             : #define YYTABLES_NAME "yytables"
    1891             : 
    1892             : #line 76 "CalLibrary/CalLibraryGram.ll"

Generated by: LCOV version 1.16