📄 pgc.c
字号:
*/#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 yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act;#line 292 "pgc.l" /* code to execute during start of each call of yylex() */ token_start = NULL;#line 1381 "pgc.c" if ( yy_init ) { yy_init = 0;#ifdef YY_USER_INIT YY_USER_INIT;#endif if ( ! yy_start ) yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_load_buffer_state(); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = yy_c_buf_p; /* Support of yytext. */ *yy_cp = yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = yy_start; yy_state_ptr = yy_state_buf; *yy_state_ptr++ = yy_current_state;yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 446 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; *yy_state_ptr++ = yy_current_state; ++yy_cp; } while ( yy_base[yy_current_state] != 1997 );yy_find_action: yy_current_state = *--yy_state_ptr; yy_lp = yy_accept[yy_current_state];find_rule: /* we branch to this label when backing up */ for ( ; ; ) /* until we find what rule we matched */ { if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) { yy_act = yy_acclist[yy_lp]; { yy_full_match = yy_cp; break; } } --yy_cp; yy_current_state = *--yy_state_ptr; yy_lp = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; if ( yy_act != YY_END_OF_BUFFER ) { int yyl; for ( yyl = 0; yyl < yyleng; ++yyl ) if ( yytext[yyl] == '\n' ) ++yylineno; }do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */case 1:YY_RULE_SETUP#line 299 "pgc.l"{ /* ignore */ } YY_BREAKcase 2:YY_RULE_SETUP#line 301 "pgc.l"{ token_start = yytext; state_before = YYSTATE; xcdepth = 0; BEGIN(xc); /* Put back any characters past slash-star; see above */ yyless(2); fputs("/*", yyout); } YY_BREAKcase 3:YY_RULE_SETUP#line 310 "pgc.l"{ xcdepth++; /* Put back any characters past slash-star; see above */ yyless(2); fputs("/*", yyout); } YY_BREAKcase 4:YY_RULE_SETUP#line 317 "pgc.l"{ ECHO; if (xcdepth <= 0) { BEGIN(state_before); token_start = NULL; } else xcdepth--; } YY_BREAKcase 5:YY_RULE_SETUP#line 328 "pgc.l"{ ECHO; } YY_BREAKcase 6:YY_RULE_SETUP#line 329 "pgc.l"{ ECHO; } YY_BREAKcase YY_STATE_EOF(xc):#line 331 "pgc.l"{ mmerror(PARSE_ERROR, ET_FATAL, "Unterminated /* comment"); } YY_BREAKcase 7:YY_RULE_SETUP#line 333 "pgc.l"{ token_start = yytext; BEGIN(xb); startlit(); addlitchar('b'); } YY_BREAKcase 8:YY_RULE_SETUP#line 339 "pgc.l"{ BEGIN(SQL); if (literalbuf[strspn(literalbuf, "01") + 1] != '\0') mmerror(PARSE_ERROR, ET_ERROR, "invalid bit string input."); yylval.str = literalbuf; return BCONST; } YY_BREAKcase 9:#line 348 "pgc.l"case 10:YY_RULE_SETUP#line 348 "pgc.l"{ addlit(yytext, yyleng); } YY_BREAKcase 11:#line 350 "pgc.l"case 12:YY_RULE_SETUP#line 350 "pgc.l"{ /* ignore */ } YY_BREAKcase YY_STATE_EOF(xb):#line 351 "pgc.l"{ mmerror(PARSE_ERROR, ET_FATAL, "Unterminated bit string"); } YY_BREAKcase 13:YY_RULE_SETUP#line 353 "pgc.l"{ token_start = yytext; BEGIN(xh); startlit(); addlitchar('x'); } YY_BREAKcase 14:YY_RULE_SETUP#line 359 "pgc.l"{ yylval.str = literalbuf; return XCONST; } YY_BREAKcase YY_STATE_EOF(xh):#line 364 "pgc.l"{ mmerror(PARSE_ERROR, ET_FATAL, "Unterminated hexadecimal integer"); } YY_BREAKcase 15:YY_RULE_SETUP#line 365 "pgc.l"{ /* National character. * Need to remember type info to flow it forward into the parser. * Not yet implemented. - thomas 2002-06-17 */ token_start = yytext; BEGIN(xq); startlit(); } YY_BREAKcase 16:YY_RULE_SETUP#line 374 "pgc.l"{ token_start = yytext; state_before = YYSTATE; BEGIN(xq); startlit(); } YY_BREAKcase 17:YY_RULE_SETUP#line 380 "pgc.l"{ BEGIN(state_before); yylval.str = mm_strdup(literalbuf); return SCONST; } YY_BREAKcase 18:YY_RULE_SETUP#line 385 "pgc.l"{ addlitchar('\''); } YY_BREAKcase 19:YY_RULE_SETUP#line 386 "pgc.l"{ addlit(yytext, yyleng); } YY_BREAKcase 20:YY_RULE_SETUP#line 387 "pgc.l"{ addlit(yytext, yyleng); } YY_BREAKcase 21:YY_RULE_SETUP#line 388 "pgc.l"{ addlit(yytext, yyleng); } YY_BREAKcase 22:YY_RULE_SETUP#line 389 "pgc.l"{ /* ignore */ } YY_BREAKcase YY_STATE_EOF(xq):#line 391 "pgc.l"{ mmerror(PARSE_ERROR, ET_FATAL, "Unterminated quoted string"); } YY_BREAKcase 23:YY_RULE_SETUP#line 393 "pgc.l"{ state_before = YYSTATE; BEGIN(xd); startlit(); } YY_BREAKcase 24:YY_RULE_SETUP#line 398 "pgc.l"{ BEGIN(state_before); if (literallen == 0) mmerror(PARSE_ERROR, ET_ERROR, "zero-length delimited identifier"); yylval.str = mm_strdup(literalbuf); return CSTRING; } YY_BREAKcase 25:YY_RULE_SETUP#line 405 "pgc.l"{ BEGIN(state_before); yylval.str = mm_strdup(literalbuf); return CSTRING; } YY_BREAKcase 26:YY_RULE_SETUP#line 410 "pgc.l"{ addlitchar('"'); } YY_BREAKcase 27:YY_RULE_SETUP#line 411 "pgc.l"{ addlit(yytext, yyleng); } YY_BREAKcase YY_STATE_EOF(xd):case YY
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -