about summary refs log tree commit diff stats
path: root/miasm/core/cpu.py
diff options
context:
space:
mode:
Diffstat (limited to 'miasm/core/cpu.py')
-rw-r--r--miasm/core/cpu.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/miasm/core/cpu.py b/miasm/core/cpu.py
index 7a1cacff..7df9f991 100644
--- a/miasm/core/cpu.py
+++ b/miasm/core/cpu.py
@@ -393,7 +393,7 @@ variable = pyparsing.Word(pyparsing.alphas + "_$.", pyparsing.alphanums + "_")
 variable.setParseAction(cb_parse_id)
 operand = str_int | variable
 
-base_expr = pyparsing.operatorPrecedence(operand,
+base_expr = pyparsing.infixNotation(operand,
                                [(notop,   1, pyparsing.opAssoc.RIGHT, cb_op_not),
                                 (andop, 2, pyparsing.opAssoc.RIGHT, cb_op_and),
                                 (xorop, 2, pyparsing.opAssoc.RIGHT, cb_op_xor),
@@ -408,7 +408,7 @@ default_prio = 0x1337
 
 
 def isbin(s):
-    return re.match('[0-1]+$', s)
+    return re.match(r'[0-1]+$', s)
 
 
 def int2bin(i, l):
@@ -1301,7 +1301,7 @@ class cls_mn(with_metaclass(metamn, object)):
     @classmethod
     def fromstring(cls, text, loc_db, mode = None):
         global total_scans
-        name = re.search('(\S+)', text).groups()
+        name = re.search(r'(\S+)', text).groups()
         if not name:
             raise ValueError('cannot find name', text)
         name = name[0]