
"][Tc           @   s   d  Z  d d l Z d d l 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 g Z d e f d     YZ d e f d     YZ d S(	   s   
    pygments.lexers.prolog
    ~~~~~~~~~~~~~~~~~~~~~~

    Lexers for Prolog and Prolog-like languages.

    :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
iN(   t
   RegexLexert   bygroups(   t   Textt   Commentt   Operatort   Keywordt   Namet   Stringt   Numbert   Punctuationt   PrologLexert   LogtalkLexerc           B   s  e  Z d  Z d Z d g Z d d d d g Z d g Z e j e j	 BZ
 i d e j f d	 e j 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 j f d e j f d e f d e f d e j f d e j f d e f d e f d e f d e f d e e j e  f d e e j e e  f d e e j e e  f d e j f d e j f d  e j  f d! e f g d" 6d# e j d$ f d	 e j d% f d& e j f d' e j f g d
 6Z! d(   Z" RS()   s!   
    Lexer for Prolog files.
    t   Prologt   prologs   *.ecls   *.prologs   *.pros   *.pls   text/x-prologs   ^#.*s   /\*s   nested-comments   %.*s   0\'.s   0b[01]+s   0o[0-7]+s   0x[0-9a-fA-F]+s   \d\d?\'[a-zA-Z0-9]+s%   (\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?s   \d+s   [\[\](){}|.,;!]s   :-|-->s`   "(?:\\x[0-9a-fA-F]+\\|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|\\[0-7]+\\|\\["\nabcefnrstv]|[^\\"])*"s   '(?:''|[^'])*'s   is\bs5   (<|>|=<|>=|==|=:=|=|/|//|\*|\+|-)(?=\s|[a-zA-Z0-9\[])s   (mod|div|not)\bt   _s   ([a-z]+)(:)uB   ([a-zÀ-῿぀-퟿-￯][\w$À-῿぀-퟿-￯]*)(\s*)(:-|-->)u>   ([a-zÀ-῿぀-퟿-￯][\w$À-῿぀-퟿-￯]*)(\s*)(\()u3   [a-zÀ-῿぀-퟿-￯][\w$À-῿぀-퟿-￯]*u!   [#&*+\-./:<=>?@\\^~¡-¿‐-〿]+s	   [A-Z_]\w*u   \s+|[ -‏￰-￾￯]t   roots   \*/s   #pops   #pushs   [^*/]+s   [*/]c         C   s
   d |  k S(   Ns   :-(    (   t   text(    (    s:   /usr/lib/python2.7/dist-packages/pygments/lexers/prolog.pyt   analyse_textT   s    (#   t   __name__t
   __module__t   __doc__t   namet   aliasest	   filenamest	   mimetypest   ret   UNICODEt	   MULTILINEt   flagsR   t   Singlet	   MultilineR   t   CharR   t   Bint   Octt   Hext   Integert   FloatR	   t   Doublet   AtomR   R   R   R   t	   Namespacet   FunctionR   t   Variablet   tokensR   (    (    (    s:   /usr/lib/python2.7/dist-packages/pygments/lexers/prolog.pyR
      sV   										c        T   B   s  e  Z d  Z d Z d g Z d d g Z d g Z i d e d f d e f d	 e 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 j f d e f d e f d e f d e f d e f d e f d e f d e f d e f d e f d e f d e f d e f d e f d  e f d! e f d" e f d# e f d$ e f d% e f d& e f d' e f d( e f d) e f d* e f d+ e f d, e f d- e f d. e f d/ e f d0 e f d1 e f d2 e f d3 e f d4 e f d5 e f d6 e f d7 e f d8 e f d9 e f d: e f d; e f d< e f d= e f d> e f d? e f d@ e f dA e f dB e f dC e f dD e f dE e f dF e f dG e f dH e f dI e f dJ e f dK e f dL e f dM e f dN e f dO e f dP e f dQ e f dR e f dS e f dT e f dU e	 f dV e	 f dW e dX f gQ dY 6dZ e f dW e d[ f d\ e j f d] e f d^ e f g dX 6d_ e dY f d` e dY f da e db f dc e dY f dd e dY f de e dY f df e dY f dg e dY f dh e dY f di e dY f dj e dY f dk e	 dY f dl e	 dY f g d 6dm e f d e
 f d e
 j f d e
 j f d e
 j f d e
 f d e j f dV e	 f dW e dX f dT e f dn e	 dY f do e f dU e	 f d e f d	 e f d
 e	 f d e	 f g db 6Z dp   Z RS(q   sW   
    For `Logtalk <http://logtalk.org/>`_ source code.

    .. versionadded:: 0.10
    t   Logtalkt   logtalks   *.lgts	   *.logtalks   text/x-logtalks   ^\s*:-\st	   directives   %.*?\ns   /\*(.|\n)*?\*/s   \ns   \s+s   0'.s   0b[01]+s   0o[0-7]+s   0x[0-9a-fA-F]+s   \d+\.?\d*((e|E)(\+|-)?\d+)?s   ([A-Z_]\w*)s   (after|before)(?=[(])s   forward(?=[(])s#   (parameter|this|se(lf|nder))(?=[(])s-   (current_predicate|predicate_property)(?=[(])s8   (expand_(goal|term)|(goal|term)_expansion|phrase)(?=[(])s;   (abolish|c(reate|urrent))_(object|protocol|category)(?=[(])s*   (object|protocol|category)_property(?=[(])s.   co(mplements_object|nforms_to_protocol)(?=[(])s)   extends_(object|protocol|category)(?=[(])s*   imp(lements_protocol|orts_category)(?=[(])s%   (instantiat|specializ)es_class(?=[(])s.   (current_event|(abolish|define)_events)(?=[(])s!   (current|set)_logtalk_flag(?=[(])s<   logtalk_(compile|l(ibrary_path|oad|oad_context)|make)(?=[(])s   \blogtalk_make\bs   (clause|retract(all)?)(?=[(])s   a(bolish|ssert(a|z))(?=[(])s   (ca(ll|tch)|throw)(?=[(])s   (fa(il|lse)|true)\bs!   ((bag|set)of|f(ind|or)all)(?=[(])s;   threaded(_(call|once|ignore|exit|peek|wait|notify))?(?=[(])s.   (subsumes_term|unify_with_occurs_check)(?=[(])s8   (functor|arg|copy_term|numbervars|term_variables)(?=[(])s!   (rem|m(ax|in|od)|abs|sign)(?=[(])s)   float(_(integer|fractional)_part)?(?=[(])s%   (floor|truncate|round|ceiling)(?=[(])s-   (cos|a(cos|sin|tan)|exp|log|s(in|qrt))(?=[(])sZ   (var|atom(ic)?|integer|float|c(allable|ompound)|n(onvar|umber)|ground|acyclic_term)(?=[(])s   compare(?=[(])s   (curren|se)t_(in|out)put(?=[(])s   (open|close)(?=[(])s   flush_output(?=[(])s!   (at_end_of_stream|flush_output)\bs=   (stream_property|at_end_of_stream|set_stream_position)(?=[(])s,   (nl|(get|peek|put)_(byte|c(har|ode)))(?=[(])s   \bnl\bs   read(_term)?(?=[(])s"   write(q|_(canonical|term))?(?=[(])s   (current_)?op(?=[(])s!   (current_)?char_conversion(?=[(])s(   atom_(length|c(hars|o(ncat|des)))(?=[(])s   (char_code|sub_atom)(?=[(])s   number_c(har|ode)s(?=[(])s   (se|curren)t_prolog_flag(?=[(])s   \bhalt\bs   halt(?=[(])s   (::|:|\^\^)s   [{}]s   (ignore|once)(?=[(])s
   \brepeat\bs   (key)?sort(?=[(])s   (>>|<<|/\\|\\\\|\\)s   \bas\bs   \bis\bs   (=:=|=\\=|<|=<|>=|>)s   =\.\.s   (=|\\=)s   (==|\\==|@=<|@<|@>=|@>)s   (//|[-+*/])s   \b(e|pi|mod|rem)\bs   \b\*\*\bs   -->s	   ([!;]|->)s   \\+s   [?@]s   \^s   "(\\\\|\\"|[^"])*"s   [()\[\],.|]s   [a-z]\w*t   't   quoted_atomR   s   ''s   #pops+   \\([\\abfnrtv"\']|(x[a-fA-F0-9]+|[0-7]+)\\)s	   [^\\'\n]+s   \\s   (el)?if(?=[(])s   (e(lse|ndif))[.]s!   (category|object|protocol)(?=[(])t   entityrelationss#   (end_(category|object|protocol))[.]s!   (public|protected|private)(?=[(])s%   e(n(coding|sure_loaded)|xport)(?=[(])s    in(clude|itialization|fo)(?=[(])s+   (built_in|dynamic|synchronized|threaded)[.]sz   (alias|d(ynamic|iscontiguous)|m(eta_(non_terminal|predicate)|ode|ultifile)|s(et_(logtalk|prolog)_flag|ynchronized))(?=[(])s	   op(?=[(])s:   (c(alls|oinductive)|module|reexport|use(s|_module))(?=[(])s   [a-z]\w*(?=[(])s   [a-z]\w*[.]sH   (complements|extends|i(nstantiates|mp(lements|orts))|specializes)(?=[(])s   ([)]\.)s   (::)c         C   sT   d |  k r d Sd |  k r  d Sd |  k r0 d St  j d |  t  j  rL d Sd Sd  S(   Ns
   :- object(g      ?s   :- protocol(s   :- category(s
   ^:-\s[a-z]g?g        (   R   t   searcht   M(   R   (    (    s:   /usr/lib/python2.7/dist-packages/pygments/lexers/prolog.pyR   (  s    (   R   R   R   R   R   R   R   R	   R   R   R   R    R!   R"   R   R)   R   R   R   t   EscapeR*   R   (    (    (    s:   /usr/lib/python2.7/dist-packages/pygments/lexers/prolog.pyR   X   s   																																																																																									(   R   R   t   pygments.lexerR    R   t   pygments.tokenR   R   R   R   R   R   R   R	   t   __all__R
   R   (    (    (    s:   /usr/lib/python2.7/dist-packages/pygments/lexers/prolog.pyt   <module>
   s   :C