Home
last modified time | relevance | path

Searched refs:tkz (Results 1 – 25 of 39) 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.c556 lxb_html_tokenizer_state_set_tag_m(tkz, tkz->start, tkz->pos); in lxb_html_tokenizer_state_tag_name()
1266 tkz->state = tkz->state_return; in lxb_html_tokenizer_state_cr()
1772 tkz->entity_start = (tkz->pos - 1) - tkz->start; in _lxb_html_tokenizer_state_char_ref()
1781 tkz->entity_start = (tkz->pos - 1) - tkz->start; in _lxb_html_tokenizer_state_char_ref()
1790 tkz->state = tkz->state_return; in _lxb_html_tokenizer_state_char_ref()
1824 tkz->entity_end = (tkz->pos + (data - begin)) - tkz->start; in lxb_html_tokenizer_state_char_ref_named()
1848 tkz->state = tkz->state_return; in lxb_html_tokenizer_state_char_ref_named()
1876 tail_size = tkz->pos - &tkz->start[tkz->entity_end] - 1; in lxb_html_tokenizer_state_char_ref_named()
1914 tkz->state = tkz->state_return; in lxb_html_tokenizer_state_char_ref_ambiguous_ampersand()
1962 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,
/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()
205 lxb_html_tokenizer_tmp_tag_id_set(parser->tkz, LXB_TAG__UNDEF); in lxb_html_parse_fragment_chunk_begin()
255 lxb_html_tokenizer_tree_set(parser->tkz, parser->tree); in lxb_html_parse_fragment_chunk_begin()
257 lxb_html_tokenizer_tags_set(parser->tkz, doc->tags); in lxb_html_parse_fragment_chunk_begin()
258 lxb_html_tokenizer_attrs_set(parser->tkz, doc->attrs); in lxb_html_parse_fragment_chunk_begin()
259 lxb_html_tokenizer_attrs_mraw_set(parser->tkz, doc->text); in lxb_html_parse_fragment_chunk_begin()
[all …]
/php-src/ext/dom/lexbor/lexbor/css/syntax/
H A Dtokenizer.c111 tkz->pos = tkz->start; in lxb_css_syntax_tokenizer_init()
112 tkz->end = tkz->start + tmp_size; in lxb_css_syntax_tokenizer_init()
151 tkz->pos = tkz->start; in lxb_css_syntax_tokenizer_clean()
172 tkz->start = lexbor_free(tkz->start); in lxb_css_syntax_tokenizer_destroy()
288 if (tkz->cache_pos < tkz->prepared) { in lxb_css_syntax_tokenizer_token()
297 token = tkz->cache->list[tkz->prepared]; in lxb_css_syntax_tokenizer_token()
302 if (tkz->prepared >= tkz->cache->length) { in lxb_css_syntax_tokenizer_token()
334 if (tkz->cache_pos < tkz->cache->length) { in lxb_css_syntax_tokenizer_token()
400 tkz->status = tkz->chunk_cb(tkz, data, end, tkz->chunk_ctx); in lxb_css_syntax_tokenizer_next_chunk()
429 if (tkz->cache_pos + 1 < tkz->cache->length) { in lxb_css_syntax_tokenizer_lookup_colon()
[all …]
H A Dstate.c112 size_t len = tkz->pos - tkz->start; in lxb_css_syntax_string_realloc()
113 size_t size = (tkz->end - tkz->start) + upto; in lxb_css_syntax_string_realloc()
132 if ((size_t) (tkz->end - tkz->pos) <= length) { in lxb_css_syntax_string_append()
148 if (tkz->pos >= tkz->end) { in lxb_css_syntax_state_string_term()
171 tkz->pos = tkz->start; in lxb_css_syntax_state_string_set()
188 tkz->pos = tkz->start; in lxb_css_syntax_state_dimension_set()
197 tkz->prepared = tkz->cache->length; in lxb_css_syntax_state_token_create()
2201 tkz->pos = tkz->start; in lxb_css_syntax_state_ident_like()
2233 if (tkz->pos >= tkz->end) { in lxb_css_syntax_state_ident_like()
2258 tkz->pos = tkz->start; in lxb_css_syntax_state_ident_like()
[all …]
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.c47 if (tkz->cache_pos < tkz->cache->length in lxb_css_syntax_token()
48 && (tkz->prepared == 0 || tkz->cache_pos < tkz->prepared)) in lxb_css_syntax_token()
50 return tkz->cache->list[tkz->cache_pos]; in lxb_css_syntax_token()
67 if (tkz->cache_pos < tkz->cache->length) { in lxb_css_syntax_token_consume()
68 if (tkz->prepared != 0 && tkz->cache_pos >= tkz->prepared) { in lxb_css_syntax_token_consume()
72 token = tkz->cache->list[tkz->cache_pos]; in lxb_css_syntax_token_consume()
77 tkz->cache_pos += 1; in lxb_css_syntax_token_consume()
79 if (tkz->cache_pos >= tkz->cache->length) { in lxb_css_syntax_token_consume()
81 tkz->cache_pos = 0; in lxb_css_syntax_token_consume()
152 return tkz->status; in lxb_css_syntax_token_string_make()
[all …]
H A Dparser.c147 token = lxb_css_syntax_token(parser->tkz); in lxb_css_syntax_parser_token()
174 lxb_css_syntax_token_consume(parser->tkz); in lxb_css_syntax_parser_consume()
1064 lxb_css_syntax_token_consume(parser->tkz); in lxb_css_syntax_parser_declarations_name()
1066 token = lxb_css_syntax_token(parser->tkz); in lxb_css_syntax_parser_declarations_name()
1095 lxb_css_syntax_token_consume(parser->tkz); in lxb_css_syntax_parser_declarations_name()
1097 token = lxb_css_syntax_token(parser->tkz); in lxb_css_syntax_parser_declarations_name()
1105 lxb_css_syntax_token_consume(parser->tkz); in lxb_css_syntax_parser_declarations_name()
1107 token = lxb_css_syntax_token(parser->tkz); in lxb_css_syntax_parser_declarations_name()
1477 lxb_css_syntax_token_consume(parser->tkz); in lxb_css_syntax_parser_declarations_end()
1479 token = lxb_css_syntax_token(parser->tkz); in lxb_css_syntax_parser_declarations_end()
[all …]
H A Dsyntax.c51 parser->tkz->with_comment = false; in lxb_css_syntax_parse_list_rules()
92 lxb_css_syntax_codepoint_to_ascii(lxb_css_syntax_tokenizer_t *tkz, in lxb_css_syntax_codepoint_to_ascii() argument
100 memcpy(tkz->pos, lexbor_str_res_ansi_replacement_character, 3); in lxb_css_syntax_codepoint_to_ascii()
102 tkz->pos += 3; in lxb_css_syntax_codepoint_to_ascii()
103 *tkz->pos = '\0'; in lxb_css_syntax_codepoint_to_ascii()
108 lxb_char_t *data = tkz->pos; in lxb_css_syntax_codepoint_to_ascii()
114 tkz->pos += 1; in lxb_css_syntax_codepoint_to_ascii()
121 tkz->pos += 2; in lxb_css_syntax_codepoint_to_ascii()
129 tkz->pos += 3; in lxb_css_syntax_codepoint_to_ascii()
138 tkz->pos += 4; in lxb_css_syntax_codepoint_to_ascii()
[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 …]
/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 D0005-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 …]
H A Dparser.c19 lxb_css_parser_init(lxb_css_parser_t *parser, lxb_css_syntax_tokenizer_t *tkz) in lxb_css_parser_init() argument
45 if (tkz == NULL) { in lxb_css_parser_init()
46 tkz = lxb_css_syntax_tokenizer_create(); in lxb_css_parser_init()
47 status = lxb_css_syntax_tokenizer_init(tkz); in lxb_css_parser_init()
91 parser->tkz = tkz; in lxb_css_parser_init()
106 lxb_css_syntax_tokenizer_clean(parser->tkz); in lxb_css_parser_clean()
137 parser->tkz = lxb_css_syntax_tokenizer_destroy(parser->tkz); in lxb_css_parser_destroy()

Completed in 110 milliseconds

12