示例#1
0
 def __init__(self, name, line_content, regex_str, primary_key_groups, log_type, convertions):
     self.name = name
     self.line_content = line_content
     self.regex_str = regex_str
     self.regex = regex.compile(self.regex_str)
     self.primary_key_groups = primary_key_groups
     self.log_type = log_type
     self.convertions = convertions
示例#2
0
 def __init__(self, parser_list):
     self._parsers = parser_list
     self._parsers_dict = dict(
         (parser.name, parser) for parser in self._parsers)
     if IMPORTED_RE:
         return
     forward, backward = self._create_concatenated_regexes()
     self._forward_regex = regex.compile(forward)
     self._backward_regex = regex.compile(backward)
     self._forward_parsers_indexes = self._get_indexes_of_groups_for_parsers(
         self._parsers)
     self._backward_parsers_indexes = self._get_indexes_of_groups_for_parsers(
         reversed(self._parsers))
     self._numbers_in_list = self._number_in_list()
     self._forward_group_index_to_regex = self._create_group_index_to_regex_name(
         self._forward_parsers_indexes)
     self._backward_group_index_to_regex = self._create_group_index_to_regex_name(
         self._backward_parsers_indexes)
示例#3
0
 def __init__(self, name, line_content, regex_str, primary_key_groups,
              log_type, convertions):
     self.name = name
     self.line_content = line_content
     self.regex_str = regex_str
     self.regex = regex.compile(self.regex_str)
     self.primary_key_groups = primary_key_groups
     self.log_type = log_type
     self.convertions = convertions
示例#4
0
 def __init__(self, parser_list):
     self._parsers = parser_list
     self._parsers_dict = dict((parser.name, parser) for parser in self._parsers)
     if IMPORTED_RE:
         return
     forward, backward = self._create_concatenated_regexes()
     self._forward_regex = regex.compile(forward)
     self._backward_regex = regex.compile(backward)
     self._forward_parsers_indexes = self._get_indexes_of_groups_for_parsers(self._parsers)
     self._backward_parsers_indexes = self._get_indexes_of_groups_for_parsers(
         reversed(self._parsers)
     )
     self._numbers_in_list = self._number_in_list()
     self._forward_group_index_to_regex = self._create_group_index_to_regex_name(
         self._forward_parsers_indexes
     )
     self._backward_group_index_to_regex = self._create_group_index_to_regex_name(
         self._backward_parsers_indexes
     )