Lines Matching refs:self
17 def __init__(self, line='<line not provided>', reader=None): argument
19 BaseException.__init__(self,
23 BaseException.__init__(self, 'Error parsing line: %s' % line)
32 def __init__(self, proto='', desc='', ret=''): argument
33 self.proto = proto
34 self.desc = desc
35 self.ret = ret
37 def proto_break_down(self): argument
46 capture = proto_re.match(self.proto)
71 def __init__(self, filename): argument
72 self.reader = open(filename, 'r')
73 self.line = ''
74 self.helpers = []
76 def parse_helper(self): argument
77 proto = self.parse_proto()
78 desc = self.parse_desc()
79 ret = self.parse_ret()
82 def parse_proto(self): argument
91 capture = p.match(self.line)
94 self.line = self.reader.readline()
97 def parse_desc(self): argument
99 capture = p.match(self.line)
108 self.line = self.reader.readline()
109 if self.line == ' *\n':
113 capture = p.match(self.line)
120 def parse_ret(self): argument
122 capture = p.match(self.line)
131 self.line = self.reader.readline()
132 if self.line == ' *\n':
136 capture = p.match(self.line)
143 def run(self): argument
145 offset = self.reader.read().find('* Start of BPF helper function descriptions:')
148 self.reader.seek(offset)
149 self.reader.readline()
150 self.reader.readline()
151 self.line = self.reader.readline()
155 helper = self.parse_helper()
156 self.helpers.append(helper)
160 self.reader.close()
161 print('Parsed description of %d helper function(s)' % len(self.helpers),
172 def __init__(self, helpers): argument
173 self.helpers = helpers
175 def print_header(self): argument
178 def print_footer(self): argument
181 def print_one(self, helper): argument
184 def print_all(self): argument
185 self.print_header()
186 for helper in self.helpers:
187 self.print_one(helper)
188 self.print_footer()
197 def print_header(self): argument
271 def print_footer(self): argument
351 def print_proto(self, helper): argument
377 def print_one(self, helper): argument
378 self.print_proto(helper)