+
    Q�i  ã                  ór  a € 0 t $ R t^ RIHt ^ RIt^ RIHt ^ RIHtH	t	H
t
HtHtHt ]P                  R8¼  d   ^ RIHt M^ RIHt Rt]! R]R7      t]! R	]R7      t]! R
]R7      t ! R R]]	]]3,          4      t ! R R]	]]]3,          4      t]].R3,          tRtR]R&    ! R R]	]]]3,          4      tR# )zp
A core state-machine abstraction.

Perhaps something that could be replaced with or integrated into machinist.
)ÚannotationsN)Úchain)ÚCallableÚGenericÚOptionalÚSequenceÚTypeVarÚHashable)Ú	TypeAliasz
<no state>ÚState)ÚboundÚInputÚOutputc                  ó2   a € ] tR t^tRtR V 3R lltRtV ;t# )ÚNoTransitionz�
A finite state machine in C{state} has no transition for C{symbol}.

@ivar state: See C{state} init parameter.

@ivar symbol: See C{symbol} init parameter.
c               ó    € V ^8„  d   QhRRRR/# )é   Ústater   Úsymbolr   © )Úformats   "Ú//usr/lib/python3/dist-packages/automat/_core.pyÚ__annotate__ÚNoTransition.__annotate__"   s   € ÷ 
ñ 
˜eð 
¨Uñ 
ó    c                ód   <€ Wn         W n        \        \        V `  RP                  W!4      4       R# )zº
Construct a L{NoTransition}.

@param state: the finite state machine's state at the time of the
    illegal transition.

@param symbol: the input symbol for which no transition exists.
zno transition for {} in {}N)r   r   ÚsuperÚ	ExceptionÚ__init__r   )Úselfr   r   Ú	__class__s   &&&€r   r   ÚNoTransition.__init__"   s,   ø€ ð Œ
ØŒÜŒi˜Ñ'Ø(×/Ñ/°Ó>ö	
r   ©r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Ú__static_attributes__Ú__classcell__)r    s   @r   r   r      s   ø† ñ÷
ö 
r   r   c                  ó¾   € ] tR t^2tRtRR R llt]R R l4       t]P                  R R l4       tR	 R
 lt	R R lt
R R ltR R ltR R ltR R ltR R ltRtR# )Ú	Automatonzf
A declaration of a finite state machine.

Note that this is not the machine itself; it is immutable.
Nc               ó    € V ^8„  d   QhRRRR/# )r   ÚinitialzState | NoneÚreturnÚNoner   )r   s   "r   r   ÚAutomaton.__annotate__9   s   € ÷ 	Sñ 	S ð 	S¸ñ 	Sr   c                ó^   € Vf   \         pVf   Q hWn        \        4       V n        RV n        R# )z:
Initialize the set of transitions and the initial state.
N)Ú	_NO_STATEÚ_initialStateÚsetÚ_transitionsÚ_unhandledTransition)r   r-   s   &&r   r   ÚAutomaton.__init__9   s2   € ð Š?ÜˆGØÒ"Ð"Ð"Ø$+ÔÜORËuˆÔØNRˆÖ!r   c               ó   € V ^8„  d   QhRR/# )r   r.   r   r   )r   s   "r   r   r0   E   s   € ÷ "ñ "˜eñ "r   c                ó   € V P                   # )z(
Return this automaton's initial state.
)r3   ©r   s   &r   ÚinitialStateÚAutomaton.initialStateD   s   € ð
 ×!Ñ!Ð!r   c               ó    € V ^8„  d   QhRRRR/# )r   r   r   r.   r/   r   )r   s   "r   r   r0   L   s   € ÷ #ñ # %ð #¨Dñ #r   c                ó‚   € V P                   \        Jd%   \        RP                  V P                   4      4      hWn         R# )zj
Set this automaton's initial state.  Raises a ValueError if
this automaton already has an initial state.
zinitial state already set to {}N)r3   r2   Ú
ValueErrorr   )r   r   s   &&r   r;   r<   K   s;   € ð ×Ñ¤YÓ.ÜØ1×8Ñ8¸×9KÑ9KÓLóð ð #Ör   c               ó(   € V ^8„  d   QhRRRRRRRR/# )r   ÚinStater   ÚinputSymbolr   ÚoutStateÚoutputSymbolsztuple[Output, ...]r   )r   s   "r   r   r0   Y   s8   € ÷ Vñ VàðVð ðVð ð	Vð
 *ñVr   c                óÒ   € V P                    F/  w  rVrxWQ8X  g   K  Wb8X  g   K  \        RP                  WV4      4      h	  V P                   P                  WV\	        V4      34       R# )zˆ
Add the given transition to the outputSymbol. Raise ValueError if
there is already a transition with the same inState and inputSymbol.
z,already have transition from {} to {} via {}N)r5   r?   r   ÚaddÚtuple)	r   rA   rB   rC   rD   Ú	anInStateÚanInputSymbolÚ
anOutStateÚ_s	   &&&&&    r   ÚaddTransitionÚAutomaton.addTransitionY   sg   € ð 8<×7HÔ7HÑ3ˆI jØÖ#¨Ö(DÜ ØB×IÑIØ¨[óóð ñ 8Ið 	×Ñ×Ñ˜w°X¼uÀ]Ó?SÐTÖUr   c               ó$   € V ^8„  d   QhRRRRRR/# )r   rC   r   rD   zSequence[Output]r.   r/   r   )r   s   "r   r   r0   p   s)   € ÷ Eñ EØðEØ.>ðEà	ñEr   c                ó*   € V\        V4      3V n        R# )zx
All unhandled transitions will be handled by transitioning to the given
error state and error-handling output symbols.
N)rG   r6   )r   rC   rD   s   &&&r   ÚunhandledTransitionÚAutomaton.unhandledTransitionp   s   € ð &.¬u°]Ó/CÐ$DˆÖ!r   c               ó   € V ^8„  d   QhRR/# )r   r.   z7frozenset[tuple[State, Input, State, Sequence[Output]]]r   )r   s   "r   r   r0   y   s   € ÷ ,ñ ,Ð Wñ ,r   c                ó,   € \        V P                  4      # )z
All transitions.
)Ú	frozensetr5   r:   s   &r   ÚallTransitionsÚAutomaton.allTransitionsy   s   € ô ˜×*Ñ*Ó+Ð+r   c               ó   € V ^8„  d   QhRR/# )r   r.   z
set[Input]r   )r   s   "r   r   r0      s   € ÷ 
ñ 
˜zñ 
r   c           
     ó\   € V P                    UUUUu0 uF  w  rr4VkK
  	  upppp# u uppppi )z7
The full set of symbols acceptable to this automaton.
)r5   )r   rA   rB   rC   ÚoutputSymbols   &    r   ÚinputAlphabetÚAutomaton.inputAlphabet   s6   € ð CG×BSÒBSö
áBSÑ>� xó ÙBSô
ð 	
ùõ 
s   ’&
c               ó   € V ^8„  d   QhRR/# )r   r.   zset[Output]r   )r   s   "r   r   r0   ˆ   s   € ÷ 	
ñ 	
 ñ 	
r   c                ób   € \        \        P                  ! R V P                   4       4      4      # )zB
The full set of symbols which can be produced by this automaton.
c              3  ó,   "  € T F
  w  rr4Vx € K  	  R # 5i©Nr   )Ú.0rA   rB   rC   rD   s   &    r   Ú	<genexpr>Ú+Automaton.outputAlphabet.<locals>.<genexpr>�   s   é € ð  áGXÑC�W¨8õ ÛGXùs   ‚)r4   r   Úfrom_iterabler5   r:   s   &r   ÚoutputAlphabetÚAutomaton.outputAlphabetˆ   s2   € ô Ü×Òñ  àGK×GXÒGXó ó ó
ð 	
r   c               ó   € V ^8„  d   QhRR/# )r   r.   zfrozenset[State]r   )r   s   "r   r   r0   “   s   € ÷ 

ñ 

Ð(ñ 

r   c                ób   € \        \        P                  ! R V P                   4       4      4      # )zK
All valid states; "Q" in the mathematical description of a state
machine.
c              3  ó.   "  € T F  w  rr4W3x € K  	  R # 5ir_   r   )r`   rA   rB   rC   rY   s   &    r   ra   Ú#Automaton.states.<locals>.<genexpr>™   s   é € ð  áFWÑB�W¨8ð Õ#ÛFWùs   ‚)rT   r   rc   r5   r:   s   &r   ÚstatesÚAutomaton.states“   s2   € ô
 Ü×Òñ  àFJ×FWÒFWó ó ó
ð 	
r   c               ó$   € V ^8„  d   QhRRRRRR/# )r   rA   r   rB   r   r.   ztuple[State, Sequence[Output]]r   )r   s   "r   r   r0   Ÿ   s$   € ÷ )ñ )Øð)Ø+0ð)à	'ñ)r   c                óª   € V P                    F  w  r4rVW3W438X  g   K  V\        V4      3u # 	  V P                  f   \        WR7      hV P                  # )z9
A 2-tuple of (outState, outputSymbols) for inputSymbol.
r"   )r5   Úlistr6   r   )r   rA   rB   rH   rI   rC   rD   s   &&&    r   ÚoutputForInputÚAutomaton.outputForInputŸ   s`   € ð BF×ARÔARÑ=ˆI hØÐ%¨)Ð)CÖCØ ¤$ }Ó"5Ð6Ò6ñ BSð ×$Ñ$Ò,Ü WÔAÐAØ×(Ñ(Ð(r   )r3   r5   r6   r_   )r#   r$   r%   r&   r'   r   Úpropertyr;   ÚsetterrL   rP   rU   rZ   rd   rj   ro   r(   r   r   r   r+   r+   2   se   † ñ÷	Sð ô"ó ð"ð ×Ñô#ó ð#õVõ.Eõ,õ
õ	
õ

÷)ñ )r   r+   z<Callable[[State, Input, State], OutputTracer[Output] | None]r
   ÚTracerc                  ó>   € ] tR t^±tRtR R ltR R ltR R ltRtR	# )
ÚTransitionerz9
The combination of a current state and an L{Automaton}.
c               ó    € V ^8„  d   QhRRRR/# )r   Ú	automatonzAutomaton[State, Input, Output]r;   r   r   )r   s   "r   r   ÚTransitioner.__annotate__¶   s    € ÷ Añ AÐ"Að AÐQVñ Ar   c                	ó,   € Wn         W n        R V n        R # r_   ©Ú
_automatonÚ_stateÚ_tracer)r   rw   r;   s   &&&r   r   ÚTransitioner.__init__¶   s   € Ø;DŒØ)ŒØ<@ˆŽr   c               ó    € V ^8„  d   QhRRRR/# )r   Útracerz#Tracer[State, Input, Output] | Noner.   r/   r   )r   s   "r   r   rx   »   s   € ÷ ñ ÐBð Àtñ r   c                	ó   € Wn         R # r_   )r}   )r   r€   s   &&r   ÚsetTraceÚTransitioner.setTrace»   s   € ØŽr   c               ó    € V ^8„  d   QhRRRR/# )r   rB   r   r.   z4tuple[Sequence[Output], OutputTracer[Output] | None]r   )r   s   "r   r   rx   ¾   s   € ÷ *ñ *Ø ð*à	=ñ*r   c                óÄ   € V P                   P                  V P                  V4      w  r#RpV P                  '       d   V P                  V P                  W4      pW n        W43# )z3
Transition between states, returning any outputs.
N)r{   ro   r|   r}   )r   rB   rC   rD   Ú	outTracers   &&   r   Ú
transitionÚTransitioner.transition¾   sV   € ð #'§/¡/×"@Ñ"@Ø�K‰K˜ó#
Ñˆð ˆ	Ø�<�<ˆ<ØŸ™ T§[¡[°+ÓHˆIØŒØÐ)Ð)r   rz   N)	r#   r$   r%   r&   r'   r   r‚   r‡   r(   r   r   r   ru   ru   ±   s   † ñõAõ
÷*ñ *r   ru   )é   é
   )Ú__conditional_annotations__r'   Ú
__future__r   ÚsysÚ	itertoolsr   Útypingr   r   r   r   r   r	   Úversion_infor
   Útyping_extensionsr2   r   r   r   r   r   r+   ÚOutputTracerrs   Ú__annotations__ru   )r‹   s   @r   Ú<module>r”      s¿   øðôõ
 #ã 
Ý ß K× Kà×Ñ�wÔÞ å+à€	Ù�˜xÔ(€Ù�˜xÔ(€Ù	� Ô	*€ô
�9˜g e¨U lÕ3ô 
ô2x)�˜˜u fÐ,Õ-ô x)ðv ˜˜ $˜Õ'€ØR€ˆ	Ó Rô*�7˜5 %¨Ð/Õ0ö *r   