AlkantarClanX12
Current Path : /opt/alt/python35/lib64/python3.5/lib2to3/pgen2/__pycache__/ |
Current File : //opt/alt/python35/lib64/python3.5/lib2to3/pgen2/__pycache__/driver.cpython-35.opt-2.pyc |
���]Y � @ s� 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 � Z d d d d d d d � Z d d � Z d d � Z e d k r� e j e e � � � d S)z#Guido van Rossum <guido@python.org>�Driver�load_grammar� N� )�grammar�parse�token�tokenize�pgenc @ sp e 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)r Nc C s7 | | _ | d k r! t j � } | | _ | | _ d S)N)r �logging� getLogger�logger�convert)�selfr r r � r �+/opt/alt/python35/lib64/python3.5/driver.py�__init__ s zDriver.__init__Fc C s� t j | j | j � } | j � d } d } d } } } } } d } x�| D]~} | \ } } } } } | | | f k r� | \ } } | | k r� | d | | 7} | } d } | | k r� | | | | � 7} | } | t j t j f k r*| | 7} | \ } } | j d � rQ | d 7} d } qQ | t j k rFt j | } | rl| j j d t j | | | � | j | | | | f � r�| r�| j j d � Pd } | \ } } | j d � rQ | d 7} d } qQ Wt j d | | | | f � � | j S)Nr r � � z%s %r (prefix=%r)zStop.zincomplete input)r ZParserr r Zsetupr �COMMENT�NL�endswithr �OPZopmapr �debug�tok_nameZaddtokenZ ParseError�rootnode)r �tokensr �p�lineno�column�type�value�start�endZ line_text�prefixZ quintupleZs_linenoZs_columnr r r �parse_tokens&