Another ANTLR fix

This commit is contained in:
Ivan Lezhankin 2021-06-12 00:15:38 +03:00
parent e6b9ab6261
commit a237229998
4 changed files with 7 additions and 7 deletions

View File

@ -149,7 +149,7 @@ antlrcpp::Any ParseTreeVisitor::visitTableArgExpr(ClickHouseParser::TableArgExpr
{
if (ctx->literal()) return std::make_shared<TableArgExpr>(visit(ctx->literal()).as<PtrTo<Literal>>());
if (ctx->tableFunctionExpr()) return std::make_shared<TableArgExpr>(visit(ctx->tableFunctionExpr()).as<PtrTo<TableFunctionExpr>>());
if (ctx->identifier()) return std::make_shared<TableArgExpr>(visit(ctx->identifier()).as<PtrTo<Identifier>>());
if (ctx->nestedIdentifier()) return std::make_shared<TableArgExpr>(visit(ctx->nestedIdentifier()).as<PtrTo<Identifier>>());
__builtin_unreachable();
}

View File

@ -16430,8 +16430,8 @@ ClickHouseParser::TableArgExprContext::TableArgExprContext(ParserRuleContext *pa
: ParserRuleContext(parent, invokingState) {
}
ClickHouseParser::IdentifierContext* ClickHouseParser::TableArgExprContext::identifier() {
return getRuleContext<ClickHouseParser::IdentifierContext>(0);
ClickHouseParser::NestedIdentifierContext* ClickHouseParser::TableArgExprContext::nestedIdentifier() {
return getRuleContext<ClickHouseParser::NestedIdentifierContext>(0);
}
ClickHouseParser::TableFunctionExprContext* ClickHouseParser::TableArgExprContext::tableFunctionExpr() {
@ -16468,7 +16468,7 @@ ClickHouseParser::TableArgExprContext* ClickHouseParser::tableArgExpr() {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1859);
identifier();
nestedIdentifier();
break;
}
@ -20142,7 +20142,7 @@ ClickHouseParser::Initializer::Initializer() {
0x2, 0x73f, 0x741, 0x5, 0xc4, 0x63, 0x2, 0x740, 0x73e, 0x3, 0x2, 0x2,
0x2, 0x741, 0x744, 0x3, 0x2, 0x2, 0x2, 0x742, 0x740, 0x3, 0x2, 0x2,
0x2, 0x742, 0x743, 0x3, 0x2, 0x2, 0x2, 0x743, 0xc3, 0x3, 0x2, 0x2, 0x2,
0x744, 0x742, 0x3, 0x2, 0x2, 0x2, 0x745, 0x749, 0x5, 0xd6, 0x6c, 0x2,
0x744, 0x742, 0x3, 0x2, 0x2, 0x2, 0x745, 0x749, 0x5, 0xba, 0x5e, 0x2,
0x746, 0x749, 0x5, 0xbe, 0x60, 0x2, 0x747, 0x749, 0x5, 0xcc, 0x67, 0x2,
0x748, 0x745, 0x3, 0x2, 0x2, 0x2, 0x748, 0x746, 0x3, 0x2, 0x2, 0x2,
0x748, 0x747, 0x3, 0x2, 0x2, 0x2, 0x749, 0xc5, 0x3, 0x2, 0x2, 0x2, 0x74a,

View File

@ -428,7 +428,7 @@ tableFunctionExpr: identifier LPAREN tableArgList? RPAREN;
tableIdentifier: (databaseIdentifier DOT)? identifier;
tableArgList: tableArgExpr (COMMA tableArgExpr)*;
tableArgExpr
: identifier
: nestedIdentifier
| tableFunctionExpr
| literal
;

View File

@ -3064,7 +3064,7 @@ public:
public:
TableArgExprContext(antlr4::ParserRuleContext *parent, size_t invokingState);
virtual size_t getRuleIndex() const override;
IdentifierContext *identifier();
NestedIdentifierContext *nestedIdentifier();
TableFunctionExprContext *tableFunctionExpr();
LiteralContext *literal();