logback-android/src/main/java/ch/qos/logback/core/subst/Parser.java
private Node T() throws ScanException {
    Token t = peekAtCurentToken();

    switch (t.type) {
      case LITERAL:
        advanceTokenPointer();
        return makeNewLiteralNode(t.payload);
      case CURLY_LEFT:
        advanceTokenPointer();
        Node innerNode = C();
        Token right = peekAtCurentToken();
        expectCurlyRight(right);
        advanceTokenPointer();
        Node curlyLeft = makeNewLiteralNode(CoreConstants.LEFT_ACCOLADE);
        curlyLeft.append(innerNode);
        curlyLeft.append(makeNewLiteralNode(CoreConstants.RIGHT_ACCOLADE));
        return curlyLeft;
      case START:
        advanceTokenPointer();
        Node v = V();
        Token w = peekAtCurentToken();
        expectCurlyRight(w);
        advanceTokenPointer();
        return v;
      default:
        return null;
    }
  }
private Node T() throws ScanException {
    Token t = peekAtCurentToken();

    switch (t.type) {
      case LITERAL:
        advanceTokenPointer();
        return makeNewLiteralNode(t.payload);
      case CURLY_LEFT:
        advanceTokenPointer();
        Node innerNode = C();
        Token right = peekAtCurentToken();
        expectCurlyRight(right);
        advanceTokenPointer();
        Node curlyLeft = makeNewLiteralNode(CoreConstants.LEFT_ACCOLADE);
        curlyLeft.append(innerNode);
        curlyLeft.append(makeNewLiteralNode(CoreConstants.RIGHT_ACCOLADE));
        return curlyLeft;
      case START:
        advanceTokenPointer();
        Node v = V();
        Token w = peekAtCurentToken();
        expectCurlyRight(w);
        advanceTokenPointer();
        return v;
      default:
        return null;
    }
  }
private Node T ( ) throws ScanException { Token t = peekAtCurentToken ( ) ; switch ( t . type ) { case LITERAL : advanceTokenPointer ( ) ; return makeNewLiteralNode ( t . payload ) ; case CURLY_LEFT : advanceTokenPointer ( ) ; Node innerNode = C ( ) ; Token right = peekAtCurentToken ( ) ; expectCurlyRight ( right ) ; advanceTokenPointer ( ) ; Node curlyLeft = makeNewLiteralNode ( CoreConstants . LEFT_ACCOLADE ) ; curlyLeft . append ( innerNode ) ; curlyLeft . append ( makeNewLiteralNode ( CoreConstants . RIGHT_ACCOLADE ) ) ; return curlyLeft ; case START : advanceTokenPointer ( ) ; Node v = V ( ) ; Token w = peekAtCurentToken ( ) ; expectCurlyRight ( w ) ; advanceTokenPointer ( ) ; return v ; default : return null ; } }
T = LITERAL | '${' V '}'
T = LITERAL | $ { V }