diff --git a/grammar.js b/grammar.js index c97fcbb..09c0467 100644 --- a/grammar.js +++ b/grammar.js @@ -226,9 +226,41 @@ module.exports = grammar({ _declaration_chunks: ($) => repeat1($._declaration_chunk), - _declaration_chunk: ($) => choice( - $.variable_declaration, - $.import_declaration, + _declaration_chunk: ($) => prec.left( + choice( + repeat1(choice($.function_declaration, $.primitive_declaration)), + $.variable_declaration, + $.import_declaration, + ), + ), + + function_declaration: ($) => seq( + "function", + $._function_declaration_common, + "=", + field("body", $._expr), + ), + + primitive_declaration: ($) => seq( + "primitive", + $._function_declaration_common, + ), + + _function_declaration_common: ($) => seq( + field("name", $.identifier), + field("parameters", $.parameters), + ), + + parameters: ($) => seq( + "(", + field("parameters", sepBy(",", $._typed_field)), + ")", + ), + + _typed_field: ($) => seq( + field("name", $.identifier), + ":", + field("type", $.identifier), ), variable_declaration: ($) => seq( diff --git a/src/grammar.json b/src/grammar.json index 8539e27..e83adc5 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -1040,15 +1040,169 @@ } }, "_declaration_chunk": { - "type": "CHOICE", + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "CHOICE", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "function_declaration" + }, + { + "type": "SYMBOL", + "name": "primitive_declaration" + } + ] + } + }, + { + "type": "SYMBOL", + "name": "variable_declaration" + }, + { + "type": "SYMBOL", + "name": "import_declaration" + } + ] + } + }, + "function_declaration": { + "type": "SEQ", "members": [ { - "type": "SYMBOL", - "name": "variable_declaration" + "type": "STRING", + "value": "function" }, { "type": "SYMBOL", - "name": "import_declaration" + "name": "_function_declaration_common" + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_expr" + } + } + ] + }, + "primitive_declaration": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "primitive" + }, + { + "type": "SYMBOL", + "name": "_function_declaration_common" + } + ] + }, + "_function_declaration_common": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "FIELD", + "name": "parameters", + "content": { + "type": "SYMBOL", + "name": "parameters" + } + } + ] + }, + "parameters": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "parameters", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_typed_field" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_typed_field" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "_typed_field": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "identifier" + } } ] }, diff --git a/src/node-types.json b/src/node-types.json index db64ba0..e6dec66 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -895,6 +895,110 @@ } } }, + { + "type": "function_declaration", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "array_expression", + "named": true + }, + { + "type": "array_value", + "named": true + }, + { + "type": "assignment_expression", + "named": true + }, + { + "type": "binary_expression", + "named": true + }, + { + "type": "break_expression", + "named": true + }, + { + "type": "for_expression", + "named": true + }, + { + "type": "function_call", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "if_expression", + "named": true + }, + { + "type": "integer_literal", + "named": true + }, + { + "type": "let_expression", + "named": true + }, + { + "type": "nil_literal", + "named": true + }, + { + "type": "record_expression", + "named": true + }, + { + "type": "record_value", + "named": true + }, + { + "type": "sequence_expression", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "unary_expression", + "named": true + }, + { + "type": "while_expression", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "parameters": { + "multiple": false, + "required": true, + "types": [ + { + "type": "parameters", + "named": true + } + ] + } + } + }, { "type": "if_expression", "named": true, @@ -1241,10 +1345,18 @@ "multiple": true, "required": false, "types": [ + { + "type": "function_declaration", + "named": true + }, { "type": "import_declaration", "named": true }, + { + "type": "primitive_declaration", + "named": true + }, { "type": "variable_declaration", "named": true @@ -1253,6 +1365,76 @@ } } }, + { + "type": "parameters", + "named": true, + "fields": { + "name": { + "multiple": true, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "parameters": { + "multiple": true, + "required": false, + "types": [ + { + "type": ",", + "named": false + }, + { + "type": ":", + "named": false + }, + { + "type": "identifier", + "named": true + } + ] + }, + "type": { + "multiple": true, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + } + }, + { + "type": "primitive_declaration", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "parameters": { + "multiple": false, + "required": true, + "types": [ + { + "type": "parameters", + "named": true + } + ] + } + } + }, { "type": "record_expression", "named": true, @@ -1510,6 +1692,10 @@ "type": "function_call", "named": true }, + { + "type": "function_declaration", + "named": true + }, { "type": "identifier", "named": true @@ -1534,6 +1720,10 @@ "type": "nil_literal", "named": true }, + { + "type": "primitive_declaration", + "named": true + }, { "type": "record_expression", "named": true @@ -2008,6 +2198,10 @@ "type": "for", "named": false }, + { + "type": "function", + "named": false + }, { "type": "identifier", "named": true @@ -2044,6 +2238,10 @@ "type": "operator", "named": true }, + { + "type": "primitive", + "named": false + }, { "type": "then", "named": false diff --git a/src/parser.c b/src/parser.c index af91a54..e8cb56b 100644 --- a/src/parser.c +++ b/src/parser.c @@ -6,15 +6,15 @@ #endif #define LANGUAGE_VERSION 13 -#define STATE_COUNT 110 +#define STATE_COUNT 131 #define LARGE_STATE_COUNT 2 -#define SYMBOL_COUNT 69 +#define SYMBOL_COUNT 78 #define ALIAS_COUNT 0 -#define TOKEN_COUNT 44 +#define TOKEN_COUNT 46 #define EXTERNAL_TOKEN_COUNT 0 -#define FIELD_COUNT 23 +#define FIELD_COUNT 24 #define MAX_ALIAS_SEQUENCE_LENGTH 8 -#define PRODUCTION_ID_COUNT 27 +#define PRODUCTION_ID_COUNT 35 enum { sym_identifier = 1, @@ -57,34 +57,43 @@ enum { anon_sym_let = 38, anon_sym_in = 39, anon_sym_end = 40, - anon_sym_var = 41, - anon_sym_COLON = 42, - anon_sym_import = 43, - sym_source_file = 44, - sym__expr = 45, - sym_string_literal = 46, - sym__lvalue = 47, - sym_record_value = 48, - sym_array_value = 49, - sym_function_call = 50, - sym_unary_expression = 51, - sym_binary_expression = 52, - sym_sequence_expression = 53, - sym_array_expression = 54, - sym_record_expression = 55, - sym_assignment_expression = 56, - sym_if_expression = 57, - sym_while_expression = 58, - sym_for_expression = 59, - sym_let_expression = 60, - aux_sym__declaration_chunks = 61, - sym__declaration_chunk = 62, - sym_variable_declaration = 63, - sym_import_declaration = 64, - aux_sym_string_literal_repeat1 = 65, - aux_sym_function_call_repeat1 = 66, - aux_sym_sequence_expression_repeat1 = 67, - aux_sym_record_expression_repeat1 = 68, + anon_sym_function = 41, + anon_sym_primitive = 42, + anon_sym_COLON = 43, + anon_sym_var = 44, + anon_sym_import = 45, + sym_source_file = 46, + sym__expr = 47, + sym_string_literal = 48, + sym__lvalue = 49, + sym_record_value = 50, + sym_array_value = 51, + sym_function_call = 52, + sym_unary_expression = 53, + sym_binary_expression = 54, + sym_sequence_expression = 55, + sym_array_expression = 56, + sym_record_expression = 57, + sym_assignment_expression = 58, + sym_if_expression = 59, + sym_while_expression = 60, + sym_for_expression = 61, + sym_let_expression = 62, + aux_sym__declaration_chunks = 63, + sym__declaration_chunk = 64, + sym_function_declaration = 65, + sym_primitive_declaration = 66, + sym__function_declaration_common = 67, + sym_parameters = 68, + sym__typed_field = 69, + sym_variable_declaration = 70, + sym_import_declaration = 71, + aux_sym_string_literal_repeat1 = 72, + aux_sym_function_call_repeat1 = 73, + aux_sym_sequence_expression_repeat1 = 74, + aux_sym_record_expression_repeat1 = 75, + aux_sym__declaration_chunk_repeat1 = 76, + aux_sym_parameters_repeat1 = 77, }; static const char * const ts_symbol_names[] = { @@ -129,8 +138,10 @@ static const char * const ts_symbol_names[] = { [anon_sym_let] = "let", [anon_sym_in] = "in", [anon_sym_end] = "end", - [anon_sym_var] = "var", + [anon_sym_function] = "function", + [anon_sym_primitive] = "primitive", [anon_sym_COLON] = ":", + [anon_sym_var] = "var", [anon_sym_import] = "import", [sym_source_file] = "source_file", [sym__expr] = "_expr", @@ -151,12 +162,19 @@ static const char * const ts_symbol_names[] = { [sym_let_expression] = "let_expression", [aux_sym__declaration_chunks] = "_declaration_chunks", [sym__declaration_chunk] = "_declaration_chunk", + [sym_function_declaration] = "function_declaration", + [sym_primitive_declaration] = "primitive_declaration", + [sym__function_declaration_common] = "_function_declaration_common", + [sym_parameters] = "parameters", + [sym__typed_field] = "_typed_field", [sym_variable_declaration] = "variable_declaration", [sym_import_declaration] = "import_declaration", [aux_sym_string_literal_repeat1] = "string_literal_repeat1", [aux_sym_function_call_repeat1] = "function_call_repeat1", [aux_sym_sequence_expression_repeat1] = "sequence_expression_repeat1", [aux_sym_record_expression_repeat1] = "record_expression_repeat1", + [aux_sym__declaration_chunk_repeat1] = "_declaration_chunk_repeat1", + [aux_sym_parameters_repeat1] = "parameters_repeat1", }; static const TSSymbol ts_symbol_map[] = { @@ -201,8 +219,10 @@ static const TSSymbol ts_symbol_map[] = { [anon_sym_let] = anon_sym_let, [anon_sym_in] = anon_sym_in, [anon_sym_end] = anon_sym_end, - [anon_sym_var] = anon_sym_var, + [anon_sym_function] = anon_sym_function, + [anon_sym_primitive] = anon_sym_primitive, [anon_sym_COLON] = anon_sym_COLON, + [anon_sym_var] = anon_sym_var, [anon_sym_import] = anon_sym_import, [sym_source_file] = sym_source_file, [sym__expr] = sym__expr, @@ -223,12 +243,19 @@ static const TSSymbol ts_symbol_map[] = { [sym_let_expression] = sym_let_expression, [aux_sym__declaration_chunks] = aux_sym__declaration_chunks, [sym__declaration_chunk] = sym__declaration_chunk, + [sym_function_declaration] = sym_function_declaration, + [sym_primitive_declaration] = sym_primitive_declaration, + [sym__function_declaration_common] = sym__function_declaration_common, + [sym_parameters] = sym_parameters, + [sym__typed_field] = sym__typed_field, [sym_variable_declaration] = sym_variable_declaration, [sym_import_declaration] = sym_import_declaration, [aux_sym_string_literal_repeat1] = aux_sym_string_literal_repeat1, [aux_sym_function_call_repeat1] = aux_sym_function_call_repeat1, [aux_sym_sequence_expression_repeat1] = aux_sym_sequence_expression_repeat1, [aux_sym_record_expression_repeat1] = aux_sym_record_expression_repeat1, + [aux_sym__declaration_chunk_repeat1] = aux_sym__declaration_chunk_repeat1, + [aux_sym_parameters_repeat1] = aux_sym_parameters_repeat1, }; static const TSSymbolMetadata ts_symbol_metadata[] = { @@ -396,7 +423,11 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, - [anon_sym_var] = { + [anon_sym_function] = { + .visible = true, + .named = false, + }, + [anon_sym_primitive] = { .visible = true, .named = false, }, @@ -404,6 +435,10 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, + [anon_sym_var] = { + .visible = true, + .named = false, + }, [anon_sym_import] = { .visible = true, .named = false, @@ -484,6 +519,26 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = true, }, + [sym_function_declaration] = { + .visible = true, + .named = true, + }, + [sym_primitive_declaration] = { + .visible = true, + .named = true, + }, + [sym__function_declaration_common] = { + .visible = false, + .named = true, + }, + [sym_parameters] = { + .visible = true, + .named = true, + }, + [sym__typed_field] = { + .visible = false, + .named = true, + }, [sym_variable_declaration] = { .visible = true, .named = true, @@ -508,6 +563,14 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = false, }, + [aux_sym__declaration_chunk_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_parameters_repeat1] = { + .visible = false, + .named = false, + }, }; enum { @@ -528,12 +591,13 @@ enum { field_left = 15, field_name = 16, field_operator = 17, - field_record = 18, - field_right = 19, - field_size = 20, - field_start = 21, - field_type = 22, - field_value = 23, + field_parameters = 18, + field_record = 19, + field_right = 20, + field_size = 21, + field_start = 22, + field_type = 23, + field_value = 24, }; static const char * const ts_field_names[] = { @@ -555,6 +619,7 @@ static const char * const ts_field_names[] = { [field_left] = "left", [field_name] = "name", [field_operator] = "operator", + [field_parameters] = "parameters", [field_record] = "record", [field_right] = "right", [field_size] = "size", @@ -565,31 +630,39 @@ static const char * const ts_field_names[] = { 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 = 1}, - [5] = {.index = 5, .length = 3}, - [6] = {.index = 8, .length = 2}, - [7] = {.index = 10, .length = 2}, + [2] = {.index = 2, .length = 2}, + [3] = {.index = 4, .length = 1}, + [4] = {.index = 5, .length = 1}, + [5] = {.index = 6, .length = 1}, + [6] = {.index = 7, .length = 2}, + [7] = {.index = 9, .length = 3}, [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 = 2}, + [11] = {.index = 18, .length = 2}, + [12] = {.index = 20, .length = 2}, + [13] = {.index = 22, .length = 1}, + [14] = {.index = 23, .length = 1}, [15] = {.index = 24, .length = 3}, [16] = {.index = 27, .length = 2}, [17] = {.index = 29, .length = 2}, [18] = {.index = 31, .length = 3}, - [19] = {.index = 34, .length = 3}, - [20] = {.index = 37, .length = 3}, - [21] = {.index = 40, .length = 3}, - [22] = {.index = 43, .length = 3}, - [23] = {.index = 46, .length = 5}, - [24] = {.index = 51, .length = 4}, - [25] = {.index = 55, .length = 4}, - [26] = {.index = 59, .length = 2}, + [19] = {.index = 34, .length = 2}, + [20] = {.index = 36, .length = 2}, + [21] = {.index = 38, .length = 3}, + [22] = {.index = 41, .length = 3}, + [23] = {.index = 44, .length = 3}, + [24] = {.index = 47, .length = 3}, + [25] = {.index = 50, .length = 3}, + [26] = {.index = 53, .length = 2}, + [27] = {.index = 55, .length = 2}, + [28] = {.index = 57, .length = 6}, + [29] = {.index = 63, .length = 4}, + [30] = {.index = 67, .length = 3}, + [31] = {.index = 70, .length = 5}, + [32] = {.index = 75, .length = 4}, + [33] = {.index = 79, .length = 4}, + [34] = {.index = 83, .length = 2}, }; static const TSFieldMapEntry ts_field_map_entries[] = { @@ -597,94 +670,126 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_expression, 1}, {field_operator, 0}, [2] = - {field_file, 1}, - [3] = - {field_function, 0}, + {field_name, 1, .inherited = true}, + {field_parameters, 1, .inherited = true}, [4] = - {field_type, 0}, + {field_file, 1}, [5] = + {field_function, 0}, + [6] = + {field_type, 0}, + [7] = + {field_name, 0}, + {field_parameters, 1}, + [9] = {field_left, 0}, {field_operator, 1}, {field_right, 2}, - [8] = + [12] = {field_field, 2}, {field_record, 0}, - [10] = + [14] = {field_left, 0}, {field_right, 2}, - [12] = + [16] = {field_arguments, 2}, {field_function, 0}, - [14] = + [18] = {field_condition, 1}, {field_consequence, 3}, - [16] = + [20] = {field_body, 3}, {field_condition, 1}, - [18] = + [22] = {field_body, 2}, - [19] = + [23] = {field_declarations, 1}, - [20] = + [24] = + {field_body, 3}, + {field_name, 1, .inherited = true}, + {field_parameters, 1, .inherited = true}, + [27] = {field_name, 1}, {field_value, 3}, - [22] = + [29] = {field_array, 0}, {field_index, 2}, - [24] = + [31] = {field_arguments, 2}, {field_arguments, 3}, {field_function, 0}, - [27] = + [34] = {field_body, 2}, {field_body, 3}, - [29] = + [36] = {field_body, 3}, {field_declarations, 1}, - [31] = + [38] = + {field_name, 1, .inherited = true}, + {field_parameters, 1}, + {field_type, 1, .inherited = true}, + [41] = {field_init, 5}, {field_size, 2}, {field_type, 0}, - [34] = + [44] = {field_field, 2}, {field_init, 4}, {field_type, 0}, - [37] = + [47] = {field_alternative, 5}, {field_condition, 1}, {field_consequence, 3}, - [40] = + [50] = {field_body, 3}, {field_body, 4}, {field_declarations, 1}, - [43] = + [53] = + {field_name, 0}, + {field_type, 2}, + [55] = + {field_name, 1, .inherited = true}, + {field_type, 1, .inherited = true}, + [57] = + {field_name, 1, .inherited = true}, + {field_name, 2, .inherited = true}, + {field_parameters, 1}, + {field_parameters, 2}, + {field_type, 1, .inherited = true}, + {field_type, 2, .inherited = true}, + [63] = + {field_name, 0, .inherited = true}, + {field_name, 1, .inherited = true}, + {field_type, 0, .inherited = true}, + {field_type, 1, .inherited = true}, + [67] = {field_name, 1}, {field_type, 3}, {field_value, 5}, - [46] = + [70] = {field_field, 2}, {field_field, 5, .inherited = true}, {field_init, 4}, {field_init, 5, .inherited = true}, {field_type, 0}, - [51] = + [75] = {field_field, 0, .inherited = true}, {field_field, 1, .inherited = true}, {field_init, 0, .inherited = true}, {field_init, 1, .inherited = true}, - [55] = + [79] = {field_body, 7}, {field_end, 5}, {field_index, 1}, {field_start, 3}, - [59] = + [83] = {field_field, 1}, {field_init, 3}, }; static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { [0] = {0}, - [5] = { + [7] = { [1] = anon_sym_DASH, }, }; @@ -961,153 +1066,203 @@ static bool ts_lex_keywords(TSLexer *lexer, TSStateId state) { if (lookahead == 'l') ADVANCE(6); if (lookahead == 'n') ADVANCE(7); if (lookahead == 'o') ADVANCE(8); - if (lookahead == 't') ADVANCE(9); - if (lookahead == 'v') ADVANCE(10); - if (lookahead == 'w') ADVANCE(11); + if (lookahead == 'p') ADVANCE(9); + if (lookahead == 't') ADVANCE(10); + if (lookahead == 'v') ADVANCE(11); + if (lookahead == 'w') ADVANCE(12); if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || lookahead == ' ') SKIP(0) END_STATE(); case 1: - if (lookahead == 'r') ADVANCE(12); + if (lookahead == 'r') ADVANCE(13); END_STATE(); case 2: - if (lookahead == 'o') ADVANCE(13); + if (lookahead == 'o') ADVANCE(14); END_STATE(); case 3: - if (lookahead == 'l') ADVANCE(14); - if (lookahead == 'n') ADVANCE(15); + if (lookahead == 'l') ADVANCE(15); + if (lookahead == 'n') ADVANCE(16); END_STATE(); case 4: - if (lookahead == 'o') ADVANCE(16); + if (lookahead == 'o') ADVANCE(17); + if (lookahead == 'u') ADVANCE(18); END_STATE(); case 5: - if (lookahead == 'f') ADVANCE(17); - if (lookahead == 'm') ADVANCE(18); - if (lookahead == 'n') ADVANCE(19); + if (lookahead == 'f') ADVANCE(19); + if (lookahead == 'm') ADVANCE(20); + if (lookahead == 'n') ADVANCE(21); END_STATE(); case 6: - if (lookahead == 'e') ADVANCE(20); + if (lookahead == 'e') ADVANCE(22); END_STATE(); case 7: - if (lookahead == 'i') ADVANCE(21); + if (lookahead == 'i') ADVANCE(23); END_STATE(); case 8: - if (lookahead == 'f') ADVANCE(22); + if (lookahead == 'f') ADVANCE(24); END_STATE(); case 9: - if (lookahead == 'h') ADVANCE(23); - if (lookahead == 'o') ADVANCE(24); + if (lookahead == 'r') ADVANCE(25); END_STATE(); case 10: - if (lookahead == 'a') ADVANCE(25); + if (lookahead == 'h') ADVANCE(26); + if (lookahead == 'o') ADVANCE(27); END_STATE(); case 11: - if (lookahead == 'h') ADVANCE(26); + if (lookahead == 'a') ADVANCE(28); END_STATE(); case 12: - if (lookahead == 'e') ADVANCE(27); + if (lookahead == 'h') ADVANCE(29); END_STATE(); case 13: - ACCEPT_TOKEN(anon_sym_do); + if (lookahead == 'e') ADVANCE(30); END_STATE(); case 14: - if (lookahead == 's') ADVANCE(28); + ACCEPT_TOKEN(anon_sym_do); END_STATE(); case 15: - if (lookahead == 'd') ADVANCE(29); + if (lookahead == 's') ADVANCE(31); END_STATE(); case 16: - if (lookahead == 'r') ADVANCE(30); + if (lookahead == 'd') ADVANCE(32); END_STATE(); case 17: - ACCEPT_TOKEN(anon_sym_if); + if (lookahead == 'r') ADVANCE(33); END_STATE(); case 18: - if (lookahead == 'p') ADVANCE(31); + if (lookahead == 'n') ADVANCE(34); END_STATE(); case 19: - ACCEPT_TOKEN(anon_sym_in); + ACCEPT_TOKEN(anon_sym_if); END_STATE(); case 20: - if (lookahead == 't') ADVANCE(32); + if (lookahead == 'p') ADVANCE(35); END_STATE(); case 21: - if (lookahead == 'l') ADVANCE(33); + ACCEPT_TOKEN(anon_sym_in); END_STATE(); case 22: - ACCEPT_TOKEN(anon_sym_of); + if (lookahead == 't') ADVANCE(36); END_STATE(); case 23: - if (lookahead == 'e') ADVANCE(34); + if (lookahead == 'l') ADVANCE(37); END_STATE(); case 24: - ACCEPT_TOKEN(anon_sym_to); + ACCEPT_TOKEN(anon_sym_of); END_STATE(); case 25: - if (lookahead == 'r') ADVANCE(35); + if (lookahead == 'i') ADVANCE(38); END_STATE(); case 26: - if (lookahead == 'i') ADVANCE(36); + if (lookahead == 'e') ADVANCE(39); END_STATE(); case 27: - if (lookahead == 'a') ADVANCE(37); + ACCEPT_TOKEN(anon_sym_to); END_STATE(); case 28: - if (lookahead == 'e') ADVANCE(38); + if (lookahead == 'r') ADVANCE(40); END_STATE(); case 29: - ACCEPT_TOKEN(anon_sym_end); + if (lookahead == 'i') ADVANCE(41); END_STATE(); case 30: - ACCEPT_TOKEN(anon_sym_for); + if (lookahead == 'a') ADVANCE(42); END_STATE(); case 31: - if (lookahead == 'o') ADVANCE(39); + if (lookahead == 'e') ADVANCE(43); END_STATE(); case 32: - ACCEPT_TOKEN(anon_sym_let); + ACCEPT_TOKEN(anon_sym_end); END_STATE(); case 33: - ACCEPT_TOKEN(sym_nil_literal); + ACCEPT_TOKEN(anon_sym_for); END_STATE(); case 34: - if (lookahead == 'n') ADVANCE(40); + if (lookahead == 'c') ADVANCE(44); END_STATE(); case 35: - ACCEPT_TOKEN(anon_sym_var); + if (lookahead == 'o') ADVANCE(45); END_STATE(); case 36: - if (lookahead == 'l') ADVANCE(41); + ACCEPT_TOKEN(anon_sym_let); END_STATE(); case 37: - if (lookahead == 'k') ADVANCE(42); + ACCEPT_TOKEN(sym_nil_literal); END_STATE(); case 38: - ACCEPT_TOKEN(anon_sym_else); + if (lookahead == 'm') ADVANCE(46); END_STATE(); case 39: - if (lookahead == 'r') ADVANCE(43); + if (lookahead == 'n') ADVANCE(47); END_STATE(); case 40: - ACCEPT_TOKEN(anon_sym_then); + ACCEPT_TOKEN(anon_sym_var); END_STATE(); case 41: - if (lookahead == 'e') ADVANCE(44); + if (lookahead == 'l') ADVANCE(48); END_STATE(); case 42: - ACCEPT_TOKEN(sym_break_expression); + if (lookahead == 'k') ADVANCE(49); END_STATE(); case 43: - if (lookahead == 't') ADVANCE(45); + ACCEPT_TOKEN(anon_sym_else); END_STATE(); case 44: - ACCEPT_TOKEN(anon_sym_while); + if (lookahead == 't') ADVANCE(50); END_STATE(); case 45: + if (lookahead == 'r') ADVANCE(51); + END_STATE(); + case 46: + if (lookahead == 'i') ADVANCE(52); + END_STATE(); + case 47: + ACCEPT_TOKEN(anon_sym_then); + END_STATE(); + case 48: + if (lookahead == 'e') ADVANCE(53); + END_STATE(); + case 49: + ACCEPT_TOKEN(sym_break_expression); + END_STATE(); + case 50: + if (lookahead == 'i') ADVANCE(54); + END_STATE(); + case 51: + if (lookahead == 't') ADVANCE(55); + END_STATE(); + case 52: + if (lookahead == 't') ADVANCE(56); + END_STATE(); + case 53: + ACCEPT_TOKEN(anon_sym_while); + END_STATE(); + case 54: + if (lookahead == 'o') ADVANCE(57); + END_STATE(); + case 55: ACCEPT_TOKEN(anon_sym_import); END_STATE(); + case 56: + if (lookahead == 'i') ADVANCE(58); + END_STATE(); + case 57: + if (lookahead == 'n') ADVANCE(59); + END_STATE(); + case 58: + if (lookahead == 'v') ADVANCE(60); + END_STATE(); + case 59: + ACCEPT_TOKEN(anon_sym_function); + END_STATE(); + case 60: + if (lookahead == 'e') ADVANCE(61); + END_STATE(); + case 61: + ACCEPT_TOKEN(anon_sym_primitive); + END_STATE(); default: return false; } @@ -1120,110 +1275,131 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [3] = {.lex_state = 9}, [4] = {.lex_state = 9}, [5] = {.lex_state = 9}, - [6] = {.lex_state = 0}, - [7] = {.lex_state = 0}, - [8] = {.lex_state = 0}, - [9] = {.lex_state = 0}, - [10] = {.lex_state = 0}, - [11] = {.lex_state = 0}, - [12] = {.lex_state = 0}, - [13] = {.lex_state = 0}, - [14] = {.lex_state = 0}, - [15] = {.lex_state = 0}, - [16] = {.lex_state = 0}, - [17] = {.lex_state = 0}, - [18] = {.lex_state = 0}, - [19] = {.lex_state = 0}, - [20] = {.lex_state = 0}, + [6] = {.lex_state = 9}, + [7] = {.lex_state = 9}, + [8] = {.lex_state = 9}, + [9] = {.lex_state = 9}, + [10] = {.lex_state = 9}, + [11] = {.lex_state = 9}, + [12] = {.lex_state = 9}, + [13] = {.lex_state = 9}, + [14] = {.lex_state = 9}, + [15] = {.lex_state = 9}, + [16] = {.lex_state = 9}, + [17] = {.lex_state = 9}, + [18] = {.lex_state = 9}, + [19] = {.lex_state = 9}, + [20] = {.lex_state = 9}, [21] = {.lex_state = 0}, - [22] = {.lex_state = 0}, - [23] = {.lex_state = 0}, - [24] = {.lex_state = 0}, - [25] = {.lex_state = 0}, - [26] = {.lex_state = 0}, + [22] = {.lex_state = 9}, + [23] = {.lex_state = 9}, + [24] = {.lex_state = 9}, + [25] = {.lex_state = 9}, + [26] = {.lex_state = 9}, [27] = {.lex_state = 0}, - [28] = {.lex_state = 0}, + [28] = {.lex_state = 9}, [29] = {.lex_state = 0}, - [30] = {.lex_state = 0}, - [31] = {.lex_state = 0}, - [32] = {.lex_state = 0}, - [33] = {.lex_state = 0}, + [30] = {.lex_state = 9}, + [31] = {.lex_state = 9}, + [32] = {.lex_state = 9}, + [33] = {.lex_state = 9}, [34] = {.lex_state = 9}, [35] = {.lex_state = 9}, [36] = {.lex_state = 9}, [37] = {.lex_state = 9}, - [38] = {.lex_state = 9}, - [39] = {.lex_state = 9}, - [40] = {.lex_state = 9}, - [41] = {.lex_state = 9}, - [42] = {.lex_state = 9}, - [43] = {.lex_state = 9}, - [44] = {.lex_state = 9}, - [45] = {.lex_state = 9}, - [46] = {.lex_state = 9}, - [47] = {.lex_state = 9}, - [48] = {.lex_state = 9}, - [49] = {.lex_state = 9}, - [50] = {.lex_state = 9}, - [51] = {.lex_state = 9}, - [52] = {.lex_state = 9}, - [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 = 9}, - [61] = {.lex_state = 9}, - [62] = {.lex_state = 9}, - [63] = {.lex_state = 9}, + [38] = {.lex_state = 0}, + [39] = {.lex_state = 0}, + [40] = {.lex_state = 0}, + [41] = {.lex_state = 0}, + [42] = {.lex_state = 0}, + [43] = {.lex_state = 0}, + [44] = {.lex_state = 0}, + [45] = {.lex_state = 0}, + [46] = {.lex_state = 0}, + [47] = {.lex_state = 0}, + [48] = {.lex_state = 0}, + [49] = {.lex_state = 0}, + [50] = {.lex_state = 0}, + [51] = {.lex_state = 0}, + [52] = {.lex_state = 0}, + [53] = {.lex_state = 0}, + [54] = {.lex_state = 0}, + [55] = {.lex_state = 0}, + [56] = {.lex_state = 0}, + [57] = {.lex_state = 0}, + [58] = {.lex_state = 0}, + [59] = {.lex_state = 0}, + [60] = {.lex_state = 0}, + [61] = {.lex_state = 0}, + [62] = {.lex_state = 0}, + [63] = {.lex_state = 0}, [64] = {.lex_state = 9}, [65] = {.lex_state = 9}, - [66] = {.lex_state = 0}, - [67] = {.lex_state = 0}, + [66] = {.lex_state = 9}, + [67] = {.lex_state = 9}, [68] = {.lex_state = 0}, [69] = {.lex_state = 9}, - [70] = {.lex_state = 9}, + [70] = {.lex_state = 0}, [71] = {.lex_state = 0}, - [72] = {.lex_state = 0}, + [72] = {.lex_state = 9}, [73] = {.lex_state = 0}, - [74] = {.lex_state = 9}, - [75] = {.lex_state = 9}, - [76] = {.lex_state = 0}, + [74] = {.lex_state = 0}, + [75] = {.lex_state = 0}, + [76] = {.lex_state = 9}, [77] = {.lex_state = 0}, [78] = {.lex_state = 9}, [79] = {.lex_state = 9}, [80] = {.lex_state = 9}, - [81] = {.lex_state = 9}, + [81] = {.lex_state = 0}, [82] = {.lex_state = 9}, [83] = {.lex_state = 9}, - [84] = {.lex_state = 1}, - [85] = {.lex_state = 1}, + [84] = {.lex_state = 9}, + [85] = {.lex_state = 9}, [86] = {.lex_state = 9}, [87] = {.lex_state = 9}, - [88] = {.lex_state = 1}, - [89] = {.lex_state = 0}, - [90] = {.lex_state = 0}, + [88] = {.lex_state = 9}, + [89] = {.lex_state = 9}, + [90] = {.lex_state = 9}, [91] = {.lex_state = 9}, - [92] = {.lex_state = 0}, - [93] = {.lex_state = 9}, - [94] = {.lex_state = 0}, - [95] = {.lex_state = 0}, - [96] = {.lex_state = 9}, - [97] = {.lex_state = 0}, + [92] = {.lex_state = 9}, + [93] = {.lex_state = 1}, + [94] = {.lex_state = 1}, + [95] = {.lex_state = 9}, + [96] = {.lex_state = 1}, + [97] = {.lex_state = 9}, [98] = {.lex_state = 0}, - [99] = {.lex_state = 9}, + [99] = {.lex_state = 0}, [100] = {.lex_state = 0}, [101] = {.lex_state = 9}, [102] = {.lex_state = 0}, - [103] = {.lex_state = 9}, - [104] = {.lex_state = 9}, + [103] = {.lex_state = 0}, + [104] = {.lex_state = 0}, [105] = {.lex_state = 0}, [106] = {.lex_state = 0}, - [107] = {.lex_state = 0}, + [107] = {.lex_state = 9}, [108] = {.lex_state = 9}, - [109] = {.lex_state = 9}, + [109] = {.lex_state = 0}, + [110] = {.lex_state = 9}, + [111] = {.lex_state = 0}, + [112] = {.lex_state = 9}, + [113] = {.lex_state = 0}, + [114] = {.lex_state = 9}, + [115] = {.lex_state = 0}, + [116] = {.lex_state = 0}, + [117] = {.lex_state = 9}, + [118] = {.lex_state = 9}, + [119] = {.lex_state = 9}, + [120] = {.lex_state = 9}, + [121] = {.lex_state = 0}, + [122] = {.lex_state = 9}, + [123] = {.lex_state = 9}, + [124] = {.lex_state = 0}, + [125] = {.lex_state = 0}, + [126] = {.lex_state = 0}, + [127] = {.lex_state = 0}, + [128] = {.lex_state = 0}, + [129] = {.lex_state = 0}, + [130] = {.lex_state = 9}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { @@ -1268,32 +1444,37 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_let] = ACTIONS(1), [anon_sym_in] = ACTIONS(1), [anon_sym_end] = ACTIONS(1), - [anon_sym_var] = ACTIONS(1), + [anon_sym_function] = ACTIONS(1), + [anon_sym_primitive] = ACTIONS(1), [anon_sym_COLON] = ACTIONS(1), + [anon_sym_var] = ACTIONS(1), [anon_sym_import] = ACTIONS(1), }, [1] = { - [sym_source_file] = STATE(106), - [sym__expr] = STATE(73), - [sym_string_literal] = STATE(73), + [sym_source_file] = STATE(126), + [sym__expr] = STATE(77), + [sym_string_literal] = STATE(77), [sym__lvalue] = STATE(5), [sym_record_value] = STATE(5), [sym_array_value] = STATE(5), - [sym_function_call] = STATE(73), - [sym_unary_expression] = STATE(73), - [sym_binary_expression] = STATE(73), - [sym_sequence_expression] = STATE(73), - [sym_array_expression] = STATE(73), - [sym_record_expression] = STATE(73), - [sym_assignment_expression] = STATE(73), - [sym_if_expression] = STATE(73), - [sym_while_expression] = STATE(73), - [sym_for_expression] = STATE(73), - [sym_let_expression] = STATE(73), - [aux_sym__declaration_chunks] = STATE(83), - [sym__declaration_chunk] = STATE(83), - [sym_variable_declaration] = STATE(83), - [sym_import_declaration] = STATE(83), + [sym_function_call] = STATE(77), + [sym_unary_expression] = STATE(77), + [sym_binary_expression] = STATE(77), + [sym_sequence_expression] = STATE(77), + [sym_array_expression] = STATE(77), + [sym_record_expression] = STATE(77), + [sym_assignment_expression] = STATE(77), + [sym_if_expression] = STATE(77), + [sym_while_expression] = STATE(77), + [sym_for_expression] = STATE(77), + [sym_let_expression] = STATE(77), + [aux_sym__declaration_chunks] = STATE(85), + [sym__declaration_chunk] = STATE(85), + [sym_function_declaration] = STATE(85), + [sym_primitive_declaration] = STATE(85), + [sym_variable_declaration] = STATE(85), + [sym_import_declaration] = STATE(85), + [aux_sym__declaration_chunk_repeat1] = STATE(85), [ts_builtin_sym_end] = ACTIONS(3), [sym_identifier] = ACTIONS(5), [sym_nil_literal] = ACTIONS(7), @@ -1306,23 +1487,25 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_for] = ACTIONS(19), [sym_break_expression] = ACTIONS(7), [anon_sym_let] = ACTIONS(21), - [anon_sym_var] = ACTIONS(23), - [anon_sym_import] = ACTIONS(25), + [anon_sym_function] = ACTIONS(23), + [anon_sym_primitive] = ACTIONS(25), + [anon_sym_var] = ACTIONS(27), + [anon_sym_import] = ACTIONS(29), }, }; static const uint16_t ts_small_parse_table[] = { [0] = 5, - ACTIONS(29), 1, + ACTIONS(33), 1, anon_sym_LBRACK, - ACTIONS(32), 1, - anon_sym_LPAREN, ACTIONS(36), 1, + anon_sym_LPAREN, + ACTIONS(40), 1, anon_sym_LBRACE, - ACTIONS(34), 2, + ACTIONS(38), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(27), 26, + ACTIONS(31), 28, ts_builtin_sym_end, anon_sym_DOT, anon_sym_RBRACK, @@ -1347,45 +1530,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_to, anon_sym_in, anon_sym_end, + anon_sym_function, + anon_sym_primitive, anon_sym_var, anon_sym_import, - [42] = 2, - ACTIONS(40), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(38), 27, - ts_builtin_sym_end, - anon_sym_DOT, - anon_sym_LBRACK, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_COLON_EQ, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [76] = 2, + [44] = 2, ACTIONS(44), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(42), 27, + ACTIONS(42), 29, ts_builtin_sym_end, anon_sym_DOT, anon_sym_LBRACK, @@ -1411,19 +1564,55 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_to, anon_sym_in, anon_sym_end, + anon_sym_function, + anon_sym_primitive, anon_sym_var, anon_sym_import, - [110] = 5, - ACTIONS(48), 1, - anon_sym_DOT, - ACTIONS(50), 1, - anon_sym_LBRACK, - ACTIONS(54), 1, - anon_sym_COLON_EQ, - ACTIONS(52), 2, + [80] = 2, + ACTIONS(48), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(46), 24, + ACTIONS(46), 29, + ts_builtin_sym_end, + anon_sym_DOT, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COLON_EQ, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [116] = 5, + ACTIONS(52), 1, + anon_sym_DOT, + ACTIONS(54), 1, + anon_sym_LBRACK, + ACTIONS(58), 1, + anon_sym_COLON_EQ, + ACTIONS(56), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(50), 26, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -1446,173 +1635,502 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_to, anon_sym_in, anon_sym_end, + anon_sym_function, + anon_sym_primitive, anon_sym_var, anon_sym_import, - [150] = 12, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(58), 1, - anon_sym_RPAREN, - ACTIONS(56), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(5), 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, - [203] = 12, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(62), 1, - anon_sym_end, - ACTIONS(60), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(69), 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, - [256] = 12, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(66), 1, - anon_sym_RPAREN, - ACTIONS(64), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(5), 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, - [309] = 12, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, + [158] = 7, ACTIONS(70), 1, + anon_sym_AMP, + ACTIONS(72), 1, + anon_sym_PIPE, + ACTIONS(62), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(64), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(68), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(66), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(60), 16, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, anon_sym_end, - ACTIONS(68), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(65), 13, - sym__expr, - sym_string_literal, - sym_function_call, - sym_unary_expression, - sym_binary_expression, - sym_sequence_expression, - sym_array_expression, - sym_record_expression, - sym_assignment_expression, - sym_if_expression, - sym_while_expression, - sym_for_expression, - sym_let_expression, - [362] = 11, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [201] = 2, + ACTIONS(76), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(74), 26, + 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_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [234] = 2, + ACTIONS(80), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(78), 26, + 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_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [267] = 7, + ACTIONS(70), 1, + anon_sym_AMP, + ACTIONS(72), 1, + anon_sym_PIPE, + ACTIONS(62), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(64), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(68), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(66), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(82), 16, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [310] = 2, + ACTIONS(86), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(84), 26, + 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_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [343] = 2, + ACTIONS(90), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(88), 26, + 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_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [376] = 2, + ACTIONS(94), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(92), 26, + 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_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [409] = 2, + ACTIONS(98), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(96), 26, + 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_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [442] = 2, + ACTIONS(102), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(100), 26, + 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_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [475] = 2, + ACTIONS(106), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(104), 26, + 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_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [508] = 7, + ACTIONS(70), 1, + anon_sym_AMP, + ACTIONS(72), 1, + anon_sym_PIPE, + ACTIONS(62), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(64), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(68), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(66), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(108), 16, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [551] = 2, + ACTIONS(112), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(110), 26, + 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_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [584] = 2, + ACTIONS(116), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(114), 26, + 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_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [617] = 7, + ACTIONS(70), 1, + anon_sym_AMP, + ACTIONS(72), 1, + anon_sym_PIPE, + ACTIONS(62), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(64), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(68), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(66), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(118), 16, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [660] = 8, + ACTIONS(70), 1, + anon_sym_AMP, + ACTIONS(72), 1, + anon_sym_PIPE, + ACTIONS(122), 1, + anon_sym_else, + ACTIONS(62), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(64), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(68), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(66), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(120), 15, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [705] = 12, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -1629,46 +2147,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_for, ACTIONS(21), 1, anon_sym_let, - ACTIONS(72), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(44), 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, - [412] = 11, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(74), 3, + ACTIONS(126), 1, + anon_sym_RPAREN, + ACTIONS(124), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, @@ -1690,7 +2171,167 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [462] = 11, + [758] = 2, + ACTIONS(130), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(128), 26, + 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_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [791] = 2, + ACTIONS(134), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(132), 26, + 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_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [824] = 2, + ACTIONS(138), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(136), 26, + 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_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [857] = 7, + ACTIONS(70), 1, + anon_sym_AMP, + ACTIONS(72), 1, + anon_sym_PIPE, + ACTIONS(62), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(64), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(68), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(66), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(140), 16, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [900] = 2, + ACTIONS(144), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(142), 26, + 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_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [933] = 12, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -1707,7 +2348,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_for, ACTIONS(21), 1, anon_sym_let, - ACTIONS(76), 3, + ACTIONS(148), 1, + anon_sym_RPAREN, + ACTIONS(146), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, @@ -1715,7 +2358,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(49), 13, + STATE(68), 13, sym__expr, sym_string_literal, sym_function_call, @@ -1729,7 +2372,42 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [512] = 11, + [986] = 6, + ACTIONS(70), 1, + anon_sym_AMP, + ACTIONS(62), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(64), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(68), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(66), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(150), 17, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [1027] = 12, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -1746,7 +2424,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_for, ACTIONS(21), 1, anon_sym_let, - ACTIONS(78), 3, + ACTIONS(154), 1, + anon_sym_end, + ACTIONS(152), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, @@ -1754,7 +2434,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(64), 13, + STATE(67), 13, sym__expr, sym_string_literal, sym_function_call, @@ -1768,7 +2448,261 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [562] = 11, + [1080] = 5, + ACTIONS(62), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(64), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(68), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(66), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(150), 18, + 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_in, + anon_sym_end, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [1119] = 4, + ACTIONS(62), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(64), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(156), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(150), 22, + 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_in, + anon_sym_end, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [1156] = 2, + ACTIONS(156), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(150), 26, + 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_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [1189] = 3, + ACTIONS(64), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(156), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(150), 24, + ts_builtin_sym_end, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + anon_sym_to, + anon_sym_in, + anon_sym_end, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [1224] = 2, + ACTIONS(160), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(158), 26, + 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_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [1257] = 2, + ACTIONS(164), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(162), 26, + 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_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [1290] = 2, + ACTIONS(168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(166), 26, + 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_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [1323] = 2, + ACTIONS(172), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(170), 26, + 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_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [1356] = 12, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -1785,202 +2719,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_for, ACTIONS(21), 1, anon_sym_let, - ACTIONS(80), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(5), 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, - [612] = 11, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(82), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(5), 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, - [662] = 11, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(84), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(60), 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, - [712] = 11, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(86), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(45), 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, - [762] = 11, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(88), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(77), 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, - [812] = 11, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(90), 3, + ACTIONS(176), 1, + anon_sym_end, + ACTIONS(174), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, @@ -2002,7 +2743,7 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [862] = 11, + [1409] = 11, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -2019,7 +2760,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_for, ACTIONS(21), 1, anon_sym_let, - ACTIONS(92), 3, + ACTIONS(178), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, @@ -2027,7 +2768,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(63), 13, + STATE(6), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2041,7 +2782,7 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [912] = 11, + [1459] = 11, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -2058,7 +2799,46 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_for, ACTIONS(21), 1, anon_sym_let, - ACTIONS(94), 3, + ACTIONS(180), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(69), 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, + [1509] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(182), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, @@ -2080,7 +2860,7 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [962] = 11, + [1559] = 11, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -2097,7 +2877,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_for, ACTIONS(21), 1, anon_sym_let, - ACTIONS(96), 3, + ACTIONS(184), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, @@ -2105,7 +2885,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(79), 13, + STATE(33), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2119,7 +2899,7 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [1012] = 11, + [1609] = 11, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -2136,7 +2916,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_for, ACTIONS(21), 1, anon_sym_let, - ACTIONS(98), 3, + ACTIONS(186), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, @@ -2144,7 +2924,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(62), 13, + STATE(32), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2158,7 +2938,7 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [1062] = 11, + [1659] = 11, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -2175,7 +2955,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_for, ACTIONS(21), 1, anon_sym_let, - ACTIONS(100), 3, + ACTIONS(188), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, @@ -2183,7 +2963,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(76), 13, + STATE(31), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2197,7 +2977,7 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [1112] = 11, + [1709] = 11, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -2214,7 +2994,280 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_for, ACTIONS(21), 1, anon_sym_let, - ACTIONS(102), 3, + ACTIONS(190), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(30), 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, + [1759] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(192), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(28), 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, + [1809] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(194), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(25), 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, + [1859] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(196), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 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, + [1909] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(198), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(26), 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, + [1959] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(200), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(81), 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, + [2009] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(202), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(73), 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, + [2059] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(204), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, @@ -2236,7 +3289,7 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [1162] = 11, + [2109] = 11, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -2253,7 +3306,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_for, ACTIONS(21), 1, anon_sym_let, - ACTIONS(104), 3, + ACTIONS(206), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, @@ -2261,7 +3314,7 @@ static const uint16_t ts_small_parse_table[] = { sym__lvalue, sym_record_value, sym_array_value, - STATE(55), 13, + STATE(9), 13, sym__expr, sym_string_literal, sym_function_call, @@ -2275,7 +3328,7 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [1212] = 11, + [2159] = 11, ACTIONS(5), 1, sym_identifier, ACTIONS(9), 1, @@ -2292,7 +3345,358 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_for, ACTIONS(21), 1, anon_sym_let, - ACTIONS(106), 3, + ACTIONS(208), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(80), 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, + [2209] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(210), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(16), 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, + [2259] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(212), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(64), 13, + sym__expr, + sym_string_literal, + sym_function_call, + sym_unary_expression, + sym_binary_expression, + sym_sequence_expression, + sym_array_expression, + sym_record_expression, + sym_assignment_expression, + sym_if_expression, + sym_while_expression, + sym_for_expression, + sym_let_expression, + [2309] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(214), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(76), 13, + sym__expr, + sym_string_literal, + sym_function_call, + sym_unary_expression, + sym_binary_expression, + sym_sequence_expression, + sym_array_expression, + sym_record_expression, + sym_assignment_expression, + sym_if_expression, + sym_while_expression, + sym_for_expression, + sym_let_expression, + [2359] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(216), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(20), 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, + [2409] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(218), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(19), 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, + [2459] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(220), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(82), 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, + [2509] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(222), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(65), 13, + sym__expr, + sym_string_literal, + sym_function_call, + sym_unary_expression, + sym_binary_expression, + sym_sequence_expression, + sym_array_expression, + sym_record_expression, + sym_assignment_expression, + sym_if_expression, + sym_while_expression, + sym_for_expression, + sym_let_expression, + [2559] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(224), 3, + sym_nil_literal, + sym_integer_literal, + sym_break_expression, + STATE(5), 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, + [2609] = 11, + ACTIONS(5), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_DQUOTE, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DASH, + ACTIONS(15), 1, + anon_sym_if, + ACTIONS(17), 1, + anon_sym_while, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_let, + ACTIONS(226), 3, sym_nil_literal, sym_integer_literal, sym_break_expression, @@ -2314,1804 +3718,892 @@ static const uint16_t ts_small_parse_table[] = { sym_while_expression, sym_for_expression, sym_let_expression, - [1262] = 11, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(108), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(61), 13, - sym__expr, - sym_string_literal, - sym_function_call, - sym_unary_expression, - sym_binary_expression, - sym_sequence_expression, - sym_array_expression, - sym_record_expression, - sym_assignment_expression, - sym_if_expression, - sym_while_expression, - sym_for_expression, - sym_let_expression, - [1312] = 11, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(110), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(51), 13, - sym__expr, - sym_string_literal, - sym_function_call, - sym_unary_expression, - sym_binary_expression, - sym_sequence_expression, - sym_array_expression, - sym_record_expression, - sym_assignment_expression, - sym_if_expression, - sym_while_expression, - sym_for_expression, - sym_let_expression, - [1362] = 11, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(112), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(39), 13, - sym__expr, - sym_string_literal, - sym_function_call, - sym_unary_expression, - sym_binary_expression, - sym_sequence_expression, - sym_array_expression, - sym_record_expression, - sym_assignment_expression, - sym_if_expression, - sym_while_expression, - sym_for_expression, - sym_let_expression, - [1412] = 11, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(114), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(57), 13, - sym__expr, - sym_string_literal, - sym_function_call, - sym_unary_expression, - sym_binary_expression, - sym_sequence_expression, - sym_array_expression, - sym_record_expression, - sym_assignment_expression, - sym_if_expression, - sym_while_expression, - sym_for_expression, - sym_let_expression, - [1462] = 11, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(116), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(58), 13, - sym__expr, - sym_string_literal, - sym_function_call, - sym_unary_expression, - sym_binary_expression, - sym_sequence_expression, - sym_array_expression, - sym_record_expression, - sym_assignment_expression, - sym_if_expression, - sym_while_expression, - sym_for_expression, - sym_let_expression, - [1512] = 11, - ACTIONS(5), 1, - sym_identifier, - ACTIONS(9), 1, - anon_sym_DQUOTE, - ACTIONS(11), 1, - anon_sym_LPAREN, - ACTIONS(13), 1, - anon_sym_DASH, - ACTIONS(15), 1, - anon_sym_if, - ACTIONS(17), 1, - anon_sym_while, - ACTIONS(19), 1, - anon_sym_for, - ACTIONS(21), 1, - anon_sym_let, - ACTIONS(118), 3, - sym_nil_literal, - sym_integer_literal, - sym_break_expression, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(59), 13, - sym__expr, - sym_string_literal, - sym_function_call, - sym_unary_expression, - sym_binary_expression, - sym_sequence_expression, - sym_array_expression, - sym_record_expression, - sym_assignment_expression, - sym_if_expression, - sym_while_expression, - sym_for_expression, - sym_let_expression, - [1562] = 2, - ACTIONS(122), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(120), 24, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, + [2659] = 7, + ACTIONS(70), 1, + anon_sym_AMP, + ACTIONS(72), 1, + anon_sym_PIPE, + ACTIONS(62), 2, anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(64), 2, anon_sym_STAR, anon_sym_SLASH, - anon_sym_PLUS, + ACTIONS(68), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(66), 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, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [1593] = 2, - ACTIONS(126), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(124), 24, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [1624] = 2, - ACTIONS(130), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(128), 24, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [1655] = 2, - ACTIONS(134), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(132), 24, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [1686] = 2, - ACTIONS(138), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(136), 24, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [1717] = 7, - ACTIONS(150), 1, - anon_sym_AMP, - ACTIONS(152), 1, - anon_sym_PIPE, - ACTIONS(142), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(144), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(148), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(146), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(140), 14, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [1758] = 2, - ACTIONS(156), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(154), 24, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [1789] = 2, - ACTIONS(160), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(158), 24, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [1820] = 2, - ACTIONS(164), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(162), 24, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [1851] = 2, - ACTIONS(168), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(166), 24, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [1882] = 7, - ACTIONS(150), 1, - anon_sym_AMP, - ACTIONS(152), 1, - anon_sym_PIPE, - ACTIONS(142), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(144), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(148), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(146), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(170), 14, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [1923] = 8, - ACTIONS(150), 1, - anon_sym_AMP, - ACTIONS(152), 1, - anon_sym_PIPE, - ACTIONS(174), 1, - anon_sym_else, - ACTIONS(142), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(144), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(148), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(146), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(172), 13, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [1966] = 2, - ACTIONS(178), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(176), 24, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [1997] = 2, - ACTIONS(182), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(180), 24, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [2028] = 2, - ACTIONS(186), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(184), 24, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [2059] = 7, - ACTIONS(150), 1, - anon_sym_AMP, - ACTIONS(152), 1, - anon_sym_PIPE, - ACTIONS(142), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(144), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(148), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(146), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(188), 14, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [2100] = 2, - ACTIONS(192), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(190), 24, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [2131] = 7, - ACTIONS(150), 1, - anon_sym_AMP, - ACTIONS(152), 1, - anon_sym_PIPE, - ACTIONS(142), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(144), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(148), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(146), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(194), 14, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [2172] = 2, - ACTIONS(198), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(196), 24, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [2203] = 2, - ACTIONS(202), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(200), 24, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [2234] = 2, - ACTIONS(206), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(204), 24, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [2265] = 7, - ACTIONS(150), 1, - anon_sym_AMP, - ACTIONS(152), 1, - anon_sym_PIPE, - ACTIONS(142), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(144), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(148), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(146), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(208), 14, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [2306] = 2, - ACTIONS(212), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(210), 24, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [2337] = 3, - ACTIONS(144), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(216), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(214), 22, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [2370] = 2, - ACTIONS(216), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(214), 24, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [2401] = 4, - ACTIONS(142), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(144), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(216), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(214), 20, - 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_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [2436] = 5, - ACTIONS(142), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(144), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(148), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(146), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(214), 16, - 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_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [2473] = 6, - ACTIONS(150), 1, - anon_sym_AMP, - ACTIONS(142), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(144), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(148), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(146), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(214), 15, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [2512] = 2, - ACTIONS(220), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(218), 24, - ts_builtin_sym_end, - anon_sym_RBRACK, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_SLASH, - anon_sym_PLUS, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_then, - anon_sym_else, - anon_sym_do, - anon_sym_to, - anon_sym_in, - anon_sym_end, - anon_sym_var, - anon_sym_import, - [2543] = 7, - ACTIONS(150), 1, - anon_sym_AMP, - ACTIONS(152), 1, - anon_sym_PIPE, - ACTIONS(142), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(144), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(148), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(146), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(222), 4, + ACTIONS(228), 6, ts_builtin_sym_end, anon_sym_in, + anon_sym_function, + anon_sym_primitive, anon_sym_var, anon_sym_import, - [2574] = 7, - ACTIONS(150), 1, + [2692] = 7, + ACTIONS(70), 1, anon_sym_AMP, - ACTIONS(152), 1, + ACTIONS(72), 1, anon_sym_PIPE, - ACTIONS(142), 2, + ACTIONS(62), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(144), 2, + ACTIONS(64), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(148), 2, + ACTIONS(68), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(146), 4, + ACTIONS(66), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - ACTIONS(224), 4, + ACTIONS(230), 6, ts_builtin_sym_end, anon_sym_in, + anon_sym_function, + anon_sym_primitive, anon_sym_var, anon_sym_import, - [2605] = 9, - ACTIONS(150), 1, + [2725] = 7, + ACTIONS(70), 1, anon_sym_AMP, - ACTIONS(152), 1, + ACTIONS(72), 1, anon_sym_PIPE, - ACTIONS(226), 1, - anon_sym_SEMI, - ACTIONS(228), 1, - anon_sym_end, - STATE(91), 1, - aux_sym_sequence_expression_repeat1, - ACTIONS(142), 2, + ACTIONS(62), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(144), 2, + ACTIONS(64), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(148), 2, + ACTIONS(68), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(146), 4, + ACTIONS(66), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [2639] = 9, - ACTIONS(150), 1, + ACTIONS(232), 6, + ts_builtin_sym_end, + anon_sym_in, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [2758] = 9, + ACTIONS(70), 1, anon_sym_AMP, - ACTIONS(152), 1, + ACTIONS(72), 1, anon_sym_PIPE, - ACTIONS(230), 1, - anon_sym_COMMA, - ACTIONS(232), 1, - anon_sym_RBRACE, - STATE(92), 1, - aux_sym_record_expression_repeat1, - ACTIONS(142), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(144), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(148), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(146), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2673] = 9, - ACTIONS(150), 1, - anon_sym_AMP, - ACTIONS(152), 1, - anon_sym_PIPE, - ACTIONS(226), 1, - anon_sym_SEMI, ACTIONS(234), 1, - anon_sym_RPAREN, - STATE(95), 1, + anon_sym_SEMI, + ACTIONS(236), 1, + anon_sym_end, + STATE(97), 1, aux_sym_sequence_expression_repeat1, - ACTIONS(142), 2, + ACTIONS(62), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(144), 2, + ACTIONS(64), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(148), 2, + ACTIONS(68), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(146), 4, + ACTIONS(66), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [2707] = 9, - ACTIONS(150), 1, + [2792] = 9, + ACTIONS(70), 1, anon_sym_AMP, - ACTIONS(152), 1, + ACTIONS(72), 1, anon_sym_PIPE, - ACTIONS(236), 1, - anon_sym_COMMA, + ACTIONS(234), 1, + anon_sym_SEMI, ACTIONS(238), 1, anon_sym_RPAREN, - STATE(89), 1, - aux_sym_function_call_repeat1, - ACTIONS(142), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(144), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(148), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(146), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2741] = 9, - ACTIONS(150), 1, - anon_sym_AMP, - ACTIONS(152), 1, - anon_sym_PIPE, - ACTIONS(226), 1, - anon_sym_SEMI, - ACTIONS(240), 1, - anon_sym_end, - STATE(93), 1, + STATE(99), 1, aux_sym_sequence_expression_repeat1, - ACTIONS(142), 2, + ACTIONS(62), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(144), 2, + ACTIONS(64), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(148), 2, + ACTIONS(68), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(146), 4, + ACTIONS(66), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [2775] = 7, - ACTIONS(150), 1, + [2826] = 7, + ACTIONS(70), 1, anon_sym_AMP, - ACTIONS(152), 1, + ACTIONS(72), 1, anon_sym_PIPE, - ACTIONS(142), 2, + ACTIONS(62), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(144), 2, + ACTIONS(64), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(148), 2, + ACTIONS(68), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(242), 3, + ACTIONS(240), 3, anon_sym_RPAREN, anon_sym_SEMI, anon_sym_end, - ACTIONS(146), 4, + ACTIONS(66), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [2805] = 7, - ACTIONS(150), 1, + [2856] = 9, + ACTIONS(70), 1, anon_sym_AMP, - ACTIONS(152), 1, + ACTIONS(72), 1, anon_sym_PIPE, - ACTIONS(142), 2, + ACTIONS(242), 1, + anon_sym_COMMA, + ACTIONS(244), 1, + anon_sym_RPAREN, + STATE(102), 1, + aux_sym_function_call_repeat1, + ACTIONS(62), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(144), 2, + ACTIONS(64), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(148), 2, + ACTIONS(68), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(244), 2, + ACTIONS(66), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2890] = 9, + ACTIONS(70), 1, + anon_sym_AMP, + ACTIONS(72), 1, + anon_sym_PIPE, + ACTIONS(246), 1, + anon_sym_COMMA, + ACTIONS(248), 1, + anon_sym_RBRACE, + STATE(105), 1, + aux_sym_record_expression_repeat1, + ACTIONS(62), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(64), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(68), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(66), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2924] = 9, + ACTIONS(70), 1, + anon_sym_AMP, + ACTIONS(72), 1, + anon_sym_PIPE, + ACTIONS(234), 1, + anon_sym_SEMI, + ACTIONS(250), 1, + anon_sym_end, + STATE(107), 1, + aux_sym_sequence_expression_repeat1, + ACTIONS(62), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(64), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(68), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(66), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2958] = 7, + ACTIONS(70), 1, + anon_sym_AMP, + ACTIONS(72), 1, + anon_sym_PIPE, + ACTIONS(62), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(64), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(68), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(252), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + ACTIONS(66), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [2987] = 7, + ACTIONS(70), 1, + anon_sym_AMP, + ACTIONS(72), 1, + anon_sym_PIPE, + ACTIONS(62), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(64), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(68), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(254), 2, anon_sym_COMMA, anon_sym_RBRACE, - ACTIONS(146), 4, + ACTIONS(66), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [2834] = 7, - ACTIONS(150), 1, + [3016] = 7, + ACTIONS(70), 1, anon_sym_AMP, - ACTIONS(152), 1, - anon_sym_PIPE, - ACTIONS(142), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(144), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(148), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(246), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - ACTIONS(146), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2863] = 7, - ACTIONS(150), 1, - anon_sym_AMP, - ACTIONS(152), 1, - anon_sym_PIPE, - ACTIONS(248), 1, - ts_builtin_sym_end, - ACTIONS(142), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(144), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(148), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(146), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2891] = 7, - ACTIONS(150), 1, - anon_sym_AMP, - ACTIONS(152), 1, - anon_sym_PIPE, - ACTIONS(250), 1, - anon_sym_do, - ACTIONS(142), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(144), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(148), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(146), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2919] = 7, - ACTIONS(150), 1, - anon_sym_AMP, - ACTIONS(152), 1, - anon_sym_PIPE, - ACTIONS(252), 1, - anon_sym_to, - ACTIONS(142), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(144), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(148), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(146), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2947] = 7, - ACTIONS(150), 1, - anon_sym_AMP, - ACTIONS(152), 1, - anon_sym_PIPE, - ACTIONS(254), 1, - anon_sym_RBRACK, - ACTIONS(142), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(144), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(148), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(146), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [2975] = 7, - ACTIONS(150), 1, - anon_sym_AMP, - ACTIONS(152), 1, + ACTIONS(72), 1, anon_sym_PIPE, ACTIONS(256), 1, anon_sym_RBRACK, - ACTIONS(142), 2, + ACTIONS(62), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(144), 2, + ACTIONS(64), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(148), 2, + ACTIONS(68), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(146), 4, + ACTIONS(66), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [3003] = 7, - ACTIONS(150), 1, + [3044] = 7, + ACTIONS(70), 1, anon_sym_AMP, - ACTIONS(152), 1, + ACTIONS(72), 1, anon_sym_PIPE, ACTIONS(258), 1, anon_sym_then, - ACTIONS(142), 2, + ACTIONS(62), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(144), 2, + ACTIONS(64), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(148), 2, + ACTIONS(68), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(146), 4, + ACTIONS(66), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [3031] = 7, - ACTIONS(150), 1, + [3072] = 7, + ACTIONS(70), 1, anon_sym_AMP, - ACTIONS(152), 1, + ACTIONS(72), 1, anon_sym_PIPE, ACTIONS(260), 1, - anon_sym_do, - ACTIONS(142), 2, + ts_builtin_sym_end, + ACTIONS(62), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(144), 2, + ACTIONS(64), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(148), 2, + ACTIONS(68), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(146), 4, + ACTIONS(66), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [3059] = 4, - ACTIONS(264), 1, + [3100] = 7, + ACTIONS(70), 1, + anon_sym_AMP, + ACTIONS(72), 1, + anon_sym_PIPE, + ACTIONS(262), 1, + anon_sym_do, + ACTIONS(62), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(64), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(68), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(66), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [3128] = 6, + ACTIONS(266), 1, + anon_sym_function, + ACTIONS(269), 1, + anon_sym_primitive, + ACTIONS(272), 1, anon_sym_var, - ACTIONS(267), 1, + ACTIONS(275), 1, anon_sym_import, - ACTIONS(262), 2, + ACTIONS(264), 2, ts_builtin_sym_end, anon_sym_in, - STATE(80), 4, + STATE(79), 7, aux_sym__declaration_chunks, sym__declaration_chunk, + sym_function_declaration, + sym_primitive_declaration, sym_variable_declaration, sym_import_declaration, - [3076] = 4, - ACTIONS(270), 1, - anon_sym_in, - ACTIONS(272), 1, - anon_sym_var, - ACTIONS(274), 1, - anon_sym_import, - STATE(80), 4, - aux_sym__declaration_chunks, - sym__declaration_chunk, - sym_variable_declaration, - sym_import_declaration, - [3092] = 4, - ACTIONS(272), 1, - anon_sym_var, - ACTIONS(274), 1, - anon_sym_import, - ACTIONS(276), 1, - anon_sym_in, - STATE(81), 4, - aux_sym__declaration_chunks, - sym__declaration_chunk, - sym_variable_declaration, - sym_import_declaration, - [3108] = 4, - ACTIONS(248), 1, - ts_builtin_sym_end, - ACTIONS(272), 1, - anon_sym_var, - ACTIONS(274), 1, - anon_sym_import, - STATE(80), 4, - aux_sym__declaration_chunks, - sym__declaration_chunk, - sym_variable_declaration, - sym_import_declaration, - [3124] = 3, + aux_sym__declaration_chunk_repeat1, + [3154] = 7, + ACTIONS(70), 1, + anon_sym_AMP, + ACTIONS(72), 1, + anon_sym_PIPE, ACTIONS(278), 1, - anon_sym_DQUOTE, - STATE(84), 1, - aux_sym_string_literal_repeat1, - ACTIONS(280), 2, - aux_sym_string_literal_token1, - sym_escape_sequence, - [3135] = 3, - ACTIONS(283), 1, - anon_sym_DQUOTE, - STATE(84), 1, - aux_sym_string_literal_repeat1, - ACTIONS(285), 2, - aux_sym_string_literal_token1, - sym_escape_sequence, - [3146] = 1, - ACTIONS(287), 4, + anon_sym_do, + ACTIONS(62), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(64), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(68), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(66), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [3182] = 7, + ACTIONS(70), 1, + anon_sym_AMP, + ACTIONS(72), 1, + anon_sym_PIPE, + ACTIONS(280), 1, + anon_sym_RBRACK, + ACTIONS(62), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(64), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(68), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(66), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [3210] = 7, + ACTIONS(70), 1, + anon_sym_AMP, + ACTIONS(72), 1, + anon_sym_PIPE, + ACTIONS(282), 1, + anon_sym_to, + ACTIONS(62), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(64), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(68), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(66), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [3238] = 6, + ACTIONS(284), 1, + anon_sym_in, + ACTIONS(286), 1, + anon_sym_function, + ACTIONS(288), 1, + anon_sym_primitive, + ACTIONS(290), 1, + anon_sym_var, + ACTIONS(292), 1, + anon_sym_import, + STATE(79), 7, + aux_sym__declaration_chunks, + sym__declaration_chunk, + sym_function_declaration, + sym_primitive_declaration, + sym_variable_declaration, + sym_import_declaration, + aux_sym__declaration_chunk_repeat1, + [3263] = 6, + ACTIONS(286), 1, + anon_sym_function, + ACTIONS(288), 1, + anon_sym_primitive, + ACTIONS(290), 1, + anon_sym_var, + ACTIONS(292), 1, + anon_sym_import, + ACTIONS(294), 1, + anon_sym_in, + STATE(83), 7, + aux_sym__declaration_chunks, + sym__declaration_chunk, + sym_function_declaration, + sym_primitive_declaration, + sym_variable_declaration, + sym_import_declaration, + aux_sym__declaration_chunk_repeat1, + [3288] = 6, + ACTIONS(260), 1, + ts_builtin_sym_end, + ACTIONS(286), 1, + anon_sym_function, + ACTIONS(288), 1, + anon_sym_primitive, + ACTIONS(290), 1, + anon_sym_var, + ACTIONS(292), 1, + anon_sym_import, + STATE(79), 7, + aux_sym__declaration_chunks, + sym__declaration_chunk, + sym_function_declaration, + sym_primitive_declaration, + sym_variable_declaration, + sym_import_declaration, + aux_sym__declaration_chunk_repeat1, + [3313] = 4, + ACTIONS(298), 1, + anon_sym_function, + ACTIONS(301), 1, + anon_sym_primitive, + STATE(86), 3, + sym_function_declaration, + sym_primitive_declaration, + aux_sym__declaration_chunk_repeat1, + ACTIONS(296), 4, ts_builtin_sym_end, anon_sym_in, anon_sym_var, anon_sym_import, - [3153] = 3, - ACTIONS(289), 1, - anon_sym_SEMI, - STATE(87), 1, - aux_sym_sequence_expression_repeat1, - ACTIONS(242), 2, - anon_sym_RPAREN, - anon_sym_end, - [3164] = 3, - ACTIONS(292), 1, + [3331] = 1, + ACTIONS(304), 7, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_in, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [3341] = 1, + ACTIONS(306), 7, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_in, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [3351] = 1, + ACTIONS(308), 7, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_in, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [3361] = 1, + ACTIONS(310), 7, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_in, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [3371] = 1, + ACTIONS(312), 6, + ts_builtin_sym_end, + anon_sym_in, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [3380] = 1, + ACTIONS(314), 6, + ts_builtin_sym_end, + anon_sym_in, + anon_sym_function, + anon_sym_primitive, + anon_sym_var, + anon_sym_import, + [3389] = 3, + ACTIONS(316), 1, anon_sym_DQUOTE, - STATE(85), 1, + STATE(94), 1, aux_sym_string_literal_repeat1, - ACTIONS(294), 2, + ACTIONS(318), 2, aux_sym_string_literal_token1, sym_escape_sequence, - [3175] = 3, - ACTIONS(236), 1, - anon_sym_COMMA, - ACTIONS(296), 1, - anon_sym_RPAREN, - STATE(90), 1, - aux_sym_function_call_repeat1, - [3185] = 3, - ACTIONS(246), 1, - anon_sym_RPAREN, - ACTIONS(298), 1, - anon_sym_COMMA, - STATE(90), 1, - aux_sym_function_call_repeat1, - [3195] = 3, - ACTIONS(226), 1, - anon_sym_SEMI, - ACTIONS(301), 1, - anon_sym_end, - STATE(87), 1, - aux_sym_sequence_expression_repeat1, - [3205] = 3, - ACTIONS(230), 1, - anon_sym_COMMA, - ACTIONS(303), 1, - anon_sym_RBRACE, + [3400] = 3, + ACTIONS(320), 1, + anon_sym_DQUOTE, STATE(94), 1, - aux_sym_record_expression_repeat1, - [3215] = 3, - ACTIONS(226), 1, + aux_sym_string_literal_repeat1, + ACTIONS(322), 2, + aux_sym_string_literal_token1, + sym_escape_sequence, + [3411] = 3, + ACTIONS(325), 1, anon_sym_SEMI, - ACTIONS(305), 1, - anon_sym_end, - STATE(87), 1, + STATE(95), 1, aux_sym_sequence_expression_repeat1, - [3225] = 3, - ACTIONS(307), 1, - anon_sym_COMMA, - ACTIONS(310), 1, - anon_sym_RBRACE, - STATE(94), 1, - aux_sym_record_expression_repeat1, - [3235] = 3, - ACTIONS(226), 1, - anon_sym_SEMI, - ACTIONS(312), 1, + ACTIONS(240), 2, anon_sym_RPAREN, - STATE(87), 1, + anon_sym_end, + [3422] = 3, + ACTIONS(328), 1, + anon_sym_DQUOTE, + STATE(93), 1, + aux_sym_string_literal_repeat1, + ACTIONS(330), 2, + aux_sym_string_literal_token1, + sym_escape_sequence, + [3433] = 3, + ACTIONS(234), 1, + anon_sym_SEMI, + ACTIONS(332), 1, + anon_sym_end, + STATE(95), 1, aux_sym_sequence_expression_repeat1, - [3245] = 2, - ACTIONS(314), 1, + [3443] = 3, + ACTIONS(334), 1, + anon_sym_COMMA, + ACTIONS(336), 1, + anon_sym_RPAREN, + STATE(106), 1, + aux_sym_parameters_repeat1, + [3453] = 3, + ACTIONS(234), 1, + anon_sym_SEMI, + ACTIONS(338), 1, + anon_sym_RPAREN, + STATE(95), 1, + aux_sym_sequence_expression_repeat1, + [3463] = 3, + ACTIONS(340), 1, + anon_sym_COMMA, + ACTIONS(343), 1, + anon_sym_RBRACE, + STATE(100), 1, + aux_sym_record_expression_repeat1, + [3473] = 3, + ACTIONS(345), 1, sym_identifier, - ACTIONS(316), 1, + ACTIONS(347), 1, + anon_sym_RPAREN, + STATE(98), 1, + sym__typed_field, + [3483] = 3, + ACTIONS(242), 1, + anon_sym_COMMA, + ACTIONS(349), 1, + anon_sym_RPAREN, + STATE(104), 1, + aux_sym_function_call_repeat1, + [3493] = 3, + ACTIONS(351), 1, + anon_sym_COMMA, + ACTIONS(354), 1, + anon_sym_RPAREN, + STATE(103), 1, + aux_sym_parameters_repeat1, + [3503] = 3, + ACTIONS(252), 1, + anon_sym_RPAREN, + ACTIONS(356), 1, + anon_sym_COMMA, + STATE(104), 1, + aux_sym_function_call_repeat1, + [3513] = 3, + ACTIONS(246), 1, + anon_sym_COMMA, + ACTIONS(359), 1, anon_sym_RBRACE, - [3252] = 2, + STATE(100), 1, + aux_sym_record_expression_repeat1, + [3523] = 3, + ACTIONS(334), 1, + anon_sym_COMMA, + ACTIONS(361), 1, + anon_sym_RPAREN, + STATE(103), 1, + aux_sym_parameters_repeat1, + [3533] = 3, + ACTIONS(234), 1, + anon_sym_SEMI, + ACTIONS(363), 1, + anon_sym_end, + STATE(95), 1, + aux_sym_sequence_expression_repeat1, + [3543] = 2, + ACTIONS(345), 1, + sym_identifier, + STATE(115), 1, + sym__typed_field, + [3550] = 1, + ACTIONS(365), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [3555] = 2, + ACTIONS(367), 1, + sym_identifier, + ACTIONS(369), 1, + anon_sym_RBRACE, + [3562] = 2, ACTIONS(9), 1, anon_sym_DQUOTE, - STATE(86), 1, + STATE(91), 1, sym_string_literal, - [3259] = 2, - ACTIONS(318), 1, + [3569] = 2, + ACTIONS(371), 1, + sym_identifier, + STATE(125), 1, + sym__function_declaration_common, + [3576] = 2, + ACTIONS(373), 1, anon_sym_COLON_EQ, - ACTIONS(320), 1, + ACTIONS(375), 1, anon_sym_COLON, - [3266] = 1, - ACTIONS(322), 1, + [3583] = 2, + ACTIONS(371), 1, + sym_identifier, + STATE(92), 1, + sym__function_declaration_common, + [3590] = 1, + ACTIONS(377), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [3595] = 2, + ACTIONS(379), 1, + anon_sym_LPAREN, + STATE(87), 1, + sym_parameters, + [3602] = 1, + ACTIONS(381), 1, + sym_identifier, + [3606] = 1, + ACTIONS(383), 1, + sym_identifier, + [3610] = 1, + ACTIONS(385), 1, + sym_identifier, + [3614] = 1, + ACTIONS(387), 1, + sym_identifier, + [3618] = 1, + ACTIONS(389), 1, + anon_sym_COLON_EQ, + [3622] = 1, + ACTIONS(391), 1, anon_sym_of, - [3270] = 1, - ACTIONS(324), 1, - anon_sym_COLON_EQ, - [3274] = 1, - ACTIONS(326), 1, + [3626] = 1, + ACTIONS(393), 1, sym_identifier, - [3278] = 1, - ACTIONS(328), 1, - anon_sym_COLON_EQ, - [3282] = 1, - ACTIONS(330), 1, - sym_identifier, - [3286] = 1, - ACTIONS(332), 1, - sym_identifier, - [3290] = 1, - ACTIONS(334), 1, + [3630] = 1, + ACTIONS(395), 1, anon_sym_EQ, - [3294] = 1, - ACTIONS(336), 1, + [3634] = 1, + ACTIONS(397), 1, + anon_sym_EQ, + [3638] = 1, + ACTIONS(399), 1, ts_builtin_sym_end, - [3298] = 1, - ACTIONS(338), 1, + [3642] = 1, + ACTIONS(401), 1, + anon_sym_COLON_EQ, + [3646] = 1, + ACTIONS(403), 1, anon_sym_EQ, - [3302] = 1, - ACTIONS(340), 1, - sym_identifier, - [3306] = 1, - ACTIONS(342), 1, + [3650] = 1, + ACTIONS(405), 1, + anon_sym_COLON, + [3654] = 1, + ACTIONS(407), 1, sym_identifier, }; static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(2)] = 0, - [SMALL_STATE(3)] = 42, - [SMALL_STATE(4)] = 76, - [SMALL_STATE(5)] = 110, - [SMALL_STATE(6)] = 150, - [SMALL_STATE(7)] = 203, - [SMALL_STATE(8)] = 256, - [SMALL_STATE(9)] = 309, - [SMALL_STATE(10)] = 362, - [SMALL_STATE(11)] = 412, - [SMALL_STATE(12)] = 462, - [SMALL_STATE(13)] = 512, - [SMALL_STATE(14)] = 562, - [SMALL_STATE(15)] = 612, - [SMALL_STATE(16)] = 662, - [SMALL_STATE(17)] = 712, - [SMALL_STATE(18)] = 762, - [SMALL_STATE(19)] = 812, - [SMALL_STATE(20)] = 862, - [SMALL_STATE(21)] = 912, - [SMALL_STATE(22)] = 962, - [SMALL_STATE(23)] = 1012, - [SMALL_STATE(24)] = 1062, - [SMALL_STATE(25)] = 1112, - [SMALL_STATE(26)] = 1162, - [SMALL_STATE(27)] = 1212, - [SMALL_STATE(28)] = 1262, - [SMALL_STATE(29)] = 1312, - [SMALL_STATE(30)] = 1362, - [SMALL_STATE(31)] = 1412, - [SMALL_STATE(32)] = 1462, - [SMALL_STATE(33)] = 1512, - [SMALL_STATE(34)] = 1562, - [SMALL_STATE(35)] = 1593, - [SMALL_STATE(36)] = 1624, - [SMALL_STATE(37)] = 1655, - [SMALL_STATE(38)] = 1686, - [SMALL_STATE(39)] = 1717, - [SMALL_STATE(40)] = 1758, - [SMALL_STATE(41)] = 1789, - [SMALL_STATE(42)] = 1820, - [SMALL_STATE(43)] = 1851, - [SMALL_STATE(44)] = 1882, - [SMALL_STATE(45)] = 1923, - [SMALL_STATE(46)] = 1966, - [SMALL_STATE(47)] = 1997, - [SMALL_STATE(48)] = 2028, - [SMALL_STATE(49)] = 2059, - [SMALL_STATE(50)] = 2100, - [SMALL_STATE(51)] = 2131, - [SMALL_STATE(52)] = 2172, - [SMALL_STATE(53)] = 2203, - [SMALL_STATE(54)] = 2234, - [SMALL_STATE(55)] = 2265, - [SMALL_STATE(56)] = 2306, - [SMALL_STATE(57)] = 2337, - [SMALL_STATE(58)] = 2370, - [SMALL_STATE(59)] = 2401, - [SMALL_STATE(60)] = 2436, - [SMALL_STATE(61)] = 2473, - [SMALL_STATE(62)] = 2512, - [SMALL_STATE(63)] = 2543, - [SMALL_STATE(64)] = 2574, - [SMALL_STATE(65)] = 2605, - [SMALL_STATE(66)] = 2639, - [SMALL_STATE(67)] = 2673, - [SMALL_STATE(68)] = 2707, - [SMALL_STATE(69)] = 2741, - [SMALL_STATE(70)] = 2775, - [SMALL_STATE(71)] = 2805, - [SMALL_STATE(72)] = 2834, - [SMALL_STATE(73)] = 2863, - [SMALL_STATE(74)] = 2891, - [SMALL_STATE(75)] = 2919, - [SMALL_STATE(76)] = 2947, - [SMALL_STATE(77)] = 2975, - [SMALL_STATE(78)] = 3003, - [SMALL_STATE(79)] = 3031, - [SMALL_STATE(80)] = 3059, - [SMALL_STATE(81)] = 3076, - [SMALL_STATE(82)] = 3092, - [SMALL_STATE(83)] = 3108, - [SMALL_STATE(84)] = 3124, - [SMALL_STATE(85)] = 3135, - [SMALL_STATE(86)] = 3146, - [SMALL_STATE(87)] = 3153, - [SMALL_STATE(88)] = 3164, - [SMALL_STATE(89)] = 3175, - [SMALL_STATE(90)] = 3185, - [SMALL_STATE(91)] = 3195, - [SMALL_STATE(92)] = 3205, - [SMALL_STATE(93)] = 3215, - [SMALL_STATE(94)] = 3225, - [SMALL_STATE(95)] = 3235, - [SMALL_STATE(96)] = 3245, - [SMALL_STATE(97)] = 3252, - [SMALL_STATE(98)] = 3259, - [SMALL_STATE(99)] = 3266, - [SMALL_STATE(100)] = 3270, - [SMALL_STATE(101)] = 3274, - [SMALL_STATE(102)] = 3278, - [SMALL_STATE(103)] = 3282, - [SMALL_STATE(104)] = 3286, - [SMALL_STATE(105)] = 3290, - [SMALL_STATE(106)] = 3294, - [SMALL_STATE(107)] = 3298, - [SMALL_STATE(108)] = 3302, - [SMALL_STATE(109)] = 3306, + [SMALL_STATE(3)] = 44, + [SMALL_STATE(4)] = 80, + [SMALL_STATE(5)] = 116, + [SMALL_STATE(6)] = 158, + [SMALL_STATE(7)] = 201, + [SMALL_STATE(8)] = 234, + [SMALL_STATE(9)] = 267, + [SMALL_STATE(10)] = 310, + [SMALL_STATE(11)] = 343, + [SMALL_STATE(12)] = 376, + [SMALL_STATE(13)] = 409, + [SMALL_STATE(14)] = 442, + [SMALL_STATE(15)] = 475, + [SMALL_STATE(16)] = 508, + [SMALL_STATE(17)] = 551, + [SMALL_STATE(18)] = 584, + [SMALL_STATE(19)] = 617, + [SMALL_STATE(20)] = 660, + [SMALL_STATE(21)] = 705, + [SMALL_STATE(22)] = 758, + [SMALL_STATE(23)] = 791, + [SMALL_STATE(24)] = 824, + [SMALL_STATE(25)] = 857, + [SMALL_STATE(26)] = 900, + [SMALL_STATE(27)] = 933, + [SMALL_STATE(28)] = 986, + [SMALL_STATE(29)] = 1027, + [SMALL_STATE(30)] = 1080, + [SMALL_STATE(31)] = 1119, + [SMALL_STATE(32)] = 1156, + [SMALL_STATE(33)] = 1189, + [SMALL_STATE(34)] = 1224, + [SMALL_STATE(35)] = 1257, + [SMALL_STATE(36)] = 1290, + [SMALL_STATE(37)] = 1323, + [SMALL_STATE(38)] = 1356, + [SMALL_STATE(39)] = 1409, + [SMALL_STATE(40)] = 1459, + [SMALL_STATE(41)] = 1509, + [SMALL_STATE(42)] = 1559, + [SMALL_STATE(43)] = 1609, + [SMALL_STATE(44)] = 1659, + [SMALL_STATE(45)] = 1709, + [SMALL_STATE(46)] = 1759, + [SMALL_STATE(47)] = 1809, + [SMALL_STATE(48)] = 1859, + [SMALL_STATE(49)] = 1909, + [SMALL_STATE(50)] = 1959, + [SMALL_STATE(51)] = 2009, + [SMALL_STATE(52)] = 2059, + [SMALL_STATE(53)] = 2109, + [SMALL_STATE(54)] = 2159, + [SMALL_STATE(55)] = 2209, + [SMALL_STATE(56)] = 2259, + [SMALL_STATE(57)] = 2309, + [SMALL_STATE(58)] = 2359, + [SMALL_STATE(59)] = 2409, + [SMALL_STATE(60)] = 2459, + [SMALL_STATE(61)] = 2509, + [SMALL_STATE(62)] = 2559, + [SMALL_STATE(63)] = 2609, + [SMALL_STATE(64)] = 2659, + [SMALL_STATE(65)] = 2692, + [SMALL_STATE(66)] = 2725, + [SMALL_STATE(67)] = 2758, + [SMALL_STATE(68)] = 2792, + [SMALL_STATE(69)] = 2826, + [SMALL_STATE(70)] = 2856, + [SMALL_STATE(71)] = 2890, + [SMALL_STATE(72)] = 2924, + [SMALL_STATE(73)] = 2958, + [SMALL_STATE(74)] = 2987, + [SMALL_STATE(75)] = 3016, + [SMALL_STATE(76)] = 3044, + [SMALL_STATE(77)] = 3072, + [SMALL_STATE(78)] = 3100, + [SMALL_STATE(79)] = 3128, + [SMALL_STATE(80)] = 3154, + [SMALL_STATE(81)] = 3182, + [SMALL_STATE(82)] = 3210, + [SMALL_STATE(83)] = 3238, + [SMALL_STATE(84)] = 3263, + [SMALL_STATE(85)] = 3288, + [SMALL_STATE(86)] = 3313, + [SMALL_STATE(87)] = 3331, + [SMALL_STATE(88)] = 3341, + [SMALL_STATE(89)] = 3351, + [SMALL_STATE(90)] = 3361, + [SMALL_STATE(91)] = 3371, + [SMALL_STATE(92)] = 3380, + [SMALL_STATE(93)] = 3389, + [SMALL_STATE(94)] = 3400, + [SMALL_STATE(95)] = 3411, + [SMALL_STATE(96)] = 3422, + [SMALL_STATE(97)] = 3433, + [SMALL_STATE(98)] = 3443, + [SMALL_STATE(99)] = 3453, + [SMALL_STATE(100)] = 3463, + [SMALL_STATE(101)] = 3473, + [SMALL_STATE(102)] = 3483, + [SMALL_STATE(103)] = 3493, + [SMALL_STATE(104)] = 3503, + [SMALL_STATE(105)] = 3513, + [SMALL_STATE(106)] = 3523, + [SMALL_STATE(107)] = 3533, + [SMALL_STATE(108)] = 3543, + [SMALL_STATE(109)] = 3550, + [SMALL_STATE(110)] = 3555, + [SMALL_STATE(111)] = 3562, + [SMALL_STATE(112)] = 3569, + [SMALL_STATE(113)] = 3576, + [SMALL_STATE(114)] = 3583, + [SMALL_STATE(115)] = 3590, + [SMALL_STATE(116)] = 3595, + [SMALL_STATE(117)] = 3602, + [SMALL_STATE(118)] = 3606, + [SMALL_STATE(119)] = 3610, + [SMALL_STATE(120)] = 3614, + [SMALL_STATE(121)] = 3618, + [SMALL_STATE(122)] = 3622, + [SMALL_STATE(123)] = 3626, + [SMALL_STATE(124)] = 3630, + [SMALL_STATE(125)] = 3634, + [SMALL_STATE(126)] = 3638, + [SMALL_STATE(127)] = 3642, + [SMALL_STATE(128)] = 3646, + [SMALL_STATE(129)] = 3650, + [SMALL_STATE(130)] = 3654, }; static const TSParseActionEntry ts_parse_actions[] = { @@ -4119,171 +4611,201 @@ static const TSParseActionEntry ts_parse_actions[] = { [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), [3] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 0), [5] = {.entry = {.count = 1, .reusable = false}}, SHIFT(2), - [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(73), - [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), - [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), - [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), - [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(27), - [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(22), - [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(109), - [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(82), - [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(108), - [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(97), - [27] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__lvalue, 1), - [29] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__lvalue, 1), SHIFT(18), - [32] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), - [34] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__lvalue, 1), - [36] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), - [38] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_value, 3, .production_id = 6), - [40] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_value, 3, .production_id = 6), - [42] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_value, 4, .production_id = 14), - [44] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_value, 4, .production_id = 14), - [46] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr, 1), - [48] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), - [50] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), - [52] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr, 1), - [54] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), - [56] = {.entry = {.count = 1, .reusable = false}}, SHIFT(67), - [58] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), - [60] = {.entry = {.count = 1, .reusable = false}}, SHIFT(69), - [62] = {.entry = {.count = 1, .reusable = false}}, SHIFT(53), - [64] = {.entry = {.count = 1, .reusable = false}}, SHIFT(68), - [66] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), - [68] = {.entry = {.count = 1, .reusable = false}}, SHIFT(65), - [70] = {.entry = {.count = 1, .reusable = false}}, SHIFT(41), - [72] = {.entry = {.count = 1, .reusable = false}}, SHIFT(44), - [74] = {.entry = {.count = 1, .reusable = false}}, SHIFT(70), - [76] = {.entry = {.count = 1, .reusable = false}}, SHIFT(49), - [78] = {.entry = {.count = 1, .reusable = false}}, SHIFT(64), - [80] = {.entry = {.count = 1, .reusable = false}}, SHIFT(66), - [82] = {.entry = {.count = 1, .reusable = false}}, SHIFT(75), - [84] = {.entry = {.count = 1, .reusable = false}}, SHIFT(60), - [86] = {.entry = {.count = 1, .reusable = false}}, SHIFT(45), - [88] = {.entry = {.count = 1, .reusable = false}}, SHIFT(77), - [90] = {.entry = {.count = 1, .reusable = false}}, SHIFT(72), - [92] = {.entry = {.count = 1, .reusable = false}}, SHIFT(63), - [94] = {.entry = {.count = 1, .reusable = false}}, SHIFT(71), - [96] = {.entry = {.count = 1, .reusable = false}}, SHIFT(79), - [98] = {.entry = {.count = 1, .reusable = false}}, SHIFT(62), - [100] = {.entry = {.count = 1, .reusable = false}}, SHIFT(76), - [102] = {.entry = {.count = 1, .reusable = false}}, SHIFT(74), - [104] = {.entry = {.count = 1, .reusable = false}}, SHIFT(55), - [106] = {.entry = {.count = 1, .reusable = false}}, SHIFT(78), - [108] = {.entry = {.count = 1, .reusable = false}}, SHIFT(61), - [110] = {.entry = {.count = 1, .reusable = false}}, SHIFT(51), - [112] = {.entry = {.count = 1, .reusable = false}}, SHIFT(39), - [114] = {.entry = {.count = 1, .reusable = false}}, SHIFT(57), - [116] = {.entry = {.count = 1, .reusable = false}}, SHIFT(58), - [118] = {.entry = {.count = 1, .reusable = false}}, SHIFT(59), - [120] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 2), - [122] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 2), - [124] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 4), - [126] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 4), - [128] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 7, .production_id = 23), - [130] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 7, .production_id = 23), - [132] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 5, .production_id = 15), - [134] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 5, .production_id = 15), - [136] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 5, .production_id = 16), - [138] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 5, .production_id = 16), + [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(77), + [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), + [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(57), + [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(63), + [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(117), + [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(84), + [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(112), + [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(114), + [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(120), + [29] = {.entry = {.count = 1, .reusable = false}}, SHIFT(111), + [31] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__lvalue, 1), + [33] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__lvalue, 1), SHIFT(50), + [36] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [38] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__lvalue, 1), + [40] = {.entry = {.count = 1, .reusable = true}}, SHIFT(110), + [42] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_value, 4, .production_id = 17), + [44] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_value, 4, .production_id = 17), + [46] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_value, 3, .production_id = 8), + [48] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_value, 3, .production_id = 8), + [50] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr, 1), + [52] = {.entry = {.count = 1, .reusable = true}}, SHIFT(130), + [54] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), + [56] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr, 1), + [58] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), + [60] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_expression, 6, .production_id = 22), + [62] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), + [64] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), + [66] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), + [68] = {.entry = {.count = 1, .reusable = false}}, SHIFT(44), + [70] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), + [72] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), + [74] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 2), + [76] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 2), + [78] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 6, .production_id = 25), + [80] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 6, .production_id = 25), + [82] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_expression, 6, .production_id = 24), + [84] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 6, .production_id = 23), + [86] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 6, .production_id = 23), + [88] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 3), + [90] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 3), + [92] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 5, .production_id = 20), + [94] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 5, .production_id = 20), + [96] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 5, .production_id = 19), + [98] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 5, .production_id = 19), + [100] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 5, .production_id = 18), + [102] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 5, .production_id = 18), + [104] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 4, .production_id = 14), + [106] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 4, .production_id = 14), + [108] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_expression, 8, .production_id = 33), + [110] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 4, .production_id = 13), + [112] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 4, .production_id = 13), + [114] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 2), + [116] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 2), + [118] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_expression, 4, .production_id = 12), + [120] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_expression, 4, .production_id = 11), + [122] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), + [124] = {.entry = {.count = 1, .reusable = false}}, SHIFT(70), + [126] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), + [128] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 4), + [130] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 4), + [132] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 7, .production_id = 31), + [134] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 7, .production_id = 31), + [136] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 4, .production_id = 10), + [138] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 4, .production_id = 10), [140] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_expression, 2, .production_id = 1), - [142] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), - [144] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), - [146] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), - [148] = {.entry = {.count = 1, .reusable = false}}, SHIFT(33), - [150] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), - [152] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), - [154] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 3), - [156] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 3), - [158] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 4, .production_id = 12), - [160] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 4, .production_id = 12), - [162] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 4, .production_id = 11), - [164] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 4, .production_id = 11), - [166] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 3, .production_id = 3), - [168] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 3, .production_id = 3), - [170] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_expression, 4, .production_id = 10), - [172] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_expression, 4, .production_id = 9), - [174] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), - [176] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 3, .production_id = 4), - [178] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 3, .production_id = 4), - [180] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 3), - [182] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 3), - [184] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 5, .production_id = 17), - [186] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 5, .production_id = 17), - [188] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_expression, 8, .production_id = 25), - [190] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 2), - [192] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 2), - [194] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_expression, 6, .production_id = 18), - [196] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 4, .production_id = 8), - [198] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 4, .production_id = 8), - [200] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 3), - [202] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 3), - [204] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 6, .production_id = 19), - [206] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 6, .production_id = 19), - [208] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_expression, 6, .production_id = 20), - [210] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_expression, 6, .production_id = 21), - [212] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_expression, 6, .production_id = 21), - [214] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, .production_id = 5), - [216] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, .production_id = 5), - [218] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment_expression, 3, .production_id = 7), - [220] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment_expression, 3, .production_id = 7), - [222] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_declaration, 6, .production_id = 22), - [224] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_declaration, 4, .production_id = 13), - [226] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), - [228] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), - [230] = {.entry = {.count = 1, .reusable = true}}, SHIFT(103), - [232] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), - [234] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), - [236] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), - [238] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), - [240] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), - [242] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), - [244] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 4, .production_id = 26), - [246] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), - [248] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), + [142] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment_expression, 3, .production_id = 9), + [144] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment_expression, 3, .production_id = 9), + [146] = {.entry = {.count = 1, .reusable = false}}, SHIFT(68), + [148] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), + [150] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, .production_id = 7), + [152] = {.entry = {.count = 1, .reusable = false}}, SHIFT(67), + [154] = {.entry = {.count = 1, .reusable = false}}, SHIFT(11), + [156] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, .production_id = 7), + [158] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 3), + [160] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 3), + [162] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 3, .production_id = 5), + [164] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 3, .production_id = 5), + [166] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 3), + [168] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 3), + [170] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 3, .production_id = 4), + [172] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 3, .production_id = 4), + [174] = {.entry = {.count = 1, .reusable = false}}, SHIFT(72), + [176] = {.entry = {.count = 1, .reusable = false}}, SHIFT(15), + [178] = {.entry = {.count = 1, .reusable = false}}, SHIFT(6), + [180] = {.entry = {.count = 1, .reusable = false}}, SHIFT(69), + [182] = {.entry = {.count = 1, .reusable = false}}, SHIFT(71), + [184] = {.entry = {.count = 1, .reusable = false}}, SHIFT(33), + [186] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32), + [188] = {.entry = {.count = 1, .reusable = false}}, SHIFT(31), + [190] = {.entry = {.count = 1, .reusable = false}}, SHIFT(30), + [192] = {.entry = {.count = 1, .reusable = false}}, SHIFT(28), + [194] = {.entry = {.count = 1, .reusable = false}}, SHIFT(25), + [196] = {.entry = {.count = 1, .reusable = false}}, SHIFT(75), + [198] = {.entry = {.count = 1, .reusable = false}}, SHIFT(26), + [200] = {.entry = {.count = 1, .reusable = false}}, SHIFT(81), + [202] = {.entry = {.count = 1, .reusable = false}}, SHIFT(73), + [204] = {.entry = {.count = 1, .reusable = false}}, SHIFT(74), + [206] = {.entry = {.count = 1, .reusable = false}}, SHIFT(9), + [208] = {.entry = {.count = 1, .reusable = false}}, SHIFT(80), + [210] = {.entry = {.count = 1, .reusable = false}}, SHIFT(16), + [212] = {.entry = {.count = 1, .reusable = false}}, SHIFT(64), + [214] = {.entry = {.count = 1, .reusable = false}}, SHIFT(76), + [216] = {.entry = {.count = 1, .reusable = false}}, SHIFT(20), + [218] = {.entry = {.count = 1, .reusable = false}}, SHIFT(19), + [220] = {.entry = {.count = 1, .reusable = false}}, SHIFT(82), + [222] = {.entry = {.count = 1, .reusable = false}}, SHIFT(65), + [224] = {.entry = {.count = 1, .reusable = false}}, SHIFT(66), + [226] = {.entry = {.count = 1, .reusable = false}}, SHIFT(78), + [228] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_declaration, 6, .production_id = 30), + [230] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_declaration, 4, .production_id = 16), + [232] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 4, .production_id = 15), + [234] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), + [236] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), + [238] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), + [240] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), + [242] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), + [244] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [246] = {.entry = {.count = 1, .reusable = true}}, SHIFT(123), + [248] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), [250] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), - [252] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), - [254] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), - [256] = {.entry = {.count = 1, .reusable = true}}, SHIFT(99), - [258] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), - [260] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), - [262] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), - [264] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(108), - [267] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(97), - [270] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), - [272] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), - [274] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), - [276] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), - [278] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_string_literal_repeat1, 2), - [280] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_string_literal_repeat1, 2), SHIFT_REPEAT(84), - [283] = {.entry = {.count = 1, .reusable = false}}, SHIFT(40), - [285] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), - [287] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_declaration, 2, .production_id = 2), - [289] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), SHIFT_REPEAT(11), - [292] = {.entry = {.count = 1, .reusable = false}}, SHIFT(34), - [294] = {.entry = {.count = 1, .reusable = true}}, SHIFT(85), - [296] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), - [298] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), SHIFT_REPEAT(19), - [301] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), - [303] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), - [305] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), - [307] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 24), SHIFT_REPEAT(103), - [310] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 24), - [312] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), - [314] = {.entry = {.count = 1, .reusable = true}}, SHIFT(105), - [316] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), - [318] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), - [320] = {.entry = {.count = 1, .reusable = false}}, SHIFT(104), - [322] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), - [324] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), - [326] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [328] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), - [330] = {.entry = {.count = 1, .reusable = true}}, SHIFT(107), - [332] = {.entry = {.count = 1, .reusable = true}}, SHIFT(102), - [334] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), - [336] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [338] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), - [340] = {.entry = {.count = 1, .reusable = true}}, SHIFT(98), - [342] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), + [252] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), + [254] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 4, .production_id = 34), + [256] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), + [258] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), + [260] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), + [262] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), + [264] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), + [266] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(112), + [269] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(114), + [272] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(120), + [275] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunks, 2), SHIFT_REPEAT(111), + [278] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), + [280] = {.entry = {.count = 1, .reusable = true}}, SHIFT(122), + [282] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [284] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), + [286] = {.entry = {.count = 1, .reusable = true}}, SHIFT(112), + [288] = {.entry = {.count = 1, .reusable = true}}, SHIFT(114), + [290] = {.entry = {.count = 1, .reusable = true}}, SHIFT(120), + [292] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), + [294] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), + [296] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__declaration_chunk_repeat1, 2), + [298] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunk_repeat1, 2), SHIFT_REPEAT(112), + [301] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__declaration_chunk_repeat1, 2), SHIFT_REPEAT(114), + [304] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_declaration_common, 2, .production_id = 6), + [306] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 2), + [308] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 4, .production_id = 28), + [310] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 3, .production_id = 21), + [312] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_declaration, 2, .production_id = 3), + [314] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_primitive_declaration, 2, .production_id = 2), + [316] = {.entry = {.count = 1, .reusable = false}}, SHIFT(34), + [318] = {.entry = {.count = 1, .reusable = true}}, SHIFT(94), + [320] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_string_literal_repeat1, 2), + [322] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_string_literal_repeat1, 2), SHIFT_REPEAT(94), + [325] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), SHIFT_REPEAT(40), + [328] = {.entry = {.count = 1, .reusable = false}}, SHIFT(18), + [330] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), + [332] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), + [334] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), + [336] = {.entry = {.count = 1, .reusable = true}}, SHIFT(90), + [338] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [340] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 32), SHIFT_REPEAT(123), + [343] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 32), + [345] = {.entry = {.count = 1, .reusable = true}}, SHIFT(129), + [347] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), + [349] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), + [351] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_parameters_repeat1, 2, .production_id = 29), SHIFT_REPEAT(108), + [354] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_parameters_repeat1, 2, .production_id = 29), + [356] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), SHIFT_REPEAT(51), + [359] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [361] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), + [363] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), + [365] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__typed_field, 3, .production_id = 26), + [367] = {.entry = {.count = 1, .reusable = true}}, SHIFT(128), + [369] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), + [371] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), + [373] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), + [375] = {.entry = {.count = 1, .reusable = false}}, SHIFT(118), + [377] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_parameters_repeat1, 2, .production_id = 27), + [379] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), + [381] = {.entry = {.count = 1, .reusable = true}}, SHIFT(121), + [383] = {.entry = {.count = 1, .reusable = true}}, SHIFT(127), + [385] = {.entry = {.count = 1, .reusable = true}}, SHIFT(109), + [387] = {.entry = {.count = 1, .reusable = true}}, SHIFT(113), + [389] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), + [391] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), + [393] = {.entry = {.count = 1, .reusable = true}}, SHIFT(124), + [395] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), + [397] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), + [399] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [401] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), + [403] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), + [405] = {.entry = {.count = 1, .reusable = true}}, SHIFT(119), + [407] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), }; #ifdef __cplusplus diff --git a/test/corpus/declarations.txt b/test/corpus/declarations.txt index a631caa..fce8c7f 100644 --- a/test/corpus/declarations.txt +++ b/test/corpus/declarations.txt @@ -6,6 +6,67 @@ Empty declarations (source_file) +================================================================================ +Function declaration +================================================================================ + +function func(a: int, b: int) = "string" + +-------------------------------------------------------------------------------- + +(source_file + (function_declaration + name: (identifier) + parameters: (parameters + name: (identifier) + type: (identifier) + name: (identifier) + type: (identifier)) + body: (string_literal))) + +================================================================================ +Function declaration single parameter +================================================================================ + +function func(a: int) = "string" + +-------------------------------------------------------------------------------- + +(source_file + (function_declaration + name: (identifier) + parameters: (parameters + name: (identifier) + type: (identifier)) + body: (string_literal))) + +================================================================================ +Function declaration no parameters +================================================================================ + +function func() = "string" + +-------------------------------------------------------------------------------- + +(source_file + (function_declaration + name: (identifier) + parameters: (parameters) + body: (string_literal))) + +================================================================================ +Primitive declaration +================================================================================ + +primitive prim() + +-------------------------------------------------------------------------------- + +(source_file + (primitive_declaration + name: (identifier) + parameters: (parameters))) + ================================================================================ Variable declaration ================================================================================