app.cash.sqldelight.dialects.postgresql.grammar.PostgreSqlParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of postgresql-dialect Show documentation
Show all versions of postgresql-dialect Show documentation
The PostgreSQL Dialect for SQLDelight
// This is a generated file. Not intended for manual editing.
package app.cash.sqldelight.dialects.postgresql.grammar;
import com.intellij.lang.PsiBuilder;
import com.intellij.lang.PsiBuilder.Marker;
import static app.cash.sqldelight.dialects.postgresql.grammar.psi.PostgreSqlTypes.*;
import static app.cash.sqldelight.dialects.postgresql.grammar.PostgreSqlParserUtil.*;
import com.intellij.psi.tree.IElementType;
import com.intellij.lang.ASTNode;
import com.intellij.psi.tree.TokenSet;
import com.intellij.lang.PsiParser;
import com.intellij.lang.LightPsiParser;
import static com.alecstrong.sql.psi.core.SqlParser.*;
import static com.alecstrong.sql.psi.core.SqlParserUtil.identifierExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.conflictClauseExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.checkConstraintExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.collationNameExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.foreignKeyClauseExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.signedNumberExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.literalValueExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.indexNameExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.indexedColumnExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.columnNameExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.compoundSelectStmtExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.withClauseExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.qualifiedTableNameExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.orderingTermExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.numericLiteralExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.blobLiteralExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.databaseNameExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.tableNameExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.tableAliasExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.insertStmtValuesExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.joinClauseExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.resultColumnExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.alterTableAddColumnExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.alterTableRenameTableExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.columnTypeExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.generatedClauseExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.selectStmtExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.compoundOperatorExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.limitingTermExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.functionExprExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.setterExpressionExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.updateStmtSubsequentSetterExt;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.ADD;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.ABORT;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.ALTER;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.ALWAYS;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.AS;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.ASC;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.BY;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.COLLATE;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.COLUMN;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.COMMA;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.CONFLICT;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.CONSTRAINT;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.CURRENT_DATE;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.CURRENT_TIME;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.CURRENT_TIMESTAMP;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.DEFAULT;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.DELETE;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.DESC;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.DO;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.DOT;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.DROP;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.EQ;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.ESCAPE;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.FAIL;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.FALSE;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.FOR;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.FOREIGN;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.FROM;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.GENERATED;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.GROUP;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.ID;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.IGNORE;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.INSERT;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.INTO;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.KEY;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.LIMIT;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.LP;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.MINUS;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.NOT;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.NOTHING;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.NULL;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.OFFSET;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.ON;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.OR;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.ORDER;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.PLUS;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.PRIMARY;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.RENAME;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.REPLACE;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.ROLLBACK;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.RP;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.SET;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.STRING;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.TO;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.TRUE;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.UNIQUE;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.UPDATE;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.USING;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.WHERE;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.WITH;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.WITHOUT;
@SuppressWarnings({"SimplifiableIfStatement", "UnusedAssignment"})
public class PostgreSqlParser implements PsiParser, LightPsiParser {
public ASTNode parse(IElementType root_, PsiBuilder builder_) {
parseLight(root_, builder_);
return builder_.getTreeBuilt();
}
public void parseLight(IElementType root_, PsiBuilder builder_) {
boolean result_;
builder_ = adapt_builder_(root_, builder_, this, null);
Marker marker_ = enter_section_(builder_, 0, _COLLAPSE_, null);
result_ = parse_root_(root_, builder_);
exit_section_(builder_, 0, marker_, root_, result_, true, TRUE_CONDITION);
}
protected boolean parse_root_(IElementType root_, PsiBuilder builder_) {
return parse_root_(root_, builder_, 0);
}
static boolean parse_root_(IElementType root_, PsiBuilder builder_, int level_) {
return root(builder_, level_ + 1);
}
/* ********************************************************** */
// ADD <>
public static boolean alter_table_add_constraint_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_add_constraint_real")) return false;
if (!nextTokenIs(builder_, ADD)) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, ADD);
result_ = result_ && tableConstraintExt(builder_, level_ + 1, PostgreSqlParser::table_constraint_real);
exit_section_(builder_, marker_, ALTER_TABLE_ADD_CONSTRAINT, result_);
return result_;
}
/* ********************************************************** */
// ALTER [COLUMN] <>>>
// ( [ SET <> ] <> <>>> [USING <>>>'::'<>>>]
// | (SET | DROP) NOT NULL
// | SET DEFAULT <> | DROP DEFAULT | DROP <> [ IF EXISTS ] | ADD <>>>
// | SET GENERATED (ALWAYS | BY DEFAULT )
// )
public static boolean alter_table_alter_column_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_alter_column_real")) return false;
if (!nextTokenIs(builder_, ALTER)) return false;
boolean result_, pinned_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, ALTER_TABLE_ALTER_COLUMN, null);
result_ = consumeToken(builder_, ALTER);
pinned_ = result_; // pin = 1
result_ = result_ && report_error_(builder_, alter_table_alter_column_real_1(builder_, level_ + 1));
result_ = pinned_ && report_error_(builder_, columnNameExt(builder_, level_ + 1, alter_table_alter_column_real_2_0_parser_)) && result_;
result_ = pinned_ && alter_table_alter_column_real_3(builder_, level_ + 1) && result_;
exit_section_(builder_, level_, marker_, result_, pinned_, null);
return result_ || pinned_;
}
// [COLUMN]
private static boolean alter_table_alter_column_real_1(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_alter_column_real_1")) return false;
consumeToken(builder_, COLUMN);
return true;
}
// [ SET <> ] <> <>>> [USING <>>>'::'<>>>]
// | (SET | DROP) NOT NULL
// | SET DEFAULT <> | DROP DEFAULT | DROP <> [ IF EXISTS ] | ADD <>>>
// | SET GENERATED (ALWAYS | BY DEFAULT )
private static boolean alter_table_alter_column_real_3(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_alter_column_real_3")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = alter_table_alter_column_real_3_0(builder_, level_ + 1);
if (!result_) result_ = alter_table_alter_column_real_3_1(builder_, level_ + 1);
if (!result_) result_ = alter_table_alter_column_real_3_2(builder_, level_ + 1);
if (!result_) result_ = parseTokens(builder_, 0, DROP, DEFAULT);
if (!result_) result_ = alter_table_alter_column_real_3_4(builder_, level_ + 1);
if (!result_) result_ = alter_table_alter_column_real_3_5(builder_, level_ + 1);
if (!result_) result_ = alter_table_alter_column_real_3_6(builder_, level_ + 1);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [ SET <> ] <> <>>> [USING <>>>'::'<>>>]
private static boolean alter_table_alter_column_real_3_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_alter_column_real_3_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = alter_table_alter_column_real_3_0_0(builder_, level_ + 1);
result_ = result_ && typeClauseExt(builder_, level_ + 1, PostgreSqlParser::type_clause_real);
result_ = result_ && columnTypeExt(builder_, level_ + 1, alter_table_alter_column_real_3_0_2_0_parser_);
result_ = result_ && alter_table_alter_column_real_3_0_3(builder_, level_ + 1);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [ SET <> ]
private static boolean alter_table_alter_column_real_3_0_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_alter_column_real_3_0_0")) return false;
alter_table_alter_column_real_3_0_0_0(builder_, level_ + 1);
return true;
}
// SET <>
private static boolean alter_table_alter_column_real_3_0_0_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_alter_column_real_3_0_0_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, SET);
result_ = result_ && dataClauseExt(builder_, level_ + 1, PostgreSqlParser::data_clause_real);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [USING <>>>'::'<>>>]
private static boolean alter_table_alter_column_real_3_0_3(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_alter_column_real_3_0_3")) return false;
alter_table_alter_column_real_3_0_3_0(builder_, level_ + 1);
return true;
}
// USING <>>>'::'<>>>
private static boolean alter_table_alter_column_real_3_0_3_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_alter_column_real_3_0_3_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, USING);
result_ = result_ && columnNameExt(builder_, level_ + 1, alter_table_alter_column_real_3_0_3_0_1_0_parser_);
result_ = result_ && consumeToken(builder_, "::");
result_ = result_ && columnTypeExt(builder_, level_ + 1, alter_table_alter_column_real_3_0_3_0_3_0_parser_);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// (SET | DROP) NOT NULL
private static boolean alter_table_alter_column_real_3_1(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_alter_column_real_3_1")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = alter_table_alter_column_real_3_1_0(builder_, level_ + 1);
result_ = result_ && consumeTokens(builder_, 0, NOT, NULL);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// SET | DROP
private static boolean alter_table_alter_column_real_3_1_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_alter_column_real_3_1_0")) return false;
boolean result_;
result_ = consumeToken(builder_, SET);
if (!result_) result_ = consumeToken(builder_, DROP);
return result_;
}
// SET DEFAULT <>
private static boolean alter_table_alter_column_real_3_2(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_alter_column_real_3_2")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeTokens(builder_, 0, SET, DEFAULT);
result_ = result_ && expr(builder_, level_ + 1, -1);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// DROP <> [ IF EXISTS ]
private static boolean alter_table_alter_column_real_3_4(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_alter_column_real_3_4")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, DROP);
result_ = result_ && identityClauseExt(builder_, level_ + 1, PostgreSqlParser::identity_clause_real);
result_ = result_ && alter_table_alter_column_real_3_4_2(builder_, level_ + 1);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [ IF EXISTS ]
private static boolean alter_table_alter_column_real_3_4_2(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_alter_column_real_3_4_2")) return false;
parseTokens(builder_, 0, IF, EXISTS);
return true;
}
// ADD <>>>
private static boolean alter_table_alter_column_real_3_5(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_alter_column_real_3_5")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, ADD);
result_ = result_ && generatedClauseExt(builder_, level_ + 1, alter_table_alter_column_real_3_5_1_0_parser_);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// SET GENERATED (ALWAYS | BY DEFAULT )
private static boolean alter_table_alter_column_real_3_6(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_alter_column_real_3_6")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeTokens(builder_, 0, SET, GENERATED);
result_ = result_ && alter_table_alter_column_real_3_6_2(builder_, level_ + 1);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// ALWAYS | BY DEFAULT
private static boolean alter_table_alter_column_real_3_6_2(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_alter_column_real_3_6_2")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, ALWAYS);
if (!result_) result_ = parseTokens(builder_, 0, BY, DEFAULT);
exit_section_(builder_, marker_, null, result_);
return result_;
}
/* ********************************************************** */
// id | string
public static boolean alter_table_column_alias_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_column_alias_real")) return false;
if (!nextTokenIs(builder_, "", ID, STRING)) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, ALTER_TABLE_COLUMN_ALIAS, "");
result_ = consumeToken(builder_, ID);
if (!result_) result_ = consumeToken(builder_, STRING);
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
/* ********************************************************** */
// DROP [ COLUMN ] <>>>
public static boolean alter_table_drop_column_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_drop_column_real")) return false;
if (!nextTokenIs(builder_, DROP)) return false;
boolean result_, pinned_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, ALTER_TABLE_DROP_COLUMN, null);
result_ = consumeToken(builder_, DROP);
pinned_ = result_; // pin = 1
result_ = result_ && report_error_(builder_, alter_table_drop_column_real_1(builder_, level_ + 1));
result_ = pinned_ && columnNameExt(builder_, level_ + 1, alter_table_drop_column_real_2_0_parser_) && result_;
exit_section_(builder_, level_, marker_, result_, pinned_, null);
return result_ || pinned_;
}
// [ COLUMN ]
private static boolean alter_table_drop_column_real_1(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_drop_column_real_1")) return false;
consumeToken(builder_, COLUMN);
return true;
}
/* ********************************************************** */
// RENAME [ COLUMN ] <>>> TO <>
public static boolean alter_table_rename_column_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_rename_column_real")) return false;
if (!nextTokenIs(builder_, RENAME)) return false;
boolean result_, pinned_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, ALTER_TABLE_RENAME_COLUMN, null);
result_ = consumeToken(builder_, RENAME);
pinned_ = result_; // pin = 1
result_ = result_ && report_error_(builder_, alter_table_rename_column_real_1(builder_, level_ + 1));
result_ = pinned_ && report_error_(builder_, columnNameExt(builder_, level_ + 1, alter_table_rename_column_real_2_0_parser_)) && result_;
result_ = pinned_ && report_error_(builder_, consumeToken(builder_, TO)) && result_;
result_ = pinned_ && alterTableColumnAliasExt(builder_, level_ + 1, PostgreSqlParser::alter_table_column_alias_real) && result_;
exit_section_(builder_, level_, marker_, result_, pinned_, null);
return result_ || pinned_;
}
// [ COLUMN ]
private static boolean alter_table_rename_column_real_1(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_rename_column_real_1")) return false;
consumeToken(builder_, COLUMN);
return true;
}
/* ********************************************************** */
// <>>>
// | <>>>
// | <>
// | <>
// | <>
// | <>
public static boolean alter_table_rules_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "alter_table_rules_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _COLLAPSE_, ALTER_TABLE_RULES, "");
result_ = alterTableAddColumnExt(builder_, level_ + 1, alter_table_rules_real_0_0_parser_);
if (!result_) result_ = alterTableRenameTableExt(builder_, level_ + 1, alter_table_rules_real_1_0_parser_);
if (!result_) result_ = alterTableRenameColumnExt(builder_, level_ + 1, PostgreSqlParser::alter_table_rename_column_real);
if (!result_) result_ = alterTableDropColumnExt(builder_, level_ + 1, PostgreSqlParser::alter_table_drop_column_real);
if (!result_) result_ = alterTableAddConstraintExt(builder_, level_ + 1, PostgreSqlParser::alter_table_add_constraint_real);
if (!result_) result_ = alterTableAlterColumnExt(builder_, level_ + 1, PostgreSqlParser::alter_table_alter_column_real);
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
/* ********************************************************** */
// ('REAL' | 'FLOAT4' | ( 'DOUBLE' 'PRECISION' ) | 'FLOAT8') | ('FLOAT' [ LP <>>> RP ])
public static boolean approximate_numeric_data_type_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "approximate_numeric_data_type_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, APPROXIMATE_NUMERIC_DATA_TYPE, "");
result_ = approximate_numeric_data_type_real_0(builder_, level_ + 1);
if (!result_) result_ = approximate_numeric_data_type_real_1(builder_, level_ + 1);
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
// 'REAL' | 'FLOAT4' | ( 'DOUBLE' 'PRECISION' ) | 'FLOAT8'
private static boolean approximate_numeric_data_type_real_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "approximate_numeric_data_type_real_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, "REAL");
if (!result_) result_ = consumeToken(builder_, "FLOAT4");
if (!result_) result_ = approximate_numeric_data_type_real_0_2(builder_, level_ + 1);
if (!result_) result_ = consumeToken(builder_, "FLOAT8");
exit_section_(builder_, marker_, null, result_);
return result_;
}
// 'DOUBLE' 'PRECISION'
private static boolean approximate_numeric_data_type_real_0_2(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "approximate_numeric_data_type_real_0_2")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, "DOUBLE");
result_ = result_ && consumeToken(builder_, "PRECISION");
exit_section_(builder_, marker_, null, result_);
return result_;
}
// 'FLOAT' [ LP <>>> RP ]
private static boolean approximate_numeric_data_type_real_1(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "approximate_numeric_data_type_real_1")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, "FLOAT");
result_ = result_ && approximate_numeric_data_type_real_1_1(builder_, level_ + 1);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [ LP <>>> RP ]
private static boolean approximate_numeric_data_type_real_1_1(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "approximate_numeric_data_type_real_1_1")) return false;
approximate_numeric_data_type_real_1_1_0(builder_, level_ + 1);
return true;
}
// LP <>>> RP
private static boolean approximate_numeric_data_type_real_1_1_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "approximate_numeric_data_type_real_1_1_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, LP);
result_ = result_ && signedNumberExt(builder_, level_ + 1, approximate_numeric_data_type_real_1_1_0_1_0_parser_);
result_ = result_ && consumeToken(builder_, RP);
exit_section_(builder_, marker_, null, result_);
return result_;
}
/* ********************************************************** */
// 'BIGINT' | 'INT8'
public static boolean big_int_data_type_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "big_int_data_type_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, BIG_INT_DATA_TYPE, "");
result_ = consumeToken(builder_, "BIGINT");
if (!result_) result_ = consumeToken(builder_, "INT8");
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
/* ********************************************************** */
// 'BIGSERIAL' | 'SERIAL8'
public static boolean big_serial_data_type_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "big_serial_data_type_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, BIG_SERIAL_DATA_TYPE, "");
result_ = consumeToken(builder_, "BIGSERIAL");
if (!result_) result_ = consumeToken(builder_, "SERIAL8");
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
/* ********************************************************** */
// DEFAULT | ( '?' | ':' <>>> )
public static boolean bind_parameter_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "bind_parameter_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _COLLAPSE_, BIND_PARAMETER, "");
result_ = consumeToken(builder_, DEFAULT);
if (!result_) result_ = bind_parameter_real_1(builder_, level_ + 1);
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
// '?' | ':' <>>>
private static boolean bind_parameter_real_1(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "bind_parameter_real_1")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, "?");
if (!result_) result_ = bind_parameter_real_1_1(builder_, level_ + 1);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// ':' <>>>
private static boolean bind_parameter_real_1_1(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "bind_parameter_real_1_1")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, ":");
result_ = result_ && identifierExt(builder_, level_ + 1, bind_parameter_real_1_1_1_0_parser_);
exit_section_(builder_, marker_, null, result_);
return result_;
}
/* ********************************************************** */
// 'BYTEA'
public static boolean blob_data_type_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "blob_data_type_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, BLOB_DATA_TYPE, "");
result_ = consumeToken(builder_, "BYTEA");
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
/* ********************************************************** */
// 'BOOLEAN' | 'BOOL'
public static boolean boolean_data_type_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "boolean_data_type_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, BOOLEAN_DATA_TYPE, "");
result_ = consumeToken(builder_, "BOOLEAN");
if (!result_) result_ = consumeToken(builder_, "BOOL");
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
/* ********************************************************** */
// TRUE | FALSE
public static boolean boolean_literal_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "boolean_literal_real")) return false;
if (!nextTokenIs(builder_, "", FALSE, TRUE)) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, BOOLEAN_LITERAL, "");
result_ = consumeToken(builder_, TRUE);
if (!result_) result_ = consumeToken(builder_, FALSE);
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
/* ********************************************************** */
// NOT (<> | <>>>)
public static boolean boolean_not_expression_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "boolean_not_expression_real")) return false;
if (!nextTokenIs(builder_, NOT)) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, NOT);
result_ = result_ && boolean_not_expression_real_1(builder_, level_ + 1);
exit_section_(builder_, marker_, BOOLEAN_NOT_EXPRESSION, result_);
return result_;
}
// <> | <>>>
private static boolean boolean_not_expression_real_1(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "boolean_not_expression_real_1")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = booleanLiteralExt(builder_, level_ + 1, PostgreSqlParser::boolean_literal_real);
if (!result_) result_ = columnNameExt(builder_, level_ + 1, boolean_not_expression_real_1_1_0_parser_);
exit_section_(builder_, marker_, null, result_);
return result_;
}
/* ********************************************************** */
// [ CONSTRAINT <>>> ] (
// PRIMARY KEY [ ASC | DESC ] <>>> |
// [ NOT ] NULL <>>> |
// UNIQUE <>>> |
// <>>> |
// <> |
// <> |
// COLLATE <>>> |
// <>>>
// )
public static boolean column_constraint_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "column_constraint_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _COLLAPSE_, COLUMN_CONSTRAINT, "");
result_ = column_constraint_real_0(builder_, level_ + 1);
result_ = result_ && column_constraint_real_1(builder_, level_ + 1);
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
// [ CONSTRAINT <>>> ]
private static boolean column_constraint_real_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "column_constraint_real_0")) return false;
column_constraint_real_0_0(builder_, level_ + 1);
return true;
}
// CONSTRAINT <>>>
private static boolean column_constraint_real_0_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "column_constraint_real_0_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, CONSTRAINT);
result_ = result_ && identifierExt(builder_, level_ + 1, column_constraint_real_0_0_1_0_parser_);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// PRIMARY KEY [ ASC | DESC ] <>>> |
// [ NOT ] NULL <>>> |
// UNIQUE <>>> |
// <>>> |
// <> |
// <> |
// COLLATE <>>> |
// <>>>
private static boolean column_constraint_real_1(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "column_constraint_real_1")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = column_constraint_real_1_0(builder_, level_ + 1);
if (!result_) result_ = column_constraint_real_1_1(builder_, level_ + 1);
if (!result_) result_ = column_constraint_real_1_2(builder_, level_ + 1);
if (!result_) result_ = checkConstraintExt(builder_, level_ + 1, column_constraint_real_1_3_0_parser_);
if (!result_) result_ = generatedClauseExt(builder_, level_ + 1, PostgreSqlParser::generated_clause_real);
if (!result_) result_ = defaultConstraintExt(builder_, level_ + 1, PostgreSqlParser::default_constraint_real);
if (!result_) result_ = column_constraint_real_1_6(builder_, level_ + 1);
if (!result_) result_ = foreignKeyClauseExt(builder_, level_ + 1, column_constraint_real_1_7_0_parser_);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// PRIMARY KEY [ ASC | DESC ] <>>>
private static boolean column_constraint_real_1_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "column_constraint_real_1_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeTokens(builder_, 0, PRIMARY, KEY);
result_ = result_ && column_constraint_real_1_0_2(builder_, level_ + 1);
result_ = result_ && conflictClauseExt(builder_, level_ + 1, column_constraint_real_1_0_3_0_parser_);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [ ASC | DESC ]
private static boolean column_constraint_real_1_0_2(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "column_constraint_real_1_0_2")) return false;
column_constraint_real_1_0_2_0(builder_, level_ + 1);
return true;
}
// ASC | DESC
private static boolean column_constraint_real_1_0_2_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "column_constraint_real_1_0_2_0")) return false;
boolean result_;
result_ = consumeToken(builder_, ASC);
if (!result_) result_ = consumeToken(builder_, DESC);
return result_;
}
// [ NOT ] NULL <>>>
private static boolean column_constraint_real_1_1(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "column_constraint_real_1_1")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = column_constraint_real_1_1_0(builder_, level_ + 1);
result_ = result_ && consumeToken(builder_, NULL);
result_ = result_ && conflictClauseExt(builder_, level_ + 1, column_constraint_real_1_1_2_0_parser_);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [ NOT ]
private static boolean column_constraint_real_1_1_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "column_constraint_real_1_1_0")) return false;
consumeToken(builder_, NOT);
return true;
}
// UNIQUE <>>>
private static boolean column_constraint_real_1_2(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "column_constraint_real_1_2")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, UNIQUE);
result_ = result_ && conflictClauseExt(builder_, level_ + 1, column_constraint_real_1_2_1_0_parser_);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// COLLATE <>>>
private static boolean column_constraint_real_1_6(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "column_constraint_real_1_6")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, COLLATE);
result_ = result_ && collationNameExt(builder_, level_ + 1, column_constraint_real_1_6_1_0_parser_);
exit_section_(builder_, marker_, null, result_);
return result_;
}
/* ********************************************************** */
// [ <>>> ] <>>> ( <>>> <>>> ) * [ ORDER BY <>>> ( COMMA <>>> ) * ] [ LIMIT <>>> ] [ ( OFFSET | COMMA ) <>>> ] [ FOR UPDATE [ 'SKIP' 'LOCKED' ] ]
public static boolean compound_select_stmt_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "compound_select_stmt_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _COLLAPSE_, COMPOUND_SELECT_STMT, "");
result_ = compound_select_stmt_real_0(builder_, level_ + 1);
result_ = result_ && selectStmtExt(builder_, level_ + 1, compound_select_stmt_real_1_0_parser_);
result_ = result_ && compound_select_stmt_real_2(builder_, level_ + 1);
result_ = result_ && compound_select_stmt_real_3(builder_, level_ + 1);
result_ = result_ && compound_select_stmt_real_4(builder_, level_ + 1);
result_ = result_ && compound_select_stmt_real_5(builder_, level_ + 1);
result_ = result_ && compound_select_stmt_real_6(builder_, level_ + 1);
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
// [ <>>> ]
private static boolean compound_select_stmt_real_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "compound_select_stmt_real_0")) return false;
withClauseExt(builder_, level_ + 1, compound_select_stmt_real_0_0_0_parser_);
return true;
}
// ( <>>> <>>> ) *
private static boolean compound_select_stmt_real_2(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "compound_select_stmt_real_2")) return false;
while (true) {
int pos_ = current_position_(builder_);
if (!compound_select_stmt_real_2_0(builder_, level_ + 1)) break;
if (!empty_element_parsed_guard_(builder_, "compound_select_stmt_real_2", pos_)) break;
}
return true;
}
// <>>> <>>>
private static boolean compound_select_stmt_real_2_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "compound_select_stmt_real_2_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = compoundOperatorExt(builder_, level_ + 1, compound_select_stmt_real_2_0_0_0_parser_);
result_ = result_ && selectStmtExt(builder_, level_ + 1, compound_select_stmt_real_2_0_1_0_parser_);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [ ORDER BY <>>> ( COMMA <>>> ) * ]
private static boolean compound_select_stmt_real_3(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "compound_select_stmt_real_3")) return false;
compound_select_stmt_real_3_0(builder_, level_ + 1);
return true;
}
// ORDER BY <>>> ( COMMA <>>> ) *
private static boolean compound_select_stmt_real_3_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "compound_select_stmt_real_3_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeTokens(builder_, 0, ORDER, BY);
result_ = result_ && orderingTermExt(builder_, level_ + 1, compound_select_stmt_real_3_0_2_0_parser_);
result_ = result_ && compound_select_stmt_real_3_0_3(builder_, level_ + 1);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// ( COMMA <>>> ) *
private static boolean compound_select_stmt_real_3_0_3(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "compound_select_stmt_real_3_0_3")) return false;
while (true) {
int pos_ = current_position_(builder_);
if (!compound_select_stmt_real_3_0_3_0(builder_, level_ + 1)) break;
if (!empty_element_parsed_guard_(builder_, "compound_select_stmt_real_3_0_3", pos_)) break;
}
return true;
}
// COMMA <>>>
private static boolean compound_select_stmt_real_3_0_3_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "compound_select_stmt_real_3_0_3_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, COMMA);
result_ = result_ && orderingTermExt(builder_, level_ + 1, compound_select_stmt_real_3_0_3_0_1_0_parser_);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [ LIMIT <>>> ]
private static boolean compound_select_stmt_real_4(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "compound_select_stmt_real_4")) return false;
compound_select_stmt_real_4_0(builder_, level_ + 1);
return true;
}
// LIMIT <>>>
private static boolean compound_select_stmt_real_4_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "compound_select_stmt_real_4_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, LIMIT);
result_ = result_ && limitingTermExt(builder_, level_ + 1, compound_select_stmt_real_4_0_1_0_parser_);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [ ( OFFSET | COMMA ) <>>> ]
private static boolean compound_select_stmt_real_5(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "compound_select_stmt_real_5")) return false;
compound_select_stmt_real_5_0(builder_, level_ + 1);
return true;
}
// ( OFFSET | COMMA ) <>>>
private static boolean compound_select_stmt_real_5_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "compound_select_stmt_real_5_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = compound_select_stmt_real_5_0_0(builder_, level_ + 1);
result_ = result_ && limitingTermExt(builder_, level_ + 1, compound_select_stmt_real_5_0_1_0_parser_);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// OFFSET | COMMA
private static boolean compound_select_stmt_real_5_0_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "compound_select_stmt_real_5_0_0")) return false;
boolean result_;
result_ = consumeToken(builder_, OFFSET);
if (!result_) result_ = consumeToken(builder_, COMMA);
return result_;
}
// [ FOR UPDATE [ 'SKIP' 'LOCKED' ] ]
private static boolean compound_select_stmt_real_6(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "compound_select_stmt_real_6")) return false;
compound_select_stmt_real_6_0(builder_, level_ + 1);
return true;
}
// FOR UPDATE [ 'SKIP' 'LOCKED' ]
private static boolean compound_select_stmt_real_6_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "compound_select_stmt_real_6_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeTokens(builder_, 0, FOR, UPDATE);
result_ = result_ && compound_select_stmt_real_6_0_2(builder_, level_ + 1);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [ 'SKIP' 'LOCKED' ]
private static boolean compound_select_stmt_real_6_0_2(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "compound_select_stmt_real_6_0_2")) return false;
compound_select_stmt_real_6_0_2_0(builder_, level_ + 1);
return true;
}
// 'SKIP' 'LOCKED'
private static boolean compound_select_stmt_real_6_0_2_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "compound_select_stmt_real_6_0_2_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, "SKIP");
result_ = result_ && consumeToken(builder_, "LOCKED");
exit_section_(builder_, marker_, null, result_);
return result_;
}
/* ********************************************************** */
// <>>> EQ <>
public static boolean conflict_assign_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "conflict_assign_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, CONFLICT_ASSIGN, "");
result_ = columnNameExt(builder_, level_ + 1, conflict_assign_real_0_0_parser_);
result_ = result_ && consumeToken(builder_, EQ);
result_ = result_ && expr(builder_, level_ + 1, -1);
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
/* ********************************************************** */
// LP <>>> ( COMMA <>>> ) * RP
public static boolean conflict_target_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "conflict_target_real")) return false;
if (!nextTokenIs(builder_, LP)) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, LP);
result_ = result_ && columnNameExt(builder_, level_ + 1, conflict_target_real_1_0_parser_);
result_ = result_ && conflict_target_real_2(builder_, level_ + 1);
result_ = result_ && consumeToken(builder_, RP);
exit_section_(builder_, marker_, CONFLICT_TARGET, result_);
return result_;
}
// ( COMMA <>>> ) *
private static boolean conflict_target_real_2(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "conflict_target_real_2")) return false;
while (true) {
int pos_ = current_position_(builder_);
if (!conflict_target_real_2_0(builder_, level_ + 1)) break;
if (!empty_element_parsed_guard_(builder_, "conflict_target_real_2", pos_)) break;
}
return true;
}
// COMMA <>>>
private static boolean conflict_target_real_2_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "conflict_target_real_2_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, COMMA);
result_ = result_ && columnNameExt(builder_, level_ + 1, conflict_target_real_2_0_1_0_parser_);
exit_section_(builder_, marker_, null, result_);
return result_;
}
/* ********************************************************** */
// DO UPDATE SET <> ( COMMA <> ) *
public static boolean conflict_update_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "conflict_update_real")) return false;
if (!nextTokenIs(builder_, DO)) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeTokens(builder_, 0, DO, UPDATE, SET);
result_ = result_ && conflictAssignExt(builder_, level_ + 1, PostgreSqlParser::conflict_assign_real);
result_ = result_ && conflict_update_real_4(builder_, level_ + 1);
exit_section_(builder_, marker_, CONFLICT_UPDATE, result_);
return result_;
}
// ( COMMA <> ) *
private static boolean conflict_update_real_4(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "conflict_update_real_4")) return false;
while (true) {
int pos_ = current_position_(builder_);
if (!conflict_update_real_4_0(builder_, level_ + 1)) break;
if (!empty_element_parsed_guard_(builder_, "conflict_update_real_4", pos_)) break;
}
return true;
}
// COMMA <>
private static boolean conflict_update_real_4_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "conflict_update_real_4_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, COMMA);
result_ = result_ && conflictAssignExt(builder_, level_ + 1, PostgreSqlParser::conflict_assign_real);
exit_section_(builder_, marker_, null, result_);
return result_;
}
/* ********************************************************** */
// 'DELIMITER' <>
public static boolean copy_option_delimiter_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_option_delimiter_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, COPY_OPTION_DELIMITER, "");
result_ = consumeToken(builder_, "DELIMITER");
result_ = result_ && stringLiteralExt(builder_, level_ + 1, PostgreSqlParser::string_literal_real);
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
/* ********************************************************** */
// 'ENCODING' <>
public static boolean copy_option_encoding_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_option_encoding_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, COPY_OPTION_ENCODING, "");
result_ = consumeToken(builder_, "ENCODING");
result_ = result_ && stringLiteralExt(builder_, level_ + 1, PostgreSqlParser::string_literal_real);
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
/* ********************************************************** */
// ESCAPE <>
public static boolean copy_option_escape_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_option_escape_real")) return false;
if (!nextTokenIs(builder_, ESCAPE)) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, ESCAPE);
result_ = result_ && stringLiteralExt(builder_, level_ + 1, PostgreSqlParser::string_literal_real);
exit_section_(builder_, marker_, COPY_OPTION_ESCAPE, result_);
return result_;
}
/* ********************************************************** */
// 'FORCE_NOT_NULL' LP <>>> ( COMMA <>>>) * RP
public static boolean copy_option_force_not_null_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_option_force_not_null_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, COPY_OPTION_FORCE_NOT_NULL, "");
result_ = consumeToken(builder_, "FORCE_NOT_NULL");
result_ = result_ && consumeToken(builder_, LP);
result_ = result_ && columnNameExt(builder_, level_ + 1, copy_option_force_not_null_real_2_0_parser_);
result_ = result_ && copy_option_force_not_null_real_3(builder_, level_ + 1);
result_ = result_ && consumeToken(builder_, RP);
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
// ( COMMA <>>>) *
private static boolean copy_option_force_not_null_real_3(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_option_force_not_null_real_3")) return false;
while (true) {
int pos_ = current_position_(builder_);
if (!copy_option_force_not_null_real_3_0(builder_, level_ + 1)) break;
if (!empty_element_parsed_guard_(builder_, "copy_option_force_not_null_real_3", pos_)) break;
}
return true;
}
// COMMA <>>>
private static boolean copy_option_force_not_null_real_3_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_option_force_not_null_real_3_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, COMMA);
result_ = result_ && columnNameExt(builder_, level_ + 1, copy_option_force_not_null_real_3_0_1_0_parser_);
exit_section_(builder_, marker_, null, result_);
return result_;
}
/* ********************************************************** */
// 'FORCE_NULL' LP <>>> ( COMMA <>>>) * RP
public static boolean copy_option_force_null_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_option_force_null_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, COPY_OPTION_FORCE_NULL, "");
result_ = consumeToken(builder_, "FORCE_NULL");
result_ = result_ && consumeToken(builder_, LP);
result_ = result_ && columnNameExt(builder_, level_ + 1, copy_option_force_null_real_2_0_parser_);
result_ = result_ && copy_option_force_null_real_3(builder_, level_ + 1);
result_ = result_ && consumeToken(builder_, RP);
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
// ( COMMA <>>>) *
private static boolean copy_option_force_null_real_3(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_option_force_null_real_3")) return false;
while (true) {
int pos_ = current_position_(builder_);
if (!copy_option_force_null_real_3_0(builder_, level_ + 1)) break;
if (!empty_element_parsed_guard_(builder_, "copy_option_force_null_real_3", pos_)) break;
}
return true;
}
// COMMA <>>>
private static boolean copy_option_force_null_real_3_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_option_force_null_real_3_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, COMMA);
result_ = result_ && columnNameExt(builder_, level_ + 1, copy_option_force_null_real_3_0_1_0_parser_);
exit_section_(builder_, marker_, null, result_);
return result_;
}
/* ********************************************************** */
// 'FORMAT' ('TEXT' | 'CSV' | 'BINARY')
public static boolean copy_option_format_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_option_format_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, COPY_OPTION_FORMAT, "");
result_ = consumeToken(builder_, "FORMAT");
result_ = result_ && copy_option_format_real_1(builder_, level_ + 1);
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
// 'TEXT' | 'CSV' | 'BINARY'
private static boolean copy_option_format_real_1(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_option_format_real_1")) return false;
boolean result_;
result_ = consumeToken(builder_, "TEXT");
if (!result_) result_ = consumeToken(builder_, "CSV");
if (!result_) result_ = consumeToken(builder_, "BINARY");
return result_;
}
/* ********************************************************** */
// 'FREEZE' [ (<>) ]
public static boolean copy_option_freeze_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_option_freeze_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, COPY_OPTION_FREEZE, "");
result_ = consumeToken(builder_, "FREEZE");
result_ = result_ && copy_option_freeze_real_1(builder_, level_ + 1);
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
// [ (<>) ]
private static boolean copy_option_freeze_real_1(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_option_freeze_real_1")) return false;
copy_option_freeze_real_1_0(builder_, level_ + 1);
return true;
}
// <>
private static boolean copy_option_freeze_real_1_0(PsiBuilder builder_, int level_) {
return booleanLiteralExt(builder_, level_ + 1, PostgreSqlParser::boolean_literal_real);
}
/* ********************************************************** */
// 'HEADER' [ (<>) ]
public static boolean copy_option_header_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_option_header_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, COPY_OPTION_HEADER, "");
result_ = consumeToken(builder_, "HEADER");
result_ = result_ && copy_option_header_real_1(builder_, level_ + 1);
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
// [ (<>) ]
private static boolean copy_option_header_real_1(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_option_header_real_1")) return false;
copy_option_header_real_1_0(builder_, level_ + 1);
return true;
}
// <>
private static boolean copy_option_header_real_1_0(PsiBuilder builder_, int level_) {
return booleanLiteralExt(builder_, level_ + 1, PostgreSqlParser::boolean_literal_real);
}
/* ********************************************************** */
// NULL <>
public static boolean copy_option_null_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_option_null_real")) return false;
if (!nextTokenIs(builder_, NULL)) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, NULL);
result_ = result_ && stringLiteralExt(builder_, level_ + 1, PostgreSqlParser::string_literal_real);
exit_section_(builder_, marker_, COPY_OPTION_NULL, result_);
return result_;
}
/* ********************************************************** */
// 'QUOTE' <>
public static boolean copy_option_quote_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_option_quote_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, COPY_OPTION_QUOTE, "");
result_ = consumeToken(builder_, "QUOTE");
result_ = result_ && stringLiteralExt(builder_, level_ + 1, PostgreSqlParser::string_literal_real);
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
/* ********************************************************** */
// <> | <> | <> | <> | <> | <> | <> | <> | <> | <>
public static boolean copy_option_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_option_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _COLLAPSE_, COPY_OPTION, "");
result_ = copyOptionFormatExt(builder_, level_ + 1, PostgreSqlParser::copy_option_format_real);
if (!result_) result_ = copyOptionFreezeExt(builder_, level_ + 1, PostgreSqlParser::copy_option_freeze_real);
if (!result_) result_ = copyOptionDelimiterExt(builder_, level_ + 1, PostgreSqlParser::copy_option_delimiter_real);
if (!result_) result_ = copyOptionNullExt(builder_, level_ + 1, PostgreSqlParser::copy_option_null_real);
if (!result_) result_ = copyOptionHeaderExt(builder_, level_ + 1, PostgreSqlParser::copy_option_header_real);
if (!result_) result_ = copyOptionQuoteExt(builder_, level_ + 1, PostgreSqlParser::copy_option_quote_real);
if (!result_) result_ = copyOptionEscapeExt(builder_, level_ + 1, PostgreSqlParser::copy_option_escape_real);
if (!result_) result_ = copyOptionForceNotNullExt(builder_, level_ + 1, PostgreSqlParser::copy_option_force_not_null_real);
if (!result_) result_ = copyOptionForceNullExt(builder_, level_ + 1, PostgreSqlParser::copy_option_force_null_real);
if (!result_) result_ = copyOptionEncodingExt(builder_, level_ + 1, PostgreSqlParser::copy_option_encoding_real);
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
/* ********************************************************** */
// 'COPY' [ <>>> DOT ] <>>> [ AS <>>> ] [ LP <>>> ( COMMA <>>> ) * RP ] FROM 'STDIN' [ [ WITH ] LP <> ( COMMA <>) * RP ] [ WHERE <> ]
public static boolean copy_stdin_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_stdin_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, COPY_STDIN, "");
result_ = consumeToken(builder_, "COPY");
result_ = result_ && copy_stdin_real_1(builder_, level_ + 1);
result_ = result_ && tableNameExt(builder_, level_ + 1, copy_stdin_real_2_0_parser_);
result_ = result_ && copy_stdin_real_3(builder_, level_ + 1);
result_ = result_ && copy_stdin_real_4(builder_, level_ + 1);
result_ = result_ && consumeToken(builder_, FROM);
result_ = result_ && consumeToken(builder_, "STDIN");
result_ = result_ && copy_stdin_real_7(builder_, level_ + 1);
result_ = result_ && copy_stdin_real_8(builder_, level_ + 1);
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
// [ <>>> DOT ]
private static boolean copy_stdin_real_1(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_stdin_real_1")) return false;
copy_stdin_real_1_0(builder_, level_ + 1);
return true;
}
// <>>> DOT
private static boolean copy_stdin_real_1_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_stdin_real_1_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = databaseNameExt(builder_, level_ + 1, copy_stdin_real_1_0_0_0_parser_);
result_ = result_ && consumeToken(builder_, DOT);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [ AS <>>> ]
private static boolean copy_stdin_real_3(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_stdin_real_3")) return false;
copy_stdin_real_3_0(builder_, level_ + 1);
return true;
}
// AS <>>>
private static boolean copy_stdin_real_3_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_stdin_real_3_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, AS);
result_ = result_ && tableAliasExt(builder_, level_ + 1, copy_stdin_real_3_0_1_0_parser_);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [ LP <>>> ( COMMA <>>> ) * RP ]
private static boolean copy_stdin_real_4(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_stdin_real_4")) return false;
copy_stdin_real_4_0(builder_, level_ + 1);
return true;
}
// LP <>>> ( COMMA <>>> ) * RP
private static boolean copy_stdin_real_4_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_stdin_real_4_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, LP);
result_ = result_ && columnNameExt(builder_, level_ + 1, copy_stdin_real_4_0_1_0_parser_);
result_ = result_ && copy_stdin_real_4_0_2(builder_, level_ + 1);
result_ = result_ && consumeToken(builder_, RP);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// ( COMMA <>>> ) *
private static boolean copy_stdin_real_4_0_2(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_stdin_real_4_0_2")) return false;
while (true) {
int pos_ = current_position_(builder_);
if (!copy_stdin_real_4_0_2_0(builder_, level_ + 1)) break;
if (!empty_element_parsed_guard_(builder_, "copy_stdin_real_4_0_2", pos_)) break;
}
return true;
}
// COMMA <>>>
private static boolean copy_stdin_real_4_0_2_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_stdin_real_4_0_2_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, COMMA);
result_ = result_ && columnNameExt(builder_, level_ + 1, copy_stdin_real_4_0_2_0_1_0_parser_);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [ [ WITH ] LP <> ( COMMA <>) * RP ]
private static boolean copy_stdin_real_7(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_stdin_real_7")) return false;
copy_stdin_real_7_0(builder_, level_ + 1);
return true;
}
// [ WITH ] LP <> ( COMMA <>) * RP
private static boolean copy_stdin_real_7_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_stdin_real_7_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = copy_stdin_real_7_0_0(builder_, level_ + 1);
result_ = result_ && consumeToken(builder_, LP);
result_ = result_ && copyOptionExt(builder_, level_ + 1, PostgreSqlParser::copy_option_real);
result_ = result_ && copy_stdin_real_7_0_3(builder_, level_ + 1);
result_ = result_ && consumeToken(builder_, RP);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [ WITH ]
private static boolean copy_stdin_real_7_0_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_stdin_real_7_0_0")) return false;
consumeToken(builder_, WITH);
return true;
}
// ( COMMA <>) *
private static boolean copy_stdin_real_7_0_3(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_stdin_real_7_0_3")) return false;
while (true) {
int pos_ = current_position_(builder_);
if (!copy_stdin_real_7_0_3_0(builder_, level_ + 1)) break;
if (!empty_element_parsed_guard_(builder_, "copy_stdin_real_7_0_3", pos_)) break;
}
return true;
}
// COMMA <>
private static boolean copy_stdin_real_7_0_3_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_stdin_real_7_0_3_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, COMMA);
result_ = result_ && copyOptionExt(builder_, level_ + 1, PostgreSqlParser::copy_option_real);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [ WHERE <> ]
private static boolean copy_stdin_real_8(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_stdin_real_8")) return false;
copy_stdin_real_8_0(builder_, level_ + 1);
return true;
}
// WHERE <>
private static boolean copy_stdin_real_8_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "copy_stdin_real_8_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, WHERE);
result_ = result_ && expr(builder_, level_ + 1, -1);
exit_section_(builder_, marker_, null, result_);
return result_;
}
/* ********************************************************** */
// ( CURRENT_TIMESTAMP | 'NOW()' | <> ) [ [ PLUS | MINUS ] <> ] *
public static boolean current_timestamp_with_optional_interval_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "current_timestamp_with_optional_interval_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _COLLAPSE_, CURRENT_TIMESTAMP_WITH_OPTIONAL_INTERVAL, "");
result_ = current_timestamp_with_optional_interval_real_0(builder_, level_ + 1);
result_ = result_ && current_timestamp_with_optional_interval_real_1(builder_, level_ + 1);
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
// CURRENT_TIMESTAMP | 'NOW()' | <>
private static boolean current_timestamp_with_optional_interval_real_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "current_timestamp_with_optional_interval_real_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, CURRENT_TIMESTAMP);
if (!result_) result_ = consumeToken(builder_, "NOW()");
if (!result_) result_ = intervalExpressionExt(builder_, level_ + 1, PostgreSqlParser::interval_expression_real);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [ [ PLUS | MINUS ] <> ]
private static boolean current_timestamp_with_optional_interval_real_1(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "current_timestamp_with_optional_interval_real_1")) return false;
current_timestamp_with_optional_interval_real_1_0(builder_, level_ + 1);
return true;
}
// [ PLUS | MINUS ] <>
private static boolean current_timestamp_with_optional_interval_real_1_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "current_timestamp_with_optional_interval_real_1_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = current_timestamp_with_optional_interval_real_1_0_0(builder_, level_ + 1);
result_ = result_ && intervalExpressionExt(builder_, level_ + 1, PostgreSqlParser::interval_expression_real);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [ PLUS | MINUS ]
private static boolean current_timestamp_with_optional_interval_real_1_0_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "current_timestamp_with_optional_interval_real_1_0_0")) return false;
current_timestamp_with_optional_interval_real_1_0_0_0(builder_, level_ + 1);
return true;
}
// PLUS | MINUS
private static boolean current_timestamp_with_optional_interval_real_1_0_0_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "current_timestamp_with_optional_interval_real_1_0_0_0")) return false;
boolean result_;
result_ = consumeToken(builder_, PLUS);
if (!result_) result_ = consumeToken(builder_, MINUS);
return result_;
}
/* ********************************************************** */
// 'DATA'
public static boolean data_clause_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "data_clause_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, DATA_CLAUSE, "");
result_ = consumeToken(builder_, "DATA");
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
/* ********************************************************** */
// 'DATE' | (('TIME' | 'TIMESTAMP') [ LP <>>> RP ] [(WITH | WITHOUT) 'TIME' 'ZONE']) | 'TIMESTAMPTZ' | 'INTERVAL'
public static boolean date_data_type_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "date_data_type_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _COLLAPSE_, DATE_DATA_TYPE, "");
result_ = consumeToken(builder_, "DATE");
if (!result_) result_ = date_data_type_real_1(builder_, level_ + 1);
if (!result_) result_ = consumeToken(builder_, "TIMESTAMPTZ");
if (!result_) result_ = consumeToken(builder_, "INTERVAL");
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
// ('TIME' | 'TIMESTAMP') [ LP <>>> RP ] [(WITH | WITHOUT) 'TIME' 'ZONE']
private static boolean date_data_type_real_1(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "date_data_type_real_1")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = date_data_type_real_1_0(builder_, level_ + 1);
result_ = result_ && date_data_type_real_1_1(builder_, level_ + 1);
result_ = result_ && date_data_type_real_1_2(builder_, level_ + 1);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// 'TIME' | 'TIMESTAMP'
private static boolean date_data_type_real_1_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "date_data_type_real_1_0")) return false;
boolean result_;
result_ = consumeToken(builder_, "TIME");
if (!result_) result_ = consumeToken(builder_, "TIMESTAMP");
return result_;
}
// [ LP <>>> RP ]
private static boolean date_data_type_real_1_1(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "date_data_type_real_1_1")) return false;
date_data_type_real_1_1_0(builder_, level_ + 1);
return true;
}
// LP <>>> RP
private static boolean date_data_type_real_1_1_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "date_data_type_real_1_1_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, LP);
result_ = result_ && signedNumberExt(builder_, level_ + 1, date_data_type_real_1_1_0_1_0_parser_);
result_ = result_ && consumeToken(builder_, RP);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [(WITH | WITHOUT) 'TIME' 'ZONE']
private static boolean date_data_type_real_1_2(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "date_data_type_real_1_2")) return false;
date_data_type_real_1_2_0(builder_, level_ + 1);
return true;
}
// (WITH | WITHOUT) 'TIME' 'ZONE'
private static boolean date_data_type_real_1_2_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "date_data_type_real_1_2_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = date_data_type_real_1_2_0_0(builder_, level_ + 1);
result_ = result_ && consumeToken(builder_, "TIME");
result_ = result_ && consumeToken(builder_, "ZONE");
exit_section_(builder_, marker_, null, result_);
return result_;
}
// WITH | WITHOUT
private static boolean date_data_type_real_1_2_0_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "date_data_type_real_1_2_0_0")) return false;
boolean result_;
result_ = consumeToken(builder_, WITH);
if (!result_) result_ = consumeToken(builder_, WITHOUT);
return result_;
}
/* ********************************************************** */
// [ NOT NULL | NULL ] DEFAULT (
// <> |
// <>>> |
// <>>> |
// LP <> RP
// )
public static boolean default_constraint_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "default_constraint_real")) return false;
boolean result_, pinned_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, DEFAULT_CONSTRAINT, "");
result_ = default_constraint_real_0(builder_, level_ + 1);
result_ = result_ && consumeToken(builder_, DEFAULT);
pinned_ = result_; // pin = 2
result_ = result_ && default_constraint_real_2(builder_, level_ + 1);
exit_section_(builder_, level_, marker_, result_, pinned_, null);
return result_ || pinned_;
}
// [ NOT NULL | NULL ]
private static boolean default_constraint_real_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "default_constraint_real_0")) return false;
default_constraint_real_0_0(builder_, level_ + 1);
return true;
}
// NOT NULL | NULL
private static boolean default_constraint_real_0_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "default_constraint_real_0_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = parseTokens(builder_, 0, NOT, NULL);
if (!result_) result_ = consumeToken(builder_, NULL);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// <> |
// <>>> |
// <>>> |
// LP <> RP
private static boolean default_constraint_real_2(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "default_constraint_real_2")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = currentTimestampWithOptionalIntervalExt(builder_, level_ + 1, PostgreSqlParser::current_timestamp_with_optional_interval_real);
if (!result_) result_ = signedNumberExt(builder_, level_ + 1, default_constraint_real_2_1_0_parser_);
if (!result_) result_ = literalValueExt(builder_, level_ + 1, default_constraint_real_2_2_0_parser_);
if (!result_) result_ = default_constraint_real_2_3(builder_, level_ + 1);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// LP <> RP
private static boolean default_constraint_real_2_3(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "default_constraint_real_2_3")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, LP);
result_ = result_ && expr(builder_, level_ + 1, -1);
result_ = result_ && consumeToken(builder_, RP);
exit_section_(builder_, marker_, null, result_);
return result_;
}
/* ********************************************************** */
// [ <>>> ] DELETE FROM <>>> [ WHERE <> ] [ [ ORDER BY <>>> ( COMMA <>>> ) * ] LIMIT <> [ ( OFFSET | COMMA ) <> ] ] [ <> ]
public static boolean delete_stmt_limited_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "delete_stmt_limited_real")) return false;
boolean result_, pinned_;
Marker marker_ = enter_section_(builder_, level_, _NONE_, DELETE_STMT_LIMITED, "");
result_ = delete_stmt_limited_real_0(builder_, level_ + 1);
result_ = result_ && consumeTokens(builder_, 1, DELETE, FROM);
pinned_ = result_; // pin = 2
result_ = result_ && report_error_(builder_, qualifiedTableNameExt(builder_, level_ + 1, delete_stmt_limited_real_3_0_parser_));
result_ = pinned_ && report_error_(builder_, delete_stmt_limited_real_4(builder_, level_ + 1)) && result_;
result_ = pinned_ && report_error_(builder_, delete_stmt_limited_real_5(builder_, level_ + 1)) && result_;
result_ = pinned_ && delete_stmt_limited_real_6(builder_, level_ + 1) && result_;
exit_section_(builder_, level_, marker_, result_, pinned_, null);
return result_ || pinned_;
}
// [ <>>> ]
private static boolean delete_stmt_limited_real_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "delete_stmt_limited_real_0")) return false;
withClauseExt(builder_, level_ + 1, delete_stmt_limited_real_0_0_0_parser_);
return true;
}
// [ WHERE <> ]
private static boolean delete_stmt_limited_real_4(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "delete_stmt_limited_real_4")) return false;
delete_stmt_limited_real_4_0(builder_, level_ + 1);
return true;
}
// WHERE <>
private static boolean delete_stmt_limited_real_4_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "delete_stmt_limited_real_4_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, WHERE);
result_ = result_ && expr(builder_, level_ + 1, -1);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [ [ ORDER BY <>>> ( COMMA <>>> ) * ] LIMIT <> [ ( OFFSET | COMMA ) <> ] ]
private static boolean delete_stmt_limited_real_5(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "delete_stmt_limited_real_5")) return false;
delete_stmt_limited_real_5_0(builder_, level_ + 1);
return true;
}
// [ ORDER BY <>>> ( COMMA <>>> ) * ] LIMIT <> [ ( OFFSET | COMMA ) <> ]
private static boolean delete_stmt_limited_real_5_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "delete_stmt_limited_real_5_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = delete_stmt_limited_real_5_0_0(builder_, level_ + 1);
result_ = result_ && consumeToken(builder_, LIMIT);
result_ = result_ && expr(builder_, level_ + 1, -1);
result_ = result_ && delete_stmt_limited_real_5_0_3(builder_, level_ + 1);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [ ORDER BY <>>> ( COMMA <>>> ) * ]
private static boolean delete_stmt_limited_real_5_0_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "delete_stmt_limited_real_5_0_0")) return false;
delete_stmt_limited_real_5_0_0_0(builder_, level_ + 1);
return true;
}
// ORDER BY <>>> ( COMMA <>>> ) *
private static boolean delete_stmt_limited_real_5_0_0_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "delete_stmt_limited_real_5_0_0_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeTokens(builder_, 0, ORDER, BY);
result_ = result_ && orderingTermExt(builder_, level_ + 1, delete_stmt_limited_real_5_0_0_0_2_0_parser_);
result_ = result_ && delete_stmt_limited_real_5_0_0_0_3(builder_, level_ + 1);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// ( COMMA <>>> ) *
private static boolean delete_stmt_limited_real_5_0_0_0_3(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "delete_stmt_limited_real_5_0_0_0_3")) return false;
while (true) {
int pos_ = current_position_(builder_);
if (!delete_stmt_limited_real_5_0_0_0_3_0(builder_, level_ + 1)) break;
if (!empty_element_parsed_guard_(builder_, "delete_stmt_limited_real_5_0_0_0_3", pos_)) break;
}
return true;
}
// COMMA <>>>
private static boolean delete_stmt_limited_real_5_0_0_0_3_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "delete_stmt_limited_real_5_0_0_0_3_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, COMMA);
result_ = result_ && orderingTermExt(builder_, level_ + 1, delete_stmt_limited_real_5_0_0_0_3_0_1_0_parser_);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// [ ( OFFSET | COMMA ) <> ]
private static boolean delete_stmt_limited_real_5_0_3(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "delete_stmt_limited_real_5_0_3")) return false;
delete_stmt_limited_real_5_0_3_0(builder_, level_ + 1);
return true;
}
// ( OFFSET | COMMA ) <>
private static boolean delete_stmt_limited_real_5_0_3_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "delete_stmt_limited_real_5_0_3_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = delete_stmt_limited_real_5_0_3_0_0(builder_, level_ + 1);
result_ = result_ && expr(builder_, level_ + 1, -1);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// OFFSET | COMMA
private static boolean delete_stmt_limited_real_5_0_3_0_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "delete_stmt_limited_real_5_0_3_0_0")) return false;
boolean result_;
result_ = consumeToken(builder_, OFFSET);
if (!result_) result_ = consumeToken(builder_, COMMA);
return result_;
}
// [ <> ]
private static boolean delete_stmt_limited_real_6(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "delete_stmt_limited_real_6")) return false;
returningClauseExt(builder_, level_ + 1, PostgreSqlParser::returning_clause_real);
return true;
}
/* ********************************************************** */
// <> | <> | <> | <>
public static boolean extension_expr_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "extension_expr_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _COLLAPSE_, EXTENSION_EXPR, "");
result_ = jsonExpressionExt(builder_, level_ + 1, PostgreSqlParser::json_expression_real);
if (!result_) result_ = booleanLiteralExt(builder_, level_ + 1, PostgreSqlParser::boolean_literal_real);
if (!result_) result_ = booleanNotExpressionExt(builder_, level_ + 1, PostgreSqlParser::boolean_not_expression_real);
if (!result_) result_ = windowFunctionExprExt(builder_, level_ + 1, PostgreSqlParser::window_function_expr_real);
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
/* ********************************************************** */
// <>
public static boolean extension_stmt_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "extension_stmt_real")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_, level_, _COLLAPSE_, EXTENSION_STMT, "");
result_ = copyStdinExt(builder_, level_ + 1, PostgreSqlParser::copy_stdin_real);
exit_section_(builder_, level_, marker_, result_, false, null);
return result_;
}
/* ********************************************************** */
// GENERATED ( (ALWAYS AS LP <> RP 'STORED') | ( (ALWAYS | BY DEFAULT) AS <> ) )
public static boolean generated_clause_real(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "generated_clause_real")) return false;
if (!nextTokenIs(builder_, GENERATED)) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeToken(builder_, GENERATED);
result_ = result_ && generated_clause_real_1(builder_, level_ + 1);
exit_section_(builder_, marker_, GENERATED_CLAUSE, result_);
return result_;
}
// (ALWAYS AS LP <> RP 'STORED') | ( (ALWAYS | BY DEFAULT) AS <> )
private static boolean generated_clause_real_1(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "generated_clause_real_1")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = generated_clause_real_1_0(builder_, level_ + 1);
if (!result_) result_ = generated_clause_real_1_1(builder_, level_ + 1);
exit_section_(builder_, marker_, null, result_);
return result_;
}
// ALWAYS AS LP <> RP 'STORED'
private static boolean generated_clause_real_1_0(PsiBuilder builder_, int level_) {
if (!recursion_guard_(builder_, level_, "generated_clause_real_1_0")) return false;
boolean result_;
Marker marker_ = enter_section_(builder_);
result_ = consumeTokens(builder_, 0, ALWAYS, AS, LP);
result_ = result_ && expr(builder_, level_ + 1, -1);
result_ = result_ && consumeToken(builder_, RP);
result_ = result_ && consumeToken(builder_, "STORED");
exit_section_(builder_, marker_, null, result_);
return result_;
}
// (ALWAYS | BY DEFAULT) AS <