Ignore:
Timestamp:
Sep 12, 2011, 6:01:38 PM (8 years ago)
Author:
ksherdy
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Xerces/parabix2_xerces.py

    r1430 r1435  
    317317                        callouts.Symbol_starts |= PI_Cursor
    318318                        PI_Cursor = bitutil.Advance(PI_Cursor)
    319                         ctCDPI_Callouts.PI_name_starts |= PI_Cursor
     319                        # Check
     320                        # ctCDPI_Callouts.PI_name_starts |= PI_Cursor
    320321                        PI_name_end = bitutil.ScanThru(PI_Cursor, lex.NameScan)
    321322                        PI_error = PI_Cursor & PI_name_end
     
    376377        # Start the parallel parsing by inspecting the character
    377378        # after the opening "<" of a tag.
    378         elem_name_starts = marker.Tag_opener & ~lex.Slash
    379         end_tag_marks = marker.Tag_opener & lex.Slash
     379        ElemName_starts = marker.Tag_opener & ~lex.Slash
     380        EndTag_marks = marker.Tag_opener & lex.Slash
    380381       
    381382        # Start Tag/Empty Element Tag Parsing
    382383
    383384        # Advance all cursors by scanning through the tag name.
    384         callouts.Symbol_starts |= elem_name_starts
    385         elem_name_ends = bitutil.ScanThru(elem_name_starts, lex.NameScan)
     385        callouts.Symbol_starts |= ElemName_starts
     386        elem_name_ends = bitutil.ScanThru(ElemName_starts, lex.NameScan)
    386387        callouts.Symbol_ends = elem_name_ends
    387388        # Must have at least one name character for a legal start tag.
    388389        # Mark any occurrences of null names as errors.
    389         ParseError = elem_name_starts & elem_name_ends
     390        ParseError = ElemName_starts & elem_name_ends
    390391       
    391392        # After the element name, there may or may not be an attlist.
     
    401402                while AttNameStart:
    402403                        ParseError |= AttNameStart &~ lex.NameScan
    403                         callouts.symbol_starts |= AttNameStart
     404                        callouts.Symbol_starts |= AttNameStart
    404405                        AttNameFollow = bitutil.ScanThru(AttNameStart, lex.NameScan)
    405                         callouts.symbol_ends |= AttNameFollow
     406                        callouts.Symbol_ends |= AttNameFollow
    406407                        # Mark the position from which the AttName may be retrieved.
    407408                        callouts.Transition_marks |= AttNameFollow
     
    440441        # Mark any "/" characters found as the ends of empty element tags.
    441442        EmptyTag_marks = bitutil.Advance(AttListEnd & lex.Slash)
    442        
    443         ParseError |= tag_Callouts.EmptyTag_marks & ~lex.RAngle
     443
     444        #  TODO - Check         
     445        # ParseError |= tag_Callouts.EmptyTag_marks & ~lex.RAngle
     446       
     447        ParseError |= EmptyTag_marks & ~lex.RAngle
    444448
    445449        # End Tag Parsing
    446 
    447         EndTagEnds = bitutil.ScanThru(tag_Callouts.EndTag_marks, tag_Callouts.EndTag_marks | lex.NameScan)
     450       
     451        #  TODO - Check
     452        # EndTagEnds = bitutil.ScanThru(tag_Callouts.EndTag_marks, tag_Callouts.EndTag_marks | lex.NameScan)
     453        EndTagEnds = bitutil.ScanThru(EndTag_marks, EndTag_marks | lex.NameScan)
    448454        if EndTagEnds & lex.WS:
    449455                EndTagEnds = bitutil.ScanThru(EndTagEnds, lex.WS)
     
    456462               
    457463        # "]]>" within tags (in attribute values) is legal
    458         marker.CD_closer = marker.CD_closer &~ ((STagEnds | EmptyTag_marks) - elem_name_starts)
     464        marker.CD_closer = marker.CD_closer &~ ((STagEnds | EmptyTag_marks) - ElemName_starts)
    459465
    460466def Parse_refs(lex, marker, callouts):
Note: See TracChangeset for help on using the changeset viewer.