403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python313/Lib/idlelib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python313/Lib/idlelib/__pycache__/pyparse.cpython-313.opt-1.pyc
�

��i�O��F�SrSSKr\"S5urrrrr\R"S\R\R-5Rr\R"S\R5Rr\R"S\R\R-5Rr\R"S\R5Rr\R"S\R5Rr\R"S	\R5Rr"S
S\5r\R-\"S5S
5r\R1SS55 \R1SS55 \R1SS55 "SS5r\S:XaSSKJr \"SSS9 gg)a�Define partial Python code Parser used by editor and hyperparser.

Instances of ParseMap are used with str.translate.

The following bound search and match functions are defined:
_synchre - start of popular statement;
_junkre - whitespace or comment line;
_match_stringre: string, possibly without closer;
_itemre - line that may have bracket structure start;
_closere - line that must be followed by dedent.
_chew_ordinaryre - non-special characters.
�N�z�
    ^
    [ \t]*
    (?: while
    |   else
    |   def
    |   return
    |   assert
    |   break
    |   class
    |   continue
    |   elif
    |   try
    |   except
    |   raise
    |   import
    |   yield
    )
    \b
z'
    [ \t]*
    (?: \# \S .* )?
    \n
aK
    \""" [^"\\]* (?:
                     (?: \\. | "(?!"") )
                     [^"\\]*
                 )*
    (?: \""" )?

|   " [^"\\\n]* (?: \\. [^"\\\n]* )* "?

|   ''' [^'\\]* (?:
                   (?: \\. | '(?!'') )
                   [^'\\]*
                )*
    (?: ''' )?

|   ' [^'\\\n]* (?: \\. [^'\\\n]* )* '?
zM
    [ \t]*
    [^\s#\\]    # if we match, m.end()-1 is the interesting char
z_
    \s*
    (?: return
    |   break
    |   continue
    |   raise
    |   pass
    )
    \b
z
    [^[\](){}#'"\\]+
c��\rSrSrSrSrSrg)�ParseMap�faTDict subclass that maps anything not in dict to 'x'.

This is designed to be used with str.translate in study1.
Anything not specifically mapped otherwise becomes 'x'.
Example: replace everything except whitespace with 'x'.

>>> keepwhite = ParseMap((ord(c), ord(c)) for c in ' \t\n\r')
>>> "a + b\tc\nd".translate(keepwhite)
'x x x\tx\nx'
c��g)N�x�)�self�keys  �$C:\Python313\\Lib\idlelib\pyparse.py�__missing__�ParseMap.__missing__rs���r	N)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r
�__static_attributes__r	rrrrfs��	�rr�rc#�N# �UHn[U5[S54v� M g7f)�(N��ord��.0�cs  r�	<genexpr>rx����/��A�c�!�f�c�#�h�
����#%z({[c#�N# �UHn[U5[S54v� M g7f)�)Nrrs  rrryrr z)}]c#�N# �UHn[U5[U54v� M g7f�Nrrs  rrrzs���2�z�!�c�!�f�c�!�f�
�z�r z"'\
#c�h�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSr
SrS
rSrSrSrg)�Parser�}c��XlX lgr$)�indentwidth�tabwidth)r
r)r*s   r�__init__�Parser.__init__s
��&�� �
rc��XlSUlg)Nr)�code�study_level)r
�ss  r�set_code�Parser.set_code�s���	���rc�\�URSp2[U5n[S5HvnURSSU5nUS:a O\URSSU5S-n[	X&U5nU(a-U"UR55(dUR5n OUnMx Uc?[	U5nU(a+U"UR55(dUR5nU$US-n[	X&5=n(a5UR
5up�U"U5(dUn[	X&5=n(aM5U$)a
Return index of a good place to begin parsing, as close to the
end of the string as possible.  This will be the start of some
popular stmt like "if" or "def".  Return None if none found:
the caller should pass more prior context then, if possible, or
if not (the entire program text up until the point of interest
has already been tried) pass 0 to set_lo().

This will be reliable iff given a reliable is_char_in_string()
function, meaning that when it says "no", it's absolutely
guaranteed that the char is not in a string.
Nrz:
r�
�)r.�len�range�rfind�_synchre�start�span)	r
�is_char_in_stringr.�pos�limit�tries�i�mr0s	         r�find_good_parse_start�Parser.find_good_parse_start�s���I�I�t�c�
�D�	���1�X�E��
�
�5�!�U�+�A��1�u���
�
�4��A�&��*�A���%�(�A��*�1�7�7�9�5�5��g�g�i����E���;����A��*�1�7�7�9�5�5��g�g�i���J�
�!�G���D�$�$�a�$��6�6�8�D�A�$�Q�'�'����D�$�$�a�$��
rc�:�US:�aURUSUlgg)zgThrow away the start of the string.

Intended to be called with the result of find_good_parse_start().
rN)r.)r
�los  r�set_lo�
Parser.set_lo�s!����6��	�	�"�#��D�I�rc��URS:�agSUlURnUR[5nUR	SS5nUR	SS5nUR	SS5nUR	SS5nUR	SS5n[
nS	=p4S	/=UlnURnS	[U5p�Xx:GaMXn	US-nU	S:XaMU	S:XaUS-nUS	:XaU"U5 M2U	S
:XaUS-nM?U	S:XaU(aUS-
nMSU	S:XdU	S
:Xa�U	n
XS-
US-U
S-:XaU
S-n
Un[U
5S-
nX|-nXx:afXn	US-nU	S:XaMXS-
X|-U
:XaX|-nOYU	S:XaUS-nUS	:XaUS	:XaU"U5 O9MJU	S:XaXS:XaUS-nUS-nMdXx:aMfUS-
U:Xa[nO[nGMU	S:XaURSU5nGM*XS:XaUS-nUS-U:Xa[nUS-nXx:aGMMU[:waU[:waUS	:�a[nX lUSU:wa	U"U5 gg)z�Find the line numbers of non-continuation lines.

As quickly as humanly possible <wink>, find the line numbers (0-
based) of the non-continuation lines.
Creates self.{goodlines, continuation}.
r5N�xxxxxxxx�x�xxxx�xxz
xr4rrr"�"�'���\�#���)r/r.�	translate�trans�replace�C_NONE�	goodlines�appendr6�C_STRING_FIRST_LINE�C_STRING_NEXT_LINES�find�C_BACKSLASH�	C_BRACKET�continuation)
r
r.r_�level�lnorX�	push_goodr@�n�ch�quote�firstlno�ws
             r�_study1�Parser._study1�s������q� ������y�y���~�~�e�$���|�|�J��,���|�|�F�C�(���|�|�D�#�&���|�|�D�#�&���|�|�E�4�(�������&'�S�(�����$�$�	��#�d�)�1��e���B��!��A��S�y���T�z��A�g���A�:��c�N���S�y���	����S�y��!�A�I�E���S�y�B�#�I����!��A�a�C�=�E�A�I�-�!�A�I�E�����J��N���C���e���B��!��A��S�y� ��a�C���}��-��C����T�z�!�A�g����6�$��z� )�#��!� ��T�z��7�d�?�"%��'�C��a�C�� �3�e�@�a��H�,�(;��':����S�y��I�I�d�A�&����w�$���A�g���Q�3�!�8�#.�L��!��A�k�e�t
�/�/�� 3�3���	�$�L�(��
�R�=�C���c�N� rc�:�UR5 UR$r$)rhr_�r
s r�get_continuation_type�Parser.get_continuation_typeKs������� � � rc�p�URS:�agUR5 SUlURURp![	U5S-
n[	U5nU(aUUn[X#S-
X#5HnUR
SSUS-
5S-nM [X5(aUS-
nOO	U(aMUUS:XaUnUWsUlUl	Sn/nURn	US4/n
XE:Ga�[XU5nU(aHUR5nUS-
nX4:�aXS;aUS-
nX4:�a
XS;aMX4:�aXnUnXE:�aGOLXn
U
S;a-U	"U5 U
RU[	U545 U
nUS-nM�U
S	;a/U(aUS
	U
nUS-nU
RU[	U545 M�U
S:XdU
S:XaZU
RU[	U5S-45 U
n[XU5R5nU
RU[	U545 GM3U
S
:XaSU
RU[	U5S-45 URSXE5S-nU
RU[	U545 GM�US-nXS:waX�U-nUS-nXE:aGM�XplU(aUS
OSUl[#U
5Ulg)a�
study1 was sufficient to determine the continuation status,
but doing more requires looking at every character.  study2
does this for the last interesting statement in the block.
Creates:
    self.stmt_start, stmt_end
        slice indices of last interesting stmt
    self.stmt_bracketing
        the bracketing structure of the last interesting stmt; for
        example, for the statement "say(boo) or die",
        stmt_bracketing will be ((0, 0), (0, 1), (2, 0), (2, 1),
        (4, 0)). Strings and comments are treated as brackets, for
        the matter.
    self.lastch
        last interesting character before optional trailing comment
    self.lastopenbracketpos
        if continuation is C_BRACKET, index of last open bracket
rONr5r4r�� 	
�([{�)]}rSrMrNrR)r/rhr.rXr6r7r8�_junkre�
stmt_start�stmt_endrY�_chew_ordinaryre�end�_match_stringrer\�lastch�lastopenbracketpos�tuple�stmt_bracketing)r
r.rXr@�p�q�nothingry�stack�
push_stack�
bracketingrA�newprds              r�_study2�Parser._study2Os���&���q� ����������)�)�T�^�^�i��	�N�Q�����I����A� ��Q�3����>���J�J�t�Q��!��,�q�0��?�
�� � ��a�C����a�
��6��A�)*�A�&����������\�\�
��!�f�X�
��e� ��!�,�A���u�u�w���1�H���f���G�!3��!��A��f���G�!3��6�!�W�F����6����B��U�{��1�
��!�!�1�c�%�j�/�2����a�C����U�{���b�	����a�C���!�!�1�c�%�j�/�2���S�y�B�#�I��!�!�1�c�%�j��l�"3�4���#�D�Q�/�3�3�5���!�!�1�c�%�j�/�2���S�y��!�!�1�c�%�j��l�"3�4��I�I�d�A�)�A�-���!�!�1�c�%�j�/�2���!��A��w�$���1�g����!��A�{�e�B��/4�%��)�$���$�Z�0��rc���UR5 URnURn[U5nUR	SSU5S-=pEUS-nX:aE[X!5nU(aUR
5S-
nSnOCURSU5S-=pQX:aMEU=pX!S;aUS-nX!S;aMURn[X%URUR55U-$)z`Return number of spaces the next line should be indented.

Line continuation must be C_BRACKET.
r4rr5� 	)r�rzr.r6r8�_itemrerwr\r)�
expandtabsr*)r
�jr.rc�origir@rA�extras        r�compute_bracket_indent�Parser.compute_bracket_indent�s���
	
�����#�#���y�y����I���J�J�t�Q��*�Q�.�.��
�a�C���e��� �A���E�E�G�a�K������	�	�$��*�Q�.�.���e��M�A��'�U�"��a�C���'�U�"��$�$�E��4�!�9�'�'��
�
�6�7�%�?�?rc�P�UR5 URnUSUS-
$)z�Return number of physical lines in last stmt.

The statement doesn't have to be an interesting statement.  This is
intended to be called when continuation is C_BACKSLASH.
rS���)rhrX)r
rXs  r�get_num_lines_in_stmt�Parser.get_num_lines_in_stmt�s)��	
�����N�N�	���}�y��}�,�,rc���UR5 URnURnXS;aUS-nXS;aMUnURSU5S-nS=pVX$:a�XnUS;aUS-nUS-nOvUS;aU(aUS-
nUS-nO^US:XdUS:Xa[	XU5R5nO7US	:XaO7US:Xa%US
:XaUS:XdXS-
S;aXS-S
:waSnOUS-nX$:aM�U(a US-n[R"SXU5S
LnU(dUnXS;aUS-nXS;aM[XRURUR55S-$)z�Return number of spaces the next line should be indented.

Line continuation must be C_BACKSLASH.  Also assume that the new
line is the first one following the initial line of the stmt.
r�r5r4rrqrrrMrNrR�=z=<>!z\s*\\Nrp)r�r.rtr\rxrw�re�matchr6r�r*)r
r.r@�startpos�endpos�foundr`rds        r�compute_backslash_indent�Parser.compute_backslash_indent�s���	
�����y�y���O�O���g����!��A��g��������4��*�Q�.������j���B��U�{���	���a�C���u���!�A�I�E��a�C���s��b�C�i�#�D�V�4�8�8�:���s����!���c�	���F�d�Q�3�i�v�5��!��9��#�����a�C��+�j�.��!��A��H�H�X�t�f�~�6�$�>�E���A��'��(��a�C���'��(��4����*�5�5�%)�]�]�4�5�78�9�	9rc��UR5 URURp!UnURnX2:aXCS;aUS-nX2:a
XCS;aMXAU$)zPReturn the leading whitespace on the initial line of the last
interesting stmt.
r�r5)r�rtrur.)r
r@rcr�r.s     r�get_base_indent_string�Parser.get_base_indent_string,s[��	
��������
�
�1�
���y�y���e���5�(��A��A��e���5�(��a�y�rc�@�UR5 URS:H$)z<Return True if the last interesting statement opens a block.�:)r�ryrks r�is_block_opener�Parser.is_block_opener8s�������{�{�c�!�!rc�f�UR5 [URUR5SL$)z=Return True if the last interesting statement closes a block.N)r��_closerer.rtrks r�is_block_closer�Parser.is_block_closer=s%��������	�	�4�?�?�3�4�?�?rc�:�UR5 UR$)zzReturn bracketing structure of the last interesting statement.

The returned tuple is in the format defined in _study2().
)r�r|rks r�get_last_stmt_bracketing�Parser.get_last_stmt_bracketingBs��
	
�����#�#�#r)r.r_rXr)ryrzr|rurtr/r*N)rrrrr+r1rBrFrhrlr�r�r�r�r�r�r�r�rr	rrr&r&}sP��!��
2�h'�D�L!�y1�v@�>-�79�r
�"�
@�
$rr&�__main__)�mainzidlelib.idle_test.test_pyparserO)�	verbosity)rr�r7rWr]rZr[r^�compile�VERBOSE�	MULTILINE�searchr9r�rs�DOTALLrxr�r�rv�dictr�fromkeysrU�updater&r�unittestr�r	rr�<module>r�s����
�$)��8�!���)��i��:�:��&�Z�Z�"�,�,��' �&!'��'	�.
�*�*���Z�Z�	���	��*�*�� �Z�Z�"�)�)��!� #�U�!�*
�*�*���Z�Z������:�:�	��Z�Z�	���	� �:�:���Z�Z�����

�t�
�"	���%��*�c�*�����/��/�/����/��/�/����2�z�2�2�K$�K$�\�z����	)�Q�7�r

Youez - 2016 - github.com/yon3zu
LinuXploit