about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--miasm/arch/ia32_arch.py4
-rw-r--r--miasm/core/parse_ad.py2
2 files changed, 4 insertions, 2 deletions
diff --git a/miasm/arch/ia32_arch.py b/miasm/arch/ia32_arch.py
index c81f2a18..7a00f178 100644
--- a/miasm/arch/ia32_arch.py
+++ b/miasm/arch/ia32_arch.py
@@ -1750,7 +1750,9 @@ class x86_mn:
 
     @classmethod
     def parse_mnemo(self, l):
-        tokens = [t for t in shlex.shlex(l)]
+        wordsplitted = shlex.shlex(l)
+        wordsplitted.wordchars += '.' # Because labels sometimes begin with dot
+        tokens = [t for t in wordsplitted]
         prefix = []
         if not tokens:
             raise ValueError('cannot parse mnemo?', l)
diff --git a/miasm/core/parse_ad.py b/miasm/core/parse_ad.py
index 3c1868ac..8f5ca00d 100644
--- a/miasm/core/parse_ad.py
+++ b/miasm/core/parse_ad.py
@@ -102,7 +102,7 @@ t_COLON    = r':'
 t_OFFSET  = r'OFFSET'
 
 def t_NAME(t):
-    r'[a-zA-Z_][a-zA-Z0-9_]*'
+    r'\.L[A-Z]*[0-9]+|[a-zA-Z_][a-zA-Z0-9_]*'
     if t.value.upper() in keywords:
         t.type = t.value.upper()
         t.value = t.value.lower()