Changeset 1455 for proto/Xerces


Ignore:
Timestamp:
Sep 15, 2011, 5:29:33 PM (8 years ago)
Author:
cameron
Message:

Fixes to callout streams for symbols, transitions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Xerces/parabix2_xerces.py

    r1454 r1455  
    277277        callouts.Symbol_starts = 0
    278278        callouts.Symbol_ends = 0
     279        callouts.Transition_marks = 0
    279280
    280281
     
    386387        callouts.Symbol_starts |= ElemName_starts
    387388        elem_name_ends = pablo.ScanThru(ElemName_starts, lex.NameScan)
    388         callouts.Symbol_ends = elem_name_ends
     389        callouts.Symbol_ends |= elem_name_ends
    389390        callouts.Transition_marks |= elem_name_ends
    390391        # Must have at least one name character for a legal start tag.
     
    442443        STagEnds = AttListEnd & lex.RAngle
    443444        # Mark any "/" characters found as the ends of empty element tags.
    444         EmptyTag_marks = pablo.Advance(AttListEnd & lex.Slash)
    445 
    446         #  TODO - Check         
    447         # ParseError |= tag_Callouts.EmptyTag_marks & ~lex.RAngle
    448        
    449         ParseError |= EmptyTag_marks & ~lex.RAngle
     445        EmptyTag_marks = AttListEnd & lex.Slash
     446
     447        ParseError |= pablo.Advance(EmptyTag_marks) & ~lex.RAngle
    450448
    451449        # End Tag Parsing
    452        
    453         #  TODO - Check
    454         # EndTagEnds = pablo.ScanThru(tag_Callouts.EndTag_marks, tag_Callouts.EndTag_marks | lex.NameScan)
    455         EndTagEnds = pablo.ScanThru(EndTag_marks, EndTag_marks | lex.NameScan)
     450        EndTag_Name_starts = pablo.Advance(EndTag_marks)
     451        callouts.Symbol_starts |= EndTag_Name_starts
     452        EndTagEnds = pablo.ScanThru(EndTag_Name_starts, lex.NameScan)
     453        callouts.Symbol_ends |= EndTagEnds
    456454        if EndTagEnds & lex.WS:
    457455                EndTagEnds = pablo.ScanThru(EndTagEnds, lex.WS)
     
    461459
    462460        callouts.Transition_marks |= STagEnds | EmptyTag_marks | EndTagEnds
    463         callouts.Symbol_ends |= pablo.Advance(EndTag_marks) | EndTagEnds
    464 
    465461       
    466462        # "]]>" within tags (in attribute values) is legal
Note: See TracChangeset for help on using the changeset viewer.