o
    ZhQ                     @   s   d Z ddlZddl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mZ ddgZG dd deZG d	d deZG d
d deZdS )z
    pygments.lexers.vip
    ~~~~~~~~~~~~~~~~~~~

    Lexers for Visual Prolog & Grammar files.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
    N)
RegexLexerinheritwordsinclude)	TextCommentOperatorKeywordNameStringNumberPunctuation
WhitespaceVisualPrologLexerVisualPrologGrammarLexerc                   @   s  e Zd ZdZdZdZdefeedddej	fdefeedd	ej	fd
e
fde
fdejjfdejfdejfdefdedfdedfdejdfdejdfdejdfdefdefdefgeedddejfdefgeddefd ed!fgedd"efded#fd$ed!fd%efgd&ejfd'ejfged(dejd!fd)efd*ejjd!fged(dejd!fd+efd*ejjd!fgd,ejfdejd!fd-efgd.Zd/S )0VisualPrologBaseLexer)tryforeachif)andZcatchdoelseelseif	erroneous
externallyfailurefinallyr   r   ororelse	otherwisethenr   divmodremquot)ZshortdetailendZ
withdomainz\s+z\bend\s+\bprefixsuffixr&   r*   z0[xo][\da-fA-F_]+z(((\d[\d_]*)?\.)?\d[\d_]*([eE][\-+]?\d+)?z_\w*z[A-Z]\w*z@\w+z[a-z]\w*z/\*commentz\%commentline"stringz\'stringsinglez@"atstringz[\-+*^/!?<>=~:]+z[$,.[\]|(){}\\]+.@
commentdocz[^@\n]+$z#popz[^@*/]+z#pushz\*/z[*/]z\\u[0-9a-fA-F]{4}z\\[\'"ntr\\]stringescapez
[^\'\\\n]+z\nz	[^"\\\n]+z""z[^"]+)rootr4   r-   r,   r6   r0   r/   r1   N)__name__
__module____qualname__Z
minorendkwZ
minorkwexpZdockwr   r   r	   Minorr   r
   VariableZ	Anonymousr   r   Symbolr   r   r   Preprocr   EscapeErrortokens rB   rB   J/var/www/html/lang_env/lib/python3.10/site-packages/pygments/lexers/vip.pyr      sl    







r   c                   @   st   e Zd ZdZdZdZdgZg dZdZdZ	dZ
d	ee	d
dejfeed
defee
dd
dejfegiZdd ZdS )r   z7Lexer for VisualProlog

    .. versionadded:: 2.17
    zVisual Prologhttps://www.visual-prolog.com/visualprolog)z*.proz*.clz*.iz*.packz*.ph)Zgoal	namespace	interfaceclassZ	implementwhereopenZinheritsZsupportsresolveZdelegateZmonitor	constantsdomainsZ
predicatesconstructors
propertiesZclausesZfacts)alignZanyflowasZbitsizeZdetermdigitsr   r   r   fromguardmultiZ	nondetermr   r   r   Z	procedurerK   singleZ
suspending)
binincluder   r   endiferrorZexportr   rS   ZgrammargenerateZgrammarincluder   r   messageoptionsZ
orrequiresrequiresstringincluder    r7   r'   r+   #r(   c                 C      t d| rdS dS )zMCompetes with IDL and Prolog on *.pro; div. lisps on*.cl and SwigLexer on *.izc^\s*(end\s+(interface|class|implement)|(clauses|predicates|domains|facts|constants|properties)\s*$)\(\?r   researchtextrB   rB   rC   analyse_texto      zVisualPrologLexer.analyse_textN)r8   r9   r:   __doc__nameurlaliases	filenamesmajorkwZminorkwdirectivekwr   r	   r;   	Directiver   rA   rf   rB   rB   rB   rC   r   V   s"    	c                   @   s^   e Zd ZdZdZdZdgZdgZdZdZ	de
ed	d
efe
e	dd	dejfegiZdd ZdS )r   z?Lexer for VisualProlog grammar

    .. versionadded:: 2.17
    zVisual Prolog GrammarrD   visualprologgrammarz*.vipgrm)rJ   rF   ZgrammarZnonterminalsZstartsymbolsZ	terminalsrules
precedence)rW   r]   r7   r'   r+   r^   r(   c                 C   r_   )zNo competditors (currently)zN^\s*(end\s+grammar|(nonterminals|startsymbols|terminals|rules|precedence)\s*$)r`   r   ra   rd   rB   rB   rC   rf      rg   z%VisualPrologGrammarLexer.analyse_textN)r8   r9   r:   rh   ri   rj   rk   rl   rm   rn   r   r	   ro   r   rA   rf   rB   rB   rB   rC   r   z   s    )rh   rb   Zpygments.lexerr   r   r   r   Zpygments.tokenr   r   r   r	   r
   r   r   r   r   __all__r   r   r   rB   rB   rB   rC   <module>   s    
,B$