From 01e5436e280ae210d37be3a77af4b322cf76592c Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 2 Oct 2024 00:30:55 +0300 Subject: [PATCH] feat: containers, fix: remove exec --- grammar.js | 20 +- src/grammar.json | 102 +- src/node-types.json | 103 +- src/parser.c | 2125 +++++++++++------ .../docs/getting_started/connections.txt | 136 +- .../docs/getting_started/containers.txt | 32 +- .../docs/getting_started/hello_world.txt | 7 +- test/corpus/docs/getting_started/shapes.txt | 49 +- 8 files changed, 1722 insertions(+), 852 deletions(-) diff --git a/grammar.js b/grammar.js index eabf06f..24fcb69 100644 --- a/grammar.js +++ b/grammar.js @@ -1,13 +1,16 @@ const PREC = { connection: 100, conn_identifier: 90, - identifier: 50, + + block: 20, + label: 10, }; const newline = /\n/; const terminator = choice(newline, ';', '\0'); const opseq = (...x) => optional(seq(...x)) +const opfield = (...x) => optional(field(...x)) const rseq = (...x) => repeat(seq(...x)) const r1seq = (...x) => repeat1(seq(...x)) @@ -30,13 +33,16 @@ module.exports = grammar({ declaration: $ => seq( choice( $.connection_refference, - $.expr, + $._expr, + ), + opseq(":", + opfield("label", $.label), + opfield("block", $.block), ), - repeat(field("label", $.label)), terminator, ), - expr: $ => seq( + _expr: $ => seq( field("identifier", $.identifier), rseq( field("connection", $.connection), @@ -50,11 +56,13 @@ module.exports = grammar({ /-+>/, /--+/, ))), - label: _ => seq(":", /.*/), + + block: $ => prec(PREC.block, seq("{", repeat($.declaration), "}")), + label: $ => prec(PREC.label, repeat1($._ident_base)), connection_refference: $ => seq( "(", - $.expr, + $._expr, ")", field("connection_identifier", $.connection_identifier), optional($._fields), diff --git a/src/grammar.json b/src/grammar.json index 3b33df4..2f3603b 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -29,20 +29,58 @@ }, { "type": "SYMBOL", - "name": "expr" + "name": "_expr" } ] }, { - "type": "REPEAT", - "content": { - "type": "FIELD", - "name": "label", - "content": { - "type": "SYMBOL", - "name": "label" + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "label", + "content": { + "type": "SYMBOL", + "name": "label" + } + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "block", + "content": { + "type": "SYMBOL", + "name": "block" + } + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" } - } + ] }, { "type": "CHOICE", @@ -63,7 +101,7 @@ } ] }, - "expr": { + "_expr": { "type": "SEQ", "members": [ { @@ -128,18 +166,40 @@ } } }, + "block": { + "type": "PREC", + "value": 20, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "declaration" + } + }, + { + "type": "STRING", + "value": "}" + } + ] + } + }, "label": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": ":" - }, - { - "type": "PATTERN", - "value": ".*" + "type": "PREC", + "value": 10, + "content": { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "_ident_base" } - ] + } }, "connection_refference": { "type": "SEQ", @@ -150,7 +210,7 @@ }, { "type": "SYMBOL", - "name": "expr" + "name": "_expr" }, { "type": "STRING", diff --git a/src/node-types.json b/src/node-types.json index 4006f92..e137e7e 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -1,8 +1,33 @@ [ + { + "type": "block", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "declaration", + "named": true + } + ] + } + }, { "type": "connection_refference", "named": true, "fields": { + "connection": { + "multiple": true, + "required": false, + "types": [ + { + "type": "connection", + "named": true + } + ] + }, "connection_identifier": { "multiple": false, "required": true, @@ -22,53 +47,33 @@ "named": true } ] + }, + "identifier": { + "multiple": true, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] } - }, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expr", - "named": true - } - ] } }, { "type": "declaration", "named": true, "fields": { - "label": { - "multiple": true, + "block": { + "multiple": false, "required": false, "types": [ { - "type": "label", + "type": "block", "named": true } ] - } - }, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "connection_refference", - "named": true - }, - { - "type": "expr", - "named": true - } - ] - } - }, - { - "type": "expr", - "named": true, - "fields": { + }, "connection": { "multiple": true, "required": false, @@ -81,14 +86,34 @@ }, "identifier": { "multiple": true, - "required": true, + "required": false, "types": [ { "type": "identifier", "named": true } ] + }, + "label": { + "multiple": false, + "required": false, + "types": [ + { + "type": "label", + "named": true + } + ] } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "connection_refference", + "named": true + } + ] } }, { @@ -166,5 +191,13 @@ { "type": "connection_identifier", "named": true + }, + { + "type": "{", + "named": false + }, + { + "type": "}", + "named": false } ] \ No newline at end of file diff --git a/src/parser.c b/src/parser.c index 3ed4794..6e7afc9 100644 --- a/src/parser.c +++ b/src/parser.c @@ -5,52 +5,56 @@ #endif #define LANGUAGE_VERSION 14 -#define STATE_COUNT 61 +#define STATE_COUNT 118 #define LARGE_STATE_COUNT 2 -#define SYMBOL_COUNT 26 +#define SYMBOL_COUNT 29 #define ALIAS_COUNT 0 -#define TOKEN_COUNT 14 +#define TOKEN_COUNT 15 #define EXTERNAL_TOKEN_COUNT 0 -#define FIELD_COUNT 5 +#define FIELD_COUNT 6 #define MAX_ALIAS_SEQUENCE_LENGTH 5 -#define PRODUCTION_ID_COUNT 13 +#define PRODUCTION_ID_COUNT 17 enum ts_symbol_identifiers { - aux_sym_declaration_token1 = 1, - anon_sym_SEMI = 2, - anon_sym_NULL = 3, - sym_connection = 4, - anon_sym_COLON = 5, - aux_sym_label_token1 = 6, - anon_sym_LPAREN = 7, - anon_sym_RPAREN = 8, - sym_connection_identifier = 9, - anon_sym_DOT = 10, - aux_sym__ident_token1 = 11, - sym__ident_base = 12, - sym_comment = 13, - sym_source_file = 14, - sym_declaration = 15, - sym_expr = 16, - sym_label = 17, - sym_connection_refference = 18, - sym_identifier = 19, - aux_sym__fields = 20, - sym__ident = 21, - aux_sym_source_file_repeat1 = 22, - aux_sym_declaration_repeat1 = 23, - aux_sym_expr_repeat1 = 24, - aux_sym__ident_repeat1 = 25, + anon_sym_COLON = 1, + aux_sym_declaration_token1 = 2, + anon_sym_SEMI = 3, + anon_sym_NULL = 4, + sym_connection = 5, + anon_sym_LBRACE = 6, + anon_sym_RBRACE = 7, + anon_sym_LPAREN = 8, + anon_sym_RPAREN = 9, + sym_connection_identifier = 10, + anon_sym_DOT = 11, + aux_sym__ident_token1 = 12, + sym__ident_base = 13, + sym_comment = 14, + sym_source_file = 15, + sym_declaration = 16, + sym__expr = 17, + sym_block = 18, + sym_label = 19, + sym_connection_refference = 20, + sym_identifier = 21, + aux_sym__fields = 22, + sym__ident = 23, + aux_sym_source_file_repeat1 = 24, + aux_sym__expr_repeat1 = 25, + aux_sym_block_repeat1 = 26, + aux_sym_label_repeat1 = 27, + aux_sym__ident_repeat1 = 28, }; static const char * const ts_symbol_names[] = { [ts_builtin_sym_end] = "end", + [anon_sym_COLON] = ":", [aux_sym_declaration_token1] = "declaration_token1", [anon_sym_SEMI] = ";", [anon_sym_NULL] = "\0", [sym_connection] = "connection", - [anon_sym_COLON] = ":", - [aux_sym_label_token1] = "label_token1", + [anon_sym_LBRACE] = "{", + [anon_sym_RBRACE] = "}", [anon_sym_LPAREN] = "(", [anon_sym_RPAREN] = ")", [sym_connection_identifier] = "connection_identifier", @@ -60,26 +64,29 @@ static const char * const ts_symbol_names[] = { [sym_comment] = "comment", [sym_source_file] = "source_file", [sym_declaration] = "declaration", - [sym_expr] = "expr", + [sym__expr] = "_expr", + [sym_block] = "block", [sym_label] = "label", [sym_connection_refference] = "connection_refference", [sym_identifier] = "identifier", [aux_sym__fields] = "_fields", [sym__ident] = "_ident", [aux_sym_source_file_repeat1] = "source_file_repeat1", - [aux_sym_declaration_repeat1] = "declaration_repeat1", - [aux_sym_expr_repeat1] = "expr_repeat1", + [aux_sym__expr_repeat1] = "_expr_repeat1", + [aux_sym_block_repeat1] = "block_repeat1", + [aux_sym_label_repeat1] = "label_repeat1", [aux_sym__ident_repeat1] = "_ident_repeat1", }; static const TSSymbol ts_symbol_map[] = { [ts_builtin_sym_end] = ts_builtin_sym_end, + [anon_sym_COLON] = anon_sym_COLON, [aux_sym_declaration_token1] = aux_sym_declaration_token1, [anon_sym_SEMI] = anon_sym_SEMI, [anon_sym_NULL] = anon_sym_NULL, [sym_connection] = sym_connection, - [anon_sym_COLON] = anon_sym_COLON, - [aux_sym_label_token1] = aux_sym_label_token1, + [anon_sym_LBRACE] = anon_sym_LBRACE, + [anon_sym_RBRACE] = anon_sym_RBRACE, [anon_sym_LPAREN] = anon_sym_LPAREN, [anon_sym_RPAREN] = anon_sym_RPAREN, [sym_connection_identifier] = sym_connection_identifier, @@ -89,15 +96,17 @@ static const TSSymbol ts_symbol_map[] = { [sym_comment] = sym_comment, [sym_source_file] = sym_source_file, [sym_declaration] = sym_declaration, - [sym_expr] = sym_expr, + [sym__expr] = sym__expr, + [sym_block] = sym_block, [sym_label] = sym_label, [sym_connection_refference] = sym_connection_refference, [sym_identifier] = sym_identifier, [aux_sym__fields] = aux_sym__fields, [sym__ident] = sym__ident, [aux_sym_source_file_repeat1] = aux_sym_source_file_repeat1, - [aux_sym_declaration_repeat1] = aux_sym_declaration_repeat1, - [aux_sym_expr_repeat1] = aux_sym_expr_repeat1, + [aux_sym__expr_repeat1] = aux_sym__expr_repeat1, + [aux_sym_block_repeat1] = aux_sym_block_repeat1, + [aux_sym_label_repeat1] = aux_sym_label_repeat1, [aux_sym__ident_repeat1] = aux_sym__ident_repeat1, }; @@ -106,6 +115,10 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = true, }, + [anon_sym_COLON] = { + .visible = true, + .named = false, + }, [aux_sym_declaration_token1] = { .visible = false, .named = false, @@ -122,12 +135,12 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, - [anon_sym_COLON] = { + [anon_sym_LBRACE] = { .visible = true, .named = false, }, - [aux_sym_label_token1] = { - .visible = false, + [anon_sym_RBRACE] = { + .visible = true, .named = false, }, [anon_sym_LPAREN] = { @@ -166,7 +179,11 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, - [sym_expr] = { + [sym__expr] = { + .visible = false, + .named = true, + }, + [sym_block] = { .visible = true, .named = true, }, @@ -194,11 +211,15 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = false, }, - [aux_sym_declaration_repeat1] = { + [aux_sym__expr_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_block_repeat1] = { .visible = false, .named = false, }, - [aux_sym_expr_repeat1] = { + [aux_sym_label_repeat1] = { .visible = false, .named = false, }, @@ -209,15 +230,17 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { }; enum ts_field_identifiers { - field_connection = 1, - field_connection_identifier = 2, - field_field = 3, - field_identifier = 4, - field_label = 5, + field_block = 1, + field_connection = 2, + field_connection_identifier = 3, + field_field = 4, + field_identifier = 5, + field_label = 6, }; static const char * const ts_field_names[] = { [0] = NULL, + [field_block] = "block", [field_connection] = "connection", [field_connection_identifier] = "connection_identifier", [field_field] = "field", @@ -227,53 +250,77 @@ static const char * const ts_field_names[] = { static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { [1] = {.index = 0, .length = 1}, - [2] = {.index = 1, .length = 1}, - [3] = {.index = 2, .length = 3}, - [4] = {.index = 5, .length = 1}, - [5] = {.index = 6, .length = 1}, - [6] = {.index = 7, .length = 2}, - [7] = {.index = 9, .length = 2}, - [8] = {.index = 11, .length = 4}, - [9] = {.index = 15, .length = 1}, - [10] = {.index = 16, .length = 2}, - [11] = {.index = 18, .length = 1}, - [12] = {.index = 19, .length = 2}, + [2] = {.index = 1, .length = 2}, + [3] = {.index = 3, .length = 3}, + [4] = {.index = 6, .length = 1}, + [5] = {.index = 7, .length = 2}, + [6] = {.index = 9, .length = 4}, + [7] = {.index = 13, .length = 1}, + [8] = {.index = 14, .length = 2}, + [9] = {.index = 16, .length = 3}, + [10] = {.index = 19, .length = 3}, + [11] = {.index = 22, .length = 3}, + [12] = {.index = 25, .length = 1}, + [13] = {.index = 26, .length = 1}, + [14] = {.index = 27, .length = 4}, + [15] = {.index = 31, .length = 4}, + [16] = {.index = 35, .length = 2}, }; static const TSFieldMapEntry ts_field_map_entries[] = { [0] = {field_identifier, 0}, [1] = - {field_label, 0}, - [2] = + {field_connection, 0, .inherited = true}, + {field_identifier, 0, .inherited = true}, + [3] = {field_connection, 1, .inherited = true}, {field_identifier, 0}, {field_identifier, 1, .inherited = true}, - [5] = - {field_field, 1, .inherited = true}, [6] = - {field_label, 1, .inherited = true}, + {field_field, 1, .inherited = true}, [7] = - {field_label, 0, .inherited = true}, - {field_label, 1, .inherited = true}, - [9] = {field_connection, 0}, {field_identifier, 1}, - [11] = + [9] = {field_connection, 0, .inherited = true}, {field_connection, 1, .inherited = true}, {field_identifier, 0, .inherited = true}, {field_identifier, 1, .inherited = true}, - [15] = + [13] = {field_field, 1}, - [16] = + [14] = {field_field, 0, .inherited = true}, {field_field, 1, .inherited = true}, - [18] = + [16] = + {field_connection, 1, .inherited = true}, {field_connection_identifier, 3}, + {field_identifier, 1, .inherited = true}, [19] = + {field_block, 2}, + {field_connection, 0, .inherited = true}, + {field_identifier, 0, .inherited = true}, + [22] = + {field_connection, 0, .inherited = true}, + {field_identifier, 0, .inherited = true}, + {field_label, 2}, + [25] = + {field_block, 2}, + [26] = + {field_label, 2}, + [27] = + {field_connection, 1, .inherited = true}, {field_connection_identifier, 3}, {field_field, 4, .inherited = true}, + {field_identifier, 1, .inherited = true}, + [31] = + {field_block, 3}, + {field_connection, 0, .inherited = true}, + {field_identifier, 0, .inherited = true}, + {field_label, 2}, + [35] = + {field_block, 3}, + {field_label, 2}, }; static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { @@ -294,58 +341,115 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [6] = 6, [7] = 7, [8] = 8, - [9] = 7, - [10] = 5, - [11] = 11, + [9] = 9, + [10] = 10, + [11] = 7, [12] = 12, - [13] = 4, - [14] = 6, - [15] = 15, + [13] = 10, + [14] = 14, + [15] = 9, [16] = 16, - [17] = 17, - [18] = 11, - [19] = 7, - [20] = 20, - [21] = 12, - [22] = 8, + [17] = 8, + [18] = 18, + [19] = 18, + [20] = 12, + [21] = 21, + [22] = 22, [23] = 23, - [24] = 24, + [24] = 16, [25] = 25, [26] = 26, - [27] = 27, - [28] = 5, - [29] = 4, - [30] = 6, + [27] = 14, + [28] = 21, + [29] = 18, + [30] = 30, [31] = 31, [32] = 32, - [33] = 11, - [34] = 7, - [35] = 8, + [33] = 33, + [34] = 34, + [35] = 35, [36] = 36, - [37] = 7, - [38] = 38, + [37] = 36, + [38] = 9, [39] = 12, - [40] = 27, - [41] = 41, + [40] = 8, + [41] = 35, [42] = 42, - [43] = 17, - [44] = 44, - [45] = 26, - [46] = 46, - [47] = 20, - [48] = 44, - [49] = 42, - [50] = 44, - [51] = 51, + [43] = 43, + [44] = 16, + [45] = 45, + [46] = 43, + [47] = 14, + [48] = 21, + [49] = 18, + [50] = 42, + [51] = 18, [52] = 52, - [53] = 31, + [53] = 53, [54] = 54, [55] = 55, [56] = 56, [57] = 57, - [58] = 56, + [58] = 58, [59] = 59, - [60] = 56, + [60] = 60, + [61] = 61, + [62] = 57, + [63] = 30, + [64] = 64, + [65] = 65, + [66] = 66, + [67] = 67, + [68] = 68, + [69] = 69, + [70] = 70, + [71] = 33, + [72] = 72, + [73] = 73, + [74] = 53, + [75] = 75, + [76] = 76, + [77] = 77, + [78] = 78, + [79] = 79, + [80] = 54, + [81] = 23, + [82] = 32, + [83] = 83, + [84] = 75, + [85] = 85, + [86] = 73, + [87] = 65, + [88] = 64, + [89] = 85, + [90] = 55, + [91] = 56, + [92] = 52, + [93] = 59, + [94] = 60, + [95] = 61, + [96] = 96, + [97] = 79, + [98] = 98, + [99] = 72, + [100] = 78, + [101] = 77, + [102] = 76, + [103] = 96, + [104] = 72, + [105] = 70, + [106] = 69, + [107] = 66, + [108] = 68, + [109] = 67, + [110] = 98, + [111] = 34, + [112] = 112, + [113] = 113, + [114] = 112, + [115] = 115, + [116] = 116, + [117] = 112, }; static TSCharacterRange sym__ident_base_character_set_1[] = { @@ -412,16 +516,18 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { case 0: if (eof) ADVANCE(9); ADVANCE_MAP( - 0, 14, + 0, 15, '#', 30, '(', 20, ')', 21, '-', 6, '.', 23, - ':', 17, - ';', 13, + ':', 10, + ';', 14, '<', 5, '[', 8, + '{', 18, + '}', 19, ); if (('\t' <= lookahead && lookahead <= '\r') || lookahead == ' ') SKIP(0); @@ -429,42 +535,44 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { END_STATE(); case 1: ADVANCE_MAP( - 0, 14, - '\n', 10, + 0, 15, + '\n', 11, '#', 30, - '-', 26, + '-', 6, '.', 23, - ':', 17, - ';', 13, + ':', 10, + ';', 14, '<', 5, - '\'', 28, - '_', 28, + '{', 18, ); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(24); + lookahead == ' ') SKIP(1); + if (set_contains(sym__ident_base_character_set_1, 430, lookahead)) ADVANCE(29); END_STATE(); case 2: ADVANCE_MAP( - 0, 14, - '\n', 11, + 0, 15, + '\n', 12, '#', 30, - '-', 6, + '-', 26, '.', 23, - ':', 17, - ';', 13, + ':', 10, + ';', 14, '<', 5, + '\'', 28, + '_', 28, ); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') SKIP(2); + lookahead == ' ') ADVANCE(24); END_STATE(); case 3: ADVANCE_MAP( - 0, 14, - '\n', 12, + 0, 15, + '\n', 13, '#', 30, '.', 23, - ':', 17, - ';', 13, + ':', 10, + ';', 14, '\'', 28, '-', 28, '_', 28, @@ -484,11 +592,11 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { lookahead == ' ') ADVANCE(27); END_STATE(); case 5: - if (lookahead == '-') ADVANCE(16); + if (lookahead == '-') ADVANCE(17); END_STATE(); case 6: - if (lookahead == '-') ADVANCE(16); - if (lookahead == '>') ADVANCE(15); + if (lookahead == '-') ADVANCE(17); + if (lookahead == '>') ADVANCE(16); END_STATE(); case 7: if (lookahead == ']') ADVANCE(22); @@ -501,12 +609,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { ACCEPT_TOKEN(ts_builtin_sym_end); END_STATE(); case 10: - ACCEPT_TOKEN(aux_sym_declaration_token1); - if (lookahead == '\n') ADVANCE(10); - if (lookahead == '-') ADVANCE(26); - if (lookahead == '<') ADVANCE(5); - if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(24); + ACCEPT_TOKEN(anon_sym_COLON); END_STATE(); case 11: ACCEPT_TOKEN(aux_sym_declaration_token1); @@ -517,39 +620,36 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { case 12: ACCEPT_TOKEN(aux_sym_declaration_token1); if (lookahead == '\n') ADVANCE(12); + if (lookahead == '-') ADVANCE(26); + if (lookahead == '<') ADVANCE(5); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(25); + lookahead == ' ') ADVANCE(24); END_STATE(); case 13: - ACCEPT_TOKEN(anon_sym_SEMI); + ACCEPT_TOKEN(aux_sym_declaration_token1); + if (lookahead == '\n') ADVANCE(13); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(25); END_STATE(); case 14: - ACCEPT_TOKEN(anon_sym_NULL); + ACCEPT_TOKEN(anon_sym_SEMI); END_STATE(); case 15: - ACCEPT_TOKEN(sym_connection); + ACCEPT_TOKEN(anon_sym_NULL); END_STATE(); case 16: ACCEPT_TOKEN(sym_connection); - if (lookahead == '-') ADVANCE(16); - if (lookahead == '>') ADVANCE(15); END_STATE(); case 17: - ACCEPT_TOKEN(anon_sym_COLON); + ACCEPT_TOKEN(sym_connection); + if (lookahead == '-') ADVANCE(17); + if (lookahead == '>') ADVANCE(16); END_STATE(); case 18: - ACCEPT_TOKEN(aux_sym_label_token1); - if (lookahead == '#') ADVANCE(19); - if (lookahead == '\t' || - (0x0b <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(18); - if (lookahead != 0 && - (lookahead < '\t' || '\r' < lookahead)) ADVANCE(19); + ACCEPT_TOKEN(anon_sym_LBRACE); END_STATE(); case 19: - ACCEPT_TOKEN(aux_sym_label_token1); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(19); + ACCEPT_TOKEN(anon_sym_RBRACE); END_STATE(); case 20: ACCEPT_TOKEN(anon_sym_LPAREN); @@ -565,7 +665,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { END_STATE(); case 24: ACCEPT_TOKEN(aux_sym__ident_token1); - if (lookahead == '\n') ADVANCE(10); + if (lookahead == '\n') ADVANCE(12); if (lookahead == '-') ADVANCE(26); if (lookahead == '<') ADVANCE(5); if (lookahead == '\'' || @@ -575,7 +675,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { END_STATE(); case 25: ACCEPT_TOKEN(aux_sym__ident_token1); - if (lookahead == '\n') ADVANCE(12); + if (lookahead == '\n') ADVANCE(13); if (lookahead == '\'' || lookahead == '-' || lookahead == '_') ADVANCE(28); @@ -584,8 +684,8 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { END_STATE(); case 26: ACCEPT_TOKEN(aux_sym__ident_token1); - if (lookahead == '-') ADVANCE(16); - if (lookahead == '>') ADVANCE(15); + if (lookahead == '-') ADVANCE(17); + if (lookahead == '>') ADVANCE(16); if (('\t' <= lookahead && lookahead <= '\r') || lookahead == ' ' || lookahead == '\'' || @@ -627,72 +727,131 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [1] = {.lex_state = 0}, [2] = {.lex_state = 0}, [3] = {.lex_state = 0}, - [4] = {.lex_state = 1}, - [5] = {.lex_state = 1}, - [6] = {.lex_state = 1}, - [7] = {.lex_state = 2}, + [4] = {.lex_state = 0}, + [5] = {.lex_state = 0}, + [6] = {.lex_state = 0}, + [7] = {.lex_state = 1}, [8] = {.lex_state = 2}, [9] = {.lex_state = 2}, - [10] = {.lex_state = 3}, + [10] = {.lex_state = 1}, [11] = {.lex_state = 1}, [12] = {.lex_state = 2}, - [13] = {.lex_state = 3}, - [14] = {.lex_state = 3}, - [15] = {.lex_state = 2}, - [16] = {.lex_state = 2}, - [17] = {.lex_state = 2}, - [18] = {.lex_state = 3}, - [19] = {.lex_state = 2}, - [20] = {.lex_state = 2}, - [21] = {.lex_state = 2}, - [22] = {.lex_state = 2}, - [23] = {.lex_state = 2}, - [24] = {.lex_state = 2}, - [25] = {.lex_state = 2}, - [26] = {.lex_state = 2}, - [27] = {.lex_state = 2}, - [28] = {.lex_state = 4}, - [29] = {.lex_state = 4}, - [30] = {.lex_state = 4}, - [31] = {.lex_state = 2}, - [32] = {.lex_state = 2}, - [33] = {.lex_state = 4}, - [34] = {.lex_state = 0}, - [35] = {.lex_state = 0}, - [36] = {.lex_state = 0}, - [37] = {.lex_state = 0}, - [38] = {.lex_state = 2}, - [39] = {.lex_state = 0}, - [40] = {.lex_state = 0}, - [41] = {.lex_state = 0}, - [42] = {.lex_state = 0}, - [43] = {.lex_state = 0}, + [13] = {.lex_state = 1}, + [14] = {.lex_state = 2}, + [15] = {.lex_state = 3}, + [16] = {.lex_state = 1}, + [17] = {.lex_state = 3}, + [18] = {.lex_state = 1}, + [19] = {.lex_state = 1}, + [20] = {.lex_state = 3}, + [21] = {.lex_state = 1}, + [22] = {.lex_state = 1}, + [23] = {.lex_state = 1}, + [24] = {.lex_state = 1}, + [25] = {.lex_state = 1}, + [26] = {.lex_state = 1}, + [27] = {.lex_state = 3}, + [28] = {.lex_state = 1}, + [29] = {.lex_state = 1}, + [30] = {.lex_state = 1}, + [31] = {.lex_state = 1}, + [32] = {.lex_state = 1}, + [33] = {.lex_state = 1}, + [34] = {.lex_state = 1}, + [35] = {.lex_state = 1}, + [36] = {.lex_state = 1}, + [37] = {.lex_state = 1}, + [38] = {.lex_state = 4}, + [39] = {.lex_state = 4}, + [40] = {.lex_state = 4}, + [41] = {.lex_state = 1}, + [42] = {.lex_state = 1}, + [43] = {.lex_state = 1}, [44] = {.lex_state = 0}, [45] = {.lex_state = 0}, - [46] = {.lex_state = 0}, - [47] = {.lex_state = 0}, + [46] = {.lex_state = 1}, + [47] = {.lex_state = 4}, [48] = {.lex_state = 0}, [49] = {.lex_state = 0}, - [50] = {.lex_state = 0}, + [50] = {.lex_state = 1}, [51] = {.lex_state = 0}, [52] = {.lex_state = 0}, [53] = {.lex_state = 0}, - [54] = {.lex_state = 0}, - [55] = {.lex_state = 18}, + [54] = {.lex_state = 1}, + [55] = {.lex_state = 0}, [56] = {.lex_state = 0}, - [57] = {.lex_state = 0}, - [58] = {.lex_state = 0}, + [57] = {.lex_state = 1}, + [58] = {.lex_state = 1}, [59] = {.lex_state = 0}, [60] = {.lex_state = 0}, + [61] = {.lex_state = 0}, + [62] = {.lex_state = 1}, + [63] = {.lex_state = 0}, + [64] = {.lex_state = 0}, + [65] = {.lex_state = 0}, + [66] = {.lex_state = 0}, + [67] = {.lex_state = 0}, + [68] = {.lex_state = 0}, + [69] = {.lex_state = 0}, + [70] = {.lex_state = 0}, + [71] = {.lex_state = 0}, + [72] = {.lex_state = 0}, + [73] = {.lex_state = 0}, + [74] = {.lex_state = 0}, + [75] = {.lex_state = 0}, + [76] = {.lex_state = 0}, + [77] = {.lex_state = 0}, + [78] = {.lex_state = 0}, + [79] = {.lex_state = 0}, + [80] = {.lex_state = 1}, + [81] = {.lex_state = 0}, + [82] = {.lex_state = 0}, + [83] = {.lex_state = 1}, + [84] = {.lex_state = 0}, + [85] = {.lex_state = 0}, + [86] = {.lex_state = 0}, + [87] = {.lex_state = 0}, + [88] = {.lex_state = 0}, + [89] = {.lex_state = 0}, + [90] = {.lex_state = 0}, + [91] = {.lex_state = 0}, + [92] = {.lex_state = 0}, + [93] = {.lex_state = 0}, + [94] = {.lex_state = 0}, + [95] = {.lex_state = 0}, + [96] = {.lex_state = 1}, + [97] = {.lex_state = 0}, + [98] = {.lex_state = 1}, + [99] = {.lex_state = 0}, + [100] = {.lex_state = 0}, + [101] = {.lex_state = 0}, + [102] = {.lex_state = 0}, + [103] = {.lex_state = 1}, + [104] = {.lex_state = 0}, + [105] = {.lex_state = 0}, + [106] = {.lex_state = 0}, + [107] = {.lex_state = 0}, + [108] = {.lex_state = 0}, + [109] = {.lex_state = 0}, + [110] = {.lex_state = 1}, + [111] = {.lex_state = 0}, + [112] = {.lex_state = 0}, + [113] = {.lex_state = 0}, + [114] = {.lex_state = 0}, + [115] = {.lex_state = 0}, + [116] = {.lex_state = 0}, + [117] = {.lex_state = 0}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [0] = { [ts_builtin_sym_end] = ACTIONS(1), + [anon_sym_COLON] = ACTIONS(1), [anon_sym_SEMI] = ACTIONS(1), [anon_sym_NULL] = ACTIONS(1), [sym_connection] = ACTIONS(1), - [anon_sym_COLON] = ACTIONS(1), + [anon_sym_LBRACE] = ACTIONS(1), + [anon_sym_RBRACE] = ACTIONS(1), [anon_sym_LPAREN] = ACTIONS(1), [anon_sym_RPAREN] = ACTIONS(1), [sym_connection_identifier] = ACTIONS(1), @@ -701,13 +860,13 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [sym_comment] = ACTIONS(3), }, [1] = { - [sym_source_file] = STATE(59), - [sym_declaration] = STATE(3), - [sym_expr] = STATE(15), - [sym_connection_refference] = STATE(15), - [sym_identifier] = STATE(20), - [sym__ident] = STATE(9), - [aux_sym_source_file_repeat1] = STATE(3), + [sym_source_file] = STATE(115), + [sym_declaration] = STATE(5), + [sym__expr] = STATE(50), + [sym_connection_refference] = STATE(46), + [sym_identifier] = STATE(30), + [sym__ident] = STATE(18), + [aux_sym_source_file_repeat1] = STATE(5), [ts_builtin_sym_end] = ACTIONS(5), [anon_sym_LPAREN] = ACTIONS(7), [sym__ident_base] = ACTIONS(9), @@ -716,674 +875,1239 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { }; static const uint16_t ts_small_parse_table[] = { - [0] = 8, + [0] = 9, + ACTIONS(3), 1, + sym_comment, ACTIONS(13), 1, - ts_builtin_sym_end, + anon_sym_RBRACE, ACTIONS(15), 1, anon_sym_LPAREN, ACTIONS(18), 1, sym__ident_base, - ACTIONS(21), 1, + STATE(18), 1, + sym__ident, + STATE(30), 1, + sym_identifier, + STATE(42), 1, + sym__expr, + STATE(43), 1, + sym_connection_refference, + STATE(2), 2, + sym_declaration, + aux_sym_block_repeat1, + [29] = 9, + ACTIONS(3), 1, sym_comment, - STATE(9), 1, + ACTIONS(7), 1, + anon_sym_LPAREN, + ACTIONS(9), 1, + sym__ident_base, + ACTIONS(21), 1, + anon_sym_RBRACE, + STATE(18), 1, sym__ident, - STATE(20), 1, + STATE(30), 1, sym_identifier, + STATE(42), 1, + sym__expr, + STATE(43), 1, + sym_connection_refference, STATE(2), 2, sym_declaration, - aux_sym_source_file_repeat1, - STATE(15), 2, - sym_expr, + aux_sym_block_repeat1, + [58] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LPAREN, + ACTIONS(9), 1, + sym__ident_base, + ACTIONS(23), 1, + anon_sym_RBRACE, + STATE(18), 1, + sym__ident, + STATE(30), 1, + sym_identifier, + STATE(42), 1, + sym__expr, + STATE(43), 1, sym_connection_refference, - [27] = 8, + STATE(3), 2, + sym_declaration, + aux_sym_block_repeat1, + [87] = 9, ACTIONS(7), 1, anon_sym_LPAREN, ACTIONS(9), 1, sym__ident_base, - ACTIONS(24), 1, + ACTIONS(25), 1, ts_builtin_sym_end, - ACTIONS(26), 1, + ACTIONS(27), 1, sym_comment, - STATE(9), 1, + STATE(18), 1, sym__ident, - STATE(20), 1, + STATE(30), 1, sym_identifier, - STATE(2), 2, + STATE(46), 1, + sym_connection_refference, + STATE(50), 1, + sym__expr, + STATE(6), 2, sym_declaration, aux_sym_source_file_repeat1, - STATE(15), 2, - sym_expr, + [116] = 9, + ACTIONS(29), 1, + ts_builtin_sym_end, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(34), 1, + sym__ident_base, + ACTIONS(37), 1, + sym_comment, + STATE(18), 1, + sym__ident, + STATE(30), 1, + sym_identifier, + STATE(46), 1, sym_connection_refference, - [54] = 4, - ACTIONS(30), 1, - aux_sym__ident_token1, - ACTIONS(32), 1, + STATE(50), 1, + sym__expr, + STATE(6), 2, + sym_declaration, + aux_sym_source_file_repeat1, + [145] = 8, + ACTIONS(40), 1, + aux_sym_declaration_token1, + ACTIONS(44), 1, + anon_sym_LBRACE, + ACTIONS(46), 1, + sym__ident_base, + ACTIONS(48), 1, + sym_comment, + STATE(22), 1, + aux_sym_label_repeat1, + STATE(41), 1, + sym_label, + STATE(103), 1, + sym_block, + ACTIONS(42), 2, + anon_sym_SEMI, + anon_sym_NULL, + [171] = 4, + ACTIONS(48), 1, sym_comment, - STATE(5), 1, + ACTIONS(52), 1, + aux_sym__ident_token1, + STATE(12), 1, aux_sym__ident_repeat1, - ACTIONS(28), 6, + ACTIONS(50), 6, + anon_sym_COLON, aux_sym_declaration_token1, anon_sym_SEMI, anon_sym_NULL, sym_connection, - anon_sym_COLON, anon_sym_DOT, - [72] = 4, - ACTIONS(32), 1, + [189] = 4, + ACTIONS(48), 1, sym_comment, - ACTIONS(36), 1, + ACTIONS(56), 1, aux_sym__ident_token1, - STATE(5), 1, + STATE(9), 1, aux_sym__ident_repeat1, - ACTIONS(34), 6, + ACTIONS(54), 6, + anon_sym_COLON, aux_sym_declaration_token1, anon_sym_SEMI, anon_sym_NULL, sym_connection, - anon_sym_COLON, anon_sym_DOT, - [90] = 4, - ACTIONS(30), 1, - aux_sym__ident_token1, - ACTIONS(32), 1, + [207] = 9, + ACTIONS(44), 1, + anon_sym_LBRACE, + ACTIONS(46), 1, + sym__ident_base, + ACTIONS(48), 1, sym_comment, - STATE(4), 1, - aux_sym__ident_repeat1, - ACTIONS(39), 6, + ACTIONS(59), 1, aux_sym_declaration_token1, + ACTIONS(61), 1, anon_sym_SEMI, + ACTIONS(63), 1, anon_sym_NULL, - sym_connection, - anon_sym_COLON, - anon_sym_DOT, - [108] = 3, - ACTIONS(32), 1, + STATE(22), 1, + aux_sym_label_repeat1, + STATE(36), 1, + sym_label, + STATE(110), 1, + sym_block, + [235] = 8, + ACTIONS(44), 1, + anon_sym_LBRACE, + ACTIONS(46), 1, + sym__ident_base, + ACTIONS(48), 1, sym_comment, - STATE(12), 1, - aux_sym__fields, - ACTIONS(41), 6, + ACTIONS(65), 1, aux_sym_declaration_token1, + STATE(22), 1, + aux_sym_label_repeat1, + STATE(35), 1, + sym_label, + STATE(96), 1, + sym_block, + ACTIONS(67), 2, anon_sym_SEMI, anon_sym_NULL, - sym_connection, - anon_sym_COLON, - anon_sym_DOT, - [123] = 4, - ACTIONS(32), 1, + [261] = 4, + ACTIONS(48), 1, sym_comment, - ACTIONS(45), 1, - anon_sym_DOT, - STATE(8), 1, - aux_sym__fields, - ACTIONS(43), 5, + ACTIONS(52), 1, + aux_sym__ident_token1, + STATE(9), 1, + aux_sym__ident_repeat1, + ACTIONS(69), 6, + anon_sym_COLON, aux_sym_declaration_token1, anon_sym_SEMI, anon_sym_NULL, sym_connection, - anon_sym_COLON, - [140] = 4, - ACTIONS(32), 1, + anon_sym_DOT, + [279] = 9, + ACTIONS(44), 1, + anon_sym_LBRACE, + ACTIONS(46), 1, + sym__ident_base, + ACTIONS(48), 1, sym_comment, + ACTIONS(71), 1, + aux_sym_declaration_token1, + ACTIONS(73), 1, + anon_sym_SEMI, + ACTIONS(75), 1, + anon_sym_NULL, + STATE(22), 1, + aux_sym_label_repeat1, + STATE(37), 1, + sym_label, + STATE(98), 1, + sym_block, + [307] = 2, ACTIONS(48), 1, - anon_sym_DOT, - STATE(12), 1, - aux_sym__fields, - ACTIONS(41), 5, + sym_comment, + ACTIONS(54), 7, + anon_sym_COLON, aux_sym_declaration_token1, anon_sym_SEMI, anon_sym_NULL, sym_connection, - anon_sym_COLON, - [157] = 4, - ACTIONS(32), 1, + anon_sym_DOT, + aux_sym__ident_token1, + [320] = 4, + ACTIONS(48), 1, sym_comment, - ACTIONS(50), 1, + ACTIONS(77), 1, aux_sym__ident_token1, - STATE(10), 1, + STATE(15), 1, aux_sym__ident_repeat1, - ACTIONS(34), 5, + ACTIONS(54), 5, + anon_sym_COLON, aux_sym_declaration_token1, anon_sym_SEMI, anon_sym_NULL, - anon_sym_COLON, anon_sym_DOT, - [174] = 2, - ACTIONS(32), 1, + [337] = 4, + ACTIONS(48), 1, sym_comment, - ACTIONS(34), 7, + ACTIONS(82), 1, + anon_sym_DOT, + STATE(16), 1, + aux_sym__fields, + ACTIONS(80), 5, + anon_sym_COLON, aux_sym_declaration_token1, anon_sym_SEMI, anon_sym_NULL, sym_connection, + [354] = 4, + ACTIONS(48), 1, + sym_comment, + ACTIONS(85), 1, + aux_sym__ident_token1, + STATE(20), 1, + aux_sym__ident_repeat1, + ACTIONS(50), 5, anon_sym_COLON, + aux_sym_declaration_token1, + anon_sym_SEMI, + anon_sym_NULL, anon_sym_DOT, - aux_sym__ident_token1, - [187] = 4, - ACTIONS(32), 1, - sym_comment, + [371] = 4, ACTIONS(48), 1, + sym_comment, + ACTIONS(89), 1, anon_sym_DOT, - STATE(8), 1, + STATE(21), 1, aux_sym__fields, - ACTIONS(53), 5, + ACTIONS(87), 5, + anon_sym_COLON, aux_sym_declaration_token1, anon_sym_SEMI, anon_sym_NULL, sym_connection, - anon_sym_COLON, - [204] = 4, - ACTIONS(32), 1, + [388] = 3, + ACTIONS(48), 1, sym_comment, - ACTIONS(55), 1, - aux_sym__ident_token1, - STATE(10), 1, - aux_sym__ident_repeat1, - ACTIONS(28), 5, + STATE(21), 1, + aux_sym__fields, + ACTIONS(87), 6, + anon_sym_COLON, aux_sym_declaration_token1, anon_sym_SEMI, anon_sym_NULL, - anon_sym_COLON, + sym_connection, anon_sym_DOT, - [221] = 4, - ACTIONS(32), 1, + [403] = 4, + ACTIONS(48), 1, sym_comment, - ACTIONS(55), 1, + ACTIONS(85), 1, aux_sym__ident_token1, - STATE(13), 1, + STATE(15), 1, aux_sym__ident_repeat1, - ACTIONS(39), 5, + ACTIONS(69), 5, + anon_sym_COLON, aux_sym_declaration_token1, anon_sym_SEMI, anon_sym_NULL, - anon_sym_COLON, anon_sym_DOT, - [238] = 6, - ACTIONS(32), 1, + [420] = 4, + ACTIONS(48), 1, sym_comment, - ACTIONS(57), 1, - aux_sym_declaration_token1, - ACTIONS(61), 1, - anon_sym_COLON, + ACTIONS(89), 1, + anon_sym_DOT, STATE(16), 1, - aux_sym_declaration_repeat1, - STATE(32), 1, - sym_label, - ACTIONS(59), 2, + aux_sym__fields, + ACTIONS(91), 5, + anon_sym_COLON, + aux_sym_declaration_token1, anon_sym_SEMI, anon_sym_NULL, - [258] = 7, - ACTIONS(32), 1, + sym_connection, + [437] = 5, + ACTIONS(48), 1, sym_comment, - ACTIONS(61), 1, - anon_sym_COLON, - ACTIONS(63), 1, + ACTIONS(93), 1, aux_sym_declaration_token1, - ACTIONS(65), 1, + ACTIONS(97), 1, + sym__ident_base, + STATE(26), 1, + aux_sym_label_repeat1, + ACTIONS(95), 3, anon_sym_SEMI, - ACTIONS(67), 1, anon_sym_NULL, - STATE(25), 1, - aux_sym_declaration_repeat1, - STATE(32), 1, - sym_label, - [280] = 4, - ACTIONS(32), 1, + anon_sym_LBRACE, + [455] = 4, + ACTIONS(48), 1, sym_comment, - ACTIONS(71), 1, + ACTIONS(101), 1, sym_connection, - STATE(26), 1, - aux_sym_expr_repeat1, - ACTIONS(69), 4, + STATE(23), 1, + aux_sym__expr_repeat1, + ACTIONS(99), 4, + anon_sym_COLON, aux_sym_declaration_token1, anon_sym_SEMI, anon_sym_NULL, - anon_sym_COLON, - [296] = 2, - ACTIONS(32), 1, + [471] = 5, + ACTIONS(48), 1, sym_comment, - ACTIONS(34), 6, + ACTIONS(104), 1, aux_sym_declaration_token1, + ACTIONS(106), 1, + anon_sym_DOT, + STATE(24), 1, + aux_sym__fields, + ACTIONS(80), 3, + anon_sym_COLON, anon_sym_SEMI, anon_sym_NULL, - anon_sym_COLON, - anon_sym_DOT, - aux_sym__ident_token1, - [308] = 4, - ACTIONS(32), 1, + [489] = 5, + ACTIONS(48), 1, sym_comment, - ACTIONS(73), 1, + ACTIONS(111), 1, aux_sym_declaration_token1, - STATE(21), 1, + ACTIONS(113), 1, + anon_sym_DOT, + STATE(24), 1, aux_sym__fields, - ACTIONS(41), 4, + ACTIONS(109), 3, + anon_sym_COLON, anon_sym_SEMI, anon_sym_NULL, - anon_sym_COLON, - anon_sym_DOT, - [324] = 4, - ACTIONS(32), 1, + [507] = 5, + ACTIONS(48), 1, sym_comment, - ACTIONS(71), 1, - sym_connection, - STATE(17), 1, - aux_sym_expr_repeat1, - ACTIONS(75), 4, + ACTIONS(115), 1, aux_sym_declaration_token1, + ACTIONS(119), 1, + sym__ident_base, + STATE(26), 1, + aux_sym_label_repeat1, + ACTIONS(117), 3, anon_sym_SEMI, anon_sym_NULL, - anon_sym_COLON, - [340] = 5, - ACTIONS(32), 1, + anon_sym_LBRACE, + [525] = 2, + ACTIONS(48), 1, sym_comment, - ACTIONS(77), 1, + ACTIONS(54), 6, + anon_sym_COLON, aux_sym_declaration_token1, - ACTIONS(79), 1, + anon_sym_SEMI, + anon_sym_NULL, anon_sym_DOT, - STATE(22), 1, + aux_sym__ident_token1, + [537] = 5, + ACTIONS(48), 1, + sym_comment, + ACTIONS(113), 1, + anon_sym_DOT, + ACTIONS(122), 1, + aux_sym_declaration_token1, + STATE(24), 1, aux_sym__fields, - ACTIONS(53), 3, + ACTIONS(91), 3, + anon_sym_COLON, anon_sym_SEMI, anon_sym_NULL, - anon_sym_COLON, - [358] = 5, - ACTIONS(32), 1, + [555] = 4, + ACTIONS(48), 1, sym_comment, - ACTIONS(81), 1, + ACTIONS(124), 1, aux_sym_declaration_token1, - ACTIONS(83), 1, - anon_sym_DOT, - STATE(22), 1, + STATE(28), 1, aux_sym__fields, - ACTIONS(43), 3, + ACTIONS(87), 4, + anon_sym_COLON, anon_sym_SEMI, anon_sym_NULL, + anon_sym_DOT, + [571] = 4, + ACTIONS(48), 1, + sym_comment, + ACTIONS(128), 1, + sym_connection, + STATE(33), 1, + aux_sym__expr_repeat1, + ACTIONS(126), 4, anon_sym_COLON, - [376] = 5, - ACTIONS(32), 1, + aux_sym_declaration_token1, + anon_sym_SEMI, + anon_sym_NULL, + [587] = 5, + ACTIONS(48), 1, sym_comment, - ACTIONS(79), 1, + ACTIONS(113), 1, anon_sym_DOT, - ACTIONS(86), 1, + ACTIONS(132), 1, aux_sym_declaration_token1, - STATE(22), 1, + STATE(25), 1, aux_sym__fields, - ACTIONS(88), 3, + ACTIONS(130), 3, + anon_sym_COLON, anon_sym_SEMI, anon_sym_NULL, - anon_sym_COLON, - [394] = 5, - ACTIONS(32), 1, + [605] = 2, + ACTIONS(48), 1, sym_comment, - ACTIONS(79), 1, - anon_sym_DOT, - ACTIONS(90), 1, + ACTIONS(134), 6, + anon_sym_COLON, aux_sym_declaration_token1, + anon_sym_SEMI, + anon_sym_NULL, + sym_connection, + anon_sym_DOT, + [617] = 4, + ACTIONS(48), 1, + sym_comment, + ACTIONS(128), 1, + sym_connection, STATE(23), 1, - aux_sym__fields, - ACTIONS(92), 3, + aux_sym__expr_repeat1, + ACTIONS(136), 4, + anon_sym_COLON, + aux_sym_declaration_token1, anon_sym_SEMI, anon_sym_NULL, + [633] = 2, + ACTIONS(48), 1, + sym_comment, + ACTIONS(138), 5, anon_sym_COLON, - [412] = 6, - ACTIONS(32), 1, + aux_sym_declaration_token1, + anon_sym_SEMI, + anon_sym_NULL, + sym_connection, + [644] = 5, + ACTIONS(44), 1, + anon_sym_LBRACE, + ACTIONS(48), 1, sym_comment, - ACTIONS(94), 1, + ACTIONS(140), 1, aux_sym_declaration_token1, - ACTIONS(98), 1, - anon_sym_COLON, - STATE(25), 1, - aux_sym_declaration_repeat1, - STATE(32), 1, - sym_label, - ACTIONS(96), 2, + STATE(57), 1, + sym_block, + ACTIONS(142), 2, anon_sym_SEMI, anon_sym_NULL, - [432] = 4, - ACTIONS(32), 1, + [661] = 6, + ACTIONS(44), 1, + anon_sym_LBRACE, + ACTIONS(48), 1, sym_comment, - ACTIONS(103), 1, - sym_connection, - STATE(26), 1, - aux_sym_expr_repeat1, - ACTIONS(101), 4, + ACTIONS(144), 1, aux_sym_declaration_token1, + ACTIONS(146), 1, anon_sym_SEMI, + ACTIONS(148), 1, anon_sym_NULL, - anon_sym_COLON, - [448] = 2, - ACTIONS(32), 1, + STATE(80), 1, + sym_block, + [680] = 6, + ACTIONS(44), 1, + anon_sym_LBRACE, + ACTIONS(48), 1, sym_comment, - ACTIONS(106), 6, + ACTIONS(150), 1, aux_sym_declaration_token1, + ACTIONS(152), 1, anon_sym_SEMI, + ACTIONS(154), 1, anon_sym_NULL, - sym_connection, - anon_sym_COLON, - anon_sym_DOT, - [460] = 4, - ACTIONS(32), 1, + STATE(54), 1, + sym_block, + [699] = 4, + ACTIONS(48), 1, sym_comment, - ACTIONS(108), 1, + ACTIONS(156), 1, aux_sym__ident_token1, - STATE(28), 1, + STATE(38), 1, aux_sym__ident_repeat1, - ACTIONS(34), 3, + ACTIONS(54), 3, sym_connection, anon_sym_RPAREN, anon_sym_DOT, - [475] = 4, - ACTIONS(32), 1, + [714] = 4, + ACTIONS(48), 1, sym_comment, - ACTIONS(111), 1, + ACTIONS(159), 1, aux_sym__ident_token1, - STATE(28), 1, + STATE(38), 1, aux_sym__ident_repeat1, - ACTIONS(28), 3, + ACTIONS(69), 3, sym_connection, anon_sym_RPAREN, anon_sym_DOT, - [490] = 4, - ACTIONS(32), 1, + [729] = 4, + ACTIONS(48), 1, sym_comment, - ACTIONS(111), 1, + ACTIONS(159), 1, aux_sym__ident_token1, - STATE(29), 1, + STATE(39), 1, aux_sym__ident_repeat1, - ACTIONS(39), 3, + ACTIONS(50), 3, sym_connection, anon_sym_RPAREN, anon_sym_DOT, - [505] = 2, - ACTIONS(32), 1, + [744] = 5, + ACTIONS(44), 1, + anon_sym_LBRACE, + ACTIONS(48), 1, sym_comment, - ACTIONS(113), 5, + ACTIONS(161), 1, aux_sym_declaration_token1, + STATE(62), 1, + sym_block, + ACTIONS(163), 2, anon_sym_SEMI, anon_sym_NULL, - sym_connection, - anon_sym_COLON, - [516] = 3, - ACTIONS(32), 1, + [761] = 5, + ACTIONS(48), 1, sym_comment, - ACTIONS(115), 1, + ACTIONS(165), 1, + anon_sym_COLON, + ACTIONS(167), 1, aux_sym_declaration_token1, - ACTIONS(117), 3, + ACTIONS(169), 1, anon_sym_SEMI, + ACTIONS(171), 1, anon_sym_NULL, + [777] = 4, + ACTIONS(48), 1, + sym_comment, + ACTIONS(173), 1, anon_sym_COLON, - [528] = 2, - ACTIONS(32), 1, + ACTIONS(175), 1, + aux_sym_declaration_token1, + ACTIONS(177), 2, + anon_sym_SEMI, + anon_sym_NULL, + [791] = 4, + ACTIONS(3), 1, sym_comment, - ACTIONS(34), 4, + ACTIONS(179), 1, + anon_sym_DOT, + STATE(44), 1, + aux_sym__fields, + ACTIONS(104), 2, sym_connection, anon_sym_RPAREN, - anon_sym_DOT, - aux_sym__ident_token1, - [538] = 3, + [805] = 5, ACTIONS(3), 1, sym_comment, - STATE(39), 1, - aux_sym__fields, - ACTIONS(73), 3, + ACTIONS(182), 1, + sym__ident_base, + STATE(49), 1, + sym__ident, + STATE(63), 1, + sym_identifier, + STATE(116), 1, + sym__expr, + [821] = 4, + ACTIONS(48), 1, + sym_comment, + ACTIONS(184), 1, + anon_sym_COLON, + ACTIONS(186), 1, + aux_sym_declaration_token1, + ACTIONS(188), 2, + anon_sym_SEMI, + anon_sym_NULL, + [835] = 2, + ACTIONS(48), 1, + sym_comment, + ACTIONS(54), 4, sym_connection, anon_sym_RPAREN, anon_sym_DOT, - [550] = 4, + aux_sym__ident_token1, + [845] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(119), 1, + ACTIONS(190), 1, anon_sym_DOT, - STATE(35), 1, + STATE(44), 1, aux_sym__fields, - ACTIONS(81), 2, + ACTIONS(122), 2, sym_connection, anon_sym_RPAREN, - [564] = 5, + [859] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(122), 1, - sym__ident_base, - STATE(37), 1, - sym__ident, - STATE(47), 1, - sym_identifier, - STATE(57), 1, - sym_expr, - [580] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(124), 1, + ACTIONS(190), 1, anon_sym_DOT, - STATE(39), 1, + STATE(48), 1, aux_sym__fields, - ACTIONS(73), 2, + ACTIONS(124), 2, sym_connection, anon_sym_RPAREN, - [594] = 3, - ACTIONS(32), 1, + [873] = 5, + ACTIONS(48), 1, sym_comment, - ACTIONS(126), 1, + ACTIONS(192), 1, + anon_sym_COLON, + ACTIONS(194), 1, aux_sym_declaration_token1, - ACTIONS(128), 3, + ACTIONS(196), 1, anon_sym_SEMI, + ACTIONS(198), 1, anon_sym_NULL, - anon_sym_COLON, - [606] = 4, + [889] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(124), 1, - anon_sym_DOT, - STATE(35), 1, + STATE(48), 1, aux_sym__fields, - ACTIONS(77), 2, + ACTIONS(124), 3, sym_connection, anon_sym_RPAREN, - [620] = 2, + anon_sym_DOT, + [901] = 1, + ACTIONS(200), 4, + ts_builtin_sym_end, + anon_sym_LPAREN, + sym__ident_base, + sym_comment, + [908] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(130), 3, + ACTIONS(202), 3, + anon_sym_RBRACE, + anon_sym_LPAREN, + sym__ident_base, + [917] = 4, + ACTIONS(48), 1, + sym_comment, + ACTIONS(204), 1, + aux_sym_declaration_token1, + ACTIONS(206), 1, + anon_sym_SEMI, + ACTIONS(208), 1, + anon_sym_NULL, + [930] = 1, + ACTIONS(210), 4, + ts_builtin_sym_end, + anon_sym_LPAREN, + sym__ident_base, + sym_comment, + [937] = 1, + ACTIONS(212), 4, + ts_builtin_sym_end, + anon_sym_LPAREN, + sym__ident_base, + sym_comment, + [944] = 3, + ACTIONS(48), 1, + sym_comment, + ACTIONS(214), 1, + aux_sym_declaration_token1, + ACTIONS(216), 2, + anon_sym_SEMI, + anon_sym_NULL, + [955] = 3, + ACTIONS(48), 1, + sym_comment, + ACTIONS(218), 1, + aux_sym_declaration_token1, + ACTIONS(220), 2, + anon_sym_SEMI, + anon_sym_NULL, + [966] = 1, + ACTIONS(200), 4, + ts_builtin_sym_end, + anon_sym_LPAREN, + sym__ident_base, + sym_comment, + [973] = 1, + ACTIONS(200), 4, + ts_builtin_sym_end, + anon_sym_LPAREN, + sym__ident_base, + sym_comment, + [980] = 1, + ACTIONS(222), 4, + ts_builtin_sym_end, + anon_sym_LPAREN, + sym__ident_base, + sym_comment, + [987] = 3, + ACTIONS(48), 1, + sym_comment, + ACTIONS(224), 1, + aux_sym_declaration_token1, + ACTIONS(226), 2, + anon_sym_SEMI, + anon_sym_NULL, + [998] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(228), 1, sym_connection, + ACTIONS(230), 1, anon_sym_RPAREN, - anon_sym_DOT, - [629] = 1, - ACTIONS(132), 4, + STATE(71), 1, + aux_sym__expr_repeat1, + [1011] = 1, + ACTIONS(232), 4, + ts_builtin_sym_end, + anon_sym_LPAREN, + sym__ident_base, + sym_comment, + [1018] = 1, + ACTIONS(232), 4, ts_builtin_sym_end, anon_sym_LPAREN, sym__ident_base, sym_comment, - [636] = 4, + [1025] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(122), 1, + ACTIONS(234), 3, + anon_sym_RBRACE, + anon_sym_LPAREN, sym__ident_base, - STATE(37), 1, + [1034] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(234), 3, + anon_sym_RBRACE, + anon_sym_LPAREN, + sym__ident_base, + [1043] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(234), 3, + anon_sym_RBRACE, + anon_sym_LPAREN, + sym__ident_base, + [1052] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(236), 3, + anon_sym_RBRACE, + anon_sym_LPAREN, + sym__ident_base, + [1061] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(182), 1, + sym__ident_base, + STATE(49), 1, sym__ident, - STATE(53), 1, + STATE(111), 1, sym_identifier, - [649] = 4, + [1074] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(134), 1, + ACTIONS(228), 1, sym_connection, - ACTIONS(136), 1, + ACTIONS(238), 1, anon_sym_RPAREN, - STATE(45), 1, - aux_sym_expr_repeat1, - [662] = 4, + STATE(81), 1, + aux_sym__expr_repeat1, + [1087] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(122), 1, + ACTIONS(182), 1, sym__ident_base, - STATE(34), 1, + STATE(51), 1, sym__ident, - STATE(40), 1, + STATE(82), 1, sym_identifier, - [675] = 4, + [1100] = 1, + ACTIONS(202), 4, + ts_builtin_sym_end, + anon_sym_LPAREN, + sym__ident_base, + sym_comment, + [1107] = 1, + ACTIONS(202), 4, + ts_builtin_sym_end, + anon_sym_LPAREN, + sym__ident_base, + sym_comment, + [1114] = 1, + ACTIONS(202), 4, + ts_builtin_sym_end, + anon_sym_LPAREN, + sym__ident_base, + sym_comment, + [1121] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(240), 3, + anon_sym_RBRACE, + anon_sym_LPAREN, + sym__ident_base, + [1130] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(240), 3, + anon_sym_RBRACE, + anon_sym_LPAREN, + sym__ident_base, + [1139] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(240), 3, + anon_sym_RBRACE, + anon_sym_LPAREN, + sym__ident_base, + [1148] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(242), 3, + anon_sym_RBRACE, + anon_sym_LPAREN, + sym__ident_base, + [1157] = 4, + ACTIONS(48), 1, + sym_comment, + ACTIONS(244), 1, + aux_sym_declaration_token1, + ACTIONS(246), 1, + anon_sym_SEMI, + ACTIONS(248), 1, + anon_sym_NULL, + [1170] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(250), 1, + sym_connection, + ACTIONS(253), 1, + anon_sym_RPAREN, + STATE(81), 1, + aux_sym__expr_repeat1, + [1183] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(138), 1, + ACTIONS(255), 3, sym_connection, - ACTIONS(141), 1, anon_sym_RPAREN, - STATE(45), 1, - aux_sym_expr_repeat1, - [688] = 1, - ACTIONS(132), 4, + anon_sym_DOT, + [1192] = 3, + ACTIONS(48), 1, + sym_comment, + ACTIONS(257), 1, + aux_sym_declaration_token1, + ACTIONS(259), 2, + anon_sym_SEMI, + anon_sym_NULL, + [1203] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(202), 3, + anon_sym_RBRACE, + anon_sym_LPAREN, + sym__ident_base, + [1212] = 1, + ACTIONS(232), 4, ts_builtin_sym_end, anon_sym_LPAREN, sym__ident_base, sym_comment, - [695] = 4, + [1219] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(134), 1, - sym_connection, - ACTIONS(143), 1, - anon_sym_RPAREN, - STATE(43), 1, - aux_sym_expr_repeat1, - [708] = 4, + ACTIONS(202), 3, + anon_sym_RBRACE, + anon_sym_LPAREN, + sym__ident_base, + [1228] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(9), 1, + ACTIONS(232), 3, + anon_sym_RBRACE, + anon_sym_LPAREN, + sym__ident_base, + [1237] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(232), 3, + anon_sym_RBRACE, + anon_sym_LPAREN, + sym__ident_base, + [1246] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(232), 3, + anon_sym_RBRACE, + anon_sym_LPAREN, + sym__ident_base, + [1255] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(210), 3, + anon_sym_RBRACE, + anon_sym_LPAREN, + sym__ident_base, + [1264] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(212), 3, + anon_sym_RBRACE, + anon_sym_LPAREN, + sym__ident_base, + [1273] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(200), 3, + anon_sym_RBRACE, + anon_sym_LPAREN, + sym__ident_base, + [1282] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(200), 3, + anon_sym_RBRACE, + anon_sym_LPAREN, + sym__ident_base, + [1291] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(200), 3, + anon_sym_RBRACE, + anon_sym_LPAREN, + sym__ident_base, + [1300] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(222), 3, + anon_sym_RBRACE, + anon_sym_LPAREN, + sym__ident_base, + [1309] = 3, + ACTIONS(48), 1, + sym_comment, + ACTIONS(261), 1, + aux_sym_declaration_token1, + ACTIONS(263), 2, + anon_sym_SEMI, + anon_sym_NULL, + [1320] = 1, + ACTIONS(242), 4, + ts_builtin_sym_end, + anon_sym_LPAREN, sym__ident_base, - STATE(7), 1, + sym_comment, + [1327] = 4, + ACTIONS(48), 1, + sym_comment, + ACTIONS(265), 1, + aux_sym_declaration_token1, + ACTIONS(267), 1, + anon_sym_SEMI, + ACTIONS(269), 1, + anon_sym_NULL, + [1340] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(271), 1, + sym__ident_base, + STATE(29), 1, sym__ident, - STATE(27), 1, + STATE(32), 1, sym_identifier, - [721] = 4, + [1353] = 1, + ACTIONS(240), 4, + ts_builtin_sym_end, + anon_sym_LPAREN, + sym__ident_base, + sym_comment, + [1360] = 1, + ACTIONS(240), 4, + ts_builtin_sym_end, + anon_sym_LPAREN, + sym__ident_base, + sym_comment, + [1367] = 1, + ACTIONS(240), 4, + ts_builtin_sym_end, + anon_sym_LPAREN, + sym__ident_base, + sym_comment, + [1374] = 3, + ACTIONS(48), 1, + sym_comment, + ACTIONS(273), 1, + aux_sym_declaration_token1, + ACTIONS(275), 2, + anon_sym_SEMI, + anon_sym_NULL, + [1385] = 4, ACTIONS(3), 1, sym_comment, ACTIONS(9), 1, sym__ident_base, - STATE(9), 1, + STATE(19), 1, sym__ident, - STATE(31), 1, + STATE(32), 1, sym_identifier, - [734] = 4, + [1398] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(145), 1, + ACTIONS(9), 1, sym__ident_base, - STATE(19), 1, + STATE(18), 1, sym__ident, - STATE(27), 1, + STATE(34), 1, sym_identifier, - [747] = 1, - ACTIONS(147), 4, + [1411] = 1, + ACTIONS(236), 4, + ts_builtin_sym_end, + anon_sym_LPAREN, + sym__ident_base, + sym_comment, + [1418] = 1, + ACTIONS(234), 4, + ts_builtin_sym_end, + anon_sym_LPAREN, + sym__ident_base, + sym_comment, + [1425] = 1, + ACTIONS(234), 4, ts_builtin_sym_end, anon_sym_LPAREN, sym__ident_base, sym_comment, - [754] = 1, - ACTIONS(132), 4, + [1432] = 1, + ACTIONS(234), 4, ts_builtin_sym_end, anon_sym_LPAREN, sym__ident_base, sym_comment, - [761] = 2, + [1439] = 4, + ACTIONS(48), 1, + sym_comment, + ACTIONS(277), 1, + aux_sym_declaration_token1, + ACTIONS(279), 1, + anon_sym_SEMI, + ACTIONS(281), 1, + anon_sym_NULL, + [1452] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(149), 2, + ACTIONS(283), 2, sym_connection, anon_sym_RPAREN, - [769] = 2, + [1460] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(151), 1, - sym_connection_identifier, - [776] = 2, - ACTIONS(32), 1, - sym_comment, - ACTIONS(153), 1, - aux_sym_label_token1, - [783] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(155), 1, + ACTIONS(285), 1, sym__ident_base, - [790] = 2, + [1467] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(157), 1, - anon_sym_RPAREN, - [797] = 2, + ACTIONS(287), 1, + sym_connection_identifier, + [1474] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(159), 1, + ACTIONS(289), 1, sym__ident_base, - [804] = 2, + [1481] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(161), 1, + ACTIONS(291), 1, ts_builtin_sym_end, - [811] = 2, + [1488] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(293), 1, + anon_sym_RPAREN, + [1495] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(163), 1, + ACTIONS(295), 1, sym__ident_base, }; static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(2)] = 0, - [SMALL_STATE(3)] = 27, - [SMALL_STATE(4)] = 54, - [SMALL_STATE(5)] = 72, - [SMALL_STATE(6)] = 90, - [SMALL_STATE(7)] = 108, - [SMALL_STATE(8)] = 123, - [SMALL_STATE(9)] = 140, - [SMALL_STATE(10)] = 157, - [SMALL_STATE(11)] = 174, - [SMALL_STATE(12)] = 187, - [SMALL_STATE(13)] = 204, - [SMALL_STATE(14)] = 221, - [SMALL_STATE(15)] = 238, - [SMALL_STATE(16)] = 258, - [SMALL_STATE(17)] = 280, - [SMALL_STATE(18)] = 296, - [SMALL_STATE(19)] = 308, - [SMALL_STATE(20)] = 324, - [SMALL_STATE(21)] = 340, - [SMALL_STATE(22)] = 358, - [SMALL_STATE(23)] = 376, - [SMALL_STATE(24)] = 394, - [SMALL_STATE(25)] = 412, - [SMALL_STATE(26)] = 432, - [SMALL_STATE(27)] = 448, - [SMALL_STATE(28)] = 460, - [SMALL_STATE(29)] = 475, - [SMALL_STATE(30)] = 490, - [SMALL_STATE(31)] = 505, - [SMALL_STATE(32)] = 516, - [SMALL_STATE(33)] = 528, - [SMALL_STATE(34)] = 538, - [SMALL_STATE(35)] = 550, - [SMALL_STATE(36)] = 564, - [SMALL_STATE(37)] = 580, - [SMALL_STATE(38)] = 594, - [SMALL_STATE(39)] = 606, - [SMALL_STATE(40)] = 620, - [SMALL_STATE(41)] = 629, - [SMALL_STATE(42)] = 636, - [SMALL_STATE(43)] = 649, - [SMALL_STATE(44)] = 662, - [SMALL_STATE(45)] = 675, - [SMALL_STATE(46)] = 688, - [SMALL_STATE(47)] = 695, - [SMALL_STATE(48)] = 708, - [SMALL_STATE(49)] = 721, - [SMALL_STATE(50)] = 734, - [SMALL_STATE(51)] = 747, - [SMALL_STATE(52)] = 754, - [SMALL_STATE(53)] = 761, - [SMALL_STATE(54)] = 769, - [SMALL_STATE(55)] = 776, - [SMALL_STATE(56)] = 783, - [SMALL_STATE(57)] = 790, - [SMALL_STATE(58)] = 797, - [SMALL_STATE(59)] = 804, - [SMALL_STATE(60)] = 811, + [SMALL_STATE(3)] = 29, + [SMALL_STATE(4)] = 58, + [SMALL_STATE(5)] = 87, + [SMALL_STATE(6)] = 116, + [SMALL_STATE(7)] = 145, + [SMALL_STATE(8)] = 171, + [SMALL_STATE(9)] = 189, + [SMALL_STATE(10)] = 207, + [SMALL_STATE(11)] = 235, + [SMALL_STATE(12)] = 261, + [SMALL_STATE(13)] = 279, + [SMALL_STATE(14)] = 307, + [SMALL_STATE(15)] = 320, + [SMALL_STATE(16)] = 337, + [SMALL_STATE(17)] = 354, + [SMALL_STATE(18)] = 371, + [SMALL_STATE(19)] = 388, + [SMALL_STATE(20)] = 403, + [SMALL_STATE(21)] = 420, + [SMALL_STATE(22)] = 437, + [SMALL_STATE(23)] = 455, + [SMALL_STATE(24)] = 471, + [SMALL_STATE(25)] = 489, + [SMALL_STATE(26)] = 507, + [SMALL_STATE(27)] = 525, + [SMALL_STATE(28)] = 537, + [SMALL_STATE(29)] = 555, + [SMALL_STATE(30)] = 571, + [SMALL_STATE(31)] = 587, + [SMALL_STATE(32)] = 605, + [SMALL_STATE(33)] = 617, + [SMALL_STATE(34)] = 633, + [SMALL_STATE(35)] = 644, + [SMALL_STATE(36)] = 661, + [SMALL_STATE(37)] = 680, + [SMALL_STATE(38)] = 699, + [SMALL_STATE(39)] = 714, + [SMALL_STATE(40)] = 729, + [SMALL_STATE(41)] = 744, + [SMALL_STATE(42)] = 761, + [SMALL_STATE(43)] = 777, + [SMALL_STATE(44)] = 791, + [SMALL_STATE(45)] = 805, + [SMALL_STATE(46)] = 821, + [SMALL_STATE(47)] = 835, + [SMALL_STATE(48)] = 845, + [SMALL_STATE(49)] = 859, + [SMALL_STATE(50)] = 873, + [SMALL_STATE(51)] = 889, + [SMALL_STATE(52)] = 901, + [SMALL_STATE(53)] = 908, + [SMALL_STATE(54)] = 917, + [SMALL_STATE(55)] = 930, + [SMALL_STATE(56)] = 937, + [SMALL_STATE(57)] = 944, + [SMALL_STATE(58)] = 955, + [SMALL_STATE(59)] = 966, + [SMALL_STATE(60)] = 973, + [SMALL_STATE(61)] = 980, + [SMALL_STATE(62)] = 987, + [SMALL_STATE(63)] = 998, + [SMALL_STATE(64)] = 1011, + [SMALL_STATE(65)] = 1018, + [SMALL_STATE(66)] = 1025, + [SMALL_STATE(67)] = 1034, + [SMALL_STATE(68)] = 1043, + [SMALL_STATE(69)] = 1052, + [SMALL_STATE(70)] = 1061, + [SMALL_STATE(71)] = 1074, + [SMALL_STATE(72)] = 1087, + [SMALL_STATE(73)] = 1100, + [SMALL_STATE(74)] = 1107, + [SMALL_STATE(75)] = 1114, + [SMALL_STATE(76)] = 1121, + [SMALL_STATE(77)] = 1130, + [SMALL_STATE(78)] = 1139, + [SMALL_STATE(79)] = 1148, + [SMALL_STATE(80)] = 1157, + [SMALL_STATE(81)] = 1170, + [SMALL_STATE(82)] = 1183, + [SMALL_STATE(83)] = 1192, + [SMALL_STATE(84)] = 1203, + [SMALL_STATE(85)] = 1212, + [SMALL_STATE(86)] = 1219, + [SMALL_STATE(87)] = 1228, + [SMALL_STATE(88)] = 1237, + [SMALL_STATE(89)] = 1246, + [SMALL_STATE(90)] = 1255, + [SMALL_STATE(91)] = 1264, + [SMALL_STATE(92)] = 1273, + [SMALL_STATE(93)] = 1282, + [SMALL_STATE(94)] = 1291, + [SMALL_STATE(95)] = 1300, + [SMALL_STATE(96)] = 1309, + [SMALL_STATE(97)] = 1320, + [SMALL_STATE(98)] = 1327, + [SMALL_STATE(99)] = 1340, + [SMALL_STATE(100)] = 1353, + [SMALL_STATE(101)] = 1360, + [SMALL_STATE(102)] = 1367, + [SMALL_STATE(103)] = 1374, + [SMALL_STATE(104)] = 1385, + [SMALL_STATE(105)] = 1398, + [SMALL_STATE(106)] = 1411, + [SMALL_STATE(107)] = 1418, + [SMALL_STATE(108)] = 1425, + [SMALL_STATE(109)] = 1432, + [SMALL_STATE(110)] = 1439, + [SMALL_STATE(111)] = 1452, + [SMALL_STATE(112)] = 1460, + [SMALL_STATE(113)] = 1467, + [SMALL_STATE(114)] = 1474, + [SMALL_STATE(115)] = 1481, + [SMALL_STATE(116)] = 1488, + [SMALL_STATE(117)] = 1495, }; static const TSParseActionEntry ts_parse_actions[] = { @@ -1391,79 +2115,144 @@ static const TSParseActionEntry ts_parse_actions[] = { [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT_EXTRA(), [5] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 0, 0, 0), - [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), - [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), - [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [13] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), - [15] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(36), - [18] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(6), - [21] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(2), - [24] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0), - [26] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), - [28] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ident, 2, 0, 0), - [30] = {.entry = {.count = 1, .reusable = false}}, SHIFT(56), - [32] = {.entry = {.count = 1, .reusable = false}}, SHIFT_EXTRA(), - [34] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__ident_repeat1, 2, 0, 0), - [36] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__ident_repeat1, 2, 0, 0), SHIFT_REPEAT(56), - [39] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ident, 1, 0, 0), - [41] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_identifier, 1, 0, 0), - [43] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__fields, 2, 0, 10), - [45] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__fields, 2, 0, 10), SHIFT_REPEAT(48), - [48] = {.entry = {.count = 1, .reusable = false}}, SHIFT(48), - [50] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__ident_repeat1, 2, 0, 0), SHIFT_REPEAT(60), - [53] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_identifier, 2, 0, 4), - [55] = {.entry = {.count = 1, .reusable = false}}, SHIFT(60), - [57] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), - [59] = {.entry = {.count = 1, .reusable = false}}, SHIFT(51), - [61] = {.entry = {.count = 1, .reusable = false}}, SHIFT(55), - [63] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), - [65] = {.entry = {.count = 1, .reusable = false}}, SHIFT(52), - [67] = {.entry = {.count = 1, .reusable = false}}, SHIFT(46), - [69] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expr, 2, 0, 3), - [71] = {.entry = {.count = 1, .reusable = false}}, SHIFT(49), - [73] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_identifier, 1, 0, 0), - [75] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expr, 1, 0, 1), - [77] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_identifier, 2, 0, 4), - [79] = {.entry = {.count = 1, .reusable = false}}, SHIFT(50), - [81] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__fields, 2, 0, 10), - [83] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__fields, 2, 0, 10), SHIFT_REPEAT(50), - [86] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_connection_refference, 5, 0, 12), - [88] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_connection_refference, 5, 0, 12), - [90] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_connection_refference, 4, 0, 11), - [92] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_connection_refference, 4, 0, 11), - [94] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_declaration_repeat1, 2, 0, 6), - [96] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_declaration_repeat1, 2, 0, 6), - [98] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_declaration_repeat1, 2, 0, 6), SHIFT_REPEAT(55), - [101] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_expr_repeat1, 2, 0, 8), - [103] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_expr_repeat1, 2, 0, 8), SHIFT_REPEAT(49), - [106] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__fields, 2, 0, 9), - [108] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__ident_repeat1, 2, 0, 0), SHIFT_REPEAT(58), - [111] = {.entry = {.count = 1, .reusable = false}}, SHIFT(58), - [113] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_expr_repeat1, 2, 0, 7), - [115] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_declaration_repeat1, 1, 0, 2), - [117] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_declaration_repeat1, 1, 0, 2), - [119] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__fields, 2, 0, 10), SHIFT_REPEAT(44), - [122] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), - [124] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), - [126] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_label, 2, 0, 0), - [128] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_label, 2, 0, 0), - [130] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__fields, 2, 0, 9), - [132] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 3, 0, 5), - [134] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), - [136] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expr, 2, 0, 3), - [138] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_expr_repeat1, 2, 0, 8), SHIFT_REPEAT(42), - [141] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_expr_repeat1, 2, 0, 8), - [143] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expr, 1, 0, 1), - [145] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), - [147] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 2, 0, 0), - [149] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_expr_repeat1, 2, 0, 7), - [151] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), - [153] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), - [155] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), - [157] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), - [159] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), - [161] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [163] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), + [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), + [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), + [13] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), + [15] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(45), + [18] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(8), + [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), + [23] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), + [25] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0), + [27] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), + [29] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), + [31] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(45), + [34] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(8), + [37] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(6), + [40] = {.entry = {.count = 1, .reusable = true}}, SHIFT(79), + [42] = {.entry = {.count = 1, .reusable = false}}, SHIFT(79), + [44] = {.entry = {.count = 1, .reusable = false}}, SHIFT(4), + [46] = {.entry = {.count = 1, .reusable = false}}, SHIFT(22), + [48] = {.entry = {.count = 1, .reusable = false}}, SHIFT_EXTRA(), + [50] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ident, 1, 0, 0), + [52] = {.entry = {.count = 1, .reusable = false}}, SHIFT(114), + [54] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__ident_repeat1, 2, 0, 0), + [56] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__ident_repeat1, 2, 0, 0), SHIFT_REPEAT(114), + [59] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), + [61] = {.entry = {.count = 1, .reusable = false}}, SHIFT(77), + [63] = {.entry = {.count = 1, .reusable = false}}, SHIFT(78), + [65] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), + [67] = {.entry = {.count = 1, .reusable = false}}, SHIFT(97), + [69] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ident, 2, 0, 0), + [71] = {.entry = {.count = 1, .reusable = true}}, SHIFT(102), + [73] = {.entry = {.count = 1, .reusable = false}}, SHIFT(101), + [75] = {.entry = {.count = 1, .reusable = false}}, SHIFT(100), + [77] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__ident_repeat1, 2, 0, 0), SHIFT_REPEAT(117), + [80] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__fields, 2, 0, 8), + [82] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__fields, 2, 0, 8), SHIFT_REPEAT(104), + [85] = {.entry = {.count = 1, .reusable = false}}, SHIFT(117), + [87] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_identifier, 1, 0, 0), + [89] = {.entry = {.count = 1, .reusable = false}}, SHIFT(104), + [91] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_identifier, 2, 0, 4), + [93] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_label, 1, 0, 0), + [95] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_label, 1, 0, 0), + [97] = {.entry = {.count = 1, .reusable = false}}, SHIFT(26), + [99] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__expr_repeat1, 2, 0, 6), + [101] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__expr_repeat1, 2, 0, 6), SHIFT_REPEAT(105), + [104] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__fields, 2, 0, 8), + [106] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__fields, 2, 0, 8), SHIFT_REPEAT(99), + [109] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_connection_refference, 5, 0, 14), + [111] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_connection_refference, 5, 0, 14), + [113] = {.entry = {.count = 1, .reusable = false}}, SHIFT(99), + [115] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_label_repeat1, 2, 0, 0), + [117] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_label_repeat1, 2, 0, 0), + [119] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_label_repeat1, 2, 0, 0), SHIFT_REPEAT(26), + [122] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_identifier, 2, 0, 4), + [124] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_identifier, 1, 0, 0), + [126] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr, 1, 0, 1), + [128] = {.entry = {.count = 1, .reusable = false}}, SHIFT(105), + [130] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_connection_refference, 4, 0, 9), + [132] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_connection_refference, 4, 0, 9), + [134] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__fields, 2, 0, 7), + [136] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr, 2, 0, 3), + [138] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__expr_repeat1, 2, 0, 5), + [140] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), + [142] = {.entry = {.count = 1, .reusable = false}}, SHIFT(56), + [144] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), + [146] = {.entry = {.count = 1, .reusable = false}}, SHIFT(88), + [148] = {.entry = {.count = 1, .reusable = false}}, SHIFT(89), + [150] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), + [152] = {.entry = {.count = 1, .reusable = false}}, SHIFT(64), + [154] = {.entry = {.count = 1, .reusable = false}}, SHIFT(85), + [156] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__ident_repeat1, 2, 0, 0), SHIFT_REPEAT(112), + [159] = {.entry = {.count = 1, .reusable = false}}, SHIFT(112), + [161] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), + [163] = {.entry = {.count = 1, .reusable = false}}, SHIFT(91), + [165] = {.entry = {.count = 1, .reusable = false}}, SHIFT(10), + [167] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), + [169] = {.entry = {.count = 1, .reusable = false}}, SHIFT(67), + [171] = {.entry = {.count = 1, .reusable = false}}, SHIFT(68), + [173] = {.entry = {.count = 1, .reusable = false}}, SHIFT(7), + [175] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), + [177] = {.entry = {.count = 1, .reusable = false}}, SHIFT(69), + [179] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__fields, 2, 0, 8), SHIFT_REPEAT(72), + [182] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), + [184] = {.entry = {.count = 1, .reusable = false}}, SHIFT(11), + [186] = {.entry = {.count = 1, .reusable = true}}, SHIFT(106), + [188] = {.entry = {.count = 1, .reusable = false}}, SHIFT(106), + [190] = {.entry = {.count = 1, .reusable = true}}, SHIFT(72), + [192] = {.entry = {.count = 1, .reusable = false}}, SHIFT(13), + [194] = {.entry = {.count = 1, .reusable = true}}, SHIFT(107), + [196] = {.entry = {.count = 1, .reusable = false}}, SHIFT(109), + [198] = {.entry = {.count = 1, .reusable = false}}, SHIFT(108), + [200] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 5, 0, 15), + [202] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 4, 0, 10), + [204] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), + [206] = {.entry = {.count = 1, .reusable = false}}, SHIFT(59), + [208] = {.entry = {.count = 1, .reusable = false}}, SHIFT(60), + [210] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 4, 0, 12), + [212] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 4, 0, 13), + [214] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), + [216] = {.entry = {.count = 1, .reusable = false}}, SHIFT(61), + [218] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block, 3, 0, 0), + [220] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_block, 3, 0, 0), + [222] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 5, 0, 16), + [224] = {.entry = {.count = 1, .reusable = true}}, SHIFT(95), + [226] = {.entry = {.count = 1, .reusable = false}}, SHIFT(95), + [228] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), + [230] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr, 1, 0, 1), + [232] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 4, 0, 11), + [234] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 2, 0, 2), + [236] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 2, 0, 0), + [238] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr, 2, 0, 3), + [240] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 3, 0, 2), + [242] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 3, 0, 0), + [244] = {.entry = {.count = 1, .reusable = true}}, SHIFT(92), + [246] = {.entry = {.count = 1, .reusable = false}}, SHIFT(93), + [248] = {.entry = {.count = 1, .reusable = false}}, SHIFT(94), + [250] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__expr_repeat1, 2, 0, 6), SHIFT_REPEAT(70), + [253] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__expr_repeat1, 2, 0, 6), + [255] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__fields, 2, 0, 7), + [257] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block, 2, 0, 0), + [259] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_block, 2, 0, 0), + [261] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), + [263] = {.entry = {.count = 1, .reusable = false}}, SHIFT(55), + [265] = {.entry = {.count = 1, .reusable = true}}, SHIFT(75), + [267] = {.entry = {.count = 1, .reusable = false}}, SHIFT(74), + [269] = {.entry = {.count = 1, .reusable = false}}, SHIFT(73), + [271] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), + [273] = {.entry = {.count = 1, .reusable = true}}, SHIFT(90), + [275] = {.entry = {.count = 1, .reusable = false}}, SHIFT(90), + [277] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), + [279] = {.entry = {.count = 1, .reusable = false}}, SHIFT(53), + [281] = {.entry = {.count = 1, .reusable = false}}, SHIFT(86), + [283] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__expr_repeat1, 2, 0, 5), + [285] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), + [287] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [289] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), + [291] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [293] = {.entry = {.count = 1, .reusable = true}}, SHIFT(113), + [295] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), }; #ifdef __cplusplus diff --git a/test/corpus/docs/getting_started/connections.txt b/test/corpus/docs/getting_started/connections.txt index 925ff2c..f791329 100644 --- a/test/corpus/docs/getting_started/connections.txt +++ b/test/corpus/docs/getting_started/connections.txt @@ -13,25 +13,21 @@ Read Replica 1 -- Read Replica 2 (source_file (declaration - (expr - (identifier) - (connection) - (identifier))) - (declaration - (expr - (identifier) - (connection) - (identifier))) - (declaration - (expr - (identifier) - (connection) - (identifier))) - (declaration - (expr - (identifier) - (connection) - (identifier)))) + (identifier) + (connection) + (identifier)) + (declaration + (identifier) + (connection) + (identifier)) + (declaration + (identifier) + (connection) + (identifier)) + (declaration + (identifier) + (connection) + (identifier))) ====================||| Connection labels @@ -43,10 +39,9 @@ Read Replica 1 -- Read Replica 2: Kept in sync (source_file (declaration - (expr - (identifier) - (connection) - (identifier)) + (identifier) + (connection) + (identifier) (label))) ==============||| @@ -66,25 +61,21 @@ be -> fe (source_file (declaration - (expr - (identifier)) + (identifier) (label)) (declaration - (expr - (identifier)) + (identifier) (label)) (comment) (declaration - (expr - (identifier) - (connection) - (identifier))) + (identifier) + (connection) + (identifier)) (comment) (declaration - (expr - (identifier) - (connection) - (identifier)))) + (identifier) + (connection) + (identifier))) ==============||| Example @@ -102,25 +93,21 @@ super long shape id here -> super long shape id even longer here (source_file (declaration - (expr (identifier) (connection) - (identifier))) + (identifier)) (declaration - (expr (identifier) (connection) - (identifier))) + (identifier)) (declaration - (expr (identifier) (connection) - (identifier))) + (identifier)) (declaration - (expr (identifier) (connection) - (identifier)))) + (identifier))) ==============||| Repeated Connections @@ -134,21 +121,18 @@ Database -> S3: backup (source_file (declaration - (expr - (identifier) - (connection) - (identifier)) + (identifier) + (connection) + (identifier) (label)) (declaration - (expr - (identifier) - (connection) - (identifier))) + (identifier) + (connection) + (identifier)) (declaration - (expr - (identifier) - (connection) - (identifier)) + (identifier) + (connection) + (identifier) (label))) ==============||| @@ -163,12 +147,11 @@ High Mem Instance -> EC2 <- High CPU Instance: Hosted By (source_file (comment) (declaration - (expr - (identifier) - (connection) - (identifier) - (connection) - (identifier)) + (identifier) + (connection) + (identifier) + (connection) + (identifier) (label))) ====================||| @@ -182,19 +165,17 @@ Stage Four -> Stage One: repeat (source_file (declaration - (expr - (identifier) - (connection) - (identifier) - (connection) - (identifier) - (connection) - (identifier))) - (declaration - (expr - (identifier) - (connection) - (identifier)) + (identifier) + (connection) + (identifier) + (connection) + (identifier) + (connection) + (identifier)) + (declaration + (identifier) + (connection) + (identifier) (label))) ====================||| @@ -208,10 +189,9 @@ Referencing connections (source_file (declaration (connection_refference - (expr - identifier: (identifier) - connection: (connection) - identifier: (identifier)) + identifier: (identifier) + connection: (connection) + identifier: (identifier) connection_identifier: (connection_identifier) field: (identifier) field: (identifier)) diff --git a/test/corpus/docs/getting_started/containers.txt b/test/corpus/docs/getting_started/containers.txt index c134842..a25a824 100644 --- a/test/corpus/docs/getting_started/containers.txt +++ b/test/corpus/docs/getting_started/containers.txt @@ -8,12 +8,28 @@ apartment.Bedroom.Bathroom -> office.Spare Room.Bathroom: Portal (source_file (declaration - (expr - identifier: (identifier - field: (identifier) - field: (identifier)) - connection: (connection) - identifier: (identifier - field: (identifier) - field: (identifier))) + identifier: (identifier + field: (identifier) + field: (identifier)) + connection: (connection) + identifier: (identifier + field: (identifier) + field: (identifier)) label: (label))) + +====================||| +Base Container Block +====================||| + +gcloud: Google Cloud { + # Block +} + +---||| + +(source_file + (declaration + identifier: (identifier) + label: (label) + block: (block + (comment)))) diff --git a/test/corpus/docs/getting_started/hello_world.txt b/test/corpus/docs/getting_started/hello_world.txt index c2599a0..8474aa4 100644 --- a/test/corpus/docs/getting_started/hello_world.txt +++ b/test/corpus/docs/getting_started/hello_world.txt @@ -8,8 +8,7 @@ x -> y: hello world (source_file (declaration - (expr - (identifier) - (connection) - (identifier)) + (identifier) + (connection) + (identifier) (label))) diff --git a/test/corpus/docs/getting_started/shapes.txt b/test/corpus/docs/getting_started/shapes.txt index 6debc48..9ff575b 100644 --- a/test/corpus/docs/getting_started/shapes.txt +++ b/test/corpus/docs/getting_started/shapes.txt @@ -14,22 +14,17 @@ a-shape (source_file (declaration - (expr - (identifier))) + (identifier)) (declaration - (expr - (identifier))) + (identifier)) (declaration - (expr - (identifier))) + (identifier)) (declaration - (expr - (identifier))) + (identifier)) (comment) (comment) (declaration - (expr - (identifier)))) + (identifier))) ================== Multiple Shapes @@ -41,11 +36,9 @@ SQLite; Cassandra (source_file (declaration - (expr - (identifier))) + (identifier)) (declaration - (expr - (identifier)))) + (identifier))) ================== Shape and Label @@ -57,8 +50,7 @@ pg: PostgreSQL (source_file (declaration - (expr - (identifier)) + (identifier) (label))) ================== @@ -72,13 +64,11 @@ Cloud.shape: cloud (source_file (declaration - (expr - identifier: (identifier)) + identifier: (identifier) label: (label)) (declaration - (expr - identifier: (identifier - field: (identifier))) + identifier: (identifier + field: (identifier)) label: (label))) ================== @@ -95,21 +85,16 @@ Cassandra (source_file (declaration - (expr - identifier: (identifier)) + identifier: (identifier) label: (label)) (declaration - (expr - identifier: (identifier)) + identifier: (identifier) label: (label)) (declaration - (expr - identifier: (identifier - field: (identifier))) + identifier: (identifier + field: (identifier)) label: (label)) (declaration - (expr - identifier: (identifier))) + identifier: (identifier)) (declaration - (expr - identifier: (identifier)))) + identifier: (identifier)))