
%^Tc           @   sr  d  Z  d d l Z d d l m Z m Z m Z m Z m Z m Z d d l	 m
 Z
 m Z m Z m Z m Z m Z m Z m Z d d l m Z m Z d d l m Z d d d	 d
 d d d d g Z d e f d     YZ d e f d     YZ d	 e f d     YZ d
 e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d S(   s   
    pygments.lexers.c_like
    ~~~~~~~~~~~~~~~~~~~~~~

    Lexers for other C-like languages.

    :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
iN(   t
   RegexLexert   includet   bygroupst   inheritt   wordst   default(   t   Textt   Commentt   Operatort   Keywordt   Namet   Stringt   Numbert   Punctuation(   t   CLexert   CppLexer(   t   _mql_builtinst	   PikeLexert	   NesCLexert	   ClayLexert   ECLexert	   ValaLexert	   CudaLexert	   SwigLexert   MqlLexerc        ?   B   s   e  Z d  Z d Z d g Z d d g Z d g Z i e dM dC dD e f dE e j	 f dF e
 e e  dG f dH e f e g dI 6dJ e j dK f dL e dK f g dG 6Z RS(N   s[   
    For `Pike <http://pike.lysator.liu.se/>`_ source code.

    .. versionadded:: 2.0
    t   Piket   pikes   *.pikes   *.pmods   text/x-piket   catcht   newt   privatet	   protectedt   publict   gauget   throwt   throwst   classt	   interfacet	   implementt   abstractt   extendst   fromt   thist   supert   constantt   finalt   statict   importt   uset   externt   inlinet   protot   breakt   continuet   ift   elset   fort   whilet   dot   switcht   caset   ast   int   versiont   returnt   truet   falset   nullt   __VERSION__t	   __MAJOR__t	   __MINOR__t	   __BUILD__t   __REAL_VERSION__t   __REAL_MAJOR__t   __REAL_MINOR__t   __REAL_BUILD__t   __DATE__t   __TIME__t   __FILE__t   __DIR__t   __LINE__t   __AUTO_BIGNUM__t   __NT__t   __PIKE__t   __amigaos__t   _Pragmat   static_assertt   definedt   sscanft   suffixs   \bs   (bool|int|long|float|short|double|char|string|object|void|mapping|array|multiset|program|function|lambda|mixed|[a-z_][a-z0-9_]*_t)\bs   (class)(\s+)t	   classnames   [~!%^&*+=|?:<>/@-]t
   statementss   [a-zA-Z_]\w*s   #pops   \s*(?=>)(=   R   s   newR   R   R   R    s   throwR"   R#   R$   R%   R&   R'   R(   s   thiss   superR+   s   finalR-   R.   R/   R0   R1   s   protoR3   R4   R5   s   elseR7   R8   R9   R:   R;   R<   s   ins   versionR?   R@   RA   RB   RC   RD   RE   RF   RG   RH   RI   RJ   RK   RL   RM   RN   RO   RP   RQ   RR   RS   RT   RU   RV   RW   (   t   __name__t
   __module__t   __doc__t   namet   aliasest	   filenamest	   mimetypesR   R	   t   TypeR   R   R   R   R
   t   Classt   tokens(    (    (    s:   /usr/lib/python2.7/dist-packages/pygments/lexers/c_like.pyR      s0   		        		
c           B   sl   e  Z d  Z d Z d g Z d g Z d g Z i e d) d d e f e d* d d e j	 f e
 g d( 6Z RS(+   s   
    For `nesC <https://github.com/tinyos/nesc>`_ source code with preprocessor
    directives.

    .. versionadded:: 2.0
    t   nesCt   nescs   *.ncs   text/x-nescsrcR&   R<   t   asynct   atomict   callt   commandt	   componentt
   componentst   configurationt   eventR'   t   generict   implementationt   includesR$   t   moduleR   t   noracet   postt   providest   signalt   taskt   usesRX   s   \bt	   nx_structt   nx_uniont	   nx_int8_tt
   nx_int16_tt
   nx_int32_tt
   nx_int64_tt
   nx_uint8_tt   nx_uint16_tt   nx_uint32_tt   nx_uint64_tRZ   (   s   abstracts   asRg   Rh   s   callRj   Rk   Rl   Rm   Rn   s   extendsRo   Rp   Rq   s	   interfaces   modules   newRs   Rt   Ru   s   signalRw   Rx   (
   Ry   Rz   R{   R|   R}   R~   R   R   R   R   (   R[   R\   R]   R^   R_   R`   Ra   R   R	   Rb   R   Rd   (    (    (    s:   /usr/lib/python2.7/dist-packages/pygments/lexers/c_like.pyR   B   s"   			    	c           B   s*  e  Z d  Z d Z d g Z d g Z d g Z i d e f d e j	 f d e j
 f d e f d	 e f d
 e f d e j f d e j f d e j f d e f d e d f d e d f g d 6d e j f d e f g d 6d e f g d 6d e d f e d  g d 6d e d f e d  e d  g d 6Z RS(   sT   
    For `Clay <http://claylabs.com/clay/>`_ source.

    .. versionadded:: 2.0
    t   Clays   *.clayt   clays   text/x-clays   \ss   //.*?$s   /(\\\n)?[*](.|\n)*?[*](\\\n)?/sK  \b(public|private|import|as|record|variant|instance|define|overload|default|external|alias|rvalue|ref|forward|inline|noinline|forceinline|enum|var|and|or|not|if|else|goto|return|while|switch|case|break|continue|for|in|true|false|try|catch|throw|finally|onerror|staticassert|eval|when|newtype|__FILE__|__LINE__|__COLUMN__|__ARG__)\bs   [~!%^&*+=|:<>/-]s   [#(){}\[\],;.]s   0x[0-9a-fA-F]+[LlUu]*s
   \d+[LlUu]*s   \b(true|false)\bs   (?i)[a-z_?][\w?]*s   """t   tdqst   "t   dqst   roots   (?i)\\(x[0-9a-f]{2}|.)t   .t   stringss   \nt   nls   #pop(   R[   R\   R]   R^   R`   R_   Ra   R   R   t
   Singlelinet	   MultilineR	   R   R   R   t   Hext   IntegerR
   t   BuiltinR   t   EscapeR   Rd   (    (    (    s:   /usr/lib/python2.7/dist-packages/pygments/lexers/c_like.pyR   _   s6   								c        -   B   s   e  Z d  Z d Z d g Z d d g Z d d g Z i e dC d2 d3 e f e dD d2 d3 e j	 f d< e
 e e  d= f d> e j f e g d? 6d@ e j dA f dB e dA f g d= 6Z RS(E   sU   
    For eC source code with preprocessor directives.

    .. versionadded:: 1.5
    t   eCt   ecs   *.ecs   *.ehs   text/x-echdrs   text/x-ecsrct   virtualR#   R   R   t   propertyR.   t   deleteR   t   new0t   renewt   renew0t   definet   gett   sett   remotet	   dllexportt	   dllimportt   stdcallt   subclasst   __on_register_modulet	   namespacet   usingt   typed_objectt
   any_objectt   increft   registert   watcht   stopwatchingt   firewatcherst	   watchablet   class_designert   class_fixedt   class_no_expansiont   issett   class_default_propertyt   property_categoryt
   class_datat   class_propertyt	   thisclasst   dbtablet   dbindext   database_opent   dbfieldRX   s   \bt   uintt   uint16t   uint32t   uint64t   boolt   bytet   unichart   int64s   (class)(\s+)RY   s   (null|value|this)\bRZ   s   [a-zA-Z_]\w*s   #pops   \s*(?=>)(+   R   s   classs   privates   publics   propertys   importR   s   newR   R   R   R   s   gets   setR   R   R   R   s   subclassR   s	   namespaceR   R   R   R   s   registerR   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   (   R   R   R   R   s   boolR   R   R   (   R[   R\   R]   R^   R_   R`   Ra   R   R	   Rb   R   R   R
   R   R   Rc   Rd   (    (    (    s:   /usr/lib/python2.7/dist-packages/pygments/lexers/c_like.pyR      s0   	        	
c        /   B   s  e  Z d  Z d Z d d g Z d d g Z d g Z i d e j d f d	 e	 f d
 e	 f d e	 f d e j
 f d e j f g d 6d e d f d e j f d e f d e j f d e j f d e j f d e j f d e j f d e f d e e e j e  f d e e e j  f d e f e d d= d> e f e d d= d> e j f dW e e j e	  dX f dY e e j e	  dZ f d[ e e e j  f e d d= d> e j f dt e j f du e f g dv 6e d  e  dw  g dx 6e d  e dv  dy e f dz e d{ f g dw 6d| e d{ f d} e j! f d~ e f d e f d e f g d 6d e j d f d e j d{ f d e j d{ f d e f g d 6du e j" d{ f g dZ 6d e j d{ f g dX 6Z# RS(   sW   
    For Vala source code with preprocessor directives.

    .. versionadded:: 1.1
    t   Valat   valat   vapis   *.valas   *.vapis   text/x-valas   ^\s*#if\s+0t   if0s   \ns   \s+s   \\\ns   //(\n|(.|\n)*?[^\\]\n)s   /(\\\n)?[*](.|\n)*?[*](\\\n)?/t
   whitespaces   [L@]?"t   strings4   L?'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'s   (?s)""".*?"""s%   (\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[lL]?s   (\d+\.\d*|\.\d+|\d+[fF])[fF]?s   0x[0-9a-fA-F]+[Ll]?s   0[0-7]+[Ll]?s   \d+[Ll]?s   [~!%^&*+=|?:<>/-]s2   (\[)(Compact|Immutable|(?:Boolean|Simple)Type)(\])s$   (\[)(CCode|(?:Integer|Floating)Type)s
   [()\[\],.]R<   t   baseR3   R;   R   t	   constructR4   R   R   R9   R6   t   enumt   finallyR7   t   foreachR   R5   R=   t   ist   lockR   t   outt   paramsR?   R   t   sizeofR:   R)   R!   t   tryt   typeofR8   t   yieldRX   s   \bR&   t   constt   delegatet   dynamict   ensuresR0   R1   t   internalt   overridet   ownedR   R   R   t   reft   requiresRv   R-   R"   t   unownedt   varR   t   volatilet   weakt   yieldss   (namespace|using)(\s+)R   s)   (class|errordomain|interface|struct)(\s+)R#   s   (\.)([a-zA-Z_]\w*)t   voidR   t   chart   doublet   floatt   intt   int8t   int16t   int32R   t   longt   shortt   size_tt   ssize_tt   time_tt   ucharR   t   uint8R   R   R   t   ulongR   t   ushorts   (true|false|null)\bs   [a-zA-Z_]\w*RZ   t	   statementR   s   [{}]t   ;s   #popR   s/   \\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})s	   [^\\"\n]+s   \\s   ^\s*#if.*?(?<!\\)\ns   #pushs   ^\s*#el(?:se|if).*\ns   ^\s*#endif.*?(?<!\\)\ns   .*?\ns   [a-zA-Z_][\w.]*(!   s   ass   bases   breaks   cases   catchR   s   continues   defaults   deletes   dos   elseR   R   s   forR   s   gets   ifs   inR   R   s   news   outR   s   returns   setR   s   switchs   thiss   throwR   R   s   whileR   (   s   abstractR   R   R   R   s   externs   inlineR   R   R   s   privates	   protecteds   publics   refR   s   signals   statics   throwsR   s   vars   virtualR   R   R   (   s   voids   bools   charR   s   floats   intR   R   R   s   int64s   longR   R   R   s   stringR   R   s   uintR   s   uint16s   uint32s   uint64R   s   unicharR   ($   R[   R\   R]   R^   R_   R`   Ra   R   t   PreprocR   t   SingleR   R   t   CharR   t   FloatR   t   OctR   R   R   R   R
   t	   DecoratorR   R	   t   Declarationt	   Namespacet	   AttributeRb   R   R   R   R   Rc   Rd   (    (    (    s:   /usr/lib/python2.7/dist-packages/pygments/lexers/c_like.pyR      s   								       	   							c        ,   B   s   e  Z d  Z d Z d d g Z d d g Z d g Z e dI  Z e dJ  Z	 e dK  Z
 e dL  Z e dM  Z e dN  Z dH   Z RS(O   s|   
    For NVIDIA `CUDA™ <http://developer.nvidia.com/category/zone/cuda-zone>`_
    source.

    .. versionadded:: 1.6
    t   CUDAs   *.cus   *.cuht   cudat   cus   text/x-cudat
   __device__t
   __global__t   __host__t   __noinline__t   __forceinline__t   __constant__t
   __shared__t   __restrict__t   char1t   uchar1t   char2t   uchar2t   char3t   uchar3t   char4t   uchar4t   short1t   ushort1t   short2t   ushort2t   short3t   ushort3t   short4t   ushort4t   int1t   uint1t   int2t   uint2t   int3t   uint3t   int4t   uint4t   long1t   ulong1t   long2t   ulong2t   long3t   ulong3t   long4t   ulong4t	   longlong1t
   ulonglong1t	   longlong2t
   ulonglong2t   float1t   float2t   float3t   float4t   double1t   double2t   dim3t   gridDimt   blockIdxt   blockDimt	   threadIdxt   warpSizet   __threadfence_blockt   __threadfencet   __threadfence_systemt   __syncthreadst   __syncthreads_countt   __syncthreads_andt   __syncthreads_ors   <<<s   >>>c         c   s   x t  j |  |  D] \ } } } | t k r | |  j k rI t j } q | |  j k rd t j } q | |  j k r t j } q | |  j	 k r t j
 } q | |  j k r t j } q | |  j k r t j } q n  | | | f Vq Wd  S(   N(   R   t   get_tokens_unprocessedR
   t   variable_qualifiersR	   Rb   t   vector_typest	   variablesR   t   execution_confst   Pseudot   function_qualifierst   Reservedt	   functionst   Function(   t   selft   textt   indext   tokent   value(    (    s:   /usr/lib/python2.7/dist-packages/pygments/lexers/c_like.pyRA  8  s    "(   R  R  R  R  R  (   R  R  R  R	  (+   R
  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R  R   R!  R"  R#  R$  R%  R&  R'  R(  R)  R*  R+  R,  R-  R.  R/  R0  R1  R2  R3  R4  (   R5  R6  R7  R8  R9  (   R:  R;  R<  R=  R>  R?  R@  (   s   <<<s   >>>(   R[   R\   R]   R^   R`   R_   Ra   R   RG  RB  RC  RD  RI  RE  RA  (    (    (    s:   /usr/lib/python2.7/dist-packages/pygments/lexers/c_like.pyR     s.   			      	 	c        S   B   s~   e  Z d  Z d Z d g Z d d g Z d g Z d Z i d e j	 f d e f d	 e
 j f e g d
 6Z e d^  Z d]   Z RS(_   sT   
    For `SWIG <http://www.swig.org/>`_ source code.

    .. versionadded:: 2.0
    t   SWIGt   swigs   *.swgs   *.is	   text/swigg{Gz?s   (%[a-z_][a-z0-9_]*)s   \$\**\&?\w+s   ##*[a-zA-Z_]\w*RZ   s   %applys   %defines	   %directors   %enddefs
   %exceptions   %extends   %features	   %fragments   %ignores
   %immutables   %imports   %includes   %inlines   %inserts   %modules
   %newobjects   %nspaces   %pragmas   %renames   %shared_ptrs	   %templates
   %typechecks   %typemaps   %args
   %attributes   %bangs   %begins	   %callbacks   %catchess   %clears	   %constants	   %copyctors   %csconsts   %csconstvalues   %csenums   %csmethodmodifierss   %csnothrowexceptions   %defaults   %defaultctors   %defaultdtors   %defineds   %deletes
   %delobjects   %descriptors   %exceptionclasss   %exceptionvars   %extend_smart_pointers
   %fragmentss   %headers   %ifcpluspluss   %ignorewarns	   %implicits   %implicitconvs   %inits
   %javaconsts   %javaconstvalues	   %javaenums   %javaexceptions   %javamethodmodifierss   %kwargss   %luacodes   %mutables   %naturalvars   %nestedworkarounds	   %perlcodes
   %pythonabcs   %pythonappends   %pythoncallbacks   %pythoncodes   %pythondynamics   %pythonmaybecalls   %pythonnondynamics   %pythonprepends
   %refobjects   %shadows   %sizeofs   %trackobjectss   %typess   %unrefobjects   %varargss   %warns   %warnfilterc         C   sR   d } t  j d |  t  j  } x- | D]% } | t j k rD d } Pq% d } q% W| S(   Ni    s   ^\s*(%[a-z_][a-z0-9_]*)g\(\?gQ?(   t   ret   findallt   MR   t   swig_directives(   RL  t   rvt   matchest   m(    (    s:   /usr/lib/python2.7/dist-packages/pygments/lexers/c_like.pyt   analyse_textx  s    
(R   s   %applys   %defines	   %directors   %enddefs
   %exceptions   %extends   %features	   %fragments   %ignores
   %immutables   %imports   %includes   %inlines   %inserts   %modules
   %newobjects   %nspaces   %pragmas   %renames   %shared_ptrs	   %templates
   %typechecks   %typemaps   %args
   %attributes   %bangs   %begins	   %callbacks   %catchess   %clears	   %constants	   %copyctors   %csconsts   %csconstvalues   %csenums   %csmethodmodifierss   %csnothrowexceptions   %defaults   %defaultctors   %defaultdtors   %defineds   %deletes
   %delobjects   %descriptors   %exceptionclasss   %exceptionvars   %extend_smart_pointers
   %fragmentss   %headers   %ifcpluspluss   %ignorewarns	   %implicits   %implicitconvs   %inits
   %javaconsts   %javaconstvalues	   %javaenums   %javaexceptions   %javamethodmodifierss   %kwargss   %luacodes   %mutables   %naturalvars   %nestedworkarounds	   %perlcodes
   %pythonabcs   %pythonappends   %pythoncallbacks   %pythoncodes   %pythondynamics   %pythonmaybecalls   %pythonnondynamics   %pythonprepends
   %refobjects   %shadows   %sizeofs   %trackobjectss   %typess   %unrefobjects   %varargss   %warns   %warnfilter(   R[   R\   R]   R^   R_   R`   Ra   t   priorityR
   RJ  R   R   R   Rd   R   RU  RY  (    (    (    s:   /usr/lib/python2.7/dist-packages/pygments/lexers/c_like.pyR   J  s<   			                	c           B   s   e  Z d  Z d Z d d d d d g Z d d d	 g Z d
 g Z i e e j	 d d e
 f e e j d d e
 j f e e j d d e j f e e j d d e j f e e j d d d d e j f e g d 6Z RS(   s   
    For `MQL4 <http://docs.mql4.com/>`_ and
    `MQL5 <http://www.mql5.com/en/docs>`_ source code.

    .. versionadded:: 2.0
    t   MQLt   mqlt   mq4t   mq5t   mql4t   mql5s   *.mq4s   *.mq5s   *.mqhs
   text/x-mqlRX   s   \bt   prefixs   (clr)?RZ   (   R[   R\   R]   R^   R_   R`   Ra   R   R   t   keywordsR	   t   c_typesRb   t   typesR
   RJ  t	   constantst   Constantt   colorsR   Rd   (    (    (    s:   /usr/lib/python2.7/dist-packages/pygments/lexers/c_like.pyR     s   		(    R]   RR  t   pygments.lexerR    R   R   R   R   R   t   pygments.tokenR   R   R   R	   R
   R   R   R   t   pygments.lexers.c_cppR   R   t   pygments.lexersR   t   __all__R   R   R   R   R   R   R   R   (    (    (    s:   /usr/lib/python2.7/dist-packages/pygments/lexers/c_like.pyt   <module>
   s   .:(3&b0=