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

📄 asm.c

📁 代码检索工具GLOBAL源码。可用来浏览分析LINUX源码。
💻 C
📖 第 1 页 / 共 3 页
字号:
 * some compilers to complain about unreachable statements. */#ifndef yyterminate#define 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) 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 yylex YY_PROTO(( void ))#endif/* Code executed at the beginning of each rule, after yytext and 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 \	if ( yyleng > 0 ) \		yy_current_buffer->yy_at_bol = \				(yytext[yyleng - 1] == '\n'); \	YY_USER_ACTIONYY_DECL	{	register yy_state_type yy_current_state;	register char *yy_cp, *yy_bp;	register int yy_act;#line 65 "asm.l" /* Backslash-newline */#line 666 "asm.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_current_state += YY_AT_BOL();yy_match:		do			{			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];			if ( yy_accept[yy_current_state] )				{				yy_last_accepting_state = yy_current_state;				yy_last_accepting_cpos = 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 >= 79 )					yy_c = yy_meta[(unsigned int) yy_c];				}			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];			++yy_cp;			}		while ( yy_base[yy_current_state] != 152 );yy_find_action:		yy_act = yy_accept[yy_current_state];		if ( yy_act == 0 )			{ /* have to back up */			yy_cp = yy_last_accepting_cpos;			yy_current_state = yy_last_accepting_state;			yy_act = yy_accept[yy_current_state];			}		YY_DO_BEFORE_ACTION;do_action:	/* This label is used only to access EOF actions. */		switch ( yy_act )	{ /* beginning of action switch */			case 0: /* must back up */			/* undo the effects of YY_DO_BEFORE_ACTION */			*yy_cp = yy_hold_char;			yy_cp = yy_last_accepting_cpos;			yy_current_state = yy_last_accepting_state;			goto yy_find_action;case 1:YY_RULE_SETUP#line 67 "asm.l"DEFAULT_BACKSLASH_NEWLINE_ACTION	YY_BREAK/* Comment */case 2:YY_RULE_SETUP#line 70 "asm.l"{ echos(comment_begin); ECHO; yy_push_state(C_COMMENT); }	YY_BREAKcase 3:YY_RULE_SETUP#line 71 "asm.l"{ ECHO; echos(comment_end); yy_pop_state(); }	YY_BREAKcase 4:YY_RULE_SETUP#line 72 "asm.l"{ put_char(LEXTEXT[0]); }	YY_BREAKcase YY_STATE_EOF(C_COMMENT):#line 73 "asm.l"{		if (wflag)			unexpected_eof(LINENO);		yyterminate();	}	YY_BREAKcase 5:YY_RULE_SETUP#line 78 "asm.l"{ echos(comment_begin); ECHO; yy_push_state(CPP_COMMENT); }	YY_BREAK/* String */case 6:YY_RULE_SETUP#line 81 "asm.l"{ ECHO; yy_push_state(STRING); }	YY_BREAKcase 7:YY_RULE_SETUP#line 82 "asm.l"{ ECHO; yy_pop_state(); }	YY_BREAKcase 8:YY_RULE_SETUP#line 83 "asm.l"{ put_char(LEXTEXT[0]); put_char(LEXTEXT[1]); }	YY_BREAK/* Literal */case 9:YY_RULE_SETUP#line 86 "asm.l"{ ECHO; yy_push_state(LITERAL); }	YY_BREAKcase 10:YY_RULE_SETUP#line 87 "asm.l"{ ECHO; yy_pop_state(); }	YY_BREAKcase 11:YY_RULE_SETUP#line 88 "asm.l"{ put_char(LEXTEXT[0]); put_char(LEXTEXT[1]); }	YY_BREAK/* Preprocessing directive */case 12:YY_RULE_SETUP#line 91 "asm.l"{		int c;		put_macro(LEXTEXT);		/*		 * #include|   <aaa/bbb.h>|		 *         ~~~~~~~~~~~~~~~~		 */		while ((c = input()) && c != '\n' && isspace(c))			echoc(c);		if (c == '\n') {			unput(c);		} else if (c) {			char path[MAXPATHLEN+1], *p = path;			int sep = 0;			if (c == '"')				sep = c;			else if (c == '<')				sep = '>';			put_char(c);			/* pick up path name */			while ((c = input()) && c != '\n' && c != sep)				*p++ = c;			*p = '\0';			if (c == sep) {				struct data *inc;				const char *basename = locatestring(path, "/", MATCH_LAST);				if (basename)					basename++;				else					basename = path;				inc = get_inc(basename);				if (inc)					put_include_anchor(inc, path);				else					echos(path);				put_char(sep);			} else {				echos(path);				if (c)					unput(c);			}		}	}	YY_BREAKcase 13:YY_RULE_SETUP#line 138 "asm.l"{		if ((last_directive = asm_reserved_sharp(LEXTEXT, LEXLENG)) != 0) {			put_macro(LEXTEXT);			yy_push_state(PREPROCESSOR_LINE);		} else {			/*			 * Don't warn about unknown directive.			 * '#' may be used as the start of a comment.			 */			echos(comment_begin);			ECHO;			yy_push_state(SHELL_COMMENT);		}	}	YY_BREAK/* Null directive */case 14:YY_RULE_SETUP#line 153 "asm.l"{ put_macro(LEXTEXT); }	YY_BREAKcase 15:YY_RULE_SETUP#line 155 "asm.l"ECHO;	YY_BREAKcase 16:YY_RULE_SETUP#line 156 "asm.l"{		if (YY_START == PREPROCESSOR_LINE		    && (last_directive == SHARP_IF || last_directive == SHARP_ELIF)		    && strcmp(LEXTEXT, "defined") == 0)			put_reserved_word(LEXTEXT);		else {			struct anchor *a = anchor_get(LEXTEXT, LEXLENG, 0, LINENO);			if (a) {				put_anchor(gettag(a), a->type, LINENO);				a->done = 1;			} else {				ECHO;			}		}	}	YY_BREAKcase 17:YY_RULE_SETUP#line 171 "asm.l"{ put_brace(LEXTEXT); }	YY_BREAK/* New line */case 18:YY_RULE_SETUP#line 173 "asm.l"DEFAULT_END_OF_LINE_ACTION	YY_BREAKcase 19:YY_RULE_SETUP#line 174 "asm.l"{ put_char(LEXTEXT[0]); }	YY_BREAKcase 20:YY_RULE_SETUP#line 176 "asm.l"ECHO;	YY_BREAK#line 937 "asm.c"case YY_STATE_EOF(INITIAL):case YY_STATE_EOF(ASM):case YY_STATE_EOF(CPP_COMMENT):case YY_STATE_EOF(SHELL_COMMENT):case YY_STATE_EOF(STRING):case YY_STATE_EOF(LITERAL):case YY_STATE_EOF(PREPROCESSOR_LINE):	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;				}			case EOB_ACT_CONTINUE_SCAN:				yy_c_buf_p =					yytext_ptr + yy_amount_of_matched_text;				yy_current_state = yy_get_previous_state();				yy_cp = yy_c_buf_p;				yy_bp = yytext_ptr + YY_MORE_ADJ;				goto yy_match;			case EOB_ACT_LAST_MATCH:				yy_c_buf_p =				&yy_current_buffer->yy_ch_buf[yy_n_chars];				yy_current_state = yy_get_previous_state();				yy_cp = yy_c_buf_p;				yy_bp = yytext_ptr + YY_MORE_ADJ;				goto 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 yylex *//* 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 yy_get_next_buffer()	{	register char *dest = yy_current_buffer->yy_ch_buf;	register char *source = yytext_ptr;	register int number_to_move, i;	int ret_val;	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )		YY_FATAL_ERROR(		"fatal flex scanner internal error--end of buffer missed" );	if ( yy_current_buffer->yy_fill_buffer == 0 )		{ /* Don't try to fill the buffer, so this is an EOF. */		if ( yy_c_buf_p - 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) (yy_c_buf_p - yytext_ptr) - 1;	for ( i = 0; i < number_to_move; ++i )		*(dest++) = *(source++);	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )		/* don't do the read, it's not guaranteed to return an EOF,		 * just force an EOF		 */		yy_current_buffer->yy_n_chars = yy_n_chars = 0;	else		{		int num_to_read =			yy_current_buffer->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 = yy_current_buffer;			int yy_c_buf_p_offset =				(int) (yy_c_buf_p - b->yy_ch_buf);			if ( b->yy_is_our_buffer )				{				int new_size = b->yy_buf_size * 2;				if ( new_size <= 0 )					b->yy_buf_size += b->yy_buf_size / 8;				else					b->yy_buf_size *= 2;				b->yy_ch_buf = (char *)					/* Include room in for 2 EOB chars. */					yy_flex_realloc( (void *) b->yy_ch_buf,							 b->yy_buf_size + 2 );				}			else				/* Can't grow it, we don't own it. */				b->yy_ch_buf = 0;			if ( ! b->yy_ch_buf )				YY_FATAL_ERROR(				"fatal error - scanner input buffer overflow" );			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];			num_to_read = yy_current_buffer->yy_buf_size -						number_to_move - 1;#endif			}		if ( num_to_read > YY_READ_BUF_SIZE )			num_to_read = YY_READ_BUF_SIZE;		/* Read in more data. */		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),			yy_n_chars, num_to_read );		yy_current_buffer->yy_n_chars = yy_n_chars;		}	if ( yy_n_chars == 0 )		{		if ( number_to_move == YY_MORE_ADJ )			{			ret_val = EOB_ACT_END_OF_FILE;			yyrestart( yyin );			}		else			{			ret_val = EOB_ACT_LAST_MATCH;			yy_current_buffer->yy_buffer_status =				YY_BUFFER_EOF_PENDING;			}		}	else		ret_val = EOB_ACT_CONTINUE_SCAN;	yy_n_chars += number_to_move;	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];	return ret_val;	}/* yy_get_previous_state - get the state just before the EOB char was reached */static yy_state_type yy_get_previous_state()	{	register yy_state_type yy_current_state;	register char *yy_cp;	yy_current_state = yy_start;	yy_current_state += YY_AT_BOL();	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )		{		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);		if ( yy_accept[yy_current_state] )			{

⌨️ 快捷键说明

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