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

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

?? 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)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91麻豆国产福利精品| 天天操天天色综合| 成人av动漫网站| 国产精品成人在线观看| 韩国一区二区视频| 久久久亚洲高清| 精品系列免费在线观看| 精品国产91乱码一区二区三区| av亚洲产国偷v产偷v自拍| 自拍偷拍国产精品| 欧美日韩在线不卡| 久久av资源站| 国产精品大尺度| 在线不卡免费欧美| 国产精品一二三区在线| 中文字幕一区二区三区在线观看 | 亚洲女人****多毛耸耸8| 91麻豆成人久久精品二区三区| 亚洲国产一区二区三区| 日韩精品一区在线观看| 成人91在线观看| 日韩影院在线观看| 国产精品久久一级| 欧美影院精品一区| 国产精品一级片在线观看| 亚洲色图19p| 欧美大片日本大片免费观看| 粉嫩一区二区三区在线看| 亚洲自拍偷拍网站| 久久精品欧美一区二区三区不卡 | 91麻豆福利精品推荐| 午夜av区久久| 国产精品久久久久久久浪潮网站 | 日本一区二区三区四区在线视频 | 一本久道久久综合中文字幕| 男女男精品网站| 成人免费在线视频观看| 欧美mv日韩mv国产网站| 色婷婷综合久久久中文一区二区| 久久精品久久精品| 亚洲午夜激情网站| 国产精品萝li| 久久久天堂av| 日韩一级成人av| 欧美在线观看视频一区二区三区| 国产一区亚洲一区| 免费在线观看不卡| 亚洲一区二区三区激情| 国产精品麻豆久久久| 精品国产精品一区二区夜夜嗨| 欧美亚洲动漫制服丝袜| 成人性生交大合| 国产自产2019最新不卡| 成人性生交大片免费看在线播放 | 欧美精品乱码久久久久久| www.一区二区| 国产成人精品免费看| 石原莉奈一区二区三区在线观看 | 一区二区三区四区不卡视频| 国产午夜亚洲精品午夜鲁丝片| 欧美日韩激情一区| 91老师片黄在线观看| 成人免费的视频| 国产大片一区二区| 国产精一品亚洲二区在线视频| 日本不卡在线视频| 日韩不卡一区二区| 亚洲高清免费视频| 一区二区三区久久| 依依成人综合视频| 一区二区三区不卡视频在线观看 | 美女视频第一区二区三区免费观看网站| 亚洲日本成人在线观看| 中文字幕在线免费不卡| 欧美经典三级视频一区二区三区| 精品国产一二三区| 日韩午夜在线观看视频| 日韩欧美三级在线| 欧美tickling挠脚心丨vk| 日韩欧美123| 久久久不卡影院| 久久久777精品电影网影网| 26uuu精品一区二区三区四区在线| 91麻豆精品国产91久久久久久久久| 欧美日韩激情一区| 日韩三级视频在线观看| 亚洲精品在线观看网站| 久久伊人蜜桃av一区二区| 精品电影一区二区| 国产精品欧美一区二区三区| 中日韩免费视频中文字幕| 国产精品午夜免费| 亚洲精品免费在线| 亚洲成人一区在线| 久久国产精品99久久人人澡| 国产一区二区电影| 99精品国产热久久91蜜凸| 色老汉一区二区三区| 欧美日韩国产免费| 日韩一区二区三区视频| 久久精品视频免费观看| 中文字幕日韩一区| 亚洲va在线va天堂| 国内成+人亚洲+欧美+综合在线| 国产ts人妖一区二区| 91麻豆自制传媒国产之光| 欧美日韩午夜精品| 久久久亚洲欧洲日产国码αv| 久久精品国产澳门| 成年人网站91| 欧美精品久久久久久久多人混战| 欧美精品一区男女天堂| 国产精品久久久久aaaa| 五月天一区二区| 国产成人在线色| 欧美无乱码久久久免费午夜一区| 日韩精品一区二区三区在线| 国产精品美女久久久久aⅴ| 亚洲高清免费一级二级三级| 国产美女精品在线| 欧美三级电影在线看| 久久久精品黄色| 亚洲电影一区二区三区| 国产一区不卡视频| 欧美色区777第一页| 欧美国产一区二区| 日本色综合中文字幕| 91农村精品一区二区在线| 日韩欧美国产一二三区| 一区二区三区精品| 国产乱淫av一区二区三区| 欧美日韩免费观看一区三区| 国产精品天美传媒沈樵| 秋霞午夜鲁丝一区二区老狼| 91视频精品在这里| 国产婷婷一区二区| 日本sm残虐另类| 欧美在线观看18| 亚洲婷婷综合久久一本伊一区 | 欧美日韩一区三区四区| 国产日本欧美一区二区| 日韩精品高清不卡| 96av麻豆蜜桃一区二区| 久久精品视频在线看| 蜜臀av在线播放一区二区三区| 99国产欧美久久久精品| www亚洲一区| 天堂一区二区在线免费观看| 91久久一区二区| 国产精品视频一二三| 国产毛片精品视频| 欧美大片日本大片免费观看| 日韩av成人高清| 欧美日韩精品一区二区三区| 一区二区三区在线免费视频| 成人美女视频在线观看18| 久久久久久久免费视频了| 久久精品国产**网站演员| 欧美日韩一卡二卡三卡| 亚洲自拍另类综合| 欧美色爱综合网| 一区二区三区免费看视频| 91视频国产观看| 亚洲精品国产精华液| 色狠狠av一区二区三区| 亚洲免费毛片网站| 色老综合老女人久久久| 一区二区三区免费在线观看| 欧美在线看片a免费观看| 亚洲免费观看高清完整版在线观看熊| 99视频在线精品| 经典三级视频一区| 久久久一区二区| 国产成人精品免费看| 国产精品久久综合| 色综合av在线| 亚洲国产精品影院| 日韩欧美在线观看一区二区三区| 日本亚洲天堂网| 亚洲精品一区二区三区福利 | 91精品久久久久久蜜臀| 日韩av不卡在线观看| 精品嫩草影院久久| 国产99久久久精品| 亚洲视频一区二区免费在线观看| 91免费在线播放| 日日夜夜精品免费视频| 欧美大片免费久久精品三p| 国产一区啦啦啦在线观看| 国产女人18水真多18精品一级做| www.激情成人| 午夜精品福利一区二区三区av| 欧美一区二区啪啪| 国产一区高清在线| 亚洲精品高清在线观看| 6080yy午夜一二三区久久| 国产美女久久久久| 一区二区三区四区av| 日韩欧美亚洲一区二区| av电影天堂一区二区在线|