# Path: sourceutils/codeTree/CodeTreeWalker.py
# class CodeTreeWalker:
#   
#     def __init__(self, projectRoot):
#         self.projectRoot = projectRoot
#     
#     def setFilenameFilterRegex(self, r):
#         self.filterRegex = re.compile(r)
#         
#     def __iter__(self):
#         for (dirpath, unused_dirnames, filenames) in os.walk(self.projectRoot):
#             for name in filenames:
#                 if not self.isOfInterest(name): continue
#                 absoluteName = dirpath + '/' + name
#                 yield absoluteName
#         
#     def getDirForFilename(self, filename):
#         return '/'.join(filename.split('/')[:-1])
# 
#     def isOfInterest(self, filename):
#         return self.filterRegex.match(filename)


from sourceutils.codeTree.CodeTreeWalker import CodeTreeWalker
from PythonCFGToPrunedCFG import PythonCFGToPrunedCFG
import sys
#!/usr/bin/env python2


def usage():
    print('usage: %s <codeTreeRoot>' % (sys.argv[0]))
        
def main(projectRoot, f, r):
   
    print('Creating filtered CFGs for %s' %(projectRoot))
    

# Path: sourceutils/codeTree/CodeTreeWalker.py
# class CodeTreeWalker:
#   
#     def __init__(self, projectRoot):
#         self.projectRoot = projectRoot
#     
#     def setFilenameFilterRegex(self, r):
#         self.filterRegex = re.compile(r)
#         
#     def __iter__(self):
#         for (dirpath, unused_dirnames, filenames) in os.walk(self.projectRoot):
#             for name in filenames:
#                 if not self.isOfInterest(name): continue
#                 absoluteName = dirpath + '/' + name
#                 yield absoluteName
#         
#     def getDirForFilename(self, filename):
#         return '/'.join(filename.split('/')[:-1])
# 
#     def isOfInterest(self, filename):
#         return self.filterRegex.match(filename)


# Path: sourceutils/pythonCFGFilter/create.py
from sourceutils.codeTree.CodeTreeWalker import CodeTreeWalker
from PythonCFGToPrunedCFG import PythonCFGToPrunedCFG
import sys

#!/usr/bin/env python2


def usage():
    print('usage: %s <codeTreeRoot>' % (sys.argv[0]))
        
def main(projectRoot, f, r):
   
    print('Creating filtered CFGs for %s' %(projectRoot))
    

    codeTreeWalker = CodeTreeWalker(projectRoot)