%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/pygments/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/pygments/__pycache__/scanner.cpython-312.pyc

�

|�e��:�dZddlZGd�de�ZGd�d�Zy)a
    pygments.scanner
    ~~~~~~~~~~~~~~~~

    This library implements a regex based scanner. Some languages
    like Pascal are easy to parse but have some keywords that
    depend on the context. Because of this it's impossible to lex
    that just by using a regular expression lexer like the
    `RegexLexer`.

    Have a look at the `DelphiLexer` to get an idea of how to use
    this scanner.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�Nc��eZdZdZy)�	EndOfTextzZ
    Raise if end of text is reached and the user
    tried to call a match function.
    N)�__name__�
__module__�__qualname__�__doc__���2/usr/lib/python3/dist-packages/pygments/scanner.pyrrs��r
rc�b�eZdZdZd
d�Zd�Zeeej�Zd�Zd�Zd�Z	d�Z
d�Zy	)�Scannerzp
    Simple scanner

    All method patterns are regular expression strings (not
    compiled expressions!)
    c��||_t|�|_d|_d|_||_d|_d|_i|_y)z{
        :param text:    The text which should be scanned
        :param flags:   default regular expression flags
        rN)	�data�len�data_length�	start_pos�pos�flags�last�match�	_re_cache)�self�textrs   r�__init__zScanner.__init__#sA��
��	��t�9�����������
���	���
���r
c�4�|j|jk\S)z.`True` if the scanner reached the end of text.)rr�rs r�eoszScanner.eos1s���x�x�4�+�+�+�+r
c�
�|jr
t��||jvr-tj||j
�|j|<|j|j
|j|j�S)z�
        Apply `pattern` on the current position and return
        the match object. (Doesn't touch pos). Use this for
        lookahead.
        )	rrr�re�compilerrrr�r�patterns  r�checkz
Scanner.check6s`���8�8��+���$�.�.�(�&(�j�j��$�*�*�&E�D�N�N�7�#��~�~�g�&�,�,�T�Y�Y����A�Ar
c�(�|j|�duS)zdApply a pattern on the current position and check
        if it patches. Doesn't touch pos.
        N)r#r!s  r�testzScanner.testBs���z�z�'�"�$�.�.r
c��|jr
t��||jvr-tj||j
�|j|<|j|_|j|j
|j|j�}|�y|j�|_|j�|_	|j�|_y)a�
        Scan the text for the given pattern and update pos/match
        and related fields. The return value is a boolean that
        indicates if the pattern matched. The matched value is
        stored on the instance as ``match``, the last value is
        stored as ``last``. ``start_pos`` is the position of the
        pointer before the pattern was matched, ``pos`` is the
        end position.
        FT)rrrrr rrrrr�startr�end�group)rr"�ms   r�scanzScanner.scanHs����8�8��+���$�.�.�(�&(�j�j��$�*�*�&E�D�N�N�7�#��J�J��	��N�N�7�#�)�)�$�)�)�T�X�X�>���9���������5�5�7����W�W�Y��
�r
c�&�|jd�y)zScan exactly one char.�.N)r+rs r�get_charzScanner.get_char_s
���	�	�#�r
c�b�d|jj|j|jfzS)Nz
<%s %d/%d>)�	__class__rrrrs r�__repr__zScanner.__repr__cs1����N�N�#�#��H�H����
�
�	
r
N)r)rrrrrr�propertyr#r%r+r.r1r	r
rr
r
s=����,��3����
$�C�
B�/��.�
r
r
)rr�RuntimeErrorrr
r	r
r�<module>r4s'��� 
����M
�M
r

Zerion Mini Shell 1.0