Home
last modified time | relevance | path

Searched refs:parser (Results 1 – 25 of 164) sorted by relevance

1234567

/php-src/ext/dom/lexbor/lexbor/html/
H A Dparser.c48 status = lxb_html_tree_init(parser->tree, parser->tkz); in lxb_html_parser_init()
85 parser->tkz = lxb_html_tokenizer_unref(parser->tkz); in lxb_html_parser_destroy()
86 parser->tree = lxb_html_tree_unref(parser->tree); in lxb_html_parser_destroy()
100 return parser; in lxb_html_parser_ref()
106 if (parser == NULL || parser->ref_count == 0) { in lxb_html_parser_unref()
226 parser->status = lxb_html_tree_open_elements_push(parser->tree, parser->root); in lxb_html_parse_fragment_chunk_begin()
255 lxb_html_tokenizer_tree_set(parser->tkz, parser->tree); in lxb_html_parse_fragment_chunk_begin()
261 parser->status = lxb_html_tree_begin(parser->tree, new_doc); in lxb_html_parse_fragment_chunk_begin()
309 parser->status = lxb_html_tree_end(parser->tree); in lxb_html_parse_fragment_chunk_end()
361 lxb_html_tokenizer_tree_set(parser->tkz, parser->tree); in lxb_html_parse_chunk_prepare()
[all …]
H A Dparser.h50 lxb_html_parser_init(lxb_html_parser_t *parser);
53 lxb_html_parser_clean(lxb_html_parser_t *parser);
56 lxb_html_parser_destroy(lxb_html_parser_t *parser);
59 lxb_html_parser_ref(lxb_html_parser_t *parser);
62 lxb_html_parser_unref(lxb_html_parser_t *parser);
110 return parser->tkz; in lxb_html_parser_tokenizer()
114 lxb_html_parser_tree(lxb_html_parser_t *parser) in lxb_html_parser_tree() argument
116 return parser->tree; in lxb_html_parser_tree()
122 return parser->status; in lxb_html_parser_status()
126 lxb_html_parser_state(lxb_html_parser_t *parser) in lxb_html_parser_state() argument
[all …]
/php-src/ext/dom/lexbor/lexbor/css/
H A Dparser.c36 parser->states = parser->states_begin; in lxb_css_parser_init()
62 parser->rules_end = parser->rules_begin + lxb_rules_length; in lxb_css_parser_init()
63 parser->rules = parser->rules_begin; in lxb_css_parser_init()
109 parser->rules = parser->rules_begin; in lxb_css_parser_clean()
110 parser->states = parser->states_begin; in lxb_css_parser_clean()
111 parser->types_pos = parser->types_begin; in lxb_css_parser_clean()
140 parser->log = lxb_css_log_destroy(parser->log, true); in lxb_css_parser_destroy()
155 parser->str.data = lexbor_free(parser->str.data); in lxb_css_parser_destroy()
231 if (parser->types_pos >= parser->types_end) { in lxb_css_parser_types_push()
232 length = parser->types_end - parser->types_begin; in lxb_css_parser_types_push()
[all …]
H A Dparser.h25 return lxb_css_parser_fail((parser), (parser)->tkz->status); \
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); \
309 if (rules > parser->rules_begin && rules < parser->rules_end) { in lxb_css_parser_failed_set_by_id()
331 *length = parser->tkz->in_end - parser->tkz->in_begin; in lxb_css_parser_buffer()
436 parser->states = parser->states_begin; in lxb_css_parser_states_clean()
456 parser->states++; in lxb_css_parser_states_up()
462 parser->states--; in lxb_css_parser_states_down()
468 return parser->log; in lxb_css_parser_log()
[all …]
H A Dstate.c13 lxb_css_state_success(lxb_css_parser_t *parser, in lxb_css_state_success() argument
18 lxb_css_syntax_parser_consume(parser); in lxb_css_state_success()
28 return lxb_css_parser_failed(parser); in lxb_css_state_success()
32 lxb_css_state_failed(lxb_css_parser_t *parser, in lxb_css_state_failed() argument
36 return lxb_css_parser_success(parser); in lxb_css_state_failed()
41 lxb_css_syntax_token_consume(parser->tkz); in lxb_css_state_failed()
47 lxb_css_state_stop(lxb_css_parser_t *parser, in lxb_css_state_stop() argument
50 return lxb_css_parser_stop(parser); in lxb_css_state_stop()
/php-src/ext/dom/lexbor/lexbor/css/selectors/
H A Dpseudo_state.c43 parser->selectors->list = NULL; in lxb_css_selectors_state_pseudo_anb_begin()
49 parser->selectors->list = NULL; in lxb_css_selectors_state_pseudo_anb_begin()
68 parser->selectors->list = NULL; in lxb_css_selectors_state_pseudo_class_function_current()
87 parser->selectors->list = NULL; in lxb_css_selectors_state_pseudo_class_function_has()
99 parser->selectors->list = NULL; in lxb_css_selectors_state_pseudo_class_function_is()
118 parser->selectors->list = NULL; in lxb_css_selectors_state_pseudo_class_function_not()
172 parser->selectors->list = NULL; in lxb_css_selectors_state_pseudo_class_function_where()
194 selectors = parser->selectors; in lxb_css_selectors_state_pseudo_anb()
202 parser->status = lxb_css_syntax_anb_handler(parser, token, &anbof->anb); in lxb_css_selectors_state_pseudo_anb()
228 selectors = parser->selectors; in lxb_css_selectors_state_pseudo_of_begin()
[all …]
H A Dstate.c640 lxb_css_selectors_state_list_append(parser, parser->selectors, list); in lxb_css_selectors_state_compound_wo_root()
950 lxb_css_selectors_state_list_append(parser, parser->selectors, list); in lxb_css_selectors_state_simple_wo_root()
1060 selectors = parser->selectors; in lxb_css_selectors_state_hash()
1121 selectors = parser->selectors; in lxb_css_selectors_state_element_ns()
1154 selectors = parser->selectors; in lxb_css_selectors_state_element()
1180 selectors = parser->selectors; in lxb_css_selectors_state_attribute()
1451 selectors = parser->selectors; in lxb_css_selectors_state_pseudo_class()
1517 selectors = parser->selectors; in lxb_css_selectors_state_pseudo_class_function()
1574 return parser->status; in lxb_css_selectors_state_pseudo_class_function()
1587 selectors = parser->selectors; in lxb_css_selectors_state_pseudo_element()
[all …]
H A Dselectors.c188 parser->old_memory = parser->memory; in lxb_css_selectors_parse_prepare()
189 parser->old_selectors = parser->selectors; in lxb_css_selectors_parse_prepare()
191 parser->memory = memory; in lxb_css_selectors_parse_prepare()
192 parser->selectors = selectors; in lxb_css_selectors_parse_prepare()
213 parser->status = lxb_css_syntax_parser_run(parser); in lxb_css_selectors_parse_process()
218 return parser->selectors->list; in lxb_css_selectors_parse_process()
226 parser->memory = parser->old_memory; in lxb_css_selectors_parse_finish()
227 parser->selectors = parser->old_selectors; in lxb_css_selectors_parse_finish()
239 memory = parser->memory; in lxb_css_selectors_parse_list()
240 selectors = parser->selectors; in lxb_css_selectors_parse_list()
[all …]
H A Dpseudo_state.h21 lxb_css_selectors_state_pseudo_class_function__undef(lxb_css_parser_t *parser,
25 lxb_css_selectors_state_pseudo_class_function_current(lxb_css_parser_t *parser,
29 lxb_css_selectors_state_pseudo_class_function_dir(lxb_css_parser_t *parser,
33 lxb_css_selectors_state_pseudo_class_function_has(lxb_css_parser_t *parser,
37 lxb_css_selectors_state_pseudo_class_function_is(lxb_css_parser_t *parser,
41 lxb_css_selectors_state_pseudo_class_function_lang(lxb_css_parser_t *parser,
45 lxb_css_selectors_state_pseudo_class_function_not(lxb_css_parser_t *parser,
49 lxb_css_selectors_state_pseudo_class_function_nth_child(lxb_css_parser_t *parser,
53 lxb_css_selectors_state_pseudo_class_function_nth_col(lxb_css_parser_t *parser,
73 lxb_css_selectors_state_pseudo_class_function_where(lxb_css_parser_t *parser,
[all …]
H A Dstate.h19 lxb_css_selectors_state_complex_list(lxb_css_parser_t *parser,
24 lxb_css_selectors_state_compound_list(lxb_css_parser_t *parser,
29 lxb_css_selectors_state_simple_list(lxb_css_parser_t *parser,
34 lxb_css_selectors_state_relative_list(lxb_css_parser_t *parser,
39 lxb_css_selectors_state_relative(lxb_css_parser_t *parser,
44 lxb_css_selectors_state_complex(lxb_css_parser_t *parser,
48 lxb_css_selectors_state_compound(lxb_css_parser_t *parser,
52 lxb_css_selectors_state_simple(lxb_css_parser_t *parser,
72 lxb_css_selectors_state_fail(lxb_css_parser_t *parser) in lxb_css_selectors_state_fail() argument
74 parser->status = LXB_STATUS_ERROR_UNEXPECTED_DATA; in lxb_css_selectors_state_fail()
[all …]
/php-src/ext/dom/lexbor/lexbor/css/property/
H A Dstate.h18 lxb_css_property_state__undef(lxb_css_parser_t *parser,
21 lxb_css_property_state__custom(lxb_css_parser_t *parser,
24 lxb_css_property_state_display(lxb_css_parser_t *parser,
27 lxb_css_property_state_order(lxb_css_parser_t *parser,
33 lxb_css_property_state_width(lxb_css_parser_t *parser,
36 lxb_css_property_state_height(lxb_css_parser_t *parser,
54 lxb_css_property_state_margin(lxb_css_parser_t *parser,
84 lxb_css_property_state_border(lxb_css_parser_t *parser,
114 lxb_css_property_state_color(lxb_css_parser_t *parser,
123 lxb_css_property_state_top(lxb_css_parser_t *parser,
[all …]
/php-src/ext/json/
H A Djson_parser.y36 if (parser->max_depth && parser->depth >= parser->max_depth) { \
92 if (parser->methods.object_start && FAILURE == parser->methods.object_start(parser)) {
100 if (parser->methods.object_end && FAILURE == parser->methods.object_end(parser, &$$)) {
121 parser->methods.object_create(parser, &$$);
130 parser->methods.object_create(parser, &$$);
148 if (parser->methods.array_start && FAILURE == parser->methods.array_start(parser)) {
156 if (parser->methods.array_end && FAILURE == parser->methods.array_end(parser, &$$)) {
177 parser->methods.array_create(parser, &$$);
186 parser->methods.array_create(parser, &$$);
187 parser->methods.array_append(parser, &$$, &$1);
[all …]
H A Dphp_json_parser.h26 php_json_parser *parser, zval *array);
28 php_json_parser *parser, zval *array, zval *zvalue);
30 php_json_parser *parser);
32 php_json_parser *parser, zval *object);
34 php_json_parser *parser, zval *object);
38 php_json_parser *parser);
40 php_json_parser *parser, zval *object);
62 php_json_parser *parser,
71 php_json_parser *parser,
80 PHP_JSON_API int php_json_parse(php_json_parser *parser);
[all …]
/php-src/ext/xml/
H A Dcompat.c342 xmlStopParser(parser->parser); in external_entity_ref_handler()
353 if (parser->parser->inSubset == 0) { in get_entity()
448 if (parser->parser == NULL) { in XML_ParserCreate_MM()
456 parser->parser->wellFormed = 0; in XML_ParserCreate_MM()
559 return parser->parser->errNo; in XML_GetErrorCode()
680 return parser->parser->input->line; in XML_GetCurrentLineNumber()
686 return parser->parser->input->col; in XML_GetCurrentColumnNumber()
729 if (parser->parser->myDoc) { in XML_ParserFree()
730 xmlFreeDoc(parser->parser->myDoc); in XML_ParserFree()
731 parser->parser->myDoc = NULL; in XML_ParserFree()
[all …]
H A Dxml.c278 parser->parser->parser->options |= XML_PARSE_HUGE; in xml_parse_helper()
279 xmlDictSetLimit(parser->parser->parser->dict, 0); in xml_parse_helper()
281 parser->parser->parser->options &= ~XML_PARSE_HUGE; in xml_parse_helper()
282 xmlDictSetLimit(parser->parser->parser->dict, XML_MAX_DICTIONARY_LIMIT); in xml_parse_helper()
336 if (parser->parser) { in xml_parser_free_obj()
337 XML_ParserFree(parser->parser); in xml_parser_free_obj()
723 efree(parser->ltags[parser->level-1]); in xml_endElementHandler()
806 if (parser->level <= XML_MAXLEVEL && parser->level > 0 && (doprint || (! parser->skipwhite))) { in xml_characterDataHandler()
808 xml_add_to_info(parser,SKIP_TAGSTART(parser->ltags[parser->level-1])); in xml_characterDataHandler()
1055 XML_SetUserData(parser->parser, parser); in php_xml_parser_create_impl()
[all …]
H A Dxml.stub.php153 function xml_set_object(XMLParser $parser, object $object): true {} argument
161 function xml_set_default_handler(XMLParser $parser, callable|string|null $handler): true {} argument
165 function xml_set_notation_decl_handler(XMLParser $parser, callable|string|null $handler): true {} argument
173 function xml_parse(XMLParser $parser, string $data, bool $is_final = false): int {} argument
181 function xml_get_error_code(XMLParser $parser): int {} argument
186 function xml_get_current_line_number(XMLParser $parser): int {} argument
188 function xml_get_current_column_number(XMLParser $parser): int {} argument
190 function xml_get_current_byte_index(XMLParser $parser): int {} argument
192 function xml_parser_free(XMLParser $parser): bool {} argument
195 function xml_parser_set_option(XMLParser $parser, int $option, $value): bool {} argument
[all …]
/php-src/ext/dom/lexbor/lexbor/css/syntax/
H A Dparser.c120 parser->loop = true; in lxb_css_syntax_parser_run()
133 while (parser->rules->state(parser, token, in lxb_css_syntax_parser_run()
149 return lxb_css_syntax_parser_failed(parser, parser->tkz->status); in lxb_css_syntax_parser_token()
189 return parser->chunk_cb(tkz, data, end, parser->chunk_ctx); in lxb_css_syntax_parser_tkz_cb()
198 if (parser->str.length + length >= parser->str_size) { in lxb_css_syntax_parser_tkz_cb()
210 memcpy(parser->str.data + parser->str.length, parser->pos, length); in lxb_css_syntax_parser_tkz_cb()
212 status = parser->chunk_cb(tkz, data, end, parser->chunk_ctx); in lxb_css_syntax_parser_tkz_cb()
441 if (parser->rules > parser->rules_begin) { in lxb_css_syntax_parser_function_push()
513 if (parser->rules > parser->rules_begin) { in lxb_css_syntax_parser_block_push()
1490 if (parser->rules <= parser->rules_begin) { in lxb_css_syntax_parser_declarations_end()
[all …]
H A Danb.c15 lxb_css_syntax_anb_state(lxb_css_parser_t *parser,
19 lxb_css_syntax_anb_end(lxb_css_parser_t *parser,
64 lxb_css_parser_clean(parser); in lxb_css_syntax_anb_parse()
76 parser->tkz->with_comment = false; in lxb_css_syntax_anb_parse()
77 parser->stage = LXB_CSS_PARSER_RUN; in lxb_css_syntax_anb_parse()
84 parser->stage = LXB_CSS_PARSER_END; in lxb_css_syntax_anb_parse()
93 parser->status = lxb_css_syntax_anb_handler(parser, token, ctx); in lxb_css_syntax_anb_state()
100 if (parser->status != LXB_STATUS_OK in lxb_css_syntax_anb_state()
106 return lxb_css_parser_success(parser); in lxb_css_syntax_anb_state()
189 lxb_css_syntax_parser_consume(parser); in lxb_css_syntax_anb_handler()
[all …]
H A Dparser.h20 lxb_css_syntax_parser_run(lxb_css_parser_t *parser);
23 lxb_css_syntax_parser_token(lxb_css_parser_t *parser);
26 lxb_css_syntax_parser_token_wo_ws(lxb_css_parser_t *parser);
29 lxb_css_syntax_parser_consume(lxb_css_parser_t *parser);
32 lxb_css_syntax_parser_list_rules_push(lxb_css_parser_t *parser,
40 lxb_css_syntax_parser_at_rule_push(lxb_css_parser_t *parser,
47 lxb_css_syntax_parser_qualified_push(lxb_css_parser_t *parser,
75 lxb_css_syntax_parser_block_push(lxb_css_parser_t *parser,
82 lxb_css_syntax_parser_pipe_push(lxb_css_parser_t *parser,
93 lxb_css_syntax_parser_start_block(lxb_css_parser_t *parser,
[all …]
/php-src/sapi/cli/
H A Dphp_http_parser.c326 parser->flags = 0; in php_http_parser_execute()
355 parser->flags = 0; in php_http_parser_execute()
1511 parser->state = state; in php_http_parser_execute()
1513 parser->index = index; in php_http_parser_execute()
1514 parser->nread = nread; in php_http_parser_execute()
1527 if (parser->http_major > 0 && parser->http_minor > 0) { in php_http_should_keep_alive()
1554 parser->type = t; in php_http_parser_init()
1556 parser->nread = 0; in php_http_parser_init()
1557 parser->upgrade = 0; in php_http_parser_init()
1558 parser->flags = 0; in php_http_parser_init()
[all …]
/php-src/ext/xml/tests/
H A Dxml_parser_set_option_basic.phpt9 $parser = xml_parser_create_ns();
11 var_dump(xml_parser_get_option($parser, XML_OPTION_CASE_FOLDING));
12 var_dump(xml_parser_get_option($parser, XML_OPTION_TARGET_ENCODING));
14 var_dump(xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 1));
17 var_dump(xml_parser_get_option($parser, XML_OPTION_CASE_FOLDING));
18 var_dump(xml_parser_get_option($parser, XML_OPTION_TARGET_ENCODING));
20 var_dump(xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0));
23 var_dump(xml_parser_get_option($parser, XML_OPTION_CASE_FOLDING));
24 var_dump(xml_parser_get_option($parser, XML_OPTION_TARGET_ENCODING));
27 var_dump(xml_parser_get_option($parser, XML_OPTION_TARGET_ENCODING));
[all …]
H A Dgh15868.phpt7 $parser = xml_parser_create();
8 xml_set_element_handler($parser,
9 function ($parser, $name, $attrs) {
11 }, function ($parser, $name) {
15 xml_parse_into_struct($parser, "<container/>", $values, $tags);
20 $parser = xml_parser_create();
21 xml_set_element_handler($parser,
22 function ($parser, $name, $attrs) {
23 }, function ($parser, $name) {
33 $parser = xml_parser_create();
[all …]
H A Dgh14637.phpt12 $parser = xml_parser_create();
13 xml_parser_set_option($parser, XML_OPTION_PARSE_HUGE, $huge);
14 xml_set_element_handler($parser, function($parser, $data) {
15 }, function($parser, $data) {
17 return $parser;
23 $parser = createParser(false);
24 $ret = xml_parse($parser, $long_xml_head, true);
25 $parser = createParser(true);
26 $ret = xml_parse($parser, $long_xml_head, false);
27 $parser = createParser(true);
[all …]
H A Dxml_parser_get_option_variation3.phpt7 $parser = xml_parser_create();
9 var_dump(xml_parser_get_option($parser, XML_OPTION_SKIP_TAGSTART));
10 var_dump(xml_parser_get_option($parser, XML_OPTION_SKIP_WHITE));
11 var_dump(xml_parser_get_option($parser, XML_OPTION_CASE_FOLDING));
13 var_dump(xml_parser_set_option($parser, XML_OPTION_SKIP_TAGSTART, 7));
14 var_dump(xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1));
15 var_dump(xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, false));
17 var_dump(xml_parser_get_option($parser, XML_OPTION_SKIP_TAGSTART));
18 var_dump(xml_parser_get_option($parser, XML_OPTION_SKIP_WHITE));
19 var_dump(xml_parser_get_option($parser, XML_OPTION_CASE_FOLDING));
H A DXML_OPTION_PARSE_HUGE.phpt21 $parser = xml_parser_create();
25 xml_set_element_handler($parser, function($parser, $data) {
28 }, function($parser, $data) {
30 return $parser;
39 $parser = createParser(false);
40 $ret = xml_parse($parser, $long_xml_head, true);
44 $parser = createParser(true);
45 $ret = xml_parse($parser, $long_xml_head, false);
47 $ret = xml_parse($parser, $long_xml_tail, true);
51 $parser = createParser(false);
[all …]

Completed in 117 milliseconds

1234567