
    Ngg                         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 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      O/var/www/html/ai-engine/env/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__9   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>D   s    MMMgnMMMr    zMethod())r.   joinsorteditemsr-   )r   r.   s     r   r    zMethod.__repr__B   sr     {& IIfMM9J9J9L9LMMMNNOOO,. 	 $(99f.Ddd".DfffMMr   Nr!   r   r   r   r+   r+   3   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__P   s    $r   c                 :    |                     | j                   d S r   )beginr@   r   s      r   r   zBegin.performS   s    4?+++++r   c                     d| j         z  S )Nz	Begin(%s)r?   r   s    r   r    zBegin.__repr__V   s    T_,,r   Nr!   r   r   r   r=   r=   I   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.performa   s    tr   c                     dS )NIGNOREr   r   s    r   r    zIgnore.__repr__d   s    xr   Nr   r   r   r"   r   r    r   r   r   rE   rE   Z   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.performr   r   r   c                     dS )NTEXTr   r   s    r   r    zText.__repr__u   s    vr   NrI   r   r   r   rK   rK   k   s<               r   rK   N)r"   objectr   r   r$   r+   r=   rE   rH   rK   rN   r   r   r   <module>rP      s[       V   ) ) ) ) )V ) ) ) 3 3 3 3 36 3 3 3N N N N NV N N N,- - - - -F - - -"    V    
    6    tvvr   