diff --git a/grammar.js b/grammar.js index f4a9f77..011a849 100644 --- a/grammar.js +++ b/grammar.js @@ -54,6 +54,7 @@ module.exports = grammar({ $.while_expression, $.for_expression, $.break_expression, + $.let_expression, ), nil_literal: (_) => "nil", @@ -210,6 +211,29 @@ module.exports = grammar({ break_expression: (_) => "break", + let_expression: ($) => seq( + "let", + field("declarations", optional($._declaration_chunks)), + "in", + field("body", sepBy(";", $._expr)), + "end", + ), + + // }}} + + // Declarations {{{ + + _declaration_chunks: ($) => repeat1($._declaration_chunk), + + _declaration_chunk: ($) => choice( + $.import_declaration, + ), + + import_declaration: ($) => seq( + "import", + field("file", $.string_literal), + ), + // }}} } }); diff --git a/src/grammar.json b/src/grammar.json index 5dd95a8..8195394 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -73,6 +73,10 @@ { "type": "SYMBOL", "name": "break_expression" + }, + { + "type": "SYMBOL", + "name": "let_expression" } ] }, @@ -945,6 +949,109 @@ "break_expression": { "type": "STRING", "value": "break" + }, + "let_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "let" + }, + { + "type": "FIELD", + "name": "declarations", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_declaration_chunks" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": "in" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expr" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "SYMBOL", + "name": "_expr" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": "end" + } + ] + }, + "_declaration_chunks": { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "_declaration_chunk" + } + }, + "_declaration_chunk": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "import_declaration" + } + ] + }, + "import_declaration": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "import" + }, + { + "type": "FIELD", + "name": "file", + "content": { + "type": "SYMBOL", + "name": "string_literal" + } + } + ] } }, "extras": [ diff --git a/src/node-types.json b/src/node-types.json index 26ead1a..b673482 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -47,6 +47,10 @@ "type": "integer_literal", "named": true }, + { + "type": "let_expression", + "named": true + }, { "type": "nil_literal", "named": true @@ -121,6 +125,10 @@ "type": "integer_literal", "named": true }, + { + "type": "let_expression", + "named": true + }, { "type": "nil_literal", "named": true @@ -229,6 +237,10 @@ "type": "integer_literal", "named": true }, + { + "type": "let_expression", + "named": true + }, { "type": "nil_literal", "named": true @@ -327,6 +339,10 @@ "type": "integer_literal", "named": true }, + { + "type": "let_expression", + "named": true + }, { "type": "nil_literal", "named": true @@ -407,6 +423,10 @@ "type": "integer_literal", "named": true }, + { + "type": "let_expression", + "named": true + }, { "type": "nil_literal", "named": true @@ -491,6 +511,10 @@ "type": "integer_literal", "named": true }, + { + "type": "let_expression", + "named": true + }, { "type": "nil_literal", "named": true @@ -571,6 +595,10 @@ "type": "integer_literal", "named": true }, + { + "type": "let_expression", + "named": true + }, { "type": "nil_literal", "named": true @@ -645,6 +673,10 @@ "type": "integer_literal", "named": true }, + { + "type": "let_expression", + "named": true + }, { "type": "nil_literal", "named": true @@ -729,6 +761,10 @@ "type": "integer_literal", "named": true }, + { + "type": "let_expression", + "named": true + }, { "type": "nil_literal", "named": true @@ -813,6 +849,10 @@ "type": "integer_literal", "named": true }, + { + "type": "let_expression", + "named": true + }, { "type": "nil_literal", "named": true @@ -903,6 +943,10 @@ "type": "integer_literal", "named": true }, + { + "type": "let_expression", + "named": true + }, { "type": "nil_literal", "named": true @@ -977,6 +1021,10 @@ "type": "integer_literal", "named": true }, + { + "type": "let_expression", + "named": true + }, { "type": "nil_literal", "named": true @@ -1051,6 +1099,10 @@ "type": "integer_literal", "named": true }, + { + "type": "let_expression", + "named": true + }, { "type": "nil_literal", "named": true @@ -1083,6 +1135,120 @@ } } }, + { + "type": "import_declaration", + "named": true, + "fields": { + "file": { + "multiple": false, + "required": true, + "types": [ + { + "type": "string_literal", + "named": true + } + ] + } + } + }, + { + "type": "let_expression", + "named": true, + "fields": { + "body": { + "multiple": true, + "required": false, + "types": [ + { + "type": ";", + "named": false + }, + { + "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 + } + ] + }, + "declarations": { + "multiple": true, + "required": false, + "types": [ + { + "type": "import_declaration", + "named": true + } + ] + } + } + }, { "type": "record_expression", "named": true, @@ -1141,6 +1307,10 @@ "type": "integer_literal", "named": true }, + { + "type": "let_expression", + "named": true + }, { "type": "nil_literal", "named": true @@ -1265,6 +1435,10 @@ "type": "integer_literal", "named": true }, + { + "type": "let_expression", + "named": true + }, { "type": "nil_literal", "named": true @@ -1344,6 +1518,10 @@ "type": "integer_literal", "named": true }, + { + "type": "let_expression", + "named": true + }, { "type": "nil_literal", "named": true @@ -1438,6 +1616,10 @@ "type": "integer_literal", "named": true }, + { + "type": "let_expression", + "named": true + }, { "type": "nil_literal", "named": true @@ -1528,6 +1710,10 @@ "type": "integer_literal", "named": true }, + { + "type": "let_expression", + "named": true + }, { "type": "nil_literal", "named": true @@ -1602,6 +1788,10 @@ "type": "integer_literal", "named": true }, + { + "type": "let_expression", + "named": true + }, { "type": "nil_literal", "named": true @@ -1686,6 +1876,10 @@ "type": "else", "named": false }, + { + "type": "end", + "named": false + }, { "type": "escape_sequence", "named": true @@ -1702,10 +1896,22 @@ "type": "if", "named": false }, + { + "type": "import", + "named": false + }, + { + "type": "in", + "named": false + }, { "type": "integer_literal", "named": true }, + { + "type": "let", + "named": false + }, { "type": "nil_literal", "named": true diff --git a/src/parser.c b/src/parser.c index 3b69030..e38e9af 100644 --- a/src/parser.c +++ b/src/parser.c @@ -6,15 +6,15 @@ #endif #define LANGUAGE_VERSION 13 -#define STATE_COUNT 84 +#define STATE_COUNT 101 #define LARGE_STATE_COUNT 2 -#define SYMBOL_COUNT 58 +#define SYMBOL_COUNT 66 #define ALIAS_COUNT 0 -#define TOKEN_COUNT 38 +#define TOKEN_COUNT 42 #define EXTERNAL_TOKEN_COUNT 0 -#define FIELD_COUNT 19 +#define FIELD_COUNT 21 #define MAX_ALIAS_SEQUENCE_LENGTH 8 -#define PRODUCTION_ID_COUNT 19 +#define PRODUCTION_ID_COUNT 25 enum { sym_identifier = 1, @@ -54,26 +54,34 @@ enum { anon_sym_for = 35, anon_sym_to = 36, sym_break_expression = 37, - sym_source_file = 38, - sym__expr = 39, - sym_string_literal = 40, - sym__lvalue = 41, - sym_record_value = 42, - sym_array_value = 43, - sym_function_call = 44, - sym_unary_expression = 45, - sym_binary_expression = 46, - sym_sequence_expression = 47, - sym_array_expression = 48, - sym_record_expression = 49, - sym_assignment_expression = 50, - sym_if_expression = 51, - sym_while_expression = 52, - sym_for_expression = 53, - aux_sym_string_literal_repeat1 = 54, - aux_sym_function_call_repeat1 = 55, - aux_sym_sequence_expression_repeat1 = 56, - aux_sym_record_expression_repeat1 = 57, + 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, }; static const char * const ts_symbol_names[] = { @@ -115,6 +123,10 @@ static const char * const ts_symbol_names[] = { [anon_sym_for] = "for", [anon_sym_to] = "to", [sym_break_expression] = "break_expression", + [anon_sym_let] = "let", + [anon_sym_in] = "in", + [anon_sym_end] = "end", + [anon_sym_import] = "import", [sym_source_file] = "source_file", [sym__expr] = "_expr", [sym_string_literal] = "string_literal", @@ -131,6 +143,10 @@ static const char * const ts_symbol_names[] = { [sym_if_expression] = "if_expression", [sym_while_expression] = "while_expression", [sym_for_expression] = "for_expression", + [sym_let_expression] = "let_expression", + [aux_sym__declaration_chunks] = "_declaration_chunks", + [sym__declaration_chunk] = "_declaration_chunk", + [sym_import_declaration] = "import_declaration", [aux_sym_string_literal_repeat1] = "string_literal_repeat1", [aux_sym_function_call_repeat1] = "function_call_repeat1", [aux_sym_sequence_expression_repeat1] = "sequence_expression_repeat1", @@ -176,6 +192,10 @@ static const TSSymbol ts_symbol_map[] = { [anon_sym_for] = anon_sym_for, [anon_sym_to] = anon_sym_to, [sym_break_expression] = sym_break_expression, + [anon_sym_let] = anon_sym_let, + [anon_sym_in] = anon_sym_in, + [anon_sym_end] = anon_sym_end, + [anon_sym_import] = anon_sym_import, [sym_source_file] = sym_source_file, [sym__expr] = sym__expr, [sym_string_literal] = sym_string_literal, @@ -192,6 +212,10 @@ static const TSSymbol ts_symbol_map[] = { [sym_if_expression] = sym_if_expression, [sym_while_expression] = sym_while_expression, [sym_for_expression] = sym_for_expression, + [sym_let_expression] = sym_let_expression, + [aux_sym__declaration_chunks] = aux_sym__declaration_chunks, + [sym__declaration_chunk] = sym__declaration_chunk, + [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, [aux_sym_sequence_expression_repeat1] = aux_sym_sequence_expression_repeat1, @@ -351,6 +375,22 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, + [anon_sym_let] = { + .visible = true, + .named = false, + }, + [anon_sym_in] = { + .visible = true, + .named = false, + }, + [anon_sym_end] = { + .visible = true, + .named = false, + }, + [anon_sym_import] = { + .visible = true, + .named = false, + }, [sym_source_file] = { .visible = true, .named = true, @@ -415,6 +455,22 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, + [sym_let_expression] = { + .visible = true, + .named = true, + }, + [aux_sym__declaration_chunks] = { + .visible = false, + .named = false, + }, + [sym__declaration_chunk] = { + .visible = false, + .named = true, + }, + [sym_import_declaration] = { + .visible = true, + .named = true, + }, [aux_sym_string_literal_repeat1] = { .visible = false, .named = false, @@ -440,19 +496,21 @@ enum { field_body = 4, field_condition = 5, field_consequence = 6, - field_end = 7, - field_expression = 8, - field_field = 9, - field_function = 10, - field_index = 11, - field_init = 12, - field_left = 13, - field_operator = 14, - field_record = 15, - field_right = 16, - field_size = 17, - field_start = 18, - field_type = 19, + field_declarations = 7, + field_end = 8, + field_expression = 9, + field_field = 10, + field_file = 11, + field_function = 12, + 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, }; static const char * const ts_field_names[] = { @@ -463,9 +521,11 @@ static const char * const ts_field_names[] = { [field_body] = "body", [field_condition] = "condition", [field_consequence] = "consequence", + [field_declarations] = "declarations", [field_end] = "end", [field_expression] = "expression", [field_field] = "field", + [field_file] = "file", [field_function] = "function", [field_index] = "index", [field_init] = "init", @@ -482,21 +542,27 @@ static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { [1] = {.index = 0, .length = 2}, [2] = {.index = 2, .length = 1}, [3] = {.index = 3, .length = 1}, - [4] = {.index = 4, .length = 3}, - [5] = {.index = 7, .length = 2}, - [6] = {.index = 9, .length = 2}, - [7] = {.index = 11, .length = 2}, - [8] = {.index = 13, .length = 2}, - [9] = {.index = 15, .length = 2}, - [10] = {.index = 17, .length = 2}, - [11] = {.index = 19, .length = 3}, - [12] = {.index = 22, .length = 3}, - [13] = {.index = 25, .length = 3}, - [14] = {.index = 28, .length = 3}, - [15] = {.index = 31, .length = 5}, - [16] = {.index = 36, .length = 4}, - [17] = {.index = 40, .length = 4}, - [18] = {.index = 44, .length = 2}, + [4] = {.index = 4, .length = 1}, + [5] = {.index = 5, .length = 3}, + [6] = {.index = 8, .length = 2}, + [7] = {.index = 10, .length = 2}, + [8] = {.index = 12, .length = 2}, + [9] = {.index = 14, .length = 2}, + [10] = {.index = 16, .length = 2}, + [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}, + [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}, }; static const TSFieldMapEntry ts_field_map_entries[] = { @@ -508,67 +574,83 @@ static const TSFieldMapEntry ts_field_map_entries[] = { [3] = {field_type, 0}, [4] = + {field_file, 1}, + [5] = {field_left, 0}, {field_operator, 1}, {field_right, 2}, - [7] = + [8] = {field_field, 2}, {field_record, 0}, - [9] = + [10] = {field_left, 0}, {field_right, 2}, - [11] = + [12] = {field_arguments, 2}, {field_function, 0}, - [13] = + [14] = {field_condition, 1}, {field_consequence, 3}, - [15] = + [16] = {field_body, 3}, {field_condition, 1}, - [17] = + [18] = + {field_body, 2}, + [19] = + {field_declarations, 1}, + [20] = {field_array, 0}, {field_index, 2}, - [19] = + [22] = {field_arguments, 2}, {field_arguments, 3}, {field_function, 0}, - [22] = + [25] = + {field_body, 2}, + {field_body, 3}, + [27] = + {field_body, 3}, + {field_declarations, 1}, + [29] = {field_init, 5}, {field_size, 2}, {field_type, 0}, - [25] = + [32] = {field_field, 2}, {field_init, 4}, {field_type, 0}, - [28] = + [35] = {field_alternative, 5}, {field_condition, 1}, {field_consequence, 3}, - [31] = + [38] = + {field_body, 3}, + {field_body, 4}, + {field_declarations, 1}, + [41] = {field_field, 2}, {field_field, 5, .inherited = true}, {field_init, 4}, {field_init, 5, .inherited = true}, {field_type, 0}, - [36] = + [46] = {field_field, 0, .inherited = true}, {field_field, 1, .inherited = true}, {field_init, 0, .inherited = true}, {field_init, 1, .inherited = true}, - [40] = + [50] = {field_body, 7}, {field_end, 5}, {field_index, 1}, {field_start, 3}, - [44] = + [54] = {field_field, 1}, {field_init, 3}, }; static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { [0] = {0}, - [4] = { + [5] = { [1] = anon_sym_DASH, }, }; @@ -838,109 +920,146 @@ static bool ts_lex_keywords(TSLexer *lexer, TSStateId state) { if (lookahead == 'e') ADVANCE(3); if (lookahead == 'f') ADVANCE(4); if (lookahead == 'i') ADVANCE(5); - if (lookahead == 'n') ADVANCE(6); - if (lookahead == 'o') ADVANCE(7); - if (lookahead == 't') ADVANCE(8); - if (lookahead == 'w') ADVANCE(9); + if (lookahead == 'l') ADVANCE(6); + if (lookahead == 'n') ADVANCE(7); + if (lookahead == 'o') ADVANCE(8); + if (lookahead == 't') ADVANCE(9); + if (lookahead == 'w') ADVANCE(10); if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || lookahead == ' ') SKIP(0) END_STATE(); case 1: - if (lookahead == 'r') ADVANCE(10); + if (lookahead == 'r') ADVANCE(11); END_STATE(); case 2: - if (lookahead == 'o') ADVANCE(11); + if (lookahead == 'o') ADVANCE(12); END_STATE(); case 3: - if (lookahead == 'l') ADVANCE(12); + if (lookahead == 'l') ADVANCE(13); + if (lookahead == 'n') ADVANCE(14); END_STATE(); case 4: - if (lookahead == 'o') ADVANCE(13); + if (lookahead == 'o') ADVANCE(15); END_STATE(); case 5: - if (lookahead == 'f') ADVANCE(14); + if (lookahead == 'f') ADVANCE(16); + if (lookahead == 'm') ADVANCE(17); + if (lookahead == 'n') ADVANCE(18); END_STATE(); case 6: - if (lookahead == 'i') ADVANCE(15); + if (lookahead == 'e') ADVANCE(19); END_STATE(); case 7: - if (lookahead == 'f') ADVANCE(16); + if (lookahead == 'i') ADVANCE(20); END_STATE(); case 8: - if (lookahead == 'h') ADVANCE(17); - if (lookahead == 'o') ADVANCE(18); + if (lookahead == 'f') ADVANCE(21); END_STATE(); case 9: - if (lookahead == 'h') ADVANCE(19); + if (lookahead == 'h') ADVANCE(22); + if (lookahead == 'o') ADVANCE(23); END_STATE(); case 10: - if (lookahead == 'e') ADVANCE(20); + if (lookahead == 'h') ADVANCE(24); END_STATE(); case 11: - ACCEPT_TOKEN(anon_sym_do); + if (lookahead == 'e') ADVANCE(25); END_STATE(); case 12: - if (lookahead == 's') ADVANCE(21); + ACCEPT_TOKEN(anon_sym_do); END_STATE(); case 13: - if (lookahead == 'r') ADVANCE(22); + if (lookahead == 's') ADVANCE(26); END_STATE(); case 14: - ACCEPT_TOKEN(anon_sym_if); + if (lookahead == 'd') ADVANCE(27); END_STATE(); case 15: - if (lookahead == 'l') ADVANCE(23); + if (lookahead == 'r') ADVANCE(28); END_STATE(); case 16: - ACCEPT_TOKEN(anon_sym_of); + ACCEPT_TOKEN(anon_sym_if); END_STATE(); case 17: - if (lookahead == 'e') ADVANCE(24); + if (lookahead == 'p') ADVANCE(29); END_STATE(); case 18: - ACCEPT_TOKEN(anon_sym_to); + ACCEPT_TOKEN(anon_sym_in); END_STATE(); case 19: - if (lookahead == 'i') ADVANCE(25); + if (lookahead == 't') ADVANCE(30); END_STATE(); case 20: - if (lookahead == 'a') ADVANCE(26); + if (lookahead == 'l') ADVANCE(31); END_STATE(); case 21: - if (lookahead == 'e') ADVANCE(27); + ACCEPT_TOKEN(anon_sym_of); END_STATE(); case 22: - ACCEPT_TOKEN(anon_sym_for); + if (lookahead == 'e') ADVANCE(32); END_STATE(); case 23: - ACCEPT_TOKEN(sym_nil_literal); + ACCEPT_TOKEN(anon_sym_to); END_STATE(); case 24: - if (lookahead == 'n') ADVANCE(28); + if (lookahead == 'i') ADVANCE(33); END_STATE(); case 25: - if (lookahead == 'l') ADVANCE(29); + if (lookahead == 'a') ADVANCE(34); END_STATE(); case 26: - if (lookahead == 'k') ADVANCE(30); + if (lookahead == 'e') ADVANCE(35); END_STATE(); case 27: - ACCEPT_TOKEN(anon_sym_else); + ACCEPT_TOKEN(anon_sym_end); END_STATE(); case 28: - ACCEPT_TOKEN(anon_sym_then); + ACCEPT_TOKEN(anon_sym_for); END_STATE(); case 29: - if (lookahead == 'e') ADVANCE(31); + if (lookahead == 'o') ADVANCE(36); END_STATE(); case 30: - ACCEPT_TOKEN(sym_break_expression); + ACCEPT_TOKEN(anon_sym_let); END_STATE(); case 31: + ACCEPT_TOKEN(sym_nil_literal); + END_STATE(); + case 32: + if (lookahead == 'n') ADVANCE(37); + END_STATE(); + case 33: + if (lookahead == 'l') ADVANCE(38); + END_STATE(); + case 34: + if (lookahead == 'k') ADVANCE(39); + END_STATE(); + case 35: + ACCEPT_TOKEN(anon_sym_else); + END_STATE(); + case 36: + if (lookahead == 'r') ADVANCE(40); + END_STATE(); + case 37: + ACCEPT_TOKEN(anon_sym_then); + END_STATE(); + case 38: + if (lookahead == 'e') ADVANCE(41); + END_STATE(); + case 39: + ACCEPT_TOKEN(sym_break_expression); + END_STATE(); + case 40: + if (lookahead == 't') ADVANCE(42); + END_STATE(); + case 41: ACCEPT_TOKEN(anon_sym_while); END_STATE(); + case 42: + ACCEPT_TOKEN(anon_sym_import); + END_STATE(); default: return false; } @@ -949,9 +1068,9 @@ 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 = 9}, + [2] = {.lex_state = 0}, [3] = {.lex_state = 0}, - [4] = {.lex_state = 0}, + [4] = {.lex_state = 9}, [5] = {.lex_state = 0}, [6] = {.lex_state = 0}, [7] = {.lex_state = 0}, @@ -959,11 +1078,11 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [9] = {.lex_state = 0}, [10] = {.lex_state = 0}, [11] = {.lex_state = 0}, - [12] = {.lex_state = 9}, - [13] = {.lex_state = 9}, + [12] = {.lex_state = 0}, + [13] = {.lex_state = 0}, [14] = {.lex_state = 0}, [15] = {.lex_state = 0}, - [16] = {.lex_state = 9}, + [16] = {.lex_state = 0}, [17] = {.lex_state = 0}, [18] = {.lex_state = 0}, [19] = {.lex_state = 0}, @@ -976,7 +1095,7 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [26] = {.lex_state = 0}, [27] = {.lex_state = 0}, [28] = {.lex_state = 0}, - [29] = {.lex_state = 0}, + [29] = {.lex_state = 9}, [30] = {.lex_state = 9}, [31] = {.lex_state = 9}, [32] = {.lex_state = 9}, @@ -1000,37 +1119,54 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [50] = {.lex_state = 9}, [51] = {.lex_state = 9}, [52] = {.lex_state = 9}, - [53] = {.lex_state = 0}, - [54] = {.lex_state = 0}, - [55] = {.lex_state = 0}, - [56] = {.lex_state = 0}, - [57] = {.lex_state = 0}, - [58] = {.lex_state = 0}, + [53] = {.lex_state = 9}, + [54] = {.lex_state = 9}, + [55] = {.lex_state = 9}, + [56] = {.lex_state = 9}, + [57] = {.lex_state = 9}, + [58] = {.lex_state = 9}, [59] = {.lex_state = 9}, - [60] = {.lex_state = 0}, + [60] = {.lex_state = 9}, [61] = {.lex_state = 9}, [62] = {.lex_state = 0}, [63] = {.lex_state = 0}, - [64] = {.lex_state = 9}, + [64] = {.lex_state = 0}, [65] = {.lex_state = 9}, - [66] = {.lex_state = 1}, - [67] = {.lex_state = 1}, - [68] = {.lex_state = 1}, - [69] = {.lex_state = 0}, - [70] = {.lex_state = 0}, + [66] = {.lex_state = 9}, + [67] = {.lex_state = 0}, + [68] = {.lex_state = 0}, + [69] = {.lex_state = 9}, + [70] = {.lex_state = 9}, [71] = {.lex_state = 0}, [72] = {.lex_state = 0}, [73] = {.lex_state = 0}, - [74] = {.lex_state = 0}, + [74] = {.lex_state = 9}, [75] = {.lex_state = 9}, - [76] = {.lex_state = 0}, - [77] = {.lex_state = 0}, + [76] = {.lex_state = 9}, + [77] = {.lex_state = 9}, [78] = {.lex_state = 9}, - [79] = {.lex_state = 0}, + [79] = {.lex_state = 1}, [80] = {.lex_state = 9}, - [81] = {.lex_state = 9}, - [82] = {.lex_state = 0}, - [83] = {.lex_state = 9}, + [81] = {.lex_state = 1}, + [82] = {.lex_state = 1}, + [83] = {.lex_state = 0}, + [84] = {.lex_state = 0}, + [85] = {.lex_state = 9}, + [86] = {.lex_state = 0}, + [87] = {.lex_state = 0}, + [88] = {.lex_state = 9}, + [89] = {.lex_state = 0}, + [90] = {.lex_state = 9}, + [91] = {.lex_state = 9}, + [92] = {.lex_state = 0}, + [93] = {.lex_state = 9}, + [94] = {.lex_state = 9}, + [95] = {.lex_state = 0}, + [96] = {.lex_state = 0}, + [97] = {.lex_state = 0}, + [98] = {.lex_state = 9}, + [99] = {.lex_state = 9}, + [100] = {.lex_state = 0}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { @@ -1072,24 +1208,29 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_for] = ACTIONS(1), [anon_sym_to] = ACTIONS(1), [sym_break_expression] = ACTIONS(1), + [anon_sym_let] = ACTIONS(1), + [anon_sym_in] = ACTIONS(1), + [anon_sym_end] = ACTIONS(1), + [anon_sym_import] = ACTIONS(1), }, [1] = { - [sym_source_file] = STATE(82), - [sym__expr] = STATE(60), - [sym_string_literal] = STATE(60), - [sym__lvalue] = STATE(12), - [sym_record_value] = STATE(12), - [sym_array_value] = STATE(12), - [sym_function_call] = STATE(60), - [sym_unary_expression] = STATE(60), - [sym_binary_expression] = STATE(60), - [sym_sequence_expression] = STATE(60), - [sym_array_expression] = STATE(60), - [sym_record_expression] = STATE(60), - [sym_assignment_expression] = STATE(60), - [sym_if_expression] = STATE(60), - [sym_while_expression] = STATE(60), - [sym_for_expression] = STATE(60), + [sym_source_file] = STATE(97), + [sym__expr] = STATE(73), + [sym_string_literal] = STATE(73), + [sym__lvalue] = STATE(31), + [sym_record_value] = STATE(31), + [sym_array_value] = STATE(31), + [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), [sym_identifier] = ACTIONS(3), [sym_nil_literal] = ACTIONS(5), [sym_integer_literal] = ACTIONS(5), @@ -1100,21 +1241,104 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_while] = ACTIONS(15), [anon_sym_for] = ACTIONS(17), [sym_break_expression] = ACTIONS(5), + [anon_sym_let] = ACTIONS(19), }, }; static const uint16_t ts_small_parse_table[] = { - [0] = 5, - ACTIONS(21), 1, - anon_sym_LBRACK, - ACTIONS(24), 1, + [0] = 12, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, anon_sym_LPAREN, - ACTIONS(28), 1, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(17), 1, + anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(23), 1, + anon_sym_end, + ACTIONS(21), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(31), 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(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(17), 1, + anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(27), 1, + anon_sym_end, + ACTIONS(25), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(31), 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, + [106] = 5, + ACTIONS(31), 1, + anon_sym_LBRACK, + ACTIONS(34), 1, + anon_sym_LPAREN, + ACTIONS(38), 1, anon_sym_LBRACE, - ACTIONS(26), 2, + ACTIONS(36), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(19), 22, + ACTIONS(29), 23, ts_builtin_sym_end, anon_sym_DOT, anon_sym_RBRACK, @@ -1137,7 +1361,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, - [38] = 11, + anon_sym_end, + [145] = 12, ACTIONS(3), 1, sym_identifier, ACTIONS(7), 1, @@ -1152,127 +1377,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_while, ACTIONS(17), 1, anon_sym_for, - ACTIONS(32), 1, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(42), 1, anon_sym_RPAREN, - ACTIONS(30), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(12), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(54), 12, - 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, - [87] = 11, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(15), 1, - anon_sym_while, - ACTIONS(17), 1, - anon_sym_for, - ACTIONS(36), 1, - anon_sym_RPAREN, - ACTIONS(34), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(12), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(53), 12, - 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, - [136] = 10, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(15), 1, - anon_sym_while, - ACTIONS(17), 1, - anon_sym_for, - ACTIONS(38), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(12), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(52), 12, - 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, - [182] = 10, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(15), 1, - anon_sym_while, - ACTIONS(17), 1, - anon_sym_for, ACTIONS(40), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(12), 3, + STATE(31), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(58), 12, + STATE(63), 13, sym__expr, sym_string_literal, sym_function_call, @@ -1285,43 +1402,8 @@ static const uint16_t ts_small_parse_table[] = { sym_if_expression, sym_while_expression, sym_for_expression, - [228] = 10, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(15), 1, - anon_sym_while, - ACTIONS(17), 1, - anon_sym_for, - ACTIONS(42), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(12), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(59), 12, - 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, - [274] = 10, + sym_let_expression, + [198] = 12, ACTIONS(3), 1, sym_identifier, ACTIONS(7), 1, @@ -1336,15 +1418,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_while, ACTIONS(17), 1, anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(46), 1, + anon_sym_RPAREN, ACTIONS(44), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(12), 3, + STATE(31), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(64), 12, + STATE(64), 13, sym__expr, sym_string_literal, sym_function_call, @@ -1357,43 +1443,8 @@ static const uint16_t ts_small_parse_table[] = { sym_if_expression, sym_while_expression, sym_for_expression, - [320] = 10, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(15), 1, - anon_sym_while, - ACTIONS(17), 1, - anon_sym_for, - ACTIONS(46), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(12), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(56), 12, - 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, - [366] = 10, + sym_let_expression, + [251] = 11, ACTIONS(3), 1, sym_identifier, ACTIONS(7), 1, @@ -1408,15 +1459,17 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_while, ACTIONS(17), 1, anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, ACTIONS(48), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(12), 3, + STATE(31), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(57), 12, + STATE(55), 13, sym__expr, sym_string_literal, sym_function_call, @@ -1429,7 +1482,8 @@ static const uint16_t ts_small_parse_table[] = { sym_if_expression, sym_while_expression, sym_for_expression, - [412] = 10, + sym_let_expression, + [301] = 11, ACTIONS(3), 1, sym_identifier, ACTIONS(7), 1, @@ -1444,15 +1498,17 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_while, ACTIONS(17), 1, anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, ACTIONS(50), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(12), 3, + STATE(31), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(51), 12, + STATE(69), 13, sym__expr, sym_string_literal, sym_function_call, @@ -1465,66 +1521,8 @@ static const uint16_t ts_small_parse_table[] = { sym_if_expression, sym_while_expression, sym_for_expression, - [458] = 5, - ACTIONS(54), 1, - anon_sym_DOT, - ACTIONS(56), 1, - anon_sym_LBRACK, - ACTIONS(60), 1, - anon_sym_COLON_EQ, - ACTIONS(58), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(52), 20, - 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, - [494] = 2, - ACTIONS(64), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(62), 23, - 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, - [524] = 10, + sym_let_expression, + [351] = 11, ACTIONS(3), 1, sym_identifier, ACTIONS(7), 1, @@ -1539,15 +1537,290 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_while, ACTIONS(17), 1, anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(52), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(31), 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, + [401] = 11, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(17), 1, + anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(54), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(31), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(67), 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, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(17), 1, + anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(56), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(31), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(49), 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(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(17), 1, + anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(58), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(31), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(68), 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, + [551] = 11, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(17), 1, + anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(60), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(31), 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, + [601] = 11, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(17), 1, + anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(62), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(31), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(75), 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(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(17), 1, + anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(64), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(31), 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, + [701] = 11, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(17), 1, + anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, ACTIONS(66), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(12), 3, + STATE(31), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(39), 12, + STATE(44), 13, sym__expr, sym_string_literal, sym_function_call, @@ -1560,7 +1833,8 @@ static const uint16_t ts_small_parse_table[] = { sym_if_expression, sym_while_expression, sym_for_expression, - [570] = 10, + sym_let_expression, + [751] = 11, ACTIONS(3), 1, sym_identifier, ACTIONS(7), 1, @@ -1575,15 +1849,17 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_while, ACTIONS(17), 1, anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, ACTIONS(68), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, - STATE(12), 3, + STATE(31), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(63), 12, + STATE(72), 13, sym__expr, sym_string_literal, sym_function_call, @@ -1596,11 +1872,441 @@ static const uint16_t ts_small_parse_table[] = { sym_if_expression, sym_while_expression, sym_for_expression, - [616] = 2, - ACTIONS(72), 2, + sym_let_expression, + [801] = 11, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(17), 1, + anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(70), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(31), 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, + [851] = 11, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(17), 1, + anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(72), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(31), 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, + [901] = 11, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(17), 1, + anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(74), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(31), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(71), 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, + [951] = 11, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(17), 1, + anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(76), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(31), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(47), 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, + [1001] = 11, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(17), 1, + anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(78), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(31), 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, + [1051] = 11, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(17), 1, + anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(80), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(31), 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, + [1101] = 11, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(17), 1, + anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(82), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(31), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(70), 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, + [1151] = 11, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(17), 1, + anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(84), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(31), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(34), 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, + [1201] = 11, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(17), 1, + anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(86), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(31), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(54), 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, + [1251] = 11, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(17), 1, + anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(88), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(31), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(52), 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, + [1301] = 11, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(17), 1, + anon_sym_for, + ACTIONS(19), 1, + anon_sym_let, + ACTIONS(90), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(31), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(53), 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, + [1351] = 2, + ACTIONS(94), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(70), 23, + ACTIONS(92), 24, ts_builtin_sym_end, anon_sym_DOT, anon_sym_LBRACK, @@ -1624,525 +2330,59 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, - [646] = 10, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(15), 1, - anon_sym_while, - ACTIONS(17), 1, - anon_sym_for, - ACTIONS(74), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(12), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(36), 12, - 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, - [692] = 10, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(15), 1, - anon_sym_while, - ACTIONS(17), 1, - anon_sym_for, - ACTIONS(76), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(12), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(30), 12, - 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, - [738] = 10, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(15), 1, - anon_sym_while, - ACTIONS(17), 1, - anon_sym_for, - ACTIONS(78), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(12), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(55), 12, - 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, - [784] = 10, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(15), 1, - anon_sym_while, - ACTIONS(17), 1, - anon_sym_for, - ACTIONS(80), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(12), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(44), 12, - 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, - [830] = 10, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(15), 1, - anon_sym_while, - ACTIONS(17), 1, - anon_sym_for, - ACTIONS(82), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(12), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(61), 12, - 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, - [876] = 10, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(15), 1, - anon_sym_while, - ACTIONS(17), 1, - anon_sym_for, - ACTIONS(84), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(12), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(50), 12, - 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, - [922] = 10, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(15), 1, - anon_sym_while, - ACTIONS(17), 1, - anon_sym_for, - ACTIONS(86), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(12), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(35), 12, - 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, - [968] = 10, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(15), 1, - anon_sym_while, - ACTIONS(17), 1, - anon_sym_for, - ACTIONS(88), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(12), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(47), 12, - 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, - [1014] = 10, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(15), 1, - anon_sym_while, - ACTIONS(17), 1, - anon_sym_for, - ACTIONS(90), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(12), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(46), 12, - 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, - [1060] = 10, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(15), 1, - anon_sym_while, - ACTIONS(17), 1, - anon_sym_for, - ACTIONS(92), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(12), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(31), 12, - 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, - [1106] = 10, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(15), 1, - anon_sym_while, - ACTIONS(17), 1, - anon_sym_for, - ACTIONS(94), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(12), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(48), 12, - 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, - [1152] = 10, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(15), 1, - anon_sym_while, - ACTIONS(17), 1, - anon_sym_for, - ACTIONS(96), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(12), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(65), 12, - 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, - [1198] = 10, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(15), 1, - anon_sym_while, - ACTIONS(17), 1, - anon_sym_for, - ACTIONS(98), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(12), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(62), 12, - 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, - [1244] = 8, - ACTIONS(110), 1, - anon_sym_AMP, - ACTIONS(112), 1, - anon_sym_PIPE, - ACTIONS(114), 1, - anon_sym_else, - ACTIONS(102), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(104), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(108), 2, + anon_sym_end, + [1382] = 2, + ACTIONS(98), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(106), 4, + ACTIONS(96), 24, + 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, - ACTIONS(100), 9, - 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_COLON_EQ, anon_sym_then, + anon_sym_else, anon_sym_do, anon_sym_to, - [1283] = 5, - ACTIONS(102), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(104), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(108), 2, + anon_sym_end, + [1413] = 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(106), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(116), 12, + ACTIONS(100), 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, @@ -2151,127 +2391,83 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, - [1316] = 2, + anon_sym_end, + [1450] = 2, + ACTIONS(112), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(110), 23, + 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_import, + [1480] = 2, + ACTIONS(116), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(114), 23, + 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_import, + [1510] = 7, + ACTIONS(128), 1, + anon_sym_AMP, + ACTIONS(130), 1, + anon_sym_PIPE, ACTIONS(120), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(118), 20, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, anon_sym_STAR, anon_sym_SLASH, - anon_sym_PLUS, + ACTIONS(126), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(124), 4, 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, - [1343] = 2, - ACTIONS(124), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(122), 20, - 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, - [1370] = 2, - ACTIONS(128), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(126), 20, - 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, - [1397] = 3, - ACTIONS(104), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(130), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(116), 18, - 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, - [1426] = 7, - ACTIONS(110), 1, - anon_sym_AMP, - ACTIONS(112), 1, - anon_sym_PIPE, - ACTIONS(102), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(104), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(108), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(106), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(132), 10, + ACTIONS(118), 11, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2282,11 +2478,43 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, - [1463] = 2, + anon_sym_end, + [1548] = 7, + ACTIONS(128), 1, + anon_sym_AMP, + ACTIONS(130), 1, + anon_sym_PIPE, + ACTIONS(120), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(126), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(124), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(132), 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, + [1586] = 2, ACTIONS(136), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(134), 20, + ACTIONS(134), 21, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2307,11 +2535,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, - [1490] = 2, + anon_sym_end, + [1614] = 2, ACTIONS(140), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(138), 20, + ACTIONS(138), 21, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2332,41 +2561,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, - [1517] = 7, - ACTIONS(110), 1, - anon_sym_AMP, - ACTIONS(112), 1, - anon_sym_PIPE, - ACTIONS(102), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(104), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(108), 2, + anon_sym_end, + [1642] = 2, + ACTIONS(144), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(106), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(142), 10, - 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, - [1554] = 2, - ACTIONS(146), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(144), 20, + ACTIONS(142), 21, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2387,11 +2587,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, - [1581] = 2, - ACTIONS(150), 2, + anon_sym_end, + [1670] = 2, + ACTIONS(148), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(148), 20, + ACTIONS(146), 21, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2412,11 +2613,43 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, - [1608] = 2, + anon_sym_end, + [1698] = 7, + ACTIONS(128), 1, + anon_sym_AMP, + ACTIONS(130), 1, + anon_sym_PIPE, + ACTIONS(120), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(126), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(124), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(150), 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(154), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(152), 20, + ACTIONS(152), 21, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2437,11 +2670,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, - [1635] = 2, + anon_sym_end, + [1764] = 2, ACTIONS(158), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(156), 20, + ACTIONS(156), 21, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2462,41 +2696,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, - [1662] = 7, - ACTIONS(110), 1, - anon_sym_AMP, - ACTIONS(112), 1, - anon_sym_PIPE, - ACTIONS(102), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(104), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(108), 2, + anon_sym_end, + [1792] = 2, + ACTIONS(162), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(106), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(160), 10, - 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, - [1699] = 2, - ACTIONS(164), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(162), 20, + ACTIONS(160), 21, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2517,38 +2722,44 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, - [1726] = 4, - ACTIONS(102), 2, + anon_sym_end, + [1820] = 8, + ACTIONS(128), 1, + anon_sym_AMP, + ACTIONS(130), 1, + anon_sym_PIPE, + ACTIONS(166), 1, + anon_sym_else, + ACTIONS(120), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(104), 2, + ACTIONS(122), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(130), 2, + ACTIONS(126), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(116), 16, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, + ACTIONS(124), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, + ACTIONS(164), 10, + 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, - [1757] = 2, - ACTIONS(130), 2, + anon_sym_end, + [1860] = 2, + ACTIONS(170), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(116), 20, + ACTIONS(168), 21, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2569,40 +2780,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, - [1784] = 6, - ACTIONS(110), 1, - anon_sym_AMP, - ACTIONS(102), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(104), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(108), 2, + anon_sym_end, + [1888] = 2, + ACTIONS(174), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(106), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(116), 11, - 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, - [1819] = 2, - ACTIONS(168), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(166), 20, + ACTIONS(172), 21, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2623,11 +2806,43 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, - [1846] = 2, - ACTIONS(172), 2, + anon_sym_end, + [1916] = 7, + ACTIONS(128), 1, + anon_sym_AMP, + ACTIONS(130), 1, + anon_sym_PIPE, + ACTIONS(120), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(126), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(170), 20, + ACTIONS(124), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(176), 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, + [1954] = 2, + ACTIONS(180), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(178), 21, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2648,26 +2863,27 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, - [1873] = 7, - ACTIONS(110), 1, + anon_sym_end, + [1982] = 7, + ACTIONS(128), 1, anon_sym_AMP, - ACTIONS(112), 1, + ACTIONS(130), 1, anon_sym_PIPE, - ACTIONS(102), 2, + ACTIONS(120), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(104), 2, + ACTIONS(122), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(108), 2, + ACTIONS(126), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(106), 4, + ACTIONS(124), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - ACTIONS(174), 10, + ACTIONS(182), 11, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2678,635 +2894,1048 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_else, anon_sym_do, anon_sym_to, - [1910] = 7, - ACTIONS(110), 1, - anon_sym_AMP, - ACTIONS(112), 1, - anon_sym_PIPE, - ACTIONS(102), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(104), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(108), 2, + anon_sym_end, + [2020] = 2, + ACTIONS(186), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(106), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(176), 10, + ACTIONS(184), 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, - [1947] = 9, - ACTIONS(110), 1, - anon_sym_AMP, - ACTIONS(112), 1, - anon_sym_PIPE, - ACTIONS(178), 1, - anon_sym_RPAREN, - ACTIONS(180), 1, - anon_sym_SEMI, - STATE(72), 1, - aux_sym_sequence_expression_repeat1, - ACTIONS(102), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(104), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(108), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(106), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [1981] = 9, - ACTIONS(110), 1, - anon_sym_AMP, - ACTIONS(112), 1, - anon_sym_PIPE, - ACTIONS(182), 1, - anon_sym_COMMA, - ACTIONS(184), 1, - anon_sym_RPAREN, - STATE(70), 1, - aux_sym_function_call_repeat1, - ACTIONS(102), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(104), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(108), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(106), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2015] = 9, - ACTIONS(110), 1, - anon_sym_AMP, - ACTIONS(112), 1, - anon_sym_PIPE, - ACTIONS(186), 1, - anon_sym_COMMA, - ACTIONS(188), 1, - anon_sym_RBRACE, - STATE(74), 1, - aux_sym_record_expression_repeat1, - ACTIONS(102), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(104), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(108), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(106), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2049] = 7, - ACTIONS(110), 1, - anon_sym_AMP, - ACTIONS(112), 1, - anon_sym_PIPE, - ACTIONS(102), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(104), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(108), 2, - anon_sym_LT, - anon_sym_GT, + anon_sym_end, + [2048] = 2, ACTIONS(190), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(188), 21, + ts_builtin_sym_end, + anon_sym_RBRACK, anon_sym_COMMA, anon_sym_RPAREN, - ACTIONS(106), 4, + 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, - [2078] = 7, - ACTIONS(110), 1, anon_sym_AMP, - ACTIONS(112), 1, anon_sym_PIPE, - ACTIONS(102), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(104), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(108), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(192), 2, - anon_sym_COMMA, - anon_sym_RBRACE, - ACTIONS(106), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2107] = 7, - ACTIONS(110), 1, - anon_sym_AMP, - ACTIONS(112), 1, - anon_sym_PIPE, - ACTIONS(102), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(104), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(108), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(194), 2, - anon_sym_RPAREN, anon_sym_SEMI, - ACTIONS(106), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2136] = 7, - ACTIONS(110), 1, - anon_sym_AMP, - ACTIONS(112), 1, - anon_sym_PIPE, - ACTIONS(196), 1, + anon_sym_RBRACE, anon_sym_then, - ACTIONS(102), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(104), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(108), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(106), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2164] = 7, - ACTIONS(110), 1, - anon_sym_AMP, - ACTIONS(112), 1, - anon_sym_PIPE, - ACTIONS(198), 1, - ts_builtin_sym_end, - ACTIONS(102), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(104), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(108), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(106), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2192] = 7, - ACTIONS(110), 1, - anon_sym_AMP, - ACTIONS(112), 1, - anon_sym_PIPE, - ACTIONS(200), 1, + anon_sym_else, + anon_sym_do, anon_sym_to, - ACTIONS(102), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(104), 2, + anon_sym_end, + [2076] = 3, + ACTIONS(122), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(108), 2, + ACTIONS(194), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(106), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2220] = 7, - ACTIONS(110), 1, - anon_sym_AMP, - ACTIONS(112), 1, - anon_sym_PIPE, - ACTIONS(202), 1, - anon_sym_RBRACK, - ACTIONS(102), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(104), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(108), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(106), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2248] = 7, - ACTIONS(110), 1, - anon_sym_AMP, - ACTIONS(112), 1, - anon_sym_PIPE, - ACTIONS(204), 1, - anon_sym_RBRACK, - ACTIONS(102), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(104), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(108), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(106), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2276] = 7, - ACTIONS(110), 1, - anon_sym_AMP, - ACTIONS(112), 1, - anon_sym_PIPE, - ACTIONS(206), 1, - anon_sym_do, - ACTIONS(102), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(104), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(108), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(106), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2304] = 7, - ACTIONS(110), 1, - anon_sym_AMP, - ACTIONS(112), 1, - anon_sym_PIPE, - ACTIONS(208), 1, - anon_sym_do, - ACTIONS(102), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(104), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(108), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(106), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2332] = 3, - ACTIONS(210), 1, - anon_sym_DQUOTE, - STATE(68), 1, - aux_sym_string_literal_repeat1, - ACTIONS(212), 2, - aux_sym_string_literal_token1, - sym_escape_sequence, - [2343] = 3, - ACTIONS(214), 1, - anon_sym_DQUOTE, - STATE(67), 1, - aux_sym_string_literal_repeat1, - ACTIONS(216), 2, - aux_sym_string_literal_token1, - sym_escape_sequence, - [2354] = 3, - ACTIONS(219), 1, - anon_sym_DQUOTE, - STATE(67), 1, - aux_sym_string_literal_repeat1, - ACTIONS(221), 2, - aux_sym_string_literal_token1, - sym_escape_sequence, - [2365] = 3, - ACTIONS(223), 1, - anon_sym_COMMA, - ACTIONS(226), 1, - anon_sym_RBRACE, - STATE(69), 1, - aux_sym_record_expression_repeat1, - [2375] = 3, - ACTIONS(182), 1, - anon_sym_COMMA, - ACTIONS(228), 1, - anon_sym_RPAREN, - STATE(73), 1, - aux_sym_function_call_repeat1, - [2385] = 3, - ACTIONS(194), 1, - anon_sym_RPAREN, - ACTIONS(230), 1, - anon_sym_SEMI, - STATE(71), 1, - aux_sym_sequence_expression_repeat1, - [2395] = 3, - ACTIONS(180), 1, - anon_sym_SEMI, - ACTIONS(233), 1, - anon_sym_RPAREN, - STATE(71), 1, - aux_sym_sequence_expression_repeat1, - [2405] = 3, - ACTIONS(190), 1, - anon_sym_RPAREN, - ACTIONS(235), 1, - anon_sym_COMMA, - STATE(73), 1, - aux_sym_function_call_repeat1, - [2415] = 3, - ACTIONS(186), 1, - anon_sym_COMMA, - ACTIONS(238), 1, - anon_sym_RBRACE, - STATE(69), 1, - aux_sym_record_expression_repeat1, - [2425] = 2, - ACTIONS(240), 1, - sym_identifier, - ACTIONS(242), 1, - anon_sym_RBRACE, - [2432] = 1, - ACTIONS(244), 1, - anon_sym_EQ, - [2436] = 1, - ACTIONS(246), 1, - anon_sym_EQ, - [2440] = 1, - ACTIONS(248), 1, - anon_sym_of, - [2444] = 1, - ACTIONS(250), 1, - anon_sym_COLON_EQ, - [2448] = 1, - ACTIONS(252), 1, - sym_identifier, - [2452] = 1, - ACTIONS(254), 1, - sym_identifier, - [2456] = 1, - ACTIONS(256), 1, + ACTIONS(192), 19, ts_builtin_sym_end, - [2460] = 1, - ACTIONS(258), 1, + 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, + [2106] = 2, + ACTIONS(194), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(192), 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, + [2134] = 4, + ACTIONS(120), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(194), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(192), 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, + [2166] = 5, + ACTIONS(120), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(126), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(124), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(192), 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, + [2200] = 6, + ACTIONS(128), 1, + anon_sym_AMP, + ACTIONS(120), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(126), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(124), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(192), 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, + [2236] = 2, + ACTIONS(198), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(196), 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, + [2264] = 2, + ACTIONS(202), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(200), 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, + [2292] = 2, + ACTIONS(206), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(204), 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, + [2320] = 2, + ACTIONS(210), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(208), 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, + [2348] = 9, + ACTIONS(128), 1, + anon_sym_AMP, + ACTIONS(130), 1, + anon_sym_PIPE, + ACTIONS(212), 1, + anon_sym_SEMI, + ACTIONS(214), 1, + anon_sym_end, + STATE(85), 1, + aux_sym_sequence_expression_repeat1, + ACTIONS(120), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(126), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(124), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2382] = 9, + ACTIONS(128), 1, + anon_sym_AMP, + ACTIONS(130), 1, + anon_sym_PIPE, + ACTIONS(216), 1, + anon_sym_COMMA, + ACTIONS(218), 1, + anon_sym_RBRACE, + STATE(89), 1, + aux_sym_record_expression_repeat1, + ACTIONS(120), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(126), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(124), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2416] = 9, + ACTIONS(128), 1, + anon_sym_AMP, + ACTIONS(130), 1, + anon_sym_PIPE, + ACTIONS(212), 1, + anon_sym_SEMI, + ACTIONS(220), 1, + anon_sym_RPAREN, + STATE(84), 1, + aux_sym_sequence_expression_repeat1, + ACTIONS(120), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(126), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(124), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2450] = 9, + ACTIONS(128), 1, + anon_sym_AMP, + ACTIONS(130), 1, + anon_sym_PIPE, + ACTIONS(222), 1, + anon_sym_COMMA, + ACTIONS(224), 1, + anon_sym_RPAREN, + STATE(83), 1, + aux_sym_function_call_repeat1, + ACTIONS(120), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(126), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(124), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2484] = 7, + ACTIONS(128), 1, + anon_sym_AMP, + ACTIONS(130), 1, + anon_sym_PIPE, + ACTIONS(120), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(126), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(226), 3, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_end, + ACTIONS(124), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2514] = 9, + ACTIONS(128), 1, + anon_sym_AMP, + ACTIONS(130), 1, + anon_sym_PIPE, + ACTIONS(212), 1, + anon_sym_SEMI, + ACTIONS(228), 1, + anon_sym_end, + STATE(88), 1, + aux_sym_sequence_expression_repeat1, + ACTIONS(120), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(126), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(124), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2548] = 7, + ACTIONS(128), 1, + anon_sym_AMP, + ACTIONS(130), 1, + anon_sym_PIPE, + ACTIONS(120), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(126), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(230), 2, + anon_sym_COMMA, + anon_sym_RBRACE, + ACTIONS(124), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2577] = 7, + ACTIONS(128), 1, + anon_sym_AMP, + ACTIONS(130), 1, + anon_sym_PIPE, + ACTIONS(120), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(126), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(232), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + ACTIONS(124), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2606] = 7, + ACTIONS(128), 1, + anon_sym_AMP, + ACTIONS(130), 1, + anon_sym_PIPE, + ACTIONS(234), 1, + anon_sym_to, + ACTIONS(120), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(126), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(124), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2634] = 7, + ACTIONS(128), 1, + anon_sym_AMP, + ACTIONS(130), 1, + anon_sym_PIPE, + ACTIONS(236), 1, + anon_sym_do, + ACTIONS(120), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(126), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(124), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2662] = 7, + ACTIONS(128), 1, + anon_sym_AMP, + ACTIONS(130), 1, + anon_sym_PIPE, + ACTIONS(238), 1, + anon_sym_RBRACK, + ACTIONS(120), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(126), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(124), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2690] = 7, + ACTIONS(128), 1, + anon_sym_AMP, + ACTIONS(130), 1, + anon_sym_PIPE, + ACTIONS(240), 1, + anon_sym_RBRACK, + ACTIONS(120), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(126), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(124), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2718] = 7, + ACTIONS(128), 1, + anon_sym_AMP, + ACTIONS(130), 1, + anon_sym_PIPE, + ACTIONS(242), 1, + ts_builtin_sym_end, + ACTIONS(120), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(126), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(124), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2746] = 7, + ACTIONS(128), 1, + anon_sym_AMP, + ACTIONS(130), 1, + anon_sym_PIPE, + ACTIONS(244), 1, + anon_sym_do, + ACTIONS(120), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(126), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(124), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2774] = 7, + ACTIONS(128), 1, + anon_sym_AMP, + ACTIONS(130), 1, + anon_sym_PIPE, + ACTIONS(246), 1, + anon_sym_then, + ACTIONS(120), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(122), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(126), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(124), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2802] = 3, + ACTIONS(248), 1, + anon_sym_in, + ACTIONS(250), 1, + anon_sym_import, + STATE(77), 3, + aux_sym__declaration_chunks, + sym__declaration_chunk, + sym_import_declaration, + [2814] = 3, + ACTIONS(250), 1, + anon_sym_import, + ACTIONS(252), 1, + anon_sym_in, + STATE(78), 3, + aux_sym__declaration_chunks, + sym__declaration_chunk, + sym_import_declaration, + [2826] = 3, + ACTIONS(254), 1, + anon_sym_in, + ACTIONS(256), 1, + anon_sym_import, + STATE(78), 3, + aux_sym__declaration_chunks, + sym__declaration_chunk, + sym_import_declaration, + [2838] = 3, + ACTIONS(259), 1, + anon_sym_DQUOTE, + STATE(82), 1, + aux_sym_string_literal_repeat1, + ACTIONS(261), 2, + aux_sym_string_literal_token1, + sym_escape_sequence, + [2849] = 3, + ACTIONS(263), 1, + anon_sym_SEMI, + STATE(80), 1, + aux_sym_sequence_expression_repeat1, + ACTIONS(226), 2, + anon_sym_RPAREN, + anon_sym_end, + [2860] = 3, + ACTIONS(266), 1, + anon_sym_DQUOTE, + STATE(81), 1, + aux_sym_string_literal_repeat1, + ACTIONS(268), 2, + aux_sym_string_literal_token1, + sym_escape_sequence, + [2871] = 3, + ACTIONS(271), 1, + anon_sym_DQUOTE, + STATE(81), 1, + aux_sym_string_literal_repeat1, + ACTIONS(273), 2, + aux_sym_string_literal_token1, + sym_escape_sequence, + [2882] = 3, + ACTIONS(222), 1, + anon_sym_COMMA, + ACTIONS(275), 1, + anon_sym_RPAREN, + STATE(87), 1, + aux_sym_function_call_repeat1, + [2892] = 3, + ACTIONS(212), 1, + anon_sym_SEMI, + ACTIONS(277), 1, + anon_sym_RPAREN, + STATE(80), 1, + aux_sym_sequence_expression_repeat1, + [2902] = 3, + ACTIONS(212), 1, + anon_sym_SEMI, + ACTIONS(279), 1, + anon_sym_end, + STATE(80), 1, + aux_sym_sequence_expression_repeat1, + [2912] = 3, + ACTIONS(281), 1, + anon_sym_COMMA, + ACTIONS(284), 1, + anon_sym_RBRACE, + STATE(86), 1, + aux_sym_record_expression_repeat1, + [2922] = 3, + ACTIONS(232), 1, + anon_sym_RPAREN, + ACTIONS(286), 1, + anon_sym_COMMA, + STATE(87), 1, + aux_sym_function_call_repeat1, + [2932] = 3, + ACTIONS(212), 1, + anon_sym_SEMI, + ACTIONS(289), 1, + anon_sym_end, + STATE(80), 1, + aux_sym_sequence_expression_repeat1, + [2942] = 3, + ACTIONS(216), 1, + anon_sym_COMMA, + ACTIONS(291), 1, + anon_sym_RBRACE, + STATE(86), 1, + aux_sym_record_expression_repeat1, + [2952] = 2, + ACTIONS(293), 1, sym_identifier, + ACTIONS(295), 1, + anon_sym_RBRACE, + [2959] = 1, + ACTIONS(297), 2, + anon_sym_in, + anon_sym_import, + [2964] = 2, + ACTIONS(7), 1, + anon_sym_DQUOTE, + STATE(91), 1, + sym_string_literal, + [2971] = 1, + ACTIONS(299), 1, + anon_sym_of, + [2975] = 1, + ACTIONS(301), 1, + sym_identifier, + [2979] = 1, + ACTIONS(303), 1, + anon_sym_EQ, + [2983] = 1, + ACTIONS(305), 1, + anon_sym_COLON_EQ, + [2987] = 1, + ACTIONS(307), 1, + ts_builtin_sym_end, + [2991] = 1, + ACTIONS(309), 1, + sym_identifier, + [2995] = 1, + ACTIONS(311), 1, + sym_identifier, + [2999] = 1, + ACTIONS(313), 1, + anon_sym_EQ, }; static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(2)] = 0, - [SMALL_STATE(3)] = 38, - [SMALL_STATE(4)] = 87, - [SMALL_STATE(5)] = 136, - [SMALL_STATE(6)] = 182, - [SMALL_STATE(7)] = 228, - [SMALL_STATE(8)] = 274, - [SMALL_STATE(9)] = 320, - [SMALL_STATE(10)] = 366, - [SMALL_STATE(11)] = 412, - [SMALL_STATE(12)] = 458, - [SMALL_STATE(13)] = 494, - [SMALL_STATE(14)] = 524, - [SMALL_STATE(15)] = 570, - [SMALL_STATE(16)] = 616, - [SMALL_STATE(17)] = 646, - [SMALL_STATE(18)] = 692, - [SMALL_STATE(19)] = 738, - [SMALL_STATE(20)] = 784, - [SMALL_STATE(21)] = 830, - [SMALL_STATE(22)] = 876, - [SMALL_STATE(23)] = 922, - [SMALL_STATE(24)] = 968, - [SMALL_STATE(25)] = 1014, - [SMALL_STATE(26)] = 1060, - [SMALL_STATE(27)] = 1106, - [SMALL_STATE(28)] = 1152, - [SMALL_STATE(29)] = 1198, - [SMALL_STATE(30)] = 1244, - [SMALL_STATE(31)] = 1283, - [SMALL_STATE(32)] = 1316, - [SMALL_STATE(33)] = 1343, - [SMALL_STATE(34)] = 1370, - [SMALL_STATE(35)] = 1397, - [SMALL_STATE(36)] = 1426, - [SMALL_STATE(37)] = 1463, - [SMALL_STATE(38)] = 1490, - [SMALL_STATE(39)] = 1517, - [SMALL_STATE(40)] = 1554, - [SMALL_STATE(41)] = 1581, - [SMALL_STATE(42)] = 1608, - [SMALL_STATE(43)] = 1635, - [SMALL_STATE(44)] = 1662, - [SMALL_STATE(45)] = 1699, - [SMALL_STATE(46)] = 1726, - [SMALL_STATE(47)] = 1757, - [SMALL_STATE(48)] = 1784, - [SMALL_STATE(49)] = 1819, - [SMALL_STATE(50)] = 1846, - [SMALL_STATE(51)] = 1873, - [SMALL_STATE(52)] = 1910, - [SMALL_STATE(53)] = 1947, - [SMALL_STATE(54)] = 1981, - [SMALL_STATE(55)] = 2015, - [SMALL_STATE(56)] = 2049, - [SMALL_STATE(57)] = 2078, - [SMALL_STATE(58)] = 2107, - [SMALL_STATE(59)] = 2136, - [SMALL_STATE(60)] = 2164, - [SMALL_STATE(61)] = 2192, - [SMALL_STATE(62)] = 2220, - [SMALL_STATE(63)] = 2248, - [SMALL_STATE(64)] = 2276, - [SMALL_STATE(65)] = 2304, - [SMALL_STATE(66)] = 2332, - [SMALL_STATE(67)] = 2343, - [SMALL_STATE(68)] = 2354, - [SMALL_STATE(69)] = 2365, - [SMALL_STATE(70)] = 2375, - [SMALL_STATE(71)] = 2385, - [SMALL_STATE(72)] = 2395, - [SMALL_STATE(73)] = 2405, - [SMALL_STATE(74)] = 2415, - [SMALL_STATE(75)] = 2425, - [SMALL_STATE(76)] = 2432, - [SMALL_STATE(77)] = 2436, - [SMALL_STATE(78)] = 2440, - [SMALL_STATE(79)] = 2444, - [SMALL_STATE(80)] = 2448, - [SMALL_STATE(81)] = 2452, - [SMALL_STATE(82)] = 2456, - [SMALL_STATE(83)] = 2460, + [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)] = 1413, + [SMALL_STATE(32)] = 1450, + [SMALL_STATE(33)] = 1480, + [SMALL_STATE(34)] = 1510, + [SMALL_STATE(35)] = 1548, + [SMALL_STATE(36)] = 1586, + [SMALL_STATE(37)] = 1614, + [SMALL_STATE(38)] = 1642, + [SMALL_STATE(39)] = 1670, + [SMALL_STATE(40)] = 1698, + [SMALL_STATE(41)] = 1736, + [SMALL_STATE(42)] = 1764, + [SMALL_STATE(43)] = 1792, + [SMALL_STATE(44)] = 1820, + [SMALL_STATE(45)] = 1860, + [SMALL_STATE(46)] = 1888, + [SMALL_STATE(47)] = 1916, + [SMALL_STATE(48)] = 1954, + [SMALL_STATE(49)] = 1982, + [SMALL_STATE(50)] = 2020, + [SMALL_STATE(51)] = 2048, + [SMALL_STATE(52)] = 2076, + [SMALL_STATE(53)] = 2106, + [SMALL_STATE(54)] = 2134, + [SMALL_STATE(55)] = 2166, + [SMALL_STATE(56)] = 2200, + [SMALL_STATE(57)] = 2236, + [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)] = 2514, + [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)] = 2814, + [SMALL_STATE(78)] = 2826, + [SMALL_STATE(79)] = 2838, + [SMALL_STATE(80)] = 2849, + [SMALL_STATE(81)] = 2860, + [SMALL_STATE(82)] = 2871, + [SMALL_STATE(83)] = 2882, + [SMALL_STATE(84)] = 2892, + [SMALL_STATE(85)] = 2902, + [SMALL_STATE(86)] = 2912, + [SMALL_STATE(87)] = 2922, + [SMALL_STATE(88)] = 2932, + [SMALL_STATE(89)] = 2942, + [SMALL_STATE(90)] = 2952, + [SMALL_STATE(91)] = 2959, + [SMALL_STATE(92)] = 2964, + [SMALL_STATE(93)] = 2971, + [SMALL_STATE(94)] = 2975, + [SMALL_STATE(95)] = 2979, + [SMALL_STATE(96)] = 2983, + [SMALL_STATE(97)] = 2987, + [SMALL_STATE(98)] = 2991, + [SMALL_STATE(99)] = 2995, + [SMALL_STATE(100)] = 2999, }; static const TSParseActionEntry ts_parse_actions[] = { [0] = {.entry = {.count = 0, .reusable = false}}, [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), - [3] = {.entry = {.count = 1, .reusable = false}}, SHIFT(2), - [5] = {.entry = {.count = 1, .reusable = false}}, SHIFT(60), - [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), - [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), - [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), - [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(7), - [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(8), - [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(80), - [19] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__lvalue, 1), - [21] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__lvalue, 1), SHIFT(15), - [24] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [26] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__lvalue, 1), - [28] = {.entry = {.count = 1, .reusable = true}}, SHIFT(75), - [30] = {.entry = {.count = 1, .reusable = false}}, SHIFT(54), - [32] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), - [34] = {.entry = {.count = 1, .reusable = false}}, SHIFT(53), - [36] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), - [38] = {.entry = {.count = 1, .reusable = false}}, SHIFT(52), - [40] = {.entry = {.count = 1, .reusable = false}}, SHIFT(58), - [42] = {.entry = {.count = 1, .reusable = false}}, SHIFT(59), + [3] = {.entry = {.count = 1, .reusable = false}}, SHIFT(4), + [5] = {.entry = {.count = 1, .reusable = false}}, SHIFT(73), + [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(79), + [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), + [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(14), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(9), + [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(99), + [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(76), + [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(61), + [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(48), + [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(66), + [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(37), + [29] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__lvalue, 1), + [31] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__lvalue, 1), SHIFT(17), + [34] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), + [36] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__lvalue, 1), + [38] = {.entry = {.count = 1, .reusable = true}}, SHIFT(90), + [40] = {.entry = {.count = 1, .reusable = false}}, SHIFT(63), + [42] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), [44] = {.entry = {.count = 1, .reusable = false}}, SHIFT(64), - [46] = {.entry = {.count = 1, .reusable = false}}, SHIFT(56), - [48] = {.entry = {.count = 1, .reusable = false}}, SHIFT(57), - [50] = {.entry = {.count = 1, .reusable = false}}, SHIFT(51), - [52] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr, 1), - [54] = {.entry = {.count = 1, .reusable = true}}, SHIFT(81), - [56] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), - [58] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr, 1), - [60] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), - [62] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_value, 3, .production_id = 5), - [64] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_value, 3, .production_id = 5), - [66] = {.entry = {.count = 1, .reusable = false}}, SHIFT(39), - [68] = {.entry = {.count = 1, .reusable = false}}, SHIFT(63), - [70] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_value, 4, .production_id = 10), - [72] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_value, 4, .production_id = 10), - [74] = {.entry = {.count = 1, .reusable = false}}, SHIFT(36), - [76] = {.entry = {.count = 1, .reusable = false}}, SHIFT(30), - [78] = {.entry = {.count = 1, .reusable = false}}, SHIFT(55), - [80] = {.entry = {.count = 1, .reusable = false}}, SHIFT(44), - [82] = {.entry = {.count = 1, .reusable = false}}, SHIFT(61), - [84] = {.entry = {.count = 1, .reusable = false}}, SHIFT(50), - [86] = {.entry = {.count = 1, .reusable = false}}, SHIFT(35), - [88] = {.entry = {.count = 1, .reusable = false}}, SHIFT(47), - [90] = {.entry = {.count = 1, .reusable = false}}, SHIFT(46), - [92] = {.entry = {.count = 1, .reusable = false}}, SHIFT(31), - [94] = {.entry = {.count = 1, .reusable = false}}, SHIFT(48), - [96] = {.entry = {.count = 1, .reusable = false}}, SHIFT(65), - [98] = {.entry = {.count = 1, .reusable = false}}, SHIFT(62), - [100] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_expression, 4, .production_id = 8), - [102] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), - [104] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), - [106] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), - [108] = {.entry = {.count = 1, .reusable = false}}, SHIFT(25), - [110] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), - [112] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), - [114] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), - [116] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, .production_id = 4), - [118] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 6, .production_id = 13), - [120] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 6, .production_id = 13), - [122] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 5, .production_id = 11), - [124] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 5, .production_id = 11), - [126] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 3, .production_id = 2), - [128] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 3, .production_id = 2), - [130] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, .production_id = 4), - [132] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_expression, 4, .production_id = 9), - [134] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 3, .production_id = 3), - [136] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 3, .production_id = 3), - [138] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 3), - [140] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 3), - [142] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_expression, 2, .production_id = 1), - [144] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 4, .production_id = 7), - [146] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 4, .production_id = 7), - [148] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 2), - [150] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 2), - [152] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 3), - [154] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 3), - [156] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 4), - [158] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 4), - [160] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_expression, 6, .production_id = 14), - [162] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 7, .production_id = 15), - [164] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 7, .production_id = 15), - [166] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 2), - [168] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 2), - [170] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment_expression, 3, .production_id = 6), - [172] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment_expression, 3, .production_id = 6), - [174] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_expression, 8, .production_id = 17), - [176] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_expression, 6, .production_id = 12), - [178] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), - [180] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), - [182] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), - [184] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), - [186] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), - [188] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), - [190] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), - [192] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 4, .production_id = 18), - [194] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), - [196] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), - [198] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), - [200] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), - [202] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), - [204] = {.entry = {.count = 1, .reusable = true}}, SHIFT(78), - [206] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), - [208] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), - [210] = {.entry = {.count = 1, .reusable = false}}, SHIFT(49), - [212] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), - [214] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_string_literal_repeat1, 2), - [216] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_string_literal_repeat1, 2), SHIFT_REPEAT(67), - [219] = {.entry = {.count = 1, .reusable = false}}, SHIFT(42), - [221] = {.entry = {.count = 1, .reusable = true}}, SHIFT(67), - [223] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 16), SHIFT_REPEAT(83), - [226] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 16), - [228] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), - [230] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), SHIFT_REPEAT(6), - [233] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), - [235] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), SHIFT_REPEAT(9), - [238] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), - [240] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), - [242] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), - [244] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), - [246] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), - [248] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), - [250] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), - [252] = {.entry = {.count = 1, .reusable = true}}, SHIFT(79), - [254] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), - [256] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [258] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), + [46] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), + [48] = {.entry = {.count = 1, .reusable = false}}, SHIFT(55), + [50] = {.entry = {.count = 1, .reusable = false}}, SHIFT(69), + [52] = {.entry = {.count = 1, .reusable = false}}, SHIFT(74), + [54] = {.entry = {.count = 1, .reusable = false}}, SHIFT(67), + [56] = {.entry = {.count = 1, .reusable = false}}, SHIFT(49), + [58] = {.entry = {.count = 1, .reusable = false}}, SHIFT(68), + [60] = {.entry = {.count = 1, .reusable = false}}, SHIFT(35), + [62] = {.entry = {.count = 1, .reusable = false}}, SHIFT(75), + [64] = {.entry = {.count = 1, .reusable = false}}, SHIFT(40), + [66] = {.entry = {.count = 1, .reusable = false}}, SHIFT(44), + [68] = {.entry = {.count = 1, .reusable = false}}, SHIFT(72), + [70] = {.entry = {.count = 1, .reusable = false}}, SHIFT(65), + [72] = {.entry = {.count = 1, .reusable = false}}, SHIFT(58), + [74] = {.entry = {.count = 1, .reusable = false}}, SHIFT(71), + [76] = {.entry = {.count = 1, .reusable = false}}, SHIFT(47), + [78] = {.entry = {.count = 1, .reusable = false}}, SHIFT(56), + [80] = {.entry = {.count = 1, .reusable = false}}, SHIFT(62), + [82] = {.entry = {.count = 1, .reusable = false}}, SHIFT(70), + [84] = {.entry = {.count = 1, .reusable = false}}, SHIFT(34), + [86] = {.entry = {.count = 1, .reusable = false}}, SHIFT(54), + [88] = {.entry = {.count = 1, .reusable = false}}, SHIFT(52), + [90] = {.entry = {.count = 1, .reusable = false}}, SHIFT(53), + [92] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_value, 4, .production_id = 13), + [94] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_value, 4, .production_id = 13), + [96] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_value, 3, .production_id = 6), + [98] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_value, 3, .production_id = 6), + [100] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr, 1), + [102] = {.entry = {.count = 1, .reusable = true}}, SHIFT(98), + [104] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), + [106] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr, 1), + [108] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), + [110] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 2), + [112] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 2), + [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_if_expression, 6, .production_id = 19), + [120] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), + [122] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), + [124] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), + [126] = {.entry = {.count = 1, .reusable = false}}, SHIFT(26), + [128] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), + [130] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [132] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_expression, 2, .production_id = 1), + [134] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 2), + [136] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 2), + [138] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 4, .production_id = 12), + [140] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 4, .production_id = 12), + [142] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 3, .production_id = 2), + [144] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 3, .production_id = 2), + [146] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 4, .production_id = 11), + [148] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 4, .production_id = 11), + [150] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_expression, 4, .production_id = 10), + [152] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 3, .production_id = 3), + [154] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 3, .production_id = 3), + [156] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 3), + [158] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 3), + [160] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 6, .production_id = 18), + [162] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 6, .production_id = 18), + [164] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_expression, 4, .production_id = 9), + [166] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), + [168] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 5, .production_id = 14), + [170] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 5, .production_id = 14), + [172] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 5, .production_id = 15), + [174] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 5, .production_id = 15), + [176] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_expression, 6, .production_id = 17), + [178] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 3), + [180] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 3), + [182] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_expression, 8, .production_id = 23), + [184] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 4), + [186] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 4), + [188] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 6, .production_id = 20), + [190] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 6, .production_id = 20), + [192] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, .production_id = 5), + [194] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, .production_id = 5), + [196] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 5, .production_id = 16), + [198] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 5, .production_id = 16), + [200] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment_expression, 3, .production_id = 7), + [202] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment_expression, 3, .production_id = 7), + [204] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 7, .production_id = 21), + [206] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 7, .production_id = 21), + [208] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 4, .production_id = 8), + [210] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 4, .production_id = 8), + [212] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), + [214] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), + [216] = {.entry = {.count = 1, .reusable = true}}, SHIFT(94), + [218] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), + [220] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), + [222] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), + [224] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), + [226] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), + [228] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), + [230] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 4, .production_id = 24), + [232] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), + [234] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [236] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), + [238] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), + [240] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), + [242] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), + [244] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), + [246] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), + [248] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), + [250] = {.entry = {.count = 1, .reusable = true}}, SHIFT(92), + [252] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), + [254] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), + [256] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(92), + [259] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32), + [261] = {.entry = {.count = 1, .reusable = true}}, SHIFT(82), + [263] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), SHIFT_REPEAT(18), + [266] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_string_literal_repeat1, 2), + [268] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_string_literal_repeat1, 2), SHIFT_REPEAT(81), + [271] = {.entry = {.count = 1, .reusable = false}}, SHIFT(33), + [273] = {.entry = {.count = 1, .reusable = true}}, SHIFT(81), + [275] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), + [277] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), + [279] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), + [281] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 22), SHIFT_REPEAT(94), + [284] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 22), + [286] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), SHIFT_REPEAT(12), + [289] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), + [291] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), + [293] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), + [295] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), + [297] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_declaration, 2, .production_id = 4), + [299] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [301] = {.entry = {.count = 1, .reusable = true}}, SHIFT(95), + [303] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), + [305] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), + [307] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [309] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), + [311] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), + [313] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), }; #ifdef __cplusplus diff --git a/test/corpus/let_expressions.txt b/test/corpus/let_expressions.txt new file mode 100644 index 0000000..b04fb69 --- /dev/null +++ b/test/corpus/let_expressions.txt @@ -0,0 +1,123 @@ +================================================================================ +Let expression +================================================================================ + +let + import "a.tih" +in + 12 +end + +-------------------------------------------------------------------------------- + +(source_file + (let_expression + declarations: (import_declaration + file: (string_literal)) + body: (integer_literal))) + +================================================================================ +Let multiple declarations +================================================================================ + +let + import "a.tih" + import "b.tih" +in + 12 +end + +-------------------------------------------------------------------------------- + +(source_file + (let_expression + declarations: (import_declaration + file: (string_literal)) + declarations: (import_declaration + file: (string_literal)) + body: (integer_literal))) + +================================================================================ +Let multiple expressions +================================================================================ + +let + import "a.tih" +in + 12; + 27 +end + +-------------------------------------------------------------------------------- + +(source_file + (let_expression + declarations: (import_declaration + file: (string_literal)) + body: (integer_literal) + body: (integer_literal))) + +================================================================================ +Let multiple expressions and declarations +================================================================================ + +let + import "a.tih" + import "b.tih" +in + 12; + 27 +end + +-------------------------------------------------------------------------------- + +(source_file + (let_expression + declarations: (import_declaration + file: (string_literal)) + declarations: (import_declaration + file: (string_literal)) + body: (integer_literal) + body: (integer_literal))) + +================================================================================ +Let empty declarations +================================================================================ + +let +in + 42 +end + +-------------------------------------------------------------------------------- + +(source_file + (let_expression + body: (integer_literal))) + +================================================================================ +Let empty expressions +================================================================================ + +let + import "a.tih" +in +end + +-------------------------------------------------------------------------------- + +(source_file + (let_expression + declarations: (import_declaration + file: (string_literal)))) + +================================================================================ +Let empty +================================================================================ + +let in end + +-------------------------------------------------------------------------------- + +(source_file + (let_expression))