All Downloads are FREE. Search and download functionalities are using the official Maven repository.

app.cash.sqldelight.dialects.sqlite_3_33.grammar.SqliteParser Maven / Gradle / Ivy

There is a newer version: 2.0.2
Show newest version
// This is a generated file. Not intended for manual editing.
package app.cash.sqldelight.dialects.sqlite_3_33.grammar;

import com.intellij.lang.PsiBuilder;
import com.intellij.lang.PsiBuilder.Marker;
import static app.cash.sqldelight.dialects.sqlite_3_33.grammar.psi.SqliteTypes.*;
import static app.cash.sqldelight.dialects.sqlite_3_33.grammar.SqliteParserUtil.*;
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.withClauseExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.qualifiedTableNameExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.joinClauseExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.orderingTermExt;
import static com.alecstrong.sql.psi.core.SqlParserUtil.columnNameExt;
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.UPDATE;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.OR;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.ROLLBACK;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.ABORT;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.REPLACE;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.FAIL;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.IGNORE;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.FROM;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.COMMA;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.WHERE;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.ORDER;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.BY;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.LIMIT;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.OFFSET;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.SET;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.EQ;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.LP;
import static com.alecstrong.sql.psi.core.psi.SqlTypes.RP;

@SuppressWarnings({"SimplifiableIfStatement", "UnusedAssignment"})
public class SqliteParser 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);
  }

  /* ********************************************************** */
  // <> | <>
  public static boolean overrides_real(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "overrides_real")) return false;
    boolean result_;
    Marker marker_ = enter_section_(builder_, level_, _COLLAPSE_, OVERRIDES, "");
    result_ = updateStmtExt(builder_, level_ + 1, SqliteParser::update_stmt_real);
    if (!result_) result_ = updateStmtLimitedExt(builder_, level_ + 1, SqliteParser::update_stmt_limited_real);
    exit_section_(builder_, level_, marker_, result_, false, null);
    return result_;
  }

  /* ********************************************************** */
  // <>
  static boolean root(PsiBuilder builder_, int level_) {
    return overridesExt(builder_, level_ + 1, SqliteParser::overrides_real);
  }

  /* ********************************************************** */
  // SET (( <>>> EQ <>>> <>>> * ) | ( LP <>>> ( COMMA <>>> ) * RP ) EQ ( LP <>>> ( COMMA <>>> ) * RP ))
  static boolean update_set_clause_real(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_set_clause_real")) return false;
    if (!nextTokenIs(builder_, SET)) return false;
    boolean result_, pinned_;
    Marker marker_ = enter_section_(builder_, level_, _NONE_);
    result_ = consumeToken(builder_, SET);
    pinned_ = result_; // pin = 1
    result_ = result_ && update_set_clause_real_1(builder_, level_ + 1);
    exit_section_(builder_, level_, marker_, result_, pinned_, null);
    return result_ || pinned_;
  }

  // ( <>>> EQ <>>> <>>> * ) | ( LP <>>> ( COMMA <>>> ) * RP ) EQ ( LP <>>> ( COMMA <>>> ) * RP )
  private static boolean update_set_clause_real_1(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_set_clause_real_1")) return false;
    boolean result_;
    Marker marker_ = enter_section_(builder_);
    result_ = update_set_clause_real_1_0(builder_, level_ + 1);
    if (!result_) result_ = update_set_clause_real_1_1(builder_, level_ + 1);
    exit_section_(builder_, marker_, null, result_);
    return result_;
  }

  // <>>> EQ <>>> <>>> *
  private static boolean update_set_clause_real_1_0(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_set_clause_real_1_0")) return false;
    boolean result_, pinned_;
    Marker marker_ = enter_section_(builder_, level_, _NONE_);
    result_ = columnNameExt(builder_, level_ + 1, update_set_clause_real_1_0_0_0_parser_);
    pinned_ = result_; // pin = 1
    result_ = result_ && report_error_(builder_, consumeToken(builder_, EQ));
    result_ = pinned_ && report_error_(builder_, setterExpressionExt(builder_, level_ + 1, update_set_clause_real_1_0_2_0_parser_)) && result_;
    result_ = pinned_ && update_set_clause_real_1_0_3(builder_, level_ + 1) && result_;
    exit_section_(builder_, level_, marker_, result_, pinned_, null);
    return result_ || pinned_;
  }

  // <>>> *
  private static boolean update_set_clause_real_1_0_3(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_set_clause_real_1_0_3")) return false;
    while (true) {
      int pos_ = current_position_(builder_);
      if (!updateStmtSubsequentSetterExt(builder_, level_ + 1, update_set_clause_real_1_0_3_0_0_parser_)) break;
      if (!empty_element_parsed_guard_(builder_, "update_set_clause_real_1_0_3", pos_)) break;
    }
    return true;
  }

  // ( LP <>>> ( COMMA <>>> ) * RP ) EQ ( LP <>>> ( COMMA <>>> ) * RP )
  private static boolean update_set_clause_real_1_1(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_set_clause_real_1_1")) return false;
    boolean result_, pinned_;
    Marker marker_ = enter_section_(builder_, level_, _NONE_);
    result_ = update_set_clause_real_1_1_0(builder_, level_ + 1);
    pinned_ = result_; // pin = 1
    result_ = result_ && report_error_(builder_, consumeToken(builder_, EQ));
    result_ = pinned_ && update_set_clause_real_1_1_2(builder_, level_ + 1) && result_;
    exit_section_(builder_, level_, marker_, result_, pinned_, null);
    return result_ || pinned_;
  }

  // LP <>>> ( COMMA <>>> ) * RP
  private static boolean update_set_clause_real_1_1_0(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_set_clause_real_1_1_0")) return false;
    boolean result_, pinned_;
    Marker marker_ = enter_section_(builder_, level_, _NONE_);
    result_ = consumeToken(builder_, LP);
    pinned_ = result_; // pin = 1
    result_ = result_ && report_error_(builder_, columnNameExt(builder_, level_ + 1, update_set_clause_real_1_1_0_1_0_parser_));
    result_ = pinned_ && report_error_(builder_, update_set_clause_real_1_1_0_2(builder_, level_ + 1)) && result_;
    result_ = pinned_ && consumeToken(builder_, RP) && result_;
    exit_section_(builder_, level_, marker_, result_, pinned_, null);
    return result_ || pinned_;
  }

  // ( COMMA <>>> ) *
  private static boolean update_set_clause_real_1_1_0_2(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_set_clause_real_1_1_0_2")) return false;
    while (true) {
      int pos_ = current_position_(builder_);
      if (!update_set_clause_real_1_1_0_2_0(builder_, level_ + 1)) break;
      if (!empty_element_parsed_guard_(builder_, "update_set_clause_real_1_1_0_2", pos_)) break;
    }
    return true;
  }

  // COMMA <>>>
  private static boolean update_set_clause_real_1_1_0_2_0(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_set_clause_real_1_1_0_2_0")) return false;
    boolean result_, pinned_;
    Marker marker_ = enter_section_(builder_, level_, _NONE_);
    result_ = consumeToken(builder_, COMMA);
    pinned_ = result_; // pin = 1
    result_ = result_ && columnNameExt(builder_, level_ + 1, update_set_clause_real_1_1_0_2_0_1_0_parser_);
    exit_section_(builder_, level_, marker_, result_, pinned_, null);
    return result_ || pinned_;
  }

  // LP <>>> ( COMMA <>>> ) * RP
  private static boolean update_set_clause_real_1_1_2(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_set_clause_real_1_1_2")) return false;
    boolean result_, pinned_;
    Marker marker_ = enter_section_(builder_, level_, _NONE_);
    result_ = consumeToken(builder_, LP);
    pinned_ = result_; // pin = 1
    result_ = result_ && report_error_(builder_, setterExpressionExt(builder_, level_ + 1, update_set_clause_real_1_1_2_1_0_parser_));
    result_ = pinned_ && report_error_(builder_, update_set_clause_real_1_1_2_2(builder_, level_ + 1)) && result_;
    result_ = pinned_ && consumeToken(builder_, RP) && result_;
    exit_section_(builder_, level_, marker_, result_, pinned_, null);
    return result_ || pinned_;
  }

  // ( COMMA <>>> ) *
  private static boolean update_set_clause_real_1_1_2_2(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_set_clause_real_1_1_2_2")) return false;
    while (true) {
      int pos_ = current_position_(builder_);
      if (!update_set_clause_real_1_1_2_2_0(builder_, level_ + 1)) break;
      if (!empty_element_parsed_guard_(builder_, "update_set_clause_real_1_1_2_2", pos_)) break;
    }
    return true;
  }

  // COMMA <>>>
  private static boolean update_set_clause_real_1_1_2_2_0(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_set_clause_real_1_1_2_2_0")) return false;
    boolean result_, pinned_;
    Marker marker_ = enter_section_(builder_, level_, _NONE_);
    result_ = consumeToken(builder_, COMMA);
    pinned_ = result_; // pin = 1
    result_ = result_ && setterExpressionExt(builder_, level_ + 1, update_set_clause_real_1_1_2_2_0_1_0_parser_);
    exit_section_(builder_, level_, marker_, result_, pinned_, null);
    return result_ || pinned_;
  }

  /* ********************************************************** */
  // [ <>>> ] UPDATE [ OR ROLLBACK | OR ABORT | OR REPLACE | OR FAIL | OR IGNORE ] <>>>
  //   update_set_clause_real
  //   [ FROM <>>> ]
  //   [ WHERE <> ]
  //   [ [ ORDER BY <>>> ( COMMA <>>> ) * ]
  //   LIMIT <> [ ( OFFSET | COMMA ) <> ] ]
  public static boolean update_stmt_limited_real(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_limited_real")) return false;
    boolean result_, pinned_;
    Marker marker_ = enter_section_(builder_, level_, _NONE_, UPDATE_STMT_LIMITED, "");
    result_ = update_stmt_limited_real_0(builder_, level_ + 1);
    result_ = result_ && consumeToken(builder_, UPDATE);
    result_ = result_ && update_stmt_limited_real_2(builder_, level_ + 1);
    result_ = result_ && qualifiedTableNameExt(builder_, level_ + 1, update_stmt_limited_real_3_0_parser_);
    pinned_ = result_; // pin = 4
    result_ = result_ && report_error_(builder_, update_set_clause_real(builder_, level_ + 1));
    result_ = pinned_ && report_error_(builder_, update_stmt_limited_real_5(builder_, level_ + 1)) && result_;
    result_ = pinned_ && report_error_(builder_, update_stmt_limited_real_6(builder_, level_ + 1)) && result_;
    result_ = pinned_ && update_stmt_limited_real_7(builder_, level_ + 1) && result_;
    exit_section_(builder_, level_, marker_, result_, pinned_, null);
    return result_ || pinned_;
  }

  // [ <>>> ]
  private static boolean update_stmt_limited_real_0(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_limited_real_0")) return false;
    withClauseExt(builder_, level_ + 1, update_stmt_limited_real_0_0_0_parser_);
    return true;
  }

  // [ OR ROLLBACK | OR ABORT | OR REPLACE | OR FAIL | OR IGNORE ]
  private static boolean update_stmt_limited_real_2(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_limited_real_2")) return false;
    update_stmt_limited_real_2_0(builder_, level_ + 1);
    return true;
  }

  // OR ROLLBACK | OR ABORT | OR REPLACE | OR FAIL | OR IGNORE
  private static boolean update_stmt_limited_real_2_0(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_limited_real_2_0")) return false;
    boolean result_;
    Marker marker_ = enter_section_(builder_);
    result_ = parseTokens(builder_, 0, OR, ROLLBACK);
    if (!result_) result_ = parseTokens(builder_, 0, OR, ABORT);
    if (!result_) result_ = parseTokens(builder_, 0, OR, REPLACE);
    if (!result_) result_ = parseTokens(builder_, 0, OR, FAIL);
    if (!result_) result_ = parseTokens(builder_, 0, OR, IGNORE);
    exit_section_(builder_, marker_, null, result_);
    return result_;
  }

  // [ FROM <>>> ]
  private static boolean update_stmt_limited_real_5(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_limited_real_5")) return false;
    update_stmt_limited_real_5_0(builder_, level_ + 1);
    return true;
  }

  // FROM <>>>
  private static boolean update_stmt_limited_real_5_0(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_limited_real_5_0")) return false;
    boolean result_;
    Marker marker_ = enter_section_(builder_);
    result_ = consumeToken(builder_, FROM);
    result_ = result_ && joinClauseExt(builder_, level_ + 1, update_stmt_limited_real_5_0_1_0_parser_);
    exit_section_(builder_, marker_, null, result_);
    return result_;
  }

  // [ WHERE <> ]
  private static boolean update_stmt_limited_real_6(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_limited_real_6")) return false;
    update_stmt_limited_real_6_0(builder_, level_ + 1);
    return true;
  }

  // WHERE <>
  private static boolean update_stmt_limited_real_6_0(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_limited_real_6_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 update_stmt_limited_real_7(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_limited_real_7")) return false;
    update_stmt_limited_real_7_0(builder_, level_ + 1);
    return true;
  }

  // [ ORDER BY <>>> ( COMMA <>>> ) * ]
  //   LIMIT <> [ ( OFFSET | COMMA ) <> ]
  private static boolean update_stmt_limited_real_7_0(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_limited_real_7_0")) return false;
    boolean result_;
    Marker marker_ = enter_section_(builder_);
    result_ = update_stmt_limited_real_7_0_0(builder_, level_ + 1);
    result_ = result_ && consumeToken(builder_, LIMIT);
    result_ = result_ && expr(builder_, level_ + 1, -1);
    result_ = result_ && update_stmt_limited_real_7_0_3(builder_, level_ + 1);
    exit_section_(builder_, marker_, null, result_);
    return result_;
  }

  // [ ORDER BY <>>> ( COMMA <>>> ) * ]
  private static boolean update_stmt_limited_real_7_0_0(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_limited_real_7_0_0")) return false;
    update_stmt_limited_real_7_0_0_0(builder_, level_ + 1);
    return true;
  }

  // ORDER BY <>>> ( COMMA <>>> ) *
  private static boolean update_stmt_limited_real_7_0_0_0(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_limited_real_7_0_0_0")) return false;
    boolean result_;
    Marker marker_ = enter_section_(builder_);
    result_ = consumeTokens(builder_, 0, ORDER, BY);
    result_ = result_ && orderingTermExt(builder_, level_ + 1, update_stmt_limited_real_7_0_0_0_2_0_parser_);
    result_ = result_ && update_stmt_limited_real_7_0_0_0_3(builder_, level_ + 1);
    exit_section_(builder_, marker_, null, result_);
    return result_;
  }

  // ( COMMA <>>> ) *
  private static boolean update_stmt_limited_real_7_0_0_0_3(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_limited_real_7_0_0_0_3")) return false;
    while (true) {
      int pos_ = current_position_(builder_);
      if (!update_stmt_limited_real_7_0_0_0_3_0(builder_, level_ + 1)) break;
      if (!empty_element_parsed_guard_(builder_, "update_stmt_limited_real_7_0_0_0_3", pos_)) break;
    }
    return true;
  }

  // COMMA <>>>
  private static boolean update_stmt_limited_real_7_0_0_0_3_0(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_limited_real_7_0_0_0_3_0")) return false;
    boolean result_;
    Marker marker_ = enter_section_(builder_);
    result_ = consumeToken(builder_, COMMA);
    result_ = result_ && orderingTermExt(builder_, level_ + 1, update_stmt_limited_real_7_0_0_0_3_0_1_0_parser_);
    exit_section_(builder_, marker_, null, result_);
    return result_;
  }

  // [ ( OFFSET | COMMA ) <> ]
  private static boolean update_stmt_limited_real_7_0_3(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_limited_real_7_0_3")) return false;
    update_stmt_limited_real_7_0_3_0(builder_, level_ + 1);
    return true;
  }

  // ( OFFSET | COMMA ) <>
  private static boolean update_stmt_limited_real_7_0_3_0(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_limited_real_7_0_3_0")) return false;
    boolean result_;
    Marker marker_ = enter_section_(builder_);
    result_ = update_stmt_limited_real_7_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 update_stmt_limited_real_7_0_3_0_0(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_limited_real_7_0_3_0_0")) return false;
    boolean result_;
    result_ = consumeToken(builder_, OFFSET);
    if (!result_) result_ = consumeToken(builder_, COMMA);
    return result_;
  }

  /* ********************************************************** */
  // [ <>>> ] UPDATE [ OR ROLLBACK | OR ABORT | OR REPLACE | OR FAIL | OR IGNORE ] <>>>
  //   update_set_clause_real
  //   [ FROM <>>> ]
  //   [ WHERE <> ]
  public static boolean update_stmt_real(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_real")) return false;
    boolean result_, pinned_;
    Marker marker_ = enter_section_(builder_, level_, _NONE_, UPDATE_STMT, "");
    result_ = update_stmt_real_0(builder_, level_ + 1);
    result_ = result_ && consumeToken(builder_, UPDATE);
    result_ = result_ && update_stmt_real_2(builder_, level_ + 1);
    result_ = result_ && qualifiedTableNameExt(builder_, level_ + 1, update_stmt_real_3_0_parser_);
    pinned_ = result_; // pin = 4
    result_ = result_ && report_error_(builder_, update_set_clause_real(builder_, level_ + 1));
    result_ = pinned_ && report_error_(builder_, update_stmt_real_5(builder_, level_ + 1)) && result_;
    result_ = pinned_ && update_stmt_real_6(builder_, level_ + 1) && result_;
    exit_section_(builder_, level_, marker_, result_, pinned_, null);
    return result_ || pinned_;
  }

  // [ <>>> ]
  private static boolean update_stmt_real_0(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_real_0")) return false;
    withClauseExt(builder_, level_ + 1, update_stmt_real_0_0_0_parser_);
    return true;
  }

  // [ OR ROLLBACK | OR ABORT | OR REPLACE | OR FAIL | OR IGNORE ]
  private static boolean update_stmt_real_2(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_real_2")) return false;
    update_stmt_real_2_0(builder_, level_ + 1);
    return true;
  }

  // OR ROLLBACK | OR ABORT | OR REPLACE | OR FAIL | OR IGNORE
  private static boolean update_stmt_real_2_0(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_real_2_0")) return false;
    boolean result_;
    Marker marker_ = enter_section_(builder_);
    result_ = parseTokens(builder_, 0, OR, ROLLBACK);
    if (!result_) result_ = parseTokens(builder_, 0, OR, ABORT);
    if (!result_) result_ = parseTokens(builder_, 0, OR, REPLACE);
    if (!result_) result_ = parseTokens(builder_, 0, OR, FAIL);
    if (!result_) result_ = parseTokens(builder_, 0, OR, IGNORE);
    exit_section_(builder_, marker_, null, result_);
    return result_;
  }

  // [ FROM <>>> ]
  private static boolean update_stmt_real_5(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_real_5")) return false;
    update_stmt_real_5_0(builder_, level_ + 1);
    return true;
  }

  // FROM <>>>
  private static boolean update_stmt_real_5_0(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_real_5_0")) return false;
    boolean result_;
    Marker marker_ = enter_section_(builder_);
    result_ = consumeToken(builder_, FROM);
    result_ = result_ && joinClauseExt(builder_, level_ + 1, update_stmt_real_5_0_1_0_parser_);
    exit_section_(builder_, marker_, null, result_);
    return result_;
  }

  // [ WHERE <> ]
  private static boolean update_stmt_real_6(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_real_6")) return false;
    update_stmt_real_6_0(builder_, level_ + 1);
    return true;
  }

  // WHERE <>
  private static boolean update_stmt_real_6_0(PsiBuilder builder_, int level_) {
    if (!recursion_guard_(builder_, level_, "update_stmt_real_6_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_;
  }

  static final Parser update_set_clause_real_1_0_0_0_parser_ = (builder_, level_) -> column_name_real(builder_, level_ + 1);
  static final Parser update_set_clause_real_1_0_2_0_parser_ = (builder_, level_) -> setter_expression_real(builder_, level_ + 1);
  static final Parser update_set_clause_real_1_0_3_0_0_parser_ = (builder_, level_) -> update_stmt_subsequent_setter_real(builder_, level_ + 1);
  static final Parser update_set_clause_real_1_1_0_1_0_parser_ = update_set_clause_real_1_0_0_0_parser_;
  static final Parser update_set_clause_real_1_1_0_2_0_1_0_parser_ = update_set_clause_real_1_0_0_0_parser_;
  static final Parser update_set_clause_real_1_1_2_1_0_parser_ = update_set_clause_real_1_0_2_0_parser_;
  static final Parser update_set_clause_real_1_1_2_2_0_1_0_parser_ = update_set_clause_real_1_0_2_0_parser_;
  static final Parser update_stmt_limited_real_0_0_0_parser_ = (builder_, level_) -> with_clause_real(builder_, level_ + 1);
  static final Parser update_stmt_limited_real_3_0_parser_ = (builder_, level_) -> qualified_table_name_real(builder_, level_ + 1);
  static final Parser update_stmt_limited_real_5_0_1_0_parser_ = (builder_, level_) -> join_clause_real(builder_, level_ + 1);
  static final Parser update_stmt_limited_real_7_0_0_0_2_0_parser_ = (builder_, level_) -> ordering_term_real(builder_, level_ + 1);
  static final Parser update_stmt_limited_real_7_0_0_0_3_0_1_0_parser_ = update_stmt_limited_real_7_0_0_0_2_0_parser_;
  static final Parser update_stmt_real_0_0_0_parser_ = update_stmt_limited_real_0_0_0_parser_;
  static final Parser update_stmt_real_3_0_parser_ = update_stmt_limited_real_3_0_parser_;
  static final Parser update_stmt_real_5_0_1_0_parser_ = update_stmt_limited_real_5_0_1_0_parser_;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy