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

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

?? function.h

?? C語言前端編譯器,yacc/lex編寫,可自行修改代碼.
?? H
字號:
// Copyright 2002 by Keith Vallerio.
// All rights reserved.

/************************************************************
  funciton.h

  A main file which defines Var, FuncCall and Function classes.
These classes are used to determine and store semantic information
about the variables, function calls and function definitions
inside the original C code.  FuncCall is its own class because
function calls have a lot of info which must be stored.
************************************************************/


#ifndef FUNCTION_H_
#define FUNCTION_H_

#include "RVector.h"
#include "RString.h"
#include <iostream>
#include <fstream>
#include <map>
#include <set>
#include <utility>
#include "node.h"
#include <algorithm>

// Arguments to functions can be variables, constants or functions.
enum ArgType { VAR, FUNC, CONST };

///////////////////////////////////////////////////
// Actions:
///////////////////////////////////////////////////
// "Actions" are used to divide the original source code into
// logical units to simply analysis.  There are many different 
// types of "Actions".  The types are enumerated below: 
//    variable use and declarations:  self-explanitory
//    assignments and assignment ends: indicate boundaries of assigns 
//    ends of statements: to delinate between statements
//    function start/end: to handle nested function calls
//    loop/conditional starts/ends: to get nesting info correct
//		statement numbers: for ordering...not needed anymore
//    short assignments: increments/decrements
//    bracket open/close: not used anymore
enum ActionType { VAR_USE, VAR_DECL, ASSIGN, ASSIGN_END, 
			STATE_END, FN_START, FN_END, LOOP_START, LOOP_END, 
			SELECT_START, SELECT_END, STATE_NUM, SHORT_ASSIGN_VAR,
			BRAC_OPEN, BRAC_CLOSE };

// Var holds information about a variable in the original source
class Var : public Prints<Var> {
	// 'name_' has variable's name + "__#" to indicate which function
	//     that variable is found in
	// 'type_' is variables data type
	// 'total_size_' number of bytes variable takes (pointers are special)
	// 'num_elements_' number of elements if array, 1 otherwise
	// 'stype' attributes such as pointer, const, static, etc.
	string name_;
	string type_;
	long total_size_;
	long num_elements_;
	RVector<string> stype_;
	bool is_pointer_;
	bool is_static_;
public:
	// Constructors
	Var (string n, string t, RVector<string> s, long num_elements);

	// Construction
	void add_type (string s) { type_ = s; }
	void determine_total_size (long type_size);

	// Interface
	string name() { return name_; }
	const string name() const { return name_; }
	string type() { return type_; }
	const string type() const { return type_; }
	long total_size() { return total_size_; }
	const long total_size() const { return total_size_; }
	long num_elements() { return num_elements_; }
	const long num_elements() const { return num_elements_; }
	RVector<string> stype() { return stype_; }
	const RVector<string> stype() const { return stype_; }
	bool is_pointer() { return is_pointer_; }
	const bool is_pointer() const { return is_pointer_; }
	bool is_static() { return is_static_; }
	const bool is_static() const { return is_static_; }
};

// FuncCall stores information reguarding function calls.  'name' is
// the name of the function called.  'parms_' indicates the index
// and type of a parameter passed at call time.  'root_node_' is 
// used to determine position of the function call within the AST.
class FuncCall : public Prints<Var> {
	string name_;
	RVector<pair<long,ArgType> > parms_;
	long commas_;
	long root_node_;
	long fn_name_node_;
public:
	// Constructor
	FuncCall(string n, long r, long nnode);

	// Construction
	void add_name(string s) { name_ = s; }
	void add_parm(pair<long,ArgType> p);
	void add_comma();
	void balance_commas();

	// Interface
	string name() { return name_; }
	const string name() const { return name_; }
	RVector<pair<long,ArgType> > parms() { return parms_; }
	const RVector<pair<long,ArgType> > parms() const { return parms_; }
	long root_node() { return root_node_; }
	const long root_node() const { return root_node_; }
	long fn_name_node() { return fn_name_node_; }
	const long fn_name_node() const { return fn_name_node_; }
};

// Function contains all the known information about the function
// it contains.  'v2v_alias_' is used to store which variables
// are aliased to other variables within the function.
// 'vars_touched_' is used to record which variables the function
// could potentially use/modify when called.
class Function : public Prints<Function> {
	string name_;   // function name
	string type_;   // return value
	RVector<string> stype_;  // return value modifiers (i.e., pointer)

	// indexes (in global variable list) of paramters and variables
	RVector<long> parameter_;
	RVector<long> variable_;

	RVector<string> var_use_;

	// list of actions
	RVector<string> action_;
	RVector<ActionType> action_type_;
	RVector<long> action_tree_node_;

	RVector<FuncCall> func_call_;
	RVector<pair <long, long> > assign_node_;
	bool defined_;		// if func is defined, or just a header
	bool self_dependent_;  // if it has dependence between calls to itself

	// to handle interprocedural dependence analysis
	set<long> vars_touched_;
	RVector<set<long> > v2v_alias_;
	bool elipses_;
public:
	// Constructors
	Function (string n, string t, RVector<string> s);

	// Analysis routines
	RVector<string> func_call_names ();
	void add_aliases (long target, RVector<long> vars, bool clear_old_alias);
	void init_alias_vectors (long v_size);
	bool var_in_v_alias (long v, long v_set_num);
	void remove_from_v_alias (long v, long v_set_num);
	void append_to_v_alias (long target_num, long source_num);
	set<long> func_call_cleanup_aliases (RVector<pair<long,ArgType> > p,
														RVector<long> parms);
	RVector<long> v_alias_vec(long v);
	set<long> parameter_set();

	// Construction routines
	void add_name(string s) { name_ = s; }
	void add_type(string s) { type_ = s; }
	void add_stype (RVector<string> s) { stype_ = s; }
	void add_parameter(long v);
	void add_variable(long v);
	void add_elipses();
	void add_var_use (string v) { var_use_.push_back(v); }
	long add_func_call(string n, long r, long nnode);
	void add_func_call_arg (long c, long arg, ArgType arg_type);
	void add_action (string n, ActionType t, long tn);
	void add_assign_node (pair<long,long> p) { assign_node_.push_back(p); }
	void set_defined () { Rassert(!defined_); defined_ = true; }
	void set_vars_touched (set<long> s) { vars_touched_ = s; }
	void set_v2v_alias (RVector<set<long> > s) { v2v_alias_ = s; }
	void set_v2v_alias_vec (long v, set<long> s) { v2v_alias_[v] = s; }

	void add_func_call_comma (long fc_num);
	void balance_func_call_commas (long fc_num);

	// query methods
	string name() { return name_; }
	const string name() const { return name_; }
	string type() { return type_; }
	const string type() const { return type_; }
	RVector<string> stype() { return stype_; }
	const RVector<string> stype() const { return stype_; }
	RVector<long> parameter() { return parameter_; }
	const RVector<long> parameter() const { return parameter_; }
	RVector<long> variable() { return variable_; }
	const RVector<long> variable() const { return variable_; }
	RVector<string> var_use() { return var_use_; }
	const RVector<string> var_use() const { return var_use_; }
	RVector<string> action() { return action_; }
	const RVector<string> action() const { return action_; }
	RVector<ActionType> action_type() { return action_type_; }
	const RVector<ActionType> action_type() const { return action_type_; }
	RVector<long> action_tree_node () { return action_tree_node_; }
	const RVector<long> action_tree_node () const { return action_tree_node_; }

	RVector<FuncCall> func_call() { return func_call_; }
	const RVector<FuncCall> func_call() const { return func_call_; }
	RVector<pair <long,long> > assign_node() { return assign_node_; }
	const RVector<pair <long,long> > assign_node() const 
			{ return assign_node_; }

	bool defined() { return defined_; }
	const bool defined() const { return defined_; }
	set<long> vars_touched() { return vars_touched_; }
	const set<long> vars_touched() const { return vars_touched_; }


	RVector<set<long> > v2v_alias() { return v2v_alias_; }
	const RVector<set<long> > v2v_alias() const { return v2v_alias_; }
	set<long> v2v_alias_var (long v) { return v2v_alias_[v]; }
	const set<long> v2v_alias_var (long v) const { return v2v_alias_[v]; }

	bool elipses() { return elipses_; }
	const bool elipses() const { return elipses_; }
	
};

// printout routines
ostream & operator<<(ostream & os, const Var & var_a);
ostream & operator<<(ostream & os, const FuncCall & fc_a);
ostream & operator<<(ostream & os, const Function & fn_a);

ostream &operator <<(ostream &output, set<long> &sa);

#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品久久7777| hitomi一区二区三区精品| 国产揄拍国内精品对白| 91极品视觉盛宴| 久久久久久一二三区| 亚洲已满18点击进入久久| 国产精品一区二区视频| 欧美另类久久久品| 亚洲日本va午夜在线电影| 久草中文综合在线| 欧美日韩日日骚| 尤物视频一区二区| 成人av电影在线| 国产情人综合久久777777| 蜜臀va亚洲va欧美va天堂 | 亚洲女爱视频在线| 国产精品1区二区.| 久久夜色精品一区| 日韩国产成人精品| 欧美高清性hdvideosex| 一级女性全黄久久生活片免费| 国产精品 欧美精品| 精品免费日韩av| 激情都市一区二区| 精品三级在线观看| 青青草国产精品97视觉盛宴| 欧美日韩精品欧美日韩精品一综合| 中文字幕一区二区在线观看| 国产精品18久久久| 国产日产欧产精品推荐色 | 欧美国产精品一区| 国产黄色精品网站| 国产欧美综合在线观看第十页| 国产精品一卡二| 久久精品日产第一区二区三区高清版 | 1区2区3区国产精品| 国产99久久精品| 国产精品视频在线看| 成人av电影在线| 一区二区三区欧美久久| 欧美在线观看视频一区二区三区| 亚洲一区二区三区四区不卡| 欧美三级视频在线| 日本欧美一区二区在线观看| 欧美一区二区三区性视频| 久久国产精品露脸对白| 2024国产精品| 成人高清免费在线播放| 亚洲精品综合在线| 欧美久久一区二区| 久久97超碰色| 国产精品动漫网站| 欧美视频一区二| 理论片日本一区| 国产精品国产a| 欧美精品18+| 国产91富婆露脸刺激对白 | 国产色产综合产在线视频 | 国内精品久久久久影院薰衣草 | 欧美一级生活片| 国产精品1024久久| 亚洲自拍偷拍欧美| 欧美mv日韩mv亚洲| 成人国产在线观看| 日韩高清在线不卡| 国产精品不卡视频| 91精品国产综合久久久久久漫画| 国精产品一区一区三区mba桃花| 中文字幕日韩精品一区| 91.com在线观看| 成人深夜福利app| 日本成人在线一区| 日韩一区在线看| 91精品麻豆日日躁夜夜躁| 成人黄色在线网站| 日韩av一二三| 亚洲伦理在线精品| 久久女同互慰一区二区三区| 欧美性受xxxx黑人xyx性爽| 国产精品一区二区三区网站| 偷偷要91色婷婷| 日韩毛片高清在线播放| 精品99久久久久久| 欧美日韩国产乱码电影| 成人精品一区二区三区中文字幕| 日韩高清在线观看| 亚洲亚洲精品在线观看| 日本一区二区视频在线观看| 欧美成人精品二区三区99精品| 色综合色狠狠天天综合色| 国产成人啪午夜精品网站男同| 视频一区视频二区中文字幕| 亚洲一区二区五区| 日韩伦理免费电影| 国产精品麻豆网站| 久久丝袜美腿综合| 日韩视频中午一区| 欧美日韩成人一区二区| 欧美在线你懂的| 91浏览器在线视频| 成人久久18免费网站麻豆| 国产一区在线看| 久久99热国产| 久久精品72免费观看| 午夜精品123| 午夜精品福利一区二区蜜股av| 亚洲少妇屁股交4| 国产精品久久二区二区| 国产精品美女久久久久久久久久久 | 欧美一区二区三区不卡| 欧美日韩的一区二区| 欧美日韩视频专区在线播放| 欧美亚洲动漫另类| 在线精品亚洲一区二区不卡| 99精品视频免费在线观看| hitomi一区二区三区精品| 不卡高清视频专区| 色综合激情久久| 在线精品国精品国产尤物884a| 色综合久久中文综合久久97| 色婷婷av一区二区三区软件| 在线免费av一区| 欧美群妇大交群中文字幕| 91精品国产高清一区二区三区蜜臀| 欧美日韩国产小视频| 欧美一级在线视频| 2022国产精品视频| 久久精品视频网| 亚洲男女一区二区三区| 亚洲最大成人网4388xx| 午夜av一区二区| 极品美女销魂一区二区三区免费| 久久se这里有精品| 国产成都精品91一区二区三| 91社区在线播放| 欧美日韩国产影片| 精品免费视频一区二区| 中文字幕一区免费在线观看| 亚洲高清在线精品| 国产精品亚洲一区二区三区妖精 | 国产精品一区一区| 色综合久久天天综合网| 日韩一区二区电影| 欧美激情一区二区三区四区| 一区二区三区色| 日本伊人午夜精品| 丁香亚洲综合激情啪啪综合| 99国产欧美另类久久久精品| 在线播放91灌醉迷j高跟美女 | 无码av免费一区二区三区试看| 精品无人码麻豆乱码1区2区| 99在线精品视频| 欧美成人a在线| 免费在线成人网| 亚洲最大的成人av| 奇米777欧美一区二区| 成人免费视频播放| 欧美乱熟臀69xxxxxx| 国产日韩影视精品| 亚洲成年人网站在线观看| 狠狠色综合播放一区二区| 91免费精品国自产拍在线不卡| 69p69国产精品| 1024成人网| 国内外成人在线| 在线观看亚洲精品视频| 久久久久高清精品| 亚洲成a人片在线观看中文| 国产成人av一区| 在线综合视频播放| 亚洲欧美电影一区二区| 国产一区二区三区四区五区美女 | 久久精品亚洲精品国产欧美| 亚洲国产精品一区二区久久| 成人一区二区三区视频在线观看| 日韩一区二区电影网| 亚洲福利一区二区| 91浏览器打开| 国产精品日产欧美久久久久| 国产在线观看免费一区| 7777精品伊人久久久大香线蕉完整版 | 337p亚洲精品色噜噜| 亚洲人成在线观看一区二区| 国产成人精品三级| 精品国产一区二区三区久久久蜜月| 亚洲国产中文字幕| 在线欧美一区二区| 一区二区三区不卡视频 | 国产成人av电影免费在线观看| 精品美女一区二区三区| 日韩国产一区二| 制服丝袜日韩国产| 天天色综合成人网| 在线观看不卡一区| 一区二区在线观看不卡| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 日产国产高清一区二区三区| 欧美性受xxxx黑人xyx| 亚洲国产精品久久久久秋霞影院| 一本大道久久a久久综合|