Lines Matching refs:self

67     def __init__(self,config={}):  argument
69 self.reset()
70 self.config = config
72 def reset(self,config={}): argument
73 self.files = set() # set of files being parsed for headers
74 self.headers = {} # maps headers to set of users
75 self.config = config
77 def checkInclude(self, line, from_file, kernel_root=None): argument
87 self.files.add(from_file)
98 if not header in self.headers:
99 self.headers[header] = set()
104 self.headers[header].add(from_file)
106 def parseFile(self, path, arch=None, kernel_root=None): argument
137 macros.update(self.config)
144 self.checkInclude(inc, path, kernel_root)
146 def getHeaders(self): argument
148 return set(self.headers.keys())
150 def getHeaderUsers(self,header): argument
152 return set(self.headers.get(header))
154 def getAllUsers(self): argument
156 return self.headers.copy()
158 def getFiles(self): argument
160 return self.files.copy()
197 def __init__(self,headers,archs,kernel_root,kernel_config): argument
209 self.archs = archs
210 self.searched = set(headers)
211 self.kernel_root = kernel_root
212 self.kernel_config = kernel_config
213 self.needed = {}
214 self.setArch(arch=None)
216 def setArch(self,arch=None): argument
217 self.curr_arch = arch
218 self.arch_headers = set()
220 self.prefix = "asm-%s/" % arch
222 self.prefix = None
224 def pathFromHeader(self,header): argument
226 if self.prefix and path.startswith("asm/"):
227 path = "%s%s" % (self.prefix, path[4:])
230 def pathToHeader(self,path): argument
231 if self.prefix and path.startswith(self.prefix):
232 path = "asm/%s" % path[len(self.prefix):]
235 def setSearchedHeaders(self,headers): argument
236 self.searched = set(headers)
238 def scanForArch(self): argument
239 fparser = HeaderScanner(config=self.kernel_config)
242 for h in self.searched:
243 path = self.pathFromHeader(h)
252 fparser.parseFile(self.kernel_root + path,
253 arch=self.curr_arch, kernel_root=self.kernel_root)
255 path = self.pathFromHeader(used)
265 if not header in self.needed:
266 self.needed[header] = set()
269 self.needed[header].add(user)
271 def scanForAllArchs(self): argument
273 for arch in self.archs:
274 self.setArch(arch)
275 self.scanForArch()
277 return set(self.needed.keys())
279 def getHeaderUsers(self,header): argument
281 return set(self.needed[header])
283 def getArchHeaders(self,arch): argument
299 def __init__(self): argument
300 self.items = {}
301 self.duplicates = False
303 def parseLine(self,line): argument
316 if name in self.items: # aarg, duplicate value
317 self.duplicates = True
319 self.items[name] = value
321 def parseFile(self,path): argument
329 self.parseLine(line)
332 def getDefinitions(self): argument
334 return self.items.copy()
336 def __repr__(self): argument
337 return repr(self.items)
339 def __str__(self): argument
340 return str(self.items)