
    -Ph%                         d Z  G d d          Z G d de          Z G d de          Z G d de          Z G d	 d
e          Z G d de          Z e            Z G d de          Z e            Z	dS )zB
Python Lexical Analyser

Actions for use in token specifications
c                        e Zd Zd Zd Zd ZdS )Actionc                     d S N selftoken_streamtexts      S/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/Cython/Plex/Actions.pyperformzAction.perform   s        c                     | S r   r   r   s    r   __copy__zAction.__copy__       r   c                     | S r   r   )r   memos     r   __deepcopy__zAction.__deepcopy__   r   r   N)__name__
__module____qualname__r   r   r   r   r   r   r   r      sA                r   r   c                   $    e Zd ZdZd Zd Zd ZdS )Returnzk
    Internal Plex action which causes |value| to
    be returned as the value of the associated token
    c                     || _         d S r   value)r   r   s     r   __init__zReturn.__init__   s    


r   c                     | j         S r   r   r   s      r   r   zReturn.perform   s
    zr   c                     d| j         z  S )Nz
Return(%r)r   r   s    r   __repr__zReturn.__repr__   s    dj((r   Nr   r   r   __doc__r   r   r    r   r   r   r   r      sK         
    ) ) ) ) )r   r   c                   $    e Zd ZdZd Zd Zd ZdS )CallzD
    Internal Plex action which causes a function to be called.
    c                     || _         d S r   function)r   r'   s     r   r   zCall.__init__'   s     r   c                 .    |                      ||          S r   r&   r   s      r   r   zCall.perform*   s    }}\4000r   c                      d| j         j        z  S )NzCall(%s))r'   r   r   s    r   r    zCall.__repr__-   s    DM222r   Nr!   r   r   r   r$   r$   "   sK         ! ! !1 1 13 3 3 3 3r   r$   c                   $    e Zd ZdZd Zd Zd ZdS )Methodz
    Plex action that calls a specific method on the token stream,
    passing the matched text and any provided constant keyword arguments.
    c                 &    || _         |pd | _        d S r   )namekwargs)r   r-   r.   s      r   r   zMethod.__init__7   s    	nr   c                 l    t          || j                  }| j         ||fi | j        n
 ||          S r   )getattrr-   r.   )r   r	   r
   methods       r   r   zMethod.perform;   sB    ty11.2k.Evvd**dk***66RV<<Wr   c                     | j         Cd                    t          d | j                                         D                                 nd}d| j        |rdnd|dS )Nz, c                     g | ]}d |z  S )z%s=%rr   ).0items     r   
<listcomp>z#Method.__repr__.<locals>.<listcomp>B   s    MMMgnMMMr    zMethod())r.   joinsorteditemsr-   )r   r.   s     r   r    zMethod.__repr__@   sr     {& IIfMM9J9J9L9LMMMNNOOO,. 	 $(99f.Ddd".DfffMMr   Nr!   r   r   r   r+   r+   1   sS         
% % %X X X
N N N N Nr   r+   c                   $    e Zd ZdZd Zd Zd ZdS )Beginz
    Begin(state_name) is a Plex action which causes the Scanner to
    enter the state |state_name|. See the docstring of Plex.Lexicon
    for more information.
    c                     || _         d S r   
state_name)r   r@   s     r   r   zBegin.__init__N   s    $r   c                 :    |                     | j                   d S r   )beginr@   r   s      r   r   zBegin.performQ   s    4?+++++r   c                     d| j         z  S )Nz	Begin(%s)r?   r   s    r   r    zBegin.__repr__T   s    T_,,r   Nr!   r   r   r   r=   r=   G   sK         % % %, , ,- - - - -r   r=   c                       e Zd ZdZd Zd ZdS )Ignorez
    IGNORE is a Plex action which causes its associated token
    to be ignored. See the docstring of Plex.Lexicon  for more
    information.
    c                     d S r   r   r   s      r   r   zIgnore.perform_   s    tr   c                     dS )NIGNOREr   r   s    r   r    zIgnore.__repr__b   s    xr   Nr   r   r   r"   r   r    r   r   r   rE   rE   X   s<               r   rE   c                       e Zd ZdZd Zd ZdS )Textz
    TEXT is a Plex action which causes the text of a token to
    be returned as the value of the token. See the docstring of
    Plex.Lexicon  for more information.
    c                     |S r   r   r   s      r   r   zText.performp   r   r   c                     dS )NTEXTr   r   s    r   r    zText.__repr__s   s    vr   NrI   r   r   r   rK   rK   i   s<               r   rK   N)
r"   r   r   r$   r+   r=   rE   rH   rK   rN   r   r   r   <module>rO      sY          ) ) ) ) )V ) ) ) 3 3 3 3 36 3 3 3N N N N NV N N N,- - - - -F - - -"    V    
    6    tvvr   