
l2RTc           @   s   d  Z  d d l m Z d d l m Z m Z m Z m Z m Z m	 Z	 m
 Z
 m Z m Z d d l m Z d d g Z d e f d     YZ d e f d     YZ d	 S(
   s   
    pygments.lexers.pawn
    ~~~~~~~~~~~~~~~~~~~~

    Lexers for the Pawn languages.

    :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
i(   t
   RegexLexer(	   t   Textt   Commentt   Operatort   Keywordt   Namet   Stringt   Numbert   Punctuationt   Error(   t   get_bool_optt   SourcePawnLexert	   PawnLexerc        O   B   sD  e  Z d  Z d Z d g Z d g Z d g Z d Z d Z i d e	 j
 d f d	 e	 j
 d
 f d e d e	 j
 d f d e d e	 j
 d
 f d e f d e f d e f d e	 j f d e	 j f d e f d e d f d e j 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 f d e f d e f d  e j f d! e j f d" e f g d# 6d$ e d% f d& e j f d' e f d e f d( e f g d 6d) e	 j
 f d* e	 j f d+ e	 j d% f d, e	 j
 f d- e	 j
 f d e	 j
 d% f g d
 6d. e	 j
 d/ f d0 e	 j
 d% f d1 e	 f g d 6Z e d  Z d   Z  d   Z! RS(   s]   
    For SourcePawn source code with preprocessor directives.

    .. versionadded:: 1.6
    t
   SourcePawnt   sps   *.sps   text/x-sourcepawns   (?:\s|//.*?\n|/\*.*?\*/)+s   \s*(?:/[*].*?[*]/\s*)*s   ^#if\s+0t   if0s   ^#t   macrot   ^s   #if\s+0t   #s   \ns   \s+s   \\\ns   /(\\\n)?/(\n|(.|\n)*?[^\\]\n)s   /(\\\n)?\*(.|\n)*?\*(\\\n)?/s   [{}]s   L?"t   strings4   L?'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'s'   (\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*s   (\d+\.\d*|\.\d+|\d+[fF])[fF]?s   0x[0-9a-fA-F]+[LlUu]*s   0[0-7]+[LlUu]*s
   \d+[LlUu]*s   \*/s   [~!%^&*+=|?:<>/-]s   [()\[\],.;]ss   (case|const|continue|native|default|else|enum|for|if|new|operator|public|return|sizeof|static|decl|struct|switch)\bs   (bool|Float)\bs   (true|false)\bs   [a-zA-Z_]\w*t   roott   "s   #pops/   \\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})s	   [^\\"\n]+s   \\s   [^/\n]+s   /\*(.|\n)*?\*/s   //.*?\nt   /s	   (?<=\\)\ns   ^\s*#if.*?(?<!\\)\ns   #pushs   ^\s*#endif.*?(?<!\\)\ns   .*?\nt   Actiont   boolt   Floatt   PluginR   t   anyt	   AdminFlagt   OverrideTypet   OverrideRulet   ImmunityTypet   GroupIdt   AdminIdt   AdmAccessModet   AdminCachePartt   CookieAccesst
   CookieMenut   CookieMenuActiont   NetFlowt   ConVarBoundst   QueryCookiet   ReplySourcet   ConVarQueryResultt   ConVarQueryFinishedt   Functiont   Identityt   PluginStatust
   PluginInfot   DBResultt
   DBBindTypet
   DBPriorityt   PropTypet   PropFieldTypet   MoveTypet
   RenderModet   RenderFxt   EventHookModet	   EventHookt   FileTypet   FileTimeModet   PathTypet	   ParamTypet   ExecTypet
   DialogTypet   Handlet   KvDataTypest   NominateResultt	   MapChanget	   MenuStylet
   MenuActiont
   MenuSourcet
   RegexErrort   SDKCallTypet
   SDKLibraryt   SDKFuncConfSourcet   SDKTypet   SDKPassMethodt   RayTypet   TraceEntityFiltert   ListenOverridet	   SortOrdert   SortTypet
   SortFunc2Dt   APLRest   FeatureTypet   FeatureStatust	   SMCResultt   SMCErrort   TFClassTypet   TFTeamt   TFCondt   TFResourceTypet   Timert   TopMenuActiont   TopMenuObjectTypet   TopMenuPositiont   TopMenuObjectt   UserMsgc         K   sa   t  | d t  |  _ t   |  _ |  j rM d d l m } |  j j |  n  t j	 |  |  d  S(   Nt	   sourcemodi(   t	   FUNCTIONS(
   R
   t   Truet   smhighlightingt   sett
   _functionst#   pygments.lexers._sourcemod_builtinsRd   t   updateR    t   __init__(   t   selft   optionsRd   (    (    s8   /usr/lib/python2.7/dist-packages/pygments/lexers/pawn.pyRk   m   s    	c         c   s   x t  j |  |  D]n \ } } } | t k rs |  j rs | |  j k rR t j } qp | |  j k rp t j } qp qs n  | | | f Vq Wd  S(   N(	   R    t   get_tokens_unprocessedR   Rf   t   SM_TYPESR   t   TypeRh   t   Builtin(   Rl   t   textt   indext   tokent   value(    (    s8   /usr/lib/python2.7/dist-packages/pygments/lexers/pawn.pyRn   w   s    	(N   R   s   bools   FloatR   s   Strings   anyR   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:   s   FileTypeR<   R=   R>   R?   R@   RA   RB   RC   RD   RE   RF   RG   RH   RI   RJ   RK   RL   RM   RN   RO   RP   RQ   RR   RS   RT   RU   RV   RW   RX   RY   RZ   R[   R\   R]   R^   R_   R`   Ra   Rb   ("   t   __name__t
   __module__t   __doc__t   namet   aliasest	   filenamest	   mimetypest   _wst   _ws1R   t   PreprocR   t   Singlet	   MultilineR   R   t   CharR   R   t   Hext   Octt   IntegerR	   R   R   Rp   t   ConstantR   t   Escapet   tokensRg   Ro   Rk   Rn   (    (    (    s8   /usr/lib/python2.7/dist-packages/pygments/lexers/pawn.pyR      s   												                 		
c           B   s,  e  Z d  Z d Z d g Z d d d g Z d g Z d Z d Z i d	 e	 j
 d
 f d e	 j
 d f d e d e	 j
 d
 f d e d e	 j
 d f d e f d e f d e f d e	 j f d e	 j f d e f d e d f d e j 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 f d  e f d! e f d" e j f d# e j f d$ e f g d% 6d& e d' f d( e j f d) e f d e f d* e f g d 6d+ e	 j
 f d, e	 j f d- e	 j d' f d. e	 j
 f d/ e	 j
 f d e	 j
 d' f g d 6d0 e	 j
 d1 f d2 e	 j
 d' f d3 e	 f g d
 6Z RS(4   s:   
    For Pawn source code.

    .. versionadded:: 2.0
    t   Pawnt   pawns   *.ps   *.pwns   *.incs   text/x-pawns    (?:\s|//.*?\n|/[*][\w\W]*?[*]/)+s   \s*(?:/[*].*?[*]/\s*)*s   ^#if\s+0R   s   ^#R   R   s   #if\s+0R   s   \ns   \s+s   \\\ns   /(\\\n)?/(\n|(.|\n)*?[^\\]\n)s   /(\\\n)?\*[\w\W]*?\*(\\\n)?/s   [{}]s   L?"R   s4   L?'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'s'   (\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*s   (\d+\.\d*|\.\d+|\d+[fF])[fF]?s   0x[0-9a-fA-F]+[LlUu]*s   0[0-7]+[LlUu]*s
   \d+[LlUu]*s   \*/s   [~!%^&*+=|?:<>/-]s   [()\[\],.;]s   (switch|case|default|const|new|static|char|continue|break|if|else|for|while|do|operator|enum|public|return|sizeof|tagof|state|goto)\bs   (bool|Float)\bs   (true|false)\bs   [a-zA-Z_]\w*R   R   s   #pops/   \\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})s	   [^\\"\n]+s   \\s   [^/\n]+s   /\*(.|\n)*?\*/s   //.*?\nR   s	   (?<=\\)\ns   ^\s*#if.*?(?<!\\)\ns   #pushs   ^\s*#endif.*?(?<!\\)\ns   .*?\n(   Rv   Rw   Rx   Ry   Rz   R{   R|   R}   R~   R   R   R   R   R   R   R   R   R   R   R   R   R   R	   R   R   Rp   R   R   R   R   (    (    (    s8   /usr/lib/python2.7/dist-packages/pygments/lexers/pawn.pyR      s^   											N(   Rx   t   pygments.lexerR    t   pygments.tokenR   R   R   R   R   R   R   R   R	   t   pygments.utilR
   t   __all__R   R   (    (    (    s8   /usr/lib/python2.7/dist-packages/pygments/lexers/pawn.pyt   <module>
   s   @o