
    d                         d Z dZddlZddZy)zparse.py is a utility that allows simple checking for line continuations
to give the shell information about where text is commented and where it is
not and also how to appropriately break up a sequence of commands into
separate multi-line commands...
z.David N. Mashburn <david.n.mashburn@gmail.com>    Nc                 Z   	 d }g }dg}g d}g d}g d}dddd}g }	g }
g }g }d}d}t        | j                  d	            D ]@  \  }}t        |      t        |j                               z
  }|dkD  r|
d
   xs |	d
   xs |d
   }|j                         dk(  rd}nl|j	                         d   dk(  rd}nSd}|r||d
   kD  rd}|j                  |       n3|rn0|s&||v r"||d
   k  r"|j                          ||d
   k  rn|sd|gc S t        j                  d|      j                         j                         }|dv rd}nd}d}t        |      }t        j                  d|      }|D ]  }|j                         }|f|dk(  rd}|j                         } nW||v r|}5|g k7  r*||v r&||d
      |k(  r|j                          n
|sd|gc c S ||v si|j                  |       {||k(  sd } |	j                  |d k7         |j                  d       |d | j                         }|dk7  r|	d
   dk(  r|d
   dk(  rd|d
<   d}|
j                  d       t        |      dkD  r|s|d
   dk(  rd|
d
<   |j                  |g k7         C |	d
   s|d
   s
|
d
   s|d
   r|sdgS |r|sdgS |	||
|fS )Nr   )z"""z'''"')([{))]}r	   r
   r   F
 T#zInvalid Indentation Errorz *\w*)
ifelseelifforwhiledefclasstryexceptfinallyz%"""|'''|"|'|\"|\'|\(|\)|\[|\]|\{|\}|#zInvalid Syntax Error:\zIncomplete Syntax ErrorzIncomplete Indentation Error)	enumeratesplitlenlstripstripappendpoprematchgroupfinditerstartrstrip)	codeBlockignoreErrors
stringMarkparaListindentNumberstringMarks	openMarks
closeMarksparaMarkDictstringContinuationListlineContinuationListindentationBlockListparentheticalContinuationList	newIndentlspContinuationilcurrentIndentation	emptyLine	firstWordhasContinuationWord	commentednonCommentLengthresultrjnonCommentStrings                              -/usr/lib/python3/dist-packages/wx/py/parse.pytestForContinuationsrE      s`   2 JHL'KIJ#30L"$!IO./ K?! VC
O3Q3226 @4R8@;B?  88:r>IWWYq\3II/R0@@	##$67 #5#E(b)99 $$& )b)99!3A66HHXa(..0779	 A A"&"' 	QTUVW 	 A	A!c6"I'(wwy$+% J2~!z/'5q8$LLN!-$:1#==I~ *Q
+	 . 	%%j$&67##E*../668R$:2$>$E#S()-$R(	##E*q6!8Iud{)-$R(%,,h"n>WK?` 	r"&:2&>B#@#D)!,,.q11 ""67KLiii    )F)__doc__
__author__r#   rE    rF   rD   <module>rJ      s    >
 
rjrF   