📄 pl_scan.c
字号:
case 35:YY_RULE_SETUP#line 151 "scan.l"{ return K_PERFORM; } YY_BREAKcase 36:YY_RULE_SETUP#line 152 "scan.l"{ return K_RAISE; } YY_BREAKcase 37:YY_RULE_SETUP#line 153 "scan.l"{ return K_RECORD; } YY_BREAKcase 38:YY_RULE_SETUP#line 154 "scan.l"{ return K_RENAME; } YY_BREAKcase 39:YY_RULE_SETUP#line 155 "scan.l"{ return K_RESULT_OID; } YY_BREAKcase 40:YY_RULE_SETUP#line 156 "scan.l"{ return K_RETURN; } YY_BREAKcase 41:YY_RULE_SETUP#line 157 "scan.l"{ return K_REVERSE; } YY_BREAKcase 42:YY_RULE_SETUP#line 158 "scan.l"{ return K_ROW_COUNT; } YY_BREAKcase 43:YY_RULE_SETUP#line 159 "scan.l"{ return K_SELECT; } YY_BREAKcase 44:YY_RULE_SETUP#line 160 "scan.l"{ return K_THEN; } YY_BREAKcase 45:YY_RULE_SETUP#line 161 "scan.l"{ return K_TO; } YY_BREAKcase 46:YY_RULE_SETUP#line 162 "scan.l"{ return K_TYPE; } YY_BREAKcase 47:YY_RULE_SETUP#line 163 "scan.l"{ return K_WARNING; } YY_BREAKcase 48:YY_RULE_SETUP#line 164 "scan.l"{ return K_WHEN; } YY_BREAKcase 49:YY_RULE_SETUP#line 165 "scan.l"{ return K_WHILE; } YY_BREAKcase 50:YY_RULE_SETUP#line 167 "scan.l"{ return O_OPTION; } YY_BREAKcase 51:YY_RULE_SETUP#line 168 "scan.l"{ return O_DUMP; } YY_BREAK/* ---------- * Special word rules * * We set plpgsql_error_lineno in each rule so that errors reported * in the pl_comp.c subroutines will point to the right place. * ---------- */case 52:YY_RULE_SETUP#line 178 "scan.l"{ plpgsql_error_lineno = plpgsql_scanner_lineno(); return plpgsql_parse_word(yytext); } YY_BREAKcase 53:YY_RULE_SETUP#line 181 "scan.l"{ plpgsql_error_lineno = plpgsql_scanner_lineno(); return plpgsql_parse_dblword(yytext); } YY_BREAKcase 54:YY_RULE_SETUP#line 184 "scan.l"{ plpgsql_error_lineno = plpgsql_scanner_lineno(); return plpgsql_parse_tripword(yytext); } YY_BREAKcase 55:YY_RULE_SETUP#line 187 "scan.l"{ plpgsql_error_lineno = plpgsql_scanner_lineno(); return plpgsql_parse_wordtype(yytext); } YY_BREAKcase 56:YY_RULE_SETUP#line 190 "scan.l"{ plpgsql_error_lineno = plpgsql_scanner_lineno(); return plpgsql_parse_dblwordtype(yytext); } YY_BREAKcase 57:YY_RULE_SETUP#line 193 "scan.l"{ plpgsql_error_lineno = plpgsql_scanner_lineno(); return plpgsql_parse_tripwordtype(yytext); } YY_BREAKcase 58:YY_RULE_SETUP#line 196 "scan.l"{ plpgsql_error_lineno = plpgsql_scanner_lineno(); return plpgsql_parse_wordrowtype(yytext); } YY_BREAKcase 59:YY_RULE_SETUP#line 199 "scan.l"{ plpgsql_error_lineno = plpgsql_scanner_lineno(); return plpgsql_parse_dblwordrowtype(yytext); } YY_BREAKcase 60:YY_RULE_SETUP#line 202 "scan.l"{ plpgsql_error_lineno = plpgsql_scanner_lineno(); return plpgsql_parse_word(yytext); } YY_BREAKcase 61:YY_RULE_SETUP#line 205 "scan.l"{ plpgsql_error_lineno = plpgsql_scanner_lineno(); return plpgsql_parse_dblword(yytext); } YY_BREAKcase 62:YY_RULE_SETUP#line 208 "scan.l"{ plpgsql_error_lineno = plpgsql_scanner_lineno(); return plpgsql_parse_tripword(yytext); } YY_BREAKcase 63:YY_RULE_SETUP#line 211 "scan.l"{ plpgsql_error_lineno = plpgsql_scanner_lineno(); return plpgsql_parse_wordtype(yytext); } YY_BREAKcase 64:YY_RULE_SETUP#line 214 "scan.l"{ plpgsql_error_lineno = plpgsql_scanner_lineno(); return plpgsql_parse_dblwordtype(yytext); } YY_BREAKcase 65:YY_RULE_SETUP#line 217 "scan.l"{ plpgsql_error_lineno = plpgsql_scanner_lineno(); return plpgsql_parse_tripwordtype(yytext); } YY_BREAKcase 66:YY_RULE_SETUP#line 220 "scan.l"{ plpgsql_error_lineno = plpgsql_scanner_lineno(); return plpgsql_parse_wordrowtype(yytext); } YY_BREAKcase 67:YY_RULE_SETUP#line 223 "scan.l"{ plpgsql_error_lineno = plpgsql_scanner_lineno(); return plpgsql_parse_dblwordrowtype(yytext); } YY_BREAKcase 68:YY_RULE_SETUP#line 227 "scan.l"{ return T_NUMBER; } YY_BREAKcase 69:YY_RULE_SETUP#line 229 "scan.l"{ plpgsql_error_lineno = plpgsql_scanner_lineno(); ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), errmsg("unterminated quoted identifier"))); } YY_BREAK/* ---------- * Ignore whitespaces but remember this happened * ---------- */case 70:YY_RULE_SETUP#line 240 "scan.l"{ plpgsql_SpaceScanned = 1; } YY_BREAK/* ---------- * Eat up comments * ---------- */case 71:YY_RULE_SETUP#line 246 "scan.l"; YY_BREAKcase 72:YY_RULE_SETUP#line 248 "scan.l"{ start_lineno = plpgsql_scanner_lineno(); BEGIN IN_COMMENT; } YY_BREAKcase 73:YY_RULE_SETUP#line 251 "scan.l"{ BEGIN INITIAL; plpgsql_SpaceScanned = 1; } YY_BREAKcase 74:YY_RULE_SETUP#line 252 "scan.l"; YY_BREAKcase 75:YY_RULE_SETUP#line 253 "scan.l"; YY_BREAKcase YY_STATE_EOF(IN_COMMENT):#line 254 "scan.l"{ plpgsql_error_lineno = start_lineno; ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), errmsg("unterminated comment"))); } YY_BREAK/* ---------- * Collect anything inside of ''s and return one STRING * * Hacking yytext/yyleng here lets us avoid using yymore(), which is * a win for performance. It's safe because we know the underlying * input buffer is not changing. * ---------- */case 76:YY_RULE_SETUP#line 269 "scan.l"{ start_lineno = plpgsql_scanner_lineno(); start_charpos = yytext; BEGIN IN_STRING; } YY_BREAKcase 77:YY_RULE_SETUP#line 274 "scan.l"{ } YY_BREAKcase 78:YY_RULE_SETUP#line 275 "scan.l"{ } YY_BREAKcase 79:YY_RULE_SETUP#line 276 "scan.l"{ yyleng -= (yytext - start_charpos); yytext = start_charpos; BEGIN INITIAL; return T_STRING; } YY_BREAKcase YY_STATE_EOF(IN_STRING):#line 282 "scan.l"{ plpgsql_error_lineno = start_lineno; ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), errmsg("unterminated string"))); } YY_BREAKcase 80:YY_RULE_SETUP#line 288 "scan.l"{ } YY_BREAK/* ---------- * Any unmatched character is returned as is * ---------- */case 81:YY_RULE_SETUP#line 294 "scan.l"{ return yytext[0]; } YY_BREAKcase 82:YY_RULE_SETUP#line 296 "scan.l"ECHO; YY_BREAK#line 1628 "pl_scan.c"case YY_STATE_EOF(INITIAL): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yy_hold_char; YY_RESTORE_YY_MORE_OFFSET if ( yy_current_buffer->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 yyin at a new source and called * yylex(). If so, then we have to assure * consistency between 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. */ yy_n_chars = yy_current_buffer->yy_n_chars; yy_current_buffer->yy_input_file = yyin; yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since 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 ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * 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). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yy_c_buf_p; goto yy_find_action; } } else switch ( yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { yy_did_buffer_switch_on_eof = 0; if ( yywrap() ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * 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. */ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! yy_did_buffer_switch_on_eof )
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -