Changeset 511 for proto/parabix2


Ignore:
Timestamp:
Jul 16, 2010, 5:45:40 AM (9 years ago)
Author:
cameron
Message:

Simplify for xmlwf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/parabix2_compilable.py

    r448 r511  
    268268        # Semicolon terminator required (also covers unterminated at EOF).
    269269        Error |= (GenRefEnds | DecRefEnds | HexRefEnds) &~ lex.Semicolon
    270         CallOuts.GenRefs = GenRefEnds - GenRef2
    271         CallOuts.DecRefs = DecRefEnds - DecRef3
    272         CallOuts.HexRefs = HexRefEnds - HexRef4
     270        # Not needed for xmlwf 
     271        #CallOuts.GenRefs = GenRefEnds - GenRef2
     272        #CallOuts.DecRefs = DecRefEnds - DecRef3
     273        #CallOuts.HexRefs = HexRefEnds - HexRef4
    273274        # Mark references for deletion, but leave the trailing semicolon as
    274275        # the point for insertion of the "expansion" text (most often a
    275276        # single character).
    276         CallOuts.delmask = (GenRefEnds | DecRefEnds | HexRefEnds) - lex.RefStart
     277        #CallOuts.delmask = (GenRefEnds | DecRefEnds | HexRefEnds) - lex.RefStart
    277278        CallOuts.error = Error
    278279        return CallOuts
     
    572573
    573574        # Find and normalize bare CR or CRLF combinations.
    574         (control, bit) = normalize_line_breaks(control, bit)
     575        # Not needed for xmlwf
     576        #(control, bit) = normalize_line_breaks(control, bit)
    575577
    576578        # Compute XML multilterals such as <?, </, --, ]]>.
     
    620622                CtCDPI_Cursor &= EOF_mask
    621623        # End of loop: no remaining CtCDPI_Cursor
    622         CT_callouts.CD_span = CD_ends - CD_starts
    623         CT_callouts.Ct_span = Ct_ends - Ct_starts
    624         CT_callouts.PI_span = PI_ends - PI_starts
     624        #Not needed for xmlwf
     625        #CT_callouts.CD_span = CD_ends - CD_starts
     626        #CT_callouts.Ct_span = Ct_ends - Ct_starts
     627        #CT_callouts.PI_span = PI_ends - PI_starts
    625628       
    626629        CT_callouts.CtCDPI_mask = bitutil.Advance(CD_ends | Ct_ends | PI_ends) - CtCDPI_starts
     
    654657        # Mark any occurrences of null names as errors.
    655658        ParseError = ElemNamePositions & ElemNameFollows
    656         callouts.ElemNames = ElemNameFollows - ElemNamePositions
     659        #callouts.ElemNames = ElemNameFollows - ElemNamePositions
    657660       
    658661        # Initialize the accumulators for attribute name and value positions.
     
    698701
    699702        # No more attribute values to process when AttNameStart == 0.
    700 
    701         callouts.AttNames = AttNameFollows - AttNameStarts
    702         callouts.AttVals = AttValFollows - AttValStarts
     703        # Not needed for xmlwf
     704        #callouts.AttNames = AttNameFollows - AttNameStarts
     705        #callouts.AttVals = AttValFollows - AttValStarts
    703706        STagEnds = AttListEnd & lex.RAngle
    704707        # Mark any "/" characters found as the ends of empty element tags.
    705708        callouts.EmptyTagMarks = bitutil.Advance(AttListEnd & lex.Slash)
    706         callouts.Tags = (STagEnds | callouts.EmptyTagMarks) - ElemNamePositions
     709        # Not needed for xmlwf
     710        #callouts.Tags = (STagEnds | callouts.EmptyTagMarks) - ElemNamePositions
    707711       
    708712       
     
    723727        EndTagEnds = bitutil.ScanThru(bitutil.ScanThru(bitutil.Advance(EndTagSeconds), lex.NameScan), lex.WS)
    724728        ParseError |= EndTagEnds & ~lex.RAngle
    725         callouts.EndTags = EndTagEnds - EndTagSeconds
     729        # Not needed for xmlwf
     730        #callouts.EndTags = EndTagEnds - EndTagSeconds
    726731        callouts.error = ParseError
    727732        ########## END OF MANUAL INLINING
     
    744749        # Consolidate the deletion_masks
    745750        #delmask = control.CRLF | refs.delmask | u16delmask # | CT_callouts.CDATA_delimiters
     751        #Not needed for xmlwf
    746752        delmask = control.CRLF | refs.delmask  # | CT_callouts.CDATA_delimiters
    747753
Note: See TracChangeset for help on using the changeset viewer.