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

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

?? tblcmp.c

?? flex 詞法分析工具 類似于lex 此版本為較早前的版本
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* tblcmp - table compression routines *//*- * 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 with or without * modification 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/tblcmp.c,v 2.11 94/11/05 17:08:28 vern Exp $ */#include "flexdef.h"/* declarations for functions that have forward references */void mkentry PROTO((register int*, int, int, int, int));void mkprot PROTO((int[], int, int));void mktemplate PROTO((int[], int, int));void mv2front PROTO((int));int tbldiff PROTO((int[], int, int[]));/* bldtbl - build table entries for dfa state * * synopsis *   int state[numecs], statenum, totaltrans, comstate, comfreq; *   bldtbl( state, statenum, totaltrans, comstate, comfreq ); * * State is the statenum'th dfa state.  It is indexed by equivalence class and * gives the number of the state to enter for a given equivalence class. * totaltrans is the total number of transitions out of the state.  Comstate * is that state which is the destination of the most transitions out of State. * Comfreq is how many transitions there are out of State to Comstate. * * A note on terminology: *    "protos" are transition tables which have a high probability of * either being redundant (a state processed later will have an identical * transition table) or nearly redundant (a state processed later will have * many of the same out-transitions).  A "most recently used" queue of * protos is kept around with the hope that most states will find a proto * which is similar enough to be usable, and therefore compacting the * output tables. *    "templates" are a special type of proto.  If a transition table is * homogeneous or nearly homogeneous (all transitions go to the same * destination) then the odds are good that future states will also go * to the same destination state on basically the same character set. * These homogeneous states are so common when dealing with large rule * sets that they merit special attention.  If the transition table were * simply made into a proto, then (typically) each subsequent, similar * state will differ from the proto for two out-transitions.  One of these * out-transitions will be that character on which the proto does not go * to the common destination, and one will be that character on which the * state does not go to the common destination.  Templates, on the other * hand, go to the common state on EVERY transition character, and therefore * cost only one difference. */void bldtbl( state, statenum, totaltrans, comstate, comfreq )int state[], statenum, totaltrans, comstate, comfreq;	{	int extptr, extrct[2][CSIZE + 1];	int mindiff, minprot, i, d;	/* If extptr is 0 then the first array of extrct holds the result	 * of the "best difference" to date, which is those transitions	 * which occur in "state" but not in the proto which, to date,	 * has the fewest differences between itself and "state".  If	 * extptr is 1 then the second array of extrct hold the best	 * difference.  The two arrays are toggled between so that the	 * best difference to date can be kept around and also a difference	 * just created by checking against a candidate "best" proto.	 */	extptr = 0;	/* If the state has too few out-transitions, don't bother trying to	 * compact its tables.	 */	if ( (totaltrans * 100) < (numecs * PROTO_SIZE_PERCENTAGE) )		mkentry( state, numecs, statenum, JAMSTATE, totaltrans );	else		{		/* "checkcom" is true if we should only check "state" against		 * protos which have the same "comstate" value.		 */		int checkcom =			comfreq * 100 > totaltrans * CHECK_COM_PERCENTAGE;		minprot = firstprot;		mindiff = totaltrans;		if ( checkcom )			{			/* Find first proto which has the same "comstate". */			for ( i = firstprot; i != NIL; i = protnext[i] )				if ( protcomst[i] == comstate )					{					minprot = i;					mindiff = tbldiff( state, minprot,							extrct[extptr] );					break;					}			}		else			{			/* Since we've decided that the most common destination			 * out of "state" does not occur with a high enough			 * frequency, we set the "comstate" to zero, assuring			 * that if this state is entered into the proto list,			 * it will not be considered a template.			 */			comstate = 0;			if ( firstprot != NIL )				{				minprot = firstprot;				mindiff = tbldiff( state, minprot,						extrct[extptr] );				}			}		/* We now have the first interesting proto in "minprot".  If		 * it matches within the tolerances set for the first proto,		 * we don't want to bother scanning the rest of the proto list		 * to see if we have any other reasonable matches.		 */		if ( mindiff * 100 > totaltrans * FIRST_MATCH_DIFF_PERCENTAGE )			{			/* Not a good enough match.  Scan the rest of the			 * protos.			 */			for ( i = minprot; i != NIL; i = protnext[i] )				{				d = tbldiff( state, i, extrct[1 - extptr] );				if ( d < mindiff )					{					extptr = 1 - extptr;					mindiff = d;					minprot = i;					}				}			}		/* Check if the proto we've decided on as our best bet is close		 * enough to the state we want to match to be usable.		 */		if ( mindiff * 100 > totaltrans * ACCEPTABLE_DIFF_PERCENTAGE )			{			/* No good.  If the state is homogeneous enough,			 * we make a template out of it.  Otherwise, we			 * make a proto.			 */			if ( comfreq * 100 >=			     totaltrans * TEMPLATE_SAME_PERCENTAGE )				mktemplate( state, statenum, comstate );			else				{				mkprot( state, statenum, comstate );				mkentry( state, numecs, statenum,					JAMSTATE, totaltrans );				}			}		else			{ /* use the proto */			mkentry( extrct[extptr], numecs, statenum,				prottbl[minprot], mindiff );			/* If this state was sufficiently different from the			 * proto we built it from, make it, too, a proto.			 */			if ( mindiff * 100 >=			     totaltrans * NEW_PROTO_DIFF_PERCENTAGE )				mkprot( state, statenum, comstate );			/* Since mkprot added a new proto to the proto queue,			 * it's possible that "minprot" is no longer on the			 * proto queue (if it happened to have been the last			 * entry, it would have been bumped off).  If it's			 * not there, then the new proto took its physical			 * place (though logically the new proto is at the			 * beginning of the queue), so in that case the			 * following call will do nothing.			 */			mv2front( minprot );			}		}	}/* cmptmps - compress template table entries * * Template tables are compressed by using the 'template equivalence * classes', which are collections of transition character equivalence * classes which always appear together in templates - really meta-equivalence * classes. */void cmptmps()	{	int tmpstorage[CSIZE + 1];	register int *tmp = tmpstorage, i, j;	int totaltrans, trans;	peakpairs = numtemps * numecs + tblend;	if ( usemecs )		{		/* Create equivalence classes based on data gathered on		 * template transitions.		 */		nummecs = cre8ecs( tecfwd, tecbck, numecs );		}	else		nummecs = numecs;	while ( lastdfa + numtemps + 1 >= current_max_dfas )		increase_max_dfas();	/* Loop through each template. */	for ( i = 1; i <= numtemps; ++i )		{		/* Number of non-jam transitions out of this template. */		totaltrans = 0;		for ( j = 1; j <= numecs; ++j )			{			trans = tnxt[numecs * i + j];			if ( usemecs )				{				/* The absolute value of tecbck is the				 * meta-equivalence class of a given				 * equivalence class, as set up by cre8ecs().				 */				if ( tecbck[j] > 0 )					{					tmp[tecbck[j]] = trans;					if ( trans > 0 )						++totaltrans;					}				}			else				{				tmp[j] = trans;				if ( trans > 0 )					++totaltrans;				}			}		/* It is assumed (in a rather subtle way) in the skeleton		 * that if we're using meta-equivalence classes, the def[]		 * entry for all templates is the jam template, i.e.,		 * templates never default to other non-jam table entries		 * (e.g., another template)		 */		/* Leave room for the jam-state after the last real state. */		mkentry( tmp, nummecs, lastdfa + i + 1, JAMSTATE, totaltrans );		}	}/* expand_nxt_chk - expand the next check arrays */void expand_nxt_chk()	{	register int old_max = current_max_xpairs;	current_max_xpairs += MAX_XPAIRS_INCREMENT;	++num_reallocs;	nxt = reallocate_integer_array( nxt, current_max_xpairs );	chk = reallocate_integer_array( chk, current_max_xpairs );	zero_out( (char *) (chk + old_max),		(size_t) (MAX_XPAIRS_INCREMENT * sizeof( int )) );	}/* find_table_space - finds a space in the table for a state to be placed * * synopsis *     int *state, numtrans, block_start; *     int find_table_space(); * *     block_start = find_table_space( state, numtrans ); * * State is the state to be added to the full speed transition table. * Numtrans is the number of out-transitions for the state. * * find_table_space() returns the position of the start of the first block (in * chk) able to accommodate the state * * In determining if a state will or will not fit, find_table_space() must take * into account the fact that an end-of-buffer state will be added at [0], * and an action number will be added in [-1]. */int find_table_space( state, numtrans )int *state, numtrans;	{	/* Firstfree is the position of the first possible occurrence of two	 * consecutive unused records in the chk and nxt arrays.	 */	register int i;	register int *state_ptr, *chk_ptr;	register int *ptr_to_last_entry_in_state;	/* If there are too many out-transitions, put the state at the end of	 * nxt and chk.	 */	if ( numtrans > MAX_XTIONS_FULL_INTERIOR_FIT )		{		/* If table is empty, return the first available spot in		 * chk/nxt, which should be 1.		 */		if ( tblend < 2 )			return 1;		/* Start searching for table space near the end of		 * chk/nxt arrays.		 */		i = tblend - numecs;		}	else		/* Start searching for table space from the beginning		 * (skipping only the elements which will definitely not		 * hold the new state).		 */		i = firstfree;	while ( 1 )	/* loops until a space is found */		{		while ( i + numecs >= current_max_xpairs )			expand_nxt_chk();		/* Loops until space for end-of-buffer and action number		 * are found.		 */		while ( 1 )			{			/* Check for action number space. */			if ( chk[i - 1] == 0 )				{				/* Check for end-of-buffer space. */				if ( chk[i] == 0 )					break;				else					/* Since i != 0, there is no use					 * checking to see if (++i) - 1 == 0,					 * because that's the same as i == 0,					 * so we skip a space.					 */					i += 2;				}			else				++i;			while ( i + numecs >= current_max_xpairs )				expand_nxt_chk();			}		/* If we started search from the beginning, store the new		 * firstfree for the next call of find_table_space().		 */		if ( numtrans <= MAX_XTIONS_FULL_INTERIOR_FIT )			firstfree = i + 1;		/* Check to see if all elements in chk (and therefore nxt)		 * that are needed for the new state have not yet been taken.		 */		state_ptr = &state[1];		ptr_to_last_entry_in_state = &chk[i + numecs + 1];		for ( chk_ptr = &chk[i + 1];		      chk_ptr != ptr_to_last_entry_in_state; ++chk_ptr )			if ( *(state_ptr++) != 0 && *chk_ptr != 0 )				break;		if ( chk_ptr == ptr_to_last_entry_in_state )			return i;		else		++i;		}	}/* inittbl - initialize transition tables * * Initializes "firstfree" to be one beyond the end of the table.  Initializes * all "chk" entries to be zero. */void inittbl()	{	register int i;	zero_out( (char *) chk, (size_t) (current_max_xpairs * sizeof( int )) );	tblend = 0;	firstfree = tblend + 1;	numtemps = 0;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久久久久久久久久免费看 | 日韩伦理免费电影| 日韩久久免费av| 91精品国产麻豆国产自产在线 | 亚洲成人av免费| 一区二区三区蜜桃| 一区二区三区日韩欧美| 亚洲乱码国产乱码精品精的特点 | 色综合中文字幕| 91免费国产视频网站| 色激情天天射综合网| 欧美午夜片在线看| 欧美日韩一级二级| 欧美日高清视频| 欧美精品三级日韩久久| 国产黄色精品视频| 亚洲精品成人少妇| 久久久无码精品亚洲日韩按摩| 欧美日韩精品欧美日韩精品一综合| 国产a区久久久| 国产精品1区二区.| 成人激情图片网| 91在线云播放| 在线亚洲一区二区| 成人av先锋影音| 久久精品国产第一区二区三区| 久久99这里只有精品| 国产精品1区二区.| jlzzjlzz国产精品久久| 91小视频在线观看| 欧美亚洲尤物久久| 精品日本一线二线三线不卡| 欧美精品一二三| 欧美少妇bbb| 日韩精品一区二区三区中文精品| 久久精品综合网| 亚洲欧美另类综合偷拍| 亚洲成人你懂的| 精品综合久久久久久8888| 国产一区二区三区蝌蚪| 99re这里只有精品首页| 99久久精品久久久久久清纯| 97超碰欧美中文字幕| 制服丝袜成人动漫| 欧美国产综合色视频| 夜夜嗨av一区二区三区| 日本成人中文字幕在线视频| 国产精品18久久久久久久久久久久 | 久久久五月婷婷| 一区二区三区**美女毛片| 日本特黄久久久高潮| 粉嫩av一区二区三区在线播放| 91小宝寻花一区二区三区| 欧美夫妻性生活| 国产精品无人区| 亚洲国产综合在线| 国产精品一区二区在线观看不卡 | 欧美影院精品一区| 久久综合色天天久久综合图片| 国产精品国产三级国产普通话99| 日韩电影在线观看电影| caoporn国产一区二区| 日韩欧美国产一区在线观看| 国产精品盗摄一区二区三区| 玖玖九九国产精品| 欧美偷拍一区二区| 一区精品在线播放| 国产剧情一区二区| 欧美日韩一区二区在线视频| 中文字幕第一区第二区| 免费观看日韩电影| 欧美日韩精品三区| 一区二区三区四区不卡在线| 懂色av一区二区夜夜嗨| 日韩精品影音先锋| 日本成人在线视频网站| 欧美日韩在线播放三区四区| 国产精品国产三级国产aⅴ无密码| 日韩精品成人一区二区三区 | 亚洲伦在线观看| 福利一区二区在线| 久久综合九色综合欧美98| 美腿丝袜亚洲一区| 欧美日韩大陆在线| 中文幕一区二区三区久久蜜桃| 午夜免费久久看| caoporn国产精品| 欧美国产精品久久| 亚洲综合一二区| 国产精品一区二区视频| 精品精品国产高清a毛片牛牛| 日韩精品欧美精品| 欧美一区二区三区在线视频| 天天影视网天天综合色在线播放| 欧美日韩三级视频| 国产在线精品免费| 日韩亚洲欧美在线观看| 天堂av在线一区| 91国产视频在线观看| 婷婷一区二区三区| 精品少妇一区二区| 国产一区二区导航在线播放| 日韩精品一区二区在线| 韩国成人精品a∨在线观看| 久久久三级国产网站| 成人黄色在线视频| 一区二区三区影院| 91精品在线观看入口| 久久99国产精品久久99果冻传媒| 精品久久久久久无| 国产一区二区美女诱惑| 亚洲青青青在线视频| 91麻豆精品国产| 成人综合婷婷国产精品久久蜜臀| 国产精品久久久久久久午夜片| 91视频你懂的| 日韩av电影免费观看高清完整版| 精品嫩草影院久久| 一本一道波多野结衣一区二区| 亚洲电影一级片| 欧美大片在线观看一区二区| 国产99久久精品| 图片区小说区国产精品视频| 国产校园另类小说区| 欧美系列在线观看| 九九九久久久精品| 国产精品人人做人人爽人人添| 激情亚洲综合在线| 欧美极品少妇xxxxⅹ高跟鞋| 欧美视频日韩视频在线观看| 国产精品伊人色| 婷婷中文字幕一区三区| 亚洲国产精品成人综合色在线婷婷| 欧美少妇一区二区| 成人免费黄色在线| 免费黄网站欧美| 亚洲精品福利视频网站| 亚洲国产激情av| 欧美一区二区视频在线观看| 成人av高清在线| 午夜精品视频在线观看| 亚洲另类色综合网站| 国产欧美日韩激情| 日韩美女在线视频| 欧美日韩高清不卡| 色综合天天综合给合国产| 国产黑丝在线一区二区三区| 偷拍日韩校园综合在线| 日韩三级.com| 国产成人精品免费看| eeuss影院一区二区三区 | 欧美一区午夜视频在线观看| 国产91综合网| 另类人妖一区二区av| 亚洲一二三四在线| 中文字幕一区二区三区色视频| 国产无一区二区| 精品国产青草久久久久福利| 在线观看91精品国产麻豆| 91无套直看片红桃| 91一区二区在线观看| 99久久精品一区| 99久久99久久久精品齐齐| 日本伊人色综合网| 亚洲成人激情自拍| 免费观看日韩电影| 老色鬼精品视频在线观看播放| 日本系列欧美系列| 久久疯狂做爰流白浆xx| 九九精品视频在线看| 国产一区二区在线视频| 国产一区欧美日韩| 丁香六月综合激情| 成人久久视频在线观看| 成人av免费在线播放| 色婷婷综合久久久| 在线免费精品视频| 99re8在线精品视频免费播放| 国产乱子伦视频一区二区三区 | 综合欧美一区二区三区| 日韩理论在线观看| 亚洲综合色区另类av| 中文字幕在线不卡国产视频| 国产三级精品在线| 国产精品色哟哟| 亚洲一区免费在线观看| 午夜激情综合网| 极品尤物av久久免费看| 国产精品996| 91国产精品成人| 91精品国产麻豆国产自产在线 | 欧美精品久久久久久久久老牛影院| 欧美日韩亚洲综合一区| 91精品国产一区二区| 欧美精品一区二区三区蜜桃视频 | 激情综合一区二区三区| 国产.欧美.日韩| 欧美三区在线视频| 亚洲欧美另类久久久精品| 亚洲成av人综合在线观看|