#include "tree_sitter/parser.h"

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

#define LANGUAGE_VERSION 14
#define STATE_COUNT 115
#define LARGE_STATE_COUNT 3
#define SYMBOL_COUNT 40
#define ALIAS_COUNT 1
#define TOKEN_COUNT 16
#define EXTERNAL_TOKEN_COUNT 0
#define FIELD_COUNT 14
#define MAX_ALIAS_SEQUENCE_LENGTH 6
#define PRODUCTION_ID_COUNT 14

enum ts_symbol_identifiers {
  aux_sym_float_token1 = 1,
  aux_sym_unit_token1 = 2,
  anon_sym_u00b0 = 3,
  anon_sym_PERCENT = 4,
  anon_sym_COMMA = 5,
  anon_sym_LPAREN = 6,
  anon_sym_RPAREN = 7,
  anon_sym_DOT = 8,
  sym_NAME = 9,
  sym__DIGITS = 10,
  sym_PLUS = 11,
  sym_MINUS = 12,
  sym_TIMES = 13,
  sym_DIVIDE = 14,
  sym_POWER = 15,
  sym_expression = 16,
  sym__sub_expression = 17,
  sym_parenthesized_expression = 18,
  sym_variable = 19,
  sym__scalar = 20,
  sym__number = 21,
  sym_integer = 22,
  sym_float = 23,
  sym_quantity = 24,
  sym_units = 25,
  aux_sym__units_mult_part = 26,
  aux_sym__units_div_part = 27,
  sym_unit_term = 28,
  sym_unit = 29,
  sym_call = 30,
  sym_args = 31,
  sym_binary_operator = 32,
  sym_unary_operator = 33,
  sym__sign = 34,
  sym__LPAREN = 35,
  sym__RPAREN = 36,
  sym__DOT = 37,
  aux_sym_variable_repeat1 = 38,
  aux_sym_args_repeat1 = 39,
  anon_alias_sym_sign = 40,
};

static const char * const ts_symbol_names[] = {
  [ts_builtin_sym_end] = "end",
  [aux_sym_float_token1] = "float_token1",
  [aux_sym_unit_token1] = "unit_token1",
  [anon_sym_u00b0] = "\u00b0",
  [anon_sym_PERCENT] = "%",
  [anon_sym_COMMA] = ",",
  [anon_sym_LPAREN] = "(",
  [anon_sym_RPAREN] = ")",
  [anon_sym_DOT] = ".",
  [sym_NAME] = "NAME",
  [sym__DIGITS] = "_DIGITS",
  [sym_PLUS] = "PLUS",
  [sym_MINUS] = "MINUS",
  [sym_TIMES] = "TIMES",
  [sym_DIVIDE] = "DIVIDE",
  [sym_POWER] = "POWER",
  [sym_expression] = "expression",
  [sym__sub_expression] = "_sub_expression",
  [sym_parenthesized_expression] = "parenthesized_expression",
  [sym_variable] = "variable",
  [sym__scalar] = "_scalar",
  [sym__number] = "_number",
  [sym_integer] = "integer",
  [sym_float] = "float",
  [sym_quantity] = "quantity",
  [sym_units] = "units",
  [aux_sym__units_mult_part] = "_units_mult_part",
  [aux_sym__units_div_part] = "_units_div_part",
  [sym_unit_term] = "unit_term",
  [sym_unit] = "unit",
  [sym_call] = "call",
  [sym_args] = "args",
  [sym_binary_operator] = "binary_operator",
  [sym_unary_operator] = "unary_operator",
  [sym__sign] = "_sign",
  [sym__LPAREN] = "_LPAREN",
  [sym__RPAREN] = "_RPAREN",
  [sym__DOT] = "_DOT",
  [aux_sym_variable_repeat1] = "variable_repeat1",
  [aux_sym_args_repeat1] = "args_repeat1",
  [anon_alias_sym_sign] = "sign",
};

static const TSSymbol ts_symbol_map[] = {
  [ts_builtin_sym_end] = ts_builtin_sym_end,
  [aux_sym_float_token1] = aux_sym_float_token1,
  [aux_sym_unit_token1] = aux_sym_unit_token1,
  [anon_sym_u00b0] = anon_sym_u00b0,
  [anon_sym_PERCENT] = anon_sym_PERCENT,
  [anon_sym_COMMA] = anon_sym_COMMA,
  [anon_sym_LPAREN] = anon_sym_LPAREN,
  [anon_sym_RPAREN] = anon_sym_RPAREN,
  [anon_sym_DOT] = anon_sym_DOT,
  [sym_NAME] = sym_NAME,
  [sym__DIGITS] = sym__DIGITS,
  [sym_PLUS] = sym_PLUS,
  [sym_MINUS] = sym_MINUS,
  [sym_TIMES] = sym_TIMES,
  [sym_DIVIDE] = sym_DIVIDE,
  [sym_POWER] = sym_POWER,
  [sym_expression] = sym_expression,
  [sym__sub_expression] = sym__sub_expression,
  [sym_parenthesized_expression] = sym_parenthesized_expression,
  [sym_variable] = sym_variable,
  [sym__scalar] = sym__scalar,
  [sym__number] = sym__number,
  [sym_integer] = sym_integer,
  [sym_float] = sym_float,
  [sym_quantity] = sym_quantity,
  [sym_units] = sym_units,
  [aux_sym__units_mult_part] = aux_sym__units_mult_part,
  [aux_sym__units_div_part] = aux_sym__units_div_part,
  [sym_unit_term] = sym_unit_term,
  [sym_unit] = sym_unit,
  [sym_call] = sym_call,
  [sym_args] = sym_args,
  [sym_binary_operator] = sym_binary_operator,
  [sym_unary_operator] = sym_unary_operator,
  [sym__sign] = sym__sign,
  [sym__LPAREN] = sym__LPAREN,
  [sym__RPAREN] = sym__RPAREN,
  [sym__DOT] = sym__DOT,
  [aux_sym_variable_repeat1] = aux_sym_variable_repeat1,
  [aux_sym_args_repeat1] = aux_sym_args_repeat1,
  [anon_alias_sym_sign] = anon_alias_sym_sign,
};

static const TSSymbolMetadata ts_symbol_metadata[] = {
  [ts_builtin_sym_end] = {
    .visible = false,
    .named = true,
  },
  [aux_sym_float_token1] = {
    .visible = false,
    .named = false,
  },
  [aux_sym_unit_token1] = {
    .visible = false,
    .named = false,
  },
  [anon_sym_u00b0] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_PERCENT] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_COMMA] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_LPAREN] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_RPAREN] = {
    .visible = true,
    .named = false,
  },
  [anon_sym_DOT] = {
    .visible = true,
    .named = false,
  },
  [sym_NAME] = {
    .visible = true,
    .named = true,
  },
  [sym__DIGITS] = {
    .visible = false,
    .named = true,
  },
  [sym_PLUS] = {
    .visible = true,
    .named = true,
  },
  [sym_MINUS] = {
    .visible = true,
    .named = true,
  },
  [sym_TIMES] = {
    .visible = true,
    .named = true,
  },
  [sym_DIVIDE] = {
    .visible = true,
    .named = true,
  },
  [sym_POWER] = {
    .visible = true,
    .named = true,
  },
  [sym_expression] = {
    .visible = true,
    .named = true,
  },
  [sym__sub_expression] = {
    .visible = false,
    .named = true,
  },
  [sym_parenthesized_expression] = {
    .visible = true,
    .named = true,
  },
  [sym_variable] = {
    .visible = true,
    .named = true,
  },
  [sym__scalar] = {
    .visible = false,
    .named = true,
  },
  [sym__number] = {
    .visible = false,
    .named = true,
  },
  [sym_integer] = {
    .visible = true,
    .named = true,
  },
  [sym_float] = {
    .visible = true,
    .named = true,
  },
  [sym_quantity] = {
    .visible = true,
    .named = true,
  },
  [sym_units] = {
    .visible = true,
    .named = true,
  },
  [aux_sym__units_mult_part] = {
    .visible = false,
    .named = false,
  },
  [aux_sym__units_div_part] = {
    .visible = false,
    .named = false,
  },
  [sym_unit_term] = {
    .visible = true,
    .named = true,
  },
  [sym_unit] = {
    .visible = true,
    .named = true,
  },
  [sym_call] = {
    .visible = true,
    .named = true,
  },
  [sym_args] = {
    .visible = true,
    .named = true,
  },
  [sym_binary_operator] = {
    .visible = true,
    .named = true,
  },
  [sym_unary_operator] = {
    .visible = true,
    .named = true,
  },
  [sym__sign] = {
    .visible = false,
    .named = true,
  },
  [sym__LPAREN] = {
    .visible = false,
    .named = true,
  },
  [sym__RPAREN] = {
    .visible = false,
    .named = true,
  },
  [sym__DOT] = {
    .visible = false,
    .named = true,
  },
  [aux_sym_variable_repeat1] = {
    .visible = false,
    .named = false,
  },
  [aux_sym_args_repeat1] = {
    .visible = false,
    .named = false,
  },
  [anon_alias_sym_sign] = {
    .visible = true,
    .named = false,
  },
};

enum ts_field_identifiers {
  field_args = 1,
  field_divisive = 2,
  field_exponent = 3,
  field_expression = 4,
  field_first = 5,
  field_function = 6,
  field_left = 7,
  field_magnitude = 8,
  field_multiplicative = 9,
  field_operand = 10,
  field_operator = 11,
  field_right = 12,
  field_unit = 13,
  field_units = 14,
};

static const char * const ts_field_names[] = {
  [0] = NULL,
  [field_args] = "args",
  [field_divisive] = "divisive",
  [field_exponent] = "exponent",
  [field_expression] = "expression",
  [field_first] = "first",
  [field_function] = "function",
  [field_left] = "left",
  [field_magnitude] = "magnitude",
  [field_multiplicative] = "multiplicative",
  [field_operand] = "operand",
  [field_operator] = "operator",
  [field_right] = "right",
  [field_unit] = "unit",
  [field_units] = "units",
};

static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = {
  [2] = {.index = 0, .length = 2},
  [3] = {.index = 2, .length = 1},
  [4] = {.index = 3, .length = 1},
  [5] = {.index = 4, .length = 2},
  [6] = {.index = 6, .length = 1},
  [7] = {.index = 7, .length = 3},
  [8] = {.index = 10, .length = 2},
  [9] = {.index = 12, .length = 2},
  [10] = {.index = 14, .length = 1},
  [11] = {.index = 15, .length = 2},
  [12] = {.index = 17, .length = 3},
  [13] = {.index = 20, .length = 2},
};

static const TSFieldMapEntry ts_field_map_entries[] = {
  [0] =
    {field_magnitude, 0},
    {field_units, 1},
  [2] =
    {field_first, 0},
  [3] =
    {field_unit, 0},
  [4] =
    {field_operand, 1},
    {field_operator, 0},
  [6] =
    {field_function, 0},
  [7] =
    {field_left, 0},
    {field_operator, 1},
    {field_right, 2},
  [10] =
    {field_first, 0},
    {field_multiplicative, 1},
  [12] =
    {field_divisive, 1},
    {field_first, 0},
  [14] =
    {field_expression, 1},
  [15] =
    {field_args, 2},
    {field_function, 0},
  [17] =
    {field_divisive, 2},
    {field_first, 0},
    {field_multiplicative, 1},
  [20] =
    {field_exponent, 2},
    {field_unit, 0},
};

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

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] = 6,
  [10] = 5,
  [11] = 3,
  [12] = 7,
  [13] = 13,
  [14] = 14,
  [15] = 15,
  [16] = 14,
  [17] = 13,
  [18] = 18,
  [19] = 19,
  [20] = 20,
  [21] = 21,
  [22] = 22,
  [23] = 23,
  [24] = 18,
  [25] = 19,
  [26] = 20,
  [27] = 21,
  [28] = 28,
  [29] = 29,
  [30] = 30,
  [31] = 23,
  [32] = 32,
  [33] = 33,
  [34] = 22,
  [35] = 35,
  [36] = 36,
  [37] = 37,
  [38] = 38,
  [39] = 39,
  [40] = 40,
  [41] = 39,
  [42] = 42,
  [43] = 38,
  [44] = 35,
  [45] = 32,
  [46] = 46,
  [47] = 37,
  [48] = 36,
  [49] = 49,
  [50] = 50,
  [51] = 51,
  [52] = 40,
  [53] = 53,
  [54] = 54,
  [55] = 28,
  [56] = 29,
  [57] = 54,
  [58] = 42,
  [59] = 59,
  [60] = 46,
  [61] = 49,
  [62] = 50,
  [63] = 51,
  [64] = 64,
  [65] = 65,
  [66] = 66,
  [67] = 53,
  [68] = 68,
  [69] = 69,
  [70] = 70,
  [71] = 71,
  [72] = 72,
  [73] = 73,
  [74] = 74,
  [75] = 75,
  [76] = 76,
  [77] = 77,
  [78] = 78,
  [79] = 79,
  [80] = 80,
  [81] = 75,
  [82] = 77,
  [83] = 76,
  [84] = 74,
  [85] = 78,
  [86] = 86,
  [87] = 87,
  [88] = 87,
  [89] = 89,
  [90] = 90,
  [91] = 90,
  [92] = 92,
  [93] = 93,
  [94] = 94,
  [95] = 95,
  [96] = 96,
  [97] = 97,
  [98] = 98,
  [99] = 99,
  [100] = 100,
  [101] = 101,
  [102] = 102,
  [103] = 103,
  [104] = 104,
  [105] = 105,
  [106] = 98,
  [107] = 95,
  [108] = 96,
  [109] = 103,
  [110] = 100,
  [111] = 105,
  [112] = 99,
  [113] = 102,
  [114] = 97,
};

static bool ts_lex(TSLexer *lexer, TSStateId state) {
  START_LEXER();
  eof = lexer->eof(lexer);
  switch (state) {
    case 0:
      if (eof) ADVANCE(3);
      ADVANCE_MAP(
        '%', 8,
        '(', 10,
        ')', 11,
        '*', 18,
        '+', 16,
        ',', 9,
        '-', 17,
        '.', 12,
        '/', 19,
        0xb0, 7,
        'E', 5,
        'e', 5,
      );
      if (('\t' <= lookahead && lookahead <= '\r') ||
          lookahead == ' ') SKIP(0);
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(14);
      if (('A' <= lookahead && lookahead <= 'Z') ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(6);
      END_STATE();
    case 1:
      if (lookahead == '(') ADVANCE(10);
      if (lookahead == ')') ADVANCE(11);
      if (lookahead == '+') ADVANCE(16);
      if (lookahead == '-') ADVANCE(17);
      if (lookahead == '.') ADVANCE(12);
      if (('\t' <= lookahead && lookahead <= '\r') ||
          lookahead == ' ') SKIP(1);
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(14);
      if (('A' <= lookahead && lookahead <= 'Z') ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(13);
      END_STATE();
    case 2:
      if (eof) ADVANCE(3);
      ADVANCE_MAP(
        '%', 8,
        ')', 11,
        '*', 18,
        '+', 16,
        ',', 9,
        '-', 17,
        '/', 19,
        0xb0, 7,
      );
      if (('\t' <= lookahead && lookahead <= '\r') ||
          lookahead == ' ') SKIP(2);
      if (('A' <= lookahead && lookahead <= 'Z') ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(6);
      END_STATE();
    case 3:
      ACCEPT_TOKEN(ts_builtin_sym_end);
      END_STATE();
    case 4:
      ACCEPT_TOKEN(aux_sym_float_token1);
      END_STATE();
    case 5:
      ACCEPT_TOKEN(aux_sym_float_token1);
      if (lookahead == '+' ||
          lookahead == '-') ADVANCE(4);
      if (('A' <= lookahead && lookahead <= 'Z') ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(6);
      END_STATE();
    case 6:
      ACCEPT_TOKEN(aux_sym_unit_token1);
      if (('A' <= lookahead && lookahead <= 'Z') ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(6);
      END_STATE();
    case 7:
      ACCEPT_TOKEN(anon_sym_u00b0);
      END_STATE();
    case 8:
      ACCEPT_TOKEN(anon_sym_PERCENT);
      END_STATE();
    case 9:
      ACCEPT_TOKEN(anon_sym_COMMA);
      END_STATE();
    case 10:
      ACCEPT_TOKEN(anon_sym_LPAREN);
      END_STATE();
    case 11:
      ACCEPT_TOKEN(anon_sym_RPAREN);
      END_STATE();
    case 12:
      ACCEPT_TOKEN(anon_sym_DOT);
      END_STATE();
    case 13:
      ACCEPT_TOKEN(sym_NAME);
      if (('0' <= lookahead && lookahead <= '9') ||
          ('A' <= lookahead && lookahead <= 'Z') ||
          lookahead == '_' ||
          ('a' <= lookahead && lookahead <= 'z')) ADVANCE(13);
      END_STATE();
    case 14:
      ACCEPT_TOKEN(sym__DIGITS);
      if (lookahead == '_') ADVANCE(15);
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(14);
      END_STATE();
    case 15:
      ACCEPT_TOKEN(sym__DIGITS);
      if (('0' <= lookahead && lookahead <= '9')) ADVANCE(14);
      END_STATE();
    case 16:
      ACCEPT_TOKEN(sym_PLUS);
      END_STATE();
    case 17:
      ACCEPT_TOKEN(sym_MINUS);
      END_STATE();
    case 18:
      ACCEPT_TOKEN(sym_TIMES);
      if (lookahead == '*') ADVANCE(20);
      END_STATE();
    case 19:
      ACCEPT_TOKEN(sym_DIVIDE);
      END_STATE();
    case 20:
      ACCEPT_TOKEN(sym_POWER);
      END_STATE();
    default:
      return false;
  }
}

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

static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = {
  [0] = {
    [ts_builtin_sym_end] = ACTIONS(1),
    [aux_sym_float_token1] = ACTIONS(1),
    [aux_sym_unit_token1] = ACTIONS(1),
    [anon_sym_u00b0] = ACTIONS(1),
    [anon_sym_PERCENT] = ACTIONS(1),
    [anon_sym_COMMA] = ACTIONS(1),
    [anon_sym_LPAREN] = ACTIONS(1),
    [anon_sym_RPAREN] = ACTIONS(1),
    [anon_sym_DOT] = ACTIONS(1),
    [sym__DIGITS] = ACTIONS(1),
    [sym_PLUS] = ACTIONS(1),
    [sym_MINUS] = ACTIONS(1),
    [sym_TIMES] = ACTIONS(1),
    [sym_DIVIDE] = ACTIONS(1),
    [sym_POWER] = ACTIONS(1),
  },
  [1] = {
    [sym_expression] = STATE(104),
    [sym__sub_expression] = STATE(86),
    [sym_parenthesized_expression] = STATE(86),
    [sym_variable] = STATE(86),
    [sym__scalar] = STATE(86),
    [sym__number] = STATE(86),
    [sym_integer] = STATE(86),
    [sym_float] = STATE(26),
    [sym_quantity] = STATE(86),
    [sym_call] = STATE(86),
    [sym_binary_operator] = STATE(86),
    [sym_unary_operator] = STATE(86),
    [sym__sign] = STATE(3),
    [sym__LPAREN] = STATE(4),
    [sym__DOT] = STATE(98),
    [anon_sym_LPAREN] = ACTIONS(3),
    [anon_sym_DOT] = ACTIONS(5),
    [sym_NAME] = ACTIONS(7),
    [sym__DIGITS] = ACTIONS(9),
    [sym_PLUS] = ACTIONS(11),
    [sym_MINUS] = ACTIONS(11),
  },
  [2] = {
    [sym__sub_expression] = STATE(69),
    [sym_parenthesized_expression] = STATE(69),
    [sym_variable] = STATE(69),
    [sym__scalar] = STATE(69),
    [sym__number] = STATE(69),
    [sym_integer] = STATE(69),
    [sym_float] = STATE(20),
    [sym_quantity] = STATE(69),
    [sym_call] = STATE(69),
    [sym_args] = STATE(94),
    [sym_binary_operator] = STATE(69),
    [sym_unary_operator] = STATE(69),
    [sym__sign] = STATE(11),
    [sym__LPAREN] = STATE(4),
    [sym__RPAREN] = STATE(71),
    [sym__DOT] = STATE(106),
    [anon_sym_LPAREN] = ACTIONS(3),
    [anon_sym_RPAREN] = ACTIONS(13),
    [anon_sym_DOT] = ACTIONS(15),
    [sym_NAME] = ACTIONS(7),
    [sym__DIGITS] = ACTIONS(17),
    [sym_PLUS] = ACTIONS(19),
    [sym_MINUS] = ACTIONS(19),
  },
};

static const uint16_t ts_small_parse_table[] = {
  [0] = 10,
    ACTIONS(3), 1,
      anon_sym_LPAREN,
    ACTIONS(5), 1,
      anon_sym_DOT,
    ACTIONS(7), 1,
      sym_NAME,
    ACTIONS(9), 1,
      sym__DIGITS,
    STATE(3), 1,
      sym__sign,
    STATE(4), 1,
      sym__LPAREN,
    STATE(26), 1,
      sym_float,
    STATE(98), 1,
      sym__DOT,
    ACTIONS(11), 2,
      sym_PLUS,
      sym_MINUS,
    STATE(84), 10,
      sym__sub_expression,
      sym_parenthesized_expression,
      sym_variable,
      sym__scalar,
      sym__number,
      sym_integer,
      sym_quantity,
      sym_call,
      sym_binary_operator,
      sym_unary_operator,
  [41] = 10,
    ACTIONS(3), 1,
      anon_sym_LPAREN,
    ACTIONS(7), 1,
      sym_NAME,
    ACTIONS(15), 1,
      anon_sym_DOT,
    ACTIONS(17), 1,
      sym__DIGITS,
    STATE(4), 1,
      sym__LPAREN,
    STATE(11), 1,
      sym__sign,
    STATE(20), 1,
      sym_float,
    STATE(106), 1,
      sym__DOT,
    ACTIONS(19), 2,
      sym_PLUS,
      sym_MINUS,
    STATE(79), 10,
      sym__sub_expression,
      sym_parenthesized_expression,
      sym_variable,
      sym__scalar,
      sym__number,
      sym_integer,
      sym_quantity,
      sym_call,
      sym_binary_operator,
      sym_unary_operator,
  [82] = 10,
    ACTIONS(3), 1,
      anon_sym_LPAREN,
    ACTIONS(5), 1,
      anon_sym_DOT,
    ACTIONS(7), 1,
      sym_NAME,
    ACTIONS(9), 1,
      sym__DIGITS,
    STATE(3), 1,
      sym__sign,
    STATE(4), 1,
      sym__LPAREN,
    STATE(26), 1,
      sym_float,
    STATE(98), 1,
      sym__DOT,
    ACTIONS(11), 2,
      sym_PLUS,
      sym_MINUS,
    STATE(85), 10,
      sym__sub_expression,
      sym_parenthesized_expression,
      sym_variable,
      sym__scalar,
      sym__number,
      sym_integer,
      sym_quantity,
      sym_call,
      sym_binary_operator,
      sym_unary_operator,
  [123] = 10,
    ACTIONS(3), 1,
      anon_sym_LPAREN,
    ACTIONS(5), 1,
      anon_sym_DOT,
    ACTIONS(7), 1,
      sym_NAME,
    ACTIONS(9), 1,
      sym__DIGITS,
    STATE(3), 1,
      sym__sign,
    STATE(4), 1,
      sym__LPAREN,
    STATE(26), 1,
      sym_float,
    STATE(98), 1,
      sym__DOT,
    ACTIONS(11), 2,
      sym_PLUS,
      sym_MINUS,
    STATE(83), 10,
      sym__sub_expression,
      sym_parenthesized_expression,
      sym_variable,
      sym__scalar,
      sym__number,
      sym_integer,
      sym_quantity,
      sym_call,
      sym_binary_operator,
      sym_unary_operator,
  [164] = 10,
    ACTIONS(3), 1,
      anon_sym_LPAREN,
    ACTIONS(5), 1,
      anon_sym_DOT,
    ACTIONS(7), 1,
      sym_NAME,
    ACTIONS(9), 1,
      sym__DIGITS,
    STATE(3), 1,
      sym__sign,
    STATE(4), 1,
      sym__LPAREN,
    STATE(26), 1,
      sym_float,
    STATE(98), 1,
      sym__DOT,
    ACTIONS(11), 2,
      sym_PLUS,
      sym_MINUS,
    STATE(82), 10,
      sym__sub_expression,
      sym_parenthesized_expression,
      sym_variable,
      sym__scalar,
      sym__number,
      sym_integer,
      sym_quantity,
      sym_call,
      sym_binary_operator,
      sym_unary_operator,
  [205] = 10,
    ACTIONS(3), 1,
      anon_sym_LPAREN,
    ACTIONS(7), 1,
      sym_NAME,
    ACTIONS(15), 1,
      anon_sym_DOT,
    ACTIONS(17), 1,
      sym__DIGITS,
    STATE(4), 1,
      sym__LPAREN,
    STATE(11), 1,
      sym__sign,
    STATE(20), 1,
      sym_float,
    STATE(106), 1,
      sym__DOT,
    ACTIONS(19), 2,
      sym_PLUS,
      sym_MINUS,
    STATE(80), 10,
      sym__sub_expression,
      sym_parenthesized_expression,
      sym_variable,
      sym__scalar,
      sym__number,
      sym_integer,
      sym_quantity,
      sym_call,
      sym_binary_operator,
      sym_unary_operator,
  [246] = 10,
    ACTIONS(3), 1,
      anon_sym_LPAREN,
    ACTIONS(7), 1,
      sym_NAME,
    ACTIONS(15), 1,
      anon_sym_DOT,
    ACTIONS(17), 1,
      sym__DIGITS,
    STATE(4), 1,
      sym__LPAREN,
    STATE(11), 1,
      sym__sign,
    STATE(20), 1,
      sym_float,
    STATE(106), 1,
      sym__DOT,
    ACTIONS(19), 2,
      sym_PLUS,
      sym_MINUS,
    STATE(76), 10,
      sym__sub_expression,
      sym_parenthesized_expression,
      sym_variable,
      sym__scalar,
      sym__number,
      sym_integer,
      sym_quantity,
      sym_call,
      sym_binary_operator,
      sym_unary_operator,
  [287] = 10,
    ACTIONS(3), 1,
      anon_sym_LPAREN,
    ACTIONS(7), 1,
      sym_NAME,
    ACTIONS(15), 1,
      anon_sym_DOT,
    ACTIONS(17), 1,
      sym__DIGITS,
    STATE(4), 1,
      sym__LPAREN,
    STATE(11), 1,
      sym__sign,
    STATE(20), 1,
      sym_float,
    STATE(106), 1,
      sym__DOT,
    ACTIONS(19), 2,
      sym_PLUS,
      sym_MINUS,
    STATE(78), 10,
      sym__sub_expression,
      sym_parenthesized_expression,
      sym_variable,
      sym__scalar,
      sym__number,
      sym_integer,
      sym_quantity,
      sym_call,
      sym_binary_operator,
      sym_unary_operator,
  [328] = 10,
    ACTIONS(3), 1,
      anon_sym_LPAREN,
    ACTIONS(7), 1,
      sym_NAME,
    ACTIONS(15), 1,
      anon_sym_DOT,
    ACTIONS(17), 1,
      sym__DIGITS,
    STATE(4), 1,
      sym__LPAREN,
    STATE(11), 1,
      sym__sign,
    STATE(20), 1,
      sym_float,
    STATE(106), 1,
      sym__DOT,
    ACTIONS(19), 2,
      sym_PLUS,
      sym_MINUS,
    STATE(74), 10,
      sym__sub_expression,
      sym_parenthesized_expression,
      sym_variable,
      sym__scalar,
      sym__number,
      sym_integer,
      sym_quantity,
      sym_call,
      sym_binary_operator,
      sym_unary_operator,
  [369] = 10,
    ACTIONS(3), 1,
      anon_sym_LPAREN,
    ACTIONS(7), 1,
      sym_NAME,
    ACTIONS(15), 1,
      anon_sym_DOT,
    ACTIONS(17), 1,
      sym__DIGITS,
    STATE(4), 1,
      sym__LPAREN,
    STATE(11), 1,
      sym__sign,
    STATE(20), 1,
      sym_float,
    STATE(106), 1,
      sym__DOT,
    ACTIONS(19), 2,
      sym_PLUS,
      sym_MINUS,
    STATE(77), 10,
      sym__sub_expression,
      sym_parenthesized_expression,
      sym_variable,
      sym__scalar,
      sym__number,
      sym_integer,
      sym_quantity,
      sym_call,
      sym_binary_operator,
      sym_unary_operator,
  [410] = 7,
    ACTIONS(25), 1,
      sym_TIMES,
    ACTIONS(27), 1,
      sym_DIVIDE,
    STATE(45), 1,
      sym_unit,
    STATE(64), 1,
      aux_sym__units_div_part,
    STATE(21), 2,
      aux_sym__units_mult_part,
      sym_unit_term,
    ACTIONS(21), 3,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
    ACTIONS(23), 5,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_POWER,
  [439] = 7,
    ACTIONS(25), 1,
      sym_TIMES,
    ACTIONS(27), 1,
      sym_DIVIDE,
    STATE(45), 1,
      sym_unit,
    STATE(66), 1,
      aux_sym__units_div_part,
    STATE(13), 2,
      aux_sym__units_mult_part,
      sym_unit_term,
    ACTIONS(21), 3,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
    ACTIONS(29), 5,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_POWER,
  [468] = 7,
    ACTIONS(33), 1,
      anon_sym_LPAREN,
    ACTIONS(35), 1,
      anon_sym_DOT,
    ACTIONS(37), 1,
      sym_TIMES,
    STATE(2), 1,
      sym__LPAREN,
    STATE(30), 1,
      aux_sym_variable_repeat1,
    STATE(101), 1,
      sym__DOT,
    ACTIONS(31), 7,
      ts_builtin_sym_end,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [496] = 7,
    ACTIONS(27), 1,
      sym_DIVIDE,
    ACTIONS(41), 1,
      sym_TIMES,
    STATE(32), 1,
      sym_unit,
    STATE(66), 1,
      aux_sym__units_div_part,
    STATE(17), 2,
      aux_sym__units_mult_part,
      sym_unit_term,
    ACTIONS(39), 3,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
    ACTIONS(29), 4,
      ts_builtin_sym_end,
      sym_PLUS,
      sym_MINUS,
      sym_POWER,
  [524] = 7,
    ACTIONS(27), 1,
      sym_DIVIDE,
    ACTIONS(41), 1,
      sym_TIMES,
    STATE(32), 1,
      sym_unit,
    STATE(64), 1,
      aux_sym__units_div_part,
    STATE(27), 2,
      aux_sym__units_mult_part,
      sym_unit_term,
    ACTIONS(39), 3,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
    ACTIONS(23), 4,
      ts_builtin_sym_end,
      sym_PLUS,
      sym_MINUS,
      sym_POWER,
  [552] = 7,
    ACTIONS(43), 1,
      aux_sym_float_token1,
    ACTIONS(45), 1,
      aux_sym_unit_token1,
    ACTIONS(51), 1,
      anon_sym_DOT,
    ACTIONS(53), 1,
      sym_TIMES,
    STATE(23), 1,
      sym__DOT,
    ACTIONS(47), 2,
      anon_sym_u00b0,
      anon_sym_PERCENT,
    ACTIONS(49), 6,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [580] = 7,
    ACTIONS(55), 1,
      aux_sym_float_token1,
    ACTIONS(57), 1,
      aux_sym_unit_token1,
    ACTIONS(63), 1,
      anon_sym_DOT,
    ACTIONS(65), 1,
      sym_TIMES,
    STATE(22), 1,
      sym__DOT,
    ACTIONS(59), 2,
      anon_sym_u00b0,
      anon_sym_PERCENT,
    ACTIONS(61), 6,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [608] = 6,
    ACTIONS(69), 1,
      sym_TIMES,
    STATE(14), 1,
      sym_unit_term,
    STATE(45), 1,
      sym_unit,
    STATE(68), 1,
      sym_units,
    ACTIONS(21), 3,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
    ACTIONS(67), 6,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [634] = 5,
    ACTIONS(76), 1,
      sym_TIMES,
    STATE(45), 1,
      sym_unit,
    STATE(21), 2,
      aux_sym__units_mult_part,
      sym_unit_term,
    ACTIONS(71), 3,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
    ACTIONS(74), 6,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [658] = 4,
    ACTIONS(79), 1,
      aux_sym_float_token1,
    ACTIONS(85), 1,
      sym__DIGITS,
    ACTIONS(81), 2,
      aux_sym_unit_token1,
      sym_TIMES,
    ACTIONS(83), 8,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [679] = 4,
    ACTIONS(87), 1,
      aux_sym_float_token1,
    ACTIONS(93), 1,
      sym__DIGITS,
    ACTIONS(89), 2,
      aux_sym_unit_token1,
      sym_TIMES,
    ACTIONS(91), 8,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [700] = 7,
    ACTIONS(45), 1,
      aux_sym_unit_token1,
    ACTIONS(53), 1,
      sym_TIMES,
    ACTIONS(95), 1,
      aux_sym_float_token1,
    ACTIONS(97), 1,
      anon_sym_DOT,
    STATE(31), 1,
      sym__DOT,
    ACTIONS(47), 2,
      anon_sym_u00b0,
      anon_sym_PERCENT,
    ACTIONS(49), 5,
      ts_builtin_sym_end,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [727] = 7,
    ACTIONS(57), 1,
      aux_sym_unit_token1,
    ACTIONS(65), 1,
      sym_TIMES,
    ACTIONS(99), 1,
      aux_sym_float_token1,
    ACTIONS(101), 1,
      anon_sym_DOT,
    STATE(34), 1,
      sym__DOT,
    ACTIONS(59), 2,
      anon_sym_u00b0,
      anon_sym_PERCENT,
    ACTIONS(61), 5,
      ts_builtin_sym_end,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [754] = 6,
    ACTIONS(69), 1,
      sym_TIMES,
    STATE(16), 1,
      sym_unit_term,
    STATE(32), 1,
      sym_unit,
    STATE(68), 1,
      sym_units,
    ACTIONS(39), 3,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
    ACTIONS(67), 5,
      ts_builtin_sym_end,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [779] = 5,
    ACTIONS(106), 1,
      sym_TIMES,
    STATE(32), 1,
      sym_unit,
    STATE(27), 2,
      aux_sym__units_mult_part,
      sym_unit_term,
    ACTIONS(103), 3,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
    ACTIONS(74), 5,
      ts_builtin_sym_end,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [802] = 2,
    ACTIONS(65), 1,
      sym_TIMES,
    ACTIONS(61), 10,
      ts_builtin_sym_end,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [818] = 2,
    ACTIONS(111), 1,
      sym_TIMES,
    ACTIONS(109), 10,
      ts_builtin_sym_end,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [834] = 5,
    ACTIONS(35), 1,
      anon_sym_DOT,
    ACTIONS(115), 1,
      sym_TIMES,
    STATE(33), 1,
      aux_sym_variable_repeat1,
    STATE(101), 1,
      sym__DOT,
    ACTIONS(113), 7,
      ts_builtin_sym_end,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [856] = 4,
    ACTIONS(117), 1,
      aux_sym_float_token1,
    ACTIONS(119), 1,
      sym__DIGITS,
    ACTIONS(89), 2,
      aux_sym_unit_token1,
      sym_TIMES,
    ACTIONS(91), 7,
      ts_builtin_sym_end,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [876] = 3,
    ACTIONS(123), 1,
      sym_TIMES,
    ACTIONS(125), 1,
      sym_POWER,
    ACTIONS(121), 9,
      ts_builtin_sym_end,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
  [894] = 5,
    ACTIONS(129), 1,
      anon_sym_DOT,
    ACTIONS(132), 1,
      sym_TIMES,
    STATE(33), 1,
      aux_sym_variable_repeat1,
    STATE(101), 1,
      sym__DOT,
    ACTIONS(127), 7,
      ts_builtin_sym_end,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [916] = 4,
    ACTIONS(134), 1,
      aux_sym_float_token1,
    ACTIONS(136), 1,
      sym__DIGITS,
    ACTIONS(81), 2,
      aux_sym_unit_token1,
      sym_TIMES,
    ACTIONS(83), 7,
      ts_builtin_sym_end,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [936] = 3,
    ACTIONS(87), 1,
      aux_sym_float_token1,
    ACTIONS(89), 2,
      aux_sym_unit_token1,
      sym_TIMES,
    ACTIONS(91), 8,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [954] = 3,
    ACTIONS(79), 1,
      aux_sym_float_token1,
    ACTIONS(81), 2,
      aux_sym_unit_token1,
      sym_TIMES,
    ACTIONS(83), 8,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [972] = 3,
    ACTIONS(138), 1,
      aux_sym_float_token1,
    ACTIONS(140), 2,
      aux_sym_unit_token1,
      sym_TIMES,
    ACTIONS(142), 8,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [990] = 3,
    ACTIONS(144), 1,
      aux_sym_float_token1,
    ACTIONS(146), 2,
      aux_sym_unit_token1,
      sym_TIMES,
    ACTIONS(148), 8,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1008] = 2,
    ACTIONS(53), 1,
      sym_TIMES,
    ACTIONS(49), 10,
      ts_builtin_sym_end,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1024] = 2,
    ACTIONS(152), 1,
      sym_TIMES,
    ACTIONS(150), 10,
      ts_builtin_sym_end,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1040] = 2,
    ACTIONS(53), 1,
      sym_TIMES,
    ACTIONS(49), 9,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1055] = 2,
    ACTIONS(156), 1,
      sym_TIMES,
    ACTIONS(154), 9,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1070] = 3,
    ACTIONS(158), 1,
      aux_sym_float_token1,
    ACTIONS(146), 2,
      aux_sym_unit_token1,
      sym_TIMES,
    ACTIONS(148), 7,
      ts_builtin_sym_end,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1087] = 3,
    ACTIONS(117), 1,
      aux_sym_float_token1,
    ACTIONS(89), 2,
      aux_sym_unit_token1,
      sym_TIMES,
    ACTIONS(91), 7,
      ts_builtin_sym_end,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1104] = 3,
    ACTIONS(123), 1,
      sym_TIMES,
    ACTIONS(160), 1,
      sym_POWER,
    ACTIONS(121), 8,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
  [1121] = 2,
    ACTIONS(140), 1,
      sym_TIMES,
    ACTIONS(142), 9,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1136] = 3,
    ACTIONS(162), 1,
      aux_sym_float_token1,
    ACTIONS(140), 2,
      aux_sym_unit_token1,
      sym_TIMES,
    ACTIONS(142), 7,
      ts_builtin_sym_end,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1153] = 3,
    ACTIONS(134), 1,
      aux_sym_float_token1,
    ACTIONS(81), 2,
      aux_sym_unit_token1,
      sym_TIMES,
    ACTIONS(83), 7,
      ts_builtin_sym_end,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1170] = 2,
    ACTIONS(166), 1,
      sym_TIMES,
    ACTIONS(164), 9,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1185] = 2,
    ACTIONS(146), 1,
      sym_TIMES,
    ACTIONS(148), 9,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1200] = 2,
    ACTIONS(168), 1,
      sym_TIMES,
    ACTIONS(74), 9,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1215] = 2,
    ACTIONS(152), 1,
      sym_TIMES,
    ACTIONS(150), 9,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1230] = 2,
    ACTIONS(172), 1,
      sym_TIMES,
    ACTIONS(170), 9,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1245] = 2,
    ACTIONS(176), 1,
      sym_TIMES,
    ACTIONS(174), 9,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1260] = 2,
    ACTIONS(65), 1,
      sym_TIMES,
    ACTIONS(61), 9,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1275] = 2,
    ACTIONS(111), 1,
      sym_TIMES,
    ACTIONS(109), 9,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1290] = 2,
    ACTIONS(176), 1,
      sym_TIMES,
    ACTIONS(174), 8,
      ts_builtin_sym_end,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1304] = 2,
    ACTIONS(156), 1,
      sym_TIMES,
    ACTIONS(154), 8,
      ts_builtin_sym_end,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1318] = 2,
    ACTIONS(132), 1,
      sym_TIMES,
    ACTIONS(127), 8,
      ts_builtin_sym_end,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      anon_sym_DOT,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1332] = 2,
    ACTIONS(140), 1,
      sym_TIMES,
    ACTIONS(142), 8,
      ts_builtin_sym_end,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1346] = 2,
    ACTIONS(166), 1,
      sym_TIMES,
    ACTIONS(164), 8,
      ts_builtin_sym_end,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1360] = 2,
    ACTIONS(146), 1,
      sym_TIMES,
    ACTIONS(148), 8,
      ts_builtin_sym_end,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1374] = 2,
    ACTIONS(168), 1,
      sym_TIMES,
    ACTIONS(74), 8,
      ts_builtin_sym_end,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1388] = 4,
    ACTIONS(27), 1,
      sym_DIVIDE,
    ACTIONS(180), 1,
      sym_TIMES,
    STATE(65), 1,
      aux_sym__units_div_part,
    ACTIONS(178), 6,
      ts_builtin_sym_end,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_POWER,
  [1406] = 4,
    ACTIONS(184), 1,
      sym_TIMES,
    ACTIONS(186), 1,
      sym_DIVIDE,
    STATE(65), 1,
      aux_sym__units_div_part,
    ACTIONS(182), 6,
      ts_builtin_sym_end,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_POWER,
  [1424] = 4,
    ACTIONS(27), 1,
      sym_DIVIDE,
    ACTIONS(191), 1,
      sym_TIMES,
    STATE(65), 1,
      aux_sym__units_div_part,
    ACTIONS(189), 6,
      ts_builtin_sym_end,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_POWER,
  [1442] = 2,
    ACTIONS(172), 1,
      sym_TIMES,
    ACTIONS(170), 8,
      ts_builtin_sym_end,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1456] = 2,
    ACTIONS(195), 1,
      sym_TIMES,
    ACTIONS(193), 7,
      ts_builtin_sym_end,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1469] = 7,
    ACTIONS(197), 1,
      anon_sym_COMMA,
    ACTIONS(199), 1,
      anon_sym_RPAREN,
    ACTIONS(203), 1,
      sym_TIMES,
    ACTIONS(205), 1,
      sym_DIVIDE,
    ACTIONS(207), 1,
      sym_POWER,
    STATE(92), 1,
      aux_sym_args_repeat1,
    ACTIONS(201), 2,
      sym_PLUS,
      sym_MINUS,
  [1492] = 2,
    ACTIONS(211), 1,
      sym_TIMES,
    ACTIONS(209), 7,
      ts_builtin_sym_end,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1505] = 2,
    ACTIONS(215), 1,
      sym_TIMES,
    ACTIONS(213), 7,
      ts_builtin_sym_end,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1518] = 2,
    ACTIONS(184), 1,
      sym_TIMES,
    ACTIONS(182), 7,
      ts_builtin_sym_end,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1531] = 2,
    ACTIONS(219), 1,
      sym_TIMES,
    ACTIONS(217), 7,
      ts_builtin_sym_end,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
      sym_POWER,
  [1544] = 3,
    ACTIONS(207), 1,
      sym_POWER,
    ACTIONS(223), 1,
      sym_TIMES,
    ACTIONS(221), 5,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
  [1558] = 4,
    ACTIONS(227), 1,
      anon_sym_DOT,
    ACTIONS(229), 1,
      sym__DIGITS,
    STATE(95), 1,
      sym__DOT,
    ACTIONS(225), 4,
      anon_sym_LPAREN,
      sym_NAME,
      sym_PLUS,
      sym_MINUS,
  [1574] = 4,
    ACTIONS(203), 1,
      sym_TIMES,
    ACTIONS(205), 1,
      sym_DIVIDE,
    ACTIONS(207), 1,
      sym_POWER,
    ACTIONS(231), 4,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
  [1590] = 3,
    ACTIONS(207), 1,
      sym_POWER,
    ACTIONS(233), 1,
      sym_TIMES,
    ACTIONS(231), 5,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
  [1604] = 3,
    ACTIONS(207), 1,
      sym_POWER,
    ACTIONS(233), 1,
      sym_TIMES,
    ACTIONS(231), 5,
      anon_sym_COMMA,
      anon_sym_RPAREN,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
  [1618] = 6,
    ACTIONS(203), 1,
      sym_TIMES,
    ACTIONS(205), 1,
      sym_DIVIDE,
    ACTIONS(207), 1,
      sym_POWER,
    ACTIONS(235), 1,
      anon_sym_RPAREN,
    STATE(70), 1,
      sym__RPAREN,
    ACTIONS(201), 2,
      sym_PLUS,
      sym_MINUS,
  [1638] = 5,
    ACTIONS(203), 1,
      sym_TIMES,
    ACTIONS(205), 1,
      sym_DIVIDE,
    ACTIONS(207), 1,
      sym_POWER,
    ACTIONS(201), 2,
      sym_PLUS,
      sym_MINUS,
    ACTIONS(237), 2,
      anon_sym_COMMA,
      anon_sym_RPAREN,
  [1656] = 4,
    ACTIONS(239), 1,
      anon_sym_DOT,
    ACTIONS(241), 1,
      sym__DIGITS,
    STATE(107), 1,
      sym__DOT,
    ACTIONS(225), 4,
      anon_sym_LPAREN,
      sym_NAME,
      sym_PLUS,
      sym_MINUS,
  [1672] = 3,
    ACTIONS(233), 1,
      sym_TIMES,
    ACTIONS(243), 1,
      sym_POWER,
    ACTIONS(231), 4,
      ts_builtin_sym_end,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
  [1685] = 4,
    ACTIONS(243), 1,
      sym_POWER,
    ACTIONS(245), 1,
      sym_TIMES,
    ACTIONS(247), 1,
      sym_DIVIDE,
    ACTIONS(231), 3,
      ts_builtin_sym_end,
      sym_PLUS,
      sym_MINUS,
  [1700] = 3,
    ACTIONS(223), 1,
      sym_TIMES,
    ACTIONS(243), 1,
      sym_POWER,
    ACTIONS(221), 4,
      ts_builtin_sym_end,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
  [1713] = 3,
    ACTIONS(233), 1,
      sym_TIMES,
    ACTIONS(243), 1,
      sym_POWER,
    ACTIONS(231), 4,
      ts_builtin_sym_end,
      sym_PLUS,
      sym_MINUS,
      sym_DIVIDE,
  [1726] = 5,
    ACTIONS(243), 1,
      sym_POWER,
    ACTIONS(245), 1,
      sym_TIMES,
    ACTIONS(247), 1,
      sym_DIVIDE,
    ACTIONS(249), 1,
      ts_builtin_sym_end,
    ACTIONS(251), 2,
      sym_PLUS,
      sym_MINUS,
  [1743] = 3,
    STATE(45), 1,
      sym_unit,
    STATE(51), 1,
      sym_unit_term,
    ACTIONS(21), 3,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
  [1755] = 3,
    STATE(32), 1,
      sym_unit,
    STATE(63), 1,
      sym_unit_term,
    ACTIONS(39), 3,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
  [1767] = 3,
    STATE(32), 1,
      sym_unit,
    STATE(72), 1,
      sym_unit_term,
    ACTIONS(39), 3,
      aux_sym_unit_token1,
      anon_sym_u00b0,
      anon_sym_PERCENT,
  [1779] = 3,
    ACTIONS(253), 1,
      sym__DIGITS,
    STATE(40), 1,
      sym_integer,
    ACTIONS(255), 2,
      sym_PLUS,
      sym_MINUS,
  [1790] = 3,
    ACTIONS(257), 1,
      sym__DIGITS,
    STATE(52), 1,
      sym_integer,
    ACTIONS(259), 2,
      sym_PLUS,
      sym_MINUS,
  [1801] = 3,
    ACTIONS(197), 1,
      anon_sym_COMMA,
    ACTIONS(261), 1,
      anon_sym_RPAREN,
    STATE(93), 1,
      aux_sym_args_repeat1,
  [1811] = 3,
    ACTIONS(237), 1,
      anon_sym_RPAREN,
    ACTIONS(263), 1,
      anon_sym_COMMA,
    STATE(93), 1,
      aux_sym_args_repeat1,
  [1821] = 2,
    ACTIONS(266), 1,
      anon_sym_RPAREN,
    STATE(73), 1,
      sym__RPAREN,
  [1828] = 1,
    ACTIONS(268), 1,
      sym__DIGITS,
  [1832] = 1,
    ACTIONS(270), 1,
      sym__DIGITS,
  [1836] = 1,
    ACTIONS(272), 1,
      sym__DIGITS,
  [1840] = 1,
    ACTIONS(274), 1,
      sym__DIGITS,
  [1844] = 1,
    ACTIONS(276), 1,
      sym__DIGITS,
  [1848] = 1,
    ACTIONS(278), 1,
      sym__DIGITS,
  [1852] = 1,
    ACTIONS(280), 1,
      sym_NAME,
  [1856] = 1,
    ACTIONS(282), 1,
      sym__DIGITS,
  [1860] = 1,
    ACTIONS(284), 1,
      sym__DIGITS,
  [1864] = 1,
    ACTIONS(286), 1,
      ts_builtin_sym_end,
  [1868] = 1,
    ACTIONS(288), 1,
      sym__DIGITS,
  [1872] = 1,
    ACTIONS(290), 1,
      sym__DIGITS,
  [1876] = 1,
    ACTIONS(292), 1,
      sym__DIGITS,
  [1880] = 1,
    ACTIONS(294), 1,
      sym__DIGITS,
  [1884] = 1,
    ACTIONS(296), 1,
      sym__DIGITS,
  [1888] = 1,
    ACTIONS(298), 1,
      sym__DIGITS,
  [1892] = 1,
    ACTIONS(300), 1,
      sym__DIGITS,
  [1896] = 1,
    ACTIONS(302), 1,
      sym__DIGITS,
  [1900] = 1,
    ACTIONS(304), 1,
      sym__DIGITS,
  [1904] = 1,
    ACTIONS(306), 1,
      sym__DIGITS,
};

static const uint32_t ts_small_parse_table_map[] = {
  [SMALL_STATE(3)] = 0,
  [SMALL_STATE(4)] = 41,
  [SMALL_STATE(5)] = 82,
  [SMALL_STATE(6)] = 123,
  [SMALL_STATE(7)] = 164,
  [SMALL_STATE(8)] = 205,
  [SMALL_STATE(9)] = 246,
  [SMALL_STATE(10)] = 287,
  [SMALL_STATE(11)] = 328,
  [SMALL_STATE(12)] = 369,
  [SMALL_STATE(13)] = 410,
  [SMALL_STATE(14)] = 439,
  [SMALL_STATE(15)] = 468,
  [SMALL_STATE(16)] = 496,
  [SMALL_STATE(17)] = 524,
  [SMALL_STATE(18)] = 552,
  [SMALL_STATE(19)] = 580,
  [SMALL_STATE(20)] = 608,
  [SMALL_STATE(21)] = 634,
  [SMALL_STATE(22)] = 658,
  [SMALL_STATE(23)] = 679,
  [SMALL_STATE(24)] = 700,
  [SMALL_STATE(25)] = 727,
  [SMALL_STATE(26)] = 754,
  [SMALL_STATE(27)] = 779,
  [SMALL_STATE(28)] = 802,
  [SMALL_STATE(29)] = 818,
  [SMALL_STATE(30)] = 834,
  [SMALL_STATE(31)] = 856,
  [SMALL_STATE(32)] = 876,
  [SMALL_STATE(33)] = 894,
  [SMALL_STATE(34)] = 916,
  [SMALL_STATE(35)] = 936,
  [SMALL_STATE(36)] = 954,
  [SMALL_STATE(37)] = 972,
  [SMALL_STATE(38)] = 990,
  [SMALL_STATE(39)] = 1008,
  [SMALL_STATE(40)] = 1024,
  [SMALL_STATE(41)] = 1040,
  [SMALL_STATE(42)] = 1055,
  [SMALL_STATE(43)] = 1070,
  [SMALL_STATE(44)] = 1087,
  [SMALL_STATE(45)] = 1104,
  [SMALL_STATE(46)] = 1121,
  [SMALL_STATE(47)] = 1136,
  [SMALL_STATE(48)] = 1153,
  [SMALL_STATE(49)] = 1170,
  [SMALL_STATE(50)] = 1185,
  [SMALL_STATE(51)] = 1200,
  [SMALL_STATE(52)] = 1215,
  [SMALL_STATE(53)] = 1230,
  [SMALL_STATE(54)] = 1245,
  [SMALL_STATE(55)] = 1260,
  [SMALL_STATE(56)] = 1275,
  [SMALL_STATE(57)] = 1290,
  [SMALL_STATE(58)] = 1304,
  [SMALL_STATE(59)] = 1318,
  [SMALL_STATE(60)] = 1332,
  [SMALL_STATE(61)] = 1346,
  [SMALL_STATE(62)] = 1360,
  [SMALL_STATE(63)] = 1374,
  [SMALL_STATE(64)] = 1388,
  [SMALL_STATE(65)] = 1406,
  [SMALL_STATE(66)] = 1424,
  [SMALL_STATE(67)] = 1442,
  [SMALL_STATE(68)] = 1456,
  [SMALL_STATE(69)] = 1469,
  [SMALL_STATE(70)] = 1492,
  [SMALL_STATE(71)] = 1505,
  [SMALL_STATE(72)] = 1518,
  [SMALL_STATE(73)] = 1531,
  [SMALL_STATE(74)] = 1544,
  [SMALL_STATE(75)] = 1558,
  [SMALL_STATE(76)] = 1574,
  [SMALL_STATE(77)] = 1590,
  [SMALL_STATE(78)] = 1604,
  [SMALL_STATE(79)] = 1618,
  [SMALL_STATE(80)] = 1638,
  [SMALL_STATE(81)] = 1656,
  [SMALL_STATE(82)] = 1672,
  [SMALL_STATE(83)] = 1685,
  [SMALL_STATE(84)] = 1700,
  [SMALL_STATE(85)] = 1713,
  [SMALL_STATE(86)] = 1726,
  [SMALL_STATE(87)] = 1743,
  [SMALL_STATE(88)] = 1755,
  [SMALL_STATE(89)] = 1767,
  [SMALL_STATE(90)] = 1779,
  [SMALL_STATE(91)] = 1790,
  [SMALL_STATE(92)] = 1801,
  [SMALL_STATE(93)] = 1811,
  [SMALL_STATE(94)] = 1821,
  [SMALL_STATE(95)] = 1828,
  [SMALL_STATE(96)] = 1832,
  [SMALL_STATE(97)] = 1836,
  [SMALL_STATE(98)] = 1840,
  [SMALL_STATE(99)] = 1844,
  [SMALL_STATE(100)] = 1848,
  [SMALL_STATE(101)] = 1852,
  [SMALL_STATE(102)] = 1856,
  [SMALL_STATE(103)] = 1860,
  [SMALL_STATE(104)] = 1864,
  [SMALL_STATE(105)] = 1868,
  [SMALL_STATE(106)] = 1872,
  [SMALL_STATE(107)] = 1876,
  [SMALL_STATE(108)] = 1880,
  [SMALL_STATE(109)] = 1884,
  [SMALL_STATE(110)] = 1888,
  [SMALL_STATE(111)] = 1892,
  [SMALL_STATE(112)] = 1896,
  [SMALL_STATE(113)] = 1900,
  [SMALL_STATE(114)] = 1904,
};

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(4),
  [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(98),
  [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15),
  [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24),
  [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(75),
  [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71),
  [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(106),
  [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18),
  [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(81),
  [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56),
  [23] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_units, 2, 0, 8),
  [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(87),
  [27] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89),
  [29] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_units, 1, 0, 3),
  [31] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable, 1, 0, 0),
  [33] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2),
  [35] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101),
  [37] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_variable, 1, 0, 0),
  [39] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29),
  [41] = {.entry = {.count = 1, .reusable = false}}, SHIFT(88),
  [43] = {.entry = {.count = 1, .reusable = false}}, SHIFT(108),
  [45] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_float, 1, 0, 0),
  [47] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_float, 1, 0, 0),
  [49] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_integer, 1, 0, 0),
  [51] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23),
  [53] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_integer, 1, 0, 0),
  [55] = {.entry = {.count = 1, .reusable = false}}, SHIFT(109),
  [57] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_float, 2, 0, 1),
  [59] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_float, 2, 0, 1),
  [61] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_integer, 2, 0, 1),
  [63] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22),
  [65] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_integer, 2, 0, 1),
  [67] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__number, 1, 0, 0),
  [69] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__number, 1, 0, 0),
  [71] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__units_mult_part, 2, 0, 0), SHIFT_REPEAT(56),
  [74] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__units_mult_part, 2, 0, 0),
  [76] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__units_mult_part, 2, 0, 0), SHIFT_REPEAT(87),
  [79] = {.entry = {.count = 1, .reusable = false}}, SHIFT(112),
  [81] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_float, 3, 0, 1),
  [83] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_float, 3, 0, 1),
  [85] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38),
  [87] = {.entry = {.count = 1, .reusable = false}}, SHIFT(110),
  [89] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_float, 2, 0, 0),
  [91] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_float, 2, 0, 0),
  [93] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37),
  [95] = {.entry = {.count = 1, .reusable = false}}, SHIFT(96),
  [97] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31),
  [99] = {.entry = {.count = 1, .reusable = false}}, SHIFT(103),
  [101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34),
  [103] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__units_mult_part, 2, 0, 0), SHIFT_REPEAT(29),
  [106] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__units_mult_part, 2, 0, 0), SHIFT_REPEAT(88),
  [109] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unit, 1, 0, 0),
  [111] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unit, 1, 0, 0),
  [113] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable, 2, 0, 0),
  [115] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_variable, 2, 0, 0),
  [117] = {.entry = {.count = 1, .reusable = false}}, SHIFT(100),
  [119] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47),
  [121] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unit_term, 1, 0, 4),
  [123] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unit_term, 1, 0, 4),
  [125] = {.entry = {.count = 1, .reusable = true}}, SHIFT(90),
  [127] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_variable_repeat1, 2, 0, 0),
  [129] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_variable_repeat1, 2, 0, 0), SHIFT_REPEAT(101),
  [132] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_variable_repeat1, 2, 0, 0),
  [134] = {.entry = {.count = 1, .reusable = false}}, SHIFT(99),
  [136] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43),
  [138] = {.entry = {.count = 1, .reusable = false}}, SHIFT(111),
  [140] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_float, 3, 0, 0),
  [142] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_float, 3, 0, 0),
  [144] = {.entry = {.count = 1, .reusable = false}}, SHIFT(114),
  [146] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_float, 4, 0, 1),
  [148] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_float, 4, 0, 1),
  [150] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unit_term, 3, 0, 13),
  [152] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unit_term, 3, 0, 13),
  [154] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_float, 6, 0, 1),
  [156] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_float, 6, 0, 1),
  [158] = {.entry = {.count = 1, .reusable = false}}, SHIFT(97),
  [160] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91),
  [162] = {.entry = {.count = 1, .reusable = false}}, SHIFT(105),
  [164] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_float, 4, 0, 0),
  [166] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_float, 4, 0, 0),
  [168] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__units_mult_part, 2, 0, 0),
  [170] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_float, 5, 0, 0),
  [172] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_float, 5, 0, 0),
  [174] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_float, 5, 0, 1),
  [176] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_float, 5, 0, 1),
  [178] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_units, 3, 0, 12),
  [180] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_units, 3, 0, 12),
  [182] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__units_div_part, 2, 0, 0),
  [184] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__units_div_part, 2, 0, 0),
  [186] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__units_div_part, 2, 0, 0), SHIFT_REPEAT(89),
  [189] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_units, 2, 0, 9),
  [191] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_units, 2, 0, 9),
  [193] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quantity, 2, 0, 2),
  [195] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_quantity, 2, 0, 2),
  [197] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8),
  [199] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_args, 1, 0, 0),
  [201] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9),
  [203] = {.entry = {.count = 1, .reusable = false}}, SHIFT(12),
  [205] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12),
  [207] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10),
  [209] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_expression, 3, 0, 10),
  [211] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesized_expression, 3, 0, 10),
  [213] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_call, 3, 0, 6),
  [215] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_call, 3, 0, 6),
  [217] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_call, 4, 0, 11),
  [219] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_call, 4, 0, 11),
  [221] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_operator, 2, 0, 5),
  [223] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unary_operator, 2, 0, 5),
  [225] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__sign, 1, 0, 0),
  [227] = {.entry = {.count = 1, .reusable = true}}, SHIFT(95),
  [229] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25),
  [231] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_operator, 3, 0, 7),
  [233] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_operator, 3, 0, 7),
  [235] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70),
  [237] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_args_repeat1, 2, 0, 0),
  [239] = {.entry = {.count = 1, .reusable = true}}, SHIFT(107),
  [241] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19),
  [243] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5),
  [245] = {.entry = {.count = 1, .reusable = false}}, SHIFT(7),
  [247] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7),
  [249] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 1, 0, 0),
  [251] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6),
  [253] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39),
  [255] = {.entry = {.count = 1, .reusable = true}}, SHIFT(102),
  [257] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41),
  [259] = {.entry = {.count = 1, .reusable = true}}, SHIFT(113),
  [261] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_args, 2, 0, 0),
  [263] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_args_repeat1, 2, 0, 0), SHIFT_REPEAT(8),
  [266] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73),
  [268] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48),
  [270] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60),
  [272] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58),
  [274] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44),
  [276] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57),
  [278] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61),
  [280] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59),
  [282] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28),
  [284] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62),
  [286] = {.entry = {.count = 1, .reusable = true}},  ACCEPT_INPUT(),
  [288] = {.entry = {.count = 1, .reusable = true}}, SHIFT(67),
  [290] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35),
  [292] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36),
  [294] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46),
  [296] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50),
  [298] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49),
  [300] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53),
  [302] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54),
  [304] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55),
  [306] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42),
};

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