b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 104.21.65.202 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 / lib2to3 / pgen2 /
Filename/usr/lib64/python2.6/lib2to3/pgen2/driver.pyc
Size4.99 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed20-Jun-2019 19:45
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc @s´dZdZddgZddkZddkZddkZddkZddklZl Z l
Z
l Z l 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 <[email protected]>tDrivert load_grammariÿÿÿÿNi(tgrammartparsettokenttokenizetpgencBsVeZddd�Zed�Zed�Zed�Zded�Zed�Z RS(cCs<||_|djoti�}n||_||_dS(N(RtNonetloggingt getLoggertloggertconvert(tselfRR R
((s,/usr/lib64/python2.6/lib2to3/pgen2/driver.pyt__init__s
 
 cCsPti|i|i�}|i�d}d}d }}}} }
d} xü|D]Ö} | \}}}} }
|||fjo�||f|jpt||f|f�|\}
}||
jo"| d|
|7} |
}d}n||jo| |
||!7} |}qn|titi fjoA| |7} | \}}|i
d�o|d7}d}qQqQn|t i joti
|}n|o$|iidt i||| �n|i||| |f�o |o|iid�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(RtParserRR tsetupRtAssertionErrorRtCOMMENTtNLtendswithRtOPtopmapR
tdebugttok_nametaddtokent
ParseErrortrootnode(R ttokensRtptlinenotcolumnttypetvaluetstarttendt line_texttprefixt quintuplets_linenots_column((s,/usr/lib64/python2.6/lib2to3/pgen2/driver.pyt parse_tokens%sV
) 



 

  
 cCs"ti|i�}|i||�S(s*Parse a stream and return the syntax tree.(Rtgenerate_tokenstreadlineR)(R tstreamRR((s,/usr/lib64/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/lib64/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/lib64/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/lib64/python2.6/lib2to3/pgen2/driver.pyt parse_stringfsN(
t__name__t
__module__RR
tFalseR)R-R.R5R9(((s,/usr/lib64/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(R8tline((s,/usr/lib64/python2.6/lib2to3/pgen2/driver.pyR6ls  s Grammar.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/lib64/python2.6/lib2to3/pgen2/driver.pyRts&



+$ 
cCsRtii|�ptStii|�ptStii|�tii|�jS(s0Inquire whether file a was written since file b.(RARBtexistsR<R>tgetmtime(tatb((s,/usr/lib64/python2.6/lib2to3/pgen2/driver.pyRI�s
(t__doc__t
__author__t__all__R0RARRGRRRRRRtobjectRR6RR>R<RRI(((s,/usr/lib64/python2.6/lib2to3/pgen2/driver.pyt<module> s     (P