§
    OŠtj�	  ã                   ó:   —  G d „ d¦  «        Z  G d„ d¦  «        ZdS )c                   ó    — e Zd ZdZdd„Zd„ ZdS )ÚStatea-  
    A representation of a state managed by a ``StateMachine``.

    Attributes:
        name (instance of FreeGroupElement or string) -- State name which is also assigned to the Machine.
        transisitons (OrderedDict) -- Represents all the transitions of the state object.
        state_type (string) -- Denotes the type (accept/start/dead) of the state.
        rh_rule (instance of FreeGroupElement) -- right hand rule for dead state.
        state_machine (instance of StateMachine object) -- The finite state machine that the state belongs to.
    Nc                 óX   — || _         i | _        || _        |d         | _        || _        d S )Né    )ÚnameÚtransitionsÚstate_machineÚ
state_typeÚrh_rule)Úselfr   r   r	   r
   s        úe/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/sympy/combinatorics/rewritingsystem_fsm.pyÚ__init__zState.__init__   s/   € ØˆŒ	ØˆÔØ*ˆÔØ$ Qœ-ˆŒØˆŒˆˆó    c                 ó   — || j         |<   dS )aZ  
        Add a transition from the current state to a new state.

        Keyword Arguments:
            letter -- The alphabet element the current state reads to make the state transition.
            state -- This will be an instance of the State object which represents a new state after in the transition after the alphabet is read.

        N)r   )r   ÚletterÚstates      r   Úadd_transitionzState.add_transition   s   € ð $)ˆÔ˜Ñ Ð Ð r   ©NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   © r   r   r   r      sA   € € € € € ð	ð 	ðð ð ð ð	)ð 	)ð 	)ð 	)ð 	)r   r   c                   ó&   — e Zd ZdZd„ Zdd„Zd„ ZdS )ÚStateMachinezþ
    Representation of a finite state machine the manages the states and the transitions of the automaton.

    Attributes:
        states (dictionary) -- Collection of all registered `State` objects.
        name (str) -- Name of the state machine.
    c                 ó^   — || _         || _        i | _        |                      dd¬¦  «         d S )NÚstartÚs)r	   )r   Úautomaton_alphabetÚstatesÚ	add_state)r   r   r   s      r   r   zStateMachine.__init__(   s4   € ØˆŒ	Ø"4ˆÔØˆŒØ�Š�w¨3ˆÑ/Ô/Ð/Ð/Ð/r   Nc                 ó>   — t          || ||¦  «        }|| j        |<   dS )ax  
        Instantiate a state object and stores it in the 'states' dictionary.

        Arguments:
            state_name (instance of FreeGroupElement or string) -- name of the new states.
            state_type (string) -- Denotes the type (accept/start/dead) of the state added.
            rh_rule (instance of FreeGroupElement) -- right hand rule for dead state.

        N)r   r   )r   Ú
state_namer	   r
   Ú	new_states        r   r    zStateMachine.add_state.   s)   € õ ˜* d¨J¸Ñ@Ô@ˆ	Ø"+ˆŒ�JÑÐÐr   c                 ó   — d| j         z  S )Nz%s)r   )r   s    r   Ú__repr__zStateMachine.__repr__;   s   € Ø�t”yÑ!Ð!r   r   )r   r   r   r   r   r    r%   r   r   r   r   r      sP   € € € € € ðð ð0ð 0ð 0ð,ð ,ð ,ð ,ð"ð "ð "ð "ð "r   r   N)r   r   r   r   r   ú<module>r&      s_   ðð)ð )ð )ð )ð )ñ )ô )ð )ð<"ð "ð "ð "ð "ñ "ô "ð "ð "ð "r   