anchor.diff:      return position + 4;
     }
   
  +  /**
  +   * Parses a string value.
  +   *
  +   * Initial [position] is right after the initial quote.
  +   * Returned position right after the final quote.
  +   */
     int parseString(int position) {
       // Format: '"'([^\x00-\x1f\\\"]|'\\'[bfnrt/\\"])*'"'
       // Initial position is right after first '"'.
       int start = position;
  -    int char;
  -    do {
  -      if (position == source.length) {
  -        fail(start - 1, "Unterminated string");
  -      }
  -      char = source.codeUnitAt(position);
  +    while (position < source.length) {
  +      int char = source.codeUnitAt(position++);
  +      // BACKSLASH is larger than QUOTE and SPACE.
  +      if (char > BACKSLASH) {
  +        continue;
  +      }
  +      if (char == BACKSLASH) {
  +        return parseStringWithEscapes(start, position - 1);
  +      }
         if (char == QUOTE) {
  -        listener.handleString(source.substring(start, position));
  -        return position + 1;
  +        listener.handleString(source.substring(start, position - 1));
  +        return position;
         }
         if (char < SPACE) {
  -        fail(position, "Control character in string");
  -      }
  -      position++;
  -    } while (char != BACKSLASH);
  +        fail(position - 1, "Control character in string");
  +      }
  +    }
  +    fail(start - 1, "Unterminated string");
  +  }
  +
  +  int parseStringWithEscapes(start, position) {
       // Backslash escape detected. Collect character codes for rest of string.
  -    int firstEscape = position - 1;
  +    int firstEscape = position;
       List<int> chars = <int>[];
  +    for (int i = start; i < firstEscape; i++) {
  +      chars.add(source.codeUnitAt(i));
  +    }
  +    position++;
       while (true) {
         if (position == source.length) {
           fail(start - 1, "Unterminated string");
         }
  -      char = source.codeUnitAt(position);
  +      int char = source.codeUnitAt(position);
         switch (char) {
           case CHAR_b: char = BACKSPACE; break;
           case CHAR_f: char = FORM_FEED; break;
  
positive.code:       if (char < CHAR_0 || char > CHAR_9) {
          fail(position, "Missing expected digit");
        }
        do {
          position++;
          if (position == length) return _handleLiteral(start, position, true);
          char = source.codeUnitAt(position);
        } while (CHAR_0 <= char && char <= CHAR_9);
      }
      return _handleLiteral(start, position, isDouble);
    }
  
    void fail(int position, [String message]) {
  
negative.code:     return position + 5;
    }
  
    /**
     * Parses a "null" literal starting at [position].
     *
     * [:source[position]:] must be "n".
     */
  