aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/grammar.json82
-rw-r--r--src/node-types.json2
-rw-r--r--src/parser.c795
3 files changed, 420 insertions, 459 deletions
diff --git a/src/grammar.json b/src/grammar.json
index 5132fed..35347d4 100644
--- a/src/grammar.json
+++ b/src/grammar.json
@@ -32,28 +32,33 @@
"type": "CHOICE",
"members": [
{
- "type": "FIELD",
- "name": "name",
- "content": {
- "type": "SYMBOL",
- "name": "ident"
- }
- },
- {
- "type": "BLANK"
- }
- ]
- },
- {
- "type": "CHOICE",
- "members": [
- {
- "type": "FIELD",
- "name": "attrs",
- "content": {
- "type": "SYMBOL",
- "name": "attr_list"
- }
+ "type": "SEQ",
+ "members": [
+ {
+ "type": "FIELD",
+ "name": "name",
+ "content": {
+ "type": "SYMBOL",
+ "name": "ident"
+ }
+ },
+ {
+ "type": "CHOICE",
+ "members": [
+ {
+ "type": "FIELD",
+ "name": "attrs",
+ "content": {
+ "type": "SYMBOL",
+ "name": "attr_list"
+ }
+ },
+ {
+ "type": "BLANK"
+ }
+ ]
+ }
+ ]
},
{
"type": "BLANK"
@@ -194,16 +199,29 @@
}
},
{
- "type": "STRING",
- "value": "="
- },
- {
- "type": "FIELD",
- "name": "value",
- "content": {
- "type": "SYMBOL",
- "name": "string"
- }
+ "type": "CHOICE",
+ "members": [
+ {
+ "type": "SEQ",
+ "members": [
+ {
+ "type": "STRING",
+ "value": "="
+ },
+ {
+ "type": "FIELD",
+ "name": "value",
+ "content": {
+ "type": "SYMBOL",
+ "name": "string"
+ }
+ }
+ ]
+ },
+ {
+ "type": "BLANK"
+ }
+ ]
}
]
},
diff --git a/src/node-types.json b/src/node-types.json
index d255c74..9ee8b4b 100644
--- a/src/node-types.json
+++ b/src/node-types.json
@@ -15,7 +15,7 @@
},
"value": {
"multiple": false,
- "required": true,
+ "required": false,
"types": [
{
"type": "string",
diff --git a/src/parser.c b/src/parser.c
index b86a440..152fce0 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -5,7 +5,7 @@
#endif
#define LANGUAGE_VERSION 14
-#define STATE_COUNT 56
+#define STATE_COUNT 52
#define LARGE_STATE_COUNT 2
#define SYMBOL_COUNT 26
#define ALIAS_COUNT 0
@@ -225,40 +225,39 @@ 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 = 2},
- [3] = {.index = 3, .length = 1},
+ [2] = {.index = 1, .length = 1},
+ [3] = {.index = 2, .length = 2},
[4] = {.index = 4, .length = 2},
- [5] = {.index = 6, .length = 2},
- [6] = {.index = 8, .length = 3},
- [7] = {.index = 11, .length = 2},
- [8] = {.index = 13, .length = 3},
+ [5] = {.index = 6, .length = 1},
+ [6] = {.index = 7, .length = 3},
+ [7] = {.index = 10, .length = 3},
+ [8] = {.index = 13, .length = 2},
};
static const TSFieldMapEntry ts_field_map_entries[] = {
[0] =
{field_body, 1},
[1] =
+ {field_name, 0},
+ [2] =
{field_body, 1},
{field_name, 0},
- [3] =
- {field_name, 1},
[4] =
{field_body, 2},
{field_name, 1},
[6] =
- {field_attrs, 1},
- {field_body, 2},
- [8] =
+ {field_name, 1},
+ [7] =
{field_attrs, 1},
{field_body, 2},
{field_name, 0},
- [11] =
- {field_name, 0},
- {field_value, 2},
- [13] =
+ [10] =
{field_attrs, 2},
{field_body, 3},
{field_name, 1},
+ [13] =
+ {field_name, 0},
+ {field_value, 2},
};
static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = {
@@ -273,22 +272,22 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = {
[0] = 0,
[1] = 1,
[2] = 2,
- [3] = 2,
- [4] = 4,
- [5] = 5,
- [6] = 4,
- [7] = 5,
+ [3] = 3,
+ [4] = 3,
+ [5] = 2,
+ [6] = 6,
+ [7] = 6,
[8] = 8,
- [9] = 8,
+ [9] = 9,
[10] = 10,
[11] = 11,
- [12] = 12,
+ [12] = 11,
[13] = 13,
- [14] = 13,
+ [14] = 14,
[15] = 15,
[16] = 16,
- [17] = 17,
- [18] = 17,
+ [17] = 14,
+ [18] = 18,
[19] = 19,
[20] = 20,
[21] = 21,
@@ -301,31 +300,27 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = {
[28] = 28,
[29] = 29,
[30] = 30,
- [31] = 31,
+ [31] = 21,
[32] = 32,
- [33] = 27,
- [34] = 32,
- [35] = 19,
- [36] = 36,
- [37] = 29,
- [38] = 22,
- [39] = 26,
- [40] = 23,
- [41] = 25,
- [42] = 28,
+ [33] = 33,
+ [34] = 18,
+ [35] = 24,
+ [36] = 20,
+ [37] = 25,
+ [38] = 26,
+ [39] = 30,
+ [40] = 28,
+ [41] = 32,
+ [42] = 42,
[43] = 43,
- [44] = 44,
- [45] = 45,
- [46] = 45,
- [47] = 44,
- [48] = 43,
+ [44] = 43,
+ [45] = 42,
+ [46] = 46,
+ [47] = 47,
+ [48] = 48,
[49] = 49,
[50] = 50,
- [51] = 51,
- [52] = 52,
- [53] = 53,
- [54] = 54,
- [55] = 50,
+ [51] = 46,
};
static TSCharacterRange aux_sym_id_attr_token1_character_set_1[] = {
@@ -696,24 +691,24 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = {
[11] = {.lex_state = 8},
[12] = {.lex_state = 8},
[13] = {.lex_state = 8},
- [14] = {.lex_state = 8},
+ [14] = {.lex_state = 2},
[15] = {.lex_state = 8},
[16] = {.lex_state = 8},
[17] = {.lex_state = 2},
- [18] = {.lex_state = 2},
+ [18] = {.lex_state = 8},
[19] = {.lex_state = 8},
[20] = {.lex_state = 8},
[21] = {.lex_state = 8},
[22] = {.lex_state = 8},
[23] = {.lex_state = 8},
- [24] = {.lex_state = 2},
+ [24] = {.lex_state = 8},
[25] = {.lex_state = 8},
[26] = {.lex_state = 8},
- [27] = {.lex_state = 8},
+ [27] = {.lex_state = 2},
[28] = {.lex_state = 8},
- [29] = {.lex_state = 8},
- [30] = {.lex_state = 2},
- [31] = {.lex_state = 8},
+ [29] = {.lex_state = 2},
+ [30] = {.lex_state = 8},
+ [31] = {.lex_state = 2},
[32] = {.lex_state = 8},
[33] = {.lex_state = 2},
[34] = {.lex_state = 2},
@@ -723,21 +718,17 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = {
[38] = {.lex_state = 2},
[39] = {.lex_state = 2},
[40] = {.lex_state = 2},
- [41] = {.lex_state = 2},
- [42] = {.lex_state = 2},
+ [41] = {.lex_state = 8},
+ [42] = {.lex_state = 0},
[43] = {.lex_state = 0},
[44] = {.lex_state = 0},
[45] = {.lex_state = 0},
[46] = {.lex_state = 0},
- [47] = {.lex_state = 0},
- [48] = {.lex_state = 0},
+ [47] = {.lex_state = 6},
+ [48] = {.lex_state = 6},
[49] = {.lex_state = 0},
[50] = {.lex_state = 0},
[51] = {.lex_state = 0},
- [52] = {.lex_state = 0},
- [53] = {.lex_state = 6},
- [54] = {.lex_state = 6},
- [55] = {.lex_state = 0},
};
static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = {
@@ -756,11 +747,11 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = {
[sym_string] = ACTIONS(1),
},
[1] = {
- [sym_document] = STATE(49),
- [sym__toplevel] = STATE(15),
- [sym_comment] = STATE(15),
- [sym_node] = STATE(15),
- [aux_sym_document_repeat1] = STATE(15),
+ [sym_document] = STATE(50),
+ [sym__toplevel] = STATE(13),
+ [sym_comment] = STATE(13),
+ [sym_node] = STATE(13),
+ [aux_sym_document_repeat1] = STATE(13),
[ts_builtin_sym_end] = ACTIONS(3),
[anon_sym_SLASH] = ACTIONS(5),
[sym_ident] = ACTIONS(7),
@@ -768,584 +759,536 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = {
};
static const uint16_t ts_small_parse_table[] = {
- [0] = 8,
+ [0] = 7,
ACTIONS(9), 1,
anon_sym_LBRACE,
ACTIONS(11), 1,
- anon_sym_EQ,
- ACTIONS(13), 1,
anon_sym_POUND,
- ACTIONS(15), 1,
- anon_sym_DOT,
- ACTIONS(17), 1,
- sym_ident,
- STATE(40), 1,
- sym_node_body,
- STATE(48), 1,
- sym_attr_list,
- STATE(11), 4,
- sym_attr,
- sym_id_attr,
- sym_class_attr,
- aux_sym_attr_list_repeat1,
- [28] = 8,
- ACTIONS(11), 1,
- anon_sym_EQ,
ACTIONS(13), 1,
- anon_sym_POUND,
- ACTIONS(15), 1,
anon_sym_DOT,
- ACTIONS(17), 1,
+ ACTIONS(15), 1,
sym_ident,
- ACTIONS(19), 1,
- anon_sym_LBRACE,
- STATE(23), 1,
+ STATE(18), 1,
sym_node_body,
STATE(43), 1,
sym_attr_list,
- STATE(11), 4,
+ STATE(8), 4,
sym_attr,
sym_id_attr,
sym_class_attr,
aux_sym_attr_list_repeat1,
- [56] = 7,
- ACTIONS(13), 1,
+ [25] = 7,
+ ACTIONS(9), 1,
+ anon_sym_LBRACE,
+ ACTIONS(11), 1,
anon_sym_POUND,
- ACTIONS(15), 1,
+ ACTIONS(13), 1,
anon_sym_DOT,
- ACTIONS(19), 1,
- anon_sym_LBRACE,
- ACTIONS(21), 1,
+ ACTIONS(15), 1,
sym_ident,
- STATE(29), 1,
+ STATE(20), 1,
sym_node_body,
- STATE(45), 1,
+ STATE(42), 1,
sym_attr_list,
- STATE(11), 4,
+ STATE(8), 4,
sym_attr,
sym_id_attr,
sym_class_attr,
aux_sym_attr_list_repeat1,
- [81] = 7,
- ACTIONS(13), 1,
+ [50] = 7,
+ ACTIONS(11), 1,
anon_sym_POUND,
- ACTIONS(15), 1,
+ ACTIONS(13), 1,
anon_sym_DOT,
- ACTIONS(17), 1,
+ ACTIONS(15), 1,
sym_ident,
- ACTIONS(19), 1,
+ ACTIONS(17), 1,
anon_sym_LBRACE,
- STATE(22), 1,
+ STATE(36), 1,
sym_node_body,
- STATE(44), 1,
+ STATE(45), 1,
sym_attr_list,
- STATE(11), 4,
+ STATE(8), 4,
sym_attr,
sym_id_attr,
sym_class_attr,
aux_sym_attr_list_repeat1,
- [106] = 7,
- ACTIONS(9), 1,
- anon_sym_LBRACE,
- ACTIONS(13), 1,
+ [75] = 7,
+ ACTIONS(11), 1,
anon_sym_POUND,
- ACTIONS(15), 1,
- anon_sym_DOT,
- ACTIONS(23), 1,
- sym_ident,
- STATE(37), 1,
- sym_node_body,
- STATE(46), 1,
- sym_attr_list,
- STATE(11), 4,
- sym_attr,
- sym_id_attr,
- sym_class_attr,
- aux_sym_attr_list_repeat1,
- [131] = 7,
- ACTIONS(9), 1,
- anon_sym_LBRACE,
ACTIONS(13), 1,
- anon_sym_POUND,
- ACTIONS(15), 1,
anon_sym_DOT,
- ACTIONS(17), 1,
+ ACTIONS(15), 1,
sym_ident,
- STATE(38), 1,
+ ACTIONS(17), 1,
+ anon_sym_LBRACE,
+ STATE(34), 1,
sym_node_body,
- STATE(47), 1,
+ STATE(44), 1,
sym_attr_list,
- STATE(11), 4,
+ STATE(8), 4,
sym_attr,
sym_id_attr,
sym_class_attr,
aux_sym_attr_list_repeat1,
- [156] = 5,
+ [100] = 5,
ACTIONS(5), 1,
anon_sym_SLASH,
ACTIONS(7), 1,
sym_ident,
- ACTIONS(27), 1,
+ ACTIONS(21), 1,
anon_sym_RBRACE,
- ACTIONS(25), 2,
+ ACTIONS(19), 2,
anon_sym_DASH,
anon_sym_EQ,
- STATE(14), 4,
+ STATE(11), 4,
sym__toplevel,
sym_comment,
sym_node,
aux_sym_document_repeat1,
- [176] = 5,
+ [120] = 5,
ACTIONS(5), 1,
anon_sym_SLASH,
ACTIONS(7), 1,
sym_ident,
- ACTIONS(31), 1,
+ ACTIONS(25), 1,
anon_sym_RBRACE,
- ACTIONS(29), 2,
+ ACTIONS(23), 2,
anon_sym_DASH,
anon_sym_EQ,
- STATE(13), 4,
- sym__toplevel,
- sym_comment,
- sym_node,
- aux_sym_document_repeat1,
- [196] = 4,
- ACTIONS(35), 1,
- anon_sym_SLASH,
- ACTIONS(38), 1,
- sym_ident,
- ACTIONS(33), 2,
- ts_builtin_sym_end,
- anon_sym_RBRACE,
- STATE(10), 4,
+ STATE(12), 4,
sym__toplevel,
sym_comment,
sym_node,
aux_sym_document_repeat1,
- [213] = 5,
- ACTIONS(13), 1,
+ [140] = 5,
+ ACTIONS(11), 1,
anon_sym_POUND,
- ACTIONS(15), 1,
+ ACTIONS(13), 1,
anon_sym_DOT,
- ACTIONS(17), 1,
+ ACTIONS(15), 1,
sym_ident,
- ACTIONS(41), 1,
+ ACTIONS(27), 1,
anon_sym_LBRACE,
- STATE(12), 4,
+ STATE(10), 4,
sym_attr,
sym_id_attr,
sym_class_attr,
aux_sym_attr_list_repeat1,
- [232] = 5,
- ACTIONS(43), 1,
+ [159] = 4,
+ ACTIONS(31), 1,
+ anon_sym_SLASH,
+ ACTIONS(34), 1,
+ sym_ident,
+ ACTIONS(29), 2,
+ ts_builtin_sym_end,
+ anon_sym_RBRACE,
+ STATE(9), 4,
+ sym__toplevel,
+ sym_comment,
+ sym_node,
+ aux_sym_document_repeat1,
+ [176] = 5,
+ ACTIONS(37), 1,
anon_sym_LBRACE,
- ACTIONS(45), 1,
+ ACTIONS(39), 1,
anon_sym_POUND,
- ACTIONS(48), 1,
+ ACTIONS(42), 1,
anon_sym_DOT,
- ACTIONS(51), 1,
+ ACTIONS(45), 1,
sym_ident,
- STATE(12), 4,
+ STATE(10), 4,
sym_attr,
sym_id_attr,
sym_class_attr,
aux_sym_attr_list_repeat1,
- [251] = 4,
+ [195] = 4,
ACTIONS(5), 1,
anon_sym_SLASH,
ACTIONS(7), 1,
sym_ident,
- ACTIONS(54), 1,
+ ACTIONS(48), 1,
anon_sym_RBRACE,
- STATE(10), 4,
+ STATE(9), 4,
sym__toplevel,
sym_comment,
sym_node,
aux_sym_document_repeat1,
- [267] = 4,
+ [211] = 4,
ACTIONS(5), 1,
anon_sym_SLASH,
ACTIONS(7), 1,
sym_ident,
- ACTIONS(56), 1,
+ ACTIONS(50), 1,
anon_sym_RBRACE,
- STATE(10), 4,
+ STATE(9), 4,
sym__toplevel,
sym_comment,
sym_node,
aux_sym_document_repeat1,
- [283] = 4,
+ [227] = 4,
ACTIONS(5), 1,
anon_sym_SLASH,
ACTIONS(7), 1,
sym_ident,
- ACTIONS(58), 1,
+ ACTIONS(52), 1,
ts_builtin_sym_end,
- STATE(10), 4,
+ STATE(9), 4,
sym__toplevel,
sym_comment,
sym_node,
aux_sym_document_repeat1,
- [299] = 3,
- ACTIONS(60), 1,
- anon_sym_SLASH,
- ACTIONS(62), 1,
- sym_ident,
- STATE(36), 3,
- sym__toplevel,
- sym_comment,
- sym_node,
- [311] = 5,
- ACTIONS(64), 1,
+ [243] = 5,
+ ACTIONS(54), 1,
anon_sym_RBRACE,
- ACTIONS(66), 1,
+ ACTIONS(56), 1,
aux_sym_text_token1,
- ACTIONS(68), 1,
+ ACTIONS(58), 1,
anon_sym_AT,
- STATE(30), 1,
+ STATE(29), 1,
aux_sym_text_repeat1,
- STATE(55), 1,
+ STATE(51), 1,
sym_text,
- [327] = 5,
+ [259] = 2,
+ ACTIONS(62), 1,
+ anon_sym_EQ,
+ ACTIONS(60), 4,
+ anon_sym_LBRACE,
+ anon_sym_POUND,
+ anon_sym_DOT,
+ sym_ident,
+ [269] = 3,
+ ACTIONS(64), 1,
+ anon_sym_SLASH,
ACTIONS(66), 1,
+ sym_ident,
+ STATE(33), 3,
+ sym__toplevel,
+ sym_comment,
+ sym_node,
+ [281] = 5,
+ ACTIONS(56), 1,
aux_sym_text_token1,
- ACTIONS(68), 1,
+ ACTIONS(58), 1,
anon_sym_AT,
- ACTIONS(70), 1,
+ ACTIONS(68), 1,
anon_sym_RBRACE,
- STATE(30), 1,
+ STATE(29), 1,
aux_sym_text_repeat1,
- STATE(50), 1,
+ STATE(46), 1,
sym_text,
- [343] = 1,
- ACTIONS(72), 4,
+ [297] = 1,
+ ACTIONS(70), 4,
ts_builtin_sym_end,
anon_sym_SLASH,
anon_sym_RBRACE,
sym_ident,
- [350] = 1,
- ACTIONS(74), 4,
- anon_sym_LBRACE,
- anon_sym_POUND,
- anon_sym_DOT,
- sym_ident,
- [357] = 1,
- ACTIONS(76), 4,
+ [304] = 1,
+ ACTIONS(72), 4,
anon_sym_LBRACE,
anon_sym_POUND,
anon_sym_DOT,
sym_ident,
- [364] = 1,
- ACTIONS(78), 4,
+ [311] = 1,
+ ACTIONS(74), 4,
ts_builtin_sym_end,
anon_sym_SLASH,
anon_sym_RBRACE,
sym_ident,
- [371] = 1,
- ACTIONS(80), 4,
+ [318] = 1,
+ ACTIONS(76), 4,
ts_builtin_sym_end,
anon_sym_SLASH,
anon_sym_RBRACE,
sym_ident,
- [378] = 4,
- ACTIONS(82), 1,
- anon_sym_RBRACE,
- ACTIONS(84), 1,
- aux_sym_text_token1,
- ACTIONS(87), 1,
- anon_sym_AT,
- STATE(24), 1,
- aux_sym_text_repeat1,
- [391] = 1,
- ACTIONS(90), 4,
- ts_builtin_sym_end,
- anon_sym_SLASH,
- anon_sym_RBRACE,
+ [325] = 1,
+ ACTIONS(78), 4,
+ anon_sym_LBRACE,
+ anon_sym_POUND,
+ anon_sym_DOT,
+ sym_ident,
+ [332] = 1,
+ ACTIONS(80), 4,
+ anon_sym_LBRACE,
+ anon_sym_POUND,
+ anon_sym_DOT,
sym_ident,
- [398] = 1,
- ACTIONS(92), 4,
+ [339] = 1,
+ ACTIONS(82), 4,
ts_builtin_sym_end,
anon_sym_SLASH,
anon_sym_RBRACE,
sym_ident,
- [405] = 1,
- ACTIONS(94), 4,
+ [346] = 1,
+ ACTIONS(84), 4,
ts_builtin_sym_end,
anon_sym_SLASH,
anon_sym_RBRACE,
sym_ident,
- [412] = 1,
- ACTIONS(96), 4,
+ [353] = 1,
+ ACTIONS(86), 4,
ts_builtin_sym_end,
anon_sym_SLASH,
anon_sym_RBRACE,
sym_ident,
- [419] = 1,
- ACTIONS(98), 4,
+ [360] = 4,
+ ACTIONS(88), 1,
+ anon_sym_RBRACE,
+ ACTIONS(90), 1,
+ aux_sym_text_token1,
+ ACTIONS(93), 1,
+ anon_sym_AT,
+ STATE(27), 1,
+ aux_sym_text_repeat1,
+ [373] = 1,
+ ACTIONS(96), 4,
ts_builtin_sym_end,
anon_sym_SLASH,
anon_sym_RBRACE,
sym_ident,
- [426] = 4,
- ACTIONS(68), 1,
+ [380] = 4,
+ ACTIONS(58), 1,
anon_sym_AT,
- ACTIONS(100), 1,
+ ACTIONS(98), 1,
anon_sym_RBRACE,
- ACTIONS(102), 1,
+ ACTIONS(100), 1,
aux_sym_text_token1,
- STATE(24), 1,
+ STATE(27), 1,
aux_sym_text_repeat1,
- [439] = 1,
- ACTIONS(104), 4,
- anon_sym_LBRACE,
- anon_sym_POUND,
- anon_sym_DOT,
- sym_ident,
- [446] = 1,
- ACTIONS(106), 4,
+ [393] = 1,
+ ACTIONS(102), 4,
ts_builtin_sym_end,
anon_sym_SLASH,
anon_sym_RBRACE,
sym_ident,
- [453] = 2,
- ACTIONS(94), 1,
+ [400] = 2,
+ ACTIONS(76), 1,
aux_sym_text_token1,
- ACTIONS(108), 2,
+ ACTIONS(104), 2,
anon_sym_RBRACE,
anon_sym_AT,
- [461] = 2,
+ [408] = 3,
+ ACTIONS(9), 1,
+ anon_sym_LBRACE,
ACTIONS(106), 1,
+ sym_ident,
+ STATE(21), 1,
+ sym_node_body,
+ [418] = 2,
+ ACTIONS(108), 1,
+ aux_sym_text_token1,
+ ACTIONS(88), 2,
+ anon_sym_RBRACE,
+ anon_sym_AT,
+ [426] = 2,
+ ACTIONS(70), 1,
aux_sym_text_token1,
ACTIONS(110), 2,
anon_sym_RBRACE,
anon_sym_AT,
- [469] = 2,
- ACTIONS(72), 1,
+ [434] = 2,
+ ACTIONS(82), 1,
aux_sym_text_token1,
ACTIONS(112), 2,
anon_sym_RBRACE,
anon_sym_AT,
- [477] = 2,
- ACTIONS(114), 1,
+ [442] = 2,
+ ACTIONS(74), 1,
aux_sym_text_token1,
- ACTIONS(82), 2,
+ ACTIONS(114), 2,
anon_sym_RBRACE,
anon_sym_AT,
- [485] = 2,
- ACTIONS(98), 1,
+ [450] = 2,
+ ACTIONS(84), 1,
aux_sym_text_token1,
ACTIONS(116), 2,
anon_sym_RBRACE,
anon_sym_AT,
- [493] = 2,
- ACTIONS(78), 1,
+ [458] = 2,
+ ACTIONS(86), 1,
aux_sym_text_token1,
ACTIONS(118), 2,
anon_sym_RBRACE,
anon_sym_AT,
- [501] = 2,
- ACTIONS(92), 1,
+ [466] = 2,
+ ACTIONS(102), 1,
aux_sym_text_token1,
ACTIONS(120), 2,
anon_sym_RBRACE,
anon_sym_AT,
- [509] = 2,
- ACTIONS(80), 1,
- aux_sym_text_token1,
- ACTIONS(122), 2,
- anon_sym_RBRACE,
- anon_sym_AT,
- [517] = 2,
- ACTIONS(90), 1,
- aux_sym_text_token1,
- ACTIONS(124), 2,
- anon_sym_RBRACE,
- anon_sym_AT,
- [525] = 2,
+ [474] = 2,
ACTIONS(96), 1,
aux_sym_text_token1,
- ACTIONS(126), 2,
+ ACTIONS(122), 2,
anon_sym_RBRACE,
anon_sym_AT,
- [533] = 2,
- ACTIONS(19), 1,
- anon_sym_LBRACE,
- STATE(32), 1,
- sym_node_body,
- [540] = 2,
- ACTIONS(19), 1,
+ [482] = 3,
+ ACTIONS(17), 1,
anon_sym_LBRACE,
- STATE(27), 1,
+ ACTIONS(124), 1,
+ sym_ident,
+ STATE(31), 1,
sym_node_body,
- [547] = 2,
- ACTIONS(19), 1,
+ [492] = 2,
+ ACTIONS(9), 1,
anon_sym_LBRACE,
- STATE(25), 1,
+ STATE(30), 1,
sym_node_body,
- [554] = 2,
+ [499] = 2,
ACTIONS(9), 1,
anon_sym_LBRACE,
- STATE(41), 1,
+ STATE(25), 1,
sym_node_body,
- [561] = 2,
- ACTIONS(9), 1,
+ [506] = 2,
+ ACTIONS(17), 1,
anon_sym_LBRACE,
- STATE(33), 1,
+ STATE(37), 1,
sym_node_body,
- [568] = 2,
- ACTIONS(9), 1,
+ [513] = 2,
+ ACTIONS(17), 1,
anon_sym_LBRACE,
- STATE(34), 1,
+ STATE(39), 1,
sym_node_body,
- [575] = 1,
+ [520] = 1,
+ ACTIONS(126), 1,
+ anon_sym_RBRACE,
+ [524] = 1,
ACTIONS(128), 1,
- ts_builtin_sym_end,
- [579] = 1,
+ aux_sym_id_attr_token1,
+ [528] = 1,
ACTIONS(130), 1,
- anon_sym_RBRACE,
- [583] = 1,
+ aux_sym_id_attr_token1,
+ [532] = 1,
ACTIONS(132), 1,
sym_string,
- [587] = 1,
- ACTIONS(11), 1,
- anon_sym_EQ,
- [591] = 1,
+ [536] = 1,
ACTIONS(134), 1,
- aux_sym_id_attr_token1,
- [595] = 1,
+ ts_builtin_sym_end,
+ [540] = 1,
ACTIONS(136), 1,
- aux_sym_id_attr_token1,
- [599] = 1,
- ACTIONS(138), 1,
anon_sym_RBRACE,
};
static const uint32_t ts_small_parse_table_map[] = {
[SMALL_STATE(2)] = 0,
- [SMALL_STATE(3)] = 28,
- [SMALL_STATE(4)] = 56,
- [SMALL_STATE(5)] = 81,
- [SMALL_STATE(6)] = 106,
- [SMALL_STATE(7)] = 131,
- [SMALL_STATE(8)] = 156,
- [SMALL_STATE(9)] = 176,
- [SMALL_STATE(10)] = 196,
- [SMALL_STATE(11)] = 213,
- [SMALL_STATE(12)] = 232,
- [SMALL_STATE(13)] = 251,
- [SMALL_STATE(14)] = 267,
- [SMALL_STATE(15)] = 283,
- [SMALL_STATE(16)] = 299,
- [SMALL_STATE(17)] = 311,
- [SMALL_STATE(18)] = 327,
- [SMALL_STATE(19)] = 343,
- [SMALL_STATE(20)] = 350,
- [SMALL_STATE(21)] = 357,
- [SMALL_STATE(22)] = 364,
- [SMALL_STATE(23)] = 371,
- [SMALL_STATE(24)] = 378,
- [SMALL_STATE(25)] = 391,
- [SMALL_STATE(26)] = 398,
- [SMALL_STATE(27)] = 405,
- [SMALL_STATE(28)] = 412,
- [SMALL_STATE(29)] = 419,
- [SMALL_STATE(30)] = 426,
- [SMALL_STATE(31)] = 439,
- [SMALL_STATE(32)] = 446,
- [SMALL_STATE(33)] = 453,
- [SMALL_STATE(34)] = 461,
- [SMALL_STATE(35)] = 469,
- [SMALL_STATE(36)] = 477,
- [SMALL_STATE(37)] = 485,
- [SMALL_STATE(38)] = 493,
- [SMALL_STATE(39)] = 501,
- [SMALL_STATE(40)] = 509,
- [SMALL_STATE(41)] = 517,
- [SMALL_STATE(42)] = 525,
- [SMALL_STATE(43)] = 533,
- [SMALL_STATE(44)] = 540,
- [SMALL_STATE(45)] = 547,
- [SMALL_STATE(46)] = 554,
- [SMALL_STATE(47)] = 561,
- [SMALL_STATE(48)] = 568,
- [SMALL_STATE(49)] = 575,
- [SMALL_STATE(50)] = 579,
- [SMALL_STATE(51)] = 583,
- [SMALL_STATE(52)] = 587,
- [SMALL_STATE(53)] = 591,
- [SMALL_STATE(54)] = 595,
- [SMALL_STATE(55)] = 599,
+ [SMALL_STATE(3)] = 25,
+ [SMALL_STATE(4)] = 50,
+ [SMALL_STATE(5)] = 75,
+ [SMALL_STATE(6)] = 100,
+ [SMALL_STATE(7)] = 120,
+ [SMALL_STATE(8)] = 140,
+ [SMALL_STATE(9)] = 159,
+ [SMALL_STATE(10)] = 176,
+ [SMALL_STATE(11)] = 195,
+ [SMALL_STATE(12)] = 211,
+ [SMALL_STATE(13)] = 227,
+ [SMALL_STATE(14)] = 243,
+ [SMALL_STATE(15)] = 259,
+ [SMALL_STATE(16)] = 269,
+ [SMALL_STATE(17)] = 281,
+ [SMALL_STATE(18)] = 297,
+ [SMALL_STATE(19)] = 304,
+ [SMALL_STATE(20)] = 311,
+ [SMALL_STATE(21)] = 318,
+ [SMALL_STATE(22)] = 325,
+ [SMALL_STATE(23)] = 332,
+ [SMALL_STATE(24)] = 339,
+ [SMALL_STATE(25)] = 346,
+ [SMALL_STATE(26)] = 353,
+ [SMALL_STATE(27)] = 360,
+ [SMALL_STATE(28)] = 373,
+ [SMALL_STATE(29)] = 380,
+ [SMALL_STATE(30)] = 393,
+ [SMALL_STATE(31)] = 400,
+ [SMALL_STATE(32)] = 408,
+ [SMALL_STATE(33)] = 418,
+ [SMALL_STATE(34)] = 426,
+ [SMALL_STATE(35)] = 434,
+ [SMALL_STATE(36)] = 442,
+ [SMALL_STATE(37)] = 450,
+ [SMALL_STATE(38)] = 458,
+ [SMALL_STATE(39)] = 466,
+ [SMALL_STATE(40)] = 474,
+ [SMALL_STATE(41)] = 482,
+ [SMALL_STATE(42)] = 492,
+ [SMALL_STATE(43)] = 499,
+ [SMALL_STATE(44)] = 506,
+ [SMALL_STATE(45)] = 513,
+ [SMALL_STATE(46)] = 520,
+ [SMALL_STATE(47)] = 524,
+ [SMALL_STATE(48)] = 528,
+ [SMALL_STATE(49)] = 532,
+ [SMALL_STATE(50)] = 536,
+ [SMALL_STATE(51)] = 540,
};
static const TSParseActionEntry ts_parse_actions[] = {
[0] = {.entry = {.count = 0, .reusable = false}},
[1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(),
[3] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_document, 0, 0, 0),
- [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4),
- [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5),
- [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8),
- [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51),
- [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54),
- [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53),
- [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52),
- [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9),
- [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3),
- [23] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2),
- [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17),
- [27] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39),
- [29] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18),
- [31] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26),
- [33] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2, 0, 0),
- [35] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2, 0, 0), SHIFT_REPEAT(4),
- [38] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2, 0, 0), SHIFT_REPEAT(5),
- [41] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attr_list, 1, 0, 0),
- [43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attr_list_repeat1, 2, 0, 0),
- [45] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attr_list_repeat1, 2, 0, 0), SHIFT_REPEAT(54),
- [48] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attr_list_repeat1, 2, 0, 0), SHIFT_REPEAT(53),
- [51] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attr_list_repeat1, 2, 0, 0), SHIFT_REPEAT(52),
- [54] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28),
- [56] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42),
- [58] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_document, 1, 0, 0),
- [60] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6),
- [62] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7),
- [64] = {.entry = {.count = 1, .reusable = false}}, SHIFT(42),
- [66] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30),
- [68] = {.entry = {.count = 1, .reusable = false}}, SHIFT(16),
- [70] = {.entry = {.count = 1, .reusable = false}}, SHIFT(28),
- [72] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_node_body, 4, 0, 0),
- [74] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_id_attr, 2, 0, 3),
- [76] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_attr, 2, 0, 3),
- [78] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_node, 2, 0, 2),
- [80] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 3, 0, 4),
- [82] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_text_repeat1, 2, 0, 0),
- [84] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_text_repeat1, 2, 0, 0), SHIFT_REPEAT(24),
- [87] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_text_repeat1, 2, 0, 0), SHIFT_REPEAT(16),
- [90] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 3, 0, 5),
- [92] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_node_body, 2, 0, 0),
- [94] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_node, 3, 0, 6),
- [96] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_node_body, 3, 0, 0),
- [98] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 2, 0, 1),
- [100] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_text, 1, 0, 0),
- [102] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24),
- [104] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attr, 3, 0, 7),
- [106] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 4, 0, 8),
- [108] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_node, 3, 0, 6),
- [110] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_comment, 4, 0, 8),
- [112] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_node_body, 4, 0, 0),
- [114] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_text_repeat1, 2, 0, 0),
- [116] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_comment, 2, 0, 1),
- [118] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_node, 2, 0, 2),
- [120] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_node_body, 2, 0, 0),
- [122] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_comment, 3, 0, 4),
- [124] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_comment, 3, 0, 5),
- [126] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_node_body, 3, 0, 0),
- [128] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(),
- [130] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19),
- [132] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31),
- [134] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21),
- [136] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20),
- [138] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35),
+ [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32),
+ [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2),
+ [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6),
+ [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48),
+ [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47),
+ [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15),
+ [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7),
+ [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17),
+ [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24),
+ [23] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14),
+ [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35),
+ [27] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attr_list, 1, 0, 0),
+ [29] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2, 0, 0),
+ [31] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2, 0, 0), SHIFT_REPEAT(32),
+ [34] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2, 0, 0), SHIFT_REPEAT(2),
+ [37] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attr_list_repeat1, 2, 0, 0),
+ [39] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attr_list_repeat1, 2, 0, 0), SHIFT_REPEAT(48),
+ [42] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attr_list_repeat1, 2, 0, 0), SHIFT_REPEAT(47),
+ [45] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attr_list_repeat1, 2, 0, 0), SHIFT_REPEAT(15),
+ [48] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26),
+ [50] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38),
+ [52] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_document, 1, 0, 0),
+ [54] = {.entry = {.count = 1, .reusable = false}}, SHIFT(38),
+ [56] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29),
+ [58] = {.entry = {.count = 1, .reusable = false}}, SHIFT(16),
+ [60] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attr, 1, 0, 2),
+ [62] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49),
+ [64] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41),
+ [66] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5),
+ [68] = {.entry = {.count = 1, .reusable = false}}, SHIFT(26),
+ [70] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_node, 2, 0, 3),
+ [72] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attr, 3, 0, 8),
+ [74] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 3, 0, 4),
+ [76] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 2, 0, 1),
+ [78] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_id_attr, 2, 0, 5),
+ [80] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_attr, 2, 0, 5),
+ [82] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_node_body, 2, 0, 0),
+ [84] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_node, 3, 0, 6),
+ [86] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_node_body, 3, 0, 0),
+ [88] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_text_repeat1, 2, 0, 0),
+ [90] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_text_repeat1, 2, 0, 0), SHIFT_REPEAT(27),
+ [93] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_text_repeat1, 2, 0, 0), SHIFT_REPEAT(16),
+ [96] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_node_body, 4, 0, 0),
+ [98] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_text, 1, 0, 0),
+ [100] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27),
+ [102] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 4, 0, 7),
+ [104] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_comment, 2, 0, 1),
+ [106] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3),
+ [108] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_text_repeat1, 2, 0, 0),
+ [110] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_node, 2, 0, 3),
+ [112] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_node_body, 2, 0, 0),
+ [114] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_comment, 3, 0, 4),
+ [116] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_node, 3, 0, 6),
+ [118] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_node_body, 3, 0, 0),
+ [120] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_comment, 4, 0, 7),
+ [122] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_node_body, 4, 0, 0),
+ [124] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4),
+ [126] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28),
+ [128] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23),
+ [130] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22),
+ [132] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19),
+ [134] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(),
+ [136] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40),
};
#ifdef __cplusplus