MCPcopy Index your code
hub / github.com/uber/aresdb / queryTerm

Method queryTerm

query/sql/antlrgen/sqlbase_parser.go:1525–1669  ·  view source on GitHub ↗
(_p int)

Source from the content-addressed store, hash-verified

1523}
1524
1525func (p *SqlBaseParser) queryTerm(_p int) (localctx IQueryTermContext) {
1526 var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext()
1527 _parentState := p.GetState()
1528 localctx = NewQueryTermContext(p, p.GetParserRuleContext(), _parentState)
1529 var _prevctx IQueryTermContext = localctx
1530 var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning.
1531 _startState := 8
1532 p.EnterRecursionRule(localctx, 8, SqlBaseParserRULE_queryTerm, _p)
1533 var _la int
1534
1535 defer func() {
1536 p.UnrollRecursionContexts(_parentctx)
1537 }()
1538
1539 defer func() {
1540 if err := recover(); err != nil {
1541 if v, ok := err.(antlr.RecognitionException); ok {
1542 localctx.SetException(v)
1543 p.GetErrorHandler().ReportError(p, v)
1544 p.GetErrorHandler().Recover(p, v)
1545 } else {
1546 panic(err)
1547 }
1548 }
1549 }()
1550
1551 var _alt int
1552
1553 p.EnterOuterAlt(localctx, 1)
1554 localctx = NewQueryTermDefaultContext(p, localctx)
1555 p.SetParserRuleContext(localctx)
1556 _prevctx = localctx
1557
1558 {
1559 p.SetState(127)
1560 p.QueryPrimary()
1561 }
1562
1563 p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1))
1564 p.SetState(143)
1565 p.GetErrorHandler().Sync(p)
1566 _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 9, p.GetParserRuleContext())
1567
1568 for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
1569 if _alt == 1 {
1570 if p.GetParseListeners() != nil {
1571 p.TriggerExitRuleEvent()
1572 }
1573 _prevctx = localctx
1574 p.SetState(141)
1575 p.GetErrorHandler().Sync(p)
1576 switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 8, p.GetParserRuleContext()) {
1577 case 1:
1578 localctx = NewSetOperationContext(p, NewQueryTermContext(p, _parentctx, _parentState))
1579 localctx.(*SetOperationContext).left = _prevctx
1580
1581 p.PushNewRecursionContext(localctx, _startState, SqlBaseParserRULE_queryTerm)
1582 p.SetState(129)

Callers 2

QueryNoWithMethod · 0.95
QueryTermMethod · 0.95

Calls 8

QueryPrimaryMethod · 0.95
SetQuantifierMethod · 0.95
NewQueryTermContextFunction · 0.85
NewSetOperationContextFunction · 0.85
LTMethod · 0.80
LAMethod · 0.80
ReportErrorMethod · 0.65

Tested by

no test coverage detected