'Compiles the regular expressions required to parse the inventory and
stores them in self.patterns.'

def _compile_patterns(self):

    self.patterns['section'] = re.compile('^\\[\n                                                                                ([^:\\]\\s]+)                                                    #    group    name    (see    groupname    below)\n                                                                                (?::(\\w+))?                                                    #    optional    :    and    tag    name\n                                                                \\]\n                                                                \\s*                                                                                                    #    ignore    trailing    whitespace\n                                                                (?:\\#.*)?                                                                            #    and/or    a    comment    till    the\n                                                                $                                                                                                            #    end    of    the    line\n                                                ', re.X)
    self.patterns['groupname'] = re.compile('^\n                                                                ([^:\\]\\s]+)\n                                                                \\s*                                                                                                    #    ignore    trailing    whitespace\n                                                                (?:\\#.*)?                                                                            #    and/or    a    comment    till    the\n                                                                $                                                                                                            #    end    of    the    line\n                                                ', re.X)
