code: private void startExpression(int position) throws MalformedUriTemplateException
      {
  
          if (startedTemplate)
          {
              if (expressionCaptureOn)
  
              {
                  throw new MalformedUriTemplateException("A new expression start brace found at " + position
                  + " but another unclosed expression was found at " + startPosition, position);
              }
              literalCaptureOn = false;
              expressionCaptureOn = true;
              startPosition = position;
          }
          else
          {
              throw new IllegalStateException("Cannot start an expression without beginning the template");
          }
      }
docs: Called when the start of an expression has been encountered.