code: private List<ImmutableTerm> addToTermsList(String str) {
          ArrayList<ImmutableTerm> terms = new ArrayList<>();
          int i, j;
          String st;
          str = str.substring(1, str.length() - 1);
          while (str.contains("{")) {
              i = getIndexOfCurlyB(str);
              if (i > 0) {
                  st = str.substring(0, i);
                  st = st.replace("\\\\", "");
                  terms.add(termFactory.getConstantLiteral(st));
                  str = str.substring(str.indexOf("{", i), str.length());
              } else if (i == 0) {
                  j = str.indexOf("}");
                  terms.add(termFactory.getVariable(str.substring(1, j)));
                  str = str.substring(j + 1, str.length());
              } else {
                  break;
              }
          }
          if (!str.equals("")) {
              str = str.replace("\\\\", "");
              terms.add(termFactory.getConstantLiteral(str));
          }
          return terms;
      }
docs: and adds parsed constant literals and template literal to terms list