in shardingsphere-operator/pkg/distsql/visitor_parser/sharding/rdlstatement_parser.go [2123:2192]
func (p *RDLStatementParser) DropShardingAlgorithm() (localctx IDropShardingAlgorithmContext) {
localctx = NewDropShardingAlgorithmContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 16, RDLStatementParserRULE_dropShardingAlgorithm)
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(227)
p.Match(RDLStatementParserDROP)
}
{
p.SetState(228)
p.Match(RDLStatementParserSHARDING)
}
{
p.SetState(229)
p.Match(RDLStatementParserALGORITHM)
}
p.SetState(231)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
if _la == RDLStatementParserIF {
{
p.SetState(230)
p.IfExists()
}
}
{
p.SetState(233)
p.ShardingAlgorithmName()
}
p.SetState(238)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
for _la == RDLStatementParserCOMMA_ {
{
p.SetState(234)
p.Match(RDLStatementParserCOMMA_)
}
{
p.SetState(235)
p.ShardingAlgorithmName()
}
p.SetState(240)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
}
return localctx
}