a
    lc0e                     @   s  d Z ddlZddl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mZmZ ddlmZ ddlmZmZ ddlmZ ddlmZ dd	lmZ dd
lmZ ddl m!Z! ddl"m#Z# g dZ$G dd deZ%G dd deZ&G dd deZ'G dd deZ(G dd deZ)G dd deZ*G dd deZ+G dd deZ,G dd deZ-G d d! d!eZ.G d"d# d#eZ/G d$d% d%eZ0G d&d' d'eZ1G d(d) d)eZ2G d*d+ d+eZ3G d,d- d-eZ4G d.d/ d/eZ5G d0d1 d1eZ6G d2d3 d3eZ7G d4d5 d5eZ8dS )6z
    pygments.lexers.parsers
    ~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for parser generators.

    :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
    N)
RegexLexerDelegatingLexerincludebygroupsusing)
PunctuationOtherTextCommentOperatorKeywordNameStringNumber
Whitespace)	JavaLexer)CLexerCppLexer)ObjectiveCLexer)DLexer)CSharpLexer)	RubyLexer)PythonLexer)	PerlLexer)
RagelLexerRagelEmbeddedLexerRagelCLexerRagelDLexerRagelCppLexerRagelObjectiveCLexerRagelRubyLexerRagelJavaLexer
AntlrLexerAntlrPythonLexerAntlrPerlLexerAntlrRubyLexerAntlrCppLexerAntlrCSharpLexerAntlrObjectiveCLexerAntlrJavaLexerAntlrActionScriptLexerTreetopLexer	EbnfLexerc                   @   sJ  e Zd ZdZdZdZdgZg Zdefgde	fgde
fde
fd	e
fd
e
fgdejfdejfgdejfdejfdefdejfgdejfg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ged ed!ed"ed#ed$ed%ed&d'ed(fd)efd*efg
d+d,d- d. efd'ed/fd0ed1fgd2	Zd3S )4r   zA pure `Ragel <www.colm.net/open-source/ragel>`_ lexer.  Use this
    for fragments of Ragel.  For ``.rl`` files, use
    :class:`RagelEmbeddedLexer` instead (or one of the
    language-specific subclasses).

    .. versionadded:: 1.1

    Ragelz&http://www.colm.net/open-source/ragel/ragel\s+z\#.*$z(access|action|alphtype)\bz (getkey|write|machine|include)\bz2(any|ascii|extend|alpha|digit|alnum|lower|upper)\bz3(xdigit|cntrl|graph|print|punct|space|zlen|empty)\bz0x[0-9A-Fa-f]+z[+-]?[0-9]+"(\\\\|\\[^\\]|[^"\\])*"'(\\\\|\\[^\\]|[^'\\])*'z\[(\\\\|\\[^\\]|[^\\\]])*\]/(?!\*)(\\\\|\\[^\\]|[^/\\])*/z[a-zA-Z_]\w*,z\||&|--?z
\.|<:|:>>?:z->z(>|\$|%|<|@|<>)(/|eof\b)z(>|\$|%|<|@|<>)(!|err\b)z(>|\$|%|<|@|<>)(\^|lerr\b)z(>|\$|%|<|@|<>)(~|to\b)z(>|\$|%|<|@|<>)(\*|from\b)z>|@|\$|%z\*|\?|\+|\{[0-9]*,[0-9]*\}z!|\^z\(|\)literals
whitespacecommentskeywordsnumbersidentifiers	operators\{host=;(|)	z[^{}\'"/#]+[^\\]\\[{}]r0   r1   //.*$\n?/\*(.|\n)*?\*/\#.*$\n?r2   /)+#push\}#pop)	r6   r7   r8   r9   r5   r:   r;   rootr=   N)__name__
__module____qualname____doc__nameurlaliases	filenamesr   r
   r   r   HexIntegerr   DoubleSingleRegexr   Variabler   r   r   joinr   tokens r\   r\   S/var/www/html/django/DPS/env/lib/python3.9/site-packages/pygments/lexers/parsers.pyr   #   sv   	r   c                   @   s   e Zd ZdZdZdgZdgZddd d efd	e	e
eee
efd
e
dfgddddd d ddddddf d eefde
dfgdZdd ZdS )r   z
    A lexer for Ragel embedded in a host language file.

    This will only highlight Ragel statements. If you want host language
    highlighting then call the language-specific Ragel lexer.

    .. versionadded:: 1.1
    zEmbedded Ragelzragel-em*.rlr@   rA   )	z
[^%\'"/#]+z%(?=[^%]|$)r0   r1   rD   rC   rE   r2   rF   rG   z(%%)(?![{%])(.*)($|;)(\n?)z(%%%%|%%)\{multi-line-fsm)z[^}\'"\[/#]z\}(?=[^%]|$)z\}%(?=[^%]|$)rB   z(>|\$|%|<|@|<>)/z /(?!\*)(\\\\|\\[^\\]|[^/\\])*/\*z/(?=[^/*]|$)r0   r1   z\[(\\\\|\\[^\\]|[^\]\\])*\]rD   rC   rE   z\}%%rJ   )rK   r_   c                 C   s   d| v S )Nz@LANG: indepr\   textr\   r\   r]   analyse_text   s    zRagelEmbeddedLexer.analyse_textN)rL   rM   rN   rO   rP   rR   rS   rZ   r   r   r   r   r   r	   r[   rb   r\   r\   r\   r]   r      sD   	 Ar   c                       s:   e Zd ZdZdZddgZdgZ fddZdd	 Z  Z	S )
r    zK
    A lexer for Ragel in a Ruby host file.

    .. versionadded:: 1.1
    zRagel in Ruby Hostz
ragel-rubyzragel-rbr^   c                    s   t  jttfi | d S N)super__init__r   r   selfoptions	__class__r\   r]   re      s    zRagelRubyLexer.__init__c                 C   s   d| v S )Nz@LANG: rubyr\   r`   r\   r\   r]   rb      s    zRagelRubyLexer.analyse_text
rL   rM   rN   rO   rP   rR   rS   re   rb   __classcell__r\   r\   ri   r]   r       s   r    c                       s8   e Zd ZdZdZdgZdgZ fddZdd Z  Z	S )	r   zH
    A lexer for Ragel in a C host file.

    .. versionadded:: 1.1
    zRagel in C Hostzragel-cr^   c                    s   t  jttfi | d S rc   )rd   re   r   r   rf   ri   r\   r]   re      s    zRagelCLexer.__init__c                 C   s   d| v S )Nz@LANG: cr\   r`   r\   r\   r]   rb      s    zRagelCLexer.analyse_textrk   r\   r\   ri   r]   r      s   r   c                       s8   e Zd ZdZdZdgZdgZ fddZdd Z  Z	S )	r   zH
    A lexer for Ragel in a D host file.

    .. versionadded:: 1.1
    zRagel in D Hostzragel-dr^   c                    s   t  jttfi | d S rc   )rd   re   r   r   rf   ri   r\   r]   re     s    zRagelDLexer.__init__c                 C   s   d| v S )Nz@LANG: dr\   r`   r\   r\   r]   rb     s    zRagelDLexer.analyse_textrk   r\   r\   ri   r]   r      s   r   c                       s8   e Zd ZdZdZdgZdgZ fddZdd Z  Z	S )	r   zJ
    A lexer for Ragel in a C++ host file.

    .. versionadded:: 1.1
    zRagel in CPP Hostz	ragel-cppr^   c                    s   t  jttfi | d S rc   )rd   re   r   r   rf   ri   r\   r]   re     s    zRagelCppLexer.__init__c                 C   s   d| v S )Nz
@LANG: c++r\   r`   r\   r\   r]   rb     s    zRagelCppLexer.analyse_textrk   r\   r\   ri   r]   r     s   r   c                       s8   e Zd ZdZdZdgZdgZ fddZdd Z  Z	S )	r   zS
    A lexer for Ragel in an Objective C host file.

    .. versionadded:: 1.1
    zRagel in Objective C Hostz
ragel-objcr^   c                    s   t  jttfi | d S rc   )rd   re   r   r   rf   ri   r\   r]   re   (  s    zRagelObjectiveCLexer.__init__c                 C   s   d| v S )Nz@LANG: objcr\   r`   r\   r\   r]   rb   +  s    z!RagelObjectiveCLexer.analyse_textrk   r\   r\   ri   r]   r     s   r   c                       s8   e Zd ZdZdZdgZdgZ fddZdd Z  Z	S )	r!   zK
    A lexer for Ragel in a Java host file.

    .. versionadded:: 1.1
    zRagel in Java Hostz
ragel-javar^   c                    s   t  jttfi | d S rc   )rd   re   r   r   rf   ri   r\   r]   re   :  s    zRagelJavaLexer.__init__c                 C   s   d| v S )Nz@LANG: javar\   r`   r\   r\   r]   rb   =  s    zRagelJavaLexer.analyse_textrk   r\   r\   ri   r]   r!   /  s   r!   c                   @   sN  e Zd ZdZdZdgZg ZdZdZdZ	dZ
dZd	efgd
efdefgededde d eeeeeejefdedfdedfde d eeeejeedfdedfde d e d eejeeeejeedfde d eeeejedfg	dedfd efedd!ed"fd#edfgededd$efd!ed"fd#edfd%e d& eeeejfd'e d& eeeejfdedfd(eeeedfd)e d* eeeejeefde d eejeedfd+edfgededdedfd+efd,ejfd-ejfd.efd/ejfd0ejfd1efd2efd!ed"fd#edfd3edfgededd#efd4e d5 e
 d6 eejeeeeeefd7edfgededd#efd4e d8 d9ee
ed:f d* eejeeeeeefd7edfgd4d9d; d< efd=eeefd>eejeejfd#ed?fd7edfgd4d9d@ d< efd!ed?fdAedfd>eejeejfdBefgdC
ZdDdE Z dFS )Gr"   z
    Generic `ANTLR`_ Lexer.
    Should not be called directly, instead
    use DelegatingLexer for your target language.

    .. versionadded:: 1.1

    .. _ANTLR: http://www.antlr.org/
    ANTLRantlrz[A-Za-z]\w*[A-Z]\w*z[a-z]\w*z\'(?:\\\\|\\\'|[^\']*)\'z[0-9]+r/   z//.*$rD   r6   r7   z*(lexer|parser|tree)?(\s*)(grammar\b)(\s*)(z)(;)z	options\brh   ztokens\br[   z(scope)(\s*)(z
)(\s*)(\{)actionz(catch|finally)\b	exceptionz(@z)(\s*)(::)?(\s*)(z0((?:protected|private|public|fragment)\b)?(\s*)(z)(!)?)	rule-altsrule-prelimsz\nrJ   z\sz\[nested-arg-actionr<   z	returns\bz(throws)(\s+)()z	(,)(\s*)(z(scope)(\s+)(\{)z(scope)(\s+)(z	)(\s*)(;)r4   r0   r1   z<<([^>]|>[^>])>>z\$?[A-Z_]\w*z\$?[a-z_]\w*z-(\+|\||->|=>|=|\(|\)|\.\.|\.|\?|\*|\^|!|\#|~)r3   r?   r@   z)(\s*)(=)?(\s*)(z
)?(\s*)(;)rI   z)(\s*)(=)(\s*)(rA   z\*)z[^${}\'"/\\]+r0   r1   rC   rD   r2   z\\(?!%)rF   rG   z(\\)(%)z(\$[a-zA-Z]+)(\.?)(text|value)?rH   )z[^$\[\]\'"/]+r0   r1   rC   rD   r2   rF   z\]z(\\\\|\\\]|\\\[|[^\[\]])+)
r6   r7   rK   rq   rs   rr   r[   rh   rp   rt   c                 C   s   t d| t jS )Nz^\s*grammar\s+[a-zA-Z0-9]+\s*;)researchMr`   r\   r\   r]   rb     s    zAntlrLexer.analyse_textN)!rL   rM   rN   rO   rP   rR   rS   Z_idZ
_TOKEN_REFZ	_RULE_REFZ_STRING_LITERALZ_INTr   r
   r   r   r   r   Classr   rY   Labelr   rV   rW   Constantr   rZ   r	   r   Propertyr[   rb   r\   r\   r\   r]   r"   A  s  



	




  )r"   c                       s:   e Zd ZdZdZdgZddgZ fddZdd	 Z  Z	S )
r&   z:
    ANTLR with C++ Target

    .. versionadded:: 1.1
    zANTLR With CPP Targetz	antlr-cpp*.G*.gc                    s   t  jttfi | d S rc   )rd   re   r   r"   rf   ri   r\   r]   re     s    zAntlrCppLexer.__init__c                 C   s   t | otd| tjS )Nz^\s*language\s*=\s*C\s*;r"   rb   rv   rw   rx   r`   r\   r\   r]   rb     s    
zAntlrCppLexer.analyse_textrk   r\   r\   ri   r]   r&     s   r&   c                       s:   e Zd ZdZdZdgZddgZ fddZdd	 Z  Z	S )
r(   zB
    ANTLR with Objective-C Target

    .. versionadded:: 1.1
    zANTLR With ObjectiveC Targetz
antlr-objcr}   r~   c                    s   t  jttfi | d S rc   )rd   re   r   r"   rf   ri   r\   r]   re   "  s    zAntlrObjectiveCLexer.__init__c                 C   s   t | otd| S )Nz^\s*language\s*=\s*ObjC\s*;)r"   rb   rv   rw   r`   r\   r\   r]   rb   %  s    

z!AntlrObjectiveCLexer.analyse_textrk   r\   r\   ri   r]   r(     s   r(   c                       s<   e Zd ZdZdZddgZddgZ fddZd	d
 Z  Z	S )r'   z9
    ANTLR with C# Target

    .. versionadded:: 1.1
    zANTLR With C# Targetzantlr-csharpzantlr-c#r}   r~   c                    s   t  jttfi | d S rc   )rd   re   r   r"   rf   ri   r\   r]   re   5  s    zAntlrCSharpLexer.__init__c                 C   s   t | otd| tjS )Nz^\s*language\s*=\s*CSharp2\s*;r   r`   r\   r\   r]   rb   8  s    
zAntlrCSharpLexer.analyse_textrk   r\   r\   ri   r]   r'   *  s   r'   c                       s:   e Zd ZdZdZdgZddgZ fddZdd	 Z  Z	S )
r#   z=
    ANTLR with Python Target

    .. versionadded:: 1.1
    zANTLR With Python Targetzantlr-pythonr}   r~   c                    s   t  jttfi | d S rc   )rd   re   r   r"   rf   ri   r\   r]   re   H  s    zAntlrPythonLexer.__init__c                 C   s   t | otd| tjS )Nz^\s*language\s*=\s*Python\s*;r   r`   r\   r\   r]   rb   K  s    
zAntlrPythonLexer.analyse_textrk   r\   r\   ri   r]   r#   =  s   r#   c                       s:   e Zd ZdZdZdgZddgZ fddZdd	 Z  Z	S )
r)   z:
    ANTLR with Java Target

    .. versionadded:: 1.
    zANTLR With Java Targetz
antlr-javar}   r~   c                    s   t  jttfi | d S rc   )rd   re   r   r"   rf   ri   r\   r]   re   [  s    zAntlrJavaLexer.__init__c                 C   s   t | odS )Ng?)r"   rb   r`   r\   r\   r]   rb   ^  s    zAntlrJavaLexer.analyse_textrk   r\   r\   ri   r]   r)   P  s   r)   c                       s<   e Zd ZdZdZddgZddgZ fddZd	d
 Z  Z	S )r%   z;
    ANTLR with Ruby Target

    .. versionadded:: 1.1
    zANTLR With Ruby Targetz
antlr-rubyzantlr-rbr}   r~   c                    s   t  jttfi | d S rc   )rd   re   r   r"   rf   ri   r\   r]   re   n  s    zAntlrRubyLexer.__init__c                 C   s   t | otd| tjS )Nz^\s*language\s*=\s*Ruby\s*;r   r`   r\   r\   r]   rb   q  s    
zAntlrRubyLexer.analyse_textrk   r\   r\   ri   r]   r%   c  s   r%   c                       s:   e Zd ZdZdZdgZddgZ fddZdd	 Z  Z	S )
r$   z;
    ANTLR with Perl Target

    .. versionadded:: 1.1
    zANTLR With Perl Targetz
antlr-perlr}   r~   c                    s   t  jttfi | d S rc   )rd   re   r   r"   rf   ri   r\   r]   re     s    zAntlrPerlLexer.__init__c                 C   s   t | otd| tjS )Nz^\s*language\s*=\s*Perl5\s*;r   r`   r\   r\   r]   rb     s    
zAntlrPerlLexer.analyse_textrk   r\   r\   ri   r]   r$   v  s   r$   c                       s<   e Zd ZdZdZddgZddgZ fddZd	d
 Z  Z	S )r*   zC
    ANTLR with ActionScript Target

    .. versionadded:: 1.1
    zANTLR With ActionScript Targetzantlr-actionscriptzantlr-asr}   r~   c                    s&   ddl m} t j|tfi | d S )Nr   )ActionScriptLexer)Zpygments.lexers.actionscriptr   rd   re   r"   )rg   rh   r   ri   r\   r]   re     s    zAntlrActionScriptLexer.__init__c                 C   s   t | otd| tjS )Nz#^\s*language\s*=\s*ActionScript\s*;r   r`   r\   r\   r]   rb     s    
z#AntlrActionScriptLexer.analyse_textrk   r\   r\   ri   r]   r*     s   r*   c                   @   sT  e Zd ZdZeddefdejdfdedfgededded	fdedfd
ejfgededdedfdedfdefgedd
ej	dfgededde
jfde
jfdeejefdefdefdefde
jfdeejeejfdeeej	efdedfde
jfgdedfdedfdefgded	fdedfdefgd efd!ejfgd"edfgd#	Zd$S )%TreetopBaseLexerz
    A base lexer for `Treetop <http://treetop.rubyforge.org/>`_ grammars.
    Not for direct use; use :class:`TreetopLexer` instead.

    .. versionadded:: 1.6
    spacezrequire[ \t]+[^\n\r]+[\n\r]zmodule\bmodulez	grammar\bgrammarendrH   z[A-Z]\w*(?:::[A-Z]\w*)*zrule\brulez	include\br   ro   rJ   r0   r1   z([A-Za-z_]\w*)(:)z[A-Za-z_]\w*z[()]z	[?+*/&!~]z$\[(?:\\.|\[:\^?[a-z]+:\]|[^\\\]])+\]z([0-9]*)(\.\.)([0-9]*)z(<)([^>]+)(>)r<   inline_module\.rubyrI   z[^{}]+z
[ \t\n\r]+z#[^\n]*zend\b)	rK   r   r   r   r   r   r   r   r   N)rL   rM   rN   rO   r   r   r   	Namespacer   ry   r   rV   rW   r   rz   r   r   rX   r   rU   r   r
   r[   r\   r\   r\   r]   r     sf   	

r   c                       s2   e Zd ZdZdZdgZddgZ fddZ  ZS )r+   ze
    A lexer for `Treetop <http://treetop.rubyforge.org/>`_ grammars.

    .. versionadded:: 1.6
    Treetoptreetopz	*.treetopz*.ttc                    s   t  jttfi | d S rc   )rd   re   r   r   rf   ri   r\   r]   re     s    zTreetopLexer.__init__)	rL   rM   rN   rO   rP   rR   rS   re   rl   r\   r\   ri   r]   r+     s
   r+   c                   @   s   e Zd ZdZdZdgZdgZdgZedededd	e	d
fgedededde
jfde
jfdejfdefde	fdedfdedfg
defgdejdfgdejfeddejdfdejfgdefgdZdS )r,   z
    Lexer for `ISO/IEC 14977 EBNF
    <http://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_Form>`_
    grammars.

    .. versionadded:: 2.0
    EBNFebnfz*.ebnfztext/x-ebnfr6   comment_start
identifierr>   
productionz"[^"]*"z'[^']*'z(\?[^?]*\?)z[\[\]{}(),|]-r?   rJ   r   r/   z\(\*commentz[^*)]z\*\)z[*)]z([a-zA-Z][\w \-]*))rK   r   r6   r   r   r   N)rL   rM   rN   rO   rP   rR   rS   	mimetypesr   r   r   rV   rW   r   Entityr   r	   r
   	Multiliner   r[   r\   r\   r\   r]   r,     sB   

r,   )9rO   rv   Zpygments.lexerr   r   r   r   r   Zpygments.tokenr   r   r	   r
   r   r   r   r   r   r   Zpygments.lexers.jvmr   Zpygments.lexers.c_cppr   r   Zpygments.lexers.objectiver   Zpygments.lexers.dr   Zpygments.lexers.dotnetr   Zpygments.lexers.rubyr   Zpygments.lexers.pythonr   Zpygments.lexers.perlr   __all__r   r   r    r   r   r   r   r!   r"   r&   r(   r'   r#   r)   r%   r$   r*   r   r+   r,   r\   r\   r\   r]   <module>   sB   
0	_S DE