/* Automatically @generated by tree-sitter v0.25.8 */

#include "tree_sitter/parser.h"

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

#define LANGUAGE_VERSION 15
#define STATE_COUNT 34
#define LARGE_STATE_COUNT 4
#define SYMBOL_COUNT 51
#define ALIAS_COUNT 0
#define TOKEN_COUNT 30
#define EXTERNAL_TOKEN_COUNT 0
#define FIELD_COUNT 0
#define MAX_ALIAS_SEQUENCE_LENGTH 3
#define MAX_RESERVED_WORD_SET_SIZE 0
#define PRODUCTION_ID_COUNT 1
#define SUPERTYPE_COUNT 0

enum ts_symbol_identifiers {
  anon_sym_add = 1,
  anon_sym_sub = 2,
  anon_sym_neg = 3,
  anon_sym_eq = 4,
  anon_sym_gt = 5,
  anon_sym_lt = 6,
  anon_sym_and = 7,
  anon_sym_or = 8,
  anon_sym_not = 9,
  anon_sym_push = 10,
  anon_sym_pop = 11,
  anon_sym_argument = 12,
  anon_sym_local = 13,
  anon_sym_static = 14,
  anon_sym_constant = 15,
  anon_sym_this = 16,
  anon_sym_that = 17,
  anon_sym_pointer = 18,
  anon_sym_temp = 19,
  anon_sym_label = 20,
  anon_sym_goto = 21,
  anon_sym_if_DASHgoto = 22,
  anon_sym_function = 23,
  anon_sym_call = 24,
  sym_return_command = 25,
  aux_sym_index_token1 = 26,
  aux_sym_label_name_token1 = 27,
  sym_comment = 28,
  sym__whitespace = 29,
  sym_source_file = 30,
  sym__item = 31,
  sym_command = 32,
  sym_arithmetic_command = 33,
  sym_memory_command = 34,
  sym_push_command = 35,
  sym_pop_command = 36,
  sym_memory_segment = 37,
  sym_program_flow_command = 38,
  sym_label_command = 39,
  sym_goto_command = 40,
  sym_if_goto_command = 41,
  sym_function_command = 42,
  sym_function_declaration = 43,
  sym_call_command = 44,
  sym_index = 45,
  sym_local_vars_count = 46,
  sym_args_count = 47,
  sym_label_name = 48,
  sym_function_name = 49,
  aux_sym_source_file_repeat1 = 50,
};

static const char * const ts_symbol_names[] = {
  [ts_builtin_sym_end] = "end",
  [anon_sym_add] = "add",
  [anon_sym_sub] = "sub",
  [anon_sym_neg] = "neg",
  [anon_sym_eq] = "eq",
  [anon_sym_gt] = "gt",
  [anon_sym_lt] = "lt",
  [anon_sym_and] = "and",
  [anon_sym_or] = "or",
  [anon_sym_not] = "not",
  [anon_sym_push] = "push",
  [anon_sym_pop] = "pop",
  [anon_sym_argument] = "argument",
  [anon_sym_local] = "local",
  [anon_sym_static] = "static",
  [anon_sym_constant] = "constant",
  [anon_sym_this] = "this",
  [anon_sym_that] = "that",
  [anon_sym_pointer] = "pointer",
  [anon_sym_temp] = "temp",
  [anon_sym_label] = "label",
  [anon_sym_goto] = "goto",
  [anon_sym_if_DASHgoto] = "if-goto",
  [anon_sym_function] = "function",
  [anon_sym_call] = "call",
  [sym_return_command] = "return_command",
  [aux_sym_index_token1] = "index_token1",
  [aux_sym_label_name_token1] = "label_name_token1",
  [sym_comment] = "comment",
  [sym__whitespace] = "_whitespace",
  [sym_source_file] = "source_file",
  [sym__item] = "_item",
  [sym_command] = "command",
  [sym_arithmetic_command] = "arithmetic_command",
  [sym_memory_command] = "memory_command",
  [sym_push_command] = "push_command",
  [sym_pop_command] = "pop_command",
  [sym_memory_segment] = "memory_segment",
  [sym_program_flow_command] = "program_flow_command",
  [sym_label_command] = "label_command",
  [sym_goto_command] = "goto_command",
  [sym_if_goto_command] = "if_goto_command",
  [sym_function_command] = "function_command",
  [sym_function_declaration] = "function_declaration",
  [sym_call_command] = "call_command",
  [sym_index] = "index",
  [sym_local_vars_count] = "local_vars_count",
  [sym_args_count] = "args_count",
  [sym_label_name] = "label_name",
  [sym_function_name] = "function_name",
  [aux_sym_source_file_repeat1] = "source_file_repeat1",
};

static const TSSymbol ts_symbol_map[] = {
  [ts_builtin_sym_end] = ts_builtin_sym_end,
  [anon_sym_add] = anon_sym_add,
  [anon_sym_sub] = anon_sym_sub,
  [anon_sym_neg] = anon_sym_neg,
  [anon_sym_eq] = anon_sym_eq,
  [anon_sym_gt] = anon_sym_gt,
  [anon_sym_lt] = anon_sym_lt,
  [anon_sym_and] = anon_sym_and,
  [anon_sym_or] = anon_sym_or,
  [anon_sym_not] = anon_sym_not,
  [anon_sym_push] = anon_sym_push,
  [anon_sym_pop] = anon_sym_pop,
  [anon_sym_argument] = anon_sym_argument,
  [anon_sym_local] = anon_sym_local,
  [anon_sym_static] = anon_sym_static,
  [anon_sym_constant] = anon_sym_constant,
  [anon_sym_this] = anon_sym_this,
  [anon_sym_that] = anon_sym_that,
  [anon_sym_pointer] = anon_sym_pointer,
  [anon_sym_temp] = anon_sym_temp,
  [anon_sym_label] = anon_sym_label,
  [anon_sym_goto] = anon_sym_goto,
  [anon_sym_if_DASHgoto] = anon_sym_if_DASHgoto,
  [anon_sym_function] = anon_sym_function,
  [anon_sym_call] = anon_sym_call,
  [sym_return_command] = sym_return_command,
  [aux_sym_index_token1] = aux_sym_index_token1,
  [aux_sym_label_name_token1] = aux_sym_label_name_token1,
  [sym_comment] = sym_comment,
  [sym__whitespace] = sym__whitespace,
  [sym_source_file] = sym_source_file,
  [sym__item] = sym__item,
  [sym_command] = sym_command,
  [sym_arithmetic_command] = sym_arithmetic_command,
  [sym_memory_command] = sym_memory_command,
  [sym_push_command] = sym_push_command,
  [sym_pop_command] = sym_pop_command,
  [sym_memory_segment] = sym_memory_segment,
  [sym_program_flow_command] = sym_program_flow_command,
  [sym_label_command] = sym_label_command,
  [sym_goto_command] = sym_goto_command,
  [sym_if_goto_command] = sym_if_goto_command,
  [sym_function_command] = sym_function_command,
  [sym_function_declaration] = sym_function_declaration,
  [sym_call_command] = sym_call_command,
  [sym_index] = sym_index,
  [sym_local_vars_count] = sym_local_vars_count,
  [sym_args_count] = sym_args_count,
  [sym_label_name] = sym_label_name,
  [sym_function_name] = sym_function_name,
  [aux_sym_source_file_repeat1] = aux_sym_source_file_repeat1,
};

static const TSSymbolMetadata ts_symbol_metadata[] = {
  [ts_builtin_sym_end] = {
    .visible = false,
    .named = true,
  },
  [anon_sym_add] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_sub] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_neg] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_eq] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_gt] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_lt] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_and] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_or] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_not] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_push] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_pop] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_argument] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_local] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_static] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_constant] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_this] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_that] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_pointer] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_temp] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_label] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_goto] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_if_DASHgoto] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_function] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_call] = {
    .visible = true,
    .named = false,
  },
  [sym_return_command] = {
    .visible = true,
    .named = true,
  },
  [aux_sym_index_token1] = {
    .visible = false,
    .named = false,
  },
  [aux_sym_label_name_token1] = {
    .visible = false,
    .named = false,
  },
  [sym_comment] = {
    .visible = true,
    .named = true,
  },
  [sym__whitespace] = {
    .visible = false,
    .named = true,
  },
  [sym_source_file] = {
    .visible = true,
    .named = true,
  },
  [sym__item] = {
    .visible = false,
    .named = true,
  },
  [sym_command] = {
    .visible = true,
    .named = true,
  },
  [sym_arithmetic_command] = {
    .visible = true,
    .named = true,
  },
  [sym_memory_command] = {
    .visible = true,
    .named = true,
  },
  [sym_push_command] = {
    .visible = true,
    .named = true,
  },
  [sym_pop_command] = {
    .visible = true,
    .named = true,
  },
  [sym_memory_segment] = {
    .visible = true,
    .named = true,
  },
  [sym_program_flow_command] = {
    .visible = true,
    .named = true,
  },
  [sym_label_command] = {
    .visible = true,
    .named = true,
  },
  [sym_goto_command] = {
    .visible = true,
    .named = true,
  },
  [sym_if_goto_command] = {
    .visible = true,
    .named = true,
  },
  [sym_function_command] = {
    .visible = true,
    .named = true,
  },
  [sym_function_declaration] = {
    .visible = true,
    .named = true,
  },
  [sym_call_command] = {
    .visible = true,
    .named = true,
  },
  [sym_index] = {
    .visible = true,
    .named = true,
  },
  [sym_local_vars_count] = {
    .visible = true,
    .named = true,
  },
  [sym_args_count] = {
    .visible = true,
    .named = true,
  },
  [sym_label_name] = {
    .visible = true,
    .named = true,
  },
  [sym_function_name] = {
    .visible = true,
    .named = true,
  },
  [aux_sym_source_file_repeat1] = {
    .visible = false,
    .named = false,
  },
};

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,
};

static bool ts_lex(TSLexer *lexer, TSStateId state) {
  START_LEXER();
  eof = lexer->eof(lexer);
  switch (state) {
    case 0:
      if (eof) ADVANCE(81);
      ADVANCE_MAP(
        '/', 3,
        'a', 18,
        'c', 5,
        'e', 57,
        'f', 77,
        'g', 48,
        'i', 27,
        'l', 6,
        'n', 22,
        'o', 58,
        'p', 49,
        'r', 25,
        's', 64,
        't', 21,
      );
      if (('\t' <= lookahead && lookahead <= '\r') ||
          lookahead == ' ') SKIP(0);
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(107);
      END_STATE();
    case 1:
      if (lookahead == '-') ADVANCE(30);
      END_STATE();
    case 2:
      if (lookahead == '/') ADVANCE(3);
      if (('\t' <= lookahead && lookahead <= '\r') ||
          lookahead == ' ') SKIP(2);
      if (('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(108);
      END_STATE();
    case 3:
      if (lookahead == '/') ADVANCE(109);
      END_STATE();
    case 4:
      if (lookahead == 'a') ADVANCE(38);
      END_STATE();
    case 5:
      if (lookahead == 'a') ADVANCE(38);
      if (lookahead == 'o') ADVANCE(44);
      END_STATE();
    case 6:
      if (lookahead == 'a') ADVANCE(13);
      if (lookahead == 'o') ADVANCE(15);
      if (lookahead == 't') ADVANCE(87);
      END_STATE();
    case 7:
      if (lookahead == 'a') ADVANCE(13);
      if (lookahead == 't') ADVANCE(87);
      END_STATE();
    case 8:
      if (lookahead == 'a') ADVANCE(37);
      END_STATE();
    case 9:
      if (lookahead == 'a') ADVANCE(67);
      END_STATE();
    case 10:
      if (lookahead == 'a') ADVANCE(68);
      if (lookahead == 'i') ADVANCE(62);
      END_STATE();
    case 11:
      if (lookahead == 'a') ADVANCE(47);
      END_STATE();
    case 12:
      if (lookahead == 'b') ADVANCE(83);
      END_STATE();
    case 13:
      if (lookahead == 'b') ADVANCE(24);
      END_STATE();
    case 14:
      if (lookahead == 'c') ADVANCE(95);
      END_STATE();
    case 15:
      if (lookahead == 'c') ADVANCE(8);
      END_STATE();
    case 16:
      if (lookahead == 'c') ADVANCE(71);
      END_STATE();
    case 17:
      if (lookahead == 'd') ADVANCE(19);
      if (lookahead == 'n') ADVANCE(20);
      END_STATE();
    case 18:
      if (lookahead == 'd') ADVANCE(19);
      if (lookahead == 'n') ADVANCE(20);
      if (lookahead == 'r') ADVANCE(29);
      END_STATE();
    case 19:
      if (lookahead == 'd') ADVANCE(82);
      END_STATE();
    case 20:
      if (lookahead == 'd') ADVANCE(88);
      END_STATE();
    case 21:
      if (lookahead == 'e') ADVANCE(39);
      if (lookahead == 'h') ADVANCE(10);
      END_STATE();
    case 22:
      if (lookahead == 'e') ADVANCE(28);
      if (lookahead == 'o') ADVANCE(66);
      END_STATE();
    case 23:
      if (lookahead == 'e') ADVANCE(59);
      END_STATE();
    case 24:
      if (lookahead == 'e') ADVANCE(36);
      END_STATE();
    case 25:
      if (lookahead == 'e') ADVANCE(72);
      END_STATE();
    case 26:
      if (lookahead == 'e') ADVANCE(46);
      END_STATE();
    case 27:
      if (lookahead == 'f') ADVANCE(1);
      END_STATE();
    case 28:
      if (lookahead == 'g') ADVANCE(84);
      END_STATE();
    case 29:
      if (lookahead == 'g') ADVANCE(79);
      END_STATE();
    case 30:
      if (lookahead == 'g') ADVANCE(54);
      END_STATE();
    case 31:
      if (lookahead == 'h') ADVANCE(91);
      END_STATE();
    case 32:
      if (lookahead == 'i') ADVANCE(45);
      if (lookahead == 'p') ADVANCE(92);
      END_STATE();
    case 33:
      if (lookahead == 'i') ADVANCE(14);
      END_STATE();
    case 34:
      if (lookahead == 'i') ADVANCE(53);
      END_STATE();
    case 35:
      if (lookahead == 'l') ADVANCE(105);
      END_STATE();
    case 36:
      if (lookahead == 'l') ADVANCE(101);
      END_STATE();
    case 37:
      if (lookahead == 'l') ADVANCE(94);
      END_STATE();
    case 38:
      if (lookahead == 'l') ADVANCE(35);
      END_STATE();
    case 39:
      if (lookahead == 'm') ADVANCE(56);
      END_STATE();
    case 40:
      if (lookahead == 'm') ADVANCE(26);
      END_STATE();
    case 41:
      if (lookahead == 'n') ADVANCE(106);
      END_STATE();
    case 42:
      if (lookahead == 'n') ADVANCE(104);
      END_STATE();
    case 43:
      if (lookahead == 'n') ADVANCE(16);
      END_STATE();
    case 44:
      if (lookahead == 'n') ADVANCE(63);
      END_STATE();
    case 45:
      if (lookahead == 'n') ADVANCE(74);
      END_STATE();
    case 46:
      if (lookahead == 'n') ADVANCE(69);
      END_STATE();
    case 47:
      if (lookahead == 'n') ADVANCE(70);
      END_STATE();
    case 48:
      if (lookahead == 'o') ADVANCE(65);
      if (lookahead == 't') ADVANCE(86);
      END_STATE();
    case 49:
      if (lookahead == 'o') ADVANCE(32);
      if (lookahead == 'u') ADVANCE(61);
      END_STATE();
    case 50:
      if (lookahead == 'o') ADVANCE(102);
      END_STATE();
    case 51:
      if (lookahead == 'o') ADVANCE(103);
      END_STATE();
    case 52:
      if (lookahead == 'o') ADVANCE(55);
      if (lookahead == 'u') ADVANCE(61);
      END_STATE();
    case 53:
      if (lookahead == 'o') ADVANCE(42);
      END_STATE();
    case 54:
      if (lookahead == 'o') ADVANCE(75);
      END_STATE();
    case 55:
      if (lookahead == 'p') ADVANCE(92);
      END_STATE();
    case 56:
      if (lookahead == 'p') ADVANCE(100);
      END_STATE();
    case 57:
      if (lookahead == 'q') ADVANCE(85);
      END_STATE();
    case 58:
      if (lookahead == 'r') ADVANCE(89);
      END_STATE();
    case 59:
      if (lookahead == 'r') ADVANCE(99);
      END_STATE();
    case 60:
      if (lookahead == 'r') ADVANCE(41);
      END_STATE();
    case 61:
      if (lookahead == 's') ADVANCE(31);
      END_STATE();
    case 62:
      if (lookahead == 's') ADVANCE(97);
      END_STATE();
    case 63:
      if (lookahead == 's') ADVANCE(73);
      END_STATE();
    case 64:
      if (lookahead == 't') ADVANCE(9);
      if (lookahead == 'u') ADVANCE(12);
      END_STATE();
    case 65:
      if (lookahead == 't') ADVANCE(50);
      END_STATE();
    case 66:
      if (lookahead == 't') ADVANCE(90);
      END_STATE();
    case 67:
      if (lookahead == 't') ADVANCE(33);
      END_STATE();
    case 68:
      if (lookahead == 't') ADVANCE(98);
      END_STATE();
    case 69:
      if (lookahead == 't') ADVANCE(93);
      END_STATE();
    case 70:
      if (lookahead == 't') ADVANCE(96);
      END_STATE();
    case 71:
      if (lookahead == 't') ADVANCE(34);
      END_STATE();
    case 72:
      if (lookahead == 't') ADVANCE(76);
      END_STATE();
    case 73:
      if (lookahead == 't') ADVANCE(11);
      END_STATE();
    case 74:
      if (lookahead == 't') ADVANCE(23);
      END_STATE();
    case 75:
      if (lookahead == 't') ADVANCE(51);
      END_STATE();
    case 76:
      if (lookahead == 'u') ADVANCE(60);
      END_STATE();
    case 77:
      if (lookahead == 'u') ADVANCE(43);
      END_STATE();
    case 78:
      if (lookahead == 'u') ADVANCE(12);
      END_STATE();
    case 79:
      if (lookahead == 'u') ADVANCE(40);
      END_STATE();
    case 80:
      if (eof) ADVANCE(81);
      ADVANCE_MAP(
        '/', 3,
        'a', 17,
        'c', 4,
        'e', 57,
        'f', 77,
        'g', 48,
        'i', 27,
        'l', 7,
        'n', 22,
        'o', 58,
        'p', 52,
        'r', 25,
        's', 78,
      );
      if (('\t' <= lookahead && lookahead <= '\r') ||
          lookahead == ' ') ADVANCE(110);
      END_STATE();
    case 81:
      ACCEPT_TOKEN(ts_builtin_sym_end);
      END_STATE();
    case 82:
      ACCEPT_TOKEN(anon_sym_add);
      END_STATE();
    case 83:
      ACCEPT_TOKEN(anon_sym_sub);
      END_STATE();
    case 84:
      ACCEPT_TOKEN(anon_sym_neg);
      END_STATE();
    case 85:
      ACCEPT_TOKEN(anon_sym_eq);
      END_STATE();
    case 86:
      ACCEPT_TOKEN(anon_sym_gt);
      END_STATE();
    case 87:
      ACCEPT_TOKEN(anon_sym_lt);
      END_STATE();
    case 88:
      ACCEPT_TOKEN(anon_sym_and);
      END_STATE();
    case 89:
      ACCEPT_TOKEN(anon_sym_or);
      END_STATE();
    case 90:
      ACCEPT_TOKEN(anon_sym_not);
      END_STATE();
    case 91:
      ACCEPT_TOKEN(anon_sym_push);
      END_STATE();
    case 92:
      ACCEPT_TOKEN(anon_sym_pop);
      END_STATE();
    case 93:
      ACCEPT_TOKEN(anon_sym_argument);
      END_STATE();
    case 94:
      ACCEPT_TOKEN(anon_sym_local);
      END_STATE();
    case 95:
      ACCEPT_TOKEN(anon_sym_static);
      END_STATE();
    case 96:
      ACCEPT_TOKEN(anon_sym_constant);
      END_STATE();
    case 97:
      ACCEPT_TOKEN(anon_sym_this);
      END_STATE();
    case 98:
      ACCEPT_TOKEN(anon_sym_that);
      END_STATE();
    case 99:
      ACCEPT_TOKEN(anon_sym_pointer);
      END_STATE();
    case 100:
      ACCEPT_TOKEN(anon_sym_temp);
      END_STATE();
    case 101:
      ACCEPT_TOKEN(anon_sym_label);
      END_STATE();
    case 102:
      ACCEPT_TOKEN(anon_sym_goto);
      END_STATE();
    case 103:
      ACCEPT_TOKEN(anon_sym_if_DASHgoto);
      END_STATE();
    case 104:
      ACCEPT_TOKEN(anon_sym_function);
      END_STATE();
    case 105:
      ACCEPT_TOKEN(anon_sym_call);
      END_STATE();
    case 106:
      ACCEPT_TOKEN(sym_return_command);
      END_STATE();
    case 107:
      ACCEPT_TOKEN(aux_sym_index_token1);
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(107);
      END_STATE();
    case 108:
      ACCEPT_TOKEN(aux_sym_label_name_token1);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(108);
      END_STATE();
    case 109:
      ACCEPT_TOKEN(sym_comment);
      if (lookahead != 0 &&
          lookahead != '\n') ADVANCE(109);
      END_STATE();
    case 110:
      ACCEPT_TOKEN(sym__whitespace);
      if (('\t' <= lookahead && lookahead <= '\r') ||
          lookahead == ' ') ADVANCE(110);
      END_STATE();
    default:
      return false;
  }
}

static const TSLexerMode ts_lex_modes[STATE_COUNT] = {
  [0] = {.lex_state = 0},
  [1] = {.lex_state = 80},
  [2] = {.lex_state = 80},
  [3] = {.lex_state = 80},
  [4] = {.lex_state = 80},
  [5] = {.lex_state = 80},
  [6] = {.lex_state = 80},
  [7] = {.lex_state = 80},
  [8] = {.lex_state = 80},
  [9] = {.lex_state = 80},
  [10] = {.lex_state = 80},
  [11] = {.lex_state = 80},
  [12] = {.lex_state = 80},
  [13] = {.lex_state = 80},
  [14] = {.lex_state = 80},
  [15] = {.lex_state = 80},
  [16] = {.lex_state = 80},
  [17] = {.lex_state = 80},
  [18] = {.lex_state = 80},
  [19] = {.lex_state = 80},
  [20] = {.lex_state = 0},
  [21] = {.lex_state = 0},
  [22] = {.lex_state = 2},
  [23] = {.lex_state = 2},
  [24] = {.lex_state = 2},
  [25] = {.lex_state = 2},
  [26] = {.lex_state = 2},
  [27] = {.lex_state = 0},
  [28] = {.lex_state = 0},
  [29] = {.lex_state = 0},
  [30] = {.lex_state = 0},
  [31] = {.lex_state = 0},
  [32] = {.lex_state = 0},
  [33] = {.lex_state = 0},
};

static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = {
  [STATE(0)] = {
    [ts_builtin_sym_end] = ACTIONS(1),
    [anon_sym_add] = ACTIONS(1),
    [anon_sym_sub] = ACTIONS(1),
    [anon_sym_neg] = ACTIONS(1),
    [anon_sym_eq] = ACTIONS(1),
    [anon_sym_gt] = ACTIONS(1),
    [anon_sym_lt] = ACTIONS(1),
    [anon_sym_and] = ACTIONS(1),
    [anon_sym_or] = ACTIONS(1),
    [anon_sym_not] = ACTIONS(1),
    [anon_sym_push] = ACTIONS(1),
    [anon_sym_pop] = ACTIONS(1),
    [anon_sym_argument] = ACTIONS(1),
    [anon_sym_local] = ACTIONS(1),
    [anon_sym_static] = ACTIONS(1),
    [anon_sym_constant] = ACTIONS(1),
    [anon_sym_this] = ACTIONS(1),
    [anon_sym_that] = ACTIONS(1),
    [anon_sym_pointer] = ACTIONS(1),
    [anon_sym_temp] = ACTIONS(1),
    [anon_sym_label] = ACTIONS(1),
    [anon_sym_goto] = ACTIONS(1),
    [anon_sym_if_DASHgoto] = ACTIONS(1),
    [anon_sym_function] = ACTIONS(1),
    [anon_sym_call] = ACTIONS(1),
    [sym_return_command] = ACTIONS(1),
    [aux_sym_index_token1] = ACTIONS(1),
    [sym_comment] = ACTIONS(3),
  },
  [STATE(1)] = {
    [sym_source_file] = STATE(31),
    [sym__item] = STATE(2),
    [sym_command] = STATE(2),
    [sym_arithmetic_command] = STATE(8),
    [sym_memory_command] = STATE(8),
    [sym_push_command] = STATE(9),
    [sym_pop_command] = STATE(9),
    [sym_program_flow_command] = STATE(8),
    [sym_label_command] = STATE(7),
    [sym_goto_command] = STATE(7),
    [sym_if_goto_command] = STATE(7),
    [sym_function_command] = STATE(8),
    [sym_function_declaration] = STATE(5),
    [sym_call_command] = STATE(5),
    [aux_sym_source_file_repeat1] = STATE(2),
    [ts_builtin_sym_end] = ACTIONS(5),
    [anon_sym_add] = ACTIONS(7),
    [anon_sym_sub] = ACTIONS(7),
    [anon_sym_neg] = ACTIONS(7),
    [anon_sym_eq] = ACTIONS(7),
    [anon_sym_gt] = ACTIONS(7),
    [anon_sym_lt] = ACTIONS(7),
    [anon_sym_and] = ACTIONS(7),
    [anon_sym_or] = ACTIONS(7),
    [anon_sym_not] = ACTIONS(7),
    [anon_sym_push] = ACTIONS(9),
    [anon_sym_pop] = ACTIONS(11),
    [anon_sym_label] = ACTIONS(13),
    [anon_sym_goto] = ACTIONS(15),
    [anon_sym_if_DASHgoto] = ACTIONS(17),
    [anon_sym_function] = ACTIONS(19),
    [anon_sym_call] = ACTIONS(21),
    [sym_return_command] = ACTIONS(23),
    [sym_comment] = ACTIONS(25),
    [sym__whitespace] = ACTIONS(27),
  },
  [STATE(2)] = {
    [sym__item] = STATE(3),
    [sym_command] = STATE(3),
    [sym_arithmetic_command] = STATE(8),
    [sym_memory_command] = STATE(8),
    [sym_push_command] = STATE(9),
    [sym_pop_command] = STATE(9),
    [sym_program_flow_command] = STATE(8),
    [sym_label_command] = STATE(7),
    [sym_goto_command] = STATE(7),
    [sym_if_goto_command] = STATE(7),
    [sym_function_command] = STATE(8),
    [sym_function_declaration] = STATE(5),
    [sym_call_command] = STATE(5),
    [aux_sym_source_file_repeat1] = STATE(3),
    [ts_builtin_sym_end] = ACTIONS(29),
    [anon_sym_add] = ACTIONS(7),
    [anon_sym_sub] = ACTIONS(7),
    [anon_sym_neg] = ACTIONS(7),
    [anon_sym_eq] = ACTIONS(7),
    [anon_sym_gt] = ACTIONS(7),
    [anon_sym_lt] = ACTIONS(7),
    [anon_sym_and] = ACTIONS(7),
    [anon_sym_or] = ACTIONS(7),
    [anon_sym_not] = ACTIONS(7),
    [anon_sym_push] = ACTIONS(9),
    [anon_sym_pop] = ACTIONS(11),
    [anon_sym_label] = ACTIONS(13),
    [anon_sym_goto] = ACTIONS(15),
    [anon_sym_if_DASHgoto] = ACTIONS(17),
    [anon_sym_function] = ACTIONS(19),
    [anon_sym_call] = ACTIONS(21),
    [sym_return_command] = ACTIONS(23),
    [sym_comment] = ACTIONS(31),
    [sym__whitespace] = ACTIONS(33),
  },
  [STATE(3)] = {
    [sym__item] = STATE(3),
    [sym_command] = STATE(3),
    [sym_arithmetic_command] = STATE(8),
    [sym_memory_command] = STATE(8),
    [sym_push_command] = STATE(9),
    [sym_pop_command] = STATE(9),
    [sym_program_flow_command] = STATE(8),
    [sym_label_command] = STATE(7),
    [sym_goto_command] = STATE(7),
    [sym_if_goto_command] = STATE(7),
    [sym_function_command] = STATE(8),
    [sym_function_declaration] = STATE(5),
    [sym_call_command] = STATE(5),
    [aux_sym_source_file_repeat1] = STATE(3),
    [ts_builtin_sym_end] = ACTIONS(35),
    [anon_sym_add] = ACTIONS(37),
    [anon_sym_sub] = ACTIONS(37),
    [anon_sym_neg] = ACTIONS(37),
    [anon_sym_eq] = ACTIONS(37),
    [anon_sym_gt] = ACTIONS(37),
    [anon_sym_lt] = ACTIONS(37),
    [anon_sym_and] = ACTIONS(37),
    [anon_sym_or] = ACTIONS(37),
    [anon_sym_not] = ACTIONS(37),
    [anon_sym_push] = ACTIONS(40),
    [anon_sym_pop] = ACTIONS(43),
    [anon_sym_label] = ACTIONS(46),
    [anon_sym_goto] = ACTIONS(49),
    [anon_sym_if_DASHgoto] = ACTIONS(52),
    [anon_sym_function] = ACTIONS(55),
    [anon_sym_call] = ACTIONS(58),
    [sym_return_command] = ACTIONS(61),
    [sym_comment] = ACTIONS(64),
    [sym__whitespace] = ACTIONS(67),
  },
};

static const uint16_t ts_small_parse_table[] = {
  [0] = 2,
    ACTIONS(70), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(72), 18,
      anon_sym_add,
      anon_sym_sub,
      anon_sym_neg,
      anon_sym_eq,
      anon_sym_gt,
      anon_sym_lt,
      anon_sym_and,
      anon_sym_or,
      anon_sym_not,
      anon_sym_push,
      anon_sym_pop,
      anon_sym_label,
      anon_sym_goto,
      anon_sym_if_DASHgoto,
      anon_sym_function,
      anon_sym_call,
      sym_return_command,
      sym_comment,
  [25] = 2,
    ACTIONS(74), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(76), 18,
      anon_sym_add,
      anon_sym_sub,
      anon_sym_neg,
      anon_sym_eq,
      anon_sym_gt,
      anon_sym_lt,
      anon_sym_and,
      anon_sym_or,
      anon_sym_not,
      anon_sym_push,
      anon_sym_pop,
      anon_sym_label,
      anon_sym_goto,
      anon_sym_if_DASHgoto,
      anon_sym_function,
      anon_sym_call,
      sym_return_command,
      sym_comment,
  [50] = 2,
    ACTIONS(78), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(80), 18,
      anon_sym_add,
      anon_sym_sub,
      anon_sym_neg,
      anon_sym_eq,
      anon_sym_gt,
      anon_sym_lt,
      anon_sym_and,
      anon_sym_or,
      anon_sym_not,
      anon_sym_push,
      anon_sym_pop,
      anon_sym_label,
      anon_sym_goto,
      anon_sym_if_DASHgoto,
      anon_sym_function,
      anon_sym_call,
      sym_return_command,
      sym_comment,
  [75] = 2,
    ACTIONS(82), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(84), 18,
      anon_sym_add,
      anon_sym_sub,
      anon_sym_neg,
      anon_sym_eq,
      anon_sym_gt,
      anon_sym_lt,
      anon_sym_and,
      anon_sym_or,
      anon_sym_not,
      anon_sym_push,
      anon_sym_pop,
      anon_sym_label,
      anon_sym_goto,
      anon_sym_if_DASHgoto,
      anon_sym_function,
      anon_sym_call,
      sym_return_command,
      sym_comment,
  [100] = 2,
    ACTIONS(86), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(88), 18,
      anon_sym_add,
      anon_sym_sub,
      anon_sym_neg,
      anon_sym_eq,
      anon_sym_gt,
      anon_sym_lt,
      anon_sym_and,
      anon_sym_or,
      anon_sym_not,
      anon_sym_push,
      anon_sym_pop,
      anon_sym_label,
      anon_sym_goto,
      anon_sym_if_DASHgoto,
      anon_sym_function,
      anon_sym_call,
      sym_return_command,
      sym_comment,
  [125] = 2,
    ACTIONS(90), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(92), 18,
      anon_sym_add,
      anon_sym_sub,
      anon_sym_neg,
      anon_sym_eq,
      anon_sym_gt,
      anon_sym_lt,
      anon_sym_and,
      anon_sym_or,
      anon_sym_not,
      anon_sym_push,
      anon_sym_pop,
      anon_sym_label,
      anon_sym_goto,
      anon_sym_if_DASHgoto,
      anon_sym_function,
      anon_sym_call,
      sym_return_command,
      sym_comment,
  [150] = 2,
    ACTIONS(94), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(96), 18,
      anon_sym_add,
      anon_sym_sub,
      anon_sym_neg,
      anon_sym_eq,
      anon_sym_gt,
      anon_sym_lt,
      anon_sym_and,
      anon_sym_or,
      anon_sym_not,
      anon_sym_push,
      anon_sym_pop,
      anon_sym_label,
      anon_sym_goto,
      anon_sym_if_DASHgoto,
      anon_sym_function,
      anon_sym_call,
      sym_return_command,
      sym_comment,
  [175] = 2,
    ACTIONS(98), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(100), 18,
      anon_sym_add,
      anon_sym_sub,
      anon_sym_neg,
      anon_sym_eq,
      anon_sym_gt,
      anon_sym_lt,
      anon_sym_and,
      anon_sym_or,
      anon_sym_not,
      anon_sym_push,
      anon_sym_pop,
      anon_sym_label,
      anon_sym_goto,
      anon_sym_if_DASHgoto,
      anon_sym_function,
      anon_sym_call,
      sym_return_command,
      sym_comment,
  [200] = 2,
    ACTIONS(102), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(104), 18,
      anon_sym_add,
      anon_sym_sub,
      anon_sym_neg,
      anon_sym_eq,
      anon_sym_gt,
      anon_sym_lt,
      anon_sym_and,
      anon_sym_or,
      anon_sym_not,
      anon_sym_push,
      anon_sym_pop,
      anon_sym_label,
      anon_sym_goto,
      anon_sym_if_DASHgoto,
      anon_sym_function,
      anon_sym_call,
      sym_return_command,
      sym_comment,
  [225] = 2,
    ACTIONS(106), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(108), 18,
      anon_sym_add,
      anon_sym_sub,
      anon_sym_neg,
      anon_sym_eq,
      anon_sym_gt,
      anon_sym_lt,
      anon_sym_and,
      anon_sym_or,
      anon_sym_not,
      anon_sym_push,
      anon_sym_pop,
      anon_sym_label,
      anon_sym_goto,
      anon_sym_if_DASHgoto,
      anon_sym_function,
      anon_sym_call,
      sym_return_command,
      sym_comment,
  [250] = 2,
    ACTIONS(110), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(112), 18,
      anon_sym_add,
      anon_sym_sub,
      anon_sym_neg,
      anon_sym_eq,
      anon_sym_gt,
      anon_sym_lt,
      anon_sym_and,
      anon_sym_or,
      anon_sym_not,
      anon_sym_push,
      anon_sym_pop,
      anon_sym_label,
      anon_sym_goto,
      anon_sym_if_DASHgoto,
      anon_sym_function,
      anon_sym_call,
      sym_return_command,
      sym_comment,
  [275] = 2,
    ACTIONS(114), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(116), 18,
      anon_sym_add,
      anon_sym_sub,
      anon_sym_neg,
      anon_sym_eq,
      anon_sym_gt,
      anon_sym_lt,
      anon_sym_and,
      anon_sym_or,
      anon_sym_not,
      anon_sym_push,
      anon_sym_pop,
      anon_sym_label,
      anon_sym_goto,
      anon_sym_if_DASHgoto,
      anon_sym_function,
      anon_sym_call,
      sym_return_command,
      sym_comment,
  [300] = 2,
    ACTIONS(118), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(120), 18,
      anon_sym_add,
      anon_sym_sub,
      anon_sym_neg,
      anon_sym_eq,
      anon_sym_gt,
      anon_sym_lt,
      anon_sym_and,
      anon_sym_or,
      anon_sym_not,
      anon_sym_push,
      anon_sym_pop,
      anon_sym_label,
      anon_sym_goto,
      anon_sym_if_DASHgoto,
      anon_sym_function,
      anon_sym_call,
      sym_return_command,
      sym_comment,
  [325] = 2,
    ACTIONS(122), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(124), 18,
      anon_sym_add,
      anon_sym_sub,
      anon_sym_neg,
      anon_sym_eq,
      anon_sym_gt,
      anon_sym_lt,
      anon_sym_and,
      anon_sym_or,
      anon_sym_not,
      anon_sym_push,
      anon_sym_pop,
      anon_sym_label,
      anon_sym_goto,
      anon_sym_if_DASHgoto,
      anon_sym_function,
      anon_sym_call,
      sym_return_command,
      sym_comment,
  [350] = 2,
    ACTIONS(126), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(128), 18,
      anon_sym_add,
      anon_sym_sub,
      anon_sym_neg,
      anon_sym_eq,
      anon_sym_gt,
      anon_sym_lt,
      anon_sym_and,
      anon_sym_or,
      anon_sym_not,
      anon_sym_push,
      anon_sym_pop,
      anon_sym_label,
      anon_sym_goto,
      anon_sym_if_DASHgoto,
      anon_sym_function,
      anon_sym_call,
      sym_return_command,
      sym_comment,
  [375] = 2,
    ACTIONS(130), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(132), 18,
      anon_sym_add,
      anon_sym_sub,
      anon_sym_neg,
      anon_sym_eq,
      anon_sym_gt,
      anon_sym_lt,
      anon_sym_and,
      anon_sym_or,
      anon_sym_not,
      anon_sym_push,
      anon_sym_pop,
      anon_sym_label,
      anon_sym_goto,
      anon_sym_if_DASHgoto,
      anon_sym_function,
      anon_sym_call,
      sym_return_command,
      sym_comment,
  [400] = 3,
    ACTIONS(3), 1,
      sym_comment,
    STATE(27), 1,
      sym_memory_segment,
    ACTIONS(134), 8,
      anon_sym_argument,
      anon_sym_local,
      anon_sym_static,
      anon_sym_constant,
      anon_sym_this,
      anon_sym_that,
      anon_sym_pointer,
      anon_sym_temp,
  [417] = 3,
    ACTIONS(3), 1,
      sym_comment,
    STATE(28), 1,
      sym_memory_segment,
    ACTIONS(134), 8,
      anon_sym_argument,
      anon_sym_local,
      anon_sym_static,
      anon_sym_constant,
      anon_sym_this,
      anon_sym_that,
      anon_sym_pointer,
      anon_sym_temp,
  [434] = 3,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(136), 1,
      aux_sym_label_name_token1,
    STATE(11), 1,
      sym_label_name,
  [444] = 3,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(138), 1,
      aux_sym_label_name_token1,
    STATE(29), 1,
      sym_function_name,
  [454] = 3,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(138), 1,
      aux_sym_label_name_token1,
    STATE(30), 1,
      sym_function_name,
  [464] = 3,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(136), 1,
      aux_sym_label_name_token1,
    STATE(12), 1,
      sym_label_name,
  [474] = 3,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(136), 1,
      aux_sym_label_name_token1,
    STATE(13), 1,
      sym_label_name,
  [484] = 3,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(140), 1,
      aux_sym_index_token1,
    STATE(4), 1,
      sym_index,
  [494] = 3,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(140), 1,
      aux_sym_index_token1,
    STATE(17), 1,
      sym_index,
  [504] = 3,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(142), 1,
      aux_sym_index_token1,
    STATE(19), 1,
      sym_args_count,
  [514] = 3,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(144), 1,
      aux_sym_index_token1,
    STATE(16), 1,
      sym_local_vars_count,
  [524] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(146), 1,
      ts_builtin_sym_end,
  [531] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(148), 1,
      aux_sym_index_token1,
  [538] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(150), 1,
      aux_sym_index_token1,
};

static const uint32_t ts_small_parse_table_map[] = {
  [SMALL_STATE(4)] = 0,
  [SMALL_STATE(5)] = 25,
  [SMALL_STATE(6)] = 50,
  [SMALL_STATE(7)] = 75,
  [SMALL_STATE(8)] = 100,
  [SMALL_STATE(9)] = 125,
  [SMALL_STATE(10)] = 150,
  [SMALL_STATE(11)] = 175,
  [SMALL_STATE(12)] = 200,
  [SMALL_STATE(13)] = 225,
  [SMALL_STATE(14)] = 250,
  [SMALL_STATE(15)] = 275,
  [SMALL_STATE(16)] = 300,
  [SMALL_STATE(17)] = 325,
  [SMALL_STATE(18)] = 350,
  [SMALL_STATE(19)] = 375,
  [SMALL_STATE(20)] = 400,
  [SMALL_STATE(21)] = 417,
  [SMALL_STATE(22)] = 434,
  [SMALL_STATE(23)] = 444,
  [SMALL_STATE(24)] = 454,
  [SMALL_STATE(25)] = 464,
  [SMALL_STATE(26)] = 474,
  [SMALL_STATE(27)] = 484,
  [SMALL_STATE(28)] = 494,
  [SMALL_STATE(29)] = 504,
  [SMALL_STATE(30)] = 514,
  [SMALL_STATE(31)] = 524,
  [SMALL_STATE(32)] = 531,
  [SMALL_STATE(33)] = 538,
};

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 = true}}, REDUCE(sym_source_file, 0, 0, 0),
  [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(6),
  [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(20),
  [11] = {.entry = {.count = 1, .reusable = false}}, SHIFT(21),
  [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(22),
  [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(25),
  [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(26),
  [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(24),
  [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(23),
  [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(5),
  [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(2),
  [27] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2),
  [29] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0),
  [31] = {.entry = {.count = 1, .reusable = false}}, SHIFT(3),
  [33] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3),
  [35] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0),
  [37] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(6),
  [40] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(20),
  [43] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(21),
  [46] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(22),
  [49] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(25),
  [52] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(26),
  [55] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(24),
  [58] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(23),
  [61] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(5),
  [64] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(3),
  [67] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(3),
  [70] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_push_command, 3, 0, 0),
  [72] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_push_command, 3, 0, 0),
  [74] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_command, 1, 0, 0),
  [76] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_command, 1, 0, 0),
  [78] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_arithmetic_command, 1, 0, 0),
  [80] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_arithmetic_command, 1, 0, 0),
  [82] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_program_flow_command, 1, 0, 0),
  [84] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_program_flow_command, 1, 0, 0),
  [86] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_command, 1, 0, 0),
  [88] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_command, 1, 0, 0),
  [90] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_memory_command, 1, 0, 0),
  [92] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_memory_command, 1, 0, 0),
  [94] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_label_name, 1, 0, 0),
  [96] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_label_name, 1, 0, 0),
  [98] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_label_command, 2, 0, 0),
  [100] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_label_command, 2, 0, 0),
  [102] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_goto_command, 2, 0, 0),
  [104] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_goto_command, 2, 0, 0),
  [106] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_goto_command, 2, 0, 0),
  [108] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_goto_command, 2, 0, 0),
  [110] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_index, 1, 0, 0),
  [112] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_index, 1, 0, 0),
  [114] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_local_vars_count, 1, 0, 0),
  [116] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_local_vars_count, 1, 0, 0),
  [118] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 3, 0, 0),
  [120] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 3, 0, 0),
  [122] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pop_command, 3, 0, 0),
  [124] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_pop_command, 3, 0, 0),
  [126] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_args_count, 1, 0, 0),
  [128] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_args_count, 1, 0, 0),
  [130] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_call_command, 3, 0, 0),
  [132] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_call_command, 3, 0, 0),
  [134] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32),
  [136] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10),
  [138] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33),
  [140] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14),
  [142] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18),
  [144] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15),
  [146] = {.entry = {.count = 1, .reusable = true}},  ACCEPT_INPUT(),
  [148] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_memory_segment, 1, 0, 0),
  [150] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_name, 1, 0, 0),
};

#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_vm(void) {
  static const TSLanguage language = {
    .abi_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,
    .supertype_count = SUPERTYPE_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,
    .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 = (const void*)ts_lex_modes,
    .lex_fn = ts_lex,
    .primary_state_ids = ts_primary_state_ids,
    .name = "vm",
    .max_reserved_word_set_size = 0,
    .metadata = {
      .major_version = 1,
      .minor_version = 0,
      .patch_version = 0,
    },
  };
  return &language;
}
#ifdef __cplusplus
}
#endif
