summaryrefslogtreecommitdiff
path: root/pygments/lexers/asm.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygments/lexers/asm.py')
-rw-r--r--pygments/lexers/asm.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pygments/lexers/asm.py b/pygments/lexers/asm.py
index b522450c..3d2933d6 100644
--- a/pygments/lexers/asm.py
+++ b/pygments/lexers/asm.py
@@ -468,9 +468,11 @@ class NasmLexer(RegexLexer):
r'mm[0-7]|cr[0-4]|dr[0-367]|tr[3-7]')
wordop = r'seg|wrt|strict'
type = r'byte|[dq]?word'
- directives = (r'BITS|USE16|USE32|SECTION|SEGMENT|ABSOLUTE|EXTERN|GLOBAL|'
+ # Directives must be followed by whitespace, otherwise CPU will match
+ # cpuid for instance.
+ directives = (r'(?:BITS|USE16|USE32|SECTION|SEGMENT|ABSOLUTE|EXTERN|GLOBAL|'
r'ORG|ALIGN|STRUC|ENDSTRUC|COMMON|CPU|GROUP|UPPERCASE|IMPORT|'
- r'EXPORT|LIBRARY|MODULE')
+ r'EXPORT|LIBRARY|MODULE)\s+')
flags = re.IGNORECASE | re.MULTILINE
tokens = {