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

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

?? symtable.c

?? 這是一個VHDL(硬件描述語言)的編譯器
?? C
字號:
#include <assert.h>#include <string.h>#include <stdio.h>#include "stdtypes.h"#include "blockpool.h"#include "pools.h"#include "str.h"#include "list.h"#include "fifo_list.h"#include "hash_serv.h"#include "sparse.h"#include "strtable.h"#include "sym.h"#include "type.h"#include "const.h"#include "symtable.h"#include "typetable.h"#include "dsym.h"/**   Search for a symbol in the hash chain list, using its STRING field   as a key.   The strings should have been entered in the string table.   As a result, an address compare can be used, since all strings   are unique in the string table.   Note that there must be a symbol table for each unique scope. */sym *symtable::chain_elem::search_list( STRING item ){    LIST<sym *>::handle h;    sym *list_sym, *sym;        sym = NULL;    for (h = list.first(); h != NULL; h = list.next(h)) {	list_sym = list.get_item( h );	if ( list_sym->get_name().GetText() == item.GetText() ) {	    sym = list_sym;	    break;	}  // if    } // for        return sym;} // search_list/**   Allocate a new symbol.  The STRING should have already   been entered in the string table.  Note that as   different derived symbol types are added to dsym.h this   function must be changed as well. */sym *symtable::new_sym( STRING str, uint kind ){    sym *pNewSym;    assert( alloc_pool != NULL );    switch ( kind ) {    // IDENT: has scope    case sy_ident:	pNewSym = new( alloc_pool ) sym_ident( str );	pNewSym->set_scope( get_owner() );	break;    // TYPE : no scope    case sy_type:	pNewSym = new( alloc_pool ) sym_type( str );	break;    // CONST: no scope    case sy_const:	pNewSym = new( alloc_pool ) sym_const( str );	break;    // SUBPROG: local symbol table    case sy_subprog:	pNewSym = new( alloc_pool ) sym_subprog( str );	// the subprogram is in the scope of the owner of this symbol table	pNewSym->set_scope( get_owner() );	// A function or procedure will allocate memory from	// from the same pool as its parent scope (which will be	// either a component or the global scope, in the case of	// a function in a package).	//	pNewSym->get_symtab()->set_pool( alloc_pool );	// Set the allocation pool for the type table	pNewSym->get_typtab()->set_pool( alloc_pool );		// The symbol table is owned by the subprogram	pNewSym->get_symtab()->set_owner( pNewSym );	break;    // COMPONENT: local memory pool and local symbol table    case sy_component:	pNewSym = new( alloc_pool ) sym_component( str );	// symbols in the component scope are owned by the component	pNewSym->get_symtab()->set_owner( pNewSym  );	break;    // PROCESS: local symbol table    case sy_process:	pNewSym = new( alloc_pool ) sym_process( str );	// the process is in the scope of its component	pNewSym->set_scope( get_owner() );	// set the memory pool to the pool of the parent	pNewSym->get_symtab()->set_pool( alloc_pool );	// Set the allocation pool for the type table	pNewSym->get_typtab()->set_pool( alloc_pool );		// The symbol table is owned by the process	pNewSym->get_symtab()->set_owner( pNewSym );	break;    case sy_package:   // its not currently clear what to do about packages    case sy_block_label:    case bad_symbol:    default:	// bad symbol kind	assert( FALSE );	break;    } // switch    assert( pNewSym != NULL );    return pNewSym;} // new_sym/**   Search for a symbol in the symbol table whose   name is in the STRING object name. */sym *symtable::find_sym( STRING name ){    STRING str;    sym *retsym;        retsym = NULL;    if (name.GetText() != NULL) {	// If the name is not entered into the string table then	// its not in the symbol table.  Of course the name could	// be in the string table and not in the symbol table, since	// the string table is global and symbol could be out of scope.	str = strtab.find_string( name, FALSE );	if (str.GetText() != NULL) {	    unsigned int ix, val;	    val = hash_value( str.GetText() );	    // table size should always be a power of 2, so	    // table_size - 1 is likely to be a prime.	    ix = val % (table_size - 1);	    if (hash->probe( ix )) { 		retsym =  (*hash)[ ix ].search_list( str );	    }   	}    }    return retsym;} // find_sym/**   Enter a symbol in the symbol table.  If "name" is not entered   in the string table, enter it as well. */sym *symtable::enter_sym( STRING name, uint kind ){    unsigned int ix, val;    sym *retsym;    STRING str;    retsym = NULL;    if (kind == sy_process) {	// Processes are special cases.  They are allocated by the	// symbol table class, since they are derived from the	// symbol type.  But they are not entered into the symbol	// table, since in VHDL a process name can't be referenced.	// Allocation of processes by the symbol table allows uniform	// allocation of all symbol derived objects.	retsym = new_sym( name, kind);    }    else {	assert( name.GetText() != NULL );	val = hash_value( name.GetText() );	str = strtab.find_string( name, TRUE );  // insert into table if its not there.	// table size should always be a power of 2, so	// table_size - 1 is likely to be a prime.	ix = val % (table_size - 1);	if (! hash->probe( ix ) ) {	    hash->insert( chain_elem(), ix );	    	    retsym = new_sym( str, kind );	    (*hash)[ix].list.add( retsym );	}	else {	    retsym = (*hash)[ix].search_list( str );	    if ( retsym == NULL) {		retsym = new_sym( str, kind );		(*hash)[ix].list.add( retsym );	    }	}    }    return retsym;} // enter_sym/**   Traverse the symbol table and find any symbol that has scope (e.g.,   its own symbol table).  Recursively call dealloc_sub_tables for   each of these symbols and then call dealloc to recover sparse array   and list memory. */void symtable::dealloc_sub_tables(void){    uint i;    for (i = 0; i < table_size; i++) {	if (hash->probe( i )) {	    LIST<sym *>::handle h;	    sym * pListSym;	    	    for (h = (*hash)[i].list.first(); h != NULL; h = (*hash)[i].list.next(h)) {		pListSym = (*hash)[i].list.get_item( h );		if (pListSym->has_scope()) {		    pListSym->get_symtab()->dealloc_sub_tables();		    pListSym->dealloc();		}	    } // for	} // if    } // for} // dealloc_sub_tables/**   Print the contents of the string table. */void symtable::pr(FILE *fp){    uint i;    for (i = 0; i < table_size; i++) {	if (hash->probe( i )) {	    LIST<sym *>::handle h;	    sym * pListSym;	    	    for (h = (*hash)[i].list.first(); h != NULL; h = (*hash)[i].list.next(h)) {		// fprintf(fp, "hash_label::pr: i = %d, ", i );		pListSym = (*hash)[i].list.get_item( h );		pListSym->get_name().pr(fp);		fprintf(fp, "\n");	    } // for	} // if    } // for} // pr/**   get_str is used to iterate through the string table.   See symtable.h. */sym *symtable::get_sym(void){    sym * pHashSym;    pHashSym = NULL;    while (list_handle == NULL && hash_slot < table_size) {	if (hash->probe( hash_slot )) {	    list_handle = (*hash)[hash_slot].list.first();	}	if (list_handle == NULL) {	    hash_slot++;	}    } // while    if (list_handle != NULL && hash_slot < table_size) {	pHashSym = (*hash)[hash_slot].list.get_item( list_handle );	list_handle = (*hash)[hash_slot].list.next(list_handle);	// if we've hit the end of the list, increment the	// slot so we're not stuck in the same place	if (list_handle == NULL)	    hash_slot++;	    }    return pHashSym;} // get_str

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
gogogo免费视频观看亚洲一| 亚洲一区二区四区蜜桃| 99久久精品国产观看| 午夜精品久久久久久久| 国产网红主播福利一区二区| 欧美午夜电影一区| 成人午夜在线视频| 免费高清在线一区| 一区二区三区日韩| 国产欧美日韩在线看| 国产欧美va欧美不卡在线| 国产色综合久久| 国产精品欧美久久久久一区二区| 国产日本欧美一区二区| 久久久蜜桃精品| 中文字幕精品一区二区精品绿巨人 | 狠狠色狠狠色综合日日91app| 日韩精品亚洲专区| 国内精品免费在线观看| 国产精品一区一区| 99久久婷婷国产综合精品| 日本久久精品电影| 亚洲观看高清完整版在线观看| 欧美性淫爽ww久久久久无| 免费成人av资源网| 欧美精品一区二区三区视频| 在线观看亚洲专区| 成人app网站| 国产成人免费在线视频| 韩国一区二区三区| 久久国产精品99久久人人澡| 午夜国产不卡在线观看视频| 亚洲综合免费观看高清完整版| √…a在线天堂一区| 国产精品丝袜黑色高跟| 国产欧美在线观看一区| 久久久精品人体av艺术| 久久婷婷成人综合色| 精品国产成人在线影院 | 欧美系列在线观看| 91在线视频官网| 亚洲综合男人的天堂| 国产色产综合产在线视频| 精品成人佐山爱一区二区| 欧美一区二区三区在线看| 91精品久久久久久蜜臀| 欧美一区二区三区在线观看视频| 欧美日韩激情一区二区| 69久久夜色精品国产69蝌蚪网| 欧美性大战久久久久久久蜜臀| 91国偷自产一区二区开放时间 | 亚洲天堂精品视频| 亚洲女同一区二区| 一区二区不卡在线播放 | 欧美一区三区四区| 日韩午夜电影av| 精品噜噜噜噜久久久久久久久试看| 国产日韩欧美一区二区三区综合| 91精品国产手机| 91精品国产高清一区二区三区| 欧美人动与zoxxxx乱| 欧美一区二区久久| 精品精品国产高清a毛片牛牛| 欧美mv日韩mv| 欧美激情中文字幕| 亚洲欧美一区二区不卡| 亚洲国产视频一区| 奇米综合一区二区三区精品视频| 蜜臀久久99精品久久久画质超高清| 色av一区二区| 欧美日韩精品一区视频| 日韩欧美久久一区| 久久久国产一区二区三区四区小说| 国产亚洲短视频| 亚洲三级理论片| 水野朝阳av一区二区三区| 精品一区二区三区久久| 成人av在线网站| 精品视频一区二区不卡| 欧美成人精品3d动漫h| 国产亚洲欧美一级| 亚洲男人的天堂在线观看| 日韩激情一区二区| 色综合天天做天天爱| 国产一级精品在线| 99国产精品久| 欧美另类一区二区三区| 欧美成人r级一区二区三区| 国产精品乱人伦| 亚洲大片免费看| 国产黄人亚洲片| 欧美亚洲禁片免费| 久久男人中文字幕资源站| 亚洲天堂福利av| 麻豆91精品视频| 91免费版在线看| 精品久久人人做人人爰| 亚洲精品一二三区| 国产一区二区三区黄视频 | 午夜精品成人在线| 国产91清纯白嫩初高中在线观看| 欧美午夜寂寞影院| 中文字幕高清一区| 国产99久久久久久免费看农村| 在线免费观看成人短视频| 2024国产精品视频| 亚洲电影一级黄| 成人开心网精品视频| 欧美一区二区三区在线视频| 亚洲三级在线观看| 国产黄人亚洲片| 欧美一区二区三区播放老司机| 国产精品美女久久久久久2018| 性久久久久久久| 91蝌蚪porny九色| 日本一二三四高清不卡| 91在线一区二区三区| 精品国产百合女同互慰| 舔着乳尖日韩一区| 在线免费不卡视频| 亚洲欧美国产高清| av一区二区三区黑人| 国产婷婷一区二区| 韩国av一区二区| 日韩一级在线观看| 日韩精品成人一区二区三区| 91久久精品一区二区二区| 成人欧美一区二区三区白人| 国产suv精品一区二区6| 久久美女艺术照精彩视频福利播放 | 欧美日韩国产免费| 亚洲日本在线a| av激情亚洲男人天堂| 国产精品私人自拍| 成人黄色在线视频| 国产精品麻豆久久久| 国产xxx精品视频大全| 欧美国产精品专区| 懂色av一区二区三区免费看| xnxx国产精品| 国产综合久久久久久鬼色| 久久尤物电影视频在线观看| 久久66热re国产| 欧美精品一区二区高清在线观看 | 最新成人av在线| av不卡一区二区三区| 最近日韩中文字幕| 一本色道亚洲精品aⅴ| 一区二区三区加勒比av| 欧美日韩激情一区二区| 日韩黄色片在线观看| 日韩视频一区在线观看| 久久国产人妖系列| 日本三级韩国三级欧美三级| 欧美一区二区精美| 国产精品影视网| 中文字幕日韩欧美一区二区三区| 91视频在线观看免费| 有坂深雪av一区二区精品| 免费在线观看视频一区| 成人一道本在线| 国产精品水嫩水嫩| 在线亚洲精品福利网址导航| 亚洲a一区二区| 欧美大片一区二区三区| 国产精品99久久久久| 亚洲天天做日日做天天谢日日欢 | 国产91在线|亚洲| 国产精品网曝门| 91国产免费观看| 日本亚洲电影天堂| 久久久久久久久久久黄色| bt欧美亚洲午夜电影天堂| 艳妇臀荡乳欲伦亚洲一区| 91精品国产综合久久蜜臀| 国产在线乱码一区二区三区| 最新不卡av在线| 欧美一级免费观看| 成人高清在线视频| 亚洲va国产va欧美va观看| 久久女同精品一区二区| 91亚洲男人天堂| 秋霞电影网一区二区| 欧美激情在线观看视频免费| 欧美日产在线观看| 成人性生交大片免费看在线播放| 有码一区二区三区| 久久综合久久久久88| 日本高清成人免费播放| 国内精品嫩模私拍在线| 亚洲综合免费观看高清完整版在线| 亚洲精品在线电影| 91久久线看在观草草青青| 国产揄拍国内精品对白| 亚洲一级片在线观看| 欧美经典一区二区| 欧美一区二区三区免费| 久久久久久久久久久久久久久99 | 精东粉嫩av免费一区二区三区| 国产在线精品视频|