def parse(self, text, project, out):
        m = self.patterns.search(text)
        if not m:      
            if text:
                # Print the raw text if there is no pattern match
                out << Block("log") << text << Close << Flush

        else:
            # Find the appropriate handler to pretty print the matched text
            while m:
                groupdict = m.groupdict()
                groups = m.groups()
                offset = m.end()
                
                for name in groupdict:
                    if groupdict[name]:
                        extras = ""
                        m2 = reExtraLine.match(text, offset+1)
                        while m2:   
                            extras += m2.groups()[0]
                            offset = m2.end()
                            m2 = reExtraLine.match(text, offset)
                            
                        handler = globals()["print%s" % name]
                        if handler:
                            index = self.patterns.groupindex[name]
                            handler(groups[index:], extras, project, out)
                            out.flush()
                            
                m = self.patterns.search(text, offset)

            out << Flush

# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
dataset/ETHPy150Open joehewitt/devon/devon/parsers/gcc.py/GCCParser.parse/original