Lines Matching refs:file_obj
20 def advance_past_whitespace(file_obj):
21 c = file_obj.read(1)
23 c = file_obj.read(1)
24 file_obj.seek(-1, 1)
30 def advance_until_whitespace(file_obj):
32 c = file_obj.read(1)
37 file_obj.readline()
41 c = file_obj.read(1)
43 file_obj.seek(-1, 1)
203 def expand_brackets(file_obj):
205 c = file_obj.read(1)
208 file_obj.seek(-1, 1)
213 c = file_obj.read(1)
220 file_obj.readline()
229 def get_avc_rule_component(file_obj):
231 c = advance_past_whitespace(file_obj)
234 file_obj.read(1) #move to next char
235 c = advance_past_whitespace(file_obj)
240 single_type = advance_until_whitespace(file_obj)
243 mult_types = expand_brackets(file_obj)
281 def process_inherits_segment(file_obj):
282 inherit_keyword = file_obj.read(8)
288 advance_past_whitespace(file_obj)
289 ret_inherited_common = advance_until_whitespace(file_obj)
378 def parse_multi_line(self, line, line_type, file_obj):
380 self.process_class_line(line, file_obj)
382 self.process_common_line(line, file_obj)
384 self.process_avc_rule_line(line, file_obj)
386 self.process_avc_rule_line(line, file_obj)
408 def process_class_line(self, line, file_obj):
418 file_obj.seek(-(len(match.group(2)) + 1), 1)
419 c = advance_past_whitespace(file_obj)
425 inherited = process_inherits_segment(file_obj)
427 c = advance_past_whitespace(file_obj)
429 permissions = expand_brackets(file_obj)
435 def process_common_line(self, line, file_obj):
443 file_obj.seek(-(len(match.group(2)) + 1), 1)
444 c = advance_past_whitespace(file_obj)
448 permissions = expand_brackets(file_obj)
454 def process_avc_rule_line(self, line, file_obj):
462 file_obj.seek(-(len(match.group(2)) + 1), 1)
465 source_types = get_avc_rule_component(file_obj)
471 target_types = get_avc_rule_component(file_obj)
477 c = advance_past_whitespace(file_obj)
479 file_obj.read(1)
482 classes = get_avc_rule_component(file_obj)
488 permissions = get_avc_rule_component(file_obj)