Changeset 27 for trunk/src


Ignore:
Timestamp:
Jan 25, 2008, 8:42:04 AM (11 years ago)
Author:
cameron
Message:

parabix-0.39

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bytelex.h

    r26 r27  
    105105inline bool at_XmlDecl_start(unsigned char x8data[]) {
    106106  return (s5int64(x8data) == c5int64<C, '<', '?', 'x', 'm', 'l'>::value) &&
    107          at_WhiteSpace<C>(&x8data[5]);
     107         at_WhiteSpace<XML_1_0, C>(&x8data[5]);
    108108}
    109109
  • trunk/src/charsets/ext_ascii_8.c

    r17 r27  
    2929
    3030int Ext_ASCII_8_Lexer::BOM_size(int rel_pos) {
    31   if (s3int32((unsigned char *) &parsing_engine_data->x8data) == c3int32<Native,0xEF, 0xBB, 0xBF>::value)
    32     return 3;
     31  unsigned char * x8ch = (unsigned char *) parsing_engine_data->x8data;
     32  if ((x8ch[0] == 0xEF) && (x8ch[1] == 0xBB) && (x8ch[2] == 0xBF))
     33      return 3;
    3334  else return 0;
    3435}
  • trunk/src/engine.c

    r20 r27  
    120120#endif
    121121  switch (item) {
    122     case NonWS: while (at_WhiteSpace<ASCII>(cur())) Advance(1); break;
     122    case NonWS: while (at_WhiteSpace<XML_1_0, ASCII>(cur())) Advance(1); break;
    123123    case MarkupStart: while(!AtChar<ASCII,'<'>(cur()) && !AtChar<ASCII,'&'>(cur()) && !at_CDATA_End<ASCII>(cur())) Advance(1); break;
    124124    case CD_End_check: while(!at_CDATA_End<ASCII>(cur())) Advance(1); break;
     
    127127    case DQuote: while(!AtChar<ASCII,'<'>(cur()) && !AtChar<ASCII,'&'>(cur()) && !AtChar<ASCII,'"'>(cur())) Advance(1); break;
    128128    case SQuote: while(!AtChar<ASCII,'<'>(cur()) && !AtChar<ASCII,'&'>(cur()) && !AtChar<ASCII,'\''>(cur())) Advance(1); break;
    129     case NameFollow: while(!at_WhiteSpace<ASCII>(cur()) && !AtChar<ASCII,';'>(cur()) && !AtChar<ASCII,'/'>(cur()) && !AtChar<ASCII,'>'>(cur())
     129    case NameFollow: while(!at_WhiteSpace<XML_1_0, ASCII>(cur()) && !AtChar<ASCII,';'>(cur()) && !AtChar<ASCII,'/'>(cur()) && !AtChar<ASCII,'>'>(cur())
    130130                      && !AtChar<ASCII,'='>(cur()) && !AtChar<ASCII,'?'>(cur())) Advance(1); break;
    131131  }
     
    511511  Advance(5);
    512512  if (at_PI_End<ASCII>(cur())) {Advance(2); return;}
    513   if (!at_WhiteSpace<ASCII>(cur())) {Error_action(decl_start, AbsPos()); return;}
     513  if (!at_WhiteSpace<XML_1_0, ASCII>(cur())) {Error_action(decl_start, AbsPos()); return;}
    514514  ASCII_ScanTo(NonWS);
    515515  if (at_encoding<ASCII>(cur())) {
     
    535535      Advance(1);
    536536      if (at_PI_End<ASCII>(cur())) {Advance(2); return;}
    537       if (!at_WhiteSpace<ASCII>(cur())) {Error_action(decl_start, AbsPos()); return;}
     537      if (!at_WhiteSpace<XML_1_0, ASCII>(cur())) {Error_action(decl_start, AbsPos()); return;}
    538538      ASCII_ScanTo(NonWS);
    539539  }
     
    584584    Advance(5);
    585585    // Must have whitespace character before declaration.
    586     if (!at_WhiteSpace<ASCII>(cur())) {Error_action(decl_start, AbsPos()); return;}
     586    if (!at_WhiteSpace<XML_1_0, ASCII>(cur())) {Error_action(decl_start, AbsPos()); return;}
    587587    ASCII_ScanTo(NonWS);
    588588  }
Note: See TracChangeset for help on using the changeset viewer.