亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? gen.c

?? 編譯原理(Flex):生成詞法和語法分析程序的源代碼的程序。
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* gen - actual generation (writing) of flex scanners */

/*-
 * Copyright (c) 1990 The Regents of the University of California.
 * All rights reserved.
 *
 * This code is derived from software contributed to Berkeley by
 * Vern Paxson.
 * 
 * The United States Government has rights in this work pursuant
 * to contract no. DE-AC03-76SF00098 between the United States
 * Department of Energy and the University of California.
 *
 * Redistribution and use in source and binary forms are permitted provided
 * that: (1) source distributions retain this entire copyright notice and
 * comment, and (2) distributions including binaries display the following
 * acknowledgement:  ``This product includes software developed by the
 * University of California, Berkeley and its contributors'' in the
 * documentation or other materials provided with the distribution and in
 * all advertising materials mentioning features or use of this software.
 * Neither the name of the University nor the names of its contributors may
 * be used to endorse or promote products derived from this software without
 * specific prior written permission.
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

/* $Header: /home/daffy/u0/vern/flex/RCS/gen.c,v 2.54 95/04/20 11:17:08 vern Exp $ */

#include "flexdef.h"


/* declare functions that have forward references */

void gen_next_state PROTO((int));
void genecs PROTO((void));
void indent_put2s PROTO((char [], char []));
void indent_puts PROTO((char []));


static int indent_level = 0; /* each level is 8 spaces */

#define indent_up() (++indent_level)
#define indent_down() (--indent_level)
#define set_indent(indent_val) indent_level = indent_val

/* Almost everything is done in terms of arrays starting at 1, so provide
 * a null entry for the zero element of all C arrays.  (The exception
 * to this is that the fast table representation generally uses the
 * 0 elements of its arrays, too.)
 */
static char C_int_decl[] = "static yyconst int %s[%d] =\n    {   0,\n";
static char C_short_decl[] = "static yyconst short int %s[%d] =\n    {   0,\n";
static char C_long_decl[] = "static yyconst long int %s[%d] =\n    {   0,\n";
static char C_state_decl[] =
	"static yyconst yy_state_type %s[%d] =\n    {   0,\n";


/* Indent to the current level. */

void do_indent()
	{
	register int i = indent_level * 8;

	while ( i >= 8 )
		{
		outc( '\t' );
		i -= 8;
		}

	while ( i > 0 )
		{
		outc( ' ' );
		--i;
		}
	}


/* Generate the code to keep backing-up information. */

void gen_backing_up()
	{
	if ( reject || num_backing_up == 0 )
		return;

	if ( fullspd )
		indent_puts( "if ( yy_current_state[-1].yy_nxt )" );
	else
		indent_puts( "if ( yy_accept[yy_current_state] )" );

	indent_up();
	indent_puts( "{" );
	indent_puts( "yy_last_accepting_state = yy_current_state;" );
	indent_puts( "yy_last_accepting_cpos = yy_cp;" );
	indent_puts( "}" );
	indent_down();
	}


/* Generate the code to perform the backing up. */

void gen_bu_action()
	{
	if ( reject || num_backing_up == 0 )
		return;

	set_indent( 3 );

	indent_puts( "case 0: /* must back up */" );
	indent_puts( "/* undo the effects of YY_DO_BEFORE_ACTION */" );
	indent_puts( "*yy_cp = yy_hold_char;" );

	if ( fullspd || fulltbl )
		indent_puts( "yy_cp = yy_last_accepting_cpos + 1;" );
	else
		/* Backing-up info for compressed tables is taken \after/
		 * yy_cp has been incremented for the next state.
		 */
		indent_puts( "yy_cp = yy_last_accepting_cpos;" );

	indent_puts( "yy_current_state = yy_last_accepting_state;" );
	indent_puts( "goto yy_find_action;" );
	outc( '\n' );

	set_indent( 0 );
	}


/* genctbl - generates full speed compressed transition table */

void genctbl()
	{
	register int i;
	int end_of_buffer_action = num_rules + 1;

	/* Table of verify for transition and offset to next state. */
	out_dec( "static yyconst struct yy_trans_info yy_transition[%d] =\n",
		tblend + numecs + 1 );
	outn( "    {" );

	/* We want the transition to be represented as the offset to the
	 * next state, not the actual state number, which is what it currently
	 * is.  The offset is base[nxt[i]] - (base of current state)].  That's
	 * just the difference between the starting points of the two involved
	 * states (to - from).
	 *
	 * First, though, we need to find some way to put in our end-of-buffer
	 * flags and states.  We do this by making a state with absolutely no
	 * transitions.  We put it at the end of the table.
	 */

	/* We need to have room in nxt/chk for two more slots: One for the
	 * action and one for the end-of-buffer transition.  We now *assume*
	 * that we're guaranteed the only character we'll try to index this
	 * nxt/chk pair with is EOB, i.e., 0, so we don't have to make sure
	 * there's room for jam entries for other characters.
	 */

	while ( tblend + 2 >= current_max_xpairs )
		expand_nxt_chk();

	while ( lastdfa + 1 >= current_max_dfas )
		increase_max_dfas();

	base[lastdfa + 1] = tblend + 2;
	nxt[tblend + 1] = end_of_buffer_action;
	chk[tblend + 1] = numecs + 1;
	chk[tblend + 2] = 1; /* anything but EOB */

	/* So that "make test" won't show arb. differences. */
	nxt[tblend + 2] = 0;

	/* Make sure every state has an end-of-buffer transition and an
	 * action #.
	 */
	for ( i = 0; i <= lastdfa; ++i )
		{
		int anum = dfaacc[i].dfaacc_state;
		int offset = base[i];

		chk[offset] = EOB_POSITION;
		chk[offset - 1] = ACTION_POSITION;
		nxt[offset - 1] = anum;	/* action number */
		}

	for ( i = 0; i <= tblend; ++i )
		{
		if ( chk[i] == EOB_POSITION )
			transition_struct_out( 0, base[lastdfa + 1] - i );

		else if ( chk[i] == ACTION_POSITION )
			transition_struct_out( 0, nxt[i] );

		else if ( chk[i] > numecs || chk[i] == 0 )
			transition_struct_out( 0, 0 );	/* unused slot */

		else	/* verify, transition */
			transition_struct_out( chk[i],
						base[nxt[i]] - (i - chk[i]) );
		}


	/* Here's the final, end-of-buffer state. */
	transition_struct_out( chk[tblend + 1], nxt[tblend + 1] );
	transition_struct_out( chk[tblend + 2], nxt[tblend + 2] );

	outn( "    };\n" );

	/* Table of pointers to start states. */
	out_dec(
	"static yyconst struct yy_trans_info *yy_start_state_list[%d] =\n",
		lastsc * 2 + 1 );
	outn( "    {" );	/* } so vi doesn't get confused */

	for ( i = 0; i <= lastsc * 2; ++i )
		out_dec( "    &yy_transition[%d],\n", base[i] );

	dataend();

	if ( useecs )
		genecs();
	}


/* Generate equivalence-class tables. */

void genecs()
	{
	register int i, j;
	int numrows;

	out_str_dec( C_int_decl, "yy_ec", csize );

	for ( i = 1; i < csize; ++i )
		{
		if ( caseins && (i >= 'A') && (i <= 'Z') )
			ecgroup[i] = ecgroup[clower( i )];

		ecgroup[i] = ABS( ecgroup[i] );
		mkdata( ecgroup[i] );
		}

	dataend();

	if ( trace )
		{
		fputs( _( "\n\nEquivalence Classes:\n\n" ), stderr );

		numrows = csize / 8;

		for ( j = 0; j < numrows; ++j )
			{
			for ( i = j; i < csize; i = i + numrows )
				{
				fprintf( stderr, "%4s = %-2d",
					readable_form( i ), ecgroup[i] );

				putc( ' ', stderr );
				}

			putc( '\n', stderr );
			}
		}
	}


/* Generate the code to find the action number. */

void gen_find_action()
	{
	if ( fullspd )
		indent_puts( "yy_act = yy_current_state[-1].yy_nxt;" );

	else if ( fulltbl )
		indent_puts( "yy_act = yy_accept[yy_current_state];" );

	else if ( reject )
		{
		indent_puts( "yy_current_state = *--yy_state_ptr;" );
		indent_puts( "yy_lp = yy_accept[yy_current_state];" );

		outn(
		"find_rule: /* we branch to this label when backing up */" );

		indent_puts(
		"for ( ; ; ) /* until we find what rule we matched */" );

		indent_up();

		indent_puts( "{" );

		indent_puts(
		"if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )" );
		indent_up();
		indent_puts( "{" );
		indent_puts( "yy_act = yy_acclist[yy_lp];" );

		if ( variable_trailing_context_rules )
			{
			indent_puts( "if ( yy_act & YY_TRAILING_HEAD_MASK ||" );
			indent_puts( "     yy_looking_for_trail_begin )" );
			indent_up();
			indent_puts( "{" );

			indent_puts(
				"if ( yy_act == yy_looking_for_trail_begin )" );
			indent_up();
			indent_puts( "{" );
			indent_puts( "yy_looking_for_trail_begin = 0;" );
			indent_puts( "yy_act &= ~YY_TRAILING_HEAD_MASK;" );
			indent_puts( "break;" );
			indent_puts( "}" );
			indent_down();

			indent_puts( "}" );
			indent_down();

			indent_puts( "else if ( yy_act & YY_TRAILING_MASK )" );
			indent_up();
			indent_puts( "{" );
			indent_puts(
		"yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;" );
			indent_puts(
		"yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;" );

			if ( real_reject )
				{
				/* Remember matched text in case we back up
				 * due to REJECT.
				 */
				indent_puts( "yy_full_match = yy_cp;" );
				indent_puts( "yy_full_state = yy_state_ptr;" );
				indent_puts( "yy_full_lp = yy_lp;" );
				}

			indent_puts( "}" );
			indent_down();

			indent_puts( "else" );
			indent_up();
			indent_puts( "{" );
			indent_puts( "yy_full_match = yy_cp;" );
			indent_puts( "yy_full_state = yy_state_ptr;" );
			indent_puts( "yy_full_lp = yy_lp;" );
			indent_puts( "break;" );
			indent_puts( "}" );
			indent_down();

			indent_puts( "++yy_lp;" );
			indent_puts( "goto find_rule;" );
			}

		else
			{
			/* Remember matched text in case we back up due to
			 * trailing context plus REJECT.
			 */
			indent_up();
			indent_puts( "{" );
			indent_puts( "yy_full_match = yy_cp;" );
			indent_puts( "break;" );
			indent_puts( "}" );
			indent_down();
			}

		indent_puts( "}" );
		indent_down();

		indent_puts( "--yy_cp;" );

		/* We could consolidate the following two lines with those at
		 * the beginning, but at the cost of complaints that we're
		 * branching inside a loop.
		 */
		indent_puts( "yy_current_state = *--yy_state_ptr;" );
		indent_puts( "yy_lp = yy_accept[yy_current_state];" );

		indent_puts( "}" );

		indent_down();
		}

	else
		{ /* compressed */
		indent_puts( "yy_act = yy_accept[yy_current_state];" );

		if ( interactive && ! reject )
			{
			/* Do the guaranteed-needed backing up to figure out
			 * the match.
			 */
			indent_puts( "if ( yy_act == 0 )" );
			indent_up();
			indent_puts( "{ /* have to back up */" );
			indent_puts( "yy_cp = yy_last_accepting_cpos;" );
			indent_puts(
				"yy_current_state = yy_last_accepting_state;" );
			indent_puts( "yy_act = yy_accept[yy_current_state];" );
			indent_puts( "}" );
			indent_down();
			}
		}
	}


/* genftbl - generate full transition table */

void genftbl()
	{
	register int i;
	int end_of_buffer_action = num_rules + 1;

	out_str_dec( long_align ? C_long_decl : C_short_decl,
		"yy_accept", lastdfa + 1 );

	dfaacc[end_of_buffer_state].dfaacc_state = end_of_buffer_action;

	for ( i = 1; i <= lastdfa; ++i )
		{
		register int anum = dfaacc[i].dfaacc_state;

		mkdata( anum );

		if ( trace && anum )
			fprintf( stderr, _( "state # %d accepts: [%d]\n" ),
				i, anum );
		}

	dataend();

	if ( useecs )
		genecs();

	/* Don't have to dump the actual full table entries - they were
	 * created on-the-fly.
	 */
	}


/* Generate the code to find the next compressed-table state. */

void gen_next_compressed_state( char_map )
char *char_map;
	{
	indent_put2s( "register YY_CHAR yy_c = %s;", char_map );

	/* Save the backing-up info \before/ computing the next state
	 * because we always compute one more state than needed - we
	 * always proceed until we reach a jam state
	 */
	gen_backing_up();

	indent_puts(
"while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )" );
	indent_up();
	indent_puts( "{" );
	indent_puts( "yy_current_state = (int) yy_def[yy_current_state];" );

	if ( usemecs )
		{
		/* We've arrange it so that templates are never chained
		 * to one another.  This means we can afford to make a
		 * very simple test to see if we need to convert to
		 * yy_c's meta-equivalence class without worrying
		 * about erroneously looking up the meta-equivalence
		 * class twice
		 */
		do_indent();

		/* lastdfa + 2 is the beginning of the templates */
		out_dec( "if ( yy_current_state >= %d )\n", lastdfa + 2 );

		indent_up();
		indent_puts( "yy_c = yy_meta[(unsigned int) yy_c];" );
		indent_down();
		}

	indent_puts( "}" );
	indent_down();

	indent_puts(
"yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];" );
	}


/* Generate the code to find the next match. */

void gen_next_match()
	{
	/* NOTE - changes in here should be reflected in gen_next_state() and
	 * gen_NUL_trans().
	 */
	char *char_map = useecs ?
				"yy_ec[YY_SC_TO_UI(*yy_cp)]" :
				"YY_SC_TO_UI(*yy_cp)";

	char *char_map_2 = useecs ?
				"yy_ec[YY_SC_TO_UI(*++yy_cp)]" :
				"YY_SC_TO_UI(*++yy_cp)";

	if ( fulltbl )
		{
		indent_put2s(
	"while ( (yy_current_state = yy_nxt[yy_current_state][%s]) > 0 )",
				char_map );

		indent_up();

		if ( num_backing_up > 0 )
			{
			indent_puts( "{" );	/* } for vi */
			gen_backing_up();
			outc( '\n' );
			}

		indent_puts( "++yy_cp;" );

		if ( num_backing_up > 0 )
			/* { for vi */
			indent_puts( "}" );

		indent_down();

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美aaaaa成人免费观看视频| 麻豆视频一区二区| 日韩一区二区三区视频在线 | 国产精品影音先锋| 一区二区三区精品| 国产色产综合产在线视频| 欧美午夜理伦三级在线观看| 国产不卡一区视频| 卡一卡二国产精品| 亚洲成av人**亚洲成av**| 国产精品天美传媒沈樵| 日韩精品在线看片z| 欧美午夜电影网| 成人激情校园春色| 国产一区二区精品久久91| 午夜视频一区二区三区| 国产精品久久三| 久久久久久亚洲综合影院红桃| 91麻豆精品国产自产在线观看一区 | 久久久国产一区二区三区四区小说 | 日韩精品一区在线观看| 欧美三级三级三级| 日本高清视频一区二区| av中文字幕不卡| 成人免费毛片嘿嘿连载视频| 国产自产v一区二区三区c| 日本亚洲电影天堂| 天天影视色香欲综合网老头| 亚洲自拍偷拍麻豆| 亚洲一区在线电影| 一级精品视频在线观看宜春院 | 久久国产欧美日韩精品| 亚洲精品成人天堂一二三| 精品第一国产综合精品aⅴ| 蜜桃91丨九色丨蝌蚪91桃色| 美女看a上一区| 亚洲精品一区二区三区在线观看| 欧美日韩午夜在线视频| 在线观看日韩电影| 久久久高清一区二区三区| 日本一区二区三区在线观看| 91麻豆精品秘密| 国产伦精一区二区三区| 日本亚洲欧美天堂免费| 日本不卡在线视频| 看国产成人h片视频| 精品一区二区三区免费观看| 国内久久婷婷综合| 欧美男女性生活在线直播观看| 精品在线免费视频| 久久成人精品无人区| 青青草精品视频| 毛片av一区二区| 国产一区二三区| 成人av在线资源网| 色就色 综合激情| 欧美一区二区三区色| 亚洲精品在线免费播放| 欧美成人r级一区二区三区| 日韩精品一区二区三区四区视频 | 亚洲午夜精品在线| 亚洲一区二区欧美日韩| 蜜臀精品久久久久久蜜臀| 国产在线视频一区二区三区| 国产成人精品一区二区三区网站观看| 成人h精品动漫一区二区三区| 波波电影院一区二区三区| 日本高清不卡在线观看| 日韩一级完整毛片| 国产亲近乱来精品视频| 亚洲一区二区黄色| 国产一区二区精品久久99| 91麻豆免费视频| 欧美电视剧免费观看| 国产精品夫妻自拍| 日韩电影在线一区二区三区| 国产精品18久久久久久久久久久久 | 亚洲一区二区三区中文字幕在线 | 91在线观看高清| 宅男在线国产精品| 欧美国产日韩一二三区| 亚洲成人www| 国产99久久久精品| 欧美电影一区二区三区| 国产日韩精品一区二区三区| 亚洲高清免费观看| 懂色av一区二区三区免费观看| 欧美色视频一区| 国产亚洲成aⅴ人片在线观看 | 精一区二区三区| 色伊人久久综合中文字幕| 精品久久久久久久久久久久久久久久久| 欧美国产欧美亚州国产日韩mv天天看完整 | 欧美高清dvd| 国产精品国产三级国产有无不卡| 亚洲不卡在线观看| 成人激情午夜影院| 精品国产一二三| 亚洲成av人片在线观看| 不卡影院免费观看| 久久久久久影视| 蜜臀av一级做a爰片久久| 91福利国产精品| 中文字幕av免费专区久久| 久久er精品视频| 制服丝袜国产精品| 亚洲自拍都市欧美小说| av电影一区二区| 国产亚洲一区二区三区在线观看 | 国产欧美日韩综合| 日本sm残虐另类| 欧美色爱综合网| 亚洲美女区一区| av亚洲精华国产精华精华| 久久久777精品电影网影网| 图片区小说区区亚洲影院| 在线观看亚洲专区| 久久精品视频一区| 91毛片在线观看| 亚洲摸摸操操av| 国产精品一区二区在线播放| 欧美一区二区三区在| 亚洲成人av中文| 91福利国产精品| 亚洲免费观看高清在线观看| 99久久久久久| 亚洲欧洲美洲综合色网| 成人综合婷婷国产精品久久蜜臀 | 欧美亚日韩国产aⅴ精品中极品| 国产a精品视频| 亚洲免费观看视频| 在线国产亚洲欧美| 国产乱码精品一区二区三 | 97久久精品人人澡人人爽| 欧美精品黑人性xxxx| 夜夜爽夜夜爽精品视频| 91在线丨porny丨国产| 国产精品久久毛片| 成人自拍视频在线| 久久免费精品国产久精品久久久久| 久久电影网电视剧免费观看| 日韩一区二区在线播放| 九一九一国产精品| 国产亚洲综合av| 成人午夜电影久久影院| 中文字幕欧美国产| 91日韩精品一区| 亚洲小少妇裸体bbw| 欧美久久久久久蜜桃| 蜜桃精品在线观看| 国产偷国产偷亚洲高清人白洁| 成人激情动漫在线观看| 自拍偷拍欧美精品| 欧美日韩精品系列| 久久精品国产99久久6| 国产午夜精品福利| 91热门视频在线观看| 天天综合色天天综合| 精品国产一区二区精华| 成人激情开心网| 亚洲va在线va天堂| 精品国产乱码久久久久久久| 成人h精品动漫一区二区三区| 一级特黄大欧美久久久| 久久99久久久久| 成人黄色网址在线观看| 自拍偷拍欧美精品| 884aa四虎影成人精品一区| 美脚の诱脚舐め脚责91 | 曰韩精品一区二区| 欧美狂野另类xxxxoooo| 韩国v欧美v日本v亚洲v| 亚洲欧洲精品一区二区三区 | 久久国产夜色精品鲁鲁99| 久久九九全国免费| 色就色 综合激情| 精品影视av免费| 国产精品毛片久久久久久| 色吊一区二区三区| 美腿丝袜一区二区三区| 国产精品久久久久久户外露出 | 欧美老女人在线| 国产一区二区三区免费| 夜夜嗨av一区二区三区中文字幕| 欧美一区二区视频网站| 国产成人综合在线播放| 亚洲一卡二卡三卡四卡五卡| 久久综合狠狠综合久久激情 | 一区二区三区在线看| 这里只有精品免费| 91在线视频在线| 国产一区二区三区四区五区美女| 亚洲综合久久av| 国产精品人人做人人爽人人添| 在线不卡的av| 91蜜桃网址入口| 国产一区二区精品久久91| 午夜影院久久久| 成人免费在线观看入口| 欧美精品一区视频|