Changeset 853


Ignore:
Timestamp:
Dec 23, 2010, 2:50:39 PM (8 years ago)
Author:
lindanl
Message:

Fixed bug in tag matching.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/src/tag_matcher.h

    r754 r853  
    6161      /* full 16 byte match */
    6262      if (simd_all_eq_8(sisd_load_unaligned((SIMD_type*)&s1[i]), sisd_load_unaligned((SIMD_type*)&s2[i]))) {
    63         lgth -= sizeof(SIMD_type);
    64         i +=sizeof(SIMD_type);
     63                lgth -= sizeof(SIMD_type);
     64                i +=sizeof(SIMD_type);
    6565      }
    6666      else {
    67         return 0;
     67                return 0;
    6868      }
    6969    }
     
    9292          }
    9393          else {
    94 //            cout << "matchlen = " << matchlen << endl;
    9594//            cout << "end tag is " << string(&srcbuf[pos],tag_lgth_stack[depth]) << endl ;
    9695//            cout << "start tag is " << string(tag_stack[depth],tag_lgth_stack[depth]) << endl ;
     
    235234      if(pos!=chars_avail){
    236235        fprintf(stderr,"illegal content after root element at position = %i\n",buf_base+pos);
    237         exit(-1);       
     236        exit(-1);
    238237      }   
    239238    }
     
    249248      state = Clear;
    250249      int lgth = tag_lgth_stack[depth];
    251       if (does_match(tag_stack[depth]+inTagPos,srcbuf,lgth-inTagPos) && ((srcbuf[lgth] == '>') ||(srcbuf[lgth] <= ' '))) return ;       
     250      if (does_match(tag_stack[depth]+inTagPos,srcbuf,lgth-inTagPos) && ((srcbuf[lgth-inTagPos] == '>') ||(srcbuf[lgth-inTagPos] <= ' '))) return ;
    252251      else {
    253252          fprintf(stderr,"tag name mismatch at position = %i\n",buf_base);
Note: See TracChangeset for help on using the changeset viewer.