All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Lib.Krakatau.java.ast.pyc Maven / Gradle / Ivy

There is a newer version: 1.1
Show newest version
?
?HRc
@swddlZddlmZddlmZdefd??YZdefd	??YZd
efd??YZdefd
??YZ	defd??YZ
defd??YZdefd??YZej
?Zdefd??YZdefd??YZdefd??YZdefd??YZdefd??YZdefd??YZd efd!??YZd^Zd_Zd)?Zd*?Zd+?ZejejejejejfZ dd,?Z"d-efd.??YZ#d/e#fd0??YZ$d1e#fd2??YZ%d3e#fd4??YZ&d5d6d7d8d9d:d;d<d=d>g
Z'iZ(xGe)e'e*d?d@??D]-\Z+Z,xe+j-?D]Z.e,e(e.dM?e4_?e4ej@d?e4_AdNe#fdO??YZBdPe#fdQ??YZCdRe#fdS??YZDdTe#fdU??YZEdVe#fdW??YZFdXe#fdY??YZGdZe#fd[??YZHd\e#fd]??YZIdS(`i????Ni(tobjtypesi(tescapeStringtVariableDeclaratorcBseZd?Zd?ZRS(cCs||_||_dS(N(ttypenametlocal(tselfRt
identifier((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyt__init__s	cCs"dj|jj?|jj??S(Ns{} {}(tformatRtprint_R(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR	
s(t__name__t
__module__RR	(((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyRs	t
JavaStatementcBs eZdZd?Zd?ZRS(cCsdS(N(((R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyt	getScopesscCs3|jdk	r/|jj|?|jj?ndS(N(texprtNonetaddCastst	addParens(Rtenv((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pytaddCastsAndParenssN(R
RRRR
R(((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyRs	tExpressionStatementcBseZd?Zd?ZRS(cCs
||_dS(N(R(RR((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyRscCs|jj?dS(Nt;(RR	(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR	s(R
RRR	(((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyRs	tLocalDeclarationStatementcBs&eZdd?Zd?Zd?ZRS(cCs||_||_dS(N(tdeclR(RRR((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyRs	cCsB|jdk	r1dj|jj?|jj??S|jj?dS(Ns{} = {};R(RRRRR	(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR	#s"cCs{|jdk	rw|jj|?t||jj|jjj?sgt|jjj|jd|?|_n|jj	?ndS(NtfixEnv(
RRRtisJavaAssignabletdtypeRRttttmakeCastExprR(RR((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR(s
!'N(R
RRRR	R(((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyRs	tReturnStatementcBs)eZddd?Zd?Zd?ZRS(cCs||_||_dS(N(RR(RRR((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR1s	cCs)|jdk	r%dj|jj??SdS(Ns
return {};sreturn;(RRRR	(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR	5scCso|jdk	rk|jj|?t||jj|j?s[t|j|jd|?|_n|jj?ndS(NR(RRRRRRRR(RR((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR7s
!N(R
RRRR	R(((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR0s	tThrowStatementcBseZd?Zd?ZRS(cCs
||_dS(N(R(RR((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR?scCsdj|jj??S(Ns	throw {};(RRR	(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR	As(R
RRR	(((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR>s	t
JumpStatementcBseZd?Zd?ZRS(cCsI|rdnd}|dk	r.d|j?nd}||d|_dS(Ntcontinuetbreakt tR(RtgetLabeltstr(RttargettisFronttkeywordtlabel((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyRDs"cCs|jS(N(R%(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR	Is(R
RRR	(((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyRCs	t
LazyLabelBasecBs2eZd?Zd?Zd?Zd?ZeZRS(cCs)d||_|_||_||_dS(N(RR)tfunctcontinueKeytbreakKey(Rt	labelfunctbeginktendk((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyRTs	cCs(|jdkr!|j?|_n|jS(N(R)RR+(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR$ZscCs|jdkrdS|jdS(NR#s: (R)R(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pytgetLabelPrefix_scCs>t|t?r dt|j?St|?jd t|j?S(NtSbi(t
isinstancetStatementBlockR%tidttypeR
(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyt__str__cs(R
RRR$R1R7t__repr__(((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR*Ms
				tTryStatementcBs#eZd?Zd?Zd?ZRS(cCs3tt|?j|||?|||_|_dS(N(tsuperR9Rttrybtpairs(RR.R/R0R;R<((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyRjscCs|jft|j?dS(Ni(R;tzipR<(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR
nscCsk|jj?}g|jD]*\}}dj|j?|j??^q}dj|j?|dj|??S(Nscatch({})
{}s{}try
{}
{}s
(R;R	R<RR1tjoin(RR;txtytparts((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR	ps:(R
RRR
R	(((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR9is		tIfStatementcBs#eZd?Zd?Zd?ZRS(cCs2tt|?j|||?||_||_dS(N(R:RBRRtscopes(RR.R/R0RRC((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyRvs	cCs|jS(N(RC(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR
|scCs|j?}|jgt|j?}t|j?dkrig|D]}|j?^qA}dj||?Sd}|jd}t|j?dkr?|jd}t|t	?r?|j
dkr?d|}|dtmapRtsorted(tkeys((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyt	printCase?si????iis
s    t{t}s{}switch({}){}(RR	R<RRFRGtpopR>t
splitlinesRR1(
RRRPROtscopetbodiestcontentstlinetindentedtlines((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR	?s	27
#(R
RRR
RLR	(((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyRK?s			tWhileStatementcBs#eZd?Zd?Zd?ZRS(cCsPtt|?j|||?tj|_||_t|j?dksLt?dS(Ni(	R:R[RtLiteraltTRUERRARFtAssertionError(RR.R/R0RA((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR?s	cCs|jS(N(RA(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR
?scCs8|jj?|jdj?f}dj|j?|?S(Nis{}while({})
{}(RR	RARR1(RRA((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR	?s"(R
RRR
R	(((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR[?s		R4cBs>eZed?Zd?Zd?Zd?Zed??ZRS(cCsDtt|?j|||?d|_||_||_||_dS(N(R:R4RRtparentRGtjumpKeyt	labelable(RR.R/R0RGtjumpkRa((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR?s
			cCs|jdkp|j|jkS(N(R`RR-(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pytdoesFallthrough?scCs|fS(N((R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR
?scCs?|js|jdkst?djd?|jD??}g|j?D]}d|^qG}|j?dg|dg}dj|?S(Ns
css|]}|j?VqdS(N(R	(t.0R?((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pys	?ss    RQRR(RaR)RR^R>RGRTR1(RRWRXRYRZ((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR	?s
#cGsug|D]}|dk	r|j^q}|s2dSgt|?D]$}tt|??dkr?|^q?}|ddS(Nii????i(RtbasesR=RFtset(RCtstblistsR?tcommon((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR>?s
(7(	R
RtTrueRRcR
R	tstaticmethodR>(((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR4?s
			tStringStatementcBseZd?Zd?ZRS(cCs
||_dS(N(Rg(RRg((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR?scCs|jS(N(Rg(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR	?s(R
RRR	(((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyRl?s	s.bytes.shorts.chars.ints.longs.floats.doublecCs5|tjkp4|ddkp4|ddjd?S(Niit.(RtNullTTt
startswith(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pytisObject?scCs?|d|d}}||ks9|tkr=|tkr=tS|tkrq|tkrqtj|?tj|?kS|dko?|dkSdS(Nis.bytes.short(t_assignable_sprimst_assignable_lprimsRjtindex(tfromtttoR?R@((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pytisPrimativeAssignable?s$cCs^|dks|dkrtSt|?rMt|?s:t?tj|||?St||?SdS(N(RRjRpR^Rt	isSubtypeRv(RRtRu((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR?scCs?||jkr|St|t?rJ|tjtjfkrJt||j?S|tjkr?|jtjkr?t|tjtj	?S|tjkr?|jtjkr?t
d|tj	ftj?Stt|?|?}|dk	r?|j|?}n|S(Ns!=(RR3R\RtIntTTtBoolTTtvaltTernarytONEtZEROtBinaryInfixtCasttTypeNameRtfix(tnewttRRtret((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR?s'!!tJavaExpressioncBsteZdZdZd?Zd?Zd?Zd?Zd?Zd?Z	d?Z
d?Zd	?Zd
?Z
e
ZRS(icCs(|jr$dtd?|jD??SdS(Nicss|]}|j?VqdS(N(t
complexity(Rdte((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pys	si(tparamstmax(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR?scCs/tj|gg|jD]}|j?^q?S(N(t	itertoolstchainR?tpostFlatIter(RR((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR?scCs,|jjg|jD]}|j?^q?S(N(tfmtRR?R	(RR((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR	scCs@||kr||Sg|jD]}|j|?^q|_|S(N(R?treplaceSubExprs(Rtrdicttparam((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR?s(cCs2x|jD]}|j|?q
W|j|?dS(N(R?RtaddCasts_sub(RRR?((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR scCsdS(N((RR((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR?%scCs>x|jD]}|j?q
Wt|j?|_|j?dS(N(R?RREt
addParens_sub(RR?((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR'scCsdS(N((R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR?-scCs#t|t?o"t|jdt?S(Ni(R3t
AssignmentR?tLocal(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyt
isLocalAssign/scCs(t|?jjd?dd|j?S(NRmi????R"(R6R
t
rpartitionR	(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR81s((R
Rt
precedenceR?R?R?R	R?RR?RR?R?R8R7(((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR?s										tArrayAccesscBs)eZd?Zed??Zd?ZRS(cGsR|djtjkr<td|d?}||df}n||_d|_dS(Nisjava/lang/Objectis{}[{}](sjava/lang/Objecti(RRRnRR?R?(RR?R?((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR6s
	cCs6|jdj\}}|dks(t?||dfS(Nii(R?RR^(Rtbasetdim((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR@scCsE|jd}|jdks+t|t?rAt|?|jd> >>>s< > <= >= instanceofs== !=t&t^t|s&&s||i
iR~cBs,eZdd?Zed??Zd?ZRS(cCsVt|?dkst?||_||_dj|?|_||_t||_dS(Nis{{}} {} {{}}(	RFR^R?topstrRR?t_dtypetbinary_precedencesR?(RR?R?R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyRls			cCs$|jdkr|jdjS|jS(Ni(R?RR?R(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyRtscCs?|j}|dk}xzt|j?D]i\}}|j|krVt|?|j|t|t?rT|jddkrTt|?|jd?s(RRR	R>R?(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR	?scCsmg}xWt|j|j?D]@\}}|j|krOt||d|?}n|j|?qW||_dS(NR(R=R?R?RRtappend(RRt	newparamsRR((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR??s"(R
RRR	R?(((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR??s		tFieldAccesscBseZed?Zd?ZRS(cCsE||_|gt|?|_|_|r1dnd|j|_dS(Ns{}.R#(RRR?tnameR?(RtprimaryR?Rt	printLeft((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR?s	cCs6|jd}|jdkr2t|?|jdeZd?Zd?Zd?Zd?Zd?Zd?ZRS(cCs?||_||_d|_|tjkrDdt|?d|_nG|tjkr?tt	|??|_d|jks?t
?n|tjkr?tt|??|_d|jks?t
?n?|tj
ks?|tjkrt|?tks?t
?t||tj
k?|_n{|tjkr+d|_n`|tjkrXt|?g|_d|_n3|tjkr|rsdnd|_nds?t
?dS(Nt"tLtnulls{}.classttruetfalsei(RRzRR%RtStringTTRRxR?tintR^tLongTTtlongtFloatTTtDoubleTTR6tfloatR?RntClassTTR?R?R?Ry(RtvartypeRz((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR?s,			cCs3|jdkr,|jj|jdj??S|jS(Ni(R%RR?RR?R	(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR	?scCs|j|jfS(N(RRz(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyt_key?scCs.t|?t|?ko-|j?|j?kS(N(R6R?(Rtother((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyt__eq__?scCs.t|?t|?kp-|j?|j?kS(N(R6R?(RR?((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyt__ne__?scCst|j??S(N(thashR?(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyt__hash__?s(R
RRR	R?R?R?R?(((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR\?s					igR?cBseZd?Zd?ZRS(cCs||_d|_||_dS(N(RRR?R+(RR?tnamefunc((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR?s		cCs+|jdkr$|j|?|_n|jS(N(R?RR+(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR	?s(R
RRR	(((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR??s	tMethodInvocationcBs,eZd?Zd?Zd?Zd?ZRS(cCse|dkr||_n|g||_|dk	|_||_t|?|_||_||_dS(N(RR?thasLeftRRR?R?top(RR?R?R?R?R?R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR?s		cCs?|jrS|jd|jd}}dj|j?|jdjd?|D???S|j}dj|jdjd?|D???SdS(Niis	{}.{}({})s, css|]}|j?VqdS(N(R	(RdR?((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pys	
ss{}({})css|]}|j?VqdS(N(R	(RdR?((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pys	
s(R?R?RR	R?R>(RR?R?((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR	s
	/	cCsmg}xWt|j|j?D]@\}}|j|krOt||d|?}n|j|?qW||_dS(NR(R=R?R?RRR?(RRR?RR((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR?s"cCsB|jr>|jd}|jdkr>t|?|jdndS(Ni(R?R?R?R?(RR?((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR?s	
(R
RRR	R?R?(((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR??s			R?cBs eZd?Zed??ZRS(cCs|f|_d|_dS(Ns({})(R?R?(RR?((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyRscCs|jdjS(Ni(R?R(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR"s(R
RRR?R(((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR?s	R{cBs/eZdZd?Zed??Zd?ZRS(icGs||_d|_dS(Ns{} ? {} : {}(R?R?(RR?((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR's	cCs|jdjS(Ni(R?R(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR+scCs?|jdjdks/|jdj?dkrLt|jd?|jdMs(R>R?(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR	Ls(R
RRR	(((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyR?Fs	R?cBs2eZdZdd?Zed??Zd?ZRS(icCs/|g|_||_|d|_||_dS(Ns{}(R?R?R?R?(RR?R?R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyRQs	
cCs$|jdkr|jdjS|jS(Ni(R?RR?R(R((s8/home/alex/projects/github/krakatau/Krakatau/java/ast.pyRWscCs_|jd}|jdksEt|t?r[|jd|jdkr[t|?|jdst		
				$'	%	%"	




© 2015 - 2025 Weber Informatics LLC | Privacy Policy