Home
last modified time | relevance | path

Searched refs:tkz (Results 1 – 25 of 28) sorted by relevance

12

/php-src/ext/dom/lexbor/lexbor/html/tokenizer/
H A Dstate_script.c269 tkz->entity_start = (tkz->pos - 1) - tkz->start; in lxb_html_tokenizer_state_script_data_end_tag_open()
347 tkz->pos = &tkz->start[tkz->entity_start]; in lxb_html_tokenizer_state_script_data_end_tag_name()
390 tkz->pos = &tkz->start[tkz->entity_start]; in lxb_html_tokenizer_state_script_data_end_tag_name()
397 tkz->token->begin = tkz->temp; in lxb_html_tokenizer_state_script_data_end_tag_name()
657 tkz->entity_start = tkz->pos - tkz->start; in lxb_html_tokenizer_state_script_data_escaped_less_than_sign()
679 tkz->entity_start = (tkz->pos - 1) - tkz->start; in lxb_html_tokenizer_state_script_data_escaped_end_tag_open()
757 tkz->pos = &tkz->start[tkz->entity_start]; in lxb_html_tokenizer_state_script_data_escaped_end_tag_name()
801 tkz->pos = &tkz->start[tkz->entity_start]; in lxb_html_tokenizer_state_script_data_escaped_end_tag_name()
808 tkz->token->begin = tkz->temp; in lxb_html_tokenizer_state_script_data_escaped_end_tag_name()
845 if ((tkz->pos - &tkz->start[tkz->entity_start]) == 6 in lxb_html_tokenizer_state_script_data_double_escape_start()
[all …]
H A Dstate.c553 lxb_html_tokenizer_state_set_tag_m(tkz, tkz->start, tkz->pos); in lxb_html_tokenizer_state_tag_name()
1261 tkz->state = tkz->state_return; in lxb_html_tokenizer_state_cr()
1767 tkz->entity_start = (tkz->pos - 1) - tkz->start; in _lxb_html_tokenizer_state_char_ref()
1776 tkz->entity_start = (tkz->pos - 1) - tkz->start; in _lxb_html_tokenizer_state_char_ref()
1785 tkz->state = tkz->state_return; in _lxb_html_tokenizer_state_char_ref()
1819 tkz->entity_end = (tkz->pos + (data - begin)) - tkz->start; in lxb_html_tokenizer_state_char_ref_named()
1843 tkz->state = tkz->state_return; in lxb_html_tokenizer_state_char_ref_named()
1871 tail_size = tkz->pos - &tkz->start[tkz->entity_end] - 1; in lxb_html_tokenizer_state_char_ref_named()
1909 tkz->state = tkz->state_return; in lxb_html_tokenizer_state_char_ref_ambiguous_ampersand()
1957 tkz->state = tkz->state_return; in lxb_html_tokenizer_state_char_ref_hexademical_start()
[all …]
H A Dstate_doctype.c171 lxb_html_tokenizer_error_add(tkz->parse_errors, tkz->last, in lxb_html_tokenizer_state_doctype()
225 lxb_html_tokenizer_error_add(tkz->parse_errors, tkz->last, in lxb_html_tokenizer_state_doctype_before_name()
524 lxb_html_token_attr_delete(tkz->token, tkz->token->attr_last, in lxb_html_tokenizer_state_doctype_after_name_public()
554 tkz->markup = pos; in lxb_html_tokenizer_state_doctype_after_name_public()
574 lxb_html_token_attr_delete(tkz->token, tkz->token->attr_last, in lxb_html_tokenizer_state_doctype_after_name_system()
604 tkz->markup = pos; in lxb_html_tokenizer_state_doctype_after_name_system()
672 lxb_html_tokenizer_error_add(tkz->parse_errors, tkz->last, in lxb_html_tokenizer_state_doctype_after_public_keyword()
746 lxb_html_tokenizer_error_add(tkz->parse_errors, tkz->last, in lxb_html_tokenizer_state_doctype_before_public_identifier()
1063 lxb_html_tokenizer_error_add(tkz->parse_errors, tkz->last, in lxb_html_tokenizer_state_doctype_after_public_identifier()
1140 lxb_html_tokenizer_error_add(tkz->parse_errors, tkz->last, in lxb_html_tokenizer_state_doctype_between_public_and_system_identifiers()
[all …]
H A Dstate_rcdata.c180 tkz->entity_start = (tkz->pos - 1) - tkz->start; in lxb_html_tokenizer_state_rcdata_end_tag_open()
218 lxb_html_tokenizer_state_set_tag_m(tkz, &tkz->start[tkz->entity_start] + 2, in lxb_html_tokenizer_state_rcdata_end_tag_name()
221 if (tkz->tmp_tag_id != tkz->token->tag_id) { in lxb_html_tokenizer_state_rcdata_end_tag_name()
231 lxb_html_tokenizer_state_set_tag_m(tkz, &tkz->start[tkz->entity_start] + 2, in lxb_html_tokenizer_state_rcdata_end_tag_name()
234 if (tkz->tmp_tag_id != tkz->token->tag_id) { in lxb_html_tokenizer_state_rcdata_end_tag_name()
244 lxb_html_tokenizer_state_set_tag_m(tkz, &tkz->start[tkz->entity_start] + 2, in lxb_html_tokenizer_state_rcdata_end_tag_name()
255 tkz->pos = &tkz->start[tkz->entity_start]; in lxb_html_tokenizer_state_rcdata_end_tag_name()
261 tkz->token->tag_id = tkz->tmp_tag_id; in lxb_html_tokenizer_state_rcdata_end_tag_name()
262 tkz->token->begin = tkz->temp; in lxb_html_tokenizer_state_rcdata_end_tag_name()
300 tkz->pos = &tkz->start[tkz->entity_start]; in lxb_html_tokenizer_state_rcdata_end_tag_name()
[all …]
H A Dstate_rawtext.c171 tkz->entity_start = (tkz->pos - 1) - tkz->start; in lxb_html_tokenizer_state_rawtext_end_tag_open()
209 lxb_html_tokenizer_state_set_tag_m(tkz, &tkz->start[tkz->entity_start] + 2, in lxb_html_tokenizer_state_rawtext_end_tag_name()
212 if (tkz->tmp_tag_id != tkz->token->tag_id) { in lxb_html_tokenizer_state_rawtext_end_tag_name()
222 lxb_html_tokenizer_state_set_tag_m(tkz, &tkz->start[tkz->entity_start] + 2, in lxb_html_tokenizer_state_rawtext_end_tag_name()
235 lxb_html_tokenizer_state_set_tag_m(tkz, &tkz->start[tkz->entity_start] + 2, in lxb_html_tokenizer_state_rawtext_end_tag_name()
246 tkz->pos = &tkz->start[tkz->entity_start]; in lxb_html_tokenizer_state_rawtext_end_tag_name()
252 tkz->token->tag_id = tkz->tmp_tag_id; in lxb_html_tokenizer_state_rawtext_end_tag_name()
253 tkz->token->begin = tkz->temp; in lxb_html_tokenizer_state_rawtext_end_tag_name()
291 tkz->pos = &tkz->start[tkz->entity_start]; in lxb_html_tokenizer_state_rawtext_end_tag_name()
297 tkz->token->tag_id = tkz->tmp_tag_id; in lxb_html_tokenizer_state_rawtext_end_tag_name()
[all …]
H A Dstate.h17 (tkz->begin = v_data)
63 data = lxb_dom_attr_local_name_append(tkz->attrs, tkz->start, \
64 tkz->pos - tkz->start); \
77 attr->value_size = (size_t) (tkz->pos - tkz->start); \
91 tkz->pos = tkz->start; \
93 tkz->token->line = tkz->current_line; \
94 tkz->token->column = tkz->current_column; \
109 (tkz->token->end = tkz->last)
132 (tkz->token->attr_last->name_end = tkz->last)
145 (tkz->token->attr_last->value_end = tkz->last)
[all …]
H A Dstate_comment.c145 if (tkz->is_eof) { in lxb_html_tokenizer_state_comment_start_dash()
148 lxb_html_tokenizer_error_add(tkz->parse_errors, tkz->last, in lxb_html_tokenizer_state_comment_start_dash()
231 lxb_html_tokenizer_error_add(tkz->parse_errors, tkz->token->end, in lxb_html_tokenizer_state_comment()
318 tkz->state = in lxb_html_tokenizer_state_comment_less_than_sign_bang_dash()
346 if (tkz->is_eof) { in lxb_html_tokenizer_state_comment_less_than_sign_bang_dash_dash()
377 if (tkz->is_eof) { in lxb_html_tokenizer_state_comment_end_dash()
378 lxb_html_tokenizer_error_add(tkz->parse_errors, tkz->last, in lxb_html_tokenizer_state_comment_end_dash()
429 if (tkz->is_eof) { in lxb_html_tokenizer_state_comment_end()
430 lxb_html_tokenizer_error_add(tkz->parse_errors, tkz->last, in lxb_html_tokenizer_state_comment_end()
475 if (tkz->is_eof) { in lxb_html_tokenizer_state_comment_end_bang()
[all …]
H A Dstate_comment.h18 lxb_html_tokenizer_state_comment_before_start(lxb_html_tokenizer_t *tkz,
H A Dstate_script.h23 lxb_html_tokenizer_state_script_data_before(lxb_html_tokenizer_t *tkz,
H A Dstate_doctype.h18 lxb_html_tokenizer_state_doctype_before(lxb_html_tokenizer_t *tkz,
H A Dstate_rawtext.h23 lxb_html_tokenizer_state_rawtext_before(lxb_html_tokenizer_t *tkz,
H A Dstate_rcdata.h23 lxb_html_tokenizer_state_rcdata_before(lxb_html_tokenizer_t *tkz,
/php-src/ext/dom/lexbor/lexbor/html/
H A Dtokenizer.c92 tkz->pos = tkz->start; in lxb_html_tokenizer_init()
93 tkz->end = tkz->start + LXB_HTML_TKZ_TEMP_SIZE; in lxb_html_tokenizer_init()
181 if (tkz == NULL || tkz->ref_count == 0) { in lxb_html_tokenizer_unref()
186 tkz->base = lxb_html_tokenizer_unref(tkz->base); in lxb_html_tokenizer_unref()
209 tkz->pos = tkz->start; in lxb_html_tokenizer_clean()
255 tkz->tags = lexbor_hash_destroy(tkz->tags, true); in lxb_html_tokenizer_tags_destroy()
269 tkz->attrs = lexbor_hash_destroy(tkz->attrs, true); in lxb_html_tokenizer_attrs_destroy()
294 tkz->attrs_mraw = tkz->mraw; in lxb_html_tokenizer_begin()
299 tkz->token = lxb_html_token_create(tkz->dobj_token); in lxb_html_tokenizer_begin()
356 while (tkz->state(tkz, data, end) < end) { in lxb_html_tokenizer_end()
[all …]
H A Dtokenizer.h172 tkz->tags = tags; in lxb_html_tokenizer_tags_set()
178 return tkz->tags; in lxb_html_tokenizer_tags()
256 size_t length = tkz->pos - tkz->start; in lxb_html_tokenizer_temp_realloc()
257 size_t new_size = (tkz->end - tkz->start) + size + 4096; in lxb_html_tokenizer_temp_realloc()
259 tkz->start = (lxb_char_t *)lexbor_realloc(tkz->start, new_size); in lxb_html_tokenizer_temp_realloc()
265 tkz->pos = tkz->start + length; in lxb_html_tokenizer_temp_realloc()
266 tkz->end = tkz->start + new_size; in lxb_html_tokenizer_temp_realloc()
277 if ((tkz->pos + size) > tkz->end) { in lxb_html_tokenizer_temp_append_data()
283 tkz->pos = (lxb_char_t *) memcpy(tkz->pos, tkz->begin, size) + size; in lxb_html_tokenizer_temp_append_data()
292 if ((tkz->pos + size) > tkz->end) { in lxb_html_tokenizer_temp_append()
[all …]
H A Dparser.c39 parser->tkz = lxb_html_tokenizer_create(); in lxb_html_parser_init()
40 lxb_status_t status = lxb_html_tokenizer_init(parser->tkz); in lxb_html_parser_init()
48 status = lxb_html_tree_init(parser->tree, parser->tkz); in lxb_html_parser_init()
74 lxb_html_tokenizer_clean(parser->tkz); in lxb_html_parser_clean()
85 parser->tkz = lxb_html_tokenizer_unref(parser->tkz); in lxb_html_parser_destroy()
253 parser->original_tree = lxb_html_tokenizer_tree(parser->tkz); in lxb_html_parse_fragment_chunk_begin()
254 lxb_html_tokenizer_tree_set(parser->tkz, parser->tree); in lxb_html_parse_fragment_chunk_begin()
256 lxb_html_tokenizer_tags_set(parser->tkz, doc->tags); in lxb_html_parse_fragment_chunk_begin()
257 lxb_html_tokenizer_attrs_set(parser->tkz, doc->attrs); in lxb_html_parse_fragment_chunk_begin()
258 lxb_html_tokenizer_attrs_mraw_set(parser->tkz, doc->text); in lxb_html_parse_fragment_chunk_begin()
[all …]
H A Dparser.h31 lxb_html_tokenizer_t *tkz; member
110 return parser->tkz; in lxb_html_parser_tokenizer()
H A Dtoken.h98 lxb_html_token_find_attr(lxb_html_tokenizer_t *tkz, lxb_html_token_t *token,
/php-src/ext/dom/lexbor/lexbor/css/syntax/
H A Dstate.h19 lxb_css_syntax_state_delim(lxb_css_syntax_tokenizer_t *tkz,
24 lxb_css_syntax_state_comment(lxb_css_syntax_tokenizer_t *tkz, lxb_css_syntax_token_t *token,
32 lxb_css_syntax_state_string(lxb_css_syntax_tokenizer_t *tkz, lxb_css_syntax_token_t *token,
36 lxb_css_syntax_state_hash(lxb_css_syntax_tokenizer_t *tkz, lxb_css_syntax_token_t *token,
48 lxb_css_syntax_state_plus(lxb_css_syntax_tokenizer_t *tkz, lxb_css_syntax_token_t *token,
52 lxb_css_syntax_state_plus_process(lxb_css_syntax_tokenizer_t *tkz,
57 lxb_css_syntax_state_comma(lxb_css_syntax_tokenizer_t *tkz, lxb_css_syntax_token_t *token,
65 lxb_css_syntax_state_minus_process(lxb_css_syntax_tokenizer_t *tkz,
86 lxb_css_syntax_state_at(lxb_css_syntax_tokenizer_t *tkz, lxb_css_syntax_token_t *token,
114 lxb_css_syntax_state_ident_like_begin(lxb_css_syntax_tokenizer_t *tkz,
[all …]
H A Dtokenizer.h22 (*lxb_css_syntax_tokenizer_state_f)(lxb_css_syntax_tokenizer_t *tkz,
27 (*lxb_css_syntax_tokenizer_chunk_f)(lxb_css_syntax_tokenizer_t *tkz,
81 lxb_css_syntax_tokenizer_init(lxb_css_syntax_tokenizer_t *tkz);
84 lxb_css_syntax_tokenizer_clean(lxb_css_syntax_tokenizer_t *tkz);
87 lxb_css_syntax_tokenizer_destroy(lxb_css_syntax_tokenizer_t *tkz);
110 lxb_css_syntax_tokenizer_status(lxb_css_syntax_tokenizer_t *tkz) in lxb_css_syntax_tokenizer_status() argument
112 return tkz->status; in lxb_css_syntax_tokenizer_status()
120 tkz->chunk_cb = cb; in lxb_css_syntax_tokenizer_chunk_cb_set()
121 tkz->chunk_ctx = ctx; in lxb_css_syntax_tokenizer_chunk_cb_set()
128 tkz->in_begin = data; in lxb_css_syntax_tokenizer_buffer_set()
[all …]
H A Dtoken.h199 lxb_css_syntax_token(lxb_css_syntax_tokenizer_t *tkz);
202 lxb_css_syntax_token_next(lxb_css_syntax_tokenizer_t *tkz);
205 lxb_css_syntax_token_consume(lxb_css_syntax_tokenizer_t *tkz);
208 lxb_css_syntax_token_consume_n(lxb_css_syntax_tokenizer_t *tkz, unsigned count);
215 lxb_css_syntax_token_string_make(lxb_css_syntax_tokenizer_t *tkz,
219 lxb_css_syntax_token_cached_create(lxb_css_syntax_tokenizer_t *tkz);
222 lxb_css_syntax_token_string_free(lxb_css_syntax_tokenizer_t *tkz,
283 lxb_css_syntax_token_wo_ws(lxb_css_syntax_tokenizer_t *tkz) in lxb_css_syntax_token_wo_ws() argument
287 token = lxb_css_syntax_token(tkz); in lxb_css_syntax_token_wo_ws()
293 lxb_css_syntax_token_consume(tkz); in lxb_css_syntax_token_wo_ws()
[all …]
H A Dparser.h88 lxb_css_syntax_parser_tkz_cb(lxb_css_syntax_tokenizer_t *tkz,
H A Dsyntax.h147 lxb_css_syntax_codepoint_to_ascii(lxb_css_syntax_tokenizer_t *tkz,
/php-src/ext/dom/lexbor/patches/
H A D0001-Expose-line-and-column-information-for-use-in-PHP.patch49 tkz->pos = tkz->start;
50 tkz->end = tkz->start + LXB_HTML_TKZ_TEMP_SIZE;
53 tkz->tree = NULL;
54 tkz->tags = NULL;
65 tkz->last = end;
68 - data = tkz->state(tkz, data, end);
70 + const lxb_char_t *new_data = tkz->state(tkz, data, end);
91 return tkz->status;
111 tkz->pos = tkz->start; \
113 + tkz->token->line = tkz->current_line; \
[all …]
H A D0001-Shrink-size-of-static-binary-search-tree.patch41 @@ -1815,7 +1815,7 @@ lxb_html_tokenizer_state_char_ref_named(lxb_html_tokenizer_t *tkz,
47 tkz->entity_end = (tkz->pos + (data - begin)) - tkz->start;
48 tkz->entity_match = entry;
/php-src/ext/dom/lexbor/lexbor/css/
H A Dparser.h25 return lxb_css_parser_fail((parser), (parser)->tkz->status); \
32 token = lxb_css_syntax_token_next((parser)->tkz); \
34 return lxb_css_parser_fail((parser), (parser)->tkz->status); \
43 return lxb_css_parser_fail((parser), (parser)->tkz->status); \
50 return lxb_css_parser_fail((parser), (parser)->tkz->status); \
59 return parser->tkz->status; \
136 lxb_css_syntax_tokenizer_t *tkz; member
331 *length = parser->tkz->in_end - parser->tkz->in_begin; in lxb_css_parser_buffer()
334 return parser->tkz->in_begin; in lxb_css_parser_buffer()
341 lxb_css_syntax_tokenizer_buffer_set(parser->tkz, data, length); in lxb_css_parser_buffer_set()
[all …]

Completed in 179 milliseconds

12