public final AntlrPilarParser.typeVar_return typeVar()
      throws RecognitionException {
    AntlrPilarParser.typeVar_return retval = new AntlrPilarParser.typeVar_return();
    retval.start = input.LT(1);
    int typeVar_StartIndex = input.index();
    Object root_0 = null;

    Token t = null;
    AntlrPilarParser.annotationList_return annotationList91 = null;

    Object t_tree = null;
    RewriteRuleTokenStream stream_TYPEVARID = new RewriteRuleTokenStream(
        adaptor, "token TYPEVARID");
    RewriteRuleSubtreeStream stream_annotationList = new RewriteRuleSubtreeStream(
        adaptor, "rule annotationList");
    try {
      if (state.backtracking > 0 && alreadyParsedRule(input, 27)) {
        return retval;
      }
      // /Users/robby/Repositories/sireum-parser/sireum-parser/src/main/java/org/sireum/pilar/parser/AntlrPilar.g:297:2: (t= TYPEVARID annotationList -> ^( TYPEVAR[$t] TYPEVARID annotationList ) )
      // /Users/robby/Repositories/sireum-parser/sireum-parser/src/main/java/org/sireum/pilar/parser/AntlrPilar.g:297:4: t= TYPEVARID annotationList
      {
        t = (Token) match(input, TYPEVARID, FOLLOW_TYPEVARID_in_typeVar2259);
        if (state.failed) return retval;
        if (state.backtracking == 0) stream_TYPEVARID.add(t);

        pushFollow(FOLLOW_annotationList_in_typeVar2261);
        annotationList91 = annotationList();

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

        // AST REWRITE
        // elements: annotationList, TYPEVARID
        // 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();
          // 297:41: -> ^( TYPEVAR[$t] TYPEVARID annotationList )
          {
            // /Users/robby/Repositories/sireum-parser/sireum-parser/src/main/java/org/sireum/pilar/parser/AntlrPilar.g:297:44: ^( TYPEVAR[$t] TYPEVARID annotationList )
            {
              Object root_1 = (Object) adaptor.nil();
              root_1 = (Object) adaptor.becomeRoot(
                  (Object) adaptor.create(TYPEVAR, t),
                  root_1);

              adaptor.addChild(root_1, stream_TYPEVARID.nextNode());
              adaptor.addChild(root_1, stream_annotationList.nextTree());

              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, 27, typeVar_StartIndex);
      }
    }
    return retval;
  }