
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
ó
uWS`c           @   s  d  Z  d d l Z d d l Z d d l m Z y d d l m Z Wn! e k
 re d d l m Z n Xd d g Z	 d d d „  ƒ  YZ
 e e d „ Z e d	 k re e j ƒ d
 k rÁ e
 ƒ  Z n" e j d
 Z e
 e e ƒ e ƒ Z x, e j ƒ  Z e r
d e e ƒ GHqæ Pqæ Wn  d S(   s8   A lexical analyzer class for simple shell-like syntaxes.iÿÿÿÿN(   t   deque(   t   StringIOt   shlext   splitc           B   sz   e  Z d  Z d d e d „ Z d „  Z d d „ Z d „  Z d „  Z	 d „  Z
 d „  Z d d d „ Z d	 „  Z d
 „  Z RS(   s8   A lexical analyzer class for simple shell-like syntaxes.c         C   s<  t  | t ƒ r t | ƒ } n  | d  k	 r? | |  _ | |  _ n t j |  _ d  |  _ | |  _ | ro d  |  _	 n	 d |  _	 d |  _
 d |  _ |  j r¥ |  j d 7_ n  d |  _ t |  _ d |  _ d |  _ d |  _ d	 |  _ t ƒ  |  _ d
 |  _ d |  _ d |  _ t ƒ  |  _ d  |  _ |  j r8d |  j |  j f GHn  d  S(   Nt    t   #t?   abcdfeghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_s>   ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞs    	
s   '"s   \t   "t    i   i    s   shlex: reading from %s, line %d(   t
   isinstancet
   basestringR   t   Nonet   instreamt   infilet   syst   stdint   posixt   eoft
   commenterst	   wordcharst
   whitespacet   Falset   whitespace_splitt   quotest   escapet   escapedquotest   stateR    t   pushbackt   linenot   debugt   tokent	   filestackt   source(   t   selfR   R   R   (    (    s*   /opt/alt/python27/lib64/python2.7/shlex.pyt   __init__   s<    																		c         C   s5   |  j  d k r! d t | ƒ GHn  |  j j | ƒ d S(   s:   Push a token onto the stack popped by the get_token methodi   s   shlex: pushing token N(   R   t   reprR   t
   appendleft(   R!   t   tok(    (    s*   /opt/alt/python27/lib64/python2.7/shlex.pyt
   push_token;   s    c         C   s˜   t  | t ƒ r t | ƒ } n  |  j j |  j |  j |  j f ƒ | |  _ | |  _ d |  _ |  j r” | d k	 r‚ d |  j f GHq” d |  j f GHn  d S(   s9   Push an input source onto the lexer's input source stack.i   s   shlex: pushing to file %ss   shlex: pushing to stream %sN(
   R	   R
   R   R   R$   R   R   R   R   R   (   R!   t	   newstreamt   newfile(    (    s*   /opt/alt/python27/lib64/python2.7/shlex.pyt   push_sourceA   s    "				c         C   s\   |  j  j ƒ  |  j j ƒ  \ |  _ |  _  |  _ |  j rO d |  j  |  j f GHn  d |  _ d S(   s   Pop the input source stack.s   shlex: popping to %s, line %dR   N(   R   t   closeR   t   popleftR   R   R   R   (   R!   (    (    s*   /opt/alt/python27/lib64/python2.7/shlex.pyt
   pop_sourceO   s    !	c         C   s/  |  j  r= |  j  j ƒ  } |  j d k r9 d t | ƒ GHn  | S|  j ƒ  } |  j d k	 r· x\ | |  j k r³ |  j |  j ƒ  ƒ } | r¤ | \ } } |  j | | ƒ n  |  j	 ƒ  } q[ Wn  x9 | |  j
 k rò |  j sÙ |  j
 S|  j ƒ  |  j	 ƒ  } qº W|  j d k r+| |  j
 k r#d t | ƒ GHq+d GHn  | S(   sB   Get a token from the input stream (or from stack if it's nonempty)i   s   shlex: popping token s   shlex: token=s   shlex: token=EOFN(   R   R+   R   R#   t
   read_tokenR    R   t
   sourcehookR)   t	   get_tokenR   R   R,   (   R!   R%   t   rawt   specR(   R'   (    (    s*   /opt/alt/python27/lib64/python2.7/shlex.pyR/   X   s.    		
c         C   s}  t  } d } xt r|  j j d ƒ } | d k rF |  j d |  _ n  |  j d k rx d Gt |  j ƒ Gd Gt | ƒ GHn  |  j d  k r” d |  _	 Pq |  j d k rô| s¶ d  |  _ Pq| |  j
 k rþ |  j d k rÜ d	 GHn  |  j	 sô |  j r | r Pqñq q| |  j k r-|  j j ƒ  |  j d |  _ q|  j rW| |  j k rWd
 } | |  _ q| |  j k r{| |  _	 d
 |  _ q| |  j k r«|  j sŸ| |  _	 n  | |  _ q|  j rÉ| |  _	 d
 |  _ q| |  _	 |  j	 sê|  j r | r Pqq q |  j |  j k rÈt } | s5|  j d k r)d GHn  t d ‚ n  | |  j k rv|  j sj|  j	 | |  _	 d |  _ PqÅd
 |  _ q|  j rµ| |  j k rµ|  j |  j k rµ|  j } | |  _ q|  j	 | |  _	 q |  j |  j k r_| s|  j d k r÷d GHn  t d ‚ n  | |  j k rC| |  j k rC| | k rC|  j	 |  j |  _	 n  |  j	 | |  _	 | |  _ q |  j d
 k r | s�d  |  _ Pq| |  j
 k rÒ|  j d k r§d GHn  d |  _ |  j	 sÈ|  j r | r Pqq q| |  j k r5|  j j ƒ  |  j d |  _ |  j rd |  _ |  j	 s(|  j r | r Pq2q qq|  j rY| |  j k rY| |  _ q|  j rƒ| |  j k rƒd
 } | |  _ q| |  j k sª| |  j k sª|  j r½|  j	 | |  _	 q|  j j | ƒ |  j d k räd GHn  d |  _ |  j	 s|  j r | r Pqq q q W|  j	 } d |  _	 |  j rJ| rJ| d k rJd  } n  |  j d k ry| rqd t | ƒ GHqyd GHn  | S(   NR   i   s   
i   s   shlex: in states   I see character:R   i   s+   shlex: I see whitespace in whitespace statet   as    shlex: I see EOF in quotes states   No closing quotations    shlex: I see EOF in escape states   No escaped characters%   shlex: I see whitespace in word states&   shlex: I see punctuation in word states   shlex: raw token=s   shlex: raw token=EOF(   R   t   TrueR   t   readR   R   R#   R   R   R   R   R   R   t   readlineR   R   R   R   t
   ValueErrorR   R   R$   (   R!   t   quotedt   escapedstatet   nextchart   result(    (    s*   /opt/alt/python27/lib64/python2.7/shlex.pyR-   x   sà    																		
			c         C   s   | d d k r  | d d !} n  t  |  j t ƒ rl t j j | ƒ rl t j j t j j |  j ƒ | ƒ } n  | t | d ƒ f S(   s(   Hook called on a filename to be sourced.i    R   i   iÿÿÿÿt   r(	   R	   R   R
   t   ost   patht   isabst   joint   dirnamet   open(   R!   R(   (    (    s*   /opt/alt/python27/lib64/python2.7/shlex.pyR.   ø   s
    %'c         C   s>   | d k r |  j } n  | d k r0 |  j } n  d | | f S(   s<   Emit a C-compiler-like, Emacs-friendly error-message leader.s   "%s", line %d: N(   R   R   R   (   R!   R   R   (    (    s*   /opt/alt/python27/lib64/python2.7/shlex.pyt   error_leader  s
    c         C   s   |  S(   N(    (   R!   (    (    s*   /opt/alt/python27/lib64/python2.7/shlex.pyt   __iter__	  s    c         C   s(   |  j  ƒ  } | |  j k r$ t ‚ n  | S(   N(   R/   R   t   StopIteration(   R!   R   (    (    s*   /opt/alt/python27/lib64/python2.7/shlex.pyt   next  s    	N(   t   __name__t
   __module__t   __doc__R   R   R"   R&   R)   R,   R/   R-   R.   RB   RC   RE   (    (    (    s*   /opt/alt/python27/lib64/python2.7/shlex.pyR      s   $				 	€			c         C   s7   t  |  d | ƒ} t | _ | s- d | _ n  t | ƒ S(   NR   R   (   R   R3   R   R   t   list(   t   st   commentsR   t   lex(    (    s*   /opt/alt/python27/lib64/python2.7/shlex.pyR     s
    	t   __main__i   s   Token: (    (   RH   t   os.pathR<   R   t   collectionsR    t	   cStringIOR   t   ImportErrort   __all__R   R   R3   R   RF   t   lent   argvt   lexert   fileRA   R/   t   ttR#   (    (    (    s*   /opt/alt/python27/lib64/python2.7/shlex.pyt   <module>   s(   ý