+
     hM  c                   s   R t ^ RIt^ RItR.tRt ! R R]4      t ! R R]4      t ! R R	]	4      t
 ! R
 R]
4      t ! R R]
4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      tR  tR! tR" tR# tR$ tR% tR.R& ltR' tR( tR) t R* t! ! R+ R,]"4      t#R/R- lt$R# )0a  Pythonic command-line interface parser that will make you smile.

* http://docopt.org
* Repository and issue-tracker: https://github.com/docopt/docopt
* Licensed under terms of MIT license (see LICENSE-MIT)
* Copyright (c) 2013 Vladimir Keleshev, vladimir@keleshev.com

Ndocoptz0.6.2c                   s    ] tR t^tRtRtR# )DocoptLanguageErrorz4Error in construction of usage-message by developer. N__name__
__module____qualname____firstlineno____doc____static_attributes__r       +/usr/lib/python3.14/site-packages/docopt.pyr   r      s    >r
   r   c                   s2   a  ] tR t^t o RtRtRR ltRtV tR# )
DocoptExitz;Exit in case user invoked program with incorrect arguments. c                s|    \         P                  WR ,           V P                  ,           P                  4       4       R# )
N)
SystemExit__init__usagestrip)selfZmessage   &&r   r   ZDocoptExit.__init__   s&    DT>DJJ#>"E"E"GHr
   r   N)r   )	r   r   r   r   r   r   r   r	   __classdictcell__Z__classdict__   @r   r   r      s     EEI Ir
   r   c                   sR   a  ] tR t^ t o R tR tR tR	R ltR t]	R 4       t
RtV tR# )
Patternc                s0    \        V 4      \        V4      8H  # Nrepr)r   Zotherr   r   __eq__ZPattern.__eq__"   s    DzT%[((r
   c                s*    \        \        V 4      4      # r   )Zhashr   r      &r   __hash__ZPattern.__hash__%   s    DJr
   c                sF    V P                  4        V P                  4        V # r   )fix_identitiesfix_repeating_argumentsr   r   r   fixZPattern.fix(   s    $$&r
   Nc                sL   \        V R4      '       g   V # Vf#   \        \        V P                  4       4      4      MTp\	        V P
                  4       FN  w  r#\        VR4      '       g'   WP                  V4      ,          V P
                  V&   K=  VP                  V4       KP  	  R# )z>Make pattern-tree tips point to same object if they are equal.childrenN)hasattrlistsetflat	enumerater#   indexr    )r   Zuniqic   &&  r   r    ZPattern.fix_identities-   sx    tZ((K)-tC		$%4dmm,DA1j))#'

1#6a   & -r
   c                s   V P                   P                   Uu. uF  p\        VP                  4      NK  	  ppV EF   pV Uu. uF  qP                  V4      ^8  g   K  VNK  	  up F  p\	        V4      \
        J g&   \	        V4      \        J de   VP                  '       dS   VP                  f	   . Vn        M<\	        VP                  4      \        Jd    VP                  P                  4       Vn        \	        V4      \        J g)   \	        V4      \        J g   K  VP                  ^ 8X  g   K  ^ Vn        K  	  EK  	  V # u upi u upi )z5Fix elements that should accumulate/increment values.)eitherr#   r%   ZcounttypeArgumentOptionargcountvaluesplitCommand)r   r+   r-   Zcasees   &    r   r!   ZPattern.fix_repeating_arguments9   s    ,0KK,@,@A,@q$qzz",@AD!%;AA):aa;7h&$q'V*;


ww"$aggd2"#''--/7g%aF):qzzQAG <   B;s   EEEc           	     sx   . pV ..pV'       Ed   VP                  ^ 4      pV Uu. uF  p\        V4      NK  	  pp\        V9   d}   V Uu. uF  p\        V4      \        J g   K  VNK  	  up^ ,          pVP                  VP                  V4      4       VP                   F  pVP                  V.V,           4       K  	  K  \        V9   d}   V Uu. uF  p\        V4      \        J g   K  VNK  	  up^ ,          pVP                  VP                  V4      4       VP                  \        VP                  4      V,           4       EKB  \        V9   d}   V Uu. uF  p\        V4      \        J g   K  VNK  	  up^ ,          pVP                  VP                  V4      4       VP                  \        VP                  4      V,           4       EK  \        V9   d}   V Uu. uF  p\        V4      \        J g   K  VNK  	  up^ ,          pVP                  VP                  V4      4       VP                  \        VP                  4      V,           4       EKP  \        V9   d   V Uu. uF  p\        V4      \        J g   K  VNK  	  up^ ,          p	VP                  VP                  V	4      4       VP                  \        V	P                  4      ^,          V,           4       EK  VP                  V4       EK  \        V U
u. uF  p
\        V
!  NK  	  up
!  # u upi u upi u upi u upi u upi u upi u up
i )zATransform pattern into an equivalent, with only top-level Either.)popr.   Eitherr)   r#   appendRequiredr%   Optional
AnyOptions	OneOrMore)r   ZretZgroupsr#   r+   typesr-   ZrequiredZoptionalZ	oneormorer5   s   &          r   r-   ZPattern.eitherG   sn   
 &fzz!}H&./hT!WhE/%-CXaF1B!!XCAFX^^F34AMM1#.1 )U"'/Gx!47h3FAAxGJX^^H56d8#4#45@AU"'/Gx!47h3FAAxGJX^^H56d8#4#45@Au$'/Ix!47j3HAAxI!LX^^H56d8#4#45@Ae#(0I1DGy4HQQI!L	X^^I67d9#5#56:XEF

8$c2c!c2331 0C
 H H J J
 3sG   L
L$LL#+L#L(2L(L-9L-&L2 L2L7r   r   )r   r   r   r   r   r   r"   r    r!   propertyr-   r	   r   r   r   r   r   r       s2     ) 

'  4  4r
   r   c                   s@   a  ] tR t^kt o RR ltR tR tRR ltRtV t	R# )ChildPatternNc                    Wn         W n        R # r   namer2   r   rB   r2      &&&r   r   ZChildPattern.__init__m       	
r
   c                sn    V P                   P                  : R V P                  : RV P                  : R2# )(, ))	__class__r   rB   r2   r   r   r   __repr__ZChildPattern.__repr__q   s!    #~~66		4::NNr
   c                s<    V'       d   \        V 4      V9   d   V .# . # r   )r.   )r   r=      &*r   r'   ZChildPattern.flatt   s    "d4jE&9vArAr
   c                s^   Vf   . MTpV P                  V4      w  r4Vf   RW3# VR V W^,           R  ,           pV Uu. uF!  qfP                  V P                  8X  g   K  VNK#  	  pp\        V P                  4      \        \
        39   d   \        V P                  4      \        J d   ^pM6\        VP                  4      \        J d   VP                  .MVP                  pV'       g   Wn        RWRV.,           3# V^ ,          ;P                  V,          un        RWR3# RWRV.,           3# u upi NFT)single_matchrB   r.   r2   Zintr%   Zstr)	r   left	collectedZposmatchZleft_aZ	same_nameZ	increments	   &&&      r   rP   ZChildPattern.matchw   s   #+B	&&t,
=$))Tc
T'(^+ )A	1VVtyy-@QQ		A

T{*DJJ3&	.25;;.?3.Fekk]"'++ 'U$777aL)+))U/// Bs   D*D*rA   r   )
r   r   r   r   r   rJ   r'   rP   r	   r   r   r   r   r?   r?   k   s      OB0 0r
   r?   c                   s2   a  ] tR t^t o R tR tR tRtV tR# )ParentPatternc                s&    \        V4      V n        R # r   )r%   r#   )r   r#   rK   r   r   ZParentPattern.__init__   s    Xr
   c                s~    V P                   P                  : R RP                  R V P                   4       4      : R2# )rF   rG   c              3   s8   "   T F  p\        V4      x  K  	  R # 5ir   r   .0rQ      & r   	<genexpr>Z)ParentPattern.__repr__.<locals>.<genexpr>   s     $DmT!WWm   rH   )rI   r   joinr#   r   r   r   rJ   ZParentPattern.__repr__   s1    >>2299$Ddmm$DDF 	Fr
   c           	     s    \        V 4      V9   d   V .# \        V P                   Uu. uF  q"P                  ! V!  NK  	  up. 4      # u upi r   )r.   Zsumr#   r'   )r   r=   r+   s   &* r   r'   ZParentPattern.flat   s>    :6MDMM:MqFFENM:B??:s   A)r#   N)	r   r   r   r   r   rJ   r'   r	   r   r   r   r   rR   rR      s     'F@ @r
   rR   c                   s6   a  ] tR t^t o R t]R 4       tRtV tR# )r/   c                s    \        V4       F<  w  r#\        V4      \        J g   K  V\        V P                  VP                  4      3u # 	  R# NNN)r(   r.   r/   rB   r2   r   rN   Znpr,   r   rM   ZArgument.single_match   s@    dODAAw("(499agg666 $ r
   c                s    \         P                  ! R V4      ^ ,          p\         P                  ! RV\         P                  R7      pT ! Y#'       d   V^ ,          4      # R4      # )z(<\S*?>)\[default: (.*)\]ZflagsN)refindallI)class_sourcerB   r2   r,   r   parseZArgument.parse   sI    zz*f-a0

.bddCdE!H88488r
   r   N)	r   r   r   r   rM   classmethodrd   r	   r   r   r   r   r/   r/      s      9 9r
   r/   c                   s0   a  ] tR t^t o RR ltR tRtV tR# )r4   c                r@   r   rA   rC   rD   r   r   ZCommand.__init__   rE   r
   c                s    \        V4       FP  w  r#\        V4      \        J g   K  VP                  V P                  8X  d   V\        V P                  R 4      3u #  R# 	  R# )TrZ   )r(   r.   r/   r2   rB   r4   r[   r,   r   rM   ZCommand.single_match   sU    dODAAw("77dii'gdii666 $ r
   rA   NF)r   r   r   r   r   rM   r	   r   r   r   r   r4   r4      s      r
   r4   c                   sV   a  ] tR t^t o RR lt]R 4       tR t]R 4       t	R t
RtV tR# )	r0   Nc                sz    WuV n         V n        W4uV n        V n        VR J d   V'       d
   RV n        R# TV n        R# )FNshortlongr1   r2   )r   rh   ri   r1   r2   s   &&&&&r   r   ZOption.__init__   s3     %
DI$,!tz"e^T
e
r
   c                s   R	w  r#rEVP                  4       P                  R4      w  rgpVP                  RR4      P                  RR4      pVP                  4        F;  p	V	P	                  R4      '       d   T	pK  V	P	                  R4      '       d   T	pK9  ^pK=  	  V'       d;   \
        P                  ! RV\
        P                  R7      p
V
'       d
   V
^ ,          MR pV ! W#WE4      # )
Nz  Z, =---r]   r^   NN    F)r   	partitionZreplacer3   
startswithr_   r`   ra   )rb   Zoption_descriptionrh   ri   r1   r2   options_Zdescriptionsmatcheds   &&         r   rd   ZOption.parse   s    ';$X"4":":"<"F"Ft"LK//#s+33C=A||D!!c"" ! jj!4kNG")GAJtEe833r
   c                sn    \        V4       F%  w  r#V P                  VP                  8X  g   K"  W#3u # 	  R# rY   )r(   rB   r[   r,   r   rM   ZOption.single_match   s1    dODAyyAFF"t $ r
   c                sB    V P                   ;'       g    V P                  # r   )ri   rh   r   r   r   rB   ZOption.name   s    yy&&DJJ&r
   c           	     sx    R V P                   : RV P                  : RV P                  : RV P                  : R2	# )zOption(rG   rH   rg   r   r   r   rJ   ZOption.__repr__   s(    +/::tyy+/==$**F 	Fr
   )r1   ri   rh   r2   rn   )r   r   r   r   r   re   rd   rM   r>   rB   rJ   r	   r   r   r   r   r0   r0      sD     D 4 4  ' 'F Fr
   r0   c                   s*   a  ] tR t^t o RR ltRtV tR# )r9   Nc                s    Vf   . MTpTpTpV P                    F%  pVP                  W44      w  rcpV'       d   K!  RW3u # 	  RW43# rL   r#   rP   )r   rN   rO   lr+   r\   ru   s   &&&    r   rP   ZRequired.match   sS    #+B	AGGAMMG7d--  Qzr
   r   r   r   r   r   r   rP   r	   r   r   r   r   r9   r9      s      r
   r9   c                   s*   a  ] tR t^t o RR ltRtV tR# )r:   Nc                sh    Vf   . MTpV P                    F  pVP                  W4      w  rApK  	  RW3# )NTrv   )r   rN   rO   r\   Zm   &&&  r   rP   ZOptional.match   s:    #+B	A!"!9AY T$$r
   r   r   rx   r   r   r   r:   r:      s     % %r
   r:   c                   s    ] tR t^tRtRtR# )r;   z*Marker/placeholder for [options] shortcut.r   Nr   r   r
   r   r;   r;      s    4r
   r;   c                   s*   a  ] tR t^t o RR ltRtV tR# )r<   Nc                s    Vf   . MTpTpTpR pRp^ pV'       dC   V P                   ^ ,          P                  W44      w  rcpYv'       d   ^M^ ,          pWS8X  d   MTpKJ  V^8  d   RW43# RW3# )NTFrv   )r   rN   rO   rw   r+   Zl_ru   Ztimes   &&&     r   rP   ZOneOrMore.match   s~    #+B	 MM!,2218MG'Qq(EwBA::d%%r
   r   r   rx   r   r   r   r<   r<      s     & &r
   r<   c                   s*   a  ] tR tRt o RR ltRtV tR# )r7   i  Nc                s    Vf   . MTp. pV P                    F4  pVP                  W4      ;w  p rgV'       g   K#  VP                  V4       K6  	  V'       d   \        VR R7      # RW3# )Nc                 s&    \        V ^,          4      # )   len)outcomer   r   Z<lambda>ZEither.match.<locals>.<lambda>  s    S_r
   )ZkeyF)r#   rP   r8   Zmin)r   rN   rO   Zoutcomesr\   ru   rs   r~   rz   r   rP   ZEither.match  sg    #+B	A&'ggd&>>MGQw(  x%DEEd%%r
   r   r   rx   r   r   r   r7   r7     s     	& 	&r
   r7   c                   s2   a  ] tR tRt o R tR tR tRtV tR# )TokenStreami!  c                sh    T \        VR 4      '       d   VP                  4       MT,          p W n        R# )r3   N)r$   r3   error)r   rc   r   rD   r   r   ZTokenStream.__init__#  s%    '&'":":F
r
   c                sJ    \        V 4      '       d   V P                  ^ 4      # R# ro   N)r}   r6   r   r   r   moveZTokenStream.move'  s    !$iitxx{1T1r
   c                s:    \        V 4      '       d
   V ^ ,          # R# r   r|   r   r   r   currentZTokenStream.current*  s    d))tAw--r
   )r   N)	r   r   r   r   r   r   r   r	   r   r   r   r   r   r   !  s     2. .r
   r   c                s   V P                  4       P                  R4      w  r#pY4u;8X  d   R8X  d   M MRMTpV Uu. uF  qUP                  V8X  g   K  VNK  	  ppV P                  \        J dO   V. 8X  dH   V Uu. uF;  qUP                  '       g   K  VP                  P                  V4      '       g   K9  VNK=  	  pp\        V4      ^8  d0   V P                  V: RRP                  R V 4       4      : R24      h\        V4      ^8  dW   VR8X  d   ^M^ p\        RW'4      pVP                  V4       V P                  \        J d   \        RY'V'       d   TMR4      pV.# \        V^ ,          P                  V^ ,          P                  V^ ,          P                  V^ ,          P                  4      pVP                  ^ 8X  d(   Ve#   V P                  R	VP                  ,          4      hMHVfE   V P                  4       f#   V P                  R
VP                  ,          4      hV P                  4       pV P                  \        J d   Ve   TMRVn        V.# u upi u upi )z-long ::= '--' chars [ ( ' ' | '=' ) chars ] ;rk   r   Nz is not a unique prefix: rG   c              3   s8   "   T F  qP                   x  K  	  R # 5ir   )ri   rT   orU   r   rV   Zparse_long.<locals>.<genexpr>8  s     +DGqFFGrW   Z?Tz%s must not have an argument%s requires argument)r   rp   ri   r   r   rq   r}   rX   r0   r8   rh   r1   r2   r   )tokensrr   ri   Zeqr2   r   similarr1   s   &&      r   
parse_longr   .  s   kkm--c2ODe%2%D5E!4'QVVt^qq'G4||z!gm%Lg1AFF4E4Ed4K11gL
7|all $))+DG+D"DF G 	G	W	c	1q4(q<<:%tThUDIA 3J 71:##WQZ__1:&&
(8(8:::? ll#AAFF#JKK ! }>>#+ ,,'='FGG<<:%$0edAG3J3 5Ls   II:II5Ic                s   V P                  4       pVP                  R4      p. pVR8w  Ed   RV^ ,          ,           VR,          r5V Uu. uF  qfP                  V8X  g   K  VNK  	  pp\        V4      ^8  d$   V P	                  RV\        V4      3,          4      h\        V4      ^8  dB   \        VR^ 4      pVP                  V4       V P                  \        J d   \        VR^ R4      pM\        WW^ ,          P                  V^ ,          P                  V^ ,          P                  4      pRpVP                  ^ 8w  dG   VR8X  d<   V P                  4       f   V P	                  RV,          4      hV P                  4       pMTpRpV P                  \        J d   Ve   TMRVn
        VP                  V4       EK  V# u upi )z-shorts ::= '-' ( chars )* [ [ ' ' ] chars ] ;rm   r   r{   NNz$%s is specified ambiguously %d timesNTr   )r   Zlstriprh   r}   r   r0   r8   r   ri   r1   r2   r   )	r   rr   tokenrN   parsedrh   r   r   r2   s	   &&       r   parse_shortsr   O  sx   KKME<<DF
"*DGmT"Xt%:gE)911g:w<!,,E %s7|4 5 6 6\AudA&ANN1||z)5$40uajooqz**GAJ,<,<>AEzzQ2:~~'/$ll+AE+IJJ"KKME ED||z)#(#4%$aM1 ;s   F;F;c                 s    \        \        P                  ! R RV 4      \        4      p\	        W!4      pVP                  4       e(   VP                  RRP                  V4      ,          4      h\        V!  # )z([\[\]\(\)\|]|\.\.\.)z \1 zunexpected ending: %rrj   )	r   r_   Zsubr   
parse_exprr   r   rX   r9   )rc   rr   r   resultr,   r   parse_patternr   r  s_     8'6J,.F(F~~#ll2SXXf5EEFFVr
   c                s`   \        W4      pV P                  4       R8w  d   V# \        V4      ^8  d   \        V!  .MTpV P                  4       R8X  dA   V P	                  4        \        W4      pT\        V4      ^8  d   \        V!  .MT,          pKU  \        V4      ^8  d   \        V!  .# T# )zexpr ::= seq ( '|' seq )* ;|)	parse_seqr   r}   r9   r   r7   )r   rr   Zseqr   r,   r   r   r   {  s    
F
$C~~3
!$SAhn3F
..
c
!(c#hl8S>"; #FaFFO;V;r
   c                s    . pV P                  4       R9  dE   \        W4      pV P                  4       R8X  d   \        V!  .pV P                  4        W#,          pKY  V# )zseq ::= ( atom [ '...' ] )* ;z...)N]rH   r   )r   
parse_atomr<   r   )r   rr   r   Zatomr,   r   r   r     sR    F
..
"7
7&*>>u$t$%DKKMMr
   c                s   V P                  4       p. pVR9   dk   V P                  4        RR\        .RR\        ./V,          w  rEV! \	        W4      !  pV P                  4       V8w  d   V P                  RV,          4      hV.# VR8X  d   V P                  4        \        4       .# VP                  R4      '       d   VR8w  d   \        W4      # VP                  R	4      '       d   VR9  d   \        W4      # VP                  R
4      '       d   VP                  R4      '       g   VP                  4       '       d   \        V P                  4       4      .# \        V P                  4       4      .# )zXatom ::= '(' expr ')' | '[' expr ']' | 'options'
| long | shorts | argument | command ;
z([rF   rH   Z[r   zunmatched '%s'rr   rl   rm   Z<Z>)rm   rl   )r   r   r9   r:   r   r   r;   rq   r   r   ZendswithZisupperr/   r4   )r   rr   r   r   Zmatchingpatterns   &&    r   r   r     s-    NNEF} 3/3hHO*V56;;=H$,,/%788x	)	~			$		ETM&**			#		5#;F,,			#		5>>##6#6%--//'((&''r
   c                sl   . pV P                  4       Ee   V P                  4       R8X  d#   Y0 Uu. uF  p\        RV4      NK  	  up,           # V P                  4       P                  R4      '       d   V\        W4      ,          pK  V P                  4       P                  R4      '       d*   V P                  4       R8w  d   V\	        W4      ,          pK  V'       d#   Y0 Uu. uF  p\        RV4      NK  	  up,           # VP                  \        RV P                  4       4      4       EK'  V# u upi u upi )zParse command-line argument vector.

If options_first:
    argv ::= [ long | shorts ]* [ argument ]* [ '--' [ argument ]* ] ;
else:
    argv ::= [ long | shorts | argument ]* [ '--' [ argument ]* ] ;

Nrl   rm   )r   r/   rq   r   r   r8   r   )r   rr   options_firstr   Zvry   r   
parse_argvr     s     F
..

&>>t#?1XdA.???^^((..j11F^^((--&..2Bc2Il633F?1XdA.???MM(478M @ @s   D, D1c                 s6   \         P                  ! R V 4      R,          p\        VR,          VR,          4       UUu. uF  w  r#W#,           NK  	  pppV Uu. uF0  qDP                  R4      '       g   K  \        P                  V4      NK2  	  ppV# u uppi u upi )z
 *(<\S+?>|-\S+?)r   :NN   :r{   Nr   rm   )r_   r3   Zziprq   r0   rd   )docr3   Zs1Zs2rt   rr   s   &     r   parse_defaultsr     sz    HH)3/3E#&uSz5;#?@#?RWW#?E@(-C1c1Bv||AGC N	 ACs   BB3Bc                 s    \         P                  ! R V 4      p\        V4      ^8  d   \        R4      h\        V4      ^8  d   \        R4      h\         P                  ! RRP	                  VR,          4      4      ^ ,          P                  4       # )z([Uu][Ss][Aa][Gg][Ee]:)z&"usage:" (case-insensitive) not found.z*More than one "usage:" (case-insensitive).z\n\s*\nr   r   )r_   r3   r}   r   rX   r   )r   Zusage_splitrU   r   printable_usager     sq    ((5s;K
;!!"JKK
;!!"NOO88JB 89!<BBDDr
   c                 s   a V P                  4       R ,          oRRP                  V3R lSR ,           4       4      ,           R,           # )r   z( rj   c              3   sF   <"   T F  qS^ ,          8X  d   RMTx  K  	  R# 5i)ro   z) | (Nr   )rT   rt   pus   & r   rV   Zformal_usage.<locals>.<genexpr>  s     HA2a5j7a7s   !z ))r3   rX   )r   r   s   &@r   formal_usager     s9    				 	$B#((HBHHH4OOr
   c                 s   V '       dj   \         ;QJ d    R  V 4       F  '       g   K   RM	  RM! R  V 4       4      '       d0   \        VP                  R4      4       \        P                  ! 4        V'       d_   \         ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d#   \        V4       \        P                  ! 4        R# R# R# )c              3   sf   "   T F'  qP                   R9   ;'       d    VP                  x  K)  	  R# 5i)-hN)r   z--helprA   r   rU   r   rV   extras.<locals>.<genexpr>  s'     NgVV//<<QWW<gs   /1TFr   c              3   sf   "   T F'  qP                   R 8H  ;'       d    VP                  x  K)  	  R# 5i)z	--versionNrA   r   rU   r   rV   r     s&     J'Qvv,888's   11N)ZanyZprintr   sysZexit)helpversionrr   r   s   &&&&r   extrasr     sy    NgNNgNNNciio
33J'J333J'JJJg
 Kwr
   c                   s&   a  ] tR tRt o R tRtV tR# )Dicti  c                sn    R RP                  R \        V P                  4       4       4       4      ,          # )z{%s}z,
 c              3   s4   "   T F  pR V,          x  K  	  R# 5i)z%r: %rNr   )rT   r*   rU   r   rV   Z Dict.__repr__.<locals>.<genexpr>  s     #O:NQHqLL:Ns   )rX   ZsortedZitemsr   r   r   rJ   ZDict.__repr__  s'    #O&:N#OOOOr
   r   N)r   r   r   r   rJ   r	   r   r   r   r   r   r     s     P Pr
   r   c                s   Vf   \         P                  R,          p\        V 4      \        n        \        V 4      p\        \        \        P                  4      V4      p\        \        V\        4      \        V4      V4      p\        VP                  \        4      4      pVP                  \        4       F.  p\        V 4      p	\        \        V	4      V,
          4      Vn        K0  	  \!        W#W4       VP#                  4       P%                  V4      w  rpV
'       d/   V. 8X  d(   \'        R VP                  4       V,            4       4      # \        4       h)a  Parse `argv` based on command-line interface described in `doc`.

`docopt` creates your command-line interface based on its
description that you pass as `doc`. Such description can contain
--options, <positional-argument>, commands, which could be
[optional], (required), (mutually | exclusive) or repeated...

Parameters
----------
doc : str
    Description of your command-line interface.
argv : list of str, optional
    Argument vector to be parsed. sys.argv[1:] is used if not
    provided.
help : bool (default: True)
    Set to False to disable automatic help on -h or --help
    options.
version : any object
    If passed, the object will be printed if --version is in
    `argv`.
options_first : bool (default: False)
    Set to True to require options preceed positional arguments,
    i.e. to forbid options and positional arguments intermix.

Returns
-------
args : dict
    A dictionary, where keys are names of command-line elements
    such as e.g. "--verbose" and "<path>", and values are the
    parsed values of those elements.

Example
-------
>>> from docopt import docopt
>>> doc = '''
Usage:
    my_program tcp <host> <port> [--timeout=<seconds>]
    my_program serial <port> [--baud=<n>] [--timeout=<seconds>]
    my_program (-h | --help | --version)

Options:
    -h, --help  Show this screen and exit.
    --baud=<n>  Baudrate [default: 9600]
'''
>>> argv = ['tcp', '127.0.0.1', '80', '--timeout', '30']
>>> docopt(doc, argv)
{'--baud': '9600',
 '--help': False,
 '--timeout': '30',
 '--version': False,
 '<host>': '127.0.0.1',
 '<port>': '80',
 'serial': False,
 'tcp': True}

See also
--------
* For video introduction see http://docopt.org
* Full documentation is available in README.rst as well as online
  at https://github.com/docopt/docopt#readme

r   c              3   sP   "   T F  qP                   VP                  3x  K  	  R # 5ir   rA   rS   rU   r   rV   Zdocopt.<locals>.<genexpr>B  s     L0J!VVQWW%0Js   $&)r   argvr   r   r   r   r   r   r   r   r%   r&   r'   r0   r;   r#   r   r"   rP   r   )r   r   r   r   r   rr   r   Zpattern_optionsZaoZdoc_optionsru   rN   rO   s   &&&&&        r   r    r      s    ~ |xx|&s+JS!GL)9)9:GDG k$
3T']#%D',,v./Oll:&$S)3{+o=> ' 4$$&{{}2248G942:L0JLLL
,r
   rf   )NTNF)%r   r   r_   Z__all__Z__version__Z	Exceptionr   r   r   Zobjectr   r?   rR   r/   r4   r0   r9   r:   r;   r<   r7   r%   r   r   r   r   r   r   r   r   r   r   r   r   Zdictr   r    r   r
   r   <module>r      s"    	 *?) ?
I IH4f H4V07 0B@G @9| 9h  %F\ %FP
} 
%} %5 5
& &,&] &
.$ 
.B F
<	(40EP
P4 P
Vr
   