Ignore:
Timestamp:
Jul 28, 2011, 3:01:53 PM (8 years ago)
Author:
vla24
Message:

Updated symbol table implementation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/SymbolTable/parabix2_symtab_pbs_div.py

    r1228 r1232  
    4545  xF4_scope = 0
    4646  xEF_scope = 0
    47  
    48   FFFE_FFFF = 0
    49   error = 0
    5047
    5148class Lex ():
     
    5653        CRLF = 0
    5754        RefStart = 0
    58         Semicolon = 0 
     55        Semicolon = 0
    5956        Colon = 0
    6057        LAngle = 0
     
    7774        Hex = 0
    7875        WS = 0
    79         error = 0
    8076
    8177class Scope1 ():
     
    9793        PI_ends = 0
    9894        CtCDPI_mask = 0
    99         error = 0
    10095
    10196class Ref_Callouts():
     
    106101        HexRef_starts = 0
    107102        HexRef_ends = 0
    108         error = 0
    109 
    110 class Hash_data():
    111         Hash_value = 0
    112103
    113104class Tag_Callouts():
    114105        ElemName_starts = 0
    115106        ElemName_ends = 0
    116         ElemName_ends_1_to_4 = 0
    117         ElemName_ends_5_to_8 = 0
    118         ElemName_ends_9_to_12 = 0
    119         ElemName_ends_13_to_16 = 0
     107        ElemName_ends_1 = 0
     108        ElemName_ends_2 = 0
     109        ElemName_ends_3 = 0
     110        ElemName_ends_4 = 0
     111        ElemName_ends_5 = 0
     112        ElemName_ends_6 = 0
     113        ElemName_ends_7 = 0
     114        ElemName_ends_8 = 0
     115        ElemName_ends_9 = 0
     116        ElemName_ends_10 = 0
     117        ElemName_ends_11 = 0
     118        ElemName_ends_12 = 0
     119        ElemName_ends_13 = 0
     120        ElemName_ends_14 = 0
     121        ElemName_ends_15 = 0
     122        ElemName_ends_16 = 0
    120123        ElemName_ends_17_and_longer = 0
    121124        AttName_starts = 0
     
    126129        EmptyTag_marks = 0
    127130        EndTag_marks = 0
    128         LAngleFollow = 0
    129         error = 0
    130 
    131 class Basis_bits():     
     131
     132class Basis_bits():
    132133        bit_0 = 0
    133134        bit_1 = 0
     
    138139        bit_6 = 0
    139140        bit_7 = 0
    140        
     141
    141142class Check_streams():
    142143        misc_mask = 0
    143144        non_ascii_name_starts = 0
    144145        non_ascii_names = 0
    145         tag_marks = 0
    146         name_follows = 0
    147         att_refs = 0
    148         error_mask = 0
     146        tag_marks = 0
     147        name_follows = 0
     148        att_refs = 0
    149149
    150150class Xml_names():
    151151        namespace_error = 0
    152152
    153 def Classify_bytes_Validate_utf8(basis_bits, lex, u8): 
     153def Classify_bytes_Validate_utf8(basis_bits, lex, u8):
    154154        temp1 = (basis_bits.bit_0 | basis_bits.bit_1);
    155155        temp2 = (basis_bits.bit_2 &~ basis_bits.bit_3);
     
    244244        temp65 = (temp64 & temp60);
    245245        lex.Hex = (temp62 | temp65);
    246         lex.error = x00_x1F &~ lex.WS
    247        
     246        lex_error = x00_x1F &~ lex.WS
     247        if lex_error & EOF_mask:
     248                error_tracker.NoteError("Error: illegal character", lex_error)
     249
     250
    248251        ### Validate_utf8(basis_bits, u8):
    249252        u8.unibyte = (~basis_bits.bit_0);
    250253        u8.suffix = 0
    251         u8.error = 0
    252         u8.FFFE_FFFF = 0
     254        u8_error = 0
     255        u8_FFFE_FFFF = 0
    253256        u8anyscope = 0 #local
    254257        if basis_bits.bit_0:
     
    265268                temp71 = (u8.prefix4 & temp70);
    266269                u8.badprefix = (temp68 | temp71);
    267                 u8.error = u8.badprefix
     270                u8_error = u8.badprefix
    268271                u8.scope22 = bitutil.Advance(u8.prefix2)
    269272                u8anyscope = u8.scope22
     
    295298                        u8lastscope = u8.scope22 | u8.scope33 | u8.scope44
    296299                        u8anyscope = u8lastscope | u8.scope32 | u8.scope42 | u8.scope43
    297                
     300
    298301                        u8error1 = u8.xE0_scope & u8.x80_x9F
    299302                        u8error2 = u8.xED_scope & u8.xA0_xBF
    300303                        u8error3 = u8.xF0_scope & u8.x80_x8F
    301304                        u8error4 = u8.xF4_scope & u8.x90_xBF
    302        
    303                         u8.error |= u8error1 | u8error2 | u8error3 | u8error4
     305
     306                        u8_error |= u8error1 | u8error2 | u8error3 | u8error4
    304307
    305308                        EF_BF_pending = bitutil.Advance(u8.xEF_scope & u8.xBF)
    306309
    307                         u8.FFFE_FFFF = (EF_BF_pending & (u8.xBE | u8.xBF))
    308         u8mismatch = u8anyscope ^ u8.suffix
    309         u8.error |= u8mismatch
    310        
     310                        u8_FFFE_FFFF = (EF_BF_pending & (u8.xBE | u8.xBF))
     311                u8mismatch = u8anyscope ^ u8.suffix
     312                u8_error |= u8mismatch | u8_FFFE_FFFF
     313                if u8_error:
     314                        error_tracker.NoteError("UTF-8 error found", (u8_error))
     315
     316
    311317def Add_scope_streams(lex, scope1):
    312318        #scope1.LAngle = bitutil.Advance(lex.LAngle)
     
    316322        w = lex.Hyphen | lex.QMark
    317323        v1 = bitutil.Advance(v)
    318         w1 = bitutil.Advance(w)
     324        w1 = bitutil.Advance(w)
    319325        scope1.LAngle = v1 &~ w1
    320326        scope1.Hyphen = v1 & w1
    321327        scope1.QMark = w1 &~ v1
     328        scope1.RefStart = 0 # default
    322329
    323330def Parse_CtCDPI(ctCDPI_Callouts, lex, scope1, check_streams):
     
    332339        ctCDPI_Callouts.PI_ends = 0
    333340        ctCDPI_Callouts.CtCDPI_mask = 0
    334         ctCDPI_Callouts.error = 0
     341        ctCDPI_error = 0
    335342        CtCDPI_starts = 0
    336343        Ct_errors = 0
     
    355362                CD_Ct_Cursor = bitutil.Advance(CtCDPI_Cursor & ~PI_Cursor)
    356363                CD_Cursor = CD_Ct_Cursor & lex.LBracket
    357                 Ct_Cursor = CD_Ct_Cursor & lex.Hyphen 
     364                Ct_Cursor = CD_Ct_Cursor & lex.Hyphen
    358365                ctCDPI_Callouts.PI_starts |= PI_Cursor
    359366                ctCDPI_Callouts.CD_starts |= CD_Cursor
    360367                ctCDPI_Callouts.Ct_starts |= Ct_Cursor
    361                 Ct_Cursor = bitutil.Advance(Ct_Cursor) 
    362                 Ct_errors |= Ct_Cursor & ~ lex.Hyphen 
    363                 # Advance twice past <!--, so that we don't treat <!--- 
    364                 # as being a terminated comment.
     368                Ct_Cursor = bitutil.Advance(Ct_Cursor)
     369                Ct_errors |= Ct_Cursor & ~ lex.Hyphen
     370                # Advance twice past <!--, so that we don't treat <!---
     371                # as being a terminated comment.
    365372                Ct_Cursor = bitutil.Advance(bitutil.Advance(Ct_Cursor))
    366373                PI_Cursor = bitutil.Advance(PI_Cursor)
     
    376383                CtCDPI_Cursor = PI_Cursor | CD_Cursor | Ct_Cursor
    377384                CtCDPI_Cursor = bitutil.ScanTo(CtCDPI_Cursor, CtCDPI_start)
    378        
    379                 ctCDPI_Callouts.CtCDPI_mask = bitutil.Advance(ctCDPI_Callouts.CD_ends | ctCDPI_Callouts.Ct_ends | ctCDPI_Callouts.PI_ends) - CtCDPI_starts             
     385
     386                ctCDPI_Callouts.CtCDPI_mask = bitutil.Advance(ctCDPI_Callouts.CD_ends | ctCDPI_Callouts.Ct_ends | ctCDPI_Callouts.PI_ends) - CtCDPI_starts
    380387                #ctCDPI_Callouts.error = Ct_ends & ~lex.RAngle | Ct_starts & ~ lex.Hyphen
    381                 ctCDPI_Callouts.error = Ct_errors | ctCDPI_Callouts.Ct_ends & ~lex.RAngle
    382                 ctCDPI_Callouts.error |= bitutil.Advance(ctCDPI_Callouts.PI_name_ends & ~ lex.WS) & ~ PI_end
    383                 ctCDPI_Callouts.error |= ctCDPI_Callouts.PI_name_starts & ctCDPI_Callouts.PI_name_ends
     388                ctCDPI_error = Ct_errors | ctCDPI_Callouts.Ct_ends & ~lex.RAngle
     389                ctCDPI_error |= bitutil.Advance(ctCDPI_Callouts.PI_name_ends & ~ lex.WS) & ~ PI_end
     390                ctCDPI_error |= ctCDPI_Callouts.PI_name_starts & ctCDPI_Callouts.PI_name_ends
    384391                # If any of the Comment, CDATA or PI markups are unterminated, it is an error.
    385                 ctCDPI_Callouts.error |= ctCDPI_Callouts.CtCDPI_mask &~ EOF_mask
    386                
     392                ctCDPI_error |= ctCDPI_Callouts.CtCDPI_mask &~ EOF_mask
     393
     394        if ctCDPI_error:
     395                error_tracker.NoteError("Error in comment, CDATA or processing instruction syntax", ctCDPI_error)
     396
    387397        check_streams.misc_mask = (lex.WS | lex.LAngle | (bitutil.Advance(ctCDPI_Callouts.Ct_ends | ctCDPI_Callouts.PI_ends) - (ctCDPI_Callouts.Ct_starts | ctCDPI_Callouts.PI_starts)) | CtCDPI_starts) & EOF_mask
    388398
    389399def Parse_tags(lex, scope1, ctCDPI_Callouts, tag_Callouts):
    390400
    391        
     401
    392402        # Delimiters for scans.
    393403        DQuoteDelim = lex.DQuote | lex.LAngle
    394404        SQuoteDelim = lex.SQuote | lex.LAngle
    395405        AttListDelim = lex.Slash | lex.RAngle
    396        
     406
    397407        # Start the parallel parsing by inspecting the character
    398408        # after the opening "<" of a tag.
    399         tag_Callouts.LAngleFollow = scope1.LAngle &~ ctCDPI_Callouts.CtCDPI_mask
    400         tag_Callouts.ElemName_starts = tag_Callouts.LAngleFollow & ~lex.Slash
    401         tag_Callouts.EndTag_marks = tag_Callouts.LAngleFollow & lex.Slash
    402        
     409        LAngleFollow = scope1.LAngle &~ ctCDPI_Callouts.CtCDPI_mask
     410        tag_Callouts.ElemName_starts = LAngleFollow & ~lex.Slash
     411        tag_Callouts.EndTag_marks = LAngleFollow & lex.Slash
     412
    403413        # Start Tag/Empty Element Tag Parsing
    404414
     
    408418        # Mark any occurrences of null names as errors.
    409419        ParseError = tag_Callouts.ElemName_starts & tag_Callouts.ElemName_ends
    410        
     420
    411421        # Initialize the accumulators for attribute name and value positions.
    412         tag_Callouts.AttName_starts = 0 
     422        tag_Callouts.AttName_starts = 0
    413423        tag_Callouts.AttName_ends = 0
    414424        EqToCheck = 0
     
    434444                tag_Callouts.AttName_ends |= AttNameFollow
    435445                # Scan through WS to the expected '=' delimiter.
    436                 EqExpected = bitutil.ScanThru(AttNameFollow, lex.WS)
     446                # EqExpected = bitutil.ScanThru(AttNameFollow, lex.WS)
     447                # But use if test to optimize.
     448                if AttNameFollow & lex.WS:
     449                        EqExpected = bitutil.ScanThru(AttNameFollow, lex.WS)
     450                else: EqExpected = AttNameFollow
    437451                EqToCheck |= EqExpected
    438452                AttValPos = bitutil.ScanThru(EqExpected, EqExpected | lex.WS)
     
    446460                AttValFollow = bitutil.Advance(AttValEnd)
    447461                tag_Callouts.AttVal_ends |= AttValFollow
     462                #  AfterWS = bitutil.ScanThru(AttValFollow, lex.WS)
     463                if AttValFollow & lex.WS:
     464                        AfterWS = bitutil.ScanThru(AttValFollow, lex.WS)
     465                else: AfterWS = AttValFollow
    448466                AfterWS = bitutil.ScanThru(AttValFollow, lex.WS)
    449467                AttListEnd |= AfterWS & AttListDelim
     
    454472        # Mark any "/" characters found as the ends of empty element tags.
    455473        tag_Callouts.EmptyTag_marks = bitutil.Advance(AttListEnd & lex.Slash)
    456        
     474
    457475        # Check for errors.
    458476        ParseError |= tag_Callouts.AttVal_ends & tag_Callouts.AttName_starts # No intervening WS.
     
    464482
    465483        # End Tag Parsing
    466         EndTagEnds = bitutil.ScanThru(bitutil.ScanThru(tag_Callouts.EndTag_marks, tag_Callouts.EndTag_marks | lex.NameScan), lex.WS)
     484
     485        EndTagEnds = bitutil.ScanThru(tag_Callouts.EndTag_marks, tag_Callouts.EndTag_marks | lex.NameScan)
     486        if EndTagEnds & lex.WS:
     487                EndTagEnds = bitutil.ScanThru(EndTagEnds, lex.WS)
    467488        ParseError |= EndTagEnds & ~lex.RAngle
    468         tag_Callouts.error = ParseError
    469                
     489        if ParseError:
     490                error_tracker.NoteError("Tag parsing error found", (ParseError))
     491
     492
    470493        # Attribute value spans
    471494        tag_Callouts.AttVal_spans = tag_Callouts.AttVal_ends - tag_Callouts.AttVal_starts
    472                        
     495
    473496def Parse_refs(lex, scope1, ctCDPI_Callouts, ref_Callouts):
    474497        ref_Callouts.GenRef_starts = 0
     
    478501        ref_Callouts.HexRef_starts = 0
    479502        ref_Callouts.HexRef_ends = 0
    480         ref_Callouts.error = 0
     503        ref_error = 0
    481504
    482505        Ref1 = lex.RefStart &~ ctCDPI_Callouts.CtCDPI_mask
     
    489512                HexRef3 = NumRef3 & lex.x
    490513                ref_Callouts.DecRef_starts = NumRef3 &~ lex.x
    491                 ref_Callouts.HexRef_starts = bitutil.Advance(HexRef3) 
     514                ref_Callouts.HexRef_starts = bitutil.Advance(HexRef3)
    492515                ref_Callouts.GenRef_ends = bitutil.ScanThru(ref_Callouts.GenRef_starts, lex.NameScan)
    493516                ref_Callouts.DecRef_ends = bitutil.ScanThru(ref_Callouts.DecRef_starts, lex.Digit)
     
    500523                ref_ends = ref_Callouts.GenRef_ends | ref_Callouts.DecRef_ends | ref_Callouts.HexRef_ends
    501524                ref_error3 = ref_ends &~ lex.Semicolon
    502                 ref_Callouts.error = ref_error1 | ref_error2 | ref_error3
     525                ref_error = ref_error1 | ref_error2 | ref_error3
     526                if ref_error:
     527                        error_tracker.NoteError("Reference error found", (ref_error))
     528
     529
    503530
    504531def Validate_xml_names(ctCDPI_Callouts, ref_Callouts, tag_Callouts, lex, u8, xml_names, check_streams):
     
    518545        colon2_err = bitutil.ScanThru(local_part_start, lex.NameScan &~ lex.Colon) & lex.Colon
    519546        ncname_err = ncname_stream & lex.Colon
    520         xml_names.namespace_error = void_prefix_err | local_part_err | colon2_err | ncname_err
    521                        
     547        namespace_error = void_prefix_err | local_part_err | colon2_err | ncname_err
     548        if namespace_error:
     549                error_tracker.NoteError("error found", namespace_error)
     550
     551
    522552        check_streams.non_ascii_name_starts = name_start &~lex.ASCII_name_start
    523553        check_streams.non_ascii_names = (name_stream &~ name_start) & ~lex.ASCII_name_char & ~u8.suffix
    524    
     554
    525555def Do_check_streams(ctCDPI_Callouts, tag_Callouts, lex, u8, scope1, ref_Callouts, xml_names, check_streams):
    526556    # Ensure that no occurrence of ]]> occurs outside of markup.
    527557    CD_end_error = ctCDPI_Callouts.CD_end & ~(ctCDPI_Callouts.CtCDPI_mask | tag_Callouts.AttVal_spans)
    528            
     558
    529559    # Consolidate and check for errors
    530     check_streams.error_mask = lex.error & EOF_mask | u8.error | u8.FFFE_FFFF | ctCDPI_Callouts.error | tag_Callouts.error | CD_end_error | ref_Callouts.error | xml_names.namespace_error
    531 
    532     check_streams.tag_marks = tag_Callouts.EmptyTag_marks | tag_Callouts.LAngleFollow | tag_Callouts.AttName_starts
     560    if CD_end_error:
     561                error_tracker.NoteError("Error: ]]> in text", CD_end_error)
     562
     563
     564    check_streams.tag_marks = tag_Callouts.EmptyTag_marks | tag_Callouts.ElemName_starts | tag_Callouts.EndTag_marks | tag_Callouts.AttName_starts
    533565    check_streams.name_follows = tag_Callouts.ElemName_ends | tag_Callouts.AttName_ends
    534566    check_streams.att_refs = tag_Callouts.AttVal_spans & scope1.RefStart
     
    539571    remaining_ends = tag_Callouts.ElemName_ends
    540572    temp = tag_Callouts.ElemName_starts
     573    temp32 = bitutil.Advance32(temp)
    541574
    542575    # Group symbols of length 1
    543     temp = bitutil.Advance(temp)
    544     tag_Callouts.ElemName_ends_1 = temp & remaining_ends
     576    tag_Callouts.ElemName_ends_1 = interpose32(temp, temp32, 1) & remaining_ends
    545577    remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_1
    546578
    547579    # Group symbols of length 2
    548     temp = bitutil.Advance(temp)
    549     tag_Callouts.ElemName_ends_2 = temp & remaining_ends
     580    tag_Callouts.ElemName_ends_2 = interpose32(temp, temp32, 2) & remaining_ends
    550581    remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_2
    551582
    552583    # Group symbols of length 3
    553     temp = bitutil.Advance(temp)
    554     tag_Callouts.ElemName_ends_3 = temp & remaining_ends
     584    tag_Callouts.ElemName_ends_3 = interpose32(temp, temp32, 3) & remaining_ends
    555585    remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_3
    556586
    557587    # Group symbols of length 4
    558     temp = bitutil.Advance(temp)
    559     tag_Callouts.ElemName_ends_4 = temp & remaining_ends
     588    tag_Callouts.ElemName_ends_4 = interpose32(temp, temp32, 4) & remaining_ends
    560589    remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_4
    561590
    562591    # Group symbols of length 5
    563     temp = bitutil.Advance(temp)
    564     tag_Callouts.ElemName_ends_5 = temp & remaining_ends
     592    tag_Callouts.ElemName_ends_5 = interpose32(temp, temp32, 5) & remaining_ends
    565593    remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_5
    566594
    567595    # Group symbols of length 6
    568     temp = bitutil.Advance(temp)
    569     tag_Callouts.ElemName_ends_6 = temp & remaining_ends
     596    tag_Callouts.ElemName_ends_6 = interpose32(temp, temp32, 6) & remaining_ends
    570597    remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_6
    571598
    572599    # Group symbols of length 7
    573     temp = bitutil.Advance(temp)
    574     tag_Callouts.ElemName_ends_7 = temp & remaining_ends
     600    tag_Callouts.ElemName_ends_7 = interpose32(temp, temp32, 7) & remaining_ends
    575601    remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_7
    576602
    577603    # Group symbols of length 8
    578     temp = bitutil.Advance(temp)
    579     tag_Callouts.ElemName_ends_8 = temp & remaining_ends
     604    tag_Callouts.ElemName_ends_8 = interpose32(temp, temp32, 8) & remaining_ends
    580605    remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_8
    581606
    582607    # Group symbols of length 9
    583     temp = bitutil.Advance(temp)
    584     tag_Callouts.ElemName_ends_9 = temp & remaining_ends
     608    tag_Callouts.ElemName_ends_9 = interpose32(temp, temp32, 9) & remaining_ends
    585609    remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_9
    586610
    587611    # Group symbols of length 10
    588     temp = bitutil.Advance(temp)
    589     tag_Callouts.ElemName_ends_10 = temp & remaining_ends
     612    tag_Callouts.ElemName_ends_10 = interpose32(temp, temp32, 10) & remaining_ends
    590613    remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_10
    591614
    592615    # Group symbols of length 11
    593     temp = bitutil.Advance(temp)
    594     tag_Callouts.ElemName_ends_11 = temp & remaining_ends
     616    tag_Callouts.ElemName_ends_11 = interpose32(temp, temp32, 11) & remaining_ends
    595617    remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_11
    596618
    597619    # Group symbols of length 12
    598     temp = bitutil.Advance(temp)
    599     tag_Callouts.ElemName_ends_12 = temp & remaining_ends
     620    tag_Callouts.ElemName_ends_12 = interpose32(temp, temp32, 12) & remaining_ends
    600621    remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_12
    601622
    602623    # Group symbols of length 13
    603     temp = bitutil.Advance(temp)
    604     tag_Callouts.ElemName_ends_13 = temp & remaining_ends
     624    tag_Callouts.ElemName_ends_13 = interpose32(temp, temp32, 13) & remaining_ends
    605625    remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_13
    606626
    607627    # Group symbols of length 14
    608     temp = bitutil.Advance(temp)
    609     tag_Callouts.ElemName_ends_14 = temp & remaining_ends
     628    tag_Callouts.ElemName_ends_14 = interpose32(temp, temp32, 14) & remaining_ends
    610629    remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_14
    611630
    612631    # Group symbols of length 15
    613     temp = bitutil.Advance(temp)
    614     tag_Callouts.ElemName_ends_15 = temp & remaining_ends
     632    temp15 = interpose32(temp, temp32, 15)
     633    tag_Callouts.ElemName_ends_15 = temp15 & remaining_ends
    615634    remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_15
    616635
    617636    # Group symbols of length 16
    618     temp = bitutil.Advance(temp)
     637    temp = bitutil.Advance(temp15)
    619638    tag_Callouts.ElemName_ends_16 = temp & remaining_ends
    620639    remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_16
     
    628647    #hash_data.Hash_value = basis_bits.bit_3 ^ basis_bits.bit_5 ^ basis_bits.bit_7
    629648
    630 #def main(basis_bits, lex, u8, scope1, ctCDPI_Callouts, masks, check_streams, tag_Callouts, ref_Callouts, xml_names):
    631649def Main(basis_bits, lex, u8, xml_char, scope1, ctCDPI_Callouts, ref_Callouts, tag_Callouts, masks, xml_names, check_streams, hash_data):
    632        
     650
    633651        # Classify bytes for UTF-8 processing, whitespace and control
    634652        # processing and XML lexical analysis.
     
    637655        # Validate UTF-8 multibyte sequences and determine the UTF-8 scope streams
    638656        # Validate_utf8(basis_bits, u8)
    639                                
     657
    640658        Classify_bytes_Validate_utf8(basis_bits, lex, u8)
    641659
    642660        Add_scope_streams(lex, scope1)
    643    
     661
    644662        # Parse all comments, CDATA sections and processing instructions.
    645663        Parse_CtCDPI(ctCDPI_Callouts, lex, scope1, check_streams)
    646                
     664
    647665        # All remaining '<' must be tag start characters; parse tags.
    648         Parse_tags(lex, scope1, ctCDPI_Callouts, tag_Callouts) 
     666        Parse_tags(lex, scope1, ctCDPI_Callouts, tag_Callouts)
    649667
    650668        # All remaining '&' must be reference start characters; parse them.
    651669        Parse_refs(lex, scope1, ctCDPI_Callouts, ref_Callouts)
    652        
     670
    653671        # Validate XML namespaces and generate bit streams to post validate non-ascii range XML names
    654672        Validate_xml_names(ctCDPI_Callouts, ref_Callouts, tag_Callouts, lex, u8, xml_names, check_streams)
    655    
    656    
     673
     674
    657675        Do_check_streams(ctCDPI_Callouts, tag_Callouts, lex, u8, scope1, ref_Callouts, xml_names, check_streams)
    658676
     
    661679
    662680        Compute_Hash_Value_Bitstream(hash_data, basis_bits);
    663                
Note: See TracChangeset for help on using the changeset viewer.