#include "tree_sitter/parser.h"

#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
#endif

#define LANGUAGE_VERSION 14
#define STATE_COUNT 99
#define LARGE_STATE_COUNT 2
#define SYMBOL_COUNT 49
#define ALIAS_COUNT 0
#define TOKEN_COUNT 29
#define EXTERNAL_TOKEN_COUNT 0
#define FIELD_COUNT 12
#define MAX_ALIAS_SEQUENCE_LENGTH 8
#define PRODUCTION_ID_COUNT 17

enum ts_symbol_identifiers {
  sym__lower_id = 1,
  anon_sym_LPAREN = 2,
  anon_sym_COMMA = 3,
  anon_sym_RPAREN = 4,
  anon_sym_SEMI = 5,
  anon_sym_POUND = 6,
  anon_sym_LBRACK = 7,
  anon_sym_RBRACK = 8,
  anon_sym_COLON = 9,
  anon_sym_EQ = 10,
  anon_sym_PIPE = 11,
  anon_sym_case = 12,
  anon_sym_DOT = 13,
  anon_sym_of = 14,
  sym_ref = 15,
  sym_int = 16,
  sym_float = 17,
  sym_boolean = 18,
  sym_date = 19,
  sym_varchar = 20,
  sym_string = 21,
  sym_unique = 22,
  sym__upper_id = 23,
  sym_integer = 24,
  sym_dbtype = 25,
  sym_qldoc = 26,
  sym_line_comment = 27,
  sym_block_comment = 28,
  sym_dbscheme = 29,
  sym_entry = 30,
  sym_table = 31,
  sym_annotation = 32,
  sym_argsAnnotation = 33,
  sym_tableName = 34,
  sym_column = 35,
  sym_unionDecl = 36,
  sym_caseDecl = 37,
  sym_branch = 38,
  sym_colType = 39,
  sym_reprType = 40,
  sym_annotName = 41,
  sym_simpleId = 42,
  aux_sym_dbscheme_repeat1 = 43,
  aux_sym_table_repeat1 = 44,
  aux_sym_table_repeat2 = 45,
  aux_sym_argsAnnotation_repeat1 = 46,
  aux_sym_unionDecl_repeat1 = 47,
  aux_sym_caseDecl_repeat1 = 48,
};

static const char * const ts_symbol_names[] = {
  [ts_builtin_sym_end] = "end",
  [sym__lower_id] = "_lower_id",
  [anon_sym_LPAREN] = "(",
  [anon_sym_COMMA] = ",",
  [anon_sym_RPAREN] = ")",
  [anon_sym_SEMI] = ";",
  [anon_sym_POUND] = "#",
  [anon_sym_LBRACK] = "[",
  [anon_sym_RBRACK] = "]",
  [anon_sym_COLON] = ":",
  [anon_sym_EQ] = "=",
  [anon_sym_PIPE] = "|",
  [anon_sym_case] = "case",
  [anon_sym_DOT] = ".",
  [anon_sym_of] = "of",
  [sym_ref] = "ref",
  [sym_int] = "int",
  [sym_float] = "float",
  [sym_boolean] = "boolean",
  [sym_date] = "date",
  [sym_varchar] = "varchar",
  [sym_string] = "string",
  [sym_unique] = "unique",
  [sym__upper_id] = "_upper_id",
  [sym_integer] = "integer",
  [sym_dbtype] = "dbtype",
  [sym_qldoc] = "qldoc",
  [sym_line_comment] = "line_comment",
  [sym_block_comment] = "block_comment",
  [sym_dbscheme] = "dbscheme",
  [sym_entry] = "entry",
  [sym_table] = "table",
  [sym_annotation] = "annotation",
  [sym_argsAnnotation] = "argsAnnotation",
  [sym_tableName] = "tableName",
  [sym_column] = "column",
  [sym_unionDecl] = "unionDecl",
  [sym_caseDecl] = "caseDecl",
  [sym_branch] = "branch",
  [sym_colType] = "colType",
  [sym_reprType] = "reprType",
  [sym_annotName] = "annotName",
  [sym_simpleId] = "simpleId",
  [aux_sym_dbscheme_repeat1] = "dbscheme_repeat1",
  [aux_sym_table_repeat1] = "table_repeat1",
  [aux_sym_table_repeat2] = "table_repeat2",
  [aux_sym_argsAnnotation_repeat1] = "argsAnnotation_repeat1",
  [aux_sym_unionDecl_repeat1] = "unionDecl_repeat1",
  [aux_sym_caseDecl_repeat1] = "caseDecl_repeat1",
};

static const TSSymbol ts_symbol_map[] = {
  [ts_builtin_sym_end] = ts_builtin_sym_end,
  [sym__lower_id] = sym__lower_id,
  [anon_sym_LPAREN] = anon_sym_LPAREN,
  [anon_sym_COMMA] = anon_sym_COMMA,
  [anon_sym_RPAREN] = anon_sym_RPAREN,
  [anon_sym_SEMI] = anon_sym_SEMI,
  [anon_sym_POUND] = anon_sym_POUND,
  [anon_sym_LBRACK] = anon_sym_LBRACK,
  [anon_sym_RBRACK] = anon_sym_RBRACK,
  [anon_sym_COLON] = anon_sym_COLON,
  [anon_sym_EQ] = anon_sym_EQ,
  [anon_sym_PIPE] = anon_sym_PIPE,
  [anon_sym_case] = anon_sym_case,
  [anon_sym_DOT] = anon_sym_DOT,
  [anon_sym_of] = anon_sym_of,
  [sym_ref] = sym_ref,
  [sym_int] = sym_int,
  [sym_float] = sym_float,
  [sym_boolean] = sym_boolean,
  [sym_date] = sym_date,
  [sym_varchar] = sym_varchar,
  [sym_string] = sym_string,
  [sym_unique] = sym_unique,
  [sym__upper_id] = sym__upper_id,
  [sym_integer] = sym_integer,
  [sym_dbtype] = sym_dbtype,
  [sym_qldoc] = sym_qldoc,
  [sym_line_comment] = sym_line_comment,
  [sym_block_comment] = sym_block_comment,
  [sym_dbscheme] = sym_dbscheme,
  [sym_entry] = sym_entry,
  [sym_table] = sym_table,
  [sym_annotation] = sym_annotation,
  [sym_argsAnnotation] = sym_argsAnnotation,
  [sym_tableName] = sym_tableName,
  [sym_column] = sym_column,
  [sym_unionDecl] = sym_unionDecl,
  [sym_caseDecl] = sym_caseDecl,
  [sym_branch] = sym_branch,
  [sym_colType] = sym_colType,
  [sym_reprType] = sym_reprType,
  [sym_annotName] = sym_annotName,
  [sym_simpleId] = sym_simpleId,
  [aux_sym_dbscheme_repeat1] = aux_sym_dbscheme_repeat1,
  [aux_sym_table_repeat1] = aux_sym_table_repeat1,
  [aux_sym_table_repeat2] = aux_sym_table_repeat2,
  [aux_sym_argsAnnotation_repeat1] = aux_sym_argsAnnotation_repeat1,
  [aux_sym_unionDecl_repeat1] = aux_sym_unionDecl_repeat1,
  [aux_sym_caseDecl_repeat1] = aux_sym_caseDecl_repeat1,
};

static const TSSymbolMetadata ts_symbol_metadata[] = {
  [ts_builtin_sym_end] = {
    .visible = false,
    .named = true,
  },
  [sym__lower_id] = {
    .visible = false,
    .named = true,
  },
  [anon_sym_LPAREN] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_COMMA] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_RPAREN] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_SEMI] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_POUND] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_LBRACK] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_RBRACK] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_COLON] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_EQ] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_PIPE] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_case] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_DOT] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_of] = {
    .visible = true,
    .named = false,
  },
  [sym_ref] = {
    .visible = true,
    .named = true,
  },
  [sym_int] = {
    .visible = true,
    .named = true,
  },
  [sym_float] = {
    .visible = true,
    .named = true,
  },
  [sym_boolean] = {
    .visible = true,
    .named = true,
  },
  [sym_date] = {
    .visible = true,
    .named = true,
  },
  [sym_varchar] = {
    .visible = true,
    .named = true,
  },
  [sym_string] = {
    .visible = true,
    .named = true,
  },
  [sym_unique] = {
    .visible = true,
    .named = true,
  },
  [sym__upper_id] = {
    .visible = false,
    .named = true,
  },
  [sym_integer] = {
    .visible = true,
    .named = true,
  },
  [sym_dbtype] = {
    .visible = true,
    .named = true,
  },
  [sym_qldoc] = {
    .visible = true,
    .named = true,
  },
  [sym_line_comment] = {
    .visible = true,
    .named = true,
  },
  [sym_block_comment] = {
    .visible = true,
    .named = true,
  },
  [sym_dbscheme] = {
    .visible = true,
    .named = true,
  },
  [sym_entry] = {
    .visible = true,
    .named = true,
  },
  [sym_table] = {
    .visible = true,
    .named = true,
  },
  [sym_annotation] = {
    .visible = true,
    .named = true,
  },
  [sym_argsAnnotation] = {
    .visible = true,
    .named = true,
  },
  [sym_tableName] = {
    .visible = true,
    .named = true,
  },
  [sym_column] = {
    .visible = true,
    .named = true,
  },
  [sym_unionDecl] = {
    .visible = true,
    .named = true,
  },
  [sym_caseDecl] = {
    .visible = true,
    .named = true,
  },
  [sym_branch] = {
    .visible = true,
    .named = true,
  },
  [sym_colType] = {
    .visible = true,
    .named = true,
  },
  [sym_reprType] = {
    .visible = true,
    .named = true,
  },
  [sym_annotName] = {
    .visible = true,
    .named = true,
  },
  [sym_simpleId] = {
    .visible = true,
    .named = true,
  },
  [aux_sym_dbscheme_repeat1] = {
    .visible = false,
    .named = false,
  },
  [aux_sym_table_repeat1] = {
    .visible = false,
    .named = false,
  },
  [aux_sym_table_repeat2] = {
    .visible = false,
    .named = false,
  },
  [aux_sym_argsAnnotation_repeat1] = {
    .visible = false,
    .named = false,
  },
  [aux_sym_unionDecl_repeat1] = {
    .visible = false,
    .named = false,
  },
  [aux_sym_caseDecl_repeat1] = {
    .visible = false,
    .named = false,
  },
};

enum ts_field_identifiers {
  field_argsAnnotation = 1,
  field_base = 2,
  field_colName = 3,
  field_colType = 4,
  field_discriminator = 5,
  field_isRef = 6,
  field_isUnique = 7,
  field_name = 8,
  field_qldoc = 9,
  field_reprType = 10,
  field_simpleAnnotation = 11,
  field_tableName = 12,
};

static const char * const ts_field_names[] = {
  [0] = NULL,
  [field_argsAnnotation] = "argsAnnotation",
  [field_base] = "base",
  [field_colName] = "colName",
  [field_colType] = "colType",
  [field_discriminator] = "discriminator",
  [field_isRef] = "isRef",
  [field_isUnique] = "isUnique",
  [field_name] = "name",
  [field_qldoc] = "qldoc",
  [field_reprType] = "reprType",
  [field_simpleAnnotation] = "simpleAnnotation",
  [field_tableName] = "tableName",
};

static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = {
  [1] = {.index = 0, .length = 1},
  [2] = {.index = 1, .length = 1},
  [3] = {.index = 2, .length = 1},
  [4] = {.index = 3, .length = 1},
  [5] = {.index = 4, .length = 1},
  [6] = {.index = 5, .length = 1},
  [7] = {.index = 6, .length = 2},
  [8] = {.index = 8, .length = 3},
  [9] = {.index = 11, .length = 4},
  [10] = {.index = 15, .length = 4},
  [11] = {.index = 19, .length = 4},
  [12] = {.index = 23, .length = 5},
  [13] = {.index = 28, .length = 5},
  [14] = {.index = 33, .length = 5},
  [15] = {.index = 38, .length = 1},
  [16] = {.index = 39, .length = 6},
};

static const TSFieldMapEntry ts_field_map_entries[] = {
  [0] =
    {field_argsAnnotation, 0},
  [1] =
    {field_simpleAnnotation, 1},
  [2] =
    {field_base, 0},
  [3] =
    {field_name, 1},
  [4] =
    {field_tableName, 0},
  [5] =
    {field_tableName, 1},
  [6] =
    {field_base, 1},
    {field_discriminator, 3},
  [8] =
    {field_colName, 1},
    {field_colType, 3},
    {field_reprType, 0},
  [11] =
    {field_colName, 2},
    {field_colType, 4},
    {field_isUnique, 0},
    {field_reprType, 1},
  [15] =
    {field_colName, 2},
    {field_colType, 4},
    {field_qldoc, 0},
    {field_reprType, 1},
  [19] =
    {field_colName, 1},
    {field_colType, 3},
    {field_isRef, 4},
    {field_reprType, 0},
  [23] =
    {field_colName, 2},
    {field_colType, 4},
    {field_isRef, 5},
    {field_isUnique, 0},
    {field_reprType, 1},
  [28] =
    {field_colName, 3},
    {field_colType, 5},
    {field_isUnique, 1},
    {field_qldoc, 0},
    {field_reprType, 2},
  [33] =
    {field_colName, 2},
    {field_colType, 4},
    {field_isRef, 5},
    {field_qldoc, 0},
    {field_reprType, 1},
  [38] =
    {field_qldoc, 0},
  [39] =
    {field_colName, 3},
    {field_colType, 5},
    {field_isRef, 6},
    {field_isUnique, 1},
    {field_qldoc, 0},
    {field_reprType, 2},
};

static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = {
  [0] = {0},
};

static const uint16_t ts_non_terminal_alias_map[] = {
  0,
};

static const TSStateId ts_primary_state_ids[STATE_COUNT] = {
  [0] = 0,
  [1] = 1,
  [2] = 2,
  [3] = 3,
  [4] = 4,
  [5] = 5,
  [6] = 6,
  [7] = 7,
  [8] = 8,
  [9] = 9,
  [10] = 10,
  [11] = 11,
  [12] = 12,
  [13] = 13,
  [14] = 14,
  [15] = 15,
  [16] = 16,
  [17] = 17,
  [18] = 18,
  [19] = 19,
  [20] = 20,
  [21] = 21,
  [22] = 22,
  [23] = 23,
  [24] = 24,
  [25] = 25,
  [26] = 26,
  [27] = 27,
  [28] = 28,
  [29] = 29,
  [30] = 30,
  [31] = 31,
  [32] = 32,
  [33] = 33,
  [34] = 34,
  [35] = 35,
  [36] = 36,
  [37] = 37,
  [38] = 38,
  [39] = 39,
  [40] = 40,
  [41] = 41,
  [42] = 42,
  [43] = 43,
  [44] = 44,
  [45] = 45,
  [46] = 46,
  [47] = 47,
  [48] = 48,
  [49] = 49,
  [50] = 50,
  [51] = 51,
  [52] = 52,
  [53] = 53,
  [54] = 54,
  [55] = 55,
  [56] = 56,
  [57] = 57,
  [58] = 58,
  [59] = 59,
  [60] = 60,
  [61] = 61,
  [62] = 62,
  [63] = 63,
  [64] = 64,
  [65] = 65,
  [66] = 66,
  [67] = 67,
  [68] = 68,
  [69] = 69,
  [70] = 70,
  [71] = 71,
  [72] = 72,
  [73] = 73,
  [74] = 74,
  [75] = 75,
  [76] = 76,
  [77] = 77,
  [78] = 78,
  [79] = 79,
  [80] = 80,
  [81] = 81,
  [82] = 82,
  [83] = 83,
  [84] = 84,
  [85] = 85,
  [86] = 86,
  [87] = 87,
  [88] = 88,
  [89] = 89,
  [90] = 90,
  [91] = 91,
  [92] = 92,
  [93] = 93,
  [94] = 94,
  [95] = 95,
  [96] = 96,
  [97] = 97,
  [98] = 98,
};

static bool ts_lex(TSLexer *lexer, TSStateId state) {
  START_LEXER();
  eof = lexer->eof(lexer);
  switch (state) {
    case 0:
      if (eof) ADVANCE(13);
      ADVANCE_MAP(
        '#', 18,
        '(', 14,
        ')', 16,
        ',', 15,
        '.', 24,
        '/', 1,
        ':', 21,
        ';', 17,
        '=', 22,
        '@', 11,
        '[', 19,
        ']', 20,
        '|', 23,
      );
      if (lookahead == '\t' ||
          lookahead == '\n' ||
          lookahead == '\r' ||
          lookahead == ' ') SKIP(0);
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(27);
      if (('A' <= lookahead && lookahead <= 'Z')) ADVANCE(26);
      if (('a' <= lookahead && lookahead <= 'z')) ADVANCE(25);
      END_STATE();
    case 1:
      if (lookahead == '*') ADVANCE(2);
      if (lookahead == '/') ADVANCE(30);
      END_STATE();
    case 2:
      if (lookahead == '*') ADVANCE(5);
      if (lookahead != 0) ADVANCE(9);
      END_STATE();
    case 3:
      if (lookahead == '*') ADVANCE(10);
      if (lookahead != 0) ADVANCE(9);
      END_STATE();
    case 4:
      if (lookahead == '*') ADVANCE(3);
      if (lookahead == '/') ADVANCE(30);
      END_STATE();
    case 5:
      if (lookahead == '*') ADVANCE(6);
      if (lookahead == '/') ADVANCE(32);
      if (lookahead != 0) ADVANCE(7);
      END_STATE();
    case 6:
      if (lookahead == '*') ADVANCE(6);
      if (lookahead == '/') ADVANCE(29);
      if (lookahead != 0) ADVANCE(7);
      END_STATE();
    case 7:
      if (lookahead == '*') ADVANCE(6);
      if (lookahead != 0) ADVANCE(7);
      END_STATE();
    case 8:
      if (lookahead == '*') ADVANCE(8);
      if (lookahead == '/') ADVANCE(31);
      if (lookahead != 0) ADVANCE(9);
      END_STATE();
    case 9:
      if (lookahead == '*') ADVANCE(8);
      if (lookahead != 0) ADVANCE(9);
      END_STATE();
    case 10:
      if (lookahead == '/') ADVANCE(31);
      END_STATE();
    case 11:
      if (('a' <= lookahead && lookahead <= 'z')) ADVANCE(28);
      END_STATE();
    case 12:
      if (eof) ADVANCE(13);
      ADVANCE_MAP(
        '#', 18,
        '(', 14,
        ')', 16,
        ',', 15,
        '.', 24,
        '/', 4,
        ':', 21,
        '=', 22,
        '@', 11,
        '[', 19,
        ']', 20,
      );
      if (lookahead == '\t' ||
          lookahead == '\n' ||
          lookahead == '\r' ||
          lookahead == ' ') SKIP(12);
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(27);
      if (('A' <= lookahead && lookahead <= 'Z')) ADVANCE(26);
      if (('a' <= lookahead && lookahead <= 'z')) ADVANCE(25);
      END_STATE();
    case 13:
      ACCEPT_TOKEN(ts_builtin_sym_end);
      END_STATE();
    case 14:
      ACCEPT_TOKEN(anon_sym_LPAREN);
      END_STATE();
    case 15:
      ACCEPT_TOKEN(anon_sym_COMMA);
      END_STATE();
    case 16:
      ACCEPT_TOKEN(anon_sym_RPAREN);
      END_STATE();
    case 17:
      ACCEPT_TOKEN(anon_sym_SEMI);
      END_STATE();
    case 18:
      ACCEPT_TOKEN(anon_sym_POUND);
      END_STATE();
    case 19:
      ACCEPT_TOKEN(anon_sym_LBRACK);
      END_STATE();
    case 20:
      ACCEPT_TOKEN(anon_sym_RBRACK);
      END_STATE();
    case 21:
      ACCEPT_TOKEN(anon_sym_COLON);
      END_STATE();
    case 22:
      ACCEPT_TOKEN(anon_sym_EQ);
      END_STATE();
    case 23:
      ACCEPT_TOKEN(anon_sym_PIPE);
      END_STATE();
    case 24:
      ACCEPT_TOKEN(anon_sym_DOT);
      END_STATE();
    case 25:
      ACCEPT_TOKEN(sym__lower_id);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(25);
      END_STATE();
    case 26:
      ACCEPT_TOKEN(sym__upper_id);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(26);
      END_STATE();
    case 27:
      ACCEPT_TOKEN(sym_integer);
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(27);
      END_STATE();
    case 28:
      ACCEPT_TOKEN(sym_dbtype);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(28);
      END_STATE();
    case 29:
      ACCEPT_TOKEN(sym_qldoc);
      END_STATE();
    case 30:
      ACCEPT_TOKEN(sym_line_comment);
      if (lookahead != 0 &&
          lookahead != '\n' &&
          lookahead != '\r') ADVANCE(30);
      END_STATE();
    case 31:
      ACCEPT_TOKEN(sym_block_comment);
      END_STATE();
    case 32:
      ACCEPT_TOKEN(sym_block_comment);
      if (lookahead == '*') ADVANCE(6);
      if (lookahead != 0) ADVANCE(7);
      END_STATE();
    default:
      return false;
  }
}

static bool ts_lex_keywords(TSLexer *lexer, TSStateId state) {
  START_LEXER();
  eof = lexer->eof(lexer);
  switch (state) {
    case 0:
      ADVANCE_MAP(
        'b', 1,
        'c', 2,
        'd', 3,
        'f', 4,
        'i', 5,
        'o', 6,
        'r', 7,
        's', 8,
        'u', 9,
        'v', 10,
      );
      if (lookahead == '\t' ||
          lookahead == '\n' ||
          lookahead == '\r' ||
          lookahead == ' ') SKIP(0);
      END_STATE();
    case 1:
      if (lookahead == 'o') ADVANCE(11);
      END_STATE();
    case 2:
      if (lookahead == 'a') ADVANCE(12);
      END_STATE();
    case 3:
      if (lookahead == 'a') ADVANCE(13);
      END_STATE();
    case 4:
      if (lookahead == 'l') ADVANCE(14);
      END_STATE();
    case 5:
      if (lookahead == 'n') ADVANCE(15);
      END_STATE();
    case 6:
      if (lookahead == 'f') ADVANCE(16);
      END_STATE();
    case 7:
      if (lookahead == 'e') ADVANCE(17);
      END_STATE();
    case 8:
      if (lookahead == 't') ADVANCE(18);
      END_STATE();
    case 9:
      if (lookahead == 'n') ADVANCE(19);
      END_STATE();
    case 10:
      if (lookahead == 'a') ADVANCE(20);
      END_STATE();
    case 11:
      if (lookahead == 'o') ADVANCE(21);
      END_STATE();
    case 12:
      if (lookahead == 's') ADVANCE(22);
      END_STATE();
    case 13:
      if (lookahead == 't') ADVANCE(23);
      END_STATE();
    case 14:
      if (lookahead == 'o') ADVANCE(24);
      END_STATE();
    case 15:
      if (lookahead == 't') ADVANCE(25);
      END_STATE();
    case 16:
      ACCEPT_TOKEN(anon_sym_of);
      END_STATE();
    case 17:
      if (lookahead == 'f') ADVANCE(26);
      END_STATE();
    case 18:
      if (lookahead == 'r') ADVANCE(27);
      END_STATE();
    case 19:
      if (lookahead == 'i') ADVANCE(28);
      END_STATE();
    case 20:
      if (lookahead == 'r') ADVANCE(29);
      END_STATE();
    case 21:
      if (lookahead == 'l') ADVANCE(30);
      END_STATE();
    case 22:
      if (lookahead == 'e') ADVANCE(31);
      END_STATE();
    case 23:
      if (lookahead == 'e') ADVANCE(32);
      END_STATE();
    case 24:
      if (lookahead == 'a') ADVANCE(33);
      END_STATE();
    case 25:
      ACCEPT_TOKEN(sym_int);
      END_STATE();
    case 26:
      ACCEPT_TOKEN(sym_ref);
      END_STATE();
    case 27:
      if (lookahead == 'i') ADVANCE(34);
      END_STATE();
    case 28:
      if (lookahead == 'q') ADVANCE(35);
      END_STATE();
    case 29:
      if (lookahead == 'c') ADVANCE(36);
      END_STATE();
    case 30:
      if (lookahead == 'e') ADVANCE(37);
      END_STATE();
    case 31:
      ACCEPT_TOKEN(anon_sym_case);
      END_STATE();
    case 32:
      ACCEPT_TOKEN(sym_date);
      END_STATE();
    case 33:
      if (lookahead == 't') ADVANCE(38);
      END_STATE();
    case 34:
      if (lookahead == 'n') ADVANCE(39);
      END_STATE();
    case 35:
      if (lookahead == 'u') ADVANCE(40);
      END_STATE();
    case 36:
      if (lookahead == 'h') ADVANCE(41);
      END_STATE();
    case 37:
      if (lookahead == 'a') ADVANCE(42);
      END_STATE();
    case 38:
      ACCEPT_TOKEN(sym_float);
      END_STATE();
    case 39:
      if (lookahead == 'g') ADVANCE(43);
      END_STATE();
    case 40:
      if (lookahead == 'e') ADVANCE(44);
      END_STATE();
    case 41:
      if (lookahead == 'a') ADVANCE(45);
      END_STATE();
    case 42:
      if (lookahead == 'n') ADVANCE(46);
      END_STATE();
    case 43:
      ACCEPT_TOKEN(sym_string);
      END_STATE();
    case 44:
      ACCEPT_TOKEN(sym_unique);
      END_STATE();
    case 45:
      if (lookahead == 'r') ADVANCE(47);
      END_STATE();
    case 46:
      ACCEPT_TOKEN(sym_boolean);
      END_STATE();
    case 47:
      ACCEPT_TOKEN(sym_varchar);
      END_STATE();
    default:
      return false;
  }
}

static const TSLexMode ts_lex_modes[STATE_COUNT] = {
  [0] = {.lex_state = 0},
  [1] = {.lex_state = 0},
  [2] = {.lex_state = 0},
  [3] = {.lex_state = 0},
  [4] = {.lex_state = 0},
  [5] = {.lex_state = 0},
  [6] = {.lex_state = 0},
  [7] = {.lex_state = 0},
  [8] = {.lex_state = 0},
  [9] = {.lex_state = 0},
  [10] = {.lex_state = 0},
  [11] = {.lex_state = 0},
  [12] = {.lex_state = 0},
  [13] = {.lex_state = 0},
  [14] = {.lex_state = 0},
  [15] = {.lex_state = 0},
  [16] = {.lex_state = 0},
  [17] = {.lex_state = 0},
  [18] = {.lex_state = 0},
  [19] = {.lex_state = 12},
  [20] = {.lex_state = 0},
  [21] = {.lex_state = 0},
  [22] = {.lex_state = 12},
  [23] = {.lex_state = 0},
  [24] = {.lex_state = 12},
  [25] = {.lex_state = 0},
  [26] = {.lex_state = 0},
  [27] = {.lex_state = 12},
  [28] = {.lex_state = 12},
  [29] = {.lex_state = 0},
  [30] = {.lex_state = 0},
  [31] = {.lex_state = 0},
  [32] = {.lex_state = 0},
  [33] = {.lex_state = 12},
  [34] = {.lex_state = 0},
  [35] = {.lex_state = 12},
  [36] = {.lex_state = 0},
  [37] = {.lex_state = 12},
  [38] = {.lex_state = 12},
  [39] = {.lex_state = 12},
  [40] = {.lex_state = 12},
  [41] = {.lex_state = 12},
  [42] = {.lex_state = 12},
  [43] = {.lex_state = 12},
  [44] = {.lex_state = 12},
  [45] = {.lex_state = 0},
  [46] = {.lex_state = 12},
  [47] = {.lex_state = 12},
  [48] = {.lex_state = 12},
  [49] = {.lex_state = 12},
  [50] = {.lex_state = 12},
  [51] = {.lex_state = 12},
  [52] = {.lex_state = 12},
  [53] = {.lex_state = 12},
  [54] = {.lex_state = 12},
  [55] = {.lex_state = 12},
  [56] = {.lex_state = 12},
  [57] = {.lex_state = 12},
  [58] = {.lex_state = 0},
  [59] = {.lex_state = 12},
  [60] = {.lex_state = 12},
  [61] = {.lex_state = 12},
  [62] = {.lex_state = 12},
  [63] = {.lex_state = 12},
  [64] = {.lex_state = 12},
  [65] = {.lex_state = 12},
  [66] = {.lex_state = 12},
  [67] = {.lex_state = 12},
  [68] = {.lex_state = 12},
  [69] = {.lex_state = 12},
  [70] = {.lex_state = 12},
  [71] = {.lex_state = 12},
  [72] = {.lex_state = 12},
  [73] = {.lex_state = 12},
  [74] = {.lex_state = 12},
  [75] = {.lex_state = 12},
  [76] = {.lex_state = 12},
  [77] = {.lex_state = 12},
  [78] = {.lex_state = 12},
  [79] = {.lex_state = 12},
  [80] = {.lex_state = 12},
  [81] = {.lex_state = 12},
  [82] = {.lex_state = 12},
  [83] = {.lex_state = 12},
  [84] = {.lex_state = 12},
  [85] = {.lex_state = 12},
  [86] = {.lex_state = 12},
  [87] = {.lex_state = 12},
  [88] = {.lex_state = 12},
  [89] = {.lex_state = 12},
  [90] = {.lex_state = 12},
  [91] = {.lex_state = 12},
  [92] = {.lex_state = 12},
  [93] = {.lex_state = 12},
  [94] = {.lex_state = 12},
  [95] = {.lex_state = 12},
  [96] = {.lex_state = 12},
  [97] = {.lex_state = 12},
  [98] = {.lex_state = 12},
};

static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = {
  [0] = {
    [ts_builtin_sym_end] = ACTIONS(1),
    [sym__lower_id] = ACTIONS(1),
    [anon_sym_LPAREN] = ACTIONS(1),
    [anon_sym_COMMA] = ACTIONS(1),
    [anon_sym_RPAREN] = ACTIONS(1),
    [anon_sym_SEMI] = ACTIONS(1),
    [anon_sym_POUND] = ACTIONS(1),
    [anon_sym_LBRACK] = ACTIONS(1),
    [anon_sym_RBRACK] = ACTIONS(1),
    [anon_sym_COLON] = ACTIONS(1),
    [anon_sym_EQ] = ACTIONS(1),
    [anon_sym_PIPE] = ACTIONS(1),
    [anon_sym_case] = ACTIONS(1),
    [anon_sym_DOT] = ACTIONS(1),
    [anon_sym_of] = ACTIONS(1),
    [sym_ref] = ACTIONS(1),
    [sym_int] = ACTIONS(1),
    [sym_float] = ACTIONS(1),
    [sym_boolean] = ACTIONS(1),
    [sym_date] = ACTIONS(1),
    [sym_varchar] = ACTIONS(1),
    [sym_string] = ACTIONS(1),
    [sym_unique] = ACTIONS(1),
    [sym__upper_id] = ACTIONS(1),
    [sym_integer] = ACTIONS(1),
    [sym_dbtype] = ACTIONS(1),
    [sym_qldoc] = ACTIONS(1),
    [sym_line_comment] = ACTIONS(3),
    [sym_block_comment] = ACTIONS(5),
  },
  [1] = {
    [sym_dbscheme] = STATE(81),
    [sym_entry] = STATE(3),
    [sym_table] = STATE(36),
    [sym_annotation] = STATE(19),
    [sym_argsAnnotation] = STATE(46),
    [sym_tableName] = STATE(93),
    [sym_unionDecl] = STATE(36),
    [sym_caseDecl] = STATE(36),
    [sym_simpleId] = STATE(88),
    [aux_sym_dbscheme_repeat1] = STATE(3),
    [aux_sym_table_repeat1] = STATE(19),
    [ts_builtin_sym_end] = ACTIONS(7),
    [sym__lower_id] = ACTIONS(9),
    [anon_sym_POUND] = ACTIONS(11),
    [anon_sym_case] = ACTIONS(13),
    [sym__upper_id] = ACTIONS(15),
    [sym_dbtype] = ACTIONS(17),
    [sym_qldoc] = ACTIONS(19),
    [sym_line_comment] = ACTIONS(3),
    [sym_block_comment] = ACTIONS(5),
  },
};

static const uint16_t ts_small_parse_table[] = {
  [0] = 15,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(21), 1,
      ts_builtin_sym_end,
    ACTIONS(23), 1,
      sym__lower_id,
    ACTIONS(26), 1,
      anon_sym_POUND,
    ACTIONS(29), 1,
      anon_sym_case,
    ACTIONS(32), 1,
      sym__upper_id,
    ACTIONS(35), 1,
      sym_dbtype,
    ACTIONS(38), 1,
      sym_qldoc,
    STATE(46), 1,
      sym_argsAnnotation,
    STATE(88), 1,
      sym_simpleId,
    STATE(93), 1,
      sym_tableName,
    STATE(2), 2,
      sym_entry,
      aux_sym_dbscheme_repeat1,
    STATE(19), 2,
      sym_annotation,
      aux_sym_table_repeat1,
    STATE(36), 3,
      sym_table,
      sym_unionDecl,
      sym_caseDecl,
  [50] = 15,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(9), 1,
      sym__lower_id,
    ACTIONS(11), 1,
      anon_sym_POUND,
    ACTIONS(13), 1,
      anon_sym_case,
    ACTIONS(15), 1,
      sym__upper_id,
    ACTIONS(17), 1,
      sym_dbtype,
    ACTIONS(19), 1,
      sym_qldoc,
    ACTIONS(41), 1,
      ts_builtin_sym_end,
    STATE(46), 1,
      sym_argsAnnotation,
    STATE(88), 1,
      sym_simpleId,
    STATE(93), 1,
      sym_tableName,
    STATE(2), 2,
      sym_entry,
      aux_sym_dbscheme_repeat1,
    STATE(19), 2,
      sym_annotation,
      aux_sym_table_repeat1,
    STATE(36), 3,
      sym_table,
      sym_unionDecl,
      sym_caseDecl,
  [100] = 7,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(47), 1,
      anon_sym_SEMI,
    ACTIONS(49), 1,
      anon_sym_PIPE,
    STATE(8), 1,
      aux_sym_unionDecl_repeat1,
    ACTIONS(45), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(43), 5,
      ts_builtin_sym_end,
      anon_sym_POUND,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [127] = 8,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(53), 1,
      sym_varchar,
    ACTIONS(55), 1,
      sym_unique,
    ACTIONS(57), 1,
      sym_qldoc,
    STATE(48), 1,
      sym_column,
    STATE(56), 1,
      sym_reprType,
    ACTIONS(51), 5,
      sym_int,
      sym_float,
      sym_boolean,
      sym_date,
      sym_string,
  [156] = 8,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(53), 1,
      sym_varchar,
    ACTIONS(55), 1,
      sym_unique,
    ACTIONS(57), 1,
      sym_qldoc,
    STATE(56), 1,
      sym_reprType,
    STATE(67), 1,
      sym_column,
    ACTIONS(51), 5,
      sym_int,
      sym_float,
      sym_boolean,
      sym_date,
      sym_string,
  [185] = 8,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(53), 1,
      sym_varchar,
    ACTIONS(55), 1,
      sym_unique,
    ACTIONS(57), 1,
      sym_qldoc,
    STATE(56), 1,
      sym_reprType,
    STATE(73), 1,
      sym_column,
    ACTIONS(51), 5,
      sym_int,
      sym_float,
      sym_boolean,
      sym_date,
      sym_string,
  [214] = 7,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(49), 1,
      anon_sym_PIPE,
    ACTIONS(63), 1,
      anon_sym_SEMI,
    STATE(9), 1,
      aux_sym_unionDecl_repeat1,
    ACTIONS(61), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(59), 5,
      ts_builtin_sym_end,
      anon_sym_POUND,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [241] = 6,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(69), 1,
      anon_sym_PIPE,
    STATE(9), 1,
      aux_sym_unionDecl_repeat1,
    ACTIONS(67), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(65), 6,
      ts_builtin_sym_end,
      anon_sym_SEMI,
      anon_sym_POUND,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [266] = 7,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(76), 1,
      anon_sym_SEMI,
    ACTIONS(78), 1,
      anon_sym_PIPE,
    STATE(12), 1,
      aux_sym_caseDecl_repeat1,
    ACTIONS(74), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(72), 5,
      ts_builtin_sym_end,
      anon_sym_POUND,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [293] = 7,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(78), 1,
      anon_sym_PIPE,
    ACTIONS(84), 1,
      anon_sym_SEMI,
    STATE(10), 1,
      aux_sym_caseDecl_repeat1,
    ACTIONS(82), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(80), 5,
      ts_builtin_sym_end,
      anon_sym_POUND,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [320] = 6,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(90), 1,
      anon_sym_PIPE,
    STATE(12), 1,
      aux_sym_caseDecl_repeat1,
    ACTIONS(88), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(86), 6,
      ts_builtin_sym_end,
      anon_sym_SEMI,
      anon_sym_POUND,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [345] = 4,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(67), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(65), 7,
      ts_builtin_sym_end,
      anon_sym_SEMI,
      anon_sym_POUND,
      anon_sym_PIPE,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [365] = 4,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(95), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(93), 7,
      ts_builtin_sym_end,
      anon_sym_SEMI,
      anon_sym_POUND,
      anon_sym_PIPE,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [385] = 4,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(88), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(86), 7,
      ts_builtin_sym_end,
      anon_sym_SEMI,
      anon_sym_POUND,
      anon_sym_PIPE,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [405] = 4,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(99), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(97), 7,
      ts_builtin_sym_end,
      anon_sym_SEMI,
      anon_sym_POUND,
      anon_sym_PIPE,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [425] = 5,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(105), 1,
      anon_sym_SEMI,
    ACTIONS(103), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(101), 5,
      ts_builtin_sym_end,
      anon_sym_POUND,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [446] = 5,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(111), 1,
      anon_sym_SEMI,
    ACTIONS(109), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(107), 5,
      ts_builtin_sym_end,
      anon_sym_POUND,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [467] = 7,
    ACTIONS(11), 1,
      anon_sym_POUND,
    STATE(46), 1,
      sym_argsAnnotation,
    STATE(82), 1,
      sym_tableName,
    STATE(88), 1,
      sym_simpleId,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(15), 2,
      sym__lower_id,
      sym__upper_id,
    STATE(38), 2,
      sym_annotation,
      aux_sym_table_repeat1,
  [492] = 5,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(117), 1,
      anon_sym_SEMI,
    ACTIONS(115), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(113), 5,
      ts_builtin_sym_end,
      anon_sym_POUND,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [513] = 5,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(123), 1,
      anon_sym_SEMI,
    ACTIONS(121), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(119), 5,
      ts_builtin_sym_end,
      anon_sym_POUND,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [534] = 5,
    ACTIONS(53), 1,
      sym_varchar,
    ACTIONS(125), 1,
      sym_unique,
    STATE(63), 1,
      sym_reprType,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(51), 5,
      sym_int,
      sym_float,
      sym_boolean,
      sym_date,
      sym_string,
  [555] = 4,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(129), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(127), 5,
      ts_builtin_sym_end,
      anon_sym_POUND,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [573] = 3,
    STATE(55), 1,
      sym_colType,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(131), 6,
      sym_int,
      sym_float,
      sym_boolean,
      sym_date,
      sym_string,
      sym_dbtype,
  [589] = 4,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(109), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(107), 5,
      ts_builtin_sym_end,
      anon_sym_POUND,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [607] = 4,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(61), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(59), 5,
      ts_builtin_sym_end,
      anon_sym_POUND,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [625] = 3,
    STATE(60), 1,
      sym_colType,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(131), 6,
      sym_int,
      sym_float,
      sym_boolean,
      sym_date,
      sym_string,
      sym_dbtype,
  [641] = 3,
    STATE(61), 1,
      sym_colType,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(131), 6,
      sym_int,
      sym_float,
      sym_boolean,
      sym_date,
      sym_string,
      sym_dbtype,
  [657] = 4,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(135), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(133), 5,
      ts_builtin_sym_end,
      anon_sym_POUND,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [675] = 4,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(121), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(119), 5,
      ts_builtin_sym_end,
      anon_sym_POUND,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [693] = 4,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(74), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(72), 5,
      ts_builtin_sym_end,
      anon_sym_POUND,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [711] = 4,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(139), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(137), 5,
      ts_builtin_sym_end,
      anon_sym_POUND,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [729] = 3,
    STATE(66), 1,
      sym_colType,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(131), 6,
      sym_int,
      sym_float,
      sym_boolean,
      sym_date,
      sym_string,
      sym_dbtype,
  [745] = 4,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(143), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(141), 5,
      ts_builtin_sym_end,
      anon_sym_POUND,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [763] = 4,
    ACTIONS(53), 1,
      sym_varchar,
    STATE(47), 1,
      sym_reprType,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(51), 5,
      sym_int,
      sym_float,
      sym_boolean,
      sym_date,
      sym_string,
  [781] = 4,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(147), 2,
      anon_sym_case,
      sym__lower_id,
    ACTIONS(145), 5,
      ts_builtin_sym_end,
      anon_sym_POUND,
      sym__upper_id,
      sym_dbtype,
      sym_qldoc,
  [799] = 4,
    ACTIONS(53), 1,
      sym_varchar,
    STATE(65), 1,
      sym_reprType,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(51), 5,
      sym_int,
      sym_float,
      sym_boolean,
      sym_date,
      sym_string,
  [817] = 5,
    ACTIONS(151), 1,
      anon_sym_POUND,
    STATE(46), 1,
      sym_argsAnnotation,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(149), 2,
      sym__lower_id,
      sym__upper_id,
    STATE(38), 2,
      sym_annotation,
      aux_sym_table_repeat1,
  [836] = 2,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(154), 5,
      anon_sym_LPAREN,
      anon_sym_COMMA,
      anon_sym_RBRACK,
      anon_sym_COLON,
      anon_sym_of,
  [848] = 3,
    ACTIONS(158), 1,
      anon_sym_LBRACK,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(156), 3,
      anon_sym_POUND,
      sym__lower_id,
      sym__upper_id,
  [861] = 4,
    ACTIONS(160), 1,
      anon_sym_RBRACK,
    STATE(59), 1,
      sym_simpleId,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(15), 2,
      sym__lower_id,
      sym__upper_id,
  [876] = 2,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(162), 4,
      anon_sym_POUND,
      anon_sym_LBRACK,
      sym__lower_id,
      sym__upper_id,
  [887] = 2,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(164), 3,
      anon_sym_POUND,
      sym__lower_id,
      sym__upper_id,
  [897] = 4,
    ACTIONS(166), 1,
      anon_sym_COMMA,
    ACTIONS(168), 1,
      anon_sym_RBRACK,
    STATE(52), 1,
      aux_sym_argsAnnotation_repeat1,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [911] = 5,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(170), 1,
      sym_integer,
    ACTIONS(172), 1,
      sym_qldoc,
    STATE(11), 1,
      sym_branch,
  [927] = 2,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(174), 3,
      anon_sym_POUND,
      sym__lower_id,
      sym__upper_id,
  [937] = 3,
    STATE(89), 1,
      sym_simpleId,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(15), 2,
      sym__lower_id,
      sym__upper_id,
  [949] = 4,
    ACTIONS(176), 1,
      anon_sym_COMMA,
    ACTIONS(178), 1,
      anon_sym_RPAREN,
    STATE(51), 1,
      aux_sym_table_repeat2,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [963] = 3,
    STATE(85), 1,
      sym_simpleId,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(15), 2,
      sym__lower_id,
      sym__upper_id,
  [975] = 4,
    ACTIONS(180), 1,
      anon_sym_COMMA,
    ACTIONS(183), 1,
      anon_sym_RPAREN,
    STATE(50), 1,
      aux_sym_table_repeat2,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [989] = 4,
    ACTIONS(176), 1,
      anon_sym_COMMA,
    ACTIONS(185), 1,
      anon_sym_RPAREN,
    STATE(50), 1,
      aux_sym_table_repeat2,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1003] = 4,
    ACTIONS(187), 1,
      anon_sym_COMMA,
    ACTIONS(190), 1,
      anon_sym_RBRACK,
    STATE(52), 1,
      aux_sym_argsAnnotation_repeat1,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1017] = 4,
    ACTIONS(176), 1,
      anon_sym_COMMA,
    ACTIONS(192), 1,
      anon_sym_RPAREN,
    STATE(50), 1,
      aux_sym_table_repeat2,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1031] = 2,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(194), 3,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_ref,
  [1041] = 3,
    ACTIONS(198), 1,
      sym_ref,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(196), 2,
      anon_sym_COMMA,
      anon_sym_RPAREN,
  [1053] = 3,
    STATE(87), 1,
      sym_simpleId,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(15), 2,
      sym__lower_id,
      sym__upper_id,
  [1065] = 2,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(200), 3,
      anon_sym_POUND,
      sym__lower_id,
      sym__upper_id,
  [1075] = 5,
    ACTIONS(3), 1,
      sym_line_comment,
    ACTIONS(5), 1,
      sym_block_comment,
    ACTIONS(170), 1,
      sym_integer,
    ACTIONS(172), 1,
      sym_qldoc,
    STATE(15), 1,
      sym_branch,
  [1091] = 4,
    ACTIONS(166), 1,
      anon_sym_COMMA,
    ACTIONS(202), 1,
      anon_sym_RBRACK,
    STATE(44), 1,
      aux_sym_argsAnnotation_repeat1,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1105] = 3,
    ACTIONS(206), 1,
      sym_ref,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(204), 2,
      anon_sym_COMMA,
      anon_sym_RPAREN,
  [1117] = 3,
    ACTIONS(210), 1,
      sym_ref,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(208), 2,
      anon_sym_COMMA,
      anon_sym_RPAREN,
  [1129] = 3,
    STATE(75), 1,
      sym_simpleId,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(15), 2,
      sym__lower_id,
      sym__upper_id,
  [1141] = 3,
    STATE(96), 1,
      sym_simpleId,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(15), 2,
      sym__lower_id,
      sym__upper_id,
  [1153] = 2,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(212), 3,
      anon_sym_POUND,
      sym__lower_id,
      sym__upper_id,
  [1163] = 3,
    STATE(94), 1,
      sym_simpleId,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(15), 2,
      sym__lower_id,
      sym__upper_id,
  [1175] = 3,
    ACTIONS(216), 1,
      sym_ref,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(214), 2,
      anon_sym_COMMA,
      anon_sym_RPAREN,
  [1187] = 4,
    ACTIONS(176), 1,
      anon_sym_COMMA,
    ACTIONS(218), 1,
      anon_sym_RPAREN,
    STATE(53), 1,
      aux_sym_table_repeat2,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1201] = 2,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(220), 2,
      anon_sym_COMMA,
      anon_sym_RPAREN,
  [1210] = 2,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(222), 2,
      anon_sym_COMMA,
      anon_sym_RPAREN,
  [1219] = 2,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(224), 2,
      sym__lower_id,
      sym__upper_id,
  [1228] = 2,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(226), 2,
      sym__lower_id,
      sym__upper_id,
  [1237] = 3,
    ACTIONS(228), 1,
      sym__lower_id,
    STATE(40), 1,
      sym_annotName,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1248] = 2,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(183), 2,
      anon_sym_COMMA,
      anon_sym_RPAREN,
  [1257] = 2,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(230), 2,
      anon_sym_COMMA,
      anon_sym_RPAREN,
  [1266] = 2,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(190), 2,
      anon_sym_COMMA,
      anon_sym_RBRACK,
  [1275] = 2,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
    ACTIONS(232), 2,
      anon_sym_COMMA,
      anon_sym_RPAREN,
  [1284] = 2,
    ACTIONS(234), 1,
      sym_dbtype,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1292] = 2,
    ACTIONS(236), 1,
      sym_dbtype,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1300] = 2,
    ACTIONS(238), 1,
      sym_dbtype,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1308] = 2,
    ACTIONS(240), 1,
      anon_sym_EQ,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1316] = 2,
    ACTIONS(242), 1,
      ts_builtin_sym_end,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1324] = 2,
    ACTIONS(244), 1,
      anon_sym_LPAREN,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1332] = 2,
    ACTIONS(246), 1,
      anon_sym_EQ,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1340] = 2,
    ACTIONS(248), 1,
      sym_integer,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1348] = 2,
    ACTIONS(250), 1,
      anon_sym_of,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1356] = 2,
    ACTIONS(252), 1,
      anon_sym_LPAREN,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1364] = 2,
    ACTIONS(254), 1,
      anon_sym_COLON,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1372] = 2,
    ACTIONS(256), 1,
      anon_sym_LPAREN,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1380] = 2,
    ACTIONS(258), 1,
      anon_sym_COLON,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1388] = 2,
    ACTIONS(260), 1,
      sym_dbtype,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1396] = 2,
    ACTIONS(262), 1,
      anon_sym_RPAREN,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1404] = 2,
    ACTIONS(264), 1,
      sym_integer,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1412] = 2,
    ACTIONS(266), 1,
      anon_sym_LPAREN,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1420] = 2,
    ACTIONS(268), 1,
      anon_sym_COLON,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1428] = 2,
    ACTIONS(270), 1,
      sym_dbtype,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1436] = 2,
    ACTIONS(272), 1,
      anon_sym_COLON,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1444] = 2,
    ACTIONS(274), 1,
      anon_sym_DOT,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
  [1452] = 2,
    ACTIONS(276), 1,
      anon_sym_EQ,
    ACTIONS(3), 2,
      sym_line_comment,
      sym_block_comment,
};

static const uint32_t ts_small_parse_table_map[] = {
  [SMALL_STATE(2)] = 0,
  [SMALL_STATE(3)] = 50,
  [SMALL_STATE(4)] = 100,
  [SMALL_STATE(5)] = 127,
  [SMALL_STATE(6)] = 156,
  [SMALL_STATE(7)] = 185,
  [SMALL_STATE(8)] = 214,
  [SMALL_STATE(9)] = 241,
  [SMALL_STATE(10)] = 266,
  [SMALL_STATE(11)] = 293,
  [SMALL_STATE(12)] = 320,
  [SMALL_STATE(13)] = 345,
  [SMALL_STATE(14)] = 365,
  [SMALL_STATE(15)] = 385,
  [SMALL_STATE(16)] = 405,
  [SMALL_STATE(17)] = 425,
  [SMALL_STATE(18)] = 446,
  [SMALL_STATE(19)] = 467,
  [SMALL_STATE(20)] = 492,
  [SMALL_STATE(21)] = 513,
  [SMALL_STATE(22)] = 534,
  [SMALL_STATE(23)] = 555,
  [SMALL_STATE(24)] = 573,
  [SMALL_STATE(25)] = 589,
  [SMALL_STATE(26)] = 607,
  [SMALL_STATE(27)] = 625,
  [SMALL_STATE(28)] = 641,
  [SMALL_STATE(29)] = 657,
  [SMALL_STATE(30)] = 675,
  [SMALL_STATE(31)] = 693,
  [SMALL_STATE(32)] = 711,
  [SMALL_STATE(33)] = 729,
  [SMALL_STATE(34)] = 745,
  [SMALL_STATE(35)] = 763,
  [SMALL_STATE(36)] = 781,
  [SMALL_STATE(37)] = 799,
  [SMALL_STATE(38)] = 817,
  [SMALL_STATE(39)] = 836,
  [SMALL_STATE(40)] = 848,
  [SMALL_STATE(41)] = 861,
  [SMALL_STATE(42)] = 876,
  [SMALL_STATE(43)] = 887,
  [SMALL_STATE(44)] = 897,
  [SMALL_STATE(45)] = 911,
  [SMALL_STATE(46)] = 927,
  [SMALL_STATE(47)] = 937,
  [SMALL_STATE(48)] = 949,
  [SMALL_STATE(49)] = 963,
  [SMALL_STATE(50)] = 975,
  [SMALL_STATE(51)] = 989,
  [SMALL_STATE(52)] = 1003,
  [SMALL_STATE(53)] = 1017,
  [SMALL_STATE(54)] = 1031,
  [SMALL_STATE(55)] = 1041,
  [SMALL_STATE(56)] = 1053,
  [SMALL_STATE(57)] = 1065,
  [SMALL_STATE(58)] = 1075,
  [SMALL_STATE(59)] = 1091,
  [SMALL_STATE(60)] = 1105,
  [SMALL_STATE(61)] = 1117,
  [SMALL_STATE(62)] = 1129,
  [SMALL_STATE(63)] = 1141,
  [SMALL_STATE(64)] = 1153,
  [SMALL_STATE(65)] = 1163,
  [SMALL_STATE(66)] = 1175,
  [SMALL_STATE(67)] = 1187,
  [SMALL_STATE(68)] = 1201,
  [SMALL_STATE(69)] = 1210,
  [SMALL_STATE(70)] = 1219,
  [SMALL_STATE(71)] = 1228,
  [SMALL_STATE(72)] = 1237,
  [SMALL_STATE(73)] = 1248,
  [SMALL_STATE(74)] = 1257,
  [SMALL_STATE(75)] = 1266,
  [SMALL_STATE(76)] = 1275,
  [SMALL_STATE(77)] = 1284,
  [SMALL_STATE(78)] = 1292,
  [SMALL_STATE(79)] = 1300,
  [SMALL_STATE(80)] = 1308,
  [SMALL_STATE(81)] = 1316,
  [SMALL_STATE(82)] = 1324,
  [SMALL_STATE(83)] = 1332,
  [SMALL_STATE(84)] = 1340,
  [SMALL_STATE(85)] = 1348,
  [SMALL_STATE(86)] = 1356,
  [SMALL_STATE(87)] = 1364,
  [SMALL_STATE(88)] = 1372,
  [SMALL_STATE(89)] = 1380,
  [SMALL_STATE(90)] = 1388,
  [SMALL_STATE(91)] = 1396,
  [SMALL_STATE(92)] = 1404,
  [SMALL_STATE(93)] = 1412,
  [SMALL_STATE(94)] = 1420,
  [SMALL_STATE(95)] = 1428,
  [SMALL_STATE(96)] = 1436,
  [SMALL_STATE(97)] = 1444,
  [SMALL_STATE(98)] = 1452,
};

static const TSParseActionEntry ts_parse_actions[] = {
  [0] = {.entry = {.count = 0, .reusable = false}},
  [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(),
  [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT_EXTRA(),
  [5] = {.entry = {.count = 1, .reusable = false}}, SHIFT_EXTRA(),
  [7] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dbscheme, 0, 0, 0),
  [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(39),
  [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(72),
  [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(95),
  [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39),
  [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(98),
  [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36),
  [21] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_dbscheme_repeat1, 2, 0, 0),
  [23] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_dbscheme_repeat1, 2, 0, 0), SHIFT_REPEAT(39),
  [26] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_dbscheme_repeat1, 2, 0, 0), SHIFT_REPEAT(72),
  [29] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_dbscheme_repeat1, 2, 0, 0), SHIFT_REPEAT(95),
  [32] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_dbscheme_repeat1, 2, 0, 0), SHIFT_REPEAT(39),
  [35] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_dbscheme_repeat1, 2, 0, 0), SHIFT_REPEAT(98),
  [38] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_dbscheme_repeat1, 2, 0, 0), SHIFT_REPEAT(36),
  [41] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dbscheme, 1, 0, 0),
  [43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unionDecl, 3, 0, 3),
  [45] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unionDecl, 3, 0, 3),
  [47] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26),
  [49] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77),
  [51] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70),
  [53] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86),
  [55] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37),
  [57] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22),
  [59] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unionDecl, 4, 0, 3),
  [61] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unionDecl, 4, 0, 3),
  [63] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23),
  [65] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_unionDecl_repeat1, 2, 0, 0),
  [67] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_unionDecl_repeat1, 2, 0, 0),
  [69] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_unionDecl_repeat1, 2, 0, 0), SHIFT_REPEAT(77),
  [72] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_caseDecl, 7, 0, 7),
  [74] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_caseDecl, 7, 0, 7),
  [76] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32),
  [78] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58),
  [80] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_caseDecl, 6, 0, 7),
  [82] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_caseDecl, 6, 0, 7),
  [84] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31),
  [86] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_caseDecl_repeat1, 2, 0, 0),
  [88] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_caseDecl_repeat1, 2, 0, 0),
  [90] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_caseDecl_repeat1, 2, 0, 0), SHIFT_REPEAT(58),
  [93] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_branch, 3, 0, 0),
  [95] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_branch, 3, 0, 0),
  [97] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_branch, 4, 0, 15),
  [99] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_branch, 4, 0, 15),
  [101] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table, 4, 0, 5),
  [103] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table, 4, 0, 5),
  [105] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25),
  [107] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table, 5, 0, 5),
  [109] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table, 5, 0, 5),
  [111] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29),
  [113] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table, 5, 0, 6),
  [115] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table, 5, 0, 6),
  [117] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30),
  [119] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table, 6, 0, 6),
  [121] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table, 6, 0, 6),
  [123] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34),
  [125] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35),
  [127] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unionDecl, 5, 0, 3),
  [129] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unionDecl, 5, 0, 3),
  [131] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54),
  [133] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table, 6, 0, 5),
  [135] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table, 6, 0, 5),
  [137] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_caseDecl, 8, 0, 7),
  [139] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_caseDecl, 8, 0, 7),
  [141] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table, 7, 0, 6),
  [143] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table, 7, 0, 6),
  [145] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_entry, 1, 0, 0),
  [147] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_entry, 1, 0, 0),
  [149] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_table_repeat1, 2, 0, 0),
  [151] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_table_repeat1, 2, 0, 0), SHIFT_REPEAT(72),
  [154] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_simpleId, 1, 0, 0),
  [156] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation, 2, 0, 2),
  [158] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41),
  [160] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57),
  [162] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotName, 1, 0, 0),
  [164] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argsAnnotation, 6, 0, 4),
  [166] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62),
  [168] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43),
  [170] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83),
  [172] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84),
  [174] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation, 1, 0, 1),
  [176] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7),
  [178] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20),
  [180] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_table_repeat2, 2, 0, 0), SHIFT_REPEAT(7),
  [183] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_table_repeat2, 2, 0, 0),
  [185] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21),
  [187] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_argsAnnotation_repeat1, 2, 0, 0), SHIFT_REPEAT(62),
  [190] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_argsAnnotation_repeat1, 2, 0, 0),
  [192] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18),
  [194] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_colType, 1, 0, 0),
  [196] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 4, 0, 8),
  [198] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69),
  [200] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argsAnnotation, 4, 0, 4),
  [202] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64),
  [204] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 5, 0, 9),
  [206] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74),
  [208] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 5, 0, 10),
  [210] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76),
  [212] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argsAnnotation, 5, 0, 4),
  [214] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 6, 0, 13),
  [216] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68),
  [218] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17),
  [220] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 7, 0, 16),
  [222] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 5, 0, 11),
  [224] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_reprType, 1, 0, 0),
  [226] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_reprType, 4, 0, 0),
  [228] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42),
  [230] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 6, 0, 12),
  [232] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 6, 0, 14),
  [234] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13),
  [236] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4),
  [238] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14),
  [240] = {.entry = {.count = 1, .reusable = true}}, SHIFT(90),
  [242] = {.entry = {.count = 1, .reusable = true}},  ACCEPT_INPUT(),
  [244] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5),
  [246] = {.entry = {.count = 1, .reusable = true}}, SHIFT(79),
  [248] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80),
  [250] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45),
  [252] = {.entry = {.count = 1, .reusable = true}}, SHIFT(92),
  [254] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24),
  [256] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tableName, 1, 0, 0),
  [258] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33),
  [260] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16),
  [262] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71),
  [264] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91),
  [266] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6),
  [268] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27),
  [270] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97),
  [272] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28),
  [274] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49),
  [276] = {.entry = {.count = 1, .reusable = true}}, SHIFT(78),
};

#ifdef __cplusplus
extern "C" {
#endif
#ifdef TREE_SITTER_HIDE_SYMBOLS
#define TS_PUBLIC
#elif defined(_WIN32)
#define TS_PUBLIC __declspec(dllexport)
#else
#define TS_PUBLIC __attribute__((visibility("default")))
#endif

TS_PUBLIC const TSLanguage *tree_sitter_ql_dbscheme(void) {
  static const TSLanguage language = {
    .version = LANGUAGE_VERSION,
    .symbol_count = SYMBOL_COUNT,
    .alias_count = ALIAS_COUNT,
    .token_count = TOKEN_COUNT,
    .external_token_count = EXTERNAL_TOKEN_COUNT,
    .state_count = STATE_COUNT,
    .large_state_count = LARGE_STATE_COUNT,
    .production_id_count = PRODUCTION_ID_COUNT,
    .field_count = FIELD_COUNT,
    .max_alias_sequence_length = MAX_ALIAS_SEQUENCE_LENGTH,
    .parse_table = &ts_parse_table[0][0],
    .small_parse_table = ts_small_parse_table,
    .small_parse_table_map = ts_small_parse_table_map,
    .parse_actions = ts_parse_actions,
    .symbol_names = ts_symbol_names,
    .field_names = ts_field_names,
    .field_map_slices = ts_field_map_slices,
    .field_map_entries = ts_field_map_entries,
    .symbol_metadata = ts_symbol_metadata,
    .public_symbol_map = ts_symbol_map,
    .alias_map = ts_non_terminal_alias_map,
    .alias_sequences = &ts_alias_sequences[0][0],
    .lex_modes = ts_lex_modes,
    .lex_fn = ts_lex,
    .keyword_lex_fn = ts_lex_keywords,
    .keyword_capture_token = sym__lower_id,
    .primary_state_ids = ts_primary_state_ids,
  };
  return &language;
}
#ifdef __cplusplus
}
#endif
