Changeset 1437


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

Generated file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Xerces/src/xmlwf.cpp

    r1432 r1437  
    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
     
    325325CarryInit(carryQ, 13); }
    326326  void do_block(Lex & lex, Marker & marker, Callouts & callouts) {
    327                 BitBlock DQuoteDelim, SQuoteDelim, AttListDelim, elem_name_starts;
    328                 BitBlock end_tag_marks, elem_name_ends, ParseError, AfterWS, AttListEnd;
    329                 BitBlock AttNameStart, AttNameFollow, EqExpected, AttValPos, DQuoteAttVal;
    330                 BitBlock SQuoteAttVal, DQuoteAttEnd, SQuoteAttEnd, AttValEnd, AttValFollow;
    331                 BitBlock STagEnds, EmptyTag_marks, EndTagEnds;
     327                BitBlock DQuoteDelim, SQuoteDelim, AttListDelim, ElemName_starts, EndTag_marks;
     328                BitBlock elem_name_ends, ParseError, AfterWS, AttListEnd, AttNameStart;
     329                BitBlock AttNameFollow, EqExpected, AttValPos, DQuoteAttVal, SQuoteAttVal;
     330                BitBlock DQuoteAttEnd, SQuoteAttEnd, AttValEnd, AttValFollow, STagEnds;
     331                BitBlock EmptyTag_marks, EndTagEnds;
    332332
    333333
     
    336336        AttListDelim = simd_or(lex.Slash, lex.RAngle);
    337337        callouts.Transition_marks = marker.Tag_opener;
    338         elem_name_starts = simd_andc(marker.Tag_opener, lex.Slash);
    339         end_tag_marks = simd_and(marker.Tag_opener, lex.Slash);
    340         callouts.Symbol_starts = simd_or(callouts.Symbol_starts, elem_name_starts);
    341         elem_name_ends = BitBlock_scanthru_ci_co(elem_name_starts, lex.NameScan, carryQ, 0);
     338        ElemName_starts = simd_andc(marker.Tag_opener, lex.Slash);
     339        EndTag_marks = simd_and(marker.Tag_opener, lex.Slash);
     340        callouts.Symbol_starts = simd_or(callouts.Symbol_starts, ElemName_starts);
     341        elem_name_ends = BitBlock_scanthru_ci_co(ElemName_starts, lex.NameScan, carryQ, 0);
    342342        callouts.Symbol_ends = elem_name_ends;
    343         ParseError = simd_and(elem_name_starts, elem_name_ends);
     343        ParseError = simd_and(ElemName_starts, elem_name_ends);
    344344        if ((bitblock_has_bit(simd_and(elem_name_ends, lex.WS)) || CarryTest(carryQ, 1, 8))) {
    345345          AfterWS = BitBlock_scanthru_ci_co(elem_name_ends, lex.WS, carryQ, 1);
     
    348348          if ((bitblock_has_bit(AttNameStart) || CarryTest(carryQ, 2, 7))) {
    349349            ParseError = simd_or(ParseError, simd_andc(AttNameStart, lex.NameScan));
    350             callouts.symbol_starts = simd_or(callouts.symbol_starts, AttNameStart);
     350            callouts.Symbol_starts = simd_or(callouts.Symbol_starts, AttNameStart);
    351351            AttNameFollow = BitBlock_scanthru_ci_co(AttNameStart, lex.NameScan, carryQ, 2);
    352             callouts.symbol_ends = simd_or(callouts.symbol_ends, AttNameFollow);
     352            callouts.Symbol_ends = simd_or(callouts.Symbol_ends, AttNameFollow);
    353353            callouts.Transition_marks = simd_or(callouts.Transition_marks, AttNameFollow);
    354354            if ((bitblock_has_bit(simd_and(AttNameFollow, lex.WS)) || CarryTest(carryQ, 3, 1))) {
     
    385385              CarryInit(subcarryQ, 7);
    386386              ParseError = simd_or(ParseError, simd_andc(AttNameStart, lex.NameScan));
    387               callouts.symbol_starts = simd_or(callouts.symbol_starts, AttNameStart);
     387              callouts.Symbol_starts = simd_or(callouts.Symbol_starts, AttNameStart);
    388388              AttNameFollow = BitBlock_scanthru_co(AttNameStart, lex.NameScan, subcarryQ, 0);
    389               callouts.symbol_ends = simd_or(callouts.symbol_ends, AttNameFollow);
     389              callouts.Symbol_ends = simd_or(callouts.Symbol_ends, AttNameFollow);
    390390              callouts.Transition_marks = simd_or(callouts.Transition_marks, AttNameFollow);
    391391              if (bitblock_has_bit(simd_and(AttNameFollow, lex.WS))) {
     
    430430        STagEnds = simd_and(AttListEnd, lex.RAngle);
    431431        EmptyTag_marks = BitBlock_advance_ci_co(simd_and(AttListEnd, lex.Slash), carryQ, 9);
    432         ParseError = simd_or(ParseError, simd_andc(tag_Callouts.EmptyTag_marks, lex.RAngle));
    433         EndTagEnds = BitBlock_scanthru_ci_co(tag_Callouts.EndTag_marks, simd_or(tag_Callouts.EndTag_marks, lex.NameScan), carryQ, 10);
     432        ParseError = simd_or(ParseError, simd_andc(EmptyTag_marks, lex.RAngle));
     433        EndTagEnds = BitBlock_scanthru_ci_co(EndTag_marks, simd_or(EndTag_marks, lex.NameScan), carryQ, 10);
    434434        if ((bitblock_has_bit(simd_and(EndTagEnds, lex.WS)) || CarryTest(carryQ, 11, 1))) {
    435435          EndTagEnds = BitBlock_scanthru_ci_co(EndTagEnds, lex.WS, carryQ, 11);
     
    443443        }
    444444        callouts.Transition_marks = simd_or(callouts.Transition_marks, simd_or(simd_or(STagEnds, EmptyTag_marks), EndTagEnds));
    445         marker.CD_closer = simd_andc(marker.CD_closer, BitBlock_sub_ci_co(simd_or(STagEnds, EmptyTag_marks), elem_name_starts, carryQ, 12));
     445        marker.CD_closer = simd_andc(marker.CD_closer, BitBlock_sub_ci_co(simd_or(STagEnds, EmptyTag_marks), ElemName_starts, carryQ, 12));
    446446        CarryQ_Adjust(carryQ, 13);
    447447  }
    448448  void do_final_block(Lex & lex, Marker & marker, Callouts & callouts, BitBlock EOF_mask) {
    449                 BitBlock DQuoteDelim, SQuoteDelim, AttListDelim, elem_name_starts;
    450                 BitBlock end_tag_marks, elem_name_ends, ParseError, AfterWS, AttListEnd;
    451                 BitBlock AttNameStart, AttNameFollow, EqExpected, AttValPos, DQuoteAttVal;
    452                 BitBlock SQuoteAttVal, DQuoteAttEnd, SQuoteAttEnd, AttValEnd, AttValFollow;
    453                 BitBlock STagEnds, EmptyTag_marks, EndTagEnds;
     449                BitBlock DQuoteDelim, SQuoteDelim, AttListDelim, ElemName_starts, EndTag_marks;
     450                BitBlock elem_name_ends, ParseError, AfterWS, AttListEnd, AttNameStart;
     451                BitBlock AttNameFollow, EqExpected, AttValPos, DQuoteAttVal, SQuoteAttVal;
     452                BitBlock DQuoteAttEnd, SQuoteAttEnd, AttValEnd, AttValFollow, STagEnds;
     453                BitBlock EmptyTag_marks, EndTagEnds;
    454454
    455455
     
    458458        AttListDelim = simd_or(lex.Slash, lex.RAngle);
    459459        callouts.Transition_marks = marker.Tag_opener;
    460         elem_name_starts = simd_andc(marker.Tag_opener, lex.Slash);
    461         end_tag_marks = simd_and(marker.Tag_opener, lex.Slash);
    462         callouts.Symbol_starts = simd_or(callouts.Symbol_starts, elem_name_starts);
    463         elem_name_ends = BitBlock_scanthru_ci(elem_name_starts, lex.NameScan, carryQ, 0);
     460        ElemName_starts = simd_andc(marker.Tag_opener, lex.Slash);
     461        EndTag_marks = simd_and(marker.Tag_opener, lex.Slash);
     462        callouts.Symbol_starts = simd_or(callouts.Symbol_starts, ElemName_starts);
     463        elem_name_ends = BitBlock_scanthru_ci(ElemName_starts, lex.NameScan, carryQ, 0);
    464464        callouts.Symbol_ends = elem_name_ends;
    465         ParseError = simd_and(elem_name_starts, elem_name_ends);
     465        ParseError = simd_and(ElemName_starts, elem_name_ends);
    466466        if ((bitblock_has_bit(simd_and(elem_name_ends, lex.WS)) || CarryTest(carryQ, 1, 8))) {
    467467          AfterWS = BitBlock_scanthru_ci(elem_name_ends, lex.WS, carryQ, 1);
     
    470470          if ((bitblock_has_bit(simd_and(AttNameStart, EOF_mask)) || CarryTest(carryQ, 2, 7))) {
    471471            ParseError = simd_or(ParseError, simd_andc(AttNameStart, lex.NameScan));
    472             callouts.symbol_starts = simd_or(callouts.symbol_starts, AttNameStart);
     472            callouts.Symbol_starts = simd_or(callouts.Symbol_starts, AttNameStart);
    473473            AttNameFollow = BitBlock_scanthru_ci(AttNameStart, lex.NameScan, carryQ, 2);
    474             callouts.symbol_ends = simd_or(callouts.symbol_ends, AttNameFollow);
     474            callouts.Symbol_ends = simd_or(callouts.Symbol_ends, AttNameFollow);
    475475            callouts.Transition_marks = simd_or(callouts.Transition_marks, AttNameFollow);
    476476            if ((bitblock_has_bit(simd_and(AttNameFollow, lex.WS)) || CarryTest(carryQ, 3, 1))) {
     
    505505            while (bitblock_has_bit(simd_and(AttNameStart, EOF_mask))) {
    506506              ParseError = simd_or(ParseError, simd_andc(AttNameStart, lex.NameScan));
    507               callouts.symbol_starts = simd_or(callouts.symbol_starts, AttNameStart);
     507              callouts.Symbol_starts = simd_or(callouts.Symbol_starts, AttNameStart);
    508508              AttNameFollow = BitBlock_scanthru(AttNameStart, lex.NameScan);
    509               callouts.symbol_ends = simd_or(callouts.symbol_ends, AttNameFollow);
     509              callouts.Symbol_ends = simd_or(callouts.Symbol_ends, AttNameFollow);
    510510              callouts.Transition_marks = simd_or(callouts.Transition_marks, AttNameFollow);
    511511              if (bitblock_has_bit(simd_and(AttNameFollow, lex.WS))) {
     
    549549        STagEnds = simd_and(AttListEnd, lex.RAngle);
    550550        EmptyTag_marks = BitBlock_advance_ci(simd_and(AttListEnd, lex.Slash), carryQ, 9);
    551         ParseError = simd_or(ParseError, simd_andc(tag_Callouts.EmptyTag_marks, lex.RAngle));
    552         EndTagEnds = BitBlock_scanthru_ci(tag_Callouts.EndTag_marks, simd_or(tag_Callouts.EndTag_marks, lex.NameScan), carryQ, 10);
     551        ParseError = simd_or(ParseError, simd_andc(EmptyTag_marks, lex.RAngle));
     552        EndTagEnds = BitBlock_scanthru_ci(EndTag_marks, simd_or(EndTag_marks, lex.NameScan), carryQ, 10);
    553553        if ((bitblock_has_bit(simd_and(EndTagEnds, lex.WS)) || CarryTest(carryQ, 11, 1))) {
    554554          EndTagEnds = BitBlock_scanthru_ci(EndTagEnds, lex.WS, carryQ, 11);
     
    562562        }
    563563        callouts.Transition_marks = simd_or(callouts.Transition_marks, simd_or(simd_or(STagEnds, EmptyTag_marks), EndTagEnds));
    564         marker.CD_closer = simd_andc(marker.CD_closer, BitBlock_sub_ci(simd_or(STagEnds, EmptyTag_marks), elem_name_starts, carryQ, 12));
     564        marker.CD_closer = simd_andc(marker.CD_closer, BitBlock_sub_ci(simd_or(STagEnds, EmptyTag_marks), ElemName_starts, carryQ, 12));
    565565  }
    566566  void do_segment(Lex lex[], Marker marker[], Callouts callouts[]) {
     
    10351035            callouts.Symbol_starts = simd_or(callouts.Symbol_starts, PI_Cursor);
    10361036            PI_Cursor = BitBlock_advance_ci_co(PI_Cursor, carryQ, 6);
    1037             ctCDPI_Callouts.PI_name_starts = simd_or(ctCDPI_Callouts.PI_name_starts, PI_Cursor);
    10381037            PI_name_end = BitBlock_scanthru_ci_co(PI_Cursor, lex.NameScan, carryQ, 7);
    10391038            PI_error = simd_and(PI_Cursor, PI_name_end);
     
    10891088              callouts.Symbol_starts = simd_or(callouts.Symbol_starts, PI_Cursor);
    10901089              PI_Cursor = BitBlock_advance_co(PI_Cursor, subcarryQ, 1);
    1091               ctCDPI_Callouts.PI_name_starts = simd_or(ctCDPI_Callouts.PI_name_starts, PI_Cursor);
    10921090              PI_name_end = BitBlock_scanthru_co(PI_Cursor, lex.NameScan, subcarryQ, 2);
    10931091              PI_error = simd_and(PI_Cursor, PI_name_end);
     
    11761174            callouts.Symbol_starts = simd_or(callouts.Symbol_starts, PI_Cursor);
    11771175            PI_Cursor = BitBlock_advance_ci(PI_Cursor, carryQ, 6);
    1178             ctCDPI_Callouts.PI_name_starts = simd_or(ctCDPI_Callouts.PI_name_starts, PI_Cursor);
    11791176            PI_name_end = BitBlock_scanthru_ci(PI_Cursor, lex.NameScan, carryQ, 7);
    11801177            PI_error = simd_and(PI_Cursor, PI_name_end);
     
    12281225              callouts.Symbol_starts = simd_or(callouts.Symbol_starts, PI_Cursor);
    12291226              PI_Cursor = BitBlock_advance(PI_Cursor);
    1230               ctCDPI_Callouts.PI_name_starts = simd_or(ctCDPI_Callouts.PI_name_starts, PI_Cursor);
    12311227              PI_name_end = BitBlock_scanthru(PI_Cursor, lex.NameScan);
    12321228              PI_error = simd_and(PI_Cursor, PI_name_end);
     
    13291325  basis_bits.bit_7 = simd_and(basis_bits.bit_7, EOF_mask);
    13301326}
    1331 
     1327/*
    13321328static inline void postprocess_do_block(Lex & lex, CtCDPI_Callouts & ctCDPI_Callouts, Ref_Callouts & ref_Callouts, Check_streams & check_streams, int chars_avail){
    13331329            tracker.StoreNewlines(lex.LF);
     
    13671363                tracker.AdvanceBlock();
    13681364}
    1369 
     1365*/
    13701366void do_process(FILE *infile, FILE *outfile) {
    13711367
     
    14011397  if (chars_avail > BUFFER_SIZE) chars_avail = BUFFER_SIZE;
    14021398
    1403   matcher.setSrc(srcbuf);
     1399  // matcher.setSrc(srcbuf);
    14041400
    14051401  if(chars_read<4){
     
    14651461  parse_refs.do_block(lex, marker, callouts);
    14661462  prepare_text.do_block(lex, u8, marker, callouts);
    1467           postprocess_do_block(lex, ctCDPI_Callouts, ref_Callouts, check_streams, chars_avail);
     1463          //postprocess_do_block(lex, ctCDPI_Callouts, ref_Callouts, check_streams, chars_avail);
    14681464      }
    1469       matcher.StreamScan(chars_avail);
    1470       matcher.Advance_buffer();
    1471       tracker.Advance_buffer();
     1465      // matcher.StreamScan(chars_avail);
     1466      // matcher.Advance_buffer();
     1467      // tracker.Advance_buffer();
    14721468      PERF_SEC_END(parser_timer, chars_avail);
    14731469           
     
    14981494  parse_refs.do_block(lex, marker, callouts);
    14991495  prepare_text.do_block(lex, u8, marker, callouts);
    1500           postprocess_do_block(lex, ctCDPI_Callouts, ref_Callouts, check_streams, chars_avail);
     1496          //postprocess_do_block(lex, ctCDPI_Callouts, ref_Callouts, check_streams, chars_avail);
    15011497          block_pos += BLOCK_SIZE;
    15021498          remaining -= BLOCK_SIZE;
     
    15121508  parse_refs.do_final_block(lex, marker, callouts, EOF_mask);
    15131509  prepare_text.do_final_block(lex, u8, marker, callouts, EOF_mask);
    1514           postprocess_do_block(lex, ctCDPI_Callouts, ref_Callouts, check_streams, chars_avail);
     1510          //postprocess_do_block(lex, ctCDPI_Callouts, ref_Callouts, check_streams, chars_avail);
    15151511    }
    15161512    buf_pos += chars_avail;
    15171513    buffer_base = buf_pos;
    15181514
    1519     matcher.StreamScan(chars_avail);
    1520     matcher.Advance_buffer();
    1521     tracker.Advance_buffer();
     1515    // matcher.StreamScan(chars_avail);
     1516    // matcher.Advance_buffer();
     1517    // tracker.Advance_buffer();
    15221518
    15231519
    15241520    PERF_SEC_END(parser_timer, chars_avail);
    1525     if (matcher.depth != 0) {
    1526       fprintf(stderr, "tag matching error (depth %i) at position %i\n", matcher.depth, buffer_base);
    1527       exit(-1);
    1528     }
     1521    // if (matcher.depth != 0) {
     1522    //  fprintf(stderr, "tag matching error (depth %i) at position %i\n", matcher.depth, buffer_base);
     1523    //  exit(-1);
     1524    // }
    15291525}
    15301526
Note: See TracChangeset for help on using the changeset viewer.