-í
]=c      s    d  Z    d k l Z  d GH d Z  g  i Z e d d ƒ D ] Z e e e ƒ ƒ qG [ Z	  x9 e d D ]* Z
  e
 e	 j o  e	 i e
 ƒ n qw W d Ge	 GH d „  Z % d	 „  Z . d
 „  Z 2 d „  Z 5 d „  Z _ d „  Z r e d j o s n d S(   sW   ParseString(s) -> LispList  is the function you want to use.
The rest?  Merely players.(   s
   generatorss   Loading Parser.pys    
i    i   s   ()'s?   "Parser.py: Legitimate characters to begin a lisp atom/symbol:
c   sJ      ! d } " x& " |  | | j o " | d 7} q W# |  |  Sd S(   s7   Strips delimiters off the front, returns the new stringi    i   N(   s   is   ss   delims(   s   ss   delimss   i(    (    s	   Parser.pys
   StripFront s   	  c   s£   % & ' t  |  ƒ o t |  ƒ o ' d Sn ( d } ) xS |  D) ]H } * | d j o * | d 7} n" + | d j o + | d 8} n qC W, | d j Sd S(   s>   DOes parenthesis checking, and runs IsLiteral and Quoted on iti    s   (i   s   )N(   s   IsLiteralLispLists   ss   QuotedLispLists   parenLvls   c(   s   ss   cs   parenLvl(    (    s	   Parser.pys   WellformedLispList% s    	
 	  c   s?   . / 0 t  |  ƒ d j o |  d d j o |  d d j Sd S(   s/   Something like (1 2 3).  No quote at beginning.i   i    s   (iÿÿÿÿs   )N(   s   lens   s(   s   s(    (    s	   Parser.pys   IsLiteralLispList. s   c   s?   2 3 t  |  ƒ d j o" |  d d !d j o |  d d j Sd  S(   Ni   i    i   s   '(iÿÿÿÿs   )(   s   lens   s(   s   s(    (    s	   Parser.pys   QuotedLispList2 s   c   #sÒ  5 7 8 ‡ ‡  d †  } B t o t ˆ  ƒ p t ‚ C ˆ  d d !‰ F d } G xyG ˆ onI ˆ d t j o I t ˆ t ƒ n K ˆ d t	 j od L d } M x9 M | t ˆ ƒ j  o ˆ | t j o N | d 7} qª WO ˆ |  VP ˆ | ‰ n˜ Q ˆ d d j o. R | d d ƒ } S ˆ |  VT ˆ | ‰ nV U ˆ d d !d j o. V | d d ƒ } W ˆ |  VX ˆ | ‰ n Z t d	 ˆ ‚ \ x- \ ˆ o ˆ d t j o ] ˆ d ‰ qœWqU Wd
 S(   sQ   Give this sucker an UNQUOTED lisp-string.
    Generates strings and only strings.c   sí   8 9 t  o d t ƒ  j p t ‚ : x : |  t ˆ  ƒ j  o
 | d j o[ ; ˆ  |  d j o ; | d 7} n& < ˆ  |  d j o < | d 8} n = |  d 7}  q* W> t  o/ |  t ˆ  ƒ j o
 | d j p t d ˆ ‚ ? |  Sd  S(   Ns
   curListStri    s   (i   s   )s;   Parenthesis Mismatch error!  (Big surprise forLISP). For %s(   s	   __debug__s   localss   AssertionErrors   is   lens
   curListStrs   curParenDepths   lispLiteral(   s   is   curParenDepth(   s
   curListStrs   lispLiteral(    s	   Parser.pys   _GotoMatchingParen8 s   ! #  9i   iÿÿÿÿs    i    s   (i   s   '(s   Dunno what to do with '%s'N(   s   _GotoMatchingParens	   __debug__s   IsLiteralLispLists   lispLiterals   AssertionErrors
   curListStrs   elems   DELIMSs
   StripFronts   SYMBOL_STARTERSs   is   lens   matchingPoss	   Exception(   s   lispLiterals
   curListStrs   _GotoMatchingParens   is   elems   matchingPos(    (   s   lispLiterals
   curListStrs	   Parser.pys   ParseElemsGen5 s8   
	 
 	 ' c   sŒ   _ ` a d „  } i t o t |  ƒ p t ‚ k t |  ƒ o, l |  d } m d t | | ƒ ƒ g } n o t | |  ƒ ƒ } p | Sd S(   sP   lispListStr can either be quoted or unquoted.  Prepends the quote macro and all.c   #sL   a b x? t  |  ƒ Db ]. } f t | ƒ o f t | ƒ Vn g | Vq Wd  S(   N(   s   ParseElemsGens   ss   elems   WellformedLispLists   ParseString(   s   ss   elem(    (    s	   Parser.pys	   HelperGena s
    	 i   s   quoteN(	   s	   HelperGens	   __debug__s   WellformedLispLists   lispListStrs   AssertionErrors   QuotedLispLists   notQuotedParts   lists   ret(   s   lispListStrs	   HelperGens   notQuotedParts   ret(    (    s	   Parser.pys   ParseString_ s   s   __main__N(   s   __doc__s
   __future__s
   generatorss   DELIMSs   appends   _[1]s   ranges   xs   chrs   SYMBOL_STARTERSs   not_a_starters   removes
   StripFronts   WellformedLispLists   IsLiteralLispLists   QuotedLispLists   ParseElemsGens   ParseStrings   __name__(   s
   StripFronts   ParseElemsGens   ParseStrings   not_a_starters   SYMBOL_STARTERSs   DELIMSs   _[1]s   WellformedLispLists
   generatorss   IsLiteralLispLists   xs   QuotedLispList(    (    s	   Parser.pys   ? s$   	 " 		*
