diff --git a/corpus/tests.txt b/corpus/tests.txt index 7ba0a45..45766e8 100644 --- a/corpus/tests.txt +++ b/corpus/tests.txt @@ -52,14 +52,14 @@ x = y + y; (source_file (expression - (identifier)) - (operator) - (expression - (identifier)) - (operator) - (expression - (identifier)) - (operator)) + (identifier) + (operator) + (expression + (identifier) + (operator) + (expression + (identifier)))) + (chain)) ================== String @@ -70,7 +70,7 @@ String --- (source_file - (expression + (value (string))) ================== @@ -82,7 +82,7 @@ Integer --- (source_file - (expression + (value (integer))) ================== @@ -94,7 +94,7 @@ Float --- (source_file - (expression + (value (float))) @@ -107,12 +107,12 @@ List --- (source_file - (expression + (value (list - (expression - (integer)) - (expression - (integer))))) + (value + (integer))) + (value + (integer)))) ================== Empty @@ -123,7 +123,7 @@ Empty --- (source_file - (expression + (value (empty))) ================== @@ -137,8 +137,8 @@ random_boolean(); (source_file (expression (tool)) - (expression + (value (empty)) - (operator)) + (chain)) diff --git a/grammar.js b/grammar.js index 2abe45d..2b1050e 100644 --- a/grammar.js +++ b/grammar.js @@ -1,20 +1,35 @@ module.exports = grammar({ - name: 'dust', + name: 'Dust', rules: { - source_file: $ => repeat(choice($.comment, $.expression, $.operator)), + source_file: $ => repeat(choice( + $.comment, + $.expression, + $.value, + $.yield, + $.chain + )), comment: $ => /(#)(.+?)([\n\r])/, expression: $ => choice( $.identifier, + $.tool, + seq($.identifier, $.operator, $.expression), + seq($.value, $.operator, $.value) + ), + + value: $ => choice( $.integer, $.float, $.string, $.list, - $.tool, $.empty, ), + + yield: $ => "->", + + chain: $ => ";", identifier: $ => /[a-zA-Z|_|.]+(_[a-zA-Z]+)*/, @@ -22,7 +37,6 @@ module.exports = grammar({ '=', '-', '+', - ';', '/', '|', '&' diff --git a/src/grammar.json b/src/grammar.json index 58b79a7..e066f1b 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -1,5 +1,5 @@ { - "name": "dust", + "name": "Dust", "rules": { "source_file": { "type": "REPEAT", @@ -16,7 +16,15 @@ }, { "type": "SYMBOL", - "name": "operator" + "name": "value" + }, + { + "type": "SYMBOL", + "name": "yield" + }, + { + "type": "SYMBOL", + "name": "chain" } ] } @@ -32,6 +40,49 @@ "type": "SYMBOL", "name": "identifier" }, + { + "type": "SYMBOL", + "name": "tool" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "operator" + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "value" + }, + { + "type": "SYMBOL", + "name": "operator" + }, + { + "type": "SYMBOL", + "name": "value" + } + ] + } + ] + }, + "value": { + "type": "CHOICE", + "members": [ { "type": "SYMBOL", "name": "integer" @@ -48,16 +99,20 @@ "type": "SYMBOL", "name": "list" }, - { - "type": "SYMBOL", - "name": "tool" - }, { "type": "SYMBOL", "name": "empty" } ] }, + "yield": { + "type": "STRING", + "value": "->" + }, + "chain": { + "type": "STRING", + "value": ";" + }, "identifier": { "type": "PATTERN", "value": "[a-zA-Z|_|.]+(_[a-zA-Z]+)*" @@ -77,10 +132,6 @@ "type": "STRING", "value": "+" }, - { - "type": "STRING", - "value": ";" - }, { "type": "STRING", "value": "/" diff --git a/src/node-types.json b/src/node-types.json index 8465b97..870f972 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -4,15 +4,11 @@ "named": true, "fields": {}, "children": { - "multiple": false, + "multiple": true, "required": true, "types": [ { - "type": "empty", - "named": true - }, - { - "type": "float", + "type": "expression", "named": true }, { @@ -20,20 +16,16 @@ "named": true }, { - "type": "integer", - "named": true - }, - { - "type": "list", - "named": true - }, - { - "type": "string", + "type": "operator", "named": true }, { "type": "tool", "named": true + }, + { + "type": "value", + "named": true } ] } @@ -66,6 +58,10 @@ "multiple": true, "required": false, "types": [ + { + "type": "chain", + "named": true + }, { "type": "comment", "named": true @@ -75,7 +71,11 @@ "named": true }, { - "type": "operator", + "type": "value", + "named": true + }, + { + "type": "yield", "named": true } ] @@ -86,6 +86,37 @@ "named": true, "fields": {} }, + { + "type": "value", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "empty", + "named": true + }, + { + "type": "float", + "named": true + }, + { + "type": "integer", + "named": true + }, + { + "type": "list", + "named": true + }, + { + "type": "string", + "named": true + } + ] + } + }, { "type": "&", "named": false @@ -115,12 +146,12 @@ "named": false }, { - "type": ";", + "type": "=", "named": false }, { - "type": "=", - "named": false + "type": "chain", + "named": true }, { "type": "comment", @@ -166,6 +197,10 @@ "type": "string", "named": true }, + { + "type": "yield", + "named": true + }, { "type": "|", "named": false diff --git a/src/parser.c b/src/parser.c index 9243d48..51e5a29 100644 --- a/src/parser.c +++ b/src/parser.c @@ -6,11 +6,11 @@ #endif #define LANGUAGE_VERSION 14 -#define STATE_COUNT 19 -#define LARGE_STATE_COUNT 11 -#define SYMBOL_COUNT 30 +#define STATE_COUNT 29 +#define LARGE_STATE_COUNT 17 +#define SYMBOL_COUNT 32 #define ALIAS_COUNT 0 -#define TOKEN_COUNT 23 +#define TOKEN_COUNT 24 #define EXTERNAL_TOKEN_COUNT 0 #define FIELD_COUNT 0 #define MAX_ALIAS_SEQUENCE_LENGTH 3 @@ -18,44 +18,47 @@ enum { sym_comment = 1, - sym_identifier = 2, - anon_sym_EQ = 3, - anon_sym_DASH = 4, - anon_sym_PLUS = 5, - anon_sym_SEMI = 6, - anon_sym_SLASH = 7, - anon_sym_PIPE = 8, - anon_sym_AMP = 9, - anon_sym_random = 10, - anon_sym_random_boolean = 11, - anon_sym_random_integer = 12, - anon_sym_random_string = 13, - anon_sym_random_float = 14, - sym_float = 15, - sym_integer = 16, - sym_string = 17, - sym_function = 18, - sym_empty = 19, - anon_sym_LPAREN = 20, - anon_sym_COMMA = 21, - anon_sym_RPAREN = 22, - sym_source_file = 23, - sym_expression = 24, - sym_operator = 25, - sym_tool = 26, - sym_list = 27, - aux_sym_source_file_repeat1 = 28, - aux_sym_list_repeat1 = 29, + sym_yield = 2, + sym_chain = 3, + sym_identifier = 4, + anon_sym_EQ = 5, + anon_sym_DASH = 6, + anon_sym_PLUS = 7, + anon_sym_SLASH = 8, + anon_sym_PIPE = 9, + anon_sym_AMP = 10, + anon_sym_random = 11, + anon_sym_random_boolean = 12, + anon_sym_random_integer = 13, + anon_sym_random_string = 14, + anon_sym_random_float = 15, + sym_float = 16, + sym_integer = 17, + sym_string = 18, + sym_function = 19, + sym_empty = 20, + anon_sym_LPAREN = 21, + anon_sym_COMMA = 22, + anon_sym_RPAREN = 23, + sym_source_file = 24, + sym_expression = 25, + sym_value = 26, + sym_operator = 27, + sym_tool = 28, + sym_list = 29, + aux_sym_source_file_repeat1 = 30, + aux_sym_list_repeat1 = 31, }; static const char * const ts_symbol_names[] = { [ts_builtin_sym_end] = "end", [sym_comment] = "comment", + [sym_yield] = "yield", + [sym_chain] = "chain", [sym_identifier] = "identifier", [anon_sym_EQ] = "=", [anon_sym_DASH] = "-", [anon_sym_PLUS] = "+", - [anon_sym_SEMI] = ";", [anon_sym_SLASH] = "/", [anon_sym_PIPE] = "|", [anon_sym_AMP] = "&", @@ -74,6 +77,7 @@ static const char * const ts_symbol_names[] = { [anon_sym_RPAREN] = ")", [sym_source_file] = "source_file", [sym_expression] = "expression", + [sym_value] = "value", [sym_operator] = "operator", [sym_tool] = "tool", [sym_list] = "list", @@ -84,11 +88,12 @@ static const char * const ts_symbol_names[] = { static const TSSymbol ts_symbol_map[] = { [ts_builtin_sym_end] = ts_builtin_sym_end, [sym_comment] = sym_comment, + [sym_yield] = sym_yield, + [sym_chain] = sym_chain, [sym_identifier] = sym_identifier, [anon_sym_EQ] = anon_sym_EQ, [anon_sym_DASH] = anon_sym_DASH, [anon_sym_PLUS] = anon_sym_PLUS, - [anon_sym_SEMI] = anon_sym_SEMI, [anon_sym_SLASH] = anon_sym_SLASH, [anon_sym_PIPE] = anon_sym_PIPE, [anon_sym_AMP] = anon_sym_AMP, @@ -107,6 +112,7 @@ static const TSSymbol ts_symbol_map[] = { [anon_sym_RPAREN] = anon_sym_RPAREN, [sym_source_file] = sym_source_file, [sym_expression] = sym_expression, + [sym_value] = sym_value, [sym_operator] = sym_operator, [sym_tool] = sym_tool, [sym_list] = sym_list, @@ -123,6 +129,14 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, + [sym_yield] = { + .visible = true, + .named = true, + }, + [sym_chain] = { + .visible = true, + .named = true, + }, [sym_identifier] = { .visible = true, .named = true, @@ -139,10 +153,6 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, - [anon_sym_SEMI] = { - .visible = true, - .named = false, - }, [anon_sym_SLASH] = { .visible = true, .named = false, @@ -215,6 +225,10 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, + [sym_value] = { + .visible = true, + .named = true, + }, [sym_operator] = { .visible = true, .named = true, @@ -256,15 +270,25 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [7] = 7, [8] = 8, [9] = 9, - [10] = 8, + [10] = 10, [11] = 11, - [12] = 11, - [13] = 13, + [12] = 12, + [13] = 5, [14] = 4, - [15] = 6, - [16] = 7, + [15] = 8, + [16] = 8, [17] = 17, - [18] = 18, + [18] = 17, + [19] = 17, + [20] = 20, + [21] = 21, + [22] = 22, + [23] = 23, + [24] = 24, + [25] = 25, + [26] = 5, + [27] = 4, + [28] = 28, }; static bool ts_lex(TSLexer *lexer, TSStateId state) { @@ -272,439 +296,468 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { eof = lexer->eof(lexer); switch (state) { case 0: - if (eof) ADVANCE(6); - if (lookahead == '"') ADVANCE(3); - if (lookahead == '#') ADVANCE(5); - if (lookahead == '&') ADVANCE(44); + if (eof) ADVANCE(8); + if (lookahead == '"') ADVANCE(2); + if (lookahead == '#') ADVANCE(6); + if (lookahead == '&') ADVANCE(49); if (lookahead == '\'') ADVANCE(4); - if (lookahead == '(') ADVANCE(55); - if (lookahead == ')') ADVANCE(57); - if (lookahead == '+') ADVANCE(40); - if (lookahead == ',') ADVANCE(56); - if (lookahead == '-') ADVANCE(39); - if (lookahead == '/') ADVANCE(42); - if (lookahead == ';') ADVANCE(41); - if (lookahead == '=') ADVANCE(38); - if (lookahead == 'r') ADVANCE(9); - if (lookahead == '|') ADVANCE(43); + if (lookahead == '(') ADVANCE(60); + if (lookahead == ')') ADVANCE(62); + if (lookahead == '+') ADVANCE(45); + if (lookahead == ',') ADVANCE(61); + if (lookahead == '-') ADVANCE(44); + if (lookahead == '/') ADVANCE(46); + if (lookahead == ';') ADVANCE(12); + if (lookahead == '=') ADVANCE(42); + if (lookahead == 'r') ADVANCE(13); + if (lookahead == '|') ADVANCE(48); if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || lookahead == ' ') SKIP(0) - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(51); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(56); if (lookahead == '.' || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(37); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(41); END_STATE(); case 1: - if (lookahead == '\n') ADVANCE(7); - if (lookahead == '\r') ADVANCE(8); + if (lookahead == '\n') ADVANCE(9); + if (lookahead == '\r') ADVANCE(10); if (lookahead != 0) ADVANCE(1); END_STATE(); case 2: - if (lookahead == '"') ADVANCE(3); - if (lookahead == '(') ADVANCE(55); - if (lookahead == ')') ADVANCE(57); - if (lookahead == ',') ADVANCE(56); - if (lookahead == 'r') ADVANCE(9); + if (lookahead == '"') ADVANCE(57); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(2); + END_STATE(); + case 3: + if (lookahead == '&') ADVANCE(49); + if (lookahead == '+') ADVANCE(45); + if (lookahead == '-') ADVANCE(43); + if (lookahead == '/') ADVANCE(46); + if (lookahead == '=') ADVANCE(42); + if (lookahead == '|') ADVANCE(47); if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || - lookahead == ' ') SKIP(2) - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(51); - if (lookahead == '.' || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z') || - lookahead == '|') ADVANCE(37); - END_STATE(); - case 3: - if (lookahead == '"') ADVANCE(52); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(3); + lookahead == ' ') SKIP(3) END_STATE(); case 4: - if (lookahead == '\'') ADVANCE(53); + if (lookahead == '\'') ADVANCE(58); if (lookahead != 0 && lookahead != '\n') ADVANCE(4); END_STATE(); case 5: + if (lookahead == '>') ADVANCE(11); + END_STATE(); + case 6: if (lookahead != 0 && lookahead != '\n') ADVANCE(1); END_STATE(); - case 6: - ACCEPT_TOKEN(ts_builtin_sym_end); - END_STATE(); case 7: - ACCEPT_TOKEN(sym_comment); - END_STATE(); - case 8: - ACCEPT_TOKEN(sym_comment); - if (lookahead == '\n') ADVANCE(7); - if (lookahead == '\r') ADVANCE(8); - if (lookahead != 0) ADVANCE(1); - END_STATE(); - case 9: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'a') ADVANCE(23); + if (eof) ADVANCE(8); + if (lookahead == '"') ADVANCE(2); + if (lookahead == '#') ADVANCE(6); + if (lookahead == '(') ADVANCE(60); + if (lookahead == ')') ADVANCE(62); + if (lookahead == ',') ADVANCE(61); + if (lookahead == '-') ADVANCE(5); + if (lookahead == ';') ADVANCE(12); + if (lookahead == 'r') ADVANCE(13); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(7) + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(56); if (lookahead == '.' || ('A' <= lookahead && lookahead <= 'Z') || - ('b' <= lookahead && lookahead <= 'z') || - lookahead == '|') ADVANCE(37); + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z') || + lookahead == '|') ADVANCE(41); + END_STATE(); + case 8: + ACCEPT_TOKEN(ts_builtin_sym_end); + END_STATE(); + case 9: + ACCEPT_TOKEN(sym_comment); END_STATE(); case 10: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'a') ADVANCE(24); - if (lookahead == '.' || - lookahead == '|') ADVANCE(37); - if (('A' <= lookahead && lookahead <= 'Z') || - ('b' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ACCEPT_TOKEN(sym_comment); + if (lookahead == '\n') ADVANCE(9); + if (lookahead == '\r') ADVANCE(10); + if (lookahead != 0) ADVANCE(1); END_STATE(); case 11: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'a') ADVANCE(35); - if (lookahead == '.' || - lookahead == '|') ADVANCE(37); - if (('A' <= lookahead && lookahead <= 'Z') || - ('b' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ACCEPT_TOKEN(sym_yield); END_STATE(); case 12: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'b') ADVANCE(29); - if (lookahead == 'f') ADVANCE(21); - if (lookahead == 'i') ADVANCE(25); - if (lookahead == 's') ADVANCE(33); - if (lookahead == '.' || - lookahead == '|') ADVANCE(37); - if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ACCEPT_TOKEN(sym_chain); END_STATE(); case 13: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'd') ADVANCE(27); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'a') ADVANCE(27); if (lookahead == '.' || ('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z') || - lookahead == '|') ADVANCE(37); + ('b' <= lookahead && lookahead <= 'z') || + lookahead == '|') ADVANCE(41); END_STATE(); case 14: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'e') ADVANCE(18); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'a') ADVANCE(28); if (lookahead == '.' || - lookahead == '|') ADVANCE(37); + lookahead == '|') ADVANCE(41); if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ('b' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 15: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'e') ADVANCE(32); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'a') ADVANCE(39); if (lookahead == '.' || - lookahead == '|') ADVANCE(37); + lookahead == '|') ADVANCE(41); if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ('b' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 16: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'e') ADVANCE(10); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'b') ADVANCE(33); + if (lookahead == 'f') ADVANCE(25); + if (lookahead == 'i') ADVANCE(29); + if (lookahead == 's') ADVANCE(37); if (lookahead == '.' || - lookahead == '|') ADVANCE(37); + lookahead == '|') ADVANCE(41); if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 17: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'g') ADVANCE(48); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'd') ADVANCE(31); if (lookahead == '.' || - lookahead == '|') ADVANCE(37); - if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z') || + lookahead == '|') ADVANCE(41); END_STATE(); case 18: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'g') ADVANCE(15); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'e') ADVANCE(22); if (lookahead == '.' || - lookahead == '|') ADVANCE(37); + lookahead == '|') ADVANCE(41); if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 19: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'i') ADVANCE(26); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'e') ADVANCE(36); if (lookahead == '.' || - lookahead == '|') ADVANCE(37); + lookahead == '|') ADVANCE(41); if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 20: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'l') ADVANCE(16); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'e') ADVANCE(14); if (lookahead == '.' || - lookahead == '|') ADVANCE(37); + lookahead == '|') ADVANCE(41); if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 21: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'l') ADVANCE(28); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'g') ADVANCE(53); if (lookahead == '.' || - lookahead == '|') ADVANCE(37); + lookahead == '|') ADVANCE(41); if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 22: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'm') ADVANCE(45); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'g') ADVANCE(19); if (lookahead == '.' || - ('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z') || - lookahead == '|') ADVANCE(37); + lookahead == '|') ADVANCE(41); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 23: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'n') ADVANCE(13); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'i') ADVANCE(30); if (lookahead == '.' || - ('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z') || - lookahead == '|') ADVANCE(37); + lookahead == '|') ADVANCE(41); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 24: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'n') ADVANCE(46); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'l') ADVANCE(20); if (lookahead == '.' || - lookahead == '|') ADVANCE(37); + lookahead == '|') ADVANCE(41); if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 25: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'n') ADVANCE(34); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'l') ADVANCE(32); if (lookahead == '.' || - lookahead == '|') ADVANCE(37); + lookahead == '|') ADVANCE(41); if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 26: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'n') ADVANCE(17); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'm') ADVANCE(50); if (lookahead == '.' || - lookahead == '|') ADVANCE(37); - if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z') || + lookahead == '|') ADVANCE(41); END_STATE(); case 27: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'o') ADVANCE(22); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'n') ADVANCE(17); if (lookahead == '.' || ('A' <= lookahead && lookahead <= 'Z') || ('a' <= lookahead && lookahead <= 'z') || - lookahead == '|') ADVANCE(37); + lookahead == '|') ADVANCE(41); END_STATE(); case 28: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'o') ADVANCE(11); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'n') ADVANCE(51); if (lookahead == '.' || - lookahead == '|') ADVANCE(37); + lookahead == '|') ADVANCE(41); if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 29: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'o') ADVANCE(30); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'n') ADVANCE(38); if (lookahead == '.' || - lookahead == '|') ADVANCE(37); + lookahead == '|') ADVANCE(41); if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 30: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'o') ADVANCE(20); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'n') ADVANCE(21); if (lookahead == '.' || - lookahead == '|') ADVANCE(37); + lookahead == '|') ADVANCE(41); if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 31: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'r') ADVANCE(19); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'o') ADVANCE(26); if (lookahead == '.' || - lookahead == '|') ADVANCE(37); - if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z') || + lookahead == '|') ADVANCE(41); END_STATE(); case 32: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 'r') ADVANCE(47); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'o') ADVANCE(15); if (lookahead == '.' || - lookahead == '|') ADVANCE(37); + lookahead == '|') ADVANCE(41); if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 33: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 't') ADVANCE(31); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'o') ADVANCE(34); if (lookahead == '.' || - lookahead == '|') ADVANCE(37); + lookahead == '|') ADVANCE(41); if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 34: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 't') ADVANCE(14); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'o') ADVANCE(24); if (lookahead == '.' || - lookahead == '|') ADVANCE(37); + lookahead == '|') ADVANCE(41); if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 35: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); - if (lookahead == 't') ADVANCE(49); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'r') ADVANCE(23); if (lookahead == '.' || - lookahead == '|') ADVANCE(37); + lookahead == '|') ADVANCE(41); if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 36: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 'r') ADVANCE(52); if (lookahead == '.' || - lookahead == '|') ADVANCE(37); + lookahead == '|') ADVANCE(41); if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 37: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '_') ADVANCE(36); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 't') ADVANCE(35); if (lookahead == '.' || - ('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z') || - lookahead == '|') ADVANCE(37); + lookahead == '|') ADVANCE(41); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 38: - ACCEPT_TOKEN(anon_sym_EQ); + ACCEPT_TOKEN(sym_identifier); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 't') ADVANCE(18); + if (lookahead == '.' || + lookahead == '|') ADVANCE(41); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 39: - ACCEPT_TOKEN(anon_sym_DASH); + ACCEPT_TOKEN(sym_identifier); + if (lookahead == '_') ADVANCE(40); + if (lookahead == 't') ADVANCE(54); + if (lookahead == '.' || + lookahead == '|') ADVANCE(41); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 40: - ACCEPT_TOKEN(anon_sym_PLUS); + ACCEPT_TOKEN(sym_identifier); + if (lookahead == '_') ADVANCE(40); + if (lookahead == '.' || + lookahead == '|') ADVANCE(41); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 41: - ACCEPT_TOKEN(anon_sym_SEMI); + ACCEPT_TOKEN(sym_identifier); + if (lookahead == '_') ADVANCE(40); + if (lookahead == '.' || + ('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z') || + lookahead == '|') ADVANCE(41); END_STATE(); case 42: - ACCEPT_TOKEN(anon_sym_SLASH); + ACCEPT_TOKEN(anon_sym_EQ); END_STATE(); case 43: - ACCEPT_TOKEN(anon_sym_PIPE); - if (lookahead == '_') ADVANCE(36); - if (lookahead == '.' || - ('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z') || - lookahead == '|') ADVANCE(37); + ACCEPT_TOKEN(anon_sym_DASH); END_STATE(); case 44: - ACCEPT_TOKEN(anon_sym_AMP); + ACCEPT_TOKEN(anon_sym_DASH); + if (lookahead == '>') ADVANCE(11); END_STATE(); case 45: - ACCEPT_TOKEN(anon_sym_random); - if (lookahead == '_') ADVANCE(12); + ACCEPT_TOKEN(anon_sym_PLUS); + END_STATE(); + case 46: + ACCEPT_TOKEN(anon_sym_SLASH); + END_STATE(); + case 47: + ACCEPT_TOKEN(anon_sym_PIPE); + END_STATE(); + case 48: + ACCEPT_TOKEN(anon_sym_PIPE); + if (lookahead == '_') ADVANCE(40); if (lookahead == '.' || ('A' <= lookahead && lookahead <= 'Z') || ('a' <= lookahead && lookahead <= 'z') || - lookahead == '|') ADVANCE(37); - END_STATE(); - case 46: - ACCEPT_TOKEN(anon_sym_random_boolean); - if (lookahead == '_') ADVANCE(36); - if (lookahead == '.' || - lookahead == '|') ADVANCE(37); - if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); - END_STATE(); - case 47: - ACCEPT_TOKEN(anon_sym_random_integer); - if (lookahead == '_') ADVANCE(36); - if (lookahead == '.' || - lookahead == '|') ADVANCE(37); - if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); - END_STATE(); - case 48: - ACCEPT_TOKEN(anon_sym_random_string); - if (lookahead == '_') ADVANCE(36); - if (lookahead == '.' || - lookahead == '|') ADVANCE(37); - if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + lookahead == '|') ADVANCE(41); END_STATE(); case 49: - ACCEPT_TOKEN(anon_sym_random_float); - if (lookahead == '_') ADVANCE(36); - if (lookahead == '.' || - lookahead == '|') ADVANCE(37); - if (('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ACCEPT_TOKEN(anon_sym_AMP); END_STATE(); case 50: - ACCEPT_TOKEN(sym_float); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(50); + ACCEPT_TOKEN(anon_sym_random); + if (lookahead == '_') ADVANCE(16); + if (lookahead == '.' || + ('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z') || + lookahead == '|') ADVANCE(41); END_STATE(); case 51: - ACCEPT_TOKEN(sym_integer); - if (lookahead == '.') ADVANCE(50); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(51); + ACCEPT_TOKEN(anon_sym_random_boolean); + if (lookahead == '_') ADVANCE(40); + if (lookahead == '.' || + lookahead == '|') ADVANCE(41); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 52: - ACCEPT_TOKEN(sym_string); - if (lookahead == '"') ADVANCE(52); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(3); + ACCEPT_TOKEN(anon_sym_random_integer); + if (lookahead == '_') ADVANCE(40); + if (lookahead == '.' || + lookahead == '|') ADVANCE(41); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); END_STATE(); case 53: + ACCEPT_TOKEN(anon_sym_random_string); + if (lookahead == '_') ADVANCE(40); + if (lookahead == '.' || + lookahead == '|') ADVANCE(41); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); + END_STATE(); + case 54: + ACCEPT_TOKEN(anon_sym_random_float); + if (lookahead == '_') ADVANCE(40); + if (lookahead == '.' || + lookahead == '|') ADVANCE(41); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); + END_STATE(); + case 55: + ACCEPT_TOKEN(sym_float); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(55); + END_STATE(); + case 56: + ACCEPT_TOKEN(sym_integer); + if (lookahead == '.') ADVANCE(55); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(56); + END_STATE(); + case 57: + ACCEPT_TOKEN(sym_string); + if (lookahead == '"') ADVANCE(57); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(2); + END_STATE(); + case 58: ACCEPT_TOKEN(sym_function); - if (lookahead == '\'') ADVANCE(53); + if (lookahead == '\'') ADVANCE(58); if (lookahead != 0 && lookahead != '\n') ADVANCE(4); END_STATE(); - case 54: + case 59: ACCEPT_TOKEN(sym_empty); END_STATE(); - case 55: + case 60: ACCEPT_TOKEN(anon_sym_LPAREN); - if (lookahead == ')') ADVANCE(54); + if (lookahead == ')') ADVANCE(59); END_STATE(); - case 56: + case 61: ACCEPT_TOKEN(anon_sym_COMMA); END_STATE(); - case 57: + case 62: ACCEPT_TOKEN(anon_sym_RPAREN); END_STATE(); default: @@ -714,35 +767,46 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { static const TSLexMode ts_lex_modes[STATE_COUNT] = { [0] = {.lex_state = 0}, - [1] = {.lex_state = 0}, + [1] = {.lex_state = 7}, [2] = {.lex_state = 0}, [3] = {.lex_state = 0}, [4] = {.lex_state = 0}, [5] = {.lex_state = 0}, - [6] = {.lex_state = 0}, - [7] = {.lex_state = 0}, - [8] = {.lex_state = 2}, - [9] = {.lex_state = 2}, - [10] = {.lex_state = 2}, - [11] = {.lex_state = 2}, - [12] = {.lex_state = 2}, - [13] = {.lex_state = 2}, - [14] = {.lex_state = 2}, - [15] = {.lex_state = 2}, - [16] = {.lex_state = 2}, - [17] = {.lex_state = 2}, - [18] = {.lex_state = 0}, + [6] = {.lex_state = 7}, + [7] = {.lex_state = 7}, + [8] = {.lex_state = 7}, + [9] = {.lex_state = 7}, + [10] = {.lex_state = 7}, + [11] = {.lex_state = 7}, + [12] = {.lex_state = 7}, + [13] = {.lex_state = 7}, + [14] = {.lex_state = 7}, + [15] = {.lex_state = 7}, + [16] = {.lex_state = 7}, + [17] = {.lex_state = 7}, + [18] = {.lex_state = 7}, + [19] = {.lex_state = 7}, + [20] = {.lex_state = 7}, + [21] = {.lex_state = 7}, + [22] = {.lex_state = 7}, + [23] = {.lex_state = 7}, + [24] = {.lex_state = 3}, + [25] = {.lex_state = 0}, + [26] = {.lex_state = 3}, + [27] = {.lex_state = 3}, + [28] = {.lex_state = 0}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [0] = { [ts_builtin_sym_end] = ACTIONS(1), [sym_comment] = ACTIONS(1), + [sym_yield] = ACTIONS(1), + [sym_chain] = ACTIONS(1), [sym_identifier] = ACTIONS(1), [anon_sym_EQ] = ACTIONS(1), [anon_sym_DASH] = ACTIONS(1), [anon_sym_PLUS] = ACTIONS(1), - [anon_sym_SEMI] = ACTIONS(1), [anon_sym_SLASH] = ACTIONS(1), [anon_sym_PIPE] = ACTIONS(1), [anon_sym_AMP] = ACTIONS(1), @@ -761,287 +825,457 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_RPAREN] = ACTIONS(1), }, [1] = { - [sym_source_file] = STATE(18), - [sym_expression] = STATE(2), - [sym_operator] = STATE(2), - [sym_tool] = STATE(4), - [sym_list] = STATE(4), - [aux_sym_source_file_repeat1] = STATE(2), + [sym_source_file] = STATE(28), + [sym_expression] = STATE(6), + [sym_value] = STATE(3), + [sym_tool] = STATE(9), + [sym_list] = STATE(5), + [aux_sym_source_file_repeat1] = STATE(6), [ts_builtin_sym_end] = ACTIONS(3), [sym_comment] = ACTIONS(5), + [sym_yield] = ACTIONS(5), + [sym_chain] = ACTIONS(5), [sym_identifier] = ACTIONS(7), - [anon_sym_EQ] = ACTIONS(9), - [anon_sym_DASH] = ACTIONS(9), - [anon_sym_PLUS] = ACTIONS(9), - [anon_sym_SEMI] = ACTIONS(9), - [anon_sym_SLASH] = ACTIONS(9), - [anon_sym_PIPE] = ACTIONS(11), - [anon_sym_AMP] = ACTIONS(9), - [anon_sym_random] = ACTIONS(13), - [anon_sym_random_boolean] = ACTIONS(13), - [anon_sym_random_integer] = ACTIONS(13), - [anon_sym_random_string] = ACTIONS(13), - [anon_sym_random_float] = ACTIONS(13), - [sym_float] = ACTIONS(15), - [sym_integer] = ACTIONS(7), - [sym_string] = ACTIONS(15), - [sym_empty] = ACTIONS(15), - [anon_sym_LPAREN] = ACTIONS(17), + [anon_sym_random] = ACTIONS(9), + [anon_sym_random_boolean] = ACTIONS(9), + [anon_sym_random_integer] = ACTIONS(9), + [anon_sym_random_string] = ACTIONS(9), + [anon_sym_random_float] = ACTIONS(9), + [sym_float] = ACTIONS(11), + [sym_integer] = ACTIONS(13), + [sym_string] = ACTIONS(11), + [sym_empty] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(15), }, [2] = { - [sym_expression] = STATE(3), - [sym_operator] = STATE(3), - [sym_tool] = STATE(4), - [sym_list] = STATE(4), - [aux_sym_source_file_repeat1] = STATE(3), - [ts_builtin_sym_end] = ACTIONS(19), - [sym_comment] = ACTIONS(21), - [sym_identifier] = ACTIONS(7), - [anon_sym_EQ] = ACTIONS(9), - [anon_sym_DASH] = ACTIONS(9), - [anon_sym_PLUS] = ACTIONS(9), - [anon_sym_SEMI] = ACTIONS(9), - [anon_sym_SLASH] = ACTIONS(9), - [anon_sym_PIPE] = ACTIONS(11), - [anon_sym_AMP] = ACTIONS(9), - [anon_sym_random] = ACTIONS(13), - [anon_sym_random_boolean] = ACTIONS(13), - [anon_sym_random_integer] = ACTIONS(13), - [anon_sym_random_string] = ACTIONS(13), - [anon_sym_random_float] = ACTIONS(13), - [sym_float] = ACTIONS(15), - [sym_integer] = ACTIONS(7), - [sym_string] = ACTIONS(15), - [sym_empty] = ACTIONS(15), - [anon_sym_LPAREN] = ACTIONS(17), + [sym_operator] = STATE(20), + [ts_builtin_sym_end] = ACTIONS(17), + [sym_comment] = ACTIONS(17), + [sym_yield] = ACTIONS(17), + [sym_chain] = ACTIONS(17), + [sym_identifier] = ACTIONS(19), + [anon_sym_EQ] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(21), + [anon_sym_SLASH] = ACTIONS(21), + [anon_sym_PIPE] = ACTIONS(23), + [anon_sym_AMP] = ACTIONS(21), + [anon_sym_random] = ACTIONS(19), + [anon_sym_random_boolean] = ACTIONS(19), + [anon_sym_random_integer] = ACTIONS(19), + [anon_sym_random_string] = ACTIONS(19), + [anon_sym_random_float] = ACTIONS(19), + [sym_float] = ACTIONS(17), + [sym_integer] = ACTIONS(19), + [sym_string] = ACTIONS(17), + [sym_empty] = ACTIONS(17), + [anon_sym_LPAREN] = ACTIONS(19), + [anon_sym_COMMA] = ACTIONS(17), + [anon_sym_RPAREN] = ACTIONS(17), }, [3] = { - [sym_expression] = STATE(3), - [sym_operator] = STATE(3), - [sym_tool] = STATE(4), - [sym_list] = STATE(4), - [aux_sym_source_file_repeat1] = STATE(3), - [ts_builtin_sym_end] = ACTIONS(23), + [sym_operator] = STATE(25), + [ts_builtin_sym_end] = ACTIONS(25), [sym_comment] = ACTIONS(25), - [sym_identifier] = ACTIONS(28), - [anon_sym_EQ] = ACTIONS(31), - [anon_sym_DASH] = ACTIONS(31), - [anon_sym_PLUS] = ACTIONS(31), - [anon_sym_SEMI] = ACTIONS(31), - [anon_sym_SLASH] = ACTIONS(31), - [anon_sym_PIPE] = ACTIONS(34), - [anon_sym_AMP] = ACTIONS(31), - [anon_sym_random] = ACTIONS(37), - [anon_sym_random_boolean] = ACTIONS(37), - [anon_sym_random_integer] = ACTIONS(37), - [anon_sym_random_string] = ACTIONS(37), - [anon_sym_random_float] = ACTIONS(37), - [sym_float] = ACTIONS(40), - [sym_integer] = ACTIONS(28), - [sym_string] = ACTIONS(40), - [sym_empty] = ACTIONS(40), - [anon_sym_LPAREN] = ACTIONS(43), + [sym_yield] = ACTIONS(25), + [sym_chain] = ACTIONS(25), + [sym_identifier] = ACTIONS(27), + [anon_sym_EQ] = ACTIONS(21), + [anon_sym_DASH] = ACTIONS(23), + [anon_sym_PLUS] = ACTIONS(21), + [anon_sym_SLASH] = ACTIONS(21), + [anon_sym_PIPE] = ACTIONS(23), + [anon_sym_AMP] = ACTIONS(21), + [anon_sym_random] = ACTIONS(27), + [anon_sym_random_boolean] = ACTIONS(27), + [anon_sym_random_integer] = ACTIONS(27), + [anon_sym_random_string] = ACTIONS(27), + [anon_sym_random_float] = ACTIONS(27), + [sym_float] = ACTIONS(25), + [sym_integer] = ACTIONS(27), + [sym_string] = ACTIONS(25), + [sym_empty] = ACTIONS(25), + [anon_sym_LPAREN] = ACTIONS(27), }, [4] = { - [ts_builtin_sym_end] = ACTIONS(46), - [sym_comment] = ACTIONS(46), - [sym_identifier] = ACTIONS(48), - [anon_sym_EQ] = ACTIONS(46), - [anon_sym_DASH] = ACTIONS(46), - [anon_sym_PLUS] = ACTIONS(46), - [anon_sym_SEMI] = ACTIONS(46), - [anon_sym_SLASH] = ACTIONS(46), - [anon_sym_PIPE] = ACTIONS(48), - [anon_sym_AMP] = ACTIONS(46), - [anon_sym_random] = ACTIONS(48), - [anon_sym_random_boolean] = ACTIONS(48), - [anon_sym_random_integer] = ACTIONS(48), - [anon_sym_random_string] = ACTIONS(48), - [anon_sym_random_float] = ACTIONS(48), - [sym_float] = ACTIONS(46), - [sym_integer] = ACTIONS(48), - [sym_string] = ACTIONS(46), - [sym_empty] = ACTIONS(46), - [anon_sym_LPAREN] = ACTIONS(48), + [ts_builtin_sym_end] = ACTIONS(29), + [sym_comment] = ACTIONS(29), + [sym_yield] = ACTIONS(29), + [sym_chain] = ACTIONS(29), + [sym_identifier] = ACTIONS(31), + [anon_sym_EQ] = ACTIONS(29), + [anon_sym_DASH] = ACTIONS(31), + [anon_sym_PLUS] = ACTIONS(29), + [anon_sym_SLASH] = ACTIONS(29), + [anon_sym_PIPE] = ACTIONS(31), + [anon_sym_AMP] = ACTIONS(29), + [anon_sym_random] = ACTIONS(31), + [anon_sym_random_boolean] = ACTIONS(31), + [anon_sym_random_integer] = ACTIONS(31), + [anon_sym_random_string] = ACTIONS(31), + [anon_sym_random_float] = ACTIONS(31), + [sym_float] = ACTIONS(29), + [sym_integer] = ACTIONS(31), + [sym_string] = ACTIONS(29), + [sym_empty] = ACTIONS(29), + [anon_sym_LPAREN] = ACTIONS(31), }, [5] = { - [ts_builtin_sym_end] = ACTIONS(50), - [sym_comment] = ACTIONS(50), - [sym_identifier] = ACTIONS(52), - [anon_sym_EQ] = ACTIONS(50), - [anon_sym_DASH] = ACTIONS(50), - [anon_sym_PLUS] = ACTIONS(50), - [anon_sym_SEMI] = ACTIONS(50), - [anon_sym_SLASH] = ACTIONS(50), - [anon_sym_PIPE] = ACTIONS(52), - [anon_sym_AMP] = ACTIONS(50), - [anon_sym_random] = ACTIONS(52), - [anon_sym_random_boolean] = ACTIONS(52), - [anon_sym_random_integer] = ACTIONS(52), - [anon_sym_random_string] = ACTIONS(52), - [anon_sym_random_float] = ACTIONS(52), - [sym_float] = ACTIONS(50), - [sym_integer] = ACTIONS(52), - [sym_string] = ACTIONS(50), - [sym_empty] = ACTIONS(50), - [anon_sym_LPAREN] = ACTIONS(52), + [ts_builtin_sym_end] = ACTIONS(33), + [sym_comment] = ACTIONS(33), + [sym_yield] = ACTIONS(33), + [sym_chain] = ACTIONS(33), + [sym_identifier] = ACTIONS(35), + [anon_sym_EQ] = ACTIONS(33), + [anon_sym_DASH] = ACTIONS(35), + [anon_sym_PLUS] = ACTIONS(33), + [anon_sym_SLASH] = ACTIONS(33), + [anon_sym_PIPE] = ACTIONS(35), + [anon_sym_AMP] = ACTIONS(33), + [anon_sym_random] = ACTIONS(35), + [anon_sym_random_boolean] = ACTIONS(35), + [anon_sym_random_integer] = ACTIONS(35), + [anon_sym_random_string] = ACTIONS(35), + [anon_sym_random_float] = ACTIONS(35), + [sym_float] = ACTIONS(33), + [sym_integer] = ACTIONS(35), + [sym_string] = ACTIONS(33), + [sym_empty] = ACTIONS(33), + [anon_sym_LPAREN] = ACTIONS(35), }, [6] = { - [ts_builtin_sym_end] = ACTIONS(54), - [sym_comment] = ACTIONS(54), - [sym_identifier] = ACTIONS(56), - [anon_sym_EQ] = ACTIONS(54), - [anon_sym_DASH] = ACTIONS(54), - [anon_sym_PLUS] = ACTIONS(54), - [anon_sym_SEMI] = ACTIONS(54), - [anon_sym_SLASH] = ACTIONS(54), - [anon_sym_PIPE] = ACTIONS(56), - [anon_sym_AMP] = ACTIONS(54), - [anon_sym_random] = ACTIONS(56), - [anon_sym_random_boolean] = ACTIONS(56), - [anon_sym_random_integer] = ACTIONS(56), - [anon_sym_random_string] = ACTIONS(56), - [anon_sym_random_float] = ACTIONS(56), - [sym_float] = ACTIONS(54), - [sym_integer] = ACTIONS(56), - [sym_string] = ACTIONS(54), - [sym_empty] = ACTIONS(54), - [anon_sym_LPAREN] = ACTIONS(56), + [sym_expression] = STATE(7), + [sym_value] = STATE(3), + [sym_tool] = STATE(9), + [sym_list] = STATE(5), + [aux_sym_source_file_repeat1] = STATE(7), + [ts_builtin_sym_end] = ACTIONS(37), + [sym_comment] = ACTIONS(39), + [sym_yield] = ACTIONS(39), + [sym_chain] = ACTIONS(39), + [sym_identifier] = ACTIONS(7), + [anon_sym_random] = ACTIONS(9), + [anon_sym_random_boolean] = ACTIONS(9), + [anon_sym_random_integer] = ACTIONS(9), + [anon_sym_random_string] = ACTIONS(9), + [anon_sym_random_float] = ACTIONS(9), + [sym_float] = ACTIONS(11), + [sym_integer] = ACTIONS(13), + [sym_string] = ACTIONS(11), + [sym_empty] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(15), }, [7] = { - [ts_builtin_sym_end] = ACTIONS(58), - [sym_comment] = ACTIONS(58), - [sym_identifier] = ACTIONS(60), - [anon_sym_EQ] = ACTIONS(58), - [anon_sym_DASH] = ACTIONS(58), - [anon_sym_PLUS] = ACTIONS(58), - [anon_sym_SEMI] = ACTIONS(58), - [anon_sym_SLASH] = ACTIONS(58), - [anon_sym_PIPE] = ACTIONS(60), - [anon_sym_AMP] = ACTIONS(58), - [anon_sym_random] = ACTIONS(60), - [anon_sym_random_boolean] = ACTIONS(60), - [anon_sym_random_integer] = ACTIONS(60), - [anon_sym_random_string] = ACTIONS(60), - [anon_sym_random_float] = ACTIONS(60), - [sym_float] = ACTIONS(58), - [sym_integer] = ACTIONS(60), - [sym_string] = ACTIONS(58), - [sym_empty] = ACTIONS(58), - [anon_sym_LPAREN] = ACTIONS(60), + [sym_expression] = STATE(7), + [sym_value] = STATE(3), + [sym_tool] = STATE(9), + [sym_list] = STATE(5), + [aux_sym_source_file_repeat1] = STATE(7), + [ts_builtin_sym_end] = ACTIONS(41), + [sym_comment] = ACTIONS(43), + [sym_yield] = ACTIONS(43), + [sym_chain] = ACTIONS(43), + [sym_identifier] = ACTIONS(46), + [anon_sym_random] = ACTIONS(49), + [anon_sym_random_boolean] = ACTIONS(49), + [anon_sym_random_integer] = ACTIONS(49), + [anon_sym_random_string] = ACTIONS(49), + [anon_sym_random_float] = ACTIONS(49), + [sym_float] = ACTIONS(52), + [sym_integer] = ACTIONS(55), + [sym_string] = ACTIONS(52), + [sym_empty] = ACTIONS(52), + [anon_sym_LPAREN] = ACTIONS(58), }, [8] = { - [sym_expression] = STATE(13), - [sym_tool] = STATE(14), - [sym_list] = STATE(14), - [aux_sym_list_repeat1] = STATE(9), - [sym_identifier] = ACTIONS(62), - [anon_sym_random] = ACTIONS(64), - [anon_sym_random_boolean] = ACTIONS(64), - [anon_sym_random_integer] = ACTIONS(64), - [anon_sym_random_string] = ACTIONS(64), - [anon_sym_random_float] = ACTIONS(64), - [sym_float] = ACTIONS(66), - [sym_integer] = ACTIONS(62), - [sym_string] = ACTIONS(66), - [sym_empty] = ACTIONS(66), - [anon_sym_LPAREN] = ACTIONS(68), - [anon_sym_RPAREN] = ACTIONS(70), + [sym_expression] = STATE(21), + [sym_value] = STATE(24), + [sym_tool] = STATE(9), + [sym_list] = STATE(26), + [aux_sym_list_repeat1] = STATE(12), + [sym_identifier] = ACTIONS(7), + [anon_sym_random] = ACTIONS(9), + [anon_sym_random_boolean] = ACTIONS(9), + [anon_sym_random_integer] = ACTIONS(9), + [anon_sym_random_string] = ACTIONS(9), + [anon_sym_random_float] = ACTIONS(9), + [sym_float] = ACTIONS(61), + [sym_integer] = ACTIONS(63), + [sym_string] = ACTIONS(61), + [sym_empty] = ACTIONS(61), + [anon_sym_LPAREN] = ACTIONS(65), + [anon_sym_RPAREN] = ACTIONS(67), }, [9] = { - [sym_expression] = STATE(13), - [sym_tool] = STATE(14), - [sym_list] = STATE(14), - [aux_sym_list_repeat1] = STATE(9), - [sym_identifier] = ACTIONS(72), + [ts_builtin_sym_end] = ACTIONS(17), + [sym_comment] = ACTIONS(17), + [sym_yield] = ACTIONS(17), + [sym_chain] = ACTIONS(17), + [sym_identifier] = ACTIONS(19), + [anon_sym_random] = ACTIONS(19), + [anon_sym_random_boolean] = ACTIONS(19), + [anon_sym_random_integer] = ACTIONS(19), + [anon_sym_random_string] = ACTIONS(19), + [anon_sym_random_float] = ACTIONS(19), + [sym_float] = ACTIONS(17), + [sym_integer] = ACTIONS(19), + [sym_string] = ACTIONS(17), + [sym_empty] = ACTIONS(17), + [anon_sym_LPAREN] = ACTIONS(19), + [anon_sym_COMMA] = ACTIONS(17), + [anon_sym_RPAREN] = ACTIONS(17), + }, + [10] = { + [ts_builtin_sym_end] = ACTIONS(69), + [sym_comment] = ACTIONS(69), + [sym_yield] = ACTIONS(69), + [sym_chain] = ACTIONS(69), + [sym_identifier] = ACTIONS(71), + [anon_sym_random] = ACTIONS(71), + [anon_sym_random_boolean] = ACTIONS(71), + [anon_sym_random_integer] = ACTIONS(71), + [anon_sym_random_string] = ACTIONS(71), + [anon_sym_random_float] = ACTIONS(71), + [sym_float] = ACTIONS(69), + [sym_integer] = ACTIONS(71), + [sym_string] = ACTIONS(69), + [sym_empty] = ACTIONS(69), + [anon_sym_LPAREN] = ACTIONS(71), + [anon_sym_COMMA] = ACTIONS(69), + [anon_sym_RPAREN] = ACTIONS(69), + }, + [11] = { + [ts_builtin_sym_end] = ACTIONS(73), + [sym_comment] = ACTIONS(73), + [sym_yield] = ACTIONS(73), + [sym_chain] = ACTIONS(73), + [sym_identifier] = ACTIONS(75), [anon_sym_random] = ACTIONS(75), [anon_sym_random_boolean] = ACTIONS(75), [anon_sym_random_integer] = ACTIONS(75), [anon_sym_random_string] = ACTIONS(75), [anon_sym_random_float] = ACTIONS(75), - [sym_float] = ACTIONS(78), - [sym_integer] = ACTIONS(72), - [sym_string] = ACTIONS(78), - [sym_empty] = ACTIONS(78), - [anon_sym_LPAREN] = ACTIONS(81), - [anon_sym_RPAREN] = ACTIONS(84), + [sym_float] = ACTIONS(73), + [sym_integer] = ACTIONS(75), + [sym_string] = ACTIONS(73), + [sym_empty] = ACTIONS(73), + [anon_sym_LPAREN] = ACTIONS(75), + [anon_sym_COMMA] = ACTIONS(73), + [anon_sym_RPAREN] = ACTIONS(73), }, - [10] = { - [sym_expression] = STATE(13), - [sym_tool] = STATE(14), - [sym_list] = STATE(14), - [aux_sym_list_repeat1] = STATE(9), - [sym_identifier] = ACTIONS(62), - [anon_sym_random] = ACTIONS(64), - [anon_sym_random_boolean] = ACTIONS(64), - [anon_sym_random_integer] = ACTIONS(64), - [anon_sym_random_string] = ACTIONS(64), - [anon_sym_random_float] = ACTIONS(64), - [sym_float] = ACTIONS(66), - [sym_integer] = ACTIONS(62), - [sym_string] = ACTIONS(66), - [sym_empty] = ACTIONS(66), - [anon_sym_LPAREN] = ACTIONS(68), - [anon_sym_RPAREN] = ACTIONS(86), + [12] = { + [sym_expression] = STATE(21), + [sym_value] = STATE(24), + [sym_tool] = STATE(9), + [sym_list] = STATE(26), + [aux_sym_list_repeat1] = STATE(12), + [sym_identifier] = ACTIONS(77), + [anon_sym_random] = ACTIONS(80), + [anon_sym_random_boolean] = ACTIONS(80), + [anon_sym_random_integer] = ACTIONS(80), + [anon_sym_random_string] = ACTIONS(80), + [anon_sym_random_float] = ACTIONS(80), + [sym_float] = ACTIONS(83), + [sym_integer] = ACTIONS(86), + [sym_string] = ACTIONS(83), + [sym_empty] = ACTIONS(83), + [anon_sym_LPAREN] = ACTIONS(89), + [anon_sym_RPAREN] = ACTIONS(92), + }, + [13] = { + [ts_builtin_sym_end] = ACTIONS(33), + [sym_comment] = ACTIONS(33), + [sym_yield] = ACTIONS(33), + [sym_chain] = ACTIONS(33), + [sym_identifier] = ACTIONS(35), + [anon_sym_random] = ACTIONS(35), + [anon_sym_random_boolean] = ACTIONS(35), + [anon_sym_random_integer] = ACTIONS(35), + [anon_sym_random_string] = ACTIONS(35), + [anon_sym_random_float] = ACTIONS(35), + [sym_float] = ACTIONS(33), + [sym_integer] = ACTIONS(35), + [sym_string] = ACTIONS(33), + [sym_empty] = ACTIONS(33), + [anon_sym_LPAREN] = ACTIONS(35), + [anon_sym_COMMA] = ACTIONS(33), + [anon_sym_RPAREN] = ACTIONS(33), + }, + [14] = { + [ts_builtin_sym_end] = ACTIONS(29), + [sym_comment] = ACTIONS(29), + [sym_yield] = ACTIONS(29), + [sym_chain] = ACTIONS(29), + [sym_identifier] = ACTIONS(31), + [anon_sym_random] = ACTIONS(31), + [anon_sym_random_boolean] = ACTIONS(31), + [anon_sym_random_integer] = ACTIONS(31), + [anon_sym_random_string] = ACTIONS(31), + [anon_sym_random_float] = ACTIONS(31), + [sym_float] = ACTIONS(29), + [sym_integer] = ACTIONS(31), + [sym_string] = ACTIONS(29), + [sym_empty] = ACTIONS(29), + [anon_sym_LPAREN] = ACTIONS(31), + [anon_sym_COMMA] = ACTIONS(29), + [anon_sym_RPAREN] = ACTIONS(29), + }, + [15] = { + [sym_expression] = STATE(21), + [sym_value] = STATE(24), + [sym_tool] = STATE(9), + [sym_list] = STATE(26), + [aux_sym_list_repeat1] = STATE(12), + [sym_identifier] = ACTIONS(7), + [anon_sym_random] = ACTIONS(9), + [anon_sym_random_boolean] = ACTIONS(9), + [anon_sym_random_integer] = ACTIONS(9), + [anon_sym_random_string] = ACTIONS(9), + [anon_sym_random_float] = ACTIONS(9), + [sym_float] = ACTIONS(61), + [sym_integer] = ACTIONS(63), + [sym_string] = ACTIONS(61), + [sym_empty] = ACTIONS(61), + [anon_sym_LPAREN] = ACTIONS(65), + [anon_sym_RPAREN] = ACTIONS(94), + }, + [16] = { + [sym_expression] = STATE(21), + [sym_value] = STATE(24), + [sym_tool] = STATE(9), + [sym_list] = STATE(26), + [aux_sym_list_repeat1] = STATE(12), + [sym_identifier] = ACTIONS(7), + [anon_sym_random] = ACTIONS(9), + [anon_sym_random_boolean] = ACTIONS(9), + [anon_sym_random_integer] = ACTIONS(9), + [anon_sym_random_string] = ACTIONS(9), + [anon_sym_random_float] = ACTIONS(9), + [sym_float] = ACTIONS(61), + [sym_integer] = ACTIONS(63), + [sym_string] = ACTIONS(61), + [sym_empty] = ACTIONS(61), + [anon_sym_LPAREN] = ACTIONS(65), + [anon_sym_RPAREN] = ACTIONS(96), }, }; static const uint16_t ts_small_parse_table[] = { - [0] = 7, - ACTIONS(68), 1, + [0] = 10, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(63), 1, + sym_integer, + ACTIONS(65), 1, anon_sym_LPAREN, STATE(8), 1, aux_sym_list_repeat1, - STATE(13), 1, - sym_expression, - ACTIONS(62), 2, - sym_identifier, - sym_integer, - STATE(14), 2, + STATE(9), 1, sym_tool, + STATE(21), 1, + sym_expression, + STATE(24), 1, + sym_value, + STATE(26), 1, sym_list, - ACTIONS(66), 3, + ACTIONS(61), 3, sym_float, sym_string, sym_empty, - ACTIONS(64), 5, + ACTIONS(9), 5, anon_sym_random, anon_sym_random_boolean, anon_sym_random_integer, anon_sym_random_string, anon_sym_random_float, - [30] = 7, - ACTIONS(68), 1, + [37] = 10, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(63), 1, + sym_integer, + ACTIONS(65), 1, anon_sym_LPAREN, - STATE(10), 1, + STATE(9), 1, + sym_tool, + STATE(15), 1, aux_sym_list_repeat1, - STATE(13), 1, + STATE(21), 1, sym_expression, - ACTIONS(62), 2, - sym_identifier, - sym_integer, - STATE(14), 2, - sym_tool, + STATE(24), 1, + sym_value, + STATE(26), 1, sym_list, - ACTIONS(66), 3, + ACTIONS(61), 3, sym_float, sym_string, sym_empty, - ACTIONS(64), 5, + ACTIONS(9), 5, anon_sym_random, anon_sym_random_boolean, anon_sym_random_integer, anon_sym_random_string, anon_sym_random_float, - [60] = 3, - ACTIONS(92), 1, + [74] = 10, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(63), 1, + sym_integer, + ACTIONS(65), 1, + anon_sym_LPAREN, + STATE(9), 1, + sym_tool, + STATE(16), 1, + aux_sym_list_repeat1, + STATE(21), 1, + sym_expression, + STATE(24), 1, + sym_value, + STATE(26), 1, + sym_list, + ACTIONS(61), 3, + sym_float, + sym_string, + sym_empty, + ACTIONS(9), 5, + anon_sym_random, + anon_sym_random_boolean, + anon_sym_random_integer, + anon_sym_random_string, + anon_sym_random_float, + [111] = 9, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(63), 1, + sym_integer, + ACTIONS(65), 1, + anon_sym_LPAREN, + STATE(9), 1, + sym_tool, + STATE(11), 1, + sym_expression, + STATE(24), 1, + sym_value, + STATE(26), 1, + sym_list, + ACTIONS(61), 3, + sym_float, + sym_string, + sym_empty, + ACTIONS(9), 5, + anon_sym_random, + anon_sym_random_boolean, + anon_sym_random_integer, + anon_sym_random_string, + anon_sym_random_float, + [145] = 3, + ACTIONS(102), 1, anon_sym_COMMA, - ACTIONS(90), 4, + ACTIONS(100), 4, sym_float, sym_string, sym_empty, anon_sym_RPAREN, - ACTIONS(88), 8, + ACTIONS(98), 8, sym_identifier, anon_sym_random, anon_sym_random_boolean, @@ -1050,14 +1284,13 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_random_float, sym_integer, anon_sym_LPAREN, - [80] = 2, - ACTIONS(46), 5, + [165] = 2, + ACTIONS(92), 4, sym_float, sym_string, sym_empty, - anon_sym_COMMA, anon_sym_RPAREN, - ACTIONS(48), 8, + ACTIONS(104), 8, sym_identifier, anon_sym_random, anon_sym_random_boolean, @@ -1066,14 +1299,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_random_float, sym_integer, anon_sym_LPAREN, - [98] = 2, - ACTIONS(54), 5, + [182] = 2, + ACTIONS(108), 3, sym_float, sym_string, sym_empty, - anon_sym_COMMA, - anon_sym_RPAREN, - ACTIONS(56), 8, + ACTIONS(106), 8, sym_identifier, anon_sym_random, anon_sym_random_boolean, @@ -1082,98 +1313,120 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_random_float, sym_integer, anon_sym_LPAREN, - [116] = 2, - ACTIONS(58), 5, + [198] = 2, + STATE(25), 1, + sym_operator, + ACTIONS(21), 6, + anon_sym_EQ, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_SLASH, + anon_sym_PIPE, + anon_sym_AMP, + [210] = 5, + ACTIONS(112), 1, + sym_integer, + ACTIONS(114), 1, + anon_sym_LPAREN, + STATE(11), 1, + sym_value, + STATE(13), 1, + sym_list, + ACTIONS(110), 3, sym_float, sym_string, sym_empty, - anon_sym_COMMA, - anon_sym_RPAREN, - ACTIONS(60), 8, - sym_identifier, - anon_sym_random, - anon_sym_random_boolean, - anon_sym_random_integer, - anon_sym_random_string, - anon_sym_random_float, - sym_integer, - anon_sym_LPAREN, - [134] = 2, - ACTIONS(84), 4, - sym_float, - sym_string, - sym_empty, - anon_sym_RPAREN, - ACTIONS(94), 8, - sym_identifier, - anon_sym_random, - anon_sym_random_boolean, - anon_sym_random_integer, - anon_sym_random_string, - anon_sym_random_float, - sym_integer, - anon_sym_LPAREN, - [151] = 1, - ACTIONS(96), 1, + [228] = 1, + ACTIONS(33), 6, + anon_sym_EQ, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_SLASH, + anon_sym_PIPE, + anon_sym_AMP, + [237] = 1, + ACTIONS(29), 6, + anon_sym_EQ, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_SLASH, + anon_sym_PIPE, + anon_sym_AMP, + [246] = 1, + ACTIONS(116), 1, ts_builtin_sym_end, }; static const uint32_t ts_small_parse_table_map[] = { - [SMALL_STATE(11)] = 0, - [SMALL_STATE(12)] = 30, - [SMALL_STATE(13)] = 60, - [SMALL_STATE(14)] = 80, - [SMALL_STATE(15)] = 98, - [SMALL_STATE(16)] = 116, - [SMALL_STATE(17)] = 134, - [SMALL_STATE(18)] = 151, + [SMALL_STATE(17)] = 0, + [SMALL_STATE(18)] = 37, + [SMALL_STATE(19)] = 74, + [SMALL_STATE(20)] = 111, + [SMALL_STATE(21)] = 145, + [SMALL_STATE(22)] = 165, + [SMALL_STATE(23)] = 182, + [SMALL_STATE(24)] = 198, + [SMALL_STATE(25)] = 210, + [SMALL_STATE(26)] = 228, + [SMALL_STATE(27)] = 237, + [SMALL_STATE(28)] = 246, }; static const TSParseActionEntry ts_parse_actions[] = { [0] = {.entry = {.count = 0, .reusable = false}}, [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), [3] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 0), - [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), - [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(4), - [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), - [11] = {.entry = {.count = 1, .reusable = false}}, SHIFT(5), - [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(6), - [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), - [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(11), - [19] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), - [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [23] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), - [25] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(3), - [28] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(4), - [31] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(5), - [34] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(5), - [37] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(6), - [40] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(4), - [43] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(11), - [46] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 1), - [48] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 1), - [50] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_operator, 1), - [52] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_operator, 1), - [54] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tool, 1), - [56] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tool, 1), - [58] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 3), - [60] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list, 3), - [62] = {.entry = {.count = 1, .reusable = false}}, SHIFT(14), - [64] = {.entry = {.count = 1, .reusable = false}}, SHIFT(15), - [66] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), - [68] = {.entry = {.count = 1, .reusable = false}}, SHIFT(12), - [70] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), - [72] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2), SHIFT_REPEAT(14), - [75] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2), SHIFT_REPEAT(15), - [78] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2), SHIFT_REPEAT(14), - [81] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2), SHIFT_REPEAT(12), - [84] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2), - [86] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), - [88] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 1), - [90] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 1), - [92] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), - [94] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2), - [96] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), + [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(2), + [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(10), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), + [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(5), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(17), + [17] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 1), + [19] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 1), + [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(23), + [25] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 1), + [27] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 1), + [29] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 3), + [31] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list, 3), + [33] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_value, 1), + [35] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_value, 1), + [37] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), + [39] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), + [41] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), + [43] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(7), + [46] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(2), + [49] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(10), + [52] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(5), + [55] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(5), + [58] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(17), + [61] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), + [63] = {.entry = {.count = 1, .reusable = false}}, SHIFT(26), + [65] = {.entry = {.count = 1, .reusable = false}}, SHIFT(18), + [67] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), + [69] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tool, 1), + [71] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tool, 1), + [73] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 3), + [75] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 3), + [77] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2), SHIFT_REPEAT(2), + [80] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2), SHIFT_REPEAT(10), + [83] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2), SHIFT_REPEAT(26), + [86] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2), SHIFT_REPEAT(26), + [89] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2), SHIFT_REPEAT(18), + [92] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2), + [94] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), + [96] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), + [98] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 1), + [100] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 1), + [102] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [104] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_list_repeat1, 2), + [106] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_operator, 1), + [108] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_operator, 1), + [110] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), + [112] = {.entry = {.count = 1, .reusable = false}}, SHIFT(13), + [114] = {.entry = {.count = 1, .reusable = false}}, SHIFT(19), + [116] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), }; #ifdef __cplusplus @@ -1183,7 +1436,7 @@ extern "C" { #define extern __declspec(dllexport) #endif -extern const TSLanguage *tree_sitter_dust(void) { +extern const TSLanguage *tree_sitter_Dust(void) { static const TSLanguage language = { .version = LANGUAGE_VERSION, .symbol_count = SYMBOL_COUNT,