2018-06-11 20:18:00 +00:00
|
|
|
#include <tree_sitter/parser.h>
|
|
|
|
|
|
|
|
#if defined(__GNUC__) || defined(__clang__)
|
|
|
|
#pragma GCC diagnostic push
|
|
|
|
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define LANGUAGE_VERSION 8
|
2018-06-11 22:36:18 +00:00
|
|
|
#define STATE_COUNT 36
|
|
|
|
#define SYMBOL_COUNT 25
|
|
|
|
#define ALIAS_COUNT 1
|
|
|
|
#define TOKEN_COUNT 16
|
|
|
|
#define EXTERNAL_TOKEN_COUNT 7
|
2018-06-11 22:12:01 +00:00
|
|
|
#define MAX_ALIAS_SEQUENCE_LENGTH 3
|
2018-06-11 20:18:00 +00:00
|
|
|
|
|
|
|
enum {
|
2018-06-11 22:12:01 +00:00
|
|
|
sym__open_start_tag = 1,
|
|
|
|
sym__close_start_tag = 2,
|
|
|
|
sym__self_close_start_tag = 3,
|
|
|
|
sym_end_tag = 4,
|
|
|
|
sym__implicit_end_tag = 5,
|
|
|
|
sym__erroneous_end_tag = 6,
|
2018-06-11 22:36:18 +00:00
|
|
|
sym_comment = 7,
|
|
|
|
anon_sym_EQ = 8,
|
|
|
|
sym_attribute_name = 9,
|
|
|
|
sym_attribute_value = 10,
|
|
|
|
anon_sym_SQUOTE = 11,
|
|
|
|
aux_sym_SLASH_LBRACK_CARET_SQUOTE_RBRACK_PLUS_SLASH = 12,
|
|
|
|
anon_sym_DQUOTE = 13,
|
|
|
|
aux_sym_SLASH_LBRACK_CARET_DQUOTE_RBRACK_PLUS_SLASH = 14,
|
|
|
|
sym_text = 15,
|
|
|
|
sym_fragment = 16,
|
|
|
|
sym__node = 17,
|
|
|
|
sym_element = 18,
|
|
|
|
sym_start_tag = 19,
|
|
|
|
sym_self_closing_tag = 20,
|
|
|
|
sym_attribute = 21,
|
|
|
|
sym_quoted_attribute_value = 22,
|
|
|
|
aux_sym_fragment_repeat1 = 23,
|
|
|
|
aux_sym_start_tag_repeat1 = 24,
|
|
|
|
alias_sym_attribute_value = 25,
|
2018-06-11 20:18:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static const char *ts_symbol_names[] = {
|
2018-06-11 22:12:01 +00:00
|
|
|
[sym__open_start_tag] = "_open_start_tag",
|
|
|
|
[sym__close_start_tag] = "_close_start_tag",
|
|
|
|
[sym__self_close_start_tag] = "_self_close_start_tag",
|
|
|
|
[sym_end_tag] = "end_tag",
|
|
|
|
[sym__implicit_end_tag] = "_implicit_end_tag",
|
|
|
|
[sym__erroneous_end_tag] = "_erroneous_end_tag",
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym_comment] = "comment",
|
2018-06-11 20:18:00 +00:00
|
|
|
[ts_builtin_sym_end] = "END",
|
|
|
|
[anon_sym_EQ] = "=",
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym_attribute_name] = "attribute_name",
|
|
|
|
[sym_attribute_value] = "attribute_value",
|
2018-06-11 20:18:00 +00:00
|
|
|
[anon_sym_SQUOTE] = "'",
|
|
|
|
[aux_sym_SLASH_LBRACK_CARET_SQUOTE_RBRACK_PLUS_SLASH] = "/[^']+/",
|
|
|
|
[anon_sym_DQUOTE] = "\"",
|
|
|
|
[aux_sym_SLASH_LBRACK_CARET_DQUOTE_RBRACK_PLUS_SLASH] = "/[^\"]+/",
|
|
|
|
[sym_text] = "text",
|
|
|
|
[sym_fragment] = "fragment",
|
|
|
|
[sym__node] = "_node",
|
|
|
|
[sym_element] = "element",
|
|
|
|
[sym_start_tag] = "start_tag",
|
|
|
|
[sym_self_closing_tag] = "self_closing_tag",
|
|
|
|
[sym_attribute] = "attribute",
|
|
|
|
[sym_quoted_attribute_value] = "quoted_attribute_value",
|
|
|
|
[aux_sym_fragment_repeat1] = "fragment_repeat1",
|
|
|
|
[aux_sym_start_tag_repeat1] = "start_tag_repeat1",
|
|
|
|
[alias_sym_attribute_value] = "attribute_value",
|
|
|
|
};
|
|
|
|
|
|
|
|
static const TSSymbolMetadata ts_symbol_metadata[] = {
|
2018-06-11 22:12:01 +00:00
|
|
|
[sym__open_start_tag] = {
|
2018-06-11 20:18:00 +00:00
|
|
|
.visible = false,
|
|
|
|
.named = true,
|
|
|
|
},
|
2018-06-11 22:12:01 +00:00
|
|
|
[sym__close_start_tag] = {
|
|
|
|
.visible = false,
|
|
|
|
.named = true,
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
2018-06-11 22:12:01 +00:00
|
|
|
[sym__self_close_start_tag] = {
|
|
|
|
.visible = false,
|
|
|
|
.named = true,
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
2018-06-11 22:12:01 +00:00
|
|
|
[sym_end_tag] = {
|
2018-06-11 20:18:00 +00:00
|
|
|
.visible = true,
|
2018-06-11 22:12:01 +00:00
|
|
|
.named = true,
|
|
|
|
},
|
|
|
|
[sym__implicit_end_tag] = {
|
|
|
|
.visible = false,
|
|
|
|
.named = true,
|
|
|
|
},
|
|
|
|
[sym__erroneous_end_tag] = {
|
|
|
|
.visible = false,
|
|
|
|
.named = true,
|
|
|
|
},
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym_comment] = {
|
|
|
|
.visible = true,
|
|
|
|
.named = true,
|
|
|
|
},
|
2018-06-11 22:12:01 +00:00
|
|
|
[ts_builtin_sym_end] = {
|
|
|
|
.visible = false,
|
|
|
|
.named = true,
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[anon_sym_EQ] = {
|
|
|
|
.visible = true,
|
|
|
|
.named = false,
|
|
|
|
},
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym_attribute_name] = {
|
|
|
|
.visible = true,
|
|
|
|
.named = true,
|
|
|
|
},
|
|
|
|
[sym_attribute_value] = {
|
|
|
|
.visible = true,
|
2018-06-11 20:18:00 +00:00
|
|
|
.named = true,
|
|
|
|
},
|
|
|
|
[anon_sym_SQUOTE] = {
|
|
|
|
.visible = true,
|
|
|
|
.named = false,
|
|
|
|
},
|
|
|
|
[aux_sym_SLASH_LBRACK_CARET_SQUOTE_RBRACK_PLUS_SLASH] = {
|
|
|
|
.visible = false,
|
|
|
|
.named = false,
|
|
|
|
},
|
|
|
|
[anon_sym_DQUOTE] = {
|
|
|
|
.visible = true,
|
|
|
|
.named = false,
|
|
|
|
},
|
|
|
|
[aux_sym_SLASH_LBRACK_CARET_DQUOTE_RBRACK_PLUS_SLASH] = {
|
|
|
|
.visible = false,
|
|
|
|
.named = false,
|
|
|
|
},
|
|
|
|
[sym_text] = {
|
|
|
|
.visible = true,
|
|
|
|
.named = true,
|
|
|
|
},
|
|
|
|
[sym_fragment] = {
|
|
|
|
.visible = true,
|
|
|
|
.named = true,
|
|
|
|
},
|
|
|
|
[sym__node] = {
|
|
|
|
.visible = false,
|
|
|
|
.named = true,
|
|
|
|
},
|
|
|
|
[sym_element] = {
|
|
|
|
.visible = true,
|
|
|
|
.named = true,
|
|
|
|
},
|
|
|
|
[sym_start_tag] = {
|
|
|
|
.visible = true,
|
|
|
|
.named = true,
|
|
|
|
},
|
|
|
|
[sym_self_closing_tag] = {
|
|
|
|
.visible = true,
|
|
|
|
.named = true,
|
|
|
|
},
|
|
|
|
[sym_attribute] = {
|
|
|
|
.visible = true,
|
|
|
|
.named = true,
|
|
|
|
},
|
|
|
|
[sym_quoted_attribute_value] = {
|
|
|
|
.visible = true,
|
|
|
|
.named = true,
|
|
|
|
},
|
|
|
|
[aux_sym_fragment_repeat1] = {
|
|
|
|
.visible = false,
|
|
|
|
.named = false,
|
|
|
|
},
|
|
|
|
[aux_sym_start_tag_repeat1] = {
|
|
|
|
.visible = false,
|
|
|
|
.named = false,
|
|
|
|
},
|
|
|
|
[alias_sym_attribute_value] = {
|
|
|
|
.visible = true,
|
|
|
|
.named = true,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2018-06-11 22:36:18 +00:00
|
|
|
static TSSymbol ts_alias_sequences[2][MAX_ALIAS_SEQUENCE_LENGTH] = {
|
2018-06-11 20:18:00 +00:00
|
|
|
[1] = {
|
|
|
|
[1] = alias_sym_attribute_value,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static bool ts_lex(TSLexer *lexer, TSStateId state) {
|
|
|
|
START_LEXER();
|
|
|
|
switch (state) {
|
|
|
|
case 0:
|
|
|
|
if (lookahead == 0)
|
|
|
|
ADVANCE(1);
|
|
|
|
if (lookahead == '\"')
|
|
|
|
ADVANCE(2);
|
|
|
|
if (lookahead == '\'')
|
|
|
|
ADVANCE(3);
|
2018-06-11 22:36:18 +00:00
|
|
|
if (lookahead == '/')
|
2018-06-11 22:12:01 +00:00
|
|
|
ADVANCE(4);
|
2018-06-11 22:36:18 +00:00
|
|
|
if (lookahead == '=')
|
|
|
|
ADVANCE(5);
|
2018-06-11 20:18:00 +00:00
|
|
|
if (lookahead == '\t' ||
|
|
|
|
lookahead == '\n' ||
|
|
|
|
lookahead == '\r' ||
|
|
|
|
lookahead == ' ')
|
|
|
|
SKIP(0);
|
2018-06-11 22:36:18 +00:00
|
|
|
if ((lookahead < '<' || lookahead > '>'))
|
|
|
|
ADVANCE(6);
|
2018-06-11 20:18:00 +00:00
|
|
|
END_STATE();
|
|
|
|
case 1:
|
|
|
|
ACCEPT_TOKEN(ts_builtin_sym_end);
|
|
|
|
END_STATE();
|
|
|
|
case 2:
|
|
|
|
ACCEPT_TOKEN(anon_sym_DQUOTE);
|
|
|
|
END_STATE();
|
|
|
|
case 3:
|
|
|
|
ACCEPT_TOKEN(anon_sym_SQUOTE);
|
|
|
|
END_STATE();
|
|
|
|
case 4:
|
2018-06-11 22:36:18 +00:00
|
|
|
ACCEPT_TOKEN(sym_attribute_value);
|
|
|
|
if (lookahead != 0 &&
|
|
|
|
lookahead != '\t' &&
|
|
|
|
lookahead != '\n' &&
|
|
|
|
lookahead != '\r' &&
|
|
|
|
lookahead != ' ' &&
|
|
|
|
lookahead != '\"' &&
|
|
|
|
lookahead != '\'' &&
|
|
|
|
(lookahead < '<' || lookahead > '>'))
|
|
|
|
ADVANCE(4);
|
2018-06-11 20:18:00 +00:00
|
|
|
END_STATE();
|
2018-06-11 22:12:01 +00:00
|
|
|
case 5:
|
2018-06-11 22:36:18 +00:00
|
|
|
ACCEPT_TOKEN(anon_sym_EQ);
|
|
|
|
END_STATE();
|
|
|
|
case 6:
|
|
|
|
ACCEPT_TOKEN(sym_attribute_name);
|
|
|
|
if (lookahead == '/')
|
|
|
|
ADVANCE(4);
|
2018-06-11 20:18:00 +00:00
|
|
|
if (lookahead != 0 &&
|
|
|
|
lookahead != '\t' &&
|
|
|
|
lookahead != '\n' &&
|
|
|
|
lookahead != '\r' &&
|
|
|
|
lookahead != ' ' &&
|
|
|
|
lookahead != '\"' &&
|
|
|
|
lookahead != '\'' &&
|
|
|
|
(lookahead < '<' || lookahead > '>'))
|
2018-06-11 22:36:18 +00:00
|
|
|
ADVANCE(6);
|
2018-06-11 20:18:00 +00:00
|
|
|
END_STATE();
|
2018-06-11 22:36:18 +00:00
|
|
|
case 7:
|
2018-06-11 20:18:00 +00:00
|
|
|
if (lookahead == 0)
|
|
|
|
ADVANCE(1);
|
|
|
|
if (lookahead == '\t' ||
|
|
|
|
lookahead == '\n' ||
|
|
|
|
lookahead == '\r' ||
|
|
|
|
lookahead == ' ')
|
2018-06-11 22:36:18 +00:00
|
|
|
ADVANCE(8);
|
2018-06-11 22:12:01 +00:00
|
|
|
if (lookahead != '<' &&
|
|
|
|
lookahead != '>')
|
2018-06-11 22:36:18 +00:00
|
|
|
ADVANCE(9);
|
2018-06-11 20:18:00 +00:00
|
|
|
END_STATE();
|
2018-06-11 22:36:18 +00:00
|
|
|
case 8:
|
2018-06-11 20:18:00 +00:00
|
|
|
ACCEPT_TOKEN(sym_text);
|
|
|
|
if (lookahead == '\t' ||
|
|
|
|
lookahead == '\n' ||
|
|
|
|
lookahead == '\r' ||
|
|
|
|
lookahead == ' ')
|
2018-06-11 22:36:18 +00:00
|
|
|
ADVANCE(8);
|
2018-06-11 20:18:00 +00:00
|
|
|
if (lookahead != 0 &&
|
|
|
|
lookahead != '<' &&
|
|
|
|
lookahead != '>')
|
2018-06-11 22:36:18 +00:00
|
|
|
ADVANCE(9);
|
2018-06-11 20:18:00 +00:00
|
|
|
END_STATE();
|
2018-06-11 22:36:18 +00:00
|
|
|
case 9:
|
2018-06-11 20:18:00 +00:00
|
|
|
ACCEPT_TOKEN(sym_text);
|
|
|
|
if (lookahead != 0 &&
|
|
|
|
lookahead != '<' &&
|
|
|
|
lookahead != '>')
|
2018-06-11 22:36:18 +00:00
|
|
|
ADVANCE(9);
|
2018-06-11 20:18:00 +00:00
|
|
|
END_STATE();
|
2018-06-11 22:36:18 +00:00
|
|
|
case 10:
|
2018-06-11 20:18:00 +00:00
|
|
|
if (lookahead == '\t' ||
|
|
|
|
lookahead == '\n' ||
|
|
|
|
lookahead == '\r' ||
|
|
|
|
lookahead == ' ')
|
2018-06-11 22:36:18 +00:00
|
|
|
SKIP(10);
|
2018-06-11 22:12:01 +00:00
|
|
|
if (lookahead != 0 &&
|
2018-06-11 22:36:18 +00:00
|
|
|
lookahead != '\"' &&
|
2018-06-11 22:12:01 +00:00
|
|
|
lookahead != '\'' &&
|
|
|
|
lookahead != '/' &&
|
|
|
|
(lookahead < '<' || lookahead > '>'))
|
2018-06-11 22:36:18 +00:00
|
|
|
ADVANCE(11);
|
2018-06-11 20:18:00 +00:00
|
|
|
END_STATE();
|
2018-06-11 22:36:18 +00:00
|
|
|
case 11:
|
|
|
|
ACCEPT_TOKEN(sym_attribute_name);
|
|
|
|
if (lookahead != 0 &&
|
|
|
|
lookahead != '\t' &&
|
|
|
|
lookahead != '\n' &&
|
|
|
|
lookahead != '\r' &&
|
|
|
|
lookahead != ' ' &&
|
|
|
|
lookahead != '\"' &&
|
|
|
|
lookahead != '\'' &&
|
|
|
|
lookahead != '/' &&
|
|
|
|
(lookahead < '<' || lookahead > '>'))
|
|
|
|
ADVANCE(11);
|
|
|
|
END_STATE();
|
|
|
|
case 12:
|
2018-06-11 20:18:00 +00:00
|
|
|
if (lookahead == 0)
|
|
|
|
ADVANCE(1);
|
|
|
|
if (lookahead == '\t' ||
|
|
|
|
lookahead == '\n' ||
|
|
|
|
lookahead == '\r' ||
|
|
|
|
lookahead == ' ')
|
2018-06-11 22:36:18 +00:00
|
|
|
SKIP(12);
|
2018-06-11 20:18:00 +00:00
|
|
|
END_STATE();
|
2018-06-11 22:36:18 +00:00
|
|
|
case 13:
|
2018-06-11 20:18:00 +00:00
|
|
|
if (lookahead == '=')
|
2018-06-11 22:36:18 +00:00
|
|
|
ADVANCE(5);
|
2018-06-11 20:18:00 +00:00
|
|
|
if (lookahead == '\t' ||
|
|
|
|
lookahead == '\n' ||
|
|
|
|
lookahead == '\r' ||
|
|
|
|
lookahead == ' ')
|
2018-06-11 22:36:18 +00:00
|
|
|
SKIP(13);
|
2018-06-11 20:18:00 +00:00
|
|
|
if (lookahead != 0 &&
|
|
|
|
lookahead != '\"' &&
|
|
|
|
lookahead != '\'' &&
|
2018-06-11 22:12:01 +00:00
|
|
|
lookahead != '/' &&
|
2018-06-11 20:18:00 +00:00
|
|
|
(lookahead < '<' || lookahead > '>'))
|
2018-06-11 22:36:18 +00:00
|
|
|
ADVANCE(11);
|
2018-06-11 20:18:00 +00:00
|
|
|
END_STATE();
|
2018-06-11 22:36:18 +00:00
|
|
|
case 14:
|
2018-06-11 20:18:00 +00:00
|
|
|
if (lookahead == '\"')
|
|
|
|
ADVANCE(2);
|
|
|
|
if (lookahead == '\'')
|
|
|
|
ADVANCE(3);
|
|
|
|
if (lookahead == '\t' ||
|
|
|
|
lookahead == '\n' ||
|
|
|
|
lookahead == '\r' ||
|
|
|
|
lookahead == ' ')
|
2018-06-11 22:36:18 +00:00
|
|
|
SKIP(14);
|
2018-06-11 20:18:00 +00:00
|
|
|
if (lookahead != 0 &&
|
|
|
|
(lookahead < '<' || lookahead > '>'))
|
2018-06-11 22:36:18 +00:00
|
|
|
ADVANCE(4);
|
2018-06-11 20:18:00 +00:00
|
|
|
END_STATE();
|
2018-06-11 22:36:18 +00:00
|
|
|
case 15:
|
2018-06-11 20:18:00 +00:00
|
|
|
if (lookahead == '\'')
|
|
|
|
ADVANCE(3);
|
|
|
|
if (lookahead == '\t' ||
|
|
|
|
lookahead == '\n' ||
|
|
|
|
lookahead == '\r' ||
|
|
|
|
lookahead == ' ')
|
2018-06-11 22:36:18 +00:00
|
|
|
ADVANCE(16);
|
2018-06-11 20:18:00 +00:00
|
|
|
if (lookahead != 0)
|
2018-06-11 22:36:18 +00:00
|
|
|
ADVANCE(17);
|
2018-06-11 20:18:00 +00:00
|
|
|
END_STATE();
|
2018-06-11 22:36:18 +00:00
|
|
|
case 16:
|
2018-06-11 20:18:00 +00:00
|
|
|
ACCEPT_TOKEN(aux_sym_SLASH_LBRACK_CARET_SQUOTE_RBRACK_PLUS_SLASH);
|
|
|
|
if (lookahead == '\t' ||
|
|
|
|
lookahead == '\n' ||
|
|
|
|
lookahead == '\r' ||
|
|
|
|
lookahead == ' ')
|
2018-06-11 22:36:18 +00:00
|
|
|
ADVANCE(16);
|
2018-06-11 20:18:00 +00:00
|
|
|
if (lookahead != 0 &&
|
|
|
|
lookahead != '\'')
|
2018-06-11 22:36:18 +00:00
|
|
|
ADVANCE(17);
|
2018-06-11 20:18:00 +00:00
|
|
|
END_STATE();
|
2018-06-11 22:36:18 +00:00
|
|
|
case 17:
|
2018-06-11 20:18:00 +00:00
|
|
|
ACCEPT_TOKEN(aux_sym_SLASH_LBRACK_CARET_SQUOTE_RBRACK_PLUS_SLASH);
|
|
|
|
if (lookahead != 0 &&
|
|
|
|
lookahead != '\'')
|
2018-06-11 22:36:18 +00:00
|
|
|
ADVANCE(17);
|
2018-06-11 20:18:00 +00:00
|
|
|
END_STATE();
|
2018-06-11 22:36:18 +00:00
|
|
|
case 18:
|
2018-06-11 20:18:00 +00:00
|
|
|
if (lookahead == '\"')
|
|
|
|
ADVANCE(2);
|
|
|
|
if (lookahead == '\t' ||
|
|
|
|
lookahead == '\n' ||
|
|
|
|
lookahead == '\r' ||
|
|
|
|
lookahead == ' ')
|
2018-06-11 22:36:18 +00:00
|
|
|
ADVANCE(19);
|
2018-06-11 20:18:00 +00:00
|
|
|
if (lookahead != 0)
|
2018-06-11 22:36:18 +00:00
|
|
|
ADVANCE(20);
|
2018-06-11 20:18:00 +00:00
|
|
|
END_STATE();
|
2018-06-11 22:36:18 +00:00
|
|
|
case 19:
|
2018-06-11 20:18:00 +00:00
|
|
|
ACCEPT_TOKEN(aux_sym_SLASH_LBRACK_CARET_DQUOTE_RBRACK_PLUS_SLASH);
|
|
|
|
if (lookahead == '\t' ||
|
|
|
|
lookahead == '\n' ||
|
|
|
|
lookahead == '\r' ||
|
|
|
|
lookahead == ' ')
|
2018-06-11 22:36:18 +00:00
|
|
|
ADVANCE(19);
|
2018-06-11 20:18:00 +00:00
|
|
|
if (lookahead != 0 &&
|
|
|
|
lookahead != '\"')
|
2018-06-11 22:36:18 +00:00
|
|
|
ADVANCE(20);
|
2018-06-11 20:18:00 +00:00
|
|
|
END_STATE();
|
2018-06-11 22:36:18 +00:00
|
|
|
case 20:
|
2018-06-11 20:18:00 +00:00
|
|
|
ACCEPT_TOKEN(aux_sym_SLASH_LBRACK_CARET_DQUOTE_RBRACK_PLUS_SLASH);
|
|
|
|
if (lookahead != 0 &&
|
|
|
|
lookahead != '\"')
|
2018-06-11 22:36:18 +00:00
|
|
|
ADVANCE(20);
|
|
|
|
END_STATE();
|
|
|
|
case 21:
|
|
|
|
if (lookahead == '\'')
|
|
|
|
ADVANCE(3);
|
|
|
|
if (lookahead == '\t' ||
|
|
|
|
lookahead == '\n' ||
|
|
|
|
lookahead == '\r' ||
|
|
|
|
lookahead == ' ')
|
|
|
|
SKIP(21);
|
|
|
|
END_STATE();
|
|
|
|
case 22:
|
|
|
|
if (lookahead == '\"')
|
|
|
|
ADVANCE(2);
|
|
|
|
if (lookahead == '\t' ||
|
|
|
|
lookahead == '\n' ||
|
|
|
|
lookahead == '\r' ||
|
|
|
|
lookahead == ' ')
|
|
|
|
SKIP(22);
|
2018-06-11 20:18:00 +00:00
|
|
|
END_STATE();
|
|
|
|
default:
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static TSLexMode ts_lex_modes[STATE_COUNT] = {
|
2018-06-11 22:12:01 +00:00
|
|
|
[0] = {.lex_state = 0, .external_lex_state = 1},
|
2018-06-11 22:36:18 +00:00
|
|
|
[1] = {.lex_state = 7, .external_lex_state = 2},
|
|
|
|
[2] = {.lex_state = 10, .external_lex_state = 3},
|
|
|
|
[3] = {.lex_state = 12, .external_lex_state = 4},
|
|
|
|
[4] = {.lex_state = 7, .external_lex_state = 5},
|
|
|
|
[5] = {.lex_state = 7, .external_lex_state = 2},
|
|
|
|
[6] = {.lex_state = 7, .external_lex_state = 2},
|
|
|
|
[7] = {.lex_state = 7, .external_lex_state = 5},
|
|
|
|
[8] = {.lex_state = 7, .external_lex_state = 2},
|
|
|
|
[9] = {.lex_state = 13, .external_lex_state = 3},
|
|
|
|
[10] = {.lex_state = 10, .external_lex_state = 3},
|
|
|
|
[11] = {.lex_state = 10, .external_lex_state = 3},
|
|
|
|
[12] = {.lex_state = 7, .external_lex_state = 2},
|
|
|
|
[13] = {.lex_state = 7, .external_lex_state = 5},
|
|
|
|
[14] = {.lex_state = 7, .external_lex_state = 5},
|
|
|
|
[15] = {.lex_state = 7, .external_lex_state = 5},
|
|
|
|
[16] = {.lex_state = 7, .external_lex_state = 2},
|
|
|
|
[17] = {.lex_state = 14, .external_lex_state = 4},
|
|
|
|
[18] = {.lex_state = 7, .external_lex_state = 5},
|
|
|
|
[19] = {.lex_state = 7, .external_lex_state = 2},
|
|
|
|
[20] = {.lex_state = 10, .external_lex_state = 3},
|
|
|
|
[21] = {.lex_state = 7, .external_lex_state = 5},
|
|
|
|
[22] = {.lex_state = 10, .external_lex_state = 3},
|
|
|
|
[23] = {.lex_state = 7, .external_lex_state = 5},
|
|
|
|
[24] = {.lex_state = 7, .external_lex_state = 5},
|
|
|
|
[25] = {.lex_state = 7, .external_lex_state = 2},
|
|
|
|
[26] = {.lex_state = 7, .external_lex_state = 5},
|
|
|
|
[27] = {.lex_state = 10, .external_lex_state = 3},
|
|
|
|
[28] = {.lex_state = 15, .external_lex_state = 4},
|
|
|
|
[29] = {.lex_state = 18, .external_lex_state = 4},
|
|
|
|
[30] = {.lex_state = 7, .external_lex_state = 5},
|
|
|
|
[31] = {.lex_state = 7, .external_lex_state = 5},
|
|
|
|
[32] = {.lex_state = 10, .external_lex_state = 3},
|
|
|
|
[33] = {.lex_state = 21, .external_lex_state = 4},
|
|
|
|
[34] = {.lex_state = 22, .external_lex_state = 4},
|
|
|
|
[35] = {.lex_state = 10, .external_lex_state = 3},
|
2018-06-11 22:12:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
ts_external_token__open_start_tag,
|
|
|
|
ts_external_token__close_start_tag,
|
|
|
|
ts_external_token__self_close_start_tag,
|
|
|
|
ts_external_token_end_tag,
|
|
|
|
ts_external_token__implicit_end_tag,
|
|
|
|
ts_external_token__erroneous_end_tag,
|
2018-06-11 22:36:18 +00:00
|
|
|
ts_external_token_comment,
|
2018-06-11 22:12:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static TSSymbol ts_external_scanner_symbol_map[EXTERNAL_TOKEN_COUNT] = {
|
|
|
|
[ts_external_token__open_start_tag] = sym__open_start_tag,
|
|
|
|
[ts_external_token__close_start_tag] = sym__close_start_tag,
|
|
|
|
[ts_external_token__self_close_start_tag] = sym__self_close_start_tag,
|
|
|
|
[ts_external_token_end_tag] = sym_end_tag,
|
|
|
|
[ts_external_token__implicit_end_tag] = sym__implicit_end_tag,
|
|
|
|
[ts_external_token__erroneous_end_tag] = sym__erroneous_end_tag,
|
2018-06-11 22:36:18 +00:00
|
|
|
[ts_external_token_comment] = sym_comment,
|
2018-06-11 22:12:01 +00:00
|
|
|
};
|
|
|
|
|
2018-06-11 22:36:18 +00:00
|
|
|
static bool ts_external_scanner_states[6][EXTERNAL_TOKEN_COUNT] = {
|
2018-06-11 22:12:01 +00:00
|
|
|
[1] = {
|
|
|
|
[ts_external_token__open_start_tag] = true,
|
|
|
|
[ts_external_token__close_start_tag] = true,
|
|
|
|
[ts_external_token__self_close_start_tag] = true,
|
|
|
|
[ts_external_token_end_tag] = true,
|
|
|
|
[ts_external_token__implicit_end_tag] = true,
|
|
|
|
[ts_external_token__erroneous_end_tag] = true,
|
2018-06-11 22:36:18 +00:00
|
|
|
[ts_external_token_comment] = true,
|
2018-06-11 22:12:01 +00:00
|
|
|
},
|
|
|
|
[2] = {
|
|
|
|
[ts_external_token__open_start_tag] = true,
|
|
|
|
[ts_external_token__erroneous_end_tag] = true,
|
2018-06-11 22:36:18 +00:00
|
|
|
[ts_external_token_comment] = true,
|
2018-06-11 22:12:01 +00:00
|
|
|
},
|
|
|
|
[3] = {
|
|
|
|
[ts_external_token__close_start_tag] = true,
|
|
|
|
[ts_external_token__self_close_start_tag] = true,
|
2018-06-11 22:36:18 +00:00
|
|
|
[ts_external_token_comment] = true,
|
2018-06-11 22:12:01 +00:00
|
|
|
},
|
|
|
|
[4] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[ts_external_token_comment] = true,
|
|
|
|
},
|
|
|
|
[5] = {
|
2018-06-11 22:12:01 +00:00
|
|
|
[ts_external_token__open_start_tag] = true,
|
|
|
|
[ts_external_token_end_tag] = true,
|
|
|
|
[ts_external_token__implicit_end_tag] = true,
|
|
|
|
[ts_external_token__erroneous_end_tag] = true,
|
2018-06-11 22:36:18 +00:00
|
|
|
[ts_external_token_comment] = true,
|
2018-06-11 22:12:01 +00:00
|
|
|
},
|
2018-06-11 20:18:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static uint16_t ts_parse_table[STATE_COUNT][SYMBOL_COUNT] = {
|
|
|
|
[0] = {
|
2018-06-11 22:12:01 +00:00
|
|
|
[sym__open_start_tag] = ACTIONS(1),
|
|
|
|
[sym__close_start_tag] = ACTIONS(1),
|
|
|
|
[sym__self_close_start_tag] = ACTIONS(1),
|
|
|
|
[sym_end_tag] = ACTIONS(1),
|
|
|
|
[sym__implicit_end_tag] = ACTIONS(1),
|
|
|
|
[sym__erroneous_end_tag] = ACTIONS(1),
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym_comment] = ACTIONS(1),
|
2018-06-11 20:18:00 +00:00
|
|
|
[ts_builtin_sym_end] = ACTIONS(1),
|
|
|
|
[anon_sym_EQ] = ACTIONS(1),
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym_attribute_name] = ACTIONS(3),
|
|
|
|
[sym_attribute_value] = ACTIONS(3),
|
2018-06-11 20:18:00 +00:00
|
|
|
[anon_sym_SQUOTE] = ACTIONS(1),
|
|
|
|
[anon_sym_DQUOTE] = ACTIONS(1),
|
|
|
|
},
|
|
|
|
[1] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym_fragment] = STATE(3),
|
|
|
|
[sym__node] = STATE(6),
|
|
|
|
[sym_element] = STATE(6),
|
|
|
|
[sym_start_tag] = STATE(4),
|
|
|
|
[sym_self_closing_tag] = STATE(5),
|
|
|
|
[aux_sym_fragment_repeat1] = STATE(6),
|
|
|
|
[sym__open_start_tag] = ACTIONS(5),
|
|
|
|
[sym__erroneous_end_tag] = ACTIONS(7),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[ts_builtin_sym_end] = ACTIONS(11),
|
|
|
|
[sym_text] = ACTIONS(7),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[2] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym_attribute] = STATE(10),
|
|
|
|
[aux_sym_start_tag_repeat1] = STATE(10),
|
|
|
|
[sym__close_start_tag] = ACTIONS(13),
|
|
|
|
[sym__self_close_start_tag] = ACTIONS(15),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[sym_attribute_name] = ACTIONS(17),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[3] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[ts_builtin_sym_end] = ACTIONS(19),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[4] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__node] = STATE(15),
|
|
|
|
[sym_element] = STATE(15),
|
|
|
|
[sym_start_tag] = STATE(13),
|
|
|
|
[sym_self_closing_tag] = STATE(14),
|
|
|
|
[aux_sym_fragment_repeat1] = STATE(15),
|
|
|
|
[sym__open_start_tag] = ACTIONS(21),
|
|
|
|
[sym_end_tag] = ACTIONS(23),
|
|
|
|
[sym__implicit_end_tag] = ACTIONS(23),
|
|
|
|
[sym__erroneous_end_tag] = ACTIONS(25),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[sym_text] = ACTIONS(25),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[5] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__open_start_tag] = ACTIONS(27),
|
|
|
|
[sym__erroneous_end_tag] = ACTIONS(27),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[ts_builtin_sym_end] = ACTIONS(27),
|
|
|
|
[sym_text] = ACTIONS(27),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[6] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__node] = STATE(16),
|
|
|
|
[sym_element] = STATE(16),
|
|
|
|
[sym_start_tag] = STATE(4),
|
|
|
|
[sym_self_closing_tag] = STATE(5),
|
|
|
|
[aux_sym_fragment_repeat1] = STATE(16),
|
|
|
|
[sym__open_start_tag] = ACTIONS(5),
|
|
|
|
[sym__erroneous_end_tag] = ACTIONS(29),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[ts_builtin_sym_end] = ACTIONS(31),
|
|
|
|
[sym_text] = ACTIONS(29),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[7] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__open_start_tag] = ACTIONS(33),
|
|
|
|
[sym_end_tag] = ACTIONS(33),
|
|
|
|
[sym__implicit_end_tag] = ACTIONS(33),
|
|
|
|
[sym__erroneous_end_tag] = ACTIONS(33),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[sym_text] = ACTIONS(33),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[8] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__open_start_tag] = ACTIONS(35),
|
|
|
|
[sym__erroneous_end_tag] = ACTIONS(35),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[ts_builtin_sym_end] = ACTIONS(35),
|
|
|
|
[sym_text] = ACTIONS(35),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[9] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__close_start_tag] = ACTIONS(37),
|
|
|
|
[sym__self_close_start_tag] = ACTIONS(37),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[anon_sym_EQ] = ACTIONS(39),
|
|
|
|
[sym_attribute_name] = ACTIONS(37),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[10] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym_attribute] = STATE(20),
|
|
|
|
[aux_sym_start_tag_repeat1] = STATE(20),
|
|
|
|
[sym__close_start_tag] = ACTIONS(41),
|
|
|
|
[sym__self_close_start_tag] = ACTIONS(43),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[sym_attribute_name] = ACTIONS(17),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[11] = {
|
2018-06-11 22:12:01 +00:00
|
|
|
[sym_attribute] = STATE(22),
|
|
|
|
[aux_sym_start_tag_repeat1] = STATE(22),
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__close_start_tag] = ACTIONS(13),
|
|
|
|
[sym__self_close_start_tag] = ACTIONS(45),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[sym_attribute_name] = ACTIONS(17),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[12] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__open_start_tag] = ACTIONS(47),
|
|
|
|
[sym__erroneous_end_tag] = ACTIONS(47),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[ts_builtin_sym_end] = ACTIONS(47),
|
|
|
|
[sym_text] = ACTIONS(47),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[13] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__node] = STATE(24),
|
|
|
|
[sym_element] = STATE(24),
|
|
|
|
[sym_start_tag] = STATE(13),
|
|
|
|
[sym_self_closing_tag] = STATE(14),
|
|
|
|
[aux_sym_fragment_repeat1] = STATE(24),
|
|
|
|
[sym__open_start_tag] = ACTIONS(21),
|
|
|
|
[sym_end_tag] = ACTIONS(49),
|
|
|
|
[sym__implicit_end_tag] = ACTIONS(49),
|
|
|
|
[sym__erroneous_end_tag] = ACTIONS(51),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[sym_text] = ACTIONS(51),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[14] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__open_start_tag] = ACTIONS(27),
|
|
|
|
[sym_end_tag] = ACTIONS(27),
|
|
|
|
[sym__implicit_end_tag] = ACTIONS(27),
|
|
|
|
[sym__erroneous_end_tag] = ACTIONS(27),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[sym_text] = ACTIONS(27),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[15] = {
|
2018-06-11 22:12:01 +00:00
|
|
|
[sym__node] = STATE(26),
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym_element] = STATE(26),
|
|
|
|
[sym_start_tag] = STATE(13),
|
|
|
|
[sym_self_closing_tag] = STATE(14),
|
2018-06-11 22:12:01 +00:00
|
|
|
[aux_sym_fragment_repeat1] = STATE(26),
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__open_start_tag] = ACTIONS(21),
|
|
|
|
[sym_end_tag] = ACTIONS(53),
|
|
|
|
[sym__implicit_end_tag] = ACTIONS(53),
|
|
|
|
[sym__erroneous_end_tag] = ACTIONS(55),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[sym_text] = ACTIONS(55),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[16] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__node] = STATE(16),
|
|
|
|
[sym_element] = STATE(16),
|
|
|
|
[sym_start_tag] = STATE(4),
|
|
|
|
[sym_self_closing_tag] = STATE(5),
|
|
|
|
[aux_sym_fragment_repeat1] = STATE(16),
|
|
|
|
[sym__open_start_tag] = ACTIONS(57),
|
|
|
|
[sym__erroneous_end_tag] = ACTIONS(60),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[ts_builtin_sym_end] = ACTIONS(63),
|
|
|
|
[sym_text] = ACTIONS(60),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[17] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym_quoted_attribute_value] = STATE(27),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[sym_attribute_value] = ACTIONS(65),
|
|
|
|
[anon_sym_SQUOTE] = ACTIONS(67),
|
|
|
|
[anon_sym_DQUOTE] = ACTIONS(69),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[18] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__open_start_tag] = ACTIONS(71),
|
|
|
|
[sym_end_tag] = ACTIONS(71),
|
|
|
|
[sym__implicit_end_tag] = ACTIONS(71),
|
|
|
|
[sym__erroneous_end_tag] = ACTIONS(71),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[sym_text] = ACTIONS(71),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[19] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__open_start_tag] = ACTIONS(73),
|
|
|
|
[sym__erroneous_end_tag] = ACTIONS(73),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[ts_builtin_sym_end] = ACTIONS(73),
|
|
|
|
[sym_text] = ACTIONS(73),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[20] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym_attribute] = STATE(20),
|
|
|
|
[aux_sym_start_tag_repeat1] = STATE(20),
|
|
|
|
[sym__close_start_tag] = ACTIONS(75),
|
|
|
|
[sym__self_close_start_tag] = ACTIONS(75),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[sym_attribute_name] = ACTIONS(77),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[21] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__open_start_tag] = ACTIONS(35),
|
|
|
|
[sym_end_tag] = ACTIONS(35),
|
|
|
|
[sym__implicit_end_tag] = ACTIONS(35),
|
|
|
|
[sym__erroneous_end_tag] = ACTIONS(35),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[sym_text] = ACTIONS(35),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[22] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym_attribute] = STATE(20),
|
|
|
|
[aux_sym_start_tag_repeat1] = STATE(20),
|
|
|
|
[sym__close_start_tag] = ACTIONS(41),
|
|
|
|
[sym__self_close_start_tag] = ACTIONS(80),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[sym_attribute_name] = ACTIONS(17),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[23] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__open_start_tag] = ACTIONS(47),
|
|
|
|
[sym_end_tag] = ACTIONS(47),
|
|
|
|
[sym__implicit_end_tag] = ACTIONS(47),
|
|
|
|
[sym__erroneous_end_tag] = ACTIONS(47),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[sym_text] = ACTIONS(47),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[24] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__node] = STATE(26),
|
|
|
|
[sym_element] = STATE(26),
|
|
|
|
[sym_start_tag] = STATE(13),
|
|
|
|
[sym_self_closing_tag] = STATE(14),
|
|
|
|
[aux_sym_fragment_repeat1] = STATE(26),
|
|
|
|
[sym__open_start_tag] = ACTIONS(21),
|
|
|
|
[sym_end_tag] = ACTIONS(82),
|
|
|
|
[sym__implicit_end_tag] = ACTIONS(82),
|
|
|
|
[sym__erroneous_end_tag] = ACTIONS(55),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[sym_text] = ACTIONS(55),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[25] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__open_start_tag] = ACTIONS(84),
|
|
|
|
[sym__erroneous_end_tag] = ACTIONS(84),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[ts_builtin_sym_end] = ACTIONS(84),
|
|
|
|
[sym_text] = ACTIONS(84),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[26] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__node] = STATE(26),
|
|
|
|
[sym_element] = STATE(26),
|
|
|
|
[sym_start_tag] = STATE(13),
|
|
|
|
[sym_self_closing_tag] = STATE(14),
|
|
|
|
[aux_sym_fragment_repeat1] = STATE(26),
|
|
|
|
[sym__open_start_tag] = ACTIONS(86),
|
|
|
|
[sym_end_tag] = ACTIONS(63),
|
|
|
|
[sym__implicit_end_tag] = ACTIONS(63),
|
|
|
|
[sym__erroneous_end_tag] = ACTIONS(89),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[sym_text] = ACTIONS(89),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[27] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__close_start_tag] = ACTIONS(92),
|
|
|
|
[sym__self_close_start_tag] = ACTIONS(92),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[sym_attribute_name] = ACTIONS(92),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[28] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[anon_sym_SQUOTE] = ACTIONS(94),
|
|
|
|
[aux_sym_SLASH_LBRACK_CARET_SQUOTE_RBRACK_PLUS_SLASH] = ACTIONS(96),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[29] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[anon_sym_DQUOTE] = ACTIONS(94),
|
|
|
|
[aux_sym_SLASH_LBRACK_CARET_DQUOTE_RBRACK_PLUS_SLASH] = ACTIONS(98),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[30] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__open_start_tag] = ACTIONS(73),
|
|
|
|
[sym_end_tag] = ACTIONS(73),
|
|
|
|
[sym__implicit_end_tag] = ACTIONS(73),
|
|
|
|
[sym__erroneous_end_tag] = ACTIONS(73),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[sym_text] = ACTIONS(73),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[31] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__open_start_tag] = ACTIONS(84),
|
|
|
|
[sym_end_tag] = ACTIONS(84),
|
|
|
|
[sym__implicit_end_tag] = ACTIONS(84),
|
|
|
|
[sym__erroneous_end_tag] = ACTIONS(84),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[sym_text] = ACTIONS(84),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[32] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__close_start_tag] = ACTIONS(100),
|
|
|
|
[sym__self_close_start_tag] = ACTIONS(100),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[sym_attribute_name] = ACTIONS(100),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[33] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[anon_sym_SQUOTE] = ACTIONS(102),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[34] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[anon_sym_DQUOTE] = ACTIONS(102),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
[35] = {
|
2018-06-11 22:36:18 +00:00
|
|
|
[sym__close_start_tag] = ACTIONS(104),
|
|
|
|
[sym__self_close_start_tag] = ACTIONS(104),
|
|
|
|
[sym_comment] = ACTIONS(9),
|
|
|
|
[sym_attribute_name] = ACTIONS(104),
|
2018-06-11 20:18:00 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static TSParseActionEntry ts_parse_actions[] = {
|
|
|
|
[0] = {.count = 0, .reusable = false},
|
|
|
|
[1] = {.count = 1, .reusable = true}, RECOVER(),
|
2018-06-11 22:36:18 +00:00
|
|
|
[3] = {.count = 1, .reusable = false}, RECOVER(),
|
|
|
|
[5] = {.count = 1, .reusable = true}, SHIFT(2),
|
|
|
|
[7] = {.count = 1, .reusable = true}, SHIFT(6),
|
|
|
|
[9] = {.count = 1, .reusable = true}, SHIFT_EXTRA(),
|
|
|
|
[11] = {.count = 1, .reusable = true}, REDUCE(sym_fragment, 0),
|
|
|
|
[13] = {.count = 1, .reusable = true}, SHIFT(7),
|
|
|
|
[15] = {.count = 1, .reusable = true}, SHIFT(8),
|
|
|
|
[17] = {.count = 1, .reusable = true}, SHIFT(9),
|
|
|
|
[19] = {.count = 1, .reusable = true}, ACCEPT_INPUT(),
|
|
|
|
[21] = {.count = 1, .reusable = true}, SHIFT(11),
|
|
|
|
[23] = {.count = 1, .reusable = true}, SHIFT(12),
|
|
|
|
[25] = {.count = 1, .reusable = true}, SHIFT(15),
|
|
|
|
[27] = {.count = 1, .reusable = true}, REDUCE(sym_element, 1),
|
|
|
|
[29] = {.count = 1, .reusable = true}, SHIFT(16),
|
|
|
|
[31] = {.count = 1, .reusable = true}, REDUCE(sym_fragment, 1),
|
|
|
|
[33] = {.count = 1, .reusable = true}, REDUCE(sym_start_tag, 2),
|
|
|
|
[35] = {.count = 1, .reusable = true}, REDUCE(sym_self_closing_tag, 2),
|
|
|
|
[37] = {.count = 1, .reusable = true}, REDUCE(sym_attribute, 1),
|
|
|
|
[39] = {.count = 1, .reusable = true}, SHIFT(17),
|
|
|
|
[41] = {.count = 1, .reusable = true}, SHIFT(18),
|
|
|
|
[43] = {.count = 1, .reusable = true}, SHIFT(19),
|
|
|
|
[45] = {.count = 1, .reusable = true}, SHIFT(21),
|
|
|
|
[47] = {.count = 1, .reusable = true}, REDUCE(sym_element, 2),
|
|
|
|
[49] = {.count = 1, .reusable = true}, SHIFT(23),
|
|
|
|
[51] = {.count = 1, .reusable = true}, SHIFT(24),
|
|
|
|
[53] = {.count = 1, .reusable = true}, SHIFT(25),
|
|
|
|
[55] = {.count = 1, .reusable = true}, SHIFT(26),
|
|
|
|
[57] = {.count = 2, .reusable = true}, REDUCE(aux_sym_fragment_repeat1, 2), SHIFT_REPEAT(2),
|
|
|
|
[60] = {.count = 2, .reusable = true}, REDUCE(aux_sym_fragment_repeat1, 2), SHIFT_REPEAT(16),
|
|
|
|
[63] = {.count = 1, .reusable = true}, REDUCE(aux_sym_fragment_repeat1, 2),
|
|
|
|
[65] = {.count = 1, .reusable = true}, SHIFT(27),
|
|
|
|
[67] = {.count = 1, .reusable = true}, SHIFT(28),
|
|
|
|
[69] = {.count = 1, .reusable = true}, SHIFT(29),
|
|
|
|
[71] = {.count = 1, .reusable = true}, REDUCE(sym_start_tag, 3),
|
|
|
|
[73] = {.count = 1, .reusable = true}, REDUCE(sym_self_closing_tag, 3),
|
|
|
|
[75] = {.count = 1, .reusable = true}, REDUCE(aux_sym_start_tag_repeat1, 2),
|
|
|
|
[77] = {.count = 2, .reusable = true}, REDUCE(aux_sym_start_tag_repeat1, 2), SHIFT_REPEAT(9),
|
|
|
|
[80] = {.count = 1, .reusable = true}, SHIFT(30),
|
|
|
|
[82] = {.count = 1, .reusable = true}, SHIFT(31),
|
|
|
|
[84] = {.count = 1, .reusable = true}, REDUCE(sym_element, 3),
|
|
|
|
[86] = {.count = 2, .reusable = true}, REDUCE(aux_sym_fragment_repeat1, 2), SHIFT_REPEAT(11),
|
|
|
|
[89] = {.count = 2, .reusable = true}, REDUCE(aux_sym_fragment_repeat1, 2), SHIFT_REPEAT(26),
|
|
|
|
[92] = {.count = 1, .reusable = true}, REDUCE(sym_attribute, 3),
|
|
|
|
[94] = {.count = 1, .reusable = false}, SHIFT(32),
|
|
|
|
[96] = {.count = 1, .reusable = true}, SHIFT(33),
|
|
|
|
[98] = {.count = 1, .reusable = true}, SHIFT(34),
|
|
|
|
[100] = {.count = 1, .reusable = true}, REDUCE(sym_quoted_attribute_value, 2),
|
|
|
|
[102] = {.count = 1, .reusable = true}, SHIFT(35),
|
|
|
|
[104] = {.count = 1, .reusable = true}, REDUCE(sym_quoted_attribute_value, 3, .alias_sequence_id = 1),
|
2018-06-11 20:18:00 +00:00
|
|
|
};
|
|
|
|
|
2018-06-11 22:12:01 +00:00
|
|
|
void *tree_sitter_html_external_scanner_create();
|
|
|
|
void tree_sitter_html_external_scanner_destroy(void *);
|
|
|
|
bool tree_sitter_html_external_scanner_scan(void *, TSLexer *, const bool *);
|
|
|
|
unsigned tree_sitter_html_external_scanner_serialize(void *, char *);
|
|
|
|
void tree_sitter_html_external_scanner_deserialize(void *, const char *, unsigned);
|
|
|
|
|
2018-06-11 20:18:00 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
#define extern __declspec(dllexport)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern const TSLanguage *tree_sitter_html() {
|
|
|
|
static TSLanguage language = {
|
|
|
|
.version = LANGUAGE_VERSION,
|
|
|
|
.symbol_count = SYMBOL_COUNT,
|
|
|
|
.alias_count = ALIAS_COUNT,
|
|
|
|
.token_count = TOKEN_COUNT,
|
|
|
|
.symbol_metadata = ts_symbol_metadata,
|
|
|
|
.parse_table = (const unsigned short *)ts_parse_table,
|
|
|
|
.parse_actions = ts_parse_actions,
|
|
|
|
.lex_modes = ts_lex_modes,
|
|
|
|
.symbol_names = ts_symbol_names,
|
|
|
|
.alias_sequences = (const TSSymbol *)ts_alias_sequences,
|
|
|
|
.max_alias_sequence_length = MAX_ALIAS_SEQUENCE_LENGTH,
|
|
|
|
.lex_fn = ts_lex,
|
|
|
|
.external_token_count = EXTERNAL_TOKEN_COUNT,
|
2018-06-11 22:12:01 +00:00
|
|
|
.external_scanner = {
|
|
|
|
(const bool *)ts_external_scanner_states,
|
|
|
|
ts_external_scanner_symbol_map,
|
|
|
|
tree_sitter_html_external_scanner_create,
|
|
|
|
tree_sitter_html_external_scanner_destroy,
|
|
|
|
tree_sitter_html_external_scanner_scan,
|
|
|
|
tree_sitter_html_external_scanner_serialize,
|
|
|
|
tree_sitter_html_external_scanner_deserialize,
|
|
|
|
},
|
2018-06-11 20:18:00 +00:00
|
|
|
};
|
|
|
|
return &language;
|
|
|
|
}
|