11#define LEXBOR_STR_RES_ANSI_REPLACEMENT_CHARACTER
56lxb_html_tokenizer_state_doctype_before_public_identifier(
62lxb_html_tokenizer_state_doctype_public_identifier_double_quoted(
68lxb_html_tokenizer_state_doctype_public_identifier_single_quoted(
74lxb_html_tokenizer_state_doctype_after_public_identifier(
80lxb_html_tokenizer_state_doctype_between_public_and_system_identifiers(
91lxb_html_tokenizer_state_doctype_before_system_identifier(
97lxb_html_tokenizer_state_doctype_system_identifier_double_quoted(
103lxb_html_tokenizer_state_doctype_system_identifier_single_quoted(
109lxb_html_tokenizer_state_doctype_after_system_identifier(
128 if (tkz->
is_eof ==
false) {
137 return lxb_html_tokenizer_state_doctype(tkz,
data,
end);
188 tkz->
state = lxb_html_tokenizer_state_doctype_before_name;
245 tkz->
state = lxb_html_tokenizer_state_doctype_name;
269 tkz->
state = lxb_html_tokenizer_state_doctype_name;
308 tkz->
state = lxb_html_tokenizer_state_doctype_after_name;
428 if (*
data == 0x50 || *
data == 0x70) {
432 lxb_html_tokenizer_state_doctype_after_name_public;
441 if (*
data == 0x53 || *
data == 0x73) {
445 lxb_html_tokenizer_state_doctype_after_name_system;
458 if (attr_data ==
NULL) {
466 lxb_html_tokenizer_state_doctype_after_public_keyword;
478 if (attr_data ==
NULL) {
486 lxb_html_tokenizer_state_doctype_after_system_keyword;
498 tkz->
state = lxb_html_tokenizer_state_doctype_bogus;
530 tkz->
state = lxb_html_tokenizer_state_doctype_bogus;
542 if (attr_data ==
NULL) {
549 tkz->
state = lxb_html_tokenizer_state_doctype_after_public_keyword;
580 tkz->
state = lxb_html_tokenizer_state_doctype_bogus;
592 if (attr_data ==
NULL) {
599 tkz->
state = lxb_html_tokenizer_state_doctype_after_system_keyword;
631 lxb_html_tokenizer_state_doctype_before_public_identifier;
641 lxb_html_tokenizer_state_doctype_public_identifier_double_quoted;
651 lxb_html_tokenizer_state_doctype_public_identifier_single_quoted;
683 tkz->
state = lxb_html_tokenizer_state_doctype_bogus;
720 lxb_html_tokenizer_state_doctype_public_identifier_double_quoted;
727 lxb_html_tokenizer_state_doctype_public_identifier_single_quoted;
762 tkz->
state = lxb_html_tokenizer_state_doctype_bogus;
793 lxb_html_tokenizer_state_doctype_after_public_identifier;
817 tkz->
state_return = lxb_html_tokenizer_state_doctype_public_identifier_double_quoted;
908 lxb_html_tokenizer_state_doctype_after_public_identifier;
932 tkz->
state_return = lxb_html_tokenizer_state_doctype_public_identifier_single_quoted;
1024 lxb_html_tokenizer_state_doctype_between_public_and_system_identifiers;
1044 lxb_html_tokenizer_state_doctype_system_identifier_double_quoted;
1056 lxb_html_tokenizer_state_doctype_system_identifier_single_quoted;
1078 tkz->
state = lxb_html_tokenizer_state_doctype_bogus;
1090lxb_html_tokenizer_state_doctype_between_public_and_system_identifiers(
lxb_html_tokenizer_t *tkz,
1124 lxb_html_tokenizer_state_doctype_system_identifier_double_quoted;
1133 lxb_html_tokenizer_state_doctype_system_identifier_single_quoted;
1155 tkz->
state = lxb_html_tokenizer_state_doctype_bogus;
1185 lxb_html_tokenizer_state_doctype_before_system_identifier;
1195 lxb_html_tokenizer_state_doctype_system_identifier_double_quoted;
1205 lxb_html_tokenizer_state_doctype_system_identifier_single_quoted;
1236 tkz->
state = lxb_html_tokenizer_state_doctype_bogus;
1273 lxb_html_tokenizer_state_doctype_system_identifier_double_quoted;
1280 lxb_html_tokenizer_state_doctype_system_identifier_single_quoted;
1312 tkz->
state = lxb_html_tokenizer_state_doctype_bogus;
1346 lxb_html_tokenizer_state_doctype_after_system_identifier;
1370 tkz->
state_return = lxb_html_tokenizer_state_doctype_system_identifier_double_quoted;
1376 tkz->
pos[-1] = 0x0A;
1380 if (*
data != 0x0A) {
1461 lxb_html_tokenizer_state_doctype_after_system_identifier;
1485 tkz->
state_return = lxb_html_tokenizer_state_doctype_system_identifier_single_quoted;
1491 tkz->
pos[-1] = 0x0A;
1495 if (*
data != 0x0A) {
1557lxb_html_tokenizer_state_doctype_after_system_identifier(
1603 tkz->
state = lxb_html_tokenizer_state_doctype_bogus;
struct lexbor_hash lexbor_hash_t
hash(string $algo, string $data, bool $binary=false, array $options=[])
struct lxb_html_tokenizer lxb_html_tokenizer_t
void lxb_html_token_attr_delete(lxb_html_token_t *token, lxb_html_token_attr_t *attr, lexbor_dobject_t *dobj)
@ LXB_HTML_TOKEN_TYPE_FORCE_QUIRKS
lxb_html_tokenizer_error_t * lxb_html_tokenizer_error_add(lexbor_array_obj_t *parse_errors, const lxb_char_t *pos, lxb_html_tokenizer_error_id_t id)
@ LXB_HTML_TOKENIZER_ERROR_INCHSEAFDONA
@ LXB_HTML_TOKENIZER_ERROR_MIDOPUID
@ LXB_HTML_TOKENIZER_ERROR_MIDOSYID
@ LXB_HTML_TOKENIZER_ERROR_ABDOPUID
@ LXB_HTML_TOKENIZER_ERROR_MIWHBEDONA
@ LXB_HTML_TOKENIZER_ERROR_MIWHAFDOPUKE
@ LXB_HTML_TOKENIZER_ERROR_MIWHAFDOSYKE
@ LXB_HTML_TOKENIZER_ERROR_UNNUCH
@ LXB_HTML_TOKENIZER_ERROR_UNCHAFDOSYID
@ LXB_HTML_TOKENIZER_ERROR_MIDONA
@ LXB_HTML_TOKENIZER_ERROR_MIQUBEDOPUID
@ LXB_HTML_TOKENIZER_ERROR_MIQUBEDOSYID
@ LXB_HTML_TOKENIZER_ERROR_MIWHBEDOPUANSYID
@ LXB_HTML_TOKENIZER_ERROR_ABDOSYID
@ LXB_HTML_TOKENIZER_ERROR_EOINDO
const lxb_char_t * lxb_html_tokenizer_state_data_before(lxb_html_tokenizer_t *tkz, const lxb_char_t *data, const lxb_char_t *end)
const lxb_char_t * lxb_html_tokenizer_state_cr(lxb_html_tokenizer_t *tkz, const lxb_char_t *data, const lxb_char_t *end)
#define lxb_html_tokenizer_state_token_attr_set_value_end(tkz, v_end)
#define lxb_html_tokenizer_state_token_attr_add_m(tkz, attr, v_return)
#define lxb_html_tokenizer_state_token_attr_set_name_end_oef(tkz)
#define lxb_html_tokenizer_state_token_attr_set_value_end_oef(tkz)
#define lxb_html_tokenizer_state_append_data_m(tkz, v_data)
#define lxb_html_tokenizer_state_token_attr_set_name_begin(tkz, v_begin)
#define lxb_html_tokenizer_state_append_replace_m(tkz)
#define lxb_html_tokenizer_state_set_name_m(tkz)
#define lxb_html_tokenizer_state_token_done_m(tkz, v_end)
#define lxb_html_tokenizer_state_token_attr_set_name_end(tkz, v_end)
#define lxb_html_tokenizer_state_token_set_end(tkz, v_end)
#define lxb_html_tokenizer_state_token_set_end_oef(tkz)
#define lxb_html_tokenizer_state_token_attr_set_value_begin(tkz, v_begin)
#define lxb_html_tokenizer_state_begin_set(tkz, v_data)
#define lxb_html_tokenizer_state_set_value_m(tkz)
const lxb_dom_attr_data_t * lxb_dom_attr_data_by_id(lexbor_hash_t *hash, lxb_dom_attr_id_t attr_id)
unsigned const char * end
unsigned const char * pos
lxb_dom_attr_data_t * lxb_dom_attr_local_name_append(lexbor_hash_t *hash, const lxb_char_t *name, size_t length)
const lxb_char_t * lxb_html_tokenizer_state_doctype_before(lxb_html_tokenizer_t *tkz, const lxb_char_t *data, const lxb_char_t *end)
bool lexbor_str_data_ncasecmp(const lxb_char_t *first, const lxb_char_t *sec, size_t size)
const lxb_char_t * lexbor_str_data_ncasecmp_first(const lxb_char_t *first, const lxb_char_t *sec, size_t sec_size)
const lxb_char_t * value_begin
const lxb_dom_attr_data_t * name
const lxb_char_t * value_end
lxb_html_token_attr_type_t type
const lxb_char_t * name_end
lxb_html_token_type_t type
lxb_html_token_attr_t * attr_last
const lxb_char_t * markup
lxb_html_tokenizer_state_f state_return
lxb_html_tokenizer_state_f state
lexbor_array_obj_t * parse_errors
lexbor_dobject_t * dobj_token_attr
@ LXB_HTML_TOKEN_ATTR_TYPE_VALUE_NULL
@ LXB_HTML_TOKEN_ATTR_TYPE_NAME_NULL
struct lxb_html_token_attr lxb_html_token_attr_t