Your IP : 3.17.181.181
�
��f! c @ s� d Z d Z d d g Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z m
Z
m Z m Z m
Z
Gd d � d e � Z d d d d d d
d � Z d d � Z d
d � Z e d k r� e j e e � � � n d S( uZ Parser driver.
This provides a high-level interface to parse a file into a syntax tree.
u# Guido van Rossum <guido@python.org>u Driveru load_grammari Ni ( u grammaru parseu tokenu tokenizeu pgenc B st | Ee Z d Z d
d
d d � Z d d d � Z d d d � Z d d d � Z d
d d d
� Z d d d � Z
d
S( u Driverc C s: | | _ | d k r$ t j � } n | | _ | | _ d S( N( u grammaru Noneu loggingu getLoggeru loggeru convert( u selfu grammaru convertu logger( ( u9 /opt/alt/python33/lib64/python3.3/lib2to3/pgen2/driver.pyu __init__ s
u Driver.__init__c C s t j | j | j � } | j � d } d } d } } } } }
d } x�| D]�} | \ } } } } }
| | | f k r� | \ }
} | |
k r� | d |
| 7} |
} d } n | | k r� | |
| | � 7} | } q� n | t j t j f k r9| | 7} | \ } } | j d � rQ | d 7} d } qQ qQ n | t
j k rXt j | } n | r�| j
j d t
j | | | � n | j | | | | f � r�| r�| j
j d � n Pn d } | \ } } | j d � rQ | d 7} d } qQ qQ Wt j d | | | | f � � | j S( u4 Parse a series of tokens and return the syntax tree.i i u u
u %s %r (prefix=%r)u Stop.u incomplete inputN( u parseu Parseru grammaru convertu setupu Noneu tokenizeu COMMENTu NLu endswithu tokenu OPu opmapu loggeru debugu tok_nameu addtokenu
ParseErroru rootnode( u selfu tokensu debugu pu linenou columnu typeu valueu startu endu line_textu prefixu quintupleu s_linenou s_column( ( u9 /opt/alt/python33/lib64/python3.3/lib2to3/pgen2/driver.pyu parse_tokens&