/* 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 59
#define LARGE_STATE_COUNT 8
#define SYMBOL_COUNT 59
#define ALIAS_COUNT 0
#define TOKEN_COUNT 34
#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_load = 1,
  anon_sym_COMMA = 2,
  anon_sym_output_DASHfile = 3,
  anon_sym_compare_DASHto = 4,
  anon_sym_output_DASHlist = 5,
  anon_sym_SEMI = 6,
  anon_sym_output = 7,
  anon_sym_tick = 8,
  anon_sym_tock = 9,
  anon_sym_ticktock = 10,
  anon_sym_eval = 11,
  anon_sym_set = 12,
  anon_sym_repeat = 13,
  anon_sym_LBRACE = 14,
  anon_sym_RBRACE = 15,
  anon_sym_while = 16,
  anon_sym_echo = 17,
  anon_sym_RAM = 18,
  anon_sym_LBRACK = 19,
  anon_sym_RBRACK = 20,
  anon_sym_DRegister_LBRACK_RBRACK = 21,
  anon_sym_ARegister_LBRACK_RBRACK = 22,
  anon_sym_PC_LBRACK_RBRACK = 23,
  aux_sym_register_reference_token1 = 24,
  sym_pin_reference = 25,
  sym_format_spec = 26,
  sym_binary_value = 27,
  aux_sym_number_token1 = 28,
  sym_filename = 29,
  sym_string = 30,
  sym_condition = 31,
  sym_comment = 32,
  sym__whitespace = 33,
  sym_source_file = 34,
  sym__item = 35,
  sym_command = 36,
  sym_load_command = 37,
  sym_output_file_command = 38,
  sym_compare_to_command = 39,
  sym_output_list_command = 40,
  sym_output_command = 41,
  sym_tick_command = 42,
  sym_tock_command = 43,
  sym_ticktock_command = 44,
  sym_eval_command = 45,
  sym_set_command = 46,
  sym_repeat_command = 47,
  sym_while_command = 48,
  sym_echo_command = 49,
  sym_variable_reference = 50,
  sym_memory_reference = 51,
  sym_register_reference = 52,
  sym_output_spec = 53,
  sym_value = 54,
  sym_number = 55,
  sym_index = 56,
  aux_sym_source_file_repeat1 = 57,
  aux_sym_output_list_command_repeat1 = 58,
};

static const char * const ts_symbol_names[] = {
  [ts_builtin_sym_end] = "end",
  [anon_sym_load] = "load",
  [anon_sym_COMMA] = ",",
  [anon_sym_output_DASHfile] = "output-file",
  [anon_sym_compare_DASHto] = "compare-to",
  [anon_sym_output_DASHlist] = "output-list",
  [anon_sym_SEMI] = ";",
  [anon_sym_output] = "output",
  [anon_sym_tick] = "tick",
  [anon_sym_tock] = "tock",
  [anon_sym_ticktock] = "ticktock",
  [anon_sym_eval] = "eval",
  [anon_sym_set] = "set",
  [anon_sym_repeat] = "repeat",
  [anon_sym_LBRACE] = "{",
  [anon_sym_RBRACE] = "}",
  [anon_sym_while] = "while",
  [anon_sym_echo] = "echo",
  [anon_sym_RAM] = "RAM",
  [anon_sym_LBRACK] = "[",
  [anon_sym_RBRACK] = "]",
  [anon_sym_DRegister_LBRACK_RBRACK] = "DRegister[]",
  [anon_sym_ARegister_LBRACK_RBRACK] = "ARegister[]",
  [anon_sym_PC_LBRACK_RBRACK] = "PC[]",
  [aux_sym_register_reference_token1] = "register_reference_token1",
  [sym_pin_reference] = "pin_reference",
  [sym_format_spec] = "format_spec",
  [sym_binary_value] = "binary_value",
  [aux_sym_number_token1] = "number_token1",
  [sym_filename] = "filename",
  [sym_string] = "string",
  [sym_condition] = "condition",
  [sym_comment] = "comment",
  [sym__whitespace] = "_whitespace",
  [sym_source_file] = "source_file",
  [sym__item] = "_item",
  [sym_command] = "command",
  [sym_load_command] = "load_command",
  [sym_output_file_command] = "output_file_command",
  [sym_compare_to_command] = "compare_to_command",
  [sym_output_list_command] = "output_list_command",
  [sym_output_command] = "output_command",
  [sym_tick_command] = "tick_command",
  [sym_tock_command] = "tock_command",
  [sym_ticktock_command] = "ticktock_command",
  [sym_eval_command] = "eval_command",
  [sym_set_command] = "set_command",
  [sym_repeat_command] = "repeat_command",
  [sym_while_command] = "while_command",
  [sym_echo_command] = "echo_command",
  [sym_variable_reference] = "variable_reference",
  [sym_memory_reference] = "memory_reference",
  [sym_register_reference] = "register_reference",
  [sym_output_spec] = "output_spec",
  [sym_value] = "value",
  [sym_number] = "number",
  [sym_index] = "index",
  [aux_sym_source_file_repeat1] = "source_file_repeat1",
  [aux_sym_output_list_command_repeat1] = "output_list_command_repeat1",
};

static const TSSymbol ts_symbol_map[] = {
  [ts_builtin_sym_end] = ts_builtin_sym_end,
  [anon_sym_load] = anon_sym_load,
  [anon_sym_COMMA] = anon_sym_COMMA,
  [anon_sym_output_DASHfile] = anon_sym_output_DASHfile,
  [anon_sym_compare_DASHto] = anon_sym_compare_DASHto,
  [anon_sym_output_DASHlist] = anon_sym_output_DASHlist,
  [anon_sym_SEMI] = anon_sym_SEMI,
  [anon_sym_output] = anon_sym_output,
  [anon_sym_tick] = anon_sym_tick,
  [anon_sym_tock] = anon_sym_tock,
  [anon_sym_ticktock] = anon_sym_ticktock,
  [anon_sym_eval] = anon_sym_eval,
  [anon_sym_set] = anon_sym_set,
  [anon_sym_repeat] = anon_sym_repeat,
  [anon_sym_LBRACE] = anon_sym_LBRACE,
  [anon_sym_RBRACE] = anon_sym_RBRACE,
  [anon_sym_while] = anon_sym_while,
  [anon_sym_echo] = anon_sym_echo,
  [anon_sym_RAM] = anon_sym_RAM,
  [anon_sym_LBRACK] = anon_sym_LBRACK,
  [anon_sym_RBRACK] = anon_sym_RBRACK,
  [anon_sym_DRegister_LBRACK_RBRACK] = anon_sym_DRegister_LBRACK_RBRACK,
  [anon_sym_ARegister_LBRACK_RBRACK] = anon_sym_ARegister_LBRACK_RBRACK,
  [anon_sym_PC_LBRACK_RBRACK] = anon_sym_PC_LBRACK_RBRACK,
  [aux_sym_register_reference_token1] = aux_sym_register_reference_token1,
  [sym_pin_reference] = sym_pin_reference,
  [sym_format_spec] = sym_format_spec,
  [sym_binary_value] = sym_binary_value,
  [aux_sym_number_token1] = aux_sym_number_token1,
  [sym_filename] = sym_filename,
  [sym_string] = sym_string,
  [sym_condition] = sym_condition,
  [sym_comment] = sym_comment,
  [sym__whitespace] = sym__whitespace,
  [sym_source_file] = sym_source_file,
  [sym__item] = sym__item,
  [sym_command] = sym_command,
  [sym_load_command] = sym_load_command,
  [sym_output_file_command] = sym_output_file_command,
  [sym_compare_to_command] = sym_compare_to_command,
  [sym_output_list_command] = sym_output_list_command,
  [sym_output_command] = sym_output_command,
  [sym_tick_command] = sym_tick_command,
  [sym_tock_command] = sym_tock_command,
  [sym_ticktock_command] = sym_ticktock_command,
  [sym_eval_command] = sym_eval_command,
  [sym_set_command] = sym_set_command,
  [sym_repeat_command] = sym_repeat_command,
  [sym_while_command] = sym_while_command,
  [sym_echo_command] = sym_echo_command,
  [sym_variable_reference] = sym_variable_reference,
  [sym_memory_reference] = sym_memory_reference,
  [sym_register_reference] = sym_register_reference,
  [sym_output_spec] = sym_output_spec,
  [sym_value] = sym_value,
  [sym_number] = sym_number,
  [sym_index] = sym_index,
  [aux_sym_source_file_repeat1] = aux_sym_source_file_repeat1,
  [aux_sym_output_list_command_repeat1] = aux_sym_output_list_command_repeat1,
};

static const TSSymbolMetadata ts_symbol_metadata[] = {
  [ts_builtin_sym_end] = {
    .visible = false,
    .named = true,
  },
  [anon_sym_load] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_COMMA] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_output_DASHfile] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_compare_DASHto] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_output_DASHlist] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_SEMI] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_output] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_tick] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_tock] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_ticktock] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_eval] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_set] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_repeat] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_LBRACE] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_RBRACE] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_while] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_echo] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_RAM] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_LBRACK] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_RBRACK] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_DRegister_LBRACK_RBRACK] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_ARegister_LBRACK_RBRACK] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_PC_LBRACK_RBRACK] = {
    .visible = true,
    .named = false,
  },
  [aux_sym_register_reference_token1] = {
    .visible = false,
    .named = false,
  },
  [sym_pin_reference] = {
    .visible = true,
    .named = true,
  },
  [sym_format_spec] = {
    .visible = true,
    .named = true,
  },
  [sym_binary_value] = {
    .visible = true,
    .named = true,
  },
  [aux_sym_number_token1] = {
    .visible = false,
    .named = false,
  },
  [sym_filename] = {
    .visible = true,
    .named = true,
  },
  [sym_string] = {
    .visible = true,
    .named = true,
  },
  [sym_condition] = {
    .visible = true,
    .named = true,
  },
  [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_load_command] = {
    .visible = true,
    .named = true,
  },
  [sym_output_file_command] = {
    .visible = true,
    .named = true,
  },
  [sym_compare_to_command] = {
    .visible = true,
    .named = true,
  },
  [sym_output_list_command] = {
    .visible = true,
    .named = true,
  },
  [sym_output_command] = {
    .visible = true,
    .named = true,
  },
  [sym_tick_command] = {
    .visible = true,
    .named = true,
  },
  [sym_tock_command] = {
    .visible = true,
    .named = true,
  },
  [sym_ticktock_command] = {
    .visible = true,
    .named = true,
  },
  [sym_eval_command] = {
    .visible = true,
    .named = true,
  },
  [sym_set_command] = {
    .visible = true,
    .named = true,
  },
  [sym_repeat_command] = {
    .visible = true,
    .named = true,
  },
  [sym_while_command] = {
    .visible = true,
    .named = true,
  },
  [sym_echo_command] = {
    .visible = true,
    .named = true,
  },
  [sym_variable_reference] = {
    .visible = true,
    .named = true,
  },
  [sym_memory_reference] = {
    .visible = true,
    .named = true,
  },
  [sym_register_reference] = {
    .visible = true,
    .named = true,
  },
  [sym_output_spec] = {
    .visible = true,
    .named = true,
  },
  [sym_value] = {
    .visible = true,
    .named = true,
  },
  [sym_number] = {
    .visible = true,
    .named = true,
  },
  [sym_index] = {
    .visible = true,
    .named = true,
  },
  [aux_sym_source_file_repeat1] = {
    .visible = false,
    .named = false,
  },
  [aux_sym_output_list_command_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,
  [34] = 34,
  [35] = 35,
  [36] = 36,
  [37] = 37,
  [38] = 38,
  [39] = 39,
  [40] = 40,
  [41] = 41,
  [42] = 42,
  [43] = 43,
  [44] = 44,
  [45] = 45,
  [46] = 46,
  [47] = 47,
  [48] = 48,
  [49] = 49,
  [50] = 50,
  [51] = 51,
  [52] = 52,
  [53] = 53,
  [54] = 54,
  [55] = 55,
  [56] = 56,
  [57] = 57,
  [58] = 58,
};

static bool ts_lex(TSLexer *lexer, TSStateId state) {
  START_LEXER();
  eof = lexer->eof(lexer);
  switch (state) {
    case 0:
      if (eof) ADVANCE(72);
      ADVANCE_MAP(
        '"', 3,
        '%', 13,
        ',', 74,
        '/', 11,
        ';', 78,
        'A', 99,
        'D', 100,
        'P', 97,
        'R', 96,
        '[', 91,
        ']', 92,
        'c', 47,
        'e', 23,
        'l', 50,
        'o', 63,
        'r', 27,
        's', 31,
        't', 36,
        'w', 34,
        '{', 86,
        '}', 87,
      );
      if (('\t' <= lookahead && lookahead <= '\r') ||
          lookahead == ' ') SKIP(0);
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(123);
      if (('B' <= lookahead && lookahead <= 'Z')) ADVANCE(118);
      END_STATE();
    case 1:
      ADVANCE_MAP(
        '"', 3,
        '%', 13,
        '/', 11,
        ';', 78,
        'A', 99,
        'D', 100,
        'P', 97,
        'R', 96,
      );
      if (('\t' <= lookahead && lookahead <= '\r') ||
          lookahead == ' ') SKIP(1);
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(123);
      if (('B' <= lookahead && lookahead <= 'Z')) ADVANCE(118);
      if (('a' <= lookahead && lookahead <= 'z')) ADVANCE(119);
      END_STATE();
    case 2:
      if (lookahead == '"') ADVANCE(3);
      if (lookahead == '%') ADVANCE(14);
      if (lookahead == '/') ADVANCE(11);
      if (('\t' <= lookahead && lookahead <= '\r') ||
          lookahead == ' ') SKIP(2);
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(123);
      END_STATE();
    case 3:
      if (lookahead == '"') ADVANCE(125);
      if (lookahead != 0) ADVANCE(3);
      END_STATE();
    case 4:
      if (lookahead == '%') ADVANCE(67);
      if (lookahead == '/') ADVANCE(11);
      if (lookahead == ';') ADVANCE(78);
      if (lookahead == 'A') ADVANCE(99);
      if (lookahead == 'D') ADVANCE(100);
      if (lookahead == 'P') ADVANCE(97);
      if (lookahead == 'R') ADVANCE(96);
      if (('\t' <= lookahead && lookahead <= '\r') ||
          lookahead == ' ') SKIP(4);
      if (('B' <= lookahead && lookahead <= 'Z')) ADVANCE(118);
      if (('a' <= lookahead && lookahead <= 'z')) ADVANCE(119);
      END_STATE();
    case 5:
      if (lookahead == '-') ADVANCE(62);
      END_STATE();
    case 6:
      if (lookahead == '.') ADVANCE(6);
      if (lookahead == '-' ||
          lookahead == '_') ADVANCE(7);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(124);
      END_STATE();
    case 7:
      if (lookahead == '.') ADVANCE(6);
      if (lookahead == '-' ||
          ('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(7);
      END_STATE();
    case 8:
      if (lookahead == '.') ADVANCE(69);
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(8);
      END_STATE();
    case 9:
      if (lookahead == '.') ADVANCE(70);
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(9);
      END_STATE();
    case 10:
      if (lookahead == '/') ADVANCE(11);
      if (('\t' <= lookahead && lookahead <= '\r') ||
          lookahead == ' ') SKIP(10);
      if (('-' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(7);
      END_STATE();
    case 11:
      if (lookahead == '/') ADVANCE(130);
      END_STATE();
    case 12:
      if (lookahead == '/') ADVANCE(128);
      if (('\t' <= lookahead && lookahead <= '\r') ||
          lookahead == ' ') ADVANCE(127);
      if (lookahead != 0 &&
          lookahead != '{') ADVANCE(129);
      END_STATE();
    case 13:
      if (lookahead == 'B') ADVANCE(65);
      if (lookahead == 'D' ||
          lookahead == 'S' ||
          lookahead == 'X') ADVANCE(68);
      END_STATE();
    case 14:
      if (lookahead == 'B') ADVANCE(66);
      END_STATE();
    case 15:
      if (lookahead == ']') ADVANCE(95);
      END_STATE();
    case 16:
      if (lookahead == ']') ADVANCE(94);
      END_STATE();
    case 17:
      if (lookahead == ']') ADVANCE(93);
      END_STATE();
    case 18:
      if (lookahead == 'a') ADVANCE(43);
      END_STATE();
    case 19:
      if (lookahead == 'a') ADVANCE(26);
      END_STATE();
    case 20:
      if (lookahead == 'a') ADVANCE(55);
      END_STATE();
    case 21:
      if (lookahead == 'a') ADVANCE(59);
      END_STATE();
    case 22:
      if (lookahead == 'c') ADVANCE(40);
      END_STATE();
    case 23:
      if (lookahead == 'c') ADVANCE(35);
      if (lookahead == 'v') ADVANCE(18);
      END_STATE();
    case 24:
      if (lookahead == 'c') ADVANCE(41);
      END_STATE();
    case 25:
      if (lookahead == 'c') ADVANCE(42);
      END_STATE();
    case 26:
      if (lookahead == 'd') ADVANCE(73);
      END_STATE();
    case 27:
      if (lookahead == 'e') ADVANCE(52);
      END_STATE();
    case 28:
      if (lookahead == 'e') ADVANCE(88);
      END_STATE();
    case 29:
      if (lookahead == 'e') ADVANCE(5);
      END_STATE();
    case 30:
      if (lookahead == 'e') ADVANCE(75);
      END_STATE();
    case 31:
      if (lookahead == 'e') ADVANCE(57);
      END_STATE();
    case 32:
      if (lookahead == 'e') ADVANCE(21);
      END_STATE();
    case 33:
      if (lookahead == 'f') ADVANCE(39);
      if (lookahead == 'l') ADVANCE(37);
      END_STATE();
    case 34:
      if (lookahead == 'h') ADVANCE(38);
      END_STATE();
    case 35:
      if (lookahead == 'h') ADVANCE(48);
      END_STATE();
    case 36:
      if (lookahead == 'i') ADVANCE(22);
      if (lookahead == 'o') ADVANCE(24);
      END_STATE();
    case 37:
      if (lookahead == 'i') ADVANCE(56);
      END_STATE();
    case 38:
      if (lookahead == 'i') ADVANCE(44);
      END_STATE();
    case 39:
      if (lookahead == 'i') ADVANCE(45);
      END_STATE();
    case 40:
      if (lookahead == 'k') ADVANCE(80);
      END_STATE();
    case 41:
      if (lookahead == 'k') ADVANCE(81);
      END_STATE();
    case 42:
      if (lookahead == 'k') ADVANCE(82);
      END_STATE();
    case 43:
      if (lookahead == 'l') ADVANCE(83);
      END_STATE();
    case 44:
      if (lookahead == 'l') ADVANCE(28);
      END_STATE();
    case 45:
      if (lookahead == 'l') ADVANCE(30);
      END_STATE();
    case 46:
      if (lookahead == 'm') ADVANCE(53);
      END_STATE();
    case 47:
      if (lookahead == 'o') ADVANCE(46);
      END_STATE();
    case 48:
      if (lookahead == 'o') ADVANCE(89);
      END_STATE();
    case 49:
      if (lookahead == 'o') ADVANCE(76);
      END_STATE();
    case 50:
      if (lookahead == 'o') ADVANCE(19);
      END_STATE();
    case 51:
      if (lookahead == 'o') ADVANCE(25);
      END_STATE();
    case 52:
      if (lookahead == 'p') ADVANCE(32);
      END_STATE();
    case 53:
      if (lookahead == 'p') ADVANCE(20);
      END_STATE();
    case 54:
      if (lookahead == 'p') ADVANCE(64);
      END_STATE();
    case 55:
      if (lookahead == 'r') ADVANCE(29);
      END_STATE();
    case 56:
      if (lookahead == 's') ADVANCE(60);
      END_STATE();
    case 57:
      if (lookahead == 't') ADVANCE(84);
      END_STATE();
    case 58:
      if (lookahead == 't') ADVANCE(79);
      END_STATE();
    case 59:
      if (lookahead == 't') ADVANCE(85);
      END_STATE();
    case 60:
      if (lookahead == 't') ADVANCE(77);
      END_STATE();
    case 61:
      if (lookahead == 't') ADVANCE(54);
      END_STATE();
    case 62:
      if (lookahead == 't') ADVANCE(49);
      END_STATE();
    case 63:
      if (lookahead == 'u') ADVANCE(61);
      END_STATE();
    case 64:
      if (lookahead == 'u') ADVANCE(58);
      END_STATE();
    case 65:
      if (lookahead == '0' ||
          lookahead == '1') ADVANCE(121);
      if (('2' <= lookahead && lookahead <= '9')) ADVANCE(9);
      END_STATE();
    case 66:
      if (lookahead == '0' ||
          lookahead == '1') ADVANCE(122);
      END_STATE();
    case 67:
      if (lookahead == 'B' ||
          lookahead == 'D' ||
          lookahead == 'S' ||
          lookahead == 'X') ADVANCE(68);
      END_STATE();
    case 68:
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(9);
      END_STATE();
    case 69:
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(120);
      END_STATE();
    case 70:
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(8);
      END_STATE();
    case 71:
      if (eof) ADVANCE(72);
      ADVANCE_MAP(
        '/', 11,
        'c', 47,
        'e', 23,
        'l', 50,
        'o', 63,
        'r', 27,
        's', 31,
        't', 36,
        'w', 34,
        '}', 87,
      );
      if (('\t' <= lookahead && lookahead <= '\r') ||
          lookahead == ' ') ADVANCE(131);
      END_STATE();
    case 72:
      ACCEPT_TOKEN(ts_builtin_sym_end);
      END_STATE();
    case 73:
      ACCEPT_TOKEN(anon_sym_load);
      END_STATE();
    case 74:
      ACCEPT_TOKEN(anon_sym_COMMA);
      END_STATE();
    case 75:
      ACCEPT_TOKEN(anon_sym_output_DASHfile);
      END_STATE();
    case 76:
      ACCEPT_TOKEN(anon_sym_compare_DASHto);
      END_STATE();
    case 77:
      ACCEPT_TOKEN(anon_sym_output_DASHlist);
      END_STATE();
    case 78:
      ACCEPT_TOKEN(anon_sym_SEMI);
      END_STATE();
    case 79:
      ACCEPT_TOKEN(anon_sym_output);
      if (lookahead == '-') ADVANCE(33);
      END_STATE();
    case 80:
      ACCEPT_TOKEN(anon_sym_tick);
      if (lookahead == 't') ADVANCE(51);
      END_STATE();
    case 81:
      ACCEPT_TOKEN(anon_sym_tock);
      END_STATE();
    case 82:
      ACCEPT_TOKEN(anon_sym_ticktock);
      END_STATE();
    case 83:
      ACCEPT_TOKEN(anon_sym_eval);
      END_STATE();
    case 84:
      ACCEPT_TOKEN(anon_sym_set);
      END_STATE();
    case 85:
      ACCEPT_TOKEN(anon_sym_repeat);
      END_STATE();
    case 86:
      ACCEPT_TOKEN(anon_sym_LBRACE);
      END_STATE();
    case 87:
      ACCEPT_TOKEN(anon_sym_RBRACE);
      END_STATE();
    case 88:
      ACCEPT_TOKEN(anon_sym_while);
      END_STATE();
    case 89:
      ACCEPT_TOKEN(anon_sym_echo);
      END_STATE();
    case 90:
      ACCEPT_TOKEN(anon_sym_RAM);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 91:
      ACCEPT_TOKEN(anon_sym_LBRACK);
      END_STATE();
    case 92:
      ACCEPT_TOKEN(anon_sym_RBRACK);
      END_STATE();
    case 93:
      ACCEPT_TOKEN(anon_sym_DRegister_LBRACK_RBRACK);
      END_STATE();
    case 94:
      ACCEPT_TOKEN(anon_sym_ARegister_LBRACK_RBRACK);
      END_STATE();
    case 95:
      ACCEPT_TOKEN(anon_sym_PC_LBRACK_RBRACK);
      END_STATE();
    case 96:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == 'A') ADVANCE(98);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('B' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 97:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == 'C') ADVANCE(101);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 98:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == 'M') ADVANCE(90);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 99:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == 'R') ADVANCE(104);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 100:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == 'R') ADVANCE(107);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 101:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == '[') ADVANCE(15);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 102:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == '[') ADVANCE(16);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 103:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == '[') ADVANCE(17);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 104:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == 'e') ADVANCE(108);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 105:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == 'e') ADVANCE(112);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 106:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == 'e') ADVANCE(113);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 107:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == 'e') ADVANCE(109);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 108:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == 'g') ADVANCE(110);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 109:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == 'g') ADVANCE(111);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 110:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == 'i') ADVANCE(114);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 111:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == 'i') ADVANCE(115);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 112:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == 'r') ADVANCE(102);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 113:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == 'r') ADVANCE(103);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 114:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == 's') ADVANCE(116);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 115:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == 's') ADVANCE(117);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 116:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == 't') ADVANCE(105);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 117:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (lookahead == 't') ADVANCE(106);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 118:
      ACCEPT_TOKEN(aux_sym_register_reference_token1);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118);
      END_STATE();
    case 119:
      ACCEPT_TOKEN(sym_pin_reference);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(119);
      END_STATE();
    case 120:
      ACCEPT_TOKEN(sym_format_spec);
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(120);
      END_STATE();
    case 121:
      ACCEPT_TOKEN(sym_binary_value);
      if (lookahead == '.') ADVANCE(70);
      if (lookahead == '0' ||
          lookahead == '1') ADVANCE(121);
      if (('2' <= lookahead && lookahead <= '9')) ADVANCE(9);
      END_STATE();
    case 122:
      ACCEPT_TOKEN(sym_binary_value);
      if (lookahead == '0' ||
          lookahead == '1') ADVANCE(122);
      END_STATE();
    case 123:
      ACCEPT_TOKEN(aux_sym_number_token1);
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(123);
      END_STATE();
    case 124:
      ACCEPT_TOKEN(sym_filename);
      if (lookahead == '.') ADVANCE(6);
      if (lookahead == '-' ||
          lookahead == '_') ADVANCE(7);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(124);
      END_STATE();
    case 125:
      ACCEPT_TOKEN(sym_string);
      END_STATE();
    case 126:
      ACCEPT_TOKEN(sym_condition);
      if (lookahead == '\n') ADVANCE(129);
      if (lookahead == '{') ADVANCE(130);
      if (lookahead != 0) ADVANCE(126);
      END_STATE();
    case 127:
      ACCEPT_TOKEN(sym_condition);
      if (lookahead == '/') ADVANCE(128);
      if (('\t' <= lookahead && lookahead <= '\r') ||
          lookahead == ' ') ADVANCE(127);
      if (lookahead != 0 &&
          lookahead != '{') ADVANCE(129);
      END_STATE();
    case 128:
      ACCEPT_TOKEN(sym_condition);
      if (lookahead == '/') ADVANCE(126);
      if (lookahead != 0 &&
          lookahead != '{') ADVANCE(129);
      END_STATE();
    case 129:
      ACCEPT_TOKEN(sym_condition);
      if (lookahead != 0 &&
          lookahead != '{') ADVANCE(129);
      END_STATE();
    case 130:
      ACCEPT_TOKEN(sym_comment);
      if (lookahead != 0 &&
          lookahead != '\n') ADVANCE(130);
      END_STATE();
    case 131:
      ACCEPT_TOKEN(sym__whitespace);
      if (('\t' <= lookahead && lookahead <= '\r') ||
          lookahead == ' ') ADVANCE(131);
      END_STATE();
    default:
      return false;
  }
}

static const TSLexerMode ts_lex_modes[STATE_COUNT] = {
  [0] = {.lex_state = 0},
  [1] = {.lex_state = 71},
  [2] = {.lex_state = 71},
  [3] = {.lex_state = 71},
  [4] = {.lex_state = 71},
  [5] = {.lex_state = 71},
  [6] = {.lex_state = 71},
  [7] = {.lex_state = 71},
  [8] = {.lex_state = 71},
  [9] = {.lex_state = 71},
  [10] = {.lex_state = 71},
  [11] = {.lex_state = 71},
  [12] = {.lex_state = 71},
  [13] = {.lex_state = 71},
  [14] = {.lex_state = 71},
  [15] = {.lex_state = 71},
  [16] = {.lex_state = 71},
  [17] = {.lex_state = 71},
  [18] = {.lex_state = 71},
  [19] = {.lex_state = 71},
  [20] = {.lex_state = 71},
  [21] = {.lex_state = 71},
  [22] = {.lex_state = 71},
  [23] = {.lex_state = 71},
  [24] = {.lex_state = 1},
  [25] = {.lex_state = 1},
  [26] = {.lex_state = 1},
  [27] = {.lex_state = 1},
  [28] = {.lex_state = 1},
  [29] = {.lex_state = 1},
  [30] = {.lex_state = 1},
  [31] = {.lex_state = 4},
  [32] = {.lex_state = 1},
  [33] = {.lex_state = 2},
  [34] = {.lex_state = 0},
  [35] = {.lex_state = 0},
  [36] = {.lex_state = 0},
  [37] = {.lex_state = 0},
  [38] = {.lex_state = 0},
  [39] = {.lex_state = 0},
  [40] = {.lex_state = 0},
  [41] = {.lex_state = 10},
  [42] = {.lex_state = 0},
  [43] = {.lex_state = 0},
  [44] = {.lex_state = 0},
  [45] = {.lex_state = 0},
  [46] = {.lex_state = 0},
  [47] = {.lex_state = 0},
  [48] = {.lex_state = 0},
  [49] = {.lex_state = 0},
  [50] = {.lex_state = 0},
  [51] = {.lex_state = 0},
  [52] = {.lex_state = 0},
  [53] = {.lex_state = 0},
  [54] = {.lex_state = 0},
  [55] = {.lex_state = 0},
  [56] = {.lex_state = 10},
  [57] = {.lex_state = 12},
  [58] = {.lex_state = 10},
};

static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = {
  [STATE(0)] = {
    [ts_builtin_sym_end] = ACTIONS(1),
    [anon_sym_load] = ACTIONS(1),
    [anon_sym_COMMA] = ACTIONS(1),
    [anon_sym_output_DASHfile] = ACTIONS(1),
    [anon_sym_compare_DASHto] = ACTIONS(1),
    [anon_sym_output_DASHlist] = ACTIONS(1),
    [anon_sym_SEMI] = ACTIONS(1),
    [anon_sym_output] = ACTIONS(1),
    [anon_sym_tick] = ACTIONS(1),
    [anon_sym_tock] = ACTIONS(1),
    [anon_sym_ticktock] = ACTIONS(1),
    [anon_sym_eval] = ACTIONS(1),
    [anon_sym_set] = ACTIONS(1),
    [anon_sym_repeat] = ACTIONS(1),
    [anon_sym_LBRACE] = ACTIONS(1),
    [anon_sym_RBRACE] = ACTIONS(1),
    [anon_sym_while] = ACTIONS(1),
    [anon_sym_echo] = ACTIONS(1),
    [anon_sym_RAM] = ACTIONS(1),
    [anon_sym_LBRACK] = ACTIONS(1),
    [anon_sym_RBRACK] = ACTIONS(1),
    [anon_sym_DRegister_LBRACK_RBRACK] = ACTIONS(1),
    [anon_sym_ARegister_LBRACK_RBRACK] = ACTIONS(1),
    [anon_sym_PC_LBRACK_RBRACK] = ACTIONS(1),
    [aux_sym_register_reference_token1] = ACTIONS(1),
    [sym_format_spec] = ACTIONS(1),
    [sym_binary_value] = ACTIONS(1),
    [aux_sym_number_token1] = ACTIONS(1),
    [sym_string] = ACTIONS(1),
    [sym_comment] = ACTIONS(3),
  },
  [STATE(1)] = {
    [sym_source_file] = STATE(48),
    [sym__item] = STATE(3),
    [sym_command] = STATE(3),
    [sym_load_command] = STATE(12),
    [sym_output_file_command] = STATE(12),
    [sym_compare_to_command] = STATE(12),
    [sym_output_list_command] = STATE(12),
    [sym_output_command] = STATE(12),
    [sym_tick_command] = STATE(12),
    [sym_tock_command] = STATE(12),
    [sym_ticktock_command] = STATE(12),
    [sym_eval_command] = STATE(12),
    [sym_set_command] = STATE(12),
    [sym_repeat_command] = STATE(12),
    [sym_while_command] = STATE(12),
    [sym_echo_command] = STATE(12),
    [aux_sym_source_file_repeat1] = STATE(3),
    [ts_builtin_sym_end] = ACTIONS(5),
    [anon_sym_load] = ACTIONS(7),
    [anon_sym_output_DASHfile] = ACTIONS(9),
    [anon_sym_compare_DASHto] = ACTIONS(11),
    [anon_sym_output_DASHlist] = ACTIONS(13),
    [anon_sym_output] = ACTIONS(15),
    [anon_sym_tick] = ACTIONS(17),
    [anon_sym_tock] = ACTIONS(19),
    [anon_sym_ticktock] = ACTIONS(21),
    [anon_sym_eval] = ACTIONS(23),
    [anon_sym_set] = ACTIONS(25),
    [anon_sym_repeat] = ACTIONS(27),
    [anon_sym_while] = ACTIONS(29),
    [anon_sym_echo] = ACTIONS(31),
    [sym_comment] = ACTIONS(33),
    [sym__whitespace] = ACTIONS(35),
  },
  [STATE(2)] = {
    [sym__item] = STATE(2),
    [sym_command] = STATE(2),
    [sym_load_command] = STATE(12),
    [sym_output_file_command] = STATE(12),
    [sym_compare_to_command] = STATE(12),
    [sym_output_list_command] = STATE(12),
    [sym_output_command] = STATE(12),
    [sym_tick_command] = STATE(12),
    [sym_tock_command] = STATE(12),
    [sym_ticktock_command] = STATE(12),
    [sym_eval_command] = STATE(12),
    [sym_set_command] = STATE(12),
    [sym_repeat_command] = STATE(12),
    [sym_while_command] = STATE(12),
    [sym_echo_command] = STATE(12),
    [aux_sym_source_file_repeat1] = STATE(2),
    [ts_builtin_sym_end] = ACTIONS(37),
    [anon_sym_load] = ACTIONS(39),
    [anon_sym_output_DASHfile] = ACTIONS(42),
    [anon_sym_compare_DASHto] = ACTIONS(45),
    [anon_sym_output_DASHlist] = ACTIONS(48),
    [anon_sym_output] = ACTIONS(51),
    [anon_sym_tick] = ACTIONS(54),
    [anon_sym_tock] = ACTIONS(57),
    [anon_sym_ticktock] = ACTIONS(60),
    [anon_sym_eval] = ACTIONS(63),
    [anon_sym_set] = ACTIONS(66),
    [anon_sym_repeat] = ACTIONS(69),
    [anon_sym_RBRACE] = ACTIONS(72),
    [anon_sym_while] = ACTIONS(74),
    [anon_sym_echo] = ACTIONS(77),
    [sym_comment] = ACTIONS(80),
    [sym__whitespace] = ACTIONS(83),
  },
  [STATE(3)] = {
    [sym__item] = STATE(2),
    [sym_command] = STATE(2),
    [sym_load_command] = STATE(12),
    [sym_output_file_command] = STATE(12),
    [sym_compare_to_command] = STATE(12),
    [sym_output_list_command] = STATE(12),
    [sym_output_command] = STATE(12),
    [sym_tick_command] = STATE(12),
    [sym_tock_command] = STATE(12),
    [sym_ticktock_command] = STATE(12),
    [sym_eval_command] = STATE(12),
    [sym_set_command] = STATE(12),
    [sym_repeat_command] = STATE(12),
    [sym_while_command] = STATE(12),
    [sym_echo_command] = STATE(12),
    [aux_sym_source_file_repeat1] = STATE(2),
    [ts_builtin_sym_end] = ACTIONS(86),
    [anon_sym_load] = ACTIONS(7),
    [anon_sym_output_DASHfile] = ACTIONS(9),
    [anon_sym_compare_DASHto] = ACTIONS(11),
    [anon_sym_output_DASHlist] = ACTIONS(13),
    [anon_sym_output] = ACTIONS(15),
    [anon_sym_tick] = ACTIONS(17),
    [anon_sym_tock] = ACTIONS(19),
    [anon_sym_ticktock] = ACTIONS(21),
    [anon_sym_eval] = ACTIONS(23),
    [anon_sym_set] = ACTIONS(25),
    [anon_sym_repeat] = ACTIONS(27),
    [anon_sym_while] = ACTIONS(29),
    [anon_sym_echo] = ACTIONS(31),
    [sym_comment] = ACTIONS(88),
    [sym__whitespace] = ACTIONS(90),
  },
  [STATE(4)] = {
    [sym__item] = STATE(6),
    [sym_command] = STATE(6),
    [sym_load_command] = STATE(12),
    [sym_output_file_command] = STATE(12),
    [sym_compare_to_command] = STATE(12),
    [sym_output_list_command] = STATE(12),
    [sym_output_command] = STATE(12),
    [sym_tick_command] = STATE(12),
    [sym_tock_command] = STATE(12),
    [sym_ticktock_command] = STATE(12),
    [sym_eval_command] = STATE(12),
    [sym_set_command] = STATE(12),
    [sym_repeat_command] = STATE(12),
    [sym_while_command] = STATE(12),
    [sym_echo_command] = STATE(12),
    [aux_sym_source_file_repeat1] = STATE(6),
    [anon_sym_load] = ACTIONS(7),
    [anon_sym_output_DASHfile] = ACTIONS(9),
    [anon_sym_compare_DASHto] = ACTIONS(11),
    [anon_sym_output_DASHlist] = ACTIONS(13),
    [anon_sym_output] = ACTIONS(15),
    [anon_sym_tick] = ACTIONS(17),
    [anon_sym_tock] = ACTIONS(19),
    [anon_sym_ticktock] = ACTIONS(21),
    [anon_sym_eval] = ACTIONS(23),
    [anon_sym_set] = ACTIONS(25),
    [anon_sym_repeat] = ACTIONS(27),
    [anon_sym_RBRACE] = ACTIONS(92),
    [anon_sym_while] = ACTIONS(29),
    [anon_sym_echo] = ACTIONS(31),
    [sym_comment] = ACTIONS(94),
    [sym__whitespace] = ACTIONS(96),
  },
  [STATE(5)] = {
    [sym__item] = STATE(7),
    [sym_command] = STATE(7),
    [sym_load_command] = STATE(12),
    [sym_output_file_command] = STATE(12),
    [sym_compare_to_command] = STATE(12),
    [sym_output_list_command] = STATE(12),
    [sym_output_command] = STATE(12),
    [sym_tick_command] = STATE(12),
    [sym_tock_command] = STATE(12),
    [sym_ticktock_command] = STATE(12),
    [sym_eval_command] = STATE(12),
    [sym_set_command] = STATE(12),
    [sym_repeat_command] = STATE(12),
    [sym_while_command] = STATE(12),
    [sym_echo_command] = STATE(12),
    [aux_sym_source_file_repeat1] = STATE(7),
    [anon_sym_load] = ACTIONS(7),
    [anon_sym_output_DASHfile] = ACTIONS(9),
    [anon_sym_compare_DASHto] = ACTIONS(11),
    [anon_sym_output_DASHlist] = ACTIONS(13),
    [anon_sym_output] = ACTIONS(15),
    [anon_sym_tick] = ACTIONS(17),
    [anon_sym_tock] = ACTIONS(19),
    [anon_sym_ticktock] = ACTIONS(21),
    [anon_sym_eval] = ACTIONS(23),
    [anon_sym_set] = ACTIONS(25),
    [anon_sym_repeat] = ACTIONS(27),
    [anon_sym_RBRACE] = ACTIONS(98),
    [anon_sym_while] = ACTIONS(29),
    [anon_sym_echo] = ACTIONS(31),
    [sym_comment] = ACTIONS(100),
    [sym__whitespace] = ACTIONS(102),
  },
  [STATE(6)] = {
    [sym__item] = STATE(2),
    [sym_command] = STATE(2),
    [sym_load_command] = STATE(12),
    [sym_output_file_command] = STATE(12),
    [sym_compare_to_command] = STATE(12),
    [sym_output_list_command] = STATE(12),
    [sym_output_command] = STATE(12),
    [sym_tick_command] = STATE(12),
    [sym_tock_command] = STATE(12),
    [sym_ticktock_command] = STATE(12),
    [sym_eval_command] = STATE(12),
    [sym_set_command] = STATE(12),
    [sym_repeat_command] = STATE(12),
    [sym_while_command] = STATE(12),
    [sym_echo_command] = STATE(12),
    [aux_sym_source_file_repeat1] = STATE(2),
    [anon_sym_load] = ACTIONS(7),
    [anon_sym_output_DASHfile] = ACTIONS(9),
    [anon_sym_compare_DASHto] = ACTIONS(11),
    [anon_sym_output_DASHlist] = ACTIONS(13),
    [anon_sym_output] = ACTIONS(15),
    [anon_sym_tick] = ACTIONS(17),
    [anon_sym_tock] = ACTIONS(19),
    [anon_sym_ticktock] = ACTIONS(21),
    [anon_sym_eval] = ACTIONS(23),
    [anon_sym_set] = ACTIONS(25),
    [anon_sym_repeat] = ACTIONS(27),
    [anon_sym_RBRACE] = ACTIONS(104),
    [anon_sym_while] = ACTIONS(29),
    [anon_sym_echo] = ACTIONS(31),
    [sym_comment] = ACTIONS(88),
    [sym__whitespace] = ACTIONS(90),
  },
  [STATE(7)] = {
    [sym__item] = STATE(2),
    [sym_command] = STATE(2),
    [sym_load_command] = STATE(12),
    [sym_output_file_command] = STATE(12),
    [sym_compare_to_command] = STATE(12),
    [sym_output_list_command] = STATE(12),
    [sym_output_command] = STATE(12),
    [sym_tick_command] = STATE(12),
    [sym_tock_command] = STATE(12),
    [sym_ticktock_command] = STATE(12),
    [sym_eval_command] = STATE(12),
    [sym_set_command] = STATE(12),
    [sym_repeat_command] = STATE(12),
    [sym_while_command] = STATE(12),
    [sym_echo_command] = STATE(12),
    [aux_sym_source_file_repeat1] = STATE(2),
    [anon_sym_load] = ACTIONS(7),
    [anon_sym_output_DASHfile] = ACTIONS(9),
    [anon_sym_compare_DASHto] = ACTIONS(11),
    [anon_sym_output_DASHlist] = ACTIONS(13),
    [anon_sym_output] = ACTIONS(15),
    [anon_sym_tick] = ACTIONS(17),
    [anon_sym_tock] = ACTIONS(19),
    [anon_sym_ticktock] = ACTIONS(21),
    [anon_sym_eval] = ACTIONS(23),
    [anon_sym_set] = ACTIONS(25),
    [anon_sym_repeat] = ACTIONS(27),
    [anon_sym_RBRACE] = ACTIONS(106),
    [anon_sym_while] = ACTIONS(29),
    [anon_sym_echo] = ACTIONS(31),
    [sym_comment] = ACTIONS(88),
    [sym__whitespace] = ACTIONS(90),
  },
};

static const uint16_t ts_small_parse_table[] = {
  [0] = 2,
    ACTIONS(108), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(110), 15,
      anon_sym_load,
      anon_sym_output_DASHfile,
      anon_sym_compare_DASHto,
      anon_sym_output_DASHlist,
      anon_sym_output,
      anon_sym_tick,
      anon_sym_tock,
      anon_sym_ticktock,
      anon_sym_eval,
      anon_sym_set,
      anon_sym_repeat,
      anon_sym_RBRACE,
      anon_sym_while,
      anon_sym_echo,
      sym_comment,
  [22] = 2,
    ACTIONS(112), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(114), 15,
      anon_sym_load,
      anon_sym_output_DASHfile,
      anon_sym_compare_DASHto,
      anon_sym_output_DASHlist,
      anon_sym_output,
      anon_sym_tick,
      anon_sym_tock,
      anon_sym_ticktock,
      anon_sym_eval,
      anon_sym_set,
      anon_sym_repeat,
      anon_sym_RBRACE,
      anon_sym_while,
      anon_sym_echo,
      sym_comment,
  [44] = 2,
    ACTIONS(116), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(118), 15,
      anon_sym_load,
      anon_sym_output_DASHfile,
      anon_sym_compare_DASHto,
      anon_sym_output_DASHlist,
      anon_sym_output,
      anon_sym_tick,
      anon_sym_tock,
      anon_sym_ticktock,
      anon_sym_eval,
      anon_sym_set,
      anon_sym_repeat,
      anon_sym_RBRACE,
      anon_sym_while,
      anon_sym_echo,
      sym_comment,
  [66] = 2,
    ACTIONS(120), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(122), 15,
      anon_sym_load,
      anon_sym_output_DASHfile,
      anon_sym_compare_DASHto,
      anon_sym_output_DASHlist,
      anon_sym_output,
      anon_sym_tick,
      anon_sym_tock,
      anon_sym_ticktock,
      anon_sym_eval,
      anon_sym_set,
      anon_sym_repeat,
      anon_sym_RBRACE,
      anon_sym_while,
      anon_sym_echo,
      sym_comment,
  [88] = 2,
    ACTIONS(124), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(126), 15,
      anon_sym_load,
      anon_sym_output_DASHfile,
      anon_sym_compare_DASHto,
      anon_sym_output_DASHlist,
      anon_sym_output,
      anon_sym_tick,
      anon_sym_tock,
      anon_sym_ticktock,
      anon_sym_eval,
      anon_sym_set,
      anon_sym_repeat,
      anon_sym_RBRACE,
      anon_sym_while,
      anon_sym_echo,
      sym_comment,
  [110] = 2,
    ACTIONS(128), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(130), 15,
      anon_sym_load,
      anon_sym_output_DASHfile,
      anon_sym_compare_DASHto,
      anon_sym_output_DASHlist,
      anon_sym_output,
      anon_sym_tick,
      anon_sym_tock,
      anon_sym_ticktock,
      anon_sym_eval,
      anon_sym_set,
      anon_sym_repeat,
      anon_sym_RBRACE,
      anon_sym_while,
      anon_sym_echo,
      sym_comment,
  [132] = 2,
    ACTIONS(132), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(134), 15,
      anon_sym_load,
      anon_sym_output_DASHfile,
      anon_sym_compare_DASHto,
      anon_sym_output_DASHlist,
      anon_sym_output,
      anon_sym_tick,
      anon_sym_tock,
      anon_sym_ticktock,
      anon_sym_eval,
      anon_sym_set,
      anon_sym_repeat,
      anon_sym_RBRACE,
      anon_sym_while,
      anon_sym_echo,
      sym_comment,
  [154] = 2,
    ACTIONS(136), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(138), 15,
      anon_sym_load,
      anon_sym_output_DASHfile,
      anon_sym_compare_DASHto,
      anon_sym_output_DASHlist,
      anon_sym_output,
      anon_sym_tick,
      anon_sym_tock,
      anon_sym_ticktock,
      anon_sym_eval,
      anon_sym_set,
      anon_sym_repeat,
      anon_sym_RBRACE,
      anon_sym_while,
      anon_sym_echo,
      sym_comment,
  [176] = 2,
    ACTIONS(140), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(142), 15,
      anon_sym_load,
      anon_sym_output_DASHfile,
      anon_sym_compare_DASHto,
      anon_sym_output_DASHlist,
      anon_sym_output,
      anon_sym_tick,
      anon_sym_tock,
      anon_sym_ticktock,
      anon_sym_eval,
      anon_sym_set,
      anon_sym_repeat,
      anon_sym_RBRACE,
      anon_sym_while,
      anon_sym_echo,
      sym_comment,
  [198] = 2,
    ACTIONS(144), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(146), 15,
      anon_sym_load,
      anon_sym_output_DASHfile,
      anon_sym_compare_DASHto,
      anon_sym_output_DASHlist,
      anon_sym_output,
      anon_sym_tick,
      anon_sym_tock,
      anon_sym_ticktock,
      anon_sym_eval,
      anon_sym_set,
      anon_sym_repeat,
      anon_sym_RBRACE,
      anon_sym_while,
      anon_sym_echo,
      sym_comment,
  [220] = 2,
    ACTIONS(148), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(150), 15,
      anon_sym_load,
      anon_sym_output_DASHfile,
      anon_sym_compare_DASHto,
      anon_sym_output_DASHlist,
      anon_sym_output,
      anon_sym_tick,
      anon_sym_tock,
      anon_sym_ticktock,
      anon_sym_eval,
      anon_sym_set,
      anon_sym_repeat,
      anon_sym_RBRACE,
      anon_sym_while,
      anon_sym_echo,
      sym_comment,
  [242] = 2,
    ACTIONS(152), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(154), 15,
      anon_sym_load,
      anon_sym_output_DASHfile,
      anon_sym_compare_DASHto,
      anon_sym_output_DASHlist,
      anon_sym_output,
      anon_sym_tick,
      anon_sym_tock,
      anon_sym_ticktock,
      anon_sym_eval,
      anon_sym_set,
      anon_sym_repeat,
      anon_sym_RBRACE,
      anon_sym_while,
      anon_sym_echo,
      sym_comment,
  [264] = 2,
    ACTIONS(156), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(158), 15,
      anon_sym_load,
      anon_sym_output_DASHfile,
      anon_sym_compare_DASHto,
      anon_sym_output_DASHlist,
      anon_sym_output,
      anon_sym_tick,
      anon_sym_tock,
      anon_sym_ticktock,
      anon_sym_eval,
      anon_sym_set,
      anon_sym_repeat,
      anon_sym_RBRACE,
      anon_sym_while,
      anon_sym_echo,
      sym_comment,
  [286] = 2,
    ACTIONS(160), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(162), 15,
      anon_sym_load,
      anon_sym_output_DASHfile,
      anon_sym_compare_DASHto,
      anon_sym_output_DASHlist,
      anon_sym_output,
      anon_sym_tick,
      anon_sym_tock,
      anon_sym_ticktock,
      anon_sym_eval,
      anon_sym_set,
      anon_sym_repeat,
      anon_sym_RBRACE,
      anon_sym_while,
      anon_sym_echo,
      sym_comment,
  [308] = 2,
    ACTIONS(164), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(166), 15,
      anon_sym_load,
      anon_sym_output_DASHfile,
      anon_sym_compare_DASHto,
      anon_sym_output_DASHlist,
      anon_sym_output,
      anon_sym_tick,
      anon_sym_tock,
      anon_sym_ticktock,
      anon_sym_eval,
      anon_sym_set,
      anon_sym_repeat,
      anon_sym_RBRACE,
      anon_sym_while,
      anon_sym_echo,
      sym_comment,
  [330] = 2,
    ACTIONS(168), 2,
      ts_builtin_sym_end,
      sym__whitespace,
    ACTIONS(170), 15,
      anon_sym_load,
      anon_sym_output_DASHfile,
      anon_sym_compare_DASHto,
      anon_sym_output_DASHlist,
      anon_sym_output,
      anon_sym_tick,
      anon_sym_tock,
      anon_sym_ticktock,
      anon_sym_eval,
      anon_sym_set,
      anon_sym_repeat,
      anon_sym_RBRACE,
      anon_sym_while,
      anon_sym_echo,
      sym_comment,
  [352] = 9,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(172), 1,
      anon_sym_SEMI,
    ACTIONS(174), 1,
      anon_sym_RAM,
    ACTIONS(178), 1,
      aux_sym_register_reference_token1,
    ACTIONS(180), 1,
      sym_pin_reference,
    STATE(31), 1,
      sym_variable_reference,
    STATE(25), 2,
      sym_output_spec,
      aux_sym_output_list_command_repeat1,
    STATE(27), 2,
      sym_memory_reference,
      sym_register_reference,
    ACTIONS(176), 3,
      anon_sym_DRegister_LBRACK_RBRACK,
      anon_sym_ARegister_LBRACK_RBRACK,
      anon_sym_PC_LBRACK_RBRACK,
  [384] = 9,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(182), 1,
      anon_sym_SEMI,
    ACTIONS(184), 1,
      anon_sym_RAM,
    ACTIONS(190), 1,
      aux_sym_register_reference_token1,
    ACTIONS(193), 1,
      sym_pin_reference,
    STATE(31), 1,
      sym_variable_reference,
    STATE(25), 2,
      sym_output_spec,
      aux_sym_output_list_command_repeat1,
    STATE(27), 2,
      sym_memory_reference,
      sym_register_reference,
    ACTIONS(187), 3,
      anon_sym_DRegister_LBRACK_RBRACK,
      anon_sym_ARegister_LBRACK_RBRACK,
      anon_sym_PC_LBRACK_RBRACK,
  [416] = 3,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(198), 4,
      anon_sym_RAM,
      aux_sym_register_reference_token1,
      sym_pin_reference,
      sym_binary_value,
    ACTIONS(196), 7,
      anon_sym_SEMI,
      anon_sym_DRegister_LBRACK_RBRACK,
      anon_sym_ARegister_LBRACK_RBRACK,
      anon_sym_PC_LBRACK_RBRACK,
      sym_format_spec,
      aux_sym_number_token1,
      sym_string,
  [435] = 3,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(202), 4,
      anon_sym_RAM,
      aux_sym_register_reference_token1,
      sym_pin_reference,
      sym_binary_value,
    ACTIONS(200), 7,
      anon_sym_SEMI,
      anon_sym_DRegister_LBRACK_RBRACK,
      anon_sym_ARegister_LBRACK_RBRACK,
      anon_sym_PC_LBRACK_RBRACK,
      sym_format_spec,
      aux_sym_number_token1,
      sym_string,
  [454] = 8,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(174), 1,
      anon_sym_RAM,
    ACTIONS(178), 1,
      aux_sym_register_reference_token1,
    ACTIONS(180), 1,
      sym_pin_reference,
    STATE(31), 1,
      sym_variable_reference,
    STATE(24), 2,
      sym_output_spec,
      aux_sym_output_list_command_repeat1,
    STATE(27), 2,
      sym_memory_reference,
      sym_register_reference,
    ACTIONS(176), 3,
      anon_sym_DRegister_LBRACK_RBRACK,
      anon_sym_ARegister_LBRACK_RBRACK,
      anon_sym_PC_LBRACK_RBRACK,
  [483] = 3,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(206), 4,
      anon_sym_RAM,
      aux_sym_register_reference_token1,
      sym_pin_reference,
      sym_binary_value,
    ACTIONS(204), 7,
      anon_sym_SEMI,
      anon_sym_DRegister_LBRACK_RBRACK,
      anon_sym_ARegister_LBRACK_RBRACK,
      anon_sym_PC_LBRACK_RBRACK,
      sym_format_spec,
      aux_sym_number_token1,
      sym_string,
  [502] = 7,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(174), 1,
      anon_sym_RAM,
    ACTIONS(178), 1,
      aux_sym_register_reference_token1,
    ACTIONS(180), 1,
      sym_pin_reference,
    STATE(33), 1,
      sym_variable_reference,
    STATE(27), 2,
      sym_memory_reference,
      sym_register_reference,
    ACTIONS(176), 3,
      anon_sym_DRegister_LBRACK_RBRACK,
      anon_sym_ARegister_LBRACK_RBRACK,
      anon_sym_PC_LBRACK_RBRACK,
  [527] = 4,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(212), 1,
      sym_format_spec,
    ACTIONS(210), 3,
      anon_sym_RAM,
      aux_sym_register_reference_token1,
      sym_pin_reference,
    ACTIONS(208), 4,
      anon_sym_SEMI,
      anon_sym_DRegister_LBRACK_RBRACK,
      anon_sym_ARegister_LBRACK_RBRACK,
      anon_sym_PC_LBRACK_RBRACK,
  [545] = 3,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(216), 3,
      anon_sym_RAM,
      aux_sym_register_reference_token1,
      sym_pin_reference,
    ACTIONS(214), 4,
      anon_sym_SEMI,
      anon_sym_DRegister_LBRACK_RBRACK,
      anon_sym_ARegister_LBRACK_RBRACK,
      anon_sym_PC_LBRACK_RBRACK,
  [560] = 5,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(220), 1,
      aux_sym_number_token1,
    STATE(44), 1,
      sym_number,
    STATE(45), 1,
      sym_value,
    ACTIONS(218), 2,
      sym_binary_value,
      sym_string,
  [577] = 3,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(220), 1,
      aux_sym_number_token1,
    STATE(37), 1,
      sym_number,
  [587] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(222), 2,
      anon_sym_COMMA,
      anon_sym_LBRACE,
  [595] = 3,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(224), 1,
      aux_sym_number_token1,
    STATE(50), 1,
      sym_index,
  [605] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(226), 1,
      anon_sym_LBRACE,
  [612] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(228), 1,
      anon_sym_COMMA,
  [619] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(230), 1,
      anon_sym_COMMA,
  [626] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(232), 1,
      anon_sym_COMMA,
  [633] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(234), 1,
      sym_filename,
  [640] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(236), 1,
      anon_sym_COMMA,
  [647] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(238), 1,
      anon_sym_LBRACK,
  [654] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(240), 1,
      anon_sym_COMMA,
  [661] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(242), 1,
      anon_sym_COMMA,
  [668] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(244), 1,
      sym_string,
  [675] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(246), 1,
      anon_sym_SEMI,
  [682] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(248), 1,
      ts_builtin_sym_end,
  [689] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(250), 1,
      anon_sym_RBRACK,
  [696] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(252), 1,
      anon_sym_RBRACK,
  [703] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(254), 1,
      anon_sym_SEMI,
  [710] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(256), 1,
      anon_sym_LBRACE,
  [717] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(258), 1,
      anon_sym_COMMA,
  [724] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(260), 1,
      anon_sym_SEMI,
  [731] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(262), 1,
      anon_sym_COMMA,
  [738] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(264), 1,
      sym_filename,
  [745] = 2,
    ACTIONS(266), 1,
      sym_condition,
    ACTIONS(268), 1,
      sym_comment,
  [752] = 2,
    ACTIONS(3), 1,
      sym_comment,
    ACTIONS(270), 1,
      sym_filename,
};

static const uint32_t ts_small_parse_table_map[] = {
  [SMALL_STATE(8)] = 0,
  [SMALL_STATE(9)] = 22,
  [SMALL_STATE(10)] = 44,
  [SMALL_STATE(11)] = 66,
  [SMALL_STATE(12)] = 88,
  [SMALL_STATE(13)] = 110,
  [SMALL_STATE(14)] = 132,
  [SMALL_STATE(15)] = 154,
  [SMALL_STATE(16)] = 176,
  [SMALL_STATE(17)] = 198,
  [SMALL_STATE(18)] = 220,
  [SMALL_STATE(19)] = 242,
  [SMALL_STATE(20)] = 264,
  [SMALL_STATE(21)] = 286,
  [SMALL_STATE(22)] = 308,
  [SMALL_STATE(23)] = 330,
  [SMALL_STATE(24)] = 352,
  [SMALL_STATE(25)] = 384,
  [SMALL_STATE(26)] = 416,
  [SMALL_STATE(27)] = 435,
  [SMALL_STATE(28)] = 454,
  [SMALL_STATE(29)] = 483,
  [SMALL_STATE(30)] = 502,
  [SMALL_STATE(31)] = 527,
  [SMALL_STATE(32)] = 545,
  [SMALL_STATE(33)] = 560,
  [SMALL_STATE(34)] = 577,
  [SMALL_STATE(35)] = 587,
  [SMALL_STATE(36)] = 595,
  [SMALL_STATE(37)] = 605,
  [SMALL_STATE(38)] = 612,
  [SMALL_STATE(39)] = 619,
  [SMALL_STATE(40)] = 626,
  [SMALL_STATE(41)] = 633,
  [SMALL_STATE(42)] = 640,
  [SMALL_STATE(43)] = 647,
  [SMALL_STATE(44)] = 654,
  [SMALL_STATE(45)] = 661,
  [SMALL_STATE(46)] = 668,
  [SMALL_STATE(47)] = 675,
  [SMALL_STATE(48)] = 682,
  [SMALL_STATE(49)] = 689,
  [SMALL_STATE(50)] = 696,
  [SMALL_STATE(51)] = 703,
  [SMALL_STATE(52)] = 710,
  [SMALL_STATE(53)] = 717,
  [SMALL_STATE(54)] = 724,
  [SMALL_STATE(55)] = 731,
  [SMALL_STATE(56)] = 738,
  [SMALL_STATE(57)] = 745,
  [SMALL_STATE(58)] = 752,
};

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(58),
  [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(41),
  [11] = {.entry = {.count = 1, .reusable = false}}, SHIFT(56),
  [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(28),
  [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(47),
  [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(53),
  [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(55),
  [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(51),
  [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(38),
  [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(30),
  [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(34),
  [29] = {.entry = {.count = 1, .reusable = false}}, SHIFT(57),
  [31] = {.entry = {.count = 1, .reusable = false}}, SHIFT(46),
  [33] = {.entry = {.count = 1, .reusable = false}}, SHIFT(3),
  [35] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3),
  [37] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0),
  [39] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(58),
  [42] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(41),
  [45] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(56),
  [48] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(28),
  [51] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(47),
  [54] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(53),
  [57] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(55),
  [60] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(51),
  [63] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(38),
  [66] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(30),
  [69] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(34),
  [72] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0),
  [74] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(57),
  [77] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(46),
  [80] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(2),
  [83] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(2),
  [86] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0),
  [88] = {.entry = {.count = 1, .reusable = false}}, SHIFT(2),
  [90] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2),
  [92] = {.entry = {.count = 1, .reusable = false}}, SHIFT(21),
  [94] = {.entry = {.count = 1, .reusable = false}}, SHIFT(6),
  [96] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6),
  [98] = {.entry = {.count = 1, .reusable = false}}, SHIFT(19),
  [100] = {.entry = {.count = 1, .reusable = false}}, SHIFT(7),
  [102] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7),
  [104] = {.entry = {.count = 1, .reusable = false}}, SHIFT(23),
  [106] = {.entry = {.count = 1, .reusable = false}}, SHIFT(9),
  [108] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tock_command, 2, 0, 0),
  [110] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tock_command, 2, 0, 0),
  [112] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_command, 5, 0, 0),
  [114] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_while_command, 5, 0, 0),
  [116] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ticktock_command, 2, 0, 0),
  [118] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ticktock_command, 2, 0, 0),
  [120] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tick_command, 2, 0, 0),
  [122] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tick_command, 2, 0, 0),
  [124] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_command, 1, 0, 0),
  [126] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_command, 1, 0, 0),
  [128] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_output_command, 2, 0, 0),
  [130] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_output_command, 2, 0, 0),
  [132] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_eval_command, 2, 0, 0),
  [134] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_eval_command, 2, 0, 0),
  [136] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_load_command, 3, 0, 0),
  [138] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_load_command, 3, 0, 0),
  [140] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_output_file_command, 3, 0, 0),
  [142] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_output_file_command, 3, 0, 0),
  [144] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_compare_to_command, 3, 0, 0),
  [146] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_compare_to_command, 3, 0, 0),
  [148] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_echo_command, 3, 0, 0),
  [150] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_echo_command, 3, 0, 0),
  [152] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_command, 4, 0, 0),
  [154] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_while_command, 4, 0, 0),
  [156] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_output_list_command, 3, 0, 0),
  [158] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_output_list_command, 3, 0, 0),
  [160] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_repeat_command, 4, 0, 0),
  [162] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_repeat_command, 4, 0, 0),
  [164] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_set_command, 4, 0, 0),
  [166] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_set_command, 4, 0, 0),
  [168] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_repeat_command, 5, 0, 0),
  [170] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_repeat_command, 5, 0, 0),
  [172] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20),
  [174] = {.entry = {.count = 1, .reusable = false}}, SHIFT(43),
  [176] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26),
  [178] = {.entry = {.count = 1, .reusable = false}}, SHIFT(26),
  [180] = {.entry = {.count = 1, .reusable = false}}, SHIFT(27),
  [182] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_output_list_command_repeat1, 2, 0, 0),
  [184] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_output_list_command_repeat1, 2, 0, 0), SHIFT_REPEAT(43),
  [187] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_output_list_command_repeat1, 2, 0, 0), SHIFT_REPEAT(26),
  [190] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_output_list_command_repeat1, 2, 0, 0), SHIFT_REPEAT(26),
  [193] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_output_list_command_repeat1, 2, 0, 0), SHIFT_REPEAT(27),
  [196] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_register_reference, 1, 0, 0),
  [198] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_register_reference, 1, 0, 0),
  [200] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_reference, 1, 0, 0),
  [202] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_variable_reference, 1, 0, 0),
  [204] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_memory_reference, 4, 0, 0),
  [206] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_memory_reference, 4, 0, 0),
  [208] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_output_spec, 1, 0, 0),
  [210] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_output_spec, 1, 0, 0),
  [212] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32),
  [214] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_output_spec, 2, 0, 0),
  [216] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_output_spec, 2, 0, 0),
  [218] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44),
  [220] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35),
  [222] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_number, 1, 0, 0),
  [224] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49),
  [226] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4),
  [228] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14),
  [230] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15),
  [232] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16),
  [234] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40),
  [236] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17),
  [238] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36),
  [240] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_value, 1, 0, 0),
  [242] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22),
  [244] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54),
  [246] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13),
  [248] = {.entry = {.count = 1, .reusable = true}},  ACCEPT_INPUT(),
  [250] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_index, 1, 0, 0),
  [252] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29),
  [254] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10),
  [256] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5),
  [258] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11),
  [260] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18),
  [262] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8),
  [264] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42),
  [266] = {.entry = {.count = 1, .reusable = false}}, SHIFT(52),
  [268] = {.entry = {.count = 1, .reusable = false}}, SHIFT_EXTRA(),
  [270] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39),
};

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