
    fn                     t   d Z ddlZddlmZmZ ddlZddlZddlmZm	Z	m
Z
mZ ddlZ ej                  d      Zd Zd Z G d d	      Z e ej                  d
       ej                  d            Z e ej                  dej&                              Zd Zde
e   fdZdefdZde	eef   defdZ G d d      Z G d de      Z G d de      ZdZdZdZdZ d Z!d!Z"d"Z#d#Z$d$Z%h d%Z&ddhZ'd& Z(d' Z)d( Z*d) Z+d* Z,d+ Z-d, Z.ed-j^                  ed.j^                  ee)e e*e!e+e#e,e$e-e%e.iZ0 G d/ d0e      Z1 ej                  d1ej&                        Z2 G d2 d3e      Z3d4ee4   fd5Z5d6eejl                     fd7Z7d8e4fd9Z8d:Z9 G d; d<      Z:d= Z; G d> d?e      Z< G d@ dAe      Z=ej|                  Z? e=e?B      Z@y)Ca5  Input transformer machinery to support IPython special syntax.

This includes the machinery to recognise and transform ``%magic`` commands,
``!system`` commands, ``help?`` querying, prompt stripping, and so forth.

Added: IPython 7.0. Replaces inputsplitter and inputtransformer which were
deprecated in 7.0.
    N)CommandCompilerCompile)ListTupleOptionalAnyz^[ \t]+c                 h    | s| S t        |       D ]  \  }}|s	|j                         r| |d c S  | S )zyRemove leading empty lines

    If the leading lines are empty or contain only whitespace, they will be
    removed.
    N)	enumerateisspace)linesilines      Y/var/www/cvtools/html/venv/lib/python3.12/site-packages/IPython/core/inputtransformer2.pyleading_empty_linesr      sB     U# 49 L    c                     | s| S t         j                  | d         }|s| S |j                  d      }t        |      }| D cg c]  }|j	                  |      r||d n| c}S c c}w )zRemove leading indentation.

    If the first line starts with a spaces or tabs, the same whitespace will be
    removed from each following line in the cell.
    r   N)
_indent_rematchgrouplen
startswith)r   mspacenls        r   leading_indentr   #   st     q"AGGAJEE
A \\%(AabEa/   s   A#c                   $    e Zd ZdZddZd Zd Zy)PromptStripperaA  Remove matching input prompts from a block of input.

    Parameters
    ----------
    prompt_re : regular expression
        A regular expression matching any input prompt (including continuation,
        e.g. ``...``)
    initial_re : regular expression, optional
        A regular expression matching only the initial prompt, but not continuation.
        If no initial expression is given, prompt_re will be used everywhere.
        Used mainly for plain Python prompts (``>>>``), where the continuation prompt
        ``...`` is a valid Python expression in Python 3, so shouldn't be stripped.

    Notes
    -----

    If initial_re and prompt_re differ,
    only initial_re will be tested against the first line.
    If any prompt is found on the first two lines,
    prompts will be stripped from the rest of the block.
    Nc                 (    || _         |xs || _        y N	prompt_re
initial_re)selfr"   r#   s      r   __init__zPromptStripper.__init__I   s    "$1	r   c                 d    |D cg c]   }| j                   j                  d|d      " c}S c c}w )N    )count)r"   sub)r$   r   r   s      r   _stripzPromptStripper._stripM   s,    <ABq""2q"2BBBs   %-c                     |s|S | j                   j                  |d         s,t        |      dkD  r/| j                  j                  |d         r| j	                  |      S |S Nr   r(   )r#   r   r   r"   r+   r$   r   s     r   __call__zPromptStripper.__call__P   sT    L??  q*UaDNN$8$8q$B;;u%%r   r    )__name__
__module____qualname____doc__r%   r+   r/    r   r   r   r   3   s    *2Cr   r   z^(>>>|\.\.\.)( |$)z	^>>>( |$)r!   a  
        ^(                         # Match from the beginning of a line, either:

                                   # 1. First-line prompt:
        ((\[nav\]|\[ins\])?\ )?    # Vi editing mode prompt, if it's there
        In\                        # The 'In' of the prompt, with a space
        \[\d+\]:                   # Command index, as displayed in the prompt
        \                          # With a mandatory trailing space

        |                          # ... or ...

                                   # 2. The three dots of the multiline prompt
        \s*                        # All leading whitespace characters
        \.{3,}:                    # The three (or more) dots
        \ ?                        # With an optional trailing space

        )
        c                     | r| d   j                  d      s| S t        j                  d| d         r| S | d   dd  j                         j	                  d      \  }}}dj                  | dd        }d|d	|d	|d
gS )Nr   %%z%%\w+\?    r'   r(   zget_ipython().run_cell_magic(, z)
)r   rer   rstrip	partitionjoin)r   
magic_name_
first_linebodys        r   
cell_magicrB   v   s    a++D1	xx
E!H% %a 3 3 5 ? ? DJ:7759D:t- . .r   returnc                     d}t        |       D ]9  \  }}|j                  }|dk(  r	|dk(  r|c S |dv r|dz  }*|dv s/|dkD  s5|dz  }; y)zGet the index of the first assignment in the line ('=' not inside brackets)

    Note: We don't try to support multiple special assignment (a = b = %foo)
    r   =   ([{r(      )]}N)r
   string)
token_lineparen_levelr   tiss        r   _find_assign_oprS      sm    
 K:& !2II8q(H1K/!Qq ! r   
start_linec                     |}| |   j                  d      r+|dz  }|t        |       k\  r	 |S | |   j                  d      r+|S )zjFind the last line of a line explicitly extended using backslashes.

    Uses 0-indexed line numbers.
    z\
r(   )endswithr   )r   rT   end_lines      r   find_end_of_continued_linerX      sS    
 H
/
"
"6
*As5z!O	 /
"
"6
* Or   startrW   c                     | |d      |d   d g| |d   dz   |dz    z   }dj                  |dd D cg c]  }|j                         dd  c}|d   j                         gz         S c c}w )a  Assemble a single line from multiple continued line pieces

    Continued lines are lines ending in ``\``, and the line following the last
    ``\`` in the block.

    For example, this code continues over multiple lines::

        if (assign_ix is not None) \
             and (len(line) >= assign_ix + 2) \
             and (line[assign_ix+1].string == '%') \
             and (line[assign_ix+2].type == tokenize.NAME):

    This statement contains four continued line pieces.
    Assembling these pieces into a single line would give::

        if (assign_ix is not None) and (len(line) >= assign_ix + 2) and (line[...

    This uses 0-indexed line numbers. *start* is (lineno, colno).

    Used to allow ``%magic`` and ``!system`` commands to be continued over
    multiple lines.
    r   r(   Nr8   )r=   r;   )r   rY   rW   partsps        r   assemble_continued_liner^      s    . 58_U1XY'(5q!HQJ+GGE88eCRj9QXXZ_9Ry'')*+ , ,9s   A'c                   B    e Zd ZdZdZd Zd Zed        Zde	e
   fdZy)	TokenTransformBasea  Base class for transformations which examine tokens.

    Special syntax should not be transformed when it occurs inside strings or
    comments. This is hard to reliably avoid with regexes. The solution is to
    tokenise the code as Python, and recognise the special syntax in the tokens.

    IPython's special syntax is not valid Python syntax, so tokenising may go
    wrong after the special syntax starts. These classes therefore find and
    transform *one* instance of special syntax at a time into regular Python
    syntax. After each transformation, tokens are regenerated to find the next
    piece of special syntax.

    Subclasses need to implement one class method (find)
    and one regular method (transform).

    The priority attribute can select which transformation to apply if multiple
    transformers match in the same place. Lower numbers have higher priority.
    This allows "%magic?" to be turned into a help call rather than a magic call.
    
   c                 H    | j                   | j                  | j                  fS r    )rT   	start_colpriorityr$   s    r   sortbyzTokenTransformBase.sortby   s    ==r   c                 2    |d   dz
  | _         |d   | _        y r-   )rT   rc   )r$   rY   s     r   r%   zTokenTransformBase.__init__   s    (Q,qr   c                     t         )a  Find one instance of special syntax in the provided tokens.

        Tokens are grouped into logical lines for convenience,
        so it is easy to e.g. look at the first token of each line.
        *tokens_by_line* is a list of lists of tokenize.TokenInfo objects.

        This should return an instance of its class, pointing to the start
        position it has found, or None if it found no match.
        NotImplementedError)clstokens_by_lines     r   findzTokenTransformBase.find   s
     "!r   r   c                     t         )zTransform one instance of special syntax found by ``find()``

        Takes a list of strings representing physical lines,
        returns a similar list of transformed lines.
        ri   r.   s     r   	transformzTokenTransformBase.transform   s
     "!r   N)r0   r1   r2   r3   rd   rf   r%   classmethodrm   r   strro   r4   r   r   r`   r`      s<    ( H>" 
" 
""tCy "r   r`   c                   2    e Zd ZdZed        Zdee   fdZy)MagicAssignz2Transformer for assignments from magics (a = %foo)c                     |D ]u  }t        |      }|t        |      |dz   k\  s#||dz      j                  dk(  s9||dz      j                  t        j
                  k(  s] | ||dz      j                        c S  y)z@Find the first magic assignment (a = %foo) in the cell.
        Nr7   r(   %)rS   r   rN   typetokenizeNAMErY   )rk   rl   r   	assign_ixs       r   rm   zMagicAssign.find   s     # 	4D'-I%Ti!m3ik*11S8ik*//8==@4	!,2233	4r   r   c                 8   | j                   | j                  }}||   d| }t        ||      }t        |||f|      }|j	                  d      sJ |       |dd j                  d      \  }}}	|d| }
dj                  ||	      }||z   dz   }||dz   d }|
|gz   |z   S )zJTransform a magic assignment found by the ``find()`` classmethod.
        Nru   r(   r8   z(get_ipython().run_line_magic({!r}, {!r})
)rT   rc   rX   r^   r   r<   format)r$   r   rT   rc   lhsrW   rhsr>   r?   argslines_beforecallnew_linelines_afters                 r   ro   zMagicAssign.transform   s     !%I
J
+-eZ@%ej)-DhO~~c"'C'"!!"g//4
At[j)9@@TR:$HQJK(xj(;66r   N	r0   r1   r2   r3   rp   rm   r   rq   ro   r4   r   r   rs   rs      s'    <	4 	47tCy 7r   rs   c                   2    e Zd ZdZed        Zdee   fdZy)SystemAssignz;Transformer for assignments from system commands (a = !foo)c                 \   |D ]&  }t        |      }|||   j                  j                         j                  d      r?t	        |      |dz   k\  sQ||dz      j
                  t        j                  k(  su|dz   }|t	        |      k  s||   j
                  t        j                  k(  s||   j                  dk(  r | ||   j                        c S ||   j                  j                         s|dz  }|t	        |      k  s||   j
                  t        j                  k(  r}) y)zAFind the first system assignment (a = !foo) in the cell.
        NrE   r7   r(   !)rS   r   stripr   r   rv   rw   
ERRORTOKENrN   rY   r   )rk   rl   r   ry   ixs        r   rm   zSystemAssign.find  s     # 	D'-I% O00668CCCHTi!m3i!m,11X5H5HH]3t9nb(:M:M)MBx#-"48>>22!"X__446!GB 3t9nb(:M:M)M	r   r   c                    | j                   | j                  }}||   d| }t        ||      }t        |||f|      }|j	                  d      sJ |       |dd }|d| }dj                  |      }	||	z   dz   }
||dz   d }||
gz   |z   S )zKTransform a system assignment found by the ``find()`` classmethod.
        Nr   r(   get_ipython().getoutput({!r})r{   )rT   rc   rX   r^   r   r|   )r$   r   rT   rc   r}   rW   r~   cmdr   r   r   r   s               r   ro   zSystemAssign.transform"  s     !%I
J
+-eZ@%ej)-DhO~~c"'C'"!"g[j).55c::$HqLM*xj(;66r   Nr   r4   r   r   r   r     s'    E $7tCy 7r   r   r   z!!???ru   r6   ,;/>   r   ru   r   r   r   r   c                     |dk(  rdnd| v rdnd}dj                  || g      }|j                  d      \  }}}|j                  t              }d|d|d	S )
zUPrepares a pinfo(2)/psearch call from a target name and the escape
    (i.e. ? or ??)r   pinfo2*psearchpinfor8   get_ipython().run_line_magic(r9   rK   )r=   r<   lstrip	ESC_MAGIC)targetescmethodargt_magic_namer?   t_magic_arg_ss          r   _make_help_callr   G  sc     +h"%-Y  ((FF#
$C%(]]3%7"L!]&&y1L5A=QQr   c                      | syt        | d      S )zrTranslate lines escaped with: ?

    A naked help line should fire the intro help screen (shell.show_usage())
    get_ipython().show_usage()r   r   contents    r   _tr_helpr   T  s    
 +7C((r   c                      | syt        | d      S )zsTranslate lines escaped with: ??

    A naked help line should fire the intro help screen (shell.show_usage())
    r   r   r   r   s    r   	_tr_help2r   ^  s    
 +7D))r   c                 >    | j                  d      \  }}}d|d|dS )z.Translate lines escaped with a percent sign: %r8   r   r9   rK   r<   r   namer?   r   s       r   	_tr_magicr   h  s#    %%c*MD!T594@@r   c                 v    | j                  d      \  }}}|ddj                  |j                               dS )z'Translate lines escaped with a comma: ,r8   ("z", "")r<   r=   splitr   s       r   	_tr_quoter   m  s2    %%c*MD!Tv{{4::<8::r   c                 <    | j                  d      \  }}}|d|dS )z+Translate lines escaped with a semicolon: ;r8   r   r   r   r   s       r   
_tr_quote2r   r  s#    %%c*MD!Tt$$r   c                 v    | j                  d      \  }}}|ddj                  |j                               dS )z'Translate lines escaped with a slash: /r8   rG   r9   rK   r   r   s       r   	_tr_parenr   w  s2    %%c*MD!TTYYtzz|455r   zget_ipython().system({!r})r   c                   &    e Zd ZdZed        Zd Zy)EscapedCommandz9Transformer for escaped commands like %foo, !foo, or /fooc                 r   |D ]  }|sd}t        |      }||kD  ri||   j                  t        j                  t        j                  hv r:|dz  }||kD  r0||   j                  t        j                  t        j                  hv r:||k\  r||   j
                  t        v s | ||   j                        c S  y)zGFind the first escaped command (%foo, !foo, etc.) in the cell.
        r   r(   N)r   rv   rw   INDENTDEDENTrN   ESCAPE_SINGLESrY   )rk   rl   r   r   lls        r   rm   zEscapedCommand.find  s     # 
	+DBTBr'd2hmm/QQa r'd2hmm/QQRxBx.048>>**
	+r   c                 B   | j                   | j                  }}||   d| }t        ||      }t        |||f|      }t	        |      dkD  r|dd t
        v r|dd |dd }}n
|dd |dd }}|t        v rt        |   |      }	nd}	|d| }
||	z   dz   }||dz   d }|
|gz   |z   S )zGTransform an escaped line found by the ``find()`` classmethod.
        Nr(   r7   r'   r{   )rT   rc   rX   r^   r   ESCAPE_DOUBLEStr)r$   r   rT   rc   indentrW   r   escaper   r   r   r   r   s                r   ro   zEscapedCommand.transform  s     !%I
z":I.-eZ@&uz9.ExPt9q=T"1X7"2AhQRGF"2AhQRGFR<f:g&DD[j)D=4'HqLM*xj(;66r   N)r0   r1   r2   r3   rp   rm   ro   r4   r   r   r   r     s    C+ +7r   r   z(%{0,2}
    (?!\d)[\w*]+            # Variable name
    (\.(?!\d)[\w*]+|\[-?[0-9]+\])*       # .etc.etc or [0], we only support literal integers.
    )
    (\?\??)$                # ? or ??
    c                   <     e Zd ZdZdZ fdZed        Zd Z xZ	S )HelpEndz+Transformer for help syntax: obj? and obj??   c                 R    t         |   |       |d   dz
  | _        |d   | _        y r-   )superr%   q_lineq_col)r$   rY   q_locn	__class__s      r   r%   zHelpEnd.__init__  s*    Qi!mAY
r   c                 j   |D ]  }t        |      dkD  s|d   j                  dk(  s%d}||   j                  t        j                  t        j
                  hv r5|dz  }||   j                  t        j                  t        j
                  hv r5 | ||   j                  |d   j                        c S  y)z8Find the first help command (foo?) in the cell.
        r7   r   r   r(   N)r   rN   rv   rw   r   r   rY   )rk   rl   r   r   s       r   rm   zHelpEnd.find  s     # 	;D4y1}bC!72hmm'II!GB 2hmm'II48>>48>>::	;r   c                    dj                  || j                  | j                  dz          }|d| j                   || j                  d }}|d| j                   }|| j                  dz   d }t        j                  |      }|st        |      |J |       |j                  d      }|j                  d      }	t        ||	      }
||
z   dz   }||gz   |z   S )zFTransform a help command found by the ``find()`` classmethod.
        r'   r(   N   r{   )	r=   rT   r   rc   _help_end_researchSyntaxErrorr   r   )r$   r   piecer   r   r   r   r   r   r   r   r   s               r   ro   zHelpEnd.transform  s     dooa@A 0$..159I3J.t/DKK!O-.(g&&}%g%}ggaj vs+D=4'xj(;66r   )
r0   r1   r2   r3   rd   r%   rp   rm   ro   __classcell__r   s   @r   r   r     s+    5 H
 
; 
;7r   r   r   c                 j   t         j                  t         j                  }}g g}t        |       dkD  r+| d   j	                  d      st        j                  dd       d}	 t        j                  t        |       j                        D ]y  }|d   j                  |       |j                  |k(  s|j                  |k(  r|dk  r|j                  g        L|j                  dv r|dz  }`|j                  d	v so|dkD  su|dz  }{ 	 |d   s|j                          |S # t         j                  $ r Y ,w xY w)
ac  Tokenize a series of lines and group tokens by line.

    The tokens for a multiline Python string or expression are grouped as one
    line. All lines except the last lines should keep their line ending ('\n',
    '\r\n') for this to properly work. Use `.splitlines(keeplineending=True)`
    for example when passing block of text to this function.

    r(   r   )r{   z
z`make_tokens_by_line` received a list of lines which do not have lineending markers ('\n', '\r', '\r\n', '\x0b', '\x0c'), behavior will be unspecifiedr7   
stacklevelr[   rF   rJ   )rw   NEWLINENLr   rV   warningswarngenerate_tokensiter__next__appendrv   rN   
TokenErrorpop)r   r   r   rl   parenlevtokens         r   make_tokens_by_liner     s(    ""HKKRG')dN
5zA~eAh//0TU k	
 H--d5k.B.BC 		"E2%%e,

g%r)A%%b)0A0a<MH		" "   s    BD 7D =D D21D2tokensc                 t    d}| D ]1  }|j                   dv r|dz  }|j                   dv s&|dz  }|dk  s1 y y)zBCheck if the depth of brackets in the list of tokens drops below 0r   rF   r(   rJ   TF)rN   )r   r   r   s      r   has_sunken_bracketsr     sO    H <<?*MH\\_,MH!| r   rR   c                     t        j                  dt        d       | j                  d      s| dz  } | j	                  d      }t        |      D ]   }t        d       |D ]  }t        d|        " y	)
zFor investigation and debuggingz4show_linewise_tokens is deprecated since IPython 8.6r7   r   r{   TkeependszLine -------r8   N)r   r   DeprecationWarningrV   
splitlinesr   print)rR   r   r   tokinfos       r   show_linewise_tokensr   %  ss    MM>
 ::d	T	LL$L'E#E*  n 	 G#w	  r   i  c                   >    e Zd ZdZd Zd Zd ZdedefdZdefdZ	y	)
TransformerManagerzApplies various transformations to a cell or code block.

    The key methods for external use are ``transform_cell()``
    and ``check_complete()``.
    c                     t         t        t        t        g| _        t
        g| _        t        t        t        t        g| _        y r    )r   r   classic_promptipython_promptcleanup_transformsrB   line_transformsrs   r   r   r   token_transformersre   s    r   r%   zTransformerManager.__init__=  s?    	#
  
 	#
r   c                 (   t        |      }g }| j                  D ]'  }|j                  |      }|s|j                  |       ) |sd|fS t	        |t
        j                        }|D ]  }	 d|j                  |      fc S  d|fS # t        $ r Y )w xY w)a2  Find and run the transform earliest in the code.

        Returns (changed, lines).

        This method is called repeatedly until changed is False, indicating
        that all available transformations are complete.

        The tokens following IPython special syntax might not be valid, so
        the transformed code is retokenised every time to identify the next
        piece of special syntax. Hopefully long code cells are mostly valid
        Python, not using lots of IPython special syntax, so this shouldn't be
        a performance issue.
        F)keyT)	r   r   rm   r   sortedr`   rf   ro   r   )r$   r   rl   
candidatestransformer_clstransformerordered_transformerss          r   do_one_token_transformz)TransformerManager.do_one_token_transformN  s     -U3
#66 	/O)..~>K!!+.	/
 %<%j6H6O6OP/ 	K[225999	
 e|  s   +B	BBc                     t        t              D ]  }| j                  |      \  }}|r|c S  t        dt        z        )NzBInput transformation still changing after %d iterations. Aborting.)rangeTRANSFORM_LOOP_LIMITr  RuntimeError)r$   r   r?   changeds       r   do_token_transformsz&TransformerManager.do_token_transformsn  sR    +, 	A!88?NGU	
  68LM N 	Nr   cellrC   c                     |j                  d      s|dz  }|j                  d      }| j                  | j                  z   D ]
  } ||      } | j	                  |      }dj                  |      S )zTransforms a cell of input coder{   Tr   r'   )rV   r   r   r   r  r=   )r$   r  r   ro   s       r   transform_cellz!TransformerManager.transform_cellw  sq    }}T"DLD.0043G3GG 	%Ie$E	% ((/wwu~r   c                 B   d}t        |      D ]  }|dk(  rd} n|j                         r n |s|dz  }|j                  d      }|sy|d   j                  d      rdt	        |      fS 	 | j
                  D ]  }t        |d	d      r ||      } 	 |d   j                  d      r!|d   j                         rdt	        |      fS y	 | j                  D ]  }t        |d	d      r ||      } | j                  |      }t        |      }t        |      dk(  r|rt        |d         ry
|sdt	        |      fS |d   d   j                  t        j                   k7  rdt	        |      fS t        j"                  t        j$                  t        j                   h}d}|d   D 	ch c]  }	|	j                   c}	t        j&                  t        j                   ht        j                   hfv rt        |      dkD  r|j)                         }|d   rA|d   d   j                  |v r-|d   j)                          |d   r|d   d   j                  |v r-|d   sdt	        |      fS |d   d   j*                  dk(  rd}
|d   |
   j                  t        j,                  t        j&                  hv r8|
dz  }
|d   |
   j                  t        j,                  t        j&                  hv r8|d   |
   j.                  d   }d|dz   fS |d   d   j0                  j                  d      ry	 t3        j4                         5  t3        j6                  dt8               t;        dj=                  |      d      }ddd       dt	        |      fS |r0|d   j                  t        j&                  k(  r|rydt	        |      fS |d   j                         syy# t        $ r Y y
w xY w# t        $ r Y y
w xY wc c}	w # 1 sw Y   xY w# t        t>        t@        tB        tD        t8        f$ r Y y
w xY w)a  Return whether a block of code is ready to execute, or should be continued

        Parameters
        ----------
        cell : string
            Python input code, which can be multiline.

        Returns
        -------
        status : str
            One of 'complete', 'incomplete', or 'invalid' if source is not a
            prefix of valid code.
        indent_spaces : int or None
            The number of spaces by which to indent the next line of code. If
            status is not 'incomplete', this is None.
        Fr{   Tr   )completeNr[   \
incompletehas_side_effects)invalidNr   r6   r(   N:   )r  Nerrorr'   exec)symbol)#reversedr   r   rV   find_last_indentr   getattrr   r   r   r  r   r   r   rv   rw   	ENDMARKERr   COMMENTr   r   rN   r   rY   r   r   catch_warningssimplefilterSyntaxWarningcompile_commandr=   OverflowError
ValueError	TypeErrorMemoryError)r$   r  ends_with_newline	characterr   ro   rl   newline_typeslast_token_linetr   r   ress                r   check_completez!TransformerManager.check_complete  sF   $ "!$ 	ID $(!"	 ! DLD.#9d#!1%!888	#!44 -	y*<eD%e,E- 8t$Ry #%5e%<<<'	#!11 -	y*<eD%e,E- ,,U3E -U3
 J!O#N1$56"!1%!888"b!&&(*<*<<!1%!888!))8+;+;X=O=OP *2./qAFF/__h001 4
 
 .!A%,002OR ^B%7%;%@%@M%Q2""$ R ^B%7%;%@%@M%Q b!!1%!888"b!((C/B $R(--(//8??1SSa !$R(--(//8??1SS $B'+11!4F!++"a %%..t4%		=((* E%%g}=%bggenVDE {#%5e%<<<q166(//I '!1%!888 Ry #m  	#"	#  	#"	#2 06E E ]J	], 	#"	#s`   ,O	 	
O	 
O 'O #O' O8 47O,+O8 		OO	O$#O$,O51O8 8#PPN)
r0   r1   r2   r3   r%   r  r  rq   r  r.  r4   r   r   r   r   7  s9    

"@N	3 	3 	D 3 D r   r   c                     t         j                  | d         }|syt        |j                  d      j	                  dd            S )Nr[   r   	z    )r   r   r   r   replace)r   r   s     r   r  r  	  s<    r#Aqwwqz!!$.//r   c                         e Zd Zd fd	Z xZS )MaybeAsyncCompilec                 L    t         |           | xj                  |z  c_        y r    )r   r%   flags)r$   extra_flagsr   s     r   r%   zMaybeAsyncCompile.__init__  s    

k!
r   r   )r0   r1   r2   r%   r   r   s   @r   r3  r3    s    " "r   r3  c                       e Zd ZddZy)MaybeAsyncCommandCompilerc                 &    t        |      | _        y )Nr6  )r3  compiler)r$   r6  s     r   r%   z"MaybeAsyncCommandCompiler.__init__  s    )kBr   Nr7  )r0   r1   r2   r%   r4   r   r   r9  r9    s    Cr   r9  r;  )Ar3   astcodeopr   r   r:   rw   typingr   r   r   r   r   compiler   r   r   r   r   VERBOSEr   rB   intrS   rX   r^   r`   rs   r   	ESC_SHELL
ESC_SH_CAPESC_HELP	ESC_HELP2r   
ESC_MAGIC2	ESC_QUOTE
ESC_QUOTE2	ESC_PARENr   r   r   r   r   r   r   r   r   r|   r   r   r   r   rq   r   	TokenInfor   r   r	  r   r  r3  r9  PyCF_ALLOW_TOP_LEVEL_AWAIT_extra_flagsr#  r4   r   r   <module>rN     sV    + 	  - - RZZ
#
 # #J  bjj./rzz,'
  BJJ	$ 	

'2	.8C= "
# 
,%S/ ,S ,61" 1"f7$ 7@%7% %7Z 	
		
	
	/
R)*A
;
%
6
 0773::HIIIJI )7' )7X rzz JJ,7  ,7\+d3i +\
X%7%7 8 
 C     O  O d0" "C C
 --+Er   