From 26999482a3c25a2a71c61f356b41dd524b0e35c2 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 1 Jun 2022 20:19:56 +0200 Subject: [PATCH] Add while expressions --- grammar.js | 8 + src/grammar.json | 33 + src/node-types.json | 202 +++ src/parser.c | 2875 +++++++++++++++++++--------------- test/corpus/control_flow.txt | 13 + 5 files changed, 1825 insertions(+), 1306 deletions(-) diff --git a/grammar.js b/grammar.js index b49ace8..68ddccd 100644 --- a/grammar.js +++ b/grammar.js @@ -49,6 +49,7 @@ module.exports = grammar({ $.assignment_expression, $.if_expression, + $.while_expression, ), nil_literal: (_) => "nil", @@ -184,6 +185,13 @@ module.exports = grammar({ ), ), ), + + while_expression: ($) => seq( + "while", + field("condition", $._expr), + "do", + field("body", $._expr), + ), } }); diff --git a/src/grammar.json b/src/grammar.json index 0f8ee30..db0911b 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -61,6 +61,10 @@ { "type": "SYMBOL", "name": "if_expression" + }, + { + "type": "SYMBOL", + "name": "while_expression" } ] }, @@ -847,6 +851,35 @@ } ] } + }, + "while_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "while" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "_expr" + } + }, + { + "type": "STRING", + "value": "do" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_expr" + } + } + ] } }, "extras": [ diff --git a/src/node-types.json b/src/node-types.json index 013d360..fe74fb9 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -62,6 +62,10 @@ { "type": "unary_expression", "named": true + }, + { + "type": "while_expression", + "named": true } ] }, @@ -124,6 +128,10 @@ { "type": "unary_expression", "named": true + }, + { + "type": "while_expression", + "named": true } ] }, @@ -220,6 +228,10 @@ { "type": "unary_expression", "named": true + }, + { + "type": "while_expression", + "named": true } ] } @@ -306,6 +318,10 @@ { "type": "unary_expression", "named": true + }, + { + "type": "while_expression", + "named": true } ] } @@ -374,6 +390,10 @@ { "type": "unary_expression", "named": true + }, + { + "type": "while_expression", + "named": true } ] }, @@ -446,6 +466,10 @@ { "type": "unary_expression", "named": true + }, + { + "type": "while_expression", + "named": true } ] } @@ -518,6 +542,10 @@ { "type": "unary_expression", "named": true + }, + { + "type": "while_expression", + "named": true } ] }, @@ -596,6 +624,10 @@ { "type": "unary_expression", "named": true + }, + { + "type": "while_expression", + "named": true } ] }, @@ -658,6 +690,10 @@ { "type": "unary_expression", "named": true + }, + { + "type": "while_expression", + "named": true } ] }, @@ -720,6 +756,10 @@ { "type": "unary_expression", "named": true + }, + { + "type": "while_expression", + "named": true } ] } @@ -798,6 +838,10 @@ { "type": "unary_expression", "named": true + }, + { + "type": "while_expression", + "named": true } ] }, @@ -910,6 +954,10 @@ { "type": "unary_expression", "named": true + }, + { + "type": "while_expression", + "named": true } ] } @@ -977,6 +1025,10 @@ { "type": "unary_expression", "named": true + }, + { + "type": "while_expression", + "named": true } ] } @@ -1059,6 +1111,10 @@ { "type": "unary_expression", "named": true + }, + { + "type": "while_expression", + "named": true } ] }, @@ -1074,6 +1130,144 @@ } } }, + { + "type": "while_expression", + "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": "function_call", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "if_expression", + "named": true + }, + { + "type": "integer_literal", + "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 + } + ] + }, + "condition": { + "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": "function_call", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "if_expression", + "named": true + }, + { + "type": "integer_literal", + "named": true + }, + { + "type": "nil_literal", + "named": true + }, + { + "type": "record_expression", + "named": true + }, + { + "type": "record_value", + "named": true + }, + { + "type": "sequence_expression", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "unary_expression", + "named": true + }, + { + "type": "while_expression", + "named": true + } + ] + } + } + }, { "type": "\"", "named": false @@ -1114,6 +1308,10 @@ "type": "]", "named": false }, + { + "type": "do", + "named": false + }, { "type": "else", "named": false @@ -1150,6 +1348,10 @@ "type": "then", "named": false }, + { + "type": "while", + "named": false + }, { "type": "{", "named": false diff --git a/src/parser.c b/src/parser.c index 8ebd70b..8682efc 100644 --- a/src/parser.c +++ b/src/parser.c @@ -6,15 +6,15 @@ #endif #define LANGUAGE_VERSION 13 -#define STATE_COUNT 72 +#define STATE_COUNT 76 #define LARGE_STATE_COUNT 2 -#define SYMBOL_COUNT 51 +#define SYMBOL_COUNT 54 #define ALIAS_COUNT 0 -#define TOKEN_COUNT 33 +#define TOKEN_COUNT 35 #define EXTERNAL_TOKEN_COUNT 0 -#define FIELD_COUNT 16 +#define FIELD_COUNT 17 #define MAX_ALIAS_SEQUENCE_LENGTH 7 -#define PRODUCTION_ID_COUNT 17 +#define PRODUCTION_ID_COUNT 18 enum { sym_identifier = 1, @@ -49,24 +49,27 @@ enum { anon_sym_if = 30, anon_sym_then = 31, anon_sym_else = 32, - sym_source_file = 33, - sym__expr = 34, - sym_string_literal = 35, - sym__lvalue = 36, - sym_record_value = 37, - sym_array_value = 38, - sym_function_call = 39, - sym_unary_expression = 40, - sym_binary_expression = 41, - sym_sequence_expression = 42, - sym_array_expression = 43, - sym_record_expression = 44, - sym_assignment_expression = 45, - sym_if_expression = 46, - aux_sym_string_literal_repeat1 = 47, - aux_sym_function_call_repeat1 = 48, - aux_sym_sequence_expression_repeat1 = 49, - aux_sym_record_expression_repeat1 = 50, + anon_sym_while = 33, + anon_sym_do = 34, + sym_source_file = 35, + sym__expr = 36, + sym_string_literal = 37, + sym__lvalue = 38, + sym_record_value = 39, + sym_array_value = 40, + sym_function_call = 41, + sym_unary_expression = 42, + sym_binary_expression = 43, + sym_sequence_expression = 44, + sym_array_expression = 45, + sym_record_expression = 46, + sym_assignment_expression = 47, + sym_if_expression = 48, + sym_while_expression = 49, + aux_sym_string_literal_repeat1 = 50, + aux_sym_function_call_repeat1 = 51, + aux_sym_sequence_expression_repeat1 = 52, + aux_sym_record_expression_repeat1 = 53, }; static const char * const ts_symbol_names[] = { @@ -103,6 +106,8 @@ static const char * const ts_symbol_names[] = { [anon_sym_if] = "if", [anon_sym_then] = "then", [anon_sym_else] = "else", + [anon_sym_while] = "while", + [anon_sym_do] = "do", [sym_source_file] = "source_file", [sym__expr] = "_expr", [sym_string_literal] = "string_literal", @@ -117,6 +122,7 @@ static const char * const ts_symbol_names[] = { [sym_record_expression] = "record_expression", [sym_assignment_expression] = "assignment_expression", [sym_if_expression] = "if_expression", + [sym_while_expression] = "while_expression", [aux_sym_string_literal_repeat1] = "string_literal_repeat1", [aux_sym_function_call_repeat1] = "function_call_repeat1", [aux_sym_sequence_expression_repeat1] = "sequence_expression_repeat1", @@ -157,6 +163,8 @@ static const TSSymbol ts_symbol_map[] = { [anon_sym_if] = anon_sym_if, [anon_sym_then] = anon_sym_then, [anon_sym_else] = anon_sym_else, + [anon_sym_while] = anon_sym_while, + [anon_sym_do] = anon_sym_do, [sym_source_file] = sym_source_file, [sym__expr] = sym__expr, [sym_string_literal] = sym_string_literal, @@ -171,6 +179,7 @@ static const TSSymbol ts_symbol_map[] = { [sym_record_expression] = sym_record_expression, [sym_assignment_expression] = sym_assignment_expression, [sym_if_expression] = sym_if_expression, + [sym_while_expression] = sym_while_expression, [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, @@ -310,6 +319,14 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, + [anon_sym_while] = { + .visible = true, + .named = false, + }, + [anon_sym_do] = { + .visible = true, + .named = false, + }, [sym_source_file] = { .visible = true, .named = true, @@ -366,6 +383,10 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, + [sym_while_expression] = { + .visible = true, + .named = true, + }, [aux_sym_string_literal_repeat1] = { .visible = false, .named = false, @@ -388,19 +409,20 @@ enum { field_alternative = 1, field_arguments = 2, field_array = 3, - field_condition = 4, - field_consequence = 5, - field_expression = 6, - field_field = 7, - field_function = 8, - field_index = 9, - field_init = 10, - field_left = 11, - field_operator = 12, - field_record = 13, - field_right = 14, - field_size = 15, - field_type = 16, + field_body = 4, + field_condition = 5, + field_consequence = 6, + field_expression = 7, + field_field = 8, + field_function = 9, + field_index = 10, + field_init = 11, + field_left = 12, + field_operator = 13, + field_record = 14, + field_right = 15, + field_size = 16, + field_type = 17, }; static const char * const ts_field_names[] = { @@ -408,6 +430,7 @@ static const char * const ts_field_names[] = { [field_alternative] = "alternative", [field_arguments] = "arguments", [field_array] = "array", + [field_body] = "body", [field_condition] = "condition", [field_consequence] = "consequence", [field_expression] = "expression", @@ -433,13 +456,14 @@ static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { [7] = {.index = 11, .length = 2}, [8] = {.index = 13, .length = 2}, [9] = {.index = 15, .length = 2}, - [10] = {.index = 17, .length = 3}, - [11] = {.index = 20, .length = 3}, - [12] = {.index = 23, .length = 3}, - [13] = {.index = 26, .length = 3}, - [14] = {.index = 29, .length = 5}, - [15] = {.index = 34, .length = 4}, - [16] = {.index = 38, .length = 2}, + [10] = {.index = 17, .length = 2}, + [11] = {.index = 19, .length = 3}, + [12] = {.index = 22, .length = 3}, + [13] = {.index = 25, .length = 3}, + [14] = {.index = 28, .length = 3}, + [15] = {.index = 31, .length = 5}, + [16] = {.index = 36, .length = 4}, + [17] = {.index = 40, .length = 2}, }; static const TSFieldMapEntry ts_field_map_entries[] = { @@ -467,36 +491,39 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_condition, 1}, {field_consequence, 3}, [15] = + {field_body, 3}, + {field_condition, 1}, + [17] = {field_array, 0}, {field_index, 2}, - [17] = + [19] = {field_arguments, 2}, {field_arguments, 3}, {field_function, 0}, - [20] = + [22] = {field_init, 5}, {field_size, 2}, {field_type, 0}, - [23] = + [25] = {field_field, 2}, {field_init, 4}, {field_type, 0}, - [26] = + [28] = {field_alternative, 5}, {field_condition, 1}, {field_consequence, 3}, - [29] = + [31] = {field_field, 2}, {field_field, 5, .inherited = true}, {field_init, 4}, {field_init, 5, .inherited = true}, {field_type, 0}, - [34] = + [36] = {field_field, 0, .inherited = true}, {field_field, 1, .inherited = true}, {field_init, 0, .inherited = true}, {field_init, 1, .inherited = true}, - [38] = + [40] = {field_field, 1}, {field_init, 3}, }; @@ -768,61 +795,84 @@ static bool ts_lex_keywords(TSLexer *lexer, TSStateId state) { eof = lexer->eof(lexer); switch (state) { case 0: - if (lookahead == 'e') ADVANCE(1); - if (lookahead == 'i') ADVANCE(2); - if (lookahead == 'n') ADVANCE(3); - if (lookahead == 'o') ADVANCE(4); - if (lookahead == 't') ADVANCE(5); + if (lookahead == 'd') ADVANCE(1); + if (lookahead == 'e') ADVANCE(2); + if (lookahead == 'i') ADVANCE(3); + if (lookahead == 'n') ADVANCE(4); + if (lookahead == 'o') ADVANCE(5); + if (lookahead == 't') ADVANCE(6); + if (lookahead == 'w') ADVANCE(7); if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || lookahead == ' ') SKIP(0) END_STATE(); case 1: - if (lookahead == 'l') ADVANCE(6); + if (lookahead == 'o') ADVANCE(8); END_STATE(); case 2: - if (lookahead == 'f') ADVANCE(7); + if (lookahead == 'l') ADVANCE(9); END_STATE(); case 3: - if (lookahead == 'i') ADVANCE(8); + if (lookahead == 'f') ADVANCE(10); END_STATE(); case 4: - if (lookahead == 'f') ADVANCE(9); + if (lookahead == 'i') ADVANCE(11); END_STATE(); case 5: - if (lookahead == 'h') ADVANCE(10); + if (lookahead == 'f') ADVANCE(12); END_STATE(); case 6: - if (lookahead == 's') ADVANCE(11); + if (lookahead == 'h') ADVANCE(13); END_STATE(); case 7: - ACCEPT_TOKEN(anon_sym_if); + if (lookahead == 'h') ADVANCE(14); END_STATE(); case 8: - if (lookahead == 'l') ADVANCE(12); + ACCEPT_TOKEN(anon_sym_do); END_STATE(); case 9: - ACCEPT_TOKEN(anon_sym_of); + if (lookahead == 's') ADVANCE(15); END_STATE(); case 10: - if (lookahead == 'e') ADVANCE(13); + ACCEPT_TOKEN(anon_sym_if); END_STATE(); case 11: - if (lookahead == 'e') ADVANCE(14); + if (lookahead == 'l') ADVANCE(16); END_STATE(); case 12: - ACCEPT_TOKEN(sym_nil_literal); + ACCEPT_TOKEN(anon_sym_of); END_STATE(); case 13: - if (lookahead == 'n') ADVANCE(15); + if (lookahead == 'e') ADVANCE(17); END_STATE(); case 14: - ACCEPT_TOKEN(anon_sym_else); + if (lookahead == 'i') ADVANCE(18); END_STATE(); case 15: + if (lookahead == 'e') ADVANCE(19); + END_STATE(); + case 16: + ACCEPT_TOKEN(sym_nil_literal); + END_STATE(); + case 17: + if (lookahead == 'n') ADVANCE(20); + END_STATE(); + case 18: + if (lookahead == 'l') ADVANCE(21); + END_STATE(); + case 19: + ACCEPT_TOKEN(anon_sym_else); + END_STATE(); + case 20: ACCEPT_TOKEN(anon_sym_then); END_STATE(); + case 21: + if (lookahead == 'e') ADVANCE(22); + END_STATE(); + case 22: + ACCEPT_TOKEN(anon_sym_while); + END_STATE(); default: return false; } @@ -840,67 +890,71 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [8] = {.lex_state = 0}, [9] = {.lex_state = 0}, [10] = {.lex_state = 0}, - [11] = {.lex_state = 9}, - [12] = {.lex_state = 9}, + [11] = {.lex_state = 0}, + [12] = {.lex_state = 0}, [13] = {.lex_state = 0}, - [14] = {.lex_state = 9}, - [15] = {.lex_state = 9}, - [16] = {.lex_state = 9}, - [17] = {.lex_state = 9}, - [18] = {.lex_state = 9}, + [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}, [21] = {.lex_state = 0}, [22] = {.lex_state = 0}, [23] = {.lex_state = 0}, - [24] = {.lex_state = 9}, + [24] = {.lex_state = 0}, [25] = {.lex_state = 0}, [26] = {.lex_state = 0}, [27] = {.lex_state = 9}, [28] = {.lex_state = 9}, - [29] = {.lex_state = 0}, + [29] = {.lex_state = 9}, [30] = {.lex_state = 9}, [31] = {.lex_state = 9}, - [32] = {.lex_state = 0}, + [32] = {.lex_state = 9}, [33] = {.lex_state = 9}, [34] = {.lex_state = 9}, - [35] = {.lex_state = 0}, + [35] = {.lex_state = 9}, [36] = {.lex_state = 9}, [37] = {.lex_state = 9}, - [38] = {.lex_state = 0}, + [38] = {.lex_state = 9}, [39] = {.lex_state = 9}, [40] = {.lex_state = 9}, [41] = {.lex_state = 9}, [42] = {.lex_state = 9}, - [43] = {.lex_state = 0}, - [44] = {.lex_state = 0}, + [43] = {.lex_state = 9}, + [44] = {.lex_state = 9}, [45] = {.lex_state = 9}, - [46] = {.lex_state = 0}, - [47] = {.lex_state = 0}, - [48] = {.lex_state = 0}, + [46] = {.lex_state = 9}, + [47] = {.lex_state = 9}, + [48] = {.lex_state = 9}, [49] = {.lex_state = 0}, [50] = {.lex_state = 0}, [51] = {.lex_state = 0}, [52] = {.lex_state = 0}, [53] = {.lex_state = 0}, - [54] = {.lex_state = 9}, - [55] = {.lex_state = 0}, - [56] = {.lex_state = 1}, - [57] = {.lex_state = 1}, - [58] = {.lex_state = 1}, + [54] = {.lex_state = 0}, + [55] = {.lex_state = 9}, + [56] = {.lex_state = 0}, + [57] = {.lex_state = 9}, + [58] = {.lex_state = 0}, [59] = {.lex_state = 0}, - [60] = {.lex_state = 0}, - [61] = {.lex_state = 0}, - [62] = {.lex_state = 0}, + [60] = {.lex_state = 1}, + [61] = {.lex_state = 1}, + [62] = {.lex_state = 1}, [63] = {.lex_state = 0}, [64] = {.lex_state = 0}, - [65] = {.lex_state = 9}, + [65] = {.lex_state = 0}, [66] = {.lex_state = 0}, - [67] = {.lex_state = 9}, + [67] = {.lex_state = 0}, [68] = {.lex_state = 0}, [69] = {.lex_state = 9}, [70] = {.lex_state = 9}, - [71] = {.lex_state = 0}, + [71] = {.lex_state = 9}, + [72] = {.lex_state = 9}, + [73] = {.lex_state = 0}, + [74] = {.lex_state = 0}, + [75] = {.lex_state = 0}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { @@ -937,22 +991,25 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_if] = ACTIONS(1), [anon_sym_then] = ACTIONS(1), [anon_sym_else] = ACTIONS(1), + [anon_sym_while] = ACTIONS(1), + [anon_sym_do] = ACTIONS(1), }, [1] = { - [sym_source_file] = STATE(68), - [sym__expr] = STATE(53), - [sym_string_literal] = STATE(53), - [sym__lvalue] = STATE(5), - [sym_record_value] = STATE(5), - [sym_array_value] = STATE(5), - [sym_function_call] = STATE(53), - [sym_unary_expression] = STATE(53), - [sym_binary_expression] = STATE(53), - [sym_sequence_expression] = STATE(53), - [sym_array_expression] = STATE(53), - [sym_record_expression] = STATE(53), - [sym_assignment_expression] = STATE(53), - [sym_if_expression] = STATE(53), + [sym_source_file] = STATE(75), + [sym__expr] = STATE(58), + [sym_string_literal] = STATE(58), + [sym__lvalue] = STATE(3), + [sym_record_value] = STATE(3), + [sym_array_value] = STATE(3), + [sym_function_call] = STATE(58), + [sym_unary_expression] = STATE(58), + [sym_binary_expression] = STATE(58), + [sym_sequence_expression] = STATE(58), + [sym_array_expression] = STATE(58), + [sym_record_expression] = STATE(58), + [sym_assignment_expression] = STATE(58), + [sym_if_expression] = STATE(58), + [sym_while_expression] = STATE(58), [sym_identifier] = ACTIONS(3), [sym_nil_literal] = ACTIONS(5), [sym_integer_literal] = ACTIONS(5), @@ -960,21 +1017,22 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_LPAREN] = ACTIONS(9), [anon_sym_DASH] = ACTIONS(11), [anon_sym_if] = ACTIONS(13), + [anon_sym_while] = ACTIONS(15), }, }; static const uint16_t ts_small_parse_table[] = { [0] = 5, - ACTIONS(17), 1, + ACTIONS(19), 1, anon_sym_LBRACK, - ACTIONS(20), 1, + ACTIONS(22), 1, anon_sym_LPAREN, - ACTIONS(24), 1, + ACTIONS(26), 1, anon_sym_LBRACE, - ACTIONS(22), 2, + ACTIONS(24), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(15), 20, + ACTIONS(17), 21, ts_builtin_sym_end, anon_sym_DOT, anon_sym_RBRACK, @@ -995,70 +1053,45 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_COLON_EQ, anon_sym_then, anon_sym_else, - [36] = 2, - ACTIONS(28), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(26), 21, - ts_builtin_sym_end, + anon_sym_do, + [37] = 5, + ACTIONS(30), 1, anon_sym_DOT, + ACTIONS(32), 1, 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, - [64] = 2, - ACTIONS(32), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(30), 21, - 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, - [92] = 5, ACTIONS(36), 1, - anon_sym_DOT, - ACTIONS(38), 1, - anon_sym_LBRACK, - ACTIONS(42), 1, anon_sym_COLON_EQ, + ACTIONS(34), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(28), 19, + 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, + [72] = 2, ACTIONS(40), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(34), 18, + ACTIONS(38), 22, ts_builtin_sym_end, + anon_sym_DOT, + anon_sym_LBRACK, anon_sym_RBRACK, anon_sym_COMMA, anon_sym_RPAREN, @@ -1074,71 +1107,38 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PIPE, anon_sym_SEMI, anon_sym_RBRACE, + anon_sym_COLON_EQ, anon_sym_then, anon_sym_else, - [126] = 9, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(46), 1, - anon_sym_RPAREN, + anon_sym_do, + [101] = 2, ACTIONS(44), 2, - sym_nil_literal, - sym_integer_literal, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(47), 10, - 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, - [166] = 9, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(50), 1, + anon_sym_LT, + anon_sym_GT, + ACTIONS(42), 22, + ts_builtin_sym_end, + anon_sym_DOT, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COMMA, anon_sym_RPAREN, - ACTIONS(48), 2, - sym_nil_literal, - sym_integer_literal, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(46), 10, - 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, - [206] = 8, + 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, + [130] = 10, ACTIONS(3), 1, sym_identifier, ACTIONS(7), 1, @@ -1149,14 +1149,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, ACTIONS(13), 1, anon_sym_if, - ACTIONS(52), 2, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(48), 1, + anon_sym_RPAREN, + ACTIONS(46), 2, sym_nil_literal, sym_integer_literal, - STATE(5), 3, + STATE(3), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(36), 10, + STATE(49), 11, sym__expr, sym_string_literal, sym_function_call, @@ -1167,7 +1171,8 @@ static const uint16_t ts_small_parse_table[] = { sym_record_expression, sym_assignment_expression, sym_if_expression, - [243] = 8, + sym_while_expression, + [174] = 10, ACTIONS(3), 1, sym_identifier, ACTIONS(7), 1, @@ -1178,14 +1183,50 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, ACTIONS(13), 1, anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(52), 1, + anon_sym_RPAREN, + ACTIONS(50), 2, + sym_nil_literal, + sym_integer_literal, + STATE(3), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(51), 11, + 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, + [218] = 9, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, ACTIONS(54), 2, sym_nil_literal, sym_integer_literal, - STATE(5), 3, + STATE(3), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(17), 10, + STATE(55), 11, sym__expr, sym_string_literal, sym_function_call, @@ -1196,7 +1237,8 @@ static const uint16_t ts_small_parse_table[] = { sym_record_expression, sym_assignment_expression, sym_if_expression, - [280] = 8, + sym_while_expression, + [259] = 9, ACTIONS(3), 1, sym_identifier, ACTIONS(7), 1, @@ -1207,14 +1249,16 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, ACTIONS(13), 1, anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, ACTIONS(56), 2, sym_nil_literal, sym_integer_literal, - STATE(5), 3, + STATE(3), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(49), 10, + STATE(38), 11, sym__expr, sym_string_literal, sym_function_call, @@ -1225,53 +1269,8 @@ static const uint16_t ts_small_parse_table[] = { sym_record_expression, sym_assignment_expression, sym_if_expression, - [317] = 2, - ACTIONS(60), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(58), 18, - 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, - [342] = 2, - ACTIONS(64), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(62), 18, - 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, - [367] = 8, + sym_while_expression, + [300] = 9, ACTIONS(3), 1, sym_identifier, ACTIONS(7), 1, @@ -1282,14 +1281,144 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, ACTIONS(13), 1, anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(58), 2, + sym_nil_literal, + sym_integer_literal, + STATE(3), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(54), 11, + 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, + [341] = 9, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(60), 2, + sym_nil_literal, + sym_integer_literal, + STATE(3), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(32), 11, + 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, + [382] = 9, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(62), 2, + sym_nil_literal, + sym_integer_literal, + STATE(3), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(57), 11, + 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, + [423] = 9, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(64), 2, + sym_nil_literal, + sym_integer_literal, + STATE(3), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(59), 11, + 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, + [464] = 9, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, ACTIONS(66), 2, sym_nil_literal, sym_integer_literal, - STATE(5), 3, + STATE(3), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(55), 10, + STATE(56), 11, sym__expr, sym_string_literal, sym_function_call, @@ -1300,153 +1429,188 @@ static const uint16_t ts_small_parse_table[] = { sym_record_expression, sym_assignment_expression, sym_if_expression, - [404] = 4, - ACTIONS(70), 2, + sym_while_expression, + [505] = 9, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, anon_sym_DASH, - anon_sym_PLUS, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(68), 2, + sym_nil_literal, + sym_integer_literal, + STATE(3), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(50), 11, + 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, + [546] = 9, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(70), 2, + sym_nil_literal, + sym_integer_literal, + STATE(3), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(52), 11, + 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, + [587] = 9, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, ACTIONS(72), 2, - anon_sym_STAR, - anon_sym_SLASH, + sym_nil_literal, + sym_integer_literal, + STATE(3), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(28), 11, + 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, + [628] = 9, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, ACTIONS(74), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(68), 14, - 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, - [433] = 2, + sym_nil_literal, + sym_integer_literal, + STATE(3), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(27), 11, + 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, + [669] = 9, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(76), 2, + sym_nil_literal, + sym_integer_literal, + STATE(3), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(46), 11, + 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, + [710] = 9, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, ACTIONS(78), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(76), 18, - 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, - [458] = 3, - ACTIONS(72), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(74), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(68), 16, - 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, - [485] = 7, - ACTIONS(86), 1, - anon_sym_AMP, - ACTIONS(88), 1, - anon_sym_PIPE, - ACTIONS(70), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(72), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(84), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(82), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(80), 8, - 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, - [520] = 7, - ACTIONS(86), 1, - anon_sym_AMP, - ACTIONS(88), 1, - anon_sym_PIPE, - ACTIONS(70), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(72), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(84), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(82), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(90), 8, - 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, - [555] = 8, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(92), 2, sym_nil_literal, sym_integer_literal, - STATE(5), 3, + STATE(3), 3, sym__lvalue, sym_record_value, sym_array_value, - STATE(16), 10, + STATE(48), 11, sym__expr, sym_string_literal, sym_function_call, @@ -1457,7 +1621,8 @@ static const uint16_t ts_small_parse_table[] = { sym_record_expression, sym_assignment_expression, sym_if_expression, - [592] = 8, + sym_while_expression, + [751] = 9, ACTIONS(3), 1, sym_identifier, ACTIONS(7), 1, @@ -1468,116 +1633,250 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, ACTIONS(13), 1, anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(80), 2, + sym_nil_literal, + sym_integer_literal, + STATE(3), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(41), 11, + 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, + [792] = 9, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(82), 2, + sym_nil_literal, + sym_integer_literal, + STATE(3), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(42), 11, + 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, + [833] = 9, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(84), 2, + sym_nil_literal, + sym_integer_literal, + STATE(3), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(43), 11, + 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, + [874] = 9, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(86), 2, + sym_nil_literal, + sym_integer_literal, + STATE(3), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(44), 11, + 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, + [915] = 9, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(88), 2, + sym_nil_literal, + sym_integer_literal, + STATE(3), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(45), 11, + 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, + [956] = 9, + ACTIONS(3), 1, + sym_identifier, + ACTIONS(7), 1, + anon_sym_DQUOTE, + ACTIONS(9), 1, + anon_sym_LPAREN, + ACTIONS(11), 1, + anon_sym_DASH, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(90), 2, + sym_nil_literal, + sym_integer_literal, + STATE(3), 3, + sym__lvalue, + sym_record_value, + sym_array_value, + STATE(53), 11, + 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, + [997] = 7, + ACTIONS(102), 1, + anon_sym_AMP, + ACTIONS(104), 1, + anon_sym_PIPE, ACTIONS(94), 2, - sym_nil_literal, - sym_integer_literal, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(34), 10, - 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, - [629] = 8, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, + anon_sym_PLUS, ACTIONS(96), 2, - sym_nil_literal, - sym_integer_literal, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(14), 10, - 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, - [666] = 8, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(98), 2, - sym_nil_literal, - sym_integer_literal, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(41), 10, - 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, - [703] = 8, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, + anon_sym_STAR, + anon_sym_SLASH, ACTIONS(100), 2, - sym_nil_literal, - sym_integer_literal, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(42), 10, - 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, - [740] = 2, - ACTIONS(104), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(102), 18, + ACTIONS(98), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(92), 9, + 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, + [1033] = 7, + ACTIONS(102), 1, + anon_sym_AMP, + ACTIONS(104), 1, + anon_sym_PIPE, + ACTIONS(94), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(96), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(100), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(98), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(106), 9, + 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, + [1069] = 2, + ACTIONS(110), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(108), 19, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -1596,69 +1895,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RBRACE, anon_sym_then, anon_sym_else, - [765] = 8, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(106), 2, - sym_nil_literal, - sym_integer_literal, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(52), 10, - 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, - [802] = 8, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(108), 2, - sym_nil_literal, - sym_integer_literal, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(45), 10, - 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, - [839] = 2, - ACTIONS(112), 2, + anon_sym_do, + [1095] = 2, + ACTIONS(114), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(110), 18, + ACTIONS(112), 19, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -1677,68 +1919,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RBRACE, anon_sym_then, anon_sym_else, - [864] = 7, - ACTIONS(86), 1, - anon_sym_AMP, - ACTIONS(88), 1, - anon_sym_PIPE, - ACTIONS(70), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(72), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(84), 2, + anon_sym_do, + [1121] = 2, + ACTIONS(118), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(82), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(114), 8, - 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, - [899] = 8, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(116), 2, - sym_nil_literal, - sym_integer_literal, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(18), 10, - 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, - [936] = 2, - ACTIONS(120), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(118), 18, + ACTIONS(116), 19, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -1757,11 +1943,41 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RBRACE, anon_sym_then, anon_sym_else, - [961] = 2, + anon_sym_do, + [1147] = 7, + ACTIONS(102), 1, + anon_sym_AMP, + ACTIONS(104), 1, + anon_sym_PIPE, + ACTIONS(94), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(96), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(100), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(98), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(120), 9, + 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, + [1183] = 2, ACTIONS(124), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(122), 18, + ACTIONS(122), 19, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -1780,40 +1996,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RBRACE, anon_sym_then, anon_sym_else, - [986] = 8, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(126), 2, - sym_nil_literal, - sym_integer_literal, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(28), 10, - 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, - [1023] = 2, - ACTIONS(130), 2, + anon_sym_do, + [1209] = 2, + ACTIONS(128), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(128), 18, + ACTIONS(126), 19, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -1832,92 +2020,60 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RBRACE, anon_sym_then, anon_sym_else, - [1048] = 2, - ACTIONS(74), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(68), 18, - 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, - [1073] = 8, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, + anon_sym_do, + [1235] = 2, ACTIONS(132), 2, - sym_nil_literal, - sym_integer_literal, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(51), 10, - 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, - [1110] = 8, - ACTIONS(86), 1, - anon_sym_AMP, - ACTIONS(88), 1, - anon_sym_PIPE, - ACTIONS(136), 1, - anon_sym_else, - ACTIONS(70), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(72), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(84), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(82), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(134), 7, + ACTIONS(130), 19, 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, - [1147] = 2, + anon_sym_else, + anon_sym_do, + [1261] = 2, + ACTIONS(136), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(134), 19, + 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, + [1287] = 2, ACTIONS(140), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(138), 18, + ACTIONS(138), 19, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -1936,40 +2092,41 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RBRACE, anon_sym_then, anon_sym_else, - [1172] = 8, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, + anon_sym_do, + [1313] = 7, + ACTIONS(102), 1, + anon_sym_AMP, + ACTIONS(104), 1, + anon_sym_PIPE, + ACTIONS(94), 2, anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(142), 2, - sym_nil_literal, - sym_integer_literal, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(48), 10, - 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, - [1209] = 2, + anon_sym_PLUS, + ACTIONS(96), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(100), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(98), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(142), 9, + 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, + [1349] = 2, ACTIONS(146), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(144), 18, + ACTIONS(144), 19, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -1988,11 +2145,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RBRACE, anon_sym_then, anon_sym_else, - [1234] = 2, + anon_sym_do, + [1375] = 2, ACTIONS(150), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(148), 18, + ACTIONS(148), 19, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2011,122 +2169,37 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RBRACE, anon_sym_then, anon_sym_else, - [1259] = 5, - ACTIONS(70), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(72), 2, + anon_sym_do, + [1401] = 3, + ACTIONS(96), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(84), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(82), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(68), 10, - 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, - [1290] = 6, - ACTIONS(86), 1, - anon_sym_AMP, - ACTIONS(70), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(72), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(84), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(82), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - ACTIONS(68), 9, - 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, - [1323] = 8, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(152), 2, - sym_nil_literal, - sym_integer_literal, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(54), 10, - 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, - [1360] = 8, - ACTIONS(3), 1, - sym_identifier, - ACTIONS(7), 1, - anon_sym_DQUOTE, - ACTIONS(9), 1, - anon_sym_LPAREN, - ACTIONS(11), 1, - anon_sym_DASH, - ACTIONS(13), 1, - anon_sym_if, ACTIONS(154), 2, - sym_nil_literal, - sym_integer_literal, - STATE(5), 3, - sym__lvalue, - sym_record_value, - sym_array_value, - STATE(50), 10, - 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, - [1397] = 2, - ACTIONS(158), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(156), 18, + ACTIONS(152), 17, + 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, + [1429] = 2, + ACTIONS(154), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(152), 19, ts_builtin_sym_end, anon_sym_RBRACK, anon_sym_COMMA, @@ -2145,510 +2218,700 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RBRACE, anon_sym_then, anon_sym_else, - [1422] = 9, - ACTIONS(86), 1, - anon_sym_AMP, - ACTIONS(88), 1, - anon_sym_PIPE, - ACTIONS(160), 1, - anon_sym_RPAREN, - ACTIONS(162), 1, - anon_sym_SEMI, - STATE(61), 1, - aux_sym_sequence_expression_repeat1, - ACTIONS(70), 2, + anon_sym_do, + [1455] = 4, + ACTIONS(94), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(72), 2, + ACTIONS(96), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(84), 2, + ACTIONS(154), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(82), 4, + ACTIONS(152), 15, + 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, - [1456] = 9, - ACTIONS(86), 1, anon_sym_AMP, - ACTIONS(88), 1, anon_sym_PIPE, - ACTIONS(164), 1, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + [1485] = 5, + ACTIONS(94), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(96), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(100), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(98), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(152), 11, + ts_builtin_sym_end, + anon_sym_RBRACK, anon_sym_COMMA, - ACTIONS(166), 1, + anon_sym_RPAREN, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_then, + anon_sym_else, + anon_sym_do, + [1517] = 6, + ACTIONS(102), 1, + anon_sym_AMP, + ACTIONS(94), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(96), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(100), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(98), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(152), 10, + 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, + [1551] = 8, + ACTIONS(102), 1, + anon_sym_AMP, + ACTIONS(104), 1, + anon_sym_PIPE, + ACTIONS(158), 1, + anon_sym_else, + ACTIONS(94), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(96), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(100), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(98), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + ACTIONS(156), 8, + 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, + [1589] = 2, + ACTIONS(162), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(160), 19, + 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, + [1615] = 2, + ACTIONS(166), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(164), 19, + 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, + [1641] = 9, + ACTIONS(102), 1, + anon_sym_AMP, + ACTIONS(104), 1, + anon_sym_PIPE, + ACTIONS(168), 1, + anon_sym_RPAREN, + ACTIONS(170), 1, + anon_sym_SEMI, + STATE(66), 1, + aux_sym_sequence_expression_repeat1, + ACTIONS(94), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(96), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(100), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(98), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [1675] = 9, + ACTIONS(102), 1, + anon_sym_AMP, + ACTIONS(104), 1, + anon_sym_PIPE, + ACTIONS(172), 1, + anon_sym_COMMA, + ACTIONS(174), 1, + anon_sym_RBRACE, + STATE(67), 1, + aux_sym_record_expression_repeat1, + ACTIONS(94), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(96), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(100), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(98), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [1709] = 9, + ACTIONS(102), 1, + anon_sym_AMP, + ACTIONS(104), 1, + anon_sym_PIPE, + ACTIONS(176), 1, + anon_sym_COMMA, + ACTIONS(178), 1, anon_sym_RPAREN, STATE(64), 1, aux_sym_function_call_repeat1, - ACTIONS(70), 2, + ACTIONS(94), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(72), 2, + ACTIONS(96), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(84), 2, + ACTIONS(100), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(82), 4, + ACTIONS(98), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [1490] = 9, - ACTIONS(86), 1, + [1743] = 7, + ACTIONS(102), 1, anon_sym_AMP, - ACTIONS(88), 1, + ACTIONS(104), 1, anon_sym_PIPE, - ACTIONS(168), 1, - anon_sym_COMMA, - ACTIONS(170), 1, - anon_sym_RBRACE, - STATE(60), 1, - aux_sym_record_expression_repeat1, - ACTIONS(70), 2, + ACTIONS(94), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(72), 2, + ACTIONS(96), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(84), 2, + ACTIONS(100), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(82), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [1524] = 7, - ACTIONS(86), 1, - anon_sym_AMP, - ACTIONS(88), 1, - anon_sym_PIPE, - ACTIONS(70), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(72), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(84), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(172), 2, - anon_sym_COMMA, - anon_sym_RBRACE, - ACTIONS(82), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [1553] = 7, - ACTIONS(86), 1, - anon_sym_AMP, - ACTIONS(88), 1, - anon_sym_PIPE, - ACTIONS(70), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(72), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(84), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(174), 2, + ACTIONS(180), 2, anon_sym_COMMA, anon_sym_RPAREN, - ACTIONS(82), 4, + ACTIONS(98), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [1582] = 7, - ACTIONS(86), 1, + [1772] = 7, + ACTIONS(102), 1, anon_sym_AMP, - ACTIONS(88), 1, + ACTIONS(104), 1, anon_sym_PIPE, - ACTIONS(70), 2, + ACTIONS(94), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(72), 2, + ACTIONS(96), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(84), 2, + ACTIONS(100), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(176), 2, + ACTIONS(182), 2, anon_sym_RPAREN, anon_sym_SEMI, - ACTIONS(82), 4, + ACTIONS(98), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [1611] = 7, - ACTIONS(86), 1, + [1801] = 7, + ACTIONS(102), 1, anon_sym_AMP, - ACTIONS(88), 1, + ACTIONS(104), 1, anon_sym_PIPE, - ACTIONS(178), 1, - anon_sym_RBRACK, - ACTIONS(70), 2, + ACTIONS(94), 2, anon_sym_DASH, anon_sym_PLUS, - ACTIONS(72), 2, + ACTIONS(96), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(84), 2, + ACTIONS(100), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(82), 4, + ACTIONS(184), 2, + anon_sym_COMMA, + anon_sym_RBRACE, + ACTIONS(98), 4, anon_sym_GT_EQ, anon_sym_LT_EQ, anon_sym_EQ, anon_sym_LT_GT, - [1639] = 7, - ACTIONS(86), 1, + [1830] = 7, + ACTIONS(102), 1, anon_sym_AMP, - ACTIONS(88), 1, + ACTIONS(104), 1, anon_sym_PIPE, - ACTIONS(180), 1, - ts_builtin_sym_end, - ACTIONS(70), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(72), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(84), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(82), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [1667] = 7, - ACTIONS(86), 1, - anon_sym_AMP, - ACTIONS(88), 1, - anon_sym_PIPE, - ACTIONS(182), 1, - anon_sym_then, - ACTIONS(70), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(72), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(84), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(82), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [1695] = 7, - ACTIONS(86), 1, - anon_sym_AMP, - ACTIONS(88), 1, - anon_sym_PIPE, - ACTIONS(184), 1, - anon_sym_RBRACK, - ACTIONS(70), 2, - anon_sym_DASH, - anon_sym_PLUS, - ACTIONS(72), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(84), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(82), 4, - anon_sym_GT_EQ, - anon_sym_LT_EQ, - anon_sym_EQ, - anon_sym_LT_GT, - [1723] = 3, ACTIONS(186), 1, - anon_sym_DQUOTE, - STATE(58), 1, - aux_sym_string_literal_repeat1, - ACTIONS(188), 2, - aux_sym_string_literal_token1, - sym_escape_sequence, - [1734] = 3, + anon_sym_then, + ACTIONS(94), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(96), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(100), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(98), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [1858] = 7, + ACTIONS(102), 1, + anon_sym_AMP, + ACTIONS(104), 1, + anon_sym_PIPE, + ACTIONS(188), 1, + anon_sym_RBRACK, + ACTIONS(94), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(96), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(100), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(98), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [1886] = 7, + ACTIONS(102), 1, + anon_sym_AMP, + ACTIONS(104), 1, + anon_sym_PIPE, ACTIONS(190), 1, + anon_sym_do, + ACTIONS(94), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(96), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(100), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(98), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [1914] = 7, + ACTIONS(102), 1, + anon_sym_AMP, + ACTIONS(104), 1, + anon_sym_PIPE, + ACTIONS(192), 1, + ts_builtin_sym_end, + ACTIONS(94), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(96), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(100), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(98), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [1942] = 7, + ACTIONS(102), 1, + anon_sym_AMP, + ACTIONS(104), 1, + anon_sym_PIPE, + ACTIONS(194), 1, + anon_sym_RBRACK, + ACTIONS(94), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(96), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(100), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(98), 4, + anon_sym_GT_EQ, + anon_sym_LT_EQ, + anon_sym_EQ, + anon_sym_LT_GT, + [1970] = 3, + ACTIONS(196), 1, anon_sym_DQUOTE, - STATE(57), 1, + STATE(62), 1, aux_sym_string_literal_repeat1, - ACTIONS(192), 2, + ACTIONS(198), 2, aux_sym_string_literal_token1, sym_escape_sequence, - [1745] = 3, - ACTIONS(195), 1, + [1981] = 3, + ACTIONS(200), 1, anon_sym_DQUOTE, - STATE(57), 1, + STATE(60), 1, aux_sym_string_literal_repeat1, - ACTIONS(197), 2, + ACTIONS(202), 2, aux_sym_string_literal_token1, sym_escape_sequence, - [1756] = 3, - ACTIONS(174), 1, - anon_sym_RPAREN, - ACTIONS(199), 1, - anon_sym_COMMA, - STATE(59), 1, - aux_sym_function_call_repeat1, - [1766] = 3, - ACTIONS(168), 1, - anon_sym_COMMA, - ACTIONS(202), 1, - anon_sym_RBRACE, - STATE(63), 1, - aux_sym_record_expression_repeat1, - [1776] = 3, - ACTIONS(162), 1, - anon_sym_SEMI, + [1992] = 3, ACTIONS(204), 1, - anon_sym_RPAREN, + anon_sym_DQUOTE, STATE(62), 1, - aux_sym_sequence_expression_repeat1, - [1786] = 3, - ACTIONS(176), 1, + aux_sym_string_literal_repeat1, + ACTIONS(206), 2, + aux_sym_string_literal_token1, + sym_escape_sequence, + [2003] = 3, + ACTIONS(182), 1, anon_sym_RPAREN, - ACTIONS(206), 1, - anon_sym_SEMI, - STATE(62), 1, - aux_sym_sequence_expression_repeat1, - [1796] = 3, ACTIONS(209), 1, + anon_sym_SEMI, + STATE(63), 1, + aux_sym_sequence_expression_repeat1, + [2013] = 3, + ACTIONS(176), 1, anon_sym_COMMA, ACTIONS(212), 1, - anon_sym_RBRACE, - STATE(63), 1, - aux_sym_record_expression_repeat1, - [1806] = 3, - ACTIONS(164), 1, - anon_sym_COMMA, - ACTIONS(214), 1, anon_sym_RPAREN, - STATE(59), 1, + STATE(65), 1, aux_sym_function_call_repeat1, - [1816] = 2, - ACTIONS(216), 1, - sym_identifier, - ACTIONS(218), 1, + [2023] = 3, + ACTIONS(180), 1, + anon_sym_RPAREN, + ACTIONS(214), 1, + anon_sym_COMMA, + STATE(65), 1, + aux_sym_function_call_repeat1, + [2033] = 3, + ACTIONS(170), 1, + anon_sym_SEMI, + ACTIONS(217), 1, + anon_sym_RPAREN, + STATE(63), 1, + aux_sym_sequence_expression_repeat1, + [2043] = 3, + ACTIONS(172), 1, + anon_sym_COMMA, + ACTIONS(219), 1, anon_sym_RBRACE, - [1823] = 1, - ACTIONS(220), 1, - anon_sym_EQ, - [1827] = 1, - ACTIONS(222), 1, - anon_sym_of, - [1831] = 1, + STATE(68), 1, + aux_sym_record_expression_repeat1, + [2053] = 3, + ACTIONS(221), 1, + anon_sym_COMMA, ACTIONS(224), 1, - ts_builtin_sym_end, - [1835] = 1, + anon_sym_RBRACE, + STATE(68), 1, + aux_sym_record_expression_repeat1, + [2063] = 2, ACTIONS(226), 1, sym_identifier, - [1839] = 1, ACTIONS(228), 1, - sym_identifier, - [1843] = 1, + anon_sym_RBRACE, + [2070] = 1, ACTIONS(230), 1, + sym_identifier, + [2074] = 1, + ACTIONS(232), 1, + anon_sym_of, + [2078] = 1, + ACTIONS(234), 1, + sym_identifier, + [2082] = 1, + ACTIONS(236), 1, anon_sym_EQ, + [2086] = 1, + ACTIONS(238), 1, + anon_sym_EQ, + [2090] = 1, + ACTIONS(240), 1, + ts_builtin_sym_end, }; static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(2)] = 0, - [SMALL_STATE(3)] = 36, - [SMALL_STATE(4)] = 64, - [SMALL_STATE(5)] = 92, - [SMALL_STATE(6)] = 126, - [SMALL_STATE(7)] = 166, - [SMALL_STATE(8)] = 206, - [SMALL_STATE(9)] = 243, - [SMALL_STATE(10)] = 280, - [SMALL_STATE(11)] = 317, - [SMALL_STATE(12)] = 342, - [SMALL_STATE(13)] = 367, - [SMALL_STATE(14)] = 404, - [SMALL_STATE(15)] = 433, - [SMALL_STATE(16)] = 458, - [SMALL_STATE(17)] = 485, - [SMALL_STATE(18)] = 520, - [SMALL_STATE(19)] = 555, - [SMALL_STATE(20)] = 592, - [SMALL_STATE(21)] = 629, - [SMALL_STATE(22)] = 666, - [SMALL_STATE(23)] = 703, - [SMALL_STATE(24)] = 740, - [SMALL_STATE(25)] = 765, - [SMALL_STATE(26)] = 802, - [SMALL_STATE(27)] = 839, - [SMALL_STATE(28)] = 864, - [SMALL_STATE(29)] = 899, - [SMALL_STATE(30)] = 936, - [SMALL_STATE(31)] = 961, - [SMALL_STATE(32)] = 986, - [SMALL_STATE(33)] = 1023, - [SMALL_STATE(34)] = 1048, - [SMALL_STATE(35)] = 1073, - [SMALL_STATE(36)] = 1110, - [SMALL_STATE(37)] = 1147, - [SMALL_STATE(38)] = 1172, - [SMALL_STATE(39)] = 1209, - [SMALL_STATE(40)] = 1234, - [SMALL_STATE(41)] = 1259, - [SMALL_STATE(42)] = 1290, - [SMALL_STATE(43)] = 1323, - [SMALL_STATE(44)] = 1360, - [SMALL_STATE(45)] = 1397, - [SMALL_STATE(46)] = 1422, - [SMALL_STATE(47)] = 1456, - [SMALL_STATE(48)] = 1490, - [SMALL_STATE(49)] = 1524, - [SMALL_STATE(50)] = 1553, - [SMALL_STATE(51)] = 1582, - [SMALL_STATE(52)] = 1611, - [SMALL_STATE(53)] = 1639, - [SMALL_STATE(54)] = 1667, - [SMALL_STATE(55)] = 1695, - [SMALL_STATE(56)] = 1723, - [SMALL_STATE(57)] = 1734, - [SMALL_STATE(58)] = 1745, - [SMALL_STATE(59)] = 1756, - [SMALL_STATE(60)] = 1766, - [SMALL_STATE(61)] = 1776, - [SMALL_STATE(62)] = 1786, - [SMALL_STATE(63)] = 1796, - [SMALL_STATE(64)] = 1806, - [SMALL_STATE(65)] = 1816, - [SMALL_STATE(66)] = 1823, - [SMALL_STATE(67)] = 1827, - [SMALL_STATE(68)] = 1831, - [SMALL_STATE(69)] = 1835, - [SMALL_STATE(70)] = 1839, - [SMALL_STATE(71)] = 1843, + [SMALL_STATE(3)] = 37, + [SMALL_STATE(4)] = 72, + [SMALL_STATE(5)] = 101, + [SMALL_STATE(6)] = 130, + [SMALL_STATE(7)] = 174, + [SMALL_STATE(8)] = 218, + [SMALL_STATE(9)] = 259, + [SMALL_STATE(10)] = 300, + [SMALL_STATE(11)] = 341, + [SMALL_STATE(12)] = 382, + [SMALL_STATE(13)] = 423, + [SMALL_STATE(14)] = 464, + [SMALL_STATE(15)] = 505, + [SMALL_STATE(16)] = 546, + [SMALL_STATE(17)] = 587, + [SMALL_STATE(18)] = 628, + [SMALL_STATE(19)] = 669, + [SMALL_STATE(20)] = 710, + [SMALL_STATE(21)] = 751, + [SMALL_STATE(22)] = 792, + [SMALL_STATE(23)] = 833, + [SMALL_STATE(24)] = 874, + [SMALL_STATE(25)] = 915, + [SMALL_STATE(26)] = 956, + [SMALL_STATE(27)] = 997, + [SMALL_STATE(28)] = 1033, + [SMALL_STATE(29)] = 1069, + [SMALL_STATE(30)] = 1095, + [SMALL_STATE(31)] = 1121, + [SMALL_STATE(32)] = 1147, + [SMALL_STATE(33)] = 1183, + [SMALL_STATE(34)] = 1209, + [SMALL_STATE(35)] = 1235, + [SMALL_STATE(36)] = 1261, + [SMALL_STATE(37)] = 1287, + [SMALL_STATE(38)] = 1313, + [SMALL_STATE(39)] = 1349, + [SMALL_STATE(40)] = 1375, + [SMALL_STATE(41)] = 1401, + [SMALL_STATE(42)] = 1429, + [SMALL_STATE(43)] = 1455, + [SMALL_STATE(44)] = 1485, + [SMALL_STATE(45)] = 1517, + [SMALL_STATE(46)] = 1551, + [SMALL_STATE(47)] = 1589, + [SMALL_STATE(48)] = 1615, + [SMALL_STATE(49)] = 1641, + [SMALL_STATE(50)] = 1675, + [SMALL_STATE(51)] = 1709, + [SMALL_STATE(52)] = 1743, + [SMALL_STATE(53)] = 1772, + [SMALL_STATE(54)] = 1801, + [SMALL_STATE(55)] = 1830, + [SMALL_STATE(56)] = 1858, + [SMALL_STATE(57)] = 1886, + [SMALL_STATE(58)] = 1914, + [SMALL_STATE(59)] = 1942, + [SMALL_STATE(60)] = 1970, + [SMALL_STATE(61)] = 1981, + [SMALL_STATE(62)] = 1992, + [SMALL_STATE(63)] = 2003, + [SMALL_STATE(64)] = 2013, + [SMALL_STATE(65)] = 2023, + [SMALL_STATE(66)] = 2033, + [SMALL_STATE(67)] = 2043, + [SMALL_STATE(68)] = 2053, + [SMALL_STATE(69)] = 2063, + [SMALL_STATE(70)] = 2070, + [SMALL_STATE(71)] = 2074, + [SMALL_STATE(72)] = 2078, + [SMALL_STATE(73)] = 2082, + [SMALL_STATE(74)] = 2086, + [SMALL_STATE(75)] = 2090, }; static const TSParseActionEntry ts_parse_actions[] = { [0] = {.entry = {.count = 0, .reusable = false}}, [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), [3] = {.entry = {.count = 1, .reusable = false}}, SHIFT(2), - [5] = {.entry = {.count = 1, .reusable = false}}, SHIFT(53), - [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), - [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), - [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), - [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(43), - [15] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__lvalue, 1), - [17] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__lvalue, 1), SHIFT(13), - [20] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), - [22] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__lvalue, 1), - [24] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), - [26] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_value, 4, .production_id = 9), - [28] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_value, 4, .production_id = 9), - [30] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_value, 3, .production_id = 5), - [32] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_value, 3, .production_id = 5), - [34] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr, 1), - [36] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), - [38] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), - [40] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr, 1), - [42] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), - [44] = {.entry = {.count = 1, .reusable = false}}, SHIFT(47), - [46] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), - [48] = {.entry = {.count = 1, .reusable = false}}, SHIFT(46), - [50] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), - [52] = {.entry = {.count = 1, .reusable = false}}, SHIFT(36), - [54] = {.entry = {.count = 1, .reusable = false}}, SHIFT(17), - [56] = {.entry = {.count = 1, .reusable = false}}, SHIFT(49), - [58] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 2), - [60] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 2), - [62] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 7, .production_id = 14), - [64] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 7, .production_id = 14), - [66] = {.entry = {.count = 1, .reusable = false}}, SHIFT(55), - [68] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, .production_id = 4), - [70] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), - [72] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), - [74] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, .production_id = 4), - [76] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 2), - [78] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 2), - [80] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_expression, 2, .production_id = 1), - [82] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), - [84] = {.entry = {.count = 1, .reusable = false}}, SHIFT(21), - [86] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), - [88] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), - [90] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_expression, 6, .production_id = 13), - [92] = {.entry = {.count = 1, .reusable = false}}, SHIFT(16), - [94] = {.entry = {.count = 1, .reusable = false}}, SHIFT(34), - [96] = {.entry = {.count = 1, .reusable = false}}, SHIFT(14), - [98] = {.entry = {.count = 1, .reusable = false}}, SHIFT(41), - [100] = {.entry = {.count = 1, .reusable = false}}, SHIFT(42), - [102] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 6, .production_id = 12), - [104] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 6, .production_id = 12), - [106] = {.entry = {.count = 1, .reusable = false}}, SHIFT(52), - [108] = {.entry = {.count = 1, .reusable = false}}, SHIFT(45), - [110] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 3), - [112] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 3), - [114] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_expression, 6, .production_id = 11), - [116] = {.entry = {.count = 1, .reusable = false}}, SHIFT(18), - [118] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 3, .production_id = 2), - [120] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 3, .production_id = 2), - [122] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 5, .production_id = 10), - [124] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 5, .production_id = 10), - [126] = {.entry = {.count = 1, .reusable = false}}, SHIFT(28), - [128] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 3, .production_id = 3), - [130] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 3, .production_id = 3), - [132] = {.entry = {.count = 1, .reusable = false}}, SHIFT(51), - [134] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_expression, 4, .production_id = 8), - [136] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), - [138] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 4), - [140] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 4), - [142] = {.entry = {.count = 1, .reusable = false}}, SHIFT(48), - [144] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 3), - [146] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 3), - [148] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 4, .production_id = 7), - [150] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 4, .production_id = 7), - [152] = {.entry = {.count = 1, .reusable = false}}, SHIFT(54), - [154] = {.entry = {.count = 1, .reusable = false}}, SHIFT(50), - [156] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment_expression, 3, .production_id = 6), - [158] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment_expression, 3, .production_id = 6), - [160] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), - [162] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), - [164] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), - [166] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), - [168] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), - [170] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), - [172] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 4, .production_id = 16), - [174] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), - [176] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), - [178] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [180] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), - [182] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), - [184] = {.entry = {.count = 1, .reusable = true}}, SHIFT(67), - [186] = {.entry = {.count = 1, .reusable = false}}, SHIFT(11), - [188] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), - [190] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_string_literal_repeat1, 2), - [192] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_string_literal_repeat1, 2), SHIFT_REPEAT(57), - [195] = {.entry = {.count = 1, .reusable = false}}, SHIFT(27), - [197] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), - [199] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), SHIFT_REPEAT(44), - [202] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), - [204] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), - [206] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), SHIFT_REPEAT(35), - [209] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 15), SHIFT_REPEAT(69), - [212] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 15), - [214] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), - [216] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), - [218] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), - [220] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), - [222] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), - [224] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [226] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), - [228] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), - [230] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), + [5] = {.entry = {.count = 1, .reusable = false}}, SHIFT(58), + [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), + [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), + [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(8), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(12), + [17] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__lvalue, 1), + [19] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__lvalue, 1), SHIFT(13), + [22] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), + [24] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__lvalue, 1), + [26] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), + [28] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr, 1), + [30] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), + [32] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), + [34] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr, 1), + [36] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), + [38] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_value, 3, .production_id = 5), + [40] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_value, 3, .production_id = 5), + [42] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_value, 4, .production_id = 10), + [44] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_value, 4, .production_id = 10), + [46] = {.entry = {.count = 1, .reusable = false}}, SHIFT(49), + [48] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), + [50] = {.entry = {.count = 1, .reusable = false}}, SHIFT(51), + [52] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), + [54] = {.entry = {.count = 1, .reusable = false}}, SHIFT(55), + [56] = {.entry = {.count = 1, .reusable = false}}, SHIFT(38), + [58] = {.entry = {.count = 1, .reusable = false}}, SHIFT(54), + [60] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32), + [62] = {.entry = {.count = 1, .reusable = false}}, SHIFT(57), + [64] = {.entry = {.count = 1, .reusable = false}}, SHIFT(59), + [66] = {.entry = {.count = 1, .reusable = false}}, SHIFT(56), + [68] = {.entry = {.count = 1, .reusable = false}}, SHIFT(50), + [70] = {.entry = {.count = 1, .reusable = false}}, SHIFT(52), + [72] = {.entry = {.count = 1, .reusable = false}}, SHIFT(28), + [74] = {.entry = {.count = 1, .reusable = false}}, SHIFT(27), + [76] = {.entry = {.count = 1, .reusable = false}}, SHIFT(46), + [78] = {.entry = {.count = 1, .reusable = false}}, SHIFT(48), + [80] = {.entry = {.count = 1, .reusable = false}}, SHIFT(41), + [82] = {.entry = {.count = 1, .reusable = false}}, SHIFT(42), + [84] = {.entry = {.count = 1, .reusable = false}}, SHIFT(43), + [86] = {.entry = {.count = 1, .reusable = false}}, SHIFT(44), + [88] = {.entry = {.count = 1, .reusable = false}}, SHIFT(45), + [90] = {.entry = {.count = 1, .reusable = false}}, SHIFT(53), + [92] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_expression, 4, .production_id = 9), + [94] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [96] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [98] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [100] = {.entry = {.count = 1, .reusable = false}}, SHIFT(23), + [102] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [104] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), + [106] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_expression, 2, .production_id = 1), + [108] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 4), + [110] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 4), + [112] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 3), + [114] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 3), + [116] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 7, .production_id = 15), + [118] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 7, .production_id = 15), + [120] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_expression, 6, .production_id = 14), + [122] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 3, .production_id = 2), + [124] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 3, .production_id = 2), + [126] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 2), + [128] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 2), + [130] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 6, .production_id = 13), + [132] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 6, .production_id = 13), + [134] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expression, 3, .production_id = 3), + [136] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expression, 3, .production_id = 3), + [138] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sequence_expression, 3), + [140] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sequence_expression, 3), + [142] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_expression, 6, .production_id = 12), + [144] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 4, .production_id = 7), + [146] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 4, .production_id = 7), + [148] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 5, .production_id = 11), + [150] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 5, .production_id = 11), + [152] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, .production_id = 4), + [154] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, .production_id = 4), + [156] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_expression, 4, .production_id = 8), + [158] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), + [160] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 2), + [162] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 2), + [164] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment_expression, 3, .production_id = 6), + [166] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment_expression, 3, .production_id = 6), + [168] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), + [170] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), + [172] = {.entry = {.count = 1, .reusable = true}}, SHIFT(72), + [174] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), + [176] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), + [178] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), + [180] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), + [182] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), + [184] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 4, .production_id = 17), + [186] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), + [188] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), + [190] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), + [192] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), + [194] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), + [196] = {.entry = {.count = 1, .reusable = false}}, SHIFT(30), + [198] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), + [200] = {.entry = {.count = 1, .reusable = false}}, SHIFT(47), + [202] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), + [204] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_string_literal_repeat1, 2), + [206] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_string_literal_repeat1, 2), SHIFT_REPEAT(62), + [209] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_sequence_expression_repeat1, 2), SHIFT_REPEAT(26), + [212] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), + [214] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_call_repeat1, 2), SHIFT_REPEAT(16), + [217] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), + [219] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [221] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 16), SHIFT_REPEAT(72), + [224] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expression_repeat1, 2, .production_id = 16), + [226] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73), + [228] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), + [230] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), + [232] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), + [234] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), + [236] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), + [238] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), + [240] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), }; #ifdef __cplusplus diff --git a/test/corpus/control_flow.txt b/test/corpus/control_flow.txt index ffc0cdc..57f6a9e 100644 --- a/test/corpus/control_flow.txt +++ b/test/corpus/control_flow.txt @@ -40,3 +40,16 @@ if 12 then if 27 then 42 else "nope" condition: (integer_literal) consequence: (integer_literal) alternative: (string_literal)))) + +================================================================================ +While +================================================================================ + +while 12 do 27 + +-------------------------------------------------------------------------------- + +(source_file + (while_expression + condition: (integer_literal) + body: (integer_literal)))