ó Z-Qc@shdZddlZddlmZmZmZmZmZddlm Z m Z m Z ddl m Z mZmZmZmZmZmZmZmZdddd d d d d gZdefd„ƒYZdefd„ƒYZdefd„ƒYZd efd„ƒYZd efd„ƒYZd efd„ƒYZd efd„ƒYZd efd„ƒYZdS(sÉ pygments.lexers.asm ~~~~~~~~~~~~~~~~~~~ Lexers for assembly languages. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. iÿÿÿÿN(t RegexLexertincludetbygroupstusingtDelegatingLexer(tDLexertCppLexertCLexer( tTexttNametNumbertStringtCommentt PunctuationtOthertKeywordtOperatortGasLexert ObjdumpLexert DObjdumpLexertCppObjdumpLexert CObjdumpLexert LlvmLexert NasmLexert Ca65Lexerc Bs,eZdZdZdgZddgZdgZdZdZded ed Z d Z ie d ƒe d e j fde e jdfde jfe e jdfdefgd6e e jfeefde e jfe ejfdedfdedfe dƒe d ƒgd6de deejeee jeƒfde de deejeee jeejeƒfe e jfe ejfde e jfde ejfdejfdedfdedfe dƒe d ƒg d6defdefd efgd 6d!efgd6Zd"„ZRS(#s' For Gas (AT&T) assembly code. tGAStgass*.ss*.Ss text/x-gass "(\\"|[^"])*"s[a-zA-Z$._0-9@-]s (?:[a-zA-Z$_]s*|\.s+)s(?:0[xX][a-zA-Z0-9]+|\d+)t whitespacet:s\.sdirective-argsslock|rep(n?z)?|data\d+sinstruction-argss[\r\n]+troott@s#pops#.*?$t punctuations([a-z0-9]+)( )(<)(s)(>)s)([-+])(t%t$s $'(.|\\')'s\ns\s+s#.*?\ns [-*,.():]+cCs<tjd|tjƒrtStjd|tjƒr8dSdS(Ns^\.(text|data|section)s^\.\w+gš™™™™™¹?(tretmatchtMtTrue(ttext((s=/usr/local/lib/python2.7/site-packages/pygments/lexers/asm.pyt analyse_text\s(t__name__t __module__t__doc__tnametaliasest filenamest mimetypeststringtchart identifiertnumberRR tLabelt AttributetFunctionRtConstantR R tIntegerR RtHexR tVariabletCharttokensR'(((s=/usr/local/lib/python2.7/site-packages/pygments/lexers/asm.pyRsX                     cBsùeZdZdZdgZdgZdgZdZidee j e e e ƒfdee e j e ƒfdedeeje e e je eje ƒfded eeje e e je ƒfd ed eed ee e j e eje eeƒƒfd ed eed ee e j e eje e ƒfd ed eedee e j e ejƒfde fdededee e j e e je e je ejƒfdedee e j e e je e jƒfdefg d6ZRS(s) For the output of 'objdump -dr' tobjdumps *.objdumpstext/x-objdumps [0-9A-Za-z]s(.*?)(:)( +file format )(.*?)$s"(Disassembly of section )(.*?)(:)$t(s++)( )(<)(.*?)([-+])(0[xX][A-Za-z0-9]+)(>:)$s+)( )(<)(.*?)(>:)$s( *)(s +:)(\t)((?:s )+)( * )([a-zA-Z].*?)$s )+)( *)(.*?)$s )+)$s \t\.\.\.$s (\t\t\t)(s +:)( )([^\t]+)(\t)(.*?)([-+])(0xs+)$s+:)( )([^\t]+)(\t)(.*?)$s[^\n]+\nR(R(R)R*R+R,R-R.thexRR R3R RR R R8R5RRtPropertyR6RR;(((s=/usr/local/lib/python2.7/site-packages/pygments/lexers/asm.pyRcs@      !   cBs8eZdZdZdgZdgZdgZd„ZRS(s= For the output of 'objdump -Sr on compiled D files' s d-objdumps *.d-objdumpstext/x-d-objdumpcKs tt|ƒjtt|dS(N(tsuperRt__init__RR(tselftoptions((s=/usr/local/lib/python2.7/site-packages/pygments/lexers/asm.pyRA£s(R(R)R*R+R,R-R.RA(((s=/usr/local/lib/python2.7/site-packages/pygments/lexers/asm.pyRšs    cBsDeZdZdZdddgZdddgZdgZd„ZRS( s? For the output of 'objdump -Sr on compiled C++ files' s cpp-objdumps c++-objdumbs cxx-objdumps *.cpp-objdumps *.c++-objdumps *.cxx-objdumpstext/x-cpp-objdumpcKs tt|ƒjtt|dS(N(R@RRARR(RBRC((s=/usr/local/lib/python2.7/site-packages/pygments/lexers/asm.pyRA°s(R(R)R*R+R,R-R.RA(((s=/usr/local/lib/python2.7/site-packages/pygments/lexers/asm.pyR§s  cBs8eZdZdZdgZdgZdgZd„ZRS(s= For the output of 'objdump -Sr on compiled C files' s c-objdumps *.c-objdumpstext/x-c-objdumpcKs tt|ƒjtt|dS(N(R@RRARR(RBRC((s=/usr/local/lib/python2.7/site-packages/pygments/lexers/asm.pyRA½s(R(R)R*R+R,R-R.RA(((s=/usr/local/lib/python2.7/site-packages/pygments/lexers/asm.pyR´s    cBs8eZdZdZdgZdgZdgZdZdedZie dƒed e j fe d ƒd ee j fd ee j j fd e j jfde j j fdee j fde j jfdeefdefdefdefg d6defdefgd6defdejfdefgd 6ZRS(s! For LLVM assembly code. tLLVMtllvms*.lls text/x-llvms"[^"]*?"s([-a-zA-Z$._][-a-zA-Z$._0-9]*|t)Rs\s*:tkeywordR Rs%\d+s@\d+t!s!\d+sc?s0[xX][a-fA-F0-9]+s,-?\d+(?:[.]\d+)?(?:[eE][-+]?\d+(?:[.]\d+)?)?s[=<>{}\[\]()*.,!]|x\bRs(\n|\s)+s;.*?\nsn(begin|end|true|false|declare|define|global|constant|private|linker_private|internal|available_externally|linkonce|linkonce_odr|weak|weak_odr|appending|dllimport|dllexport|common|default|hidden|protected|extern_weak|external|thread_local|zeroinitializer|undef|null|to|tail|target|triple|datalayout|volatile|nuw|nsw|nnan|ninf|nsz|arcp|fast|exact|inbounds|align|addrspace|section|alias|module|asm|sideeffect|gc|dbg|ccc|fastcc|coldcc|x86_stdcallcc|x86_fastcallcc|arm_apcscc|arm_aapcscc|arm_aapcs_vfpcc|cc|c|signext|zeroext|inreg|sret|nounwind|noreturn|noalias|nocapture|byval|nest|readnone|readonly|inlinehint|noinline|alwaysinline|optsize|ssp|sspreq|noredzone|noimplicitfloat|naked|type|opaque|eq|ne|slt|sgt|sle|sge|ult|ugt|ule|uge|oeq|one|olt|ogt|ole|oge|ord|uno|ueq|une|x|add|fadd|sub|fsub|mul|fmul|udiv|sdiv|fdiv|urem|srem|frem|shl|lshr|ashr|and|or|xor|icmp|fcmp|phi|call|trunc|zext|sext|fptrunc|fpext|uitofp|sitofp|fptouifptosi|inttoptr|ptrtoint|bitcast|select|va_arg|ret|br|switch|invoke|unwind|unreachable|malloc|alloca|free|load|store|getelementptr|extractelement|insertelement|shufflevector|getresult|extractvalue|insertvalue)\bs9void|float|double|x86_fp80|fp128|ppc_fp128|label|metadatas i[1-9]\d*(R(R)R*R+R,R-R.R/R1RR R3R9tGlobalt AnonymousR R R RR RtTypeR;(((s=/usr/local/lib/python2.7/site-packages/pygments/lexers/asm.pyRÁs8         , c Bs9eZdZdZdgZddgZdgZdZdZdZ d Z d Z e d e Z d d dZ dZdZdZdZdZejejBZiedƒdejdfedejfdeeejejejƒdfeedfeejdfeej dfde!fgd6e e"fee#j$fe e#j%fe e#fe e#j&fe e#j'fedƒeej(feej)fde!dfedƒg d6dejfdej*dfd ejdfgd6d e!fd!e!fd"ej*fgd6d#e+fd$e,fd%ejfee,j-feej.fgd6Z/RS(&s) For Nasm (Intel) assembly code. tNASMtnasms*.asms*.ASMs text/x-nasms[a-zA-Z$._?][a-zA-Z0-9$._?#@~]*s8(?:0[xX][0-9a-fA-F]+|$0[0-9a-fA-F]*|[0-9]+[0-9a-fA-F]*h)s[0-7]+qs[01]+bs[0-9]+s\.e?s"(\\"|[^"\n])*"|s'(\\'|[^'\n])*'|s`(\\`|[^`\n])*`s(?:res|d)[bwdqt]|timessor[0-9][0-5]?[bwd]|[a-d][lh]|[er]?[a-d]x|[er]?[sb]p|[er]?[sd]i|[c-gs]s|st[0-7]|mm[0-7]|cr[0-4]|dr[0-367]|tr[3-7]sseg|wrt|strictsbyte|[dq]?wordsˆBITS|USE16|USE32|SECTION|SEGMENT|ABSOLUTE|EXTERN|GLOBAL|ORG|ALIGN|STRUC|ENDSTRUC|COMMON|CPU|GROUP|UPPERCASE|IMPORT|EXPORT|LIBRARY|MODULERs^\s*%tpreprocRs(%s)(\s+)(equ)sinstruction-argss[\r\n]+RRs#pops[^;\n]+s;.*?\ns\ns[ \t]+s;.*s [,():\[\]]+s[&|^<>+*/%~-]+s[$]+(0R(R)R*R+R,R-R.R1thexntoctntbinntdecntfloatnR/tdeclkwtregistertwordopttypet directivesR"t IGNORECASEt MULTILINEtflagsRR tPreprocR R3RR6Rt DeclarationR5RR R R8tOcttFloatR7tBuiltinR9tSingleR RtWordRKR;(((s=/usr/local/lib/python2.7/site-packages/pygments/lexers/asm.pyR"sf                      cBsÃeZdZdZdgZdgZejZide j fde fde j fdefdejfdefd efd ejfd ejfd ejfd efde fg d6Zd„ZRS(sA For ca65 assembler sources. *New in Pygments 1.6.* tca65s*.ss;.*s\s+s[a-z_.@$][\w.@$]*:s·((ld|st)[axy]|(in|de)[cxy]|asl|lsr|ro[lr]|adc|sbc|cmp|cp[xy]|cl[cvdi]|se[cdi]|jmp|jsr|bne|beq|bpl|bmi|bvc|bvs|bcc|bcs|p[lh][ap]|rt[is]|brk|nop|ta[xy]|t[xy]a|txs|tsx|and|ora|eor|bit)\bs \.[a-z0-9_]+s[-+~*/^&|!<>=]s "[^"\n]*.s '[^'\n]*.s\$[0-9a-f]+|[0-9a-f]+h\bs \d+|%[01]+s [#,.:()=]s[a-z_.@$][\w.@$]*RcCs tjd|tjƒrdSdS(Ns^\s*;gÍÌÌÌÌÌì?(R"R#RZ(RBR&((s=/usr/local/lib/python2.7/site-packages/pygments/lexers/asm.pyR'‹s(R(R)R*R+R,R-R"RYR[R RaRR R3RtPseudoRR R:R R8R7R R;R'(((s=/usr/local/lib/python2.7/site-packages/pygments/lexers/asm.pyRks(             (R*R"tpygments.lexerRRRRRtpygments.lexers.compiledRRRtpygments.tokenRR R R R R RRRt__all__RRRRRRRR(((s=/usr/local/lib/python2.7/site-packages/pygments/lexers/asm.pyt s (@ L7   aI