(_p int)
| 3638 | } |
| 3639 | |
| 3640 | func (p *SqlBaseParser) relation(_p int) (localctx IRelationContext) { |
| 3641 | var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext() |
| 3642 | _parentState := p.GetState() |
| 3643 | localctx = NewRelationContext(p, p.GetParserRuleContext(), _parentState) |
| 3644 | var _prevctx IRelationContext = localctx |
| 3645 | var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning. |
| 3646 | _startState := 28 |
| 3647 | p.EnterRecursionRule(localctx, 28, SqlBaseParserRULE_relation, _p) |
| 3648 | |
| 3649 | defer func() { |
| 3650 | p.UnrollRecursionContexts(_parentctx) |
| 3651 | }() |
| 3652 | |
| 3653 | defer func() { |
| 3654 | if err := recover(); err != nil { |
| 3655 | if v, ok := err.(antlr.RecognitionException); ok { |
| 3656 | localctx.SetException(v) |
| 3657 | p.GetErrorHandler().ReportError(p, v) |
| 3658 | p.GetErrorHandler().Recover(p, v) |
| 3659 | } else { |
| 3660 | panic(err) |
| 3661 | } |
| 3662 | } |
| 3663 | }() |
| 3664 | |
| 3665 | var _alt int |
| 3666 | |
| 3667 | p.EnterOuterAlt(localctx, 1) |
| 3668 | localctx = NewRelationDefaultContext(p, localctx) |
| 3669 | p.SetParserRuleContext(localctx) |
| 3670 | _prevctx = localctx |
| 3671 | |
| 3672 | { |
| 3673 | p.SetState(262) |
| 3674 | p.SampledRelation() |
| 3675 | } |
| 3676 | |
| 3677 | p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) |
| 3678 | p.SetState(282) |
| 3679 | p.GetErrorHandler().Sync(p) |
| 3680 | _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 31, p.GetParserRuleContext()) |
| 3681 | |
| 3682 | for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { |
| 3683 | if _alt == 1 { |
| 3684 | if p.GetParseListeners() != nil { |
| 3685 | p.TriggerExitRuleEvent() |
| 3686 | } |
| 3687 | _prevctx = localctx |
| 3688 | localctx = NewJoinRelationContext(p, NewRelationContext(p, _parentctx, _parentState)) |
| 3689 | localctx.(*JoinRelationContext).left = _prevctx |
| 3690 | |
| 3691 | p.PushNewRecursionContext(localctx, _startState, SqlBaseParserRULE_relation) |
| 3692 | p.SetState(264) |
| 3693 | |
| 3694 | if !(p.Precpred(p.GetParserRuleContext(), 2)) { |
| 3695 | panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", "")) |
| 3696 | } |
| 3697 | p.SetState(278) |
no test coverage detected