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 : 172.67.192.52 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 / lib2to3 / pgen2 /
Filename/usr/lib64/python2.6/lib2to3/pgen2/driver.pyo
Size4.93 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 16:37
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
 
 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
i joti |}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(RtParserRR tsetupRRtCOMMENTtNLtendswithRtOPtopmapR
tdebugttok_nametaddtokent
ParseErrortrootnode(R ttokensRtptlinenotcolumnttypetvaluetstarttendt line_texttprefixt quintuplets_linenots_column((s,/usr/lib64/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/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-R4R8(((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(R7tline((s,/usr/lib64/python2.6/lib2to3/pgen2/driver.pyR5ls  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.(R@RAtexistsR;R=tgetmtime(tatb((s,/usr/lib64/python2.6/lib2to3/pgen2/driver.pyRH�s
(t__doc__t
__author__t__all__R/R@RRFRRRRRRtobjectRR5RR=R;RRH(((s,/usr/lib64/python2.6/lib2to3/pgen2/driver.pyt<module> s     (P