/[theodore]/bunnyblog/modules/yaml/emitter.pyc


UCC Code Repository

Contents of /bunnyblog/modules/yaml/emitter.pyc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations) (download) (as text)
Tue Jan 29 14:32:01 2008 UTC (12 years ago) by svn-admin
File MIME type: application/octet-stream
File size: 30128 byte(s)
Re-import of repository after repository database corruption.

1 m
2 Dc@soddgZdklZdkTdkZdefdYZdefdYZdefdYZdS( tEmittert EmitterError(s YAMLError(t*NcBstZRS(N(t__name__t
3 __module__(((t./modules/yaml/emitter.pyRstScalarAnalysiscBstZdZRS(Nc CsL||_||_||_||_||_||_||_||_dS(N( tscalartselftemptyt multilinetallow_flow_plaintallow_block_plaintallow_single_quotedtallow_double_quotedt allow_block( RRR R
4 R R R RR((Rt__init__s       (RRR(((RRscBstZhdd<dd<ZddddddZdZdZdZeedZ d Z
5 d
6 Z d Z ed Z d ZdZeeeedZdZdZdZdZdZdZdZdZdZdZdZdZedZdZdZedZ d Z!d!Z"d"Z#d#Z$d$Z%d%Z&d&Z'd'Z(d(Z)d)Z*d*Z+d+Z,d,Z-d-Z.d.Z/d/Z0d0Z1d1Z2d2Z3eed3Z4d4Z5dd5Z6d6Z7d7Z8e9d8Z:hd9d:<d;d<<d=d><d?d@<dAdB<dCdD<dEdF<dGdH<dIdJ<dKdK<dLdL<dMdN<dOdP<dQdR<dSdT<Z;e9dUZ<dVZ=dWZ>dXZ?e9dYZ@RS(ZNu!utag:yaml.org,2002:u!!cCsw||_d|_g|_|i|_g|_d|_g|_ d|_
7 d|_ t |_ t |_t |_t |_d|_d|_t|_t|_||_||_d|_|o+d|jo
8 djno ||_nd|_|o!||idjo ||_nd|_|dddgjo ||_nd|_d|_d|_d|_ d|_!dS( Niiii
9 iPu
10 u u
11 ("tstreamRtNonetencodingtstatestexpect_stream_starttstateteventsteventtindentstindentt
12 flow_leveltFalset root_contexttsequence_contexttmapping_contexttsimple_key_contexttlinetcolumntTruet
13 whitespacet indentiont canonicalt allow_unicodet best_indentt
14 best_widthtwidthtbest_line_breakt
15 line_breakt tag_prefixestprepared_anchort prepared_tagtanalysiststyle(RRR&RR*R'R,((RR(sB                    %         cCsQ|ii|x:|ip,|iid|_|id|_qWdS(Ni(RRtappendRtneed_more_eventstpopRR(RR((Rtemitis  
16 cCs|iptSn|id}t|to|idSnGt|to|idSn&t|to|idSnt SdS(Niiii(
17 RRR#Rt
18 isinstancetDocumentStartEventt need_eventstSequenceStartEventtMappingStartEventR(RR((RR3rs
19  cCsd}x|idD]}}t|ttfo|d7}n?t|ttfo|d8}nt|t o
20 d}n|djot
21 SqqWt |i|djS(Niii( tlevelRRRR6R7tCollectionStartEventtDocumentEndEventtCollectionEndEventtStreamEndEventRtlentcount(RRAR;R((RR8s
22   cCsh|ii|i|idjo$|o|i|_qdd|_n|p|i|i7_ndS(Ni(RRR2RRtflowR(t
23 indentless(RRBRC((Rtincrease_indents cCsdt|ito:|iio|ii|_n|i|i|_ntd|idS(Ns%expected StreamStartEvent, but got %s( R6RRtStreamStartEventRtwrite_stream_starttexpect_first_document_startRR(R((RRs  
24 cCstd|idS(Nsexpected nothing, but got %s(RRR(R((Rtexpect_nothingscCs|idtS(Ntfirst(Rtexpect_document_startR#(R((RRGsc Cst|itod|iio&|i|ii}|i|n|ii |_
25 |ii o||ii i }|ix]|D]Q}|ii |}||i
26 |<|i|}|i|}|i||qWn|o@|ii o2|i o'|ii o|ii o |i }|p6|i|idt|io|iqgn|i|_nAt|it o|i!|i"|_nt#d|idS(Nu---s'expected DocumentStartEvent, but got %s($R6RRR7tversiontprepare_versiont version_texttwrite_version_directivetDEFAULT_TAG_PREFIXEStcopyR-ttagstkeysthandlestsortthandletprefixtprepare_tag_handlet handle_texttprepare_tag_prefixt prefix_texttwrite_tag_directiveRItexplicitR&tcheck_empty_documenttimplicitt write_indenttwrite_indicatorR#texpect_document_rootRR?twrite_stream_endRHR( RRIRVRURMRXRSRZR^((RRJs4  
27  I
28 
29 
30 cCsyt|itoO|i|iio|idt|in|i|i |_
31 nt d|idS(Nu...s%expected DocumentEndEvent, but got %s( R6RRR=R_R\R`R#t flush_streamRJRR(R((Rtexpect_document_ends
32  
33 cCs'|ii|i|idtdS(Ntroot(RRR2Rdt expect_nodeR#(R((RRascCsk||_||_||_||_t |i
34 t o|i n#t |i
35 t tfo|id|it |i
36 t o|iqgt |i
37 toJ|ip$|ip|i
38 ip |io|iqP|iqgt |i
39 toJ|ip$|ip|i
40 ip |io|iqP|iqgntd|i
41 dS(Nu&sexpected NodeEvent, but got %s(ReRRtsequenceRtmappingRt
42 simple_keyR R6Rt
43 AliasEventt expect_aliast ScalarEventR<tprocess_anchort process_tagt expect_scalarR9RR&t
44 flow_styletcheck_empty_sequencetexpect_flow_sequencetexpect_block_sequenceR:tcheck_empty_mappingtexpect_flow_mappingtexpect_block_mappingR(RReRgRhRi((RRfs(     
45 ..cCsF|iidjotdn|id|ii|_dS(Ns!anchor is not specified for aliasu*( RRtanchorRRRmRR4R(R((RRks cCsB|idt|i|ii|_|ii|_dS(NRB( RRDR#tprocess_scalarRR4RRR(R((RRos
46 cCsE|idtdt|id7_|idt|i|_dS(Nu[R$iRB(RR`R#RRDtexpect_first_flow_sequence_itemR(R((RRrscCst|itoG|ii|_|id8_|idt |i
47 i|_ nO|i p|i |ijo|in|i
48 i|i|idtdS(Niu]Rg(R6RRtSequenceEndEventRR4RRR`RRRR&R"R)R_R2texpect_flow_sequence_itemRfR#(R((RRy scCst|itoo|ii|_|id8_|io|i dt
49 |i n|i dt
50 |i i|_ n_|i dt
51 |ip|i|ijo|i n|i i|i|idtdS(Niu,u]Rg(R6RRRzRR4RRR&R`RR_RRR"R)R2R{RfR#(R((RR{s
52 cCsE|idtdt|id7_|idt|i|_dS(Nu{R$iRB(RR`R#RRDtexpect_first_flow_mapping_keyR(R((RRu+scCst|itoG|ii|_|id8_|idt |i
53 i|_ n|i p|i |ijo|in|i o:|io-|i
54 i|i|idtdtn4|idt|i
55 i|i|idtdS(Niu}RhRiu?(R6RRtMappingEndEventRR4RRR`RRRR&R"R)R_tcheck_simple_keyR2t expect_flow_mapping_simple_valueRfR#texpect_flow_mapping_value(R((RR|1scCs9t|itoo|ii|_|id8_|io|i dt
56 |i n|i dt
57 |i i|_ n|i dt
58 |ip|i|ijo|i n|i o:|io-|i i|i|idtdtn4|i dt|i i|i|idtdS(Niu,u}RhRiu?(R6RRR}RR4RRR&R`RR_RRR"R)R~R2RRfR#R(R((Rtexpect_flow_mapping_keyBs"
59 cCs7|idt|ii|i|idtdS(Nu:Rh(RR`RRR2RRfR#(R((RRWscCsb|ip|i|ijo|in|idt|ii|i |i
60 dtdS(Nu:Rh( RR&R"R)R_R`R#RR2RRf(R((RR\s
61 cCs:|io|i }|idtd||i|_dS(NRBRC(RRR%RCRDRt expect_first_block_sequence_itemR(RRC((RRsescCs|idtS(NRI(Rtexpect_block_sequence_itemR#(R((RRjscCs| o;t|ito(|ii|_|ii|_ nD|i
62 |i dt dt |ii |i|idt dS(Nu-R%Rg(RIR6RRRzRR4RRRR_R`R#R2RRf(RRI((RRms
63 cCs |idt|i|_dS(NRB(RRDRtexpect_first_block_mapping_keyR(R((RRvyscCs|idtS(NRI(Rtexpect_block_mapping_keyR#(R((RR}scCs| o;t|ito(|ii|_|ii|_ n~|i
64 |i o-|ii |i |idtdtn:|idtdt|ii |i|idtdS(NRhRiu?R%(RIR6RRR}RR4RRRR_R~R2t!expect_block_mapping_simple_valueRfR#R`texpect_block_mapping_value(RRI((RRs
65  cCs7|idt|ii|i|idtdS(Nu:Rh(RR`RRR2RRfR#(R((RRscCsG|i|idtdt|ii|i|idtdS(Nu:R%Rh(RR_R`R#RR2RRf(R((RRs
66 cCs1t|ito|iot|idtS(Ni(R6RRR9RRz(R((RRqscCs1t|ito|iot|idtS(Ni(R6RRR:RR}(R((RRtscCs{t|it p |i otSn|id}t|to7|idjo'|i djo|i
67 o |i djS(Niu( R6RRR7RRRlRwRttagR^tvalue(RR((RR]s cCsd}t|itoV|iidj oC|idjo|i|ii|_n|t |i7}nt|it
68 t foV|ii dj oC|i djo|i|ii |_ n|t |i 7}nt|it
69 oF|idjo|i|ii|_n|t |ii7}n|djoYt|itpFt|it
70 o|ii o|ii p|ip
71 |iS(Nii(tlengthR6RRt NodeEventRwRR.tprepare_anchorR@RlR<RR/t prepare_tagR0tanalyze_scalarRRRjR R
72 RqRt(RR((RR~s&,cCs|iidjod|_dSn|idjo|i|ii|_n|io|i||itnd|_dS(N( RRRwRR.RR`t indicatorR#(RR((RRms 
73 cCs|ii}t|ito|idjo|i|_n|i p |djoS|idjo|ii dp!|idjo"|ii dod|_
74 dSn|ii do |djod}d|_
75 qn7|i p |djo|ii od|_
76 dSn|djot dn|i
77 djo|i ||_
78 n|i
79 o|i |i
80 tnd|_
81 dS(Ntiiu!stag is not specified(RRRR6RlR1Rtchoose_scalar_styleR&R^R/RRR`R#(RR((RRns( Z %  
82 cCs{|idjo|i|ii|_n|iidjp
83 |iodSn|ii oq|iido`|i o|ii
84 p
85 |ii o7|i o |ii p|i o|iiodSqn|iioH|iidjo5|i o&|i o|iio|iiSq%n|ii p|iidjo1|iio |i o
86 |ii odSqwndS(Nt"iRs|>s'(RR0RRRRR1R&R^R R R
87 RR R RR (R((RRsT  #!% cCs'|idjo|i|ii|_n|idjo|i|_n|i }|idjo|i
88 |ii |n|idjo|i |ii |ne|idjo|i |ii n>|idjo|i|ii n|i|ii |d|_d|_dS(NRs't>t|(RR0RRRRR1RR tsplittwrite_double_quotedRtwrite_single_quotedt write_foldedt write_literalt write_plain(RR((RRxs 
89  cCsA|\}}|djotd||fnd||fS(Nisunsupported YAML version: %d.%du%d.%d(RKtmajortminorR(RRKRR((RRLs  cCs|ptdn|ddjp|ddjotd|idnx|dd!D]}d|jo
90 d jnpFd
91 |jo
92 d jnp(d |jo
93 d jnp
94 |djp,td|id|idfqdqdW|S(Nstag handle must not be emptyiu!is*tag handle must start and end with '!': %rsutf-8iu0u9uAtZuatzu-_s*invalid character %r in the tag handle: %r(RURtencodetch(RRUR((RRWs"g0cCsx|ptdng}d}}|ddjo
95 d}nx|t|jo||}d|jo
96 djnpId|jo
97 djnp+d |jo
98 d
99 jnp |d jo|d7}qE||jo|i|||!n|d}}|id }x%|D]}|id t
100 |q WqEW||jo|i|||!ndi |S(Nstag prefix must not be emptyiu!iu0u9uARuaRu-;/?!:@&=+$,_.~*'()[]sutf-8u%%%02Xu( RVRtchunkststarttendR@RR2Rtdatatordtjoin(RRVRRRRR((RRY#s*
101 
102 
103 g   c Cs*|ptdn|djo|Snd}|}xh|iD]]}|i|oG|djpt |t |jo!|i|}|t |}qBqBWg}d}} x| t |jo|| }d|jo
104 djnpcd|jo
105 djnpEd|jo
106 d jnp'|d
107 jp|djo|djo| d 7} q|| jo|i||| !n| d }} |id }
108 x%|
109 D]}|id t|qWqW|| jo|i||| !ndi|}|od||fSn d|SdS(Nstag must not be emptyu!iu0u9uARuaRu-;/?:@&=+$,_.~*'()[]isutf-8u%%%02Xuu%s%su!<%s>(RRRRUtsuffixRR-RVt
110 startswithR@RRRRR2RRRRt suffix_text( RRRRURRRRVRRR((RR:s> 
111 6 
112 
113    cCs|ptdnx|D]}d|jo
114 djnpFd|jo
115 djnp(d|jo
116 djnp
117 |djp,td |id
118 |id
119 fqqW|S( Nsanchor must not be emptyu0u9uARuaRu-_s&invalid character %r in the anchor: %rsutf-8(RwRRR(RRwR((RR]sg0cCs|p;td|dtdtdtdtdtdtdtSnt}t} t}t}t}t}
120 t}t}t}t}t}t}|id p|id
121 ot}t} nt}t|d jp|d d j}t}t}t}t} d }x|t|jo||}|d jom|djot} t}n|djot} |o
122 t}qsn|djo|ot} t}qnd|djo
123 t} n|djot} |o
124 t}qn|djo|ot} t}n|djo
125 t}n|djpd|jo
126 djnp~|djp<d|jo
127 djnpd|jo
128 djno+|djot}|ip
129 t}qqt}n|djo|o"|o|djo
130 t}qgq|o!|djot}t}qgq|o|djo
131 t}qgq|d j} |djo
132 t}qt}n|p|o| o>|o|o
133 t}q |o
134 t}q |o
135 t}q nL|o
136 t}n;|o|o
137 t}n#|o
138 t}n|o
139 t}
140 nt}}}} n|p|o|t|d jor|o|o
141 t}nE|ot}| o
142 t}qn#|ot}| o
143 t}qnt}}}} n|d 7}|d j}|d t|jp||d d j}qWt}t} t}t} t}|p|p|ot}} }n|ot}} n|ot}} }n|p|ot}} }}n|ot}} n| o
144 t}n|o
145 t} ntd|dtd|d|d| d|d| d|S(NRR R
146 R R R RRu---u...iu
147 …

iu#,[]{}&*!|>'"%@`u?:u-u,?[]{}u:u#u
148 …

u
149 u u~u…u u퟿uu�uu
150
151 …

("RRR#Rtblock_indicatorstflow_indicatorst line_breakstspecial_characterst inline_spacest inline_breakstleading_spacestleading_breaksttrailing_spacesttrailing_breakstinline_breaks_spacestmixed_breaks_spacesRtpreceeded_by_spaceR@tfollowed_by_spacetspacestbreakstmixedtleadingtindexRtunicode_charactersRR'R R R RR(RRRR R RRRRRRR RRRRRRRRRRRRRRRR((RRgs   
152 #
153   
154   
155  
156  
157 +V
158 
159       
160 
161 
162 
163 
164 
165 
166 
167 %
168 
169  0
170 
171   cCs(t|ido|iindS(Ntflush(thasattrRRR(R((RRc4scCsA|io3|iido |iidi|indS(Nsutf-16uÿþ(RRRRtwriteR(R((RRF8scCs|idS(N(RRc(R((RRb=scCs|ip| o
172 |}n d|}||_|io||_|it|7_|io|i |i}n|i
173 i |dS(Nu ( RR$tneed_whitespaceRRR%R"R@RRRR(RRRR$R%R((RR`@s
174 
175  
176 cCs|ipd}|i p+|i|jp|i|jo|i o|in|i|joWt|_d||i}||_|io|i |i}n|i
177 i |ndS(Niu ( RRR%R"R$twrite_line_breakR#RRRRR(RRR((RR_Ms6  
178 cCsx|djo |i}nt|_t|_|id7_d|_|i o|i
179 |i }n|i i |dS(Nii( RRRR+R#R$R%R!R"RRRR(RR((RRZs     
180 cCsHd|}|io|i|i}n|ii||idS(Nu %%YAML %s(RMRRRRRRR(RRMR((RRNes
181 
182 
183 cCsNd||f}|io|i|i}n|ii||idS(Nu %%TAG %s %s( RXRZRRRRRRR(RRXRZR((RR[ls
184 
185 c
186 Cs|idtt}t} d}}x|t|jod}|t|jo||}n|o|djp |djo|d|joH|i |i jo5|o.|djo!|t|jo|inS|||!}|i t|7_ |io|i|i}n|ii||}qin-| o|djp |djos||djo|inx=|||!D].}|djo|iq|i|qW|i|}qin|djp|djp |djom||jo\|||!}|i t|7_ |io|i|i}n|ii||}qin|djoSd}|i d 7_ |io|i|i}n|ii||d}n|dj o|dj}|dj} n|d7}q)W|idtdS(
187 Nu'iu iu
188 …

u
189 u
190
191 …

u''i(RR`R#RRRRRR@ttextRRR"R)RR_RRRRRRtbr(
192 RRRRRRRRRR((RRusd
193 K 
194  
195 '  
196  
197   uu0uuauubu utu
198 unu uvu ufu uruueu"u\u…uNu u_u
uLu
uPcCs|idtd}}x]|t|joId}|t|jo||}n|djpr|djped|jo
199 djnpC|i o9d|jo
200 djnpd|jo
201 d jn oD||jo\|||!}|i t|7_ |i o|i |i }n|ii||}n|dj o||ijod
202 |i|}nS|d jod t|}n2|d jodt|}ndt|}|i t|7_ |i o|i |i }n|ii||d}qnd|jot|djno)|djp ||jo|i |||ijo|o|||!d
203 }||jo
204 |}n|i t|7_ |i o|i |i }n|ii||it|_t|_||djoOd
205 }|i t|7_ |i o|i |i }n|ii|qkn|d7}qW|idtdS(Nu"iu "\…

u u~u u퟿uu�u\uÿu\x%02Xu￿u\u%04Xu\U%08Xi(RR`R#RRR@RRRR'RR"RRRRtESCAPE_REPLACEMENTSRR)RR_RR$R%(RRRRRRR((RRs^
206   
207 
208    
209 d 
210 
211 
212   
213 cCsi|d}x"t|djod|}q W|ddjo!|ddjodSqedSndSdS( Niiu iu
214 …

u+uu-(RttailR@(RRR((Rtdetermine_chomps
215 c Cs|i|}|id|t|it}t}t}
216 d}} xk| t |joWd}| t |jo|| }n|
217 o|djp |djo| o9|dj o,|djo||djo|in|dj}x=||| !D].}|djo|iq|i|qW|dj o|in| }qn#|o|djo|d| jo!|i|ijo|inS||| !}|it |7_|io|i|i}n|ii|| }qn}|djp |djob||| !}|io|i|i}n|ii||djo|in| }n|dj o|dj}
218 |dj}n| d7} qLWdS(Nu>iu
219 …

u u
220 iu
221
222 …

(RRRtchompR`R#R_Rt leading_spaceRRRRR@RRRRR"R)RRRRR( RRRRRRRRRRR((RRs^
223 
224 3    $ 
225  
226  
227   c Cs|i|}|id|t|it}d}}xl|t |joXd}|t |jo||}n|o|djp |djoex=|||!D].}|djo|iq|i|qW|dj o|in|}qn}|djp |djob|||!}|io|i|i}n|ii||djo|in|}n|dj o|dj}n|d7}q@WdS(Nu|iu
228 …

u
229 i(RRRRR`R#R_RRRRR@RRRRRRRRR( RRRRRRRRR((RR2s>
230 
231    
232  
233  c
234 Cs|pdSn|ipOd}|it|7_|io|i|i}n|ii |nt
235 |_ t
236 |_ t
237 }t
238 } d}}xD|t|jo0d}|t|jo||}n|o|djo|d|jo:|i|ijo'|o |it
239 |_ t
240 |_ nS|||!}|it|7_|io|i|i}n|ii ||}qn| o|djo||djo|inx=|||!D].}|djo|iq|i|qW|it
241 |_t
242 |_ |}qnw|djp |djo\|||!}|it|7_|io|i|i}n|ii ||}n|dj o|dj}|dj} n|d7}qWdS(Nu iiu
243 …

u
244 u
245
246 …

(RRR$RR"R@RRRRRt
247 writespaceR%RRRRRRR)RR_RR(
248 RRRRRRRRRR((RRSsl
249 
250   
251  +
252    
253   
254    
255 
256   (ARRRORRR5R3R8RRDRRHRGRJRdRaRfRkRoRrRyR{RuR|RRRRsRRRvRRRRRqRtR]R~RmRnRRxRLRWRYRRRRcRFRbR`R_RRNR[R#RRRRRRR(((RR!sxA 
257                       
258      #
259     6 6 3 !( t__all__terrort YAMLErrorRtreRtobjectRR(RRRRRR((Rt? s   

Properties

Name Value
svn:mime-type application/octet-stream

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26