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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? output.c

?? Berkeley的YACC詞法/語法分析器
?? C
?? 第 1 頁 / 共 2 頁
字號:
#include "defs.h"static int nvectors;static int nentries;static short **froms;static short **tos;static short *tally;static short *width;static short *state_count;static short *order;static short *base;static short *pos;static int maxtable;static short *table;static short *check;static int lowzero;static int high;output(){    free_itemsets();    free_shifts();    free_reductions();    output_prefix();    output_stored_text();    output_defines();    output_rule_data();    output_yydefred();    output_actions();    free_parser();    output_debug();    output_stype();    if (rflag) write_section(tables);    write_section(header);    output_trailing_text();    write_section(body);    output_semantic_actions();    write_section(trailer);}output_prefix(){    if (symbol_prefix == NULL)	symbol_prefix = "yy";    else    {	++outline;	fprintf(code_file, "#define yyparse %sparse\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yylex %slex\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yyerror %serror\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yychar %schar\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yyval %sval\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yylval %slval\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yydebug %sdebug\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yynerrs %snerrs\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yyerrflag %serrflag\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yyss %sss\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yyssp %sssp\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yyvs %svs\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yyvsp %svsp\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yylhs %slhs\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yylen %slen\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yydefred %sdefred\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yydgoto %sdgoto\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yysindex %ssindex\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yyrindex %srindex\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yygindex %sgindex\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yytable %stable\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yycheck %scheck\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yyname %sname\n", symbol_prefix);	++outline;	fprintf(code_file, "#define yyrule %srule\n", symbol_prefix);    }    ++outline;    fprintf(code_file, "#define YYPREFIX \"%s\"\n", symbol_prefix);}output_rule_data(){    register int i;    register int j;      fprintf(output_file, "short %slhs[] = {%42d,", symbol_prefix,	    symbol_value[start_symbol]);    j = 10;    for (i = 3; i < nrules; i++)    {	if (j >= 10)	{	    if (!rflag) ++outline;	    putc('\n', output_file);	    j = 1;	}        else	    ++j;        fprintf(output_file, "%5d,", symbol_value[rlhs[i]]);    }    if (!rflag) outline += 2;    fprintf(output_file, "\n};\n");    fprintf(output_file, "short %slen[] = {%42d,", symbol_prefix, 2);    j = 10;    for (i = 3; i < nrules; i++)    {	if (j >= 10)	{	    if (!rflag) ++outline;	    putc('\n', output_file);	    j = 1;	}	else	  j++;        fprintf(output_file, "%5d,", rrhs[i + 1] - rrhs[i] - 1);    }    if (!rflag) outline += 2;    fprintf(output_file, "\n};\n");}output_yydefred(){    register int i, j;    fprintf(output_file, "short %sdefred[] = {%39d,", symbol_prefix,	    (defred[0] ? defred[0] - 2 : 0));    j = 10;    for (i = 1; i < nstates; i++)    {	if (j < 10)	    ++j;	else	{	    if (!rflag) ++outline;	    putc('\n', output_file);	    j = 1;	}	fprintf(output_file, "%5d,", (defred[i] ? defred[i] - 2 : 0));    }    if (!rflag) outline += 2;    fprintf(output_file, "\n};\n");}output_actions(){    nvectors = 2*nstates + nvars;    froms = NEW2(nvectors, short *);    tos = NEW2(nvectors, short *);    tally = NEW2(nvectors, short);    width = NEW2(nvectors, short);    token_actions();    FREE(lookaheads);    FREE(LA);    FREE(LAruleno);    FREE(accessing_symbol);    goto_actions();    FREE(goto_map + ntokens);    FREE(from_state);    FREE(to_state);    sort_actions();    pack_table();    output_base();    output_table();    output_check();}token_actions(){    register int i, j;    register int shiftcount, reducecount;    register int max, min;    register short *actionrow, *r, *s;    register action *p;    actionrow = NEW2(2*ntokens, short);    for (i = 0; i < nstates; ++i)    {	if (parser[i])	{	    for (j = 0; j < 2*ntokens; ++j)	    actionrow[j] = 0;	    shiftcount = 0;	    reducecount = 0;	    for (p = parser[i]; p; p = p->next)	    {		if (p->suppressed == 0)		{		    if (p->action_code == SHIFT)		    {			++shiftcount;			actionrow[p->symbol] = p->number;		    }		    else if (p->action_code == REDUCE && p->number != defred[i])		    {			++reducecount;			actionrow[p->symbol + ntokens] = p->number;		    }		}	    }	    tally[i] = shiftcount;	    tally[nstates+i] = reducecount;	    width[i] = 0;	    width[nstates+i] = 0;	    if (shiftcount > 0)	    {		froms[i] = r = NEW2(shiftcount, short);		tos[i] = s = NEW2(shiftcount, short);		min = MAXSHORT;		max = 0;		for (j = 0; j < ntokens; ++j)		{		    if (actionrow[j])		    {			if (min > symbol_value[j])			    min = symbol_value[j];			if (max < symbol_value[j])			    max = symbol_value[j];			*r++ = symbol_value[j];			*s++ = actionrow[j];		    }		}		width[i] = max - min + 1;	    }	    if (reducecount > 0)	    {		froms[nstates+i] = r = NEW2(reducecount, short);		tos[nstates+i] = s = NEW2(reducecount, short);		min = MAXSHORT;		max = 0;		for (j = 0; j < ntokens; ++j)		{		    if (actionrow[ntokens+j])		    {			if (min > symbol_value[j])			    min = symbol_value[j];			if (max < symbol_value[j])			    max = symbol_value[j];			*r++ = symbol_value[j];			*s++ = actionrow[ntokens+j] - 2;		    }		}		width[nstates+i] = max - min + 1;	    }	}    }    FREE(actionrow);}goto_actions(){    register int i, j, k;    state_count = NEW2(nstates, short);    k = default_goto(start_symbol + 1);    fprintf(output_file, "short %sdgoto[] = {%40d,", symbol_prefix, k);    save_column(start_symbol + 1, k);    j = 10;    for (i = start_symbol + 2; i < nsyms; i++)    {	if (j >= 10)	{	    if (!rflag) ++outline;	    putc('\n', output_file);	    j = 1;	}	else	    ++j;	k = default_goto(i);	fprintf(output_file, "%5d,", k);	save_column(i, k);    }    if (!rflag) outline += 2;    fprintf(output_file, "\n};\n");    FREE(state_count);}intdefault_goto(symbol)int symbol;{    register int i;    register int m;    register int n;    register int default_state;    register int max;    m = goto_map[symbol];    n = goto_map[symbol + 1];    if (m == n) return (0);    for (i = 0; i < nstates; i++)	state_count[i] = 0;    for (i = m; i < n; i++)	state_count[to_state[i]]++;    max = 0;    default_state = 0;    for (i = 0; i < nstates; i++)    {	if (state_count[i] > max)	{	    max = state_count[i];	    default_state = i;	}    }    return (default_state);}save_column(symbol, default_state)int symbol;int default_state;{    register int i;    register int m;    register int n;    register short *sp;    register short *sp1;    register short *sp2;    register int count;    register int symno;    m = goto_map[symbol];    n = goto_map[symbol + 1];    count = 0;    for (i = m; i < n; i++)    {	if (to_state[i] != default_state)	    ++count;    }    if (count == 0) return;    symno = symbol_value[symbol] + 2*nstates;    froms[symno] = sp1 = sp = NEW2(count, short);    tos[symno] = sp2 = NEW2(count, short);    for (i = m; i < n; i++)    {	if (to_state[i] != default_state)	{	    *sp1++ = from_state[i];	    *sp2++ = to_state[i];	}    }    tally[symno] = count;    width[symno] = sp1[-1] - sp[0] + 1;}sort_actions(){  register int i;  register int j;  register int k;  register int t;  register int w;  order = NEW2(nvectors, short);  nentries = 0;  for (i = 0; i < nvectors; i++)    {      if (tally[i] > 0)	{	  t = tally[i];	  w = width[i];	  j = nentries - 1;	  while (j >= 0 && (width[order[j]] < w))	    j--;	  while (j >= 0 && (width[order[j]] == w) && (tally[order[j]] < t))	    j--;	  for (k = nentries - 1; k > j; k--)	    order[k + 1] = order[k];	  order[j + 1] = i;	  nentries++;	}    }}pack_table(){    register int i;    register int place;    register int state;    base = NEW2(nvectors, short);    pos = NEW2(nentries, short);    maxtable = 1000;    table = NEW2(maxtable, short);    check = NEW2(maxtable, short);    lowzero = 0;    high = 0;    for (i = 0; i < maxtable; i++)	check[i] = -1;    for (i = 0; i < nentries; i++)    {	state = matching_vector(i);	if (state < 0)	    place = pack_vector(i);	else	    place = base[state];	pos[i] = place;	base[order[i]] = place;    }    for (i = 0; i < nvectors; i++)    {	if (froms[i])	    FREE(froms[i]);	if (tos[i])	    FREE(tos[i]);    }    FREE(froms);    FREE(tos);    FREE(pos);}/*  The function matching_vector determines if the vector specified by	*//*  the input parameter matches a previously considered	vector.  The	*//*  test at the start of the function checks if the vector represents	*//*  a row of shifts over terminal symbols or a row of reductions, or a	*//*  column of shifts over a nonterminal symbol.  Berkeley Yacc does not	*//*  check if a column of shifts over a nonterminal symbols matches a	*//*  previously considered vector.  Because of the nature of LR parsing	*//*  tables, no two columns can match.  Therefore, the only possible	*//*  match would be between a row and a column.  Such matches are	*//*  unlikely.  Therefore, to save time, no attempt is made to see if a	*//*  column matches a previously considered vector.			*//*									*//*  Matching_vector is poorly designed.  The test could easily be made	*//*  faster.  Also, it depends on the vectors being in a specific	*//*  order.								*/intmatching_vector(vector)int vector;{    register int i;    register int j;    register int k;    register int t;    register int w;    register int match;    register int prev;    i = order[vector];    if (i >= 2*nstates)	return (-1);    t = tally[i];    w = width[i];    for (prev = vector - 1; prev >= 0; prev--)    {	j = order[prev];	if (width[j] != w || tally[j] != t)	    return (-1);	match = 1;	for (k = 0; match && k < t; k++)	{	    if (tos[j][k] != tos[i][k] || froms[j][k] != froms[i][k])		match = 0;	}	if (match)	    return (j);    }    return (-1);}intpack_vector(vector)int vector;{    register int i, j, k, l;    register int t;    register int loc;    register int ok;    register short *from;    register short *to;    int newmax;    i = order[vector];    t = tally[i];    assert(t);    from = froms[i];    to = tos[i];    j = lowzero - from[0];    for (k = 1; k < t; ++k)	if (lowzero - from[k] > j)	    j = lowzero - from[k];    for (;; ++j)    {	if (j == 0)	    continue;	ok = 1;	for (k = 0; ok && k < t; k++)	{	    loc = j + from[k];	    if (loc >= maxtable)	    {		if (loc >= MAXTABLE)		    fatal("maximum table size exceeded");		newmax = maxtable;		do { newmax += 200; } while (newmax <= loc);		table = (short *) REALLOC(table, newmax*sizeof(short));		if (table == 0) no_space();		check = (short *) REALLOC(check, newmax*sizeof(short));		if (check == 0) no_space();		for (l  = maxtable; l < newmax; ++l)		{		    table[l] = 0;		    check[l] = -1;		}		maxtable = newmax;	    }	    if (check[loc] != -1)		ok = 0;	}	for (k = 0; ok && k < vector; k++)	{	    if (pos[k] == j)		ok = 0;	}	if (ok)	{	    for (k = 0; k < t; k++)	    {		loc = j + from[k];		table[loc] = to[k];		check[loc] = from[k];		if (loc > high) high = loc;	    }	    while (check[lowzero] != -1)

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产午夜亚洲精品不卡| 国内精品伊人久久久久影院对白| 中文字幕电影一区| 久久久久青草大香线综合精品| xvideos.蜜桃一区二区| 精品免费国产二区三区| 精品欧美乱码久久久久久| 精品日韩在线一区| 日韩精品在线看片z| 精品久久久三级丝袜| 久久综合精品国产一区二区三区 | 在线观看成人小视频| 色哟哟国产精品免费观看| 色八戒一区二区三区| 欧美色中文字幕| 日韩一区二区三区观看| 精品sm捆绑视频| 中文字幕 久热精品 视频在线 | 午夜欧美在线一二页| 日韩精品福利网| 久久99精品久久久| 国产成人av网站| av日韩在线网站| 欧美综合色免费| 日韩视频免费直播| 国产午夜三级一区二区三| 一区精品在线播放| 亚洲国产精品天堂| 久久精品国产精品亚洲红杏| 激情五月播播久久久精品| 国产成人高清在线| 色天使久久综合网天天| 在线成人免费观看| 国产日韩视频一区二区三区| 亚洲视频你懂的| 日韩国产精品久久久久久亚洲| 国产麻豆视频精品| 97久久超碰国产精品电影| 欧美精品电影在线播放| 久久一日本道色综合| 亚洲欧美另类小说视频| 免费在线成人网| 国产 欧美在线| 精品视频免费在线| 久久久久亚洲蜜桃| 亚洲国产视频一区二区| 国产专区综合网| 欧美性色综合网| 精品久久久久久久人人人人传媒| 国产精品大尺度| 青青草一区二区三区| 成人高清在线视频| 欧美美女直播网站| 国产精品丝袜久久久久久app| 亚洲成人在线免费| 国产成人a级片| 5月丁香婷婷综合| 欧美经典三级视频一区二区三区| 一区二区三区蜜桃| 国产精品一区不卡| 91精品一区二区三区在线观看| 国产精品午夜春色av| 日韩电影在线一区二区| 成人av在线网站| 日韩欧美区一区二| 亚洲综合免费观看高清完整版在线 | 日本一区二区视频在线| 无吗不卡中文字幕| 99麻豆久久久国产精品免费| 成人激情免费网站| 日韩欧美一级在线播放| 亚洲综合精品自拍| 成人手机在线视频| 亚洲精品一区二区三区精华液| 亚洲综合在线电影| a级高清视频欧美日韩| 欧美成人aa大片| 婷婷综合五月天| 91久久精品一区二区三| 国产亚洲欧美色| 免费的成人av| 欧美日韩成人综合在线一区二区| 136国产福利精品导航| 国产一区二区福利| 欧美电影免费观看高清完整版在| 亚洲资源中文字幕| 色综合久久九月婷婷色综合| 国产精品三级久久久久三级| 久久99热这里只有精品| 欧美一区二区成人| 日韩黄色免费网站| 欧美精品粉嫩高潮一区二区| 亚洲一区二区视频在线| 91蝌蚪porny| 亚洲美女屁股眼交| 99re6这里只有精品视频在线观看| 亚洲国产高清在线观看视频| 国产精一区二区三区| 精品国产乱码久久久久久老虎| 免费成人在线播放| 日韩视频一区二区三区| 琪琪久久久久日韩精品| 欧美一区二区在线观看| 青青草原综合久久大伊人精品| 欧美精品乱码久久久久久| 亚洲成在人线免费| 制服.丝袜.亚洲.另类.中文| 日韩国产精品91| 日韩一区二区免费视频| 老司机精品视频导航| 精品日韩成人av| 国产精品资源在线| 国产精品狼人久久影院观看方式| 不卡的电影网站| 亚洲啪啪综合av一区二区三区| 色哟哟日韩精品| 午夜视频在线观看一区二区| 7777精品久久久大香线蕉| 日韩精品一区第一页| 日韩久久久精品| 国产精品伊人色| 国产精品毛片高清在线完整版| av在线播放成人| 亚洲一区视频在线观看视频| 欧美精品一二三区| 精品在线免费视频| 久久精品一区二区三区不卡| 成人av免费在线播放| 一区二区三区国产| 日韩欧美在线观看一区二区三区| 狠狠久久亚洲欧美| 中文字幕在线观看不卡| 欧美日韩一区三区四区| 久草这里只有精品视频| 国产精品剧情在线亚洲| 91福利在线播放| 免费成人性网站| 国产三级一区二区| 欧美亚洲国产一区二区三区va| 日本中文字幕不卡| 国产精品天干天干在观线 | 亚洲男女毛片无遮挡| 欧美另类久久久品| 国产精品综合久久| 亚洲三级电影网站| 欧美电影免费观看高清完整版在线观看 | 欧美一级xxx| av一二三不卡影片| 日本亚洲视频在线| 国产精品视频你懂的| 欧美精品久久天天躁| 大美女一区二区三区| 天涯成人国产亚洲精品一区av| 久久影音资源网| 欧洲色大大久久| 国产精品2024| 午夜在线电影亚洲一区| 国产亚洲人成网站| 7878成人国产在线观看| 成人精品高清在线| 日韩av电影免费观看高清完整版在线观看| 久久久久久久网| 欧美日韩在线直播| 成人avav影音| 久久99精品国产麻豆婷婷洗澡| 亚洲日本在线观看| 久久久99精品免费观看不卡| 欧美午夜精品久久久久久超碰| 国产不卡在线播放| 日本欧美在线观看| 亚洲美女电影在线| 国产亚洲一区二区在线观看| 欧美精品v日韩精品v韩国精品v| 成人午夜视频免费看| 久久99精品久久久久| 亚洲永久精品国产| 国产精品欧美综合在线| 日韩免费一区二区| 欧美日韩一区在线观看| 91亚洲男人天堂| 成人在线综合网站| 国内精品伊人久久久久av影院| 丝袜美腿亚洲综合| 亚洲一区av在线| 曰韩精品一区二区| 国产精品国产三级国产普通话蜜臀 | 日日摸夜夜添夜夜添国产精品 | 亚洲免费伊人电影| 亚洲国产精品av| 久久综合色之久久综合| 日韩色在线观看| 欧美日韩不卡视频| 欧美亚洲愉拍一区二区| 色乱码一区二区三区88| 99精品偷自拍| 成+人+亚洲+综合天堂| 国产精品综合一区二区| 经典三级一区二区| 久久疯狂做爰流白浆xx| 久久精品二区亚洲w码|