about summary refs log tree commit diff stats
path: root/miasm2/expression/expression.py
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2017-04-21 19:38:48 +0200
committerGitHub <noreply@github.com>2017-04-21 19:38:48 +0200
commit19aaed86a09be0bc1a4a79d2077b74b962e4d8ef (patch)
treeb593d0e967424f3f02eb12c0a192ece4a26321fa /miasm2/expression/expression.py
parent43f4c43cd521c9637b65fec1628d1618a612d2e1 (diff)
parent18ee3f9f2628c4fd98c46898895fb61021e23e3a (diff)
downloadmiasm-19aaed86a09be0bc1a4a79d2077b74b962e4d8ef.tar.gz
miasm-19aaed86a09be0bc1a4a79d2077b74b962e4d8ef.zip
Merge pull request #535 from commial/fix/match_expr-uses
Remove deprecated use of MatchExpr
Diffstat (limited to 'miasm2/expression/expression.py')
-rw-r--r--miasm2/expression/expression.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/miasm2/expression/expression.py b/miasm2/expression/expression.py
index bf27218b..8ea855b5 100644
--- a/miasm2/expression/expression.py
+++ b/miasm2/expression/expression.py
@@ -1400,7 +1400,7 @@ def match_expr(expr, pattern, tks, result=None):
             # We need to use a copy of result to not override it
             myresult = dict(result)
             for sub_expr, sub_pattern in zip(permut, pattern.args):
-                ret = MatchExpr(sub_expr, sub_pattern, tks, myresult)
+                ret = match_expr(sub_expr, sub_pattern, tks, myresult)
                 # If the current permutation do not match EVERY terms
                 if ret is False:
                     good = False
@@ -1420,23 +1420,23 @@ def match_expr(expr, pattern, tks, result=None):
             return False
         if expr.size != pattern.size:
             return False
-        return MatchExpr(expr.arg, pattern.arg, tks, result)
+        return match_expr(expr.arg, pattern.arg, tks, result)
 
     elif expr.is_slice():
         if not pattern.is_slice():
             return False
         if expr.start != pattern.start or expr.stop != pattern.stop:
             return False
-        return MatchExpr(expr.arg, pattern.arg, tks, result)
+        return match_expr(expr.arg, pattern.arg, tks, result)
 
     elif expr.is_cond():
         if not pattern.is_cond():
             return False
-        if MatchExpr(expr.cond, pattern.cond, tks, result) is False:
+        if match_expr(expr.cond, pattern.cond, tks, result) is False:
             return False
-        if MatchExpr(expr.src1, pattern.src1, tks, result) is False:
+        if match_expr(expr.src1, pattern.src1, tks, result) is False:
             return False
-        if MatchExpr(expr.src2, pattern.src2, tks, result) is False:
+        if match_expr(expr.src2, pattern.src2, tks, result) is False:
             return False
         return result
 
@@ -1444,21 +1444,21 @@ def match_expr(expr, pattern, tks, result=None):
         if not pattern.is_compose():
             return False
         for sub_expr, sub_pattern in zip(expr.args, pattern.args):
-            if  MatchExpr(sub_expr, sub_pattern, tks, result) is False:
+            if  match_expr(sub_expr, sub_pattern, tks, result) is False:
                 return False
         return result
 
     elif expr.is_aff():
         if not pattern.is_aff():
             return False
-        if MatchExpr(expr.src, pattern.src, tks, result) is False:
+        if match_expr(expr.src, pattern.src, tks, result) is False:
             return False
-        if MatchExpr(expr.dst, pattern.dst, tks, result) is False:
+        if match_expr(expr.dst, pattern.dst, tks, result) is False:
             return False
         return result
 
     else:
-        raise NotImplementedError("MatchExpr: Unknown type: %s" % type(expr))
+        raise NotImplementedError("match_expr: Unknown type: %s" % type(expr))
 
 
 def MatchExpr(expr, pattern, tks, result=None):