File: //lib/python3/dist-packages/pygments/lexers/__pycache__/email.cpython-311.pyc
�
�E�c� � � � d Z ddlmZmZmZ ddlmZ ddlmZm Z m
Z
mZmZm
Z
ddlmZ dgZ G d� de� � Z G d � de� � Zd
S )z�
pygments.lexers.email
~~~~~~~~~~~~~~~~~~~~~
Lexer for the raw E-mail.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
� )�
RegexLexer�DelegatingLexer�bygroups)� MIMELexer)�Text�Keyword�Name�String�Number�Comment)�get_bool_opt�
EmailLexerc � � � e Zd ZdZ� fd�Zd� Zdej dfdefgdej fdej d fd
e
fde
fdej fd
ej fdej fde
j fde
j fde
j fde
j fde
j fde
j fde
j fde
j fde
j fde
j fde
j fde
j fde
j fdej fd eej ej ej e
j ej e
j ej � � fdej fdefgd �Z� xZS )!�EmailHeaderLexerzm
Sub-lexer for raw E-mail. This lexer only process header part of e-mail.
.. versionadded:: 2.5
c �f �� t � � j di |�� t |dd� � | _ d S )Nzhighlight-X-headerF� )�super�__init__r
�highlight_x��self�options� __class__s ��7/usr/lib/python3/dist-packages/pygments/lexers/email.pyr zEmailHeaderLexer.__init__ s; �� ������#�#�7�#�#�#�'��1E�u�M�M����� c # �� K � | j rk|� d� � t j |� d� � fV � | � |� d� � d�� � }|E d {V �� d S |� d� � t j |� d� � fV � |� d� � t j |� d� � fV � d S )N� � ��root�header)�stack) r �startr �Tag�group�get_tokens_unprocessedr �Special� Multiline)r �match�default_actionss r �get_x_header_tokensz$EmailHeaderLexer.get_x_header_tokens s� � � � ��� D��+�+�a�.�.�$�(�E�K�K��N�N�:�:�:�:� #�9�9����A���&8� :� :� :�O�&�&�&�&�&�&�&�&�&�&� �+�+�a�.�.�'�/�5�;�;�q�>�>�A�A�A�A��+�+�a�.�.�'�"3�U�[�[��^�^�C�C�C�C�C�Cr z^(?:[A-WYZ]|X400)[\w\-]*:r! z(^(X-(?:\w[\w\-]*:))([\s\S]*?\n)(?![ \t])z\n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ed|Thu|Fri|Sat),\s+)?(0[1-9]|[1-2]?[0-9]|3[01])\s+(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+(19[0-9]{2}|[2-9][0-9]{3})\s+(2[0-3]|[0-1][0-9]):([0-5][0-9])(?::(60|[0-5][0-9]))?(?:\.\d{1,5})?\s+([-\+][0-9]{2}[0-5][0-9]|\(?(?:UTC?|GMT|(?:E|C|M|P)(?:ST|ET|DT)|[A-IK-Z])\)?)zN(=\?)([\w-]+)(\?)([BbQq])(\?)([\[\w!\"#$%&\'()*+,-./:;<=>@[\\\]^_`{|}~]+)(\?=)z[\s]+z[\S]r )�__name__�
__module__�__qualname__�__doc__r r+ r r$ r �
Whitespacer �Label�Functionr �Integer�Hex� Decoratorr r
�Affix�Constant�tokens�
__classcell__�r s @r r r s� �� � � � � �� �N� N� N� N� N�D� D� D� *�4�8�X�>�
8�:M�N�
� ���)�
�T�_�f�5� �g�&�
��)� '��
�3�
(�$�*�5� 6�t�}�E�5�
�^�
�
7��
�C�
:�F�J�G�
E�v�z�R�
F��
�S�
H�&�*�U�
J�F�J�W�
M�v�z�Z�
M�
�Z�
�
M�
�Z�
�
M�
�Z�
�� �Z�
�R�
�Z�
�
H�
�^�
�"�
�X�f�l�D�M�6�<��AQ��l�F�J���>� >�
?� �t��'�
�d�O�w<
�B� B�F�F�F�F�Fr r c �: � � e Zd ZdZdZddgZdgZdgZ� fd�Z� xZ S )r z�
Lexer for raw E-mail.
Additional options accepted:
`highlight-X-header`
Highlight the fields of ``X-`` user-defined email header. (default:
``False``).
.. versionadded:: 2.5
zE-mail�email�emlz*.emlzmessage/rfc822c �^ �� t � � j t t t fi |�� d S )N)r r r r r r s �r r zEmailLexer.__init__� s- �� ������)�9�g�I�I��I�I�I�I�Ir )
r, r- r. r/ �name�aliases� filenames� mimetypesr r9 r: s @r r r q sk �� � � � � �
�
� �D����G�� �I�!�"�I�J� J� J� J� J� J� J� J� Jr N)r/ �pygments.lexerr r r �pygments.lexers.mimer �pygments.tokenr r r r
r r �
pygments.utilr
�__all__r r r r r �<module>rH s� ��� � A� @� @� @� @� @� @� @� @� @� *� *� *� *� *� *� G� G� G� G� G� G� G� G� G� G� G� G� G� G� G� G� &� &� &� &� &� &��.��[� [� [� [� [�z� [� [� [�|J� J� J� J� J�� J� J� J� J� Jr