diff --git a/grammar.js b/grammar.js index 8523868..c97fcbb 100644 --- a/grammar.js +++ b/grammar.js @@ -227,9 +227,18 @@ module.exports = grammar({ _declaration_chunks: ($) => repeat1($._declaration_chunk), _declaration_chunk: ($) => choice( + $.variable_declaration, $.import_declaration, ), + variable_declaration: ($) => seq( + "var", + field("name", $.identifier), + optional(seq(":", field("type", $.identifier))), + ":=", + field("value", $._expr), + ), + import_declaration: ($) => seq( "import", field("file", $.string_literal), diff --git a/src/grammar.json b/src/grammar.json index 041f9bb..8539e27 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -1042,12 +1042,70 @@ "_declaration_chunk": { "type": "CHOICE", "members": [ + { + "type": "SYMBOL", + "name": "variable_declaration" + }, { "type": "SYMBOL", "name": "import_declaration" } ] }, + "variable_declaration": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "var" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ":=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_expr" + } + } + ] + }, "import_declaration": { "type": "SEQ", "members": [ diff --git a/src/node-types.json b/src/node-types.json index 4484c26..db64ba0 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -1244,6 +1244,10 @@ { "type": "import_declaration", "named": true + }, + { + "type": "variable_declaration", + "named": true } ] } @@ -1550,6 +1554,10 @@ "type": "unary_expression", "named": true }, + { + "type": "variable_declaration", + "named": true + }, { "type": "while_expression", "named": true @@ -1666,6 +1674,110 @@ } } }, + { + "type": "variable_declaration", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "type": { + "multiple": false, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "array_expression", + "named": true + }, + { + "type": "array_value", + "named": true + }, + { + "type": "assignment_expression", + "named": true + }, + { + "type": "binary_expression", + "named": true + }, + { + "type": "break_expression", + "named": true + }, + { + "type": "for_expression", + "named": true + }, + { + "type": "function_call", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "if_expression", + "named": true + }, + { + "type": "integer_literal", + "named": true + }, + { + "type": "let_expression", + "named": true + }, + { + "type": "nil_literal", + "named": true + }, + { + "type": "record_expression", + "named": true + }, + { + "type": "record_value", + "named": true + }, + { + "type": "sequence_expression", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "unary_expression", + "named": true + }, + { + "type": "while_expression", + "named": true + } + ] + } + } + }, { "type": "while_expression", "named": true, @@ -1848,6 +1960,10 @@ "type": ".", "named": false }, + { + "type": ":", + "named": false + }, { "type": ":=", "named": false @@ -1936,6 +2052,10 @@ "type": "to", "named": false }, + { + "type": "var", + "named": false + }, { "type": "while", "named": false diff --git a/src/parser.c b/src/parser.c index e2fcce6..af91a54 100644 --- a/src/parser.c +++ b/src/parser.c @@ -6,15 +6,15 @@ #endif #define LANGUAGE_VERSION 13 -#define STATE_COUNT 102 +#define STATE_COUNT 110 #define LARGE_STATE_COUNT 2 -#define SYMBOL_COUNT 66 +#define SYMBOL_COUNT 69 #define ALIAS_COUNT 0 -#define TOKEN_COUNT 42 +#define TOKEN_COUNT 44 #define EXTERNAL_TOKEN_COUNT 0 -#define FIELD_COUNT 21 +#define FIELD_COUNT 23 #define MAX_ALIAS_SEQUENCE_LENGTH 8 -#define PRODUCTION_ID_COUNT 25 +#define PRODUCTION_ID_COUNT 27 enum { sym_identifier = 1, @@ -57,31 +57,34 @@ enum { anon_sym_let = 38, anon_sym_in = 39, anon_sym_end = 40, - anon_sym_import = 41, - sym_source_file = 42, - sym__expr = 43, - sym_string_literal = 44, - sym__lvalue = 45, - sym_record_value = 46, - sym_array_value = 47, - sym_function_call = 48, - sym_unary_expression = 49, - sym_binary_expression = 50, - sym_sequence_expression = 51, - sym_array_expression = 52, - sym_record_expression = 53, - sym_assignment_expression = 54, - sym_if_expression = 55, - sym_while_expression = 56, - sym_for_expression = 57, - sym_let_expression = 58, - aux_sym__declaration_chunks = 59, - sym__declaration_chunk = 60, - sym_import_declaration = 61, - aux_sym_string_literal_repeat1 = 62, - aux_sym_function_call_repeat1 = 63, - aux_sym_sequence_expression_repeat1 = 64, - aux_sym_record_expression_repeat1 = 65, + anon_sym_var = 41, + anon_sym_COLON = 42, + anon_sym_import = 43, + sym_source_file = 44, + sym__expr = 45, + sym_string_literal = 46, + sym__lvalue = 47, + sym_record_value = 48, + sym_array_value = 49, + sym_function_call = 50, + sym_unary_expression = 51, + sym_binary_expression = 52, + sym_sequence_expression = 53, + sym_array_expression = 54, + sym_record_expression = 55, + sym_assignment_expression = 56, + sym_if_expression = 57, + sym_while_expression = 58, + sym_for_expression = 59, + sym_let_expression = 60, + aux_sym__declaration_chunks = 61, + sym__declaration_chunk = 62, + sym_variable_declaration = 63, + sym_import_declaration = 64, + aux_sym_string_literal_repeat1 = 65, + aux_sym_function_call_repeat1 = 66, + aux_sym_sequence_expression_repeat1 = 67, + aux_sym_record_expression_repeat1 = 68, }; static const char * const ts_symbol_names[] = { @@ -126,6 +129,8 @@ static const char * const ts_symbol_names[] = { [anon_sym_let] = "let", [anon_sym_in] = "in", [anon_sym_end] = "end", + [anon_sym_var] = "var", + [anon_sym_COLON] = ":", [anon_sym_import] = "import", [sym_source_file] = "source_file", [sym__expr] = "_expr", @@ -146,6 +151,7 @@ static const char * const ts_symbol_names[] = { [sym_let_expression] = "let_expression", [aux_sym__declaration_chunks] = "_declaration_chunks", [sym__declaration_chunk] = "_declaration_chunk", + [sym_variable_declaration] = "variable_declaration", [sym_import_declaration] = "import_declaration", [aux_sym_string_literal_repeat1] = "string_literal_repeat1", [aux_sym_function_call_repeat1] = "function_call_repeat1", @@ -195,6 +201,8 @@ static const TSSymbol ts_symbol_map[] = { [anon_sym_let] = anon_sym_let, [anon_sym_in] = anon_sym_in, [anon_sym_end] = anon_sym_end, + [anon_sym_var] = anon_sym_var, + [anon_sym_COLON] = anon_sym_COLON, [anon_sym_import] = anon_sym_import, [sym_source_file] = sym_source_file, [sym__expr] = sym__expr, @@ -215,6 +223,7 @@ static const TSSymbol ts_symbol_map[] = { [sym_let_expression] = sym_let_expression, [aux_sym__declaration_chunks] = aux_sym__declaration_chunks, [sym__declaration_chunk] = sym__declaration_chunk, + [sym_variable_declaration] = sym_variable_declaration, [sym_import_declaration] = sym_import_declaration, [aux_sym_string_literal_repeat1] = aux_sym_string_literal_repeat1, [aux_sym_function_call_repeat1] = aux_sym_function_call_repeat1, @@ -387,6 +396,14 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, + [anon_sym_var] = { + .visible = true, + .named = false, + }, + [anon_sym_COLON] = { + .visible = true, + .named = false, + }, [anon_sym_import] = { .visible = true, .named = false, @@ -467,6 +484,10 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = true, }, + [sym_variable_declaration] = { + .visible = true, + .named = true, + }, [sym_import_declaration] = { .visible = true, .named = true, @@ -505,12 +526,14 @@ enum { field_index = 13, field_init = 14, field_left = 15, - field_operator = 16, - field_record = 17, - field_right = 18, - field_size = 19, - field_start = 20, - field_type = 21, + field_name = 16, + field_operator = 17, + field_record = 18, + field_right = 19, + field_size = 20, + field_start = 21, + field_type = 22, + field_value = 23, }; static const char * const ts_field_names[] = { @@ -530,12 +553,14 @@ static const char * const ts_field_names[] = { [field_index] = "index", [field_init] = "init", [field_left] = "left", + [field_name] = "name", [field_operator] = "operator", [field_record] = "record", [field_right] = "right", [field_size] = "size", [field_start] = "start", [field_type] = "type", + [field_value] = "value", }; static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { @@ -552,17 +577,19 @@ static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { [11] = {.index = 18, .length = 1}, [12] = {.index = 19, .length = 1}, [13] = {.index = 20, .length = 2}, - [14] = {.index = 22, .length = 3}, - [15] = {.index = 25, .length = 2}, + [14] = {.index = 22, .length = 2}, + [15] = {.index = 24, .length = 3}, [16] = {.index = 27, .length = 2}, - [17] = {.index = 29, .length = 3}, - [18] = {.index = 32, .length = 3}, - [19] = {.index = 35, .length = 3}, - [20] = {.index = 38, .length = 3}, - [21] = {.index = 41, .length = 5}, - [22] = {.index = 46, .length = 4}, - [23] = {.index = 50, .length = 4}, - [24] = {.index = 54, .length = 2}, + [17] = {.index = 29, .length = 2}, + [18] = {.index = 31, .length = 3}, + [19] = {.index = 34, .length = 3}, + [20] = {.index = 37, .length = 3}, + [21] = {.index = 40, .length = 3}, + [22] = {.index = 43, .length = 3}, + [23] = {.index = 46, .length = 5}, + [24] = {.index = 51, .length = 4}, + [25] = {.index = 55, .length = 4}, + [26] = {.index = 59, .length = 2}, }; static const TSFieldMapEntry ts_field_map_entries[] = { @@ -599,51 +626,58 @@ static const TSFieldMapEntry ts_field_map_entries[] = { [19] = {field_declarations, 1}, [20] = + {field_name, 1}, + {field_value, 3}, + [22] = {field_array, 0}, {field_index, 2}, - [22] = + [24] = {field_arguments, 2}, {field_arguments, 3}, {field_function, 0}, - [25] = + [27] = {field_body, 2}, {field_body, 3}, - [27] = + [29] = {field_body, 3}, {field_declarations, 1}, - [29] = + [31] = {field_init, 5}, {field_size, 2}, {field_type, 0}, - [32] = + [34] = {field_field, 2}, {field_init, 4}, {field_type, 0}, - [35] = + [37] = {field_alternative, 5}, {field_condition, 1}, {field_consequence, 3}, - [38] = + [40] = {field_body, 3}, {field_body, 4}, {field_declarations, 1}, - [41] = + [43] = + {field_name, 1}, + {field_type, 3}, + {field_value, 5}, + [46] = {field_field, 2}, {field_field, 5, .inherited = true}, {field_init, 4}, {field_init, 5, .inherited = true}, {field_type, 0}, - [46] = + [51] = {field_field, 0, .inherited = true}, {field_field, 1, .inherited = true}, {field_init, 0, .inherited = true}, {field_init, 1, .inherited = true}, - [50] = + [55] = {field_body, 7}, {field_end, 5}, {field_index, 1}, {field_start, 3}, - [54] = + [59] = {field_field, 1}, {field_init, 3}, }; @@ -675,7 +709,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { if (lookahead == '-') ADVANCE(23); if (lookahead == '.') ADVANCE(17); if (lookahead == '/') ADVANCE(25); - if (lookahead == ':') ADVANCE(2); + if (lookahead == ':') ADVANCE(39); if (lookahead == ';') ADVANCE(35); if (lookahead == '<') ADVANCE(31); if (lookahead == '=') ADVANCE(29); @@ -748,7 +782,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { if (lookahead == '-') ADVANCE(23); if (lookahead == '.') ADVANCE(17); if (lookahead == '/') ADVANCE(25); - if (lookahead == ':') ADVANCE(2); + if (lookahead == ':') ADVANCE(39); if (lookahead == ';') ADVANCE(35); if (lookahead == '<') ADVANCE(31); if (lookahead == '=') ADVANCE(29); @@ -905,6 +939,10 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { case 38: ACCEPT_TOKEN(anon_sym_COLON_EQ); END_STATE(); + case 39: + ACCEPT_TOKEN(anon_sym_COLON); + if (lookahead == '=') ADVANCE(38); + END_STATE(); default: return false; } @@ -924,140 +962,150 @@ static bool ts_lex_keywords(TSLexer *lexer, TSStateId state) { if (lookahead == 'n') ADVANCE(7); if (lookahead == 'o') ADVANCE(8); if (lookahead == 't') ADVANCE(9); - if (lookahead == 'w') ADVANCE(10); + if (lookahead == 'v') ADVANCE(10); + if (lookahead == 'w') ADVANCE(11); if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || lookahead == ' ') SKIP(0) END_STATE(); case 1: - if (lookahead == 'r') ADVANCE(11); + if (lookahead == 'r') ADVANCE(12); END_STATE(); case 2: - if (lookahead == 'o') ADVANCE(12); + if (lookahead == 'o') ADVANCE(13); END_STATE(); case 3: - if (lookahead == 'l') ADVANCE(13); - if (lookahead == 'n') ADVANCE(14); + if (lookahead == 'l') ADVANCE(14); + if (lookahead == 'n') ADVANCE(15); END_STATE(); case 4: - if (lookahead == 'o') ADVANCE(15); + if (lookahead == 'o') ADVANCE(16); END_STATE(); case 5: - if (lookahead == 'f') ADVANCE(16); - if (lookahead == 'm') ADVANCE(17); - if (lookahead == 'n') ADVANCE(18); + if (lookahead == 'f') ADVANCE(17); + if (lookahead == 'm') ADVANCE(18); + if (lookahead == 'n') ADVANCE(19); END_STATE(); case 6: - if (lookahead == 'e') ADVANCE(19); + if (lookahead == 'e') ADVANCE(20); END_STATE(); case 7: - if (lookahead == 'i') ADVANCE(20); + if (lookahead == 'i') ADVANCE(21); END_STATE(); case 8: - if (lookahead == 'f') ADVANCE(21); + if (lookahead == 'f') ADVANCE(22); END_STATE(); case 9: - if (lookahead == 'h') ADVANCE(22); - if (lookahead == 'o') ADVANCE(23); + if (lookahead == 'h') ADVANCE(23); + if (lookahead == 'o') ADVANCE(24); END_STATE(); case 10: - if (lookahead == 'h') ADVANCE(24); + if (lookahead == 'a') ADVANCE(25); END_STATE(); case 11: - if (lookahead == 'e') ADVANCE(25); + if (lookahead == 'h') ADVANCE(26); END_STATE(); case 12: - ACCEPT_TOKEN(anon_sym_do); + if (lookahead == 'e') ADVANCE(27); END_STATE(); case 13: - if (lookahead == 's') ADVANCE(26); + ACCEPT_TOKEN(anon_sym_do); END_STATE(); case 14: - if (lookahead == 'd') ADVANCE(27); + if (lookahead == 's') ADVANCE(28); END_STATE(); case 15: - if (lookahead == 'r') ADVANCE(28); + if (lookahead == 'd') ADVANCE(29); END_STATE(); case 16: - ACCEPT_TOKEN(anon_sym_if); + if (lookahead == 'r') ADVANCE(30); END_STATE(); case 17: - if (lookahead == 'p') ADVANCE(29); + ACCEPT_TOKEN(anon_sym_if); END_STATE(); case 18: - ACCEPT_TOKEN(anon_sym_in); + if (lookahead == 'p') ADVANCE(31); END_STATE(); case 19: - if (lookahead == 't') ADVANCE(30); + ACCEPT_TOKEN(anon_sym_in); END_STATE(); case 20: - if (lookahead == 'l') ADVANCE(31); + if (lookahead == 't') ADVANCE(32); END_STATE(); case 21: - ACCEPT_TOKEN(anon_sym_of); + if (lookahead == 'l') ADVANCE(33); END_STATE(); case 22: - if (lookahead == 'e') ADVANCE(32); + ACCEPT_TOKEN(anon_sym_of); END_STATE(); case 23: - ACCEPT_TOKEN(anon_sym_to); + if (lookahead == 'e') ADVANCE(34); END_STATE(); case 24: - if (lookahead == 'i') ADVANCE(33); + ACCEPT_TOKEN(anon_sym_to); END_STATE(); case 25: - if (lookahead == 'a') ADVANCE(34); + if (lookahead == 'r') ADVANCE(35); END_STATE(); case 26: - if (lookahead == 'e') ADVANCE(35); + if (lookahead == 'i') ADVANCE(36); END_STATE(); case 27: - ACCEPT_TOKEN(anon_sym_end); + if (lookahead == 'a') ADVANCE(37); END_STATE(); case 28: - ACCEPT_TOKEN(anon_sym_for); + if (lookahead == 'e') ADVANCE(38); END_STATE(); case 29: - if (lookahead == 'o') ADVANCE(36); + ACCEPT_TOKEN(anon_sym_end); END_STATE(); case 30: - ACCEPT_TOKEN(anon_sym_let); + ACCEPT_TOKEN(anon_sym_for); END_STATE(); case 31: - ACCEPT_TOKEN(sym_nil_literal); + if (lookahead == 'o') ADVANCE(39); END_STATE(); case 32: - if (lookahead == 'n') ADVANCE(37); + ACCEPT_TOKEN(anon_sym_let); END_STATE(); case 33: - if (lookahead == 'l') ADVANCE(38); + ACCEPT_TOKEN(sym_nil_literal); END_STATE(); case 34: - if (lookahead == 'k') ADVANCE(39); + if (lookahead == 'n') ADVANCE(40); END_STATE(); case 35: - ACCEPT_TOKEN(anon_sym_else); + ACCEPT_TOKEN(anon_sym_var); END_STATE(); case 36: - if (lookahead == 'r') ADVANCE(40); + if (lookahead == 'l') ADVANCE(41); END_STATE(); case 37: - ACCEPT_TOKEN(anon_sym_then); + if (lookahead == 'k') ADVANCE(42); END_STATE(); case 38: - if (lookahead == 'e') ADVANCE(41); + ACCEPT_TOKEN(anon_sym_else); END_STATE(); case 39: - ACCEPT_TOKEN(sym_break_expression); + if (lookahead == 'r') ADVANCE(43); END_STATE(); case 40: - if (lookahead == 't') ADVANCE(42); + ACCEPT_TOKEN(anon_sym_then); END_STATE(); case 41: - ACCEPT_TOKEN(anon_sym_while); + if (lookahead == 'e') ADVANCE(44); END_STATE(); case 42: + ACCEPT_TOKEN(sym_break_expression); + END_STATE(); + case 43: + if (lookahead == 't') ADVANCE(45); + END_STATE(); + case 44: + ACCEPT_TOKEN(anon_sym_while); + END_STATE(); + case 45: ACCEPT_TOKEN(anon_sym_import); END_STATE(); default: @@ -1068,10 +1116,10 @@ static bool ts_lex_keywords(TSLexer *lexer, TSStateId state) { static const TSLexMode ts_lex_modes[STATE_COUNT] = { [0] = {.lex_state = 0}, [1] = {.lex_state = 0}, - [2] = {.lex_state = 0}, - [3] = {.lex_state = 0}, + [2] = {.lex_state = 9}, + [3] = {.lex_state = 9}, [4] = {.lex_state = 9}, - [5] = {.lex_state = 0}, + [5] = {.lex_state = 9}, [6] = {.lex_state = 0}, [7] = {.lex_state = 0}, [8] = {.lex_state = 0}, @@ -1095,11 +1143,11 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [26] = {.lex_state = 0}, [27] = {.lex_state = 0}, [28] = {.lex_state = 0}, - [29] = {.lex_state = 9}, - [30] = {.lex_state = 9}, - [31] = {.lex_state = 9}, - [32] = {.lex_state = 9}, - [33] = {.lex_state = 9}, + [29] = {.lex_state = 0}, + [30] = {.lex_state = 0}, + [31] = {.lex_state = 0}, + [32] = {.lex_state = 0}, + [33] = {.lex_state = 0}, [34] = {.lex_state = 9}, [35] = {.lex_state = 9}, [36] = {.lex_state = 9}, @@ -1128,46 +1176,54 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [59] = {.lex_state = 9}, [60] = {.lex_state = 9}, [61] = {.lex_state = 9}, - [62] = {.lex_state = 0}, + [62] = {.lex_state = 9}, [63] = {.lex_state = 9}, - [64] = {.lex_state = 0}, - [65] = {.lex_state = 0}, - [66] = {.lex_state = 9}, + [64] = {.lex_state = 9}, + [65] = {.lex_state = 9}, + [66] = {.lex_state = 0}, [67] = {.lex_state = 0}, [68] = {.lex_state = 0}, [69] = {.lex_state = 9}, - [70] = {.lex_state = 0}, - [71] = {.lex_state = 9}, + [70] = {.lex_state = 9}, + [71] = {.lex_state = 0}, [72] = {.lex_state = 0}, - [73] = {.lex_state = 9}, + [73] = {.lex_state = 0}, [74] = {.lex_state = 9}, - [75] = {.lex_state = 0}, - [76] = {.lex_state = 9}, - [77] = {.lex_state = 9}, + [75] = {.lex_state = 9}, + [76] = {.lex_state = 0}, + [77] = {.lex_state = 0}, [78] = {.lex_state = 9}, [79] = {.lex_state = 9}, - [80] = {.lex_state = 1}, + [80] = {.lex_state = 9}, [81] = {.lex_state = 9}, - [82] = {.lex_state = 1}, - [83] = {.lex_state = 1}, - [84] = {.lex_state = 0}, - [85] = {.lex_state = 0}, + [82] = {.lex_state = 9}, + [83] = {.lex_state = 9}, + [84] = {.lex_state = 1}, + [85] = {.lex_state = 1}, [86] = {.lex_state = 9}, [87] = {.lex_state = 9}, - [88] = {.lex_state = 0}, - [89] = {.lex_state = 9}, + [88] = {.lex_state = 1}, + [89] = {.lex_state = 0}, [90] = {.lex_state = 0}, - [91] = {.lex_state = 0}, - [92] = {.lex_state = 9}, - [93] = {.lex_state = 0}, + [91] = {.lex_state = 9}, + [92] = {.lex_state = 0}, + [93] = {.lex_state = 9}, [94] = {.lex_state = 0}, - [95] = {.lex_state = 9}, + [95] = {.lex_state = 0}, [96] = {.lex_state = 9}, - [97] = {.lex_state = 9}, + [97] = {.lex_state = 0}, [98] = {.lex_state = 0}, - [99] = {.lex_state = 0}, + [99] = {.lex_state = 9}, [100] = {.lex_state = 0}, [101] = {.lex_state = 9}, + [102] = {.lex_state = 0}, + [103] = {.lex_state = 9}, + [104] = {.lex_state = 9}, + [105] = {.lex_state = 0}, + [106] = {.lex_state = 0}, + [107] = {.lex_state = 0}, + [108] = {.lex_state = 9}, + [109] = {.lex_state = 9}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { @@ -1212,29 +1268,32 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_let] = ACTIONS(1), [anon_sym_in] = ACTIONS(1), [anon_sym_end] = ACTIONS(1), + [anon_sym_var] = ACTIONS(1), + [anon_sym_COLON] = ACTIONS(1), [anon_sym_import] = ACTIONS(1), }, [1] = { - [sym_source_file] = STATE(99), - [sym__expr] = STATE(70), - [sym_string_literal] = STATE(70), - [sym__lvalue] = STATE(30), - [sym_record_value] = STATE(30), - [sym_array_value] = STATE(30), - [sym_function_call] = STATE(70), - [sym_unary_expression] = STATE(70), - [sym_binary_expression] = STATE(70), - [sym_sequence_expression] = STATE(70), - [sym_array_expression] = STATE(70), - [sym_record_expression] = STATE(70), - [sym_assignment_expression] = STATE(70), - [sym_if_expression] = STATE(70), - [sym_while_expression] = STATE(70), - [sym_for_expression] = STATE(70), - [sym_let_expression] = STATE(70), - [aux_sym__declaration_chunks] = STATE(79), - [sym__declaration_chunk] = STATE(79), - [sym_import_declaration] = STATE(79), + [sym_source_file] = STATE(106), + [sym__expr] = STATE(73), + [sym_string_literal] = STATE(73), + [sym__lvalue] = STATE(5), + [sym_record_value] = STATE(5), + [sym_array_value] = STATE(5), + [sym_function_call] = STATE(73), + [sym_unary_expression] = STATE(73), + [sym_binary_expression] = STATE(73), + [sym_sequence_expression] = STATE(73), + [sym_array_expression] = STATE(73), + [sym_record_expression] = STATE(73), + [sym_assignment_expression] = STATE(73), + [sym_if_expression] = STATE(73), + [sym_while_expression] = STATE(73), + [sym_for_expression] = STATE(73), + [sym_let_expression] = STATE(73), + [aux_sym__declaration_chunks] = STATE(83), + [sym__declaration_chunk] = STATE(83), + [sym_variable_declaration] = STATE(83), + [sym_import_declaration] = STATE(83), [ts_builtin_sym_end] = ACTIONS(3), [sym_identifier] = ACTIONS(5), [sym_nil_literal] = ACTIONS(7), @@ -1247,104 +1306,23 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_for] = ACTIONS(19), [sym_break_expression] = ACTIONS(7), [anon_sym_let] = ACTIONS(21), - [anon_sym_import] = ACTIONS(23), + [anon_sym_var] = ACTIONS(23), + [anon_sym_import] = ACTIONS(25), }, }; static const uint16_t ts_small_parse_table[] = { - [0] = 12, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(27), 1, - anon_sym_end, - ACTIONS(25), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(30), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(61), 13, - sym__expr, - sym_string_literal, - sym_function_call, - sym_unary_expression, - sym_binary_expression, - sym_sequence_expression, - sym_array_expression, - sym_record_expression, - sym_assignment_expression, - sym_if_expression, - sym_while_expression, - sym_for_expression, - sym_let_expression, - [53] = 12, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(31), 1, - anon_sym_end, - ACTIONS(29), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(30), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(63), 13, - sym__expr, - sym_string_literal, - sym_function_call, - sym_unary_expression, - sym_binary_expression, - sym_sequence_expression, - sym_array_expression, - sym_record_expression, - sym_assignment_expression, - sym_if_expression, - sym_while_expression, - sym_for_expression, - sym_let_expression, - [106] = 5, - ACTIONS(35), 1, + [0] = 5, + ACTIONS(29), 1, anon_sym_LBRACK, - ACTIONS(38), 1, + ACTIONS(32), 1, anon_sym_LPAREN, - ACTIONS(42), 1, + ACTIONS(36), 1, anon_sym_LBRACE, - ACTIONS(40), 2, + ACTIONS(34), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(33), 23, + ACTIONS(27), 26, ts_builtin_sym_end, anon_sym_DOT, anon_sym_RBRACK, @@ -1367,168 +1345,110 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, + anon_sym_in, anon_sym_end, - [145] = 12, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(46), 1, + anon_sym_var, + anon_sym_import, + [42] = 2, + ACTIONS(40), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(38), 27, + ts_builtin_sym_end, + anon_sym_DOT, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COMMA, anon_sym_RPAREN, - ACTIONS(44), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(30), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(64), 13, - sym__expr, - sym_string_literal, - sym_function_call, - sym_unary_expression, - sym_binary_expression, - sym_sequence_expression, - sym_array_expression, - sym_record_expression, - sym_assignment_expression, - sym_if_expression, - sym_while_expression, - sym_for_expression, - sym_let_expression, - [198] = 12, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON_EQ, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_var, + anon_sym_import, + [76] = 2, + ACTIONS(44), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(42), 27, + ts_builtin_sym_end, + anon_sym_DOT, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON_EQ, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_var, + anon_sym_import, + [110] = 5, + ACTIONS(48), 1, + anon_sym_DOT, ACTIONS(50), 1, + anon_sym_LBRACK, + ACTIONS(54), 1, + anon_sym_COLON_EQ, + ACTIONS(52), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(46), 24, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, anon_sym_RPAREN, - ACTIONS(48), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(30), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(62), 13, - sym__expr, - sym_string_literal, - sym_function_call, - sym_unary_expression, - sym_binary_expression, - sym_sequence_expression, - sym_array_expression, - sym_record_expression, - sym_assignment_expression, - sym_if_expression, - sym_while_expression, - sym_for_expression, - sym_let_expression, - [251] = 11, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(52), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(30), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(42), 13, - sym__expr, - sym_string_literal, - sym_function_call, - sym_unary_expression, - sym_binary_expression, - sym_sequence_expression, - sym_array_expression, - sym_record_expression, - sym_assignment_expression, - sym_if_expression, - sym_while_expression, - sym_for_expression, - sym_let_expression, - [301] = 11, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(54), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(30), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(66), 13, - sym__expr, - sym_string_literal, - sym_function_call, - sym_unary_expression, - sym_binary_expression, - sym_sequence_expression, - sym_array_expression, - sym_record_expression, - sym_assignment_expression, - sym_if_expression, - sym_while_expression, - sym_for_expression, - sym_let_expression, - [351] = 11, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_var, + anon_sym_import, + [150] = 12, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -1545,11 +1465,13 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_for, ACTIONS(21), 1, anon_sym_let, + ACTIONS(58), 1, + anon_sym_RPAREN, ACTIONS(56), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(30), 3, + STATE(5), 3, sym__lvalue, sym_record_value, sym_array_value, @@ -1567,46 +1489,7 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [401] = 11, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(58), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(30), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(35), 13, - sym__expr, - sym_string_literal, - sym_function_call, - sym_unary_expression, - sym_binary_expression, - sym_sequence_expression, - sym_array_expression, - sym_record_expression, - sym_assignment_expression, - sym_if_expression, - sym_while_expression, - sym_for_expression, - sym_let_expression, - [451] = 11, + [203] = 12, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -1623,50 +1506,13 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_for, ACTIONS(21), 1, anon_sym_let, + ACTIONS(62), 1, + anon_sym_end, ACTIONS(60), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(30), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(57), 13, - sym__expr, - sym_string_literal, - sym_function_call, - sym_unary_expression, - sym_binary_expression, - sym_sequence_expression, - sym_array_expression, - sym_record_expression, - sym_assignment_expression, - sym_if_expression, - sym_while_expression, - sym_for_expression, - sym_let_expression, - [501] = 11, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(62), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(30), 3, + STATE(5), 3, sym__lvalue, sym_record_value, sym_array_value, @@ -1684,7 +1530,7 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [551] = 11, + [256] = 12, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -1701,128 +1547,13 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_for, ACTIONS(21), 1, anon_sym_let, + ACTIONS(66), 1, + anon_sym_RPAREN, ACTIONS(64), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(30), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(56), 13, - sym__expr, - sym_string_literal, - sym_function_call, - sym_unary_expression, - sym_binary_expression, - sym_sequence_expression, - sym_array_expression, - sym_record_expression, - sym_assignment_expression, - sym_if_expression, - sym_while_expression, - sym_for_expression, - sym_let_expression, - [601] = 11, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(66), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(30), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(40), 13, - sym__expr, - sym_string_literal, - sym_function_call, - sym_unary_expression, - sym_binary_expression, - sym_sequence_expression, - sym_array_expression, - sym_record_expression, - sym_assignment_expression, - sym_if_expression, - sym_while_expression, - sym_for_expression, - sym_let_expression, - [651] = 11, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(68), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(30), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(55), 13, - sym__expr, - sym_string_literal, - sym_function_call, - sym_unary_expression, - sym_binary_expression, - sym_sequence_expression, - sym_array_expression, - sym_record_expression, - sym_assignment_expression, - sym_if_expression, - sym_while_expression, - sym_for_expression, - sym_let_expression, - [701] = 11, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(70), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(30), 3, + STATE(5), 3, sym__lvalue, sym_record_value, sym_array_value, @@ -1840,7 +1571,48 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [751] = 11, + [309] = 12, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(70), 1, + anon_sym_end, + ACTIONS(68), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(65), 13, + sym__expr, + sym_string_literal, + sym_function_call, + sym_unary_expression, + sym_binary_expression, + sym_sequence_expression, + sym_array_expression, + sym_record_expression, + sym_assignment_expression, + sym_if_expression, + sym_while_expression, + sym_for_expression, + sym_let_expression, + [362] = 11, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -1861,11 +1633,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(30), 3, + STATE(5), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(72), 13, + STATE(44), 13, sym__expr, sym_string_literal, sym_function_call, @@ -1879,7 +1651,7 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [801] = 11, + [412] = 11, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -1900,11 +1672,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(30), 3, + STATE(5), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(73), 13, + STATE(70), 13, sym__expr, sym_string_literal, sym_function_call, @@ -1918,7 +1690,7 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [851] = 11, + [462] = 11, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -1939,11 +1711,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(30), 3, + STATE(5), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(65), 13, + STATE(49), 13, sym__expr, sym_string_literal, sym_function_call, @@ -1957,7 +1729,7 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [901] = 11, + [512] = 11, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -1978,11 +1750,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(30), 3, + STATE(5), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(74), 13, + STATE(64), 13, sym__expr, sym_string_literal, sym_function_call, @@ -1996,7 +1768,7 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [951] = 11, + [562] = 11, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -2017,11 +1789,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(30), 3, + STATE(5), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(54), 13, + STATE(66), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2035,7 +1807,7 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [1001] = 11, + [612] = 11, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -2056,11 +1828,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(30), 3, + STATE(5), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(59), 13, + STATE(75), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2074,7 +1846,7 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [1051] = 11, + [662] = 11, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -2095,11 +1867,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(30), 3, + STATE(5), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(71), 13, + STATE(60), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2113,7 +1885,7 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [1101] = 11, + [712] = 11, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -2134,11 +1906,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(30), 3, + STATE(5), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(52), 13, + STATE(45), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2152,7 +1924,7 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [1151] = 11, + [762] = 11, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -2173,11 +1945,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(30), 3, + STATE(5), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(75), 13, + STATE(77), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2191,7 +1963,7 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [1201] = 11, + [812] = 11, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -2212,11 +1984,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(30), 3, + STATE(5), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(38), 13, + STATE(72), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2230,7 +2002,7 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [1251] = 11, + [862] = 11, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -2251,11 +2023,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(30), 3, + STATE(5), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(49), 13, + STATE(63), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2269,7 +2041,7 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [1301] = 11, + [912] = 11, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -2290,11 +2062,11 @@ static const uint16_t ts_small_parse_table[] = { sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(30), 3, + STATE(5), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(53), 13, + STATE(71), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2308,101 +2080,479 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [1351] = 2, - ACTIONS(98), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(96), 24, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, + [962] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON_EQ, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_end, - [1382] = 5, - ACTIONS(102), 1, - anon_sym_DOT, - ACTIONS(104), 1, - anon_sym_LBRACK, - ACTIONS(108), 1, - anon_sym_COLON_EQ, - ACTIONS(106), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(100), 21, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(96), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(79), 13, + sym__expr, + sym_string_literal, + sym_function_call, + sym_unary_expression, + sym_binary_expression, + sym_sequence_expression, + sym_array_expression, + sym_record_expression, + sym_assignment_expression, + sym_if_expression, + sym_while_expression, + sym_for_expression, + sym_let_expression, + [1012] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_end, - [1419] = 2, - ACTIONS(112), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(110), 24, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(98), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(62), 13, + sym__expr, + sym_string_literal, + sym_function_call, + sym_unary_expression, + sym_binary_expression, + sym_sequence_expression, + sym_array_expression, + sym_record_expression, + sym_assignment_expression, + sym_if_expression, + sym_while_expression, + sym_for_expression, + sym_let_expression, + [1062] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON_EQ, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_end, - [1450] = 2, - ACTIONS(116), 2, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(100), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(76), 13, + sym__expr, + sym_string_literal, + sym_function_call, + sym_unary_expression, + sym_binary_expression, + sym_sequence_expression, + sym_array_expression, + sym_record_expression, + sym_assignment_expression, + sym_if_expression, + sym_while_expression, + sym_for_expression, + sym_let_expression, + [1112] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(102), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(74), 13, + sym__expr, + sym_string_literal, + sym_function_call, + sym_unary_expression, + sym_binary_expression, + sym_sequence_expression, + sym_array_expression, + sym_record_expression, + sym_assignment_expression, + sym_if_expression, + sym_while_expression, + sym_for_expression, + sym_let_expression, + [1162] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(104), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(55), 13, + sym__expr, + sym_string_literal, + sym_function_call, + sym_unary_expression, + sym_binary_expression, + sym_sequence_expression, + sym_array_expression, + sym_record_expression, + sym_assignment_expression, + sym_if_expression, + sym_while_expression, + sym_for_expression, + sym_let_expression, + [1212] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(106), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(78), 13, + sym__expr, + sym_string_literal, + sym_function_call, + sym_unary_expression, + sym_binary_expression, + sym_sequence_expression, + sym_array_expression, + sym_record_expression, + sym_assignment_expression, + sym_if_expression, + sym_while_expression, + sym_for_expression, + sym_let_expression, + [1262] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(108), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(61), 13, + sym__expr, + sym_string_literal, + sym_function_call, + sym_unary_expression, + sym_binary_expression, + sym_sequence_expression, + sym_array_expression, + sym_record_expression, + sym_assignment_expression, + sym_if_expression, + sym_while_expression, + sym_for_expression, + sym_let_expression, + [1312] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(110), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(51), 13, + sym__expr, + sym_string_literal, + sym_function_call, + sym_unary_expression, + sym_binary_expression, + sym_sequence_expression, + sym_array_expression, + sym_record_expression, + sym_assignment_expression, + sym_if_expression, + sym_while_expression, + sym_for_expression, + sym_let_expression, + [1362] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(112), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(39), 13, + sym__expr, + sym_string_literal, + sym_function_call, + sym_unary_expression, + sym_binary_expression, + sym_sequence_expression, + sym_array_expression, + sym_record_expression, + sym_assignment_expression, + sym_if_expression, + sym_while_expression, + sym_for_expression, + sym_let_expression, + [1412] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(114), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(57), 13, + sym__expr, + sym_string_literal, + sym_function_call, + sym_unary_expression, + sym_binary_expression, + sym_sequence_expression, + sym_array_expression, + sym_record_expression, + sym_assignment_expression, + sym_if_expression, + sym_while_expression, + sym_for_expression, + sym_let_expression, + [1462] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(116), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(58), 13, + sym__expr, + sym_string_literal, + sym_function_call, + sym_unary_expression, + sym_binary_expression, + sym_sequence_expression, + sym_array_expression, + sym_record_expression, + sym_assignment_expression, + sym_if_expression, + sym_while_expression, + sym_for_expression, + sym_let_expression, + [1512] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(118), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(59), 13, + sym__expr, + sym_string_literal, + sym_function_call, + sym_unary_expression, + sym_binary_expression, + sym_sequence_expression, + sym_array_expression, + sym_record_expression, + sym_assignment_expression, + sym_if_expression, + sym_while_expression, + sym_for_expression, + sym_let_expression, + [1562] = 2, + ACTIONS(122), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(114), 23, + ACTIONS(120), 24, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2425,12 +2575,13 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_to, anon_sym_in, anon_sym_end, + anon_sym_var, anon_sym_import, - [1480] = 2, - ACTIONS(120), 2, + [1593] = 2, + ACTIONS(126), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(118), 23, + ACTIONS(124), 24, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2453,69 +2604,134 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_to, anon_sym_in, anon_sym_end, + anon_sym_var, anon_sym_import, - [1510] = 2, - ACTIONS(124), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(122), 21, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_end, - [1538] = 7, - ACTIONS(136), 1, - anon_sym_AMP, - ACTIONS(138), 1, - anon_sym_PIPE, - ACTIONS(128), 2, - anon_sym_DASH, - anon_sym_PLUS, + [1624] = 2, ACTIONS(130), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(128), 24, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, anon_sym_STAR, anon_sym_SLASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_var, + anon_sym_import, + [1655] = 2, ACTIONS(134), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(132), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(126), 11, + ACTIONS(132), 24, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, anon_sym_SEMI, anon_sym_RBRACE, anon_sym_then, anon_sym_else, anon_sym_do, anon_sym_to, + anon_sym_in, anon_sym_end, - [1576] = 2, + anon_sym_var, + anon_sym_import, + [1686] = 2, + ACTIONS(138), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(136), 24, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_var, + anon_sym_import, + [1717] = 7, + ACTIONS(150), 1, + anon_sym_AMP, + ACTIONS(152), 1, + anon_sym_PIPE, ACTIONS(142), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(144), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(148), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(140), 21, + ACTIONS(146), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(140), 14, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_var, + anon_sym_import, + [1758] = 2, + ACTIONS(156), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(154), 24, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2536,12 +2752,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, + anon_sym_in, anon_sym_end, - [1604] = 2, - ACTIONS(146), 2, + anon_sym_var, + anon_sym_import, + [1789] = 2, + ACTIONS(160), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(144), 21, + ACTIONS(158), 24, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2562,43 +2781,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, + anon_sym_in, anon_sym_end, - [1632] = 7, - ACTIONS(136), 1, - anon_sym_AMP, - ACTIONS(138), 1, - anon_sym_PIPE, - ACTIONS(128), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(130), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(134), 2, + anon_sym_var, + anon_sym_import, + [1820] = 2, + ACTIONS(164), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(132), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(148), 11, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_end, - [1670] = 2, - ACTIONS(152), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(150), 21, + ACTIONS(162), 24, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2619,43 +2810,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, + anon_sym_in, anon_sym_end, - [1698] = 7, - ACTIONS(136), 1, - anon_sym_AMP, - ACTIONS(138), 1, - anon_sym_PIPE, - ACTIONS(128), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(130), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(134), 2, + anon_sym_var, + anon_sym_import, + [1851] = 2, + ACTIONS(168), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(132), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(154), 11, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_end, - [1736] = 2, - ACTIONS(158), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(156), 21, + ACTIONS(166), 24, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2676,29 +2839,66 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, + anon_sym_in, anon_sym_end, - [1764] = 8, - ACTIONS(136), 1, + anon_sym_var, + anon_sym_import, + [1882] = 7, + ACTIONS(150), 1, anon_sym_AMP, - ACTIONS(138), 1, + ACTIONS(152), 1, anon_sym_PIPE, - ACTIONS(162), 1, - anon_sym_else, - ACTIONS(128), 2, + ACTIONS(142), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(130), 2, + ACTIONS(144), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(134), 2, + ACTIONS(148), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(132), 4, + ACTIONS(146), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - ACTIONS(160), 10, + ACTIONS(170), 14, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_var, + anon_sym_import, + [1923] = 8, + ACTIONS(150), 1, + anon_sym_AMP, + ACTIONS(152), 1, + anon_sym_PIPE, + ACTIONS(174), 1, + anon_sym_else, + ACTIONS(142), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(144), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(148), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(146), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(172), 13, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2708,90 +2908,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_then, anon_sym_do, anon_sym_to, + anon_sym_in, anon_sym_end, - [1804] = 2, - ACTIONS(166), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(164), 21, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_end, - [1832] = 2, - ACTIONS(170), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(168), 21, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_end, - [1860] = 2, - ACTIONS(174), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(172), 21, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_end, - [1888] = 2, + anon_sym_var, + anon_sym_import, + [1966] = 2, ACTIONS(178), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(176), 21, + ACTIONS(176), 24, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2812,12 +2937,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, + anon_sym_in, anon_sym_end, - [1916] = 2, + anon_sym_var, + anon_sym_import, + [1997] = 2, ACTIONS(182), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(180), 21, + ACTIONS(180), 24, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2838,12 +2966,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, + anon_sym_in, anon_sym_end, - [1944] = 2, + anon_sym_var, + anon_sym_import, + [2028] = 2, ACTIONS(186), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(184), 21, + ACTIONS(184), 24, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2864,27 +2995,30 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, + anon_sym_in, anon_sym_end, - [1972] = 7, - ACTIONS(136), 1, + anon_sym_var, + anon_sym_import, + [2059] = 7, + ACTIONS(150), 1, anon_sym_AMP, - ACTIONS(138), 1, + ACTIONS(152), 1, anon_sym_PIPE, - ACTIONS(128), 2, + ACTIONS(142), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(130), 2, + ACTIONS(144), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(134), 2, + ACTIONS(148), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(132), 4, + ACTIONS(146), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - ACTIONS(188), 11, + ACTIONS(188), 14, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2895,12 +3029,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, + anon_sym_in, anon_sym_end, - [2010] = 2, + anon_sym_var, + anon_sym_import, + [2100] = 2, ACTIONS(192), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(190), 21, + ACTIONS(190), 24, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2921,96 +3058,78 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, + anon_sym_in, anon_sym_end, - [2038] = 2, - ACTIONS(196), 2, + anon_sym_var, + anon_sym_import, + [2131] = 7, + ACTIONS(150), 1, + anon_sym_AMP, + ACTIONS(152), 1, + anon_sym_PIPE, + ACTIONS(142), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(144), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(148), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(194), 21, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, + ACTIONS(146), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, + ACTIONS(194), 14, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, anon_sym_SEMI, anon_sym_RBRACE, anon_sym_then, anon_sym_else, anon_sym_do, anon_sym_to, + anon_sym_in, anon_sym_end, - [2066] = 7, - ACTIONS(136), 1, - anon_sym_AMP, - ACTIONS(138), 1, - anon_sym_PIPE, - ACTIONS(128), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(130), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(134), 2, + anon_sym_var, + anon_sym_import, + [2172] = 2, + ACTIONS(198), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(132), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(198), 11, + ACTIONS(196), 24, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, anon_sym_SEMI, anon_sym_RBRACE, anon_sym_then, anon_sym_else, anon_sym_do, anon_sym_to, + anon_sym_in, anon_sym_end, - [2104] = 3, - ACTIONS(130), 2, - anon_sym_STAR, - anon_sym_SLASH, + anon_sym_var, + anon_sym_import, + [2203] = 2, ACTIONS(202), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(200), 19, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_end, - [2134] = 2, - ACTIONS(202), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(200), 21, + ACTIONS(200), 24, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -3031,99 +3150,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, + anon_sym_in, anon_sym_end, - [2162] = 4, - ACTIONS(128), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(130), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(202), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(200), 17, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_end, - [2194] = 5, - ACTIONS(128), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(130), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(134), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(132), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(200), 13, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_end, - [2228] = 6, - ACTIONS(136), 1, - anon_sym_AMP, - ACTIONS(128), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(130), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(134), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(132), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(200), 12, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_end, - [2264] = 2, + anon_sym_var, + anon_sym_import, + [2234] = 2, ACTIONS(206), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(204), 21, + ACTIONS(204), 24, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -3144,12 +3179,49 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, + anon_sym_in, anon_sym_end, - [2292] = 2, - ACTIONS(210), 2, + anon_sym_var, + anon_sym_import, + [2265] = 7, + ACTIONS(150), 1, + anon_sym_AMP, + ACTIONS(152), 1, + anon_sym_PIPE, + ACTIONS(142), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(144), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(148), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(208), 21, + ACTIONS(146), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(208), 14, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_var, + anon_sym_import, + [2306] = 2, + ACTIONS(212), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(210), 24, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -3170,12 +3242,45 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, + anon_sym_in, anon_sym_end, - [2320] = 2, - ACTIONS(214), 2, + anon_sym_var, + anon_sym_import, + [2337] = 3, + ACTIONS(144), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(216), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(212), 21, + ACTIONS(214), 22, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_var, + anon_sym_import, + [2370] = 2, + ACTIONS(216), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(214), 24, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -3196,766 +3301,989 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, + anon_sym_in, anon_sym_end, - [2348] = 9, - ACTIONS(136), 1, - anon_sym_AMP, - ACTIONS(138), 1, - anon_sym_PIPE, - ACTIONS(216), 1, - anon_sym_SEMI, - ACTIONS(218), 1, - anon_sym_end, - STATE(86), 1, - aux_sym_sequence_expression_repeat1, - ACTIONS(128), 2, + anon_sym_var, + anon_sym_import, + [2401] = 4, + ACTIONS(142), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(130), 2, + ACTIONS(144), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(134), 2, + ACTIONS(216), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(132), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2382] = 9, - ACTIONS(136), 1, - anon_sym_AMP, - ACTIONS(138), 1, - anon_sym_PIPE, - ACTIONS(220), 1, + ACTIONS(214), 20, + ts_builtin_sym_end, + anon_sym_RBRACK, anon_sym_COMMA, - ACTIONS(222), 1, anon_sym_RPAREN, - STATE(91), 1, - aux_sym_function_call_repeat1, - ACTIONS(128), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(130), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(134), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(132), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [2416] = 9, - ACTIONS(136), 1, anon_sym_AMP, - ACTIONS(138), 1, anon_sym_PIPE, - ACTIONS(216), 1, anon_sym_SEMI, - ACTIONS(224), 1, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, anon_sym_end, - STATE(89), 1, - aux_sym_sequence_expression_repeat1, - ACTIONS(128), 2, + anon_sym_var, + anon_sym_import, + [2436] = 5, + ACTIONS(142), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(130), 2, + ACTIONS(144), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(134), 2, + ACTIONS(148), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(132), 4, + ACTIONS(146), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [2450] = 9, - ACTIONS(136), 1, + ACTIONS(214), 16, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, anon_sym_AMP, - ACTIONS(138), 1, anon_sym_PIPE, - ACTIONS(216), 1, anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_var, + anon_sym_import, + [2473] = 6, + ACTIONS(150), 1, + anon_sym_AMP, + ACTIONS(142), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(144), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(148), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(146), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(214), 15, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_var, + anon_sym_import, + [2512] = 2, + ACTIONS(220), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(218), 24, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_var, + anon_sym_import, + [2543] = 7, + ACTIONS(150), 1, + anon_sym_AMP, + ACTIONS(152), 1, + anon_sym_PIPE, + ACTIONS(142), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(144), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(148), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(146), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(222), 4, + ts_builtin_sym_end, + anon_sym_in, + anon_sym_var, + anon_sym_import, + [2574] = 7, + ACTIONS(150), 1, + anon_sym_AMP, + ACTIONS(152), 1, + anon_sym_PIPE, + ACTIONS(142), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(144), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(148), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(146), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(224), 4, + ts_builtin_sym_end, + anon_sym_in, + anon_sym_var, + anon_sym_import, + [2605] = 9, + ACTIONS(150), 1, + anon_sym_AMP, + ACTIONS(152), 1, + anon_sym_PIPE, ACTIONS(226), 1, - anon_sym_RPAREN, - STATE(85), 1, - aux_sym_sequence_expression_repeat1, - ACTIONS(128), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(130), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(134), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(132), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2484] = 9, - ACTIONS(136), 1, - anon_sym_AMP, - ACTIONS(138), 1, - anon_sym_PIPE, + anon_sym_SEMI, ACTIONS(228), 1, - anon_sym_COMMA, - ACTIONS(230), 1, - anon_sym_RBRACE, - STATE(84), 1, - aux_sym_record_expression_repeat1, - ACTIONS(128), 2, + anon_sym_end, + STATE(91), 1, + aux_sym_sequence_expression_repeat1, + ACTIONS(142), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(130), 2, + ACTIONS(144), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(134), 2, + ACTIONS(148), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(132), 4, + ACTIONS(146), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [2518] = 7, - ACTIONS(136), 1, + [2639] = 9, + ACTIONS(150), 1, anon_sym_AMP, - ACTIONS(138), 1, + ACTIONS(152), 1, anon_sym_PIPE, - ACTIONS(128), 2, + ACTIONS(230), 1, + anon_sym_COMMA, + ACTIONS(232), 1, + anon_sym_RBRACE, + STATE(92), 1, + aux_sym_record_expression_repeat1, + ACTIONS(142), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(130), 2, + ACTIONS(144), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(134), 2, + ACTIONS(148), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(232), 3, + ACTIONS(146), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2673] = 9, + ACTIONS(150), 1, + anon_sym_AMP, + ACTIONS(152), 1, + anon_sym_PIPE, + ACTIONS(226), 1, + anon_sym_SEMI, + ACTIONS(234), 1, + anon_sym_RPAREN, + STATE(95), 1, + aux_sym_sequence_expression_repeat1, + ACTIONS(142), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(144), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(148), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(146), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2707] = 9, + ACTIONS(150), 1, + anon_sym_AMP, + ACTIONS(152), 1, + anon_sym_PIPE, + ACTIONS(236), 1, + anon_sym_COMMA, + ACTIONS(238), 1, + anon_sym_RPAREN, + STATE(89), 1, + aux_sym_function_call_repeat1, + ACTIONS(142), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(144), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(148), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(146), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2741] = 9, + ACTIONS(150), 1, + anon_sym_AMP, + ACTIONS(152), 1, + anon_sym_PIPE, + ACTIONS(226), 1, + anon_sym_SEMI, + ACTIONS(240), 1, + anon_sym_end, + STATE(93), 1, + aux_sym_sequence_expression_repeat1, + ACTIONS(142), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(144), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(148), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(146), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2775] = 7, + ACTIONS(150), 1, + anon_sym_AMP, + ACTIONS(152), 1, + anon_sym_PIPE, + ACTIONS(142), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(144), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(148), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(242), 3, anon_sym_RPAREN, anon_sym_SEMI, anon_sym_end, - ACTIONS(132), 4, + ACTIONS(146), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [2548] = 7, - ACTIONS(136), 1, + [2805] = 7, + ACTIONS(150), 1, anon_sym_AMP, - ACTIONS(138), 1, + ACTIONS(152), 1, anon_sym_PIPE, - ACTIONS(128), 2, + ACTIONS(142), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(130), 2, + ACTIONS(144), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(134), 2, + ACTIONS(148), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(234), 2, + ACTIONS(244), 2, anon_sym_COMMA, anon_sym_RBRACE, - ACTIONS(132), 4, + ACTIONS(146), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [2577] = 7, - ACTIONS(136), 1, + [2834] = 7, + ACTIONS(150), 1, anon_sym_AMP, - ACTIONS(138), 1, + ACTIONS(152), 1, anon_sym_PIPE, - ACTIONS(128), 2, + ACTIONS(142), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(130), 2, + ACTIONS(144), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(134), 2, + ACTIONS(148), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(236), 2, + ACTIONS(246), 2, anon_sym_COMMA, anon_sym_RPAREN, - ACTIONS(132), 4, + ACTIONS(146), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [2606] = 7, - ACTIONS(136), 1, + [2863] = 7, + ACTIONS(150), 1, anon_sym_AMP, - ACTIONS(138), 1, - anon_sym_PIPE, - ACTIONS(238), 1, - anon_sym_to, - ACTIONS(128), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(130), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(134), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(132), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2634] = 7, - ACTIONS(136), 1, - anon_sym_AMP, - ACTIONS(138), 1, - anon_sym_PIPE, - ACTIONS(240), 1, - ts_builtin_sym_end, - ACTIONS(128), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(130), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(134), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(132), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2662] = 7, - ACTIONS(136), 1, - anon_sym_AMP, - ACTIONS(138), 1, - anon_sym_PIPE, - ACTIONS(242), 1, - anon_sym_do, - ACTIONS(128), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(130), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(134), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(132), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2690] = 7, - ACTIONS(136), 1, - anon_sym_AMP, - ACTIONS(138), 1, - anon_sym_PIPE, - ACTIONS(244), 1, - anon_sym_RBRACK, - ACTIONS(128), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(130), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(134), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(132), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2718] = 7, - ACTIONS(136), 1, - anon_sym_AMP, - ACTIONS(138), 1, - anon_sym_PIPE, - ACTIONS(246), 1, - anon_sym_then, - ACTIONS(128), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(130), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(134), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(132), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2746] = 7, - ACTIONS(136), 1, - anon_sym_AMP, - ACTIONS(138), 1, + ACTIONS(152), 1, anon_sym_PIPE, ACTIONS(248), 1, - anon_sym_do, - ACTIONS(128), 2, + ts_builtin_sym_end, + ACTIONS(142), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(130), 2, + ACTIONS(144), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(134), 2, + ACTIONS(148), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(132), 4, + ACTIONS(146), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [2774] = 7, - ACTIONS(136), 1, + [2891] = 7, + ACTIONS(150), 1, anon_sym_AMP, - ACTIONS(138), 1, + ACTIONS(152), 1, anon_sym_PIPE, ACTIONS(250), 1, - anon_sym_RBRACK, - ACTIONS(128), 2, + anon_sym_do, + ACTIONS(142), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(130), 2, + ACTIONS(144), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(134), 2, + ACTIONS(148), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(132), 4, + ACTIONS(146), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [2802] = 3, + [2919] = 7, + ACTIONS(150), 1, + anon_sym_AMP, + ACTIONS(152), 1, + anon_sym_PIPE, + ACTIONS(252), 1, + anon_sym_to, + ACTIONS(142), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(144), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(148), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(146), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2947] = 7, + ACTIONS(150), 1, + anon_sym_AMP, + ACTIONS(152), 1, + anon_sym_PIPE, ACTIONS(254), 1, - anon_sym_import, - ACTIONS(252), 2, - ts_builtin_sym_end, - anon_sym_in, - STATE(76), 3, - aux_sym__declaration_chunks, - sym__declaration_chunk, - sym_import_declaration, - [2815] = 3, - ACTIONS(257), 1, - anon_sym_in, - ACTIONS(259), 1, - anon_sym_import, - STATE(76), 3, - aux_sym__declaration_chunks, - sym__declaration_chunk, - sym_import_declaration, - [2827] = 3, - ACTIONS(259), 1, - anon_sym_import, - ACTIONS(261), 1, - anon_sym_in, - STATE(77), 3, - aux_sym__declaration_chunks, - sym__declaration_chunk, - sym_import_declaration, - [2839] = 3, - ACTIONS(240), 1, - ts_builtin_sym_end, - ACTIONS(259), 1, - anon_sym_import, - STATE(76), 3, - aux_sym__declaration_chunks, - sym__declaration_chunk, - sym_import_declaration, - [2851] = 3, - ACTIONS(263), 1, - anon_sym_DQUOTE, - STATE(83), 1, - aux_sym_string_literal_repeat1, - ACTIONS(265), 2, - aux_sym_string_literal_token1, - sym_escape_sequence, - [2862] = 3, + anon_sym_RBRACK, + ACTIONS(142), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(144), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(148), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(146), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2975] = 7, + ACTIONS(150), 1, + anon_sym_AMP, + ACTIONS(152), 1, + anon_sym_PIPE, + ACTIONS(256), 1, + anon_sym_RBRACK, + ACTIONS(142), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(144), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(148), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(146), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [3003] = 7, + ACTIONS(150), 1, + anon_sym_AMP, + ACTIONS(152), 1, + anon_sym_PIPE, + ACTIONS(258), 1, + anon_sym_then, + ACTIONS(142), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(144), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(148), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(146), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [3031] = 7, + ACTIONS(150), 1, + anon_sym_AMP, + ACTIONS(152), 1, + anon_sym_PIPE, + ACTIONS(260), 1, + anon_sym_do, + ACTIONS(142), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(144), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(148), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(146), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [3059] = 4, + ACTIONS(264), 1, + anon_sym_var, ACTIONS(267), 1, - anon_sym_SEMI, - STATE(81), 1, - aux_sym_sequence_expression_repeat1, - ACTIONS(232), 2, - anon_sym_RPAREN, - anon_sym_end, - [2873] = 3, - ACTIONS(270), 1, - anon_sym_DQUOTE, - STATE(82), 1, - aux_sym_string_literal_repeat1, - ACTIONS(272), 2, - aux_sym_string_literal_token1, - sym_escape_sequence, - [2884] = 3, - ACTIONS(275), 1, - anon_sym_DQUOTE, - STATE(82), 1, - aux_sym_string_literal_repeat1, - ACTIONS(277), 2, - aux_sym_string_literal_token1, - sym_escape_sequence, - [2895] = 3, - ACTIONS(228), 1, - anon_sym_COMMA, - ACTIONS(279), 1, - anon_sym_RBRACE, - STATE(90), 1, - aux_sym_record_expression_repeat1, - [2905] = 3, - ACTIONS(216), 1, - anon_sym_SEMI, - ACTIONS(281), 1, - anon_sym_RPAREN, - STATE(81), 1, - aux_sym_sequence_expression_repeat1, - [2915] = 3, - ACTIONS(216), 1, - anon_sym_SEMI, - ACTIONS(283), 1, - anon_sym_end, - STATE(81), 1, - aux_sym_sequence_expression_repeat1, - [2925] = 1, - ACTIONS(285), 3, + anon_sym_import, + ACTIONS(262), 2, ts_builtin_sym_end, anon_sym_in, + STATE(80), 4, + aux_sym__declaration_chunks, + sym__declaration_chunk, + sym_variable_declaration, + sym_import_declaration, + [3076] = 4, + ACTIONS(270), 1, + anon_sym_in, + ACTIONS(272), 1, + anon_sym_var, + ACTIONS(274), 1, anon_sym_import, - [2931] = 3, - ACTIONS(236), 1, - anon_sym_RPAREN, - ACTIONS(287), 1, - anon_sym_COMMA, - STATE(88), 1, - aux_sym_function_call_repeat1, - [2941] = 3, - ACTIONS(216), 1, + STATE(80), 4, + aux_sym__declaration_chunks, + sym__declaration_chunk, + sym_variable_declaration, + sym_import_declaration, + [3092] = 4, + ACTIONS(272), 1, + anon_sym_var, + ACTIONS(274), 1, + anon_sym_import, + ACTIONS(276), 1, + anon_sym_in, + STATE(81), 4, + aux_sym__declaration_chunks, + sym__declaration_chunk, + sym_variable_declaration, + sym_import_declaration, + [3108] = 4, + ACTIONS(248), 1, + ts_builtin_sym_end, + ACTIONS(272), 1, + anon_sym_var, + ACTIONS(274), 1, + anon_sym_import, + STATE(80), 4, + aux_sym__declaration_chunks, + sym__declaration_chunk, + sym_variable_declaration, + sym_import_declaration, + [3124] = 3, + ACTIONS(278), 1, + anon_sym_DQUOTE, + STATE(84), 1, + aux_sym_string_literal_repeat1, + ACTIONS(280), 2, + aux_sym_string_literal_token1, + sym_escape_sequence, + [3135] = 3, + ACTIONS(283), 1, + anon_sym_DQUOTE, + STATE(84), 1, + aux_sym_string_literal_repeat1, + ACTIONS(285), 2, + aux_sym_string_literal_token1, + sym_escape_sequence, + [3146] = 1, + ACTIONS(287), 4, + ts_builtin_sym_end, + anon_sym_in, + anon_sym_var, + anon_sym_import, + [3153] = 3, + ACTIONS(289), 1, anon_sym_SEMI, - ACTIONS(290), 1, - anon_sym_end, - STATE(81), 1, + STATE(87), 1, aux_sym_sequence_expression_repeat1, - [2951] = 3, - ACTIONS(292), 1, - anon_sym_COMMA, - ACTIONS(295), 1, - anon_sym_RBRACE, - STATE(90), 1, - aux_sym_record_expression_repeat1, - [2961] = 3, - ACTIONS(220), 1, - anon_sym_COMMA, - ACTIONS(297), 1, + ACTIONS(242), 2, anon_sym_RPAREN, - STATE(88), 1, + anon_sym_end, + [3164] = 3, + ACTIONS(292), 1, + anon_sym_DQUOTE, + STATE(85), 1, + aux_sym_string_literal_repeat1, + ACTIONS(294), 2, + aux_sym_string_literal_token1, + sym_escape_sequence, + [3175] = 3, + ACTIONS(236), 1, + anon_sym_COMMA, + ACTIONS(296), 1, + anon_sym_RPAREN, + STATE(90), 1, aux_sym_function_call_repeat1, - [2971] = 2, - ACTIONS(299), 1, - sym_identifier, + [3185] = 3, + ACTIONS(246), 1, + anon_sym_RPAREN, + ACTIONS(298), 1, + anon_sym_COMMA, + STATE(90), 1, + aux_sym_function_call_repeat1, + [3195] = 3, + ACTIONS(226), 1, + anon_sym_SEMI, ACTIONS(301), 1, + anon_sym_end, + STATE(87), 1, + aux_sym_sequence_expression_repeat1, + [3205] = 3, + ACTIONS(230), 1, + anon_sym_COMMA, + ACTIONS(303), 1, anon_sym_RBRACE, - [2978] = 2, + STATE(94), 1, + aux_sym_record_expression_repeat1, + [3215] = 3, + ACTIONS(226), 1, + anon_sym_SEMI, + ACTIONS(305), 1, + anon_sym_end, + STATE(87), 1, + aux_sym_sequence_expression_repeat1, + [3225] = 3, + ACTIONS(307), 1, + anon_sym_COMMA, + ACTIONS(310), 1, + anon_sym_RBRACE, + STATE(94), 1, + aux_sym_record_expression_repeat1, + [3235] = 3, + ACTIONS(226), 1, + anon_sym_SEMI, + ACTIONS(312), 1, + anon_sym_RPAREN, + STATE(87), 1, + aux_sym_sequence_expression_repeat1, + [3245] = 2, + ACTIONS(314), 1, + sym_identifier, + ACTIONS(316), 1, + anon_sym_RBRACE, + [3252] = 2, ACTIONS(9), 1, anon_sym_DQUOTE, - STATE(87), 1, + STATE(86), 1, sym_string_literal, - [2985] = 1, - ACTIONS(303), 1, + [3259] = 2, + ACTIONS(318), 1, anon_sym_COLON_EQ, - [2989] = 1, - ACTIONS(305), 1, - sym_identifier, - [2993] = 1, - ACTIONS(307), 1, - sym_identifier, - [2997] = 1, - ACTIONS(309), 1, + ACTIONS(320), 1, + anon_sym_COLON, + [3266] = 1, + ACTIONS(322), 1, anon_sym_of, - [3001] = 1, - ACTIONS(311), 1, + [3270] = 1, + ACTIONS(324), 1, + anon_sym_COLON_EQ, + [3274] = 1, + ACTIONS(326), 1, + sym_identifier, + [3278] = 1, + ACTIONS(328), 1, + anon_sym_COLON_EQ, + [3282] = 1, + ACTIONS(330), 1, + sym_identifier, + [3286] = 1, + ACTIONS(332), 1, + sym_identifier, + [3290] = 1, + ACTIONS(334), 1, anon_sym_EQ, - [3005] = 1, - ACTIONS(313), 1, + [3294] = 1, + ACTIONS(336), 1, ts_builtin_sym_end, - [3009] = 1, - ACTIONS(315), 1, + [3298] = 1, + ACTIONS(338), 1, anon_sym_EQ, - [3013] = 1, - ACTIONS(317), 1, + [3302] = 1, + ACTIONS(340), 1, + sym_identifier, + [3306] = 1, + ACTIONS(342), 1, sym_identifier, }; static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(2)] = 0, - [SMALL_STATE(3)] = 53, - [SMALL_STATE(4)] = 106, - [SMALL_STATE(5)] = 145, - [SMALL_STATE(6)] = 198, - [SMALL_STATE(7)] = 251, - [SMALL_STATE(8)] = 301, - [SMALL_STATE(9)] = 351, - [SMALL_STATE(10)] = 401, - [SMALL_STATE(11)] = 451, - [SMALL_STATE(12)] = 501, - [SMALL_STATE(13)] = 551, - [SMALL_STATE(14)] = 601, - [SMALL_STATE(15)] = 651, - [SMALL_STATE(16)] = 701, - [SMALL_STATE(17)] = 751, - [SMALL_STATE(18)] = 801, - [SMALL_STATE(19)] = 851, - [SMALL_STATE(20)] = 901, - [SMALL_STATE(21)] = 951, - [SMALL_STATE(22)] = 1001, - [SMALL_STATE(23)] = 1051, - [SMALL_STATE(24)] = 1101, - [SMALL_STATE(25)] = 1151, - [SMALL_STATE(26)] = 1201, - [SMALL_STATE(27)] = 1251, - [SMALL_STATE(28)] = 1301, - [SMALL_STATE(29)] = 1351, - [SMALL_STATE(30)] = 1382, - [SMALL_STATE(31)] = 1419, - [SMALL_STATE(32)] = 1450, - [SMALL_STATE(33)] = 1480, - [SMALL_STATE(34)] = 1510, - [SMALL_STATE(35)] = 1538, - [SMALL_STATE(36)] = 1576, - [SMALL_STATE(37)] = 1604, - [SMALL_STATE(38)] = 1632, - [SMALL_STATE(39)] = 1670, - [SMALL_STATE(40)] = 1698, - [SMALL_STATE(41)] = 1736, - [SMALL_STATE(42)] = 1764, - [SMALL_STATE(43)] = 1804, - [SMALL_STATE(44)] = 1832, - [SMALL_STATE(45)] = 1860, - [SMALL_STATE(46)] = 1888, - [SMALL_STATE(47)] = 1916, - [SMALL_STATE(48)] = 1944, - [SMALL_STATE(49)] = 1972, - [SMALL_STATE(50)] = 2010, - [SMALL_STATE(51)] = 2038, - [SMALL_STATE(52)] = 2066, - [SMALL_STATE(53)] = 2104, - [SMALL_STATE(54)] = 2134, - [SMALL_STATE(55)] = 2162, - [SMALL_STATE(56)] = 2194, - [SMALL_STATE(57)] = 2228, - [SMALL_STATE(58)] = 2264, - [SMALL_STATE(59)] = 2292, - [SMALL_STATE(60)] = 2320, - [SMALL_STATE(61)] = 2348, - [SMALL_STATE(62)] = 2382, - [SMALL_STATE(63)] = 2416, - [SMALL_STATE(64)] = 2450, - [SMALL_STATE(65)] = 2484, - [SMALL_STATE(66)] = 2518, - [SMALL_STATE(67)] = 2548, - [SMALL_STATE(68)] = 2577, - [SMALL_STATE(69)] = 2606, - [SMALL_STATE(70)] = 2634, - [SMALL_STATE(71)] = 2662, - [SMALL_STATE(72)] = 2690, - [SMALL_STATE(73)] = 2718, - [SMALL_STATE(74)] = 2746, - [SMALL_STATE(75)] = 2774, - [SMALL_STATE(76)] = 2802, - [SMALL_STATE(77)] = 2815, - [SMALL_STATE(78)] = 2827, - [SMALL_STATE(79)] = 2839, - [SMALL_STATE(80)] = 2851, - [SMALL_STATE(81)] = 2862, - [SMALL_STATE(82)] = 2873, - [SMALL_STATE(83)] = 2884, - [SMALL_STATE(84)] = 2895, - [SMALL_STATE(85)] = 2905, - [SMALL_STATE(86)] = 2915, - [SMALL_STATE(87)] = 2925, - [SMALL_STATE(88)] = 2931, - [SMALL_STATE(89)] = 2941, - [SMALL_STATE(90)] = 2951, - [SMALL_STATE(91)] = 2961, - [SMALL_STATE(92)] = 2971, - [SMALL_STATE(93)] = 2978, - [SMALL_STATE(94)] = 2985, - [SMALL_STATE(95)] = 2989, - [SMALL_STATE(96)] = 2993, - [SMALL_STATE(97)] = 2997, - [SMALL_STATE(98)] = 3001, - [SMALL_STATE(99)] = 3005, - [SMALL_STATE(100)] = 3009, - [SMALL_STATE(101)] = 3013, + [SMALL_STATE(3)] = 42, + [SMALL_STATE(4)] = 76, + [SMALL_STATE(5)] = 110, + [SMALL_STATE(6)] = 150, + [SMALL_STATE(7)] = 203, + [SMALL_STATE(8)] = 256, + [SMALL_STATE(9)] = 309, + [SMALL_STATE(10)] = 362, + [SMALL_STATE(11)] = 412, + [SMALL_STATE(12)] = 462, + [SMALL_STATE(13)] = 512, + [SMALL_STATE(14)] = 562, + [SMALL_STATE(15)] = 612, + [SMALL_STATE(16)] = 662, + [SMALL_STATE(17)] = 712, + [SMALL_STATE(18)] = 762, + [SMALL_STATE(19)] = 812, + [SMALL_STATE(20)] = 862, + [SMALL_STATE(21)] = 912, + [SMALL_STATE(22)] = 962, + [SMALL_STATE(23)] = 1012, + [SMALL_STATE(24)] = 1062, + [SMALL_STATE(25)] = 1112, + [SMALL_STATE(26)] = 1162, + [SMALL_STATE(27)] = 1212, + [SMALL_STATE(28)] = 1262, + [SMALL_STATE(29)] = 1312, + [SMALL_STATE(30)] = 1362, + [SMALL_STATE(31)] = 1412, + [SMALL_STATE(32)] = 1462, + [SMALL_STATE(33)] = 1512, + [SMALL_STATE(34)] = 1562, + [SMALL_STATE(35)] = 1593, + [SMALL_STATE(36)] = 1624, + [SMALL_STATE(37)] = 1655, + [SMALL_STATE(38)] = 1686, + [SMALL_STATE(39)] = 1717, + [SMALL_STATE(40)] = 1758, + [SMALL_STATE(41)] = 1789, + [SMALL_STATE(42)] = 1820, + [SMALL_STATE(43)] = 1851, + [SMALL_STATE(44)] = 1882, + [SMALL_STATE(45)] = 1923, + [SMALL_STATE(46)] = 1966, + [SMALL_STATE(47)] = 1997, + [SMALL_STATE(48)] = 2028, + [SMALL_STATE(49)] = 2059, + [SMALL_STATE(50)] = 2100, + [SMALL_STATE(51)] = 2131, + [SMALL_STATE(52)] = 2172, + [SMALL_STATE(53)] = 2203, + [SMALL_STATE(54)] = 2234, + [SMALL_STATE(55)] = 2265, + [SMALL_STATE(56)] = 2306, + [SMALL_STATE(57)] = 2337, + [SMALL_STATE(58)] = 2370, + [SMALL_STATE(59)] = 2401, + [SMALL_STATE(60)] = 2436, + [SMALL_STATE(61)] = 2473, + [SMALL_STATE(62)] = 2512, + [SMALL_STATE(63)] = 2543, + [SMALL_STATE(64)] = 2574, + [SMALL_STATE(65)] = 2605, + [SMALL_STATE(66)] = 2639, + [SMALL_STATE(67)] = 2673, + [SMALL_STATE(68)] = 2707, + [SMALL_STATE(69)] = 2741, + [SMALL_STATE(70)] = 2775, + [SMALL_STATE(71)] = 2805, + [SMALL_STATE(72)] = 2834, + [SMALL_STATE(73)] = 2863, + [SMALL_STATE(74)] = 2891, + [SMALL_STATE(75)] = 2919, + [SMALL_STATE(76)] = 2947, + [SMALL_STATE(77)] = 2975, + [SMALL_STATE(78)] = 3003, + [SMALL_STATE(79)] = 3031, + [SMALL_STATE(80)] = 3059, + [SMALL_STATE(81)] = 3076, + [SMALL_STATE(82)] = 3092, + [SMALL_STATE(83)] = 3108, + [SMALL_STATE(84)] = 3124, + [SMALL_STATE(85)] = 3135, + [SMALL_STATE(86)] = 3146, + [SMALL_STATE(87)] = 3153, + [SMALL_STATE(88)] = 3164, + [SMALL_STATE(89)] = 3175, + [SMALL_STATE(90)] = 3185, + [SMALL_STATE(91)] = 3195, + [SMALL_STATE(92)] = 3205, + [SMALL_STATE(93)] = 3215, + [SMALL_STATE(94)] = 3225, + [SMALL_STATE(95)] = 3235, + [SMALL_STATE(96)] = 3245, + [SMALL_STATE(97)] = 3252, + [SMALL_STATE(98)] = 3259, + [SMALL_STATE(99)] = 3266, + [SMALL_STATE(100)] = 3270, + [SMALL_STATE(101)] = 3274, + [SMALL_STATE(102)] = 3278, + [SMALL_STATE(103)] = 3282, + [SMALL_STATE(104)] = 3286, + [SMALL_STATE(105)] = 3290, + [SMALL_STATE(106)] = 3294, + [SMALL_STATE(107)] = 3298, + [SMALL_STATE(108)] = 3302, + [SMALL_STATE(109)] = 3306, }; 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_source_file, 0), - [5] = {.entry = {.count = 1, .reusable = false}}, SHIFT(4), - [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(70), - [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80), - [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), - [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), - [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(18), - [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(20), - [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(101), - [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(78), - [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(93), - [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(61), - [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(37), - [29] = {.entry = {.count = 1, .reusable = false}}, SHIFT(63), - [31] = {.entry = {.count = 1, .reusable = false}}, SHIFT(51), - [33] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__lvalue, 1), - [35] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__lvalue, 1), SHIFT(17), - [38] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), - [40] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__lvalue, 1), - [42] = {.entry = {.count = 1, .reusable = true}}, SHIFT(92), - [44] = {.entry = {.count = 1, .reusable = false}}, SHIFT(64), - [46] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), - [48] = {.entry = {.count = 1, .reusable = false}}, SHIFT(62), - [50] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), - [52] = {.entry = {.count = 1, .reusable = false}}, SHIFT(42), - [54] = {.entry = {.count = 1, .reusable = false}}, SHIFT(66), + [5] = {.entry = {.count = 1, .reusable = false}}, SHIFT(2), + [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(73), + [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), + [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(27), + [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(22), + [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(109), + [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(82), + [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(108), + [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(97), + [27] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__lvalue, 1), + [29] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__lvalue, 1), SHIFT(18), + [32] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), + [34] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__lvalue, 1), + [36] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), + [38] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_value, 3, .production_id = 6), + [40] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_value, 3, .production_id = 6), + [42] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_value, 4, .production_id = 14), + [44] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_value, 4, .production_id = 14), + [46] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr, 1), + [48] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), + [50] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [52] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr, 1), + [54] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), [56] = {.entry = {.count = 1, .reusable = false}}, SHIFT(67), - [58] = {.entry = {.count = 1, .reusable = false}}, SHIFT(35), - [60] = {.entry = {.count = 1, .reusable = false}}, SHIFT(57), - [62] = {.entry = {.count = 1, .reusable = false}}, SHIFT(69), - [64] = {.entry = {.count = 1, .reusable = false}}, SHIFT(56), - [66] = {.entry = {.count = 1, .reusable = false}}, SHIFT(40), - [68] = {.entry = {.count = 1, .reusable = false}}, SHIFT(55), - [70] = {.entry = {.count = 1, .reusable = false}}, SHIFT(68), - [72] = {.entry = {.count = 1, .reusable = false}}, SHIFT(72), - [74] = {.entry = {.count = 1, .reusable = false}}, SHIFT(73), - [76] = {.entry = {.count = 1, .reusable = false}}, SHIFT(65), - [78] = {.entry = {.count = 1, .reusable = false}}, SHIFT(74), - [80] = {.entry = {.count = 1, .reusable = false}}, SHIFT(54), - [82] = {.entry = {.count = 1, .reusable = false}}, SHIFT(59), - [84] = {.entry = {.count = 1, .reusable = false}}, SHIFT(71), - [86] = {.entry = {.count = 1, .reusable = false}}, SHIFT(52), - [88] = {.entry = {.count = 1, .reusable = false}}, SHIFT(75), - [90] = {.entry = {.count = 1, .reusable = false}}, SHIFT(38), - [92] = {.entry = {.count = 1, .reusable = false}}, SHIFT(49), - [94] = {.entry = {.count = 1, .reusable = false}}, SHIFT(53), - [96] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_value, 4, .production_id = 13), - [98] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_value, 4, .production_id = 13), - [100] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr, 1), - [102] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), - [104] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), - [106] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr, 1), - [108] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), - [110] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_value, 3, .production_id = 6), - [112] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_value, 3, .production_id = 6), - [114] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 3), - [116] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 3), - [118] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 2), - [120] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 2), - [122] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 6, .production_id = 18), - [124] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 6, .production_id = 18), - [126] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_expression, 8, .production_id = 23), - [128] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), - [130] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), - [132] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), - [134] = {.entry = {.count = 1, .reusable = false}}, SHIFT(15), - [136] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), - [138] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), - [140] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 5, .production_id = 14), - [142] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 5, .production_id = 14), - [144] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 4, .production_id = 12), - [146] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 4, .production_id = 12), - [148] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_expression, 2, .production_id = 1), - [150] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 4, .production_id = 11), - [152] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 4, .production_id = 11), - [154] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_expression, 4, .production_id = 10), - [156] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 3, .production_id = 3), - [158] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 3, .production_id = 3), - [160] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_expression, 4, .production_id = 9), - [162] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), - [164] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 4), - [166] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 4), - [168] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 3, .production_id = 4), - [170] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 3, .production_id = 4), - [172] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 3), - [174] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 3), - [176] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 5, .production_id = 15), - [178] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 5, .production_id = 15), - [180] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 2), - [182] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 2), - [184] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 5, .production_id = 16), - [186] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 5, .production_id = 16), - [188] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_expression, 6, .production_id = 17), - [190] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 4, .production_id = 8), - [192] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 4, .production_id = 8), - [194] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 3), - [196] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 3), - [198] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_expression, 6, .production_id = 19), - [200] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, .production_id = 5), - [202] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, .production_id = 5), - [204] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 6, .production_id = 20), - [206] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 6, .production_id = 20), - [208] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment_expression, 3, .production_id = 7), - [210] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment_expression, 3, .production_id = 7), - [212] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 7, .production_id = 21), - [214] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 7, .production_id = 21), - [216] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), - [218] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), - [220] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), - [222] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), - [224] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), - [226] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), - [228] = {.entry = {.count = 1, .reusable = true}}, SHIFT(95), - [230] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), - [232] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), - [234] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 4, .production_id = 24), - [236] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), - [238] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), - [240] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), - [242] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), - [244] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), - [246] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), - [248] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), - [250] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), - [252] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), - [254] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(93), - [257] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), - [259] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), - [261] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [263] = {.entry = {.count = 1, .reusable = false}}, SHIFT(33), - [265] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), - [267] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), SHIFT_REPEAT(8), - [270] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_string_literal_repeat1, 2), - [272] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_string_literal_repeat1, 2), SHIFT_REPEAT(82), - [275] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32), - [277] = {.entry = {.count = 1, .reusable = true}}, SHIFT(82), - [279] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), - [281] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), - [283] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), - [285] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_declaration, 2, .production_id = 2), - [287] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), SHIFT_REPEAT(16), - [290] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), - [292] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 22), SHIFT_REPEAT(95), - [295] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 22), - [297] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), - [299] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), - [301] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), - [303] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), - [305] = {.entry = {.count = 1, .reusable = true}}, SHIFT(98), - [307] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), - [309] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), - [311] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), - [313] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [315] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), - [317] = {.entry = {.count = 1, .reusable = true}}, SHIFT(94), + [58] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), + [60] = {.entry = {.count = 1, .reusable = false}}, SHIFT(69), + [62] = {.entry = {.count = 1, .reusable = false}}, SHIFT(53), + [64] = {.entry = {.count = 1, .reusable = false}}, SHIFT(68), + [66] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), + [68] = {.entry = {.count = 1, .reusable = false}}, SHIFT(65), + [70] = {.entry = {.count = 1, .reusable = false}}, SHIFT(41), + [72] = {.entry = {.count = 1, .reusable = false}}, SHIFT(44), + [74] = {.entry = {.count = 1, .reusable = false}}, SHIFT(70), + [76] = {.entry = {.count = 1, .reusable = false}}, SHIFT(49), + [78] = {.entry = {.count = 1, .reusable = false}}, SHIFT(64), + [80] = {.entry = {.count = 1, .reusable = false}}, SHIFT(66), + [82] = {.entry = {.count = 1, .reusable = false}}, SHIFT(75), + [84] = {.entry = {.count = 1, .reusable = false}}, SHIFT(60), + [86] = {.entry = {.count = 1, .reusable = false}}, SHIFT(45), + [88] = {.entry = {.count = 1, .reusable = false}}, SHIFT(77), + [90] = {.entry = {.count = 1, .reusable = false}}, SHIFT(72), + [92] = {.entry = {.count = 1, .reusable = false}}, SHIFT(63), + [94] = {.entry = {.count = 1, .reusable = false}}, SHIFT(71), + [96] = {.entry = {.count = 1, .reusable = false}}, SHIFT(79), + [98] = {.entry = {.count = 1, .reusable = false}}, SHIFT(62), + [100] = {.entry = {.count = 1, .reusable = false}}, SHIFT(76), + [102] = {.entry = {.count = 1, .reusable = false}}, SHIFT(74), + [104] = {.entry = {.count = 1, .reusable = false}}, SHIFT(55), + [106] = {.entry = {.count = 1, .reusable = false}}, SHIFT(78), + [108] = {.entry = {.count = 1, .reusable = false}}, SHIFT(61), + [110] = {.entry = {.count = 1, .reusable = false}}, SHIFT(51), + [112] = {.entry = {.count = 1, .reusable = false}}, SHIFT(39), + [114] = {.entry = {.count = 1, .reusable = false}}, SHIFT(57), + [116] = {.entry = {.count = 1, .reusable = false}}, SHIFT(58), + [118] = {.entry = {.count = 1, .reusable = false}}, SHIFT(59), + [120] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 2), + [122] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 2), + [124] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 4), + [126] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 4), + [128] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 7, .production_id = 23), + [130] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 7, .production_id = 23), + [132] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 5, .production_id = 15), + [134] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 5, .production_id = 15), + [136] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 5, .production_id = 16), + [138] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 5, .production_id = 16), + [140] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_expression, 2, .production_id = 1), + [142] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [144] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), + [146] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), + [148] = {.entry = {.count = 1, .reusable = false}}, SHIFT(33), + [150] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), + [152] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), + [154] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 3), + [156] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 3), + [158] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 4, .production_id = 12), + [160] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 4, .production_id = 12), + [162] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 4, .production_id = 11), + [164] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 4, .production_id = 11), + [166] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 3, .production_id = 3), + [168] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 3, .production_id = 3), + [170] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_expression, 4, .production_id = 10), + [172] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_expression, 4, .production_id = 9), + [174] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), + [176] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 3, .production_id = 4), + [178] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 3, .production_id = 4), + [180] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 3), + [182] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 3), + [184] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 5, .production_id = 17), + [186] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 5, .production_id = 17), + [188] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_expression, 8, .production_id = 25), + [190] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 2), + [192] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 2), + [194] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_expression, 6, .production_id = 18), + [196] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 4, .production_id = 8), + [198] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 4, .production_id = 8), + [200] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 3), + [202] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 3), + [204] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 6, .production_id = 19), + [206] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 6, .production_id = 19), + [208] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_expression, 6, .production_id = 20), + [210] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 6, .production_id = 21), + [212] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 6, .production_id = 21), + [214] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, .production_id = 5), + [216] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, .production_id = 5), + [218] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment_expression, 3, .production_id = 7), + [220] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment_expression, 3, .production_id = 7), + [222] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_declaration, 6, .production_id = 22), + [224] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_declaration, 4, .production_id = 13), + [226] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), + [228] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), + [230] = {.entry = {.count = 1, .reusable = true}}, SHIFT(103), + [232] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [234] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), + [236] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), + [238] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), + [240] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), + [242] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), + [244] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 4, .production_id = 26), + [246] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), + [248] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), + [250] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), + [252] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), + [254] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), + [256] = {.entry = {.count = 1, .reusable = true}}, SHIFT(99), + [258] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), + [260] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), + [262] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), + [264] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(108), + [267] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(97), + [270] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), + [272] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), + [274] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), + [276] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), + [278] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_string_literal_repeat1, 2), + [280] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_string_literal_repeat1, 2), SHIFT_REPEAT(84), + [283] = {.entry = {.count = 1, .reusable = false}}, SHIFT(40), + [285] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), + [287] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_declaration, 2, .production_id = 2), + [289] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), SHIFT_REPEAT(11), + [292] = {.entry = {.count = 1, .reusable = false}}, SHIFT(34), + [294] = {.entry = {.count = 1, .reusable = true}}, SHIFT(85), + [296] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), + [298] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), SHIFT_REPEAT(19), + [301] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), + [303] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), + [305] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), + [307] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 24), SHIFT_REPEAT(103), + [310] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 24), + [312] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), + [314] = {.entry = {.count = 1, .reusable = true}}, SHIFT(105), + [316] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), + [318] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), + [320] = {.entry = {.count = 1, .reusable = false}}, SHIFT(104), + [322] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), + [324] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), + [326] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), + [328] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), + [330] = {.entry = {.count = 1, .reusable = true}}, SHIFT(107), + [332] = {.entry = {.count = 1, .reusable = true}}, SHIFT(102), + [334] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), + [336] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [338] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [340] = {.entry = {.count = 1, .reusable = true}}, SHIFT(98), + [342] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), }; #ifdef __cplusplus diff --git a/test/corpus/declarations.txt b/test/corpus/declarations.txt index 24b200c..a631caa 100644 --- a/test/corpus/declarations.txt +++ b/test/corpus/declarations.txt @@ -6,6 +6,50 @@ Empty declarations (source_file) +================================================================================ +Variable declaration +================================================================================ + +var a := 12 + +-------------------------------------------------------------------------------- + +(source_file + (variable_declaration + name: (identifier) + value: (integer_literal))) + +================================================================================ +Variable declaration with type +================================================================================ + +var a : int := 27 + +-------------------------------------------------------------------------------- + +(source_file + (variable_declaration + name: (identifier) + type: (identifier) + value: (integer_literal))) + +================================================================================ +Multiple variable declarations +================================================================================ + +var a := 12 +var b := 27 + +-------------------------------------------------------------------------------- + +(source_file + (variable_declaration + name: (identifier) + value: (integer_literal)) + (variable_declaration + name: (identifier) + value: (integer_literal))) + ================================================================================ Import ================================================================================