def program(self):
    localctx = decafJavierParser.ProgramContext(self, self._ctx, self.state)
    self.enterRule(localctx, 0, self.RULE_program)
    self._la = 0
    try:
        self.enterOuterAlt(localctx, 1)
        self.state = 50
        self.match(decafJavierParser.CLASS)
        self.state = 51
        self.match(decafJavierParser.PROGRAM)
        self.state = 52
        self.match(decafJavierParser.LCURLY)
        self.state = 56
        self._errHandler.sync(self)
        _alt = self._interp.adaptivePredict(self._input, 0, self._ctx)
        while ((_alt != 2) and (_alt != ATN.INVALID_ALT_NUMBER)):
            if (_alt == 1):
                self.state = 53
                self.field_declr()
            self.state = 58
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 0, self._ctx)
        self.state = 62
        self._errHandler.sync(self)
        _la = self._input.LA(1)
        while (((_la & (~ 63)) == 0) and (((1 << _la) & (((1 << decafJavierParser.BOOLEAN) | (1 << decafJavierParser.INT)) | (1 << decafJavierParser.VOID))) != 0)):
            self.state = 59
            self.method_declr()
            self.state = 64
            self._errHandler.sync(self)
            _la = self._input.LA(1)
        self.state = 65
        self.match(decafJavierParser.RCURLY)
    except RecognitionException as re:
        localctx.exception = re
        self._errHandler.reportError(self, re)
        self._errHandler.recover(self, re)
    finally:
        self.exitRule()
    return localctx
def program(self):
    localctx = decafJavierParser.ProgramContext(self, self._ctx, self.state)
    self.enterRule(localctx, 0, self.RULE_program)
    self._la = 0
    try:
        self.enterOuterAlt(localctx, 1)
        self.state = 50
        self.match(decafJavierParser.CLASS)
        self.state = 51
        self.match(decafJavierParser.PROGRAM)
        self.state = 52
        self.match(decafJavierParser.LCURLY)
        self.state = 56
        self._errHandler.sync(self)
        _alt = self._interp.adaptivePredict(self._input, 0, self._ctx)
        while ((_alt != 2) and (_alt != ATN.INVALID_ALT_NUMBER)):
            if (_alt == 1):
                self.state = 53
                self.field_declr()
            self.state = 58
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input, 0, self._ctx)
        self.state = 62
        self._errHandler.sync(self)
        _la = self._input.LA(1)
        while (((_la & (~ 63)) == 0) and (((1 << _la) & (((1 << decafJavierParser.BOOLEAN) | (1 << decafJavierParser.INT)) | (1 << decafJavierParser.VOID))) != 0)):
            self.state = 59
            self.method_declr()
            self.state = 64
            self._errHandler.sync(self)
            _la = self._input.LA(1)
        self.state = 65
        self.match(decafJavierParser.RCURLY)
    except RecognitionException as re:
        localctx.exception = re
        self._errHandler.reportError(self, re)
        self._errHandler.recover(self, re)
    finally:
        self.exitRule()
    return localctx