Ignore:
Timestamp:
Jan 26, 2008, 8:13:48 PM (12 years ago)
Author:
cameron
Message:

Unify DQuote/SQuote stream; xmlns bugfix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/parabix-0.39/src/bytelex.h

    r27 r30  
    1717}
    1818
     19template<CodeUnit_Base C>
     20inline bool AtQuote(unsigned char x8data[]) {
     21  return (x8data[0] == Ord<C, '"'>::value) | (x8data[0] == Ord<C, '\''>::value);
     22}
     23
    1924// Whitespace recognition.  This varies between XML 1.0 and
    2025// XML 1.1, but only the XML 1.0 version is needed.
     
    3944}
    4045
    41 
    42 
    4346template<CodeUnit_Base C>
    4447inline bool at_EndTag_Start(unsigned char x8data[]) {
     
    8386
    8487template<CodeUnit_Base C>
    85 inline bool at_EqualsDQuote(unsigned char x8data[]) {
    86   return s2int16(x8data) == c2int16<C, '=', '"'>::value;
    87 }
    88 
    89 template<CodeUnit_Base C>
    90 inline bool at_EqualsSQuote(unsigned char x8data[]) {
    91   return s2int16(x8data) == c2int16<C, '=', '\''>::value;
     88inline bool at_EqualsQuote(unsigned char x8data[]) {
     89  uint16_t EQ = s2int16(x8data);
     90  return (EQ == c2int16<C, '=', '"'>::value) | (EQ == c2int16<C, '=', '\''>::value);
    9291}
    9392
Note: See TracChangeset for help on using the changeset viewer.