State entered when we've seen a quoted string. Potentially emits a token.
431643
function inquotedstring($content){
        if (strlen($content) < 2) { // State exit or missing parameter.
            return true;
        }
        // Strip off the opening quote and add the reminder to the parsed token array.
        $this->tokens[] = new search_token(TOKEN_STRING,substr($content,1));
        return true;
    }
441020
protected function quote_escaped()
	{
		$this->value .= $this->data[$this->position];
		$this->position++;
		$this->state = 'quote';
	}
82995
private static void maybeQuote(StringBuilder buff, String value) {
        // PK48169 - handle a null value as well as an empty one
        if (null == value || 0 == value.length()) {
            buff.append("\"\"");
        } else if (needsQuote(value)) {
            buff.append('"');
            buff.append(value);
            buff.append('"');
        } else {
            buff.append(value);
        }
    }
296369
private void _string() throws
      IOException,
      CssException
  {

    if (debug)
    {
      checkState(QUOTES.matches((char) reader.curChar));
    }

    /*
       * Note: resulting token excludes start+end quotes
       */

    builder.type = Type.STRING;
    int quoteType = reader.curChar;

    // in strings, we let escapes in general pass through
    while (true)
    {
      CssReader.Mark mark = reader.mark();
      int ch = reader.next();
      if (ch == -1)
      {
        builder.error(SCANNER_PREMATURE_EOF, reader);
        reader.unread(ch, mark);
        break;
      }
      else if (ch == '\n' || ch == '\r' || ch == '\f')
      {
        builder.error(SCANNER_ILLEGAL_CHAR, reader, "NEWLINE",
            Type.STRING.name());
        reader.forward(TERMINATOR);
        break;
      }
      else if (ch == '\\')
      {
        int[] peek = reader.peek(2);
        int nl = isNewLine(peek);
        if (nl > 0)
        {
          // in strings, ignore backslash followed by a literal
          // newline
          reader.forward(nl);
          continue;
        }

      }
      else if (ch == quoteType && reader.prevChar != '\\')
      {
        break;
      }

      builder.append(ch);
    }

    if (debug && builder.errors.size() == 0)
    {
      checkState(QUOTES.matches((char) reader.curChar));
    }
  }
639091
function(tokenStr) {
            if (typeof tokenStr !== 'string') {
                return null;
            }
            var token = tokenCache[tokenStr];
            if (token !== undefined) {
                return token;
            } else {
                try {
                    token = tokens.validate(tokenStr, trustedPubKey);
                    tokenCache[tokenStr] = token;
                    return token;
                } catch (err) {
                    // did not validate, cache negative result.
                    tokenCache[tokenStr] = null;
                    return null;
                }
            }
        }
860170
def _process_tokens(self, char):
        

        if (char in self.WHITESPACE or char == self.COMMENT_START or
                char in self.QUOTES or char in self.TOKENS):

            add_token = True

            # escaped chars, keep going
            if char == self.SPACE or char in self.TOKENS:
                if self._escaped:
                    add_token = False

            # start of comment
            elif char == self.COMMENT_START:
                self._state = self.ST_COMMENT

            # start of quoted string
            elif char in self.QUOTES:
                if self._escaped:
                    # escaped, keep going
                    add_token = False

                else:
                    self._state = self.ST_STRING
                    self._last_quote = char  # store for later quote matching

            if add_token:
                # store token
                self._new_token()

                if char in self.TOKENS:
                    # store char as a new token
                    self._new_token([char])

                return  # skip adding token char

        self._token_chars.append(char)
544676
function (token, match, lastState) {
    var self = this;

    match = match.split('.');

    if (_reserved.indexOf(match[0]) !== -1) {
      utils.throwError('Reserved keyword "' + match[0] + '" attempted to be used as a variable', self.line, self.filename);
    }

    self.filterApplyIdx.push(self.out.length);
    if (lastState === _t.CURLYOPEN) {
      if (match.length > 1) {
        utils.throwError('Unexpected dot', self.line, self.filename);
      }
      self.out.push(match[0]);
      return;
    }

    self.out.push(self.checkMatch(match));
  }
162619
private Token quotedText(char quote) throws ScanException {
        nextChar(); // eat the '"'
        text = new StringBuilder();
        while (c != quote) {
            if (c == '\n') {
                throw new ScanException("Unclosed quoted text, reached end of line.");
            }
            text.append(c);
            nextChar();
        }
        nextChar(); // eat the '"'
        return TEXT;
    }
947935
function twTokenStrike(stream, state) {
		var maybeEnd = false,
			ch, nr;
			
		while (ch = stream.next()) {
			if (ch == "-" && maybeEnd) {
				state.tokenize = jsTokenBase;
				break;
			}
			maybeEnd = (ch == "-");
		}
		return ret("text", "strikethrough");
	}
251757
function tokenString(stream, state) {
    var current, prev, found_var = false;
    while (!stream.eol() && (current = stream.next()) != state.pending) {
      if (current === '$' && prev != '\\' && state.pending == '"') {
        found_var = true;
        break;
      }
      prev = current;
    }
    if (found_var) {
      stream.backUp(1);
    }
    if (current == state.pending) {
      state.continueString = false;
    } else {
      state.continueString = true;
    }
    return "string";
  }
886761
function(context: ParserContext): ?Token {
    const delimiter = context.reader.peek();
    if (delimiter !== '"' && delimiter !== "'") return null;
    if (!isInsideOpenBracket(context)) return null;

    // read until the delimiter
    let stringValue = context.reader.read();
    while (!context.reader.isEOF()) {
      const next = context.reader.read();
      stringValue += next;

      if (next === delimiter) break;
    }

    return context.createToken("string", stringValue);
  }
1256507
function (match) {
            var UNQUOTED = 1, QUOTED = 2;
            if (match[UNQUOTED]) {
                this._values.push(match[UNQUOTED]);
            } else
                /* if (match[QUOTED]) */
                {
                    this._values.push(this._unescapeQuoted(match[QUOTED]));
                }
        }
1220977
private boolean isPlainText(String state) {

        String val = A_CmsWorkplaceApp.getParamFromState(state, PLAIN_TEXT_PREFIX);
        return Boolean.parseBoolean(val);
    }
1176280
@SuppressWarnings("fallthrough")
    protected DCText quotedString() {
        int pos = bp;
        nextChar();

        loop:
        while (bp < buflen) {
            switch (ch) {
                case '\n': case '\r': case '\f':
                    newline = true;
                    break;

                case ' ': case '\t':
                    break;

                case '"':
                    nextChar();
                    // trim trailing white-space?
                    return m.at(pos).newTextTree(newString(pos, bp));

                case '@':
                    if (newline)
                        break loop;

            }
            nextChar();
        }
        return null;
    }
446040
private static String readQuotedString(Buffer buffer) throws EOFException {
    if (buffer.readByte() != '\"') throw new IllegalArgumentException();
    Buffer result = new Buffer();
    while (true) {
      long i = buffer.indexOfElement(QUOTED_STRING_DELIMITERS);
      if (i == -1L) return null; // Unterminated quoted string.

      if (buffer.getByte(i) == '"') {
        result.write(buffer, i);
        // Consume '"'.
        buffer.readByte();
        return result.readUtf8();
      }

      if (buffer.size() == i + 1L) return null; // Dangling escape.
      result.write(buffer, i);
      // Consume '\'.
      buffer.readByte();
      result.write(buffer, 1L); // The escaped character.
    }
  }
743629
def _process_string(self, char):
        

        if char in self.QUOTES:
            # end of quoted string:
            #   1) quote must match original quote
            #   2) not escaped quote (e.g. "hey there" vs "hey there\")
            #   3) actual escape char prior (e.g. "hey there\\")

            if (char == self._last_quote and
                    not self._escaped or self._double_escaped):

                # store token
                self._new_token()
                self._state = self.ST_TOKEN
                return  # skip adding token char

        elif char == self.ESCAPE:
            # escape character:
            #   double escaped if prior char was escape (e.g. "hey \\ there")

            if not self._double_escaped:
                self._double_escaped = self._escaped

        else:
            self._double_escaped = False

        self._token_chars.append(char)
308250
private String nextUnquotedValue() throws IOException {
    long i = source.indexOfElement(UNQUOTED_STRING_TERMINALS);
    return i != -1 ? buffer.readUtf8(i) : buffer.readUtf8();
  }