Exemple #1
0
 def clearParseActions(self):
     HEXNUM.setParseAction(lambda x: x)
     REGISTER.setParseAction(lambda x: x)
     CONNECTIVE.setParseAction(lambda x: x)
     EQ_SYMBOL.setParseAction(lambda x: x)
     MEMREF.setParseAction(lambda x: x)
     RELATION.setParseAction(lambda x: x)
     FORMULA.setParseAction(lambda x: x)
Exemple #2
0
 def setupParseActions(self):
     HEXNUM.setParseAction(self.createConstExpr)
     REGISTER.setParseAction(self.getRegisterExpr)
     CONNECTIVE.setParseAction(self.createNewLogicExpr)
     EQ_SYMBOL.setParseAction(self.createEqSymbol)
     MEMREF.setParseAction(self.createNewMemref)
     RELATION.setParseAction(self.createNewRelation)
     FORMULA.setParseAction(self.createNewFormula)
 def setupParseActions(self):
     HEXNUM.setParseAction(self.createConstExpr)
     REGISTER.setParseAction(self.getRegisterExpr)
     CONNECTIVE.setParseAction(self.createNewLogicExpr)
     EQ_SYMBOL.setParseAction(self.createEqSymbol)
     MEMREF.setParseAction(self.createNewMemref)
     RELATION.setParseAction(self.createNewRelation)
     FORMULA.setParseAction(self.createNewFormula)
 def clearParseActions(self):
     HEXNUM.setParseAction(lambda x:x)
     REGISTER.setParseAction(lambda x:x)
     CONNECTIVE.setParseAction(lambda x:x)
     EQ_SYMBOL.setParseAction(lambda x:x)
     MEMREF.setParseAction(lambda x:x)
     RELATION.setParseAction(lambda x:x)
     FORMULA.setParseAction(lambda x:x)
Exemple #5
0
 def add_debug_actions(self):
     HEXNUM.addParseAction(lambda x: self.debugLog("Hexnum %s" % str(x)))
     REGISTER.addParseAction(
         lambda x: self.debugLog("Register %s" % str(x)))
     CONNECTIVE.addParseAction(
         lambda x: self.debugLog("Connective %s" % str(x)))
     EQ_SYMBOL.addParseAction(
         lambda x: self.debugLog("Eqsymbol %s" % str(x)))
     MEMREF.addParseAction(lambda x: self.debugLog("Memref %s" % str(x)))
     RELATION.addParseAction(
         lambda x: self.debugLog("Relation %s" % str(x)))
     FORMULA.addParseAction(lambda x: self.debugLog("Formula %s" % str(x)))
Exemple #6
0
    def enableDebug(self, verbose=False):
        self.debug_mode = True

        if verbose:
            HEXNUM.setDebug()
            REGISTER.setDebug()
            CONNECTIVE.setDebug()
            EQ_SYMBOL.setDebug()
            MEMREF.setDebug()
            RELATION.setDebug()
            FORMULA.setDebug()

        self.add_debug_actions()
    def enableDebug(self, verbose=False):
        self.debug_mode = True

        if verbose:
            HEXNUM.setDebug()
            REGISTER.setDebug()
            CONNECTIVE.setDebug()
            EQ_SYMBOL.setDebug()
            MEMREF.setDebug()
            RELATION.setDebug()
            FORMULA.setDebug()

        self.add_debug_actions()
 def add_debug_actions(self):
     HEXNUM.addParseAction(lambda x:self.debugLog(
                 "Hexnum %s" % str(x)))
     REGISTER.addParseAction(lambda x:self.debugLog(
                 "Register %s" % str(x)))
     CONNECTIVE.addParseAction(lambda x:self.debugLog(
                 "Connective %s" % str(x)))
     EQ_SYMBOL.addParseAction(lambda x:self.debugLog(
                 "Eqsymbol %s" % str(x)))
     MEMREF.addParseAction(lambda x:self.debugLog(
                 "Memref %s" % str(x)))
     RELATION.addParseAction(lambda x:self.debugLog(
                 "Relation %s" % str(x)))
     FORMULA.addParseAction(lambda x:self.debugLog(
                 "Formula %s" % str(x)))
Exemple #9
0
 def testCONNECTIVE(self):
     CONNECTIVE.parseString('v')