class_docstr: For `TADS 3 <http://www.tads.org/>`_ source code.
class_docstr_tok: ["For","`","TADS","3","<","http",":","\/\/www.tads.org\/",">","`","_","source","code","."]
code: def _make_string_state(
      triple, double, verbatim=None, _escape=_escape
  ):
      if verbatim:
          verbatim = "".join(
              [
                  "(?:%s|%s)"
                  % (re.escape(c.lower()), re.escape(c.upper()))
                  for c in verbatim
              ]
          )
      char = r'"' if double else r"'"
      token = String.Double if double else String.Single
      escaped_quotes = (
          r"+|%s(?!%s{2})" % (char, char) if triple else r""
      )
      prefix = "%s%s" % ("t" if triple else "", "d" if double else "s")
      tag_state_name = "%sqt" % prefix
      state = []
      if triple:
          state += [
              (r"%s{3,}" % char, token, "#pop"),
              (r"\\%s+" % char, String.Escape),
              (char, token),
          ]
      else:
          state.append((char, token, "#pop"))
      state += [include("s/verbatim"), (r"[^\\<&{}%s]+" % char, token)]
      if verbatim:
          # This regex can't use `(?i)` because escape sequences are
          # case-sensitive. `<\XMP>` works; `<\xmp>` doesn't.
          state.append(
              (
                  r"\\?<(/|\\\\|(?!%s)\\)%s(?=[\s=>])"
                  % (_escape, verbatim),
                  Name.Tag,
                  ("#pop", "%sqs" % prefix, tag_state_name),
              )
          )
      else:
          state += [
              (
                  r"\\?<!([^><\\%s]|<(?!<)|\\%s%s|%s|\\.)*>?"
                  % (char, char, escaped_quotes, _escape),
                  Comment.Multiline,
              ),
              (
                  r"(?i)\\?<listing(?=[\s=>]|\\>)",
                  Name.Tag,
                  ("#pop", "%sqs/listing" % prefix, tag_state_name),
              ),
              (
                  r"(?i)\\?<xmp(?=[\s=>]|\\>)",
                  Name.Tag,
                  ("#pop", "%sqs/xmp" % prefix, tag_state_name),
              ),
              (
                  r"\\?<([^\s=><\\%s]|<(?!<)|\\%s%s|%s|\\.)*"
                  % (char, char, escaped_quotes, _escape),
                  Name.Tag,
                  tag_state_name,
              ),
              include("s/entity"),
          ]
      state += [
          include("s/escape"),
          (
              r"\{([^}<\\%s]|<(?!<)|\\%s%s|%s|\\.)*\}"
              % (char, char, escaped_quotes, _escape),
              String.Interpol,
          ),
          (r"[\\&{}<]", token),
      ]
      return state
  
file_path: catboost/contrib/python/Pygments/py2/pygments/lexers/int_fiction.py
imports: import re
  from pygments.lexer import RegexLexer, include, bygroups, using, this, default, words
  from pygments.token import Text, Comment, Operator, Keyword, Name, String, Number, Punctuation, Error, Generic
label_desc: Use image node_id 1 for calling the Tads3Lexer obj's underlying member method code with example usage: obj._make_string_state(triple, double, verbatim, _escape) and returns: state