Changeset 169 for trunk/src/engine.c


Ignore:
Timestamp:
Jun 24, 2008, 5:30:22 PM (11 years ago)
Author:
lindanl
Message:

UTF-16/32 validation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/engine.c

    r168 r169  
    195195        m->SimpleEntity("quot", "\"");
    196196        m->SimpleEntity("apos", "'");   
    197 
     197        m->symbol_table->version = e->version;
    198198
    199199        StrictWellFormedness=false;
     
    252252#endif
    253253        byteplex->DoByteplex();
     254        byteplex->PreparePseudoASCII_Stream();
     255#if defined(PAPI) and defined(CODE_CLOCKING) and (CODE_CLOCKING == BYTEPLEX)
     256        code_clocker->cc_end_interval(buffer_limit_pos);
     257#endif
     258#if defined(PAPI) and defined(CODE_CLOCKING) and (CODE_CLOCKING == BITPLEX)
     259        code_clocker->cc_start_interval();
     260#endif
     261        bitplex->TransposeToBitStreams(byteplex->x8data, blocks_in_buffer);
     262#if defined(PAPI) and defined(CODE_CLOCKING) and (CODE_CLOCKING == BITPLEX)
     263        code_clocker->cc_end_interval(buffer_limit_pos);
     264#endif
     265        lexer->AnalyzeBuffer(bitplex->x8basis, buffer_base_pos, buffer_rel_pos, buffer_limit_pos);
     266#if defined(PAPI) and defined(CODE_CLOCKING) and (CODE_CLOCKING == ADVANCE_BUFFERS)
     267        code_clocker->cc_end_interval(buffer_limit_pos);
     268#endif
     269
     270}
     271
     272template <>
     273inline void ParsingEngine<U16_Buffer>::AdvanceBuffers(){
     274        printf("U16_Buffer validation attempted.\n");
     275#if defined(PAPI) and defined(CODE_CLOCKING) and (CODE_CLOCKING == ADVANCE_BUFFERS)
     276        code_clocker->cc_start_interval();
     277#endif
     278
     279        int advance_amt = text_or_markup_start - buffer_base_pos;
     280        advance_amt &= -PACKSIZE; // maintain alignment
     281        byteplex->AdvanceInputBuffer(advance_amt);
     282        buffer_base_pos += advance_amt;
     283        buffer_rel_pos -= advance_amt;
     284        buffer_limit_pos = min(BUFFER_SIZE, byteplex->units_in_buffer);
     285        int blocks_in_buffer = (buffer_limit_pos + BLOCKSIZE - 1)/BLOCKSIZE;
     286#if defined(PAPI) and defined(CODE_CLOCKING) and (CODE_CLOCKING == BYTEPLEX)
     287        code_clocker->cc_start_interval();
     288#endif
     289        byteplex->DoByteplex();
     290        if (at_UTF_16(entity_Info->encoding)) ((U16_Buffer *) byteplex)->Validate_UTF16();
    254291        byteplex->PreparePseudoASCII_Stream();
    255292#if defined(PAPI) and defined(CODE_CLOCKING) and (CODE_CLOCKING == BYTEPLEX)
Note: See TracChangeset for help on using the changeset viewer.