ó Z-Qc@s…dZddlZddlmZmZmZmZmZmZddl m Z m Z m Z m Z mZmZmZmZmZmZddlmZddlmZddlmZdd d d d d dgZdefd„ƒYZd efd„ƒYZd efd„ƒYZd efd„ƒYZdefd„ƒYZ d efd„ƒYZ!d efd„ƒYZ"defd„ƒYZ#dS(sË pygments.lexers.dotnet ~~~~~~~~~~~~~~~~~~~~~~ Lexers for .net languages. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. iÿÿÿÿN(t RegexLexertDelegatingLexertbygroupstincludetusingtthis( t PunctuationtTexttCommenttOperatortKeywordtNametStringtNumbertLiteraltOther(tget_choice_opt(t unistring(tXmlLexert CSharpLexert NemerleLexertBooLexert VbNetLexertCSharpAspxLexertVbNetAspxLexert FSharpLexercBsÓeZdZdZddgZdgZdgZejej Bej BZ idd6de j e je je je jd d e j e je je je je je je je je jd d 6d e jddddddƒdde jdddddddddddƒ d d6ZiZeZxejƒD]\ZZidededee e!ƒe"j#e$e%ƒfde"j&fd e$fd!e$fd"e'j(fd#e'j)fd$e$fd%e%fd&e%fd'e*fd(e*fd)e*j+fd*e,fd+e'j-fd,ee.e$e.ƒfd-e.fd.ee.e%ƒfd/e.j/fd0ee.e$ƒd1fd2ee.e$ƒd3fee"fgd46ee"j0d5fgd16d6e$d5fd7ed8e"j1d5fgd36ee`_ source code. Additional options accepted: `unicodelevel` Determines which Unicode characters this lexer allows for identifiers. The possible values are: * ``none`` -- only the ASCII letters and numbers are allowed. This is the fastest selection. * ``basic`` -- all Unicode characters from the specification except category ``Lo`` are allowed. * ``full`` -- all Unicode characters as specified in the C# specs are allowed. Note that this means a considerable slowdown since the ``Lo`` category has more than 40,000 characters in it! The default value is ``basic``. *New in Pygments 0.8.* sC#tcsharpsc#s*.css text/x-csharps@?[_a-zA-Z][a-zA-Z0-9_]*tnones@?[_t]t[s]*tbasics @?(?:_|[^tLutLltLttLmtLotNls])s[^tNdtPctCftMntMctfulls ^([ \t]*(?:s(?:\[\])?\s+)+?)(s )(\s*)(\()s ^\s*\[.*?\]s[^\S\n]+s\\\ns//.*?\ns /[*].*?[*]/s\ns[~!%^&*()+=|\[\]:;,.<>/?-]s[{}]s @"(""|[^"])*"s"(\\\\|\\"|[^"\n])*["\n]s '\\.'|'[^\\]'sA[0-9](\.[0-9]*)?([eE][+-][0-9]+)?[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?sZ#[ \t]*(if|endif|else|elif|define|undef|line|error|warning|region|endregion|pragma)\b.*?\ns\b(extern)(\s+)(alias)\bsû(abstract|as|async|await|base|break|case|catch|checked|const|continue|default|delegate|do|else|enum|event|explicit|extern|false|finally|fixed|for|foreach|goto|if|implicit|in|interface|internal|is|lock|new|null|operator|out|override|params|private|protected|public|readonly|ref|return|sealed|sizeof|stackalloc|static|switch|this|throw|true|try|typeof|unchecked|unsafe|virtual|void|while|get|set|new|partial|yield|add|remove|value|alias|ascending|descending|from|group|into|orderby|select|where|join|equals)\bs (global)(::)sk(bool|byte|char|decimal|double|dynamic|float|int|long|object|sbyte|short|string|uint|ulong|ushort|var)\b\??s(class|struct)(\s+)tclasss(namespace|using)(\s+)t namespacetroots#pops(?=\()t(s|\.)+cKsit|d|jjƒdƒ}||jkrE|jj|ƒ|_n|j||_tj||dS(Nt unicodelevelR( Rttokenstkeyst _all_tokenst __class__tprocess_tokendeft_tokensRt__init__(tselftoptionstlevel((s@/usr/local/lib/python2.7/site-packages/pygments/lexers/dotnet.pyR6€s (3t__name__t __module__t__doc__tnametaliasest filenamest mimetypestret MULTILINEtDOTALLtUNICODEtflagstuniRR R!R"R$R%R&R'R(R)t allexcepttlevelsR0tTruettoken_variantstitemst levelnametcs_identRRRR tFunctionRRt AttributeRtSinglet MultilineR tCharR tPreprocR tTypetClasst NamespaceR6(((s@/usr/local/lib/python2.7/site-packages/pygments/lexers/dotnet.pyRsZ   |]                 )c"BsReZdZdZdgZdgZdgZejej Bej BZ e dddde je je je je jd d e je je je je je je je je je jd d d e jddddddƒdde jdddddddddddƒ d ƒZiZeZxejƒD]\ZZidedede e!e"ƒe#j$e%e&ƒfde#j'fde%fd e%fd!e(j)fd"e(j*fd#e%fd$e+d%fd&e+d'fd(e+d)fd*ed+e,fd,e,fd-ee#fd.e e#e&ƒd/fd0e&fd1e&fd2e+fd3e+fd4e+j-fd5e.fd6e.fd7e(j/fd8e e,e%e,ƒfd9e,fd:e e,e&ƒfd;e,j0fd<ed=e e&e,j0ƒfd>e e,e%ƒd?fd@e e,e%ƒdAfee#fgdB6ee#j1dCfgd?6dDe%dCfdEedFe#j2dCfgdA6dGe+fd-ee#fd.e e#e&ƒd/fdHe+fdIe+dCfgd%6dJe+fd-ee#fd.e e#e&ƒd/fd(e+dKfdLe+dCfgd'6dMe+fd(e+dKfdLe+dCfgd)6dNe,fdOe&fee#fdPe.fdQe&dKfdRe&dCfgd/6ee`_ source code. Additional options accepted: `unicodelevel` Determines which Unicode characters this lexer allows for identifiers. The possible values are: * ``none`` -- only the ASCII letters and numbers are allowed. This is the fastest selection. * ``basic`` -- all Unicode characters from the specification except category ``Lo`` are allowed. * ``full`` -- all Unicode characters as specified in the C# specs are allowed. Note that this means a considerable slowdown since the ``Lo`` category has more than 40,000 characters in it! The default value is ``basic``. *New in Pygments 1.5.* tNemerletnemerles*.nstext/x-nemerleRs@?[_a-zA-Z][a-zA-Z0-9_]*Rs@?[_RRs]*R*s @?(?:_|[^RR R!R"R#R$s])s[^R%R&R'R(R)s ^([ \t]*(?:s(?:\[\])?\s+)+?)(s )(\s*)(\()s ^\s*\[.*?\]s[^\S\n]+s\\\ns//.*?\ns /[*].*?[*]/s\ns\$\s*"s splice-strings\$\s*<#ssplice-string2s<#srecursive-strings (<\[)\s*(s:)?s\]\>s\$s(\$)(\()ssplice-string-contents[~!%^&*()+=|\[\]:;,.<>/?-]s[{}]s @"(""|[^"])*"s"(\\\\|\\"|[^"\n])*["\n]s '\\.'|'[^\\]'s0[xX][0-9a-fA-F]+[Ll]?s*[0-9](\.[0-9]*)?([eE][+-][0-9]+)?[flFLdD]?sZ#[ \t]*(if|endif|else|elif|define|undef|line|error|warning|region|endregion|pragma)\b.*?\ns\b(extern)(\s+)(alias)\bsã(abstract|and|as|base|catch|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|syntax|this|throw|true|try|type|typeof|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\bs (global)(::)so(bool|byte|char|decimal|double|float|int|long|object|sbyte|short|string|uint|ulong|ushort|void|array|list)\b\??s (:>?)\s*(s\??)s"(class|struct|variant|module)(\s+)R+s(namespace|using)(\s+)R,R-s#pops(?=\()R.s|\.)+s[^"$]s\\"t"s[^#<>$]s#pushs#>s[^#<>]sif|matchs[~!%^&*+=|\[\]:;,.<>/?-\\"$ ]s\d+s\(s\)cKsit|d|jjƒdƒ}||jkrE|jj|ƒ|_n|j||_tj||dS(NR/R( RR0R1R2R3R4R5RR6(R7R8R9((s@/usr/local/lib/python2.7/site-packages/pygments/lexers/dotnet.pyR6s  (4R:R;R<R=R>R?R@RARBRCRDREtdictRFRR R!R"R$R%R&R'R(R)RGRHR0RIRJRKRLRMRRRR RNRRRORRPRQR R RRR RSRTRURVR6(((s@/usr/local/lib/python2.7/site-packages/pygments/lexers/dotnet.pyR‹sœ   {\                                      cBsùeZdZdZdgZdgZdgZidefdej fdej dfd e fd efd efd e j fd ejfdejfde fdefdefdeeeƒdfdeeeƒdfdeeeƒdfdejfdejfdejfdej fdefdejfdefdejfd ejfd!ejjfd"ejfgd#6dej d$fd%ej d&fd'ej fd(ej fgd6dejd&fgd6dejd&fgd6d)ejd&fgd6ZRS(*s< For `Boo `_ source code. tBootboos*.boos text/x-boos\s+s (#|//).*$s/[*]tcomments []{}:(),.;[]s\\\ns\\s(in|is|and|or|not)\bs/(\\\\|\\/|[^/\s])/s@/(\\\\|\\/|[^/])*/s=~|!=|==|<<|>>|[-+/*%=<>&^|]sO(as|abstract|callable|constructor|destructor|do|import|enum|event|final|get|interface|internal|of|override|partial|private|protected|public|return|set|static|struct|transient|virtual|yield|super|and|break|cast|continue|elif|else|ensure|except|for|given|goto|if|in|is|isa|not|or|otherwise|pass|raise|ref|try|unless|when|while|from|as)\bsdef(?=\s+\(.*?\))s (def)(\s+)tfuncnames (class)(\s+)t classnames(namespace)(\s+)R,sã(?R?R@RRRPRQRR tWordR tRegexR RR tBuiltintDoubleR tFloattOcttHextIntegertLongRNRURVR0(((s@/usr/local/lib/python2.7/site-packages/pygments/lexers/dotnet.pyR*sR                       cBs2eZdZdZddgZddgZddgZejej BZ ide j fd e fd e fd efd efd ejfdefdejfdefdedfdedfdeee ƒdfdeee ƒdfdeee ƒdfdejfdejfdefdedfd e fd!ejfd"ejfd#ejfd$ejfd%ejfd&e fgd'6d(efd)ed*fd+efgd6d,e jd*fd-e d*fgd6d,e jd*fgd6d,e jd*fgd6d.e j d*fgd6d e fd/ed*fd-e d*fgd6Z!RS(0sm For `Visual Basic.NET `_ source code. sVB.netsvb.nettvbnets*.vbs*.bass text/x-vbnets text/x-vbas ^\s*<.*?>s\s+s\ns rem\b.*?\ns'.*?\nsŠ#If\s.*?\sThen|#ElseIf\s.*?\sThen|#End\s+If|#Const|#ExternalSource.*?\n|#End\s+ExternalSource|#Region.*?\n|#End\s+Region|#ExternalChecksums [\(\){}!#,.:]s9Option\s+(Strict|Explicit|Compare)\s+(On|Off|Binary|Text)sù(?>=|<<|>>|:=|<=|>=|<>|[-&*/\\^+=<>]RYtstrings[a-zA-Z_][a-zA-Z0-9_]*[%&@!#$]?s#.*?#s%(\d+\.\d*|\d*\.\d+)([fF][+-]?[0-9]+)?s\d+([SILDFR]|US|UI|UL)?s&H[0-9a-f]+([SILDFR]|US|UI|UL)?s&O[0-7]+([SILDFR]|US|UI|UL)?s_\nR-s""s"C?s#pops[^"]+s[a-z_][a-z0-9_]*ts[a-z_][a-z0-9_.]*s?(Function|Sub|Property|Class|Structure|Enum|Module|Namespace)\b("R:R;R<R=R>R?R@RARBt IGNORECASERER RORRRSRR t DeclarationRRTR R`R RtDateR RdRgtVariableRNRURVR0(((s@/usr/local/lib/python2.7/site-packages/pygments/lexers/dotnet.pyRmsj                          tGenericAspxLexercBseZdZdZgZgZejZide e j e e j ƒfde e eƒe e eƒƒfde eƒfde eƒfgd6ZRS(s" Lexer for ASP.NET pages. saspx-gens(<%[@=#]?)(.*?)(%>)s()(.*?)()s (.+?)(?=<)s.+R-(R:R;R<R=R?R@RARCRERR tTagRRRR0(((s@/usr/local/lib/python2.7/site-packages/pygments/lexers/dotnet.pyRrÏs cBsMeZdZdZdgZddddddgZgZd„Zd „ZRS( s8 Lexer for highligting C# within ASP.NET pages. saspx-css*.aspxs*.asaxs*.ascxs*.ashxs*.asmxs*.axdcKs tt|ƒjtt|dS(N(tsuperRR6RRr(R7R8((s@/usr/local/lib/python2.7/site-packages/pygments/lexers/dotnet.pyR6ñscCsHtjd|tjƒdk r"dStjd|tjƒdk rDdSdS(NsPage\s*Language="C#"gš™™™™™É?sscript[^>]+language=["\']C#g333333Ã?(RAtsearchtItNone(ttext((s@/usr/local/lib/python2.7/site-packages/pygments/lexers/dotnet.pyt analyse_textõs( R:R;R<R=R>R?R@R6Ry(((s@/usr/local/lib/python2.7/site-packages/pygments/lexers/dotnet.pyRçs  cBsMeZdZdZdgZddddddgZgZd„Zd „ZRS( sF Lexer for highligting Visual Basic.net within ASP.NET pages. saspx-vbs*.aspxs*.asaxs*.ascxs*.ashxs*.asmxs*.axdcKs tt|ƒjtt|dS(N(RtRR6RRr(R7R8((s@/usr/local/lib/python2.7/site-packages/pygments/lexers/dotnet.pyR6scCsHtjd|tjƒdk r"dStjd|tjƒdk rDdSdS(NsPage\s*Language="Vb"gš™™™™™É?sscript[^>]+language=["\']vbg333333Ã?(RARuRvRw(Rx((s@/usr/local/lib/python2.7/site-packages/pygments/lexers/dotnet.pyRy s( R:R;R<R=R>R?R@R6Ry(((s@/usr/local/lib/python2.7/site-packages/pygments/lexers/dotnet.pyRüs  cDBs)eZdZdZdgZddgZdgZdddd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIgDZdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrg)ZdsZ ddtdudvdwdxdydzd1g Z d{Z d|Z d}d~dd€dd‚dƒd„d…d†d‡dˆd‰dŠd‹dŒddDdŽddgZ id‘ejfd’ejfd“ejfgd”6d•efd–ejjfd—ejd˜fd™ejfdšejfd›edœfddžjeƒefdŸdžjeƒefd e e e fefddžje ƒejfddžje ƒejfd¡ejfd¢efd£ejfd¤ej fd¥ej!fd¦ej"fd§ej#fd¨ej$fd©ej$fdªefd«ej%dfd¬ej&fgd­6d®efd¯ed°fd±ed²fd³efgdœ6d´ej%fe'd”ƒdµej%fd«ej%d²fgd6d•efdWe(fd¶ejfd·ejd²fd¸ed²fgd˜6Z)RS(¹s: For the F# language. *New in Pygments 1.5.* tFSharptfsharps*.fss*.fsis text/x-fsharptabstracttandtastasserttbasetbeginR+tdefaulttdelegatetdosdo!tdonetdowncasttdowntoteliftelseRjt exceptiontexterntfalsetfinallytfortfuntfunctiontglobaltiftintinherittinlinet interfacetinternaltlazytletslet!tmatchtmembertmoduletmutableR,tnewtnulltoftopentortoverridetprivatetpublictrectreturnsreturn!tsigtstatictstructtthenttottruettryttypetupcasttusesuse!tvaltvoidtwhentwhiletwithtyieldsyield!s!=t#s&&t&s\(s\)s\*s\+t,s-\.s->t-s\.\.s\.s::s:=s:>t:s;;t;s<-t]t>s\?\?s\?s\[s\[\|s\[Rt_t`t{s\|\]s\|t}t~s<@t=s@>s[!$%&*+\./:<=>?@^|~-]tasrtlandtlortlsltlxortmodtnots[!?~]s[=<>@^|&+\*/$%-]tunittinttfloattboolRltchartlisttarraytbytetsbytetint16tuint16tuint32tint64tuint64nativeintt unativeinttdecimaltfloat32tsingletdoubles\\[\\\"\'ntbr]s \\[0-9]{3}s\\x[0-9a-fA-F]{2}sescape-sequences\s+sfalse|true|\(\)|\[\]s!\b([A-Z][A-Za-z0-9_\']*)(?=\s*\.)tdotteds\b([A-Z][A-Za-z0-9_\']*)s//.*?\ns \(\*(?!\))R]s\b(%s)\bt|s(%s)s (%s|%s)?%ss/#[ \t]*(if|endif|else|line|nowarn|light)\b.*?\ns [^\W\d][\w']*s\d[\d_]*s0[xX][\da-fA-F][\da-fA-F_]*s0[oO][0-7][0-7_]*s0[bB][01][01_]*s(-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)s7'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))'s'.'t'RYs[~?][a-z][\w\']*:R-s[^(*)]+s\(\*s#pushs\*\)s#pops[(*)]s[^\\"]+s\\\ns[A-Z][A-Za-z0-9_\']*(?=\s*\.)s[A-Z][A-Za-z0-9_\']*s[a-z_][A-Za-z0-9_\']*(*R:R;R<R=R>R?R@tkeywordstkeyoptst operatorstword_operatorst prefix_symst infix_symst primitivesR tEscapeRR RbtPseudoRVRURRPtjoinR R R`RTRSR RgRfRetBinaryRdRRRcRqRRR0(((s@/usr/local/lib/python2.7/site-packages/pygments/lexers/dotnet.pyRsŽ   !'!                           ($R<RAtpygments.lexerRRRRRRtpygments.tokenRRRR R R R R RRt pygments.utilRtpygmentsRRFtpygments.lexers.webRt__all__RRRRRrRRR(((s@/usr/local/lib/python2.7/site-packages/pygments/lexers/dotnet.pyt s  .F qŸCb