tools/docco/t_parse.py
branchpy33
changeset 3723 99aa837b6703
parent 3721 0c93dd8ff567
child 3789 5bc95e1f3dd4
equal deleted inserted replaced
3722:29c11b905751 3723:99aa837b6703
   111        for mark in markers:
   111        for mark in markers:
   112            if len(mark)>1:
   112            if len(mark)>1:
   113               raise ValueError("Marks must be single characters: "+repr(mark))
   113               raise ValueError("Marks must be single characters: "+repr(mark))
   114        # compile the regular expressions if needed
   114        # compile the regular expressions if needed
   115        self.marker_dict = marker_dict = {}
   115        self.marker_dict = marker_dict = {}
   116        for (mark, rgex) in list(marker_to_regex_dict.items()):
   116        for mark, rgex in marker_to_regex_dict.items():
   117            if type(rgex) == StringType:
   117            if type(rgex) == StringType:
   118               rgex = re.compile(rgex)
   118               rgex = re.compile(rgex)
   119            marker_dict[mark] = rgex
   119            marker_dict[mark] = rgex
   120        # determine the parse sequence
   120        # determine the parse sequence
   121        parse_seq = []
   121        parse_seq = []