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

📄 lex_yy.c

📁 这是一个C程序分析工具
💻 C
📖 第 1 页 / 共 5 页
字号:
	break;	case 53:#line 441 "scan.l"	{ count(); return(TK_OR_ASSIGN); }	break;	case 54:#line 442 "scan.l"	{ count(); return(TK_RIGHT_OP); }	break;	case 55:#line 443 "scan.l"	{ count(); return(TK_LEFT_OP); }	break;	case 56:#line 444 "scan.l"	{ count(); return(TK_INC_OP); }	break;	case 57:#line 445 "scan.l"	{ count(); return(TK_DEC_OP); }	break;	case 58:#line 446 "scan.l"	{ count(); return(TK_PTR_OP); }	break;	case 59:#line 447 "scan.l"	{ count(); return(TK_AND_OP); }	break;	case 60:#line 448 "scan.l"	{ count(); return(TK_OR_OP); }	break;	case 61:#line 449 "scan.l"	{ count(); return(TK_LE_OP); }	break;	case 62:#line 450 "scan.l"	{ count(); return(TK_GE_OP); }	break;	case 63:#line 451 "scan.l"	{ count(); return(TK_EQ_OP); }	break;	case 64:#line 452 "scan.l"	{ count(); return(TK_NE_OP); }	break;	case 65:#line 453 "scan.l"	{ count(); return(';'); }	break;	case 66:#line 454 "scan.l"	{ count(); return('{'); }	break;	case 67:#line 455 "scan.l"	{ count(); return('}'); }	break;	case 68:#line 456 "scan.l"	{ count(); return(','); }	break;	case 69:#line 457 "scan.l"	{ count(); return(':'); }	break;	case 70:#line 458 "scan.l"	{ count(); return('='); }	break;	case 71:#line 459 "scan.l"	{ count(); return('('); }	break;	case 72:#line 460 "scan.l"	{ count(); return(')'); }	break;	case 73:#line 461 "scan.l"	{ count(); return('['); }	break;	case 74:#line 462 "scan.l"	{ count(); return(']'); }	break;	case 75:#line 463 "scan.l"	{ count(); return('.'); }	break;	case 76:#line 464 "scan.l"	{ count(); return('&'); }	break;	case 77:#line 465 "scan.l"	{ count(); return('!'); }	break;	case 78:#line 466 "scan.l"	{ count(); return('~'); }	break;	case 79:#line 467 "scan.l"	{ count(); return('-'); }	break;	case 80:#line 468 "scan.l"	{ count(); return('+'); }	break;	case 81:#line 469 "scan.l"	{ count(); return('*'); }	break;	case 82:#line 470 "scan.l"	{ count(); return('/'); }	break;	case 83:#line 471 "scan.l"	{ count(); return('%'); }	break;	case 84:#line 472 "scan.l"	{ count(); return('<'); }	break;	case 85:#line 473 "scan.l"	{ count(); return('>'); }	break;	case 86:#line 474 "scan.l"	{ count(); return('^'); }	break;	case 87:#line 475 "scan.l"	{ count(); return('|'); }	break;	case 88:#line 476 "scan.l"	{ count(); return('?'); }	break;	case 89:#line 478 "scan.l"	{  /* Absorb whitespace character. */                           count(); }	break;	case 90:#line 480 "scan.l"	{ INCR_YYLINENO; count(); }	break;	case 91:#line 482 "scan.l"	{  /*                              Count but otherwise ignore preprocessor                              directives.                           */                           ++mod_pp;                           count(); }	break;	case 92:#line 489 "scan.l"	{  /* Trap any non-standard characters. */                           count(); found_nonstandard(); }	break;#line 265 "c:/mks/etc/yylex.c"	}	YY_SCANNER;	i = yyleng;	goto yy_again;			/* action fell though */  yy_reject:	YY_SCANNER;	i = yyoleng;			/* restore original yytext */	if (++yyfmin < yyfmax)		goto yy_found;		/* another final state, same length */	else		goto yy_search;		/* try shorter yytext */  yy_more:	YY_SCANNER;	i = yyleng;	if (i > 0)		yy_lastc = yytext[i-1];	goto yy_contin;}/* * user callable input/unput functions. *//* get input char with pushback */YY_DECL intinput(){	int c;#ifndef YY_PRESERVE	if (yy_end > yyleng) {		yy_end--;		memmove(yytext+yyleng, yytext+yyleng+1,			(size_t) (yy_end-yyleng));		c = yy_save;		YY_USER;#else	if (yy_push < yy_save+YYLMAX) {		c = *yy_push++;#endif	} else		c = yygetc();	yy_lastc = c;	if (c == YYNEWLINE)		yylineno++;	return c;}/* pushback char */YY_DECL intunput(c)	int c;{#ifndef YY_PRESERVE	if (yy_end >= YYLMAX)		YY_FATAL(gettext("Push-back buffer overflow"));	if (yy_end > yyleng) {		yytext[yyleng] = yy_save;		memmove(yytext+yyleng+1, yytext+yyleng,			(size_t) (yy_end-yyleng));		yytext[yyleng] = 0;	}	yy_end++;	yy_save = c;#else	if (yy_push <= yy_save)		YY_FATAL(gettext("Push-back buffer overflow"));	*--yy_push = c;#endif	if (c == YYNEWLINE)		yylineno--;	return c;}#line 493 "scan.l"/*   If a replacement string was specified on command line, substitute for   this lexeme. Return whether this identifier had a replacement string.*/static BOOLEAN identifier_defined(char *id){   unsigned i;   /*      Look through command-line arguments for the define option character.      (Skip argument 0 because that is the command itself.)   */   for (i = 1; i < cmd_line_argc; ++i)      if (strchr(OPT_INTRO_CHARS, cmd_line_argv[i][0]) != NULL &&            cmd_line_argv[i][OPTION_START] == DEFINE_OPT_CHAR)      {         char *repl_str;         unsigned repl_len;         /* Look for equal sign after identifier. */         repl_str = (char *)strchr(&cmd_line_argv[i][OPTION_STRING_START],               EQUAL);         /*            If equal sign found and this is a define for this            identifier, substitute replacement string for this lexeme.         */         if (repl_str != NULL &&               strncmp(&cmd_line_argv[i][OPTION_STRING_START], id,               (repl_len = repl_str - &cmd_line_argv[i][OPTION_STRING_START]))               == 0 && id[repl_len] == '\0')         {            unsigned len;            char *p;            /*               unput replacement string so that lex will scan it in as               if it occurred in the input stream instead of the               original identifier. NOTE: If empty replacement string,               the affect is that the identifier is ignored.            */            for (len = strlen(&repl_str[EQUAL_SIZE]), p = &repl_str[len];                  len > 0; --len, --p)               unput(*p);            /*               Leave outer loop because define option character found               and processed.            */            break;         }      }   return i < cmd_line_argc;}/* Initialize lexer. */void init_lex(void){   /*      Restart lex itself. Note: I don't believe that this is absolutely      necessary for this lexer. The lexer is not left in an unusual      state after each file, e.g., characters left in the push-back      buffer or the lexer being in a state other than INITIAL. It is      explicitly restarted here just because "it's the right thing to      do."  If this macro reference expands to something that is not      compatible with your lexer, although I tried to make it portable,      just remove it.   */   if (yyin != NULL)      MTR_YY_INIT;   /* Reset line_type for first line. Start off assuming blank line. */   line_type = BLANK_LINE;   yylineno = 1;   found_tab = FALSE;   found_space = FALSE;   mod_pp = 0;}#ifdef ATT_SCANNER/* Function that restarts AT&T lexers. */static void yy_init(void){   extern int yyprevious;   NLSTATE;   yysptr = yysbuf;   BEGIN INITIAL;/* I don't think these absolutely need to be reset. */#if 0   extern int *yyfnd;   yyleng = 0;   yytchar = 0;   yymorfg = 0;   yyestate = 0;   yyfnd = 0;#endif}#endif#if READ_LINE#if defined(ATT_SCANNER) || defined(MKS_SCANNER)/* Pointer to next character in input_line[]. */static char *next_char_p;/*   Replacement for the out-of-the-box yygetc(). This function provides   access to the entire input line, even the characters that have not   yet been scanned in.*/static int yygetc(void){   static int last_char = EOF;      /* Force subsequent getting of first line.*/   int next_char;   int characters_read;   switch (last_char)   {   case MTR_NEWLINE:                /* Time to get another line of input? */   case EOF:      YY_INPUT(input_line, characters_read, INPUT_LINE_MAX_LEN);      if (characters_read == 0)      {         next_char = EOF;           /* Indicate that couldn't get another line*/         next_char_p = input_line;  /* Set to something. */      }      else      {         next_char_p = input_line;         next_char = *next_char_p++;   /* Get first character from input line. */      }      break;   default:                         /* Get next character from input line. */      /*         If going to get the character that is immediately _after_ the         input buffer, something's wrong, so report a fatal error and         terminate. Either the source line is too big for the buffer, in         which case increasing the size of the buffer (input_line[])         might help, or your C compiler's idea of what constitutes a         "newline" doesn't agree with the newlines in the source file         that you are processing.      */

⌨️ 快捷键说明

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