<awangdev>1106. Parsing A Boolean Expression_1.java
private String findExpBlock(String s, int i) {

        StringBuffer sb = new StringBuffer();
        Stack<Character> stack = new Stack<>();
        while (sb.length() == 0 || !stack.isEmpty()) {
            char c = s.charAt(i++);
            sb.append(c);
            if (c == '(') stack.push(c);
            if (c == ')') stack.pop();
            if (stack.isEmpty()) break;
        }
        return sb.toString();
    }
private String var_0 ( String var_2 , int var_3 ) {
  StringBuffer var_5 = new StringBuffer ( ) ;
  Stack < Character > var_8 = new Stack < > ( ) ;
  while ( var_5 . length ( ) == 0 || ! var_8 . isEmpty ( ) ) {
    char var_13 = var_2 . charAt ( var_3 ++ ) ;
    var_5 . append ( var_13 ) ;
    if ( var_13 == '(' ) var_8 . push ( var_13 ) ;
    if ( var_13 == ')' ) var_8 . pop ( ) ;
    if ( var_8 . isEmpty ( ) ) break ;
  }
  return var_5 . toString ( ) ;
}
