update parser.c

This commit is contained in:
Rokas Puzonas 2023-06-27 15:02:58 +03:00
parent ed01707ed7
commit 65f70c587c
2 changed files with 27 additions and 1 deletions

View File

@ -19,7 +19,7 @@
}, },
"_name_fragment": { "_name_fragment": {
"type": "PATTERN", "type": "PATTERN",
"value": "[A-Za-z0-9]+" "value": "[A-Za-z0-9_]+"
}, },
"name": { "name": {
"type": "CHOICE", "type": "CHOICE",

View File

@ -296,6 +296,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (anon_sym_DQUOTE_character_set_1(lookahead)) SKIP(0) if (anon_sym_DQUOTE_character_set_1(lookahead)) SKIP(0)
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 1: case 1:
@ -305,6 +306,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (anon_sym_DQUOTE_character_set_1(lookahead)) SKIP(1) if (anon_sym_DQUOTE_character_set_1(lookahead)) SKIP(1)
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 2: case 2:
@ -409,6 +411,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == 'a') ADVANCE(28); if (lookahead == 'a') ADVANCE(28);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('b' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('b' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 27: case 27:
@ -416,6 +419,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == 'a') ADVANCE(32); if (lookahead == 'a') ADVANCE(32);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('b' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('b' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 28: case 28:
@ -423,6 +427,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == 'c') ADVANCE(36); if (lookahead == 'c') ADVANCE(36);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 29: case 29:
@ -430,6 +435,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == 'e') ADVANCE(56); if (lookahead == 'e') ADVANCE(56);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 30: case 30:
@ -437,6 +443,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == 'f') ADVANCE(34); if (lookahead == 'f') ADVANCE(34);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 31: case 31:
@ -444,6 +451,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == 'g') ADVANCE(54); if (lookahead == 'g') ADVANCE(54);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 32: case 32:
@ -451,6 +459,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == 'g') ADVANCE(29); if (lookahead == 'g') ADVANCE(29);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 33: case 33:
@ -458,6 +467,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == 'i') ADVANCE(42); if (lookahead == 'i') ADVANCE(42);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 34: case 34:
@ -465,6 +475,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == 'i') ADVANCE(31); if (lookahead == 'i') ADVANCE(31);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 35: case 35:
@ -472,6 +483,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == 'i') ADVANCE(40); if (lookahead == 'i') ADVANCE(40);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 36: case 36:
@ -479,6 +491,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == 'k') ADVANCE(27); if (lookahead == 'k') ADVANCE(27);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 37: case 37:
@ -486,6 +499,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == 'n') ADVANCE(30); if (lookahead == 'n') ADVANCE(30);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 38: case 38:
@ -493,6 +507,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == 'n') ADVANCE(58); if (lookahead == 'n') ADVANCE(58);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 39: case 39:
@ -500,6 +515,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == 'o') ADVANCE(37); if (lookahead == 'o') ADVANCE(37);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 40: case 40:
@ -507,6 +523,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == 'o') ADVANCE(38); if (lookahead == 'o') ADVANCE(38);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 41: case 41:
@ -514,6 +531,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == 'p') ADVANCE(44); if (lookahead == 'p') ADVANCE(44);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 42: case 42:
@ -521,6 +539,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == 's') ADVANCE(43); if (lookahead == 's') ADVANCE(43);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 43: case 43:
@ -528,6 +547,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == 't') ADVANCE(60); if (lookahead == 't') ADVANCE(60);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 44: case 44:
@ -535,12 +555,14 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (lookahead == 't') ADVANCE(35); if (lookahead == 't') ADVANCE(35);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 45: case 45:
ACCEPT_TOKEN(sym__name_fragment); ACCEPT_TOKEN(sym__name_fragment);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 46: case 46:
@ -601,6 +623,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
ACCEPT_TOKEN(anon_sym_config); ACCEPT_TOKEN(anon_sym_config);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 55: case 55:
@ -610,6 +633,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
ACCEPT_TOKEN(anon_sym_package); ACCEPT_TOKEN(anon_sym_package);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 57: case 57:
@ -619,6 +643,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
ACCEPT_TOKEN(anon_sym_option); ACCEPT_TOKEN(anon_sym_option);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 59: case 59:
@ -628,6 +653,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
ACCEPT_TOKEN(anon_sym_list); ACCEPT_TOKEN(anon_sym_list);
if (('0' <= lookahead && lookahead <= '9') || if (('0' <= lookahead && lookahead <= '9') ||
('A' <= lookahead && lookahead <= 'Z') || ('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '_' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(45); ('a' <= lookahead && lookahead <= 'z')) ADVANCE(45);
END_STATE(); END_STATE();
case 61: case 61: