ThirdParty/Pygments/pygments/lexers/asm.py

changeset 4697
c2e9bf425554
parent 4172
4f20dba37ab6
child 5713
6762afd9f963
equal deleted inserted replaced
4696:bf4d19a7cade 4697:c2e9bf425554
3 pygments.lexers.asm 3 pygments.lexers.asm
4 ~~~~~~~~~~~~~~~~~~~ 4 ~~~~~~~~~~~~~~~~~~~
5 5
6 Lexers for assembly languages. 6 Lexers for assembly languages.
7 7
8 :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. 8 :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
9 :license: BSD, see LICENSE for details. 9 :license: BSD, see LICENSE for details.
10 """ 10 """
11 11
12 import re 12 import re
13 13
85 (r'\n', Text), 85 (r'\n', Text),
86 (r'\s+', Text), 86 (r'\s+', Text),
87 (r'#.*?\n', Comment) 87 (r'#.*?\n', Comment)
88 ], 88 ],
89 'punctuation': [ 89 'punctuation': [
90 (r'[-*,.():]+', Punctuation) 90 (r'[-*,.()\[\]!:]+', Punctuation)
91 ] 91 ]
92 } 92 }
93 93
94 def analyse_text(text): 94 def analyse_text(text):
95 if re.match(r'^\.(text|data|section)', text, re.M): 95 if re.match(r'^\.(text|data|section)', text, re.M):
284 # instructions 284 # instructions
285 r'|add|fadd|sub|fsub|mul|fmul|udiv|sdiv|fdiv|urem|srem|frem|shl' 285 r'|add|fadd|sub|fsub|mul|fmul|udiv|sdiv|fdiv|urem|srem|frem|shl'
286 r'|lshr|ashr|and|or|xor|icmp|fcmp' 286 r'|lshr|ashr|and|or|xor|icmp|fcmp'
287 287
288 r'|phi|call|trunc|zext|sext|fptrunc|fpext|uitofp|sitofp|fptoui' 288 r'|phi|call|trunc|zext|sext|fptrunc|fpext|uitofp|sitofp|fptoui'
289 r'|fptosi|inttoptr|ptrtoint|bitcast|select|va_arg|ret|br|switch' 289 r'|fptosi|inttoptr|ptrtoint|bitcast|addrspacecast'
290 r'|select|va_arg|ret|br|switch'
290 r'|invoke|unwind|unreachable' 291 r'|invoke|unwind|unreachable'
291 r'|indirectbr|landingpad|resume' 292 r'|indirectbr|landingpad|resume'
292 293
293 r'|malloc|alloca|free|load|store|getelementptr' 294 r'|malloc|alloca|free|load|store|getelementptr'
294 295

eric ide

mercurial