Ignore:
Timestamp:
Nov 14, 2010, 12:58:31 PM (9 years ago)
Author:
cameron
Message:

Optimization: ScanThru?(Advance(x), y) ==> ScanThru?(x, x | y)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/parabix2_compilable.py

    r634 r707  
    321321                EqExpected = bitutil.ScanThru(AttNameFollow, lex.WS)
    322322                EqToCheck |= EqExpected
    323                 AttValPos = bitutil.ScanThru(bitutil.Advance(EqExpected), lex.WS)
     323                AttValPos = bitutil.ScanThru(EqExpected, EqExpected | lex.WS)
    324324                AttValStarts |= AttValPos
    325325                DQuoteAttVal = AttValPos & lex.DQuote
    326326                SQuoteAttVal = AttValPos & lex.SQuote
    327                 DQuoteAttEnd = bitutil.ScanThru(bitutil.Advance(DQuoteAttVal), DQuoteScan)
    328                 SQuoteAttEnd = bitutil.ScanThru(bitutil.Advance(SQuoteAttVal), SQuoteScan)
     327                DQuoteAttEnd = bitutil.ScanThru(DQuoteAttVal, DQuoteAttVal | DQuoteScan)
     328                SQuoteAttEnd = bitutil.ScanThru(SQuoteAttVal, SQuoteAttVal | SQuoteScan)
    329329                AttValEnd = DQuoteAttEnd | SQuoteAttEnd
    330330                AttValEnds |= AttValEnd
     
    353353
    354354        # End Tag Parsing
    355         EndTagEnds = bitutil.ScanThru(bitutil.ScanThru(bitutil.Advance(EndTagSeconds), lex.NameScan), lex.WS)
     355        EndTagEnds = bitutil.ScanThru(bitutil.ScanThru(EndTagSeconds, EndTagSeconds | lex.NameScan), lex.WS)
    356356        ParseError |= EndTagEnds & ~lex.RAngle
    357357        # Not needed for xmlwf
Note: See TracChangeset for help on using the changeset viewer.