Clan  0.8.0
scanner.c
Go to the documentation of this file.
00001 
00002 #line 3 "source/scanner.c"
00003 
00004 #define  YY_INT_ALIGNED short int
00005 
00006 /* A lexical scanner generated by flex */
00007 
00008 #define FLEX_SCANNER
00009 #define YY_FLEX_MAJOR_VERSION 2
00010 #define YY_FLEX_MINOR_VERSION 5
00011 #define YY_FLEX_SUBMINOR_VERSION 35
00012 #if YY_FLEX_SUBMINOR_VERSION > 0
00013 #define FLEX_BETA
00014 #endif
00015 
00016 /* First, we deal with  platform-specific or compiler-specific issues. */
00017 
00018 /* begin standard C headers. */
00019 #include <stdio.h>
00020 #include <string.h>
00021 #include <errno.h>
00022 #include <stdlib.h>
00023 
00024 /* end standard C headers. */
00025 
00026 /* flex integer type definitions */
00027 
00028 #ifndef FLEXINT_H
00029 #define FLEXINT_H
00030 
00031 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
00032 
00033 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
00034 
00035 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
00036  * if you want the limit (max/min) macros for int types. 
00037  */
00038 #ifndef __STDC_LIMIT_MACROS
00039 #define __STDC_LIMIT_MACROS 1
00040 #endif
00041 
00042 #include <inttypes.h>
00043 typedef int8_t flex_int8_t;
00044 typedef uint8_t flex_uint8_t;
00045 typedef int16_t flex_int16_t;
00046 typedef uint16_t flex_uint16_t;
00047 typedef int32_t flex_int32_t;
00048 typedef uint32_t flex_uint32_t;
00049 typedef uint64_t flex_uint64_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 /* C99 requires __STDC__ to be defined as 1. */
00098 #if defined (__STDC__)
00099 
00100 #define YY_USE_CONST
00101 
00102 #endif  /* defined (__STDC__) */
00103 #endif  /* ! __cplusplus */
00104 
00105 #ifdef YY_USE_CONST
00106 #define yyconst const
00107 #else
00108 #define yyconst
00109 #endif
00110 
00111 /* Returned upon end-of-file. */
00112 #define YY_NULL 0
00113 
00114 /* Promotes a possibly negative, possibly signed char to an unsigned
00115  * integer for use as an array index.  If the signed char is negative,
00116  * we want to instead treat it as an 8-bit unsigned char, hence the
00117  * double cast.
00118  */
00119 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
00120 
00121 /* Enter a start condition.  This macro really ought to take a parameter,
00122  * but we do it the disgusting crufty way forced on us by the ()-less
00123  * definition of BEGIN.
00124  */
00125 #define BEGIN (yy_start) = 1 + 2 *
00126 
00127 /* Translate the current start state into a value that can be later handed
00128  * to BEGIN to return to the state.  The YYSTATE alias is for lex
00129  * compatibility.
00130  */
00131 #define YY_START (((yy_start) - 1) / 2)
00132 #define YYSTATE YY_START
00133 
00134 /* Action number for EOF rule of a given start state. */
00135 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
00136 
00137 /* Special action meaning "start processing a new file". */
00138 #define YY_NEW_FILE yyrestart(yyin  )
00139 
00140 #define YY_END_OF_BUFFER_CHAR 0
00141 
00142 /* Size of default input buffer. */
00143 #ifndef YY_BUF_SIZE
00144 #define YY_BUF_SIZE 16384
00145 #endif
00146 
00147 /* The state buf must be large enough to hold one state per character in the main buffer.
00148  */
00149 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
00150 
00151 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
00152 #define YY_TYPEDEF_YY_BUFFER_STATE
00153 typedef struct yy_buffer_state *YY_BUFFER_STATE;
00154 #endif
00155 
00156 #ifndef YY_TYPEDEF_YY_SIZE_T
00157 #define YY_TYPEDEF_YY_SIZE_T
00158 typedef size_t yy_size_t;
00159 #endif
00160 
00161 extern yy_size_t yyleng;
00162 
00163 extern FILE *yyin, *yyout;
00164 
00165 #define EOB_ACT_CONTINUE_SCAN 0
00166 #define EOB_ACT_END_OF_FILE 1
00167 #define EOB_ACT_LAST_MATCH 2
00168 
00169     #define YY_LESS_LINENO(n)
00170     
00171 /* Return all but the first "n" matched characters back to the input stream. */
00172 #define yyless(n) \
00173         do \
00174                 { \
00175                 /* Undo effects of setting up yytext. */ \
00176         int yyless_macro_arg = (n); \
00177         YY_LESS_LINENO(yyless_macro_arg);\
00178                 *yy_cp = (yy_hold_char); \
00179                 YY_RESTORE_YY_MORE_OFFSET \
00180                 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
00181                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
00182                 } \
00183         while ( 0 )
00184 
00185 #define unput(c) yyunput( c, (yytext_ptr)  )
00186 
00187 #ifndef YY_STRUCT_YY_BUFFER_STATE
00188 #define YY_STRUCT_YY_BUFFER_STATE
00189 struct yy_buffer_state
00190         {
00191         FILE *yy_input_file;
00192 
00193         char *yy_ch_buf;                /* input buffer */
00194         char *yy_buf_pos;               /* current position in input buffer */
00195 
00196         /* Size of input buffer in bytes, not including room for EOB
00197          * characters.
00198          */
00199         yy_size_t yy_buf_size;
00200 
00201         /* Number of characters read into yy_ch_buf, not including EOB
00202          * characters.
00203          */
00204         yy_size_t yy_n_chars;
00205 
00206         /* Whether we "own" the buffer - i.e., we know we created it,
00207          * and can realloc() it to grow it, and should free() it to
00208          * delete it.
00209          */
00210         int yy_is_our_buffer;
00211 
00212         /* Whether this is an "interactive" input source; if so, and
00213          * if we're using stdio for input, then we want to use getc()
00214          * instead of fread(), to make sure we stop fetching input after
00215          * each newline.
00216          */
00217         int yy_is_interactive;
00218 
00219         /* Whether we're considered to be at the beginning of a line.
00220          * If so, '^' rules will be active on the next match, otherwise
00221          * not.
00222          */
00223         int yy_at_bol;
00224 
00225     int yy_bs_lineno; 
00226     int yy_bs_column; 
00228         /* Whether to try to fill the input buffer when we reach the
00229          * end of it.
00230          */
00231         int yy_fill_buffer;
00232 
00233         int yy_buffer_status;
00234 
00235 #define YY_BUFFER_NEW 0
00236 #define YY_BUFFER_NORMAL 1
00237         /* When an EOF's been seen but there's still some text to process
00238          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
00239          * shouldn't try reading from the input source any more.  We might
00240          * still have a bunch of tokens to match, though, because of
00241          * possible backing-up.
00242          *
00243          * When we actually see the EOF, we change the status to "new"
00244          * (via yyrestart()), so that the user can continue scanning by
00245          * just pointing yyin at a new input file.
00246          */
00247 #define YY_BUFFER_EOF_PENDING 2
00248 
00249         };
00250 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
00251 
00252 /* Stack of input buffers. */
00253 static size_t yy_buffer_stack_top = 0; 
00254 static size_t yy_buffer_stack_max = 0; 
00255 static YY_BUFFER_STATE * yy_buffer_stack = 0; 
00257 /* We provide macros for accessing buffer states in case in the
00258  * future we want to put the buffer states in a more general
00259  * "scanner state".
00260  *
00261  * Returns the top of the stack, or NULL.
00262  */
00263 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
00264                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
00265                           : NULL)
00266 
00267 /* Same as previous macro, but useful when we know that the buffer stack is not
00268  * NULL or when we need an lvalue. For internal use only.
00269  */
00270 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
00271 
00272 /* yy_hold_char holds the character lost when yytext is formed. */
00273 static char yy_hold_char;
00274 static yy_size_t yy_n_chars;            /* number of characters read into yy_ch_buf */
00275 yy_size_t yyleng;
00276 
00277 /* Points to current character in buffer. */
00278 static char *yy_c_buf_p = (char *) 0;
00279 static int yy_init = 0;         /* whether we need to initialize */
00280 static int yy_start = 0;        /* start state number */
00281 
00282 /* Flag which is used to allow yywrap()'s to do buffer switches
00283  * instead of setting up a fresh yyin.  A bit of a hack ...
00284  */
00285 static int yy_did_buffer_switch_on_eof;
00286 
00287 void yyrestart (FILE *input_file  );
00288 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
00289 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
00290 void yy_delete_buffer (YY_BUFFER_STATE b  );
00291 void yy_flush_buffer (YY_BUFFER_STATE b  );
00292 void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
00293 void yypop_buffer_state (void );
00294 
00295 static void yyensure_buffer_stack (void );
00296 static void yy_load_buffer_state (void );
00297 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
00298 
00299 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
00300 
00301 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
00302 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
00303 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len  );
00304 
00305 void *yyalloc (yy_size_t  );
00306 void *yyrealloc (void *,yy_size_t  );
00307 void yyfree (void *  );
00308 
00309 #define yy_new_buffer yy_create_buffer
00310 
00311 #define yy_set_interactive(is_interactive) \
00312         { \
00313         if ( ! YY_CURRENT_BUFFER ){ \
00314         yyensure_buffer_stack (); \
00315                 YY_CURRENT_BUFFER_LVALUE =    \
00316             yy_create_buffer(yyin,YY_BUF_SIZE ); \
00317         } \
00318         YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
00319         }
00320 
00321 #define yy_set_bol(at_bol) \
00322         { \
00323         if ( ! YY_CURRENT_BUFFER ){\
00324         yyensure_buffer_stack (); \
00325                 YY_CURRENT_BUFFER_LVALUE =    \
00326             yy_create_buffer(yyin,YY_BUF_SIZE ); \
00327         } \
00328         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
00329         }
00330 
00331 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
00332 
00333 /* Begin user sect3 */
00334 
00335 #define yywrap(n) 1
00336 #define YY_SKIP_YYWRAP
00337 
00338 typedef unsigned char YY_CHAR;
00339 
00340 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
00341 
00342 typedef int yy_state_type;
00343 
00344 extern int yylineno;
00345 
00346 int yylineno = 1;
00347 
00348 extern char *yytext;
00349 #define yytext_ptr yytext
00350 
00351 static yy_state_type yy_get_previous_state (void );
00352 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
00353 static int yy_get_next_buffer (void );
00354 static void yy_fatal_error (yyconst char msg[]  );
00355 
00356 /* Done after the current pattern has been matched and before the
00357  * corresponding action - sets up yytext.
00358  */
00359 #define YY_DO_BEFORE_ACTION \
00360         (yytext_ptr) = yy_bp; \
00361         yyleng = (yy_size_t) (yy_cp - yy_bp); \
00362         (yy_hold_char) = *yy_cp; \
00363         *yy_cp = '\0'; \
00364         (yy_c_buf_p) = yy_cp;
00365 
00366 #define YY_NUM_RULES 118
00367 #define YY_END_OF_BUFFER 119
00368 /* This struct is not used in this scanner,
00369    but its presence is necessary. */
00370 struct yy_trans_info
00371         {
00372         flex_int32_t yy_verify;
00373         flex_int32_t yy_nxt;
00374         };
00375 static yyconst flex_int16_t yy_accept[372] =
00376     {   0,
00377         0,    0,    0,    0,    0,    0,    0,    0,  119,  117,
00378       116,  116,  104,  117,  117,  110,  103,  117,   98,   99,
00379       108,  107,   95,  106,  102,  109,   58,   58,   96,   92,
00380       111,   97,  112,  115,   57,   57,  100,  101,  113,   57,
00381        57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
00382        57,   57,   57,   57,   57,   57,   93,  114,   94,  105,
00383        10,    9,    8,    7,    8,    8,    4,    3,    4,    4,
00384        91,    0,   69,    0,    0,   77,   94,   86,   78,    0,
00385         0,   75,   83,   73,   84,   74,   85,    0,   64,   13,
00386        11,   76,   65,   58,    0,   61,   61,    0,   61,   58,
00387 
00388       101,   93,  100,   82,   88,   90,   89,   81,   57,    0,
00389         0,   79,   57,   57,   57,   57,   57,   57,   57,   57,
00390        57,   57,   23,   57,   57,   57,   57,   57,   57,   31,
00391        57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
00392        57,   57,   57,   80,   87,    5,    6,    1,    2,    0,
00393        62,   70,    0,   64,    0,   64,    0,   65,   60,   60,
00394        60,    0,   63,   61,   61,   61,   61,    0,   59,   72,
00395        71,   57,   57,   57,   57,   57,   57,   57,   57,   57,
00396        57,   57,   57,   57,   57,   57,   29,   57,   57,   34,
00397        57,   52,   51,   57,   57,   57,   57,   57,   57,   57,
00398 
00399        57,   57,   57,   57,   57,   57,   57,   57,    0,    0,
00400        64,    0,    0,   64,    0,   65,   60,   60,   60,   60,
00401        63,   61,   67,   68,   59,    0,   59,   59,   57,   57,
00402        57,   14,   57,   17,   57,   18,   57,   57,   57,   57,
00403        25,   26,   57,   57,   57,   30,   57,   35,   57,   57,
00404        57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
00405        48,   57,   57,    0,    0,    0,   64,   60,   67,    0,
00406        67,   68,    0,   59,   59,    0,   66,   59,   59,   15,
00407        57,   57,   16,   53,   20,   57,   57,   57,   57,   28,
00408        57,   57,   57,   57,   57,   39,   57,   57,   57,   57,
00409 
00410        57,   57,   46,   57,   57,   50,    0,    0,    0,   67,
00411        67,    0,    0,   68,   66,   59,   57,   57,   57,   57,
00412        24,   27,   54,   33,   57,   57,   38,   40,   41,   42,
00413        43,   44,   57,   57,   57,    0,    0,    0,   67,   57,
00414        57,   57,   22,   57,   57,   45,   57,   57,    0,   12,
00415        19,   57,   21,   36,   37,   47,   49,    0,    0,   57,
00416         0,    0,   32,    0,    0,    0,   55,    0,    0,   56,
00417         0
00418     } ;
00419 
00420 static yyconst flex_int32_t yy_ec[256] =
00421     {   0,
00422         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
00423         2,    2,    1,    1,    1,    1,    1,    1,    1,    1,
00424         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00425         1,    4,    5,    6,    7,    1,    8,    9,   10,   11,
00426        12,   13,   14,   15,   16,   17,   18,   19,   20,   20,
00427        20,   20,   20,   20,   20,   20,   20,   21,   22,   23,
00428        24,   25,   26,    1,   27,   28,   29,   27,   30,   31,
00429        32,   32,   33,   32,   32,   34,   32,   32,   32,   35,
00430        32,   32,   32,   32,   36,   32,   32,   37,   32,   32,
00431        38,   39,   40,   41,   42,    1,   43,   44,   45,   46,
00432 
00433        47,   48,   49,   50,   51,   32,   52,   53,   54,   55,
00434        56,   57,   32,   58,   59,   60,   61,   62,   63,   64,
00435        65,   66,   67,   68,   69,   70,    1,    1,    1,    1,
00436         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00437         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00438         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00439         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00440         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00441         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00442         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00443 
00444         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00445         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00446         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
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,    1,    1,    1
00450     } ;
00451 
00452 static yyconst flex_int32_t yy_meta[71] =
00453     {   0,
00454         1,    1,    2,    1,    1,    1,    1,    1,    1,    3,
00455         1,    1,    1,    1,    1,    1,    4,    1,    5,    5,
00456         1,    1,    1,    1,    1,    1,    5,    5,    5,    5,
00457         5,    6,    6,    7,    7,    6,    6,    1,    1,    1,
00458         1,    6,    5,    5,    5,    5,    5,    5,    6,    6,
00459         6,    6,    7,    6,    6,    6,    7,    6,    6,    6,
00460         6,    6,    6,    6,    6,    6,    1,    1,    1,    1
00461     } ;
00462 
00463 static yyconst flex_int16_t yy_base[381] =
00464     {   0,
00465         0,    0,  576,  575,   68,   69,   70,   71,  577,  580,
00466       580,  580,  552,   69,  518,   52,   69,  535,  580,  580,
00467       549,   66,  580,   75,   75,   83,   92,   85,  547,  580,
00468       110,  547,   73,  580,    0,  100,  580,  580,  546,  107,
00469       508,  510,   94,   67,   94,   60,  511,   69,  510,  100,
00470       518,  104,  499,  508,  506,  511,  580,  101,  580,  580,
00471       580,  580,  580,  580,  542,  546,  580,  580,  540,  544,
00472       580,  121,  580,    0,  498,  580,  580,  580,  580,  120,
00473       545,  580,  580,  580,  580,  580,  580,  537,  142,  549,
00474       580,  580,  151,  158,  177,  166,  131,  535,  165,  195,
00475 
00476       580,  580,  580,  527,  580,  580,  580,  526,    0,  168,
00477       510,  580,  492,  491,  492,  485,  497,  484,  491,  498,
00478       485,  491,  477,  478,  475,  475,  478,  475,  472,    0,
00479       126,  476,  466,  474,  157,  472,   54,   99,  476,  469,
00480       162,  115,  474,  580,  580,  580,  580,  580,  580,  481,
00481       580,  580,  214,  580,  494,  216,  224,  580,  188,  186,
00482       201,  189,  239,  196,  580,  488,  468,    0,  243,  580,
00483       580,  464,  465,  475,  461,  473,  468,  461,  455,  192,
00484       469,  467,  463,  455,  461,  167,    0,  451,  455,    0,
00485       456,    0,    0,  453,  443,  441,  443,  445,  452,  438,
00486 
00487       436,  436,  448,  438,  442,  446,  448,  437,  440,  246,
00488       255,  435,  274,  580,  248,  264,  219,  580,  453,  433,
00489       580,  580,  267,  272,  275,  299,  219,  261,  432,  427,
00490       434,    0,  430,    0,  435,    0,  420,  428,  417,  424,
00491         0,    0,  418,  415,  416,    0,  418,    0,  413,  413,
00492       412,  409,  421,  411,  415,  420,  419,  417,  407,  412,
00493         0,  400,  412,  404,  414,  262,  307,  580,  580,  314,
00494       297,  580,  323,  249,  580,  325,  327,  422,  402,    0,
00495       401,  402,    0,    0,    0,  397,  398,  403,  393,    0,
00496       391,  389,  369,  354,  348,    0,  356,  352,  353,  337,
00497 
00498       346,  348,    0,  339,  342,    0,  349,  326,  329,  333,
00499       580,  343,  346,  351,  580,  580,  342,  333,  322,  319,
00500         0,    0,    0,    0,  330,  331,    0,    0,    0,    0,
00501         0,    0,  326,  309,  298,  336,  320,  349,  353,  257,
00502       273,  258,    0,  241,  231,    0,  230,  224,  331,  580,
00503         0,  203,    0,    0,    0,    0,    0,  190,  196,  138,
00504       141,  127,    0,  121,  106,  107,  580,   92,   28,  580,
00505       580,  406,  413,  420,  427,  434,  437,  441,   74,  442
00506     } ;
00507 
00508 static yyconst flex_int16_t yy_def[381] =
00509     {   0,
00510       371,    1,  372,  372,  373,  373,  374,  374,  371,  371,
00511       371,  371,  371,  375,  371,  371,  371,  376,  371,  371,
00512       371,  371,  371,  371,  371,  371,  371,  371,  371,  371,
00513       371,  371,  371,  371,  377,  377,  371,  371,  371,  377,
00514       377,  377,  377,  377,  377,  377,  377,  377,  377,  377,
00515       377,  377,  377,  377,  377,  377,  371,  371,  371,  371,
00516       371,  371,  371,  371,  371,  371,  371,  371,  371,  371,
00517       371,  375,  371,  375,  371,  371,  371,  371,  371,  376,
00518       376,  371,  371,  371,  371,  371,  371,  371,  371,  371,
00519       371,  371,  371,  371,  371,  371,  371,  378,  371,  371,
00520 
00521       371,  371,  371,  371,  371,  371,  371,  371,  377,  375,
00522       376,  371,  377,  377,  377,  377,  377,  377,  377,  377,
00523       377,  377,  377,  377,  377,  377,  377,  377,  377,  377,
00524       377,  377,  377,  377,  377,  377,  377,  377,  377,  377,
00525       377,  377,  377,  371,  371,  371,  371,  371,  371,  371,
00526       371,  371,  371,  371,  371,  371,  371,  371,  371,  371,
00527       371,  371,  371,  371,  371,  371,  371,  379,  378,  371,
00528       371,  377,  377,  377,  377,  377,  377,  377,  377,  377,
00529       377,  377,  377,  377,  377,  377,  377,  377,  377,  377,
00530       377,  377,  377,  377,  377,  377,  377,  377,  377,  377,
00531 
00532       377,  377,  377,  377,  377,  377,  377,  377,  371,  371,
00533       371,  371,  371,  371,  371,  371,  371,  371,  371,  371,
00534       371,  371,  379,  380,  371,  371,  371,  371,  377,  377,
00535       377,  377,  377,  377,  377,  377,  377,  377,  377,  377,
00536       377,  377,  377,  377,  377,  377,  377,  377,  377,  377,
00537       377,  377,  377,  377,  377,  377,  377,  377,  377,  377,
00538       377,  377,  377,  371,  371,  371,  371,  371,  371,  371,
00539       380,  371,  371,  371,  371,  371,  371,  371,  371,  377,
00540       377,  377,  377,  377,  377,  377,  377,  377,  377,  377,
00541       377,  377,  377,  377,  377,  377,  377,  377,  377,  377,
00542 
00543       377,  377,  377,  377,  377,  377,  371,  371,  371,  371,
00544       371,  371,  371,  371,  371,  371,  377,  377,  377,  377,
00545       377,  377,  377,  377,  377,  377,  377,  377,  377,  377,
00546       377,  377,  377,  377,  377,  371,  371,  371,  371,  377,
00547       377,  377,  377,  377,  377,  377,  377,  377,  371,  371,
00548       377,  377,  377,  377,  377,  377,  377,  371,  371,  377,
00549       371,  371,  377,  371,  371,  371,  371,  371,  371,  371,
00550         0,  371,  371,  371,  371,  371,  371,  371,  371,  371
00551     } ;
00552 
00553 static yyconst flex_int16_t yy_nxt[651] =
00554     {   0,
00555        10,   11,   12,   11,   13,   14,   15,   16,   17,   18,
00556        19,   20,   21,   22,   23,   24,   25,   26,   27,   28,
00557        29,   30,   31,   32,   33,   34,   35,   35,   35,   35,
00558        35,   35,   35,   36,   35,   35,   35,   37,   10,   38,
00559        39,   40,   41,   42,   43,   44,   45,   46,   47,   35,
00560        48,   35,   49,   50,   35,   35,   35,   51,   52,   53,
00561        54,   55,   56,   35,   35,   35,   57,   58,   59,   60,
00562        64,   64,   68,   68,   73,   76,   77,   78,  223,   83,
00563        65,   65,   69,   69,  370,   66,   66,   70,   70,   84,
00564        85,   88,   79,   89,   89,   90,  107,  108,   86,   87,
00565 
00566        91,   93,  198,  100,  100,  110,   92,   74,   93,  111,
00567        94,   94,  127,  122,   95,  128,  130,  102,   96,  199,
00568        97,   95,  123,  131,  144,   96,   73,   97,   98,  151,
00569       103,   95,  104,  105,  113,  114,  118,   99,   95,  115,
00570       119,  200,  133,  120,   99,   97,  124,  369,  125,  121,
00571       134,  368,   97,  136,  137,   98,  201,  126,   81,   74,
00572        89,   89,  367,  138,  166,  206,  139,  207,  145,  156,
00573       156,  153,  154,   73,   93,  154,   94,   94,  189,  366,
00574       157,  158,  365,  167,  158,  190,  364,   95,  153,  154,
00575       162,  159,  162,  160,  154,  163,  163,  157,  158,  164,
00576 
00577       165,  165,  363,  158,   95,  194,   74,  163,  163,  244,
00578       161,   93,  204,  100,  100,  195,  196,  164,  160,  219,
00579       205,  217,  245,  218,   95,  165,  165,  210,   96,  210,
00580        97,  165,  211,  211,  156,  156,  218,  215,  220,  215,
00581       362,   95,  216,  216,  361,  213,  214,   99,  218,  214,
00582       237,  238,  278,  217,  218,   97,  165,  163,  163,  224,
00583       360,  218,  213,  214,  211,  211,  216,  216,  214,  221,
00584       357,  279,  221,  211,  211,  356,  225,  226,  227,  218,
00585       267,  267,  216,  216,  275,  154,  221,  266,  154,  266,
00586       355,  221,  267,  267,  158,  228,  275,  158,  354,  226,
00587 
00588       269,  270,  154,  227,  353,  272,  273,  154,  274,  275,
00589       275,  158,  276,  274,  276,  352,  158,  277,  277,  269,
00590       351,  275,  350,  270,  272,  267,  267,  309,  273,  309,
00591       311,  312,  310,  310,  349,  275,  313,  214,  313,  349,
00592       214,  314,  314,  277,  277,  277,  277,  310,  310,  311,
00593       348,  310,  310,  312,  214,  347,  338,  315,  338,  214,
00594       315,  339,  339,  269,  314,  314,  269,  339,  339,  314,
00595       314,  339,  339,  346,  315,  345,  344,  358,  343,  315,
00596       269,  272,  342,  311,  272,  269,  311,  341,  340,  359,
00597       337,  336,  335,  334,  333,  332,  331,  330,  272,  329,
00598 
00599       311,  328,  327,  272,  326,  311,   61,   61,   61,   61,
00600        61,   61,   61,   63,   63,   63,   63,   63,   63,   63,
00601        67,   67,   67,   67,   67,   67,   67,   72,  325,   72,
00602        72,   72,   72,   72,   80,  324,  323,   80,   80,   80,
00603        80,  109,  109,  109,  169,  169,  271,  322,  271,  321,
00604       320,  319,  318,  317,  316,  316,  308,  307,  306,  305,
00605       304,  303,  302,  301,  300,  299,  298,  297,  296,  295,
00606       294,  293,  292,  291,  290,  289,  288,  287,  286,  285,
00607       284,  283,  282,  281,  280,  268,  268,  265,  264,  263,
00608       262,  261,  260,  259,  258,  257,  256,  255,  254,  253,
00609 
00610       252,  251,  250,  249,  248,  247,  246,  243,  242,  241,
00611       240,  239,  236,  235,  234,  233,  232,  231,  230,  229,
00612       222,  222,  212,  209,  208,  203,  202,  197,  193,  192,
00613       191,  188,  187,  186,  185,  184,  183,  182,  181,  180,
00614       179,  178,  177,  176,  175,  174,  173,  172,   81,  171,
00615       170,  168,  155,  152,   80,  150,  149,  148,  147,  146,
00616       143,  142,  141,  140,  135,  132,  129,  117,  116,  112,
00617       106,  101,   82,   81,   75,   71,  371,   62,   62,    9,
00618       371,  371,  371,  371,  371,  371,  371,  371,  371,  371,
00619       371,  371,  371,  371,  371,  371,  371,  371,  371,  371,
00620 
00621       371,  371,  371,  371,  371,  371,  371,  371,  371,  371,
00622       371,  371,  371,  371,  371,  371,  371,  371,  371,  371,
00623       371,  371,  371,  371,  371,  371,  371,  371,  371,  371,
00624       371,  371,  371,  371,  371,  371,  371,  371,  371,  371,
00625       371,  371,  371,  371,  371,  371,  371,  371,  371,  371
00626     } ;
00627 
00628 static yyconst flex_int16_t yy_chk[651] =
00629     {   0,
00630         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00631         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00632         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00633         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00634         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00635         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00636         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
00637         5,    6,    7,    8,   14,   16,   16,   17,  379,   22,
00638         5,    6,    7,    8,  369,    5,    6,    7,    8,   22,
00639        24,   25,   17,   25,   25,   26,   33,   33,   24,   24,
00640 
00641        26,   28,  137,   28,   28,   36,   26,   14,   27,   36,
00642        27,   27,   46,   44,   28,   46,   48,   31,   28,  137,
00643        28,   27,   44,   48,   58,   27,   72,   27,   27,   80,
00644        31,   28,   31,   31,   40,   40,   43,   28,   27,   40,
00645        43,  138,   50,   43,   27,   28,   45,  368,   45,   43,
00646        50,  366,   27,   52,   52,   27,  138,   45,   80,   72,
00647        89,   89,  365,   52,   97,  142,   52,  142,   58,   93,
00648        93,   89,   89,  110,   94,   89,   94,   94,  131,  364,
00649        93,   93,  362,   97,   93,  131,  361,   94,   89,   89,
00650        95,   94,   95,   94,   89,   95,   95,   93,   93,   96,
00651 
00652        99,   96,  360,   93,   94,  135,  110,  162,  162,  186,
00653        94,  100,  141,  100,  100,  135,  135,   99,   94,  160,
00654       141,  159,  186,  159,  100,   99,   96,  153,  100,  153,
00655       100,  164,  153,  153,  156,  156,  161,  157,  160,  157,
00656       359,  100,  157,  157,  358,  156,  156,  100,  159,  156,
00657       180,  180,  227,  161,  217,  100,  164,  163,  163,  169,
00658       352,  161,  156,  156,  210,  210,  215,  215,  156,  163,
00659       348,  227,  163,  211,  211,  347,  169,  169,  169,  217,
00660       266,  266,  216,  216,  274,  211,  163,  213,  211,  213,
00661       345,  163,  213,  213,  216,  169,  228,  216,  344,  169,
00662 
00663       223,  223,  211,  169,  342,  224,  224,  211,  225,  274,
00664       225,  216,  226,  228,  226,  341,  216,  226,  226,  223,
00665       340,  228,  337,  223,  224,  267,  267,  270,  224,  270,
00666       271,  271,  270,  270,  349,  225,  273,  267,  273,  336,
00667       267,  273,  273,  276,  276,  277,  277,  309,  309,  271,
00668       335,  310,  310,  271,  267,  334,  312,  277,  312,  267,
00669       277,  312,  312,  310,  313,  313,  310,  338,  338,  314,
00670       314,  339,  339,  333,  277,  326,  325,  349,  320,  277,
00671       310,  314,  319,  339,  314,  310,  339,  318,  317,  349,
00672       308,  307,  305,  304,  302,  301,  300,  299,  314,  298,
00673 
00674       339,  297,  295,  314,  294,  339,  372,  372,  372,  372,
00675       372,  372,  372,  373,  373,  373,  373,  373,  373,  373,
00676       374,  374,  374,  374,  374,  374,  374,  375,  293,  375,
00677       375,  375,  375,  375,  376,  292,  291,  376,  376,  376,
00678       376,  377,  377,  377,  378,  378,  380,  289,  380,  288,
00679       287,  286,  282,  281,  279,  278,  265,  264,  263,  262,
00680       260,  259,  258,  257,  256,  255,  254,  253,  252,  251,
00681       250,  249,  247,  245,  244,  243,  240,  239,  238,  237,
00682       235,  233,  231,  230,  229,  220,  219,  212,  209,  208,
00683       207,  206,  205,  204,  203,  202,  201,  200,  199,  198,
00684 
00685       197,  196,  195,  194,  191,  189,  188,  185,  184,  183,
00686       182,  181,  179,  178,  177,  176,  175,  174,  173,  172,
00687       167,  166,  155,  150,  143,  140,  139,  136,  134,  133,
00688       132,  129,  128,  127,  126,  125,  124,  123,  122,  121,
00689       120,  119,  118,  117,  116,  115,  114,  113,  111,  108,
00690       104,   98,   90,   88,   81,   75,   70,   69,   66,   65,
00691        56,   55,   54,   53,   51,   49,   47,   42,   41,   39,
00692        32,   29,   21,   18,   15,   13,    9,    4,    3,  371,
00693       371,  371,  371,  371,  371,  371,  371,  371,  371,  371,
00694       371,  371,  371,  371,  371,  371,  371,  371,  371,  371,
00695 
00696       371,  371,  371,  371,  371,  371,  371,  371,  371,  371,
00697       371,  371,  371,  371,  371,  371,  371,  371,  371,  371,
00698       371,  371,  371,  371,  371,  371,  371,  371,  371,  371,
00699       371,  371,  371,  371,  371,  371,  371,  371,  371,  371,
00700       371,  371,  371,  371,  371,  371,  371,  371,  371,  371
00701     } ;
00702 
00703 static yy_state_type yy_last_accepting_state;
00704 static char *yy_last_accepting_cpos;
00705 
00706 extern int yy_flex_debug;
00707 int yy_flex_debug = 0;
00708 
00709 /* The intent behind this definition is that it'll catch
00710  * any uses of REJECT which flex missed.
00711  */
00712 #define REJECT reject_used_but_not_detected
00713 #define yymore() yymore_used_but_not_detected
00714 #define YY_MORE_ADJ 0
00715 #define YY_RESTORE_YY_MORE_OFFSET
00716 char *yytext;
00717 #line 1 "scanner.l"
00718 /*+------- <| --------------------------------------------------------**
00719 **         A                     Clan                                **
00720 **---     /.\   -----------------------------------------------------**
00721 **   <|  [""M#                 scanner.l                             **
00722 **-   A   | #   -----------------------------------------------------**
00723 **   /.\ [""M#         First version: 30/04/2008                     **
00724 **- [""M# | #  U"U#U  -----------------------------------------------**
00725 | #  | #  \ .:/
00726 | #  | #___| #
00727 ******  | "--'     .-"  ******************************************************
00728 *     |"-"-"-"-"-#-#-##   Clan : the Chunky Loop Analyzer (experimental)     *
00729 ****  |     # ## ######  *****************************************************
00730 *      \       .::::'/                                                       *
00731 *       \      ::::'/     Copyright (C) 2008 University Paris-Sud 11         *
00732 *     :8a|    # # ##                                                         *
00733 *     ::88a      ###      This is free software; you can redistribute it     *
00734 *    ::::888a  8a ##::.   and/or modify it under the terms of the GNU Lesser *
00735 *  ::::::::888a88a[]:::   General Public License as published by the Free    *
00736 *::8:::::::::SUNDOGa8a::. Software Foundation, either version 2.1 of the     *
00737 *::::::::8::::888:Y8888:: License, or (at your option) any later version.    *
00738 *::::':::88::::888::Y88a::::::::::::...                                      *
00739 *::'::..    .   .....   ..   ...  .                                          *
00740 * This software is distributed in the hope that it will be useful, but       *
00741 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
00742 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   *
00743 * for more details.      *
00744 *                                                                            *
00745 * You should have received a copy of the GNU Lesser General Public License   *
00746 * along with software; if not, write to the Free Software Foundation, Inc.,  *
00747 * 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA                     *
00748 *                                                                            *
00749 * Clan, the Chunky Loop Analyzer                                             *
00750 * Written by Cedric Bastoul, Cedric.Bastoul@u-psud.fr                        *
00751 *                                                                            *
00752 ******************************************************************************/
00753 #line 48 "scanner.l"
00754    #include <stdlib.h>
00755    #include <string.h>
00756    
00757    #include <osl/vector.h>
00758    #include <osl/relation.h>
00759    #include <osl/relation_list.h>
00760    #include <osl/statement.h>
00761    #include <osl/scop.h>
00762    #include <parser.h>
00763    #include <clan/macros.h>
00764    #include <clan/symbol.h>
00765    #include <clan/options.h>
00766 
00767    void clan_scanner_count();
00768    int  clan_scanner(int, char*);
00769    void clan_scanner_initialize();
00770 
00771    extern int            parser_recording; 
00772    extern char*          parser_record;    
00773    extern clan_symbol_p  parser_symbol;    
00774    extern clan_options_p parser_options;   
00776    int   scanner_parsing;                  
00777    int   scanner_comment;                  
00778    char* scanner_latest_text;              
00779    char* scanner_clay;                     
00780    int   scanner_line;                     
00781    int   scanner_column;                   
00782    int   scanner_column_LALR;              
00783    int   scanner_scop_start;               
00784    int   scanner_scop_end;                 
00785    int   scanner_pragma;                   
00786    int   scanner_space;                    
00787 #define YY_NO_INPUT 1
00788 
00789 
00790 
00791 #line 792 "source/scanner.c"
00792 
00793 #define INITIAL 0
00794 #define LINECOMMENT 1
00795 #define FULLCOMMENT 2
00796 #define CLAY 3
00797 
00798 #ifndef YY_NO_UNISTD_H
00799 /* Special case for "unistd.h", since it is non-ANSI. We include it way
00800  * down here because we want the user's section 1 to have been scanned first.
00801  * The user has a chance to override it with an option.
00802  */
00803 #include <unistd.h>
00804 #endif
00805 
00806 #ifndef YY_EXTRA_TYPE
00807 #define YY_EXTRA_TYPE void *
00808 #endif
00809 
00810 static int yy_init_globals (void );
00811 
00812 /* Accessor methods to globals.
00813    These are made visible to non-reentrant scanners for convenience. */
00814 
00815 int yylex_destroy (void );
00816 
00817 int yyget_debug (void );
00818 
00819 void yyset_debug (int debug_flag  );
00820 
00821 YY_EXTRA_TYPE yyget_extra (void );
00822 
00823 void yyset_extra (YY_EXTRA_TYPE user_defined  );
00824 
00825 FILE *yyget_in (void );
00826 
00827 void yyset_in  (FILE * in_str  );
00828 
00829 FILE *yyget_out (void );
00830 
00831 void yyset_out  (FILE * out_str  );
00832 
00833 yy_size_t yyget_leng (void );
00834 
00835 char *yyget_text (void );
00836 
00837 int yyget_lineno (void );
00838 
00839 void yyset_lineno (int line_number  );
00840 
00841 /* Macros after this point can all be overridden by user definitions in
00842  * section 1.
00843  */
00844 
00845 #ifndef YY_SKIP_YYWRAP
00846 #ifdef __cplusplus
00847 extern "C" int yywrap (void );
00848 #else
00849 extern int yywrap (void );
00850 #endif
00851 #endif
00852 
00853 #ifndef yytext_ptr
00854 static void yy_flex_strncpy (char *,yyconst char *,int );
00855 #endif
00856 
00857 #ifdef YY_NEED_STRLEN
00858 static int yy_flex_strlen (yyconst char * );
00859 #endif
00860 
00861 #ifndef YY_NO_INPUT
00862 
00863 #ifdef __cplusplus
00864 static int yyinput (void );
00865 #else
00866 static int input (void );
00867 #endif
00868 
00869 #endif
00870 
00871 /* Amount of stuff to slurp up with each read. */
00872 #ifndef YY_READ_BUF_SIZE
00873 #define YY_READ_BUF_SIZE 8192
00874 #endif
00875 
00876 /* Copy whatever the last rule matched to the standard output. */
00877 #ifndef ECHO
00878 /* This used to be an fputs(), but since the string might contain NUL's,
00879  * we now use fwrite().
00880  */
00881 #define ECHO fwrite( yytext, yyleng, 1, yyout )
00882 #endif
00883 
00884 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
00885  * is returned in "result".
00886  */
00887 #ifndef YY_INPUT
00888 #define YY_INPUT(buf,result,max_size) \
00889         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
00890                 { \
00891                 int c = '*'; \
00892                 yy_size_t n; \
00893                 for ( n = 0; n < max_size && \
00894                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
00895                         buf[n] = (char) c; \
00896                 if ( c == '\n' ) \
00897                         buf[n++] = (char) c; \
00898                 if ( c == EOF && ferror( yyin ) ) \
00899                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
00900                 result = n; \
00901                 } \
00902         else \
00903                 { \
00904                 errno=0; \
00905                 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
00906                         { \
00907                         if( errno != EINTR) \
00908                                 { \
00909                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
00910                                 break; \
00911                                 } \
00912                         errno=0; \
00913                         clearerr(yyin); \
00914                         } \
00915                 }\
00916 \
00917 
00918 #endif
00919 
00920 /* No semi-colon after return; correct usage is to write "yyterminate();" -
00921  * we don't want an extra ';' after the "return" because that will cause
00922  * some compilers to complain about unreachable statements.
00923  */
00924 #ifndef yyterminate
00925 #define yyterminate() return YY_NULL
00926 #endif
00927 
00928 /* Number of entries by which start-condition stack grows. */
00929 #ifndef YY_START_STACK_INCR
00930 #define YY_START_STACK_INCR 25
00931 #endif
00932 
00933 /* Report a fatal error. */
00934 #ifndef YY_FATAL_ERROR
00935 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
00936 #endif
00937 
00938 /* end tables serialization structures and prototypes */
00939 
00940 /* Default declaration of generated scanner - a define so the user can
00941  * easily add parameters.
00942  */
00943 #ifndef YY_DECL
00944 #define YY_DECL_IS_OURS 1
00945 
00946 extern int yylex (void);
00947 
00948 #define YY_DECL int yylex (void)
00949 #endif /* !YY_DECL */
00950 
00951 /* Code executed at the beginning of each rule, after yytext and yyleng
00952  * have been set up.
00953  */
00954 #ifndef YY_USER_ACTION
00955 #define YY_USER_ACTION
00956 #endif
00957 
00958 /* Code executed at the end of each rule. */
00959 #ifndef YY_BREAK
00960 #define YY_BREAK break;
00961 #endif
00962 
00963 #define YY_RULE_SETUP \
00964         YY_USER_ACTION
00965 
00968 YY_DECL
00969 {
00970         register yy_state_type yy_current_state;
00971         register char *yy_cp, *yy_bp;
00972         register int yy_act;
00973     
00974 #line 90 "scanner.l"
00975 
00976 #line 977 "source/scanner.c"
00977 
00978         if ( !(yy_init) )
00979                 {
00980                 (yy_init) = 1;
00981 
00982 #ifdef YY_USER_INIT
00983                 YY_USER_INIT;
00984 #endif
00985 
00986                 if ( ! (yy_start) )
00987                         (yy_start) = 1; /* first start state */
00988 
00989                 if ( ! yyin )
00990                         yyin = stdin;
00991 
00992                 if ( ! yyout )
00993                         yyout = stdout;
00994 
00995                 if ( ! YY_CURRENT_BUFFER ) {
00996                         yyensure_buffer_stack ();
00997                         YY_CURRENT_BUFFER_LVALUE =
00998                                 yy_create_buffer(yyin,YY_BUF_SIZE );
00999                 }
01000 
01001                 yy_load_buffer_state( );
01002                 }
01003 
01004         while ( 1 )             /* loops until end-of-file is reached */
01005                 {
01006                 yy_cp = (yy_c_buf_p);
01007 
01008                 /* Support of yytext. */
01009                 *yy_cp = (yy_hold_char);
01010 
01011                 /* yy_bp points to the position in yy_ch_buf of the start of
01012                  * the current run.
01013                  */
01014                 yy_bp = yy_cp;
01015 
01016                 yy_current_state = (yy_start);
01017 yy_match:
01018                 do
01019                         {
01020                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
01021                         if ( yy_accept[yy_current_state] )
01022                                 {
01023                                 (yy_last_accepting_state) = yy_current_state;
01024                                 (yy_last_accepting_cpos) = yy_cp;
01025                                 }
01026                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
01027                                 {
01028                                 yy_current_state = (int) yy_def[yy_current_state];
01029                                 if ( yy_current_state >= 372 )
01030                                         yy_c = yy_meta[(unsigned int) yy_c];
01031                                 }
01032                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
01033                         ++yy_cp;
01034                         }
01035                 while ( yy_base[yy_current_state] != 580 );
01036 
01037 yy_find_action:
01038                 yy_act = yy_accept[yy_current_state];
01039                 if ( yy_act == 0 )
01040                         { /* have to back up */
01041                         yy_cp = (yy_last_accepting_cpos);
01042                         yy_current_state = (yy_last_accepting_state);
01043                         yy_act = yy_accept[yy_current_state];
01044                         }
01045 
01046                 YY_DO_BEFORE_ACTION;
01047 
01048 do_action:      /* This label is used only to access EOF actions. */
01049 
01050                 switch ( yy_act )
01051         { /* beginning of action switch */
01052                         case 0: /* must back up */
01053                         /* undo the effects of YY_DO_BEFORE_ACTION */
01054                         *yy_cp = (yy_hold_char);
01055                         yy_cp = (yy_last_accepting_cpos);
01056                         yy_current_state = (yy_last_accepting_state);
01057                         goto yy_find_action;
01058 
01059 case 1:
01060 YY_RULE_SETUP
01061 #line 91 "scanner.l"
01062 {
01063                               scanner_column += 2;
01064                               scanner_comment--;
01065                               if (scanner_comment == 0)
01066                                 BEGIN INITIAL;      /* Quit any mode */
01067                             }
01068         YY_BREAK
01069 case 2:
01070 YY_RULE_SETUP
01071 #line 97 "scanner.l"
01072 {
01073                               scanner_column += 2;
01074                               scanner_comment++;
01075                             }
01076         YY_BREAK
01077 case 3:
01078 /* rule 3 can match eol */
01079 YY_RULE_SETUP
01080 #line 101 "scanner.l"
01081 {
01082                               scanner_line++;
01083                               scanner_column = 1;
01084                               if (scanner_parsing) {
01085                                 CLAN_realloc(scanner_clay, char *,
01086                                     (strlen(scanner_clay) + 2) * sizeof(char));
01087                                 strcat(scanner_clay, yytext);
01088                               }
01089                             }
01090         YY_BREAK
01091 case 4:
01092 YY_RULE_SETUP
01093 #line 110 "scanner.l"
01094 {
01095                               scanner_column++;
01096                               if (scanner_parsing) {
01097                                 CLAN_realloc(scanner_clay, char *,
01098                                     (strlen(scanner_clay) + 2) * sizeof(char));
01099                                 strcat(scanner_clay, yytext);
01100                               }
01101                             }
01102         YY_BREAK
01103 case 5:
01104 YY_RULE_SETUP
01105 #line 118 "scanner.l"
01106 {
01107                               scanner_column += 2;
01108                               scanner_comment--;
01109                               if (scanner_comment == 0)
01110                                 BEGIN INITIAL;      /* Quit any mode */
01111                             }
01112         YY_BREAK
01113 case 6:
01114 YY_RULE_SETUP
01115 #line 124 "scanner.l"
01116 { 
01117                               scanner_column += 2;
01118                               scanner_comment++;
01119                             }
01120         YY_BREAK
01121 case 7:
01122 /* rule 7 can match eol */
01123 YY_RULE_SETUP
01124 #line 128 "scanner.l"
01125 {
01126                               scanner_line++;       /* Do nothing */
01127                               scanner_column = 1;
01128                             }
01129         YY_BREAK
01130 case 8:
01131 YY_RULE_SETUP
01132 #line 132 "scanner.l"
01133 { scanner_column++;     /* Do nothing */ }
01134         YY_BREAK
01135 case 9:
01136 /* rule 9 can match eol */
01137 YY_RULE_SETUP
01138 #line 133 "scanner.l"
01139 { 
01140                               scanner_line++;
01141                               scanner_column = 1;
01142                               BEGIN INITIAL;        /* Quit any mode */
01143                             }
01144         YY_BREAK
01145 case 10:
01146 YY_RULE_SETUP
01147 #line 138 "scanner.l"
01148 { scanner_column++;     /* Do nothing */ }
01149         YY_BREAK
01150 case 11:
01151 YY_RULE_SETUP
01152 #line 139 "scanner.l"
01153 { 
01154                               scanner_column += 2;
01155                               BEGIN LINECOMMENT;    /* Enter LINECOMMENT mode*/
01156                             }
01157         YY_BREAK
01158 case 12:
01159 /* rule 12 can match eol */
01160 YY_RULE_SETUP
01161 #line 143 "scanner.l"
01162 {
01163                               scanner_column = 1;
01164                               scanner_line++;
01165                               if (scanner_comment == 0)
01166                                 BEGIN CLAY;         /* Enter CLAY mode*/
01167                               else
01168                                 BEGIN FULLCOMMENT;  /* Enter FULLCOMMENT mode*/
01169                               scanner_comment++;
01170                             }
01171         YY_BREAK
01172 case 13:
01173 YY_RULE_SETUP
01174 #line 152 "scanner.l"
01175 {
01176                               scanner_column += 2;
01177                               BEGIN FULLCOMMENT;    /* Enter FULLCOMMENT mode*/
01178                               scanner_comment++;
01179                             }
01180         YY_BREAK
01181 case 14:
01182 YY_RULE_SETUP
01183 #line 158 "scanner.l"
01184 { return clan_scanner(AUTO, "auto"); }
01185         YY_BREAK
01186 case 15:
01187 YY_RULE_SETUP
01188 #line 159 "scanner.l"
01189 { return clan_scanner(BOOL, "_Bool"); }
01190         YY_BREAK
01191 case 16:
01192 YY_RULE_SETUP
01193 #line 160 "scanner.l"
01194 { return clan_scanner(BREAK, "break"); }
01195         YY_BREAK
01196 case 17:
01197 YY_RULE_SETUP
01198 #line 161 "scanner.l"
01199 { return clan_scanner(CASE, "case"); }
01200         YY_BREAK
01201 case 18:
01202 YY_RULE_SETUP
01203 #line 162 "scanner.l"
01204 { return clan_scanner(CHAR, "char"); }
01205         YY_BREAK
01206 case 19:
01207 YY_RULE_SETUP
01208 #line 163 "scanner.l"
01209 { return clan_scanner(COMPLEX, "_Complex"); }
01210         YY_BREAK
01211 case 20:
01212 YY_RULE_SETUP
01213 #line 164 "scanner.l"
01214 { return clan_scanner(CONST, "const"); }
01215         YY_BREAK
01216 case 21:
01217 YY_RULE_SETUP
01218 #line 165 "scanner.l"
01219 { return clan_scanner(CONTINUE, "continue"); }
01220         YY_BREAK
01221 case 22:
01222 YY_RULE_SETUP
01223 #line 166 "scanner.l"
01224 { return clan_scanner(DEFAULT, "default"); }
01225         YY_BREAK
01226 case 23:
01227 YY_RULE_SETUP
01228 #line 167 "scanner.l"
01229 { return clan_scanner(DO, "do"); }
01230         YY_BREAK
01231 case 24:
01232 YY_RULE_SETUP
01233 #line 168 "scanner.l"
01234 { return clan_scanner(DOUBLE, "double"); }
01235         YY_BREAK
01236 case 25:
01237 YY_RULE_SETUP
01238 #line 169 "scanner.l"
01239 { return clan_scanner(ELSE, "else"); }
01240         YY_BREAK
01241 case 26:
01242 YY_RULE_SETUP
01243 #line 170 "scanner.l"
01244 { return clan_scanner(ENUM, "enum"); }
01245         YY_BREAK
01246 case 27:
01247 YY_RULE_SETUP
01248 #line 171 "scanner.l"
01249 { return clan_scanner(EXTERN, "extern"); }
01250         YY_BREAK
01251 case 28:
01252 YY_RULE_SETUP
01253 #line 172 "scanner.l"
01254 { return clan_scanner(FLOAT, "float"); }
01255         YY_BREAK
01256 case 29:
01257 YY_RULE_SETUP
01258 #line 173 "scanner.l"
01259 { return clan_scanner(FOR, "for"); }
01260         YY_BREAK
01261 case 30:
01262 YY_RULE_SETUP
01263 #line 174 "scanner.l"
01264 { return clan_scanner(GOTO, "goto"); }
01265         YY_BREAK
01266 case 31:
01267 YY_RULE_SETUP
01268 #line 175 "scanner.l"
01269 { return clan_scanner(IF, "if"); }
01270         YY_BREAK
01271 case 32:
01272 YY_RULE_SETUP
01273 #line 176 "scanner.l"
01274 { return clan_scanner(IMAGINARY, "_Imaginary"); }
01275         YY_BREAK
01276 case 33:
01277 YY_RULE_SETUP
01278 #line 177 "scanner.l"
01279 { return clan_scanner(INLINE, "inline"); }
01280         YY_BREAK
01281 case 34:
01282 YY_RULE_SETUP
01283 #line 178 "scanner.l"
01284 { return clan_scanner(INT, "int"); }
01285         YY_BREAK
01286 case 35:
01287 YY_RULE_SETUP
01288 #line 179 "scanner.l"
01289 { return clan_scanner(LONG, "long"); }
01290         YY_BREAK
01291 case 36:
01292 YY_RULE_SETUP
01293 #line 180 "scanner.l"
01294 { return clan_scanner(REGISTER, "register"); }
01295         YY_BREAK
01296 case 37:
01297 YY_RULE_SETUP
01298 #line 181 "scanner.l"
01299 { return clan_scanner(RESTRICT, "restrict"); }
01300         YY_BREAK
01301 case 38:
01302 YY_RULE_SETUP
01303 #line 182 "scanner.l"
01304 { return clan_scanner(RETURN, "return"); }
01305         YY_BREAK
01306 case 39:
01307 YY_RULE_SETUP
01308 #line 183 "scanner.l"
01309 { return clan_scanner(SHORT, "short"); }
01310         YY_BREAK
01311 case 40:
01312 YY_RULE_SETUP
01313 #line 184 "scanner.l"
01314 { return clan_scanner(SIGNED, "signed"); }
01315         YY_BREAK
01316 case 41:
01317 YY_RULE_SETUP
01318 #line 185 "scanner.l"
01319 { return clan_scanner(SIZEOF, "sizeof"); }
01320         YY_BREAK
01321 case 42:
01322 YY_RULE_SETUP
01323 #line 186 "scanner.l"
01324 { return clan_scanner(STATIC, "static"); }
01325         YY_BREAK
01326 case 43:
01327 YY_RULE_SETUP
01328 #line 187 "scanner.l"
01329 { return clan_scanner(STRUCT, "struct"); }
01330         YY_BREAK
01331 case 44:
01332 YY_RULE_SETUP
01333 #line 188 "scanner.l"
01334 { return clan_scanner(SWITCH, "switch"); }
01335         YY_BREAK
01336 case 45:
01337 YY_RULE_SETUP
01338 #line 189 "scanner.l"
01339 { return clan_scanner(TYPEDEF, "typedef"); }
01340         YY_BREAK
01341 case 46:
01342 YY_RULE_SETUP
01343 #line 190 "scanner.l"
01344 { return clan_scanner(UNION, "union"); }
01345         YY_BREAK
01346 case 47:
01347 YY_RULE_SETUP
01348 #line 191 "scanner.l"
01349 { return clan_scanner(UNSIGNED, "unsigned"); }
01350         YY_BREAK
01351 case 48:
01352 YY_RULE_SETUP
01353 #line 192 "scanner.l"
01354 { return clan_scanner(VOID, "void"); }
01355         YY_BREAK
01356 case 49:
01357 YY_RULE_SETUP
01358 #line 193 "scanner.l"
01359 { return clan_scanner(VOLATILE, "volatile"); }
01360         YY_BREAK
01361 case 50:
01362 YY_RULE_SETUP
01363 #line 194 "scanner.l"
01364 { return clan_scanner(WHILE, "while"); }
01365         YY_BREAK
01366 case 51:
01367 YY_RULE_SETUP
01368 #line 195 "scanner.l"
01369 { return clan_scanner(MIN, "min"); }
01370         YY_BREAK
01371 case 52:
01372 YY_RULE_SETUP
01373 #line 196 "scanner.l"
01374 { return clan_scanner(MAX, "max"); }
01375         YY_BREAK
01376 case 53:
01377 YY_RULE_SETUP
01378 #line 197 "scanner.l"
01379 { return clan_scanner(CEILD, "ceild"); }
01380         YY_BREAK
01381 case 54:
01382 YY_RULE_SETUP
01383 #line 198 "scanner.l"
01384 { return clan_scanner(FLOORD, "floord"); }
01385         YY_BREAK
01386 case 55:
01387 YY_RULE_SETUP
01388 #line 200 "scanner.l"
01389 { 
01390                               clan_scanner_count();
01391                               scanner_scop_start = scanner_line;
01392                               if (parser_options->autoscop) {
01393                                 scanner_pragma = CLAN_TRUE;
01394                                 scanner_parsing = CLAN_FALSE;
01395                                 CLAN_debug("pragma scop: stop parsing");
01396                                 return PRAGMA; // Force a parse error.
01397                               } else {
01398                                 scanner_parsing = CLAN_TRUE;
01399                                 CLAN_debug("pragma scop: start parsing");
01400                               }
01401                             }
01402         YY_BREAK
01403 case 56:
01404 YY_RULE_SETUP
01405 #line 213 "scanner.l"
01406 {
01407                               clan_scanner_count();
01408                               scanner_scop_end = scanner_line;
01409                               if (parser_options->autoscop) {
01410                                 scanner_pragma = CLAN_FALSE;
01411                                 scanner_parsing = CLAN_TRUE;
01412                                 CLAN_debug("pragma endscop: start parsing");
01413                                 return PRAGMA; // Force a parse error.
01414                               } else {
01415                                 scanner_parsing = CLAN_FALSE;
01416                                 CLAN_debug("pragma endscop: stop parsing");
01417                                 return IGNORE;
01418                               }
01419                             }
01420         YY_BREAK
01421 case 57:
01422 YY_RULE_SETUP
01423 #line 228 "scanner.l"
01424 {
01425                               if (scanner_parsing == CLAN_TRUE) { 
01426                                 CLAN_strdup(yylval.symbol, yytext);
01427                               }
01428                               return clan_scanner(ID, "ID");
01429                             }
01430         YY_BREAK
01431 case 58:
01432 YY_RULE_SETUP
01433 #line 234 "scanner.l"
01434 {
01435                               yylval.value = atoi(yytext) ;
01436                               return clan_scanner(INTEGER, "INTEGER");
01437                             }
01438         YY_BREAK
01439 case 59:
01440 YY_RULE_SETUP
01441 #line 238 "scanner.l"
01442 { return clan_scanner(CONSTANT, "CONSTANT_0"); }
01443         YY_BREAK
01444 case 60:
01445 YY_RULE_SETUP
01446 #line 239 "scanner.l"
01447 { return clan_scanner(CONSTANT, "CONSTANT_1"); }
01448         YY_BREAK
01449 case 61:
01450 YY_RULE_SETUP
01451 #line 240 "scanner.l"
01452 { return clan_scanner(CONSTANT, "CONSTANT_2"); }
01453         YY_BREAK
01454 case 62:
01455 YY_RULE_SETUP
01456 #line 241 "scanner.l"
01457 { return clan_scanner(CONSTANT, "CONSTANT_3"); }
01458         YY_BREAK
01459 case 63:
01460 YY_RULE_SETUP
01461 #line 242 "scanner.l"
01462 { return clan_scanner(CONSTANT, "CONSTANT_4"); }
01463         YY_BREAK
01464 case 64:
01465 YY_RULE_SETUP
01466 #line 243 "scanner.l"
01467 { return clan_scanner(CONSTANT, "CONSTANT_5"); }
01468         YY_BREAK
01469 case 65:
01470 YY_RULE_SETUP
01471 #line 244 "scanner.l"
01472 { return clan_scanner(CONSTANT, "CONSTANT_6"); }
01473         YY_BREAK
01474 case 66:
01475 YY_RULE_SETUP
01476 #line 245 "scanner.l"
01477 { return clan_scanner(CONSTANT, "CONSTANT_7"); }
01478         YY_BREAK
01479 case 67:
01480 YY_RULE_SETUP
01481 #line 246 "scanner.l"
01482 { return clan_scanner(CONSTANT, "CONSTANT_8"); }
01483         YY_BREAK
01484 case 68:
01485 YY_RULE_SETUP
01486 #line 247 "scanner.l"
01487 { return clan_scanner(CONSTANT, "CONSTANT_9"); }
01488         YY_BREAK
01489 case 69:
01490 YY_RULE_SETUP
01491 #line 248 "scanner.l"
01492 { return clan_scanner(STRING_LITERAL, "STRING"); }
01493         YY_BREAK
01494 case 70:
01495 YY_RULE_SETUP
01496 #line 250 "scanner.l"
01497 { return clan_scanner(ELLIPSIS, "..."); }
01498         YY_BREAK
01499 case 71:
01500 YY_RULE_SETUP
01501 #line 251 "scanner.l"
01502 { return clan_scanner(RIGHT_ASSIGN, ">>="); }
01503         YY_BREAK
01504 case 72:
01505 YY_RULE_SETUP
01506 #line 252 "scanner.l"
01507 { return clan_scanner(LEFT_ASSIGN, "<<="); }
01508         YY_BREAK
01509 case 73:
01510 YY_RULE_SETUP
01511 #line 253 "scanner.l"
01512 { return clan_scanner(ADD_ASSIGN, "+="); }
01513         YY_BREAK
01514 case 74:
01515 YY_RULE_SETUP
01516 #line 254 "scanner.l"
01517 { return clan_scanner(SUB_ASSIGN, "-="); }
01518         YY_BREAK
01519 case 75:
01520 YY_RULE_SETUP
01521 #line 255 "scanner.l"
01522 { return clan_scanner(MUL_ASSIGN, "*="); }
01523         YY_BREAK
01524 case 76:
01525 YY_RULE_SETUP
01526 #line 256 "scanner.l"
01527 { return clan_scanner(DIV_ASSIGN, "/="); }
01528         YY_BREAK
01529 case 77:
01530 YY_RULE_SETUP
01531 #line 257 "scanner.l"
01532 { return clan_scanner(MOD_ASSIGN, "%="); }
01533         YY_BREAK
01534 case 78:
01535 YY_RULE_SETUP
01536 #line 258 "scanner.l"
01537 { return clan_scanner(AND_ASSIGN, "&="); }
01538         YY_BREAK
01539 case 79:
01540 YY_RULE_SETUP
01541 #line 259 "scanner.l"
01542 { return clan_scanner(XOR_ASSIGN, "^="); }
01543         YY_BREAK
01544 case 80:
01545 YY_RULE_SETUP
01546 #line 260 "scanner.l"
01547 { return clan_scanner(OR_ASSIGN, "|="); }
01548         YY_BREAK
01549 case 81:
01550 YY_RULE_SETUP
01551 #line 261 "scanner.l"
01552 { return clan_scanner(RIGHT_OP, ">>"); }
01553         YY_BREAK
01554 case 82:
01555 YY_RULE_SETUP
01556 #line 262 "scanner.l"
01557 { return clan_scanner(LEFT_OP, "<<"); }
01558         YY_BREAK
01559 case 83:
01560 YY_RULE_SETUP
01561 #line 263 "scanner.l"
01562 { return clan_scanner(INC_OP, "++"); }
01563         YY_BREAK
01564 case 84:
01565 YY_RULE_SETUP
01566 #line 264 "scanner.l"
01567 { return clan_scanner(DEC_OP, "--"); }
01568         YY_BREAK
01569 case 85:
01570 YY_RULE_SETUP
01571 #line 265 "scanner.l"
01572 { return clan_scanner(PTR_OP, "->"); }
01573         YY_BREAK
01574 case 86:
01575 YY_RULE_SETUP
01576 #line 266 "scanner.l"
01577 { return clan_scanner(AND_OP, "&&"); }
01578         YY_BREAK
01579 case 87:
01580 YY_RULE_SETUP
01581 #line 267 "scanner.l"
01582 { return clan_scanner(OR_OP, "||"); }
01583         YY_BREAK
01584 case 88:
01585 YY_RULE_SETUP
01586 #line 268 "scanner.l"
01587 { return clan_scanner(LE_OP, "<="); }
01588         YY_BREAK
01589 case 89:
01590 YY_RULE_SETUP
01591 #line 269 "scanner.l"
01592 { return clan_scanner(GE_OP, ">="); }
01593         YY_BREAK
01594 case 90:
01595 YY_RULE_SETUP
01596 #line 270 "scanner.l"
01597 { return clan_scanner(EQ_OP, "=="); }
01598         YY_BREAK
01599 case 91:
01600 YY_RULE_SETUP
01601 #line 271 "scanner.l"
01602 { return clan_scanner(NE_OP, "!="); }
01603         YY_BREAK
01604 case 92:
01605 YY_RULE_SETUP
01606 #line 272 "scanner.l"
01607 { return clan_scanner(';', ";"); }
01608         YY_BREAK
01609 case 93:
01610 YY_RULE_SETUP
01611 #line 273 "scanner.l"
01612 { return clan_scanner('{', "{"); }
01613         YY_BREAK
01614 case 94:
01615 YY_RULE_SETUP
01616 #line 274 "scanner.l"
01617 { return clan_scanner('}', "}"); }
01618         YY_BREAK
01619 case 95:
01620 YY_RULE_SETUP
01621 #line 275 "scanner.l"
01622 { return clan_scanner(',', ","); }
01623         YY_BREAK
01624 case 96:
01625 YY_RULE_SETUP
01626 #line 276 "scanner.l"
01627 { return clan_scanner(':', ":"); }
01628         YY_BREAK
01629 case 97:
01630 YY_RULE_SETUP
01631 #line 277 "scanner.l"
01632 { return clan_scanner('=', "="); }
01633         YY_BREAK
01634 case 98:
01635 YY_RULE_SETUP
01636 #line 278 "scanner.l"
01637 { return clan_scanner('(', "("); }
01638         YY_BREAK
01639 case 99:
01640 YY_RULE_SETUP
01641 #line 279 "scanner.l"
01642 { return clan_scanner(')', ")"); }
01643         YY_BREAK
01644 case 100:
01645 YY_RULE_SETUP
01646 #line 280 "scanner.l"
01647 { return clan_scanner('[', "["); }
01648         YY_BREAK
01649 case 101:
01650 YY_RULE_SETUP
01651 #line 281 "scanner.l"
01652 { return clan_scanner(']', "]"); }
01653         YY_BREAK
01654 case 102:
01655 YY_RULE_SETUP
01656 #line 282 "scanner.l"
01657 { return clan_scanner('.', "."); }
01658         YY_BREAK
01659 case 103:
01660 YY_RULE_SETUP
01661 #line 283 "scanner.l"
01662 { return clan_scanner('&', "&"); }
01663         YY_BREAK
01664 case 104:
01665 YY_RULE_SETUP
01666 #line 284 "scanner.l"
01667 { return clan_scanner('!', "!"); }
01668         YY_BREAK
01669 case 105:
01670 YY_RULE_SETUP
01671 #line 285 "scanner.l"
01672 { return clan_scanner('~', "~"); }
01673         YY_BREAK
01674 case 106:
01675 YY_RULE_SETUP
01676 #line 286 "scanner.l"
01677 { return clan_scanner('-', "-"); }
01678         YY_BREAK
01679 case 107:
01680 YY_RULE_SETUP
01681 #line 287 "scanner.l"
01682 { return clan_scanner('+', "+"); }
01683         YY_BREAK
01684 case 108:
01685 YY_RULE_SETUP
01686 #line 288 "scanner.l"
01687 { return clan_scanner('*', "*"); }
01688         YY_BREAK
01689 case 109:
01690 YY_RULE_SETUP
01691 #line 289 "scanner.l"
01692 { return clan_scanner('/', "/"); }
01693         YY_BREAK
01694 case 110:
01695 YY_RULE_SETUP
01696 #line 290 "scanner.l"
01697 { return clan_scanner('%', "%"); }
01698         YY_BREAK
01699 case 111:
01700 YY_RULE_SETUP
01701 #line 291 "scanner.l"
01702 { return clan_scanner('<', "<"); }
01703         YY_BREAK
01704 case 112:
01705 YY_RULE_SETUP
01706 #line 292 "scanner.l"
01707 { return clan_scanner('>', ">"); }
01708         YY_BREAK
01709 case 113:
01710 YY_RULE_SETUP
01711 #line 293 "scanner.l"
01712 { return clan_scanner('^', "^"); }
01713         YY_BREAK
01714 case 114:
01715 YY_RULE_SETUP
01716 #line 294 "scanner.l"
01717 { return clan_scanner('|', "|"); }
01718         YY_BREAK
01719 case 115:
01720 YY_RULE_SETUP
01721 #line 295 "scanner.l"
01722 { return clan_scanner('?', "?"); }
01723         YY_BREAK
01724 case 116:
01725 /* rule 116 can match eol */
01726 YY_RULE_SETUP
01727 #line 296 "scanner.l"
01728 { clan_scanner_count();
01729                               // A list of separators is translated to a
01730                               // single space. We proceed one by one to
01731                               // compute precise coordinates.
01732                               if (parser_record &&
01733                                   parser_recording &&
01734                                   !scanner_space) {
01735                                 char* space;
01736                                 CLAN_malloc(space, char*, 2);
01737                                 CLAN_realloc(parser_record, char*,
01738                                              (strlen(parser_record) + 2) *
01739                                              sizeof(char));
01740                                 space[0] = ' ';
01741                                 space[1] = '\0';
01742                                 // FIXME: just to please valgrind, I'm not
01743                                 // using strcat(parser_record, " "). Strange.
01744                                 strcat(parser_record, space);
01745                                 free(space);
01746                                 scanner_space = CLAN_TRUE;
01747                               }
01748                             }
01749         YY_BREAK
01750 case 117:
01751 YY_RULE_SETUP
01752 #line 317 "scanner.l"
01753 { 
01754                               scanner_column++;
01755                               CLAN_debug("unmatched characters by Lex");
01756                             }
01757         YY_BREAK
01758 case 118:
01759 YY_RULE_SETUP
01760 #line 321 "scanner.l"
01761 ECHO;
01762         YY_BREAK
01763 #line 1764 "source/scanner.c"
01764 case YY_STATE_EOF(INITIAL):
01765 case YY_STATE_EOF(LINECOMMENT):
01766 case YY_STATE_EOF(FULLCOMMENT):
01767 case YY_STATE_EOF(CLAY):
01768         yyterminate();
01769 
01770         case YY_END_OF_BUFFER:
01771                 {
01772                 /* Amount of text matched not including the EOB char. */
01773                 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
01774 
01775                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
01776                 *yy_cp = (yy_hold_char);
01777                 YY_RESTORE_YY_MORE_OFFSET
01778 
01779                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
01780                         {
01781                         /* We're scanning a new file or input source.  It's
01782                          * possible that this happened because the user
01783                          * just pointed yyin at a new source and called
01784                          * yylex().  If so, then we have to assure
01785                          * consistency between YY_CURRENT_BUFFER and our
01786                          * globals.  Here is the right place to do so, because
01787                          * this is the first action (other than possibly a
01788                          * back-up) that will match for the new input source.
01789                          */
01790                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
01791                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
01792                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
01793                         }
01794 
01795                 /* Note that here we test for yy_c_buf_p "<=" to the position
01796                  * of the first EOB in the buffer, since yy_c_buf_p will
01797                  * already have been incremented past the NUL character
01798                  * (since all states make transitions on EOB to the
01799                  * end-of-buffer state).  Contrast this with the test
01800                  * in input().
01801                  */
01802                 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
01803                         { /* This was really a NUL. */
01804                         yy_state_type yy_next_state;
01805 
01806                         (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
01807 
01808                         yy_current_state = yy_get_previous_state(  );
01809 
01810                         /* Okay, we're now positioned to make the NUL
01811                          * transition.  We couldn't have
01812                          * yy_get_previous_state() go ahead and do it
01813                          * for us because it doesn't know how to deal
01814                          * with the possibility of jamming (and we don't
01815                          * want to build jamming into it because then it
01816                          * will run more slowly).
01817                          */
01818 
01819                         yy_next_state = yy_try_NUL_trans( yy_current_state );
01820 
01821                         yy_bp = (yytext_ptr) + YY_MORE_ADJ;
01822 
01823                         if ( yy_next_state )
01824                                 {
01825                                 /* Consume the NUL. */
01826                                 yy_cp = ++(yy_c_buf_p);
01827                                 yy_current_state = yy_next_state;
01828                                 goto yy_match;
01829                                 }
01830 
01831                         else
01832                                 {
01833                                 yy_cp = (yy_c_buf_p);
01834                                 goto yy_find_action;
01835                                 }
01836                         }
01837 
01838                 else switch ( yy_get_next_buffer(  ) )
01839                         {
01840                         case EOB_ACT_END_OF_FILE:
01841                                 {
01842                                 (yy_did_buffer_switch_on_eof) = 0;
01843 
01844                                 if ( yywrap( ) )
01845                                         {
01846                                         /* Note: because we've taken care in
01847                                          * yy_get_next_buffer() to have set up
01848                                          * yytext, we can now set up
01849                                          * yy_c_buf_p so that if some total
01850                                          * hoser (like flex itself) wants to
01851                                          * call the scanner after we return the
01852                                          * YY_NULL, it'll still work - another
01853                                          * YY_NULL will get returned.
01854                                          */
01855                                         (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
01856 
01857                                         yy_act = YY_STATE_EOF(YY_START);
01858                                         goto do_action;
01859                                         }
01860 
01861                                 else
01862                                         {
01863                                         if ( ! (yy_did_buffer_switch_on_eof) )
01864                                                 YY_NEW_FILE;
01865                                         }
01866                                 break;
01867                                 }
01868 
01869                         case EOB_ACT_CONTINUE_SCAN:
01870                                 (yy_c_buf_p) =
01871                                         (yytext_ptr) + yy_amount_of_matched_text;
01872 
01873                                 yy_current_state = yy_get_previous_state(  );
01874 
01875                                 yy_cp = (yy_c_buf_p);
01876                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
01877                                 goto yy_match;
01878 
01879                         case EOB_ACT_LAST_MATCH:
01880                                 (yy_c_buf_p) =
01881                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
01882 
01883                                 yy_current_state = yy_get_previous_state(  );
01884 
01885                                 yy_cp = (yy_c_buf_p);
01886                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
01887                                 goto yy_find_action;
01888                         }
01889                 break;
01890                 }
01891 
01892         default:
01893                 YY_FATAL_ERROR(
01894                         "fatal flex scanner internal error--no action found" );
01895         } /* end of action switch */
01896                 } /* end of scanning one token */
01897 } /* end of yylex */
01898 
01899 /* yy_get_next_buffer - try to read in a new buffer
01900  *
01901  * Returns a code representing an action:
01902  *      EOB_ACT_LAST_MATCH -
01903  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
01904  *      EOB_ACT_END_OF_FILE - end of file
01905  */
01906 static int yy_get_next_buffer (void)
01907 {
01908         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
01909         register char *source = (yytext_ptr);
01910         register int number_to_move, i;
01911         int ret_val;
01912 
01913         if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
01914                 YY_FATAL_ERROR(
01915                 "fatal flex scanner internal error--end of buffer missed" );
01916 
01917         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
01918                 { /* Don't try to fill the buffer, so this is an EOF. */
01919                 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
01920                         {
01921                         /* We matched a single character, the EOB, so
01922                          * treat this as a final EOF.
01923                          */
01924                         return EOB_ACT_END_OF_FILE;
01925                         }
01926 
01927                 else
01928                         {
01929                         /* We matched some text prior to the EOB, first
01930                          * process it.
01931                          */
01932                         return EOB_ACT_LAST_MATCH;
01933                         }
01934                 }
01935 
01936         /* Try to read more data. */
01937 
01938         /* First move last chars to start of buffer. */
01939         number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
01940 
01941         for ( i = 0; i < number_to_move; ++i )
01942                 *(dest++) = *(source++);
01943 
01944         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
01945                 /* don't do the read, it's not guaranteed to return an EOF,
01946                  * just force an EOF
01947                  */
01948                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
01949 
01950         else
01951                 {
01952                         yy_size_t num_to_read =
01953                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
01954 
01955                 while ( num_to_read <= 0 )
01956                         { /* Not enough room in the buffer - grow it. */
01957 
01958                         /* just a shorter name for the current buffer */
01959                         YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
01960 
01961                         int yy_c_buf_p_offset =
01962                                 (int) ((yy_c_buf_p) - b->yy_ch_buf);
01963 
01964                         if ( b->yy_is_our_buffer )
01965                                 {
01966                                 yy_size_t new_size = b->yy_buf_size * 2;
01967 
01968                                 if ( new_size <= 0 )
01969                                         b->yy_buf_size += b->yy_buf_size / 8;
01970                                 else
01971                                         b->yy_buf_size *= 2;
01972 
01973                                 b->yy_ch_buf = (char *)
01974                                         /* Include room in for 2 EOB chars. */
01975                                         yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
01976                                 }
01977                         else
01978                                 /* Can't grow it, we don't own it. */
01979                                 b->yy_ch_buf = 0;
01980 
01981                         if ( ! b->yy_ch_buf )
01982                                 YY_FATAL_ERROR(
01983                                 "fatal error - scanner input buffer overflow" );
01984 
01985                         (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
01986 
01987                         num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
01988                                                 number_to_move - 1;
01989 
01990                         }
01991 
01992                 if ( num_to_read > YY_READ_BUF_SIZE )
01993                         num_to_read = YY_READ_BUF_SIZE;
01994 
01995                 /* Read in more data. */
01996                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
01997                         (yy_n_chars), num_to_read );
01998 
01999                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
02000                 }
02001 
02002         if ( (yy_n_chars) == 0 )
02003                 {
02004                 if ( number_to_move == YY_MORE_ADJ )
02005                         {
02006                         ret_val = EOB_ACT_END_OF_FILE;
02007                         yyrestart(yyin  );
02008                         }
02009 
02010                 else
02011                         {
02012                         ret_val = EOB_ACT_LAST_MATCH;
02013                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
02014                                 YY_BUFFER_EOF_PENDING;
02015                         }
02016                 }
02017 
02018         else
02019                 ret_val = EOB_ACT_CONTINUE_SCAN;
02020 
02021         if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
02022                 /* Extend the array by 50%, plus the number we really need. */
02023                 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
02024                 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
02025                 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
02026                         YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
02027         }
02028 
02029         (yy_n_chars) += number_to_move;
02030         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
02031         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
02032 
02033         (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
02034 
02035         return ret_val;
02036 }
02037 
02038 /* yy_get_previous_state - get the state just before the EOB char was reached */
02039 
02040     static yy_state_type yy_get_previous_state (void)
02041 {
02042         register yy_state_type yy_current_state;
02043         register char *yy_cp;
02044     
02045         yy_current_state = (yy_start);
02046 
02047         for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
02048                 {
02049                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
02050                 if ( yy_accept[yy_current_state] )
02051                         {
02052                         (yy_last_accepting_state) = yy_current_state;
02053                         (yy_last_accepting_cpos) = yy_cp;
02054                         }
02055                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
02056                         {
02057                         yy_current_state = (int) yy_def[yy_current_state];
02058                         if ( yy_current_state >= 372 )
02059                                 yy_c = yy_meta[(unsigned int) yy_c];
02060                         }
02061                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
02062                 }
02063 
02064         return yy_current_state;
02065 }
02066 
02067 /* yy_try_NUL_trans - try to make a transition on the NUL character
02068  *
02069  * synopsis
02070  *      next_state = yy_try_NUL_trans( current_state );
02071  */
02072     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
02073 {
02074         register int yy_is_jam;
02075         register char *yy_cp = (yy_c_buf_p);
02076 
02077         register YY_CHAR yy_c = 1;
02078         if ( yy_accept[yy_current_state] )
02079                 {
02080                 (yy_last_accepting_state) = yy_current_state;
02081                 (yy_last_accepting_cpos) = yy_cp;
02082                 }
02083         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
02084                 {
02085                 yy_current_state = (int) yy_def[yy_current_state];
02086                 if ( yy_current_state >= 372 )
02087                         yy_c = yy_meta[(unsigned int) yy_c];
02088                 }
02089         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
02090         yy_is_jam = (yy_current_state == 371);
02091 
02092         return yy_is_jam ? 0 : yy_current_state;
02093 }
02094 
02095 #ifndef YY_NO_INPUT
02096 #ifdef __cplusplus
02097     static int yyinput (void)
02098 #else
02099     static int input  (void)
02100 #endif
02101 
02102 {
02103         int c;
02104     
02105         *(yy_c_buf_p) = (yy_hold_char);
02106 
02107         if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
02108                 {
02109                 /* yy_c_buf_p now points to the character we want to return.
02110                  * If this occurs *before* the EOB characters, then it's a
02111                  * valid NUL; if not, then we've hit the end of the buffer.
02112                  */
02113                 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
02114                         /* This was really a NUL. */
02115                         *(yy_c_buf_p) = '\0';
02116 
02117                 else
02118                         { /* need more input */
02119                         yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
02120                         ++(yy_c_buf_p);
02121 
02122                         switch ( yy_get_next_buffer(  ) )
02123                                 {
02124                                 case EOB_ACT_LAST_MATCH:
02125                                         /* This happens because yy_g_n_b()
02126                                          * sees that we've accumulated a
02127                                          * token and flags that we need to
02128                                          * try matching the token before
02129                                          * proceeding.  But for input(),
02130                                          * there's no matching to consider.
02131                                          * So convert the EOB_ACT_LAST_MATCH
02132                                          * to EOB_ACT_END_OF_FILE.
02133                                          */
02134 
02135                                         /* Reset buffer status. */
02136                                         yyrestart(yyin );
02137 
02138                                         /*FALLTHROUGH*/
02139 
02140                                 case EOB_ACT_END_OF_FILE:
02141                                         {
02142                                         if ( yywrap( ) )
02143                                                 return 0;
02144 
02145                                         if ( ! (yy_did_buffer_switch_on_eof) )
02146                                                 YY_NEW_FILE;
02147 #ifdef __cplusplus
02148                                         return yyinput();
02149 #else
02150                                         return input();
02151 #endif
02152                                         }
02153 
02154                                 case EOB_ACT_CONTINUE_SCAN:
02155                                         (yy_c_buf_p) = (yytext_ptr) + offset;
02156                                         break;
02157                                 }
02158                         }
02159                 }
02160 
02161         c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
02162         *(yy_c_buf_p) = '\0';   /* preserve yytext */
02163         (yy_hold_char) = *++(yy_c_buf_p);
02164 
02165         return c;
02166 }
02167 #endif  /* ifndef YY_NO_INPUT */
02168 
02174     void yyrestart  (FILE * input_file )
02175 {
02176     
02177         if ( ! YY_CURRENT_BUFFER ){
02178         yyensure_buffer_stack ();
02179                 YY_CURRENT_BUFFER_LVALUE =
02180             yy_create_buffer(yyin,YY_BUF_SIZE );
02181         }
02182 
02183         yy_init_buffer(YY_CURRENT_BUFFER,input_file );
02184         yy_load_buffer_state( );
02185 }
02186 
02191     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
02192 {
02193     
02194         /* TODO. We should be able to replace this entire function body
02195          * with
02196          *              yypop_buffer_state();
02197          *              yypush_buffer_state(new_buffer);
02198      */
02199         yyensure_buffer_stack ();
02200         if ( YY_CURRENT_BUFFER == new_buffer )
02201                 return;
02202 
02203         if ( YY_CURRENT_BUFFER )
02204                 {
02205                 /* Flush out information for old buffer. */
02206                 *(yy_c_buf_p) = (yy_hold_char);
02207                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
02208                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
02209                 }
02210 
02211         YY_CURRENT_BUFFER_LVALUE = new_buffer;
02212         yy_load_buffer_state( );
02213 
02214         /* We don't actually know whether we did this switch during
02215          * EOF (yywrap()) processing, but the only time this flag
02216          * is looked at is after yywrap() is called, so it's safe
02217          * to go ahead and always set it.
02218          */
02219         (yy_did_buffer_switch_on_eof) = 1;
02220 }
02221 
02222 static void yy_load_buffer_state  (void)
02223 {
02224         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
02225         (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
02226         yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
02227         (yy_hold_char) = *(yy_c_buf_p);
02228 }
02229 
02236     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
02237 {
02238         YY_BUFFER_STATE b;
02239     
02240         b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
02241         if ( ! b )
02242                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
02243 
02244         b->yy_buf_size = size;
02245 
02246         /* yy_ch_buf has to be 2 characters longer than the size given because
02247          * we need to put in 2 end-of-buffer characters.
02248          */
02249         b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
02250         if ( ! b->yy_ch_buf )
02251                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
02252 
02253         b->yy_is_our_buffer = 1;
02254 
02255         yy_init_buffer(b,file );
02256 
02257         return b;
02258 }
02259 
02264     void yy_delete_buffer (YY_BUFFER_STATE  b )
02265 {
02266     
02267         if ( ! b )
02268                 return;
02269 
02270         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
02271                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
02272 
02273         if ( b->yy_is_our_buffer )
02274                 yyfree((void *) b->yy_ch_buf  );
02275 
02276         yyfree((void *) b  );
02277 }
02278 
02279 #ifndef __cplusplus
02280 extern int isatty (int );
02281 #endif /* __cplusplus */
02282     
02283 /* Initializes or reinitializes a buffer.
02284  * This function is sometimes called more than once on the same buffer,
02285  * such as during a yyrestart() or at EOF.
02286  */
02287     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
02288 
02289 {
02290         int oerrno = errno;
02291     
02292         yy_flush_buffer(b );
02293 
02294         b->yy_input_file = file;
02295         b->yy_fill_buffer = 1;
02296 
02297     /* If b is the current buffer, then yy_init_buffer was _probably_
02298      * called from yyrestart() or through yy_get_next_buffer.
02299      * In that case, we don't want to reset the lineno or column.
02300      */
02301     if (b != YY_CURRENT_BUFFER){
02302         b->yy_bs_lineno = 1;
02303         b->yy_bs_column = 0;
02304     }
02305 
02306         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
02307     
02308         errno = oerrno;
02309 }
02310 
02315     void yy_flush_buffer (YY_BUFFER_STATE  b )
02316 {
02317         if ( ! b )
02318                 return;
02319 
02320         b->yy_n_chars = 0;
02321 
02322         /* We always need two end-of-buffer characters.  The first causes
02323          * a transition to the end-of-buffer state.  The second causes
02324          * a jam in that state.
02325          */
02326         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
02327         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
02328 
02329         b->yy_buf_pos = &b->yy_ch_buf[0];
02330 
02331         b->yy_at_bol = 1;
02332         b->yy_buffer_status = YY_BUFFER_NEW;
02333 
02334         if ( b == YY_CURRENT_BUFFER )
02335                 yy_load_buffer_state( );
02336 }
02337 
02344 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
02345 {
02346         if (new_buffer == NULL)
02347                 return;
02348 
02349         yyensure_buffer_stack();
02350 
02351         /* This block is copied from yy_switch_to_buffer. */
02352         if ( YY_CURRENT_BUFFER )
02353                 {
02354                 /* Flush out information for old buffer. */
02355                 *(yy_c_buf_p) = (yy_hold_char);
02356                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
02357                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
02358                 }
02359 
02360         /* Only push if top exists. Otherwise, replace top. */
02361         if (YY_CURRENT_BUFFER)
02362                 (yy_buffer_stack_top)++;
02363         YY_CURRENT_BUFFER_LVALUE = new_buffer;
02364 
02365         /* copied from yy_switch_to_buffer. */
02366         yy_load_buffer_state( );
02367         (yy_did_buffer_switch_on_eof) = 1;
02368 }
02369 
02374 void yypop_buffer_state (void)
02375 {
02376         if (!YY_CURRENT_BUFFER)
02377                 return;
02378 
02379         yy_delete_buffer(YY_CURRENT_BUFFER );
02380         YY_CURRENT_BUFFER_LVALUE = NULL;
02381         if ((yy_buffer_stack_top) > 0)
02382                 --(yy_buffer_stack_top);
02383 
02384         if (YY_CURRENT_BUFFER) {
02385                 yy_load_buffer_state( );
02386                 (yy_did_buffer_switch_on_eof) = 1;
02387         }
02388 }
02389 
02390 /* Allocates the stack if it does not exist.
02391  *  Guarantees space for at least one push.
02392  */
02393 static void yyensure_buffer_stack (void)
02394 {
02395         yy_size_t num_to_alloc;
02396     
02397         if (!(yy_buffer_stack)) {
02398 
02399                 /* First allocation is just for 2 elements, since we don't know if this
02400                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
02401                  * immediate realloc on the next call.
02402          */
02403                 num_to_alloc = 1;
02404                 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
02405                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
02406                                                                 );
02407                 if ( ! (yy_buffer_stack) )
02408                         YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
02409                                                                   
02410                 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
02411                                 
02412                 (yy_buffer_stack_max) = num_to_alloc;
02413                 (yy_buffer_stack_top) = 0;
02414                 return;
02415         }
02416 
02417         if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
02418 
02419                 /* Increase the buffer to prepare for a possible push. */
02420                 int grow_size = 8 /* arbitrary grow size */;
02421 
02422                 num_to_alloc = (yy_buffer_stack_max) + grow_size;
02423                 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
02424                                                                 ((yy_buffer_stack),
02425                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
02426                                                                 );
02427                 if ( ! (yy_buffer_stack) )
02428                         YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
02429 
02430                 /* zero only the new slots.*/
02431                 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
02432                 (yy_buffer_stack_max) = num_to_alloc;
02433         }
02434 }
02435 
02442 YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
02443 {
02444         YY_BUFFER_STATE b;
02445     
02446         if ( size < 2 ||
02447              base[size-2] != YY_END_OF_BUFFER_CHAR ||
02448              base[size-1] != YY_END_OF_BUFFER_CHAR )
02449                 /* They forgot to leave room for the EOB's. */
02450                 return 0;
02451 
02452         b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
02453         if ( ! b )
02454                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
02455 
02456         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
02457         b->yy_buf_pos = b->yy_ch_buf = base;
02458         b->yy_is_our_buffer = 0;
02459         b->yy_input_file = 0;
02460         b->yy_n_chars = b->yy_buf_size;
02461         b->yy_is_interactive = 0;
02462         b->yy_at_bol = 1;
02463         b->yy_fill_buffer = 0;
02464         b->yy_buffer_status = YY_BUFFER_NEW;
02465 
02466         yy_switch_to_buffer(b  );
02467 
02468         return b;
02469 }
02470 
02479 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
02480 {
02481     
02482         return yy_scan_bytes(yystr,strlen(yystr) );
02483 }
02484 
02492 YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
02493 {
02494         YY_BUFFER_STATE b;
02495         char *buf;
02496         yy_size_t n, i;
02497     
02498         /* Get memory for full buffer, including space for trailing EOB's. */
02499         n = _yybytes_len + 2;
02500         buf = (char *) yyalloc(n  );
02501         if ( ! buf )
02502                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
02503 
02504         for ( i = 0; i < _yybytes_len; ++i )
02505                 buf[i] = yybytes[i];
02506 
02507         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
02508 
02509         b = yy_scan_buffer(buf,n );
02510         if ( ! b )
02511                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
02512 
02513         /* It's okay to grow etc. this buffer, and we should throw it
02514          * away when we're done.
02515          */
02516         b->yy_is_our_buffer = 1;
02517 
02518         return b;
02519 }
02520 
02521 #ifndef YY_EXIT_FAILURE
02522 #define YY_EXIT_FAILURE 2
02523 #endif
02524 
02525 static void yy_fatal_error (yyconst char* msg )
02526 {
02527         (void) fprintf( stderr, "%s\n", msg );
02528         exit( YY_EXIT_FAILURE );
02529 }
02530 
02531 /* Redefine yyless() so it works in section 3 code. */
02532 
02533 #undef yyless
02534 #define yyless(n) \
02535         do \
02536                 { \
02537                 /* Undo effects of setting up yytext. */ \
02538         int yyless_macro_arg = (n); \
02539         YY_LESS_LINENO(yyless_macro_arg);\
02540                 yytext[yyleng] = (yy_hold_char); \
02541                 (yy_c_buf_p) = yytext + yyless_macro_arg; \
02542                 (yy_hold_char) = *(yy_c_buf_p); \
02543                 *(yy_c_buf_p) = '\0'; \
02544                 yyleng = yyless_macro_arg; \
02545                 } \
02546         while ( 0 )
02547 
02548 /* Accessor  methods (get/set functions) to struct members. */
02549 
02553 int yyget_lineno  (void)
02554 {
02555         
02556     return yylineno;
02557 }
02558 
02562 FILE *yyget_in  (void)
02563 {
02564         return yyin;
02565 }
02566 
02570 FILE *yyget_out  (void)
02571 {
02572         return yyout;
02573 }
02574 
02578 yy_size_t yyget_leng  (void)
02579 {
02580         return yyleng;
02581 }
02582 
02587 char *yyget_text  (void)
02588 {
02589         return yytext;
02590 }
02591 
02596 void yyset_lineno (int  line_number )
02597 {
02598     
02599     yylineno = line_number;
02600 }
02601 
02608 void yyset_in (FILE *  in_str )
02609 {
02610         yyin = in_str ;
02611 }
02612 
02613 void yyset_out (FILE *  out_str )
02614 {
02615         yyout = out_str ;
02616 }
02617 
02618 int yyget_debug  (void)
02619 {
02620         return yy_flex_debug;
02621 }
02622 
02623 void yyset_debug (int  bdebug )
02624 {
02625         yy_flex_debug = bdebug ;
02626 }
02627 
02628 static int yy_init_globals (void)
02629 {
02630         /* Initialization is the same as for the non-reentrant scanner.
02631      * This function is called from yylex_destroy(), so don't allocate here.
02632      */
02633 
02634     (yy_buffer_stack) = 0;
02635     (yy_buffer_stack_top) = 0;
02636     (yy_buffer_stack_max) = 0;
02637     (yy_c_buf_p) = (char *) 0;
02638     (yy_init) = 0;
02639     (yy_start) = 0;
02640 
02641 /* Defined in main.c */
02642 #ifdef YY_STDINIT
02643     yyin = stdin;
02644     yyout = stdout;
02645 #else
02646     yyin = (FILE *) 0;
02647     yyout = (FILE *) 0;
02648 #endif
02649 
02650     /* For future reference: Set errno on error, since we are called by
02651      * yylex_init()
02652      */
02653     return 0;
02654 }
02655 
02656 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
02657 int yylex_destroy  (void)
02658 {
02659     
02660     /* Pop the buffer stack, destroying each element. */
02661         while(YY_CURRENT_BUFFER){
02662                 yy_delete_buffer(YY_CURRENT_BUFFER  );
02663                 YY_CURRENT_BUFFER_LVALUE = NULL;
02664                 yypop_buffer_state();
02665         }
02666 
02667         /* Destroy the stack itself. */
02668         yyfree((yy_buffer_stack) );
02669         (yy_buffer_stack) = NULL;
02670 
02671     /* Reset the globals. This is important in a non-reentrant scanner so the next time
02672      * yylex() is called, initialization will occur. */
02673     yy_init_globals( );
02674 
02675     return 0;
02676 }
02677 
02678 /*
02679  * Internal utility routines.
02680  */
02681 
02682 #ifndef yytext_ptr
02683 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
02684 {
02685         register int i;
02686         for ( i = 0; i < n; ++i )
02687                 s1[i] = s2[i];
02688 }
02689 #endif
02690 
02691 #ifdef YY_NEED_STRLEN
02692 static int yy_flex_strlen (yyconst char * s )
02693 {
02694         register int n;
02695         for ( n = 0; s[n]; ++n )
02696                 ;
02697 
02698         return n;
02699 }
02700 #endif
02701 
02702 void *yyalloc (yy_size_t  size )
02703 {
02704         return (void *) malloc( size );
02705 }
02706 
02707 void *yyrealloc  (void * ptr, yy_size_t  size )
02708 {
02709         /* The cast to (char *) in the following accommodates both
02710          * implementations that use char* generic pointers, and those
02711          * that use void* generic pointers.  It works with the latter
02712          * because both ANSI C and C++ allow castless assignment from
02713          * any pointer type to void*, and deal with argument conversions
02714          * as though doing an assignment.
02715          */
02716         return (void *) realloc( (char *) ptr, size );
02717 }
02718 
02719 void yyfree (void * ptr )
02720 {
02721         free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
02722 }
02723 
02724 #define YYTABLES_NAME "yytables"
02725 
02726 #line 321 "scanner.l"
02727 
02728 
02729 
02730 
02735 void clan_scanner_initialize() {
02736   yy_buffer_stack_top = 0;
02737   yy_buffer_stack = 0;
02738   yy_flush_buffer(YY_CURRENT_BUFFER);
02739   scanner_parsing = CLAN_FALSE;
02740   scanner_comment = 0;
02741   scanner_latest_text = NULL;
02742   CLAN_malloc(scanner_clay, char *, sizeof(char));
02743   scanner_clay[0] = '\0';
02744   scanner_line = 1;
02745   scanner_column = 1;
02746   scanner_column_LALR = 1;
02747   scanner_pragma = CLAN_FALSE;
02748   scanner_space = CLAN_FALSE;
02749   scanner_scop_start = CLAN_UNDEFINED;
02750   scanner_scop_end = CLAN_UNDEFINED;
02751 }
02752 
02753 
02763 void clan_scanner_reinitialize(int pragma, int line, int column) {
02764   free(scanner_latest_text);
02765   free(scanner_clay);
02766   clan_scanner_initialize();
02767   scanner_pragma = pragma;
02768   scanner_line = line;
02769   scanner_column = column;
02770 }
02771 
02772 
02777 void clan_scanner_count() {
02778   int i;
02779 
02780   scanner_column_LALR = scanner_column;
02781   for (i = 0; yytext[i] != '\0'; i++) {
02782     if (yytext[i] == '\n') {
02783       scanner_line++;
02784       scanner_column = 1;
02785     } else {
02786       scanner_column++;
02787     }
02788   }
02789 }
02790 
02791 
02799 void clan_scanner_free() {
02800   yy_delete_buffer(YY_CURRENT_BUFFER);
02801   free(yy_buffer_stack);
02802   free(scanner_latest_text);
02803   scanner_latest_text = NULL;
02804   free(scanner_clay);
02805   scanner_clay = NULL;
02806 }
02807 
02808 
02818 int clan_scanner(int token, char* message) {
02819   if (CLAN_DEBUG)
02820     fprintf(stderr, "[Clan] Debug: Lex yytext = %s "
02821                     "(%s at line %d, column %d)\n",
02822                     message, yytext, scanner_line, scanner_column);
02823   clan_scanner_count();
02824   
02825   free(scanner_latest_text);
02826   scanner_latest_text = strdup(yytext);
02827   if (parser_recording) {
02828     CLAN_realloc(parser_record, char*,
02829                  (strlen(parser_record) + strlen(yytext) + 1) * sizeof(char));
02830     strcat(parser_record, yytext);
02831     scanner_space = CLAN_FALSE;
02832   }
02833   
02834   if (scanner_parsing == CLAN_TRUE)
02835     return token;
02836   else
02837     return IGNORE;
02838 }
02839