Changeset 3092


Ignore:
Timestamp:
Apr 28, 2013, 2:10:00 PM (6 years ago)
Author:
cameron
Message:

Demo pablo.match for CDATA opener.

Location:
proto/parabix2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/parabix2_pablo.py

    r3089 r3092  
    306306                       
    307307       
    308 def Parse_CtCDPI(lex, marker, ctCDPI_Callouts, check_streams):
     308def Parse_CtCDPI(bytedata, lex, marker, ctCDPI_Callouts, check_streams):
    309309        ctCDPI_Callouts.Ct_starts = 0
    310310        ctCDPI_Callouts.Ct_ends = 0
     
    367367                # CDATA section processing
    368368                if CD_Cursor:
     369                        check = CD_Cursor ^ pablo.match(bytedata, "[CDATA[", CD_Cursor)
     370                        pablo.assert_0(check, "CDATA error")
    369371                        ctCDPI_Callouts.CD_starts |= CD_Cursor
    370372                        CD_Cursor = pablo.ScanTo(CD_Cursor, CD_closer)
     
    564566     
    565567   
    566 def Main(bytedata, basis_bits, lex, u8, xml_char, scope1, ctCDPI_Callouts, ref_Callouts, tag_Callouts, masks, xml_names, check_streams):       
     568def Main(basis_bits, lex, u8, xml_char, scope1, ctCDPI_Callouts, ref_Callouts, tag_Callouts, masks, xml_names, check_streams): 
    567569       
    568570        Transpose(bytedata, basis_bits)
     
    578580
    579581        # Parse all comments, CDATA sections and processing instructions.
    580         Parse_CtCDPI(lex, marker, ctCDPI_Callouts, check_streams)
     582        Parse_CtCDPI(bytedata, lex, marker, ctCDPI_Callouts, check_streams)
    581583               
    582584        # All remaining '<' must be tag start characters; parse tags.
  • proto/parabix2/util/post_process.hpp

    r2172 r3092  
    185185        validate_block(iter, source, block_base, buffer_base, PIName_check, tracker);
    186186    }
    187     if (bitblock::any(ctCDPI_Callouts.CD_starts)){
    188         iter.init(&ctCDPI_Callouts.CD_starts);
    189         validate_block(iter, source, block_base, CD_check, tracker);
    190     }
    191187    if(bitblock::any(ref_Callouts.GenRef_starts)){
    192188        iter.init(&ref_Callouts.GenRef_starts);
Note: See TracChangeset for help on using the changeset viewer.