From d2ac184c816ccdb034e17f1449554ac7dc59872f Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Fri, 14 Jul 2017 13:00:41 -0700 Subject: [PATCH] Add variable expansions --- corpus/commands.txt | 28 + grammar.js | 25 +- src/grammar.json | 105 +- src/parser.c | 2388 +++++++++++++++++++++++++------------------ 4 files changed, 1534 insertions(+), 1012 deletions(-) diff --git a/corpus/commands.txt b/corpus/commands.txt index 066d7a6..b8d0104 100644 --- a/corpus/commands.txt +++ b/corpus/commands.txt @@ -100,3 +100,31 @@ cat a b 2> /dev/null (command (simple_command (file_redirect (file_descriptor) (file_descriptor)) (command_name)))) + +=============================== +Variable expansions +=============================== + +cat $FOO + +--- + +(program + (command (simple_command + (command_name) + (expansion (variable_name))))) + +=============================== +Variable expansion operators +=============================== + +cat ${BAR} ${ABC=def} ${GHI:?jkl} + +--- + +(program + (command (simple_command + (command_name) + (operator_expansion (variable_name)) + (operator_expansion (variable_name) (argument)) + (operator_expansion (variable_name) (argument))))) diff --git a/grammar.js b/grammar.js index 2588e6f..e4c7747 100644 --- a/grammar.js +++ b/grammar.js @@ -23,7 +23,11 @@ module.exports = grammar({ rename($.leading_word, 'command_name'), optional(seq( /\s+/, - repeat(rename($.word, 'argument')) + repeat(choice( + rename($.word, 'argument'), + $.expansion, + $.operator_expansion + )) )), repeat( $.file_redirect @@ -55,6 +59,21 @@ module.exports = grammar({ rename($.word, 'argument') ), + expansion: $ => seq( + '$', + rename($.word, 'variable_name') + ), + + operator_expansion: $ => seq( + '${', + rename($.leading_word, 'variable_name'), + optional(seq( + choice(':', ':?', '='), + rename($.word, 'argument') + )), + '}' + ), + file_redirect: $ => seq( optional($.file_descriptor), choice('<', '>', '<&', '>&'), @@ -66,9 +85,9 @@ module.exports = grammar({ file_descriptor: $ => token(prec(1, /\d+/)), - leading_word: $ => /[^\s=|;]+/, + leading_word: $ => /[^\s=|;:{}]+/, - word: $ => /[^\s<>&]+/, + word: $ => /[^\s$<>{}&]+/, control_operator: $ => choice( '\n', diff --git a/src/grammar.json b/src/grammar.json index ed48741..14db532 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -74,12 +74,25 @@ { "type": "REPEAT", "content": { - "type": "RENAME", - "content": { - "type": "SYMBOL", - "name": "word" - }, - "value": "argument" + "type": "CHOICE", + "members": [ + { + "type": "RENAME", + "content": { + "type": "SYMBOL", + "name": "word" + }, + "value": "argument" + }, + { + "type": "SYMBOL", + "name": "expansion" + }, + { + "type": "SYMBOL", + "name": "operator_expansion" + } + ] } } ] @@ -205,6 +218,82 @@ } ] }, + "expansion": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "$" + }, + { + "type": "RENAME", + "content": { + "type": "SYMBOL", + "name": "word" + }, + "value": "variable_name" + } + ] + }, + "operator_expansion": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "${" + }, + { + "type": "RENAME", + "content": { + "type": "SYMBOL", + "name": "leading_word" + }, + "value": "variable_name" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "STRING", + "value": ":?" + }, + { + "type": "STRING", + "value": "=" + } + ] + }, + { + "type": "RENAME", + "content": { + "type": "SYMBOL", + "name": "word" + }, + "value": "argument" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, "file_redirect": { "type": "SEQ", "members": [ @@ -273,11 +362,11 @@ }, "leading_word": { "type": "PATTERN", - "value": "[^\\s=|;]+" + "value": "[^\\s=|;:{}]+" }, "word": { "type": "PATTERN", - "value": "[^\\s<>&]+" + "value": "[^\\s$<>{}&]+" }, "control_operator": { "type": "CHOICE", diff --git a/src/parser.c b/src/parser.c index 1a79ca8..12cd88e 100644 --- a/src/parser.c +++ b/src/parser.c @@ -4,9 +4,9 @@ #pragma GCC diagnostic ignored "-Wmissing-field-initializers" #define LANGUAGE_VERSION 3 -#define STATE_COUNT 66 -#define SYMBOL_COUNT 27 -#define TOKEN_COUNT 16 +#define STATE_COUNT 80 +#define SYMBOL_COUNT 34 +#define TOKEN_COUNT 21 #define EXTERNAL_TOKEN_COUNT 0 #define MAX_RENAME_SEQUENCE_LENGTH 5 @@ -17,31 +17,38 @@ enum { anon_sym_AMP_AMP = 4, anon_sym_SEMI = 5, anon_sym_EQ = 6, - anon_sym_LT = 7, - anon_sym_GT = 8, - anon_sym_LT_AMP = 9, - anon_sym_GT_AMP = 10, - sym_file_descriptor = 11, - sym_leading_word = 12, - sym_word = 13, - anon_sym_LF = 14, - anon_sym_SEMI_SEMI = 15, - sym_program = 16, - sym_command = 17, - sym_simple_command = 18, - sym_pipeline = 19, - sym_list = 20, - sym_environment_variable_assignment = 21, - sym_file_redirect = 22, - aux_sym_program_repeat1 = 23, - aux_sym_simple_command_repeat1 = 24, - aux_sym_simple_command_repeat2 = 25, - aux_sym_simple_command_repeat3 = 26, - rename_sym_1 = 27, - rename_sym_argument = 28, - rename_sym_command_name = 29, - rename_sym_file_name = 30, - rename_sym_variable_name = 31, + anon_sym_DOLLAR = 7, + anon_sym_DOLLAR_LBRACE = 8, + anon_sym_COLON = 9, + anon_sym_COLON_QMARK = 10, + anon_sym_RBRACE = 11, + anon_sym_LT = 12, + anon_sym_GT = 13, + anon_sym_LT_AMP = 14, + anon_sym_GT_AMP = 15, + sym_file_descriptor = 16, + sym_leading_word = 17, + sym_word = 18, + anon_sym_LF = 19, + anon_sym_SEMI_SEMI = 20, + sym_program = 21, + sym_command = 22, + sym_simple_command = 23, + sym_pipeline = 24, + sym_list = 25, + sym_environment_variable_assignment = 26, + sym_expansion = 27, + sym_operator_expansion = 28, + sym_file_redirect = 29, + aux_sym_program_repeat1 = 30, + aux_sym_simple_command_repeat1 = 31, + aux_sym_simple_command_repeat2 = 32, + aux_sym_simple_command_repeat3 = 33, + rename_sym_1 = 34, + rename_sym_argument = 35, + rename_sym_command_name = 36, + rename_sym_file_name = 37, + rename_sym_variable_name = 38, }; static const char *ts_symbol_names[] = { @@ -52,6 +59,11 @@ static const char *ts_symbol_names[] = { [anon_sym_AMP_AMP] = "&&", [anon_sym_SEMI] = ";", [anon_sym_EQ] = "=", + [anon_sym_DOLLAR] = "$", + [anon_sym_DOLLAR_LBRACE] = "${", + [anon_sym_COLON] = ":", + [anon_sym_COLON_QMARK] = ":?", + [anon_sym_RBRACE] = "}", [anon_sym_LT] = "<", [anon_sym_GT] = ">", [anon_sym_LT_AMP] = "<&", @@ -67,6 +79,8 @@ static const char *ts_symbol_names[] = { [sym_pipeline] = "pipeline", [sym_list] = "list", [sym_environment_variable_assignment] = "environment_variable_assignment", + [sym_expansion] = "expansion", + [sym_operator_expansion] = "operator_expansion", [sym_file_redirect] = "file_redirect", [aux_sym_program_repeat1] = "program_repeat1", [aux_sym_simple_command_repeat1] = "simple_command_repeat1", @@ -122,6 +136,36 @@ static const TSSymbolMetadata ts_symbol_metadata[SYMBOL_COUNT] = { .structural = true, .extra = false, }, + [anon_sym_DOLLAR] = { + .visible = true, + .named = false, + .structural = true, + .extra = false, + }, + [anon_sym_DOLLAR_LBRACE] = { + .visible = true, + .named = false, + .structural = true, + .extra = false, + }, + [anon_sym_COLON] = { + .visible = true, + .named = false, + .structural = true, + .extra = false, + }, + [anon_sym_COLON_QMARK] = { + .visible = true, + .named = false, + .structural = true, + .extra = false, + }, + [anon_sym_RBRACE] = { + .visible = true, + .named = false, + .structural = true, + .extra = false, + }, [anon_sym_LT] = { .visible = true, .named = false, @@ -212,6 +256,18 @@ static const TSSymbolMetadata ts_symbol_metadata[SYMBOL_COUNT] = { .structural = true, .extra = false, }, + [sym_expansion] = { + .visible = true, + .named = true, + .structural = true, + .extra = false, + }, + [sym_operator_expansion] = { + .visible = true, + .named = true, + .structural = true, + .extra = false, + }, [sym_file_redirect] = { .visible = true, .named = true, @@ -244,7 +300,7 @@ static const TSSymbolMetadata ts_symbol_metadata[SYMBOL_COUNT] = { }, }; -static TSSymbol ts_rename_sequences[14][MAX_RENAME_SEQUENCE_LENGTH] = { +static TSSymbol ts_rename_sequences[17][MAX_RENAME_SEQUENCE_LENGTH] = { [1] = { [0] = rename_sym_command_name, }, @@ -274,17 +330,27 @@ static TSSymbol ts_rename_sequences[14][MAX_RENAME_SEQUENCE_LENGTH] = { [1] = rename_sym_command_name, }, [10] = { - [1] = rename_sym_argument, + [1] = rename_sym_variable_name, }, [11] = { - [0] = rename_sym_command_name, + [1] = rename_sym_argument, }, [12] = { - [1] = rename_sym_command_name, + [0] = rename_sym_command_name, }, [13] = { [1] = rename_sym_command_name, }, + [14] = { + [1] = rename_sym_variable_name, + }, + [15] = { + [1] = rename_sym_command_name, + }, + [16] = { + [1] = rename_sym_variable_name, + [3] = rename_sym_argument, + }, }; static bool ts_lex(TSLexer *lexer, TSStateId state) { @@ -293,453 +359,561 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { case 0: if (lookahead == 0) ADVANCE(1); - if (lookahead == '&') + if (lookahead == '$') ADVANCE(2); - if (lookahead == ';') + if (lookahead == '&') ADVANCE(4); - if (lookahead == '<') + if (lookahead == ':') ADVANCE(6); - if (lookahead == '=') + if (lookahead == ';') ADVANCE(8); + if (lookahead == '<') + ADVANCE(10); + if (lookahead == '=') + ADVANCE(12); if (lookahead == '>') - ADVANCE(9); + ADVANCE(13); if (lookahead == '|') - ADVANCE(11); + ADVANCE(15); + if (lookahead == '}') + ADVANCE(16); if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || lookahead == ' ') - ADVANCE(12); + ADVANCE(17); if (('0' <= lookahead && lookahead <= '9')) - ADVANCE(13); + ADVANCE(18); END_STATE(); case 1: ACCEPT_TOKEN(ts_builtin_sym_end); END_STATE(); case 2: - if (lookahead == '&') + ACCEPT_TOKEN(anon_sym_DOLLAR); + if (lookahead == '{') ADVANCE(3); END_STATE(); case 3: - ACCEPT_TOKEN(anon_sym_AMP_AMP); + ACCEPT_TOKEN(anon_sym_DOLLAR_LBRACE); END_STATE(); case 4: - ACCEPT_TOKEN(anon_sym_SEMI); - if (lookahead == ';') + if (lookahead == '&') ADVANCE(5); END_STATE(); case 5: - ACCEPT_TOKEN(anon_sym_SEMI_SEMI); + ACCEPT_TOKEN(anon_sym_AMP_AMP); END_STATE(); case 6: - ACCEPT_TOKEN(anon_sym_LT); - if (lookahead == '&') + ACCEPT_TOKEN(anon_sym_COLON); + if (lookahead == '?') ADVANCE(7); END_STATE(); case 7: - ACCEPT_TOKEN(anon_sym_LT_AMP); + ACCEPT_TOKEN(anon_sym_COLON_QMARK); END_STATE(); case 8: - ACCEPT_TOKEN(anon_sym_EQ); + ACCEPT_TOKEN(anon_sym_SEMI); + if (lookahead == ';') + ADVANCE(9); END_STATE(); case 9: - ACCEPT_TOKEN(anon_sym_GT); - if (lookahead == '&') - ADVANCE(10); + ACCEPT_TOKEN(anon_sym_SEMI_SEMI); END_STATE(); case 10: - ACCEPT_TOKEN(anon_sym_GT_AMP); + ACCEPT_TOKEN(anon_sym_LT); + if (lookahead == '&') + ADVANCE(11); END_STATE(); case 11: - ACCEPT_TOKEN(anon_sym_PIPE); + ACCEPT_TOKEN(anon_sym_LT_AMP); END_STATE(); case 12: + ACCEPT_TOKEN(anon_sym_EQ); + END_STATE(); + case 13: + ACCEPT_TOKEN(anon_sym_GT); + if (lookahead == '&') + ADVANCE(14); + END_STATE(); + case 14: + ACCEPT_TOKEN(anon_sym_GT_AMP); + END_STATE(); + case 15: + ACCEPT_TOKEN(anon_sym_PIPE); + END_STATE(); + case 16: + ACCEPT_TOKEN(anon_sym_RBRACE); + END_STATE(); + case 17: ACCEPT_TOKEN(aux_sym_SLASH_BSLASHs_PLUS_SLASH); if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || lookahead == ' ') - ADVANCE(12); + ADVANCE(17); END_STATE(); - case 13: + case 18: ACCEPT_TOKEN(sym_file_descriptor); if (('0' <= lookahead && lookahead <= '9')) - ADVANCE(13); + ADVANCE(18); END_STATE(); - case 14: + case 19: if (lookahead == 0) ADVANCE(1); if (lookahead == '<') - ADVANCE(15); + ADVANCE(20); if (lookahead == '>') - ADVANCE(18); + ADVANCE(23); if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || lookahead == ' ') - SKIP(14); + SKIP(19); if (('0' <= lookahead && lookahead <= '9')) - ADVANCE(20); - if ((lookahead < ';' || lookahead > '>') && - lookahead != '|') - ADVANCE(17); + ADVANCE(25); + if ((lookahead < '0' || lookahead > '>') && + (lookahead < '{' || lookahead > '}')) + ADVANCE(22); END_STATE(); - case 15: + case 20: ACCEPT_TOKEN(anon_sym_LT); if (lookahead == '&') - ADVANCE(16); + ADVANCE(21); if (lookahead != 0 && lookahead != '\t' && lookahead != '\n' && lookahead != '\r' && lookahead != ' ' && + lookahead != ':' && lookahead != ';' && lookahead != '=' && - lookahead != '|') - ADVANCE(17); + (lookahead < '{' || lookahead > '}')) + ADVANCE(22); END_STATE(); - case 16: + case 21: ACCEPT_TOKEN(anon_sym_LT_AMP); if (lookahead != 0 && lookahead != '\t' && lookahead != '\n' && lookahead != '\r' && lookahead != ' ' && + lookahead != ':' && lookahead != ';' && lookahead != '=' && - lookahead != '|') - ADVANCE(17); + (lookahead < '{' || lookahead > '}')) + ADVANCE(22); END_STATE(); - case 17: + case 22: ACCEPT_TOKEN(sym_leading_word); if (lookahead != 0 && lookahead != '\t' && lookahead != '\n' && lookahead != '\r' && lookahead != ' ' && + lookahead != ':' && lookahead != ';' && lookahead != '=' && - lookahead != '|') - ADVANCE(17); + (lookahead < '{' || lookahead > '}')) + ADVANCE(22); END_STATE(); - case 18: + case 23: ACCEPT_TOKEN(anon_sym_GT); if (lookahead == '&') - ADVANCE(19); + ADVANCE(24); if (lookahead != 0 && lookahead != '\t' && lookahead != '\n' && lookahead != '\r' && lookahead != ' ' && + lookahead != ':' && lookahead != ';' && lookahead != '=' && - lookahead != '|') - ADVANCE(17); + (lookahead < '{' || lookahead > '}')) + ADVANCE(22); END_STATE(); - case 19: + case 24: ACCEPT_TOKEN(anon_sym_GT_AMP); if (lookahead != 0 && lookahead != '\t' && lookahead != '\n' && lookahead != '\r' && lookahead != ' ' && + lookahead != ':' && lookahead != ';' && lookahead != '=' && - lookahead != '|') - ADVANCE(17); + (lookahead < '{' || lookahead > '}')) + ADVANCE(22); END_STATE(); - case 20: + case 25: ACCEPT_TOKEN(sym_file_descriptor); if (('0' <= lookahead && lookahead <= '9')) - ADVANCE(20); + ADVANCE(25); END_STATE(); - case 21: + case 26: if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || lookahead == ' ') - SKIP(21); + SKIP(26); if (('0' <= lookahead && lookahead <= '9')) - ADVANCE(22); + ADVANCE(27); if (lookahead != 0 && + lookahead != '$' && lookahead != '&' && lookahead != '<' && - lookahead != '>') - ADVANCE(23); + lookahead != '>' && + lookahead != '{' && + lookahead != '}') + ADVANCE(28); END_STATE(); - case 22: + case 27: ACCEPT_TOKEN(sym_file_descriptor); if (('0' <= lookahead && lookahead <= '9')) - ADVANCE(22); + ADVANCE(27); END_STATE(); - case 23: + case 28: ACCEPT_TOKEN(sym_word); if (lookahead != 0 && lookahead != '\t' && lookahead != '\n' && lookahead != '\r' && lookahead != ' ' && + lookahead != '$' && lookahead != '&' && lookahead != '<' && - lookahead != '>') - ADVANCE(23); + lookahead != '>' && + lookahead != '{' && + lookahead != '}') + ADVANCE(28); END_STATE(); - case 24: + case 29: if (lookahead == '<') - ADVANCE(6); + ADVANCE(10); if (lookahead == '>') - ADVANCE(9); + ADVANCE(13); if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || lookahead == ' ') - SKIP(24); - END_STATE(); - case 25: - if (lookahead == '\n') - ADVANCE(26); - if (lookahead == '&') - ADVANCE(2); - if (lookahead == ';') - ADVANCE(4); - if (lookahead == '<') - ADVANCE(6); - if (lookahead == '=') - ADVANCE(8); - if (lookahead == '>') - ADVANCE(9); - if (lookahead == '|') - ADVANCE(28); - if (lookahead == '\t' || - lookahead == '\r' || - lookahead == ' ') - ADVANCE(27); - if (('0' <= lookahead && lookahead <= '9')) - ADVANCE(13); - END_STATE(); - case 26: - ACCEPT_TOKEN(anon_sym_LF); - if (lookahead == '\n') - ADVANCE(26); - if (lookahead == '\t' || - lookahead == '\r' || - lookahead == ' ') - ADVANCE(27); - END_STATE(); - case 27: - ACCEPT_TOKEN(aux_sym_SLASH_BSLASHs_PLUS_SLASH); - if (lookahead == '\n') - ADVANCE(26); - if (lookahead == '\t' || - lookahead == '\r' || - lookahead == ' ') - ADVANCE(27); - END_STATE(); - case 28: - ACCEPT_TOKEN(anon_sym_PIPE); - if (lookahead == '&') - ADVANCE(29); - END_STATE(); - case 29: - ACCEPT_TOKEN(anon_sym_PIPE_AMP); + SKIP(29); END_STATE(); case 30: + if (lookahead == '\n') + ADVANCE(31); + if (lookahead == '&') + ADVANCE(4); + if (lookahead == ';') + ADVANCE(8); + if (lookahead == '<') + ADVANCE(10); + if (lookahead == '=') + ADVANCE(12); + if (lookahead == '>') + ADVANCE(13); + if (lookahead == '|') + ADVANCE(33); + if (lookahead == '\t' || + lookahead == '\r' || + lookahead == ' ') + ADVANCE(32); + if (('0' <= lookahead && lookahead <= '9')) + ADVANCE(18); + END_STATE(); + case 31: + ACCEPT_TOKEN(anon_sym_LF); + if (lookahead == '\n') + ADVANCE(31); + if (lookahead == '\t' || + lookahead == '\r' || + lookahead == ' ') + ADVANCE(32); + END_STATE(); + case 32: + ACCEPT_TOKEN(aux_sym_SLASH_BSLASHs_PLUS_SLASH); + if (lookahead == '\n') + ADVANCE(31); + if (lookahead == '\t' || + lookahead == '\r' || + lookahead == ' ') + ADVANCE(32); + END_STATE(); + case 33: + ACCEPT_TOKEN(anon_sym_PIPE); + if (lookahead == '&') + ADVANCE(34); + END_STATE(); + case 34: + ACCEPT_TOKEN(anon_sym_PIPE_AMP); + END_STATE(); + case 35: if (lookahead == 0) ADVANCE(1); if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || lookahead == ' ') - SKIP(30); + SKIP(35); END_STATE(); - case 31: + case 36: if (lookahead == '\n') - ADVANCE(32); + ADVANCE(37); if (lookahead == '&') - ADVANCE(2); - if (lookahead == ';') ADVANCE(4); + if (lookahead == ';') + ADVANCE(8); if (lookahead == '|') - ADVANCE(28); + ADVANCE(33); if (lookahead == '\t' || lookahead == '\r' || lookahead == ' ') - SKIP(31); + SKIP(36); END_STATE(); - case 32: + case 37: ACCEPT_TOKEN(anon_sym_LF); END_STATE(); - case 33: + case 38: if (lookahead == '\n') - ADVANCE(32); + ADVANCE(37); if (lookahead == '&') - ADVANCE(2); - if (lookahead == ';') ADVANCE(4); + if (lookahead == ';') + ADVANCE(8); if (lookahead == '\t' || lookahead == '\r' || lookahead == ' ') - SKIP(33); + SKIP(38); END_STATE(); - case 34: + case 39: if (lookahead == '<') - ADVANCE(15); + ADVANCE(20); if (lookahead == '>') - ADVANCE(18); + ADVANCE(23); if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || lookahead == ' ') - SKIP(34); + SKIP(39); if (('0' <= lookahead && lookahead <= '9')) - ADVANCE(20); + ADVANCE(25); if (lookahead != 0 && - (lookahead < ';' || lookahead > '>') && - lookahead != '|') - ADVANCE(17); + (lookahead < '0' || lookahead > '>') && + (lookahead < '{' || lookahead > '}')) + ADVANCE(22); END_STATE(); - case 35: + case 40: if (lookahead == '\n') - ADVANCE(32); - if (lookahead == '&') + ADVANCE(37); + if (lookahead == '$') ADVANCE(2); + if (lookahead == '&') + ADVANCE(4); if (lookahead == ';') - ADVANCE(36); + ADVANCE(41); if (lookahead == '<') - ADVANCE(6); + ADVANCE(10); if (lookahead == '>') - ADVANCE(9); + ADVANCE(13); if (lookahead == '|') - ADVANCE(38); + ADVANCE(43); if (lookahead == '\t' || lookahead == '\r' || lookahead == ' ') - SKIP(35); + SKIP(40); if (('0' <= lookahead && lookahead <= '9')) - ADVANCE(22); - if (lookahead != 0) - ADVANCE(23); + ADVANCE(27); + if (lookahead != 0 && + (lookahead < '{' || lookahead > '}')) + ADVANCE(28); END_STATE(); - case 36: + case 41: ACCEPT_TOKEN(anon_sym_SEMI); if (lookahead == ';') - ADVANCE(37); + ADVANCE(42); if (lookahead != 0 && lookahead != '\t' && lookahead != '\n' && lookahead != '\r' && lookahead != ' ' && + lookahead != '$' && lookahead != '&' && lookahead != ';' && lookahead != '<' && - lookahead != '>') - ADVANCE(23); + lookahead != '>' && + lookahead != '{' && + lookahead != '}') + ADVANCE(28); END_STATE(); - case 37: + case 42: ACCEPT_TOKEN(anon_sym_SEMI_SEMI); if (lookahead != 0 && lookahead != '\t' && lookahead != '\n' && lookahead != '\r' && lookahead != ' ' && + lookahead != '$' && lookahead != '&' && lookahead != '<' && - lookahead != '>') - ADVANCE(23); + lookahead != '>' && + lookahead != '{' && + lookahead != '}') + ADVANCE(28); END_STATE(); - case 38: + case 43: ACCEPT_TOKEN(anon_sym_PIPE); if (lookahead == '&') - ADVANCE(29); + ADVANCE(34); if (lookahead != 0 && lookahead != '\t' && lookahead != '\n' && lookahead != '\r' && lookahead != ' ' && + lookahead != '$' && lookahead != '<' && - lookahead != '>') - ADVANCE(23); + lookahead != '>' && + lookahead != '{' && + lookahead != '}') + ADVANCE(28); END_STATE(); - case 39: + case 44: if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || lookahead == ' ') - SKIP(39); + SKIP(44); if (lookahead != 0 && + lookahead != '$' && lookahead != '&' && lookahead != '<' && - lookahead != '>') - ADVANCE(23); - END_STATE(); - case 40: - if (lookahead == '\n') - ADVANCE(32); - if (lookahead == '&') - ADVANCE(2); - if (lookahead == ';') - ADVANCE(4); - if (lookahead == '<') - ADVANCE(6); - if (lookahead == '>') - ADVANCE(9); - if (lookahead == '|') + lookahead != '>' && + lookahead != '{' && + lookahead != '}') ADVANCE(28); - if (lookahead == '\t' || - lookahead == '\r' || - lookahead == ' ') - SKIP(40); - if (('0' <= lookahead && lookahead <= '9')) + END_STATE(); + case 45: + if (lookahead == '\n') + ADVANCE(37); + if (lookahead == '&') + ADVANCE(4); + if (lookahead == ';') + ADVANCE(8); + if (lookahead == '<') + ADVANCE(10); + if (lookahead == '>') ADVANCE(13); - END_STATE(); - case 41: - if (lookahead == '\n') - ADVANCE(32); - if (lookahead == '&') - ADVANCE(42); - if (lookahead == ';') - ADVANCE(4); - if (lookahead == '<') - ADVANCE(15); - if (lookahead == '>') - ADVANCE(18); if (lookahead == '|') - ADVANCE(28); + ADVANCE(33); if (lookahead == '\t' || lookahead == '\r' || lookahead == ' ') - SKIP(41); + SKIP(45); if (('0' <= lookahead && lookahead <= '9')) - ADVANCE(20); - if (lookahead != 0 && - (lookahead < ';' || lookahead > '>')) - ADVANCE(17); + ADVANCE(18); END_STATE(); - case 42: + case 46: + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') + SKIP(46); + if (lookahead != 0 && + lookahead != ':' && + lookahead != ';' && + lookahead != '=' && + (lookahead < '{' || lookahead > '}')) + ADVANCE(22); + END_STATE(); + case 47: + if (lookahead == ':') + ADVANCE(6); + if (lookahead == '=') + ADVANCE(12); + if (lookahead == '}') + ADVANCE(16); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') + SKIP(47); + END_STATE(); + case 48: + if (lookahead == '}') + ADVANCE(16); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') + SKIP(48); + END_STATE(); + case 49: + if (lookahead == '\n') + ADVANCE(37); + if (lookahead == '&') + ADVANCE(50); + if (lookahead == ';') + ADVANCE(8); + if (lookahead == '<') + ADVANCE(20); + if (lookahead == '>') + ADVANCE(23); + if (lookahead == '|') + ADVANCE(33); + if (lookahead == '\t' || + lookahead == '\r' || + lookahead == ' ') + SKIP(49); + if (('0' <= lookahead && lookahead <= '9')) + ADVANCE(25); + if (lookahead != 0 && + (lookahead < '0' || lookahead > '>') && + (lookahead < '{' || lookahead > '}')) + ADVANCE(22); + END_STATE(); + case 50: ACCEPT_TOKEN(sym_leading_word); if (lookahead == '&') - ADVANCE(43); + ADVANCE(51); if (lookahead != 0 && lookahead != '\t' && lookahead != '\n' && lookahead != '\r' && lookahead != ' ' && + lookahead != ':' && lookahead != ';' && lookahead != '=' && - lookahead != '|') - ADVANCE(17); + (lookahead < '{' || lookahead > '}')) + ADVANCE(22); END_STATE(); - case 43: + case 51: ACCEPT_TOKEN(anon_sym_AMP_AMP); if (lookahead != 0 && lookahead != '\t' && lookahead != '\n' && lookahead != '\r' && lookahead != ' ' && + lookahead != ':' && lookahead != ';' && lookahead != '=' && - lookahead != '|') - ADVANCE(17); + (lookahead < '{' || lookahead > '}')) + ADVANCE(22); + END_STATE(); + case 52: + if (lookahead == '<') + ADVANCE(20); + if (lookahead == '>') + ADVANCE(23); + if (lookahead == '}') + ADVANCE(16); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') + SKIP(52); + if (('0' <= lookahead && lookahead <= '9')) + ADVANCE(25); + if (lookahead != 0 && + (lookahead < '0' || lookahead > '>') && + (lookahead < '{' || lookahead > '}')) + ADVANCE(22); END_STATE(); default: return false; @@ -748,98 +922,119 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { static TSLexMode ts_lex_modes[STATE_COUNT] = { [0] = {.lex_state = 0}, - [1] = {.lex_state = 14}, - [2] = {.lex_state = 21}, - [3] = {.lex_state = 24}, - [4] = {.lex_state = 25}, - [5] = {.lex_state = 30}, - [6] = {.lex_state = 14}, - [7] = {.lex_state = 31}, - [8] = {.lex_state = 33}, - [9] = {.lex_state = 34}, - [10] = {.lex_state = 14}, - [11] = {.lex_state = 34}, - [12] = {.lex_state = 34}, - [13] = {.lex_state = 34}, - [14] = {.lex_state = 21}, - [15] = {.lex_state = 35}, - [16] = {.lex_state = 39}, - [17] = {.lex_state = 21}, - [18] = {.lex_state = 24}, - [19] = {.lex_state = 40}, - [20] = {.lex_state = 40}, - [21] = {.lex_state = 34}, - [22] = {.lex_state = 34}, - [23] = {.lex_state = 14}, - [24] = {.lex_state = 14}, - [25] = {.lex_state = 25}, - [26] = {.lex_state = 34}, - [27] = {.lex_state = 34}, - [28] = {.lex_state = 34}, - [29] = {.lex_state = 35}, - [30] = {.lex_state = 35}, + [1] = {.lex_state = 19}, + [2] = {.lex_state = 26}, + [3] = {.lex_state = 29}, + [4] = {.lex_state = 30}, + [5] = {.lex_state = 35}, + [6] = {.lex_state = 19}, + [7] = {.lex_state = 36}, + [8] = {.lex_state = 38}, + [9] = {.lex_state = 39}, + [10] = {.lex_state = 19}, + [11] = {.lex_state = 39}, + [12] = {.lex_state = 39}, + [13] = {.lex_state = 39}, + [14] = {.lex_state = 26}, + [15] = {.lex_state = 40}, + [16] = {.lex_state = 44}, + [17] = {.lex_state = 26}, + [18] = {.lex_state = 29}, + [19] = {.lex_state = 45}, + [20] = {.lex_state = 45}, + [21] = {.lex_state = 39}, + [22] = {.lex_state = 39}, + [23] = {.lex_state = 19}, + [24] = {.lex_state = 19}, + [25] = {.lex_state = 30}, + [26] = {.lex_state = 39}, + [27] = {.lex_state = 39}, + [28] = {.lex_state = 39}, + [29] = {.lex_state = 44}, + [30] = {.lex_state = 46}, [31] = {.lex_state = 40}, - [32] = {.lex_state = 34}, + [32] = {.lex_state = 40}, [33] = {.lex_state = 40}, - [34] = {.lex_state = 40}, - [35] = {.lex_state = 21}, - [36] = {.lex_state = 40}, - [37] = {.lex_state = 33}, - [38] = {.lex_state = 31}, - [39] = {.lex_state = 33}, - [40] = {.lex_state = 35}, - [41] = {.lex_state = 40}, - [42] = {.lex_state = 35}, + [34] = {.lex_state = 45}, + [35] = {.lex_state = 39}, + [36] = {.lex_state = 45}, + [37] = {.lex_state = 45}, + [38] = {.lex_state = 26}, + [39] = {.lex_state = 45}, + [40] = {.lex_state = 38}, + [41] = {.lex_state = 36}, + [42] = {.lex_state = 38}, [43] = {.lex_state = 40}, - [44] = {.lex_state = 40}, + [44] = {.lex_state = 45}, [45] = {.lex_state = 40}, - [46] = {.lex_state = 35}, + [46] = {.lex_state = 47}, [47] = {.lex_state = 40}, [48] = {.lex_state = 40}, - [49] = {.lex_state = 35}, - [50] = {.lex_state = 21}, - [51] = {.lex_state = 41}, - [52] = {.lex_state = 14}, - [53] = {.lex_state = 31}, - [54] = {.lex_state = 33}, - [55] = {.lex_state = 34}, - [56] = {.lex_state = 41}, - [57] = {.lex_state = 35}, + [49] = {.lex_state = 45}, + [50] = {.lex_state = 45}, + [51] = {.lex_state = 45}, + [52] = {.lex_state = 40}, + [53] = {.lex_state = 45}, + [54] = {.lex_state = 44}, + [55] = {.lex_state = 40}, + [56] = {.lex_state = 45}, + [57] = {.lex_state = 48}, [58] = {.lex_state = 40}, [59] = {.lex_state = 40}, - [60] = {.lex_state = 41}, - [61] = {.lex_state = 41}, - [62] = {.lex_state = 21}, - [63] = {.lex_state = 40}, - [64] = {.lex_state = 41}, - [65] = {.lex_state = 41}, + [60] = {.lex_state = 44}, + [61] = {.lex_state = 40}, + [62] = {.lex_state = 26}, + [63] = {.lex_state = 49}, + [64] = {.lex_state = 19}, + [65] = {.lex_state = 36}, + [66] = {.lex_state = 38}, + [67] = {.lex_state = 39}, + [68] = {.lex_state = 40}, + [69] = {.lex_state = 49}, + [70] = {.lex_state = 40}, + [71] = {.lex_state = 45}, + [72] = {.lex_state = 45}, + [73] = {.lex_state = 52}, + [74] = {.lex_state = 49}, + [75] = {.lex_state = 49}, + [76] = {.lex_state = 26}, + [77] = {.lex_state = 45}, + [78] = {.lex_state = 49}, + [79] = {.lex_state = 49}, }; static uint16_t ts_parse_table[STATE_COUNT][SYMBOL_COUNT] = { [0] = { [sym_program] = STATE(5), - [sym_command] = STATE(52), - [sym_simple_command] = STATE(53), - [sym_pipeline] = STATE(54), + [sym_command] = STATE(64), + [sym_simple_command] = STATE(65), + [sym_pipeline] = STATE(66), [sym_list] = STATE(8), - [sym_environment_variable_assignment] = STATE(55), - [sym_file_redirect] = STATE(56), + [sym_environment_variable_assignment] = STATE(67), + [sym_expansion] = STATE(68), + [sym_operator_expansion] = STATE(68), + [sym_file_redirect] = STATE(69), [aux_sym_program_repeat1] = STATE(10), [aux_sym_simple_command_repeat1] = STATE(11), - [aux_sym_simple_command_repeat2] = STATE(57), - [aux_sym_simple_command_repeat3] = STATE(58), + [aux_sym_simple_command_repeat2] = STATE(70), + [aux_sym_simple_command_repeat3] = STATE(71), [ts_builtin_sym_end] = ACTIONS(1), [aux_sym_SLASH_BSLASHs_PLUS_SLASH] = ACTIONS(3), [anon_sym_PIPE] = ACTIONS(5), [anon_sym_AMP_AMP] = ACTIONS(7), [anon_sym_SEMI] = ACTIONS(7), [anon_sym_EQ] = ACTIONS(9), - [anon_sym_LT] = ACTIONS(11), - [anon_sym_GT] = ACTIONS(11), - [anon_sym_LT_AMP] = ACTIONS(11), - [anon_sym_GT_AMP] = ACTIONS(11), - [sym_file_descriptor] = ACTIONS(13), - [anon_sym_SEMI_SEMI] = ACTIONS(15), + [anon_sym_DOLLAR] = ACTIONS(11), + [anon_sym_DOLLAR_LBRACE] = ACTIONS(13), + [anon_sym_COLON] = ACTIONS(15), + [anon_sym_COLON_QMARK] = ACTIONS(15), + [anon_sym_RBRACE] = ACTIONS(17), + [anon_sym_LT] = ACTIONS(19), + [anon_sym_GT] = ACTIONS(19), + [anon_sym_LT_AMP] = ACTIONS(19), + [anon_sym_GT_AMP] = ACTIONS(19), + [sym_file_descriptor] = ACTIONS(21), + [anon_sym_SEMI_SEMI] = ACTIONS(23), }, [1] = { [sym_program] = STATE(5), @@ -851,74 +1046,74 @@ static uint16_t ts_parse_table[STATE_COUNT][SYMBOL_COUNT] = { [sym_file_redirect] = STATE(9), [aux_sym_program_repeat1] = STATE(10), [aux_sym_simple_command_repeat1] = STATE(11), - [ts_builtin_sym_end] = ACTIONS(17), - [anon_sym_LT] = ACTIONS(19), - [anon_sym_GT] = ACTIONS(19), - [anon_sym_LT_AMP] = ACTIONS(19), - [anon_sym_GT_AMP] = ACTIONS(19), - [sym_file_descriptor] = ACTIONS(21), - [sym_leading_word] = ACTIONS(23), + [ts_builtin_sym_end] = ACTIONS(25), + [anon_sym_LT] = ACTIONS(27), + [anon_sym_GT] = ACTIONS(27), + [anon_sym_LT_AMP] = ACTIONS(27), + [anon_sym_GT_AMP] = ACTIONS(27), + [sym_file_descriptor] = ACTIONS(29), + [sym_leading_word] = ACTIONS(31), }, [2] = { - [sym_file_descriptor] = ACTIONS(25), - [sym_word] = ACTIONS(27), + [sym_file_descriptor] = ACTIONS(33), + [sym_word] = ACTIONS(35), }, [3] = { - [anon_sym_LT] = ACTIONS(29), - [anon_sym_GT] = ACTIONS(29), - [anon_sym_LT_AMP] = ACTIONS(31), - [anon_sym_GT_AMP] = ACTIONS(31), + [anon_sym_LT] = ACTIONS(37), + [anon_sym_GT] = ACTIONS(37), + [anon_sym_LT_AMP] = ACTIONS(39), + [anon_sym_GT_AMP] = ACTIONS(39), }, [4] = { [sym_file_redirect] = STATE(19), [aux_sym_simple_command_repeat3] = STATE(20), - [aux_sym_SLASH_BSLASHs_PLUS_SLASH] = ACTIONS(33), - [anon_sym_PIPE] = ACTIONS(35), - [anon_sym_PIPE_AMP] = ACTIONS(35), - [anon_sym_AMP_AMP] = ACTIONS(35), - [anon_sym_SEMI] = ACTIONS(35), - [anon_sym_EQ] = ACTIONS(37), - [anon_sym_LT] = ACTIONS(39), - [anon_sym_GT] = ACTIONS(39), - [anon_sym_LT_AMP] = ACTIONS(39), - [anon_sym_GT_AMP] = ACTIONS(39), - [sym_file_descriptor] = ACTIONS(41), - [anon_sym_LF] = ACTIONS(35), - [anon_sym_SEMI_SEMI] = ACTIONS(35), - }, - [5] = { - [ts_builtin_sym_end] = ACTIONS(43), - }, - [6] = { - [ts_builtin_sym_end] = ACTIONS(45), + [aux_sym_SLASH_BSLASHs_PLUS_SLASH] = ACTIONS(41), + [anon_sym_PIPE] = ACTIONS(43), + [anon_sym_PIPE_AMP] = ACTIONS(43), + [anon_sym_AMP_AMP] = ACTIONS(43), + [anon_sym_SEMI] = ACTIONS(43), + [anon_sym_EQ] = ACTIONS(45), [anon_sym_LT] = ACTIONS(47), [anon_sym_GT] = ACTIONS(47), [anon_sym_LT_AMP] = ACTIONS(47), [anon_sym_GT_AMP] = ACTIONS(47), - [sym_file_descriptor] = ACTIONS(47), - [sym_leading_word] = ACTIONS(49), + [sym_file_descriptor] = ACTIONS(49), + [anon_sym_LF] = ACTIONS(43), + [anon_sym_SEMI_SEMI] = ACTIONS(43), + }, + [5] = { + [ts_builtin_sym_end] = ACTIONS(51), + }, + [6] = { + [ts_builtin_sym_end] = ACTIONS(53), + [anon_sym_LT] = ACTIONS(55), + [anon_sym_GT] = ACTIONS(55), + [anon_sym_LT_AMP] = ACTIONS(55), + [anon_sym_GT_AMP] = ACTIONS(55), + [sym_file_descriptor] = ACTIONS(55), + [sym_leading_word] = ACTIONS(57), }, [7] = { - [anon_sym_PIPE] = ACTIONS(51), - [anon_sym_PIPE_AMP] = ACTIONS(51), - [anon_sym_AMP_AMP] = ACTIONS(53), - [anon_sym_SEMI] = ACTIONS(53), - [anon_sym_LF] = ACTIONS(55), - [anon_sym_SEMI_SEMI] = ACTIONS(55), + [anon_sym_PIPE] = ACTIONS(59), + [anon_sym_PIPE_AMP] = ACTIONS(59), + [anon_sym_AMP_AMP] = ACTIONS(61), + [anon_sym_SEMI] = ACTIONS(61), + [anon_sym_LF] = ACTIONS(63), + [anon_sym_SEMI_SEMI] = ACTIONS(63), }, [8] = { - [anon_sym_AMP_AMP] = ACTIONS(53), - [anon_sym_SEMI] = ACTIONS(53), - [anon_sym_LF] = ACTIONS(55), - [anon_sym_SEMI_SEMI] = ACTIONS(55), + [anon_sym_AMP_AMP] = ACTIONS(61), + [anon_sym_SEMI] = ACTIONS(61), + [anon_sym_LF] = ACTIONS(63), + [anon_sym_SEMI_SEMI] = ACTIONS(63), }, [9] = { - [anon_sym_LT] = ACTIONS(57), - [anon_sym_GT] = ACTIONS(57), - [anon_sym_LT_AMP] = ACTIONS(57), - [anon_sym_GT_AMP] = ACTIONS(57), - [sym_file_descriptor] = ACTIONS(57), - [sym_leading_word] = ACTIONS(59), + [anon_sym_LT] = ACTIONS(65), + [anon_sym_GT] = ACTIONS(65), + [anon_sym_LT_AMP] = ACTIONS(65), + [anon_sym_GT_AMP] = ACTIONS(65), + [sym_file_descriptor] = ACTIONS(65), + [sym_leading_word] = ACTIONS(67), }, [10] = { [sym_command] = STATE(24), @@ -928,170 +1123,141 @@ static uint16_t ts_parse_table[STATE_COUNT][SYMBOL_COUNT] = { [sym_environment_variable_assignment] = STATE(9), [sym_file_redirect] = STATE(9), [aux_sym_simple_command_repeat1] = STATE(11), - [ts_builtin_sym_end] = ACTIONS(61), - [anon_sym_LT] = ACTIONS(19), - [anon_sym_GT] = ACTIONS(19), - [anon_sym_LT_AMP] = ACTIONS(19), - [anon_sym_GT_AMP] = ACTIONS(19), - [sym_file_descriptor] = ACTIONS(21), - [sym_leading_word] = ACTIONS(23), + [ts_builtin_sym_end] = ACTIONS(69), + [anon_sym_LT] = ACTIONS(27), + [anon_sym_GT] = ACTIONS(27), + [anon_sym_LT_AMP] = ACTIONS(27), + [anon_sym_GT_AMP] = ACTIONS(27), + [sym_file_descriptor] = ACTIONS(29), + [sym_leading_word] = ACTIONS(31), }, [11] = { [sym_environment_variable_assignment] = STATE(26), [sym_file_redirect] = STATE(26), - [anon_sym_LT] = ACTIONS(19), - [anon_sym_GT] = ACTIONS(19), - [anon_sym_LT_AMP] = ACTIONS(19), - [anon_sym_GT_AMP] = ACTIONS(19), - [sym_file_descriptor] = ACTIONS(21), - [sym_leading_word] = ACTIONS(63), - }, - [12] = { - [anon_sym_LT] = ACTIONS(65), - [anon_sym_GT] = ACTIONS(65), - [anon_sym_LT_AMP] = ACTIONS(65), - [anon_sym_GT_AMP] = ACTIONS(65), - [sym_file_descriptor] = ACTIONS(65), - [sym_leading_word] = ACTIONS(67), - }, - [13] = { - [anon_sym_LT] = ACTIONS(69), - [anon_sym_GT] = ACTIONS(69), - [anon_sym_LT_AMP] = ACTIONS(69), - [anon_sym_GT_AMP] = ACTIONS(69), - [sym_file_descriptor] = ACTIONS(69), + [anon_sym_LT] = ACTIONS(27), + [anon_sym_GT] = ACTIONS(27), + [anon_sym_LT_AMP] = ACTIONS(27), + [anon_sym_GT_AMP] = ACTIONS(27), + [sym_file_descriptor] = ACTIONS(29), [sym_leading_word] = ACTIONS(71), }, - [14] = { + [12] = { + [anon_sym_LT] = ACTIONS(73), + [anon_sym_GT] = ACTIONS(73), + [anon_sym_LT_AMP] = ACTIONS(73), + [anon_sym_GT_AMP] = ACTIONS(73), [sym_file_descriptor] = ACTIONS(73), - [sym_word] = ACTIONS(75), + [sym_leading_word] = ACTIONS(75), + }, + [13] = { + [anon_sym_LT] = ACTIONS(77), + [anon_sym_GT] = ACTIONS(77), + [anon_sym_LT_AMP] = ACTIONS(77), + [anon_sym_GT_AMP] = ACTIONS(77), + [sym_file_descriptor] = ACTIONS(77), + [sym_leading_word] = ACTIONS(79), + }, + [14] = { + [sym_file_descriptor] = ACTIONS(81), + [sym_word] = ACTIONS(83), }, [15] = { + [sym_expansion] = STATE(32), + [sym_operator_expansion] = STATE(32), [sym_file_redirect] = STATE(19), - [aux_sym_simple_command_repeat2] = STATE(30), - [aux_sym_simple_command_repeat3] = STATE(31), - [anon_sym_PIPE] = ACTIONS(77), - [anon_sym_PIPE_AMP] = ACTIONS(77), - [anon_sym_AMP_AMP] = ACTIONS(77), - [anon_sym_SEMI] = ACTIONS(77), - [anon_sym_LT] = ACTIONS(39), - [anon_sym_GT] = ACTIONS(39), - [anon_sym_LT_AMP] = ACTIONS(39), - [anon_sym_GT_AMP] = ACTIONS(39), - [sym_file_descriptor] = ACTIONS(41), - [sym_word] = ACTIONS(79), - [anon_sym_LF] = ACTIONS(77), - [anon_sym_SEMI_SEMI] = ACTIONS(77), + [aux_sym_simple_command_repeat2] = STATE(33), + [aux_sym_simple_command_repeat3] = STATE(34), + [anon_sym_PIPE] = ACTIONS(85), + [anon_sym_PIPE_AMP] = ACTIONS(85), + [anon_sym_AMP_AMP] = ACTIONS(85), + [anon_sym_SEMI] = ACTIONS(85), + [anon_sym_DOLLAR] = ACTIONS(87), + [anon_sym_DOLLAR_LBRACE] = ACTIONS(89), + [anon_sym_LT] = ACTIONS(47), + [anon_sym_GT] = ACTIONS(47), + [anon_sym_LT_AMP] = ACTIONS(47), + [anon_sym_GT_AMP] = ACTIONS(47), + [sym_file_descriptor] = ACTIONS(49), + [sym_word] = ACTIONS(91), + [anon_sym_LF] = ACTIONS(85), + [anon_sym_SEMI_SEMI] = ACTIONS(85), }, [16] = { - [sym_word] = ACTIONS(81), + [sym_word] = ACTIONS(93), }, [17] = { - [sym_file_descriptor] = ACTIONS(83), - [sym_word] = ACTIONS(85), + [sym_file_descriptor] = ACTIONS(95), + [sym_word] = ACTIONS(97), }, [18] = { - [anon_sym_LT] = ACTIONS(87), - [anon_sym_GT] = ACTIONS(87), - [anon_sym_LT_AMP] = ACTIONS(89), - [anon_sym_GT_AMP] = ACTIONS(89), - }, - [19] = { - [anon_sym_PIPE] = ACTIONS(91), - [anon_sym_PIPE_AMP] = ACTIONS(91), - [anon_sym_AMP_AMP] = ACTIONS(91), - [anon_sym_SEMI] = ACTIONS(91), - [anon_sym_LT] = ACTIONS(91), - [anon_sym_GT] = ACTIONS(91), - [anon_sym_LT_AMP] = ACTIONS(91), - [anon_sym_GT_AMP] = ACTIONS(91), - [sym_file_descriptor] = ACTIONS(91), - [anon_sym_LF] = ACTIONS(91), - [anon_sym_SEMI_SEMI] = ACTIONS(91), - }, - [20] = { - [sym_file_redirect] = STATE(36), - [anon_sym_PIPE] = ACTIONS(77), - [anon_sym_PIPE_AMP] = ACTIONS(77), - [anon_sym_AMP_AMP] = ACTIONS(77), - [anon_sym_SEMI] = ACTIONS(77), - [anon_sym_LT] = ACTIONS(39), - [anon_sym_GT] = ACTIONS(39), - [anon_sym_LT_AMP] = ACTIONS(39), - [anon_sym_GT_AMP] = ACTIONS(39), - [sym_file_descriptor] = ACTIONS(41), - [anon_sym_LF] = ACTIONS(77), - [anon_sym_SEMI_SEMI] = ACTIONS(77), - }, - [21] = { - [sym_simple_command] = STATE(37), - [sym_environment_variable_assignment] = STATE(9), - [sym_file_redirect] = STATE(9), - [aux_sym_simple_command_repeat1] = STATE(11), - [anon_sym_LT] = ACTIONS(19), - [anon_sym_GT] = ACTIONS(19), - [anon_sym_LT_AMP] = ACTIONS(19), - [anon_sym_GT_AMP] = ACTIONS(19), - [sym_file_descriptor] = ACTIONS(21), - [sym_leading_word] = ACTIONS(23), - }, - [22] = { - [sym_simple_command] = STATE(38), - [sym_pipeline] = STATE(39), - [sym_environment_variable_assignment] = STATE(9), - [sym_file_redirect] = STATE(9), - [aux_sym_simple_command_repeat1] = STATE(11), - [anon_sym_LT] = ACTIONS(19), - [anon_sym_GT] = ACTIONS(19), - [anon_sym_LT_AMP] = ACTIONS(19), - [anon_sym_GT_AMP] = ACTIONS(19), - [sym_file_descriptor] = ACTIONS(21), - [sym_leading_word] = ACTIONS(23), - }, - [23] = { - [ts_builtin_sym_end] = ACTIONS(93), - [anon_sym_LT] = ACTIONS(95), - [anon_sym_GT] = ACTIONS(95), - [anon_sym_LT_AMP] = ACTIONS(95), - [anon_sym_GT_AMP] = ACTIONS(95), - [sym_file_descriptor] = ACTIONS(95), - [sym_leading_word] = ACTIONS(97), - }, - [24] = { - [ts_builtin_sym_end] = ACTIONS(99), - [anon_sym_LT] = ACTIONS(101), - [anon_sym_GT] = ACTIONS(101), + [anon_sym_LT] = ACTIONS(99), + [anon_sym_GT] = ACTIONS(99), [anon_sym_LT_AMP] = ACTIONS(101), [anon_sym_GT_AMP] = ACTIONS(101), - [sym_file_descriptor] = ACTIONS(101), - [sym_leading_word] = ACTIONS(103), }, - [25] = { - [sym_file_redirect] = STATE(19), - [aux_sym_simple_command_repeat3] = STATE(41), - [aux_sym_SLASH_BSLASHs_PLUS_SLASH] = ACTIONS(105), - [anon_sym_PIPE] = ACTIONS(107), - [anon_sym_PIPE_AMP] = ACTIONS(107), - [anon_sym_AMP_AMP] = ACTIONS(107), - [anon_sym_SEMI] = ACTIONS(107), - [anon_sym_EQ] = ACTIONS(37), - [anon_sym_LT] = ACTIONS(39), - [anon_sym_GT] = ACTIONS(39), - [anon_sym_LT_AMP] = ACTIONS(39), - [anon_sym_GT_AMP] = ACTIONS(39), - [sym_file_descriptor] = ACTIONS(41), - [anon_sym_LF] = ACTIONS(107), - [anon_sym_SEMI_SEMI] = ACTIONS(107), + [19] = { + [anon_sym_PIPE] = ACTIONS(103), + [anon_sym_PIPE_AMP] = ACTIONS(103), + [anon_sym_AMP_AMP] = ACTIONS(103), + [anon_sym_SEMI] = ACTIONS(103), + [anon_sym_LT] = ACTIONS(103), + [anon_sym_GT] = ACTIONS(103), + [anon_sym_LT_AMP] = ACTIONS(103), + [anon_sym_GT_AMP] = ACTIONS(103), + [sym_file_descriptor] = ACTIONS(103), + [anon_sym_LF] = ACTIONS(103), + [anon_sym_SEMI_SEMI] = ACTIONS(103), }, - [26] = { - [anon_sym_LT] = ACTIONS(109), - [anon_sym_GT] = ACTIONS(109), - [anon_sym_LT_AMP] = ACTIONS(109), - [anon_sym_GT_AMP] = ACTIONS(109), - [sym_file_descriptor] = ACTIONS(109), - [sym_leading_word] = ACTIONS(111), + [20] = { + [sym_file_redirect] = STATE(39), + [anon_sym_PIPE] = ACTIONS(85), + [anon_sym_PIPE_AMP] = ACTIONS(85), + [anon_sym_AMP_AMP] = ACTIONS(85), + [anon_sym_SEMI] = ACTIONS(85), + [anon_sym_LT] = ACTIONS(47), + [anon_sym_GT] = ACTIONS(47), + [anon_sym_LT_AMP] = ACTIONS(47), + [anon_sym_GT_AMP] = ACTIONS(47), + [sym_file_descriptor] = ACTIONS(49), + [anon_sym_LF] = ACTIONS(85), + [anon_sym_SEMI_SEMI] = ACTIONS(85), }, - [27] = { + [21] = { + [sym_simple_command] = STATE(40), + [sym_environment_variable_assignment] = STATE(9), + [sym_file_redirect] = STATE(9), + [aux_sym_simple_command_repeat1] = STATE(11), + [anon_sym_LT] = ACTIONS(27), + [anon_sym_GT] = ACTIONS(27), + [anon_sym_LT_AMP] = ACTIONS(27), + [anon_sym_GT_AMP] = ACTIONS(27), + [sym_file_descriptor] = ACTIONS(29), + [sym_leading_word] = ACTIONS(31), + }, + [22] = { + [sym_simple_command] = STATE(41), + [sym_pipeline] = STATE(42), + [sym_environment_variable_assignment] = STATE(9), + [sym_file_redirect] = STATE(9), + [aux_sym_simple_command_repeat1] = STATE(11), + [anon_sym_LT] = ACTIONS(27), + [anon_sym_GT] = ACTIONS(27), + [anon_sym_LT_AMP] = ACTIONS(27), + [anon_sym_GT_AMP] = ACTIONS(27), + [sym_file_descriptor] = ACTIONS(29), + [sym_leading_word] = ACTIONS(31), + }, + [23] = { + [ts_builtin_sym_end] = ACTIONS(105), + [anon_sym_LT] = ACTIONS(107), + [anon_sym_GT] = ACTIONS(107), + [anon_sym_LT_AMP] = ACTIONS(107), + [anon_sym_GT_AMP] = ACTIONS(107), + [sym_file_descriptor] = ACTIONS(107), + [sym_leading_word] = ACTIONS(109), + }, + [24] = { + [ts_builtin_sym_end] = ACTIONS(111), [anon_sym_LT] = ACTIONS(113), [anon_sym_GT] = ACTIONS(113), [anon_sym_LT_AMP] = ACTIONS(113), @@ -1099,557 +1265,777 @@ static uint16_t ts_parse_table[STATE_COUNT][SYMBOL_COUNT] = { [sym_file_descriptor] = ACTIONS(113), [sym_leading_word] = ACTIONS(115), }, - [28] = { - [anon_sym_LT] = ACTIONS(117), - [anon_sym_GT] = ACTIONS(117), - [anon_sym_LT_AMP] = ACTIONS(117), - [anon_sym_GT_AMP] = ACTIONS(117), - [sym_file_descriptor] = ACTIONS(117), - [sym_leading_word] = ACTIONS(119), + [25] = { + [sym_file_redirect] = STATE(19), + [aux_sym_simple_command_repeat3] = STATE(44), + [aux_sym_SLASH_BSLASHs_PLUS_SLASH] = ACTIONS(117), + [anon_sym_PIPE] = ACTIONS(119), + [anon_sym_PIPE_AMP] = ACTIONS(119), + [anon_sym_AMP_AMP] = ACTIONS(119), + [anon_sym_SEMI] = ACTIONS(119), + [anon_sym_EQ] = ACTIONS(45), + [anon_sym_LT] = ACTIONS(47), + [anon_sym_GT] = ACTIONS(47), + [anon_sym_LT_AMP] = ACTIONS(47), + [anon_sym_GT_AMP] = ACTIONS(47), + [sym_file_descriptor] = ACTIONS(49), + [anon_sym_LF] = ACTIONS(119), + [anon_sym_SEMI_SEMI] = ACTIONS(119), }, - [29] = { - [anon_sym_PIPE] = ACTIONS(121), - [anon_sym_PIPE_AMP] = ACTIONS(121), - [anon_sym_AMP_AMP] = ACTIONS(121), - [anon_sym_SEMI] = ACTIONS(121), + [26] = { [anon_sym_LT] = ACTIONS(121), [anon_sym_GT] = ACTIONS(121), [anon_sym_LT_AMP] = ACTIONS(121), [anon_sym_GT_AMP] = ACTIONS(121), [sym_file_descriptor] = ACTIONS(121), - [sym_word] = ACTIONS(121), - [anon_sym_LF] = ACTIONS(121), - [anon_sym_SEMI_SEMI] = ACTIONS(121), + [sym_leading_word] = ACTIONS(123), + }, + [27] = { + [anon_sym_LT] = ACTIONS(125), + [anon_sym_GT] = ACTIONS(125), + [anon_sym_LT_AMP] = ACTIONS(125), + [anon_sym_GT_AMP] = ACTIONS(125), + [sym_file_descriptor] = ACTIONS(125), + [sym_leading_word] = ACTIONS(127), + }, + [28] = { + [anon_sym_LT] = ACTIONS(129), + [anon_sym_GT] = ACTIONS(129), + [anon_sym_LT_AMP] = ACTIONS(129), + [anon_sym_GT_AMP] = ACTIONS(129), + [sym_file_descriptor] = ACTIONS(129), + [sym_leading_word] = ACTIONS(131), + }, + [29] = { + [sym_word] = ACTIONS(133), }, [30] = { - [sym_file_redirect] = STATE(19), - [aux_sym_simple_command_repeat3] = STATE(43), - [anon_sym_PIPE] = ACTIONS(123), - [anon_sym_PIPE_AMP] = ACTIONS(123), - [anon_sym_AMP_AMP] = ACTIONS(123), - [anon_sym_SEMI] = ACTIONS(123), - [anon_sym_LT] = ACTIONS(39), - [anon_sym_GT] = ACTIONS(39), - [anon_sym_LT_AMP] = ACTIONS(39), - [anon_sym_GT_AMP] = ACTIONS(39), - [sym_file_descriptor] = ACTIONS(41), - [sym_word] = ACTIONS(125), - [anon_sym_LF] = ACTIONS(123), - [anon_sym_SEMI_SEMI] = ACTIONS(123), + [sym_leading_word] = ACTIONS(135), }, [31] = { - [sym_file_redirect] = STATE(36), - [anon_sym_PIPE] = ACTIONS(123), - [anon_sym_PIPE_AMP] = ACTIONS(123), - [anon_sym_AMP_AMP] = ACTIONS(123), - [anon_sym_SEMI] = ACTIONS(123), - [anon_sym_LT] = ACTIONS(39), - [anon_sym_GT] = ACTIONS(39), - [anon_sym_LT_AMP] = ACTIONS(39), - [anon_sym_GT_AMP] = ACTIONS(39), - [sym_file_descriptor] = ACTIONS(41), - [anon_sym_LF] = ACTIONS(123), - [anon_sym_SEMI_SEMI] = ACTIONS(123), + [anon_sym_PIPE] = ACTIONS(137), + [anon_sym_PIPE_AMP] = ACTIONS(137), + [anon_sym_AMP_AMP] = ACTIONS(137), + [anon_sym_SEMI] = ACTIONS(137), + [anon_sym_DOLLAR] = ACTIONS(137), + [anon_sym_DOLLAR_LBRACE] = ACTIONS(137), + [anon_sym_LT] = ACTIONS(137), + [anon_sym_GT] = ACTIONS(137), + [anon_sym_LT_AMP] = ACTIONS(137), + [anon_sym_GT_AMP] = ACTIONS(137), + [sym_file_descriptor] = ACTIONS(137), + [sym_word] = ACTIONS(137), + [anon_sym_LF] = ACTIONS(137), + [anon_sym_SEMI_SEMI] = ACTIONS(137), }, [32] = { + [anon_sym_PIPE] = ACTIONS(139), + [anon_sym_PIPE_AMP] = ACTIONS(139), + [anon_sym_AMP_AMP] = ACTIONS(139), + [anon_sym_SEMI] = ACTIONS(139), + [anon_sym_DOLLAR] = ACTIONS(139), + [anon_sym_DOLLAR_LBRACE] = ACTIONS(139), + [anon_sym_LT] = ACTIONS(139), + [anon_sym_GT] = ACTIONS(139), + [anon_sym_LT_AMP] = ACTIONS(139), + [anon_sym_GT_AMP] = ACTIONS(139), + [sym_file_descriptor] = ACTIONS(139), + [sym_word] = ACTIONS(139), + [anon_sym_LF] = ACTIONS(139), + [anon_sym_SEMI_SEMI] = ACTIONS(139), + }, + [33] = { + [sym_expansion] = STATE(48), + [sym_operator_expansion] = STATE(48), + [sym_file_redirect] = STATE(19), + [aux_sym_simple_command_repeat3] = STATE(49), + [anon_sym_PIPE] = ACTIONS(141), + [anon_sym_PIPE_AMP] = ACTIONS(141), + [anon_sym_AMP_AMP] = ACTIONS(141), + [anon_sym_SEMI] = ACTIONS(141), + [anon_sym_DOLLAR] = ACTIONS(87), + [anon_sym_DOLLAR_LBRACE] = ACTIONS(89), + [anon_sym_LT] = ACTIONS(47), + [anon_sym_GT] = ACTIONS(47), + [anon_sym_LT_AMP] = ACTIONS(47), + [anon_sym_GT_AMP] = ACTIONS(47), + [sym_file_descriptor] = ACTIONS(49), + [sym_word] = ACTIONS(143), + [anon_sym_LF] = ACTIONS(141), + [anon_sym_SEMI_SEMI] = ACTIONS(141), + }, + [34] = { + [sym_file_redirect] = STATE(39), + [anon_sym_PIPE] = ACTIONS(141), + [anon_sym_PIPE_AMP] = ACTIONS(141), + [anon_sym_AMP_AMP] = ACTIONS(141), + [anon_sym_SEMI] = ACTIONS(141), + [anon_sym_LT] = ACTIONS(47), + [anon_sym_GT] = ACTIONS(47), + [anon_sym_LT_AMP] = ACTIONS(47), + [anon_sym_GT_AMP] = ACTIONS(47), + [sym_file_descriptor] = ACTIONS(49), + [anon_sym_LF] = ACTIONS(141), + [anon_sym_SEMI_SEMI] = ACTIONS(141), + }, + [35] = { + [anon_sym_LT] = ACTIONS(145), + [anon_sym_GT] = ACTIONS(145), + [anon_sym_LT_AMP] = ACTIONS(145), + [anon_sym_GT_AMP] = ACTIONS(145), + [sym_file_descriptor] = ACTIONS(145), + [sym_leading_word] = ACTIONS(147), + }, + [36] = { + [anon_sym_PIPE] = ACTIONS(75), + [anon_sym_PIPE_AMP] = ACTIONS(75), + [anon_sym_AMP_AMP] = ACTIONS(75), + [anon_sym_SEMI] = ACTIONS(75), + [anon_sym_LT] = ACTIONS(75), + [anon_sym_GT] = ACTIONS(75), + [anon_sym_LT_AMP] = ACTIONS(75), + [anon_sym_GT_AMP] = ACTIONS(75), + [sym_file_descriptor] = ACTIONS(75), + [anon_sym_LF] = ACTIONS(75), + [anon_sym_SEMI_SEMI] = ACTIONS(75), + }, + [37] = { + [anon_sym_PIPE] = ACTIONS(79), + [anon_sym_PIPE_AMP] = ACTIONS(79), + [anon_sym_AMP_AMP] = ACTIONS(79), + [anon_sym_SEMI] = ACTIONS(79), + [anon_sym_LT] = ACTIONS(79), + [anon_sym_GT] = ACTIONS(79), + [anon_sym_LT_AMP] = ACTIONS(79), + [anon_sym_GT_AMP] = ACTIONS(79), + [sym_file_descriptor] = ACTIONS(79), + [anon_sym_LF] = ACTIONS(79), + [anon_sym_SEMI_SEMI] = ACTIONS(79), + }, + [38] = { + [sym_file_descriptor] = ACTIONS(149), + [sym_word] = ACTIONS(151), + }, + [39] = { + [anon_sym_PIPE] = ACTIONS(153), + [anon_sym_PIPE_AMP] = ACTIONS(153), + [anon_sym_AMP_AMP] = ACTIONS(153), + [anon_sym_SEMI] = ACTIONS(153), + [anon_sym_LT] = ACTIONS(153), + [anon_sym_GT] = ACTIONS(153), + [anon_sym_LT_AMP] = ACTIONS(153), + [anon_sym_GT_AMP] = ACTIONS(153), + [sym_file_descriptor] = ACTIONS(153), + [anon_sym_LF] = ACTIONS(153), + [anon_sym_SEMI_SEMI] = ACTIONS(153), + }, + [40] = { + [anon_sym_AMP_AMP] = ACTIONS(155), + [anon_sym_SEMI] = ACTIONS(155), + [anon_sym_LF] = ACTIONS(155), + [anon_sym_SEMI_SEMI] = ACTIONS(155), + }, + [41] = { + [anon_sym_PIPE] = ACTIONS(59), + [anon_sym_PIPE_AMP] = ACTIONS(59), + [anon_sym_AMP_AMP] = ACTIONS(157), + [anon_sym_SEMI] = ACTIONS(157), + [anon_sym_LF] = ACTIONS(157), + [anon_sym_SEMI_SEMI] = ACTIONS(157), + }, + [42] = { + [anon_sym_AMP_AMP] = ACTIONS(157), + [anon_sym_SEMI] = ACTIONS(157), + [anon_sym_LF] = ACTIONS(157), + [anon_sym_SEMI_SEMI] = ACTIONS(157), + }, + [43] = { + [sym_expansion] = STATE(32), + [sym_operator_expansion] = STATE(32), + [sym_file_redirect] = STATE(19), + [aux_sym_simple_command_repeat2] = STATE(52), + [aux_sym_simple_command_repeat3] = STATE(53), + [anon_sym_PIPE] = ACTIONS(159), + [anon_sym_PIPE_AMP] = ACTIONS(159), + [anon_sym_AMP_AMP] = ACTIONS(159), + [anon_sym_SEMI] = ACTIONS(159), + [anon_sym_DOLLAR] = ACTIONS(87), + [anon_sym_DOLLAR_LBRACE] = ACTIONS(89), + [anon_sym_LT] = ACTIONS(47), + [anon_sym_GT] = ACTIONS(47), + [anon_sym_LT_AMP] = ACTIONS(47), + [anon_sym_GT_AMP] = ACTIONS(47), + [sym_file_descriptor] = ACTIONS(49), + [sym_word] = ACTIONS(91), + [anon_sym_LF] = ACTIONS(159), + [anon_sym_SEMI_SEMI] = ACTIONS(159), + }, + [44] = { + [sym_file_redirect] = STATE(39), + [anon_sym_PIPE] = ACTIONS(159), + [anon_sym_PIPE_AMP] = ACTIONS(159), + [anon_sym_AMP_AMP] = ACTIONS(159), + [anon_sym_SEMI] = ACTIONS(159), + [anon_sym_LT] = ACTIONS(47), + [anon_sym_GT] = ACTIONS(47), + [anon_sym_LT_AMP] = ACTIONS(47), + [anon_sym_GT_AMP] = ACTIONS(47), + [sym_file_descriptor] = ACTIONS(49), + [anon_sym_LF] = ACTIONS(159), + [anon_sym_SEMI_SEMI] = ACTIONS(159), + }, + [45] = { + [anon_sym_PIPE] = ACTIONS(161), + [anon_sym_PIPE_AMP] = ACTIONS(161), + [anon_sym_AMP_AMP] = ACTIONS(161), + [anon_sym_SEMI] = ACTIONS(161), + [anon_sym_DOLLAR] = ACTIONS(161), + [anon_sym_DOLLAR_LBRACE] = ACTIONS(161), + [anon_sym_LT] = ACTIONS(161), + [anon_sym_GT] = ACTIONS(161), + [anon_sym_LT_AMP] = ACTIONS(161), + [anon_sym_GT_AMP] = ACTIONS(161), + [sym_file_descriptor] = ACTIONS(161), + [sym_word] = ACTIONS(161), + [anon_sym_LF] = ACTIONS(161), + [anon_sym_SEMI_SEMI] = ACTIONS(161), + }, + [46] = { + [anon_sym_EQ] = ACTIONS(163), + [anon_sym_COLON] = ACTIONS(165), + [anon_sym_COLON_QMARK] = ACTIONS(163), + [anon_sym_RBRACE] = ACTIONS(167), + }, + [47] = { + [anon_sym_PIPE] = ACTIONS(169), + [anon_sym_PIPE_AMP] = ACTIONS(169), + [anon_sym_AMP_AMP] = ACTIONS(169), + [anon_sym_SEMI] = ACTIONS(169), + [anon_sym_DOLLAR] = ACTIONS(169), + [anon_sym_DOLLAR_LBRACE] = ACTIONS(169), + [anon_sym_LT] = ACTIONS(169), + [anon_sym_GT] = ACTIONS(169), + [anon_sym_LT_AMP] = ACTIONS(169), + [anon_sym_GT_AMP] = ACTIONS(169), + [sym_file_descriptor] = ACTIONS(169), + [sym_word] = ACTIONS(169), + [anon_sym_LF] = ACTIONS(169), + [anon_sym_SEMI_SEMI] = ACTIONS(169), + }, + [48] = { + [anon_sym_PIPE] = ACTIONS(171), + [anon_sym_PIPE_AMP] = ACTIONS(171), + [anon_sym_AMP_AMP] = ACTIONS(171), + [anon_sym_SEMI] = ACTIONS(171), + [anon_sym_DOLLAR] = ACTIONS(171), + [anon_sym_DOLLAR_LBRACE] = ACTIONS(171), + [anon_sym_LT] = ACTIONS(171), + [anon_sym_GT] = ACTIONS(171), + [anon_sym_LT_AMP] = ACTIONS(171), + [anon_sym_GT_AMP] = ACTIONS(171), + [sym_file_descriptor] = ACTIONS(171), + [sym_word] = ACTIONS(171), + [anon_sym_LF] = ACTIONS(171), + [anon_sym_SEMI_SEMI] = ACTIONS(171), + }, + [49] = { + [sym_file_redirect] = STATE(39), + [anon_sym_PIPE] = ACTIONS(173), + [anon_sym_PIPE_AMP] = ACTIONS(173), + [anon_sym_AMP_AMP] = ACTIONS(173), + [anon_sym_SEMI] = ACTIONS(173), + [anon_sym_LT] = ACTIONS(47), + [anon_sym_GT] = ACTIONS(47), + [anon_sym_LT_AMP] = ACTIONS(47), + [anon_sym_GT_AMP] = ACTIONS(47), + [sym_file_descriptor] = ACTIONS(49), + [anon_sym_LF] = ACTIONS(173), + [anon_sym_SEMI_SEMI] = ACTIONS(173), + }, + [50] = { + [anon_sym_PIPE] = ACTIONS(127), + [anon_sym_PIPE_AMP] = ACTIONS(127), + [anon_sym_AMP_AMP] = ACTIONS(127), + [anon_sym_SEMI] = ACTIONS(127), [anon_sym_LT] = ACTIONS(127), [anon_sym_GT] = ACTIONS(127), [anon_sym_LT_AMP] = ACTIONS(127), [anon_sym_GT_AMP] = ACTIONS(127), [sym_file_descriptor] = ACTIONS(127), - [sym_leading_word] = ACTIONS(129), - }, - [33] = { - [anon_sym_PIPE] = ACTIONS(67), - [anon_sym_PIPE_AMP] = ACTIONS(67), - [anon_sym_AMP_AMP] = ACTIONS(67), - [anon_sym_SEMI] = ACTIONS(67), - [anon_sym_LT] = ACTIONS(67), - [anon_sym_GT] = ACTIONS(67), - [anon_sym_LT_AMP] = ACTIONS(67), - [anon_sym_GT_AMP] = ACTIONS(67), - [sym_file_descriptor] = ACTIONS(67), - [anon_sym_LF] = ACTIONS(67), - [anon_sym_SEMI_SEMI] = ACTIONS(67), - }, - [34] = { - [anon_sym_PIPE] = ACTIONS(71), - [anon_sym_PIPE_AMP] = ACTIONS(71), - [anon_sym_AMP_AMP] = ACTIONS(71), - [anon_sym_SEMI] = ACTIONS(71), - [anon_sym_LT] = ACTIONS(71), - [anon_sym_GT] = ACTIONS(71), - [anon_sym_LT_AMP] = ACTIONS(71), - [anon_sym_GT_AMP] = ACTIONS(71), - [sym_file_descriptor] = ACTIONS(71), - [anon_sym_LF] = ACTIONS(71), - [anon_sym_SEMI_SEMI] = ACTIONS(71), - }, - [35] = { - [sym_file_descriptor] = ACTIONS(131), - [sym_word] = ACTIONS(133), - }, - [36] = { - [anon_sym_PIPE] = ACTIONS(135), - [anon_sym_PIPE_AMP] = ACTIONS(135), - [anon_sym_AMP_AMP] = ACTIONS(135), - [anon_sym_SEMI] = ACTIONS(135), - [anon_sym_LT] = ACTIONS(135), - [anon_sym_GT] = ACTIONS(135), - [anon_sym_LT_AMP] = ACTIONS(135), - [anon_sym_GT_AMP] = ACTIONS(135), - [sym_file_descriptor] = ACTIONS(135), - [anon_sym_LF] = ACTIONS(135), - [anon_sym_SEMI_SEMI] = ACTIONS(135), - }, - [37] = { - [anon_sym_AMP_AMP] = ACTIONS(137), - [anon_sym_SEMI] = ACTIONS(137), - [anon_sym_LF] = ACTIONS(137), - [anon_sym_SEMI_SEMI] = ACTIONS(137), - }, - [38] = { - [anon_sym_PIPE] = ACTIONS(51), - [anon_sym_PIPE_AMP] = ACTIONS(51), - [anon_sym_AMP_AMP] = ACTIONS(139), - [anon_sym_SEMI] = ACTIONS(139), - [anon_sym_LF] = ACTIONS(139), - [anon_sym_SEMI_SEMI] = ACTIONS(139), - }, - [39] = { - [anon_sym_AMP_AMP] = ACTIONS(139), - [anon_sym_SEMI] = ACTIONS(139), - [anon_sym_LF] = ACTIONS(139), - [anon_sym_SEMI_SEMI] = ACTIONS(139), - }, - [40] = { - [sym_file_redirect] = STATE(19), - [aux_sym_simple_command_repeat2] = STATE(46), - [aux_sym_simple_command_repeat3] = STATE(47), - [anon_sym_PIPE] = ACTIONS(141), - [anon_sym_PIPE_AMP] = ACTIONS(141), - [anon_sym_AMP_AMP] = ACTIONS(141), - [anon_sym_SEMI] = ACTIONS(141), - [anon_sym_LT] = ACTIONS(39), - [anon_sym_GT] = ACTIONS(39), - [anon_sym_LT_AMP] = ACTIONS(39), - [anon_sym_GT_AMP] = ACTIONS(39), - [sym_file_descriptor] = ACTIONS(41), - [sym_word] = ACTIONS(79), - [anon_sym_LF] = ACTIONS(141), - [anon_sym_SEMI_SEMI] = ACTIONS(141), - }, - [41] = { - [sym_file_redirect] = STATE(36), - [anon_sym_PIPE] = ACTIONS(141), - [anon_sym_PIPE_AMP] = ACTIONS(141), - [anon_sym_AMP_AMP] = ACTIONS(141), - [anon_sym_SEMI] = ACTIONS(141), - [anon_sym_LT] = ACTIONS(39), - [anon_sym_GT] = ACTIONS(39), - [anon_sym_LT_AMP] = ACTIONS(39), - [anon_sym_GT_AMP] = ACTIONS(39), - [sym_file_descriptor] = ACTIONS(41), - [anon_sym_LF] = ACTIONS(141), - [anon_sym_SEMI_SEMI] = ACTIONS(141), - }, - [42] = { - [anon_sym_PIPE] = ACTIONS(143), - [anon_sym_PIPE_AMP] = ACTIONS(143), - [anon_sym_AMP_AMP] = ACTIONS(143), - [anon_sym_SEMI] = ACTIONS(143), - [anon_sym_LT] = ACTIONS(143), - [anon_sym_GT] = ACTIONS(143), - [anon_sym_LT_AMP] = ACTIONS(143), - [anon_sym_GT_AMP] = ACTIONS(143), - [sym_file_descriptor] = ACTIONS(143), - [sym_word] = ACTIONS(143), - [anon_sym_LF] = ACTIONS(143), - [anon_sym_SEMI_SEMI] = ACTIONS(143), - }, - [43] = { - [sym_file_redirect] = STATE(36), - [anon_sym_PIPE] = ACTIONS(145), - [anon_sym_PIPE_AMP] = ACTIONS(145), - [anon_sym_AMP_AMP] = ACTIONS(145), - [anon_sym_SEMI] = ACTIONS(145), - [anon_sym_LT] = ACTIONS(39), - [anon_sym_GT] = ACTIONS(39), - [anon_sym_LT_AMP] = ACTIONS(39), - [anon_sym_GT_AMP] = ACTIONS(39), - [sym_file_descriptor] = ACTIONS(41), - [anon_sym_LF] = ACTIONS(145), - [anon_sym_SEMI_SEMI] = ACTIONS(145), - }, - [44] = { - [anon_sym_PIPE] = ACTIONS(115), - [anon_sym_PIPE_AMP] = ACTIONS(115), - [anon_sym_AMP_AMP] = ACTIONS(115), - [anon_sym_SEMI] = ACTIONS(115), - [anon_sym_LT] = ACTIONS(115), - [anon_sym_GT] = ACTIONS(115), - [anon_sym_LT_AMP] = ACTIONS(115), - [anon_sym_GT_AMP] = ACTIONS(115), - [sym_file_descriptor] = ACTIONS(115), - [anon_sym_LF] = ACTIONS(115), - [anon_sym_SEMI_SEMI] = ACTIONS(115), - }, - [45] = { - [anon_sym_PIPE] = ACTIONS(119), - [anon_sym_PIPE_AMP] = ACTIONS(119), - [anon_sym_AMP_AMP] = ACTIONS(119), - [anon_sym_SEMI] = ACTIONS(119), - [anon_sym_LT] = ACTIONS(119), - [anon_sym_GT] = ACTIONS(119), - [anon_sym_LT_AMP] = ACTIONS(119), - [anon_sym_GT_AMP] = ACTIONS(119), - [sym_file_descriptor] = ACTIONS(119), - [anon_sym_LF] = ACTIONS(119), - [anon_sym_SEMI_SEMI] = ACTIONS(119), - }, - [46] = { - [sym_file_redirect] = STATE(19), - [aux_sym_simple_command_repeat3] = STATE(48), - [anon_sym_PIPE] = ACTIONS(147), - [anon_sym_PIPE_AMP] = ACTIONS(147), - [anon_sym_AMP_AMP] = ACTIONS(147), - [anon_sym_SEMI] = ACTIONS(147), - [anon_sym_LT] = ACTIONS(39), - [anon_sym_GT] = ACTIONS(39), - [anon_sym_LT_AMP] = ACTIONS(39), - [anon_sym_GT_AMP] = ACTIONS(39), - [sym_file_descriptor] = ACTIONS(41), - [sym_word] = ACTIONS(125), - [anon_sym_LF] = ACTIONS(147), - [anon_sym_SEMI_SEMI] = ACTIONS(147), - }, - [47] = { - [sym_file_redirect] = STATE(36), - [anon_sym_PIPE] = ACTIONS(147), - [anon_sym_PIPE_AMP] = ACTIONS(147), - [anon_sym_AMP_AMP] = ACTIONS(147), - [anon_sym_SEMI] = ACTIONS(147), - [anon_sym_LT] = ACTIONS(39), - [anon_sym_GT] = ACTIONS(39), - [anon_sym_LT_AMP] = ACTIONS(39), - [anon_sym_GT_AMP] = ACTIONS(39), - [sym_file_descriptor] = ACTIONS(41), - [anon_sym_LF] = ACTIONS(147), - [anon_sym_SEMI_SEMI] = ACTIONS(147), - }, - [48] = { - [sym_file_redirect] = STATE(36), - [anon_sym_PIPE] = ACTIONS(149), - [anon_sym_PIPE_AMP] = ACTIONS(149), - [anon_sym_AMP_AMP] = ACTIONS(149), - [anon_sym_SEMI] = ACTIONS(149), - [anon_sym_LT] = ACTIONS(39), - [anon_sym_GT] = ACTIONS(39), - [anon_sym_LT_AMP] = ACTIONS(39), - [anon_sym_GT_AMP] = ACTIONS(39), - [sym_file_descriptor] = ACTIONS(41), - [anon_sym_LF] = ACTIONS(149), - [anon_sym_SEMI_SEMI] = ACTIONS(149), - }, - [49] = { - [sym_file_redirect] = STATE(19), - [aux_sym_simple_command_repeat2] = STATE(57), - [aux_sym_simple_command_repeat3] = STATE(59), - [anon_sym_PIPE] = ACTIONS(151), - [anon_sym_PIPE_AMP] = ACTIONS(151), - [anon_sym_AMP_AMP] = ACTIONS(151), - [anon_sym_SEMI] = ACTIONS(151), - [anon_sym_LT] = ACTIONS(39), - [anon_sym_GT] = ACTIONS(39), - [anon_sym_LT_AMP] = ACTIONS(39), - [anon_sym_GT_AMP] = ACTIONS(39), - [sym_file_descriptor] = ACTIONS(41), - [sym_word] = ACTIONS(79), - [anon_sym_LF] = ACTIONS(151), - [anon_sym_SEMI_SEMI] = ACTIONS(151), - }, - [50] = { - [sym_file_descriptor] = ACTIONS(154), - [sym_word] = ACTIONS(156), + [anon_sym_LF] = ACTIONS(127), + [anon_sym_SEMI_SEMI] = ACTIONS(127), }, [51] = { - [anon_sym_PIPE] = ACTIONS(158), - [anon_sym_PIPE_AMP] = ACTIONS(158), - [anon_sym_AMP_AMP] = ACTIONS(158), - [anon_sym_SEMI] = ACTIONS(158), - [anon_sym_LT] = ACTIONS(161), - [anon_sym_GT] = ACTIONS(161), - [anon_sym_LT_AMP] = ACTIONS(161), - [anon_sym_GT_AMP] = ACTIONS(161), - [sym_file_descriptor] = ACTIONS(158), - [sym_leading_word] = ACTIONS(158), - [anon_sym_LF] = ACTIONS(158), - [anon_sym_SEMI_SEMI] = ACTIONS(158), + [anon_sym_PIPE] = ACTIONS(131), + [anon_sym_PIPE_AMP] = ACTIONS(131), + [anon_sym_AMP_AMP] = ACTIONS(131), + [anon_sym_SEMI] = ACTIONS(131), + [anon_sym_LT] = ACTIONS(131), + [anon_sym_GT] = ACTIONS(131), + [anon_sym_LT_AMP] = ACTIONS(131), + [anon_sym_GT_AMP] = ACTIONS(131), + [sym_file_descriptor] = ACTIONS(131), + [anon_sym_LF] = ACTIONS(131), + [anon_sym_SEMI_SEMI] = ACTIONS(131), }, [52] = { - [ts_builtin_sym_end] = ACTIONS(165), - [anon_sym_LT] = ACTIONS(168), - [anon_sym_GT] = ACTIONS(168), - [anon_sym_LT_AMP] = ACTIONS(168), - [anon_sym_GT_AMP] = ACTIONS(168), - [sym_file_descriptor] = ACTIONS(168), - [sym_leading_word] = ACTIONS(171), + [sym_expansion] = STATE(48), + [sym_operator_expansion] = STATE(48), + [sym_file_redirect] = STATE(19), + [aux_sym_simple_command_repeat3] = STATE(56), + [anon_sym_PIPE] = ACTIONS(175), + [anon_sym_PIPE_AMP] = ACTIONS(175), + [anon_sym_AMP_AMP] = ACTIONS(175), + [anon_sym_SEMI] = ACTIONS(175), + [anon_sym_DOLLAR] = ACTIONS(87), + [anon_sym_DOLLAR_LBRACE] = ACTIONS(89), + [anon_sym_LT] = ACTIONS(47), + [anon_sym_GT] = ACTIONS(47), + [anon_sym_LT_AMP] = ACTIONS(47), + [anon_sym_GT_AMP] = ACTIONS(47), + [sym_file_descriptor] = ACTIONS(49), + [sym_word] = ACTIONS(143), + [anon_sym_LF] = ACTIONS(175), + [anon_sym_SEMI_SEMI] = ACTIONS(175), }, [53] = { - [anon_sym_PIPE] = ACTIONS(51), - [anon_sym_PIPE_AMP] = ACTIONS(51), - [anon_sym_AMP_AMP] = ACTIONS(174), - [anon_sym_SEMI] = ACTIONS(174), - [anon_sym_LF] = ACTIONS(178), - [anon_sym_SEMI_SEMI] = ACTIONS(178), + [sym_file_redirect] = STATE(39), + [anon_sym_PIPE] = ACTIONS(175), + [anon_sym_PIPE_AMP] = ACTIONS(175), + [anon_sym_AMP_AMP] = ACTIONS(175), + [anon_sym_SEMI] = ACTIONS(175), + [anon_sym_LT] = ACTIONS(47), + [anon_sym_GT] = ACTIONS(47), + [anon_sym_LT_AMP] = ACTIONS(47), + [anon_sym_GT_AMP] = ACTIONS(47), + [sym_file_descriptor] = ACTIONS(49), + [anon_sym_LF] = ACTIONS(175), + [anon_sym_SEMI_SEMI] = ACTIONS(175), }, [54] = { - [anon_sym_AMP_AMP] = ACTIONS(182), - [anon_sym_SEMI] = ACTIONS(182), + [sym_word] = ACTIONS(177), + }, + [55] = { + [anon_sym_PIPE] = ACTIONS(179), + [anon_sym_PIPE_AMP] = ACTIONS(179), + [anon_sym_AMP_AMP] = ACTIONS(179), + [anon_sym_SEMI] = ACTIONS(179), + [anon_sym_DOLLAR] = ACTIONS(179), + [anon_sym_DOLLAR_LBRACE] = ACTIONS(179), + [anon_sym_LT] = ACTIONS(179), + [anon_sym_GT] = ACTIONS(179), + [anon_sym_LT_AMP] = ACTIONS(179), + [anon_sym_GT_AMP] = ACTIONS(179), + [sym_file_descriptor] = ACTIONS(179), + [sym_word] = ACTIONS(179), + [anon_sym_LF] = ACTIONS(179), + [anon_sym_SEMI_SEMI] = ACTIONS(179), + }, + [56] = { + [sym_file_redirect] = STATE(39), + [anon_sym_PIPE] = ACTIONS(181), + [anon_sym_PIPE_AMP] = ACTIONS(181), + [anon_sym_AMP_AMP] = ACTIONS(181), + [anon_sym_SEMI] = ACTIONS(181), + [anon_sym_LT] = ACTIONS(47), + [anon_sym_GT] = ACTIONS(47), + [anon_sym_LT_AMP] = ACTIONS(47), + [anon_sym_GT_AMP] = ACTIONS(47), + [sym_file_descriptor] = ACTIONS(49), + [anon_sym_LF] = ACTIONS(181), + [anon_sym_SEMI_SEMI] = ACTIONS(181), + }, + [57] = { + [anon_sym_RBRACE] = ACTIONS(183), + }, + [58] = { + [anon_sym_PIPE] = ACTIONS(185), + [anon_sym_PIPE_AMP] = ACTIONS(185), + [anon_sym_AMP_AMP] = ACTIONS(185), + [anon_sym_SEMI] = ACTIONS(185), + [anon_sym_DOLLAR] = ACTIONS(185), + [anon_sym_DOLLAR_LBRACE] = ACTIONS(185), + [anon_sym_LT] = ACTIONS(185), + [anon_sym_GT] = ACTIONS(185), + [anon_sym_LT_AMP] = ACTIONS(185), + [anon_sym_GT_AMP] = ACTIONS(185), + [sym_file_descriptor] = ACTIONS(185), + [sym_word] = ACTIONS(185), [anon_sym_LF] = ACTIONS(185), [anon_sym_SEMI_SEMI] = ACTIONS(185), }, - [55] = { - [anon_sym_LT] = ACTIONS(188), - [anon_sym_GT] = ACTIONS(188), - [anon_sym_LT_AMP] = ACTIONS(188), - [anon_sym_GT_AMP] = ACTIONS(188), - [sym_file_descriptor] = ACTIONS(188), - [sym_leading_word] = ACTIONS(191), - }, - [56] = { - [anon_sym_PIPE] = ACTIONS(194), - [anon_sym_PIPE_AMP] = ACTIONS(194), - [anon_sym_AMP_AMP] = ACTIONS(194), - [anon_sym_SEMI] = ACTIONS(194), - [anon_sym_LT] = ACTIONS(197), - [anon_sym_GT] = ACTIONS(197), - [anon_sym_LT_AMP] = ACTIONS(197), - [anon_sym_GT_AMP] = ACTIONS(197), - [sym_file_descriptor] = ACTIONS(197), - [sym_leading_word] = ACTIONS(191), - [anon_sym_LF] = ACTIONS(194), - [anon_sym_SEMI_SEMI] = ACTIONS(194), - }, - [57] = { - [sym_file_redirect] = STATE(19), - [aux_sym_simple_command_repeat3] = STATE(63), - [anon_sym_PIPE] = ACTIONS(202), - [anon_sym_PIPE_AMP] = ACTIONS(202), - [anon_sym_AMP_AMP] = ACTIONS(202), - [anon_sym_SEMI] = ACTIONS(202), - [anon_sym_LT] = ACTIONS(39), - [anon_sym_GT] = ACTIONS(39), - [anon_sym_LT_AMP] = ACTIONS(39), - [anon_sym_GT_AMP] = ACTIONS(39), - [sym_file_descriptor] = ACTIONS(41), - [sym_word] = ACTIONS(125), - [anon_sym_LF] = ACTIONS(202), - [anon_sym_SEMI_SEMI] = ACTIONS(202), - }, - [58] = { - [sym_file_redirect] = STATE(36), - [anon_sym_PIPE] = ACTIONS(205), - [anon_sym_PIPE_AMP] = ACTIONS(205), - [anon_sym_AMP_AMP] = ACTIONS(205), - [anon_sym_SEMI] = ACTIONS(205), - [anon_sym_LT] = ACTIONS(39), - [anon_sym_GT] = ACTIONS(39), - [anon_sym_LT_AMP] = ACTIONS(39), - [anon_sym_GT_AMP] = ACTIONS(39), - [sym_file_descriptor] = ACTIONS(41), - [anon_sym_LF] = ACTIONS(205), - [anon_sym_SEMI_SEMI] = ACTIONS(205), - }, [59] = { - [sym_file_redirect] = STATE(36), - [anon_sym_PIPE] = ACTIONS(202), - [anon_sym_PIPE_AMP] = ACTIONS(202), - [anon_sym_AMP_AMP] = ACTIONS(202), - [anon_sym_SEMI] = ACTIONS(202), - [anon_sym_LT] = ACTIONS(39), - [anon_sym_GT] = ACTIONS(39), - [anon_sym_LT_AMP] = ACTIONS(39), - [anon_sym_GT_AMP] = ACTIONS(39), - [sym_file_descriptor] = ACTIONS(41), - [anon_sym_LF] = ACTIONS(202), - [anon_sym_SEMI_SEMI] = ACTIONS(202), + [sym_expansion] = STATE(32), + [sym_operator_expansion] = STATE(32), + [sym_file_redirect] = STATE(19), + [aux_sym_simple_command_repeat2] = STATE(70), + [aux_sym_simple_command_repeat3] = STATE(72), + [anon_sym_PIPE] = ACTIONS(187), + [anon_sym_PIPE_AMP] = ACTIONS(187), + [anon_sym_AMP_AMP] = ACTIONS(187), + [anon_sym_SEMI] = ACTIONS(187), + [anon_sym_DOLLAR] = ACTIONS(87), + [anon_sym_DOLLAR_LBRACE] = ACTIONS(89), + [anon_sym_LT] = ACTIONS(47), + [anon_sym_GT] = ACTIONS(47), + [anon_sym_LT_AMP] = ACTIONS(47), + [anon_sym_GT_AMP] = ACTIONS(47), + [sym_file_descriptor] = ACTIONS(49), + [sym_word] = ACTIONS(91), + [anon_sym_LF] = ACTIONS(187), + [anon_sym_SEMI_SEMI] = ACTIONS(187), }, [60] = { - [anon_sym_PIPE] = ACTIONS(158), - [anon_sym_PIPE_AMP] = ACTIONS(158), - [anon_sym_AMP_AMP] = ACTIONS(158), - [anon_sym_SEMI] = ACTIONS(158), - [anon_sym_LT] = ACTIONS(158), - [anon_sym_GT] = ACTIONS(158), - [anon_sym_LT_AMP] = ACTIONS(158), - [anon_sym_GT_AMP] = ACTIONS(158), - [sym_file_descriptor] = ACTIONS(158), - [sym_leading_word] = ACTIONS(158), - [anon_sym_LF] = ACTIONS(158), - [anon_sym_SEMI_SEMI] = ACTIONS(158), + [sym_word] = ACTIONS(190), }, [61] = { - [anon_sym_PIPE] = ACTIONS(212), - [anon_sym_PIPE_AMP] = ACTIONS(212), - [anon_sym_AMP_AMP] = ACTIONS(212), - [anon_sym_SEMI] = ACTIONS(212), - [anon_sym_LT] = ACTIONS(212), - [anon_sym_GT] = ACTIONS(212), - [anon_sym_LT_AMP] = ACTIONS(212), - [anon_sym_GT_AMP] = ACTIONS(212), - [sym_file_descriptor] = ACTIONS(212), - [sym_leading_word] = ACTIONS(212), - [anon_sym_LF] = ACTIONS(212), - [anon_sym_SEMI_SEMI] = ACTIONS(212), + [anon_sym_PIPE] = ACTIONS(192), + [anon_sym_PIPE_AMP] = ACTIONS(192), + [anon_sym_AMP_AMP] = ACTIONS(192), + [anon_sym_SEMI] = ACTIONS(192), + [anon_sym_DOLLAR] = ACTIONS(192), + [anon_sym_DOLLAR_LBRACE] = ACTIONS(192), + [anon_sym_LT] = ACTIONS(192), + [anon_sym_GT] = ACTIONS(192), + [anon_sym_LT_AMP] = ACTIONS(192), + [anon_sym_GT_AMP] = ACTIONS(192), + [sym_file_descriptor] = ACTIONS(192), + [sym_word] = ACTIONS(192), + [anon_sym_LF] = ACTIONS(192), + [anon_sym_SEMI_SEMI] = ACTIONS(192), }, [62] = { - [sym_file_descriptor] = ACTIONS(215), - [sym_word] = ACTIONS(217), + [sym_file_descriptor] = ACTIONS(195), + [sym_word] = ACTIONS(197), }, [63] = { - [sym_file_redirect] = STATE(36), - [anon_sym_PIPE] = ACTIONS(219), - [anon_sym_PIPE_AMP] = ACTIONS(219), - [anon_sym_AMP_AMP] = ACTIONS(219), - [anon_sym_SEMI] = ACTIONS(219), - [anon_sym_LT] = ACTIONS(39), - [anon_sym_GT] = ACTIONS(39), - [anon_sym_LT_AMP] = ACTIONS(39), - [anon_sym_GT_AMP] = ACTIONS(39), - [sym_file_descriptor] = ACTIONS(41), + [anon_sym_PIPE] = ACTIONS(199), + [anon_sym_PIPE_AMP] = ACTIONS(199), + [anon_sym_AMP_AMP] = ACTIONS(199), + [anon_sym_SEMI] = ACTIONS(199), + [anon_sym_LT] = ACTIONS(202), + [anon_sym_GT] = ACTIONS(202), + [anon_sym_LT_AMP] = ACTIONS(202), + [anon_sym_GT_AMP] = ACTIONS(202), + [sym_file_descriptor] = ACTIONS(199), + [sym_leading_word] = ACTIONS(199), + [anon_sym_LF] = ACTIONS(199), + [anon_sym_SEMI_SEMI] = ACTIONS(199), + }, + [64] = { + [ts_builtin_sym_end] = ACTIONS(206), + [anon_sym_LT] = ACTIONS(209), + [anon_sym_GT] = ACTIONS(209), + [anon_sym_LT_AMP] = ACTIONS(209), + [anon_sym_GT_AMP] = ACTIONS(209), + [sym_file_descriptor] = ACTIONS(209), + [sym_leading_word] = ACTIONS(212), + }, + [65] = { + [anon_sym_PIPE] = ACTIONS(59), + [anon_sym_PIPE_AMP] = ACTIONS(59), + [anon_sym_AMP_AMP] = ACTIONS(215), + [anon_sym_SEMI] = ACTIONS(215), [anon_sym_LF] = ACTIONS(219), [anon_sym_SEMI_SEMI] = ACTIONS(219), }, - [64] = { - [anon_sym_PIPE] = ACTIONS(115), - [anon_sym_PIPE_AMP] = ACTIONS(115), - [anon_sym_AMP_AMP] = ACTIONS(115), - [anon_sym_SEMI] = ACTIONS(115), - [anon_sym_LT] = ACTIONS(115), - [anon_sym_GT] = ACTIONS(115), - [anon_sym_LT_AMP] = ACTIONS(115), - [anon_sym_GT_AMP] = ACTIONS(115), - [sym_file_descriptor] = ACTIONS(115), - [sym_leading_word] = ACTIONS(115), - [anon_sym_LF] = ACTIONS(115), - [anon_sym_SEMI_SEMI] = ACTIONS(115), + [66] = { + [anon_sym_AMP_AMP] = ACTIONS(223), + [anon_sym_SEMI] = ACTIONS(223), + [anon_sym_LF] = ACTIONS(226), + [anon_sym_SEMI_SEMI] = ACTIONS(226), }, - [65] = { - [anon_sym_PIPE] = ACTIONS(119), - [anon_sym_PIPE_AMP] = ACTIONS(119), - [anon_sym_AMP_AMP] = ACTIONS(119), - [anon_sym_SEMI] = ACTIONS(119), - [anon_sym_LT] = ACTIONS(119), - [anon_sym_GT] = ACTIONS(119), - [anon_sym_LT_AMP] = ACTIONS(119), - [anon_sym_GT_AMP] = ACTIONS(119), - [sym_file_descriptor] = ACTIONS(119), - [sym_leading_word] = ACTIONS(119), - [anon_sym_LF] = ACTIONS(119), - [anon_sym_SEMI_SEMI] = ACTIONS(119), + [67] = { + [anon_sym_LT] = ACTIONS(229), + [anon_sym_GT] = ACTIONS(229), + [anon_sym_LT_AMP] = ACTIONS(229), + [anon_sym_GT_AMP] = ACTIONS(229), + [sym_file_descriptor] = ACTIONS(229), + [sym_leading_word] = ACTIONS(232), + }, + [68] = { + [anon_sym_PIPE] = ACTIONS(235), + [anon_sym_PIPE_AMP] = ACTIONS(235), + [anon_sym_AMP_AMP] = ACTIONS(235), + [anon_sym_SEMI] = ACTIONS(235), + [anon_sym_DOLLAR] = ACTIONS(235), + [anon_sym_DOLLAR_LBRACE] = ACTIONS(235), + [anon_sym_LT] = ACTIONS(235), + [anon_sym_GT] = ACTIONS(235), + [anon_sym_LT_AMP] = ACTIONS(235), + [anon_sym_GT_AMP] = ACTIONS(235), + [sym_file_descriptor] = ACTIONS(235), + [sym_word] = ACTIONS(235), + [anon_sym_LF] = ACTIONS(235), + [anon_sym_SEMI_SEMI] = ACTIONS(235), + }, + [69] = { + [anon_sym_PIPE] = ACTIONS(238), + [anon_sym_PIPE_AMP] = ACTIONS(238), + [anon_sym_AMP_AMP] = ACTIONS(238), + [anon_sym_SEMI] = ACTIONS(238), + [anon_sym_LT] = ACTIONS(241), + [anon_sym_GT] = ACTIONS(241), + [anon_sym_LT_AMP] = ACTIONS(241), + [anon_sym_GT_AMP] = ACTIONS(241), + [sym_file_descriptor] = ACTIONS(241), + [sym_leading_word] = ACTIONS(232), + [anon_sym_LF] = ACTIONS(238), + [anon_sym_SEMI_SEMI] = ACTIONS(238), + }, + [70] = { + [sym_expansion] = STATE(48), + [sym_operator_expansion] = STATE(48), + [sym_file_redirect] = STATE(19), + [aux_sym_simple_command_repeat3] = STATE(77), + [anon_sym_PIPE] = ACTIONS(246), + [anon_sym_PIPE_AMP] = ACTIONS(246), + [anon_sym_AMP_AMP] = ACTIONS(246), + [anon_sym_SEMI] = ACTIONS(246), + [anon_sym_DOLLAR] = ACTIONS(87), + [anon_sym_DOLLAR_LBRACE] = ACTIONS(89), + [anon_sym_LT] = ACTIONS(47), + [anon_sym_GT] = ACTIONS(47), + [anon_sym_LT_AMP] = ACTIONS(47), + [anon_sym_GT_AMP] = ACTIONS(47), + [sym_file_descriptor] = ACTIONS(49), + [sym_word] = ACTIONS(143), + [anon_sym_LF] = ACTIONS(246), + [anon_sym_SEMI_SEMI] = ACTIONS(246), + }, + [71] = { + [sym_file_redirect] = STATE(39), + [anon_sym_PIPE] = ACTIONS(249), + [anon_sym_PIPE_AMP] = ACTIONS(249), + [anon_sym_AMP_AMP] = ACTIONS(249), + [anon_sym_SEMI] = ACTIONS(249), + [anon_sym_LT] = ACTIONS(47), + [anon_sym_GT] = ACTIONS(47), + [anon_sym_LT_AMP] = ACTIONS(47), + [anon_sym_GT_AMP] = ACTIONS(47), + [sym_file_descriptor] = ACTIONS(49), + [anon_sym_LF] = ACTIONS(249), + [anon_sym_SEMI_SEMI] = ACTIONS(249), + }, + [72] = { + [sym_file_redirect] = STATE(39), + [anon_sym_PIPE] = ACTIONS(246), + [anon_sym_PIPE_AMP] = ACTIONS(246), + [anon_sym_AMP_AMP] = ACTIONS(246), + [anon_sym_SEMI] = ACTIONS(246), + [anon_sym_LT] = ACTIONS(47), + [anon_sym_GT] = ACTIONS(47), + [anon_sym_LT_AMP] = ACTIONS(47), + [anon_sym_GT_AMP] = ACTIONS(47), + [sym_file_descriptor] = ACTIONS(49), + [anon_sym_LF] = ACTIONS(246), + [anon_sym_SEMI_SEMI] = ACTIONS(246), + }, + [73] = { + [anon_sym_RBRACE] = ACTIONS(183), + [anon_sym_LT] = ACTIONS(145), + [anon_sym_GT] = ACTIONS(145), + [anon_sym_LT_AMP] = ACTIONS(145), + [anon_sym_GT_AMP] = ACTIONS(145), + [sym_file_descriptor] = ACTIONS(145), + [sym_leading_word] = ACTIONS(147), + }, + [74] = { + [anon_sym_PIPE] = ACTIONS(199), + [anon_sym_PIPE_AMP] = ACTIONS(199), + [anon_sym_AMP_AMP] = ACTIONS(199), + [anon_sym_SEMI] = ACTIONS(199), + [anon_sym_LT] = ACTIONS(199), + [anon_sym_GT] = ACTIONS(199), + [anon_sym_LT_AMP] = ACTIONS(199), + [anon_sym_GT_AMP] = ACTIONS(199), + [sym_file_descriptor] = ACTIONS(199), + [sym_leading_word] = ACTIONS(199), + [anon_sym_LF] = ACTIONS(199), + [anon_sym_SEMI_SEMI] = ACTIONS(199), + }, + [75] = { + [anon_sym_PIPE] = ACTIONS(256), + [anon_sym_PIPE_AMP] = ACTIONS(256), + [anon_sym_AMP_AMP] = ACTIONS(256), + [anon_sym_SEMI] = ACTIONS(256), + [anon_sym_LT] = ACTIONS(256), + [anon_sym_GT] = ACTIONS(256), + [anon_sym_LT_AMP] = ACTIONS(256), + [anon_sym_GT_AMP] = ACTIONS(256), + [sym_file_descriptor] = ACTIONS(256), + [sym_leading_word] = ACTIONS(256), + [anon_sym_LF] = ACTIONS(256), + [anon_sym_SEMI_SEMI] = ACTIONS(256), + }, + [76] = { + [sym_file_descriptor] = ACTIONS(259), + [sym_word] = ACTIONS(261), + }, + [77] = { + [sym_file_redirect] = STATE(39), + [anon_sym_PIPE] = ACTIONS(263), + [anon_sym_PIPE_AMP] = ACTIONS(263), + [anon_sym_AMP_AMP] = ACTIONS(263), + [anon_sym_SEMI] = ACTIONS(263), + [anon_sym_LT] = ACTIONS(47), + [anon_sym_GT] = ACTIONS(47), + [anon_sym_LT_AMP] = ACTIONS(47), + [anon_sym_GT_AMP] = ACTIONS(47), + [sym_file_descriptor] = ACTIONS(49), + [anon_sym_LF] = ACTIONS(263), + [anon_sym_SEMI_SEMI] = ACTIONS(263), + }, + [78] = { + [anon_sym_PIPE] = ACTIONS(127), + [anon_sym_PIPE_AMP] = ACTIONS(127), + [anon_sym_AMP_AMP] = ACTIONS(127), + [anon_sym_SEMI] = ACTIONS(127), + [anon_sym_LT] = ACTIONS(127), + [anon_sym_GT] = ACTIONS(127), + [anon_sym_LT_AMP] = ACTIONS(127), + [anon_sym_GT_AMP] = ACTIONS(127), + [sym_file_descriptor] = ACTIONS(127), + [sym_leading_word] = ACTIONS(127), + [anon_sym_LF] = ACTIONS(127), + [anon_sym_SEMI_SEMI] = ACTIONS(127), + }, + [79] = { + [anon_sym_PIPE] = ACTIONS(131), + [anon_sym_PIPE_AMP] = ACTIONS(131), + [anon_sym_AMP_AMP] = ACTIONS(131), + [anon_sym_SEMI] = ACTIONS(131), + [anon_sym_LT] = ACTIONS(131), + [anon_sym_GT] = ACTIONS(131), + [anon_sym_LT_AMP] = ACTIONS(131), + [anon_sym_GT_AMP] = ACTIONS(131), + [sym_file_descriptor] = ACTIONS(131), + [sym_leading_word] = ACTIONS(131), + [anon_sym_LF] = ACTIONS(131), + [anon_sym_SEMI_SEMI] = ACTIONS(131), }, }; static TSParseActionEntry ts_parse_actions[] = { [0] = {.count = 0, .reusable = false, .depends_on_lookahead = false}, [1] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, RECOVER(0), - [3] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, RECOVER(49), + [3] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, RECOVER(59), [5] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, RECOVER(21), [7] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, RECOVER(22), - [9] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, RECOVER(16), - [11] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, RECOVER(50), - [13] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, RECOVER(51), - [15] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, RECOVER(23), - [17] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(sym_program, 0), - [19] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(2), - [21] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(3), - [23] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(4), - [25] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(12), - [27] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(13), - [29] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(14), - [31] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, SHIFT(14), - [33] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(15), - [35] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 1, .rename_sequence_id = 1), - [37] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(16), - [39] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(17), - [41] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(18), - [43] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, ACCEPT_INPUT(), - [45] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(aux_sym_program_repeat1, 1), - [47] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(aux_sym_program_repeat1, 1), - [49] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_program_repeat1, 1), - [51] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(21), - [53] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(22), - [55] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(23), - [57] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(aux_sym_simple_command_repeat1, 1), - [59] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_simple_command_repeat1, 1), - [61] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(sym_program, 1), - [63] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(25), - [65] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(sym_file_redirect, 2), - [67] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_file_redirect, 2), - [69] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(sym_file_redirect, 2, .rename_sequence_id = 2), - [71] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_file_redirect, 2, .rename_sequence_id = 2), - [73] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(27), - [75] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(28), - [77] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 2, .rename_sequence_id = 3), - [79] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(29), - [81] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(32), - [83] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(33), - [85] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(34), - [87] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(35), - [89] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, SHIFT(35), - [91] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_simple_command_repeat3, 1), - [93] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(sym_command, 2), - [95] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(sym_command, 2), - [97] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_command, 2), - [99] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(aux_sym_program_repeat1, 2), - [101] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(aux_sym_program_repeat1, 2), - [103] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_program_repeat1, 2), - [105] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(40), - [107] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 2, .rename_sequence_id = 4), - [109] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(aux_sym_simple_command_repeat1, 2), - [111] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_simple_command_repeat1, 2), - [113] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(sym_file_redirect, 3), - [115] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_file_redirect, 3), - [117] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(sym_file_redirect, 3, .rename_sequence_id = 5), - [119] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_file_redirect, 3, .rename_sequence_id = 5), - [121] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_simple_command_repeat2, 1, .rename_sequence_id = 6), - [123] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 3, .rename_sequence_id = 7), - [125] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(42), - [127] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(sym_environment_variable_assignment, 3, .rename_sequence_id = 8), - [129] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_environment_variable_assignment, 3, .rename_sequence_id = 8), - [131] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(44), - [133] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(45), - [135] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_simple_command_repeat3, 2), - [137] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_pipeline, 3), - [139] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_list, 3), - [141] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 3, .rename_sequence_id = 9), - [143] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_simple_command_repeat2, 2, .rename_sequence_id = 10), - [145] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 4, .rename_sequence_id = 11), - [147] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 4, .rename_sequence_id = 12), - [149] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 5, .rename_sequence_id = 13), - [151] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 2, .rename_sequence_id = 3), REDUCE(sym_simple_command, 3, .rename_sequence_id = 9), - [154] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(60), - [156] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(61), - [158] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_file_redirect, 2), REDUCE(sym_file_redirect, 3), - [161] = {.count = 3, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_file_redirect, 2), REDUCE(sym_file_redirect, 3), SHIFT(62), - [165] = {.count = 2, .reusable = true, .depends_on_lookahead = false}, REDUCE(aux_sym_program_repeat1, 1), REDUCE(aux_sym_program_repeat1, 2), - [168] = {.count = 2, .reusable = true, .depends_on_lookahead = true}, REDUCE(aux_sym_program_repeat1, 1), REDUCE(aux_sym_program_repeat1, 2), - [171] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_program_repeat1, 1), REDUCE(aux_sym_program_repeat1, 2), - [174] = {.count = 3, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_pipeline, 3), REDUCE(sym_list, 3), SHIFT(22), - [178] = {.count = 3, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_pipeline, 3), REDUCE(sym_list, 3), SHIFT(23), - [182] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_list, 3), SHIFT(22), - [185] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_list, 3), SHIFT(23), - [188] = {.count = 2, .reusable = true, .depends_on_lookahead = true}, REDUCE(aux_sym_simple_command_repeat1, 1), REDUCE(aux_sym_simple_command_repeat1, 2), - [191] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_simple_command_repeat1, 1), REDUCE(aux_sym_simple_command_repeat1, 2), - [194] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_simple_command_repeat3, 1), REDUCE(aux_sym_simple_command_repeat3, 2), - [197] = {.count = 4, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_simple_command_repeat1, 1), REDUCE(aux_sym_simple_command_repeat3, 1), REDUCE(aux_sym_simple_command_repeat1, 2), REDUCE(aux_sym_simple_command_repeat3, 2), - [202] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 3, .rename_sequence_id = 7), REDUCE(sym_simple_command, 4, .rename_sequence_id = 12), - [205] = {.count = 6, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 2, .rename_sequence_id = 3), REDUCE(sym_simple_command, 3, .rename_sequence_id = 9), REDUCE(sym_simple_command, 3, .rename_sequence_id = 7), REDUCE(sym_simple_command, 4, .rename_sequence_id = 12), REDUCE(sym_simple_command, 4, .rename_sequence_id = 11), REDUCE(sym_simple_command, 5, .rename_sequence_id = 13), - [212] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_file_redirect, 2, .rename_sequence_id = 2), REDUCE(sym_file_redirect, 3, .rename_sequence_id = 5), - [215] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(64), - [217] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(65), - [219] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 4, .rename_sequence_id = 11), REDUCE(sym_simple_command, 5, .rename_sequence_id = 13), + [9] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, RECOVER(60), + [11] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, RECOVER(29), + [13] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, RECOVER(30), + [15] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, RECOVER(54), + [17] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, RECOVER(61), + [19] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, RECOVER(62), + [21] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, RECOVER(63), + [23] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, RECOVER(23), + [25] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(sym_program, 0), + [27] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(2), + [29] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(3), + [31] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(4), + [33] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(12), + [35] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(13), + [37] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(14), + [39] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, SHIFT(14), + [41] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(15), + [43] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 1, .rename_sequence_id = 1), + [45] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(16), + [47] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(17), + [49] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(18), + [51] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, ACCEPT_INPUT(), + [53] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(aux_sym_program_repeat1, 1), + [55] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(aux_sym_program_repeat1, 1), + [57] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_program_repeat1, 1), + [59] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(21), + [61] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(22), + [63] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(23), + [65] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(aux_sym_simple_command_repeat1, 1), + [67] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_simple_command_repeat1, 1), + [69] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(sym_program, 1), + [71] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(25), + [73] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(sym_file_redirect, 2), + [75] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_file_redirect, 2), + [77] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(sym_file_redirect, 2, .rename_sequence_id = 2), + [79] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_file_redirect, 2, .rename_sequence_id = 2), + [81] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(27), + [83] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(28), + [85] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 2, .rename_sequence_id = 3), + [87] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(29), + [89] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(30), + [91] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(31), + [93] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(35), + [95] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(36), + [97] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(37), + [99] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(38), + [101] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, SHIFT(38), + [103] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_simple_command_repeat3, 1), + [105] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(sym_command, 2), + [107] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(sym_command, 2), + [109] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_command, 2), + [111] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, REDUCE(aux_sym_program_repeat1, 2), + [113] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(aux_sym_program_repeat1, 2), + [115] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_program_repeat1, 2), + [117] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(43), + [119] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 2, .rename_sequence_id = 4), + [121] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(aux_sym_simple_command_repeat1, 2), + [123] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_simple_command_repeat1, 2), + [125] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(sym_file_redirect, 3), + [127] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_file_redirect, 3), + [129] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(sym_file_redirect, 3, .rename_sequence_id = 5), + [131] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_file_redirect, 3, .rename_sequence_id = 5), + [133] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(45), + [135] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(46), + [137] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_simple_command_repeat2, 1, .rename_sequence_id = 6), + [139] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_simple_command_repeat2, 1), + [141] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 3, .rename_sequence_id = 7), + [143] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(47), + [145] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, REDUCE(sym_environment_variable_assignment, 3, .rename_sequence_id = 8), + [147] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_environment_variable_assignment, 3, .rename_sequence_id = 8), + [149] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(50), + [151] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(51), + [153] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_simple_command_repeat3, 2), + [155] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_pipeline, 3), + [157] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_list, 3), + [159] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 3, .rename_sequence_id = 9), + [161] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_expansion, 2, .rename_sequence_id = 10), + [163] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, SHIFT(54), + [165] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(54), + [167] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, SHIFT(55), + [169] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_simple_command_repeat2, 2, .rename_sequence_id = 11), + [171] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_simple_command_repeat2, 2), + [173] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 4, .rename_sequence_id = 12), + [175] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 4, .rename_sequence_id = 13), + [177] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(57), + [179] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_operator_expansion, 3, .rename_sequence_id = 14), + [181] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 5, .rename_sequence_id = 15), + [183] = {.count = 1, .reusable = true, .depends_on_lookahead = false}, SHIFT(58), + [185] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_operator_expansion, 5, .rename_sequence_id = 16), + [187] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 2, .rename_sequence_id = 3), REDUCE(sym_simple_command, 3, .rename_sequence_id = 9), + [190] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(73), + [192] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_operator_expansion, 3, .rename_sequence_id = 14), REDUCE(sym_operator_expansion, 5, .rename_sequence_id = 16), + [195] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(74), + [197] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(75), + [199] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_file_redirect, 2), REDUCE(sym_file_redirect, 3), + [202] = {.count = 3, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_file_redirect, 2), REDUCE(sym_file_redirect, 3), SHIFT(76), + [206] = {.count = 2, .reusable = true, .depends_on_lookahead = false}, REDUCE(aux_sym_program_repeat1, 1), REDUCE(aux_sym_program_repeat1, 2), + [209] = {.count = 2, .reusable = true, .depends_on_lookahead = true}, REDUCE(aux_sym_program_repeat1, 1), REDUCE(aux_sym_program_repeat1, 2), + [212] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_program_repeat1, 1), REDUCE(aux_sym_program_repeat1, 2), + [215] = {.count = 3, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_pipeline, 3), REDUCE(sym_list, 3), SHIFT(22), + [219] = {.count = 3, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_pipeline, 3), REDUCE(sym_list, 3), SHIFT(23), + [223] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_list, 3), SHIFT(22), + [226] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_list, 3), SHIFT(23), + [229] = {.count = 2, .reusable = true, .depends_on_lookahead = true}, REDUCE(aux_sym_simple_command_repeat1, 1), REDUCE(aux_sym_simple_command_repeat1, 2), + [232] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_simple_command_repeat1, 1), REDUCE(aux_sym_simple_command_repeat1, 2), + [235] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_simple_command_repeat2, 1), REDUCE(aux_sym_simple_command_repeat2, 2), + [238] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_simple_command_repeat3, 1), REDUCE(aux_sym_simple_command_repeat3, 2), + [241] = {.count = 4, .reusable = false, .depends_on_lookahead = false}, REDUCE(aux_sym_simple_command_repeat1, 1), REDUCE(aux_sym_simple_command_repeat3, 1), REDUCE(aux_sym_simple_command_repeat1, 2), REDUCE(aux_sym_simple_command_repeat3, 2), + [246] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 3, .rename_sequence_id = 7), REDUCE(sym_simple_command, 4, .rename_sequence_id = 13), + [249] = {.count = 6, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 2, .rename_sequence_id = 3), REDUCE(sym_simple_command, 3, .rename_sequence_id = 9), REDUCE(sym_simple_command, 3, .rename_sequence_id = 7), REDUCE(sym_simple_command, 4, .rename_sequence_id = 13), REDUCE(sym_simple_command, 4, .rename_sequence_id = 12), REDUCE(sym_simple_command, 5, .rename_sequence_id = 15), + [256] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_file_redirect, 2, .rename_sequence_id = 2), REDUCE(sym_file_redirect, 3, .rename_sequence_id = 5), + [259] = {.count = 1, .reusable = true, .depends_on_lookahead = true}, SHIFT(78), + [261] = {.count = 1, .reusable = false, .depends_on_lookahead = false}, SHIFT(79), + [263] = {.count = 2, .reusable = false, .depends_on_lookahead = false}, REDUCE(sym_simple_command, 4, .rename_sequence_id = 12), REDUCE(sym_simple_command, 5, .rename_sequence_id = 15), }; const TSLanguage *tree_sitter_bash() {