root/libparser/asm_scan.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. yy_get_next_buffer
  2. yy_get_previous_state
  3. yy_try_NUL_trans
  4. yyunput
  5. yyinput
  6. asm_restart
  7. asm__switch_to_buffer
  8. asm__load_buffer_state
  9. asm__create_buffer
  10. asm__delete_buffer
  11. asm__init_buffer
  12. asm__flush_buffer
  13. asm_push_buffer_state
  14. asm_pop_buffer_state
  15. asm_ensure_buffer_stack
  16. asm__scan_buffer
  17. asm__scan_string
  18. asm__scan_bytes
  19. yy_push_state
  20. yy_pop_state
  21. yy_fatal_error
  22. asm_get_lineno
  23. asm_get_in
  24. asm_get_out
  25. asm_get_leng
  26. asm_get_text
  27. asm_set_lineno
  28. asm_set_in
  29. asm_set_out
  30. asm_get_debug
  31. asm_set_debug
  32. yy_init_globals
  33. asm_lex_destroy
  34. yy_flex_strncpy
  35. yy_flex_strlen
  36. asm_alloc
  37. asm_realloc
  38. asm_free
  39. asm_initscan

   1 #line 2 "asm_scan.c"
   2 
   3 #line 4 "asm_scan.c"
   4 
   5 #define  YY_INT_ALIGNED short int
   6 
   7 /* A lexical scanner generated by flex */
   8 
   9 #define yy_create_buffer asm__create_buffer
  10 #define yy_delete_buffer asm__delete_buffer
  11 #define yy_flex_debug asm__flex_debug
  12 #define yy_init_buffer asm__init_buffer
  13 #define yy_flush_buffer asm__flush_buffer
  14 #define yy_load_buffer_state asm__load_buffer_state
  15 #define yy_switch_to_buffer asm__switch_to_buffer
  16 #define yyin asm_in
  17 #define yyleng asm_leng
  18 #define yylex asm_lex
  19 #define yylineno asm_lineno
  20 #define yyout asm_out
  21 #define yyrestart asm_restart
  22 #define yytext asm_text
  23 #define yywrap asm_wrap
  24 #define yyalloc asm_alloc
  25 #define yyrealloc asm_realloc
  26 #define yyfree asm_free
  27 
  28 #define FLEX_SCANNER
  29 #define YY_FLEX_MAJOR_VERSION 2
  30 #define YY_FLEX_MINOR_VERSION 5
  31 #define YY_FLEX_SUBMINOR_VERSION 35
  32 #if YY_FLEX_SUBMINOR_VERSION > 0
  33 #define FLEX_BETA
  34 #endif
  35 
  36 /* First, we deal with  platform-specific or compiler-specific issues. */
  37 
  38 /* begin standard C headers. */
  39 #include <stdio.h>
  40 #include <string.h>
  41 #include <errno.h>
  42 #include <stdlib.h>
  43 
  44 /* end standard C headers. */
  45 
  46 /* flex integer type definitions */
  47 
  48 #ifndef FLEXINT_H
  49 #define FLEXINT_H
  50 
  51 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
  52 
  53 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  54 
  55 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
  56  * if you want the limit (max/min) macros for int types. 
  57  */
  58 #ifndef __STDC_LIMIT_MACROS
  59 #define __STDC_LIMIT_MACROS 1
  60 #endif
  61 
  62 #include <inttypes.h>
  63 typedef int8_t flex_int8_t;
  64 typedef uint8_t flex_uint8_t;
  65 typedef int16_t flex_int16_t;
  66 typedef uint16_t flex_uint16_t;
  67 typedef int32_t flex_int32_t;
  68 typedef uint32_t flex_uint32_t;
  69 #else
  70 typedef signed char flex_int8_t;
  71 typedef short int flex_int16_t;
  72 typedef int flex_int32_t;
  73 typedef unsigned char flex_uint8_t; 
  74 typedef unsigned short int flex_uint16_t;
  75 typedef unsigned int flex_uint32_t;
  76 #endif /* ! C99 */
  77 
  78 /* Limits of integral types. */
  79 #ifndef INT8_MIN
  80 #define INT8_MIN               (-128)
  81 #endif
  82 #ifndef INT16_MIN
  83 #define INT16_MIN              (-32767-1)
  84 #endif
  85 #ifndef INT32_MIN
  86 #define INT32_MIN              (-2147483647-1)
  87 #endif
  88 #ifndef INT8_MAX
  89 #define INT8_MAX               (127)
  90 #endif
  91 #ifndef INT16_MAX
  92 #define INT16_MAX              (32767)
  93 #endif
  94 #ifndef INT32_MAX
  95 #define INT32_MAX              (2147483647)
  96 #endif
  97 #ifndef UINT8_MAX
  98 #define UINT8_MAX              (255U)
  99 #endif
 100 #ifndef UINT16_MAX
 101 #define UINT16_MAX             (65535U)
 102 #endif
 103 #ifndef UINT32_MAX
 104 #define UINT32_MAX             (4294967295U)
 105 #endif
 106 
 107 #endif /* ! FLEXINT_H */
 108 
 109 #ifdef __cplusplus
 110 
 111 /* The "const" storage-class-modifier is valid. */
 112 #define YY_USE_CONST
 113 
 114 #else   /* ! __cplusplus */
 115 
 116 /* C99 requires __STDC__ to be defined as 1. */
 117 #if defined (__STDC__)
 118 
 119 #define YY_USE_CONST
 120 
 121 #endif  /* defined (__STDC__) */
 122 #endif  /* ! __cplusplus */
 123 
 124 #ifdef YY_USE_CONST
 125 #define yyconst const
 126 #else
 127 #define yyconst
 128 #endif
 129 
 130 /* Returned upon end-of-file. */
 131 #define YY_NULL 0
 132 
 133 /* Promotes a possibly negative, possibly signed char to an unsigned
 134  * integer for use as an array index.  If the signed char is negative,
 135  * we want to instead treat it as an 8-bit unsigned char, hence the
 136  * double cast.
 137  */
 138 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
 139 
 140 /* Enter a start condition.  This macro really ought to take a parameter,
 141  * but we do it the disgusting crufty way forced on us by the ()-less
 142  * definition of BEGIN.
 143  */
 144 #define BEGIN (yy_start) = 1 + 2 *
 145 
 146 /* Translate the current start state into a value that can be later handed
 147  * to BEGIN to return to the state.  The YYSTATE alias is for lex
 148  * compatibility.
 149  */
 150 #define YY_START (((yy_start) - 1) / 2)
 151 #define YYSTATE YY_START
 152 
 153 /* Action number for EOF rule of a given start state. */
 154 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
 155 
 156 /* Special action meaning "start processing a new file". */
 157 #define YY_NEW_FILE asm_restart(asm_in  )
 158 
 159 #define YY_END_OF_BUFFER_CHAR 0
 160 
 161 /* Size of default input buffer. */
 162 #ifndef YY_BUF_SIZE
 163 #define YY_BUF_SIZE 16384
 164 #endif
 165 
 166 /* The state buf must be large enough to hold one state per character in the main buffer.
 167  */
 168 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
 169 
 170 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
 171 #define YY_TYPEDEF_YY_BUFFER_STATE
 172 typedef struct yy_buffer_state *YY_BUFFER_STATE;
 173 #endif
 174 
 175 extern int asm_leng;
 176 
 177 extern FILE *asm_in, *asm_out;
 178 
 179 #define EOB_ACT_CONTINUE_SCAN 0
 180 #define EOB_ACT_END_OF_FILE 1
 181 #define EOB_ACT_LAST_MATCH 2
 182 
 183     /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
 184      *       access to the local variable yy_act. Since yyless() is a macro, it would break
 185      *       existing scanners that call yyless() from OUTSIDE asm_lex. 
 186      *       One obvious solution it to make yy_act a global. I tried that, and saw
 187      *       a 5% performance hit in a non-asm_lineno scanner, because yy_act is
 188      *       normally declared as a register variable-- so it is not worth it.
 189      */
 190     #define  YY_LESS_LINENO(n) \
 191             do { \
 192                 int yyl;\
 193                 for ( yyl = n; yyl < asm_leng; ++yyl )\
 194                     if ( asm_text[yyl] == '\n' )\
 195                         --asm_lineno;\
 196             }while(0)
 197     
 198 /* Return all but the first "n" matched characters back to the input stream. */
 199 #define yyless(n) \
 200         do \
 201                 { \
 202                 /* Undo effects of setting up asm_text. */ \
 203         int yyless_macro_arg = (n); \
 204         YY_LESS_LINENO(yyless_macro_arg);\
 205                 *yy_cp = (yy_hold_char); \
 206                 YY_RESTORE_YY_MORE_OFFSET \
 207                 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
 208                 YY_DO_BEFORE_ACTION; /* set up asm_text again */ \
 209                 } \
 210         while ( 0 )
 211 
 212 #define unput(c) yyunput( c, (yytext_ptr)  )
 213 
 214 #ifndef YY_TYPEDEF_YY_SIZE_T
 215 #define YY_TYPEDEF_YY_SIZE_T
 216 typedef size_t yy_size_t;
 217 #endif
 218 
 219 #ifndef YY_STRUCT_YY_BUFFER_STATE
 220 #define YY_STRUCT_YY_BUFFER_STATE
 221 struct yy_buffer_state
 222         {
 223         FILE *yy_input_file;
 224 
 225         char *yy_ch_buf;                /* input buffer */
 226         char *yy_buf_pos;               /* current position in input buffer */
 227 
 228         /* Size of input buffer in bytes, not including room for EOB
 229          * characters.
 230          */
 231         yy_size_t yy_buf_size;
 232 
 233         /* Number of characters read into yy_ch_buf, not including EOB
 234          * characters.
 235          */
 236         int yy_n_chars;
 237 
 238         /* Whether we "own" the buffer - i.e., we know we created it,
 239          * and can realloc() it to grow it, and should free() it to
 240          * delete it.
 241          */
 242         int yy_is_our_buffer;
 243 
 244         /* Whether this is an "interactive" input source; if so, and
 245          * if we're using stdio for input, then we want to use getc()
 246          * instead of fread(), to make sure we stop fetching input after
 247          * each newline.
 248          */
 249         int yy_is_interactive;
 250 
 251         /* Whether we're considered to be at the beginning of a line.
 252          * If so, '^' rules will be active on the next match, otherwise
 253          * not.
 254          */
 255         int yy_at_bol;
 256 
 257     int yy_bs_lineno; /**< The line count. */
 258     int yy_bs_column; /**< The column count. */
 259     
 260         /* Whether to try to fill the input buffer when we reach the
 261          * end of it.
 262          */
 263         int yy_fill_buffer;
 264 
 265         int yy_buffer_status;
 266 
 267 #define YY_BUFFER_NEW 0
 268 #define YY_BUFFER_NORMAL 1
 269         /* When an EOF's been seen but there's still some text to process
 270          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
 271          * shouldn't try reading from the input source any more.  We might
 272          * still have a bunch of tokens to match, though, because of
 273          * possible backing-up.
 274          *
 275          * When we actually see the EOF, we change the status to "new"
 276          * (via asm_restart()), so that the user can continue scanning by
 277          * just pointing asm_in at a new input file.
 278          */
 279 #define YY_BUFFER_EOF_PENDING 2
 280 
 281         };
 282 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
 283 
 284 /* Stack of input buffers. */
 285 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
 286 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
 287 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
 288 
 289 /* We provide macros for accessing buffer states in case in the
 290  * future we want to put the buffer states in a more general
 291  * "scanner state".
 292  *
 293  * Returns the top of the stack, or NULL.
 294  */
 295 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
 296                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
 297                           : NULL)
 298 
 299 /* Same as previous macro, but useful when we know that the buffer stack is not
 300  * NULL or when we need an lvalue. For internal use only.
 301  */
 302 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
 303 
 304 /* yy_hold_char holds the character lost when asm_text is formed. */
 305 static char yy_hold_char;
 306 static int yy_n_chars;          /* number of characters read into yy_ch_buf */
 307 int asm_leng;
 308 
 309 /* Points to current character in buffer. */
 310 static char *yy_c_buf_p = (char *) 0;
 311 static int yy_init = 0;         /* whether we need to initialize */
 312 static int yy_start = 0;        /* start state number */
 313 
 314 /* Flag which is used to allow asm_wrap()'s to do buffer switches
 315  * instead of setting up a fresh asm_in.  A bit of a hack ...
 316  */
 317 static int yy_did_buffer_switch_on_eof;
 318 
 319 void asm_restart (FILE *input_file  );
 320 void asm__switch_to_buffer (YY_BUFFER_STATE new_buffer  );
 321 YY_BUFFER_STATE asm__create_buffer (FILE *file,int size  );
 322 void asm__delete_buffer (YY_BUFFER_STATE b  );
 323 void asm__flush_buffer (YY_BUFFER_STATE b  );
 324 void asm_push_buffer_state (YY_BUFFER_STATE new_buffer  );
 325 void asm_pop_buffer_state (void );
 326 
 327 static void asm_ensure_buffer_stack (void );
 328 static void asm__load_buffer_state (void );
 329 static void asm__init_buffer (YY_BUFFER_STATE b,FILE *file  );
 330 
 331 #define YY_FLUSH_BUFFER asm__flush_buffer(YY_CURRENT_BUFFER )
 332 
 333 YY_BUFFER_STATE asm__scan_buffer (char *base,yy_size_t size  );
 334 YY_BUFFER_STATE asm__scan_string (yyconst char *yy_str  );
 335 YY_BUFFER_STATE asm__scan_bytes (yyconst char *bytes,int len  );
 336 
 337 void *asm_alloc (yy_size_t  );
 338 void *asm_realloc (void *,yy_size_t  );
 339 void asm_free (void *  );
 340 
 341 #define yy_new_buffer asm__create_buffer
 342 
 343 #define yy_set_interactive(is_interactive) \
 344         { \
 345         if ( ! YY_CURRENT_BUFFER ){ \
 346         asm_ensure_buffer_stack (); \
 347                 YY_CURRENT_BUFFER_LVALUE =    \
 348             asm__create_buffer(asm_in,YY_BUF_SIZE ); \
 349         } \
 350         YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
 351         }
 352 
 353 #define yy_set_bol(at_bol) \
 354         { \
 355         if ( ! YY_CURRENT_BUFFER ){\
 356         asm_ensure_buffer_stack (); \
 357                 YY_CURRENT_BUFFER_LVALUE =    \
 358             asm__create_buffer(asm_in,YY_BUF_SIZE ); \
 359         } \
 360         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
 361         }
 362 
 363 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
 364 
 365 /* Begin user sect3 */
 366 
 367 #define asm_wrap(n) 1
 368 #define YY_SKIP_YYWRAP
 369 
 370 typedef unsigned char YY_CHAR;
 371 
 372 FILE *asm_in = (FILE *) 0, *asm_out = (FILE *) 0;
 373 
 374 typedef int yy_state_type;
 375 
 376 extern int asm_lineno;
 377 
 378 int asm_lineno = 1;
 379 
 380 extern char *asm_text;
 381 #define yytext_ptr asm_text
 382 
 383 static yy_state_type yy_get_previous_state (void );
 384 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
 385 static int yy_get_next_buffer (void );
 386 static void yy_fatal_error (yyconst char msg[]  );
 387 
 388 /* Done after the current pattern has been matched and before the
 389  * corresponding action - sets up asm_text.
 390  */
 391 #define YY_DO_BEFORE_ACTION \
 392         (yytext_ptr) = yy_bp; \
 393         asm_leng = (size_t) (yy_cp - yy_bp); \
 394         (yy_hold_char) = *yy_cp; \
 395         *yy_cp = '\0'; \
 396         (yy_c_buf_p) = yy_cp;
 397 
 398 #define YY_NUM_RULES 37
 399 #define YY_END_OF_BUFFER 38
 400 /* This struct is not used in this scanner,
 401    but its presence is necessary. */
 402 struct yy_trans_info
 403         {
 404         flex_int32_t yy_verify;
 405         flex_int32_t yy_nxt;
 406         };
 407 static yyconst flex_int16_t yy_accept[207] =
 408     {   0,
 409         0,    0,    3,    3,    0,    0,    0,    0,    0,    0,
 410         0,    0,   38,   36,    1,   35,   12,   17,   36,   36,
 411        36,   22,   33,   33,   33,   33,   36,   33,   33,   33,
 412        33,    1,   24,   30,   30,   30,   30,   30,   30,   30,
 413        30,   30,   30,   30,   30,    3,    4,    5,    9,   11,
 414        37,   13,   15,   16,   37,   18,   20,   21,   37,   32,
 415        36,   31,    1,    0,   22,   22,    0,    0,    2,    8,
 416         0,   22,   33,   33,   33,   33,   34,   33,   33,   33,
 417        33,    1,   24,    0,   23,   30,   30,   30,   30,   30,
 418        30,   30,   30,   30,   30,   30,   30,   30,    3,    4,
 419 
 420         5,    6,    5,    7,    9,    0,   10,   13,    0,   14,
 421        18,    0,   19,   31,    0,    0,    0,   22,   33,   29,
 422        33,   33,   27,   25,   33,   23,   30,   30,   30,   30,
 423        30,   29,   30,   30,   30,   30,   30,   27,   25,   30,
 424         0,   22,   27,    0,    0,   33,   33,   33,   30,   30,
 425        30,   30,   30,   30,   30,   30,   30,   30,    0,    0,
 426        22,   33,   33,   26,   30,   30,   30,   30,   28,   30,
 427        30,   30,   30,   26,   26,   33,   33,   30,   30,   30,
 428        30,   30,   30,   30,   33,   30,   30,   30,   30,   30,
 429        33,   30,   30,   30,   33,   30,   30,   30,   33,   30,
 430 
 431        30,   30,   30,   30,   30,    0
 432     } ;
 433 
 434 static yyconst flex_int32_t yy_ec[256] =
 435     {   0,
 436         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
 437         4,    4,    1,    1,    1,    1,    1,    1,    1,    1,
 438         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 439         1,    2,    1,    5,    6,    1,    1,    1,    7,    1,
 440         1,    8,    9,    1,   10,   11,   12,   13,   13,   13,
 441        13,   13,   13,   13,   13,   13,   13,    1,    1,    1,
 442         1,    1,    1,    1,   14,   15,   16,   17,   18,   17,
 443        19,   17,   17,   20,   17,   21,   22,   23,   24,   17,
 444        17,   25,   26,   27,   17,   17,   17,   28,   29,   17,
 445         1,   30,    1,    1,   31,    1,   32,   17,   33,   17,
 446 
 447        34,   17,   17,   17,   17,   35,   17,   36,   37,   17,
 448        38,   17,   39,   40,   41,   17,   42,   17,   17,   17,
 449        17,   17,    1,    1,    1,    1,    1,   17,   17,   17,
 450        17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
 451        17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
 452        17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
 453        17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
 454        17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
 455        17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
 456        17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
 457 
 458        17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
 459        17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
 460        17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
 461        17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
 462        17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
 463        17,   17,   17,   17,   17
 464     } ;
 465 
 466 static yyconst flex_int32_t yy_meta[43] =
 467     {   0,
 468         1,    2,    3,    1,    4,    1,    5,    6,    1,    1,
 469         1,    1,    7,    8,    8,    8,    8,    8,    8,    8,
 470         8,    8,    8,    8,    8,    8,    8,    8,    8,    1,
 471         8,    8,    8,    8,    8,    8,    8,    8,    8,    8,
 472         8,    8
 473     } ;
 474 
 475 static yyconst flex_int16_t yy_base[222] =
 476     {   0,
 477         0,   42,   82,   83,   84,   85,   89,   90,   93,   94,
 478       124,  154,  401,  402,  100,  402,  402,  402,   92,   76,
 479        99,   95,    0,  369,  371,  369,  394,  364,  356,  353,
 480       361,  136,  390,  370,    0,  359,   89,  368,  362,  369,
 481       357,  353,  345,  342,  350,  378,  402,  136,  350,  402,
 482       376,  348,  402,  402,  138,  347,  402,  402,  115,  402,
 483       363,    0,  143,  362,  157,  156,  335,  341,  402,  402,
 484       359,  402,    0,  350,  343,  347,  402,  332,  325,  326,
 485       332,  147,  362,  361,    0,    0,  335,  154,  334,  333,
 486       335,  343,  334,  334,  319,  312,  313,  319,  348,  402,
 487 
 488       173,  402,  174,  402,  320,    0,  402,  319,  343,  402,
 489       317,  339,  402,    0,  178,  303,  311,  176,  329,    0,
 490       327,  305,    0,    0,  300,    0,  321,  315,  323,  307,
 491       310,    0,  319,  315,  305,  316,  294,    0,    0,  289,
 492       315,  314,  402,  286,  183,  310,  300,  285,  299,  294,
 493       305,  297,  289,  303,  293,  290,  290,  275,  274,  298,
 494       297,  291,  287,    0,  280,  281,  280,  281,    0,  268,
 495       261,  251,  246,    0,  402,  237,  226,  231,  226,  233,
 496       185,  177,  182,  175,  182,  175,  182,  184,  172,  177,
 497       185,  167,  174,  181,  161,  156,  146,  149,  134,  136,
 498 
 499       121,  103,   87,   70,   80,  402,  210,  218,  226,  234,
 500       242,  244,  251,  253,  261,  269,  277,  285,  293,  295,
 501       297
 502     } ;
 503 
 504 static yyconst flex_int16_t yy_def[222] =
 505     {   0,
 506       206,  206,  207,  207,  208,  208,  209,  209,  210,  210,
 507       211,  211,  206,  206,  206,  206,  206,  206,  206,  206,
 508       206,  206,  212,  212,  212,  212,  206,  212,  212,  212,
 509       212,  206,  213,  214,  214,  214,  214,  214,  214,  214,
 510       214,  214,  214,  214,  214,  215,  206,  216,  217,  206,
 511       217,  218,  206,  206,  218,  219,  206,  206,  219,  206,
 512       206,  220,  206,  206,  206,  206,  206,  206,  206,  206,
 513       206,  206,  212,  212,  212,  212,  206,  212,  212,  212,
 514       212,  206,  213,  213,  221,  214,  214,  214,  214,  214,
 515       214,  214,  214,  214,  214,  214,  214,  214,  215,  206,
 516 
 517       216,  206,  216,  206,  217,  217,  206,  218,  218,  206,
 518       219,  219,  206,  220,  206,  206,  206,  206,  212,  212,
 519       212,  212,  212,  212,  212,  221,  214,  214,  214,  214,
 520       214,  214,  214,  214,  214,  214,  214,  214,  214,  214,
 521       206,  206,  206,  206,  206,  212,  212,  212,  214,  214,
 522       214,  214,  214,  214,  214,  214,  214,  214,  206,  206,
 523       206,  212,  212,  212,  214,  214,  214,  214,  214,  214,
 524       214,  214,  214,  214,  206,  212,  212,  214,  214,  214,
 525       214,  214,  214,  214,  212,  214,  214,  214,  214,  214,
 526       212,  214,  214,  214,  212,  214,  214,  214,  212,  214,
 527 
 528       214,  214,  214,  214,  214,    0,  206,  206,  206,  206,
 529       206,  206,  206,  206,  206,  206,  206,  206,  206,  206,
 530       206
 531     } ;
 532 
 533 static yyconst flex_int16_t yy_nxt[445] =
 534     {   0,
 535        14,   15,   16,   15,   17,   14,   18,   14,   14,   19,
 536        20,   21,   22,   23,   23,   24,   23,   25,   23,   23,
 537        23,   23,   23,   23,   23,   26,   23,   23,   23,   27,
 538        23,   23,   28,   29,   30,   23,   31,   23,   23,   23,
 539        23,   23,   14,   32,   16,   15,   17,   33,   18,   14,
 540        14,   19,   20,   21,   22,   34,   35,   36,   35,   37,
 541        38,   39,   35,   35,   40,   35,   35,   41,   35,   35,
 542        35,   27,   35,   35,   42,   43,   44,   35,   45,   35,
 543        35,   35,   35,   35,   47,   47,   50,   50,   66,   48,
 544        48,   53,   53,   54,   54,   57,   57,  169,  169,   58,
 545 
 546        58,   63,   64,   63,   65,   71,   69,   65,  205,   67,
 547        70,   89,   68,   51,   51,   72,   90,  113,   55,   55,
 548       132,  111,   59,   59,   14,   15,   60,   15,   17,   14,
 549        18,   14,   14,   19,   61,   21,   22,   82,  102,   63,
 550       110,   83,  108,  103,   63,  204,   63,  104,   82,  203,
 551        63,  120,   83,   27,   14,   15,   60,   15,   17,   14,
 552        18,   14,   14,   19,   61,   21,   22,   71,   66,   65,
 553       202,  128,  201,  115,  129,  102,  102,   72,  200,  130,
 554       206,  103,  199,   27,  206,  104,  141,  141,  118,  115,
 555       142,  160,  160,  145,  198,  161,  197,  196,  195,  194,
 556 
 557       169,  193,  192,  169,  191,  190,  189,  188,  187,  145,
 558        46,   46,   46,   46,   46,   46,   46,   46,   49,   49,
 559        49,   49,   49,   49,   49,   49,   52,   52,   52,   52,
 560        52,   52,   52,   52,   56,   56,   56,   56,   56,   56,
 561        56,   56,   62,   62,   62,   62,   62,   62,   62,   62,
 562        73,   73,   85,  132,  169,  186,  185,  120,   85,   86,
 563        86,   99,   99,   99,   99,   99,  184,   99,   99,  101,
 564       101,  101,  101,  101,  101,  101,  101,  105,  105,  169,
 565       105,  105,  105,  105,  105,  108,  108,  183,  182,  108,
 566       108,  108,  108,  111,  111,  181,  111,  180,  111,  111,
 567 
 568       111,  114,  114,  126,  126,  179,  178,  177,  176,  161,
 569       161,  175,  174,  173,  172,  171,  170,  169,  168,  167,
 570       166,  165,  164,  163,  162,  159,  142,  142,  158,  139,
 571       157,  156,  155,  154,  153,  152,  151,  150,  149,  148,
 572       124,  147,  146,  144,  143,  111,  112,  108,  109,  106,
 573       100,  140,  139,  138,  137,  136,  135,  134,  133,  132,
 574       131,  127,   84,   84,  125,  124,  123,  122,  121,  120,
 575       119,  118,  117,  116,   66,   66,  112,  109,  107,  106,
 576       100,   98,   97,   96,   95,   94,   93,   92,   91,   88,
 577        87,   84,   81,   80,   79,   78,   77,   76,   75,   74,
 578 
 579       206,   13,  206,  206,  206,  206,  206,  206,  206,  206,
 580       206,  206,  206,  206,  206,  206,  206,  206,  206,  206,
 581       206,  206,  206,  206,  206,  206,  206,  206,  206,  206,
 582       206,  206,  206,  206,  206,  206,  206,  206,  206,  206,
 583       206,  206,  206,  206
 584     } ;
 585 
 586 static yyconst flex_int16_t yy_chk[445] =
 587     {   0,
 588         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 589         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 590         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 591         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 592         1,    1,    2,    2,    2,    2,    2,    2,    2,    2,
 593         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
 594         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
 595         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
 596         2,    2,    2,    2,    3,    4,    5,    6,   20,    3,
 597         4,    7,    8,    7,    8,    9,   10,  205,  204,    9,
 598 
 599        10,   15,   19,   15,   19,   22,   21,   22,  203,   20,
 600        21,   37,   20,    5,    6,   22,   37,   59,    7,    8,
 601       202,   59,    9,   10,   11,   11,   11,   11,   11,   11,
 602        11,   11,   11,   11,   11,   11,   11,   32,   48,   32,
 603        55,   32,   55,   48,   63,  201,   63,   48,   82,  200,
 604        82,  199,   82,   11,   12,   12,   12,   12,   12,   12,
 605        12,   12,   12,   12,   12,   12,   12,   65,   66,   65,
 606       198,   88,  197,   66,   88,  101,  103,   65,  196,   88,
 607       101,  103,  195,   12,  101,  103,  115,  115,  118,   66,
 608       115,  145,  145,  118,  194,  145,  193,  192,  191,  190,
 609 
 610       189,  188,  187,  186,  185,  184,  183,  182,  181,  118,
 611       207,  207,  207,  207,  207,  207,  207,  207,  208,  208,
 612       208,  208,  208,  208,  208,  208,  209,  209,  209,  209,
 613       209,  209,  209,  209,  210,  210,  210,  210,  210,  210,
 614       210,  210,  211,  211,  211,  211,  211,  211,  211,  211,
 615       212,  212,  213,  180,  179,  178,  177,  176,  213,  214,
 616       214,  215,  215,  215,  215,  215,  173,  215,  215,  216,
 617       216,  216,  216,  216,  216,  216,  216,  217,  217,  172,
 618       217,  217,  217,  217,  217,  218,  218,  171,  170,  218,
 619       218,  218,  218,  219,  219,  168,  219,  167,  219,  219,
 620 
 621       219,  220,  220,  221,  221,  166,  165,  163,  162,  161,
 622       160,  159,  158,  157,  156,  155,  154,  153,  152,  151,
 623       150,  149,  148,  147,  146,  144,  142,  141,  140,  137,
 624       136,  135,  134,  133,  131,  130,  129,  128,  127,  125,
 625       122,  121,  119,  117,  116,  112,  111,  109,  108,  105,
 626        99,   98,   97,   96,   95,   94,   93,   92,   91,   90,
 627        89,   87,   84,   83,   81,   80,   79,   78,   76,   75,
 628        74,   71,   68,   67,   64,   61,   56,   52,   51,   49,
 629        46,   45,   44,   43,   42,   41,   40,   39,   38,   36,
 630        34,   33,   31,   30,   29,   28,   27,   26,   25,   24,
 631 
 632        13,  206,  206,  206,  206,  206,  206,  206,  206,  206,
 633       206,  206,  206,  206,  206,  206,  206,  206,  206,  206,
 634       206,  206,  206,  206,  206,  206,  206,  206,  206,  206,
 635       206,  206,  206,  206,  206,  206,  206,  206,  206,  206,
 636       206,  206,  206,  206
 637     } ;
 638 
 639 /* Table of booleans, true if rule could match eol. */
 640 static yyconst flex_int32_t yy_rule_can_match_eol[38] =
 641     {   0,
 642 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 
 643     1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0,     };
 644 
 645 static yy_state_type yy_last_accepting_state;
 646 static char *yy_last_accepting_cpos;
 647 
 648 extern int asm__flex_debug;
 649 int asm__flex_debug = 0;
 650 
 651 /* The intent behind this definition is that it'll catch
 652  * any uses of REJECT which flex missed.
 653  */
 654 #define REJECT reject_used_but_not_detected
 655 #define yymore() yymore_used_but_not_detected
 656 #define YY_MORE_ADJ 0
 657 #define YY_RESTORE_YY_MORE_OFFSET
 658 char *asm_text;
 659 #line 1 "asm_scan.l"
 660 #line 2 "asm_scan.l"
 661 /*
 662  * Copyright (c) 2002, 2004, 2010 Tama Communications Corporation
 663  *
 664  * This file is part of GNU GLOBAL.
 665  *
 666  * This program is free software: you can redistribute it and/or modify
 667  * it under the terms of the GNU General Public License as published by
 668  * the Free Software Foundation, either version 3 of the License, or
 669  * (at your option) any later version.
 670  * 
 671  * This program is distributed in the hope that it will be useful,
 672  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 673  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 674  * GNU General Public License for more details.
 675  * 
 676  * You should have received a copy of the GNU General Public License
 677  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 678  */
 679 
 680 #ifdef HAVE_CONFIG_H
 681 #include <config.h>
 682 #endif
 683 #ifdef HAVE_STRING_H
 684 #include <string.h>
 685 #else
 686 #include <strings.h>
 687 #endif
 688 
 689 #define YYLTYPE         int
 690 
 691 #include "internal.h"
 692 #include "asm_parse.h"
 693 #include "asm_res.h"
 694 #include "die.h"
 695 #include "linetable.h"
 696 #include "strbuf.h"
 697 
 698 #define lex_symbol_generation_rule(x) asm_ ## x
 699 #define LEXLEX lex_symbol_generation_rule(lex)
 700 #define LEXTEXT lex_symbol_generation_rule(text)
 701 #define LEXLENG lex_symbol_generation_rule(leng)
 702 #define LEXLINENO lex_symbol_generation_rule(lineno)
 703 #define LEXRESTART lex_symbol_generation_rule(restart)
 704 #define LEXLVAL lex_symbol_generation_rule(lval)
 705 #define LEXLLOC lex_symbol_generation_rule(lloc)
 706 
 707 #define YY_DECL int LEXLEX(const struct parser_param *param)
 708 
 709 #define YY_INPUT(buf, result, max_size) do {                            \
 710         if ((result = linetable_read(buf, max_size)) == -1)             \
 711                 result = YY_NULL;                                       \
 712 } while (0)
 713 
 714 #define ADD_SYM(tag, lno) do {                                          \
 715         LEXLVAL = strbuf_getlen(asm_symtable);                          \
 716         LEXLLOC = (lno);                                                \
 717         strbuf_puts0(asm_symtable, tag);                                \
 718 } while (0)
 719 
 720 #undef PUT
 721 #define PUT(type, tag, lno) do {                                        \
 722         const char *line_image = linetable_get(lno, NULL);              \
 723         char *nl = strchr(line_image, '\n');                            \
 724         if (nl != NULL)                                                 \
 725                 *nl = '\0';                                             \
 726         param->put(type, tag, lno, param->file, line_image, param->arg);\
 727         if (nl != NULL)                                                 \
 728                 *nl = '\n';                                             \
 729 } while (0)
 730 
 731 static int last_directive;
 732 
 733 
 734 
 735 #line 736 "asm_scan.c"
 736 
 737 #define INITIAL 0
 738 #define C_COMMENT 1
 739 #define CPP_COMMENT 2
 740 #define STRING 3
 741 #define LITERAL 4
 742 #define PREPROCESSOR_LINE 5
 743 
 744 #ifndef YY_NO_UNISTD_H
 745 /* Special case for "unistd.h", since it is non-ANSI. We include it way
 746  * down here because we want the user's section 1 to have been scanned first.
 747  * The user has a chance to override it with an option.
 748  */
 749 #include <unistd.h>
 750 #endif
 751 
 752 #ifndef YY_EXTRA_TYPE
 753 #define YY_EXTRA_TYPE void *
 754 #endif
 755 
 756 static int yy_init_globals (void );
 757 
 758 /* Accessor methods to globals.
 759    These are made visible to non-reentrant scanners for convenience. */
 760 
 761 int asm_lex_destroy (void );
 762 
 763 int asm_get_debug (void );
 764 
 765 void asm_set_debug (int debug_flag  );
 766 
 767 YY_EXTRA_TYPE asm_get_extra (void );
 768 
 769 void asm_set_extra (YY_EXTRA_TYPE user_defined  );
 770 
 771 FILE *asm_get_in (void );
 772 
 773 void asm_set_in  (FILE * in_str  );
 774 
 775 FILE *asm_get_out (void );
 776 
 777 void asm_set_out  (FILE * out_str  );
 778 
 779 int asm_get_leng (void );
 780 
 781 char *asm_get_text (void );
 782 
 783 int asm_get_lineno (void );
 784 
 785 void asm_set_lineno (int line_number  );
 786 
 787 /* Macros after this point can all be overridden by user definitions in
 788  * section 1.
 789  */
 790 
 791 #ifndef YY_SKIP_YYWRAP
 792 #ifdef __cplusplus
 793 extern "C" int asm_wrap (void );
 794 #else
 795 extern int asm_wrap (void );
 796 #endif
 797 #endif
 798 
 799     static void yyunput (int c,char *buf_ptr  );
 800     
 801 #ifndef yytext_ptr
 802 static void yy_flex_strncpy (char *,yyconst char *,int );
 803 #endif
 804 
 805 #ifdef YY_NEED_STRLEN
 806 static int yy_flex_strlen (yyconst char * );
 807 #endif
 808 
 809 #ifndef YY_NO_INPUT
 810 
 811 #ifdef __cplusplus
 812 static int yyinput (void );
 813 #else
 814 static int input (void );
 815 #endif
 816 
 817 #endif
 818 
 819         static int yy_start_stack_ptr = 0;
 820         static int yy_start_stack_depth = 0;
 821         static int *yy_start_stack = NULL;
 822     
 823     static void yy_push_state (int new_state );
 824     
 825     static void yy_pop_state (void );
 826     
 827 /* Amount of stuff to slurp up with each read. */
 828 #ifndef YY_READ_BUF_SIZE
 829 #define YY_READ_BUF_SIZE 8192
 830 #endif
 831 
 832 /* Copy whatever the last rule matched to the standard output. */
 833 #ifndef ECHO
 834 /* This used to be an fputs(), but since the string might contain NUL's,
 835  * we now use fwrite().
 836  */
 837 #define ECHO fwrite( asm_text, asm_leng, 1, asm_out )
 838 #endif
 839 
 840 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 841  * is returned in "result".
 842  */
 843 #ifndef YY_INPUT
 844 #define YY_INPUT(buf,result,max_size) \
 845         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
 846                 { \
 847                 int c = '*'; \
 848                 int n; \
 849                 for ( n = 0; n < max_size && \
 850                              (c = getc( asm_in )) != EOF && c != '\n'; ++n ) \
 851                         buf[n] = (char) c; \
 852                 if ( c == '\n' ) \
 853                         buf[n++] = (char) c; \
 854                 if ( c == EOF && ferror( asm_in ) ) \
 855                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
 856                 result = n; \
 857                 } \
 858         else \
 859                 { \
 860                 errno=0; \
 861                 while ( (result = fread(buf, 1, max_size, asm_in))==0 && ferror(asm_in)) \
 862                         { \
 863                         if( errno != EINTR) \
 864                                 { \
 865                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
 866                                 break; \
 867                                 } \
 868                         errno=0; \
 869                         clearerr(asm_in); \
 870                         } \
 871                 }\
 872 \
 873 
 874 #endif
 875 
 876 /* No semi-colon after return; correct usage is to write "yyterminate();" -
 877  * we don't want an extra ';' after the "return" because that will cause
 878  * some compilers to complain about unreachable statements.
 879  */
 880 #ifndef yyterminate
 881 #define yyterminate() return YY_NULL
 882 #endif
 883 
 884 /* Number of entries by which start-condition stack grows. */
 885 #ifndef YY_START_STACK_INCR
 886 #define YY_START_STACK_INCR 25
 887 #endif
 888 
 889 /* Report a fatal error. */
 890 #ifndef YY_FATAL_ERROR
 891 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
 892 #endif
 893 
 894 /* end tables serialization structures and prototypes */
 895 
 896 /* Default declaration of generated scanner - a define so the user can
 897  * easily add parameters.
 898  */
 899 #ifndef YY_DECL
 900 #define YY_DECL_IS_OURS 1
 901 
 902 extern int asm_lex (void);
 903 
 904 #define YY_DECL int asm_lex (void)
 905 #endif /* !YY_DECL */
 906 
 907 /* Code executed at the beginning of each rule, after asm_text and asm_leng
 908  * have been set up.
 909  */
 910 #ifndef YY_USER_ACTION
 911 #define YY_USER_ACTION
 912 #endif
 913 
 914 /* Code executed at the end of each rule. */
 915 #ifndef YY_BREAK
 916 #define YY_BREAK break;
 917 #endif
 918 
 919 #define YY_RULE_SETUP \
 920         if ( asm_leng > 0 ) \
 921                 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
 922                                 (asm_text[asm_leng - 1] == '\n'); \
 923         YY_USER_ACTION
 924 
 925 /** The main scanner function which does all the work.
 926  */
 927 YY_DECL
 928 {
 929         register yy_state_type yy_current_state;
 930         register char *yy_cp, *yy_bp;
 931         register int yy_act;
 932     
 933 #line 91 "asm_scan.l"
 934 
 935 
 936  /* Ignore spaces */
 937 #line 938 "asm_scan.c"
 938 
 939         if ( !(yy_init) )
 940                 {
 941                 (yy_init) = 1;
 942 
 943 #ifdef YY_USER_INIT
 944                 YY_USER_INIT;
 945 #endif
 946 
 947                 if ( ! (yy_start) )
 948                         (yy_start) = 1; /* first start state */
 949 
 950                 if ( ! asm_in )
 951                         asm_in = stdin;
 952 
 953                 if ( ! asm_out )
 954                         asm_out = stdout;
 955 
 956                 if ( ! YY_CURRENT_BUFFER ) {
 957                         asm_ensure_buffer_stack ();
 958                         YY_CURRENT_BUFFER_LVALUE =
 959                                 asm__create_buffer(asm_in,YY_BUF_SIZE );
 960                 }
 961 
 962                 asm__load_buffer_state( );
 963                 }
 964 
 965         while ( 1 )             /* loops until end-of-file is reached */
 966                 {
 967                 yy_cp = (yy_c_buf_p);
 968 
 969                 /* Support of asm_text. */
 970                 *yy_cp = (yy_hold_char);
 971 
 972                 /* yy_bp points to the position in yy_ch_buf of the start of
 973                  * the current run.
 974                  */
 975                 yy_bp = yy_cp;
 976 
 977                 yy_current_state = (yy_start);
 978                 yy_current_state += YY_AT_BOL();
 979 yy_match:
 980                 do
 981                         {
 982                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
 983                         if ( yy_accept[yy_current_state] )
 984                                 {
 985                                 (yy_last_accepting_state) = yy_current_state;
 986                                 (yy_last_accepting_cpos) = yy_cp;
 987                                 }
 988                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 989                                 {
 990                                 yy_current_state = (int) yy_def[yy_current_state];
 991                                 if ( yy_current_state >= 207 )
 992                                         yy_c = yy_meta[(unsigned int) yy_c];
 993                                 }
 994                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 995                         ++yy_cp;
 996                         }
 997                 while ( yy_current_state != 206 );
 998                 yy_cp = (yy_last_accepting_cpos);
 999                 yy_current_state = (yy_last_accepting_state);
1000 
1001 yy_find_action:
1002                 yy_act = yy_accept[yy_current_state];
1003 
1004                 YY_DO_BEFORE_ACTION;
1005 
1006                 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1007                         {
1008                         int yyl;
1009                         for ( yyl = 0; yyl < asm_leng; ++yyl )
1010                                 if ( asm_text[yyl] == '\n' )
1011                                            
1012     asm_lineno++;
1013 ;
1014                         }
1015 
1016 do_action:      /* This label is used only to access EOF actions. */
1017 
1018                 switch ( yy_act )
1019         { /* beginning of action switch */
1020                         case 0: /* must back up */
1021                         /* undo the effects of YY_DO_BEFORE_ACTION */
1022                         *yy_cp = (yy_hold_char);
1023                         yy_cp = (yy_last_accepting_cpos);
1024                         yy_current_state = (yy_last_accepting_state);
1025                         goto yy_find_action;
1026 
1027 case 1:
1028 YY_RULE_SETUP
1029 #line 94 "asm_scan.l"
1030 
1031         YY_BREAK
1032 /* C style comment */
1033 case 2:
1034 YY_RULE_SETUP
1035 #line 97 "asm_scan.l"
1036 { yy_push_state(C_COMMENT); }
1037         YY_BREAK
1038 
1039 case 3:
1040 YY_RULE_SETUP
1041 #line 99 "asm_scan.l"
1042 
1043         YY_BREAK
1044 case 4:
1045 /* rule 4 can match eol */
1046 YY_RULE_SETUP
1047 #line 100 "asm_scan.l"
1048 
1049         YY_BREAK
1050 case 5:
1051 YY_RULE_SETUP
1052 #line 101 "asm_scan.l"
1053 
1054         YY_BREAK
1055 case 6:
1056 /* rule 6 can match eol */
1057 YY_RULE_SETUP
1058 #line 102 "asm_scan.l"
1059 
1060         YY_BREAK
1061 case 7:
1062 YY_RULE_SETUP
1063 #line 103 "asm_scan.l"
1064 { yy_pop_state(); }
1065         YY_BREAK
1066 case YY_STATE_EOF(C_COMMENT):
1067 #line 104 "asm_scan.l"
1068 {
1069                 if (param->flags & PARSER_WARNING)
1070                         warning("unexpected eof. [+%d %s]", LEXLINENO, param->file);
1071                 yyterminate();
1072         }
1073         YY_BREAK
1074 
1075 /* C++ style line comment */
1076 case 8:
1077 YY_RULE_SETUP
1078 #line 112 "asm_scan.l"
1079 { yy_push_state(CPP_COMMENT); }
1080         YY_BREAK
1081 
1082 case 9:
1083 YY_RULE_SETUP
1084 #line 114 "asm_scan.l"
1085 
1086         YY_BREAK
1087 case 10:
1088 /* rule 10 can match eol */
1089 YY_RULE_SETUP
1090 #line 115 "asm_scan.l"
1091 
1092         YY_BREAK
1093 case 11:
1094 /* rule 11 can match eol */
1095 YY_RULE_SETUP
1096 #line 116 "asm_scan.l"
1097 { yy_pop_state(); unput('\n'); }
1098         YY_BREAK
1099 
1100 /* String */
1101 case 12:
1102 YY_RULE_SETUP
1103 #line 120 "asm_scan.l"
1104 { yy_push_state(STRING); }
1105         YY_BREAK
1106 
1107 case 13:
1108 YY_RULE_SETUP
1109 #line 122 "asm_scan.l"
1110 
1111         YY_BREAK
1112 case 14:
1113 /* rule 14 can match eol */
1114 YY_RULE_SETUP
1115 #line 123 "asm_scan.l"
1116 
1117         YY_BREAK
1118 case 15:
1119 /* rule 15 can match eol */
1120 YY_RULE_SETUP
1121 #line 124 "asm_scan.l"
1122 { yy_pop_state(); unput('\n'); return ASM_CONST; }
1123         YY_BREAK
1124 case 16:
1125 YY_RULE_SETUP
1126 #line 125 "asm_scan.l"
1127 { yy_pop_state(); return ASM_CONST; }
1128         YY_BREAK
1129 
1130 /* Character */
1131 case 17:
1132 YY_RULE_SETUP
1133 #line 129 "asm_scan.l"
1134 { yy_push_state(LITERAL); }
1135         YY_BREAK
1136 
1137 case 18:
1138 YY_RULE_SETUP
1139 #line 131 "asm_scan.l"
1140 
1141         YY_BREAK
1142 case 19:
1143 /* rule 19 can match eol */
1144 YY_RULE_SETUP
1145 #line 132 "asm_scan.l"
1146 
1147         YY_BREAK
1148 case 20:
1149 /* rule 20 can match eol */
1150 YY_RULE_SETUP
1151 #line 133 "asm_scan.l"
1152 { yy_pop_state(); unput('\n'); return ASM_CONST; }
1153         YY_BREAK
1154 case 21:
1155 YY_RULE_SETUP
1156 #line 134 "asm_scan.l"
1157 { yy_pop_state(); return ASM_CONST; }
1158         YY_BREAK
1159 
1160 /* Number */
1161 case 22:
1162 YY_RULE_SETUP
1163 #line 138 "asm_scan.l"
1164 { return ASM_CONST; }
1165         YY_BREAK
1166 
1167 case 23:
1168 YY_RULE_SETUP
1169 #line 141 "asm_scan.l"
1170 {
1171                 last_directive = asm_reserved_sharp(LEXTEXT, LEXLENG);
1172                 switch (last_directive) {
1173                 case 0:
1174                         yy_push_state(CPP_COMMENT);
1175                         break;
1176                 case SHARP_DEFINE:
1177                         yy_push_state(PREPROCESSOR_LINE);
1178                         return ASM_DEFINE;
1179                 case SHARP_UNDEF:
1180                         yy_push_state(PREPROCESSOR_LINE);
1181                         return ASM_UNDEF;
1182                 default:
1183                         yy_push_state(PREPROCESSOR_LINE);
1184                         return ASM_DIRECTIVE;
1185                 }
1186         }
1187         YY_BREAK
1188 case 24:
1189 YY_RULE_SETUP
1190 #line 158 "asm_scan.l"
1191 {
1192                 last_directive = 0;
1193                 yy_push_state(PREPROCESSOR_LINE);
1194                 return ASM_DIRECTIVE;
1195         }
1196         YY_BREAK
1197 case 25:
1198 YY_RULE_SETUP
1199 #line 163 "asm_scan.l"
1200 { return ASM_CALL; }
1201         YY_BREAK
1202 case 26:
1203 YY_RULE_SETUP
1204 #line 164 "asm_scan.l"
1205 { return ASM_MACRO; }
1206         YY_BREAK
1207 case 27:
1208 YY_RULE_SETUP
1209 #line 165 "asm_scan.l"
1210 { return ASM_EQU; }
1211         YY_BREAK
1212 case 28:
1213 YY_RULE_SETUP
1214 #line 166 "asm_scan.l"
1215 {
1216                 ADD_SYM(LEXTEXT, LEXLINENO); 
1217                 return ASM_ENTRY;
1218         }
1219         YY_BREAK
1220 case 29:
1221 YY_RULE_SETUP
1222 #line 170 "asm_scan.l"
1223 {
1224                 ADD_SYM(LEXTEXT, LEXLINENO);
1225                 return ASM_EXT;
1226         }
1227         YY_BREAK
1228 case 30:
1229 YY_RULE_SETUP
1230 #line 174 "asm_scan.l"
1231 { ADD_SYM(LEXTEXT, LEXLINENO); return ASM_LABEL; }
1232         YY_BREAK
1233 
1234 
1235 case 31:
1236 YY_RULE_SETUP
1237 #line 178 "asm_scan.l"
1238 {
1239                 switch (last_directive) {
1240                 case SHARP_IF:
1241                 case SHARP_ELIF:
1242                         if (strcmp(LEXTEXT, "defined") == 0)
1243                                 break;
1244                         /* FALLTHROUGH */
1245                 case SHARP_IFDEF:
1246                 case SHARP_IFNDEF:
1247                         PUT(PARSER_REF_SYM, LEXTEXT, LEXLINENO);
1248                         break;
1249                 default:
1250                         ADD_SYM(LEXTEXT, LEXLINENO);
1251                         return ASM_SYMBOL;
1252                 }
1253         }
1254         YY_BREAK
1255 case 32:
1256 /* rule 32 can match eol */
1257 YY_RULE_SETUP
1258 #line 194 "asm_scan.l"
1259 { yy_pop_state(); return '\n'; }
1260         YY_BREAK
1261 
1262 case 33:
1263 YY_RULE_SETUP
1264 #line 197 "asm_scan.l"
1265 { ADD_SYM(LEXTEXT, LEXLINENO); return ASM_SYMBOL; }
1266         YY_BREAK
1267 case 34:
1268 /* rule 34 can match eol */
1269 YY_RULE_SETUP
1270 #line 199 "asm_scan.l"
1271 
1272         YY_BREAK
1273 case 35:
1274 /* rule 35 can match eol */
1275 YY_RULE_SETUP
1276 #line 200 "asm_scan.l"
1277 { return '\n'; }
1278         YY_BREAK
1279 case 36:
1280 YY_RULE_SETUP
1281 #line 201 "asm_scan.l"
1282 { return LEXTEXT[0]; }
1283         YY_BREAK
1284 case 37:
1285 YY_RULE_SETUP
1286 #line 203 "asm_scan.l"
1287 ECHO;
1288         YY_BREAK
1289 #line 1290 "asm_scan.c"
1290 case YY_STATE_EOF(INITIAL):
1291 case YY_STATE_EOF(CPP_COMMENT):
1292 case YY_STATE_EOF(STRING):
1293 case YY_STATE_EOF(LITERAL):
1294 case YY_STATE_EOF(PREPROCESSOR_LINE):
1295         yyterminate();
1296 
1297         case YY_END_OF_BUFFER:
1298                 {
1299                 /* Amount of text matched not including the EOB char. */
1300                 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1301 
1302                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1303                 *yy_cp = (yy_hold_char);
1304                 YY_RESTORE_YY_MORE_OFFSET
1305 
1306                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1307                         {
1308                         /* We're scanning a new file or input source.  It's
1309                          * possible that this happened because the user
1310                          * just pointed asm_in at a new source and called
1311                          * asm_lex().  If so, then we have to assure
1312                          * consistency between YY_CURRENT_BUFFER and our
1313                          * globals.  Here is the right place to do so, because
1314                          * this is the first action (other than possibly a
1315                          * back-up) that will match for the new input source.
1316                          */
1317                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1318                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = asm_in;
1319                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1320                         }
1321 
1322                 /* Note that here we test for yy_c_buf_p "<=" to the position
1323                  * of the first EOB in the buffer, since yy_c_buf_p will
1324                  * already have been incremented past the NUL character
1325                  * (since all states make transitions on EOB to the
1326                  * end-of-buffer state).  Contrast this with the test
1327                  * in input().
1328                  */
1329                 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1330                         { /* This was really a NUL. */
1331                         yy_state_type yy_next_state;
1332 
1333                         (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1334 
1335                         yy_current_state = yy_get_previous_state(  );
1336 
1337                         /* Okay, we're now positioned to make the NUL
1338                          * transition.  We couldn't have
1339                          * yy_get_previous_state() go ahead and do it
1340                          * for us because it doesn't know how to deal
1341                          * with the possibility of jamming (and we don't
1342                          * want to build jamming into it because then it
1343                          * will run more slowly).
1344                          */
1345 
1346                         yy_next_state = yy_try_NUL_trans( yy_current_state );
1347 
1348                         yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1349 
1350                         if ( yy_next_state )
1351                                 {
1352                                 /* Consume the NUL. */
1353                                 yy_cp = ++(yy_c_buf_p);
1354                                 yy_current_state = yy_next_state;
1355                                 goto yy_match;
1356                                 }
1357 
1358                         else
1359                                 {
1360                                 yy_cp = (yy_last_accepting_cpos);
1361                                 yy_current_state = (yy_last_accepting_state);
1362                                 goto yy_find_action;
1363                                 }
1364                         }
1365 
1366                 else switch ( yy_get_next_buffer(  ) )
1367                         {
1368                         case EOB_ACT_END_OF_FILE:
1369                                 {
1370                                 (yy_did_buffer_switch_on_eof) = 0;
1371 
1372                                 if ( asm_wrap( ) )
1373                                         {
1374                                         /* Note: because we've taken care in
1375                                          * yy_get_next_buffer() to have set up
1376                                          * asm_text, we can now set up
1377                                          * yy_c_buf_p so that if some total
1378                                          * hoser (like flex itself) wants to
1379                                          * call the scanner after we return the
1380                                          * YY_NULL, it'll still work - another
1381                                          * YY_NULL will get returned.
1382                                          */
1383                                         (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1384 
1385                                         yy_act = YY_STATE_EOF(YY_START);
1386                                         goto do_action;
1387                                         }
1388 
1389                                 else
1390                                         {
1391                                         if ( ! (yy_did_buffer_switch_on_eof) )
1392                                                 YY_NEW_FILE;
1393                                         }
1394                                 break;
1395                                 }
1396 
1397                         case EOB_ACT_CONTINUE_SCAN:
1398                                 (yy_c_buf_p) =
1399                                         (yytext_ptr) + yy_amount_of_matched_text;
1400 
1401                                 yy_current_state = yy_get_previous_state(  );
1402 
1403                                 yy_cp = (yy_c_buf_p);
1404                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1405                                 goto yy_match;
1406 
1407                         case EOB_ACT_LAST_MATCH:
1408                                 (yy_c_buf_p) =
1409                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1410 
1411                                 yy_current_state = yy_get_previous_state(  );
1412 
1413                                 yy_cp = (yy_c_buf_p);
1414                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1415                                 goto yy_find_action;
1416                         }
1417                 break;
1418                 }
1419 
1420         default:
1421                 YY_FATAL_ERROR(
1422                         "fatal flex scanner internal error--no action found" );
1423         } /* end of action switch */
1424                 } /* end of scanning one token */
1425 } /* end of asm_lex */
1426 
1427 /* yy_get_next_buffer - try to read in a new buffer
1428  *
1429  * Returns a code representing an action:
1430  *      EOB_ACT_LAST_MATCH -
1431  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1432  *      EOB_ACT_END_OF_FILE - end of file
1433  */
1434 static int yy_get_next_buffer (void)
1435 {
1436         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1437         register char *source = (yytext_ptr);
1438         register int number_to_move, i;
1439         int ret_val;
1440 
1441         if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1442                 YY_FATAL_ERROR(
1443                 "fatal flex scanner internal error--end of buffer missed" );
1444 
1445         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1446                 { /* Don't try to fill the buffer, so this is an EOF. */
1447                 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1448                         {
1449                         /* We matched a single character, the EOB, so
1450                          * treat this as a final EOF.
1451                          */
1452                         return EOB_ACT_END_OF_FILE;
1453                         }
1454 
1455                 else
1456                         {
1457                         /* We matched some text prior to the EOB, first
1458                          * process it.
1459                          */
1460                         return EOB_ACT_LAST_MATCH;
1461                         }
1462                 }
1463 
1464         /* Try to read more data. */
1465 
1466         /* First move last chars to start of buffer. */
1467         number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1468 
1469         for ( i = 0; i < number_to_move; ++i )
1470                 *(dest++) = *(source++);
1471 
1472         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1473                 /* don't do the read, it's not guaranteed to return an EOF,
1474                  * just force an EOF
1475                  */
1476                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1477 
1478         else
1479                 {
1480                         int num_to_read =
1481                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1482 
1483                 while ( num_to_read <= 0 )
1484                         { /* Not enough room in the buffer - grow it. */
1485 
1486                         /* just a shorter name for the current buffer */
1487                         YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1488 
1489                         int yy_c_buf_p_offset =
1490                                 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1491 
1492                         if ( b->yy_is_our_buffer )
1493                                 {
1494                                 int new_size = b->yy_buf_size * 2;
1495 
1496                                 if ( new_size <= 0 )
1497                                         b->yy_buf_size += b->yy_buf_size / 8;
1498                                 else
1499                                         b->yy_buf_size *= 2;
1500 
1501                                 b->yy_ch_buf = (char *)
1502                                         /* Include room in for 2 EOB chars. */
1503                                         asm_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
1504                                 }
1505                         else
1506                                 /* Can't grow it, we don't own it. */
1507                                 b->yy_ch_buf = 0;
1508 
1509                         if ( ! b->yy_ch_buf )
1510                                 YY_FATAL_ERROR(
1511                                 "fatal error - scanner input buffer overflow" );
1512 
1513                         (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1514 
1515                         num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1516                                                 number_to_move - 1;
1517 
1518                         }
1519 
1520                 if ( num_to_read > YY_READ_BUF_SIZE )
1521                         num_to_read = YY_READ_BUF_SIZE;
1522 
1523                 /* Read in more data. */
1524                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1525                         (yy_n_chars), (size_t) num_to_read );
1526 
1527                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1528                 }
1529 
1530         if ( (yy_n_chars) == 0 )
1531                 {
1532                 if ( number_to_move == YY_MORE_ADJ )
1533                         {
1534                         ret_val = EOB_ACT_END_OF_FILE;
1535                         asm_restart(asm_in  );
1536                         }
1537 
1538                 else
1539                         {
1540                         ret_val = EOB_ACT_LAST_MATCH;
1541                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1542                                 YY_BUFFER_EOF_PENDING;
1543                         }
1544                 }
1545 
1546         else
1547                 ret_val = EOB_ACT_CONTINUE_SCAN;
1548 
1549         if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1550                 /* Extend the array by 50%, plus the number we really need. */
1551                 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1552                 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) asm_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
1553                 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1554                         YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1555         }
1556 
1557         (yy_n_chars) += number_to_move;
1558         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1559         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1560 
1561         (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1562 
1563         return ret_val;
1564 }
1565 
1566 /* yy_get_previous_state - get the state just before the EOB char was reached */
1567 
1568     static yy_state_type yy_get_previous_state (void)
1569 {
1570         register yy_state_type yy_current_state;
1571         register char *yy_cp;
1572     
1573         yy_current_state = (yy_start);
1574         yy_current_state += YY_AT_BOL();
1575 
1576         for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1577                 {
1578                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1579                 if ( yy_accept[yy_current_state] )
1580                         {
1581                         (yy_last_accepting_state) = yy_current_state;
1582                         (yy_last_accepting_cpos) = yy_cp;
1583                         }
1584                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1585                         {
1586                         yy_current_state = (int) yy_def[yy_current_state];
1587                         if ( yy_current_state >= 207 )
1588                                 yy_c = yy_meta[(unsigned int) yy_c];
1589                         }
1590                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1591                 }
1592 
1593         return yy_current_state;
1594 }
1595 
1596 /* yy_try_NUL_trans - try to make a transition on the NUL character
1597  *
1598  * synopsis
1599  *      next_state = yy_try_NUL_trans( current_state );
1600  */
1601     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
1602 {
1603         register int yy_is_jam;
1604         register char *yy_cp = (yy_c_buf_p);
1605 
1606         register YY_CHAR yy_c = 1;
1607         if ( yy_accept[yy_current_state] )
1608                 {
1609                 (yy_last_accepting_state) = yy_current_state;
1610                 (yy_last_accepting_cpos) = yy_cp;
1611                 }
1612         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1613                 {
1614                 yy_current_state = (int) yy_def[yy_current_state];
1615                 if ( yy_current_state >= 207 )
1616                         yy_c = yy_meta[(unsigned int) yy_c];
1617                 }
1618         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1619         yy_is_jam = (yy_current_state == 206);
1620 
1621         return yy_is_jam ? 0 : yy_current_state;
1622 }
1623 
1624     static void yyunput (int c, register char * yy_bp )
1625 {
1626         register char *yy_cp;
1627     
1628     yy_cp = (yy_c_buf_p);
1629 
1630         /* undo effects of setting up asm_text */
1631         *yy_cp = (yy_hold_char);
1632 
1633         if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1634                 { /* need to shift things up to make room */
1635                 /* +2 for EOB chars. */
1636                 register int number_to_move = (yy_n_chars) + 2;
1637                 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1638                                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1639                 register char *source =
1640                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1641 
1642                 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1643                         *--dest = *--source;
1644 
1645                 yy_cp += (int) (dest - source);
1646                 yy_bp += (int) (dest - source);
1647                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1648                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1649 
1650                 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1651                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
1652                 }
1653 
1654         *--yy_cp = (char) c;
1655 
1656     if ( c == '\n' ){
1657         --asm_lineno;
1658     }
1659 
1660         (yytext_ptr) = yy_bp;
1661         (yy_hold_char) = *yy_cp;
1662         (yy_c_buf_p) = yy_cp;
1663 }
1664 
1665 #ifndef YY_NO_INPUT
1666 #ifdef __cplusplus
1667     static int yyinput (void)
1668 #else
1669     static int input  (void)
1670 #endif
1671 
1672 {
1673         int c;
1674     
1675         *(yy_c_buf_p) = (yy_hold_char);
1676 
1677         if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1678                 {
1679                 /* yy_c_buf_p now points to the character we want to return.
1680                  * If this occurs *before* the EOB characters, then it's a
1681                  * valid NUL; if not, then we've hit the end of the buffer.
1682                  */
1683                 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1684                         /* This was really a NUL. */
1685                         *(yy_c_buf_p) = '\0';
1686 
1687                 else
1688                         { /* need more input */
1689                         int offset = (yy_c_buf_p) - (yytext_ptr);
1690                         ++(yy_c_buf_p);
1691 
1692                         switch ( yy_get_next_buffer(  ) )
1693                                 {
1694                                 case EOB_ACT_LAST_MATCH:
1695                                         /* This happens because yy_g_n_b()
1696                                          * sees that we've accumulated a
1697                                          * token and flags that we need to
1698                                          * try matching the token before
1699                                          * proceeding.  But for input(),
1700                                          * there's no matching to consider.
1701                                          * So convert the EOB_ACT_LAST_MATCH
1702                                          * to EOB_ACT_END_OF_FILE.
1703                                          */
1704 
1705                                         /* Reset buffer status. */
1706                                         asm_restart(asm_in );
1707 
1708                                         /*FALLTHROUGH*/
1709 
1710                                 case EOB_ACT_END_OF_FILE:
1711                                         {
1712                                         if ( asm_wrap( ) )
1713                                                 return EOF;
1714 
1715                                         if ( ! (yy_did_buffer_switch_on_eof) )
1716                                                 YY_NEW_FILE;
1717 #ifdef __cplusplus
1718                                         return yyinput();
1719 #else
1720                                         return input();
1721 #endif
1722                                         }
1723 
1724                                 case EOB_ACT_CONTINUE_SCAN:
1725                                         (yy_c_buf_p) = (yytext_ptr) + offset;
1726                                         break;
1727                                 }
1728                         }
1729                 }
1730 
1731         c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
1732         *(yy_c_buf_p) = '\0';   /* preserve asm_text */
1733         (yy_hold_char) = *++(yy_c_buf_p);
1734 
1735         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1736         if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )
1737                    
1738     asm_lineno++;
1739 ;
1740 
1741         return c;
1742 }
1743 #endif  /* ifndef YY_NO_INPUT */
1744 
1745 /** Immediately switch to a different input stream.
1746  * @param input_file A readable stream.
1747  * 
1748  * @note This function does not reset the start condition to @c INITIAL .
1749  */
1750     void asm_restart  (FILE * input_file )
1751 {
1752     
1753         if ( ! YY_CURRENT_BUFFER ){
1754         asm_ensure_buffer_stack ();
1755                 YY_CURRENT_BUFFER_LVALUE =
1756             asm__create_buffer(asm_in,YY_BUF_SIZE );
1757         }
1758 
1759         asm__init_buffer(YY_CURRENT_BUFFER,input_file );
1760         asm__load_buffer_state( );
1761 }
1762 
1763 /** Switch to a different input buffer.
1764  * @param new_buffer The new input buffer.
1765  * 
1766  */
1767     void asm__switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
1768 {
1769     
1770         /* TODO. We should be able to replace this entire function body
1771          * with
1772          *              asm_pop_buffer_state();
1773          *              asm_push_buffer_state(new_buffer);
1774      */
1775         asm_ensure_buffer_stack ();
1776         if ( YY_CURRENT_BUFFER == new_buffer )
1777                 return;
1778 
1779         if ( YY_CURRENT_BUFFER )
1780                 {
1781                 /* Flush out information for old buffer. */
1782                 *(yy_c_buf_p) = (yy_hold_char);
1783                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1784                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1785                 }
1786 
1787         YY_CURRENT_BUFFER_LVALUE = new_buffer;
1788         asm__load_buffer_state( );
1789 
1790         /* We don't actually know whether we did this switch during
1791          * EOF (asm_wrap()) processing, but the only time this flag
1792          * is looked at is after asm_wrap() is called, so it's safe
1793          * to go ahead and always set it.
1794          */
1795         (yy_did_buffer_switch_on_eof) = 1;
1796 }
1797 
1798 static void asm__load_buffer_state  (void)
1799 {
1800         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1801         (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1802         asm_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1803         (yy_hold_char) = *(yy_c_buf_p);
1804 }
1805 
1806 /** Allocate and initialize an input buffer state.
1807  * @param file A readable stream.
1808  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1809  * 
1810  * @return the allocated buffer state.
1811  */
1812     YY_BUFFER_STATE asm__create_buffer  (FILE * file, int  size )
1813 {
1814         YY_BUFFER_STATE b;
1815     
1816         b = (YY_BUFFER_STATE) asm_alloc(sizeof( struct yy_buffer_state )  );
1817         if ( ! b )
1818                 YY_FATAL_ERROR( "out of dynamic memory in asm__create_buffer()" );
1819 
1820         b->yy_buf_size = size;
1821 
1822         /* yy_ch_buf has to be 2 characters longer than the size given because
1823          * we need to put in 2 end-of-buffer characters.
1824          */
1825         b->yy_ch_buf = (char *) asm_alloc(b->yy_buf_size + 2  );
1826         if ( ! b->yy_ch_buf )
1827                 YY_FATAL_ERROR( "out of dynamic memory in asm__create_buffer()" );
1828 
1829         b->yy_is_our_buffer = 1;
1830 
1831         asm__init_buffer(b,file );
1832 
1833         return b;
1834 }
1835 
1836 /** Destroy the buffer.
1837  * @param b a buffer created with asm__create_buffer()
1838  * 
1839  */
1840     void asm__delete_buffer (YY_BUFFER_STATE  b )
1841 {
1842     
1843         if ( ! b )
1844                 return;
1845 
1846         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1847                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1848 
1849         if ( b->yy_is_our_buffer )
1850                 asm_free((void *) b->yy_ch_buf  );
1851 
1852         asm_free((void *) b  );
1853 }
1854 
1855 /* Initializes or reinitializes a buffer.
1856  * This function is sometimes called more than once on the same buffer,
1857  * such as during a asm_restart() or at EOF.
1858  */
1859     static void asm__init_buffer  (YY_BUFFER_STATE  b, FILE * file )
1860 
1861 {
1862         int oerrno = errno;
1863     
1864         asm__flush_buffer(b );
1865 
1866         b->yy_input_file = file;
1867         b->yy_fill_buffer = 1;
1868 
1869     /* If b is the current buffer, then asm__init_buffer was _probably_
1870      * called from asm_restart() or through yy_get_next_buffer.
1871      * In that case, we don't want to reset the lineno or column.
1872      */
1873     if (b != YY_CURRENT_BUFFER){
1874         b->yy_bs_lineno = 1;
1875         b->yy_bs_column = 0;
1876     }
1877 
1878         b->yy_is_interactive = 0;
1879     
1880         errno = oerrno;
1881 }
1882 
1883 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1884  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1885  * 
1886  */
1887     void asm__flush_buffer (YY_BUFFER_STATE  b )
1888 {
1889         if ( ! b )
1890                 return;
1891 
1892         b->yy_n_chars = 0;
1893 
1894         /* We always need two end-of-buffer characters.  The first causes
1895          * a transition to the end-of-buffer state.  The second causes
1896          * a jam in that state.
1897          */
1898         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1899         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1900 
1901         b->yy_buf_pos = &b->yy_ch_buf[0];
1902 
1903         b->yy_at_bol = 1;
1904         b->yy_buffer_status = YY_BUFFER_NEW;
1905 
1906         if ( b == YY_CURRENT_BUFFER )
1907                 asm__load_buffer_state( );
1908 }
1909 
1910 /** Pushes the new state onto the stack. The new state becomes
1911  *  the current state. This function will allocate the stack
1912  *  if necessary.
1913  *  @param new_buffer The new state.
1914  *  
1915  */
1916 void asm_push_buffer_state (YY_BUFFER_STATE new_buffer )
1917 {
1918         if (new_buffer == NULL)
1919                 return;
1920 
1921         asm_ensure_buffer_stack();
1922 
1923         /* This block is copied from asm__switch_to_buffer. */
1924         if ( YY_CURRENT_BUFFER )
1925                 {
1926                 /* Flush out information for old buffer. */
1927                 *(yy_c_buf_p) = (yy_hold_char);
1928                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1929                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1930                 }
1931 
1932         /* Only push if top exists. Otherwise, replace top. */
1933         if (YY_CURRENT_BUFFER)
1934                 (yy_buffer_stack_top)++;
1935         YY_CURRENT_BUFFER_LVALUE = new_buffer;
1936 
1937         /* copied from asm__switch_to_buffer. */
1938         asm__load_buffer_state( );
1939         (yy_did_buffer_switch_on_eof) = 1;
1940 }
1941 
1942 /** Removes and deletes the top of the stack, if present.
1943  *  The next element becomes the new top.
1944  *  
1945  */
1946 void asm_pop_buffer_state (void)
1947 {
1948         if (!YY_CURRENT_BUFFER)
1949                 return;
1950 
1951         asm__delete_buffer(YY_CURRENT_BUFFER );
1952         YY_CURRENT_BUFFER_LVALUE = NULL;
1953         if ((yy_buffer_stack_top) > 0)
1954                 --(yy_buffer_stack_top);
1955 
1956         if (YY_CURRENT_BUFFER) {
1957                 asm__load_buffer_state( );
1958                 (yy_did_buffer_switch_on_eof) = 1;
1959         }
1960 }
1961 
1962 /* Allocates the stack if it does not exist.
1963  *  Guarantees space for at least one push.
1964  */
1965 static void asm_ensure_buffer_stack (void)
1966 {
1967         int num_to_alloc;
1968     
1969         if (!(yy_buffer_stack)) {
1970 
1971                 /* First allocation is just for 2 elements, since we don't know if this
1972                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1973                  * immediate realloc on the next call.
1974          */
1975                 num_to_alloc = 1;
1976                 (yy_buffer_stack) = (struct yy_buffer_state**)asm_alloc
1977                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
1978                                                                 );
1979                 if ( ! (yy_buffer_stack) )
1980                         YY_FATAL_ERROR( "out of dynamic memory in asm_ensure_buffer_stack()" );
1981                                                                   
1982                 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1983                                 
1984                 (yy_buffer_stack_max) = num_to_alloc;
1985                 (yy_buffer_stack_top) = 0;
1986                 return;
1987         }
1988 
1989         if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1990 
1991                 /* Increase the buffer to prepare for a possible push. */
1992                 int grow_size = 8 /* arbitrary grow size */;
1993 
1994                 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1995                 (yy_buffer_stack) = (struct yy_buffer_state**)asm_realloc
1996                                                                 ((yy_buffer_stack),
1997                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
1998                                                                 );
1999                 if ( ! (yy_buffer_stack) )
2000                         YY_FATAL_ERROR( "out of dynamic memory in asm_ensure_buffer_stack()" );
2001 
2002                 /* zero only the new slots.*/
2003                 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2004                 (yy_buffer_stack_max) = num_to_alloc;
2005         }
2006 }
2007 
2008 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2009  * @param base the character buffer
2010  * @param size the size in bytes of the character buffer
2011  * 
2012  * @return the newly allocated buffer state object. 
2013  */
2014 YY_BUFFER_STATE asm__scan_buffer  (char * base, yy_size_t  size )
2015 {
2016         YY_BUFFER_STATE b;
2017     
2018         if ( size < 2 ||
2019              base[size-2] != YY_END_OF_BUFFER_CHAR ||
2020              base[size-1] != YY_END_OF_BUFFER_CHAR )
2021                 /* They forgot to leave room for the EOB's. */
2022                 return 0;
2023 
2024         b = (YY_BUFFER_STATE) asm_alloc(sizeof( struct yy_buffer_state )  );
2025         if ( ! b )
2026                 YY_FATAL_ERROR( "out of dynamic memory in asm__scan_buffer()" );
2027 
2028         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
2029         b->yy_buf_pos = b->yy_ch_buf = base;
2030         b->yy_is_our_buffer = 0;
2031         b->yy_input_file = 0;
2032         b->yy_n_chars = b->yy_buf_size;
2033         b->yy_is_interactive = 0;
2034         b->yy_at_bol = 1;
2035         b->yy_fill_buffer = 0;
2036         b->yy_buffer_status = YY_BUFFER_NEW;
2037 
2038         asm__switch_to_buffer(b  );
2039 
2040         return b;
2041 }
2042 
2043 /** Setup the input buffer state to scan a string. The next call to asm_lex() will
2044  * scan from a @e copy of @a str.
2045  * @param yystr a NUL-terminated string to scan
2046  * 
2047  * @return the newly allocated buffer state object.
2048  * @note If you want to scan bytes that may contain NUL values, then use
2049  *       asm__scan_bytes() instead.
2050  */
2051 YY_BUFFER_STATE asm__scan_string (yyconst char * yystr )
2052 {
2053     
2054         return asm__scan_bytes(yystr,strlen(yystr) );
2055 }
2056 
2057 /** Setup the input buffer state to scan the given bytes. The next call to asm_lex() will
2058  * scan from a @e copy of @a bytes.
2059  * @param bytes the byte buffer to scan
2060  * @param len the number of bytes in the buffer pointed to by @a bytes.
2061  * 
2062  * @return the newly allocated buffer state object.
2063  */
2064 YY_BUFFER_STATE asm__scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
2065 {
2066         YY_BUFFER_STATE b;
2067         char *buf;
2068         yy_size_t n;
2069         int i;
2070     
2071         /* Get memory for full buffer, including space for trailing EOB's. */
2072         n = _yybytes_len + 2;
2073         buf = (char *) asm_alloc(n  );
2074         if ( ! buf )
2075                 YY_FATAL_ERROR( "out of dynamic memory in asm__scan_bytes()" );
2076 
2077         for ( i = 0; i < _yybytes_len; ++i )
2078                 buf[i] = yybytes[i];
2079 
2080         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2081 
2082         b = asm__scan_buffer(buf,n );
2083         if ( ! b )
2084                 YY_FATAL_ERROR( "bad buffer in asm__scan_bytes()" );
2085 
2086         /* It's okay to grow etc. this buffer, and we should throw it
2087          * away when we're done.
2088          */
2089         b->yy_is_our_buffer = 1;
2090 
2091         return b;
2092 }
2093 
2094     static void yy_push_state (int  new_state )
2095 {
2096         if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
2097                 {
2098                 yy_size_t new_size;
2099 
2100                 (yy_start_stack_depth) += YY_START_STACK_INCR;
2101                 new_size = (yy_start_stack_depth) * sizeof( int );
2102 
2103                 if ( ! (yy_start_stack) )
2104                         (yy_start_stack) = (int *) asm_alloc(new_size  );
2105 
2106                 else
2107                         (yy_start_stack) = (int *) asm_realloc((void *) (yy_start_stack),new_size  );
2108 
2109                 if ( ! (yy_start_stack) )
2110                         YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
2111                 }
2112 
2113         (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
2114 
2115         BEGIN(new_state);
2116 }
2117 
2118     static void yy_pop_state  (void)
2119 {
2120         if ( --(yy_start_stack_ptr) < 0 )
2121                 YY_FATAL_ERROR( "start-condition stack underflow" );
2122 
2123         BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
2124 }
2125 
2126 #ifndef YY_EXIT_FAILURE
2127 #define YY_EXIT_FAILURE 2
2128 #endif
2129 
2130 static void yy_fatal_error (yyconst char* msg )
2131 {
2132         (void) fprintf( stderr, "%s\n", msg );
2133         exit( YY_EXIT_FAILURE );
2134 }
2135 
2136 /* Redefine yyless() so it works in section 3 code. */
2137 
2138 #undef yyless
2139 #define yyless(n) \
2140         do \
2141                 { \
2142                 /* Undo effects of setting up asm_text. */ \
2143         int yyless_macro_arg = (n); \
2144         YY_LESS_LINENO(yyless_macro_arg);\
2145                 asm_text[asm_leng] = (yy_hold_char); \
2146                 (yy_c_buf_p) = asm_text + yyless_macro_arg; \
2147                 (yy_hold_char) = *(yy_c_buf_p); \
2148                 *(yy_c_buf_p) = '\0'; \
2149                 asm_leng = yyless_macro_arg; \
2150                 } \
2151         while ( 0 )
2152 
2153 /* Accessor  methods (get/set functions) to struct members. */
2154 
2155 /** Get the current line number.
2156  * 
2157  */
2158 int asm_get_lineno  (void)
2159 {
2160         
2161     return asm_lineno;
2162 }
2163 
2164 /** Get the input stream.
2165  * 
2166  */
2167 FILE *asm_get_in  (void)
2168 {
2169         return asm_in;
2170 }
2171 
2172 /** Get the output stream.
2173  * 
2174  */
2175 FILE *asm_get_out  (void)
2176 {
2177         return asm_out;
2178 }
2179 
2180 /** Get the length of the current token.
2181  * 
2182  */
2183 int asm_get_leng  (void)
2184 {
2185         return asm_leng;
2186 }
2187 
2188 /** Get the current token.
2189  * 
2190  */
2191 
2192 char *asm_get_text  (void)
2193 {
2194         return asm_text;
2195 }
2196 
2197 /** Set the current line number.
2198  * @param line_number
2199  * 
2200  */
2201 void asm_set_lineno (int  line_number )
2202 {
2203     
2204     asm_lineno = line_number;
2205 }
2206 
2207 /** Set the input stream. This does not discard the current
2208  * input buffer.
2209  * @param in_str A readable stream.
2210  * 
2211  * @see asm__switch_to_buffer
2212  */
2213 void asm_set_in (FILE *  in_str )
2214 {
2215         asm_in = in_str ;
2216 }
2217 
2218 void asm_set_out (FILE *  out_str )
2219 {
2220         asm_out = out_str ;
2221 }
2222 
2223 int asm_get_debug  (void)
2224 {
2225         return asm__flex_debug;
2226 }
2227 
2228 void asm_set_debug (int  bdebug )
2229 {
2230         asm__flex_debug = bdebug ;
2231 }
2232 
2233 static int yy_init_globals (void)
2234 {
2235         /* Initialization is the same as for the non-reentrant scanner.
2236      * This function is called from asm_lex_destroy(), so don't allocate here.
2237      */
2238 
2239     /* We do not touch asm_lineno unless the option is enabled. */
2240     asm_lineno =  1;
2241     
2242     (yy_buffer_stack) = 0;
2243     (yy_buffer_stack_top) = 0;
2244     (yy_buffer_stack_max) = 0;
2245     (yy_c_buf_p) = (char *) 0;
2246     (yy_init) = 0;
2247     (yy_start) = 0;
2248 
2249     (yy_start_stack_ptr) = 0;
2250     (yy_start_stack_depth) = 0;
2251     (yy_start_stack) =  NULL;
2252 
2253 /* Defined in main.c */
2254 #ifdef YY_STDINIT
2255     asm_in = stdin;
2256     asm_out = stdout;
2257 #else
2258     asm_in = (FILE *) 0;
2259     asm_out = (FILE *) 0;
2260 #endif
2261 
2262     /* For future reference: Set errno on error, since we are called by
2263      * asm_lex_init()
2264      */
2265     return 0;
2266 }
2267 
2268 /* asm_lex_destroy is for both reentrant and non-reentrant scanners. */
2269 int asm_lex_destroy  (void)
2270 {
2271     
2272     /* Pop the buffer stack, destroying each element. */
2273         while(YY_CURRENT_BUFFER){
2274                 asm__delete_buffer(YY_CURRENT_BUFFER  );
2275                 YY_CURRENT_BUFFER_LVALUE = NULL;
2276                 asm_pop_buffer_state();
2277         }
2278 
2279         /* Destroy the stack itself. */
2280         asm_free((yy_buffer_stack) );
2281         (yy_buffer_stack) = NULL;
2282 
2283     /* Destroy the start condition stack. */
2284         asm_free((yy_start_stack)  );
2285         (yy_start_stack) = NULL;
2286 
2287     /* Reset the globals. This is important in a non-reentrant scanner so the next time
2288      * asm_lex() is called, initialization will occur. */
2289     yy_init_globals( );
2290 
2291     return 0;
2292 }
2293 
2294 /*
2295  * Internal utility routines.
2296  */
2297 
2298 #ifndef yytext_ptr
2299 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2300 {
2301         register int i;
2302         for ( i = 0; i < n; ++i )
2303                 s1[i] = s2[i];
2304 }
2305 #endif
2306 
2307 #ifdef YY_NEED_STRLEN
2308 static int yy_flex_strlen (yyconst char * s )
2309 {
2310         register int n;
2311         for ( n = 0; s[n]; ++n )
2312                 ;
2313 
2314         return n;
2315 }
2316 #endif
2317 
2318 void *asm_alloc (yy_size_t  size )
2319 {
2320         return (void *) malloc( size );
2321 }
2322 
2323 void *asm_realloc  (void * ptr, yy_size_t  size )
2324 {
2325         /* The cast to (char *) in the following accommodates both
2326          * implementations that use char* generic pointers, and those
2327          * that use void* generic pointers.  It works with the latter
2328          * because both ANSI C and C++ allow castless assignment from
2329          * any pointer type to void*, and deal with argument conversions
2330          * as though doing an assignment.
2331          */
2332         return (void *) realloc( (char *) ptr, size );
2333 }
2334 
2335 void asm_free (void * ptr )
2336 {
2337         free( (char *) ptr );   /* see asm_realloc() for (char *) cast */
2338 }
2339 
2340 #define YYTABLES_NAME "yytables"
2341 
2342 #line 203 "asm_scan.l"
2343 
2344 
2345 
2346 void
2347 asm_initscan(void)
2348 {
2349         LEXRESTART(NULL);
2350         LEXLINENO = 1;
2351 }
2352 

/* [previous][next][first][last][top][bottom][index][help] */