Main Page | Data Structures | Directories | File List | Data Fields | Globals

cframe_lexer.c

Go to the documentation of this file.
00001 #line 2 "src/cframe_lexer.c"
00002 
00003 #line 4 "src/cframe_lexer.c"
00004 
00005 #define  YY_INT_ALIGNED short int
00006 
00007 /* A lexical scanner generated by flex */
00008 
00009 #define FLEX_SCANNER
00010 #define YY_FLEX_MAJOR_VERSION 2
00011 #define YY_FLEX_MINOR_VERSION 5
00012 #define YY_FLEX_SUBMINOR_VERSION 33
00013 #if YY_FLEX_SUBMINOR_VERSION > 0
00014 #define FLEX_BETA
00015 #endif
00016 
00017 /* First, we deal with  platform-specific or compiler-specific issues. */
00018 
00019 /* begin standard C headers. */
00020 #include <stdio.h>
00021 #include <string.h>
00022 #include <errno.h>
00023 #include <stdlib.h>
00024 
00025 /* end standard C headers. */
00026 
00027 /* flex integer type definitions */
00028 
00029 #ifndef FLEXINT_H
00030 #define FLEXINT_H
00031 
00032 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
00033 
00034 #if __STDC_VERSION__ >= 199901L
00035 
00036 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
00037  * if you want the limit (max/min) macros for int types. 
00038  */
00039 #ifndef __STDC_LIMIT_MACROS
00040 #define __STDC_LIMIT_MACROS 1
00041 #endif
00042 
00043 #include <inttypes.h>
00044 typedef int8_t flex_int8_t;
00045 typedef uint8_t flex_uint8_t;
00046 typedef int16_t flex_int16_t;
00047 typedef uint16_t flex_uint16_t;
00048 typedef int32_t flex_int32_t;
00049 typedef uint32_t flex_uint32_t;
00050 #else
00051 typedef signed char flex_int8_t;
00052 typedef short int flex_int16_t;
00053 typedef int flex_int32_t;
00054 typedef unsigned char flex_uint8_t; 
00055 typedef unsigned short int flex_uint16_t;
00056 typedef unsigned int flex_uint32_t;
00057 #endif /* ! C99 */
00058 
00059 /* Limits of integral types. */
00060 #ifndef INT8_MIN
00061 #define INT8_MIN               (-128)
00062 #endif
00063 #ifndef INT16_MIN
00064 #define INT16_MIN              (-32767-1)
00065 #endif
00066 #ifndef INT32_MIN
00067 #define INT32_MIN              (-2147483647-1)
00068 #endif
00069 #ifndef INT8_MAX
00070 #define INT8_MAX               (127)
00071 #endif
00072 #ifndef INT16_MAX
00073 #define INT16_MAX              (32767)
00074 #endif
00075 #ifndef INT32_MAX
00076 #define INT32_MAX              (2147483647)
00077 #endif
00078 #ifndef UINT8_MAX
00079 #define UINT8_MAX              (255U)
00080 #endif
00081 #ifndef UINT16_MAX
00082 #define UINT16_MAX             (65535U)
00083 #endif
00084 #ifndef UINT32_MAX
00085 #define UINT32_MAX             (4294967295U)
00086 #endif
00087 
00088 #endif /* ! FLEXINT_H */
00089 
00090 #ifdef __cplusplus
00091 
00092 /* The "const" storage-class-modifier is valid. */
00093 #define YY_USE_CONST
00094 
00095 #else   /* ! __cplusplus */
00096 
00097 #if __STDC__
00098 
00099 #define YY_USE_CONST
00100 
00101 #endif  /* __STDC__ */
00102 #endif  /* ! __cplusplus */
00103 
00104 #ifdef YY_USE_CONST
00105 #define yyconst const
00106 #else
00107 #define yyconst
00108 #endif
00109 
00110 /* Returned upon end-of-file. */
00111 #define YY_NULL 0
00112 
00113 /* Promotes a possibly negative, possibly signed char to an unsigned
00114  * integer for use as an array index.  If the signed char is negative,
00115  * we want to instead treat it as an 8-bit unsigned char, hence the
00116  * double cast.
00117  */
00118 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
00119 
00120 /* Enter a start condition.  This macro really ought to take a parameter,
00121  * but we do it the disgusting crufty way forced on us by the ()-less
00122  * definition of BEGIN.
00123  */
00124 #define BEGIN (yy_start) = 1 + 2 *
00125 
00126 /* Translate the current start state into a value that can be later handed
00127  * to BEGIN to return to the state.  The YYSTATE alias is for lex
00128  * compatibility.
00129  */
00130 #define YY_START (((yy_start) - 1) / 2)
00131 #define YYSTATE YY_START
00132 
00133 /* Action number for EOF rule of a given start state. */
00134 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00135 
00136 /* Special action meaning "start processing a new file". */
00137 #define YY_NEW_FILE cframerestart(cframein  )
00138 
00139 #define YY_END_OF_BUFFER_CHAR 0
00140 
00141 /* Size of default input buffer. */
00142 #ifndef YY_BUF_SIZE
00143 #define YY_BUF_SIZE 16384
00144 #endif
00145 
00146 /* The state buf must be large enough to hold one state per character in the main buffer.
00147  */
00148 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
00149 
00150 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
00151 #define YY_TYPEDEF_YY_BUFFER_STATE
00152 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00153 #endif
00154 
00155 extern int cframeleng;
00156 
00157 extern FILE *cframein, *cframeout;
00158 
00159 #define EOB_ACT_CONTINUE_SCAN 0
00160 #define EOB_ACT_END_OF_FILE 1
00161 #define EOB_ACT_LAST_MATCH 2
00162 
00163     #define YY_LESS_LINENO(n)
00164     
00165 /* Return all but the first "n" matched characters back to the input stream. */
00166 #define yyless(n) \
00167     do \
00168         { \
00169         /* Undo effects of setting up cframetext. */ \
00170         int yyless_macro_arg = (n); \
00171         YY_LESS_LINENO(yyless_macro_arg);\
00172         *yy_cp = (yy_hold_char); \
00173         YY_RESTORE_YY_MORE_OFFSET \
00174         (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
00175         YY_DO_BEFORE_ACTION; /* set up cframetext again */ \
00176         } \
00177     while ( 0 )
00178 
00179 #define unput(c) yyunput( c, (yytext_ptr)  )
00180 
00181 /* The following is because we cannot portably get our hands on size_t
00182  * (without autoconf's help, which isn't available because we want
00183  * flex-generated scanners to compile on their own).
00184  */
00185 
00186 #ifndef YY_TYPEDEF_YY_SIZE_T
00187 #define YY_TYPEDEF_YY_SIZE_T
00188 typedef unsigned int yy_size_t;
00189 #endif
00190 
00191 #ifndef YY_STRUCT_YY_BUFFER_STATE
00192 #define YY_STRUCT_YY_BUFFER_STATE
00193 struct yy_buffer_state
00194     {
00195     FILE *yy_input_file;
00196 
00197     char *yy_ch_buf;        /* input buffer */
00198     char *yy_buf_pos;       /* current position in input buffer */
00199 
00200     /* Size of input buffer in bytes, not including room for EOB
00201      * characters.
00202      */
00203     yy_size_t yy_buf_size;
00204 
00205     /* Number of characters read into yy_ch_buf, not including EOB
00206      * characters.
00207      */
00208     int yy_n_chars;
00209 
00210     /* Whether we "own" the buffer - i.e., we know we created it,
00211      * and can realloc() it to grow it, and should free() it to
00212      * delete it.
00213      */
00214     int yy_is_our_buffer;
00215 
00216     /* Whether this is an "interactive" input source; if so, and
00217      * if we're using stdio for input, then we want to use getc()
00218      * instead of fread(), to make sure we stop fetching input after
00219      * each newline.
00220      */
00221     int yy_is_interactive;
00222 
00223     /* Whether we're considered to be at the beginning of a line.
00224      * If so, '^' rules will be active on the next match, otherwise
00225      * not.
00226      */
00227     int yy_at_bol;
00228 
00229     int yy_bs_lineno; 
00230     int yy_bs_column; 
00232     /* Whether to try to fill the input buffer when we reach the
00233      * end of it.
00234      */
00235     int yy_fill_buffer;
00236 
00237     int yy_buffer_status;
00238 
00239 #define YY_BUFFER_NEW 0
00240 #define YY_BUFFER_NORMAL 1
00241     /* When an EOF's been seen but there's still some text to process
00242      * then we mark the buffer as YY_EOF_PENDING, to indicate that we
00243      * shouldn't try reading from the input source any more.  We might
00244      * still have a bunch of tokens to match, though, because of
00245      * possible backing-up.
00246      *
00247      * When we actually see the EOF, we change the status to "new"
00248      * (via cframerestart()), so that the user can continue scanning by
00249      * just pointing cframein at a new input file.
00250      */
00251 #define YY_BUFFER_EOF_PENDING 2
00252 
00253     };
00254 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
00255 
00256 /* Stack of input buffers. */
00257 static size_t yy_buffer_stack_top = 0; 
00258 static size_t yy_buffer_stack_max = 0; 
00259 static YY_BUFFER_STATE * yy_buffer_stack = 0; 
00261 /* We provide macros for accessing buffer states in case in the
00262  * future we want to put the buffer states in a more general
00263  * "scanner state".
00264  *
00265  * Returns the top of the stack, or NULL.
00266  */
00267 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
00268                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
00269                           : NULL)
00270 
00271 /* Same as previous macro, but useful when we know that the buffer stack is not
00272  * NULL or when we need an lvalue. For internal use only.
00273  */
00274 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
00275 
00276 /* yy_hold_char holds the character lost when cframetext is formed. */
00277 static char yy_hold_char;
00278 static int yy_n_chars;      /* number of characters read into yy_ch_buf */
00279 int cframeleng;
00280 
00281 /* Points to current character in buffer. */
00282 static char *yy_c_buf_p = (char *) 0;
00283 static int yy_init = 0;     /* whether we need to initialize */
00284 static int yy_start = 0;    /* start state number */
00285 
00286 /* Flag which is used to allow cframewrap()'s to do buffer switches
00287  * instead of setting up a fresh cframein.  A bit of a hack ...
00288  */
00289 static int yy_did_buffer_switch_on_eof;
00290 
00291 void cframerestart (FILE *input_file  );
00292 void cframe_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
00293 YY_BUFFER_STATE cframe_create_buffer (FILE *file,int size  );
00294 void cframe_delete_buffer (YY_BUFFER_STATE b  );
00295 void cframe_flush_buffer (YY_BUFFER_STATE b  );
00296 void cframepush_buffer_state (YY_BUFFER_STATE new_buffer  );
00297 void cframepop_buffer_state (void );
00298 
00299 static void cframeensure_buffer_stack (void );
00300 static void cframe_load_buffer_state (void );
00301 static void cframe_init_buffer (YY_BUFFER_STATE b,FILE *file  );
00302 
00303 #define YY_FLUSH_BUFFER cframe_flush_buffer(YY_CURRENT_BUFFER )
00304 
00305 YY_BUFFER_STATE cframe_scan_buffer (char *base,yy_size_t size  );
00306 YY_BUFFER_STATE cframe_scan_string (yyconst char *yy_str  );
00307 YY_BUFFER_STATE cframe_scan_bytes (yyconst char *bytes,int len  );
00308 
00309 void *cframealloc (yy_size_t  );
00310 void *cframerealloc (void *,yy_size_t  );
00311 void cframefree (void *  );
00312 
00313 #define yy_new_buffer cframe_create_buffer
00314 
00315 #define yy_set_interactive(is_interactive) \
00316     { \
00317     if ( ! YY_CURRENT_BUFFER ){ \
00318         cframeensure_buffer_stack (); \
00319         YY_CURRENT_BUFFER_LVALUE =    \
00320             cframe_create_buffer(cframein,YY_BUF_SIZE ); \
00321     } \
00322     YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
00323     }
00324 
00325 #define yy_set_bol(at_bol) \
00326     { \
00327     if ( ! YY_CURRENT_BUFFER ){\
00328         cframeensure_buffer_stack (); \
00329         YY_CURRENT_BUFFER_LVALUE =    \
00330             cframe_create_buffer(cframein,YY_BUF_SIZE ); \
00331     } \
00332     YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
00333     }
00334 
00335 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
00336 
00337 /* Begin user sect3 */
00338 
00339 typedef unsigned char YY_CHAR;
00340 
00341 FILE *cframein = (FILE *) 0, *cframeout = (FILE *) 0;
00342 
00343 typedef int yy_state_type;
00344 
00345 extern int cframelineno;
00346 
00347 int cframelineno = 1;
00348 
00349 extern char *cframetext;
00350 #define yytext_ptr cframetext
00351 static yyconst flex_int16_t yy_nxt[][7] =
00352     {
00353     {
00354         0,    0,    0,    0,    0,    0,    0
00355     },
00356 
00357     {
00358         3,    4,    5,    6,    7,    8,    9
00359     },
00360 
00361     {
00362         3,    4,    5,    6,    7,    8,    9
00363     },
00364 
00365     {
00366        -3,   -3,   -3,   -3,   -3,   -3,   -3
00367     },
00368 
00369     {
00370         3,   10,   -4,   -4,   -4,   -4,   -4
00371     },
00372 
00373     {
00374         3,   -5,   11,   -5,   -5,   -5,   -5
00375     },
00376 
00377     {
00378         3,   -6,   -6,   -6,   -6,   -6,   -6
00379     },
00380 
00381     {
00382         3,   -7,   -7,   -7,   -7,   -7,   -7
00383     },
00384 
00385     {
00386         3,   -8,   -8,   -8,   -8,   -8,   -8
00387     },
00388 
00389     {
00390         3,   -9,   -9,   -9,   -9,   -9,   -9
00391 
00392     },
00393 
00394     {
00395         3,   10,  -10,  -10,  -10,  -10,  -10
00396     },
00397 
00398     {
00399         3,  -11,   11,  -11,  -11,  -11,  -11
00400     },
00401 
00402     } ;
00403 
00404 static yy_state_type yy_get_previous_state (void );
00405 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
00406 static int yy_get_next_buffer (void );
00407 static void yy_fatal_error (yyconst char msg[]  );
00408 
00409 /* Done after the current pattern has been matched and before the
00410  * corresponding action - sets up cframetext.
00411  */
00412 #define YY_DO_BEFORE_ACTION \
00413     (yytext_ptr) = yy_bp; \
00414     cframeleng = (size_t) (yy_cp - yy_bp); \
00415     (yy_hold_char) = *yy_cp; \
00416     *yy_cp = '\0'; \
00417     (yy_c_buf_p) = yy_cp;
00418 
00419 #define YY_NUM_RULES 7
00420 #define YY_END_OF_BUFFER 8
00421 /* This struct is not used in this scanner,
00422    but its presence is necessary. */
00423 struct yy_trans_info
00424     {
00425     flex_int32_t yy_verify;
00426     flex_int32_t yy_nxt;
00427     };
00428 static yyconst flex_int16_t yy_accept[12] =
00429     {   0,
00430         0,    0,    8,    5,    6,    4,    3,    1,    2,    5,
00431         6
00432     } ;
00433 
00434 static yyconst flex_int32_t yy_ec[256] =
00435     {   0,
00436         1,    1,    1,    1,    1,    1,    1,    1,    2,    2,
00437         2,    2,    2,    1,    1,    1,    1,    1,    1,    1,
00438         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00439         1,    2,    1,    1,    1,    1,    1,    1,    1,    1,
00440         1,    1,    1,    3,    1,    1,    1,    1,    1,    1,
00441         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00442         4,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00443         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00444         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00445         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00446 
00447         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00448         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00449         1,    1,    5,    1,    6,    1,    1,    1,    1,    1,
00450         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00451         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00452         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00453         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00454         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00455         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00456         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00457 
00458         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00459         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00460         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00461         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00462         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00463         1,    1,    1,    1,    1
00464     } ;
00465 
00466 extern int cframe_flex_debug;
00467 int cframe_flex_debug = 0;
00468 
00469 /* The intent behind this definition is that it'll catch
00470  * any uses of REJECT which flex missed.
00471  */
00472 #define REJECT reject_used_but_not_detected
00473 #define yymore() yymore_used_but_not_detected
00474 #define YY_MORE_ADJ 0
00475 #define YY_RESTORE_YY_MORE_OFFSET
00476 char *cframetext;
00477 #line 1 "src/cframe_lexer.l"
00478 #line 2 "src/cframe_lexer.l"
00479 #include <config.h>
00480 
00481 #include "cframe_parser.h"
00482 #line 483 "src/cframe_lexer.c"
00483 
00484 #define INITIAL 0
00485 
00486 #ifndef YY_NO_UNISTD_H
00487 /* Special case for "unistd.h", since it is non-ANSI. We include it way
00488  * down here because we want the user's section 1 to have been scanned first.
00489  * The user has a chance to override it with an option.
00490  */
00491 #include <unistd.h>
00492 #endif
00493 
00494 #ifndef YY_EXTRA_TYPE
00495 #define YY_EXTRA_TYPE void *
00496 #endif
00497 
00498 static int yy_init_globals (void );
00499 
00500 /* Macros after this point can all be overridden by user definitions in
00501  * section 1.
00502  */
00503 
00504 #ifndef YY_SKIP_YYWRAP
00505 #ifdef __cplusplus
00506 extern "C" int cframewrap (void );
00507 #else
00508 extern int cframewrap (void );
00509 #endif
00510 #endif
00511 
00512     static void yyunput (int c,char *buf_ptr  );
00513     
00514 #ifndef yytext_ptr
00515 static void yy_flex_strncpy (char *,yyconst char *,int );
00516 #endif
00517 
00518 #ifdef YY_NEED_STRLEN
00519 static int yy_flex_strlen (yyconst char * );
00520 #endif
00521 
00522 #ifndef YY_NO_INPUT
00523 
00524 #ifdef __cplusplus
00525 static int yyinput (void );
00526 #else
00527 static int input (void );
00528 #endif
00529 
00530 #endif
00531 
00532 /* Amount of stuff to slurp up with each read. */
00533 #ifndef YY_READ_BUF_SIZE
00534 #define YY_READ_BUF_SIZE 8192
00535 #endif
00536 
00537 /* Copy whatever the last rule matched to the standard output. */
00538 #ifndef ECHO
00539 /* This used to be an fputs(), but since the string might contain NUL's,
00540  * we now use fwrite().
00541  */
00542 #define ECHO (void) fwrite( cframetext, cframeleng, 1, cframeout )
00543 #endif
00544 
00545 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
00546  * is returned in "result".
00547  */
00548 #ifndef YY_INPUT
00549 #define YY_INPUT(buf,result,max_size) \
00550     errno=0; \
00551     while ( (result = read( fileno(cframein), (char *) buf, max_size )) < 0 ) \
00552     { \
00553         if( errno != EINTR) \
00554         { \
00555             YY_FATAL_ERROR( "input in flex scanner failed" ); \
00556             break; \
00557         } \
00558         errno=0; \
00559         clearerr(cframein); \
00560     }\
00561 \
00562 
00563 #endif
00564 
00565 /* No semi-colon after return; correct usage is to write "yyterminate();" -
00566  * we don't want an extra ';' after the "return" because that will cause
00567  * some compilers to complain about unreachable statements.
00568  */
00569 #ifndef yyterminate
00570 #define yyterminate() return YY_NULL
00571 #endif
00572 
00573 /* Number of entries by which start-condition stack grows. */
00574 #ifndef YY_START_STACK_INCR
00575 #define YY_START_STACK_INCR 25
00576 #endif
00577 
00578 /* Report a fatal error. */
00579 #ifndef YY_FATAL_ERROR
00580 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
00581 #endif
00582 
00583 /* end tables serialization structures and prototypes */
00584 
00585 /* Default declaration of generated scanner - a define so the user can
00586  * easily add parameters.
00587  */
00588 #ifndef YY_DECL
00589 #define YY_DECL_IS_OURS 1
00590 
00591 extern int cframelex (void);
00592 
00593 #define YY_DECL int cframelex (void)
00594 #endif /* !YY_DECL */
00595 
00596 /* Code executed at the beginning of each rule, after cframetext and cframeleng
00597  * have been set up.
00598  */
00599 #ifndef YY_USER_ACTION
00600 #define YY_USER_ACTION
00601 #endif
00602 
00603 /* Code executed at the end of each rule. */
00604 #ifndef YY_BREAK
00605 #define YY_BREAK break;
00606 #endif
00607 
00608 #define YY_RULE_SETUP \
00609     YY_USER_ACTION
00610 
00613 YY_DECL
00614 {
00615     register yy_state_type yy_current_state;
00616     register char *yy_cp, *yy_bp;
00617     register int yy_act;
00618     
00619 #line 6 "src/cframe_lexer.l"
00620 
00621 #line 622 "src/cframe_lexer.c"
00622 
00623     if ( !(yy_init) )
00624         {
00625         (yy_init) = 1;
00626 
00627 #ifdef YY_USER_INIT
00628         YY_USER_INIT;
00629 #endif
00630 
00631         if ( ! (yy_start) )
00632             (yy_start) = 1; /* first start state */
00633 
00634         if ( ! cframein )
00635             cframein = stdin;
00636 
00637         if ( ! cframeout )
00638             cframeout = stdout;
00639 
00640         if ( ! YY_CURRENT_BUFFER ) {
00641             cframeensure_buffer_stack ();
00642             YY_CURRENT_BUFFER_LVALUE =
00643                 cframe_create_buffer(cframein,YY_BUF_SIZE );
00644         }
00645 
00646         cframe_load_buffer_state( );
00647         }
00648 
00649     while ( 1 )     /* loops until end-of-file is reached */
00650         {
00651         yy_cp = (yy_c_buf_p);
00652 
00653         /* Support of cframetext. */
00654         *yy_cp = (yy_hold_char);
00655 
00656         /* yy_bp points to the position in yy_ch_buf of the start of
00657          * the current run.
00658          */
00659         yy_bp = yy_cp;
00660 
00661         yy_current_state = (yy_start);
00662 yy_match:
00663         while ( (yy_current_state = yy_nxt[yy_current_state][ yy_ec[YY_SC_TO_UI(*yy_cp)]  ]) > 0 )
00664             ++yy_cp;
00665 
00666         yy_current_state = -yy_current_state;
00667 
00668 yy_find_action:
00669         yy_act = yy_accept[yy_current_state];
00670 
00671         YY_DO_BEFORE_ACTION;
00672 
00673 do_action:  /* This label is used only to access EOF actions. */
00674 
00675         switch ( yy_act )
00676     { /* beginning of action switch */
00677 case 1:
00678 YY_RULE_SETUP
00679 #line 7 "src/cframe_lexer.l"
00680 { return LBRACE; }
00681     YY_BREAK
00682 case 2:
00683 YY_RULE_SETUP
00684 #line 8 "src/cframe_lexer.l"
00685 { return RBRACE; }
00686     YY_BREAK
00687 case 3:
00688 YY_RULE_SETUP
00689 #line 9 "src/cframe_lexer.l"
00690 { return EQ; }
00691     YY_BREAK
00692 case 4:
00693 YY_RULE_SETUP
00694 #line 10 "src/cframe_lexer.l"
00695 { return COMMA; }
00696     YY_BREAK
00697 case 5:
00698 YY_RULE_SETUP
00699 #line 11 "src/cframe_lexer.l"
00700 { cframelval.string = strdup(cframetext); return STRING; }
00701     YY_BREAK
00702 case 6:
00703 /* rule 6 can match eol */
00704 YY_RULE_SETUP
00705 #line 12 "src/cframe_lexer.l"
00706 { /* nothing */ }
00707     YY_BREAK
00708 case 7:
00709 YY_RULE_SETUP
00710 #line 13 "src/cframe_lexer.l"
00711 ECHO;
00712     YY_BREAK
00713 #line 714 "src/cframe_lexer.c"
00714             case YY_STATE_EOF(INITIAL):
00715                 yyterminate();
00716 
00717     case YY_END_OF_BUFFER:
00718         {
00719         /* Amount of text matched not including the EOB char. */
00720         int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
00721 
00722         /* Undo the effects of YY_DO_BEFORE_ACTION. */
00723         *yy_cp = (yy_hold_char);
00724         YY_RESTORE_YY_MORE_OFFSET
00725 
00726         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
00727             {
00728             /* We're scanning a new file or input source.  It's
00729              * possible that this happened because the user
00730              * just pointed cframein at a new source and called
00731              * cframelex().  If so, then we have to assure
00732              * consistency between YY_CURRENT_BUFFER and our
00733              * globals.  Here is the right place to do so, because
00734              * this is the first action (other than possibly a
00735              * back-up) that will match for the new input source.
00736              */
00737             (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
00738             YY_CURRENT_BUFFER_LVALUE->yy_input_file = cframein;
00739             YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
00740             }
00741 
00742         /* Note that here we test for yy_c_buf_p "<=" to the position
00743          * of the first EOB in the buffer, since yy_c_buf_p will
00744          * already have been incremented past the NUL character
00745          * (since all states make transitions on EOB to the
00746          * end-of-buffer state).  Contrast this with the test
00747          * in input().
00748          */
00749         if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
00750             { /* This was really a NUL. */
00751             yy_state_type yy_next_state;
00752 
00753             (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
00754 
00755             yy_current_state = yy_get_previous_state(  );
00756 
00757             /* Okay, we're now positioned to make the NUL
00758              * transition.  We couldn't have
00759              * yy_get_previous_state() go ahead and do it
00760              * for us because it doesn't know how to deal
00761              * with the possibility of jamming (and we don't
00762              * want to build jamming into it because then it
00763              * will run more slowly).
00764              */
00765 
00766             yy_next_state = yy_try_NUL_trans( yy_current_state );
00767 
00768             yy_bp = (yytext_ptr) + YY_MORE_ADJ;
00769 
00770             if ( yy_next_state )
00771                 {
00772                 /* Consume the NUL. */
00773                 yy_cp = ++(yy_c_buf_p);
00774                 yy_current_state = yy_next_state;
00775                 goto yy_match;
00776                 }
00777 
00778             else
00779                 {
00780                 yy_cp = (yy_c_buf_p);
00781                 goto yy_find_action;
00782                 }
00783             }
00784 
00785         else switch ( yy_get_next_buffer(  ) )
00786             {
00787             case EOB_ACT_END_OF_FILE:
00788                 {
00789                 (yy_did_buffer_switch_on_eof) = 0;
00790 
00791                 if ( cframewrap( ) )
00792                     {
00793                     /* Note: because we've taken care in
00794                      * yy_get_next_buffer() to have set up
00795                      * cframetext, we can now set up
00796                      * yy_c_buf_p so that if some total
00797                      * hoser (like flex itself) wants to
00798                      * call the scanner after we return the
00799                      * YY_NULL, it'll still work - another
00800                      * YY_NULL will get returned.
00801                      */
00802                     (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
00803 
00804                     yy_act = YY_STATE_EOF(YY_START);
00805                     goto do_action;
00806                     }
00807 
00808                 else
00809                     {
00810                     if ( ! (yy_did_buffer_switch_on_eof) )
00811                         YY_NEW_FILE;
00812                     }
00813                 break;
00814                 }
00815 
00816             case EOB_ACT_CONTINUE_SCAN:
00817                 (yy_c_buf_p) =
00818                     (yytext_ptr) + yy_amount_of_matched_text;
00819 
00820                 yy_current_state = yy_get_previous_state(  );
00821 
00822                 yy_cp = (yy_c_buf_p);
00823                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
00824                 goto yy_match;
00825 
00826             case EOB_ACT_LAST_MATCH:
00827                 (yy_c_buf_p) =
00828                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
00829 
00830                 yy_current_state = yy_get_previous_state(  );
00831 
00832                 yy_cp = (yy_c_buf_p);
00833                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
00834                 goto yy_find_action;
00835             }
00836         break;
00837         }
00838 
00839     default:
00840         YY_FATAL_ERROR(
00841             "fatal flex scanner internal error--no action found" );
00842     } /* end of action switch */
00843         } /* end of scanning one token */
00844 } /* end of cframelex */
00845 
00846 /* yy_get_next_buffer - try to read in a new buffer
00847  *
00848  * Returns a code representing an action:
00849  *  EOB_ACT_LAST_MATCH -
00850  *  EOB_ACT_CONTINUE_SCAN - continue scanning from current position
00851  *  EOB_ACT_END_OF_FILE - end of file
00852  */
00853 static int yy_get_next_buffer (void)
00854 {
00855         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
00856     register char *source = (yytext_ptr);
00857     register int number_to_move, i;
00858     int ret_val;
00859 
00860     if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
00861         YY_FATAL_ERROR(
00862         "fatal flex scanner internal error--end of buffer missed" );
00863 
00864     if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
00865         { /* Don't try to fill the buffer, so this is an EOF. */
00866         if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
00867             {
00868             /* We matched a single character, the EOB, so
00869              * treat this as a final EOF.
00870              */
00871             return EOB_ACT_END_OF_FILE;
00872             }
00873 
00874         else
00875             {
00876             /* We matched some text prior to the EOB, first
00877              * process it.
00878              */
00879             return EOB_ACT_LAST_MATCH;
00880             }
00881         }
00882 
00883     /* Try to read more data. */
00884 
00885     /* First move last chars to start of buffer. */
00886     number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
00887 
00888     for ( i = 0; i < number_to_move; ++i )
00889         *(dest++) = *(source++);
00890 
00891     if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
00892         /* don't do the read, it's not guaranteed to return an EOF,
00893          * just force an EOF
00894          */
00895         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
00896 
00897     else
00898         {
00899             int num_to_read =
00900             YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
00901 
00902         while ( num_to_read <= 0 )
00903             { /* Not enough room in the buffer - grow it. */
00904 
00905             /* just a shorter name for the current buffer */
00906             YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
00907 
00908             int yy_c_buf_p_offset =
00909                 (int) ((yy_c_buf_p) - b->yy_ch_buf);
00910 
00911             if ( b->yy_is_our_buffer )
00912                 {
00913                 int new_size = b->yy_buf_size * 2;
00914 
00915                 if ( new_size <= 0 )
00916                     b->yy_buf_size += b->yy_buf_size / 8;
00917                 else
00918                     b->yy_buf_size *= 2;
00919 
00920                 b->yy_ch_buf = (char *)
00921                     /* Include room in for 2 EOB chars. */
00922                     cframerealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
00923                 }
00924             else
00925                 /* Can't grow it, we don't own it. */
00926                 b->yy_ch_buf = 0;
00927 
00928             if ( ! b->yy_ch_buf )
00929                 YY_FATAL_ERROR(
00930                 "fatal error - scanner input buffer overflow" );
00931 
00932             (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
00933 
00934             num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
00935                         number_to_move - 1;
00936 
00937             }
00938 
00939         if ( num_to_read > YY_READ_BUF_SIZE )
00940             num_to_read = YY_READ_BUF_SIZE;
00941 
00942         /* Read in more data. */
00943         YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
00944             (yy_n_chars), num_to_read );
00945 
00946         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
00947         }
00948 
00949     if ( (yy_n_chars) == 0 )
00950         {
00951         if ( number_to_move == YY_MORE_ADJ )
00952             {
00953             ret_val = EOB_ACT_END_OF_FILE;
00954             cframerestart(cframein  );
00955             }
00956 
00957         else
00958             {
00959             ret_val = EOB_ACT_LAST_MATCH;
00960             YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
00961                 YY_BUFFER_EOF_PENDING;
00962             }
00963         }
00964 
00965     else
00966         ret_val = EOB_ACT_CONTINUE_SCAN;
00967 
00968     (yy_n_chars) += number_to_move;
00969     YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
00970     YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
00971 
00972     (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
00973 
00974     return ret_val;
00975 }
00976 
00977 /* yy_get_previous_state - get the state just before the EOB char was reached */
00978 
00979     static yy_state_type yy_get_previous_state (void)
00980 {
00981     register yy_state_type yy_current_state;
00982     register char *yy_cp;
00983     
00984     yy_current_state = (yy_start);
00985 
00986     for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
00987         {
00988         yy_current_state = yy_nxt[yy_current_state][(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1)];
00989         }
00990 
00991     return yy_current_state;
00992 }
00993 
00994 /* yy_try_NUL_trans - try to make a transition on the NUL character
00995  *
00996  * synopsis
00997  *  next_state = yy_try_NUL_trans( current_state );
00998  */
00999     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
01000 {
01001     register int yy_is_jam;
01002     
01003     yy_current_state = yy_nxt[yy_current_state][1];
01004     yy_is_jam = (yy_current_state <= 0);
01005 
01006     return yy_is_jam ? 0 : yy_current_state;
01007 }
01008 
01009     static void yyunput (int c, register char * yy_bp )
01010 {
01011     register char *yy_cp;
01012     
01013     yy_cp = (yy_c_buf_p);
01014 
01015     /* undo effects of setting up cframetext */
01016     *yy_cp = (yy_hold_char);
01017 
01018     if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
01019         { /* need to shift things up to make room */
01020         /* +2 for EOB chars. */
01021         register int number_to_move = (yy_n_chars) + 2;
01022         register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
01023                     YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
01024         register char *source =
01025                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
01026 
01027         while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
01028             *--dest = *--source;
01029 
01030         yy_cp += (int) (dest - source);
01031         yy_bp += (int) (dest - source);
01032         YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
01033             (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
01034 
01035         if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
01036             YY_FATAL_ERROR( "flex scanner push-back overflow" );
01037         }
01038 
01039     *--yy_cp = (char) c;
01040 
01041     (yytext_ptr) = yy_bp;
01042     (yy_hold_char) = *yy_cp;
01043     (yy_c_buf_p) = yy_cp;
01044 }
01045 
01046 #ifndef YY_NO_INPUT
01047 #ifdef __cplusplus
01048     static int yyinput (void)
01049 #else
01050     static int input  (void)
01051 #endif
01052 
01053 {
01054     int c;
01055     
01056     *(yy_c_buf_p) = (yy_hold_char);
01057 
01058     if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
01059         {
01060         /* yy_c_buf_p now points to the character we want to return.
01061          * If this occurs *before* the EOB characters, then it's a
01062          * valid NUL; if not, then we've hit the end of the buffer.
01063          */
01064         if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
01065             /* This was really a NUL. */
01066             *(yy_c_buf_p) = '\0';
01067 
01068         else
01069             { /* need more input */
01070             int offset = (yy_c_buf_p) - (yytext_ptr);
01071             ++(yy_c_buf_p);
01072 
01073             switch ( yy_get_next_buffer(  ) )
01074                 {
01075                 case EOB_ACT_LAST_MATCH:
01076                     /* This happens because yy_g_n_b()
01077                      * sees that we've accumulated a
01078                      * token and flags that we need to
01079                      * try matching the token before
01080                      * proceeding.  But for input(),
01081                      * there's no matching to consider.
01082                      * So convert the EOB_ACT_LAST_MATCH
01083                      * to EOB_ACT_END_OF_FILE.
01084                      */
01085 
01086                     /* Reset buffer status. */
01087                     cframerestart(cframein );
01088 
01089                     /*FALLTHROUGH*/
01090 
01091                 case EOB_ACT_END_OF_FILE:
01092                     {
01093                     if ( cframewrap( ) )
01094                         return EOF;
01095 
01096                     if ( ! (yy_did_buffer_switch_on_eof) )
01097                         YY_NEW_FILE;
01098 #ifdef __cplusplus
01099                     return yyinput();
01100 #else
01101                     return input();
01102 #endif
01103                     }
01104 
01105                 case EOB_ACT_CONTINUE_SCAN:
01106                     (yy_c_buf_p) = (yytext_ptr) + offset;
01107                     break;
01108                 }
01109             }
01110         }
01111 
01112     c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
01113     *(yy_c_buf_p) = '\0';   /* preserve cframetext */
01114     (yy_hold_char) = *++(yy_c_buf_p);
01115 
01116     return c;
01117 }
01118 #endif  /* ifndef YY_NO_INPUT */
01119 
01125     void cframerestart  (FILE * input_file )
01126 {
01127     
01128     if ( ! YY_CURRENT_BUFFER ){
01129         cframeensure_buffer_stack ();
01130         YY_CURRENT_BUFFER_LVALUE =
01131             cframe_create_buffer(cframein,YY_BUF_SIZE );
01132     }
01133 
01134     cframe_init_buffer(YY_CURRENT_BUFFER,input_file );
01135     cframe_load_buffer_state( );
01136 }
01137 
01142     void cframe_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
01143 {
01144     
01145     /* TODO. We should be able to replace this entire function body
01146      * with
01147      *      cframepop_buffer_state();
01148      *      cframepush_buffer_state(new_buffer);
01149      */
01150     cframeensure_buffer_stack ();
01151     if ( YY_CURRENT_BUFFER == new_buffer )
01152         return;
01153 
01154     if ( YY_CURRENT_BUFFER )
01155         {
01156         /* Flush out information for old buffer. */
01157         *(yy_c_buf_p) = (yy_hold_char);
01158         YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
01159         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
01160         }
01161 
01162     YY_CURRENT_BUFFER_LVALUE = new_buffer;
01163     cframe_load_buffer_state( );
01164 
01165     /* We don't actually know whether we did this switch during
01166      * EOF (cframewrap()) processing, but the only time this flag
01167      * is looked at is after cframewrap() is called, so it's safe
01168      * to go ahead and always set it.
01169      */
01170     (yy_did_buffer_switch_on_eof) = 1;
01171 }
01172 
01173 static void cframe_load_buffer_state  (void)
01174 {
01175         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
01176     (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
01177     cframein = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
01178     (yy_hold_char) = *(yy_c_buf_p);
01179 }
01180 
01187     YY_BUFFER_STATE cframe_create_buffer  (FILE * file, int  size )
01188 {
01189     YY_BUFFER_STATE b;
01190     
01191     b = (YY_BUFFER_STATE) cframealloc(sizeof( struct yy_buffer_state )  );
01192     if ( ! b )
01193         YY_FATAL_ERROR( "out of dynamic memory in cframe_create_buffer()" );
01194 
01195     b->yy_buf_size = size;
01196 
01197     /* yy_ch_buf has to be 2 characters longer than the size given because
01198      * we need to put in 2 end-of-buffer characters.
01199      */
01200     b->yy_ch_buf = (char *) cframealloc(b->yy_buf_size + 2  );
01201     if ( ! b->yy_ch_buf )
01202         YY_FATAL_ERROR( "out of dynamic memory in cframe_create_buffer()" );
01203 
01204     b->yy_is_our_buffer = 1;
01205 
01206     cframe_init_buffer(b,file );
01207 
01208     return b;
01209 }
01210 
01215     void cframe_delete_buffer (YY_BUFFER_STATE  b )
01216 {
01217     
01218     if ( ! b )
01219         return;
01220 
01221     if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
01222         YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
01223 
01224     if ( b->yy_is_our_buffer )
01225         cframefree((void *) b->yy_ch_buf  );
01226 
01227     cframefree((void *) b  );
01228 }
01229 
01230 #ifndef _UNISTD_H /* assume unistd.h has isatty() for us */
01231 #ifdef __cplusplus
01232 extern "C" {
01233 #endif
01234 #ifdef __THROW /* this is a gnuism */
01235 extern int isatty (int ) __THROW;
01236 #else
01237 extern int isatty (int );
01238 #endif
01239 #ifdef __cplusplus
01240 }
01241 #endif
01242 #endif
01243     
01244 /* Initializes or reinitializes a buffer.
01245  * This function is sometimes called more than once on the same buffer,
01246  * such as during a cframerestart() or at EOF.
01247  */
01248     static void cframe_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
01249 
01250 {
01251     int oerrno = errno;
01252     
01253     cframe_flush_buffer(b );
01254 
01255     b->yy_input_file = file;
01256     b->yy_fill_buffer = 1;
01257 
01258     /* If b is the current buffer, then cframe_init_buffer was _probably_
01259      * called from cframerestart() or through yy_get_next_buffer.
01260      * In that case, we don't want to reset the lineno or column.
01261      */
01262     if (b != YY_CURRENT_BUFFER){
01263         b->yy_bs_lineno = 1;
01264         b->yy_bs_column = 0;
01265     }
01266 
01267         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
01268     
01269     errno = oerrno;
01270 }
01271 
01276     void cframe_flush_buffer (YY_BUFFER_STATE  b )
01277 {
01278         if ( ! b )
01279         return;
01280 
01281     b->yy_n_chars = 0;
01282 
01283     /* We always need two end-of-buffer characters.  The first causes
01284      * a transition to the end-of-buffer state.  The second causes
01285      * a jam in that state.
01286      */
01287     b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
01288     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
01289 
01290     b->yy_buf_pos = &b->yy_ch_buf[0];
01291 
01292     b->yy_at_bol = 1;
01293     b->yy_buffer_status = YY_BUFFER_NEW;
01294 
01295     if ( b == YY_CURRENT_BUFFER )
01296         cframe_load_buffer_state( );
01297 }
01298 
01305 void cframepush_buffer_state (YY_BUFFER_STATE new_buffer )
01306 {
01307         if (new_buffer == NULL)
01308         return;
01309 
01310     cframeensure_buffer_stack();
01311 
01312     /* This block is copied from cframe_switch_to_buffer. */
01313     if ( YY_CURRENT_BUFFER )
01314         {
01315         /* Flush out information for old buffer. */
01316         *(yy_c_buf_p) = (yy_hold_char);
01317         YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
01318         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
01319         }
01320 
01321     /* Only push if top exists. Otherwise, replace top. */
01322     if (YY_CURRENT_BUFFER)
01323         (yy_buffer_stack_top)++;
01324     YY_CURRENT_BUFFER_LVALUE = new_buffer;
01325 
01326     /* copied from cframe_switch_to_buffer. */
01327     cframe_load_buffer_state( );
01328     (yy_did_buffer_switch_on_eof) = 1;
01329 }
01330 
01335 void cframepop_buffer_state (void)
01336 {
01337         if (!YY_CURRENT_BUFFER)
01338         return;
01339 
01340     cframe_delete_buffer(YY_CURRENT_BUFFER );
01341     YY_CURRENT_BUFFER_LVALUE = NULL;
01342     if ((yy_buffer_stack_top) > 0)
01343         --(yy_buffer_stack_top);
01344 
01345     if (YY_CURRENT_BUFFER) {
01346         cframe_load_buffer_state( );
01347         (yy_did_buffer_switch_on_eof) = 1;
01348     }
01349 }
01350 
01351 /* Allocates the stack if it does not exist.
01352  *  Guarantees space for at least one push.
01353  */
01354 static void cframeensure_buffer_stack (void)
01355 {
01356     int num_to_alloc;
01357     
01358     if (!(yy_buffer_stack)) {
01359 
01360         /* First allocation is just for 2 elements, since we don't know if this
01361          * scanner will even need a stack. We use 2 instead of 1 to avoid an
01362          * immediate realloc on the next call.
01363          */
01364         num_to_alloc = 1;
01365         (yy_buffer_stack) = (struct yy_buffer_state**)cframealloc
01366                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
01367                                 );
01368         
01369         memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
01370                 
01371         (yy_buffer_stack_max) = num_to_alloc;
01372         (yy_buffer_stack_top) = 0;
01373         return;
01374     }
01375 
01376     if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
01377 
01378         /* Increase the buffer to prepare for a possible push. */
01379         int grow_size = 8 /* arbitrary grow size */;
01380 
01381         num_to_alloc = (yy_buffer_stack_max) + grow_size;
01382         (yy_buffer_stack) = (struct yy_buffer_state**)cframerealloc
01383                                 ((yy_buffer_stack),
01384                                 num_to_alloc * sizeof(struct yy_buffer_state*)
01385                                 );
01386 
01387         /* zero only the new slots.*/
01388         memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
01389         (yy_buffer_stack_max) = num_to_alloc;
01390     }
01391 }
01392 
01399 YY_BUFFER_STATE cframe_scan_buffer  (char * base, yy_size_t  size )
01400 {
01401     YY_BUFFER_STATE b;
01402     
01403     if ( size < 2 ||
01404          base[size-2] != YY_END_OF_BUFFER_CHAR ||
01405          base[size-1] != YY_END_OF_BUFFER_CHAR )
01406         /* They forgot to leave room for the EOB's. */
01407         return 0;
01408 
01409     b = (YY_BUFFER_STATE) cframealloc(sizeof( struct yy_buffer_state )  );
01410     if ( ! b )
01411         YY_FATAL_ERROR( "out of dynamic memory in cframe_scan_buffer()" );
01412 
01413     b->yy_buf_size = size - 2;  /* "- 2" to take care of EOB's */
01414     b->yy_buf_pos = b->yy_ch_buf = base;
01415     b->yy_is_our_buffer = 0;
01416     b->yy_input_file = 0;
01417     b->yy_n_chars = b->yy_buf_size;
01418     b->yy_is_interactive = 0;
01419     b->yy_at_bol = 1;
01420     b->yy_fill_buffer = 0;
01421     b->yy_buffer_status = YY_BUFFER_NEW;
01422 
01423     cframe_switch_to_buffer(b  );
01424 
01425     return b;
01426 }
01427 
01436 YY_BUFFER_STATE cframe_scan_string (yyconst char * yystr )
01437 {
01438     
01439     return cframe_scan_bytes(yystr,strlen(yystr) );
01440 }
01441 
01449 YY_BUFFER_STATE cframe_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
01450 {
01451     YY_BUFFER_STATE b;
01452     char *buf;
01453     yy_size_t n;
01454     int i;
01455     
01456     /* Get memory for full buffer, including space for trailing EOB's. */
01457     n = _yybytes_len + 2;
01458     buf = (char *) cframealloc(n  );
01459     if ( ! buf )
01460         YY_FATAL_ERROR( "out of dynamic memory in cframe_scan_bytes()" );
01461 
01462     for ( i = 0; i < _yybytes_len; ++i )
01463         buf[i] = yybytes[i];
01464 
01465     buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
01466 
01467     b = cframe_scan_buffer(buf,n );
01468     if ( ! b )
01469         YY_FATAL_ERROR( "bad buffer in cframe_scan_bytes()" );
01470 
01471     /* It's okay to grow etc. this buffer, and we should throw it
01472      * away when we're done.
01473      */
01474     b->yy_is_our_buffer = 1;
01475 
01476     return b;
01477 }
01478 
01479 #ifndef YY_EXIT_FAILURE
01480 #define YY_EXIT_FAILURE 2
01481 #endif
01482 
01483 static void yy_fatal_error (yyconst char* msg )
01484 {
01485         (void) fprintf( stderr, "%s\n", msg );
01486     exit( YY_EXIT_FAILURE );
01487 }
01488 
01489 /* Redefine yyless() so it works in section 3 code. */
01490 
01491 #undef yyless
01492 #define yyless(n) \
01493     do \
01494         { \
01495         /* Undo effects of setting up cframetext. */ \
01496         int yyless_macro_arg = (n); \
01497         YY_LESS_LINENO(yyless_macro_arg);\
01498         cframetext[cframeleng] = (yy_hold_char); \
01499         (yy_c_buf_p) = cframetext + yyless_macro_arg; \
01500         (yy_hold_char) = *(yy_c_buf_p); \
01501         *(yy_c_buf_p) = '\0'; \
01502         cframeleng = yyless_macro_arg; \
01503         } \
01504     while ( 0 )
01505 
01506 /* Accessor  methods (get/set functions) to struct members. */
01507 
01511 int cframeget_lineno  (void)
01512 {
01513         
01514     return cframelineno;
01515 }
01516 
01520 FILE *cframeget_in  (void)
01521 {
01522         return cframein;
01523 }
01524 
01528 FILE *cframeget_out  (void)
01529 {
01530         return cframeout;
01531 }
01532 
01536 int cframeget_leng  (void)
01537 {
01538         return cframeleng;
01539 }
01540 
01545 char *cframeget_text  (void)
01546 {
01547         return cframetext;
01548 }
01549 
01554 void cframeset_lineno (int  line_number )
01555 {
01556     
01557     cframelineno = line_number;
01558 }
01559 
01566 void cframeset_in (FILE *  in_str )
01567 {
01568         cframein = in_str ;
01569 }
01570 
01571 void cframeset_out (FILE *  out_str )
01572 {
01573         cframeout = out_str ;
01574 }
01575 
01576 int cframeget_debug  (void)
01577 {
01578         return cframe_flex_debug;
01579 }
01580 
01581 void cframeset_debug (int  bdebug )
01582 {
01583         cframe_flex_debug = bdebug ;
01584 }
01585 
01586 static int yy_init_globals (void)
01587 {
01588         /* Initialization is the same as for the non-reentrant scanner.
01589      * This function is called from cframelex_destroy(), so don't allocate here.
01590      */
01591 
01592     (yy_buffer_stack) = 0;
01593     (yy_buffer_stack_top) = 0;
01594     (yy_buffer_stack_max) = 0;
01595     (yy_c_buf_p) = (char *) 0;
01596     (yy_init) = 0;
01597     (yy_start) = 0;
01598 
01599 /* Defined in main.c */
01600 #ifdef YY_STDINIT
01601     cframein = stdin;
01602     cframeout = stdout;
01603 #else
01604     cframein = (FILE *) 0;
01605     cframeout = (FILE *) 0;
01606 #endif
01607 
01608     /* For future reference: Set errno on error, since we are called by
01609      * cframelex_init()
01610      */
01611     return 0;
01612 }
01613 
01614 /* cframelex_destroy is for both reentrant and non-reentrant scanners. */
01615 int cframelex_destroy  (void)
01616 {
01617     
01618     /* Pop the buffer stack, destroying each element. */
01619     while(YY_CURRENT_BUFFER){
01620         cframe_delete_buffer(YY_CURRENT_BUFFER  );
01621         YY_CURRENT_BUFFER_LVALUE = NULL;
01622         cframepop_buffer_state();
01623     }
01624 
01625     /* Destroy the stack itself. */
01626     cframefree((yy_buffer_stack) );
01627     (yy_buffer_stack) = NULL;
01628 
01629     /* Reset the globals. This is important in a non-reentrant scanner so the next time
01630      * cframelex() is called, initialization will occur. */
01631     yy_init_globals( );
01632 
01633     return 0;
01634 }
01635 
01636 /*
01637  * Internal utility routines.
01638  */
01639 
01640 #ifndef yytext_ptr
01641 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
01642 {
01643     register int i;
01644     for ( i = 0; i < n; ++i )
01645         s1[i] = s2[i];
01646 }
01647 #endif
01648 
01649 #ifdef YY_NEED_STRLEN
01650 static int yy_flex_strlen (yyconst char * s )
01651 {
01652     register int n;
01653     for ( n = 0; s[n]; ++n )
01654         ;
01655 
01656     return n;
01657 }
01658 #endif
01659 
01660 void *cframealloc (yy_size_t  size )
01661 {
01662     return (void *) malloc( size );
01663 }
01664 
01665 void *cframerealloc  (void * ptr, yy_size_t  size )
01666 {
01667     /* The cast to (char *) in the following accommodates both
01668      * implementations that use char* generic pointers, and those
01669      * that use void* generic pointers.  It works with the latter
01670      * because both ANSI C and C++ allow castless assignment from
01671      * any pointer type to void*, and deal with argument conversions
01672      * as though doing an assignment.
01673      */
01674     return (void *) realloc( (char *) ptr, size );
01675 }
01676 
01677 void cframefree (void * ptr )
01678 {
01679     free( (char *) ptr );   /* see cframerealloc() for (char *) cast */
01680 }
01681 
01682 #define YYTABLES_NAME "yytables"
01683 
01684 #line 13 "src/cframe_lexer.l"
01685 
01686 
01687 

Generated on Thu Sep 6 13:13:10 2007 for driver by  doxygen 1.3.9.1