Esempio n. 1
0
    def __init__(self, initialDatabaseFile):

        # Load and generate the pattern trees
        databaseFile = open(initialDatabaseFile)
        contents = databaseFile.read()
        databaseFile.close()

        self.parserTree = database.parse(contents)
Esempio n. 2
0
    def setPatternDatabase(self, filePath):
        databaseFile = open(filePath)
        contents = databaseFile.read()
        databaseFile.close()

        self.parserTree = database.parse(contents, filePath)