a
    b	                     @   sp   G d d de ZG dd deZG dd deZG dd deZG dd	 d	eZe ZG d
d deZe ZdS )c                   @   s   e Zd Zdd Zdd ZdS )Actionc                 C   s   d S N selftoken_streamtextr   r   c/Users/vegardjervell/Documents/master/model/venv/lib/python3.9/site-packages/Cython/Plex/Actions.pyperform   s    zAction.performc                 C   s   | |u S r   r   r   otherr   r   r   same_as   s    zAction.same_asN)__name__
__module____qualname__r	   r   r   r   r   r   r   
   s   r   c                   @   s0   e Zd ZdZdd Zdd Zdd Zdd	 Zd
S )Returnzk
    Internal Plex action which causes |value| to
    be returned as the value of the associated token
    c                 C   s
   || _ d S r   value)r   r   r   r   r   __init__   s    zReturn.__init__c                 C   s   | j S r   r   r   r   r   r   r	      s    zReturn.performc                 C   s   t |to| j|jkS r   )
isinstancer   r   r
   r   r   r   r      s    zReturn.same_asc                 C   s   dt | j S )Nz
Return(%s))reprr   r   r   r   r   __repr__!   s    zReturn.__repr__N)r   r   r   __doc__r   r	   r   r   r   r   r   r   r      s
   r   c                   @   s0   e Zd ZdZdd Zdd Zdd Zdd	 Zd
S )CallzD
    Internal Plex action which causes a function to be called.
    c                 C   s
   || _ d S r   function)r   r   r   r   r   r   *   s    zCall.__init__c                 C   s   |  ||S r   r   r   r   r   r   r	   -   s    zCall.performc                 C   s   d| j j S )NzCall(%s))r   r   r   r   r   r   r   0   s    zCall.__repr__c                 C   s   t |to| j|ju S r   )r   r   r   r
   r   r   r   r   3   s    zCall.same_asNr   r   r   r   r   r	   r   r   r   r   r   r   r   %   s
   r   c                   @   s0   e Zd ZdZdd Zdd Zdd Zd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                 C   s
   || _ d S r   
state_name)r   r   r   r   r   r   >   s    zBegin.__init__c                 C   s   | | j d S r   )beginr   r   r   r   r   r	   A   s    zBegin.performc                 C   s
   d| j  S )Nz	Begin(%s)r   r   r   r   r   r   D   s    zBegin.__repr__c                 C   s   t |to| j|jkS r   )r   r   r   r
   r   r   r   r   G   s    zBegin.same_asNr   r   r   r   r   r   7   s
   r   c                   @   s    e Zd ZdZdd Zd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                 C   s   d S r   r   r   r   r   r   r	   R   s    zIgnore.performc                 C   s   dS )NIGNOREr   r   r   r   r   r   U   s    zIgnore.__repr__Nr   r   r   r   r	   r   r   r   r   r   r!   K   s   r!   c                   @   s    e Zd ZdZdd Zd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                 C   s   |S r   r   r   r   r   r   r	   d   s    zText.performc                 C   s   dS )NTEXTr   r   r   r   r   r   g   s    zText.__repr__Nr#   r   r   r   r   r$   ]   s   r$   N)	objectr   r   r   r   r!   r"   r$   r%   r   r   r   r   <module>
   s   