Changeset 2564 for proto/PDF


Ignore:
Timestamp:
Oct 26, 2012, 1:44:24 PM (6 years ago)
Author:
bhull
Message:

Style fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/PDF/pdf_demo.py

    r2562 r2564  
    230230        depth = 0
    231231        comment_starts=0
    232         comment_follows=0
     232        comment_ends=0
    233233        scan_characters = escaped_Callouts.UELParen |escaped_Callouts.UERParen | lex.Percent
    234234        cursor = pablo.ScanToFirst(scan_characters)
     
    239239                        comment_starts |=comment_cursor
    240240                        comment_cursor = pablo.ScanTo(comment_cursor, lex.EOL)
    241                         comment_follows |=comment_cursor
     241                        comment_ends |=comment_cursor
    242242                        cursor = pablo.ScanTo(pablo.Advance(comment_cursor), scan_characters)
    243243   
     
    269269        #if (depth>0):
    270270                #error
    271         comments_Callouts.mask = (comment_follows - comment_starts) | comment_follows
    272         literalStrings_Callouts.mask = (literalStrings_Callouts.ends-literalStrings_Callouts.starts) | literalStrings_Callouts.ends
     271        comments_Callouts.mask = pablo.SpanUpTo(comment_starts, comment_ends)
     272        literalStrings_Callouts.mask = pablo.SpanUpTo(literalStrings_Callouts.starts,literalStrings_Callouts.ends)
    273273        marker.mask = comments_Callouts.mask | literalStrings_Callouts.mask
    274274
     
    284284        hexStrings_Callouts.ends = pablo.ScanThru(pablo.Advance(hexStrings_Callouts.starts),lex.Hex|lex.WS)
    285285        hexStrings_Callouts.error = hexStrings_Callouts.ends &~ lex.RAngle
    286         marker.mask |= hexStrings_Callouts.ends - hexStrings_Callouts.starts
     286        marker.mask |= pablo.SpanUpTo(hexStrings_Callouts.starts,hexStrings_Callouts.ends)
    287287
    288288def Parse_Numeric(lex, marker, numeric_Callouts) :
     
    304304       
    305305def Parse_Arrays(lex, marker, arrays_Callouts) :
    306         arrays_Callouts.starts = lex.LBracket &~ marker.mask
    307         arrays_Callouts.follows = lex.RBracket &~ marker.mask
     306        arrays_Callouts.starts =  lex.LBracket &~ marker.mask
     307        arrays_Callouts.ends = lex.RBracket &~ marker.mask
     308
    308309       
    309310basis_bits = Basis_bits()
Note: See TracChangeset for help on using the changeset viewer.