public final AntlrPilarParser.constDeclaration_return constDeclaration()
      throws RecognitionException {
    AntlrPilarParser.constDeclaration_return retval = new AntlrPilarParser.constDeclaration_return();
    retval.start = input.LT(1);
    int constDeclaration_StartIndex = input.index();
    Object root_0 = null;

    Token t = null;
    Token ID59 = null;
    Token char_literal61 = null;
    Token char_literal63 = null;
    AntlrPilarParser.annotationList_return annotationList60 = null;

    AntlrPilarParser.constElement_return constElement62 = null;

    Object t_tree = null;
    Object ID59_tree = null;
    Object char_literal61_tree = null;
    Object char_literal63_tree = null;
    RewriteRuleTokenStream stream_ID = new RewriteRuleTokenStream(adaptor,
        "token ID");
    RewriteRuleTokenStream stream_178 = new RewriteRuleTokenStream(adaptor,
        "token 178");
    RewriteRuleTokenStream stream_177 = new RewriteRuleTokenStream(adaptor,
        "token 177");
    RewriteRuleTokenStream stream_176 = new RewriteRuleTokenStream(adaptor,
        "token 176");
    RewriteRuleSubtreeStream stream_annotationList = new RewriteRuleSubtreeStream(
        adaptor, "rule annotationList");
    RewriteRuleSubtreeStream stream_constElement = new RewriteRuleSubtreeStream(
        adaptor, "rule constElement");
    try {
      if (state.backtracking > 0 && alreadyParsedRule(input, 20)) {
        return retval;
      }
      // /Users/robby/Repositories/sireum-parser/sireum-parser/src/main/java/org/sireum/pilar/parser/AntlrPilar.g:261:2: (t= 'const' ID annotationList '{' ( constElement )+ '}' -> ^( CONST[$t] ID annotationList ^( LIST ( constElement )+ ) ) )
      // /Users/robby/Repositories/sireum-parser/sireum-parser/src/main/java/org/sireum/pilar/parser/AntlrPilar.g:261:4: t= 'const' ID annotationList '{' ( constElement )+ '}'
      {
        t = (Token) match(input, 176, FOLLOW_176_in_constDeclaration1847);
        if (state.failed) return retval;
        if (state.backtracking == 0) stream_176.add(t);

        ID59 = (Token) match(input, ID, FOLLOW_ID_in_constDeclaration1849);
        if (state.failed) return retval;
        if (state.backtracking == 0) stream_ID.add(ID59);

        pushFollow(FOLLOW_annotationList_in_constDeclaration1851);
        annotationList60 = annotationList();

        state._fsp--;
        if (state.failed) return retval;
        if (state.backtracking == 0)
          stream_annotationList.add(annotationList60.getTree());
        char_literal61 = (Token) match(
            input,
            177,
            FOLLOW_177_in_constDeclaration1856);
        if (state.failed) return retval;
        if (state.backtracking == 0) stream_177.add(char_literal61);

        // /Users/robby/Repositories/sireum-parser/sireum-parser/src/main/java/org/sireum/pilar/parser/AntlrPilar.g:262:8: ( constElement )+
        int cnt17 = 0;
        loop17: do {
          int alt17 = 2;
          int LA17_0 = input.LA(1);

          if ((LA17_0 == ID)) {
            alt17 = 1;
          }

          switch (alt17) {
            case 1:
            // /Users/robby/Repositories/sireum-parser/sireum-parser/src/main/java/org/sireum/pilar/parser/AntlrPilar.g:0:0: constElement
            {
              pushFollow(FOLLOW_constElement_in_constDeclaration1858);
              constElement62 = constElement();

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

            }
              break;

            default:
              if (cnt17 >= 1) break loop17;
              if (state.backtracking > 0) {
                state.failed = true;
                return retval;
              }
              EarlyExitException eee = new EarlyExitException(17, input);
              throw eee;
          }
          cnt17++;
        } while (true);

        char_literal63 = (Token) match(
            input,
            178,
            FOLLOW_178_in_constDeclaration1861);
        if (state.failed) return retval;
        if (state.backtracking == 0) stream_178.add(char_literal63);

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

              adaptor.addChild(root_1, stream_ID.nextNode());
              adaptor.addChild(root_1, stream_annotationList.nextTree());
              // /Users/robby/Repositories/sireum-parser/sireum-parser/src/main/java/org/sireum/pilar/parser/AntlrPilar.g:262:74: ^( LIST ( constElement )+ )
              {
                Object root_2 = (Object) adaptor.nil();
                root_2 = (Object) adaptor.becomeRoot(
                    (Object) adaptor.create(LIST, "LIST"),
                    root_2);

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

                }
                stream_constElement.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, 20, constDeclaration_StartIndex);
      }
    }
    return retval;
  }