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

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

?? scantools.py

?? reduced python source for embedded apps
?? PY
?? 第 1 頁 / 共 2 頁
字號:
"""\Tools for scanning header files in search of function prototypes.Often, the function prototypes in header files contain enough informationto automatically generate (or reverse-engineer) interface specificationsfrom them.  The conventions used are very vendor specific, but once you'vefigured out what they are they are often a great help, and it sure beatsmanually entering the interface specifications.  (These are needed to generatethe glue used to access the functions from Python.)In order to make this class useful, almost every component can be overridden.The defaults are (currently) tuned to scanning Apple Macintosh header files,although most Mac specific details are contained in header-specific subclasses."""import regeximport regsubimport stringimport sysimport osimport fnmatchfrom types import *try:	import MacOSexcept ImportError:	MacOS = Nonefrom bgenlocations import CREATOR, INCLUDEDIRError = "scantools.Error"class Scanner:	def __init__(self, input = None, output = None, defsoutput = None):		self.initsilent()		self.initblacklists()		self.initrepairinstructions()		self.initpaths()		self.initfiles()		self.initpatterns()		self.compilepatterns()		self.initosspecifics()		self.initusedtypes()		if output:			self.setoutput(output, defsoutput)		if input:			self.setinput(input)		def initusedtypes(self):		self.usedtypes = {}		def typeused(self, type, mode):		if not self.usedtypes.has_key(type):			self.usedtypes[type] = {}		self.usedtypes[type][mode] = None		def reportusedtypes(self):		types = self.usedtypes.keys()		types.sort()		for type in types:			modes = self.usedtypes[type].keys()			modes.sort()			print type, string.join(modes)				def gentypetest(self, file):		fp = open(file, "w")		fp.write("types=[\n")		types = self.usedtypes.keys()		types.sort()		for type in types:			fp.write("\t'%s',\n"%type)		fp.write("]\n")		fp.write("""missing=0for t in types:	try:		tt = eval(t)	except NameError:		print "** Missing type:", t		missing = 1if missing: raise "Missing Types"""")		fp.close()	def initsilent(self):		self.silent = 0	def error(self, format, *args):		if self.silent >= 0:			print format%args	def report(self, format, *args):		if not self.silent:			print format%args	def writeinitialdefs(self):		pass			def initblacklists(self):		self.blacklistnames = self.makeblacklistnames()		self.blacklisttypes = ["unknown", "-"] + self.makeblacklisttypes()	def makeblacklistnames(self):		return []	def makeblacklisttypes(self):		return []	def initrepairinstructions(self):		self.repairinstructions = self.makerepairinstructions()	def makerepairinstructions(self):		"""Parse the repair file into repair instructions.				The file format is simple:		1) use \ to split a long logical line in multiple physical lines		2) everything after the first # on a line is ignored (as comment)		3) empty lines are ignored		4) remaining lines must have exactly 3 colon-separated fields:		   functionpattern : argumentspattern : argumentsreplacement		5) all patterns use shell style pattern matching		6) an empty functionpattern means the same as *		7) the other two fields are each comma-separated lists of triples		8) a triple is a space-separated list of 1-3 words		9) a triple with less than 3 words is padded at the end with "*" words		10) when used as a pattern, a triple matches the type, name, and mode		    of an argument, respectively		11) when used as a replacement, the words of a triple specify		    replacements for the corresponding words of the argument,		    with "*" as a word by itself meaning leave the original word		    (no other uses of "*" is allowed)		12) the replacement need not have the same number of triples		    as the pattern		"""		f = self.openrepairfile()		if not f: return []		print "Reading repair file", `f.name`, "..."		list = []		lineno = 0		while 1:			line = f.readline()			if not line: break			lineno = lineno + 1			startlineno = lineno			while line[-2:] == '\\\n':				line = line[:-2] + ' ' + f.readline()				lineno = lineno + 1			i = string.find(line, '#')			if i >= 0: line = line[:i]			words = map(string.strip, string.splitfields(line, ':'))			if words == ['']: continue			if len(words) <> 3:				print "Line", startlineno,				print ": bad line (not 3 colon-separated fields)"				print `line`				continue			[fpat, pat, rep] = words			if not fpat: fpat = "*"			if not pat:				print "Line", startlineno,				print "Empty pattern"				print `line`				continue			patparts = map(string.strip, string.splitfields(pat, ','))			repparts = map(string.strip, string.splitfields(rep, ','))			patterns = []			for p in patparts:				if not p:					print "Line", startlineno,					print "Empty pattern part"					print `line`					continue				pattern = string.split(p)				if len(pattern) > 3:					print "Line", startlineno,					print "Pattern part has > 3 words"					print `line`					pattern = pattern[:3]				else:					while len(pattern) < 3:						pattern.append("*")				patterns.append(pattern)			replacements = []			for p in repparts:				if not p:					print "Line", startlineno,					print "Empty replacement part"					print `line`					continue				replacement = string.split(p)				if len(replacement) > 3:					print "Line", startlineno,					print "Pattern part has > 3 words"					print `line`					replacement = replacement[:3]				else:					while len(replacement) < 3:						replacement.append("*")				replacements.append(replacement)			list.append((fpat, patterns, replacements))		return list		def openrepairfile(self, filename = "REPAIR"):		try:			return open(filename, "r")		except IOError, msg:			print `filename`, ":", msg			print "Cannot open repair file -- assume no repair needed"			return None	def initfiles(self):		self.specmine = 0		self.defsmine = 0		self.scanmine = 0		self.specfile = sys.stdout		self.defsfile = None		self.scanfile = sys.stdin		self.lineno = 0		self.line = ""	def initpaths(self):		self.includepath = [':', INCLUDEDIR]	def initpatterns(self):#		self.head_pat = "^extern pascal[ \t]+" # XXX Mac specific!		self.head_pat = "^EXTERN_API[^_]"		self.tail_pat = "[;={}]"#		self.type_pat = "pascal[ \t\n]+\(<type>[a-zA-Z0-9_ \t]*[a-zA-Z0-9_]\)[ \t\n]+"		self.type_pat = "EXTERN_API" + \						"[ \t\n]*([ \t\n]*" + \						"\(<type>[a-zA-Z0-9_* \t]*[a-zA-Z0-9_*]\)" + \						"[ \t\n]*)[ \t\n]*"		self.name_pat = "\(<name>[a-zA-Z0-9_]+\)[ \t\n]*"		self.args_pat = "(\(<args>\([^(;=)]+\|([^(;=)]*)\)*\))"		self.whole_pat = self.type_pat + self.name_pat + self.args_pat#		self.sym_pat = "^[ \t]*\(<name>[a-zA-Z0-9_]+\)[ \t]*=" + \#		               "[ \t]*\(<defn>[-0-9'\"(][^\t\n,;}]*\),?"		self.sym_pat = "^[ \t]*\(<name>[a-zA-Z0-9_]+\)[ \t]*=" + \		               "[ \t]*\(<defn>[-0-9_a-zA-Z'\"(][^\t\n,;}]*\),?"		self.asplit_pat = "^\(<type>.*[^a-zA-Z0-9_]\)\(<name>[a-zA-Z0-9_]+\)$"		self.comment1_pat = "\(<rest>.*\)//.*"		# note that the next pattern only removes comments that are wholly within one line		self.comment2_pat = "\(<rest>.*\)/\*.*\*/"	def compilepatterns(self):		for name in dir(self):			if name[-4:] == "_pat":				pat = getattr(self, name)				prog = regex.symcomp(pat)				setattr(self, name[:-4], prog)	def initosspecifics(self):		if MacOS:			self.filetype = 'TEXT'			self.filecreator = CREATOR		else:			self.filetype = self.filecreator = None	def setfiletype(self, filename):		if MacOS and (self.filecreator or self.filetype):			creator, type = MacOS.GetCreatorAndType(filename)			if self.filecreator: creator = self.filecreator			if self.filetype: type = self.filetype			MacOS.SetCreatorAndType(filename, creator, type)	def close(self):		self.closefiles()	def closefiles(self):		self.closespec()		self.closedefs()		self.closescan()	def closespec(self):		tmp = self.specmine and self.specfile		self.specfile = None		if tmp: tmp.close()	def closedefs(self):		tmp = self.defsmine and self.defsfile		self.defsfile = None		if tmp: tmp.close()	def closescan(self):

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩一区二区在线观看视频| 成人免费高清在线| 欧美日韩久久久| 日韩激情视频在线观看| 欧美高清性hdvideosex| 麻豆国产一区二区| 日本一区二区电影| 欧美做爰猛烈大尺度电影无法无天| 亚洲欧美福利一区二区| 欧美日韩在线播放三区| 欧美在线你懂的| 调教+趴+乳夹+国产+精品| 日韩视频一区二区| 国产精品一区二区在线播放 | 国产+成+人+亚洲欧洲自线| 91精品国产欧美一区二区18 | 亚洲777理论| 日韩视频中午一区| 国产69精品一区二区亚洲孕妇| 国产亚洲短视频| 99精品视频在线观看| 日韩极品在线观看| 国产欧美一区在线| 欧美亚洲一区二区三区四区| 欧美aaaaaa午夜精品| 国产精品电影一区二区三区| 欧美日韩二区三区| 国产成人午夜99999| 亚洲动漫第一页| 中文字幕欧美激情一区| 欧美一区二区免费观在线| 成人一区二区三区| 免费欧美日韩国产三级电影| 日本一区二区三区久久久久久久久不| 国产一区日韩二区欧美三区| 亚洲综合网站在线观看| 久久久久久久久久久久久夜| 欧美喷潮久久久xxxxx| av网站一区二区三区| 青青草国产成人99久久| 国产精品羞羞答答xxdd| 午夜亚洲国产au精品一区二区| 久久亚洲一区二区三区四区| 欧美亚一区二区| 国产成人精品免费在线| 日本aⅴ亚洲精品中文乱码| 综合在线观看色| 26uuu成人网一区二区三区| 欧美日韩一区久久| 成人av网站免费| 国产精品影音先锋| 蜜桃av噜噜一区| 亚洲国产成人高清精品| 亚洲男同1069视频| 国产精品亲子伦对白| 2023国产精华国产精品| 56国语精品自产拍在线观看| 一本色道综合亚洲| 91在线你懂得| a美女胸又www黄视频久久| 国产精品888| 国产在线乱码一区二区三区| 免费在线成人网| 青娱乐精品视频在线| 免费在线欧美视频| 日本亚洲天堂网| 日韩有码一区二区三区| 亚洲国产精品一区二区久久| 亚洲精品欧美激情| 尤物在线观看一区| 一区二区三区在线观看视频| 国产福利一区在线观看| 激情综合网激情| 美女免费视频一区二区| 美女视频黄a大片欧美| 久久精品99国产精品| 美女视频一区在线观看| 精品一区二区免费| 韩国三级电影一区二区| 国产乱子轮精品视频| 国产美女av一区二区三区| 国产精品88av| 99这里只有精品| 91官网在线观看| 欧美精品tushy高清| 日韩一区二区中文字幕| 久久综合狠狠综合久久激情| 国产欧美综合色| 《视频一区视频二区| 亚洲成人午夜影院| 蜜臀av国产精品久久久久| 国产精品一区二区三区99| 成人免费视频一区| 91福利资源站| 日韩一级片网站| 国产欧美日韩不卡免费| 亚洲精品成人悠悠色影视| 午夜影视日本亚洲欧洲精品| 捆绑紧缚一区二区三区视频| 国产成人av福利| 一本大道av伊人久久综合| 欧美精品123区| 中文字幕乱码亚洲精品一区| 亚洲激情中文1区| 蜜臀精品一区二区三区在线观看| 久久精品理论片| 成人午夜视频福利| 欧美日韩一级二级三级| 久久综合av免费| 亚洲美女视频一区| 国产在线视视频有精品| 93久久精品日日躁夜夜躁欧美| 色欧美乱欧美15图片| 日韩美一区二区三区| 亚洲日本丝袜连裤袜办公室| 热久久久久久久| a4yy欧美一区二区三区| 欧美大片一区二区| 亚洲黄色在线视频| 国产一区二区三区四区五区入口| 不卡在线观看av| 欧美一区二区啪啪| 亚洲精品国产精品乱码不99| 国产麻豆欧美日韩一区| 欧美午夜片在线观看| 国产丝袜美腿一区二区三区| 三级成人在线视频| 99国产精品久久| 国产午夜精品久久| 美女久久久精品| 亚洲丝袜精品丝袜在线| 国产一区欧美日韩| 欧美一区二区三区四区高清| 日韩理论在线观看| 国产一区二区成人久久免费影院| 在线免费观看成人短视频| 国产日韩欧美制服另类| 日韩电影网1区2区| 欧美在线三级电影| 亚洲天堂2014| 成人午夜av电影| 久久在线观看免费| 奇米影视一区二区三区小说| 在线免费精品视频| 亚洲男同1069视频| 99久久精品费精品国产一区二区| 日韩欧美在线123| 日韩高清不卡在线| 欧美三级视频在线观看| 亚洲欧美国产毛片在线| 99久久久免费精品国产一区二区| 欧美精品久久一区二区三区| 亚洲视频一区二区在线| 成人黄色国产精品网站大全在线免费观看| 69久久夜色精品国产69蝌蚪网| 国产精品传媒视频| 成人中文字幕合集| 欧美激情一区二区三区蜜桃视频| 欧美96一区二区免费视频| 制服视频三区第一页精品| 香蕉av福利精品导航| 欧美久久久久免费| 日韩av一区二区在线影视| 欧美精品tushy高清| 日韩成人免费在线| 精品美女在线播放| 国产一区二区0| 国产精品另类一区| 99久久精品费精品国产一区二区| 国产欧美日韩视频一区二区| 成人av网站在线观看免费| 久久精品欧美一区二区三区不卡| 麻豆视频一区二区| 精品久久一区二区三区| 免费成人在线观看| 久久综合99re88久久爱| 成人一级视频在线观看| 亚洲视频在线一区| 欧美日韩国产一区二区三区地区| 亚洲成人免费电影| 这里只有精品免费| 国产一区二区在线观看免费| 国产精品网站在线观看| 色就色 综合激情| 日韩精品免费专区| 欧美精品一区二区不卡| av在线播放一区二区三区| 亚洲同性同志一二三专区| 欧美三级资源在线| 国产一区二区三区综合| 亚洲日本va在线观看| 欧美久久一二区| 国产福利91精品一区| 日韩理论电影院| 欧美一级一区二区| 99精品热视频| 美国精品在线观看| 亚洲色图一区二区| 精品乱人伦一区二区三区| av不卡一区二区三区|