Changeset 2900 for proto/PDF/cb_pablo.py
 Timestamp:
 Feb 5, 2013, 2:48:38 PM (7 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

proto/PDF/cb_pablo.py
r2899 r2900 275 275 hexString_ends = pablo.ScanThru(pablo.Advance(hexString_starts),lex.Hexlex.WS) 276 276 #error = hexString_ends &~ lex.RAngle 277 out_Callouts.hexString_mask = pablo. InclusiveSpan(hexString_starts,hexString_ends)277 out_Callouts.hexString_mask = pablo.ExclusiveSpan(hexString_starts,hexString_ends) 278 278 marker.hex_opener = hexString_starts 279 279 … … 291 291 292 292 293 def Prepare_content_buffer(basis_bits, lex, escape_Callouts, out_Callouts):293 def Prepare_content_buffer(basis_bits, lex, marker, parity, escape_Callouts, out_Callouts): 294 294 295 295 out_Callouts.bit_0 = basis_bits.bit_0 … … 304 304 names_escapes_scope1 = pablo.Advance(out_Callouts.names_escapes) 305 305 names_escapes_scope2 = pablo.Advance(names_escapes_scope1) 306 out_Callouts.hexString_mask =names_escapes_scope1  names_escapes_scope2307 308 if out_Callouts.hexString_mask:306 hexstring_nameescape_mask = out_Callouts.hexString_mask  names_escapes_scope1  names_escapes_scope2 307 308 if hexstring_nameescape_mask: 309 309 310 310 out_Callouts.delmask = out_Callouts.hexString_mask & lex.WS 311 311 312 312 NondigitHexString = lex.Hex &~ lex.Digit 313 out_Callouts.bit_0 &= ~ out_Callouts.hexString_mask314 out_Callouts.bit_1 &= ~ out_Callouts.hexString_mask315 out_Callouts.bit_2 &= ~ out_Callouts.hexString_mask316 out_Callouts.bit_3 &= ~ out_Callouts.hexString_mask317 out_Callouts.bit_4 = ( out_Callouts.hexString_mask & NondigitHexString)318 carry7 = out_Callouts.bit_7 & NondigitHexString & out_Callouts.hexString_mask319 out_Callouts.bit_7 ^= NondigitHexString & out_Callouts.hexString_mask313 out_Callouts.bit_0 &= ~hexstring_nameescape_mask 314 out_Callouts.bit_1 &= ~hexstring_nameescape_mask 315 out_Callouts.bit_2 &= ~hexstring_nameescape_mask 316 out_Callouts.bit_3 &= ~hexstring_nameescape_mask 317 out_Callouts.bit_4 = (hexstring_nameescape_mask & NondigitHexString) 318 carry7 = out_Callouts.bit_7 & NondigitHexString & hexstring_nameescape_mask 319 out_Callouts.bit_7 ^= NondigitHexString & hexstring_nameescape_mask 320 320 carry6 = out_Callouts.bit_6 & carry7 321 321 out_Callouts.bit_6 ^= carry7 322 322 out_Callouts.bit_5 ^= carry6 323 324 if out_Callouts.hexString_mask: 325 hexsting_partial_start = marker.hex_opener 326 hexsting_partial_odd_start = hexsting_partial_start & parity.odd 327 hexsting_partial_even_start = hexsting_partial_start & parity.even 328 hexsting_partial_odd_end = pablo.ScanThru(pablo.Advance(hexsting_partial_odd_start),lex.Hex) 329 hexsting_partial_even_end = pablo.ScanThru(pablo.Advance(hexsting_partial_even_start),lex.Hex) 330 hexsting_partial_odd_mask = pablo.ExclusiveSpan(hexsting_partial_odd_start,hexsting_partial_odd_end)  (hexsting_partial_odd_end & parity.odd) 331 hexsting_partial_even_mask = pablo.ExclusiveSpan(hexsting_partial_even_start,hexsting_partial_even_end)  (hexsting_partial_even_end & parity.even) 332 333 out_Callouts.delmask = (hexsting_partial_odd_mask & parity.even)  (hexsting_partial_even_mask & parity.odd) 334 kept_position = (hexsting_partial_odd_mask & parity.odd)  (hexsting_partial_even_mask & parity.even) 335 336 337 hexsting_partial_ends = hexsting_partial_odd_end  hexsting_partial_even_end 338 hexsting_partial_masks = hexsting_partial_odd_mask  hexsting_partial_even_mask 339 kept_positions = kept_position 340 #while ~(hexsting_partial_end & lex.RBracket): 341 342 out_Callouts.bit_4 &= ~hexsting_partial_ends 343 out_Callouts.bit_5 &= ~hexsting_partial_ends 344 out_Callouts.bit_6 &= ~hexsting_partial_ends 345 out_Callouts.bit_7 &= ~hexsting_partial_ends 346 347 out_Callouts.bit_0 = pablo.Advance(out_Callouts.delmask & hexsting_partial_masks & out_Callouts.bit_4)  (out_Callouts.bit_0 & ~kept_positions) 348 out_Callouts.bit_1 = pablo.Advance(out_Callouts.delmask & hexsting_partial_masks & out_Callouts.bit_5)  (out_Callouts.bit_1 & ~kept_positions) 349 out_Callouts.bit_2 = pablo.Advance(out_Callouts.delmask & hexsting_partial_masks & out_Callouts.bit_6)  (out_Callouts.bit_2 & ~kept_positions) 350 out_Callouts.bit_3 = pablo.Advance(out_Callouts.delmask & hexsting_partial_masks & out_Callouts.bit_7)  (out_Callouts.bit_3 & ~kept_positions) 351 323 352 324 353
Note: See TracChangeset
for help on using the changeset viewer.