1 #line 2 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/cbuild/src/cqasm/cqasm-version-lexer.cpp" 3 #line 4 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/cbuild/src/cqasm/cqasm-version-lexer.cpp" 5 #define YY_INT_ALIGNED short int 10 #define YY_FLEX_MAJOR_VERSION 2 11 #define YY_FLEX_MINOR_VERSION 6 12 #define YY_FLEX_SUBMINOR_VERSION 1 13 #if YY_FLEX_SUBMINOR_VERSION > 0 34 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 39 #ifndef __STDC_LIMIT_MACROS 40 #define __STDC_LIMIT_MACROS 1 60 #define INT8_MIN (-128) 63 #define INT16_MIN (-32767-1) 66 #define INT32_MIN (-2147483647-1) 69 #define INT8_MAX (127) 72 #define INT16_MAX (32767) 75 #define INT32_MAX (2147483647) 78 #define UINT8_MAX (255U) 81 #define UINT16_MAX (65535U) 84 #define UINT32_MAX (4294967295U) 94 #if defined(__GNUC__) && __GNUC__ >= 3 95 #define yynoreturn __attribute__((__noreturn__)) 108 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) 111 #ifndef YY_TYPEDEF_YY_SCANNER_T 112 #define YY_TYPEDEF_YY_SCANNER_T 118 #define yyin yyg->yyin_r 119 #define yyout yyg->yyout_r 120 #define yyextra yyg->yyextra_r 121 #define yyleng yyg->yyleng_r 122 #define yytext yyg->yytext_r 123 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) 124 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) 125 #define yy_flex_debug yyg->yy_flex_debug_r 131 #define BEGIN yyg->yy_start = 1 + 2 * 137 #define YY_START ((yyg->yy_start - 1) / 2) 138 #define YYSTATE YY_START 141 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) 144 #define YY_NEW_FILE cqasm_versionrestart(yyin ,yyscanner ) 146 #define YY_END_OF_BUFFER_CHAR 0 155 #define YY_BUF_SIZE 32768 157 #define YY_BUF_SIZE 16384 163 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) 165 #ifndef YY_TYPEDEF_YY_BUFFER_STATE 166 #define YY_TYPEDEF_YY_BUFFER_STATE 170 #ifndef YY_TYPEDEF_YY_SIZE_T 171 #define YY_TYPEDEF_YY_SIZE_T 175 #define EOB_ACT_CONTINUE_SCAN 0 176 #define EOB_ACT_END_OF_FILE 1 177 #define EOB_ACT_LAST_MATCH 2 186 #define YY_LESS_LINENO(n) \ 189 for ( yyl = n; yyl < yyleng; ++yyl )\ 190 if ( yytext[yyl] == '\n' )\ 193 #define YY_LINENO_REWIND_TO(dst) \ 196 for ( p = yy_cp-1; p >= (dst); --p)\ 206 int yyless_macro_arg = (n); \ 207 YY_LESS_LINENO(yyless_macro_arg);\ 208 *yy_cp = yyg->yy_hold_char; \ 209 YY_RESTORE_YY_MORE_OFFSET \ 210 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ 211 YY_DO_BEFORE_ACTION; \ 215 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) 217 #ifndef YY_STRUCT_YY_BUFFER_STATE 218 #define YY_STRUCT_YY_BUFFER_STATE 265 #define YY_BUFFER_NEW 0 266 #define YY_BUFFER_NORMAL 1 277 #define YY_BUFFER_EOF_PENDING 2 288 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ 289 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ 295 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] 305 static void cqasm_versionensure_buffer_stack (
yyscan_t yyscanner );
306 static void cqasm_version_load_buffer_state (
yyscan_t yyscanner );
307 static void cqasm_version_init_buffer (YY_BUFFER_STATE b,FILE *file ,
yyscan_t yyscanner );
309 #define YY_FLUSH_BUFFER cqasm_version_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) 319 #define yy_new_buffer cqasm_version_create_buffer 321 #define yy_set_interactive(is_interactive) \ 323 if ( ! YY_CURRENT_BUFFER ){ \ 324 cqasm_versionensure_buffer_stack (yyscanner); \ 325 YY_CURRENT_BUFFER_LVALUE = \ 326 cqasm_version_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ 328 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ 331 #define yy_set_bol(at_bol) \ 333 if ( ! YY_CURRENT_BUFFER ){\ 334 cqasm_versionensure_buffer_stack (yyscanner); \ 335 YY_CURRENT_BUFFER_LVALUE = \ 336 cqasm_version_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ 338 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 341 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) 343 #define cqasm_versionwrap(yyscanner) (1) 344 #define YY_SKIP_YYWRAP 350 #define yytext_ptr yytext_r 354 static int yy_get_next_buffer (
yyscan_t yyscanner );
360 #define YY_DO_BEFORE_ACTION \ 361 yyg->yytext_ptr = yy_bp; \ 362 yyleng = (int) (yy_cp - yy_bp); \ 363 yyg->yy_hold_char = *yy_cp; \ 365 yyg->yy_c_buf_p = yy_cp; 367 #define YY_NUM_RULES 19 368 #define YY_END_OF_BUFFER 20 378 0, 0, 0, 0, 0, 0, 0, 0, 20, 7,
379 4, 1, 1, 2, 7, 7, 7, 10, 8, 8,
380 10, 16, 13, 11, 11, 15, 14, 12, 18, 17,
381 17, 4, 1, 2, 3, 0, 0, 8, 9, 13,
382 11, 14, 17, 0, 0, 0, 0, 0, 6, 0,
388 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
389 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
390 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
391 1, 2, 1, 1, 5, 1, 1, 1, 1, 1,
392 1, 6, 1, 1, 1, 7, 8, 9, 9, 9,
393 9, 9, 9, 9, 9, 9, 9, 1, 10, 1,
394 1, 1, 1, 1, 11, 1, 1, 1, 12, 1,
395 1, 1, 13, 1, 1, 1, 14, 15, 16, 1,
396 17, 18, 19, 1, 1, 20, 1, 1, 1, 1,
397 1, 1, 1, 1, 1, 1, 1, 1, 21, 1,
399 22, 1, 1, 1, 23, 1, 1, 1, 1, 24,
400 25, 1, 1, 26, 27, 1, 1, 28, 1, 1,
401 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
402 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
403 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
404 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
405 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
406 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
407 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
408 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
410 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
411 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
412 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
413 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
414 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
420 1, 1, 2, 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
427 0, 27, 3, 7, 54, 63, 11, 13, 59, 82,
428 52, 82, 50, 0, 46, 0, 34, 82, 82, 47,
429 41, 82, 44, 82, 41, 82, 34, 82, 82, 82,
430 39, 39, 82, 0, 82, 0, 29, 82, 82, 37,
431 82, 29, 82, 0, 18, 10, 10, 9, 82, 21,
432 82, 82, 73, 75, 77, 79, 0
437 53, 53, 54, 54, 55, 55, 56, 56, 52, 52,
438 52, 52, 52, 57, 52, 52, 52, 52, 52, 52,
439 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
440 52, 52, 52, 57, 52, 52, 52, 52, 52, 52,
441 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
442 52, 0, 52, 52, 52, 52, 52
447 34, 11, 12, 13, 14, 19, 20, 15, 21, 19,
448 20, 36, 21, 30, 31, 30, 31, 44, 46, 16,
449 17, 36, 48, 49, 50, 44, 46, 16, 11, 12,
450 13, 14, 48, 50, 15, 51, 47, 42, 40, 45,
451 32, 43, 42, 41, 51, 40, 16, 17, 39, 38,
452 37, 35, 33, 32, 16, 23, 24, 25, 52, 52,
453 26, 52, 27, 28, 23, 24, 25, 52, 52, 26,
454 52, 27, 28, 10, 10, 18, 18, 22, 22, 29,
455 29, 9, 52, 52, 52, 52, 52, 52, 52, 52,
456 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
458 52, 52, 52, 52, 52, 52, 52, 52, 52, 52
463 57, 1, 1, 1, 1, 3, 3, 1, 3, 4,
464 4, 16, 4, 7, 7, 8, 8, 36, 44, 1,
465 1, 16, 46, 47, 48, 36, 44, 1, 2, 2,
466 2, 2, 46, 48, 2, 50, 45, 42, 40, 37,
467 32, 31, 27, 25, 50, 23, 2, 2, 21, 20,
468 17, 15, 13, 11, 2, 5, 5, 5, 9, 0,
469 5, 0, 5, 5, 6, 6, 6, 0, 0, 6,
470 0, 6, 6, 53, 53, 54, 54, 55, 55, 56,
471 56, 52, 52, 52, 52, 52, 52, 52, 52, 52,
472 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
474 52, 52, 52, 52, 52, 52, 52, 52, 52, 52
480 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0,
486 #define REJECT reject_used_but_not_detected 487 #define yymore() yymore_used_but_not_detected 488 #define YY_MORE_ADJ 0 489 #define YY_RESTORE_YY_MORE_OFFSET 490 #line 1 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 491 #define YY_NO_INPUT 1 492 #line 7 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 502 #define YY_USER_ACTION yylloc->last_column += yyleng; 503 #define LOCATION_RESET \ 504 yylloc->first_column = 1; yylloc->first_line = 1; \ 505 yylloc->last_column = 1; yylloc->last_line = 1; 506 #define LOCATION_LINE \ 507 yylloc->last_column = 1; yylloc->last_line += 1; 508 #define LOCATION_STEP \ 509 yylloc->first_column = yylloc->last_column; \ 510 yylloc->first_line = yylloc->last_line; 511 #define WITH_STR(TOKNAME) \ 512 DEBUG("Pushing %s token (%s) starting at %d:%d\n", #TOKNAME, yytext, yylloc->first_line, yylloc->first_column); \ 513 yylval->str = strdup(yytext); return TOKNAME 514 #define WITHOUT_STR(TOKNAME) \ 515 DEBUG("Pushing %s token starting at %d:%d\n", #TOKNAME, yylloc->first_line, yylloc->first_column); \ 518 DEBUG("Pushing '%c' token starting at %d:%d\n", yytext[0], yylloc->first_line, yylloc->first_column); \ 520 #define DELETE LOCATION_STEP 525 #line 526 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/cbuild/src/cqasm/cqasm-version-lexer.cpp" 528 #define MODE_MULTILINE_COMMENT 1 529 #define MODE_VERSION 2 530 #define MODE_IGNORE_THE_REST 3 532 #ifndef YY_NO_UNISTD_H 540 #ifndef YY_EXTRA_TYPE 541 #define YY_EXTRA_TYPE void * 552 FILE *yyin_r, *yyout_r;
553 size_t yy_buffer_stack_top;
554 size_t yy_buffer_stack_max;
555 YY_BUFFER_STATE * yy_buffer_stack;
562 int yy_did_buffer_switch_on_eof;
563 int yy_start_stack_ptr;
564 int yy_start_stack_depth;
567 char* yy_last_accepting_cpos;
582 static int yy_init_globals (
yyscan_t yyscanner );
586 # define yylval yyg->yylval_r 588 # define yylloc yyg->yylloc_r 639 #ifndef YY_SKIP_YYWRAP 652 static void yy_flex_strncpy (
char *,
yyconst char *,
int ,
yyscan_t yyscanner);
655 #ifdef YY_NEED_STRLEN 662 static int yyinput (
yyscan_t yyscanner );
664 static int input (
yyscan_t yyscanner );
670 #ifndef YY_READ_BUF_SIZE 673 #define YY_READ_BUF_SIZE 16384 675 #define YY_READ_BUF_SIZE 8192 684 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) 691 #define YY_INPUT(buf,result,max_size) \ 692 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 696 for ( n = 0; n < max_size && \ 697 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 700 buf[n++] = (char) c; \ 701 if ( c == EOF && ferror( yyin ) ) \ 702 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 708 while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ 710 if( errno != EINTR) \ 712 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 728 #define yyterminate() return YY_NULL 732 #ifndef YY_START_STACK_INCR 733 #define YY_START_STACK_INCR 25 737 #ifndef YY_FATAL_ERROR 738 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) 747 #define YY_DECL_IS_OURS 1 752 #define YY_DECL int cqasm_versionlex \ 753 (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) 759 #ifndef YY_USER_ACTION 760 #define YY_USER_ACTION 765 #define YY_BREAK break; 768 #define YY_RULE_SETUP \ 802 cqasm_versionensure_buffer_stack (yyscanner);
807 cqasm_version_load_buffer_state(yyscanner );
811 #line 42 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 818 #line 819 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/cbuild/src/cqasm/cqasm-version-lexer.cpp" 837 if ( yy_accept[yy_current_state] )
842 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
844 yy_current_state = (int) yy_def[yy_current_state];
845 if ( yy_current_state >= 53 )
846 yy_c = yy_meta[(
unsigned int) yy_c];
848 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
flex_int16_t) yy_c];
851 while ( yy_base[yy_current_state] != 82 );
854 yy_act = yy_accept[yy_current_state];
859 yy_act = yy_accept[yy_current_state];
867 for ( yyl = 0; yyl <
yyleng; ++yyl )
868 if (
yytext[yyl] ==
'\n' )
890 #line 49 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 895 #line 50 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 900 #line 51 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 905 #line 52 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 910 #line 53 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 915 #line 54 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 920 #line 55 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 928 #line 59 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 933 #line 60 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 938 #line 61 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 942 #line 62 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 950 #line 66 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 955 #line 67 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 960 #line 68 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 965 #line 69 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 970 #line 70 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 975 #line 71 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 983 #line 75 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 988 #line 76 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 994 #line 78 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l" 997 #line 998 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/cbuild/src/cqasm/cqasm-version-lexer.cpp" 1006 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1039 yyg->
yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1041 yy_current_state = yy_get_previous_state( yyscanner );
1052 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1056 if ( yy_next_state )
1060 yy_current_state = yy_next_state;
1067 goto yy_find_action;
1071 else switch ( yy_get_next_buffer( yyscanner ) )
1104 yyg->yytext_ptr + yy_amount_of_matched_text;
1106 yy_current_state = yy_get_previous_state( yyscanner );
1116 yy_current_state = yy_get_previous_state( yyscanner );
1120 goto yy_find_action;
1127 "fatal flex scanner internal error--no action found" );
1140 static int yy_get_next_buffer (
yyscan_t yyscanner)
1144 char *source = yyg->yytext_ptr;
1150 "fatal flex scanner internal error--end of buffer missed" );
1176 for ( i = 0; i < number_to_move; ++i )
1177 *(dest++) = *(source++);
1190 while ( num_to_read <= 0 )
1196 int yy_c_buf_p_offset =
1203 if ( new_size <= 0 )
1218 "fatal error - scanner input buffer overflow" );
1261 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
1286 if ( yy_accept[yy_current_state] )
1291 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1293 yy_current_state = (int) yy_def[yy_current_state];
1294 if ( yy_current_state >= 53 )
1295 yy_c = yy_meta[(
unsigned int) yy_c];
1297 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
flex_int16_t) yy_c];
1300 return yy_current_state;
1315 if ( yy_accept[yy_current_state] )
1320 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1322 yy_current_state = (int) yy_def[yy_current_state];
1323 if ( yy_current_state >= 53 )
1324 yy_c = yy_meta[(
unsigned int) yy_c];
1326 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
flex_int16_t) yy_c];
1327 yy_is_jam = (yy_current_state == 52);
1330 return yy_is_jam ? 0 : yy_current_state;
1339 static int yyinput (
yyscan_t yyscanner)
1341 static int input (
yyscan_t yyscanner)
1362 int offset = yyg->
yy_c_buf_p - yyg->yytext_ptr;
1365 switch ( yy_get_next_buffer( yyscanner ) )
1391 return yyinput(yyscanner);
1393 return input(yyscanner);
1429 cqasm_versionensure_buffer_stack (yyscanner);
1435 cqasm_version_load_buffer_state(yyscanner );
1451 cqasm_versionensure_buffer_stack (yyscanner);
1464 cqasm_version_load_buffer_state(yyscanner );
1474 static void cqasm_version_load_buffer_state (
yyscan_t yyscanner)
1495 YY_FATAL_ERROR(
"out of dynamic memory in cqasm_version_create_buffer()" );
1504 YY_FATAL_ERROR(
"out of dynamic memory in cqasm_version_create_buffer()" );
1508 cqasm_version_init_buffer(b,file ,yyscanner);
1537 static void cqasm_version_init_buffer (YY_BUFFER_STATE b, FILE * file ,
yyscan_t yyscanner)
1587 cqasm_version_load_buffer_state(yyscanner );
1599 if (new_buffer == NULL)
1602 cqasm_versionensure_buffer_stack(yyscanner);
1619 cqasm_version_load_buffer_state(yyscanner );
1639 cqasm_version_load_buffer_state(yyscanner );
1647 static void cqasm_versionensure_buffer_stack (
yyscan_t yyscanner)
1663 YY_FATAL_ERROR(
"out of dynamic memory in cqasm_versionensure_buffer_stack()" );
1683 YY_FATAL_ERROR(
"out of dynamic memory in cqasm_versionensure_buffer_stack()" );
1709 YY_FATAL_ERROR(
"out of dynamic memory in cqasm_version_scan_buffer()" );
1758 YY_FATAL_ERROR(
"out of dynamic memory in cqasm_version_scan_bytes()" );
1760 for ( i = 0; i < _yybytes_len; ++i )
1761 buf[i] = yybytes[i];
1777 #ifndef YY_EXIT_FAILURE 1778 #define YY_EXIT_FAILURE 2 1785 (void) fprintf( stderr,
"%s\n", msg );
1796 int yyless_macro_arg = (n); \ 1797 YY_LESS_LINENO(yyless_macro_arg);\ 1798 yytext[yyleng] = yyg->yy_hold_char; \ 1799 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ 1800 yyg->yy_hold_char = *yyg->yy_c_buf_p; \ 1801 *yyg->yy_c_buf_p = '\0'; \ 1802 yyleng = yyless_macro_arg; \ 1900 YY_FATAL_ERROR(
"cqasm_versionset_lineno called with no buffer" );
1915 YY_FATAL_ERROR(
"cqasm_versionset_column called with no buffer" );
1986 if (ptr_yy_globals == NULL){
1993 if (*ptr_yy_globals == NULL){
1999 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
2001 return yy_init_globals ( *ptr_yy_globals );
2019 if (ptr_yy_globals == NULL){
2026 if (*ptr_yy_globals == NULL){
2033 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
2037 return yy_init_globals ( *ptr_yy_globals );
2040 static int yy_init_globals (
yyscan_t yyscanner)
2095 yy_init_globals( yyscanner);
2108 static void yy_flex_strncpy (
char* s1,
yyconst char * s2,
int n ,
yyscan_t yyscanner)
2114 for ( i = 0; i < n; ++i )
2119 #ifdef YY_NEED_STRLEN 2123 for ( n = 0; s[n]; ++n )
2149 return realloc(ptr, size);
2156 free( (
char *) ptr );
2159 #define YYTABLES_NAME "yytables" 2161 #line 78 "/home/docs/checkouts/readthedocs.org/user_builds/libqasm/checkouts/latest/src/cqasm/src/cqasm-version-lexer.l"
void cqasm_versionfree(void *, yyscan_t yyscanner)
int cqasm_versionget_debug(yyscan_t yyscanner)
size_t yy_buffer_stack_top
index of top of stack.
void cqasm_versionset_lloc(YYLTYPE *yylloc_param, yyscan_t yyscanner)
unsigned char flex_uint8_t
void cqasm_versionset_lval(YYSTYPE *yylval_param, yyscan_t yyscanner)
#define WITHOUT_STR(TOKNAME)
void cqasm_versionpop_buffer_state(yyscan_t yyscanner)
Removes and deletes the top of the stack, if present.
#define MODE_IGNORE_THE_REST
void cqasm_version_switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
Switch to a different input buffer.
unsigned int flex_uint32_t
YYSTYPE * cqasm_versionget_lval(yyscan_t yyscanner)
#define YY_DO_BEFORE_ACTION
void cqasm_versionset_column(int _column_no, yyscan_t yyscanner)
Set the current column.
void cqasm_versionpush_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
Pushes the new state onto the stack.
FILE * cqasm_versionget_in(yyscan_t yyscanner)
Get the input stream.
void cqasm_version_delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner)
Destroy the buffer.
YY_BUFFER_STATE cqasm_version_scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner)
Setup the input buffer state to scan directly from a user-specified character buffer.
int yy_bs_lineno
The line count.
void cqasm_versionset_in(FILE *_in_str, yyscan_t yyscanner)
Set the input stream.
YY_EXTRA_TYPE cqasm_versionget_extra(yyscan_t yyscanner)
Get the user-defined data for this scanner.
#define YY_STATE_EOF(state)
YY_BUFFER_STATE cqasm_version_scan_bytes(yyconst char *bytes, int len, yyscan_t yyscanner)
Setup the input buffer state to scan the given bytes.
YY_BUFFER_STATE cqasm_version_scan_string(yyconst char *yy_str, yyscan_t yyscanner)
Setup the input buffer state to scan a string.
size_t yy_buffer_stack_max
capacity of stack.
unsigned short int flex_uint16_t
#define EOB_ACT_END_OF_FILE
void * cqasm_versionrealloc(void *, yy_size_t, yyscan_t yyscanner)
unsigned short int flex_uint16_t
void cqasm_versionset_debug(int debug_flag, yyscan_t yyscanner)
#define EOB_ACT_CONTINUE_SCAN
#define YY_END_OF_BUFFER_CHAR
int yy_did_buffer_switch_on_eof
void cqasm_versionset_lineno(int _line_number, yyscan_t yyscanner)
Set the current line number.
int yy_bs_column
The column count.
#define MODE_MULTILINE_COMMENT
int cqasm_versionget_column(yyscan_t yyscanner)
Get the current column number.
#define YY_RESTORE_YY_MORE_OFFSET
void cqasm_versionset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner)
Set the user-defined data.
#define EOB_ACT_LAST_MATCH
struct yy_buffer_state * YY_BUFFER_STATE
int cqasm_versionlex_init_extra(YY_EXTRA_TYPE user_defined, yyscan_t *scanner)
int cqasm_versionlex_destroy(yyscan_t yyscanner)
#define YY_FATAL_ERROR(msg)
yy_state_type yy_last_accepting_state
int cqasm_versionget_lineno(yyscan_t yyscanner)
Get the current line number.
int cqasm_versionlex_init(yyscan_t *scanner)
#define WITH_STR(TOKNAME)
void cqasm_versionset_out(FILE *_out_str, yyscan_t yyscanner)
int cqasm_versionlex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner)
#define YY_CURRENT_BUFFER_LVALUE
#define YY_CURRENT_BUFFER
#define cqasm_versionwrap(yyscanner)
char * cqasm_versionget_text(yyscan_t yyscanner)
Get the current token.
YY_BUFFER_STATE cqasm_version_create_buffer(FILE *file, int size, yyscan_t yyscanner)
Allocate and initialize an input buffer state.
FILE * cqasm_versionget_out(yyscan_t yyscanner)
Get the output stream.
void cqasm_versionrestart(FILE *input_file, yyscan_t yyscanner)
Immediately switch to a different input stream.
void * cqasm_versionalloc(yy_size_t, yyscan_t yyscanner)
YY_BUFFER_STATE * yy_buffer_stack
Stack as an array.
char * yy_last_accepting_cpos
void cqasm_version_flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner)
Discard all buffered characters.
YYLTYPE * cqasm_versionget_lloc(yyscan_t yyscanner)
#define YY_BUFFER_EOF_PENDING
int cqasm_versionget_leng(yyscan_t yyscanner)
Get the length of the current token.
#define YY_INPUT(buf, result, max_size)
Parser, generated by Bison.