https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/pygments/lexers/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/pygments/lexers/__pycache__/modula2.cpython-310.pyc
o

���aJ��@srdZddlZddlmZmZddlmZmZddlm	Z	m
Z
mZmZm
Z
mZmZmZmZdgZGdd�de�ZdS)z�
    pygments.lexers.modula2
    ~~~~~~~~~~~~~~~~~~~~~~~

    Multi-Dialect Lexer for Modula-2.

    :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�
RegexLexer�include)�get_bool_opt�get_list_opt)	�Text�Comment�Operator�Keyword�Name�String�Number�Punctuation�Error�Modula2Lexerc@s�eZdZdZdZddgZddgZdgZej	ej
BZdefd	efgd
e
jfde
jfde
jfd
e
jfde
jfde
jfde
jfde
jfgdefgdejfdejfgdejfdejfdejfgdejfdejfdejfgdejfdejfgdefdefdefd efd!efd"efd#efd$efd%efd&efg
d'efd(efd)efd*efd+efd,efd-efd.efd/efg	d0efd1efd2efd3efd4efd5efd6efgd7efd8efd9efgd:e
jfd;e
jfd<e
jfgd=e
jfd>e
jfged?�ed@�edA�edB�edC�edD�edE�edF�edG�edH�edI�edJ�edK�g
dL�ZdMZdNZ dOZ!dPZ"dQZ#dRZ$dSZ%dTZ&dUZ'dVZ(dWZ)dXZ*dYZ+dZZ,d[Z-d\Z.d]Z/d^Z0d_Z1d_Z2d`Z3d_Z4daZ5dbZ6d_Z7d_Z8d_Z9dcZ:ddZ;deZ<dfZ=dgZ>dhZ?diZ@djZAdkZBd_ZCd_ZDd_ZEd_ZFd_ZGdlZHdmZIdnZJdoZKdpZLdqZMdrZNdsZOd_e"fe&fe*fe.fe&fe"fe&fe&fds�	ZPee#e'e+fee#fee'fee+fee+e/fee'e2fee#e5fee'e8fee'e;fds�	ZQe e$e(e,fe e$fe e(fe e,fe e,e0fe e(e3fe e$e6fe e(e9fe e(e<fds�	ZRe!e%e)e-fe!e%fe!e)fe!e-fe!e-e1fe!e)e4fe!e%e7fe!e)e:fe!e)e=fds�	ZSd_d_d_eHfeHfd_d_d_d_ds�	ZTd_e>feCfeIeJeHfeIeJfeCfe>feCfeCfds�	ZUd_e?feDfeKfeKfeDfe?feDfeDfds�	ZVd_e@feEfeLfeLfeEfe@feEfeEfds�	ZWd_eAfeFfeMfeMfeFfeAfeFfeFfds�	ZXd_eBfeGfeNfeNfeGfeBfeGfeGfds�	ZYdtdu�ZZdvdw�Z[dxdy�Z\dzd{�Z]d|d}�Z^d~S)ra�
    For `Modula-2 <http://www.modula2.org/>`_ source code.

    The Modula-2 lexer supports several dialects.  By default, it operates in
    fallback mode, recognising the *combined* literals, punctuation symbols
    and operators of all supported dialects, and the *combined* reserved words
    and builtins of PIM Modula-2, ISO Modula-2 and Modula-2 R10, while not
    differentiating between library defined identifiers.

    To select a specific dialect, a dialect option may be passed
    or a dialect tag may be embedded into a source file.

    Dialect Options:

    `m2pim`
        Select PIM Modula-2 dialect.
    `m2iso`
        Select ISO Modula-2 dialect.
    `m2r10`
        Select Modula-2 R10 dialect.
    `objm2`
        Select Objective Modula-2 dialect.

    The PIM and ISO dialect options may be qualified with a language extension.

    Language Extensions:

    `+aglet`
        Select Aglet Modula-2 extensions, available with m2iso.
    `+gm2`
        Select GNU Modula-2 extensions, available with m2pim.
    `+p1`
        Select p1 Modula-2 extensions, available with m2iso.
    `+xds`
        Select XDS Modula-2 extensions, available with m2iso.


    Passing a Dialect Option via Unix Commandline Interface

    Dialect options may be passed to the lexer using the `dialect` key.
    Only one such option should be passed. If multiple dialect options are
    passed, the first valid option is used, any subsequent options are ignored.

    Examples:

    `$ pygmentize -O full,dialect=m2iso -f html -o /path/to/output /path/to/input`
        Use ISO dialect to render input to HTML output
    `$ pygmentize -O full,dialect=m2iso+p1 -f rtf -o /path/to/output /path/to/input`
        Use ISO dialect with p1 extensions to render input to RTF output


    Embedding a Dialect Option within a source file

    A dialect option may be embedded in a source file in form of a dialect
    tag, a specially formatted comment that specifies a dialect option.

    Dialect Tag EBNF::

       dialectTag :
           OpeningCommentDelim Prefix dialectOption ClosingCommentDelim ;

       dialectOption :
           'm2pim' | 'm2iso' | 'm2r10' | 'objm2' |
           'm2iso+aglet' | 'm2pim+gm2' | 'm2iso+p1' | 'm2iso+xds' ;

       Prefix : '!' ;

       OpeningCommentDelim : '(*' ;

       ClosingCommentDelim : '*)' ;

    No whitespace is permitted between the tokens of a dialect tag.

    In the event that a source file contains multiple dialect tags, the first
    tag that contains a valid dialect option will be used and any subsequent
    dialect tags will be ignored.  Ideally, a dialect tag should be placed
    at the beginning of a source file.

    An embedded dialect tag overrides a dialect option set via command line.

    Examples:

    ``(*!m2r10*) DEFINITION MODULE Foobar; ...``
        Use Modula2 R10 dialect to render this source file.
    ``(*!m2pim+gm2*) DEFINITION MODULE Bazbam; ...``
        Use PIM dialect with GNU extensions to render this source file.


    Algol Publication Mode:

    In Algol publication mode, source text is rendered for publication of
    algorithms in scientific papers and academic texts, following the format
    of the Revised Algol-60 Language Report.  It is activated by passing
    one of two corresponding styles as an option:

    `algol`
        render reserved words lowercase underline boldface
        and builtins lowercase boldface italic
    `algol_nu`
        render reserved words lowercase boldface (no underlining)
        and builtins lowercase boldface italic

    The lexer automatically performs the required lowercase conversion when
    this mode is activated.

    Example:

    ``$ pygmentize -O full,style=algol -f latex -o /path/to/output /path/to/input``
        Render input file in Algol publication mode to LaTeX output.


    Rendering Mode of First Class ADT Identifiers:

    The rendering of standard library first class ADT identifiers is controlled
    by option flag "treat_stdlib_adts_as_builtins".

    When this option is turned on, standard library ADT identifiers are rendered
    as builtins.  When it is turned off, they are rendered as ordinary library
    identifiers.

    `treat_stdlib_adts_as_builtins` (default: On)

    The option is useful for dialects that support ADTs as first class objects
    and provide ADTs in the standard library that would otherwise be built-in.

    At present, only Modula-2 R10 supports library ADTs as first class objects
    and therefore, no ADT identifiers are defined for any other dialects.

    Example:

    ``$ pygmentize -O full,dialect=m2r10,treat_stdlib_adts_as_builtins=Off ...``
        Render standard library ADTs as ordinary library types.

    .. versionadded:: 1.3

    .. versionchanged:: 2.1
       Added multi-dialect support.
    zModula-2�modula2�m2z*.defz*.modztext/x-modula2z\n+z\s+z\(\*!m2pim\*\)z\(\*!m2iso\*\)z\(\*!m2r10\*\)z\(\*!objm2\*\)z\(\*!m2iso\+aglet\*\)z\(\*!m2pim\+gm2\*\)z\(\*!m2iso\+p1\*\)z\(\*!m2iso\+xds\*\)z([a-zA-Z_$][\w$]*)z0b[01]+(\'[01]+)*z0[ux][0-9A-F]+(\'[0-9A-F]+)*z>[0-9]+(\'[0-9]+)*\.[0-9]+(\'[0-9]+)*[eE][+-]?[0-9]+(\'[0-9]+)*z$[0-9]+(\'[0-9]+)*\.[0-9]+(\'[0-9]+)*z[0-9]+(\'[0-9]+)*z[0-7]+Bz[0-7]+Cz
[0-9A-F]+Hz"(\\\\|\\[^\\]|[^"\\])*"z'(\\\\|\\[^\\]|[^'\\])*'z\*\.z\+>�<>�<=�>=�==�::�:=z\+\+�--z[+-]z[*/]z\\z[=#<>]z\^�@�&�~�`z\.\.�<<�>>�->z\|#�##z\|\*z[()\[\]{},.:;|]�!z\?z^//.*?\nz\(\*([^$].*?)\*\)z/\*(.*?)\*/z	<\*.*?\*>z
\(\*\$.*?\*\)�
whitespace�dialecttags�pragmas�comments�identifiers�suffixed_number_literals�prefixed_number_literals�plain_number_literals�string_literals�digraph_punctuation�digraph_operators�unigraph_punctuation�unigraph_operators)r"r#r&r(r)r'r*r,r.r+r-r%r$�root)%�AND�ARRAY�BEGIN�BY�CASE�CONST�
DEFINITION�DIV�DO�ELSE�ELSIF�END�EXIT�FOR�FROM�IF�IMPLEMENTATION�IMPORT�IN�LOOP�MOD�MODULE�NOT�OF�OR�POINTER�	PROCEDURE�RECORD�REPEAT�RETURN�SET�THEN�TO�TYPE�UNTIL�VAR�WHILE)�ABS�BOOLEAN�CARDINAL�CHAR�CHR�FALSE�INTEGER�LONGINT�LONGREAL�MAX�MIN�NIL�ODD�ORD�REAL�TRUE)�ADDRESS�BYTE�WORD�ADR)r!rr�$�%�?�\r�++rr�*.�+>rrr�|#r )�EXPORT�	QUALIFIED�WITH)�BITSET�CAP�DEC�DISPOSE�EXCL�FLOAT�HALT�HIGH�INC�INCL�NEWr`�PROC�SIZE�TRUNC�VAL)�SYSTEM�PROCESS�TSIZE�
NEWPROCESS�TRANSFER)rrirjrkrlrrmrrrnrorrrrpr )�EXCEPTrq�FINALLY�FORWARD�	PACKEDSETrr�REM�RETRYrs�ABSTRACT�AS�CLASS�GUARD�INHERIT�OVERRIDE�READONLY�REVEAL�TRACED�
UNSAFEGUARDED)rtru�CMPLX�COMPLEXrvrwrxryrzr{�IMr|r}�INT�
INTERRUPTIBLE�LENGTH�LFLOAT�LONGCOMPLEXr~r�
PROTECTION�REr�r��UNINTERRUBTIBLEr��CREATE�DESTROY�EMPTY�ISMEMBER�SELF):r��
BITSPERLOC�LOCSPERBYTE�LOCSPERWORD�LOC�ADDADR�SUBADR�DIFADR�MAKEADRrh�ROTATE�SHIFT�CASTr��
COROUTINES�ATTACH�	COROUTINE�CURRENT�DETACH�HANDLER�INTERRUPTSOURCE�
IOTRANSFER�
IsATTACHED�LISTEN�NEWCOROUTINE�PROTr��
EXCEPTIONS�AllocateSource�
CurrentNumber�ExceptionNumber�ExceptionSource�
GetMessage�IsCurrentSource�IsExceptionalExecution�RAISE�TERMINATION�
IsTerminating�	HasHalted�M2EXCEPTION�M2Exceptions�M2Exception�
IsM2Exception�indexException�rangeException�caseSelectException�invalidLocation�functionException�wholeValueException�wholeDivException�realValueException�realDivException�complexValueException�complexDivException�
protException�sysException�coException�exException)r!rrrirjrr)�ALIAS�ARGLIST�	BLUEPRINT�COPY�GENLIB�
INDETERMINATEr~�NONE�OPAQUE�REFERENTIAL�RELEASE�RETAIN�ASM�REG)rW�COUNTr��EXISTS�INSERTr��LONGCARD�OCTET�PTR�PRED�READ�READNEW�REMOVE�RETRIEVE�SORT�STORE�SUBSET�SUCC�TLIMIT�TMAX�TMINrdr��UNICHAR�WRITE�WRITEF)K�TPROPERTIES�PROPERTY�LITERAL�	TPROPERTY�TLITERAL�TBUILTIN�TDYN�TREFC�TNIL�TBASE�
TPRECISION�TMAXEXP�TMINEXP�
CONVERSION�TSXFSIZE�SXFr��UNSAFEr��	INTRINSIC�AVAIL�ADD�SUB�ADDC�SUBC�FETCHADD�FETCHSUB�SHL�SHR�ASHR�ROTL�ROTR�ROTLC�ROTRC�BWNOT�BWAND�BWOR�BWXOR�BWNAND�BWNOR�SETBIT�TESTBIT�LSBIT�MSBIT�CSBITS�BAILrz�TODO�FFI�ADDR�VARGLIST�VARGC�ATOMICrr�SWAP�CASr|rvr!r$r"r#�COMPILER�DEBUG�MODNAME�PROCNAME�LINENUM�DEFAULT�HASH�	ASSEMBLER�REGISTER�SETREG�GETREG�CODE)r!rirjrr)�BYCOPY�BYREFr��CONTINUE�CRITICAL�INOUT�METHOD�ON�OPTIONAL�OUT�PRIVATE�	PROTECTED�PROTOCOL�PUBLIC�SUPER�TRY)�OBJECT�NO�YES�)	�BITSET8�BITSET16�BITSET32�	CARDINAL8�
CARDINAL16�
CARDINAL32�INTEGER8�	INTEGER16�	INTEGER32)
r��
__ATTRIBUTE__�__BUILTIN__�
__COLUMN__�__DATE__�__FILE__�__FUNCTION__�__LINE__�
__MODULE__�VOLATILE)rSrTrUrVrWrX�
CARDINAL64�	COMPLEX32�	COMPLEX64�	COMPLEX96�
COMPLEX128rYrZr[�	INTEGER64�REAL8�REAL16�REAL32�REAL96�REAL128�THROW)�BCD)�SEQ)	�ASH�ASSERT�DIFFADR_TYPE�ENTIER�INDEX�LENr��	SHORTCARD�SHORTINT)r�r��BOOL8�BOOL16�BOOL32�CARD8�CARD16�CARD32�INT8�INT16�INT32�REF�MOVE�FILL�GET�PUT�CC�int�unsigned�size_t�voidCOMPILER�OPTION�EQUATION)�Terminal�
FileSystem�InOut�	RealInOut�MathLib0�Storage)�Flag�FlagSet�Response�Command�Lock�
Permission�
MediumType�File�FileProc�
DirectoryProc�FileCommand�DirectoryCommand)9�Read�BusyRead�	ReadAgain�Write�WriteString�WriteLn�Create�Lookup�Close�Delete�Rename�SetRead�SetWrite�	SetModify�SetOpen�Doio�SetPos�GetPos�Length�Reset�Again�ReadWord�	WriteWord�ReadChar�	WriteChar�CreateMedium�DeleteMedium�
AssignName�DeassignName�
ReadMedium�LookupMedium�	OpenInput�
OpenOutput�
CloseInput�CloseOutput�
ReadString�ReadInt�ReadCard�ReadWrd�WriteInt�	WriteCard�WriteOct�WriteHex�WriteWrd�ReadReal�	WriteReal�
WriteFixPt�WriteRealOct�sqrt�exp�ln�sin�cos�arctan�entier�ALLOCATE�
DEALLOCATE)�Done�termCH�in�out)�EOL)0rq�LONGBCDrt�SHORTBITSET�
LONGBITSET�LONGLONGBITSETr�r�ry�LONGLONGCARDrz�LONGLONGINT�POSINT�SHORTPOSINT�
LONGPOSINT�LONGLONGPOSINTrSrTrU�BITSET64�	BITSET128�BS8�BS16�BS32�BS64�BS128rVrWrXre�CARDINAL128r~rr��CARD64�CARD128rYrZr[rj�
INTEGER128r�r�r��INT64�INT128�STRING�	UNISTRING)�	ProtoRoot�ProtoComputational�ProtoNumeric�ProtoScalar�ProtoNonScalar�
ProtoCardinal�ProtoInteger�	ProtoReal�ProtoComplex�ProtoVector�
ProtoTuple�ProtoCompArray�ProtoCollection�ProtoStaticArray�ProtoStaticSet�ProtoStaticString�
ProtoArray�ProtoString�ProtoSet�
ProtoMultiSet�ProtoDictionary�ProtoMultiDict�ProtoExtension�ProtoIO�
ProtoCardMath�ProtoIntMath�
ProtoRealMath)�ASCII�	BooleanIO�CharIO�	UnicharIO�OctetIO�
CardinalIO�
LongCardIO�	IntegerIO�	LongIntIO�RealIO�
LongRealIO�BCDIO�	LongBCDIO�CardMath�LongCardMath�IntMath�LongIntMath�RealMath�LongRealMath�BCDMath�LongBCDMath�FileIOr�r��	IOSupport)r��Status)r�r�r�)�stdIn�stdOut�stdErr)�pi�tau)	�unknown�m2pim�m2iso�m2r10�objm2zm2iso+agletz	m2pim+gm2zm2iso+p1z	m2iso+xdscKs�t|dg�}|D]}||jdd�vr|�|�nq|�d�d|_t|dg�}d|vs1d|vr5d	|_nd|_t|d
d	�|_tj|fi|��dS)N�dialect����r1F�style�algol�algol_nuT�treat_stdlib_adts_as_builtins)	r�dialects�set_dialect�dialect_set_by_tag�algol_publication_moderr<r�__init__)�self�optionsr=�dialect_option�stylesrRrR�9/usr/lib/python3/dist-packages/pygments/lexers/modula2.pyrA�s 
�
�zModula2Lexer.__init__cCs�||jvrd}n|}t�}|j|D]	}|�t|��qt�}|j|D]	}|�t|��q$t�}|j|D]}|�t|��|��q6t�}|j|D]}|�t|��|��qKt�}|j|D]}|�t|��|��q`t�}	|j	|D]}|	�t|��|��qut�}
|j
|D]}|
�t|��|��q�t�}|j|D]}|�t|��|��q�t�}|j|D]}|�t|��|��q�t�}
|j
|D]}|
�t|��|��q�||_||_||_||_||_||_|	|_|
|_||_||_|
|_dS)Nr1)r=�set�lexemes_to_reject_db�update�reserved_words_db�builtins_db�
difference�pseudo_builtins_db�stdlib_adts_db�stdlib_modules_db�stdlib_types_db�stdlib_procedures_db�stdlib_variables_db�stdlib_constants_dbr6�lexemes_to_reject�reserved_words�builtins�pseudo_builtins�adts�modules�types�
procedures�	variables�	constants)rB�
dialect_idr6�lexemes_to_reject_set�list�reswords_set�builtins_set�pseudo_builtins_set�adts_set�modules_set�	types_set�procedures_set�
variables_set�
constants_setrRrRrFr>sX

zModula2Lexer.set_dialectc
Cs�d}d}t|�}t|�}|}|}t|�||krA|�|�rA|�|�rA|||�}tdt|j��D]
}	||j|	kr>|Sq1dSdS)Nz(*!�*)r7r1)�len�
startswith�endswith�ranger=)
rB�dialect_tag�left_tag_delim�right_tag_delim�left_tag_delim_len�right_tag_delim_len�indicator_start�
indicator_end�	indicator�indexrRrRrF�get_dialect_from_dialect_tag|s$���	z)Modula2Lexer.get_dialect_from_dialect_tagccs��t�||�D�]N\}}}|js&|tjkr&|�|�}|dkr&|�|�d|_|tur�||jvr;t	j
}|jr9|��}�n||j
vrLtj}|jrJ|��}�n||jvr]tjj}|jr\|��}n�||jvru|jsitj}n�tjj}|jrt|��}n�||jvr~tj}n�||jvr�tj}n�||jvr�tj}n�||jvr�tj}n�||jvr�tj}n�|tvr�|jdvr�d|vs�|dd�dvr�t}n�|jdvr�|tj ur�t}n�|tj!ur�d	|vr�t}n}|tj"ur�d
|vr�t}nq|tv�r|tj#ur�|jdvr�t}|tj$u�r|�%d��r|j�%d��rt}nJ|�%d
��r|jdk�r|j�%d��stj&}n3||j'v�r%t}|j�rP|dk�r1d}n|dk�r9d}n|dk�rAd}n|dk�rId}n|dk�rPd}|||fVqdS)Nr1T)r1r4r5�'r�)�0b�0x�0u)r4r5�H�Ez<*r2z(*$�#u≠ru≤ru≥ru≡rnu•)(r�get_tokens_unprocessedr?r�Specialrxr>r
rUr	�Reservedr@�lowerrV�BuiltinrW�PseudorXr<�	NamespacerYrZ�Classr[�Functionr\�Variabler]�Constantrr6r�Oct�Hex�Float�Single�Preprocrl�	MultilinerT)rB�textrw�token�value�indicated_dialectrRrRrFr��s��


�
�
�
�




�
�

�



�
��




�z#Modula2Lexer.get_tokens_unprocessedcCsHd|vrd|vrd|vsdSd}t�d|�r|d7}t�d|�r"d	}|S)
zNIt's Pascal-like, but does not use FUNCTION -- uses PROCEDURE
        instead.z(*rjrNrz
\bPROCEDURE\bg333333�?z\bFUNCTION\bg)�re�search)r��resultrRrRrF�analyse_textszModula2Lexer.analyse_textN)_�__name__�
__module__�__qualname__�__doc__�name�aliases�	filenames�	mimetypesr��	MULTILINE�DOTALL�flagsrrr�r
r�Binr�r��Integerr�r�Doubler�rr
r�r�r�tokens�common_reserved_words�common_builtins�common_pseudo_builtins�pim_lexemes_to_reject�pim_additional_reserved_words�pim_additional_builtins�pim_additional_pseudo_builtins�iso_lexemes_to_reject�iso_additional_reserved_words�iso_additional_builtins�iso_additional_pseudo_builtins�m2r10_lexemes_to_reject�m2r10_additional_reserved_words�m2r10_additional_builtins� m2r10_additional_pseudo_builtins�objm2_lexemes_to_reject�objm2_additional_reserved_words�objm2_additional_builtins� objm2_additional_pseudo_builtins�aglet_additional_reserved_words�aglet_additional_builtins� aglet_additional_pseudo_builtins�gm2_additional_reserved_words�gm2_additional_builtins�gm2_additional_pseudo_builtins�p1_additional_reserved_words�p1_additional_builtins�p1_additional_pseudo_builtins�xds_additional_reserved_words�xds_additional_builtins�xds_additional_pseudo_builtins�pim_stdlib_module_identifiers�pim_stdlib_type_identifiers�pim_stdlib_proc_identifiers�pim_stdlib_var_identifiers�pim_stdlib_const_identifiers�iso_stdlib_module_identifiers�iso_stdlib_type_identifiers�iso_stdlib_proc_identifiers�iso_stdlib_var_identifiers�iso_stdlib_const_identifiers�m2r10_stdlib_adt_identifiers�"m2r10_stdlib_blueprint_identifiers�m2r10_stdlib_module_identifiers�m2r10_stdlib_type_identifiers�m2r10_stdlib_proc_identifiers�m2r10_stdlib_var_identifiers�m2r10_stdlib_const_identifiersr=rHrJrKrMrNrOrPrQrRrSrAr>rxr�r�rRrRrRrFrs��������������
�
����%

			
	
	���������+�	���������C�	���������C�	���������B���1���������4���������1���������1���������1���������1&f0n)r�r��pygments.lexerrr�
pygments.utilrr�pygments.tokenrrrr	r
rrr
r�__all__rrRrRrRrF�<module>s
,

https://t.me/RX1948 - 2025