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 /
Filename/usr/lib64/python2.6/lib2to3/patcomp.pyo
Size6.26 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 09:46
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc@sdZdZddkZddklZlZlZlZlZl Z ddk
l Z ddk
l Z ei
iei
ie�d�Zd efd
��YZd �Zd efd
��YZheid6eid6eid6dd6Zd�Zd�Zd�ZdS(s�Pattern compiler.

The grammer is taken from PatternGrammar.txt.

The compiler compiles a pattern to a pytree.*Pattern instance.
s#Guido van Rossum <[email protected]>iÿÿÿÿNi(tdrivertliteralsttokenttokenizetparsetgrammar(tpytree(tpygramsPatternGrammar.txttPatternSyntaxErrorcBseZRS((t__name__t
__module__(((s'/usr/lib64/python2.6/lib2to3/patcomp.pyRsc csyttititif�}titi|�i �}x9|D]1}|\}}}}}||jo |Vq@q@WdS(s6Tokenizes a string suppressing significant whitespace.N(
tsetRtNEWLINEtINDENTtDEDENTRtgenerate_tokensRtgenerate_linestnext( tinputtskipttokenst quintuplettypetvaluetstarttendt line_text((s'/usr/lib64/python2.6/lib2to3/patcomp.pyttokenize_wrapper s
tPatternCompilercBs>eZed�Zed�Zd�Zdd�Zd�Z RS(cCs^ti|�|_ti|i�|_ti|_ti|_ ti
|idt �|_dS(s^Initializer.

Takes an optional alternative filename for the pattern grammar.
tconvertN( Rt load_grammarRRtSymbolstsymstpython_grammart pygrammartpython_symbolstpysymstDrivertpattern_convert(tselft grammar_file((s'/usr/lib64/python2.6/lib2to3/patcomp.pyt__init__,s
  cCsbt|�}y|ii|d|�}Wn*tij
o}tt|���nX|i|�S(s=Compiles a pattern string to a nested pytree.*Pattern object.tdebug(RRt parse_tokensRt
ParseErrorRtstrt compile_node(R'RR*Rtrootte((s'/usr/lib64/python2.6/lib2to3/patcomp.pytcompile_pattern7s  cCs�|i|iijo|id}n|i|iijo�g}|iddd�D]}||i|�qX~}t|�djo |dStig}|D]}||gq¤~dddd�}|i �S|i|ii
jorg}|iD]}||i|�qû~} t| �djo | dSti| gdddd�}|i �S|i|ii jo0|i |id�}
ti
|
�}|i �Sd} |i} t| �djo2| ditijo| di} | d} nd}
t| �djo2| di|iijo| d}
| d } n|i | |
�}
|
dj o|
i}|d}|itijod}ti}n|itijod}ti}nY|itijoE|i|d�}}t|�d jo|i|d�}qn|djp
|djo1|
i �}
ti|
ggd|d|�}
qin| dj o
| |
_n|
i �S(
sXCompiles a node, recursively.

This is one big switch on the node type.
iNiitmintmaxiiÿÿÿÿi(RR tMatchertchildrent AlternativesR.tlenRtWildcardPatterntoptimizet Alternativet NegatedUnitt
compile_basictNegatedPatterntNoneRtEQUALRtRepeatertSTARtHUGEtPLUStLBRACEtget_inttname(R'tnodet_[1]tchtaltst_[2]tatpt_[3]tunitstpatternRFtnodestrepeatR5tchildR2R3((s'/usr/lib64/python2.6/lib2to3/patcomp.pyR.@s^: 9 -    *
-

 


 )

cCsÓ|d}|itijo/tti|i��}tit |�|�S|iti
jo |i}|i �oN|t jot
d|��n|dot
d��ntit |�S|djo
d}nK|id�p:t|i|d�}|djot
d|��q$n|do!|i|did�g}nd}ti||�Snf|idjo|i|d�S|id jo3|i|d�}ti|ggd
dd d�SdS( NisInvalid token: %risCan't have details for tokentanyt_sInvalid symbol: %rt(t[R2R3(RRtSTRINGtunicodeRt
evalStringRRt LeafPatternt_type_of_literaltNAMEtisuppert TOKEN_MAPRR>t
startswithtgetattrR$R.R5t NodePatternR8(R'RQRRRGRRtcontentt
subpattern((s'/usr/lib64/python2.6/lib2to3/patcomp.pyR<�s8
 

 


 ! cCs
t|i�S(N(tintR(R'RG((s'/usr/lib64/python2.6/lib2to3/patcomp.pyREªsN(
R R
t_PATTERN_GRAMMAR_FILER)tFalseR1R.R>R<RE(((s'/usr/lib64/python2.6/lib2to3/patcomp.pyR*s
 G #R]RXtNUMBERtTOKENcCs=|di�otiS|tijo ti|SdSdS(Ni(tisalphaRR]RtopmapR>(R((s'/usr/lib64/python2.6/lib2to3/patcomp.pyR\¶s
 cCsZ|\}}}}|p||ijoti||d|�Sti||d|�SdS(s9Converts raw node information to a Node or Leaf instance.tcontextN(t
number2symbolRtNodetLeaf(Rt
raw_node_infoRRRlR5((s'/usr/lib64/python2.6/lib2to3/patcomp.pyR&¿scCst�i|�S(N(RR1(RP((s'/usr/lib64/python2.6/lib2to3/patcomp.pyR1Ès(t__doc__t
__author__tostpgen2RRRRRRtRRtpathtjointdirnamet__file__Rft ExceptionRRtobjectRR]RXRhR>R_R\R&R1(((s'/usr/lib64/python2.6/lib2to3/patcomp.pyt<module> s" . 
�