| Server IP : 198.38.94.13 / Your IP : 216.73.217.33 Web Server : Apache System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 User : revivere ( 1140) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /opt/saltstack/salt/lib/python3.10/site-packages/pygments/__pycache__/ |
Upload File : |
o
;j � @ s. d Z ddlZG dd� de�ZG dd� d�ZdS )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-present by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
� Nc @ s e Zd ZdZdS )� EndOfTextzZ
Raise if end of text is reached and the user
tried to call a match function.
N)�__name__�
__module__�__qualname__�__doc__� r r �D/opt/saltstack/salt/lib/python3.10/site-packages/pygments/scanner.pyr s r c @ sV e Zd ZdZddd�Zdd� Zeeej�Zdd� Zd d
� Zdd� Z d
d� Z
dd� ZdS )�Scannerzp
Simple scanner
All method patterns are regular expression strings (not
compiled expressions!)
r c C s8 || _ t|�| _d| _d| _|| _d| _d| _i | _dS )z{
:param text: The text which should be scanned
:param flags: default regular expression flags
r N) �data�len�data_length� start_pos�pos�flags�last�match� _re_cache)�self�textr r r r �__init__# s
zScanner.__init__c C s | j | jkS )z.`True` if the scanner reached the end of text.)r r �r r r r �eos1 s zScanner.eosc C s@ | j rt� �|| jvrt�|| j�| j|<