Ignore:
Timestamp:
Jul 5, 2010, 5:35:21 PM (9 years ago)
Author:
cameron
Message:

Restructure to use _scope variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/parabix2.py

    r420 r438  
    3737        illegal XML chars : __________________________1_________1_____________
    3838"""
    39         EF_BF_pending = bitutil.Advance(bitutil.Advance(u8.xEF) & u8.xBF)
     39        EF_BF_pending = bitutil.Advance(u8.xEF_scope & u8.xBF)
    4040        return (EF_BF_pending & (u8.xBE | u8.xBF)) | (control.x00_x1F &~ lex.WS & EOF_mask)
    4141
     
    5959        CRLF              : ____1_____________
    6060"""
    61         control.CRLF = bitutil.Advance(control.CR) & control.LF
     61        control.CRLF = control.CR_scope & control.LF
    6262        # Convert CRs to LFs (flip bits 5, 6 and 7 with xor).
    6363        bit[5] ^= control.CR
     
    9595        """
    9696
    97         LAngleFollow = bitutil.Advance(lex.LAngle)
    98         lex.PI_start = LAngleFollow & lex.QMark
    99         lex.CtCD_start = LAngleFollow & lex.Exclam
    100         lex.EndTag_start = LAngleFollow & lex.Slash
    101         lex.CD_end = bitutil.Advance(bitutil.Advance(lex.RBracket) & lex.RBracket) & lex.RAngle
    102         lex.DoubleHyphen = bitutil.Advance(lex.Hyphen) & lex.Hyphen
    103         lex.PI_end = bitutil.Advance(lex.QMark) & lex.RAngle
     97        lex.PI_start = lex.LAngle_scope & lex.QMark
     98        lex.CtCD_start = lex.LAngle_scope & lex.Exclam
     99        lex.EndTag_start = lex.LAngle_scope & lex.Slash
     100        lex.CD_end = bitutil.Advance(lex.RBracket_scope & lex.RBracket) & lex.RAngle
     101        lex.DoubleHyphen = lex.Hyphen_scope & lex.Hyphen
     102        lex.PI_end = lex.QMark_scope & lex.RAngle
    104103        return lex
    105104
     
    252251"""
    253252        CallOuts = ref_callouts()
    254         Ref2 = bitutil.Advance(lex.RefStart &~ CtCDPI_mask)
     253        Ref2 = lex.RefStart_scope &~ CtCDPI_mask
    255254        NumRef2 = Ref2 & lex.Hash
    256255        GenRef2 = Ref2 &~ lex.Hash
     
    427426        # Start the parallel parsing by inspecting the character
    428427        # after the opening "<" of a tag.
    429         LAngleFollow = bitutil.Advance(lex.LAngle) &~ CtCDPI_mask
     428        LAngleFollow = lex.LAngle_scope &~ CtCDPI_mask
    430429        ElemNamePositions = LAngleFollow & ~lex.Slash
    431430        EndTagSeconds = LAngleFollow & lex.Slash
Note: See TracChangeset for help on using the changeset viewer.