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

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

?? nfa.c

?? 編譯原理(Flex):生成詞法和語法分析程序的源代碼的程序。
?? C
?? 第 1 頁 / 共 2 頁
字號:
 *
 *   branch = mkbranch( first, second );
 *
 *     branch - a machine which matches either first's pattern or second's
 *     first, second - machines whose patterns are to be or'ed (the | operator)
 *
 * Note that first and second are NEITHER destroyed by the operation.  Also,
 * the resulting machine CANNOT be used with any other "mk" operation except
 * more mkbranch's.  Compare with mkor()
 */

int mkbranch( first, second )
int first, second;
	{
	int eps;

	if ( first == NO_TRANSITION )
		return second;

	else if ( second == NO_TRANSITION )
		return first;

	eps = mkstate( SYM_EPSILON );

	mkxtion( eps, first );
	mkxtion( eps, second );

	return eps;
	}


/* mkclos - convert a machine into a closure
 *
 * synopsis
 *   new = mkclos( state );
 *
 * new - a new state which matches the closure of "state"
 */

int mkclos( state )
int state;
	{
	return mkopt( mkposcl( state ) );
	}


/* mkopt - make a machine optional
 *
 * synopsis
 *
 *   new = mkopt( mach );
 *
 *     new  - a machine which optionally matches whatever mach matched
 *     mach - the machine to make optional
 *
 * notes:
 *     1. mach must be the last machine created
 *     2. mach is destroyed by the call
 */

int mkopt( mach )
int mach;
	{
	int eps;

	if ( ! SUPER_FREE_EPSILON(finalst[mach]) )
		{
		eps = mkstate( SYM_EPSILON );
		mach = link_machines( mach, eps );
		}

	/* Can't skimp on the following if FREE_EPSILON(mach) is true because
	 * some state interior to "mach" might point back to the beginning
	 * for a closure.
	 */
	eps = mkstate( SYM_EPSILON );
	mach = link_machines( eps, mach );

	mkxtion( mach, finalst[mach] );

	return mach;
	}


/* mkor - make a machine that matches either one of two machines
 *
 * synopsis
 *
 *   new = mkor( first, second );
 *
 *     new - a machine which matches either first's pattern or second's
 *     first, second - machines whose patterns are to be or'ed (the | operator)
 *
 * note that first and second are both destroyed by the operation
 * the code is rather convoluted because an attempt is made to minimize
 * the number of epsilon states needed
 */

int mkor( first, second )
int first, second;
	{
	int eps, orend;

	if ( first == NIL )
		return second;

	else if ( second == NIL )
		return first;

	else
		{
		/* See comment in mkopt() about why we can't use the first
		 * state of "first" or "second" if they satisfy "FREE_EPSILON".
		 */
		eps = mkstate( SYM_EPSILON );

		first = link_machines( eps, first );

		mkxtion( first, second );

		if ( SUPER_FREE_EPSILON(finalst[first]) &&
		     accptnum[finalst[first]] == NIL )
			{
			orend = finalst[first];
			mkxtion( finalst[second], orend );
			}

		else if ( SUPER_FREE_EPSILON(finalst[second]) &&
			  accptnum[finalst[second]] == NIL )
			{
			orend = finalst[second];
			mkxtion( finalst[first], orend );
			}

		else
			{
			eps = mkstate( SYM_EPSILON );

			first = link_machines( first, eps );
			orend = finalst[first];

			mkxtion( finalst[second], orend );
			}
		}

	finalst[first] = orend;
	return first;
	}


/* mkposcl - convert a machine into a positive closure
 *
 * synopsis
 *   new = mkposcl( state );
 *
 *    new - a machine matching the positive closure of "state"
 */

int mkposcl( state )
int state;
	{
	int eps;

	if ( SUPER_FREE_EPSILON(finalst[state]) )
		{
		mkxtion( finalst[state], state );
		return state;
		}

	else
		{
		eps = mkstate( SYM_EPSILON );
		mkxtion( eps, state );
		return link_machines( state, eps );
		}
	}


/* mkrep - make a replicated machine
 *
 * synopsis
 *   new = mkrep( mach, lb, ub );
 *
 *    new - a machine that matches whatever "mach" matched from "lb"
 *          number of times to "ub" number of times
 *
 * note
 *   if "ub" is INFINITY then "new" matches "lb" or more occurrences of "mach"
 */

int mkrep( mach, lb, ub )
int mach, lb, ub;
	{
	int base_mach, tail, copy, i;

	base_mach = copysingl( mach, lb - 1 );

	if ( ub == INFINITY )
		{
		copy = dupmachine( mach );
		mach = link_machines( mach,
		link_machines( base_mach, mkclos( copy ) ) );
		}

	else
		{
		tail = mkstate( SYM_EPSILON );

		for ( i = lb; i < ub; ++i )
			{
			copy = dupmachine( mach );
			tail = mkopt( link_machines( copy, tail ) );
			}

		mach = link_machines( mach, link_machines( base_mach, tail ) );
		}

	return mach;
	}


/* mkstate - create a state with a transition on a given symbol
 *
 * synopsis
 *
 *   state = mkstate( sym );
 *
 *     state - a new state matching sym
 *     sym   - the symbol the new state is to have an out-transition on
 *
 * note that this routine makes new states in ascending order through the
 * state array (and increments LASTNFA accordingly).  The routine DUPMACHINE
 * relies on machines being made in ascending order and that they are
 * CONTIGUOUS.  Change it and you will have to rewrite DUPMACHINE (kludge
 * that it admittedly is)
 */

int mkstate( sym )
int sym;
	{
	if ( ++lastnfa >= current_mns )
		{
		if ( (current_mns += MNS_INCREMENT) >= MAXIMUM_MNS )
			lerrif(
		_( "input rules are too complicated (>= %d NFA states)" ),
				current_mns );

		++num_reallocs;

		firstst = reallocate_integer_array( firstst, current_mns );
		lastst = reallocate_integer_array( lastst, current_mns );
		finalst = reallocate_integer_array( finalst, current_mns );
		transchar = reallocate_integer_array( transchar, current_mns );
		trans1 = reallocate_integer_array( trans1, current_mns );
		trans2 = reallocate_integer_array( trans2, current_mns );
		accptnum = reallocate_integer_array( accptnum, current_mns );
		assoc_rule =
			reallocate_integer_array( assoc_rule, current_mns );
		state_type =
			reallocate_integer_array( state_type, current_mns );
		}

	firstst[lastnfa] = lastnfa;
	finalst[lastnfa] = lastnfa;
	lastst[lastnfa] = lastnfa;
	transchar[lastnfa] = sym;
	trans1[lastnfa] = NO_TRANSITION;
	trans2[lastnfa] = NO_TRANSITION;
	accptnum[lastnfa] = NIL;
	assoc_rule[lastnfa] = num_rules;
	state_type[lastnfa] = current_state_type;

	/* Fix up equivalence classes base on this transition.  Note that any
	 * character which has its own transition gets its own equivalence
	 * class.  Thus only characters which are only in character classes
	 * have a chance at being in the same equivalence class.  E.g. "a|b"
	 * puts 'a' and 'b' into two different equivalence classes.  "[ab]"
	 * puts them in the same equivalence class (barring other differences
	 * elsewhere in the input).
	 */

	if ( sym < 0 )
		{
		/* We don't have to update the equivalence classes since
		 * that was already done when the ccl was created for the
		 * first time.
		 */
		}

	else if ( sym == SYM_EPSILON )
		++numeps;

	else
		{
		check_char( sym );

		if ( useecs )
			/* Map NUL's to csize. */
			mkechar( sym ? sym : csize, nextecm, ecgroup );
		}

	return lastnfa;
	}


/* mkxtion - make a transition from one state to another
 *
 * synopsis
 *
 *   mkxtion( statefrom, stateto );
 *
 *     statefrom - the state from which the transition is to be made
 *     stateto   - the state to which the transition is to be made
 */

void mkxtion( statefrom, stateto )
int statefrom, stateto;
	{
	if ( trans1[statefrom] == NO_TRANSITION )
		trans1[statefrom] = stateto;

	else if ( (transchar[statefrom] != SYM_EPSILON) ||
		  (trans2[statefrom] != NO_TRANSITION) )
		flexfatal( _( "found too many transitions in mkxtion()" ) );

	else
		{ /* second out-transition for an epsilon state */
		++eps2;
		trans2[statefrom] = stateto;
		}
	}

/* new_rule - initialize for a new rule */

void new_rule()
	{
	if ( ++num_rules >= current_max_rules )
		{
		++num_reallocs;
		current_max_rules += MAX_RULES_INCREMENT;
		rule_type = reallocate_integer_array( rule_type,
							current_max_rules );
		rule_linenum = reallocate_integer_array( rule_linenum,
							current_max_rules );
		rule_useful = reallocate_integer_array( rule_useful,
							current_max_rules );
		}

	if ( num_rules > MAX_RULE )
		lerrif( _( "too many rules (> %d)!" ), MAX_RULE );

	rule_linenum[num_rules] = linenum;
	rule_useful[num_rules] = false;
	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产黄色精品视频| 99久久er热在这里只有精品66| 美女高潮久久久| 国产成人av一区| 欧美日韩中文字幕一区| 亚洲精品在线观看视频| 综合久久综合久久| 亚洲国产乱码最新视频| 韩国中文字幕2020精品| 色综合天天综合色综合av| 欧美一区二区久久久| 精品国产免费一区二区三区四区 | 亚洲国产精品成人综合色在线婷婷| 日韩毛片一二三区| 欧美aⅴ一区二区三区视频| 国产v日产∨综合v精品视频| 欧美色视频在线观看| 26uuu精品一区二区| 亚洲国产美国国产综合一区二区| 久久99最新地址| 精品婷婷伊人一区三区三| 91国产福利在线| 国产欧美一区视频| 日韩av网站免费在线| 色综合久久综合网| 欧美激情一二三区| 老司机午夜精品99久久| 欧美日韩国产高清一区| 日韩美女精品在线| 成人毛片在线观看| 久久久久久久综合| 久久精品国产999大香线蕉| 欧美日韩成人在线一区| 亚洲男人电影天堂| 国产精品综合在线视频| 日韩一区二区三区视频| 五月婷婷久久丁香| 欧美性极品少妇| 亚洲男帅同性gay1069| 国内偷窥港台综合视频在线播放| 欧美日韩中文字幕一区| 亚洲综合色噜噜狠狠| 91网站最新地址| 中文字幕日韩一区二区| 成人高清免费观看| 国产精品传媒在线| 99精品视频在线观看| 中文字幕欧美一区| 色综合天天综合| 久久久久久久久久电影| 蜜臀av一区二区在线观看| 91精品国产色综合久久| 免费一级片91| 日韩午夜av电影| 久久国产夜色精品鲁鲁99| 日韩精品一区二区三区三区免费| 日韩中文字幕1| 欧美三级日本三级少妇99| 午夜欧美在线一二页| 欧美日韩国产高清一区二区 | 国内精品嫩模私拍在线| 精品国产乱码久久久久久免费| 久久国产精品99精品国产 | 国产欧美一区二区精品久导航| 国产精一品亚洲二区在线视频| 91精品欧美一区二区三区综合在| 日韩福利电影在线观看| 日韩免费视频一区| 国产一区二区在线电影| 中文字幕欧美日韩一区| 成人午夜大片免费观看| 自拍av一区二区三区| 欧美日韩欧美一区二区| 久久99九九99精品| 中文字幕乱码一区二区免费| 国产大陆亚洲精品国产| 国产欧美一区二区在线| 日本久久电影网| 日韩av电影免费观看高清完整版在线观看| 91精品婷婷国产综合久久竹菊| 国产精品一区专区| 一区二区不卡在线播放| 日韩欧美一级特黄在线播放| 国产sm精品调教视频网站| 日韩理论片中文av| 97久久精品人人做人人爽50路 | 亚洲精品一区二区在线观看| 国产精品456| 国产精品乱码久久久久久| 欧美三级日韩三级国产三级| 日本欧美一区二区| 亚洲美女区一区| 久久青草国产手机看片福利盒子| 97se狠狠狠综合亚洲狠狠| 久久成人综合网| 亚洲免费观看在线观看| 日韩精品在线一区二区| 在线视频综合导航| 国产精品91xxx| 亚洲成精国产精品女| 亚洲欧美日韩一区二区三区在线观看 | 亚洲色图欧美偷拍| 久久久精品国产免大香伊| 91精品国产综合久久精品图片| 91在线免费视频观看| 国产成人免费在线观看不卡| 玖玖九九国产精品| 久久国产免费看| 看电视剧不卡顿的网站| 久久99精品久久久久久| 日韩高清电影一区| 日日摸夜夜添夜夜添国产精品| 一区二区激情视频| 亚洲精品成人天堂一二三| 亚洲精品中文字幕在线观看| 中文字幕中文乱码欧美一区二区| 国产欧美日韩激情| 国产日韩精品一区| 欧美韩国日本综合| 亚洲国产精品成人综合色在线婷婷| 久久久久亚洲综合| 欧美国产激情一区二区三区蜜月| 国产无一区二区| 国产精品拍天天在线| 成人免费在线观看入口| 一区二区免费在线| 日本v片在线高清不卡在线观看| 三级欧美在线一区| 九一九一国产精品| 国产精品资源在线| 99re在线视频这里只有精品| 在线观看欧美黄色| 日韩一区二区三区av| 精品久久国产老人久久综合| 国产午夜亚洲精品羞羞网站| 中文字幕中文在线不卡住| 亚洲综合色成人| 裸体歌舞表演一区二区| 丁香啪啪综合成人亚洲小说| 日本韩国精品在线| 在线电影院国产精品| 日韩精品最新网址| 中文字幕亚洲在| 日韩精品一二区| 国产麻豆精品95视频| 91视频国产观看| 日韩精品自拍偷拍| 亚洲欧美激情小说另类| 视频一区中文字幕国产| 国产成人精品一区二| 欧美视频在线一区二区三区 | 99久久精品久久久久久清纯| 欧美伊人久久大香线蕉综合69| 在线成人av网站| 国产精品久线观看视频| 日韩高清中文字幕一区| av电影一区二区| 欧美一区二区三区思思人| 国产精品久久久久久一区二区三区| 亚洲成人一区在线| 成人激情校园春色| 日韩欧美一级精品久久| 亚洲天堂成人在线观看| 久久国产精品99精品国产| 色悠久久久久综合欧美99| 久久在线观看免费| 天天操天天综合网| 91视频观看视频| 久久亚洲二区三区| 日精品一区二区| 99久久久免费精品国产一区二区| 欧美一区二区三区四区五区 | 欧美午夜精品电影| 国产精品久久久久久妇女6080| 日本伊人精品一区二区三区观看方式| 成人免费观看av| 精品理论电影在线观看| 亚洲第四色夜色| 91免费在线看| 欧美国产一区二区在线观看 | 日韩成人伦理电影在线观看| 97成人超碰视| 国产精品素人一区二区| 男男gaygay亚洲| 欧美日韩精品一区二区天天拍小说| 久久久www成人免费无遮挡大片| 午夜av电影一区| 日本丶国产丶欧美色综合| 国产精品免费久久| 国产麻豆精品在线观看| 日韩美女视频一区二区在线观看| 亚洲国产中文字幕| 欧美在线免费播放| 亚洲一区二区偷拍精品| av成人免费在线观看| 国产精品嫩草久久久久| 国产iv一区二区三区| 国产欧美日韩综合精品一区二区| 久久99国内精品| 精品久久久久久久久久久久久久久 |