in shardingsphere-operator/pkg/distsql/visitor_parser/read_write_splitting/rdlstatement_parser.go [2303:2366]
func (p *RDLStatementParser) AlgorithmDefinition() (localctx IAlgorithmDefinitionContext) {
localctx = NewAlgorithmDefinitionContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 30, RDLStatementParserRULE_algorithmDefinition)
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(147)
p.Match(RDLStatementParserTYPE)
}
{
p.SetState(148)
p.Match(RDLStatementParserLP_)
}
{
p.SetState(149)
p.Match(RDLStatementParserNAME)
}
{
p.SetState(150)
p.Match(RDLStatementParserEQ_)
}
{
p.SetState(151)
p.AlgorithmTypeName()
}
p.SetState(154)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
if _la == RDLStatementParserCOMMA_ {
{
p.SetState(152)
p.Match(RDLStatementParserCOMMA_)
}
{
p.SetState(153)
p.PropertiesDefinition()
}
}
{
p.SetState(156)
p.Match(RDLStatementParserRP_)
}
return localctx
}