in shardingsphere-operator/pkg/distsql/visitor_parser/sharding/rdlstatement_parser.go [3366:3451]
func (p *RDLStatementParser) ShardingAutoTableRule() (localctx IShardingAutoTableRuleContext) {
localctx = NewShardingAutoTableRuleContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 30, RDLStatementParserRULE_shardingAutoTableRule)
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(303)
p.TableName()
}
{
p.SetState(304)
p.Match(RDLStatementParserLP_)
}
{
p.SetState(305)
p.StorageUnits()
}
{
p.SetState(306)
p.Match(RDLStatementParserCOMMA_)
}
{
p.SetState(307)
p.AutoShardingColumnDefinition()
}
{
p.SetState(308)
p.Match(RDLStatementParserCOMMA_)
}
{
p.SetState(309)
p.AlgorithmDefinition()
}
p.SetState(312)
p.GetErrorHandler().Sync(p)
if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 23, p.GetParserRuleContext()) == 1 {
{
p.SetState(310)
p.Match(RDLStatementParserCOMMA_)
}
{
p.SetState(311)
p.KeyGenerateDefinition()
}
}
p.SetState(316)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
if _la == RDLStatementParserCOMMA_ {
{
p.SetState(314)
p.Match(RDLStatementParserCOMMA_)
}
{
p.SetState(315)
p.AuditDefinition()
}
}
{
p.SetState(318)
p.Match(RDLStatementParserRP_)
}
return localctx
}