korsygfhrtzangaiide
Elepffwdsff
/
lib64
/
python2.7
/
site-packages
/
mercurial
/
Upload FileeE
HOME
� Hq�Qc @ s6 d d l Z d d l m Z d e f d � � YZ d S( i����N( t _t parserc B sM e Z d d � Z d � Z d � Z d d � Z d � Z d � Z d � Z RS( c C s( | | _ | | _ | | _ d | _ d S( N( t _tokenizert _elementst _methodst Nonet current( t selft tokenizert elementst methods( ( s6 /usr/lib64/python2.7/site-packages/mercurial/parser.pyt __init__ s c C s7 | j } y | j j � | _ Wn t k r2 n X| S( s advance the tokenizer( R t _itert nextt StopIteration( R t t( ( s6 /usr/lib64/python2.7/site-packages/mercurial/parser.pyt _advance s c C sN | j d | k r@ t j t d � | j d | j d � � n | j � d S( s0 make sure the tokenizer matches an end conditioni s unexpected token: %si N( R t errort ParseErrorR R ( R t mt pos( ( s6 /usr/lib64/python2.7/site-packages/mercurial/parser.pyt _match# s i c C s{ | j � \ } } } | j | d } | sK t j t d � | | � � n t | � d k rp | d | f } n� t | � d k r� | d | j d k r� | j | d | � | d d f } nF | d | j | d � f } t | � d k r| j | d | � n xn| | j | j d d k rv| j � \ } } } | j | } t | � d k r�| j | j d d r�| d } | d | f } q t | � d k s�| d r�t j t d � | | � � n | d } t | � d k r*| d | j d k r*| j | d | � | d | d f } q | d | | j | d � f } t | � d k r | j | d | � q q W| S( Ni s not a prefix: %si i i i s not an infix: %s( R R R R R t lenR R R t _parse( R t bindt tokent valueR t prefixt exprt et suffixt infix( ( s6 /usr/lib64/python2.7/site-packages/mercurial/parser.pyR ) s8 )! + ) c C sD | j | � | _ | j � | j � } | j \ } } } | | f S( s$ generate a parse tree from a message( R R R R R ( R t messaget resR R R ( ( s6 /usr/lib64/python2.7/site-packages/mercurial/parser.pyt parseN s c C sH t | t � s | S| j | d g | d D] } | j | � ^ q, � S( s4 recursively evaluate a parse tree using node methodsi i ( t isinstancet tupleR t eval( R t treeR ( ( s6 /usr/lib64/python2.7/site-packages/mercurial/parser.pyR% U s c C s) | j | � } | j r% | j | � S| S( s? parse a message into a parse tree and evaluate if methods given( R"