1
0
Fork 0
mirror of https://github.com/pnx/tree-sitter-dotenv synced 2026-10-22 01:56:46 +02:00
tree-sitter-dotenv/src/parser.c

1502 lines
45 KiB
C
Generated

/* Automatically @generated by tree-sitter */
#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 55
#define LARGE_STATE_COUNT 6
#define SYMBOL_COUNT 32
#define ALIAS_COUNT 0
#define TOKEN_COUNT 19
#define EXTERNAL_TOKEN_COUNT 1
#define FIELD_COUNT 2
#define MAX_ALIAS_SEQUENCE_LENGTH 5
#define MAX_RESERVED_WORD_SET_SIZE 0
#define PRODUCTION_ID_COUNT 12
#define SUPERTYPE_COUNT 0
enum ts_symbol_identifiers {
sym_identifier = 1,
anon_sym_export = 2,
anon_sym_EQ = 3,
sym_comment = 4,
anon_sym_DOLLAR = 5,
anon_sym_LBRACE = 6,
anon_sym_RBRACE = 7,
sym__unquoted_content = 8,
anon_sym_SQUOTE = 9,
aux_sym__literal_string_token1 = 10,
anon_sym_DQUOTE = 11,
aux_sym__string_token1 = 12,
sym_decimal = 13,
sym_hexadecimal = 14,
sym_float = 15,
sym_boolean = 16,
sym_value = 17,
sym__end_of_assignment = 18,
sym_document = 19,
sym_assignment = 20,
sym_variable = 21,
sym__braced_variable = 22,
sym__value = 23,
sym_string = 24,
sym__unquoted_string = 25,
sym__literal_string = 26,
sym__string = 27,
sym_number = 28,
sym_integer = 29,
aux_sym_document_repeat1 = 30,
aux_sym__string_repeat1 = 31,
};
static const char * const ts_symbol_names[] = {
[ts_builtin_sym_end] = "end",
[sym_identifier] = "identifier",
[anon_sym_export] = "export",
[anon_sym_EQ] = "=",
[sym_comment] = "comment",
[anon_sym_DOLLAR] = "$",
[anon_sym_LBRACE] = "{",
[anon_sym_RBRACE] = "}",
[sym__unquoted_content] = "string_content",
[anon_sym_SQUOTE] = "'",
[aux_sym__literal_string_token1] = "string_content",
[anon_sym_DQUOTE] = "\"",
[aux_sym__string_token1] = "string_content",
[sym_decimal] = "decimal",
[sym_hexadecimal] = "hexadecimal",
[sym_float] = "float",
[sym_boolean] = "boolean",
[sym_value] = "value",
[sym__end_of_assignment] = "_end_of_assignment",
[sym_document] = "document",
[sym_assignment] = "assignment",
[sym_variable] = "variable",
[sym__braced_variable] = "_braced_variable",
[sym__value] = "_value",
[sym_string] = "string",
[sym__unquoted_string] = "_unquoted_string",
[sym__literal_string] = "_literal_string",
[sym__string] = "_string",
[sym_number] = "number",
[sym_integer] = "integer",
[aux_sym_document_repeat1] = "document_repeat1",
[aux_sym__string_repeat1] = "_string_repeat1",
};
static const TSSymbol ts_symbol_map[] = {
[ts_builtin_sym_end] = ts_builtin_sym_end,
[sym_identifier] = sym_identifier,
[anon_sym_export] = anon_sym_export,
[anon_sym_EQ] = anon_sym_EQ,
[sym_comment] = sym_comment,
[anon_sym_DOLLAR] = anon_sym_DOLLAR,
[anon_sym_LBRACE] = anon_sym_LBRACE,
[anon_sym_RBRACE] = anon_sym_RBRACE,
[sym__unquoted_content] = sym__unquoted_content,
[anon_sym_SQUOTE] = anon_sym_SQUOTE,
[aux_sym__literal_string_token1] = sym__unquoted_content,
[anon_sym_DQUOTE] = anon_sym_DQUOTE,
[aux_sym__string_token1] = sym__unquoted_content,
[sym_decimal] = sym_decimal,
[sym_hexadecimal] = sym_hexadecimal,
[sym_float] = sym_float,
[sym_boolean] = sym_boolean,
[sym_value] = sym_value,
[sym__end_of_assignment] = sym__end_of_assignment,
[sym_document] = sym_document,
[sym_assignment] = sym_assignment,
[sym_variable] = sym_variable,
[sym__braced_variable] = sym__braced_variable,
[sym__value] = sym__value,
[sym_string] = sym_string,
[sym__unquoted_string] = sym__unquoted_string,
[sym__literal_string] = sym__literal_string,
[sym__string] = sym__string,
[sym_number] = sym_number,
[sym_integer] = sym_integer,
[aux_sym_document_repeat1] = aux_sym_document_repeat1,
[aux_sym__string_repeat1] = aux_sym__string_repeat1,
};
static const TSSymbolMetadata ts_symbol_metadata[] = {
[ts_builtin_sym_end] = {
.visible = false,
.named = true,
},
[sym_identifier] = {
.visible = true,
.named = true,
},
[anon_sym_export] = {
.visible = true,
.named = false,
},
[anon_sym_EQ] = {
.visible = true,
.named = false,
},
[sym_comment] = {
.visible = true,
.named = true,
},
[anon_sym_DOLLAR] = {
.visible = true,
.named = false,
},
[anon_sym_LBRACE] = {
.visible = true,
.named = false,
},
[anon_sym_RBRACE] = {
.visible = true,
.named = false,
},
[sym__unquoted_content] = {
.visible = true,
.named = true,
},
[anon_sym_SQUOTE] = {
.visible = true,
.named = false,
},
[aux_sym__literal_string_token1] = {
.visible = true,
.named = true,
},
[anon_sym_DQUOTE] = {
.visible = true,
.named = false,
},
[aux_sym__string_token1] = {
.visible = true,
.named = true,
},
[sym_decimal] = {
.visible = true,
.named = true,
},
[sym_hexadecimal] = {
.visible = true,
.named = true,
},
[sym_float] = {
.visible = true,
.named = true,
},
[sym_boolean] = {
.visible = true,
.named = true,
},
[sym_value] = {
.visible = true,
.named = true,
},
[sym__end_of_assignment] = {
.visible = false,
.named = true,
},
[sym_document] = {
.visible = true,
.named = true,
},
[sym_assignment] = {
.visible = true,
.named = true,
},
[sym_variable] = {
.visible = true,
.named = true,
},
[sym__braced_variable] = {
.visible = false,
.named = true,
},
[sym__value] = {
.visible = false,
.named = true,
},
[sym_string] = {
.visible = true,
.named = true,
},
[sym__unquoted_string] = {
.visible = false,
.named = true,
},
[sym__literal_string] = {
.visible = false,
.named = true,
},
[sym__string] = {
.visible = false,
.named = true,
},
[sym_number] = {
.visible = true,
.named = true,
},
[sym_integer] = {
.visible = true,
.named = true,
},
[aux_sym_document_repeat1] = {
.visible = false,
.named = false,
},
[aux_sym__string_repeat1] = {
.visible = false,
.named = false,
},
};
enum ts_field_identifiers {
field_key = 1,
field_value = 2,
};
static const char * const ts_field_names[] = {
[0] = NULL,
[field_key] = "key",
[field_value] = "value",
};
static const TSMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = {
[1] = {.index = 0, .length = 1},
[3] = {.index = 0, .length = 1},
[4] = {.index = 1, .length = 1},
[6] = {.index = 2, .length = 2},
[7] = {.index = 1, .length = 1},
[8] = {.index = 2, .length = 2},
[9] = {.index = 4, .length = 2},
[11] = {.index = 4, .length = 2},
};
static const TSFieldMapEntry ts_field_map_entries[] = {
[0] =
{field_key, 0},
[1] =
{field_key, 1},
[2] =
{field_key, 0},
{field_value, 2},
[4] =
{field_key, 1},
{field_value, 3},
};
static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = {
[0] = {0},
[1] = {
[0] = sym_identifier,
},
[2] = {
[0] = sym__unquoted_content,
},
[4] = {
[1] = sym_identifier,
},
[5] = {
[0] = sym__unquoted_content,
[1] = sym_variable,
},
[6] = {
[0] = sym_identifier,
},
[9] = {
[1] = sym_identifier,
},
[10] = {
[0] = sym__unquoted_content,
[1] = sym_variable,
[2] = sym__unquoted_content,
},
};
static const uint16_t ts_non_terminal_alias_map[] = {
sym__braced_variable, 2,
sym__braced_variable,
sym_variable,
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] = 25,
[29] = 29,
[30] = 30,
[31] = 30,
[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] = 26,
[47] = 47,
[48] = 27,
[49] = 49,
[50] = 50,
[51] = 51,
[52] = 52,
[53] = 42,
[54] = 49,
};
static bool ts_lex(TSLexer *lexer, TSStateId state) {
START_LEXER();
eof = lexer->eof(lexer);
switch (state) {
case 0:
if (eof) ADVANCE(12);
ADVANCE_MAP(
'"', 30,
'#', 14,
'$', 22,
'\'', 27,
'-', 7,
'0', 5,
'=', 13,
'f', 15,
't', 18,
'{', 23,
'}', 24,
);
if (('\t' <= lookahead && lookahead <= '\r') ||
lookahead == ' ') SKIP(0);
if (('1' <= lookahead && lookahead <= '9')) ADVANCE(34);
if (('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(21);
END_STATE();
case 1:
if (lookahead == '"') ADVANCE(30);
if (lookahead == '$') ADVANCE(22);
if (lookahead == '\'') ADVANCE(27);
if (lookahead == '-') ADVANCE(47);
if (lookahead == '0') ADVANCE(46);
if (lookahead == 'f') ADVANCE(40);
if (lookahead == 't') ADVANCE(43);
if (('\t' <= lookahead && lookahead <= '\r') ||
lookahead == ' ') SKIP(1);
if (('1' <= lookahead && lookahead <= '9')) ADVANCE(33);
if (lookahead != 0 &&
(lookahead < '"' || '$' < lookahead)) ADVANCE(50);
END_STATE();
case 2:
if (lookahead == '"') ADVANCE(30);
if (lookahead == '$') ADVANCE(22);
if (('\t' <= lookahead && lookahead <= '\r') ||
lookahead == ' ') ADVANCE(31);
if (lookahead != 0) ADVANCE(32);
END_STATE();
case 3:
if (lookahead == '\'') ADVANCE(27);
if (('\t' <= lookahead && lookahead <= '\r') ||
lookahead == ' ') ADVANCE(28);
if (lookahead != 0) ADVANCE(29);
END_STATE();
case 4:
if (lookahead == '\t' ||
lookahead == ' ') ADVANCE(4);
if (lookahead != 0 &&
(lookahead < '\t' || '\r' < lookahead) &&
(lookahead < '"' || '$' < lookahead) &&
lookahead != '\'') ADVANCE(26);
END_STATE();
case 5:
if (lookahead == 'X' ||
lookahead == 'x') ADVANCE(9);
END_STATE();
case 6:
if (('\t' <= lookahead && lookahead <= '\r') ||
lookahead == ' ') SKIP(6);
if (lookahead != 0 &&
(lookahead < '"' || '$' < lookahead) &&
lookahead != '\'') ADVANCE(50);
END_STATE();
case 7:
if (('1' <= lookahead && lookahead <= '9')) ADVANCE(34);
END_STATE();
case 8:
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(38);
END_STATE();
case 9:
if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'F') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(36);
END_STATE();
case 10:
if (('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(25);
END_STATE();
case 11:
if (eof) ADVANCE(12);
if (lookahead == '#') ADVANCE(14);
if (lookahead == '=') ADVANCE(13);
if (lookahead == '{') ADVANCE(23);
if (('\t' <= lookahead && lookahead <= '\r') ||
lookahead == ' ') SKIP(11);
if (('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(21);
END_STATE();
case 12:
ACCEPT_TOKEN(ts_builtin_sym_end);
END_STATE();
case 13:
ACCEPT_TOKEN(anon_sym_EQ);
END_STATE();
case 14:
ACCEPT_TOKEN(sym_comment);
if (lookahead != 0 &&
lookahead != '\n') ADVANCE(14);
END_STATE();
case 15:
ACCEPT_TOKEN(sym_identifier);
if (lookahead == 'a') ADVANCE(17);
if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('b' <= lookahead && lookahead <= 'z')) ADVANCE(21);
END_STATE();
case 16:
ACCEPT_TOKEN(sym_identifier);
if (lookahead == 'e') ADVANCE(21);
if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(21);
END_STATE();
case 17:
ACCEPT_TOKEN(sym_identifier);
if (lookahead == 'l') ADVANCE(19);
if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(21);
END_STATE();
case 18:
ACCEPT_TOKEN(sym_identifier);
if (lookahead == 'r') ADVANCE(20);
if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(21);
END_STATE();
case 19:
ACCEPT_TOKEN(sym_identifier);
if (lookahead == 's') ADVANCE(16);
if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(21);
END_STATE();
case 20:
ACCEPT_TOKEN(sym_identifier);
if (lookahead == 'u') ADVANCE(16);
if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(21);
END_STATE();
case 21:
ACCEPT_TOKEN(sym_identifier);
if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(21);
END_STATE();
case 22:
ACCEPT_TOKEN(anon_sym_DOLLAR);
END_STATE();
case 23:
ACCEPT_TOKEN(anon_sym_LBRACE);
END_STATE();
case 24:
ACCEPT_TOKEN(anon_sym_RBRACE);
END_STATE();
case 25:
ACCEPT_TOKEN(sym__unquoted_content);
if (lookahead == '$') ADVANCE(10);
if (lookahead == '\t' ||
lookahead == ' ') ADVANCE(4);
if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(25);
if (lookahead != 0 &&
(lookahead < '\t' || '\r' < lookahead) &&
(lookahead < '"' || '$' < lookahead) &&
lookahead != '\'') ADVANCE(26);
END_STATE();
case 26:
ACCEPT_TOKEN(sym__unquoted_content);
if (lookahead == '$') ADVANCE(10);
if (lookahead == '\t' ||
lookahead == ' ') ADVANCE(4);
if (lookahead != 0 &&
(lookahead < '\t' || '\r' < lookahead) &&
(lookahead < '"' || '$' < lookahead) &&
lookahead != '\'') ADVANCE(26);
END_STATE();
case 27:
ACCEPT_TOKEN(anon_sym_SQUOTE);
END_STATE();
case 28:
ACCEPT_TOKEN(aux_sym__literal_string_token1);
if (('\t' <= lookahead && lookahead <= '\r') ||
lookahead == ' ') ADVANCE(28);
if (lookahead != 0 &&
lookahead != '\'') ADVANCE(29);
END_STATE();
case 29:
ACCEPT_TOKEN(aux_sym__literal_string_token1);
if (lookahead != 0 &&
lookahead != '\'') ADVANCE(29);
END_STATE();
case 30:
ACCEPT_TOKEN(anon_sym_DQUOTE);
END_STATE();
case 31:
ACCEPT_TOKEN(aux_sym__string_token1);
if (('\t' <= lookahead && lookahead <= '\r') ||
lookahead == ' ') ADVANCE(31);
if (lookahead != 0 &&
lookahead != '"' &&
lookahead != '$') ADVANCE(32);
END_STATE();
case 32:
ACCEPT_TOKEN(aux_sym__string_token1);
if (lookahead != 0 &&
lookahead != '"' &&
lookahead != '$') ADVANCE(32);
END_STATE();
case 33:
ACCEPT_TOKEN(sym_decimal);
if (lookahead == '$') ADVANCE(10);
if (lookahead == '.') ADVANCE(48);
if (lookahead == '\t' ||
lookahead == ' ') ADVANCE(4);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(33);
if (lookahead != 0 &&
(lookahead < '\t' || '\r' < lookahead) &&
(lookahead < '"' || '$' < lookahead) &&
lookahead != '\'') ADVANCE(50);
END_STATE();
case 34:
ACCEPT_TOKEN(sym_decimal);
if (lookahead == '.') ADVANCE(8);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(34);
END_STATE();
case 35:
ACCEPT_TOKEN(sym_hexadecimal);
if (lookahead == '$') ADVANCE(10);
if (lookahead == '\t' ||
lookahead == ' ') ADVANCE(4);
if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'F') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(35);
if (lookahead != 0 &&
(lookahead < '\t' || '\r' < lookahead) &&
(lookahead < '"' || '$' < lookahead) &&
lookahead != '\'') ADVANCE(50);
END_STATE();
case 36:
ACCEPT_TOKEN(sym_hexadecimal);
if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'F') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(36);
END_STATE();
case 37:
ACCEPT_TOKEN(sym_float);
if (lookahead == '$') ADVANCE(10);
if (lookahead == '\t' ||
lookahead == ' ') ADVANCE(4);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(37);
if (lookahead != 0 &&
(lookahead < '\t' || '\r' < lookahead) &&
(lookahead < '"' || '$' < lookahead) &&
lookahead != '\'') ADVANCE(50);
END_STATE();
case 38:
ACCEPT_TOKEN(sym_float);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(38);
END_STATE();
case 39:
ACCEPT_TOKEN(sym_boolean);
if (lookahead == '$') ADVANCE(10);
if (lookahead == '\t' ||
lookahead == ' ') ADVANCE(4);
if (lookahead != 0 &&
(lookahead < '\t' || '\r' < lookahead) &&
(lookahead < '"' || '$' < lookahead) &&
lookahead != '\'') ADVANCE(50);
END_STATE();
case 40:
ACCEPT_TOKEN(sym_value);
if (lookahead == '$') ADVANCE(10);
if (lookahead == 'a') ADVANCE(42);
if (lookahead == '\t' ||
lookahead == ' ') ADVANCE(4);
if (lookahead != 0 &&
(lookahead < '\t' || '\r' < lookahead) &&
(lookahead < '"' || '$' < lookahead) &&
lookahead != '\'') ADVANCE(50);
END_STATE();
case 41:
ACCEPT_TOKEN(sym_value);
if (lookahead == '$') ADVANCE(10);
if (lookahead == 'e') ADVANCE(39);
if (lookahead == '\t' ||
lookahead == ' ') ADVANCE(4);
if (lookahead != 0 &&
(lookahead < '\t' || '\r' < lookahead) &&
(lookahead < '"' || '$' < lookahead) &&
lookahead != '\'') ADVANCE(50);
END_STATE();
case 42:
ACCEPT_TOKEN(sym_value);
if (lookahead == '$') ADVANCE(10);
if (lookahead == 'l') ADVANCE(44);
if (lookahead == '\t' ||
lookahead == ' ') ADVANCE(4);
if (lookahead != 0 &&
(lookahead < '\t' || '\r' < lookahead) &&
(lookahead < '"' || '$' < lookahead) &&
lookahead != '\'') ADVANCE(50);
END_STATE();
case 43:
ACCEPT_TOKEN(sym_value);
if (lookahead == '$') ADVANCE(10);
if (lookahead == 'r') ADVANCE(45);
if (lookahead == '\t' ||
lookahead == ' ') ADVANCE(4);
if (lookahead != 0 &&
(lookahead < '\t' || '\r' < lookahead) &&
(lookahead < '"' || '$' < lookahead) &&
lookahead != '\'') ADVANCE(50);
END_STATE();
case 44:
ACCEPT_TOKEN(sym_value);
if (lookahead == '$') ADVANCE(10);
if (lookahead == 's') ADVANCE(41);
if (lookahead == '\t' ||
lookahead == ' ') ADVANCE(4);
if (lookahead != 0 &&
(lookahead < '\t' || '\r' < lookahead) &&
(lookahead < '"' || '$' < lookahead) &&
lookahead != '\'') ADVANCE(50);
END_STATE();
case 45:
ACCEPT_TOKEN(sym_value);
if (lookahead == '$') ADVANCE(10);
if (lookahead == 'u') ADVANCE(41);
if (lookahead == '\t' ||
lookahead == ' ') ADVANCE(4);
if (lookahead != 0 &&
(lookahead < '\t' || '\r' < lookahead) &&
(lookahead < '"' || '$' < lookahead) &&
lookahead != '\'') ADVANCE(50);
END_STATE();
case 46:
ACCEPT_TOKEN(sym_value);
if (lookahead == '$') ADVANCE(10);
if (lookahead == '\t' ||
lookahead == ' ') ADVANCE(4);
if (lookahead == 'X' ||
lookahead == 'x') ADVANCE(49);
if (lookahead != 0 &&
(lookahead < '\t' || '\r' < lookahead) &&
(lookahead < '"' || '$' < lookahead) &&
lookahead != '\'') ADVANCE(50);
END_STATE();
case 47:
ACCEPT_TOKEN(sym_value);
if (lookahead == '$') ADVANCE(10);
if (lookahead == '\t' ||
lookahead == ' ') ADVANCE(4);
if (('1' <= lookahead && lookahead <= '9')) ADVANCE(33);
if (lookahead != 0 &&
(lookahead < '\t' || '\r' < lookahead) &&
(lookahead < '"' || '$' < lookahead) &&
lookahead != '\'') ADVANCE(50);
END_STATE();
case 48:
ACCEPT_TOKEN(sym_value);
if (lookahead == '$') ADVANCE(10);
if (lookahead == '\t' ||
lookahead == ' ') ADVANCE(4);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(37);
if (lookahead != 0 &&
(lookahead < '\t' || '\r' < lookahead) &&
(lookahead < '"' || '$' < lookahead) &&
lookahead != '\'') ADVANCE(50);
END_STATE();
case 49:
ACCEPT_TOKEN(sym_value);
if (lookahead == '$') ADVANCE(10);
if (lookahead == '\t' ||
lookahead == ' ') ADVANCE(4);
if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'F') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(35);
if (lookahead != 0 &&
(lookahead < '\t' || '\r' < lookahead) &&
(lookahead < '"' || '$' < lookahead) &&
lookahead != '\'') ADVANCE(50);
END_STATE();
case 50:
ACCEPT_TOKEN(sym_value);
if (lookahead == '$') ADVANCE(10);
if (lookahead == '\t' ||
lookahead == ' ') ADVANCE(4);
if (lookahead != 0 &&
(lookahead < '\t' || '\r' < lookahead) &&
(lookahead < '"' || '$' < lookahead) &&
lookahead != '\'') ADVANCE(50);
END_STATE();
default:
return false;
}
}
static bool ts_lex_keywords(TSLexer *lexer, TSStateId state) {
START_LEXER();
eof = lexer->eof(lexer);
switch (state) {
case 0:
if (lookahead == 'e') ADVANCE(1);
if (('\t' <= lookahead && lookahead <= '\r') ||
lookahead == ' ') SKIP(0);
END_STATE();
case 1:
if (lookahead == 'x') ADVANCE(2);
END_STATE();
case 2:
if (lookahead == 'p') ADVANCE(3);
END_STATE();
case 3:
if (lookahead == 'o') ADVANCE(4);
END_STATE();
case 4:
if (lookahead == 'r') ADVANCE(5);
END_STATE();
case 5:
if (lookahead == 't') ADVANCE(6);
END_STATE();
case 6:
ACCEPT_TOKEN(anon_sym_export);
END_STATE();
default:
return false;
}
}
static const TSLexerMode ts_lex_modes[STATE_COUNT] = {
[0] = {.lex_state = 0, .external_lex_state = 1},
[1] = {.lex_state = 11},
[2] = {.lex_state = 1, .external_lex_state = 1},
[3] = {.lex_state = 1, .external_lex_state = 1},
[4] = {.lex_state = 1, .external_lex_state = 1},
[5] = {.lex_state = 1, .external_lex_state = 1},
[6] = {.lex_state = 11},
[7] = {.lex_state = 2},
[8] = {.lex_state = 11},
[9] = {.lex_state = 2},
[10] = {.lex_state = 2},
[11] = {.lex_state = 11},
[12] = {.lex_state = 11},
[13] = {.lex_state = 11},
[14] = {.lex_state = 11},
[15] = {.lex_state = 11},
[16] = {.lex_state = 11},
[17] = {.lex_state = 11},
[18] = {.lex_state = 11},
[19] = {.lex_state = 0, .external_lex_state = 1},
[20] = {.lex_state = 0, .external_lex_state = 1},
[21] = {.lex_state = 0, .external_lex_state = 1},
[22] = {.lex_state = 0, .external_lex_state = 1},
[23] = {.lex_state = 11},
[24] = {.lex_state = 6, .external_lex_state = 1},
[25] = {.lex_state = 6, .external_lex_state = 1},
[26] = {.lex_state = 2},
[27] = {.lex_state = 2},
[28] = {.lex_state = 2},
[29] = {.lex_state = 3},
[30] = {.lex_state = 11},
[31] = {.lex_state = 11},
[32] = {.lex_state = 0, .external_lex_state = 1},
[33] = {.lex_state = 0},
[34] = {.lex_state = 0},
[35] = {.lex_state = 0, .external_lex_state = 1},
[36] = {.lex_state = 0, .external_lex_state = 1},
[37] = {.lex_state = 0, .external_lex_state = 1},
[38] = {.lex_state = 0},
[39] = {.lex_state = 0, .external_lex_state = 1},
[40] = {.lex_state = 0},
[41] = {.lex_state = 0, .external_lex_state = 1},
[42] = {.lex_state = 0},
[43] = {.lex_state = 0, .external_lex_state = 1},
[44] = {.lex_state = 0, .external_lex_state = 1},
[45] = {.lex_state = 0},
[46] = {.lex_state = 0, .external_lex_state = 1},
[47] = {.lex_state = 0, .external_lex_state = 1},
[48] = {.lex_state = 0, .external_lex_state = 1},
[49] = {.lex_state = 11},
[50] = {.lex_state = 0},
[51] = {.lex_state = 0, .external_lex_state = 1},
[52] = {.lex_state = 0, .external_lex_state = 1},
[53] = {.lex_state = 0},
[54] = {.lex_state = 11},
};
static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = {
[STATE(0)] = {
[ts_builtin_sym_end] = ACTIONS(1),
[sym_identifier] = ACTIONS(1),
[anon_sym_export] = ACTIONS(1),
[anon_sym_EQ] = ACTIONS(1),
[sym_comment] = ACTIONS(1),
[anon_sym_DOLLAR] = ACTIONS(1),
[anon_sym_LBRACE] = ACTIONS(1),
[anon_sym_RBRACE] = ACTIONS(1),
[anon_sym_SQUOTE] = ACTIONS(1),
[anon_sym_DQUOTE] = ACTIONS(1),
[sym_decimal] = ACTIONS(1),
[sym_hexadecimal] = ACTIONS(1),
[sym_float] = ACTIONS(1),
[sym_boolean] = ACTIONS(1),
[sym__end_of_assignment] = ACTIONS(1),
},
[STATE(1)] = {
[sym_document] = STATE(33),
[sym_assignment] = STATE(6),
[aux_sym_document_repeat1] = STATE(6),
[ts_builtin_sym_end] = ACTIONS(3),
[sym_identifier] = ACTIONS(5),
[anon_sym_export] = ACTIONS(7),
[sym_comment] = ACTIONS(9),
},
[STATE(2)] = {
[sym_variable] = STATE(39),
[sym__braced_variable] = STATE(46),
[sym__value] = STATE(39),
[sym_string] = STATE(39),
[sym__unquoted_string] = STATE(36),
[sym__literal_string] = STATE(36),
[sym__string] = STATE(36),
[sym_number] = STATE(39),
[sym_integer] = STATE(37),
[anon_sym_DOLLAR] = ACTIONS(11),
[sym__unquoted_content] = ACTIONS(13),
[anon_sym_SQUOTE] = ACTIONS(15),
[anon_sym_DQUOTE] = ACTIONS(17),
[sym_decimal] = ACTIONS(19),
[sym_hexadecimal] = ACTIONS(19),
[sym_float] = ACTIONS(21),
[sym_boolean] = ACTIONS(23),
[sym_value] = ACTIONS(23),
[sym__end_of_assignment] = ACTIONS(25),
},
[STATE(3)] = {
[sym_variable] = STATE(47),
[sym__braced_variable] = STATE(46),
[sym__value] = STATE(47),
[sym_string] = STATE(47),
[sym__unquoted_string] = STATE(36),
[sym__literal_string] = STATE(36),
[sym__string] = STATE(36),
[sym_number] = STATE(47),
[sym_integer] = STATE(37),
[anon_sym_DOLLAR] = ACTIONS(11),
[sym__unquoted_content] = ACTIONS(13),
[anon_sym_SQUOTE] = ACTIONS(15),
[anon_sym_DQUOTE] = ACTIONS(17),
[sym_decimal] = ACTIONS(19),
[sym_hexadecimal] = ACTIONS(19),
[sym_float] = ACTIONS(21),
[sym_boolean] = ACTIONS(23),
[sym_value] = ACTIONS(23),
[sym__end_of_assignment] = ACTIONS(27),
},
[STATE(4)] = {
[sym_variable] = STATE(51),
[sym__braced_variable] = STATE(46),
[sym__value] = STATE(51),
[sym_string] = STATE(51),
[sym__unquoted_string] = STATE(36),
[sym__literal_string] = STATE(36),
[sym__string] = STATE(36),
[sym_number] = STATE(51),
[sym_integer] = STATE(37),
[anon_sym_DOLLAR] = ACTIONS(11),
[sym__unquoted_content] = ACTIONS(13),
[anon_sym_SQUOTE] = ACTIONS(15),
[anon_sym_DQUOTE] = ACTIONS(17),
[sym_decimal] = ACTIONS(19),
[sym_hexadecimal] = ACTIONS(19),
[sym_float] = ACTIONS(21),
[sym_boolean] = ACTIONS(23),
[sym_value] = ACTIONS(23),
[sym__end_of_assignment] = ACTIONS(29),
},
[STATE(5)] = {
[sym_variable] = STATE(41),
[sym__braced_variable] = STATE(46),
[sym__value] = STATE(41),
[sym_string] = STATE(41),
[sym__unquoted_string] = STATE(36),
[sym__literal_string] = STATE(36),
[sym__string] = STATE(36),
[sym_number] = STATE(41),
[sym_integer] = STATE(37),
[anon_sym_DOLLAR] = ACTIONS(11),
[sym__unquoted_content] = ACTIONS(13),
[anon_sym_SQUOTE] = ACTIONS(15),
[anon_sym_DQUOTE] = ACTIONS(17),
[sym_decimal] = ACTIONS(19),
[sym_hexadecimal] = ACTIONS(19),
[sym_float] = ACTIONS(21),
[sym_boolean] = ACTIONS(23),
[sym_value] = ACTIONS(23),
[sym__end_of_assignment] = ACTIONS(31),
},
};
static const uint16_t ts_small_parse_table[] = {
[0] = 5,
ACTIONS(5), 1,
sym_identifier,
ACTIONS(7), 1,
anon_sym_export,
ACTIONS(33), 1,
ts_builtin_sym_end,
ACTIONS(35), 1,
sym_comment,
STATE(8), 2,
sym_assignment,
aux_sym_document_repeat1,
[17] = 5,
ACTIONS(37), 1,
anon_sym_DOLLAR,
ACTIONS(39), 1,
anon_sym_DQUOTE,
ACTIONS(41), 1,
aux_sym__string_token1,
STATE(26), 1,
sym__braced_variable,
STATE(9), 2,
sym_variable,
aux_sym__string_repeat1,
[34] = 5,
ACTIONS(43), 1,
ts_builtin_sym_end,
ACTIONS(45), 1,
sym_identifier,
ACTIONS(48), 1,
anon_sym_export,
ACTIONS(51), 1,
sym_comment,
STATE(8), 2,
sym_assignment,
aux_sym_document_repeat1,
[51] = 5,
ACTIONS(37), 1,
anon_sym_DOLLAR,
ACTIONS(54), 1,
anon_sym_DQUOTE,
ACTIONS(56), 1,
aux_sym__string_token1,
STATE(26), 1,
sym__braced_variable,
STATE(10), 2,
sym_variable,
aux_sym__string_repeat1,
[68] = 5,
ACTIONS(58), 1,
anon_sym_DOLLAR,
ACTIONS(61), 1,
anon_sym_DQUOTE,
ACTIONS(63), 1,
aux_sym__string_token1,
STATE(26), 1,
sym__braced_variable,
STATE(10), 2,
sym_variable,
aux_sym__string_repeat1,
[85] = 2,
ACTIONS(66), 2,
ts_builtin_sym_end,
sym_comment,
ACTIONS(68), 2,
anon_sym_export,
sym_identifier,
[94] = 2,
ACTIONS(70), 2,
ts_builtin_sym_end,
sym_comment,
ACTIONS(72), 2,
anon_sym_export,
sym_identifier,
[103] = 2,
ACTIONS(74), 2,
ts_builtin_sym_end,
sym_comment,
ACTIONS(76), 2,
anon_sym_export,
sym_identifier,
[112] = 2,
ACTIONS(78), 2,
ts_builtin_sym_end,
sym_comment,
ACTIONS(80), 2,
anon_sym_export,
sym_identifier,
[121] = 2,
ACTIONS(82), 2,
ts_builtin_sym_end,
sym_comment,
ACTIONS(84), 2,
anon_sym_export,
sym_identifier,
[130] = 2,
ACTIONS(86), 2,
ts_builtin_sym_end,
sym_comment,
ACTIONS(88), 2,
anon_sym_export,
sym_identifier,
[139] = 2,
ACTIONS(90), 2,
ts_builtin_sym_end,
sym_comment,
ACTIONS(92), 2,
anon_sym_export,
sym_identifier,
[148] = 2,
ACTIONS(94), 2,
ts_builtin_sym_end,
sym_comment,
ACTIONS(96), 2,
anon_sym_export,
sym_identifier,
[157] = 3,
ACTIONS(98), 1,
anon_sym_DOLLAR,
ACTIONS(100), 1,
sym__end_of_assignment,
STATE(24), 1,
sym__braced_variable,
[167] = 3,
ACTIONS(98), 1,
anon_sym_DOLLAR,
ACTIONS(102), 1,
sym__end_of_assignment,
STATE(24), 1,
sym__braced_variable,
[177] = 3,
ACTIONS(98), 1,
anon_sym_DOLLAR,
ACTIONS(104), 1,
sym__end_of_assignment,
STATE(24), 1,
sym__braced_variable,
[187] = 3,
ACTIONS(98), 1,
anon_sym_DOLLAR,
ACTIONS(106), 1,
sym__end_of_assignment,
STATE(24), 1,
sym__braced_variable,
[197] = 3,
ACTIONS(108), 1,
sym_identifier,
ACTIONS(110), 1,
anon_sym_export,
ACTIONS(112), 1,
anon_sym_EQ,
[207] = 3,
ACTIONS(114), 1,
sym__unquoted_content,
ACTIONS(116), 1,
sym_value,
ACTIONS(118), 1,
sym__end_of_assignment,
[217] = 2,
ACTIONS(122), 1,
sym_value,
ACTIONS(120), 2,
sym__end_of_assignment,
sym__unquoted_content,
[225] = 2,
ACTIONS(126), 1,
aux_sym__string_token1,
ACTIONS(124), 2,
anon_sym_DOLLAR,
anon_sym_DQUOTE,
[233] = 2,
ACTIONS(130), 1,
aux_sym__string_token1,
ACTIONS(128), 2,
anon_sym_DOLLAR,
anon_sym_DQUOTE,
[241] = 2,
ACTIONS(120), 1,
aux_sym__string_token1,
ACTIONS(122), 2,
anon_sym_DOLLAR,
anon_sym_DQUOTE,
[249] = 2,
ACTIONS(132), 1,
anon_sym_SQUOTE,
ACTIONS(134), 1,
aux_sym__literal_string_token1,
[256] = 2,
ACTIONS(136), 1,
sym_identifier,
ACTIONS(138), 1,
anon_sym_LBRACE,
[263] = 2,
ACTIONS(140), 1,
sym_identifier,
ACTIONS(142), 1,
anon_sym_LBRACE,
[270] = 1,
ACTIONS(144), 1,
sym__end_of_assignment,
[274] = 1,
ACTIONS(146), 1,
ts_builtin_sym_end,
[278] = 1,
ACTIONS(148), 1,
anon_sym_SQUOTE,
[282] = 1,
ACTIONS(150), 1,
sym__end_of_assignment,
[286] = 1,
ACTIONS(152), 1,
sym__end_of_assignment,
[290] = 1,
ACTIONS(100), 1,
sym__end_of_assignment,
[294] = 1,
ACTIONS(154), 1,
anon_sym_EQ,
[298] = 1,
ACTIONS(156), 1,
sym__end_of_assignment,
[302] = 1,
ACTIONS(158), 1,
anon_sym_EQ,
[306] = 1,
ACTIONS(160), 1,
sym__end_of_assignment,
[310] = 1,
ACTIONS(162), 1,
anon_sym_RBRACE,
[314] = 1,
ACTIONS(164), 1,
sym__end_of_assignment,
[318] = 1,
ACTIONS(166), 1,
sym__end_of_assignment,
[322] = 1,
ACTIONS(168), 1,
anon_sym_EQ,
[326] = 1,
ACTIONS(126), 1,
sym__end_of_assignment,
[330] = 1,
ACTIONS(170), 1,
sym__end_of_assignment,
[334] = 1,
ACTIONS(130), 1,
sym__end_of_assignment,
[338] = 1,
ACTIONS(172), 1,
sym_identifier,
[342] = 1,
ACTIONS(138), 1,
anon_sym_LBRACE,
[346] = 1,
ACTIONS(174), 1,
sym__end_of_assignment,
[350] = 1,
ACTIONS(176), 1,
sym__end_of_assignment,
[354] = 1,
ACTIONS(178), 1,
anon_sym_RBRACE,
[358] = 1,
ACTIONS(180), 1,
sym_identifier,
};
static const uint32_t ts_small_parse_table_map[] = {
[SMALL_STATE(6)] = 0,
[SMALL_STATE(7)] = 17,
[SMALL_STATE(8)] = 34,
[SMALL_STATE(9)] = 51,
[SMALL_STATE(10)] = 68,
[SMALL_STATE(11)] = 85,
[SMALL_STATE(12)] = 94,
[SMALL_STATE(13)] = 103,
[SMALL_STATE(14)] = 112,
[SMALL_STATE(15)] = 121,
[SMALL_STATE(16)] = 130,
[SMALL_STATE(17)] = 139,
[SMALL_STATE(18)] = 148,
[SMALL_STATE(19)] = 157,
[SMALL_STATE(20)] = 167,
[SMALL_STATE(21)] = 177,
[SMALL_STATE(22)] = 187,
[SMALL_STATE(23)] = 197,
[SMALL_STATE(24)] = 207,
[SMALL_STATE(25)] = 217,
[SMALL_STATE(26)] = 225,
[SMALL_STATE(27)] = 233,
[SMALL_STATE(28)] = 241,
[SMALL_STATE(29)] = 249,
[SMALL_STATE(30)] = 256,
[SMALL_STATE(31)] = 263,
[SMALL_STATE(32)] = 270,
[SMALL_STATE(33)] = 274,
[SMALL_STATE(34)] = 278,
[SMALL_STATE(35)] = 282,
[SMALL_STATE(36)] = 286,
[SMALL_STATE(37)] = 290,
[SMALL_STATE(38)] = 294,
[SMALL_STATE(39)] = 298,
[SMALL_STATE(40)] = 302,
[SMALL_STATE(41)] = 306,
[SMALL_STATE(42)] = 310,
[SMALL_STATE(43)] = 314,
[SMALL_STATE(44)] = 318,
[SMALL_STATE(45)] = 322,
[SMALL_STATE(46)] = 326,
[SMALL_STATE(47)] = 330,
[SMALL_STATE(48)] = 334,
[SMALL_STATE(49)] = 338,
[SMALL_STATE(50)] = 342,
[SMALL_STATE(51)] = 346,
[SMALL_STATE(52)] = 350,
[SMALL_STATE(53)] = 354,
[SMALL_STATE(54)] = 358,
};
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}}, REDUCE(sym_document, 0, 0, 0),
[5] = {.entry = {.count = 1, .reusable = false}}, SHIFT(45),
[7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(23),
[9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6),
[11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30),
[13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21),
[15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29),
[17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7),
[19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(20),
[21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(19),
[23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(22),
[25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14),
[27] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17),
[29] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11),
[31] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12),
[33] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_document, 1, 0, 0),
[35] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8),
[37] = {.entry = {.count = 1, .reusable = false}}, SHIFT(31),
[39] = {.entry = {.count = 1, .reusable = false}}, SHIFT(35),
[41] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9),
[43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2, 0, 0),
[45] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_document_repeat1, 2, 0, 0), SHIFT_REPEAT(45),
[48] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_document_repeat1, 2, 0, 0), SHIFT_REPEAT(23),
[51] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2, 0, 0), SHIFT_REPEAT(8),
[54] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32),
[56] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10),
[58] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__string_repeat1, 2, 0, 0), SHIFT_REPEAT(31),
[61] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__string_repeat1, 2, 0, 0),
[63] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__string_repeat1, 2, 0, 0), SHIFT_REPEAT(10),
[66] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment, 3, 0, 1),
[68] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment, 3, 0, 1),
[70] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment, 3, 0, 3),
[72] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment, 3, 0, 3),
[74] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment, 4, 0, 8),
[76] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment, 4, 0, 8),
[78] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment, 4, 0, 7),
[80] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment, 4, 0, 7),
[82] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment, 4, 0, 6),
[84] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment, 4, 0, 6),
[86] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment, 5, 0, 11),
[88] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment, 5, 0, 11),
[90] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment, 4, 0, 4),
[92] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment, 4, 0, 4),
[94] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment, 5, 0, 9),
[96] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment, 5, 0, 9),
[98] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50),
[100] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_number, 1, 0, 0),
[102] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_integer, 1, 0, 0),
[104] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__unquoted_string, 1, 0, 2),
[106] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__value, 1, 0, 0),
[108] = {.entry = {.count = 1, .reusable = false}}, SHIFT(38),
[110] = {.entry = {.count = 1, .reusable = false}}, SHIFT(40),
[112] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4),
[114] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43),
[116] = {.entry = {.count = 1, .reusable = false}}, SHIFT(43),
[118] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__unquoted_string, 2, 0, 5),
[120] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__braced_variable, 4, 0, 0),
[122] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__braced_variable, 4, 0, 0),
[124] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_variable, 1, 0, 0),
[126] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable, 1, 0, 0),
[128] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_variable, 2, 0, 0),
[130] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable, 2, 0, 0),
[132] = {.entry = {.count = 1, .reusable = false}}, SHIFT(52),
[134] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34),
[136] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48),
[138] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49),
[140] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27),
[142] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54),
[144] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__string, 3, 0, 0),
[146] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(),
[148] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44),
[150] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__string, 2, 0, 0),
[152] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string, 1, 0, 0),
[154] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2),
[156] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16),
[158] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3),
[160] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13),
[162] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25),
[164] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__unquoted_string, 3, 0, 10),
[166] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__literal_string, 3, 0, 0),
[168] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5),
[170] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18),
[172] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42),
[174] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15),
[176] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__literal_string, 2, 0, 0),
[178] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28),
[180] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53),
};
enum ts_external_scanner_symbol_identifiers {
ts_external_token__end_of_assignment = 0,
};
static const TSSymbol ts_external_scanner_symbol_map[EXTERNAL_TOKEN_COUNT] = {
[ts_external_token__end_of_assignment] = sym__end_of_assignment,
};
static const bool ts_external_scanner_states[2][EXTERNAL_TOKEN_COUNT] = {
[1] = {
[ts_external_token__end_of_assignment] = true,
},
};
#ifdef __cplusplus
extern "C" {
#endif
void *tree_sitter_dotenv_external_scanner_create(void);
void tree_sitter_dotenv_external_scanner_destroy(void *);
bool tree_sitter_dotenv_external_scanner_scan(void *, TSLexer *, const bool *);
unsigned tree_sitter_dotenv_external_scanner_serialize(void *, char *);
void tree_sitter_dotenv_external_scanner_deserialize(void *, const char *, unsigned);
#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_dotenv(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,
.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 = (const void*)ts_lex_modes,
.lex_fn = ts_lex,
.keyword_lex_fn = ts_lex_keywords,
.keyword_capture_token = sym_identifier,
.external_scanner = {
&ts_external_scanner_states[0][0],
ts_external_scanner_symbol_map,
tree_sitter_dotenv_external_scanner_create,
tree_sitter_dotenv_external_scanner_destroy,
tree_sitter_dotenv_external_scanner_scan,
tree_sitter_dotenv_external_scanner_serialize,
tree_sitter_dotenv_external_scanner_deserialize,
},
.primary_state_ids = ts_primary_state_ids,
.name = "dotenv",
.max_reserved_word_set_size = 0,
.metadata = {
.major_version = 1,
.minor_version = 1,
.patch_version = 3,
},
};
return &language;
}
#ifdef __cplusplus
}
#endif