⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 css_lex.c

📁 著名的标准C++的html解析器
💻 C
📖 第 1 页 / 共 5 页
字号:
		switch ( yy_act )	{ /* beginning of action switch */case 1:YY_RULE_SETUP#line 31 "css_lex.l"{BEGIN(COMMENT);}	YY_BREAKcase 2:YY_RULE_SETUP#line 32 "css_lex.l"/* eat anything that's not a '*' */	YY_BREAKcase 3:YY_RULE_SETUP#line 33 "css_lex.l"/* eat up '*'s not followed by '/'s */	YY_BREAKcase 4:YY_RULE_SETUP#line 34 "css_lex.l"BEGIN(0);	YY_BREAKcase 5:YY_RULE_SETUP#line 35 "css_lex.l"{BEGIN(0); return IMPORT_SYM;}	YY_BREAKcase 6:YY_RULE_SETUP#line 36 "css_lex.l"{BEGIN(0); return IMPORTANT_SYM;}	YY_BREAKcase 7:YY_RULE_SETUP#line 37 "css_lex.l"{						BEGIN(AFTER_IDENT);						lvalp->lexeme = strdup(yytext);						return IDENT;					}	YY_BREAKcase 8:YY_RULE_SETUP#line 42 "css_lex.l"{						BEGIN(0); 						lvalp->lexeme = strdup(yytext);						return STRING;					}	YY_BREAKcase 9:YY_RULE_SETUP#line 48 "css_lex.l"{						BEGIN(0); 						lvalp->lexeme = strdup(yytext);						return NUMBER;					}	YY_BREAKcase 10:YY_RULE_SETUP#line 53 "css_lex.l"{						BEGIN(0);						lvalp->lexeme = strdup(yytext);						return PERCENTAGE;					}	YY_BREAKcase 11:YY_RULE_SETUP#line 58 "css_lex.l"{							BEGIN(0); 							lvalp->lexeme = strdup(yytext);							return LENGTH;						}	YY_BREAKcase 12:YY_RULE_SETUP#line 63 "css_lex.l"{							BEGIN(0); 							lvalp->lexeme = strdup(yytext);							return LENGTH;						}	YY_BREAKcase 13:YY_RULE_SETUP#line 68 "css_lex.l"{							BEGIN(0); 							lvalp->lexeme = strdup(yytext);							return LENGTH;						}	YY_BREAKcase 14:YY_RULE_SETUP#line 73 "css_lex.l"{							BEGIN(0); 							lvalp->lexeme = strdup(yytext);							return LENGTH;						}	YY_BREAKcase 15:YY_RULE_SETUP#line 78 "css_lex.l"{							BEGIN(0); 							lvalp->lexeme = strdup(yytext);							return LENGTH;						}	YY_BREAKcase 16:YY_RULE_SETUP#line 83 "css_lex.l"{							BEGIN(0); 							lvalp->lexeme = strdup(yytext);							return LENGTH;						}	YY_BREAKcase 17:YY_RULE_SETUP#line 88 "css_lex.l"{							BEGIN(0); 							lvalp->lexeme = strdup(yytext);							return EMS;						}	YY_BREAKcase 18:YY_RULE_SETUP#line 93 "css_lex.l"{							BEGIN(0); 							lvalp->lexeme = strdup(yytext);							return EXS;						}	YY_BREAKcase 19:YY_RULE_SETUP#line 99 "css_lex.l"{return LINK_PSCLASS_AFTER_IDENT;}	YY_BREAKcase 20:YY_RULE_SETUP#line 100 "css_lex.l"{return VISITED_PSCLASS_AFTER_IDENT;}	YY_BREAKcase 21:YY_RULE_SETUP#line 101 "css_lex.l"{return ACTIVE_PSCLASS_AFTER_IDENT;}	YY_BREAKcase 22:YY_RULE_SETUP#line 102 "css_lex.l"{return FIRST_LINE_AFTER_IDENT;}	YY_BREAKcase 23:YY_RULE_SETUP#line 103 "css_lex.l"{return FIRST_LETTER_AFTER_IDENT;}	YY_BREAKcase 24:YY_RULE_SETUP#line 104 "css_lex.l"{								lvalp->lexeme = strdup(yytext+1);								return HASH_AFTER_IDENT;							}	YY_BREAKcase 25:YY_RULE_SETUP#line 108 "css_lex.l"{								lvalp->lexeme = strdup(yytext+1);								return CLASS_AFTER_IDENT;							}	YY_BREAKcase 26:YY_RULE_SETUP#line 113 "css_lex.l"{BEGIN(AFTER_IDENT); return LINK_PSCLASS;}	YY_BREAKcase 27:YY_RULE_SETUP#line 114 "css_lex.l"{BEGIN(AFTER_IDENT); return VISITED_PSCLASS;}	YY_BREAKcase 28:YY_RULE_SETUP#line 115 "css_lex.l"{BEGIN(AFTER_IDENT); return ACTIVE_PSCLASS;}	YY_BREAKcase 29:YY_RULE_SETUP#line 116 "css_lex.l"{BEGIN(AFTER_IDENT); return FIRST_LINE;}	YY_BREAKcase 30:YY_RULE_SETUP#line 117 "css_lex.l"{BEGIN(AFTER_IDENT); return FIRST_LETTER;}	YY_BREAKcase 31:YY_RULE_SETUP#line 118 "css_lex.l"{						BEGIN(AFTER_IDENT);						lvalp->lexeme = strdup(yytext+1);						return HASH;					}	YY_BREAKcase 32:YY_RULE_SETUP#line 123 "css_lex.l"{						BEGIN(AFTER_IDENT);						lvalp->lexeme = strdup(yytext+1);						return CLASS;					}	YY_BREAKcase 33:#line 130 "css_lex.l"case 34:YY_RULE_SETUP#line 130 "css_lex.l"{														BEGIN(0); 														lvalp->lexeme = 															strdup(yytext);														return URL;													}	YY_BREAKcase 35:YY_RULE_SETUP#line 136 "css_lex.l"{														BEGIN(0);														lvalp->lexeme = 															strdup(yytext);														return RGB;													}	YY_BREAKcase 36:YY_RULE_SETUP#line 143 "css_lex.l"{BEGIN(0); return *yytext;}	YY_BREAKcase 37:YY_RULE_SETUP#line 144 "css_lex.l"{BEGIN(0); /* ignore whitespace */}	YY_BREAKcase 38:YY_RULE_SETUP#line 145 "css_lex.l"{BEGIN(0); /* ignore whitespace */}	YY_BREAKcase 39:YY_RULE_SETUP#line 146 "css_lex.l"{BEGIN(0); return CDO;}	YY_BREAKcase 40:YY_RULE_SETUP#line 147 "css_lex.l"{BEGIN(0); return CDC;}	YY_BREAKcase 41:YY_RULE_SETUP#line 148 "css_lex.l"{BEGIN(0); return CSL;}	YY_BREAKcase 42:YY_RULE_SETUP#line 149 "css_lex.l"{fprintf(stderr, "Illegal character (%d)\n", *yytext);}	YY_BREAKcase 43:YY_RULE_SETUP#line 151 "css_lex.l"ECHO;	YY_BREAK#line 1465 "css_lex.c"			case YY_STATE_EOF(INITIAL):			case YY_STATE_EOF(COMMENT):			case YY_STATE_EOF(AFTER_IDENT):				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 )						YY_NEW_FILE;					}				break;				}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -