Changeset 3129 for proto/PDF/cb_pablo.py


Ignore:
Timestamp:
May 11, 2013, 4:20:58 PM (6 years ago)
Author:
lindanl
Message:

Bug fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/PDF/cb_pablo.py

    r3066 r3129  
    239239          escape_Callouts.Nonoct = lex.Nonoct & escaped
    240240          escape_Callouts.Oct1 = lex.Oct & escaped
    241           if escape_Callouts.Oct1:
    242                   escape_Callouts.Oct2 = escape_Callouts.Oct1 & pablo.Lookahead(lex.Oct)
    243                   escape_Callouts.Oct1 &= ~escape_Callouts.Oct2
    244                   escape_Callouts.Oct3 = escape_Callouts.Oct2 & pablo.Lookahead(lex.Oct, 2)
    245                   escape_Callouts.Oct2 &= ~escape_Callouts.Oct3
     241          escape_Callouts.Oct2 = escape_Callouts.Oct1 & pablo.Lookahead(lex.Oct)
     242          escape_Callouts.Oct1 &= ~escape_Callouts.Oct2
     243          escape_Callouts.Oct3 = escape_Callouts.Oct2 & pablo.Lookahead(lex.Oct, 2)
     244          escape_Callouts.Oct2 &= ~escape_Callouts.Oct3
    246245          out_Callouts.delmask = escape_mark
    247246       
     
    366365        # Any closing paren that was not actually used to close
    367366        # an opener is in error.
    368         marker.starts = pablo.Advance(~instring) & instring
    369         marker.ends = pablo.ScanThru(marker.starts, instring)
     367        marker.starts = escape_Callouts.LParen &~ out_Callouts.mask
     368        marker.ends = pablo.AdvanceThenScanThru(marker.starts, instring)
    370369        marker.error |= escape_Callouts.RParen &~ closed_RParen &~ pablo.SpanUpTo(comment_start, comment_end)
    371370
     
    388387        name_starts =lex.Slash &~ out_Callouts.mask
    389388        names_follows = pablo.ScanThru(pablo.Advance(name_starts), lex.Regular)
    390         out_Callouts.names_escapes = lex.Hash & pablo.Lookahead(lex.Hex) & pablo.Lookahead(lex.Hex,2)   
     389        out_Callouts.names_escapes = lex.Hash & pablo.Lookahead(lex.Hex) & pablo.Lookahead(lex.Hex,2) &~ out_Callouts.mask
    391390        out_Callouts.mask |= pablo.InclusiveSpan(name_starts,names_follows)
    392391        marker.starts |= name_starts
     
    555554    out_Callouts.bit_6 = out_Callouts.bit_6 &~ out_Callouts.zeromask
    556555    out_Callouts.bit_7 = out_Callouts.bit_7 &~ out_Callouts.zeromask
     556    marker.starts =  marker.starts &~ out_Callouts.zeromask
     557    marker.ends =  marker.ends &~ out_Callouts.zeromask
    557558   
    558559#
Note: See TracChangeset for help on using the changeset viewer.