in shardingsphere-operator/pkg/distsql/visitor_parser/sharding/rdlstatement_parser.go [3585:3682]
func (p *RDLStatementParser) ShardingTableRule() (localctx IShardingTableRuleContext) {
localctx = NewShardingTableRuleContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 32, RDLStatementParserRULE_shardingTableRule)
var _la int
defer func() {
p.ExitRule()
}()
defer func() {
if err := recover(); err != nil {
if v, ok := err.(antlr.RecognitionException); ok {
localctx.SetException(v)
p.GetErrorHandler().ReportError(p, v)
p.GetErrorHandler().Recover(p, v)
} else {
panic(err)
}
}
}()
p.EnterOuterAlt(localctx, 1)
{
p.SetState(320)
p.TableName()
}
{
p.SetState(321)
p.Match(RDLStatementParserLP_)
}
{
p.SetState(322)
p.DataNodes()
}
p.SetState(325)
p.GetErrorHandler().Sync(p)
if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 25, p.GetParserRuleContext()) == 1 {
{
p.SetState(323)
p.Match(RDLStatementParserCOMMA_)
}
{
p.SetState(324)
p.DatabaseStrategy()
}
}
p.SetState(329)
p.GetErrorHandler().Sync(p)
if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 26, p.GetParserRuleContext()) == 1 {
{
p.SetState(327)
p.Match(RDLStatementParserCOMMA_)
}
{
p.SetState(328)
p.TableStrategy()
}
}
p.SetState(333)
p.GetErrorHandler().Sync(p)
if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 27, p.GetParserRuleContext()) == 1 {
{
p.SetState(331)
p.Match(RDLStatementParserCOMMA_)
}
{
p.SetState(332)
p.KeyGenerateDefinition()
}
}
p.SetState(337)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
if _la == RDLStatementParserCOMMA_ {
{
p.SetState(335)
p.Match(RDLStatementParserCOMMA_)
}
{
p.SetState(336)
p.AuditDefinition()
}
}
{
p.SetState(339)
p.Match(RDLStatementParserRP_)
}
return localctx
}