Changeset 1434


Ignore:
Timestamp:
Sep 12, 2011, 6:01:31 PM (8 years ago)
Author:
ksherdy
Message:

Partial implementation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Xerces/pablo_template.cpp

    r1432 r1434  
    4848
    4949
    50 LineColTracker tracker;
     50// LineColTracker tracker;
    5151
    5252static inline void ReportError(const char * error_msg, int error_pos_in_block) {
    5353  int error_line, error_column;
    54   tracker.get_Line_and_Column(error_pos_in_block, error_line, error_column);
     54  // tracker.get_Line_and_Column(error_pos_in_block, error_line, error_column);
    5555  fprintf(stderr, "%s at line %i, column %i\n", error_msg, error_line, error_column);
    5656}
     
    8282};
    8383
    84 
    85 TagMatcher matcher;
     84// TODO - No TagMatcher
     85// TagMatcher matcher;
    8686BitBlock EOF_mask = simd_const_1(1);
    8787
     
    252252  basis_bits.bit_7 = simd_and(basis_bits.bit_7, EOF_mask);
    253253}
    254 
     254/*
    255255static inline void postprocess_do_block(Lex & lex, CtCDPI_Callouts & ctCDPI_Callouts, Ref_Callouts & ref_Callouts, Check_streams & check_streams, int chars_avail){
    256256            tracker.StoreNewlines(lex.LF);
     
    290290                tracker.AdvanceBlock();
    291291}
    292 
     292*/
    293293void do_process(FILE *infile, FILE *outfile) {
    294294
     
    314314  if (chars_avail > BUFFER_SIZE) chars_avail = BUFFER_SIZE;
    315315
    316   matcher.setSrc(srcbuf);
     316  // matcher.setSrc(srcbuf);
    317317
    318318  if(chars_read<4){
     
    368368          s2p_do_block((BytePack *) &srcbuf[block_base], basis_bits);
    369369          @block_stmts
    370           postprocess_do_block(lex, ctCDPI_Callouts, ref_Callouts, check_streams, chars_avail);
     370          //postprocess_do_block(lex, ctCDPI_Callouts, ref_Callouts, check_streams, chars_avail);
    371371      }
    372       matcher.StreamScan(chars_avail);
    373       matcher.Advance_buffer();
    374       tracker.Advance_buffer();
     372      // matcher.StreamScan(chars_avail);
     373      // matcher.Advance_buffer();
     374      // tracker.Advance_buffer();
    375375      PERF_SEC_END(parser_timer, chars_avail);
    376376           
     
    396396          s2p_do_block((BytePack *) &srcbuf[block_pos], basis_bits);
    397397          @block_stmts
    398           postprocess_do_block(lex, ctCDPI_Callouts, ref_Callouts, check_streams, chars_avail);
     398          //postprocess_do_block(lex, ctCDPI_Callouts, ref_Callouts, check_streams, chars_avail);
    399399          block_pos += BLOCK_SIZE;
    400400          remaining -= BLOCK_SIZE;
     
    405405          s2p_do_final_block((BytePack *) &srcbuf[block_pos], basis_bits, EOF_mask);
    406406          @final_block_stmts
    407           postprocess_do_block(lex, ctCDPI_Callouts, ref_Callouts, check_streams, chars_avail);
     407          //postprocess_do_block(lex, ctCDPI_Callouts, ref_Callouts, check_streams, chars_avail);
    408408    }
    409409    buf_pos += chars_avail;
    410410    buffer_base = buf_pos;
    411411
    412     matcher.StreamScan(chars_avail);
    413     matcher.Advance_buffer();
    414     tracker.Advance_buffer();
     412    // matcher.StreamScan(chars_avail);
     413    // matcher.Advance_buffer();
     414    // tracker.Advance_buffer();
    415415
    416416
    417417    PERF_SEC_END(parser_timer, chars_avail);
    418     if (matcher.depth != 0) {
    419       fprintf(stderr, "tag matching error (depth %i) at position %i\n", matcher.depth, buffer_base);
    420       exit(-1);
    421     }
     418    // if (matcher.depth != 0) {
     419    //  fprintf(stderr, "tag matching error (depth %i) at position %i\n", matcher.depth, buffer_base);
     420    //  exit(-1);
     421    // }
    422422}
    423423
Note: See TracChangeset for help on using the changeset viewer.