1 #line 2 "json_lex.yy.cpp" 3 #line 4 "json_lex.yy.cpp" 5 #define YY_INT_ALIGNED short int 9 #define yy_create_buffer yyjson_create_buffer 10 #define yy_delete_buffer yyjson_delete_buffer 11 #define yy_flex_debug yyjson_flex_debug 12 #define yy_init_buffer yyjson_init_buffer 13 #define yy_flush_buffer yyjson_flush_buffer 14 #define yy_load_buffer_state yyjson_load_buffer_state 15 #define yy_switch_to_buffer yyjson_switch_to_buffer 17 #define yyleng yyjsonleng 18 #define yylex yyjsonlex 19 #define yylineno yyjsonlineno 20 #define yyout yyjsonout 21 #define yyrestart yyjsonrestart 22 #define yytext yyjsontext 23 #define yywrap yyjsonwrap 24 #define yyalloc yyjsonalloc 25 #define yyrealloc yyjsonrealloc 26 #define yyfree yyjsonfree 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 yyjsonrestart(yyjsonin ) 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 yyjson_flush_buffer(YY_CURRENT_BUFFER ) 326 #define yy_new_buffer yyjson_create_buffer 328 #define yy_set_interactive(is_interactive) \ 330 if ( ! YY_CURRENT_BUFFER ){ \ 331 yyjsonensure_buffer_stack (); \ 332 YY_CURRENT_BUFFER_LVALUE = \ 333 yyjson_create_buffer(yyjsonin,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 yyjsonensure_buffer_stack (); \ 342 YY_CURRENT_BUFFER_LVALUE = \ 343 yyjson_create_buffer(yyjsonin,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) 350 #define yyjsonwrap() (1) 351 #define YY_SKIP_YYWRAP 367 #define yytext_ptr yyjsontext 377 #define YY_DO_BEFORE_ACTION \ 378 (yytext_ptr) = yy_bp; \ 379 yyjsonleng = (int) (yy_cp - yy_bp); \ 380 (yy_hold_char) = *yy_cp; \ 382 (yy_c_buf_p) = yy_cp; 384 #define YY_NUM_RULES 8 385 #define YY_END_OF_BUFFER 9 395 0, 0, 9, 7, 6, 6, 6, 7, 2, 2,
396 7, 7, 7, 0, 1, 0, 2, 2, 0, 0,
397 0, 2, 0, 0, 0, 1, 2, 2, 0, 2,
398 0, 0, 0, 0, 0, 0, 5, 3, 0, 2,
404 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
405 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
406 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
407 1, 2, 1, 4, 1, 1, 1, 1, 1, 1,
408 1, 1, 5, 1, 6, 7, 1, 8, 9, 9,
409 9, 9, 9, 9, 9, 9, 9, 1, 1, 1,
410 1, 1, 1, 1, 1, 1, 1, 1, 10, 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, 11, 1, 1, 1, 1, 12, 1, 1, 1,
415 13, 14, 1, 1, 1, 1, 1, 15, 1, 16,
416 1, 1, 1, 17, 18, 19, 20, 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,
423 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
424 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,
429 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
430 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
436 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
437 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
442 0, 0, 71, 72, 72, 72, 17, 14, 17, 17,
443 58, 49, 51, 25, 72, 27, 0, 24, 26, 34,
444 0, 0, 52, 51, 45, 33, 0, 37, 40, 43,
445 46, 48, 49, 48, 0, 42, 72, 72, 50, 52,
451 42, 1, 42, 42, 42, 42, 43, 42, 42, 9,
452 42, 42, 42, 43, 42, 43, 9, 9, 42, 42,
453 20, 10, 42, 42, 42, 43, 18, 42, 42, 42,
454 42, 42, 42, 42, 34, 42, 42, 42, 42, 42,
460 4, 5, 6, 7, 4, 8, 4, 9, 10, 4,
461 4, 4, 4, 11, 4, 12, 4, 4, 13, 4,
462 15, 17, 18, 19, 22, 22, 20, 16, 15, 21,
463 26, 27, 27, 28, 28, 16, 15, 16, 29, 29,
464 14, 30, 30, 16, 28, 28, 34, 30, 30, 35,
465 30, 30, 39, 39, 41, 40, 40, 40, 40, 40,
466 40, 38, 37, 36, 33, 32, 31, 25, 24, 23,
467 42, 3, 42, 42, 42, 42, 42, 42, 42, 42,
468 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
475 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
476 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
477 7, 8, 8, 9, 10, 10, 9, 7, 14, 9,
478 16, 18, 18, 19, 19, 14, 26, 16, 20, 20,
479 43, 20, 20, 26, 28, 28, 28, 29, 29, 28,
480 30, 30, 34, 34, 36, 34, 34, 39, 39, 40,
481 40, 33, 32, 31, 25, 24, 23, 13, 12, 11,
482 3, 42, 42, 42, 42, 42, 42, 42, 42, 42,
483 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
497 #define REJECT reject_used_but_not_detected 498 #define yymore() yymore_used_but_not_detected 499 #define YY_MORE_ADJ 0 500 #define YY_RESTORE_YY_MORE_OFFSET 505 #define YY_NO_INPUT 1 508 #define YY_NO_UNISTD_H 509 static int isatty(
int) {
return 0; }
512 #define PARSER json_parser 517 #include <util/pragma_wsign_compare.def> 518 #include <util/pragma_wnull_conversion.def> 519 #include <util/pragma_wdeprecated_register.def> 521 #line 522 "json_lex.yy.cpp" 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( yyjsontext, (size_t) yyjsonleng, 1, yyjsonout )) {} } 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( yyjsonin )) != EOF && c != '\n'; ++n ) \ 633 buf[n++] = (char) c; \ 634 if ( c == EOF && ferror( yyjsonin ) ) \ 635 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 641 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyjsonin)) == 0 && ferror(yyjsonin)) \ 643 if( errno != EINTR) \ 645 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 649 clearerr(yyjsonin); \ 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 yyjsonlex (void) 690 #ifndef YY_USER_ACTION 691 #define YY_USER_ACTION 696 #define YY_BREAK break; 699 #define YY_RULE_SETUP \ 740 #line 741 "json_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 >= 43 )
768 yy_c =
yy_meta[(
unsigned int) yy_c];
773 while (
yy_base[yy_current_state] != 72 );
839 #line 840 "json_lex.yy.cpp" 846 int yy_amount_of_matched_text = (int) (yy_cp - (
yytext_ptr)) - 1;
900 yy_current_state = yy_next_state;
967 "fatal flex scanner internal error--no action found" );
989 "fatal flex scanner internal error--end of buffer missed" );
1015 for ( i = 0; i < number_to_move; ++i )
1016 *(dest++) = *(source++);
1029 while ( num_to_read <= 0 )
1035 int yy_c_buf_p_offset =
1042 if ( new_size <= 0 )
1057 "fatal error - scanner input buffer overflow" );
1100 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
1129 while (
yy_chk[
yy_base[yy_current_state] + yy_c] != yy_current_state )
1131 yy_current_state = (int)
yy_def[yy_current_state];
1132 if ( yy_current_state >= 43 )
1133 yy_c =
yy_meta[(
unsigned int) yy_c];
1138 return yy_current_state;
1157 while (
yy_chk[
yy_base[yy_current_state] + yy_c] != yy_current_state )
1159 yy_current_state = (int)
yy_def[yy_current_state];
1160 if ( yy_current_state >= 43 )
1161 yy_c =
yy_meta[(
unsigned int) yy_c];
1164 yy_is_jam = (yy_current_state == 42);
1166 return yy_is_jam ? 0 : yy_current_state;
1175 static int yyinput (
void)
1177 static int input (
void)
1320 YY_FATAL_ERROR(
"out of dynamic memory in yyjson_create_buffer()" );
1329 YY_FATAL_ERROR(
"out of dynamic memory in yyjson_create_buffer()" );
1420 if (new_buffer == NULL)
1471 if (!(yy_buffer_stack)) {
1481 if ( ! (yy_buffer_stack) )
1482 YY_FATAL_ERROR(
"out of dynamic memory in yyjsonensure_buffer_stack()" );
1484 memset((yy_buffer_stack), 0, num_to_alloc *
sizeof(
struct yy_buffer_state*));
1501 if ( ! (yy_buffer_stack) )
1502 YY_FATAL_ERROR(
"out of dynamic memory in yyjsonensure_buffer_stack()" );
1528 YY_FATAL_ERROR(
"out of dynamic memory in yyjson_scan_buffer()" );
1577 YY_FATAL_ERROR(
"out of dynamic memory in yyjson_scan_bytes()" );
1579 for ( i = 0; i < _yybytes_len; ++i )
1580 buf[i] = yybytes[i];
1596 #ifndef YY_EXIT_FAILURE 1597 #define YY_EXIT_FAILURE 2 1602 (void) fprintf( stderr,
"%s\n", msg );
1613 yy_size_t yyless_macro_arg = (n); \ 1614 YY_LESS_LINENO(yyless_macro_arg);\ 1615 yyjsontext[yyjsonleng] = (yy_hold_char); \ 1616 (yy_c_buf_p) = yyjsontext + yyless_macro_arg; \ 1617 (yy_hold_char) = *(yy_c_buf_p); \ 1618 *(yy_c_buf_p) = '\0'; \ 1619 yyjsonleng = yyless_macro_arg; \ 1758 static void yy_flex_strncpy (
char*
s1,
yyconst char *
s2,
int n )
1762 for ( i = 0; i < n; ++i )
1767 #ifdef YY_NEED_STRLEN 1768 static int yy_flex_strlen (
yyconst char * s )
1771 for ( n = 0; s[n]; ++n )
1793 return realloc(ptr, size);
1798 free( (
char *) ptr );
1801 #define YYTABLES_NAME "yytables" 1803 #line 52 "scanner.l" unsigned int flex_uint32_t
void yyjson_switch_to_buffer(YY_BUFFER_STATE new_buffer)
Switch to a different input buffer.
int yyjsonlex_destroy(void)
#define YY_INPUT(buf, result, max_size)
void yyjsonrestart(FILE *input_file)
Immediately switch to a different input stream.
static char * yy_last_accepting_cpos
char * yyjsonget_text(void)
Get the current token.
static const flex_int16_t yy_accept[43]
static int yy_init_globals(void)
YY_BUFFER_STATE yyjson_scan_buffer(char *base, yy_size_t size)
Setup the input buffer state to scan directly from a user-specified character buffer.
YY_BUFFER_STATE yyjson_scan_string(const char *yy_str)
Setup the input buffer state to scan a string.
unsigned short int flex_uint16_t
#define YY_STATE_EOF(state)
int yy_bs_lineno
The line count.
void yyjsonpush_buffer_state(YY_BUFFER_STATE new_buffer)
Pushes the new state onto the stack.
#define YY_BUFFER_EOF_PENDING
int yyjsonget_lineno(void)
Get the current line number.
int yyjsonget_debug(void)
unsigned char flex_uint8_t
YY_BUFFER_STATE yyjson_scan_bytes(const char *bytes, int len)
Setup the input buffer state to scan the given bytes.
FILE * yyjsonget_in(void)
Get the input stream.
#define YY_DO_BEFORE_ACTION
#define YY_END_OF_BUFFER_CHAR
void yyjsonset_lineno(int _line_number)
Set the current line number.
static void yy_fatal_error(const char *msg)
static YY_BUFFER_STATE * yy_buffer_stack
Stack as an array.
FILE * yyjsonget_out(void)
Get the output stream.
static int yy_did_buffer_switch_on_eof
static const YY_CHAR yy_meta[21]
static yy_state_type yy_last_accepting_state
int yy_bs_column
The column count.
void yyjson_flush_buffer(YY_BUFFER_STATE b)
Discard all buffered characters.
static size_t yy_buffer_stack_top
index of top of stack.
#define YY_CURRENT_BUFFER
void * yyjsonrealloc(void *, yy_size_t)
YY_BUFFER_STATE yyjson_create_buffer(FILE *file, int size)
Allocate and initialize an input buffer state.
void * yyjsonalloc(yy_size_t)
void yyjsonset_debug(int debug_flag)
unsigned short int flex_uint16_t
static void yyjson_init_buffer(YY_BUFFER_STATE b, FILE *file)
#define YY_CURRENT_BUFFER_LVALUE
void yyjsonset_in(FILE *_in_str)
Set the input stream.
void yyjsonset_extra(void *user_defined)
static size_t yy_buffer_stack_max
capacity of stack.
static void yyjson_load_buffer_state(void)
static void yyjsonensure_buffer_stack(void)
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
static const flex_int16_t yy_chk[93]
static const flex_uint16_t yy_base[44]
static yy_state_type yy_get_previous_state(void)
struct yy_buffer_state * YY_BUFFER_STATE
static const flex_uint16_t yy_nxt[93]
static int yy_get_next_buffer(void)
#define YY_RESTORE_YY_MORE_OFFSET
#define EOB_ACT_LAST_MATCH
void yyjson_delete_buffer(YY_BUFFER_STATE b)
Destroy the buffer.
#define YY_FATAL_ERROR(msg)
int yyjsonget_leng(void)
Get the length of the current token.
void yyjsonset_out(FILE *_out_str)
#define EOB_ACT_END_OF_FILE
void * yyjsonget_extra(void)
#define EOB_ACT_CONTINUE_SCAN
static const YY_CHAR yy_ec[256]
static const flex_int16_t yy_def[44]
void yyjsonpop_buffer_state(void)
Removes and deletes the top of the stack, if present.
int yyjsonlex(void)
The main scanner function which does all the work.