/* 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 26
#define LARGE_STATE_COUNT 15
#define SYMBOL_COUNT 68
#define ALIAS_COUNT 0
#define TOKEN_COUNT 57
#define EXTERNAL_TOKEN_COUNT 0
#define FIELD_COUNT 0
#define MAX_ALIAS_SEQUENCE_LENGTH 5
#define MAX_RESERVED_WORD_SET_SIZE 0
#define PRODUCTION_ID_COUNT 1
#define SUPERTYPE_COUNT 0

enum ts_symbol_identifiers {
  anon_sym_AT = 1,
  anon_sym_EQ = 2,
  anon_sym_SEMI = 3,
  anon_sym_LPAREN = 4,
  anon_sym_RPAREN = 5,
  sym_constant = 6,
  aux_sym_predefined_symbol_token1 = 7,
  anon_sym_SP = 8,
  anon_sym_LCL = 9,
  anon_sym_ARG = 10,
  anon_sym_THIS = 11,
  anon_sym_THAT = 12,
  anon_sym_SCREEN = 13,
  anon_sym_KBD = 14,
  sym_user_symbol = 15,
  anon_sym_M = 16,
  anon_sym_D = 17,
  anon_sym_MD = 18,
  anon_sym_A = 19,
  anon_sym_AM = 20,
  anon_sym_AD = 21,
  anon_sym_AMD = 22,
  anon_sym_0 = 23,
  anon_sym_1 = 24,
  anon_sym_DASH1 = 25,
  anon_sym_BANGD = 26,
  anon_sym_DASHD = 27,
  anon_sym_D_PLUS1 = 28,
  anon_sym_D_DASH1 = 29,
  anon_sym_BANGA = 30,
  anon_sym_DASHA = 31,
  anon_sym_A_PLUS1 = 32,
  anon_sym_A_DASH1 = 33,
  anon_sym_BANGM = 34,
  anon_sym_DASHM = 35,
  anon_sym_M_PLUS1 = 36,
  anon_sym_M_DASH1 = 37,
  anon_sym_D_PLUSA = 38,
  anon_sym_D_DASHA = 39,
  anon_sym_A_DASHD = 40,
  anon_sym_D_AMPA = 41,
  anon_sym_D_PIPEA = 42,
  anon_sym_D_PLUSM = 43,
  anon_sym_D_DASHM = 44,
  anon_sym_M_DASHD = 45,
  anon_sym_D_AMPM = 46,
  anon_sym_D_PIPEM = 47,
  anon_sym_JGT = 48,
  anon_sym_JEQ = 49,
  anon_sym_JGE = 50,
  anon_sym_JLT = 51,
  anon_sym_JNE = 52,
  anon_sym_JLE = 53,
  anon_sym_JMP = 54,
  sym_comment = 55,
  sym__whitespace = 56,
  sym_source_file = 57,
  sym__item = 58,
  sym_a_instruction = 59,
  sym_c_instruction = 60,
  sym_label_declaration = 61,
  sym_symbol = 62,
  sym_predefined_symbol = 63,
  sym_dest = 64,
  sym_comp = 65,
  sym_jump = 66,
  aux_sym_source_file_repeat1 = 67,
};

static const char * const ts_symbol_names[] = {
  [ts_builtin_sym_end] = "end",
  [anon_sym_AT] = "@",
  [anon_sym_EQ] = "=",
  [anon_sym_SEMI] = ";",
  [anon_sym_LPAREN] = "(",
  [anon_sym_RPAREN] = ")",
  [sym_constant] = "constant",
  [aux_sym_predefined_symbol_token1] = "predefined_symbol_token1",
  [anon_sym_SP] = "SP",
  [anon_sym_LCL] = "LCL",
  [anon_sym_ARG] = "ARG",
  [anon_sym_THIS] = "THIS",
  [anon_sym_THAT] = "THAT",
  [anon_sym_SCREEN] = "SCREEN",
  [anon_sym_KBD] = "KBD",
  [sym_user_symbol] = "user_symbol",
  [anon_sym_M] = "M",
  [anon_sym_D] = "D",
  [anon_sym_MD] = "MD",
  [anon_sym_A] = "A",
  [anon_sym_AM] = "AM",
  [anon_sym_AD] = "AD",
  [anon_sym_AMD] = "AMD",
  [anon_sym_0] = "0",
  [anon_sym_1] = "1",
  [anon_sym_DASH1] = "-1",
  [anon_sym_BANGD] = "!D",
  [anon_sym_DASHD] = "-D",
  [anon_sym_D_PLUS1] = "D+1",
  [anon_sym_D_DASH1] = "D-1",
  [anon_sym_BANGA] = "!A",
  [anon_sym_DASHA] = "-A",
  [anon_sym_A_PLUS1] = "A+1",
  [anon_sym_A_DASH1] = "A-1",
  [anon_sym_BANGM] = "!M",
  [anon_sym_DASHM] = "-M",
  [anon_sym_M_PLUS1] = "M+1",
  [anon_sym_M_DASH1] = "M-1",
  [anon_sym_D_PLUSA] = "D+A",
  [anon_sym_D_DASHA] = "D-A",
  [anon_sym_A_DASHD] = "A-D",
  [anon_sym_D_AMPA] = "D&A",
  [anon_sym_D_PIPEA] = "D|A",
  [anon_sym_D_PLUSM] = "D+M",
  [anon_sym_D_DASHM] = "D-M",
  [anon_sym_M_DASHD] = "M-D",
  [anon_sym_D_AMPM] = "D&M",
  [anon_sym_D_PIPEM] = "D|M",
  [anon_sym_JGT] = "JGT",
  [anon_sym_JEQ] = "JEQ",
  [anon_sym_JGE] = "JGE",
  [anon_sym_JLT] = "JLT",
  [anon_sym_JNE] = "JNE",
  [anon_sym_JLE] = "JLE",
  [anon_sym_JMP] = "JMP",
  [sym_comment] = "comment",
  [sym__whitespace] = "_whitespace",
  [sym_source_file] = "source_file",
  [sym__item] = "_item",
  [sym_a_instruction] = "a_instruction",
  [sym_c_instruction] = "c_instruction",
  [sym_label_declaration] = "label_declaration",
  [sym_symbol] = "symbol",
  [sym_predefined_symbol] = "predefined_symbol",
  [sym_dest] = "dest",
  [sym_comp] = "comp",
  [sym_jump] = "jump",
  [aux_sym_source_file_repeat1] = "source_file_repeat1",
};

static const TSSymbol ts_symbol_map[] = {
  [ts_builtin_sym_end] = ts_builtin_sym_end,
  [anon_sym_AT] = anon_sym_AT,
  [anon_sym_EQ] = anon_sym_EQ,
  [anon_sym_SEMI] = anon_sym_SEMI,
  [anon_sym_LPAREN] = anon_sym_LPAREN,
  [anon_sym_RPAREN] = anon_sym_RPAREN,
  [sym_constant] = sym_constant,
  [aux_sym_predefined_symbol_token1] = aux_sym_predefined_symbol_token1,
  [anon_sym_SP] = anon_sym_SP,
  [anon_sym_LCL] = anon_sym_LCL,
  [anon_sym_ARG] = anon_sym_ARG,
  [anon_sym_THIS] = anon_sym_THIS,
  [anon_sym_THAT] = anon_sym_THAT,
  [anon_sym_SCREEN] = anon_sym_SCREEN,
  [anon_sym_KBD] = anon_sym_KBD,
  [sym_user_symbol] = sym_user_symbol,
  [anon_sym_M] = anon_sym_M,
  [anon_sym_D] = anon_sym_D,
  [anon_sym_MD] = anon_sym_MD,
  [anon_sym_A] = anon_sym_A,
  [anon_sym_AM] = anon_sym_AM,
  [anon_sym_AD] = anon_sym_AD,
  [anon_sym_AMD] = anon_sym_AMD,
  [anon_sym_0] = anon_sym_0,
  [anon_sym_1] = anon_sym_1,
  [anon_sym_DASH1] = anon_sym_DASH1,
  [anon_sym_BANGD] = anon_sym_BANGD,
  [anon_sym_DASHD] = anon_sym_DASHD,
  [anon_sym_D_PLUS1] = anon_sym_D_PLUS1,
  [anon_sym_D_DASH1] = anon_sym_D_DASH1,
  [anon_sym_BANGA] = anon_sym_BANGA,
  [anon_sym_DASHA] = anon_sym_DASHA,
  [anon_sym_A_PLUS1] = anon_sym_A_PLUS1,
  [anon_sym_A_DASH1] = anon_sym_A_DASH1,
  [anon_sym_BANGM] = anon_sym_BANGM,
  [anon_sym_DASHM] = anon_sym_DASHM,
  [anon_sym_M_PLUS1] = anon_sym_M_PLUS1,
  [anon_sym_M_DASH1] = anon_sym_M_DASH1,
  [anon_sym_D_PLUSA] = anon_sym_D_PLUSA,
  [anon_sym_D_DASHA] = anon_sym_D_DASHA,
  [anon_sym_A_DASHD] = anon_sym_A_DASHD,
  [anon_sym_D_AMPA] = anon_sym_D_AMPA,
  [anon_sym_D_PIPEA] = anon_sym_D_PIPEA,
  [anon_sym_D_PLUSM] = anon_sym_D_PLUSM,
  [anon_sym_D_DASHM] = anon_sym_D_DASHM,
  [anon_sym_M_DASHD] = anon_sym_M_DASHD,
  [anon_sym_D_AMPM] = anon_sym_D_AMPM,
  [anon_sym_D_PIPEM] = anon_sym_D_PIPEM,
  [anon_sym_JGT] = anon_sym_JGT,
  [anon_sym_JEQ] = anon_sym_JEQ,
  [anon_sym_JGE] = anon_sym_JGE,
  [anon_sym_JLT] = anon_sym_JLT,
  [anon_sym_JNE] = anon_sym_JNE,
  [anon_sym_JLE] = anon_sym_JLE,
  [anon_sym_JMP] = anon_sym_JMP,
  [sym_comment] = sym_comment,
  [sym__whitespace] = sym__whitespace,
  [sym_source_file] = sym_source_file,
  [sym__item] = sym__item,
  [sym_a_instruction] = sym_a_instruction,
  [sym_c_instruction] = sym_c_instruction,
  [sym_label_declaration] = sym_label_declaration,
  [sym_symbol] = sym_symbol,
  [sym_predefined_symbol] = sym_predefined_symbol,
  [sym_dest] = sym_dest,
  [sym_comp] = sym_comp,
  [sym_jump] = sym_jump,
  [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_AT] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_EQ] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_SEMI] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_LPAREN] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_RPAREN] = {
    .visible = true,
    .named = false,
  },
  [sym_constant] = {
    .visible = true,
    .named = true,
  },
  [aux_sym_predefined_symbol_token1] = {
    .visible = false,
    .named = false,
  },
  [anon_sym_SP] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_LCL] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_ARG] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_THIS] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_THAT] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_SCREEN] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_KBD] = {
    .visible = true,
    .named = false,
  },
  [sym_user_symbol] = {
    .visible = true,
    .named = true,
  },
  [anon_sym_M] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_D] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_MD] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_A] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_AM] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_AD] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_AMD] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_0] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_1] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_DASH1] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_BANGD] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_DASHD] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_D_PLUS1] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_D_DASH1] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_BANGA] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_DASHA] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_A_PLUS1] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_A_DASH1] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_BANGM] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_DASHM] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_M_PLUS1] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_M_DASH1] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_D_PLUSA] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_D_DASHA] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_A_DASHD] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_D_AMPA] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_D_PIPEA] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_D_PLUSM] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_D_DASHM] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_M_DASHD] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_D_AMPM] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_D_PIPEM] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_JGT] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_JEQ] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_JGE] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_JLT] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_JNE] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_JLE] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_JMP] = {
    .visible = true,
    .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_a_instruction] = {
    .visible = true,
    .named = true,
  },
  [sym_c_instruction] = {
    .visible = true,
    .named = true,
  },
  [sym_label_declaration] = {
    .visible = true,
    .named = true,
  },
  [sym_symbol] = {
    .visible = true,
    .named = true,
  },
  [sym_predefined_symbol] = {
    .visible = true,
    .named = true,
  },
  [sym_dest] = {
    .visible = true,
    .named = true,
  },
  [sym_comp] = {
    .visible = true,
    .named = true,
  },
  [sym_jump] = {
    .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] = 8,
  [25] = 12,
};

static bool ts_lex(TSLexer *lexer, TSStateId state) {
  START_LEXER();
  eof = lexer->eof(lexer);
  switch (state) {
    case 0:
      if (eof) ADVANCE(38);
      ADVANCE_MAP(
        '!', 12,
        '(', 42,
        ')', 43,
        '-', 4,
        '/', 3,
        '0', 89,
        '1', 90,
        ';', 41,
        '=', 40,
        '@', 39,
        'A', 85,
        'D', 81,
        'J', 20,
        'K', 16,
        'L', 17,
        'M', 80,
        'R', 5,
        'S', 18,
        'T', 27,
      );
      if (('\t' <= lookahead && lookahead <= '\r') ||
          lookahead == ' ') SKIP(0);
      END_STATE();
    case 1:
      ADVANCE_MAP(
        '!', 12,
        '-', 4,
        '/', 3,
        '0', 89,
        '1', 90,
        'A', 83,
        'D', 81,
        'M', 79,
      );
      if (('\t' <= lookahead && lookahead <= '\r') ||
          lookahead == ' ') SKIP(1);
      END_STATE();
    case 2:
      ADVANCE_MAP(
        '-', 36,
        '/', 3,
        'A', 73,
        'K', 63,
        'L', 64,
        'R', 61,
        'S', 65,
        'T', 70,
      );
      if (('\t' <= lookahead && lookahead <= '\r') ||
          lookahead == ' ') SKIP(2);
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(44);
      if (lookahead == '$' ||
          ('.' <= lookahead && lookahead <= ':') ||
          ('B' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 3:
      if (lookahead == '/') ADVANCE(121);
      END_STATE();
    case 4:
      if (lookahead == '1') ADVANCE(91);
      if (lookahead == 'A') ADVANCE(97);
      if (lookahead == 'D') ADVANCE(93);
      if (lookahead == 'M') ADVANCE(101);
      END_STATE();
    case 5:
      if (lookahead == '1') ADVANCE(35);
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(45);
      END_STATE();
    case 6:
      if (lookahead == '1') ADVANCE(98);
      END_STATE();
    case 7:
      if (lookahead == '1') ADVANCE(99);
      if (lookahead == 'D') ADVANCE(106);
      END_STATE();
    case 8:
      if (lookahead == '1') ADVANCE(94);
      if (lookahead == 'A') ADVANCE(104);
      if (lookahead == 'M') ADVANCE(109);
      END_STATE();
    case 9:
      if (lookahead == '1') ADVANCE(95);
      if (lookahead == 'A') ADVANCE(105);
      if (lookahead == 'M') ADVANCE(110);
      END_STATE();
    case 10:
      if (lookahead == '1') ADVANCE(102);
      END_STATE();
    case 11:
      if (lookahead == '1') ADVANCE(103);
      if (lookahead == 'D') ADVANCE(111);
      END_STATE();
    case 12:
      if (lookahead == 'A') ADVANCE(96);
      if (lookahead == 'D') ADVANCE(92);
      if (lookahead == 'M') ADVANCE(100);
      END_STATE();
    case 13:
      if (lookahead == 'A') ADVANCE(107);
      if (lookahead == 'M') ADVANCE(112);
      END_STATE();
    case 14:
      if (lookahead == 'A') ADVANCE(108);
      if (lookahead == 'M') ADVANCE(113);
      END_STATE();
    case 15:
      if (lookahead == 'A') ADVANCE(34);
      if (lookahead == 'I') ADVANCE(33);
      END_STATE();
    case 16:
      if (lookahead == 'B') ADVANCE(19);
      END_STATE();
    case 17:
      if (lookahead == 'C') ADVANCE(28);
      END_STATE();
    case 18:
      if (lookahead == 'C') ADVANCE(32);
      if (lookahead == 'P') ADVANCE(47);
      END_STATE();
    case 19:
      if (lookahead == 'D') ADVANCE(59);
      END_STATE();
    case 20:
      if (lookahead == 'E') ADVANCE(31);
      if (lookahead == 'G') ADVANCE(21);
      if (lookahead == 'L') ADVANCE(22);
      if (lookahead == 'M') ADVANCE(30);
      if (lookahead == 'N') ADVANCE(23);
      END_STATE();
    case 21:
      if (lookahead == 'E') ADVANCE(116);
      if (lookahead == 'T') ADVANCE(114);
      END_STATE();
    case 22:
      if (lookahead == 'E') ADVANCE(119);
      if (lookahead == 'T') ADVANCE(117);
      END_STATE();
    case 23:
      if (lookahead == 'E') ADVANCE(118);
      END_STATE();
    case 24:
      if (lookahead == 'E') ADVANCE(29);
      END_STATE();
    case 25:
      if (lookahead == 'E') ADVANCE(24);
      END_STATE();
    case 26:
      if (lookahead == 'G') ADVANCE(51);
      END_STATE();
    case 27:
      if (lookahead == 'H') ADVANCE(15);
      END_STATE();
    case 28:
      if (lookahead == 'L') ADVANCE(49);
      END_STATE();
    case 29:
      if (lookahead == 'N') ADVANCE(57);
      END_STATE();
    case 30:
      if (lookahead == 'P') ADVANCE(120);
      END_STATE();
    case 31:
      if (lookahead == 'Q') ADVANCE(115);
      END_STATE();
    case 32:
      if (lookahead == 'R') ADVANCE(25);
      END_STATE();
    case 33:
      if (lookahead == 'S') ADVANCE(53);
      END_STATE();
    case 34:
      if (lookahead == 'T') ADVANCE(55);
      END_STATE();
    case 35:
      if (('0' <= lookahead && lookahead <= '5')) ADVANCE(45);
      END_STATE();
    case 36:
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(44);
      END_STATE();
    case 37:
      if (eof) ADVANCE(38);
      ADVANCE_MAP(
        '!', 12,
        '(', 42,
        '-', 4,
        '/', 3,
        '0', 89,
        '1', 90,
        ';', 41,
        '=', 40,
        '@', 39,
        'A', 84,
        'D', 81,
        'M', 80,
      );
      if (('\t' <= lookahead && lookahead <= '\r') ||
          lookahead == ' ') ADVANCE(122);
      END_STATE();
    case 38:
      ACCEPT_TOKEN(ts_builtin_sym_end);
      END_STATE();
    case 39:
      ACCEPT_TOKEN(anon_sym_AT);
      END_STATE();
    case 40:
      ACCEPT_TOKEN(anon_sym_EQ);
      END_STATE();
    case 41:
      ACCEPT_TOKEN(anon_sym_SEMI);
      END_STATE();
    case 42:
      ACCEPT_TOKEN(anon_sym_LPAREN);
      END_STATE();
    case 43:
      ACCEPT_TOKEN(anon_sym_RPAREN);
      END_STATE();
    case 44:
      ACCEPT_TOKEN(sym_constant);
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(44);
      END_STATE();
    case 45:
      ACCEPT_TOKEN(aux_sym_predefined_symbol_token1);
      END_STATE();
    case 46:
      ACCEPT_TOKEN(aux_sym_predefined_symbol_token1);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 47:
      ACCEPT_TOKEN(anon_sym_SP);
      END_STATE();
    case 48:
      ACCEPT_TOKEN(anon_sym_SP);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 49:
      ACCEPT_TOKEN(anon_sym_LCL);
      END_STATE();
    case 50:
      ACCEPT_TOKEN(anon_sym_LCL);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 51:
      ACCEPT_TOKEN(anon_sym_ARG);
      END_STATE();
    case 52:
      ACCEPT_TOKEN(anon_sym_ARG);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 53:
      ACCEPT_TOKEN(anon_sym_THIS);
      END_STATE();
    case 54:
      ACCEPT_TOKEN(anon_sym_THIS);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 55:
      ACCEPT_TOKEN(anon_sym_THAT);
      END_STATE();
    case 56:
      ACCEPT_TOKEN(anon_sym_THAT);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 57:
      ACCEPT_TOKEN(anon_sym_SCREEN);
      END_STATE();
    case 58:
      ACCEPT_TOKEN(anon_sym_SCREEN);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 59:
      ACCEPT_TOKEN(anon_sym_KBD);
      END_STATE();
    case 60:
      ACCEPT_TOKEN(anon_sym_KBD);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 61:
      ACCEPT_TOKEN(sym_user_symbol);
      if (lookahead == '1') ADVANCE(77);
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(46);
      if (lookahead == '$' ||
          lookahead == '.' ||
          lookahead == ':' ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 62:
      ACCEPT_TOKEN(sym_user_symbol);
      if (lookahead == 'A') ADVANCE(76);
      if (lookahead == 'I') ADVANCE(75);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('B' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 63:
      ACCEPT_TOKEN(sym_user_symbol);
      if (lookahead == 'B') ADVANCE(66);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 64:
      ACCEPT_TOKEN(sym_user_symbol);
      if (lookahead == 'C') ADVANCE(71);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 65:
      ACCEPT_TOKEN(sym_user_symbol);
      if (lookahead == 'C') ADVANCE(74);
      if (lookahead == 'P') ADVANCE(48);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 66:
      ACCEPT_TOKEN(sym_user_symbol);
      if (lookahead == 'D') ADVANCE(60);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 67:
      ACCEPT_TOKEN(sym_user_symbol);
      if (lookahead == 'E') ADVANCE(72);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 68:
      ACCEPT_TOKEN(sym_user_symbol);
      if (lookahead == 'E') ADVANCE(67);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 69:
      ACCEPT_TOKEN(sym_user_symbol);
      if (lookahead == 'G') ADVANCE(52);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 70:
      ACCEPT_TOKEN(sym_user_symbol);
      if (lookahead == 'H') ADVANCE(62);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 71:
      ACCEPT_TOKEN(sym_user_symbol);
      if (lookahead == 'L') ADVANCE(50);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 72:
      ACCEPT_TOKEN(sym_user_symbol);
      if (lookahead == 'N') ADVANCE(58);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 73:
      ACCEPT_TOKEN(sym_user_symbol);
      if (lookahead == 'R') ADVANCE(69);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 74:
      ACCEPT_TOKEN(sym_user_symbol);
      if (lookahead == 'R') ADVANCE(68);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 75:
      ACCEPT_TOKEN(sym_user_symbol);
      if (lookahead == 'S') ADVANCE(54);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 76:
      ACCEPT_TOKEN(sym_user_symbol);
      if (lookahead == 'T') ADVANCE(56);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 77:
      ACCEPT_TOKEN(sym_user_symbol);
      if (('0' <= lookahead && lookahead <= '5')) ADVANCE(46);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('6' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 78:
      ACCEPT_TOKEN(sym_user_symbol);
      if (lookahead == '$' ||
          lookahead == '.' ||
          ('0' <= lookahead && lookahead <= ':') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(78);
      END_STATE();
    case 79:
      ACCEPT_TOKEN(anon_sym_M);
      if (lookahead == '+') ADVANCE(10);
      if (lookahead == '-') ADVANCE(11);
      END_STATE();
    case 80:
      ACCEPT_TOKEN(anon_sym_M);
      if (lookahead == '+') ADVANCE(10);
      if (lookahead == '-') ADVANCE(11);
      if (lookahead == 'D') ADVANCE(82);
      END_STATE();
    case 81:
      ACCEPT_TOKEN(anon_sym_D);
      if (lookahead == '&') ADVANCE(13);
      if (lookahead == '+') ADVANCE(8);
      if (lookahead == '-') ADVANCE(9);
      if (lookahead == '|') ADVANCE(14);
      END_STATE();
    case 82:
      ACCEPT_TOKEN(anon_sym_MD);
      END_STATE();
    case 83:
      ACCEPT_TOKEN(anon_sym_A);
      if (lookahead == '+') ADVANCE(6);
      if (lookahead == '-') ADVANCE(7);
      END_STATE();
    case 84:
      ACCEPT_TOKEN(anon_sym_A);
      if (lookahead == '+') ADVANCE(6);
      if (lookahead == '-') ADVANCE(7);
      if (lookahead == 'D') ADVANCE(87);
      if (lookahead == 'M') ADVANCE(86);
      END_STATE();
    case 85:
      ACCEPT_TOKEN(anon_sym_A);
      if (lookahead == '+') ADVANCE(6);
      if (lookahead == '-') ADVANCE(7);
      if (lookahead == 'D') ADVANCE(87);
      if (lookahead == 'M') ADVANCE(86);
      if (lookahead == 'R') ADVANCE(26);
      END_STATE();
    case 86:
      ACCEPT_TOKEN(anon_sym_AM);
      if (lookahead == 'D') ADVANCE(88);
      END_STATE();
    case 87:
      ACCEPT_TOKEN(anon_sym_AD);
      END_STATE();
    case 88:
      ACCEPT_TOKEN(anon_sym_AMD);
      END_STATE();
    case 89:
      ACCEPT_TOKEN(anon_sym_0);
      END_STATE();
    case 90:
      ACCEPT_TOKEN(anon_sym_1);
      END_STATE();
    case 91:
      ACCEPT_TOKEN(anon_sym_DASH1);
      END_STATE();
    case 92:
      ACCEPT_TOKEN(anon_sym_BANGD);
      END_STATE();
    case 93:
      ACCEPT_TOKEN(anon_sym_DASHD);
      END_STATE();
    case 94:
      ACCEPT_TOKEN(anon_sym_D_PLUS1);
      END_STATE();
    case 95:
      ACCEPT_TOKEN(anon_sym_D_DASH1);
      END_STATE();
    case 96:
      ACCEPT_TOKEN(anon_sym_BANGA);
      END_STATE();
    case 97:
      ACCEPT_TOKEN(anon_sym_DASHA);
      END_STATE();
    case 98:
      ACCEPT_TOKEN(anon_sym_A_PLUS1);
      END_STATE();
    case 99:
      ACCEPT_TOKEN(anon_sym_A_DASH1);
      END_STATE();
    case 100:
      ACCEPT_TOKEN(anon_sym_BANGM);
      END_STATE();
    case 101:
      ACCEPT_TOKEN(anon_sym_DASHM);
      END_STATE();
    case 102:
      ACCEPT_TOKEN(anon_sym_M_PLUS1);
      END_STATE();
    case 103:
      ACCEPT_TOKEN(anon_sym_M_DASH1);
      END_STATE();
    case 104:
      ACCEPT_TOKEN(anon_sym_D_PLUSA);
      END_STATE();
    case 105:
      ACCEPT_TOKEN(anon_sym_D_DASHA);
      END_STATE();
    case 106:
      ACCEPT_TOKEN(anon_sym_A_DASHD);
      END_STATE();
    case 107:
      ACCEPT_TOKEN(anon_sym_D_AMPA);
      END_STATE();
    case 108:
      ACCEPT_TOKEN(anon_sym_D_PIPEA);
      END_STATE();
    case 109:
      ACCEPT_TOKEN(anon_sym_D_PLUSM);
      END_STATE();
    case 110:
      ACCEPT_TOKEN(anon_sym_D_DASHM);
      END_STATE();
    case 111:
      ACCEPT_TOKEN(anon_sym_M_DASHD);
      END_STATE();
    case 112:
      ACCEPT_TOKEN(anon_sym_D_AMPM);
      END_STATE();
    case 113:
      ACCEPT_TOKEN(anon_sym_D_PIPEM);
      END_STATE();
    case 114:
      ACCEPT_TOKEN(anon_sym_JGT);
      END_STATE();
    case 115:
      ACCEPT_TOKEN(anon_sym_JEQ);
      END_STATE();
    case 116:
      ACCEPT_TOKEN(anon_sym_JGE);
      END_STATE();
    case 117:
      ACCEPT_TOKEN(anon_sym_JLT);
      END_STATE();
    case 118:
      ACCEPT_TOKEN(anon_sym_JNE);
      END_STATE();
    case 119:
      ACCEPT_TOKEN(anon_sym_JLE);
      END_STATE();
    case 120:
      ACCEPT_TOKEN(anon_sym_JMP);
      END_STATE();
    case 121:
      ACCEPT_TOKEN(sym_comment);
      if (lookahead != 0 &&
          lookahead != '\n') ADVANCE(121);
      END_STATE();
    case 122:
      ACCEPT_TOKEN(sym__whitespace);
      if (('\t' <= lookahead && lookahead <= '\r') ||
          lookahead == ' ') ADVANCE(122);
      END_STATE();
    default:
      return false;
  }
}

static const TSLexerMode ts_lex_modes[STATE_COUNT] = {
  [0] = {.lex_state = 0},
  [1] = {.lex_state = 37},
  [2] = {.lex_state = 37},
  [3] = {.lex_state = 37},
  [4] = {.lex_state = 37},
  [5] = {.lex_state = 37},
  [6] = {.lex_state = 37},
  [7] = {.lex_state = 37},
  [8] = {.lex_state = 37},
  [9] = {.lex_state = 37},
  [10] = {.lex_state = 37},
  [11] = {.lex_state = 37},
  [12] = {.lex_state = 37},
  [13] = {.lex_state = 37},
  [14] = {.lex_state = 37},
  [15] = {.lex_state = 1},
  [16] = {.lex_state = 2},
  [17] = {.lex_state = 2},
  [18] = {.lex_state = 0},
  [19] = {.lex_state = 0},
  [20] = {.lex_state = 0},
  [21] = {.lex_state = 0},
  [22] = {.lex_state = 0},
  [23] = {.lex_state = 0},
  [24] = {.lex_state = 0},
  [25] = {.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_AT] = ACTIONS(1),
    [anon_sym_EQ] = ACTIONS(1),
    [anon_sym_SEMI] = ACTIONS(1),
    [anon_sym_LPAREN] = ACTIONS(1),
    [anon_sym_RPAREN] = ACTIONS(1),
    [aux_sym_predefined_symbol_token1] = ACTIONS(1),
    [anon_sym_SP] = ACTIONS(1),
    [anon_sym_LCL] = ACTIONS(1),
    [anon_sym_ARG] = ACTIONS(1),
    [anon_sym_THIS] = ACTIONS(1),
    [anon_sym_THAT] = ACTIONS(1),
    [anon_sym_SCREEN] = ACTIONS(1),
    [anon_sym_KBD] = ACTIONS(1),
    [anon_sym_M] = ACTIONS(1),
    [anon_sym_D] = ACTIONS(1),
    [anon_sym_MD] = ACTIONS(1),
    [anon_sym_A] = ACTIONS(1),
    [anon_sym_AM] = ACTIONS(1),
    [anon_sym_AD] = ACTIONS(1),
    [anon_sym_AMD] = ACTIONS(1),
    [anon_sym_0] = ACTIONS(1),
    [anon_sym_1] = ACTIONS(1),
    [anon_sym_DASH1] = ACTIONS(1),
    [anon_sym_BANGD] = ACTIONS(1),
    [anon_sym_DASHD] = ACTIONS(1),
    [anon_sym_D_PLUS1] = ACTIONS(1),
    [anon_sym_D_DASH1] = ACTIONS(1),
    [anon_sym_BANGA] = ACTIONS(1),
    [anon_sym_DASHA] = ACTIONS(1),
    [anon_sym_A_PLUS1] = ACTIONS(1),
    [anon_sym_A_DASH1] = ACTIONS(1),
    [anon_sym_BANGM] = ACTIONS(1),
    [anon_sym_DASHM] = ACTIONS(1),
    [anon_sym_M_PLUS1] = ACTIONS(1),
    [anon_sym_M_DASH1] = ACTIONS(1),
    [anon_sym_D_PLUSA] = ACTIONS(1),
    [anon_sym_D_DASHA] = ACTIONS(1),
    [anon_sym_A_DASHD] = ACTIONS(1),
    [anon_sym_D_AMPA] = ACTIONS(1),
    [anon_sym_D_PIPEA] = ACTIONS(1),
    [anon_sym_D_PLUSM] = ACTIONS(1),
    [anon_sym_D_DASHM] = ACTIONS(1),
    [anon_sym_M_DASHD] = ACTIONS(1),
    [anon_sym_D_AMPM] = ACTIONS(1),
    [anon_sym_D_PIPEM] = ACTIONS(1),
    [anon_sym_JGT] = ACTIONS(1),
    [anon_sym_JEQ] = ACTIONS(1),
    [anon_sym_JGE] = ACTIONS(1),
    [anon_sym_JLT] = ACTIONS(1),
    [anon_sym_JNE] = ACTIONS(1),
    [anon_sym_JLE] = ACTIONS(1),
    [anon_sym_JMP] = ACTIONS(1),
    [sym_comment] = ACTIONS(3),
  },
  [STATE(1)] = {
    [sym_source_file] = STATE(20),
    [sym__item] = STATE(2),
    [sym_a_instruction] = STATE(2),
    [sym_c_instruction] = STATE(2),
    [sym_label_declaration] = STATE(2),
    [sym_dest] = STATE(21),
    [sym_comp] = STATE(6),
    [aux_sym_source_file_repeat1] = STATE(2),
    [ts_builtin_sym_end] = ACTIONS(5),
    [anon_sym_AT] = ACTIONS(7),
    [anon_sym_LPAREN] = ACTIONS(9),
    [anon_sym_M] = ACTIONS(11),
    [anon_sym_D] = ACTIONS(11),
    [anon_sym_MD] = ACTIONS(13),
    [anon_sym_A] = ACTIONS(11),
    [anon_sym_AM] = ACTIONS(13),
    [anon_sym_AD] = ACTIONS(13),
    [anon_sym_AMD] = ACTIONS(13),
    [anon_sym_0] = ACTIONS(15),
    [anon_sym_1] = ACTIONS(15),
    [anon_sym_DASH1] = ACTIONS(15),
    [anon_sym_BANGD] = ACTIONS(15),
    [anon_sym_DASHD] = ACTIONS(15),
    [anon_sym_D_PLUS1] = ACTIONS(15),
    [anon_sym_D_DASH1] = ACTIONS(15),
    [anon_sym_BANGA] = ACTIONS(15),
    [anon_sym_DASHA] = ACTIONS(15),
    [anon_sym_A_PLUS1] = ACTIONS(15),
    [anon_sym_A_DASH1] = ACTIONS(15),
    [anon_sym_BANGM] = ACTIONS(15),
    [anon_sym_DASHM] = ACTIONS(15),
    [anon_sym_M_PLUS1] = ACTIONS(15),
    [anon_sym_M_DASH1] = ACTIONS(15),
    [anon_sym_D_PLUSA] = ACTIONS(15),
    [anon_sym_D_DASHA] = ACTIONS(15),
    [anon_sym_A_DASHD] = ACTIONS(15),
    [anon_sym_D_AMPA] = ACTIONS(15),
    [anon_sym_D_PIPEA] = ACTIONS(15),
    [anon_sym_D_PLUSM] = ACTIONS(15),
    [anon_sym_D_DASHM] = ACTIONS(15),
    [anon_sym_M_DASHD] = ACTIONS(15),
    [anon_sym_D_AMPM] = ACTIONS(15),
    [anon_sym_D_PIPEM] = ACTIONS(15),
    [sym_comment] = ACTIONS(17),
    [sym__whitespace] = ACTIONS(19),
  },
  [STATE(2)] = {
    [sym__item] = STATE(3),
    [sym_a_instruction] = STATE(3),
    [sym_c_instruction] = STATE(3),
    [sym_label_declaration] = STATE(3),
    [sym_dest] = STATE(21),
    [sym_comp] = STATE(6),
    [aux_sym_source_file_repeat1] = STATE(3),
    [ts_builtin_sym_end] = ACTIONS(21),
    [anon_sym_AT] = ACTIONS(7),
    [anon_sym_LPAREN] = ACTIONS(9),
    [anon_sym_M] = ACTIONS(11),
    [anon_sym_D] = ACTIONS(11),
    [anon_sym_MD] = ACTIONS(13),
    [anon_sym_A] = ACTIONS(11),
    [anon_sym_AM] = ACTIONS(13),
    [anon_sym_AD] = ACTIONS(13),
    [anon_sym_AMD] = ACTIONS(13),
    [anon_sym_0] = ACTIONS(15),
    [anon_sym_1] = ACTIONS(15),
    [anon_sym_DASH1] = ACTIONS(15),
    [anon_sym_BANGD] = ACTIONS(15),
    [anon_sym_DASHD] = ACTIONS(15),
    [anon_sym_D_PLUS1] = ACTIONS(15),
    [anon_sym_D_DASH1] = ACTIONS(15),
    [anon_sym_BANGA] = ACTIONS(15),
    [anon_sym_DASHA] = ACTIONS(15),
    [anon_sym_A_PLUS1] = ACTIONS(15),
    [anon_sym_A_DASH1] = ACTIONS(15),
    [anon_sym_BANGM] = ACTIONS(15),
    [anon_sym_DASHM] = ACTIONS(15),
    [anon_sym_M_PLUS1] = ACTIONS(15),
    [anon_sym_M_DASH1] = ACTIONS(15),
    [anon_sym_D_PLUSA] = ACTIONS(15),
    [anon_sym_D_DASHA] = ACTIONS(15),
    [anon_sym_A_DASHD] = ACTIONS(15),
    [anon_sym_D_AMPA] = ACTIONS(15),
    [anon_sym_D_PIPEA] = ACTIONS(15),
    [anon_sym_D_PLUSM] = ACTIONS(15),
    [anon_sym_D_DASHM] = ACTIONS(15),
    [anon_sym_M_DASHD] = ACTIONS(15),
    [anon_sym_D_AMPM] = ACTIONS(15),
    [anon_sym_D_PIPEM] = ACTIONS(15),
    [sym_comment] = ACTIONS(23),
    [sym__whitespace] = ACTIONS(25),
  },
  [STATE(3)] = {
    [sym__item] = STATE(3),
    [sym_a_instruction] = STATE(3),
    [sym_c_instruction] = STATE(3),
    [sym_label_declaration] = STATE(3),
    [sym_dest] = STATE(21),
    [sym_comp] = STATE(6),
    [aux_sym_source_file_repeat1] = STATE(3),
    [ts_builtin_sym_end] = ACTIONS(27),
    [anon_sym_AT] = ACTIONS(29),
    [anon_sym_LPAREN] = ACTIONS(32),
    [anon_sym_M] = ACTIONS(35),
    [anon_sym_D] = ACTIONS(35),
    [anon_sym_MD] = ACTIONS(38),
    [anon_sym_A] = ACTIONS(35),
    [anon_sym_AM] = ACTIONS(38),
    [anon_sym_AD] = ACTIONS(38),
    [anon_sym_AMD] = ACTIONS(38),
    [anon_sym_0] = ACTIONS(41),
    [anon_sym_1] = ACTIONS(41),
    [anon_sym_DASH1] = ACTIONS(41),
    [anon_sym_BANGD] = ACTIONS(41),
    [anon_sym_DASHD] = ACTIONS(41),
    [anon_sym_D_PLUS1] = ACTIONS(41),
    [anon_sym_D_DASH1] = ACTIONS(41),
    [anon_sym_BANGA] = ACTIONS(41),
    [anon_sym_DASHA] = ACTIONS(41),
    [anon_sym_A_PLUS1] = ACTIONS(41),
    [anon_sym_A_DASH1] = ACTIONS(41),
    [anon_sym_BANGM] = ACTIONS(41),
    [anon_sym_DASHM] = ACTIONS(41),
    [anon_sym_M_PLUS1] = ACTIONS(41),
    [anon_sym_M_DASH1] = ACTIONS(41),
    [anon_sym_D_PLUSA] = ACTIONS(41),
    [anon_sym_D_DASHA] = ACTIONS(41),
    [anon_sym_A_DASHD] = ACTIONS(41),
    [anon_sym_D_AMPA] = ACTIONS(41),
    [anon_sym_D_PIPEA] = ACTIONS(41),
    [anon_sym_D_PLUSM] = ACTIONS(41),
    [anon_sym_D_DASHM] = ACTIONS(41),
    [anon_sym_M_DASHD] = ACTIONS(41),
    [anon_sym_D_AMPM] = ACTIONS(41),
    [anon_sym_D_PIPEM] = ACTIONS(41),
    [sym_comment] = ACTIONS(44),
    [sym__whitespace] = ACTIONS(47),
  },
  [STATE(4)] = {
    [ts_builtin_sym_end] = ACTIONS(50),
    [anon_sym_AT] = ACTIONS(52),
    [anon_sym_EQ] = ACTIONS(54),
    [anon_sym_SEMI] = ACTIONS(52),
    [anon_sym_LPAREN] = ACTIONS(52),
    [anon_sym_M] = ACTIONS(52),
    [anon_sym_D] = ACTIONS(52),
    [anon_sym_MD] = ACTIONS(52),
    [anon_sym_A] = ACTIONS(52),
    [anon_sym_AM] = ACTIONS(52),
    [anon_sym_AD] = ACTIONS(52),
    [anon_sym_AMD] = ACTIONS(52),
    [anon_sym_0] = ACTIONS(52),
    [anon_sym_1] = ACTIONS(52),
    [anon_sym_DASH1] = ACTIONS(52),
    [anon_sym_BANGD] = ACTIONS(52),
    [anon_sym_DASHD] = ACTIONS(52),
    [anon_sym_D_PLUS1] = ACTIONS(52),
    [anon_sym_D_DASH1] = ACTIONS(52),
    [anon_sym_BANGA] = ACTIONS(52),
    [anon_sym_DASHA] = ACTIONS(52),
    [anon_sym_A_PLUS1] = ACTIONS(52),
    [anon_sym_A_DASH1] = ACTIONS(52),
    [anon_sym_BANGM] = ACTIONS(52),
    [anon_sym_DASHM] = ACTIONS(52),
    [anon_sym_M_PLUS1] = ACTIONS(52),
    [anon_sym_M_DASH1] = ACTIONS(52),
    [anon_sym_D_PLUSA] = ACTIONS(52),
    [anon_sym_D_DASHA] = ACTIONS(52),
    [anon_sym_A_DASHD] = ACTIONS(52),
    [anon_sym_D_AMPA] = ACTIONS(52),
    [anon_sym_D_PIPEA] = ACTIONS(52),
    [anon_sym_D_PLUSM] = ACTIONS(52),
    [anon_sym_D_DASHM] = ACTIONS(52),
    [anon_sym_M_DASHD] = ACTIONS(52),
    [anon_sym_D_AMPM] = ACTIONS(52),
    [anon_sym_D_PIPEM] = ACTIONS(52),
    [sym_comment] = ACTIONS(52),
    [sym__whitespace] = ACTIONS(50),
  },
  [STATE(5)] = {
    [ts_builtin_sym_end] = ACTIONS(50),
    [anon_sym_AT] = ACTIONS(52),
    [anon_sym_SEMI] = ACTIONS(52),
    [anon_sym_LPAREN] = ACTIONS(52),
    [anon_sym_M] = ACTIONS(52),
    [anon_sym_D] = ACTIONS(52),
    [anon_sym_MD] = ACTIONS(52),
    [anon_sym_A] = ACTIONS(52),
    [anon_sym_AM] = ACTIONS(52),
    [anon_sym_AD] = ACTIONS(52),
    [anon_sym_AMD] = ACTIONS(52),
    [anon_sym_0] = ACTIONS(52),
    [anon_sym_1] = ACTIONS(52),
    [anon_sym_DASH1] = ACTIONS(52),
    [anon_sym_BANGD] = ACTIONS(52),
    [anon_sym_DASHD] = ACTIONS(52),
    [anon_sym_D_PLUS1] = ACTIONS(52),
    [anon_sym_D_DASH1] = ACTIONS(52),
    [anon_sym_BANGA] = ACTIONS(52),
    [anon_sym_DASHA] = ACTIONS(52),
    [anon_sym_A_PLUS1] = ACTIONS(52),
    [anon_sym_A_DASH1] = ACTIONS(52),
    [anon_sym_BANGM] = ACTIONS(52),
    [anon_sym_DASHM] = ACTIONS(52),
    [anon_sym_M_PLUS1] = ACTIONS(52),
    [anon_sym_M_DASH1] = ACTIONS(52),
    [anon_sym_D_PLUSA] = ACTIONS(52),
    [anon_sym_D_DASHA] = ACTIONS(52),
    [anon_sym_A_DASHD] = ACTIONS(52),
    [anon_sym_D_AMPA] = ACTIONS(52),
    [anon_sym_D_PIPEA] = ACTIONS(52),
    [anon_sym_D_PLUSM] = ACTIONS(52),
    [anon_sym_D_DASHM] = ACTIONS(52),
    [anon_sym_M_DASHD] = ACTIONS(52),
    [anon_sym_D_AMPM] = ACTIONS(52),
    [anon_sym_D_PIPEM] = ACTIONS(52),
    [sym_comment] = ACTIONS(52),
    [sym__whitespace] = ACTIONS(50),
  },
  [STATE(6)] = {
    [ts_builtin_sym_end] = ACTIONS(56),
    [anon_sym_AT] = ACTIONS(58),
    [anon_sym_SEMI] = ACTIONS(60),
    [anon_sym_LPAREN] = ACTIONS(58),
    [anon_sym_M] = ACTIONS(58),
    [anon_sym_D] = ACTIONS(58),
    [anon_sym_MD] = ACTIONS(58),
    [anon_sym_A] = ACTIONS(58),
    [anon_sym_AM] = ACTIONS(58),
    [anon_sym_AD] = ACTIONS(58),
    [anon_sym_AMD] = ACTIONS(58),
    [anon_sym_0] = ACTIONS(58),
    [anon_sym_1] = ACTIONS(58),
    [anon_sym_DASH1] = ACTIONS(58),
    [anon_sym_BANGD] = ACTIONS(58),
    [anon_sym_DASHD] = ACTIONS(58),
    [anon_sym_D_PLUS1] = ACTIONS(58),
    [anon_sym_D_DASH1] = ACTIONS(58),
    [anon_sym_BANGA] = ACTIONS(58),
    [anon_sym_DASHA] = ACTIONS(58),
    [anon_sym_A_PLUS1] = ACTIONS(58),
    [anon_sym_A_DASH1] = ACTIONS(58),
    [anon_sym_BANGM] = ACTIONS(58),
    [anon_sym_DASHM] = ACTIONS(58),
    [anon_sym_M_PLUS1] = ACTIONS(58),
    [anon_sym_M_DASH1] = ACTIONS(58),
    [anon_sym_D_PLUSA] = ACTIONS(58),
    [anon_sym_D_DASHA] = ACTIONS(58),
    [anon_sym_A_DASHD] = ACTIONS(58),
    [anon_sym_D_AMPA] = ACTIONS(58),
    [anon_sym_D_PIPEA] = ACTIONS(58),
    [anon_sym_D_PLUSM] = ACTIONS(58),
    [anon_sym_D_DASHM] = ACTIONS(58),
    [anon_sym_M_DASHD] = ACTIONS(58),
    [anon_sym_D_AMPM] = ACTIONS(58),
    [anon_sym_D_PIPEM] = ACTIONS(58),
    [sym_comment] = ACTIONS(58),
    [sym__whitespace] = ACTIONS(56),
  },
  [STATE(7)] = {
    [ts_builtin_sym_end] = ACTIONS(62),
    [anon_sym_AT] = ACTIONS(64),
    [anon_sym_SEMI] = ACTIONS(66),
    [anon_sym_LPAREN] = ACTIONS(64),
    [anon_sym_M] = ACTIONS(64),
    [anon_sym_D] = ACTIONS(64),
    [anon_sym_MD] = ACTIONS(64),
    [anon_sym_A] = ACTIONS(64),
    [anon_sym_AM] = ACTIONS(64),
    [anon_sym_AD] = ACTIONS(64),
    [anon_sym_AMD] = ACTIONS(64),
    [anon_sym_0] = ACTIONS(64),
    [anon_sym_1] = ACTIONS(64),
    [anon_sym_DASH1] = ACTIONS(64),
    [anon_sym_BANGD] = ACTIONS(64),
    [anon_sym_DASHD] = ACTIONS(64),
    [anon_sym_D_PLUS1] = ACTIONS(64),
    [anon_sym_D_DASH1] = ACTIONS(64),
    [anon_sym_BANGA] = ACTIONS(64),
    [anon_sym_DASHA] = ACTIONS(64),
    [anon_sym_A_PLUS1] = ACTIONS(64),
    [anon_sym_A_DASH1] = ACTIONS(64),
    [anon_sym_BANGM] = ACTIONS(64),
    [anon_sym_DASHM] = ACTIONS(64),
    [anon_sym_M_PLUS1] = ACTIONS(64),
    [anon_sym_M_DASH1] = ACTIONS(64),
    [anon_sym_D_PLUSA] = ACTIONS(64),
    [anon_sym_D_DASHA] = ACTIONS(64),
    [anon_sym_A_DASHD] = ACTIONS(64),
    [anon_sym_D_AMPA] = ACTIONS(64),
    [anon_sym_D_PIPEA] = ACTIONS(64),
    [anon_sym_D_PLUSM] = ACTIONS(64),
    [anon_sym_D_DASHM] = ACTIONS(64),
    [anon_sym_M_DASHD] = ACTIONS(64),
    [anon_sym_D_AMPM] = ACTIONS(64),
    [anon_sym_D_PIPEM] = ACTIONS(64),
    [sym_comment] = ACTIONS(64),
    [sym__whitespace] = ACTIONS(62),
  },
  [STATE(8)] = {
    [ts_builtin_sym_end] = ACTIONS(68),
    [anon_sym_AT] = ACTIONS(70),
    [anon_sym_LPAREN] = ACTIONS(70),
    [anon_sym_M] = ACTIONS(70),
    [anon_sym_D] = ACTIONS(70),
    [anon_sym_MD] = ACTIONS(70),
    [anon_sym_A] = ACTIONS(70),
    [anon_sym_AM] = ACTIONS(70),
    [anon_sym_AD] = ACTIONS(70),
    [anon_sym_AMD] = ACTIONS(70),
    [anon_sym_0] = ACTIONS(70),
    [anon_sym_1] = ACTIONS(70),
    [anon_sym_DASH1] = ACTIONS(70),
    [anon_sym_BANGD] = ACTIONS(70),
    [anon_sym_DASHD] = ACTIONS(70),
    [anon_sym_D_PLUS1] = ACTIONS(70),
    [anon_sym_D_DASH1] = ACTIONS(70),
    [anon_sym_BANGA] = ACTIONS(70),
    [anon_sym_DASHA] = ACTIONS(70),
    [anon_sym_A_PLUS1] = ACTIONS(70),
    [anon_sym_A_DASH1] = ACTIONS(70),
    [anon_sym_BANGM] = ACTIONS(70),
    [anon_sym_DASHM] = ACTIONS(70),
    [anon_sym_M_PLUS1] = ACTIONS(70),
    [anon_sym_M_DASH1] = ACTIONS(70),
    [anon_sym_D_PLUSA] = ACTIONS(70),
    [anon_sym_D_DASHA] = ACTIONS(70),
    [anon_sym_A_DASHD] = ACTIONS(70),
    [anon_sym_D_AMPA] = ACTIONS(70),
    [anon_sym_D_PIPEA] = ACTIONS(70),
    [anon_sym_D_PLUSM] = ACTIONS(70),
    [anon_sym_D_DASHM] = ACTIONS(70),
    [anon_sym_M_DASHD] = ACTIONS(70),
    [anon_sym_D_AMPM] = ACTIONS(70),
    [anon_sym_D_PIPEM] = ACTIONS(70),
    [sym_comment] = ACTIONS(70),
    [sym__whitespace] = ACTIONS(68),
  },
  [STATE(9)] = {
    [ts_builtin_sym_end] = ACTIONS(72),
    [anon_sym_AT] = ACTIONS(74),
    [anon_sym_LPAREN] = ACTIONS(74),
    [anon_sym_M] = ACTIONS(74),
    [anon_sym_D] = ACTIONS(74),
    [anon_sym_MD] = ACTIONS(74),
    [anon_sym_A] = ACTIONS(74),
    [anon_sym_AM] = ACTIONS(74),
    [anon_sym_AD] = ACTIONS(74),
    [anon_sym_AMD] = ACTIONS(74),
    [anon_sym_0] = ACTIONS(74),
    [anon_sym_1] = ACTIONS(74),
    [anon_sym_DASH1] = ACTIONS(74),
    [anon_sym_BANGD] = ACTIONS(74),
    [anon_sym_DASHD] = ACTIONS(74),
    [anon_sym_D_PLUS1] = ACTIONS(74),
    [anon_sym_D_DASH1] = ACTIONS(74),
    [anon_sym_BANGA] = ACTIONS(74),
    [anon_sym_DASHA] = ACTIONS(74),
    [anon_sym_A_PLUS1] = ACTIONS(74),
    [anon_sym_A_DASH1] = ACTIONS(74),
    [anon_sym_BANGM] = ACTIONS(74),
    [anon_sym_DASHM] = ACTIONS(74),
    [anon_sym_M_PLUS1] = ACTIONS(74),
    [anon_sym_M_DASH1] = ACTIONS(74),
    [anon_sym_D_PLUSA] = ACTIONS(74),
    [anon_sym_D_DASHA] = ACTIONS(74),
    [anon_sym_A_DASHD] = ACTIONS(74),
    [anon_sym_D_AMPA] = ACTIONS(74),
    [anon_sym_D_PIPEA] = ACTIONS(74),
    [anon_sym_D_PLUSM] = ACTIONS(74),
    [anon_sym_D_DASHM] = ACTIONS(74),
    [anon_sym_M_DASHD] = ACTIONS(74),
    [anon_sym_D_AMPM] = ACTIONS(74),
    [anon_sym_D_PIPEM] = ACTIONS(74),
    [sym_comment] = ACTIONS(74),
    [sym__whitespace] = ACTIONS(72),
  },
  [STATE(10)] = {
    [ts_builtin_sym_end] = ACTIONS(76),
    [anon_sym_AT] = ACTIONS(78),
    [anon_sym_LPAREN] = ACTIONS(78),
    [anon_sym_M] = ACTIONS(78),
    [anon_sym_D] = ACTIONS(78),
    [anon_sym_MD] = ACTIONS(78),
    [anon_sym_A] = ACTIONS(78),
    [anon_sym_AM] = ACTIONS(78),
    [anon_sym_AD] = ACTIONS(78),
    [anon_sym_AMD] = ACTIONS(78),
    [anon_sym_0] = ACTIONS(78),
    [anon_sym_1] = ACTIONS(78),
    [anon_sym_DASH1] = ACTIONS(78),
    [anon_sym_BANGD] = ACTIONS(78),
    [anon_sym_DASHD] = ACTIONS(78),
    [anon_sym_D_PLUS1] = ACTIONS(78),
    [anon_sym_D_DASH1] = ACTIONS(78),
    [anon_sym_BANGA] = ACTIONS(78),
    [anon_sym_DASHA] = ACTIONS(78),
    [anon_sym_A_PLUS1] = ACTIONS(78),
    [anon_sym_A_DASH1] = ACTIONS(78),
    [anon_sym_BANGM] = ACTIONS(78),
    [anon_sym_DASHM] = ACTIONS(78),
    [anon_sym_M_PLUS1] = ACTIONS(78),
    [anon_sym_M_DASH1] = ACTIONS(78),
    [anon_sym_D_PLUSA] = ACTIONS(78),
    [anon_sym_D_DASHA] = ACTIONS(78),
    [anon_sym_A_DASHD] = ACTIONS(78),
    [anon_sym_D_AMPA] = ACTIONS(78),
    [anon_sym_D_PIPEA] = ACTIONS(78),
    [anon_sym_D_PLUSM] = ACTIONS(78),
    [anon_sym_D_DASHM] = ACTIONS(78),
    [anon_sym_M_DASHD] = ACTIONS(78),
    [anon_sym_D_AMPM] = ACTIONS(78),
    [anon_sym_D_PIPEM] = ACTIONS(78),
    [sym_comment] = ACTIONS(78),
    [sym__whitespace] = ACTIONS(76),
  },
  [STATE(11)] = {
    [ts_builtin_sym_end] = ACTIONS(80),
    [anon_sym_AT] = ACTIONS(82),
    [anon_sym_LPAREN] = ACTIONS(82),
    [anon_sym_M] = ACTIONS(82),
    [anon_sym_D] = ACTIONS(82),
    [anon_sym_MD] = ACTIONS(82),
    [anon_sym_A] = ACTIONS(82),
    [anon_sym_AM] = ACTIONS(82),
    [anon_sym_AD] = ACTIONS(82),
    [anon_sym_AMD] = ACTIONS(82),
    [anon_sym_0] = ACTIONS(82),
    [anon_sym_1] = ACTIONS(82),
    [anon_sym_DASH1] = ACTIONS(82),
    [anon_sym_BANGD] = ACTIONS(82),
    [anon_sym_DASHD] = ACTIONS(82),
    [anon_sym_D_PLUS1] = ACTIONS(82),
    [anon_sym_D_DASH1] = ACTIONS(82),
    [anon_sym_BANGA] = ACTIONS(82),
    [anon_sym_DASHA] = ACTIONS(82),
    [anon_sym_A_PLUS1] = ACTIONS(82),
    [anon_sym_A_DASH1] = ACTIONS(82),
    [anon_sym_BANGM] = ACTIONS(82),
    [anon_sym_DASHM] = ACTIONS(82),
    [anon_sym_M_PLUS1] = ACTIONS(82),
    [anon_sym_M_DASH1] = ACTIONS(82),
    [anon_sym_D_PLUSA] = ACTIONS(82),
    [anon_sym_D_DASHA] = ACTIONS(82),
    [anon_sym_A_DASHD] = ACTIONS(82),
    [anon_sym_D_AMPA] = ACTIONS(82),
    [anon_sym_D_PIPEA] = ACTIONS(82),
    [anon_sym_D_PLUSM] = ACTIONS(82),
    [anon_sym_D_DASHM] = ACTIONS(82),
    [anon_sym_M_DASHD] = ACTIONS(82),
    [anon_sym_D_AMPM] = ACTIONS(82),
    [anon_sym_D_PIPEM] = ACTIONS(82),
    [sym_comment] = ACTIONS(82),
    [sym__whitespace] = ACTIONS(80),
  },
  [STATE(12)] = {
    [ts_builtin_sym_end] = ACTIONS(84),
    [anon_sym_AT] = ACTIONS(86),
    [anon_sym_LPAREN] = ACTIONS(86),
    [anon_sym_M] = ACTIONS(86),
    [anon_sym_D] = ACTIONS(86),
    [anon_sym_MD] = ACTIONS(86),
    [anon_sym_A] = ACTIONS(86),
    [anon_sym_AM] = ACTIONS(86),
    [anon_sym_AD] = ACTIONS(86),
    [anon_sym_AMD] = ACTIONS(86),
    [anon_sym_0] = ACTIONS(86),
    [anon_sym_1] = ACTIONS(86),
    [anon_sym_DASH1] = ACTIONS(86),
    [anon_sym_BANGD] = ACTIONS(86),
    [anon_sym_DASHD] = ACTIONS(86),
    [anon_sym_D_PLUS1] = ACTIONS(86),
    [anon_sym_D_DASH1] = ACTIONS(86),
    [anon_sym_BANGA] = ACTIONS(86),
    [anon_sym_DASHA] = ACTIONS(86),
    [anon_sym_A_PLUS1] = ACTIONS(86),
    [anon_sym_A_DASH1] = ACTIONS(86),
    [anon_sym_BANGM] = ACTIONS(86),
    [anon_sym_DASHM] = ACTIONS(86),
    [anon_sym_M_PLUS1] = ACTIONS(86),
    [anon_sym_M_DASH1] = ACTIONS(86),
    [anon_sym_D_PLUSA] = ACTIONS(86),
    [anon_sym_D_DASHA] = ACTIONS(86),
    [anon_sym_A_DASHD] = ACTIONS(86),
    [anon_sym_D_AMPA] = ACTIONS(86),
    [anon_sym_D_PIPEA] = ACTIONS(86),
    [anon_sym_D_PLUSM] = ACTIONS(86),
    [anon_sym_D_DASHM] = ACTIONS(86),
    [anon_sym_M_DASHD] = ACTIONS(86),
    [anon_sym_D_AMPM] = ACTIONS(86),
    [anon_sym_D_PIPEM] = ACTIONS(86),
    [sym_comment] = ACTIONS(86),
    [sym__whitespace] = ACTIONS(84),
  },
  [STATE(13)] = {
    [ts_builtin_sym_end] = ACTIONS(88),
    [anon_sym_AT] = ACTIONS(90),
    [anon_sym_LPAREN] = ACTIONS(90),
    [anon_sym_M] = ACTIONS(90),
    [anon_sym_D] = ACTIONS(90),
    [anon_sym_MD] = ACTIONS(90),
    [anon_sym_A] = ACTIONS(90),
    [anon_sym_AM] = ACTIONS(90),
    [anon_sym_AD] = ACTIONS(90),
    [anon_sym_AMD] = ACTIONS(90),
    [anon_sym_0] = ACTIONS(90),
    [anon_sym_1] = ACTIONS(90),
    [anon_sym_DASH1] = ACTIONS(90),
    [anon_sym_BANGD] = ACTIONS(90),
    [anon_sym_DASHD] = ACTIONS(90),
    [anon_sym_D_PLUS1] = ACTIONS(90),
    [anon_sym_D_DASH1] = ACTIONS(90),
    [anon_sym_BANGA] = ACTIONS(90),
    [anon_sym_DASHA] = ACTIONS(90),
    [anon_sym_A_PLUS1] = ACTIONS(90),
    [anon_sym_A_DASH1] = ACTIONS(90),
    [anon_sym_BANGM] = ACTIONS(90),
    [anon_sym_DASHM] = ACTIONS(90),
    [anon_sym_M_PLUS1] = ACTIONS(90),
    [anon_sym_M_DASH1] = ACTIONS(90),
    [anon_sym_D_PLUSA] = ACTIONS(90),
    [anon_sym_D_DASHA] = ACTIONS(90),
    [anon_sym_A_DASHD] = ACTIONS(90),
    [anon_sym_D_AMPA] = ACTIONS(90),
    [anon_sym_D_PIPEA] = ACTIONS(90),
    [anon_sym_D_PLUSM] = ACTIONS(90),
    [anon_sym_D_DASHM] = ACTIONS(90),
    [anon_sym_M_DASHD] = ACTIONS(90),
    [anon_sym_D_AMPM] = ACTIONS(90),
    [anon_sym_D_PIPEM] = ACTIONS(90),
    [sym_comment] = ACTIONS(90),
    [sym__whitespace] = ACTIONS(88),
  },
  [STATE(14)] = {
    [ts_builtin_sym_end] = ACTIONS(62),
    [anon_sym_AT] = ACTIONS(64),
    [anon_sym_LPAREN] = ACTIONS(64),
    [anon_sym_M] = ACTIONS(64),
    [anon_sym_D] = ACTIONS(64),
    [anon_sym_MD] = ACTIONS(64),
    [anon_sym_A] = ACTIONS(64),
    [anon_sym_AM] = ACTIONS(64),
    [anon_sym_AD] = ACTIONS(64),
    [anon_sym_AMD] = ACTIONS(64),
    [anon_sym_0] = ACTIONS(64),
    [anon_sym_1] = ACTIONS(64),
    [anon_sym_DASH1] = ACTIONS(64),
    [anon_sym_BANGD] = ACTIONS(64),
    [anon_sym_DASHD] = ACTIONS(64),
    [anon_sym_D_PLUS1] = ACTIONS(64),
    [anon_sym_D_DASH1] = ACTIONS(64),
    [anon_sym_BANGA] = ACTIONS(64),
    [anon_sym_DASHA] = ACTIONS(64),
    [anon_sym_A_PLUS1] = ACTIONS(64),
    [anon_sym_A_DASH1] = ACTIONS(64),
    [anon_sym_BANGM] = ACTIONS(64),
    [anon_sym_DASHM] = ACTIONS(64),
    [anon_sym_M_PLUS1] = ACTIONS(64),
    [anon_sym_M_DASH1] = ACTIONS(64),
    [anon_sym_D_PLUSA] = ACTIONS(64),
    [anon_sym_D_DASHA] = ACTIONS(64),
    [anon_sym_A_DASHD] = ACTIONS(64),
    [anon_sym_D_AMPA] = ACTIONS(64),
    [anon_sym_D_PIPEA] = ACTIONS(64),
    [anon_sym_D_PLUSM] = ACTIONS(64),
    [anon_sym_D_DASHM] = ACTIONS(64),
    [anon_sym_M_DASHD] = ACTIONS(64),
    [anon_sym_D_AMPM] = ACTIONS(64),
    [anon_sym_D_PIPEM] = ACTIONS(64),
    [sym_comment] = ACTIONS(64),
    [sym__whitespace] = ACTIONS(62),
  },
};

static const uint16_t ts_small_parse_table[] = {
  [0] = 4,
    ACTIONS(3), 1,
      sym_comment,
    STATE(7), 1,
      sym_comp,
    ACTIONS(15), 3,
      anon_sym_M,
      anon_sym_D,
      anon_sym_A,
    ACTIONS(92), 25,
      anon_sym_0,
      anon_sym_1,
      anon_sym_DASH1,
      anon_sym_BANGD,
      anon_sym_DASHD,
      anon_sym_D_PLUS1,
      anon_sym_D_DASH1,
      anon_sym_BANGA,
      anon_sym_DASHA,
      anon_sym_A_PLUS1,
      anon_sym_A_DASH1,
      anon_sym_BANGM,
      anon_sym_DASHM,
      anon_sym_M_PLUS1,
      anon_sym_M_DASH1,
      anon_sym_D_PLUSA,
      anon_sym_D_DASHA,
      anon_sym_A_DASHD,
      anon_sym_D_AMPA,
      anon_sym_D_PIPEA,
      anon_sym_D_PLUSM,
      anon_sym_D_DASHM,
      anon_sym_M_DASHD,
      anon_sym_D_AMPM,
      anon_sym_D_PIPEM,
  [39] = 6,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(94), 1,
      sym_constant,
    ACTIONS(98), 1,
      sym_user_symbol,
    STATE(9), 1,
      sym_symbol,
    STATE(12), 1,
      sym_predefined_symbol,
    ACTIONS(96), 8,
      aux_sym_predefined_symbol_token1,
      anon_sym_SP,
      anon_sym_LCL,
      anon_sym_ARG,
      anon_sym_THIS,
      anon_sym_THAT,
      anon_sym_SCREEN,
      anon_sym_KBD,
  [65] = 5,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(102), 1,
      sym_user_symbol,
    STATE(23), 1,
      sym_symbol,
    STATE(25), 1,
      sym_predefined_symbol,
    ACTIONS(100), 8,
      aux_sym_predefined_symbol_token1,
      anon_sym_SP,
      anon_sym_LCL,
      anon_sym_ARG,
      anon_sym_THIS,
      anon_sym_THAT,
      anon_sym_SCREEN,
      anon_sym_KBD,
  [88] = 3,
    ACTIONS(3), 1,
      sym_comment,
    STATE(14), 1,
      sym_jump,
    ACTIONS(104), 7,
      anon_sym_JGT,
      anon_sym_JEQ,
      anon_sym_JGE,
      anon_sym_JLT,
      anon_sym_JNE,
      anon_sym_JLE,
      anon_sym_JMP,
  [104] = 3,
    ACTIONS(3), 1,
      sym_comment,
    STATE(11), 1,
      sym_jump,
    ACTIONS(104), 7,
      anon_sym_JGT,
      anon_sym_JEQ,
      anon_sym_JGE,
      anon_sym_JLT,
      anon_sym_JNE,
      anon_sym_JLE,
      anon_sym_JMP,
  [120] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(106), 1,
      ts_builtin_sym_end,
  [127] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(108), 1,
      anon_sym_EQ,
  [134] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(110), 1,
      anon_sym_EQ,
  [141] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(112), 1,
      anon_sym_RPAREN,
  [148] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(68), 1,
      anon_sym_RPAREN,
  [155] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(84), 1,
      anon_sym_RPAREN,
};

static const uint32_t ts_small_parse_table_map[] = {
  [SMALL_STATE(15)] = 0,
  [SMALL_STATE(16)] = 39,
  [SMALL_STATE(17)] = 65,
  [SMALL_STATE(18)] = 88,
  [SMALL_STATE(19)] = 104,
  [SMALL_STATE(20)] = 120,
  [SMALL_STATE(21)] = 127,
  [SMALL_STATE(22)] = 134,
  [SMALL_STATE(23)] = 141,
  [SMALL_STATE(24)] = 148,
  [SMALL_STATE(25)] = 155,
};

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(16),
  [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(17),
  [11] = {.entry = {.count = 1, .reusable = false}}, SHIFT(4),
  [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(22),
  [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(5),
  [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(2),
  [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2),
  [21] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0),
  [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(3),
  [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3),
  [27] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0),
  [29] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(16),
  [32] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(17),
  [35] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(4),
  [38] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(22),
  [41] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(5),
  [44] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(3),
  [47] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(3),
  [50] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comp, 1, 0, 0),
  [52] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_comp, 1, 0, 0),
  [54] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_dest, 1, 0, 0),
  [56] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_c_instruction, 1, 0, 0),
  [58] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_c_instruction, 1, 0, 0),
  [60] = {.entry = {.count = 1, .reusable = false}}, SHIFT(18),
  [62] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_c_instruction, 3, 0, 0),
  [64] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_c_instruction, 3, 0, 0),
  [66] = {.entry = {.count = 1, .reusable = false}}, SHIFT(19),
  [68] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_predefined_symbol, 1, 0, 0),
  [70] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_predefined_symbol, 1, 0, 0),
  [72] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_a_instruction, 2, 0, 0),
  [74] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_a_instruction, 2, 0, 0),
  [76] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_jump, 1, 0, 0),
  [78] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_jump, 1, 0, 0),
  [80] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_c_instruction, 5, 0, 0),
  [82] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_c_instruction, 5, 0, 0),
  [84] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_symbol, 1, 0, 0),
  [86] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_symbol, 1, 0, 0),
  [88] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_label_declaration, 3, 0, 0),
  [90] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_label_declaration, 3, 0, 0),
  [92] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5),
  [94] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9),
  [96] = {.entry = {.count = 1, .reusable = false}}, SHIFT(8),
  [98] = {.entry = {.count = 1, .reusable = false}}, SHIFT(12),
  [100] = {.entry = {.count = 1, .reusable = false}}, SHIFT(24),
  [102] = {.entry = {.count = 1, .reusable = false}}, SHIFT(25),
  [104] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10),
  [106] = {.entry = {.count = 1, .reusable = true}},  ACCEPT_INPUT(),
  [108] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15),
  [110] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dest, 1, 0, 0),
  [112] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13),
};

#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_hack_assembly(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 = "hack_assembly",
    .max_reserved_word_set_size = 0,
    .metadata = {
      .major_version = 1,
      .minor_version = 0,
      .patch_version = 0,
    },
  };
  return &language;
}
#ifdef __cplusplus
}
#endif
