private bool leftRecExpr_sempred(LeftRecExprContext _localctx, int predIndex)
        {
            switch (predIndex)
            {
            case 0: return(Precpred(_ctx, 6));

            case 1: return(Precpred(_ctx, 5));

            case 2: return(Precpred(_ctx, 4));

            case 3: return(Precpred(_ctx, 3));

            case 4: return(Precpred(_ctx, 2));

            case 5: return(Precpred(_ctx, 1));
            }
            return(true);
        }
        private LeftRecExprContext leftRecExpr(int _p)
        {
            ParserRuleContext _parentctx = _ctx;
            int _parentState             = State;
            LeftRecExprContext _localctx = new LeftRecExprContext(_ctx, _parentState);
            LeftRecExprContext _prevctx  = _localctx;
            int _startState = 4;

            EnterRecursionRule(_localctx, 4, RULE_leftRecExpr, _p);
            int _la;

            try {
                int _alt;
                EnterOuterAlt(_localctx, 1);
                {
                    {
                        State = 27; atom();
                    }
                    _ctx.stop = _input.Lt(-1);
                    State     = 49;
                    _errHandler.Sync(this);
                    _alt = Interpreter.AdaptivePredict(_input, 1, _ctx);
                    while (_alt != 2 && _alt != AntlrOptimized::Antlr4.Runtime.Atn.ATN.InvalidAltNumber)
                    {
                        if (_alt == 1)
                        {
                            if (_parseListeners != null)
                            {
                                TriggerExitRuleEvent();
                            }
                            _prevctx = _localctx;
                            {
                                State = 47;
                                _errHandler.Sync(this);
                                switch (Interpreter.AdaptivePredict(_input, 0, _ctx))
                                {
                                case 1:
                                {
                                    _localctx = new LeftRecExprContext(_parentctx, _parentState);
                                    PushNewRecursionContext(_localctx, _startState, RULE_leftRecExpr);
                                    State = 29;
                                    if (!(Precpred(_ctx, 6)))
                                    {
                                        throw new FailedPredicateException(this, "Precpred(_ctx, 6)");
                                    }
                                    State = 30; Match(CARET);
                                    State = 31; leftRecExpr(6);
                                }
                                break;

                                case 2:
                                {
                                    _localctx = new LeftRecExprContext(_parentctx, _parentState);
                                    PushNewRecursionContext(_localctx, _startState, RULE_leftRecExpr);
                                    State = 32;
                                    if (!(Precpred(_ctx, 5)))
                                    {
                                        throw new FailedPredicateException(this, "Precpred(_ctx, 5)");
                                    }
                                    State = 33;
                                    _la   = _input.La(1);
                                    if (!((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << STAR) | (1L << SLASH) | (1L << PERCENT))) != 0)))
                                    {
                                        _errHandler.RecoverInline(this);
                                    }
                                    else
                                    {
                                        if (_input.La(1) == TokenConstants.Eof)
                                        {
                                            matchedEOF = true;
                                        }

                                        _errHandler.ReportMatch(this);
                                        Consume();
                                    }
                                    State = 34; leftRecExpr(6);
                                }
                                break;

                                case 3:
                                {
                                    _localctx = new LeftRecExprContext(_parentctx, _parentState);
                                    PushNewRecursionContext(_localctx, _startState, RULE_leftRecExpr);
                                    State = 35;
                                    if (!(Precpred(_ctx, 4)))
                                    {
                                        throw new FailedPredicateException(this, "Precpred(_ctx, 4)");
                                    }
                                    State = 36;
                                    _la   = _input.La(1);
                                    if (!(_la == PLUS || _la == MINUS))
                                    {
                                        _errHandler.RecoverInline(this);
                                    }
                                    else
                                    {
                                        if (_input.La(1) == TokenConstants.Eof)
                                        {
                                            matchedEOF = true;
                                        }

                                        _errHandler.ReportMatch(this);
                                        Consume();
                                    }
                                    State = 37; leftRecExpr(5);
                                }
                                break;

                                case 4:
                                {
                                    _localctx = new LeftRecExprContext(_parentctx, _parentState);
                                    PushNewRecursionContext(_localctx, _startState, RULE_leftRecExpr);
                                    State = 38;
                                    if (!(Precpred(_ctx, 3)))
                                    {
                                        throw new FailedPredicateException(this, "Precpred(_ctx, 3)");
                                    }
                                    State = 39;
                                    _la   = _input.La(1);
                                    if (!(_la == EQUAL || _la == NOT_EQUAL))
                                    {
                                        _errHandler.RecoverInline(this);
                                    }
                                    else
                                    {
                                        if (_input.La(1) == TokenConstants.Eof)
                                        {
                                            matchedEOF = true;
                                        }

                                        _errHandler.ReportMatch(this);
                                        Consume();
                                    }
                                    State = 40; leftRecExpr(4);
                                }
                                break;

                                case 5:
                                {
                                    _localctx = new LeftRecExprContext(_parentctx, _parentState);
                                    PushNewRecursionContext(_localctx, _startState, RULE_leftRecExpr);
                                    State = 41;
                                    if (!(Precpred(_ctx, 2)))
                                    {
                                        throw new FailedPredicateException(this, "Precpred(_ctx, 2)");
                                    }
                                    State = 42; Match(LOGICAL_AND);
                                    State = 43; leftRecExpr(3);
                                }
                                break;

                                case 6:
                                {
                                    _localctx = new LeftRecExprContext(_parentctx, _parentState);
                                    PushNewRecursionContext(_localctx, _startState, RULE_leftRecExpr);
                                    State = 44;
                                    if (!(Precpred(_ctx, 1)))
                                    {
                                        throw new FailedPredicateException(this, "Precpred(_ctx, 1)");
                                    }
                                    State = 45; Match(LOGICAL_OR);
                                    State = 46; leftRecExpr(2);
                                }
                                break;
                                }
                            }
                        }
                        State = 51;
                        _errHandler.Sync(this);
                        _alt = Interpreter.AdaptivePredict(_input, 1, _ctx);
                    }
                }
            }
            catch (RecognitionException re) {
                _localctx.exception = re;
                _errHandler.ReportError(this, re);
                _errHandler.Recover(this, re);
            }
            finally {
                UnrollRecursionContexts(_parentctx);
            }
            return(_localctx);
        }