‡Æ
Nö9c       s»   d  Z  d k Z d k Z d f  d „  ƒ  YZ e d j o e e i ƒ d j o e ƒ  Z n# e i d Z	 e e
 e	 ƒ e	 ƒ Z x3 d o+ e i ƒ  Z e o d e e ƒ GHn Pq€ Wn d S(   s8   A lexical analyzer class for simple shell-like syntaxes.Ns   shlexc      sJ   d  Z  e e d „ Z d „  Z d „  Z d „  Z d „  Z e e d „ Z RS(   s8   A lexical analyzer class for simple shell-like syntaxes.c    s¼   | o | |  _  | |  _ n t i |  _  t |  _ d |  _ d |  _ d |  _ d |  _	 d |  _
 g  |  _ d |  _ d |  _ d |  _ g  |  _ t |  _ |  i o d	 |  i  |  i f GHn d  S(
   Ns   #s?   abcdfeghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_s    	
s   '"s    i   i    s    s   shlex: reading from %s, line %d(   s   instreams   selfs   infiles   syss   stdins   Nones
   commenterss	   wordcharss
   whitespaces   quotess   states   pushbacks   linenos   debugs   tokens	   filestacks   source(   s   selfs   instreams   infiles"   /mit/python/lib/python2.0/shlex.pys   __init__ s$    													
c    s5   |  i d j o d | GHn | g |  i |  _ d S(   s:   Push a token onto the stack popped by the get_token methodi   s   shlex: pushing token N(   s   selfs   debugs   toks   pushback(   s   selfs   toks"   /mit/python/lib/python2.0/shlex.pys
   push_token# s     c    sÒ  |  i oC |  i d } |  i d |  _ |  i d j o d | GHn | Sn |  i ƒ  } x™ | |  i j oˆ |  i |  i ƒ  ƒ \ } } |  i
 i d |  i |  i |  i f ƒ | |  _ | |  _ d |  _ |  i o d |  i f GHn |  i ƒ  } q\ Wx¤ | d j o– t |  i
 ƒ d j o d Snu |  i i ƒ  |  i
 d \ |  _ |  _ |  _ |  i
 d |  _
 |  i o d |  i |  i f GHn d |  _ |  i ƒ  } qø W|  i d j o | o d | GHn d	 GHn | Sd
 S(   sB   Get a token from the input stream (or from stack if it's nonempty)i    i   s   shlex: popping token s   shlex: pushing to file %ss    s   shlex: popping to %s, line %ds    s   shlex: token=s   shlex: token=EOFN(   s   selfs   pushbacks   toks   debugs
   read_tokens   raws   sources
   sourcehooks   newfiles	   newstreams	   filestacks   inserts   infiles   instreams   linenos	   get_tokens   lens   closes   state(   s   selfs   toks   raws   newfiles	   newstreams"   /mit/python/lib/python2.0/shlex.pys	   get_token) sD     
 %			
 
		c    sF  d } xõd oí|  i i d ƒ } | d j o |  i d |  _ n |  i d j o$ d Gt |  i ƒ Gd Gt | ƒ GHn |  i t	 j o d |  _
 Pne|  i d j oñ | o t	 |  _ PnØ | |  i j o/ |  i d j o	 d	 GHn |  i
 o Pn q	 n™ | |  i j o! |  i i ƒ  |  i d |  _ nh | |  i j o | |  _
 d
 |  _ nB | |  i j o | |  _
 | |  _ n | |  _
 |  i
 o Pn q	 nd|  i |  i j o2 |  i
 | |  _
 | |  i j o d |  _ Pn n|  i d
 j o| o t	 |  _ Pnõ | |  i j o8 |  i d j o	 d GHn d |  _ |  i
 o Pn q	 n­ | |  i j o! |  i i ƒ  |  i d |  _ n| | |  i j p | |  i j o |  i
 | |  _
 nH | g |  i |  _ |  i d j o	 d GHn d |  _ |  i
 o Pn q	 n q	 W|  i
 } d |  _
 |  i d j o | o d | GHn d GHn | Sd S(   s>   Read a token from the input stream (no pushback or inclusions)s    i   s   
i   s   shlex: in states   I see character:s    i   s+   shlex: I see whitespace in whitespace states   as%   shlex: I see whitespace in word states&   shlex: I see punctuation in word states   shlex: raw token=s   shlex: raw token=EOFN(   s   toks   selfs   instreams   reads   nextchars   linenos   debugs   reprs   states   Nones   tokens
   whitespaces
   commenterss   readlines	   wordcharss   quotess   pushbacks   result(   s   selfs   toks   nextchars   results"   /mit/python/lib/python2.0/shlex.pys
   read_tokenR sŒ      $			
			
					
 		
			c    s’   | d d j o | d d !} n t |  i ƒ t d ƒ j o t i i | ƒ o( t i i t i i |  i ƒ | ƒ } n | t	 | d ƒ f Sd S(   s(   Hook called on a filename to be sourced.i    s   "i   s    s   rN(
   s   newfiles   types   selfs   infiles   oss   paths   isabss   joins   dirnames   open(   s   selfs   newfiles"   /mit/python/lib/python2.0/shlex.pys
   sourcehook¡ s     0(c    s<   | o |  i  } n | o |  i } n d | | f Sd S(   s<   Emit a C-compiler-like, Emacs-friendly error-message leader.s   "%s", line %d: N(   s   infiles   selfs   lineno(   s   selfs   infiles   linenos"   /mit/python/lib/python2.0/shlex.pys   error_leaderª s     (   s   __doc__s   Nones   __init__s
   push_tokens	   get_tokens
   read_tokens
   sourcehooks   error_leader(    s"   /mit/python/lib/python2.0/shlex.pys   shlex
 s    		)	O		s   __main__i   s   Token: (   s   __doc__s   os.paths   oss   syss   shlexs   __name__s   lens   argvs   lexers   files   opens	   get_tokens   tts   repr(    s"   /mit/python/lib/python2.0/shlex.pys   ? s   		© 