ACC SHELL

Path : /usr/lib/python/lib2to3/pgen2/
File Upload :
Current File : //usr/lib/python/lib2to3/pgen2/driver.pyo

Ñò
sÄMc@s´dZdZddgZddkZddkZddkZddkZddklZl	Z	l
Z
lZlZde
fd„ƒYZd	„Zd
deedd„Zd„ZdS(
sZParser driver.

This provides a high-level interface to parse a file into a syntax tree.

s#Guido van Rossum <guido@python.org>tDrivertload_grammariÿÿÿÿNi(tgrammartparsettokenttokenizetpgencBsVeZddd„Zed„Zed„Zed„Zded„Zed„Z	RS(cCs<||_|djotiƒ}n||_||_dS(N(RtNonetloggingt	getLoggertloggertconvert(tselfRRR
((s*/usr/lib/python2.6/lib2to3/pgen2/driver.pyt__init__s
	
	cCs'ti|i|iƒ}|iƒd}d}d	}}}}	}
d}xÓ|D]­}|\}}}}	}
|||fjog|\}
}||
jo"|d|
|7}|
}d}n||jo||
||!7}|}qæn|titifjoA||7}|	\}}|i	dƒo|d7}d}qQqQn|t
ijoti|}n|o$|i
idt
i|||ƒn|i||||fƒo |o|i
idƒnPnd}|	\}}|i	dƒo|d7}d}qQqQWtid||||fƒ‚|iS(
s4Parse a series of tokens and return the syntax tree.iius
s%s %r (prefix=%r)sStop.tsincomplete inputN(RtParserRRtsetupRRtCOMMENTtNLtendswithRtOPtopmapR
tdebugttok_nametaddtokent
ParseErrortrootnode(RttokensRtptlinenotcolumnttypetvaluetstarttendt	line_texttprefixt	quintuplets_linenots_column((s*/usr/lib/python2.6/lib2to3/pgen2/driver.pytparse_tokens%sT







	cCs"ti|iƒ}|i||ƒS(s*Parse a stream and return the syntax tree.(Rtgenerate_tokenstreadlineR((RtstreamRR((s*/usr/lib/python2.6/lib2to3/pgen2/driver.pytparse_stream_rawUscCs|i||ƒS(s*Parse a stream and return the syntax tree.(R,(RR+R((s*/usr/lib/python2.6/lib2to3/pgen2/driver.pytparse_streamZscCs;ti|d|ƒ}z|i||ƒSWd|iƒXdS(s(Parse a file and return the syntax tree.trN(tcodecstopenR-tclose(RtfilenametencodingRR+((s*/usr/lib/python2.6/lib2to3/pgen2/driver.pyt
parse_file^scCs(tit|ƒiƒ}|i||ƒS(s*Parse a string and return the syntax tree.(RR)tgenerate_linestnextR((RttextRR((s*/usr/lib/python2.6/lib2to3/pgen2/driver.pytparse_stringfsN(
t__name__t
__module__RR
tFalseR(R,R-R4R8(((s*/usr/lib/python2.6/lib2to3/pgen2/driver.pyRs0ccs7x|itƒD]}|VqWxto	dVq"WdS(s<Generator that behaves like readline without using StringIO.RN(t
splitlinestTrue(R7tline((s*/usr/lib/python2.6/lib2to3/pgen2/driver.pyR5ls	sGrammar.txtc	Cs7|djotiƒ}n|djoZtii|ƒ\}}|djo
d}n||dittt	i
ƒƒd}n|pt||ƒo~|id|ƒt
i|ƒ}|oT|id|ƒy|i|ƒWqtj
o }|idt|ƒƒqXq3ntiƒ}|i|ƒ|S(	s'Load the grammar (maybe from a pickle).s.txtRt.s.pickles!Generating grammar tables from %ssWriting grammar tables to %ssWriting failed:N(RRR	tostpathtsplitexttjointmaptstrtsystversion_infot_newertinfoRtgenerate_grammartdumptIOErrorRtGrammartload(	tgttgptsavetforceR
theadttailtgte((s*/usr/lib/python2.6/lib2to3/pgen2/driver.pyRts&



+$
cCsRtii|ƒptStii|ƒptStii|ƒtii|ƒjS(s0Inquire whether file a was written since file b.(R@RAtexistsR;R=tgetmtime(tatb((s*/usr/lib/python2.6/lib2to3/pgen2/driver.pyRHs
(t__doc__t
__author__t__all__R/R@RRFRRRRRRtobjectRR5RR=R;RRH(((s*/usr/lib/python2.6/lib2to3/pgen2/driver.pyt<module>s(P	

ACC SHELL 2018