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

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

?? nfa.c

?? C++版 詞法分析、語法分析器
?? C
?? 第 1 頁 / 共 2 頁
字號:
 *
 *     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
	{
	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
 *
 * synopsis
 *
 *   new_rule();
 *
 * the global num_rules is incremented and the any corresponding dynamic
 * arrays (such as rule_type[]) are grown as needed.
 */

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 );
	}

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

    rule_linenum[num_rules] = linenum;
    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产色一区二区| 亚洲第一二三四区| 国产成人综合网| 久久亚洲春色中文字幕久久久| 久久精品噜噜噜成人av农村| 日韩一区二区三区免费看| 免费日本视频一区| 精品av久久707| 成人免费福利片| 亚洲与欧洲av电影| 正在播放亚洲一区| 国产伦精品一区二区三区免费迷 | 丝袜美腿亚洲一区二区图片| 51午夜精品国产| 国产在线不卡一卡二卡三卡四卡| ww亚洲ww在线观看国产| 成人激情动漫在线观看| 亚洲国产综合视频在线观看| 在线播放91灌醉迷j高跟美女 | 欧美一级二级在线观看| 国产精品综合二区| 国产精品久久久久久久久晋中| 色综合久久久久久久久| 青青草97国产精品免费观看无弹窗版| 精品国产乱码久久久久久免费 | 亚洲一区欧美一区| 欧美成人猛片aaaaaaa| 成人综合婷婷国产精品久久 | 欧美国产精品中文字幕| 欧美三区在线观看| 国产精品羞羞答答xxdd| 亚洲国产成人va在线观看天堂| 日韩欧美第一区| 91麻豆文化传媒在线观看| 久久国产精品区| 中文字幕一区二区三区色视频| 欧美精品久久天天躁| 国产suv精品一区二区883| 亚洲国产精品视频| 国产精品毛片久久久久久| 91精品国产手机| 91香蕉国产在线观看软件| 久久成人羞羞网站| 亚洲午夜影视影院在线观看| 中国av一区二区三区| 在线91免费看| 欧美在线一区二区| 国产成人av一区| 久久精品国产免费看久久精品| 亚洲欧美激情小说另类| 久久精品夜夜夜夜久久| 日韩欧美国产精品一区| 一本久道中文字幕精品亚洲嫩| 亚洲电影一区二区三区| 欧美怡红院视频| 欧美视频一区二区三区在线观看 | 国产在线播放一区| 色综合欧美在线| 国产精品一区二区久久不卡| 午夜精品视频在线观看| 国产精品久久久久永久免费观看 | 一区二区三区精密机械公司| 国产日韩欧美制服另类| 日韩久久精品一区| 欧美日韩国产电影| 色综合咪咪久久| 麻豆91小视频| 欧美日韩精品欧美日韩精品一 | 欧美一级日韩不卡播放免费| 91视视频在线观看入口直接观看www| 毛片一区二区三区| 日韩电影在线观看网站| 午夜精品aaa| 亚洲第一成人在线| 亚洲一二三区不卡| 一区二区免费看| 亚洲精品亚洲人成人网在线播放| 成人欧美一区二区三区在线播放| 国产日韩欧美在线一区| www成人在线观看| 久久日一线二线三线suv| 久久久久国产精品厨房| 国产日韩v精品一区二区| 久久久久9999亚洲精品| 国产人成一区二区三区影院| 国产色婷婷亚洲99精品小说| 中文字幕不卡在线| 国产欧美一区二区在线观看| 国产欧美精品一区aⅴ影院| 91蜜桃传媒精品久久久一区二区| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 欧美激情在线一区二区| 国产精品日日摸夜夜摸av| 国产精品久久久爽爽爽麻豆色哟哟| 欧美国产国产综合| 亚洲人一二三区| 亚洲成在人线免费| 免费久久精品视频| 国产福利电影一区二区三区| www.色精品| 欧美日韩综合在线免费观看| 91精品久久久久久久99蜜桃| 久久亚洲精精品中文字幕早川悠里| 国产精品污污网站在线观看| 亚洲黄色免费网站| 天天操天天综合网| 国产一区二区三区免费| 成人毛片视频在线观看| 欧美丝袜丝交足nylons图片| 欧美一区二区在线看| 久久精品欧美一区二区三区不卡| 欧美日韩久久不卡| 99国产精品久久久久久久久久 | 粉嫩一区二区三区在线看| jlzzjlzz国产精品久久| 欧美精品一二三四| 国产偷国产偷精品高清尤物| 一区二区三区四区高清精品免费观看| 亚洲bt欧美bt精品| 国产成人av在线影院| 在线观看欧美精品| 久久午夜国产精品| 五月天视频一区| 不卡欧美aaaaa| 8x福利精品第一导航| 欧美精彩视频一区二区三区| 亚洲国产你懂的| bt欧美亚洲午夜电影天堂| 91 com成人网| 夜夜夜精品看看| 国产精品1024久久| 91精品在线一区二区| 自拍偷拍欧美激情| 激情五月婷婷综合| 欧美美女一区二区三区| 中文字幕国产一区| 久久99国产精品久久99果冻传媒| 色婷婷精品大在线视频| 精品国产1区2区3区| 亚洲国产欧美在线人成| 国产suv一区二区三区88区| 欧美大片在线观看一区二区| 一区二区三区日韩精品| 成人网在线免费视频| 久久精品亚洲麻豆av一区二区| 97久久精品人人做人人爽50路| 久久伊99综合婷婷久久伊| 午夜精品成人在线| 91麻豆成人久久精品二区三区| 久久中文娱乐网| 蜜臀久久99精品久久久画质超高清| 91欧美激情一区二区三区成人| 日韩av在线播放中文字幕| 色香蕉久久蜜桃| 国产精品国产三级国产a| 国产精品99久久久久久有的能看| 日韩欧美一二三| 日一区二区三区| 欧美唯美清纯偷拍| 一区二区三区在线视频观看58| 成人免费观看av| 国产精品欧美综合在线| 国产精品自拍在线| 久久久久亚洲综合| 韩国女主播一区二区三区| 精品少妇一区二区三区日产乱码| 天天免费综合色| 在线播放一区二区三区| 亚洲成a人片在线观看中文| 欧美日韩视频在线观看一区二区三区| 亚洲激情网站免费观看| 一本色道**综合亚洲精品蜜桃冫| 亚洲欧洲三级电影| 91麻豆swag| 亚洲午夜激情网页| 欧美日韩亚洲国产综合| 奇米影视一区二区三区| 精品免费视频.| 国产成人精品一区二| 国产精品美女久久久久久久久久久 | 国产视频在线观看一区二区三区| 丰满少妇久久久久久久| 国产精品―色哟哟| 色综合天天综合网国产成人综合天 | 91黄色在线观看| 午夜精品久久久久久久久久 | 久久综合国产精品| 国产成人午夜高潮毛片| 亚洲色图在线看| 欧美日韩高清一区二区不卡| 蜜桃久久av一区| 视频一区二区三区入口| www国产成人免费观看视频 深夜成人网 | 在线精品视频免费播放| 日本在线不卡一区| 国产精品丝袜黑色高跟| 欧美伊人久久久久久久久影院 | 亚洲一区二区三区四区不卡| 日韩欧美激情四射| www.亚洲在线|