Changeset 573 for proto


Ignore:
Timestamp:
Aug 11, 2010, 5:09:15 PM (9 years ago)
Author:
lindanl
Message:

optimize by moving CDCtPI logic inside the loop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/parabix2_compilable.py

    r570 r573  
    251251                CtCDPI_Cursor = bitutil.ScanThru(CtCDPI_Cursor, CtCDPI_scan)
    252252                CtCDPI_Cursor &= EOF_mask
     253       
     254                CT_callouts.CtCDPI_mask = bitutil.Advance(CD_ends | Ct_ends | PI_ends) - CtCDPI_starts
     255                CT_callouts.error = Ct_ends & ~lex.RAngle | Ct_starts & ~ lex.Hyphen
     256                CT_callouts.error |= bitutil.Advance(PI_name_ends & ~ lex.WS) & ~ lex.PI_end
     257                CT_callouts.error |= PI_namestarts & PI_name_ends
     258                # If any of the Comment, CDATA or PI markups are unterminated, it is an error.
     259                CT_callouts.error |= CT_callouts.CtCDPI_mask &~ EOF_mask               
    253260        # End of loop: no remaining CtCDPI_Cursor
    254261       
    255         CT_callouts.CtCDPI_mask = bitutil.Advance(CD_ends | Ct_ends | PI_ends) - CtCDPI_starts
    256         CT_callouts.error = Ct_ends & ~lex.RAngle | Ct_starts & ~ lex.Hyphen
    257         CT_callouts.error |= bitutil.Advance(PI_name_ends & ~ lex.WS) & ~ lex.PI_end
    258         CT_callouts.error |= PI_namestarts & PI_name_ends
    259         # If any of the Comment, CDATA or PI markups are unterminated, it is an error.
    260         CT_callouts.error |= CT_callouts.CtCDPI_mask &~ EOF_mask
    261262        ########## END OF MANUAL INLINING
    262263       
Note: See TracChangeset for help on using the changeset viewer.