public final AntlrPilarParser.typeVarTuple_return typeVarTuple()
      throws RecognitionException {
    AntlrPilarParser.typeVarTuple_return retval = new AntlrPilarParser.typeVarTuple_return();
    retval.start = input.LT(1);
    int typeVarTuple_StartIndex = input.index();
    Object root_0 = null;

    Token t = null;
    Token char_literal88 = null;
    Token char_literal90 = null;
    AntlrPilarParser.typeVar_return typeVar87 = null;

    AntlrPilarParser.typeVar_return typeVar89 = null;

    Object t_tree = null;
    Object char_literal88_tree = null;
    Object char_literal90_tree = null;
    RewriteRuleTokenStream stream_172 = new RewriteRuleTokenStream(adaptor,
        "token 172");
    RewriteRuleTokenStream stream_168 = new RewriteRuleTokenStream(adaptor,
        "token 168");
    RewriteRuleTokenStream stream_167 = new RewriteRuleTokenStream(adaptor,
        "token 167");
    RewriteRuleSubtreeStream stream_typeVar = new RewriteRuleSubtreeStream(
        adaptor, "rule typeVar");
    try {
      if (state.backtracking > 0 && alreadyParsedRule(input, 26)) {
        return retval;
      }
      // /Users/robby/Repositories/sireum-parser/sireum-parser/src/main/java/org/sireum/pilar/parser/AntlrPilar.g:293:2: (t= '<' typeVar ( ',' typeVar )* '>' -> ^( TYPEVAR_TUPLE[$t] ^( LIST ( typeVar )+ ) ) )
      // /Users/robby/Repositories/sireum-parser/sireum-parser/src/main/java/org/sireum/pilar/parser/AntlrPilar.g:293:4: t= '<' typeVar ( ',' typeVar )* '>'
      {
        t = (Token) match(input, 167, FOLLOW_167_in_typeVarTuple2217);
        if (state.failed) return retval;
        if (state.backtracking == 0) stream_167.add(t);

        pushFollow(FOLLOW_typeVar_in_typeVarTuple2219);
        typeVar87 = typeVar();

        state._fsp--;
        if (state.failed) return retval;
        if (state.backtracking == 0) stream_typeVar.add(typeVar87.getTree());
        // /Users/robby/Repositories/sireum-parser/sireum-parser/src/main/java/org/sireum/pilar/parser/AntlrPilar.g:293:18: ( ',' typeVar )*
        loop22: do {
          int alt22 = 2;
          int LA22_0 = input.LA(1);

          if ((LA22_0 == 172)) {
            alt22 = 1;
          }

          switch (alt22) {
            case 1:
            // /Users/robby/Repositories/sireum-parser/sireum-parser/src/main/java/org/sireum/pilar/parser/AntlrPilar.g:293:20: ',' typeVar
            {
              char_literal88 = (Token) match(
                  input,
                  172,
                  FOLLOW_172_in_typeVarTuple2223);
              if (state.failed) return retval;
              if (state.backtracking == 0) stream_172.add(char_literal88);

              pushFollow(FOLLOW_typeVar_in_typeVarTuple2225);
              typeVar89 = typeVar();

              state._fsp--;
              if (state.failed) return retval;
              if (state.backtracking == 0)
                stream_typeVar.add(typeVar89.getTree());

            }
              break;

            default:
              break loop22;
          }
        } while (true);

        char_literal90 = (Token) match(
            input,
            168,
            FOLLOW_168_in_typeVarTuple2230);
        if (state.failed) return retval;
        if (state.backtracking == 0) stream_168.add(char_literal90);

        // AST REWRITE
        // elements: typeVar
        // token labels: 
        // rule labels: retval
        // token list labels: 
        // rule list labels: 
        // wildcard labels: 
        if (state.backtracking == 0) {
          retval.tree = root_0;
          RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(
              adaptor, "rule retval", retval != null ? retval.tree : null);

          root_0 = (Object) adaptor.nil();
          // 293:41: -> ^( TYPEVAR_TUPLE[$t] ^( LIST ( typeVar )+ ) )
          {
            // /Users/robby/Repositories/sireum-parser/sireum-parser/src/main/java/org/sireum/pilar/parser/AntlrPilar.g:293:44: ^( TYPEVAR_TUPLE[$t] ^( LIST ( typeVar )+ ) )
            {
              Object root_1 = (Object) adaptor.nil();
              root_1 = (Object) adaptor.becomeRoot(
                  (Object) adaptor.create(TYPEVAR_TUPLE, t),
                  root_1);

              // /Users/robby/Repositories/sireum-parser/sireum-parser/src/main/java/org/sireum/pilar/parser/AntlrPilar.g:293:64: ^( LIST ( typeVar )+ )
              {
                Object root_2 = (Object) adaptor.nil();
                root_2 = (Object) adaptor.becomeRoot(
                    (Object) adaptor.create(LIST, "LIST"),
                    root_2);

                if (!(stream_typeVar.hasNext())) {
                  throw new RewriteEarlyExitException();
                }
                while (stream_typeVar.hasNext()) {
                  adaptor.addChild(root_2, stream_typeVar.nextTree());

                }
                stream_typeVar.reset();

                adaptor.addChild(root_1, root_2);
              }

              adaptor.addChild(root_0, root_1);
            }

          }

          retval.tree = root_0;
        }
      }

      retval.stop = input.LT(-1);

      if (state.backtracking == 0) {

        retval.tree = (Object) adaptor.rulePostProcessing(root_0);
        adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
      }
    } catch (RecognitionException re) {
      reportError(re);
      recover(input, re);
      retval.tree = (Object) adaptor.errorNode(
          input,
          retval.start,
          input.LT(-1),
          re);

    } finally {
      if (state.backtracking > 0) {
        memoize(input, 26, typeVarTuple_StartIndex);
      }
    }
    return retval;
  }