📄 guc-file.c
字号:
#if YY_STACK_USEDstatic int GUC_yy_start_stack_ptr = 0;static int GUC_yy_start_stack_depth = 0;static int *GUC_yy_start_stack = 0;#ifndef YY_NO_PUSH_STATEstatic void GUC_yy_push_state YY_PROTO(( int new_state ));#endif#ifndef YY_NO_POP_STATEstatic void GUC_yy_pop_state YY_PROTO(( void ));#endif#ifndef YY_NO_TOP_STATEstatic int GUC_yy_top_state YY_PROTO(( void ));#endif#else#define YY_NO_PUSH_STATE 1#define YY_NO_POP_STATE 1#define YY_NO_TOP_STATE 1#endif#ifdef YY_MALLOC_DECLYY_MALLOC_DECL#else#if __STDC__#ifndef __cplusplus#include <stdlib.h>#endif#else/* Just try to get by without declaring the routines. This will fail * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) * or sizeof(void*) != sizeof(int). */#endif#endif/* Amount of stuff to slurp up with each read. */#ifndef YY_READ_BUF_SIZE#define YY_READ_BUF_SIZE 8192#endif/* Copy whatever the last rule matched to the standard output. */#ifndef ECHO/* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */#define ECHO (void) fwrite( GUC_yytext, GUC_yyleng, 1, GUC_yyout )#endif/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */#ifndef YY_INPUT#define YY_INPUT(buf,result,max_size) \ if ( GUC_yy_current_buffer->GUC_yy_is_interactive ) \ { \ int c = '*', n; \ for ( n = 0; n < max_size && \ (c = getc( GUC_yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( GUC_yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else if ( ((result = fread( buf, 1, max_size, GUC_yyin )) == 0) \ && ferror( GUC_yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" );#endif/* No semi-colon after return; correct usage is to write "GUC_yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */#ifndef GUC_yyterminate#define GUC_yyterminate() return YY_NULL#endif/* Number of entries by which start-condition stack grows. */#ifndef YY_START_STACK_INCR#define YY_START_STACK_INCR 25#endif/* Report a fatal error. */#ifndef YY_FATAL_ERROR#define YY_FATAL_ERROR(msg) GUC_yy_fatal_error( msg )#endif/* Default declaration of generated scanner - a define so the user can * easily add parameters. */#ifndef YY_DECL#define YY_DECL int GUC_yylex YY_PROTO(( void ))#endif/* Code executed at the beginning of each rule, after GUC_yytext and GUC_yyleng * have been set up. */#ifndef YY_USER_ACTION#define YY_USER_ACTION#endif/* Code executed at the end of each rule. */#ifndef YY_BREAK#define YY_BREAK break;#endif#define YY_RULE_SETUP \ YY_USER_ACTIONYY_DECL { register GUC_yy_state_type GUC_yy_current_state; register char *GUC_yy_cp, *GUC_yy_bp; register int GUC_yy_act;#line 69 "guc-file.l"#line 601 "lex.GUC_yy.c" if ( GUC_yy_init ) { GUC_yy_init = 0;#ifdef YY_USER_INIT YY_USER_INIT;#endif if ( ! GUC_yy_start ) GUC_yy_start = 1; /* first start state */ if ( ! GUC_yyin ) GUC_yyin = stdin; if ( ! GUC_yyout ) GUC_yyout = stdout; if ( ! GUC_yy_current_buffer ) GUC_yy_current_buffer = GUC_yy_create_buffer( GUC_yyin, YY_BUF_SIZE ); GUC_yy_load_buffer_state(); } while ( 1 ) /* loops until end-of-file is reached */ { GUC_yy_cp = GUC_yy_c_buf_p; /* Support of GUC_yytext. */ *GUC_yy_cp = GUC_yy_hold_char; /* GUC_yy_bp points to the position in GUC_yy_ch_buf of the start of * the current run. */ GUC_yy_bp = GUC_yy_cp; GUC_yy_current_state = GUC_yy_start;GUC_yy_match: do { register YY_CHAR GUC_yy_c = GUC_yy_ec[YY_SC_TO_UI(*GUC_yy_cp)]; if ( GUC_yy_accept[GUC_yy_current_state] ) { GUC_yy_last_accepting_state = GUC_yy_current_state; GUC_yy_last_accepting_cpos = GUC_yy_cp; } while ( GUC_yy_chk[GUC_yy_base[GUC_yy_current_state] + GUC_yy_c] != GUC_yy_current_state ) { GUC_yy_current_state = (int) GUC_yy_def[GUC_yy_current_state]; if ( GUC_yy_current_state >= 39 ) GUC_yy_c = GUC_yy_meta[(unsigned int) GUC_yy_c]; } GUC_yy_current_state = GUC_yy_nxt[GUC_yy_base[GUC_yy_current_state] + (unsigned int) GUC_yy_c]; ++GUC_yy_cp; } while ( GUC_yy_base[GUC_yy_current_state] != 112 );GUC_yy_find_action: GUC_yy_act = GUC_yy_accept[GUC_yy_current_state]; if ( GUC_yy_act == 0 ) { /* have to back up */ GUC_yy_cp = GUC_yy_last_accepting_cpos; GUC_yy_current_state = GUC_yy_last_accepting_state; GUC_yy_act = GUC_yy_accept[GUC_yy_current_state]; } YY_DO_BEFORE_ACTION;do_action: /* This label is used only to access EOF actions. */ switch ( GUC_yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *GUC_yy_cp = GUC_yy_hold_char; GUC_yy_cp = GUC_yy_last_accepting_cpos; GUC_yy_current_state = GUC_yy_last_accepting_state; goto GUC_yy_find_action;case 1:YY_RULE_SETUP#line 71 "guc-file.l"ConfigFileLineno++; return GUC_EOL; YY_BREAKcase 2:YY_RULE_SETUP#line 72 "guc-file.l"/* eat whitespace */ YY_BREAKcase 3:YY_RULE_SETUP#line 73 "guc-file.l"/* eat comment (.* matches anything until newline) */ YY_BREAKcase 4:YY_RULE_SETUP#line 75 "guc-file.l"return GUC_ID; YY_BREAKcase 5:YY_RULE_SETUP#line 76 "guc-file.l"return GUC_QUALIFIED_ID; YY_BREAKcase 6:YY_RULE_SETUP#line 77 "guc-file.l"return GUC_STRING; YY_BREAKcase 7:YY_RULE_SETUP#line 78 "guc-file.l"return GUC_UNQUOTED_STRING; YY_BREAKcase 8:YY_RULE_SETUP#line 79 "guc-file.l"return GUC_INTEGER; YY_BREAKcase 9:YY_RULE_SETUP#line 80 "guc-file.l"return GUC_REAL; YY_BREAKcase 10:YY_RULE_SETUP#line 81 "guc-file.l"return GUC_EQUALS; YY_BREAKcase 11:YY_RULE_SETUP#line 83 "guc-file.l"return GUC_ERROR; YY_BREAKcase 12:YY_RULE_SETUP#line 85 "guc-file.l"YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK#line 744 "lex.GUC_yy.c"case YY_STATE_EOF(INITIAL): GUC_yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int GUC_yy_amount_of_matched_text = (int) (GUC_yy_cp - GUC_yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *GUC_yy_cp = GUC_yy_hold_char; YY_RESTORE_YY_MORE_OFFSET if ( GUC_yy_current_buffer->GUC_yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed GUC_yyin at a new source and called * GUC_yylex(). If so, then we have to assure * consistency between GUC_yy_current_buffer and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ GUC_yy_n_chars = GUC_yy_current_buffer->GUC_yy_n_chars; GUC_yy_current_buffer->GUC_yy_input_file = GUC_yyin; GUC_yy_current_buffer->GUC_yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for GUC_yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since GUC_yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( GUC_yy_c_buf_p <= &GUC_yy_current_buffer->GUC_yy_ch_buf[GUC_yy_n_chars] ) { /* This was really a NUL. */ GUC_yy_state_type GUC_yy_next_state; GUC_yy_c_buf_p = GUC_yytext_ptr + GUC_yy_amount_of_matched_text; GUC_yy_current_state = GUC_yy_get_previous_state(); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * GUC_yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ GUC_yy_next_state = GUC_yy_try_NUL_trans( GUC_yy_current_state ); GUC_yy_bp = GUC_yytext_ptr + YY_MORE_ADJ; if ( GUC_yy_next_state ) { /* Consume the NUL. */ GUC_yy_cp = ++GUC_yy_c_buf_p; GUC_yy_current_state = GUC_yy_next_state; goto GUC_yy_match; } else { GUC_yy_cp = GUC_yy_c_buf_p; goto GUC_yy_find_action; } } else switch ( GUC_yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { GUC_yy_did_buffer_switch_on_eof = 0; if ( GUC_yywrap() ) { /* Note: because we've taken care in * GUC_yy_get_next_buffer() to have set up * GUC_yytext, we can now set up * GUC_yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ GUC_yy_c_buf_p = GUC_yytext_ptr + YY_MORE_ADJ; GUC_yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! GUC_yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: GUC_yy_c_buf_p = GUC_yytext_ptr + GUC_yy_amount_of_matched_text; GUC_yy_current_state = GUC_yy_get_previous_state(); GUC_yy_cp = GUC_yy_c_buf_p; GUC_yy_bp = GUC_yytext_ptr + YY_MORE_ADJ; goto GUC_yy_match; case EOB_ACT_LAST_MATCH: GUC_yy_c_buf_p = &GUC_yy_current_buffer->GUC_yy_ch_buf[GUC_yy_n_chars]; GUC_yy_current_state = GUC_yy_get_previous_state(); GUC_yy_cp = GUC_yy_c_buf_p; GUC_yy_bp = GUC_yytext_ptr + YY_MORE_ADJ; goto GUC_yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of GUC_yylex *//* GUC_yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */static int GUC_yy_get_next_buffer() { register char *dest = GUC_yy_current_buffer->GUC_yy_ch_buf; register char *source = GUC_yytext_ptr; register int number_to_move, i; int ret_val; if ( GUC_yy_c_buf_p > &GUC_yy_current_buffer->GUC_yy_ch_buf[GUC_yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( GUC_yy_current_buffer->GUC_yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( GUC_yy_c_buf_p - GUC_yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (GUC_yy_c_buf_p - GUC_yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( GUC_yy_current_buffer->GUC_yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ GUC_yy_current_buffer->GUC_yy_n_chars = GUC_yy_n_chars = 0; else { int num_to_read = GUC_yy_current_buffer->GUC_yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */#ifdef YY_USES_REJECT YY_FATAL_ERROR("input buffer overflow, can't enlarge buffer because scanner uses REJECT" );#else /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = GUC_yy_current_buffer; int GUC_yy_c_buf_p_offset = (int) (GUC_yy_c_buf_p - b->GUC_yy_ch_buf); if ( b->GUC_yy_is_our_buffer ) { int new_size = b->GUC_yy_buf_size * 2; if ( new_size <= 0 ) b->GUC_yy_buf_size += b->GUC_yy_buf_size / 8; else b->GUC_yy_buf_size *= 2; b->GUC_yy_ch_buf = (char *)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -