1 #line 2 "assembler_lex.yy.cpp" 3 #line 4 "assembler_lex.yy.cpp" 5 #define YY_INT_ALIGNED short int 9 #define yy_create_buffer yyassembler_create_buffer 10 #define yy_delete_buffer yyassembler_delete_buffer 11 #define yy_flex_debug yyassembler_flex_debug 12 #define yy_init_buffer yyassembler_init_buffer 13 #define yy_flush_buffer yyassembler_flush_buffer 14 #define yy_load_buffer_state yyassembler_load_buffer_state 15 #define yy_switch_to_buffer yyassembler_switch_to_buffer 16 #define yyin yyassemblerin 17 #define yyleng yyassemblerleng 18 #define yylex yyassemblerlex 19 #define yylineno yyassemblerlineno 20 #define yyout yyassemblerout 21 #define yyrestart yyassemblerrestart 22 #define yytext yyassemblertext 23 #define yywrap yyassemblerwrap 24 #define yyalloc yyassembleralloc 25 #define yyrealloc yyassemblerrealloc 26 #define yyfree yyassemblerfree 29 #define YY_FLEX_MAJOR_VERSION 2 30 #define YY_FLEX_MINOR_VERSION 6 31 #define YY_FLEX_SUBMINOR_VERSION 1 32 #if YY_FLEX_SUBMINOR_VERSION > 0 53 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 58 #ifndef __STDC_LIMIT_MACROS 59 #define __STDC_LIMIT_MACROS 1 79 #define INT8_MIN (-128) 82 #define INT16_MIN (-32767-1) 85 #define INT32_MIN (-2147483647-1) 88 #define INT8_MAX (127) 91 #define INT16_MAX (32767) 94 #define INT32_MAX (2147483647) 97 #define UINT8_MAX (255U) 100 #define UINT16_MAX (65535U) 103 #define UINT32_MAX (4294967295U) 111 #define yyconst const 113 #if defined(__GNUC__) && __GNUC__ >= 3 114 #define yynoreturn __attribute__((__noreturn__)) 127 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) 133 #define BEGIN (yy_start) = 1 + 2 * 139 #define YY_START (((yy_start) - 1) / 2) 140 #define YYSTATE YY_START 143 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) 146 #define YY_NEW_FILE yyassemblerrestart(yyassemblerin ) 148 #define YY_END_OF_BUFFER_CHAR 0 157 #define YY_BUF_SIZE 32768 159 #define YY_BUF_SIZE 16384 165 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) 167 #ifndef YY_TYPEDEF_YY_BUFFER_STATE 168 #define YY_TYPEDEF_YY_BUFFER_STATE 172 #ifndef YY_TYPEDEF_YY_SIZE_T 173 #define YY_TYPEDEF_YY_SIZE_T 181 #define EOB_ACT_CONTINUE_SCAN 0 182 #define EOB_ACT_END_OF_FILE 1 183 #define EOB_ACT_LAST_MATCH 2 185 #define YY_LESS_LINENO(n) 186 #define YY_LINENO_REWIND_TO(ptr) 193 yy_size_t yyless_macro_arg = (n); \ 194 YY_LESS_LINENO(yyless_macro_arg);\ 195 *yy_cp = (yy_hold_char); \ 196 YY_RESTORE_YY_MORE_OFFSET \ 197 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ 198 YY_DO_BEFORE_ACTION; \ 202 #define unput(c) yyunput( c, (yytext_ptr) ) 204 #ifndef YY_STRUCT_YY_BUFFER_STATE 205 #define YY_STRUCT_YY_BUFFER_STATE 252 #define YY_BUFFER_NEW 0 253 #define YY_BUFFER_NORMAL 1 264 #define YY_BUFFER_EOF_PENDING 2 280 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ 281 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ 287 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] 316 #define YY_FLUSH_BUFFER yyassembler_flush_buffer(YY_CURRENT_BUFFER ) 326 #define yy_new_buffer yyassembler_create_buffer 328 #define yy_set_interactive(is_interactive) \ 330 if ( ! YY_CURRENT_BUFFER ){ \ 331 yyassemblerensure_buffer_stack (); \ 332 YY_CURRENT_BUFFER_LVALUE = \ 333 yyassembler_create_buffer(yyassemblerin,YY_BUF_SIZE ); \ 335 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ 338 #define yy_set_bol(at_bol) \ 340 if ( ! YY_CURRENT_BUFFER ){\ 341 yyassemblerensure_buffer_stack (); \ 342 YY_CURRENT_BUFFER_LVALUE = \ 343 yyassembler_create_buffer(yyassemblerin,YY_BUF_SIZE ); \ 345 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 348 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) 366 #define yytext_ptr yyassemblertext 376 #define YY_DO_BEFORE_ACTION \ 377 (yytext_ptr) = yy_bp; \ 378 yyassemblerleng = (int) (yy_cp - yy_bp); \ 379 (yy_hold_char) = *yy_cp; \ 381 (yy_c_buf_p) = yy_cp; 383 #define YY_NUM_RULES 14 384 #define YY_END_OF_BUFFER 15 394 0, 0, 9, 9, 4, 4, 15, 1, 13, 7,
395 5, 5, 2, 10, 10, 6, 13, 13, 13, 4,
396 3, 7, 10, 10, 12, 11, 5, 4, 10, 10,
402 1, 1, 1, 1, 1, 1, 1, 2, 2, 3,
403 4, 4, 2, 1, 1, 1, 1, 1, 1, 1,
404 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
405 1, 2, 1, 1, 5, 6, 1, 1, 1, 1,
406 1, 1, 1, 1, 1, 7, 1, 8, 8, 8,
407 8, 8, 8, 8, 8, 8, 8, 1, 9, 10,
408 1, 11, 1, 1, 12, 12, 12, 12, 12, 12,
409 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
410 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
411 1, 13, 1, 1, 14, 1, 15, 16, 16, 17,
413 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
414 16, 16, 16, 16, 16, 18, 16, 16, 16, 16,
415 16, 16, 1, 1, 1, 1, 1, 1, 1, 1,
416 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
417 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
418 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
419 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
420 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
421 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
422 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
424 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
425 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
426 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
427 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
428 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
435 1, 1, 1, 1, 1, 1, 1, 1
440 0, 0, 0, 0, 41, 40, 42, 45, 45, 39,
441 45, 45, 45, 13, 23, 45, 29, 27, 34, 0,
442 45, 34, 0, 11, 45, 45, 45, 0, 6, 8,
448 33, 33, 32, 3, 34, 34, 32, 32, 32, 32,
449 32, 32, 32, 32, 14, 32, 32, 32, 32, 35,
450 32, 32, 14, 14, 32, 32, 32, 35, 14, 14,
456 9, 10, 11, 12, 13, 14, 15, 9, 16, 17,
457 18, 14, 19, 14, 14, 14, 14, 14, 23, 23,
458 23, 28, 31, 30, 23, 29, 23, 23, 23, 23,
459 23, 8, 8, 20, 20, 22, 27, 26, 25, 24,
460 22, 32, 21, 21, 7, 32, 32, 32, 32, 32,
461 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
467 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
468 3, 3, 3, 3, 3, 3, 3, 3, 14, 14,
469 14, 35, 30, 29, 14, 24, 14, 14, 14, 14,
470 14, 33, 33, 34, 34, 22, 19, 18, 17, 15,
471 10, 7, 6, 5, 32, 32, 32, 32, 32, 32,
472 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
485 #define REJECT reject_used_but_not_detected 486 #define yymore() yymore_used_but_not_detected 487 #define YY_MORE_ADJ 0 488 #define YY_RESTORE_YY_MORE_OFFSET 491 #define YY_NO_INPUT 1 495 #define YY_NO_UNISTD_H 496 static int isatty(
int) {
return 0; }
499 #define PARSER assembler_parser 500 #define YYSTYPE unsigned 506 #include <util/pragma_wsign_compare.def> 507 #include <util/pragma_wnull_conversion.def> 508 #include <util/pragma_wdeprecated_register.def> 519 #line 520 "assembler_lex.yy.cpp" 523 #define LINE_COMMENT 2 525 #ifndef YY_NO_UNISTD_H 533 #ifndef YY_EXTRA_TYPE 534 #define YY_EXTRA_TYPE void * 572 #ifndef YY_SKIP_YYWRAP 585 static void yy_flex_strncpy (
char *,
yyconst char *,
int );
588 #ifdef YY_NEED_STRLEN 589 static int yy_flex_strlen (
yyconst char * );
595 static int yyinput (
void );
597 static int input (
void );
603 #ifndef YY_READ_BUF_SIZE 606 #define YY_READ_BUF_SIZE 16384 608 #define YY_READ_BUF_SIZE 8192 617 #define ECHO do { if (fwrite( yyassemblertext, (size_t) yyassemblerleng, 1, yyassemblerout )) {} } while (0) 624 #define YY_INPUT(buf,result,max_size) \ 625 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 629 for ( n = 0; n < max_size && \ 630 (c = getc( yyassemblerin )) != EOF && c != '\n'; ++n ) \ 633 buf[n++] = (char) c; \ 634 if ( c == EOF && ferror( yyassemblerin ) ) \ 635 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 641 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyassemblerin)) == 0 && ferror(yyassemblerin)) \ 643 if( errno != EINTR) \ 645 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 649 clearerr(yyassemblerin); \ 661 #define yyterminate() return YY_NULL 665 #ifndef YY_START_STACK_INCR 666 #define YY_START_STACK_INCR 25 670 #ifndef YY_FATAL_ERROR 671 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) 680 #define YY_DECL_IS_OURS 1 684 #define YY_DECL int yyassemblerlex (void) 690 #ifndef YY_USER_ACTION 691 #define YY_USER_ACTION 696 #define YY_BREAK break; 699 #define YY_RULE_SETUP \ 740 #line 741 "assembler_lex.yy.cpp" 764 while (
yy_chk[
yy_base[yy_current_state] + yy_c] != yy_current_state )
766 yy_current_state = (int)
yy_def[yy_current_state];
767 if ( yy_current_state >= 33 )
768 yy_c =
yy_meta[(
unsigned int) yy_c];
773 while (
yy_base[yy_current_state] != 45 );
827 {
PARSER.new_instruction(); }
832 {
PARSER.new_instruction(); }
857 {
irept identifier(ID_symbol);
859 PARSER.add_token(identifier);
874 #line 100 "scanner.l" 884 #line 106 "scanner.l" 889 #line 108 "scanner.l" 892 #line 893 "assembler_lex.yy.cpp" 897 int yy_amount_of_matched_text = (int) (yy_cp - (
yytext_ptr)) - 1;
951 yy_current_state = yy_next_state;
1011 goto yy_find_action;
1018 "fatal flex scanner internal error--no action found" );
1040 "fatal flex scanner internal error--end of buffer missed" );
1066 for ( i = 0; i < number_to_move; ++i )
1067 *(dest++) = *(source++);
1080 while ( num_to_read <= 0 )
1086 int yy_c_buf_p_offset =
1093 if ( new_size <= 0 )
1108 "fatal error - scanner input buffer overflow" );
1151 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
1180 while (
yy_chk[
yy_base[yy_current_state] + yy_c] != yy_current_state )
1182 yy_current_state = (int)
yy_def[yy_current_state];
1183 if ( yy_current_state >= 33 )
1184 yy_c =
yy_meta[(
unsigned int) yy_c];
1189 return yy_current_state;
1208 while (
yy_chk[
yy_base[yy_current_state] + yy_c] != yy_current_state )
1210 yy_current_state = (int)
yy_def[yy_current_state];
1211 if ( yy_current_state >= 33 )
1212 yy_c =
yy_meta[(
unsigned int) yy_c];
1215 yy_is_jam = (yy_current_state == 32);
1217 return yy_is_jam ? 0 : yy_current_state;
1226 static int yyinput (
void)
1228 static int input (
void)
1371 YY_FATAL_ERROR(
"out of dynamic memory in yyassembler_create_buffer()" );
1380 YY_FATAL_ERROR(
"out of dynamic memory in yyassembler_create_buffer()" );
1471 if (new_buffer == NULL)
1533 YY_FATAL_ERROR(
"out of dynamic memory in yyassemblerensure_buffer_stack()" );
1553 YY_FATAL_ERROR(
"out of dynamic memory in yyassemblerensure_buffer_stack()" );
1579 YY_FATAL_ERROR(
"out of dynamic memory in yyassembler_scan_buffer()" );
1628 YY_FATAL_ERROR(
"out of dynamic memory in yyassembler_scan_bytes()" );
1630 for ( i = 0; i < _yybytes_len; ++i )
1631 buf[i] = yybytes[i];
1647 #ifndef YY_EXIT_FAILURE 1648 #define YY_EXIT_FAILURE 2 1653 (void) fprintf( stderr,
"%s\n", msg );
1664 yy_size_t yyless_macro_arg = (n); \ 1665 YY_LESS_LINENO(yyless_macro_arg);\ 1666 yyassemblertext[yyassemblerleng] = (yy_hold_char); \ 1667 (yy_c_buf_p) = yyassemblertext + yyless_macro_arg; \ 1668 (yy_hold_char) = *(yy_c_buf_p); \ 1669 *(yy_c_buf_p) = '\0'; \ 1670 yyassemblerleng = yyless_macro_arg; \ 1809 static void yy_flex_strncpy (
char*
s1,
yyconst char *
s2,
int n )
1813 for ( i = 0; i < n; ++i )
1818 #ifdef YY_NEED_STRLEN 1819 static int yy_flex_strlen (
yyconst char * s )
1822 for ( n = 0; s[n]; ++n )
1844 return realloc(ptr, size);
1849 free( (
char *) ptr );
1852 #define YYTABLES_NAME "yytables" 1854 #line 108 "scanner.l" void yyassemblerpush_buffer_state(YY_BUFFER_STATE new_buffer)
Pushes the new state onto the stack.
unsigned int flex_uint32_t
#define YY_BUFFER_EOF_PENDING
static int yy_did_buffer_switch_on_eof
static const flex_int16_t yy_def[36]
int yyassemblerget_debug(void)
YY_BUFFER_STATE yyassembler_scan_buffer(char *base, yy_size_t size)
Setup the input buffer state to scan directly from a user-specified character buffer.
static int yy_init_globals(void)
static const YY_CHAR yy_ec[256]
int yyassemblerlex_destroy(void)
#define YY_RESTORE_YY_MORE_OFFSET
int yyassemblerget_leng(void)
Get the length of the current token.
unsigned char flex_uint8_t
static int yy_get_next_buffer(void)
void yyassemblerset_debug(int debug_flag)
static void yy_fatal_error(const char *msg)
YY_BUFFER_STATE yyassembler_scan_string(const char *yy_str)
Setup the input buffer state to scan a string.
int yy_bs_lineno
The line count.
static const YY_CHAR yy_meta[19]
static size_t yy_buffer_stack_top
index of top of stack.
FILE * yyassemblerget_in(void)
Get the input stream.
void yyassembler_delete_buffer(YY_BUFFER_STATE b)
Destroy the buffer.
static char * yy_last_accepting_cpos
void yyassemblerrestart(FILE *input_file)
Immediately switch to a different input stream.
void yyassemblerset_extra(void *user_defined)
void yyassembler_switch_to_buffer(YY_BUFFER_STATE new_buffer)
Switch to a different input buffer.
static yy_state_type yy_get_previous_state(void)
int yyassembler_flex_debug
int yy_bs_column
The column count.
unsigned short int flex_uint16_t
void yyassembler_flush_buffer(YY_BUFFER_STATE b)
Discard all buffered characters.
void assemlber_scanner_init()
Base class for tree-like data structures with sharing.
#define EOB_ACT_LAST_MATCH
unsigned short int flex_uint16_t
#define EOB_ACT_END_OF_FILE
static YY_BUFFER_STATE * yy_buffer_stack
Stack as an array.
void * yyassembleralloc(yy_size_t)
int yyassemblerget_lineno(void)
Get the current line number.
static const flex_int16_t yy_accept[33]
#define YY_CURRENT_BUFFER
#define EOB_ACT_CONTINUE_SCAN
void yyassemblerpop_buffer_state(void)
Removes and deletes the top of the stack, if present.
static void yyassembler_init_buffer(YY_BUFFER_STATE b, FILE *file)
void yyassemblerfree(void *)
void * yyassemblerrealloc(void *, yy_size_t)
static size_t yy_buffer_stack_max
capacity of stack.
#define YY_CURRENT_BUFFER_LVALUE
void yyassemblerset_lineno(int _line_number)
Set the current line number.
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
YY_BUFFER_STATE yyassembler_create_buffer(FILE *file, int size)
Allocate and initialize an input buffer state.
static yy_state_type yy_last_accepting_state
#define YY_STATE_EOF(state)
void * yyassemblerget_extra(void)
void yyassemblerset_in(FILE *_in_str)
Set the input stream.
#define YY_END_OF_BUFFER_CHAR
YY_BUFFER_STATE yyassembler_scan_bytes(const char *bytes, int len)
Setup the input buffer state to scan the given bytes.
FILE * yyassemblerget_out(void)
Get the output stream.
#define YY_DO_BEFORE_ACTION
void yyassemblerset_out(FILE *_out_str)
#define YY_INPUT(buf, result, max_size)
static const flex_uint16_t yy_base[36]
int yyassemblerwrap(void)
static void yyassembler_load_buffer_state(void)
static void yyassemblerensure_buffer_stack(void)
static const flex_int16_t yy_chk[64]
char * yyassemblerget_text(void)
Get the current token.
void set(const irep_namet &name, const irep_idt &value)
#define YY_FATAL_ERROR(msg)
struct yy_buffer_state * YY_BUFFER_STATE
int yyassemblerlex(void)
The main scanner function which does all the work.
static const flex_uint16_t yy_nxt[64]