Changeset 2667 for proto/PDF/pdf_demo.py


Ignore:
Timestamp:
Nov 21, 2012, 11:06:40 AM (7 years ago)
Author:
bhull
Message:

Various bug fixes and improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/PDF/pdf_demo.py

    r2629 r2667  
    4747        UERParen = 0
    4848        escapes = 0
     49        escaped = 0
    4950
    5051class Comments_Callouts() :
     
    210211        escaped_Callouts.UELParen = lex.LParen &~ escape
    211212        escaped_Callouts.UERParen = lex.RParen &~ escape
     213        escaped_Callouts.escaped = escape
    212214
    213215def inc() :
     
    311313        literalStrings_Callouts.mask = pablo.InclusiveSpan(literalStrings_Callouts.starts,literalStrings_Callouts.ends)
    312314        literalStrings_Callouts.escapes = escaped_Callouts.escapes & literalStrings_Callouts.mask
    313         literalStrings_Callouts.carriage_returns = lex.CR & literalStrings_Callouts.mask &~ literalStrings_Callouts.escapes
     315        literalStrings_Callouts.carriage_returns = lex.CR & literalStrings_Callouts.mask &~ escaped_Callouts.escaped
    314316        marker.mask |= comments_Callouts.mask | literalStrings_Callouts.mask
    315317        marker.starts |= literalStrings_Callouts.starts
     
    667669                        ('Special Chars Follows', pablo.bitstream2string(specialChars_Callouts.follows, lgth+1)),                             
    668670                        ('Errors', pablo.bitstream2string(literalStrings_Callouts.error | hexStrings_Callouts.error | numeric_Callouts.error, lgth+1))])
    669         else:
    670                 print pablo.bitstream2string(literalStrings_Callouts.starts, lgth+1)
    671                 print pablo.bitstream2string(literalStrings_Callouts.escapes, lgth+1)
    672                 print pablo.bitstream2string(literalStrings_Callouts.carriage_returns, lgth+1)
    673                 print pablo.bitstream2string(literalStrings_Callouts.ends, lgth+1)
    674                 print pablo.bitstream2string(names_Callouts.starts, lgth+1)
    675                 print pablo.bitstream2string(names_Callouts.escapes, lgth+1)
    676                 print pablo.bitstream2string(names_Callouts.follows, lgth+1)
    677                 print pablo.bitstream2string(hexStrings_Callouts.starts, lgth+1)
    678                 print pablo.bitstream2string(hexStrings_Callouts.hex, lgth+1)
    679                 print pablo.bitstream2string(hexStrings_Callouts.ends, lgth+1)
    680                 print pablo.bitstream2string(numeric_Callouts.starts, lgth+1)
    681                 print pablo.bitstream2string(numeric_Callouts.follows, lgth+1)
    682                 print pablo.bitstream2string(keywords_Callouts.starts, lgth+1)
    683                 print pablo.bitstream2string(keywords_Callouts.follows, lgth+1)
    684                 print pablo.bitstream2string(specialChars_Callouts.starts, lgth+1)
    685                 print pablo.bitstream2string(specialChars_Callouts.follows, lgth+1)
    686        
    687        
    688 
     671        #else:
     672                #print pablo.bitstream2string(literalStrings_Callouts.starts, lgth+1)
     673                #print pablo.bitstream2string(literalStrings_Callouts.escapes, lgth+1)
     674                #print pablo.bitstream2string(literalStrings_Callouts.carriage_returns, lgth+1)
     675                #print pablo.bitstream2string(literalStrings_Callouts.ends, lgth+1)
     676                #print pablo.bitstream2string(names_Callouts.starts, lgth+1)
     677                #print pablo.bitstream2string(names_Callouts.escapes, lgth+1)
     678                #print pablo.bitstream2string(names_Callouts.follows, lgth+1)
     679                #print pablo.bitstream2string(hexStrings_Callouts.starts, lgth+1)
     680                #print pablo.bitstream2string(hexStrings_Callouts.hex, lgth+1)
     681                #print pablo.bitstream2string(hexStrings_Callouts.ends, lgth+1)
     682                #print pablo.bitstream2string(numeric_Callouts.starts, lgth+1)
     683                #print pablo.bitstream2string(numeric_Callouts.follows, lgth+1)
     684                #print pablo.bitstream2string(keywords_Callouts.starts, lgth+1)
     685                #print pablo.bitstream2string(keywords_Callouts.follows, lgth+1)
     686                #print pablo.bitstream2string(specialChars_Callouts.starts, lgth+1)
     687                #print pablo.bitstream2string(specialChars_Callouts.follows, lgth+1)
     688                #print pablo.bitstream2string(marker.starts, lgth+1)   
     689                #print pablo.bitstream2string(marker.others, lgth+1)   
     690
     691
     692       
     693
Note: See TracChangeset for help on using the changeset viewer.