1
0

Improve identifier regex

This commit is contained in:
Jeff 2023-12-31 11:03:33 -05:00
parent 12e00bfc42
commit 2fee80843d
4 changed files with 172 additions and 171 deletions

View File

@ -5,6 +5,7 @@ Simple Identifiers
x
_y
__xyz__
x123x
--------------------------------------------------------------------------------
@ -15,6 +16,9 @@ __xyz__
(statement
(expression
(identifier)))
(statement
(expression
(identifier)))
(statement
(expression
(identifier))))

View File

@ -77,7 +77,7 @@ module.exports = grammar({
),
_identifier_pattern: $ =>
/[_a-zA-Z]+[_a-zA-Z0-9]?/,
/[_a-zA-Z]+[_a-zA-Z0-9]*[_a-zA-Z]?/,
value: $ =>
choice(

View File

@ -217,7 +217,7 @@
},
"_identifier_pattern": {
"type": "PATTERN",
"value": "[_a-zA-Z]+[_a-zA-Z0-9]?"
"value": "[_a-zA-Z]+[_a-zA-Z0-9]*[_a-zA-Z]?"
},
"value": {
"type": "CHOICE",

View File

@ -1252,28 +1252,28 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == '!') ADVANCE(11);
if (lookahead == '"') ADVANCE(6);
if (lookahead == '#') ADVANCE(21);
if (lookahead == '%') ADVANCE(62);
if (lookahead == '%') ADVANCE(61);
if (lookahead == '&') ADVANCE(8);
if (lookahead == '\'') ADVANCE(9);
if (lookahead == '(') ADVANCE(32);
if (lookahead == ')') ADVANCE(33);
if (lookahead == '*') ADVANCE(60);
if (lookahead == '+') ADVANCE(56);
if (lookahead == '*') ADVANCE(59);
if (lookahead == '+') ADVANCE(55);
if (lookahead == ',') ADVANCE(34);
if (lookahead == '-') ADVANCE(59);
if (lookahead == '-') ADVANCE(58);
if (lookahead == '.') ADVANCE(10);
if (lookahead == '/') ADVANCE(61);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(46);
if (lookahead == ':') ADVANCE(53);
if (lookahead == '/') ADVANCE(60);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(45);
if (lookahead == ':') ADVANCE(52);
if (lookahead == ';') ADVANCE(31);
if (lookahead == '<') ADVANCE(69);
if (lookahead == '=') ADVANCE(52);
if (lookahead == '>') ADVANCE(68);
if (lookahead == '[') ADVANCE(49);
if (lookahead == ']') ADVANCE(50);
if (lookahead == '<') ADVANCE(68);
if (lookahead == '=') ADVANCE(51);
if (lookahead == '>') ADVANCE(67);
if (lookahead == '[') ADVANCE(48);
if (lookahead == ']') ADVANCE(49);
if (lookahead == '`') ADVANCE(15);
if (lookahead == 'a') ADVANCE(42);
if (lookahead == 'e') ADVANCE(40);
if (lookahead == 'a') ADVANCE(41);
if (lookahead == 'e') ADVANCE(39);
if (lookahead == '{') ADVANCE(29);
if (lookahead == '|') ADVANCE(22);
if (lookahead == '}') ADVANCE(30);
@ -1282,31 +1282,31 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
lookahead == '\r' ||
lookahead == ' ') SKIP(0)
if (('A' <= lookahead && lookahead <= 'Z') ||
('_' <= lookahead && lookahead <= 'z')) ADVANCE(45);
('_' <= lookahead && lookahead <= 'z')) ADVANCE(44);
END_STATE();
case 1:
if (lookahead == '!') ADVANCE(11);
if (lookahead == '"') ADVANCE(6);
if (lookahead == '#') ADVANCE(21);
if (lookahead == '%') ADVANCE(62);
if (lookahead == '%') ADVANCE(61);
if (lookahead == '&') ADVANCE(8);
if (lookahead == '\'') ADVANCE(9);
if (lookahead == '(') ADVANCE(32);
if (lookahead == ')') ADVANCE(33);
if (lookahead == '*') ADVANCE(60);
if (lookahead == '+') ADVANCE(56);
if (lookahead == '*') ADVANCE(59);
if (lookahead == '+') ADVANCE(55);
if (lookahead == ',') ADVANCE(34);
if (lookahead == '-') ADVANCE(59);
if (lookahead == '-') ADVANCE(58);
if (lookahead == '.') ADVANCE(10);
if (lookahead == '/') ADVANCE(61);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(46);
if (lookahead == ':') ADVANCE(53);
if (lookahead == '/') ADVANCE(60);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(45);
if (lookahead == ':') ADVANCE(52);
if (lookahead == ';') ADVANCE(31);
if (lookahead == '<') ADVANCE(69);
if (lookahead == '=') ADVANCE(51);
if (lookahead == '>') ADVANCE(68);
if (lookahead == '[') ADVANCE(49);
if (lookahead == ']') ADVANCE(50);
if (lookahead == '<') ADVANCE(68);
if (lookahead == '=') ADVANCE(50);
if (lookahead == '>') ADVANCE(67);
if (lookahead == '[') ADVANCE(48);
if (lookahead == ']') ADVANCE(49);
if (lookahead == '`') ADVANCE(15);
if (lookahead == '{') ADVANCE(29);
if (lookahead == '|') ADVANCE(22);
@ -1316,26 +1316,26 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
lookahead == '\r' ||
lookahead == ' ') SKIP(1)
if (('A' <= lookahead && lookahead <= 'Z') ||
('_' <= lookahead && lookahead <= 'z')) ADVANCE(45);
('_' <= lookahead && lookahead <= 'z')) ADVANCE(44);
END_STATE();
case 2:
if (lookahead == '!') ADVANCE(11);
if (lookahead == '#') ADVANCE(21);
if (lookahead == '%') ADVANCE(62);
if (lookahead == '%') ADVANCE(61);
if (lookahead == '&') ADVANCE(8);
if (lookahead == '(') ADVANCE(32);
if (lookahead == ')') ADVANCE(33);
if (lookahead == '*') ADVANCE(60);
if (lookahead == '+') ADVANCE(56);
if (lookahead == '*') ADVANCE(59);
if (lookahead == '+') ADVANCE(55);
if (lookahead == ',') ADVANCE(34);
if (lookahead == '-') ADVANCE(57);
if (lookahead == '-') ADVANCE(56);
if (lookahead == '.') ADVANCE(10);
if (lookahead == '/') ADVANCE(61);
if (lookahead == ':') ADVANCE(53);
if (lookahead == '/') ADVANCE(60);
if (lookahead == ':') ADVANCE(52);
if (lookahead == ';') ADVANCE(31);
if (lookahead == '<') ADVANCE(69);
if (lookahead == '=') ADVANCE(52);
if (lookahead == '>') ADVANCE(68);
if (lookahead == '<') ADVANCE(68);
if (lookahead == '=') ADVANCE(51);
if (lookahead == '>') ADVANCE(67);
if (lookahead == '{') ADVANCE(29);
if (lookahead == '|') ADVANCE(22);
if (lookahead == '}') ADVANCE(30);
@ -1345,24 +1345,24 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
lookahead == ' ') SKIP(2)
if (('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
('a' <= lookahead && lookahead <= 'z')) ADVANCE(44);
END_STATE();
case 3:
if (lookahead == '!') ADVANCE(11);
if (lookahead == '#') ADVANCE(21);
if (lookahead == '%') ADVANCE(62);
if (lookahead == '%') ADVANCE(61);
if (lookahead == '&') ADVANCE(8);
if (lookahead == '(') ADVANCE(32);
if (lookahead == '*') ADVANCE(60);
if (lookahead == '+') ADVANCE(56);
if (lookahead == '*') ADVANCE(59);
if (lookahead == '+') ADVANCE(55);
if (lookahead == ',') ADVANCE(34);
if (lookahead == '-') ADVANCE(57);
if (lookahead == '/') ADVANCE(61);
if (lookahead == ':') ADVANCE(53);
if (lookahead == '-') ADVANCE(56);
if (lookahead == '/') ADVANCE(60);
if (lookahead == ':') ADVANCE(52);
if (lookahead == ';') ADVANCE(31);
if (lookahead == '<') ADVANCE(69);
if (lookahead == '=') ADVANCE(51);
if (lookahead == '>') ADVANCE(68);
if (lookahead == '<') ADVANCE(68);
if (lookahead == '=') ADVANCE(50);
if (lookahead == '>') ADVANCE(67);
if (lookahead == '|') ADVANCE(22);
if (lookahead == '}') ADVANCE(30);
if (lookahead == '\t' ||
@ -1371,21 +1371,21 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
lookahead == ' ') SKIP(3)
if (('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
('a' <= lookahead && lookahead <= 'z')) ADVANCE(44);
END_STATE();
case 4:
if (lookahead == '!') ADVANCE(11);
if (lookahead == '#') ADVANCE(21);
if (lookahead == '%') ADVANCE(62);
if (lookahead == '%') ADVANCE(61);
if (lookahead == '&') ADVANCE(8);
if (lookahead == '*') ADVANCE(60);
if (lookahead == '+') ADVANCE(55);
if (lookahead == '-') ADVANCE(58);
if (lookahead == '/') ADVANCE(61);
if (lookahead == ':') ADVANCE(53);
if (lookahead == '<') ADVANCE(69);
if (lookahead == '*') ADVANCE(59);
if (lookahead == '+') ADVANCE(54);
if (lookahead == '-') ADVANCE(57);
if (lookahead == '/') ADVANCE(60);
if (lookahead == ':') ADVANCE(52);
if (lookahead == '<') ADVANCE(68);
if (lookahead == '=') ADVANCE(12);
if (lookahead == '>') ADVANCE(68);
if (lookahead == '>') ADVANCE(67);
if (lookahead == '|') ADVANCE(22);
if (lookahead == '\t' ||
lookahead == '\n' ||
@ -1397,16 +1397,16 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == '#') ADVANCE(21);
if (lookahead == '\'') ADVANCE(9);
if (lookahead == '(') ADVANCE(32);
if (lookahead == '*') ADVANCE(60);
if (lookahead == '*') ADVANCE(59);
if (lookahead == ',') ADVANCE(34);
if (lookahead == '-') ADVANCE(23);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(46);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(45);
if (lookahead == ';') ADVANCE(31);
if (lookahead == '=') ADVANCE(14);
if (lookahead == '>') ADVANCE(67);
if (lookahead == '[') ADVANCE(49);
if (lookahead == '>') ADVANCE(66);
if (lookahead == '[') ADVANCE(48);
if (lookahead == '`') ADVANCE(15);
if (lookahead == 'e') ADVANCE(40);
if (lookahead == 'e') ADVANCE(39);
if (lookahead == '{') ADVANCE(29);
if (lookahead == '}') ADVANCE(30);
if (lookahead == '\t' ||
@ -1414,10 +1414,10 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
lookahead == '\r' ||
lookahead == ' ') SKIP(5)
if (('A' <= lookahead && lookahead <= 'Z') ||
('_' <= lookahead && lookahead <= 'z')) ADVANCE(45);
('_' <= lookahead && lookahead <= 'z')) ADVANCE(44);
END_STATE();
case 6:
if (lookahead == '"') ADVANCE(48);
if (lookahead == '"') ADVANCE(47);
if (lookahead != 0) ADVANCE(6);
END_STATE();
case 7:
@ -1426,49 +1426,49 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == ')') ADVANCE(33);
if (lookahead == ',') ADVANCE(34);
if (lookahead == '-') ADVANCE(13);
if (lookahead == '>') ADVANCE(67);
if (lookahead == '[') ADVANCE(49);
if (lookahead == ']') ADVANCE(50);
if (lookahead == '>') ADVANCE(66);
if (lookahead == '[') ADVANCE(48);
if (lookahead == ']') ADVANCE(49);
if (lookahead == '\t' ||
lookahead == '\n' ||
lookahead == '\r' ||
lookahead == ' ') SKIP(7)
if (('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
('a' <= lookahead && lookahead <= 'z')) ADVANCE(44);
END_STATE();
case 8:
if (lookahead == '&') ADVANCE(65);
if (lookahead == '&') ADVANCE(64);
END_STATE();
case 9:
if (lookahead == '\'') ADVANCE(48);
if (lookahead == '\'') ADVANCE(47);
if (lookahead != 0) ADVANCE(9);
END_STATE();
case 10:
if (lookahead == '.') ADVANCE(54);
if (lookahead == '.') ADVANCE(53);
END_STATE();
case 11:
if (lookahead == '=') ADVANCE(64);
if (lookahead == '=') ADVANCE(63);
END_STATE();
case 12:
if (lookahead == '=') ADVANCE(63);
if (lookahead == '>') ADVANCE(75);
if (lookahead == '=') ADVANCE(62);
if (lookahead == '>') ADVANCE(74);
END_STATE();
case 13:
if (lookahead == '>') ADVANCE(77);
if (lookahead == '>') ADVANCE(76);
END_STATE();
case 14:
if (lookahead == '>') ADVANCE(75);
if (lookahead == '>') ADVANCE(74);
END_STATE();
case 15:
if (lookahead == '`') ADVANCE(48);
if (lookahead == '`') ADVANCE(47);
if (lookahead != 0) ADVANCE(15);
END_STATE();
case 16:
if (lookahead == 'f') ADVANCE(19);
END_STATE();
case 17:
if (lookahead == 'f') ADVANCE(74);
if (lookahead == 'f') ADVANCE(73);
END_STATE();
case 18:
if (lookahead == 'i') ADVANCE(17);
@ -1477,7 +1477,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == 'o') ADVANCE(20);
END_STATE();
case 20:
if (lookahead == 'r') ADVANCE(76);
if (lookahead == 'r') ADVANCE(75);
END_STATE();
case 21:
if (lookahead == '|') ADVANCE(28);
@ -1486,37 +1486,37 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead != 0) ADVANCE(21);
END_STATE();
case 22:
if (lookahead == '|') ADVANCE(66);
if (lookahead == '|') ADVANCE(65);
END_STATE();
case 23:
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(46);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(45);
END_STATE();
case 24:
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(47);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(46);
END_STATE();
case 25:
if (eof) ADVANCE(26);
if (lookahead == '!') ADVANCE(11);
if (lookahead == '"') ADVANCE(6);
if (lookahead == '#') ADVANCE(21);
if (lookahead == '%') ADVANCE(62);
if (lookahead == '%') ADVANCE(61);
if (lookahead == '&') ADVANCE(8);
if (lookahead == '\'') ADVANCE(9);
if (lookahead == '(') ADVANCE(32);
if (lookahead == '*') ADVANCE(60);
if (lookahead == '+') ADVANCE(56);
if (lookahead == '-') ADVANCE(59);
if (lookahead == '*') ADVANCE(59);
if (lookahead == '+') ADVANCE(55);
if (lookahead == '-') ADVANCE(58);
if (lookahead == '.') ADVANCE(10);
if (lookahead == '/') ADVANCE(61);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(46);
if (lookahead == ':') ADVANCE(53);
if (lookahead == '/') ADVANCE(60);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(45);
if (lookahead == ':') ADVANCE(52);
if (lookahead == ';') ADVANCE(31);
if (lookahead == '<') ADVANCE(69);
if (lookahead == '=') ADVANCE(51);
if (lookahead == '>') ADVANCE(68);
if (lookahead == '[') ADVANCE(49);
if (lookahead == '<') ADVANCE(68);
if (lookahead == '=') ADVANCE(50);
if (lookahead == '>') ADVANCE(67);
if (lookahead == '[') ADVANCE(48);
if (lookahead == '`') ADVANCE(15);
if (lookahead == 'a') ADVANCE(42);
if (lookahead == 'a') ADVANCE(41);
if (lookahead == '{') ADVANCE(29);
if (lookahead == '|') ADVANCE(22);
if (lookahead == '}') ADVANCE(30);
@ -1525,7 +1525,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
lookahead == '\r' ||
lookahead == ' ') SKIP(25)
if (('A' <= lookahead && lookahead <= 'Z') ||
('_' <= lookahead && lookahead <= 'z')) ADVANCE(45);
('_' <= lookahead && lookahead <= 'z')) ADVANCE(44);
END_STATE();
case 26:
ACCEPT_TOKEN(ts_builtin_sym_end);
@ -1560,195 +1560,192 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
END_STATE();
case 35:
ACCEPT_TOKEN(sym__identifier_pattern);
if (lookahead == ' ') ADVANCE(18);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(44);
if (('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(44);
END_STATE();
case 36:
ACCEPT_TOKEN(sym__identifier_pattern);
if (lookahead == ' ') ADVANCE(18);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(35);
if (lookahead == ' ') ADVANCE(16);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(44);
if (('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
('a' <= lookahead && lookahead <= 'z')) ADVANCE(44);
END_STATE();
case 37:
ACCEPT_TOKEN(sym__identifier_pattern);
if (lookahead == ' ') ADVANCE(16);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(35);
if (lookahead == 'c') ADVANCE(36);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(44);
if (('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
('a' <= lookahead && lookahead <= 'z')) ADVANCE(44);
END_STATE();
case 38:
ACCEPT_TOKEN(sym__identifier_pattern);
if (lookahead == 'c') ADVANCE(37);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(35);
if (lookahead == 'e') ADVANCE(35);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(44);
if (('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
('a' <= lookahead && lookahead <= 'z')) ADVANCE(44);
END_STATE();
case 39:
ACCEPT_TOKEN(sym__identifier_pattern);
if (lookahead == 'e') ADVANCE(36);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(35);
if (lookahead == 'l') ADVANCE(42);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(44);
if (('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
('a' <= lookahead && lookahead <= 'z')) ADVANCE(44);
END_STATE();
case 40:
ACCEPT_TOKEN(sym__identifier_pattern);
if (lookahead == 'l') ADVANCE(43);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(35);
if (lookahead == 'n') ADVANCE(37);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(44);
if (('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
('a' <= lookahead && lookahead <= 'z')) ADVANCE(44);
END_STATE();
case 41:
ACCEPT_TOKEN(sym__identifier_pattern);
if (lookahead == 'n') ADVANCE(38);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(35);
if (lookahead == 's') ADVANCE(43);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(44);
if (('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
('a' <= lookahead && lookahead <= 'z')) ADVANCE(44);
END_STATE();
case 42:
ACCEPT_TOKEN(sym__identifier_pattern);
if (lookahead == 's') ADVANCE(44);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(35);
if (lookahead == 's') ADVANCE(38);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(44);
if (('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
('a' <= lookahead && lookahead <= 'z')) ADVANCE(44);
END_STATE();
case 43:
ACCEPT_TOKEN(sym__identifier_pattern);
if (lookahead == 's') ADVANCE(39);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(35);
if (lookahead == 'y') ADVANCE(40);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(44);
if (('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
('a' <= lookahead && lookahead <= 'z')) ADVANCE(44);
END_STATE();
case 44:
ACCEPT_TOKEN(sym__identifier_pattern);
if (lookahead == 'y') ADVANCE(41);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(35);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(44);
if (('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
('a' <= lookahead && lookahead <= 'z')) ADVANCE(44);
END_STATE();
case 45:
ACCEPT_TOKEN(sym__identifier_pattern);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(35);
if (('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE();
case 46:
ACCEPT_TOKEN(sym_integer);
if (lookahead == '.') ADVANCE(24);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(45);
END_STATE();
case 46:
ACCEPT_TOKEN(sym_float);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(46);
END_STATE();
case 47:
ACCEPT_TOKEN(sym_float);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(47);
END_STATE();
case 48:
ACCEPT_TOKEN(sym_string);
END_STATE();
case 49:
case 48:
ACCEPT_TOKEN(anon_sym_LBRACK);
END_STATE();
case 50:
case 49:
ACCEPT_TOKEN(anon_sym_RBRACK);
END_STATE();
case 50:
ACCEPT_TOKEN(anon_sym_EQ);
if (lookahead == '=') ADVANCE(62);
END_STATE();
case 51:
ACCEPT_TOKEN(anon_sym_EQ);
if (lookahead == '=') ADVANCE(63);
if (lookahead == '=') ADVANCE(62);
if (lookahead == '>') ADVANCE(74);
END_STATE();
case 52:
ACCEPT_TOKEN(anon_sym_EQ);
if (lookahead == '=') ADVANCE(63);
if (lookahead == '>') ADVANCE(75);
END_STATE();
case 53:
ACCEPT_TOKEN(anon_sym_COLON);
END_STATE();
case 54:
case 53:
ACCEPT_TOKEN(anon_sym_DOT_DOT);
END_STATE();
case 54:
ACCEPT_TOKEN(anon_sym_PLUS);
END_STATE();
case 55:
ACCEPT_TOKEN(anon_sym_PLUS);
if (lookahead == '=') ADVANCE(71);
END_STATE();
case 56:
ACCEPT_TOKEN(anon_sym_PLUS);
ACCEPT_TOKEN(anon_sym_DASH);
if (lookahead == '=') ADVANCE(72);
if (lookahead == '>') ADVANCE(76);
END_STATE();
case 57:
ACCEPT_TOKEN(anon_sym_DASH);
if (lookahead == '=') ADVANCE(73);
if (lookahead == '>') ADVANCE(77);
if (lookahead == '>') ADVANCE(76);
END_STATE();
case 58:
ACCEPT_TOKEN(anon_sym_DASH);
if (lookahead == '>') ADVANCE(77);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(45);
if (lookahead == '=') ADVANCE(72);
if (lookahead == '>') ADVANCE(76);
END_STATE();
case 59:
ACCEPT_TOKEN(anon_sym_DASH);
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(46);
if (lookahead == '=') ADVANCE(73);
if (lookahead == '>') ADVANCE(77);
END_STATE();
case 60:
ACCEPT_TOKEN(anon_sym_STAR);
END_STATE();
case 61:
case 60:
ACCEPT_TOKEN(anon_sym_SLASH);
END_STATE();
case 62:
case 61:
ACCEPT_TOKEN(anon_sym_PERCENT);
END_STATE();
case 63:
case 62:
ACCEPT_TOKEN(anon_sym_EQ_EQ);
END_STATE();
case 64:
case 63:
ACCEPT_TOKEN(anon_sym_BANG_EQ);
END_STATE();
case 65:
case 64:
ACCEPT_TOKEN(anon_sym_AMP_AMP);
END_STATE();
case 66:
case 65:
ACCEPT_TOKEN(anon_sym_PIPE_PIPE);
END_STATE();
case 66:
ACCEPT_TOKEN(anon_sym_GT);
END_STATE();
case 67:
ACCEPT_TOKEN(anon_sym_GT);
if (lookahead == '=') ADVANCE(69);
END_STATE();
case 68:
ACCEPT_TOKEN(anon_sym_GT);
ACCEPT_TOKEN(anon_sym_LT);
if (lookahead == '=') ADVANCE(70);
END_STATE();
case 69:
ACCEPT_TOKEN(anon_sym_LT);
if (lookahead == '=') ADVANCE(71);
END_STATE();
case 70:
ACCEPT_TOKEN(anon_sym_GT_EQ);
END_STATE();
case 71:
case 70:
ACCEPT_TOKEN(anon_sym_LT_EQ);
END_STATE();
case 72:
case 71:
ACCEPT_TOKEN(anon_sym_PLUS_EQ);
END_STATE();
case 73:
case 72:
ACCEPT_TOKEN(anon_sym_DASH_EQ);
END_STATE();
case 74:
case 73:
ACCEPT_TOKEN(anon_sym_elseif);
END_STATE();
case 75:
case 74:
ACCEPT_TOKEN(anon_sym_EQ_GT);
END_STATE();
case 76:
case 75:
ACCEPT_TOKEN(anon_sym_asyncfor);
END_STATE();
case 77:
case 76:
ACCEPT_TOKEN(anon_sym_DASH_GT);
END_STATE();
default: