Debian Codegraph @

yaml-filter/src/yaml-path.c

raw symbols SCIP
1 #cxx . . $ `<file>/yaml-filter/src/yaml-path.c`/include <stdlib.h>
2 #include <stdbool.h>
3 #include <string.h>
4 #include <sys/queue.h>
5 #include <assert.h>
6
7 #include <yaml.h>
8
9 #include "yaml-path.h"cxx . . $ `<file>/yaml-filter/src/yaml-path.h`/
10
11
12 #define YAML_PATH_MAX_SECTION_ITEMScxx . . $ `yaml-filter/src/yaml-path.c:12:9`! 256
13
14 #define _STRcxx . . $ `yaml-filter/src/yaml-path.c:14:9`!(x) #x
15 #define STRcxx . . $ `yaml-filter/src/yaml-path.c:15:9`!(x) _STRcxx . . $ `yaml-filter/src/yaml-path.c:14:9`!(x)
16
17
18 typedef enum yaml_path_section_typecxx . . $ yaml_path_section_type# {
19 YAML_PATH_SECTION_ROOTcxx . . $ YAML_PATH_SECTION_ROOT.,
20 YAML_PATH_SECTION_ANCHORcxx . . $ YAML_PATH_SECTION_ANCHOR.,
21 YAML_PATH_SECTION_INDEXcxx . . $ YAML_PATH_SECTION_INDEX.,
22 YAML_PATH_SECTION_SETcxx . . $ YAML_PATH_SECTION_SET.,
23 YAML_PATH_SECTION_KEYcxx . . $ YAML_PATH_SECTION_KEY.,
24 YAML_PATH_SECTION_SELECTIONcxx . . $ YAML_PATH_SECTION_SELECTION.,
25 } yaml_path_section_type_tcxx . . $ yaml_path_section_type_t#;
26
27 typedef struct yaml_path_selection_key_rawcxx . . $ yaml_path_selection_key_raw# {
28 const char *startcxx . . $ yaml_path_selection_key_raw#start.;
29 size_tcxx . . $ size_t# lencxx . . $ yaml_path_selection_key_raw#len.;
30 } yaml_path_selection_key_raw_tcxx . . $ yaml_path_selection_key_raw_t#;
31
32
33 typedef struct yaml_path_keycxx . . $ yaml_path_key# {
34 const char *keycxx . . $ yaml_path_key#key.;
35 TAILQ_ENTRYcxx . . $ `<external>/2546723208511035544/queue.h:382:9`!(yaml_path_key) entriescxx . . $ yaml_path_key#entries.;
36 } yaml_path_key_tcxx . . $ yaml_path_key_t#;
37
38 typedef TAILQ_HEADcxx . . $ `<external>/2546723208511035544/queue.h:372:9`!(path_key_list, yaml_path_key) path_key_list_tcxx . . $ path_key_list_t#;
39
40
41 typedef struct yaml_path_sectioncxx . . $ yaml_path_section# {
42 yaml_path_section_type_tcxx . . $ yaml_path_section_type_t# typecxx . . $ yaml_path_section#type.;
43 size_tcxx . . $ size_t# levelcxx . . $ yaml_path_section#level.;
44 unioncxx . . $ yaml_path_section#$anonymous_type_1# {
45 const char *anchorcxx . . $ yaml_path_section#$anonymous_type_1#anchor.;
46 size_tcxx . . $ size_t# indexcxx . . $ yaml_path_section#$anonymous_type_1#index.;
47 size_tcxx . . $ size_t# *setcxx . . $ yaml_path_section#$anonymous_type_1#set.;
48 const char *keycxx . . $ yaml_path_section#$anonymous_type_1#key.;
49 path_key_list_tcxx . . $ path_key_list_t# selectioncxx . . $ yaml_path_section#$anonymous_type_1#selection.;
50 } datacxx . . $ yaml_path_section#data.;
51 TAILQ_ENTRYcxx . . $ `<external>/2546723208511035544/queue.h:382:9`!(yaml_path_section) entriescxx . . $ yaml_path_section#entries.;
52
53 yaml_node_type_tcxx . . $ yaml_node_type_t# node_typecxx . . $ yaml_path_section#node_type.;
54 size_tcxx . . $ size_t# countercxx . . $ yaml_path_section#counter.;
55 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! validcxx . . $ yaml_path_section#valid.;
56 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! next_validcxx . . $ yaml_path_section#next_valid.;
57 } yaml_path_section_tcxx . . $ yaml_path_section_t#;
58
59 typedef TAILQ_HEADcxx . . $ `<external>/2546723208511035544/queue.h:372:9`!(path_section_list, yaml_path_section) path_section_list_tcxx . . $ path_section_list_t#;
60
61
62 struct yaml_pathcxx . . $ yaml_path# {
63 path_section_list_tcxx . . $ path_section_list_t# sections_listcxx . . $ yaml_path#sections_list.;
64 size_tcxx . . $ size_t# sections_countcxx . . $ yaml_path#sections_count.;
65 size_tcxx . . $ size_t# current_levelcxx . . $ yaml_path#current_level.;
66 size_tcxx . . $ size_t# start_levelcxx . . $ yaml_path#start_level.;
67
68 yaml_path_error_tcxx . . $ yaml_path_error_t# errorcxx . . $ yaml_path#error.;
69 };
70
71
72 static size_tcxx . . $ size_t#
73 yaml_path_set_snprintcxx . . $ yaml_path_set_snprint(b50071c3352b8deb). (const size_tcxx . . $ size_t# *set, char *s, size_tcxx . . $ size_t# max_len)
74 {
75 assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(set != NULL);
76 if (s == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
77 return -1;
78 size_tcxx . . $ size_t# len = 0;
79 if (set[0] == 0) {
80 len += snprintfcxx . . $ snprintf(ea502d73e74c754c).(s, max_len, "[:]");
81 } else {
82 for (size_tcxx . . $ size_t# i = 1; i <= set[0]; i++)
83 len += snprintfcxx . . $ snprintf(ea502d73e74c754c).(s + (len < max_len ? len : max_len), max_len - (len < max_len ? len : max_len), "%s%zu", (len ? "," : "["), set[i]);
84 len += snprintfcxx . . $ snprintf(ea502d73e74c754c).(s + (len < max_len ? len : max_len), max_len - (len < max_len ? len : max_len), "]");
85 }
86 return len;
87 }
88
89 static size_tcxx . . $ size_t#
90 yaml_path_selection_snprintcxx . . $ yaml_path_selection_snprint(4e9407f324e055de). (const path_key_list_tcxx . . $ path_key_list_t# *selection, char *s, size_tcxx . . $ size_t# max_len)
91 {
92 assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(selection != NULL);
93 if (s == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
94 return -1;
95 size_tcxx . . $ size_t# len = 0;
96 yaml_path_key_tcxx . . $ yaml_path_key_t# *el;
97 if TAILQ_EMPTYcxx . . $ `<external>/2546723208511035544/queue.h:457:9`!(selection) {
98 len += snprintfcxx . . $ snprintf(ea502d73e74c754c).(s, max_len, ".*");
99 } else {
100 TAILQ_FOREACHcxx . . $ `<external>/2546723208511035544/queue.h:435:9`!(el, selection, entries) {
101 char quote = strchrcxx . . $ strchr(2050848944e00d54).(el->keycxx . . $ yaml_path_key#key., '\'') ? '"' : '\'';
102 len += snprintfcxx . . $ snprintf(ea502d73e74c754c).(s + (len < max_len ? len : max_len), max_len - (len < max_len ? len : max_len), "%s%c%s%c", (len ? "," : "["), quote, el->keycxx . . $ yaml_path_key#key., quote);
103 }
104 len += snprintfcxx . . $ snprintf(ea502d73e74c754c).(s + (len < max_len ? len : max_len), max_len - (len < max_len ? len : max_len), "]");
105 }
106 return len;
107 }
108
109 static boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`!
110 yaml_path_set_is_emptycxx . . $ yaml_path_set_is_empty(9ec3b52d217c90a3). (const size_tcxx . . $ size_t# *set)
111 {
112 assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(set != NULL);
113 return set[0] == 0;
114 }
115
116 static boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`!
117 yaml_path_set_has_indexcxx . . $ yaml_path_set_has_index(8568dec506c55c64). (const size_tcxx . . $ size_t# *set, size_tcxx . . $ size_t# idx)
118 {
119 assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(set != NULL);
120 for (size_tcxx . . $ size_t# i = 1; i <= set[0]; i++)
121 if (set[i] == idx)
122 return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
123 return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
124 }
125
126 static boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`!
127 yaml_path_selection_is_emptycxx . . $ yaml_path_selection_is_empty(657966c13978526d). (path_key_list_tcxx . . $ path_key_list_t# *selection)
128 {
129 assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(selection != NULL);
130 return TAILQ_EMPTYcxx . . $ `<external>/2546723208511035544/queue.h:457:9`!(selection) ? truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`! : falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
131 }
132
133 static const char*
134 yaml_path_selection_key_getcxx . . $ yaml_path_selection_key_get(a4f3805cb2fdf214). (path_key_list_tcxx . . $ path_key_list_t# *selection, const char *key)
135 {
136 assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(selection != NULL);
137 yaml_path_key_tcxx . . $ yaml_path_key_t# *el;
138 TAILQ_FOREACHcxx . . $ `<external>/2546723208511035544/queue.h:435:9`!(el, selection, entries) {
139 if (!strcmpcxx . . $ strcmp(5ae29d726ae57f88).(el->keycxx . . $ yaml_path_key#key., key))
140 return el->keycxx . . $ yaml_path_key#key.;
141 }
142 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
143 }
144
145 static size_tcxx . . $ size_t#
146 yaml_path_selection_keys_addcxx . . $ yaml_path_selection_keys_add(38940a70135e1afe). (path_key_list_tcxx . . $ path_key_list_t# *selection, yaml_path_selection_key_raw_tcxx . . $ yaml_path_selection_key_raw_t# *raw_keys, size_tcxx . . $ size_t# count)
147 {
148 assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(selection != NULL);
149 assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(raw_keys != NULL);
150 for (size_tcxx . . $ size_t# i = 0; i < count; i++) {
151 yaml_path_key_tcxx . . $ yaml_path_key_t# *el = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(*el));
152 if (el == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
153 return i;
154 TAILQ_INSERT_TAILcxx . . $ `<external>/2546723208511035544/queue.h:402:9`!(selection, el, entries);
155 el->keycxx . . $ yaml_path_key#key. = strndupcxx . . $ strndup(eabdfdef77619b3d).(raw_keys[i].startcxx . . $ yaml_path_selection_key_raw#start., raw_keys[i].lencxx . . $ yaml_path_selection_key_raw#len.);
156 if (el->keycxx . . $ yaml_path_key#key. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
157 return i;
158 }
159 return count;
160 }
161
162 static void
163 yaml_path_selection_keys_removecxx . . $ yaml_path_selection_keys_remove(95a7206f343ff316). (path_key_list_tcxx . . $ path_key_list_t# *selection)
164 {
165 assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(selection != NULL);
166 while (!TAILQ_EMPTYcxx . . $ `<external>/2546723208511035544/queue.h:457:9`!(selection)) {
167 yaml_path_key_tcxx . . $ yaml_path_key_t# *el = TAILQ_FIRSTcxx . . $ `<external>/2546723208511035544/queue.h:458:9`!(selection);
168 TAILQ_REMOVEcxx . . $ `<external>/2546723208511035544/queue.h:426:9`!(selection, el, entries);
169 freecxx . . $ free(5d22bdacc48458e8).((void *)el->keycxx . . $ yaml_path_key#key.);
170 freecxx . . $ free(5d22bdacc48458e8).(el);
171 }
172 }
173
174 static void
175 yaml_path_sections_removecxx . . $ yaml_path_sections_remove(3cfebe741d41ce70). (yaml_path_tcxx . . $ yaml_path_t# *path)
176 {
177 assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(path != NULL);
178 while (!TAILQ_EMPTYcxx . . $ `<external>/2546723208511035544/queue.h:457:9`!(&path->sections_list)) {
179 yaml_path_section_tcxx . . $ yaml_path_section_t# *el = TAILQ_FIRSTcxx . . $ `<external>/2546723208511035544/queue.h:458:9`!(&path->sections_list);
180 TAILQ_REMOVEcxx . . $ `<external>/2546723208511035544/queue.h:426:9`!(&path->sections_list, el, entries);
181 path->sections_countcxx . . $ yaml_path#sections_count.--;
182 switch (el->typecxx . . $ yaml_path_section#type.) {
183 case YAML_PATH_SECTION_KEYcxx . . $ YAML_PATH_SECTION_KEY.:
184 freecxx . . $ free(5d22bdacc48458e8).((void *)el->datacxx . . $ yaml_path_section#data..keycxx . . $ yaml_path_section#$anonymous_type_1#key.);
185 break;
186 case YAML_PATH_SECTION_ANCHORcxx . . $ YAML_PATH_SECTION_ANCHOR.:
187 freecxx . . $ free(5d22bdacc48458e8).((void *)el->datacxx . . $ yaml_path_section#data..anchorcxx . . $ yaml_path_section#$anonymous_type_1#anchor.);
188 break;
189 case YAML_PATH_SECTION_SETcxx . . $ YAML_PATH_SECTION_SET.:
190 freecxx . . $ free(5d22bdacc48458e8).((void *)el->datacxx . . $ yaml_path_section#data..setcxx . . $ yaml_path_section#$anonymous_type_1#set.);
191 break;
192 case YAML_PATH_SECTION_SELECTIONcxx . . $ YAML_PATH_SECTION_SELECTION.:
193 yaml_path_selection_keys_removecxx . . $ yaml_path_selection_keys_remove(95a7206f343ff316).(&el->datacxx . . $ yaml_path_section#data..selectioncxx . . $ yaml_path_section#$anonymous_type_1#selection.);
194 break;
195 default:
196 break;
197 }
198 freecxx . . $ free(5d22bdacc48458e8).(el);
199 }
200 }
201
202 static yaml_path_section_tcxx . . $ yaml_path_section_t#*
203 yaml_path_section_createcxx . . $ yaml_path_section_create(1f580abef3ae48c7). (yaml_path_tcxx . . $ yaml_path_t# *path, yaml_path_section_type_tcxx . . $ yaml_path_section_type_t# section_type)
204 {
205 yaml_path_section_tcxx . . $ yaml_path_section_t# *el = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(*el));
206 if (el != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
207 memsetcxx . . $ memset(d1de1e4fb215f1c6).(el, 0, sizeof(*el));
208 path->sections_countcxx . . $ yaml_path#sections_count.++;
209 el->levelcxx . . $ yaml_path_section#level. = path->sections_countcxx . . $ yaml_path#sections_count.;
210 el->typecxx . . $ yaml_path_section#type. = section_type;
211 el->node_typecxx . . $ yaml_path_section#node_type. = YAML_NO_NODEcxx . . $ YAML_NO_NODE.;
212 TAILQ_INSERT_TAILcxx . . $ `<external>/2546723208511035544/queue.h:402:9`!(&path->sections_list, el, entries);
213 if (el->typecxx . . $ yaml_path_section#type. == YAML_PATH_SECTION_SELECTIONcxx . . $ YAML_PATH_SECTION_SELECTION.) {
214 TAILQ_INITcxx . . $ `<external>/2546723208511035544/queue.h:387:9`!(&el->data.selection);
215 }
216 }
217 return el;
218 }
219
220 static size_tcxx . . $ size_t#
221 yaml_path_section_snprintcxx . . $ yaml_path_section_snprint(d7ef56054ab4bae9). (yaml_path_section_tcxx . . $ yaml_path_section_t# *section, char *s, size_tcxx . . $ size_t# max_len)
222 {
223 assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(section != NULL);
224 if (s == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
225 return -1;
226 size_tcxx . . $ size_t# len;
227 switch (section->typecxx . . $ yaml_path_section#type.) {
228 case YAML_PATH_SECTION_ROOTcxx . . $ YAML_PATH_SECTION_ROOT.:
229 len = snprintfcxx . . $ snprintf(ea502d73e74c754c).(s, max_len, "$");
230 break;
231 case YAML_PATH_SECTION_KEYcxx . . $ YAML_PATH_SECTION_KEY.: {
232 char quote = '\0';
233 if (strpbrkcxx . . $ strpbrk(a713fe7b9a57cf96).(section->datacxx . . $ yaml_path_section#data..keycxx . . $ yaml_path_section#$anonymous_type_1#key., "[]().$&*"))
234 quote = strchrcxx . . $ strchr(2050848944e00d54).(section->datacxx . . $ yaml_path_section#data..keycxx . . $ yaml_path_section#$anonymous_type_1#key., '\'') ? '"' : '\'';
235 if (quote) {
236 len = snprintfcxx . . $ snprintf(ea502d73e74c754c).(s, max_len, "[%c%s%c]", quote, section->datacxx . . $ yaml_path_section#data..keycxx . . $ yaml_path_section#$anonymous_type_1#key., quote);
237 } else {
238 len = snprintfcxx . . $ snprintf(ea502d73e74c754c).(s, max_len, ".%s", section->datacxx . . $ yaml_path_section#data..keycxx . . $ yaml_path_section#$anonymous_type_1#key.);
239 }
240 }
241 break;
242 case YAML_PATH_SECTION_ANCHORcxx . . $ YAML_PATH_SECTION_ANCHOR.:
243 len = snprintfcxx . . $ snprintf(ea502d73e74c754c).(s, max_len, "&%s", section->datacxx . . $ yaml_path_section#data..anchorcxx . . $ yaml_path_section#$anonymous_type_1#anchor.);
244 break;
245 case YAML_PATH_SECTION_INDEXcxx . . $ YAML_PATH_SECTION_INDEX.:
246 len = snprintfcxx . . $ snprintf(ea502d73e74c754c).(s, max_len, "[%zu]", section->datacxx . . $ yaml_path_section#data..indexcxx . . $ yaml_path_section#$anonymous_type_1#index.);
247 break;
248 case YAML_PATH_SECTION_SETcxx . . $ YAML_PATH_SECTION_SET.:
249 len = yaml_path_set_snprintcxx . . $ yaml_path_set_snprint(b50071c3352b8deb).(section->datacxx . . $ yaml_path_section#data..setcxx . . $ yaml_path_section#$anonymous_type_1#set., s, max_len);
250 break;
251 case YAML_PATH_SECTION_SELECTIONcxx . . $ YAML_PATH_SECTION_SELECTION.:
252 len = yaml_path_selection_snprintcxx . . $ yaml_path_selection_snprint(4e9407f324e055de).(&section->datacxx . . $ yaml_path_section#data..selectioncxx . . $ yaml_path_section#$anonymous_type_1#selection., s, max_len);
253 break;
254 default:
255 len = snprintfcxx . . $ snprintf(ea502d73e74c754c).(s, max_len, "<?>");
256 break;
257 }
258 return len;
259 }
260
261 static void
262 yaml_path_error_setcxx . . $ yaml_path_error_set(caa21bc1a3e1dea8). (yaml_path_tcxx . . $ yaml_path_t# *path, yaml_path_error_type_tcxx . . $ yaml_path_error_type_t# error_type, const char *message, size_tcxx . . $ size_t# pos)
263 {
264 assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(path != NULL);
265 path->errorcxx . . $ yaml_path#error..typecxx . . $ yaml_path_error#type. = error_type;
266 path->errorcxx . . $ yaml_path#error..messagecxx . . $ yaml_path_error#message. = message;
267 path->errorcxx . . $ yaml_path#error..poscxx . . $ yaml_path_error#pos. = pos;
268 }
269
270 static void
271 yaml_path_error_clearcxx . . $ yaml_path_error_clear(3cfebe741d41ce70). (yaml_path_tcxx . . $ yaml_path_t# *path)
272 {
273 yaml_path_error_setcxx . . $ yaml_path_error_set(caa21bc1a3e1dea8).(path, YAML_PATH_ERROR_NONEcxx . . $ YAML_PATH_ERROR_NONE., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, 0);
274 }
275
276 #define return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(error_type, error_text, error_pos) \
277 do { \
278 yaml_path_error_set(path, error_type, (error_text), (error_pos)); \
279 goto error; \
280 } while (0)
281
282 static void
283 yaml_path_parse_implcxx . . $ yaml_path_parse_impl(7d2b060a39f1798c). (yaml_path_tcxx . . $ yaml_path_t# *path, char *s_path) {
284 char *sp = s_path;
285 char *spe = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
286
287 assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(path != NULL);
288
289 if (s_path == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || !s_path[0]) {
290 yaml_path_error_setcxx . . $ yaml_path_error_set(caa21bc1a3e1dea8).(path, YAML_PATH_ERROR_PARSEcxx . . $ YAML_PATH_ERROR_PARSE., "Path string is NULL or empty", 0);
291 return;
292 }
293
294 while (*sp != '\0') {
295 switch (*sp) {
296 case '.':
297 case '[':
298 if (path->sections_countcxx . . $ yaml_path#sections_count. == 0) {
299 yaml_path_section_tcxx . . $ yaml_path_section_t# *sec = yaml_path_section_createcxx . . $ yaml_path_section_create(1f580abef3ae48c7).(path, YAML_PATH_SECTION_ROOTcxx . . $ YAML_PATH_SECTION_ROOT.);
300 if (sec == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
301 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_NOMEM, "Unable to allocate memory (section)", sp - s_path);
302 }
303 if (*sp == '.') {
304 // Key or Selection
305 spe = sp + 1;
306 if (*spe == '*') {
307 // Empty key selection section means that all keys were selected
308 yaml_path_section_tcxx . . $ yaml_path_section_t# *sec = yaml_path_section_createcxx . . $ yaml_path_section_create(1f580abef3ae48c7).(path, YAML_PATH_SECTION_SELECTIONcxx . . $ YAML_PATH_SECTION_SELECTION.);
309 if (sec == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
310 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_NOMEM, "Unable to allocate memory (section)", sp - s_path);
311 while (*spe != '.' && *spe != '[' && *spe != '\0')
312 spe++;
313 } else {
314 while (*spe != '.' && *spe != '[' && *spe != '\0')
315 spe++;
316 if (spe == sp+1)
317 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_PARSE, "Segment key is missing", sp - s_path);
318 yaml_path_section_tcxx . . $ yaml_path_section_t# *sec = yaml_path_section_createcxx . . $ yaml_path_section_create(1f580abef3ae48c7).(path, YAML_PATH_SECTION_KEYcxx . . $ YAML_PATH_SECTION_KEY.);
319 if (sec == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
320 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_NOMEM, "Unable to allocate memory (section)", sp - s_path);
321 sec->datacxx . . $ yaml_path_section#data..keycxx . . $ yaml_path_section#$anonymous_type_1#key. = strndupcxx . . $ strndup(eabdfdef77619b3d).(sp + 1, spe-sp - 1);
322 if (sec->datacxx . . $ yaml_path_section#data..keycxx . . $ yaml_path_section#$anonymous_type_1#key. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
323 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_NOMEM, "Unable to allocate memory (key)", sp - s_path);
324 }
325 sp = spe-1;
326 } else if (*sp == '[') {
327 spe = sp + 1;
328 if (*spe == '*' && *(spe+1) == ']') {
329 // Empty key selection section means that all keys were selected
330 yaml_path_section_tcxx . . $ yaml_path_section_t# *sec = yaml_path_section_createcxx . . $ yaml_path_section_create(1f580abef3ae48c7).(path, YAML_PATH_SECTION_SELECTIONcxx . . $ YAML_PATH_SECTION_SELECTION.);
331 if (sec == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
332 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_NOMEM, "Unable to allocate memory (section)", sp - s_path);
333 sp = spe+1;
334 } else if (*spe == '\'' || *spe == '"') {
335 // Key(s)
336 size_tcxx . . $ size_t# keys_count = 0;
337 yaml_path_selection_key_raw_tcxx . . $ yaml_path_selection_key_raw_t# raw_keys[YAML_PATH_MAX_SECTION_ITEMScxx . . $ `yaml-filter/src/yaml-path.c:12:9`!] = {{NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, 0}};
338 sp = spe;
339 while (*spe != ']' && *spe != '\0') {
340 if (keys_count >= YAML_PATH_MAX_SECTION_ITEMScxx . . $ `yaml-filter/src/yaml-path.c:12:9`!)
341 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_SECTION, "Segment keys selection has reached the limit of keys: "STRcxx . . $ `yaml-filter/src/yaml-path.c:15:9`!(YAML_PATH_MAX_SECTION_ITEMScxx . . $ `yaml-filter/src/yaml-path.c:12:9`!), sp - s_path);
342 char quote = *spe;
343 spe++;
344 while (*spe != quote && *spe != '\0')
345 spe++;
346 if (*spe == '\0')
347 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_PARSE, "Segment key is invalid (unexpected end of string, missing closing quotation mark)", sp - s_path);
348 if (spe == sp+1)
349 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_PARSE, "Segment key is missing", sp - s_path);
350 spe++;
351 if (*spe == '\0')
352 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_PARSE, "Segment key is invalid (unexpected end of string, missing ']')", sp - s_path);
353 if (*spe == ']') {
354 raw_keys[keys_count].startcxx . . $ yaml_path_selection_key_raw#start. = sp + 1;
355 raw_keys[keys_count].lencxx . . $ yaml_path_selection_key_raw#len. = spe-sp - 2;
356 keys_count++;
357 } else if (*spe == ',') {
358 spe++;
359 if (*spe != '\'' && *spe != '"')
360 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_PARSE, "Segment keys selection is invalid (invalid character)", spe - s_path);
361 raw_keys[keys_count].startcxx . . $ yaml_path_selection_key_raw#start. = sp + 1;
362 raw_keys[keys_count].lencxx . . $ yaml_path_selection_key_raw#len. = spe-sp - 3;
363 keys_count++;
364 sp = spe;
365 } else {
366 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_PARSE, "Segment key is invalid (invalid character)", spe - s_path);
367 }
368 }
369 if (keys_count == 1) {
370 yaml_path_section_tcxx . . $ yaml_path_section_t# *sec = yaml_path_section_createcxx . . $ yaml_path_section_create(1f580abef3ae48c7).(path, YAML_PATH_SECTION_KEYcxx . . $ YAML_PATH_SECTION_KEY.);
371 if (sec == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
372 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_NOMEM, "Unable to allocate memory (section)", sp - s_path);
373 sec->datacxx . . $ yaml_path_section#data..keycxx . . $ yaml_path_section#$anonymous_type_1#key. = strndupcxx . . $ strndup(eabdfdef77619b3d).(raw_keys[0].startcxx . . $ yaml_path_selection_key_raw#start., raw_keys[0].lencxx . . $ yaml_path_selection_key_raw#len.);
374 if (sec->datacxx . . $ yaml_path_section#data..keycxx . . $ yaml_path_section#$anonymous_type_1#key. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
375 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_NOMEM, "Unable to allocate memory (key)", sp - s_path);
376 } else if (keys_count > 1) {
377 yaml_path_section_tcxx . . $ yaml_path_section_t# *sec = yaml_path_section_createcxx . . $ yaml_path_section_create(1f580abef3ae48c7).(path, YAML_PATH_SECTION_SELECTIONcxx . . $ YAML_PATH_SECTION_SELECTION.);
378 if (sec == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
379 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_NOMEM, "Unable to allocate memory (section)", sp - s_path);
380 if (yaml_path_selection_keys_addcxx . . $ yaml_path_selection_keys_add(38940a70135e1afe).(&sec->datacxx . . $ yaml_path_section#data..selectioncxx . . $ yaml_path_section#$anonymous_type_1#selection., raw_keys, keys_count) != keys_count)
381 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_NOMEM, "Unable to allocate memory (keys selection)", sp - s_path);
382 }
383 sp = spe;
384 } else {
385 // Indices
386 if (*spe == ':' && *(spe+1) == ']') {
387 // Set (all-inclusive)
388 yaml_path_section_tcxx . . $ yaml_path_section_t# *sec = yaml_path_section_createcxx . . $ yaml_path_section_create(1f580abef3ae48c7).(path, YAML_PATH_SECTION_SETcxx . . $ YAML_PATH_SECTION_SET.);
389 if (sec == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
390 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_NOMEM, "Unable to allocate memory (section)", sp - s_path);
391 sec->datacxx . . $ yaml_path_section#data..setcxx . . $ yaml_path_section#$anonymous_type_1#set. = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(size_tcxx . . $ size_t#) * 1);
392 if (sec->datacxx . . $ yaml_path_section#data..setcxx . . $ yaml_path_section#$anonymous_type_1#set. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
393 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_NOMEM, "Unable to allocate memory (set)", sp - s_path);
394 sec->datacxx . . $ yaml_path_section#data..setcxx . . $ yaml_path_section#$anonymous_type_1#set.[0] = 0;
395 sp = spe+1;
396 } else {
397 while (*spe == ' ' || *spe == '\t')
398 spe++;
399 if (*spe == '-')
400 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_PARSE, "Segment index is invalid (negative number)", spe - s_path);
401 size_tcxx . . $ size_t# idx = strtoulcxx . . $ strtoul(31746e8d6ec49860).(spe, &spe, 10);
402 if (*spe == ']') {
403 // Index
404 yaml_path_section_tcxx . . $ yaml_path_section_t# *sec = yaml_path_section_createcxx . . $ yaml_path_section_create(1f580abef3ae48c7).(path, YAML_PATH_SECTION_INDEXcxx . . $ YAML_PATH_SECTION_INDEX.);
405 if (sec == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
406 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_NOMEM, "Unable to allocate memory (section)", sp - s_path);
407 sec->datacxx . . $ yaml_path_section#data..indexcxx . . $ yaml_path_section#$anonymous_type_1#index. = idx;
408 sp = spe;
409 } else if (*spe == ',') {
410 // Set
411 size_tcxx . . $ size_t# indices[YAML_PATH_MAX_SECTION_ITEMScxx . . $ `yaml-filter/src/yaml-path.c:12:9`!+1] = {0};
412 while (*spe == ',' && spe > sp+1) {
413 if (indices[0] >= YAML_PATH_MAX_SECTION_ITEMScxx . . $ `yaml-filter/src/yaml-path.c:12:9`!)
414 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_SECTION, "Segment indices set has reached the limit of indices: "STRcxx . . $ `yaml-filter/src/yaml-path.c:15:9`!(YAML_PATH_MAX_SECTION_ITEMScxx . . $ `yaml-filter/src/yaml-path.c:12:9`!), sp - s_path);
415 sp = spe++;
416 indices[0]++;
417 indices[indices[0]] = idx;
418 while (*spe == ' ' || *spe == '\t')
419 spe++;
420 if (*spe == '-')
421 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_PARSE, "Segment set index is invalid (negative number)", spe - s_path);
422 idx = strtoulcxx . . $ strtoul(31746e8d6ec49860).(spe, &spe, 10);
423 }
424 if (*spe == ']' && spe > sp+1) {
425 indices[0]++;
426 indices[indices[0]] = idx;
427 yaml_path_section_tcxx . . $ yaml_path_section_t# *sec = yaml_path_section_createcxx . . $ yaml_path_section_create(1f580abef3ae48c7).(path, YAML_PATH_SECTION_SETcxx . . $ YAML_PATH_SECTION_SET.);
428 if (sec == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
429 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_NOMEM, "Unable to allocate memory (section)", sp - s_path);
430 sec->datacxx . . $ yaml_path_section#data..setcxx . . $ yaml_path_section#$anonymous_type_1#set. = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(*indices) * (indices[0] + 1));
431 if (sec->datacxx . . $ yaml_path_section#data..setcxx . . $ yaml_path_section#$anonymous_type_1#set. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
432 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_NOMEM, "Unable to allocate memory (set)", sp - s_path);
433 memcpycxx . . $ memcpy(cc817cb175f282d).(sec->datacxx . . $ yaml_path_section#data..setcxx . . $ yaml_path_section#$anonymous_type_1#set., indices, sizeof(*indices) * (indices[0] + 1));
434 sp = spe;
435 } else {
436 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_PARSE, "Segment set is invalid (invalid character)", spe - s_path);
437 }
438 } else if (*spe == '\0') {
439 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_PARSE, "Segment index is invalid (unexpected end of string, missing ']')", spe - s_path);
440 } else {
441 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_PARSE, "Segment index is invalid (invalid character)", spe - s_path);
442 }
443 }
444 }
445 }
446 break;
447 case '&':
448 if (path->sections_countcxx . . $ yaml_path#sections_count. == 0) {
449 spe = sp + 1;
450 while (*spe != '.' && *spe != '[' && *spe != '\0')
451 spe++;
452 if (spe - sp > 1) {
453 yaml_path_section_tcxx . . $ yaml_path_section_t# *sec = yaml_path_section_createcxx . . $ yaml_path_section_create(1f580abef3ae48c7).(path, YAML_PATH_SECTION_ANCHORcxx . . $ YAML_PATH_SECTION_ANCHOR.);
454 if (sec == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
455 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_NOMEM, "Unable to allocate memory (section)", sp - s_path);
456 sec->datacxx . . $ yaml_path_section#data..anchorcxx . . $ yaml_path_section#$anonymous_type_1#anchor. = strndupcxx . . $ strndup(eabdfdef77619b3d).(sp+1, spe-sp-1);
457 if (sec->datacxx . . $ yaml_path_section#data..anchorcxx . . $ yaml_path_section#$anonymous_type_1#anchor. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
458 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_NOMEM, "Unable to allocate memory (anchor)", sp - s_path);
459 } else {
460 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_PARSE, "Segment anchor is invalid (empty)", spe - s_path);
461 }
462 } else {
463 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_SECTION, "Anchor segment is only allowed at the beginning of the path", sp - s_path);
464 }
465 sp = spe - 1;
466 break;
467 case '$':
468 if (path->sections_countcxx . . $ yaml_path#sections_count. == 0) {
469 yaml_path_section_tcxx . . $ yaml_path_section_t# *sec = yaml_path_section_createcxx . . $ yaml_path_section_create(1f580abef3ae48c7).(path, YAML_PATH_SECTION_ROOTcxx . . $ YAML_PATH_SECTION_ROOT.);
470 if (sec == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
471 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_NOMEM, "Unable to allocate memory (section)", sp - s_path);
472 } else {
473 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_SECTION, "Root segment is only allowed at the beginning of the path", sp - s_path);
474 }
475 break;
476 default:
477 if (path->sections_countcxx . . $ yaml_path#sections_count. == 0) {
478 spe = sp + 1;
479 // Special beginning of the path (implicit key)
480 while (*spe != '.' && *spe != '[' && *spe != '\0')
481 spe++;
482 yaml_path_section_tcxx . . $ yaml_path_section_t# *sec = yaml_path_section_createcxx . . $ yaml_path_section_create(1f580abef3ae48c7).(path, YAML_PATH_SECTION_ROOTcxx . . $ YAML_PATH_SECTION_ROOT.);
483 if (sec == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
484 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_NOMEM, "Unable to allocate memory (section)", sp - s_path);
485 sec = yaml_path_section_createcxx . . $ yaml_path_section_create(1f580abef3ae48c7).(path, YAML_PATH_SECTION_KEYcxx . . $ YAML_PATH_SECTION_KEY.);
486 if (sec == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
487 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_NOMEM, "Unable to allocate memory (section)", sp - s_path);
488 sec->datacxx . . $ yaml_path_section#data..keycxx . . $ yaml_path_section#$anonymous_type_1#key. = strndupcxx . . $ strndup(eabdfdef77619b3d).(sp, spe-sp);
489 if (sec->datacxx . . $ yaml_path_section#data..keycxx . . $ yaml_path_section#$anonymous_type_1#key. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
490 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_NOMEM, "Unable to allocate memory (key)", sp - s_path);
491 sp = spe-1;
492 }
493 break;
494 }
495 sp++;
496 }
497
498 if (path->sections_countcxx . . $ yaml_path#sections_count. == 0)
499 return_with_errorcxx . . $ `yaml-filter/src/yaml-path.c:276:9`!(YAML_PATH_ERROR_SECTION, "Invalid, empty or meaningless path", 0);
500
501 return; // OK
502
503 error:
504 yaml_path_sections_removecxx . . $ yaml_path_sections_remove(3cfebe741d41ce70).(path);
505 if (path->errorcxx . . $ yaml_path#error..typecxx . . $ yaml_path_error#type. == YAML_PATH_ERROR_NONEcxx . . $ YAML_PATH_ERROR_NONE.)
506 yaml_path_error_setcxx . . $ yaml_path_error_set(caa21bc1a3e1dea8).(path, YAML_PATH_ERROR_PARSEcxx . . $ YAML_PATH_ERROR_PARSE., "Unable to parse the path string", 0);
507 }
508
509 static yaml_path_section_tcxx . . $ yaml_path_section_t#*
510 yaml_path_section_get_at_levelcxx . . $ yaml_path_section_get_at_level(6593812eb220daa5). (yaml_path_tcxx . . $ yaml_path_t# *path, size_tcxx . . $ size_t# level)
511 {
512 assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(path != NULL);
513 yaml_path_section_tcxx . . $ yaml_path_section_t# *el;
514 TAILQ_FOREACHcxx . . $ `<external>/2546723208511035544/queue.h:435:9`!(el, &path->sections_list, entries) {
515 if (el->levelcxx . . $ yaml_path_section#level. == level)
516 return el;
517 }
518 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
519 }
520
521 static yaml_path_section_tcxx . . $ yaml_path_section_t#*
522 yaml_path_section_get_firstcxx . . $ yaml_path_section_get_first(c72568e41fc99c80). (yaml_path_tcxx . . $ yaml_path_t# *path)
523 {
524 return yaml_path_section_get_at_levelcxx . . $ yaml_path_section_get_at_level(6593812eb220daa5).(path, 1);
525 }
526
527 static yaml_path_section_tcxx . . $ yaml_path_section_t#*
528 yaml_path_section_get_currentcxx . . $ yaml_path_section_get_current(c72568e41fc99c80). (yaml_path_tcxx . . $ yaml_path_t# *path)
529 {
530 assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(path != NULL);
531 if (!path->start_levelcxx . . $ yaml_path#start_level.)
532 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
533 return yaml_path_section_get_at_levelcxx . . $ yaml_path_section_get_at_level(6593812eb220daa5).(path, path->current_levelcxx . . $ yaml_path#current_level. - path->start_levelcxx . . $ yaml_path#start_level. + 1);
534 }
535
536 static boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`!
537 yaml_path_section_current_is_lastcxx . . $ yaml_path_section_current_is_last(30c5b5719add7fa8). (yaml_path_tcxx . . $ yaml_path_t# *path)
538 {
539 assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(path != NULL);
540 yaml_path_section_tcxx . . $ yaml_path_section_t# *sec = yaml_path_section_get_currentcxx . . $ yaml_path_section_get_current(c72568e41fc99c80).(path);
541 if (sec == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
542 return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
543 return sec->levelcxx . . $ yaml_path_section#level. == path->sections_countcxx . . $ yaml_path#sections_count.;
544 }
545
546 static boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`!
547 yaml_path_sections_prev_are_validcxx . . $ yaml_path_sections_prev_are_valid(30c5b5719add7fa8). (yaml_path_tcxx . . $ yaml_path_t# *path)
548 {
549 assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(path != NULL);
550 int valid = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
551 yaml_path_section_tcxx . . $ yaml_path_section_t# *el;
552 TAILQ_FOREACHcxx . . $ `<external>/2546723208511035544/queue.h:435:9`!(el, &path->sections_list, entries) {
553 if (el->levelcxx . . $ yaml_path_section#level. < path->current_levelcxx . . $ yaml_path#current_level. - path->start_levelcxx . . $ yaml_path#start_level. + 1)
554 valid = el->validcxx . . $ yaml_path_section#valid. && valid;
555 }
556 return valid;
557 }
558
559 static boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`!
560 yaml_path_section_is_mandatory_containercxx . . $ yaml_path_section_is_mandatory_container(3448b73db20c2b57). (yaml_path_section_tcxx . . $ yaml_path_section_t# *sec)
561 {
562 assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(sec != NULL);
563 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! res = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
564 if ((sec->typecxx . . $ yaml_path_section#type. == YAML_PATH_SECTION_SELECTIONcxx . . $ YAML_PATH_SECTION_SELECTION. && sec->node_typecxx . . $ yaml_path_section#node_type. == YAML_MAPPING_NODEcxx . . $ YAML_MAPPING_NODE.)
565 ||
566 (sec->typecxx . . $ yaml_path_section#type. == YAML_PATH_SECTION_SETcxx . . $ YAML_PATH_SECTION_SET. && sec->node_typecxx . . $ yaml_path_section#node_type. == YAML_SEQUENCE_NODEcxx . . $ YAML_SEQUENCE_NODE.))
567 res = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
568 return res;
569 }
570
571 static const char *
572 yaml_path_filter_event_get_anchorcxx . . $ yaml_path_filter_event_get_anchor(49834635e4668d66). (const yaml_event_tcxx . . $ yaml_event_t# *event)
573 {
574 assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(event != NULL);
575 switch(event->typecxx . . $ yaml_event_s#type.) {
576 case YAML_MAPPING_START_EVENTcxx . . $ YAML_MAPPING_START_EVENT.:
577 return (const char *)event->datacxx . . $ yaml_event_s#data..mapping_startcxx . . $ yaml_event_s#$anonymous_type_8#mapping_start..anchorcxx . . $ yaml_event_s#$anonymous_type_8#$anonymous_type_16#anchor.;
578 case YAML_SEQUENCE_START_EVENTcxx . . $ YAML_SEQUENCE_START_EVENT.:
579 return (const char *)event->datacxx . . $ yaml_event_s#data..sequence_startcxx . . $ yaml_event_s#$anonymous_type_8#sequence_start..anchorcxx . . $ yaml_event_s#$anonymous_type_8#$anonymous_type_15#anchor.;
580 case YAML_SCALAR_EVENTcxx . . $ YAML_SCALAR_EVENT.:
581 return (const char *)event->datacxx . . $ yaml_event_s#data..scalarcxx . . $ yaml_event_s#$anonymous_type_8#scalar..anchorcxx . . $ yaml_event_s#$anonymous_type_8#$anonymous_type_14#anchor.;
582 default:
583 break;
584 }
585 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
586 }
587
588 static boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`!
589 yaml_path_is_validcxx . . $ yaml_path_is_valid(30c5b5719add7fa8). (yaml_path_tcxx . . $ yaml_path_t# *path)
590 {
591 assertcxx . . $ `<external>/4398592474888995393/assert.h:50:10`!(path != NULL);
592 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! valid = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
593 yaml_path_section_tcxx . . $ yaml_path_section_t# *el;
594 TAILQ_FOREACHcxx . . $ `<external>/2546723208511035544/queue.h:435:9`!(el, &path->sections_list, entries) {
595 valid = el->validcxx . . $ yaml_path_section#valid. && valid;
596 }
597 return valid;
598 }
599
600
601 /* Public API -------------------------------------------------------------- */
602
603 yaml_path_tcxx . . $ yaml_path_t#*
604 yaml_path_createcxx . . $ yaml_path_create(6a0b3c6d2c1381cc). (void)
605 {
606 yaml_path_tcxx . . $ yaml_path_t# *ypath = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(*ypath));
607 if (ypath != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
608 memsetcxx . . $ memset(d1de1e4fb215f1c6). (ypath, 0, sizeof(*ypath));
609 TAILQ_INITcxx . . $ `<external>/2546723208511035544/queue.h:387:9`!(&ypath->sections_list);
610 }
611 return ypath;
612 }
613
614 int
615 yaml_path_parsecxx . . $ yaml_path_parse(6fd2af71f8d09d83). (yaml_path_tcxx . . $ yaml_path_t# *path, char *s_path)
616 {
617 if (path == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
618 return -1;
619
620 yaml_path_sections_removecxx . . $ yaml_path_sections_remove(3cfebe741d41ce70).(path);
621 yaml_path_error_clearcxx . . $ yaml_path_error_clear(3cfebe741d41ce70).(path);
622
623 yaml_path_parse_implcxx . . $ yaml_path_parse_impl(7d2b060a39f1798c).(path, s_path);
624 if (path->errorcxx . . $ yaml_path#error..typecxx . . $ yaml_path_error#type. != YAML_PATH_ERROR_NONEcxx . . $ YAML_PATH_ERROR_NONE.)
625 return -2;
626
627 return 0;
628 }
629
630 void
631 yaml_path_destroycxx . . $ yaml_path_destroy(3cfebe741d41ce70). (yaml_path_tcxx . . $ yaml_path_t# *path)
632 {
633 if (path == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
634 return;
635 yaml_path_sections_removecxx . . $ yaml_path_sections_remove(3cfebe741d41ce70).(path);
636 freecxx . . $ free(5d22bdacc48458e8).(path);
637 }
638
639 const yaml_path_error_tcxx . . $ yaml_path_error_t#*
640 yaml_path_error_getcxx . . $ yaml_path_error_get(a5942c424c13ef68). (yaml_path_tcxx . . $ yaml_path_t# *path)
641 {
642 if (path == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
643 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
644 return &path->errorcxx . . $ yaml_path#error.;
645 }
646
647 size_tcxx . . $ size_t#
648 yaml_path_snprintcxx . . $ yaml_path_snprint(c9b345aa8dd90108). (yaml_path_tcxx . . $ yaml_path_t# *path, char *s, size_tcxx . . $ size_t# max_len)
649 {
650 if (s == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
651 return -1;
652 if (path == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
653 return 0;
654
655 size_tcxx . . $ size_t# len = 0;
656 yaml_path_section_tcxx . . $ yaml_path_section_t# *el;
657 TAILQ_FOREACHcxx . . $ `<external>/2546723208511035544/queue.h:435:9`!(el, &path->sections_list, entries) {
658 len += yaml_path_section_snprintcxx . . $ yaml_path_section_snprint(d7ef56054ab4bae9).(el, s + (len < max_len ? len : max_len), max_len - (len < max_len ? len : max_len));
659 }
660 return len;
661 }
662
663 yaml_path_filter_result_tcxx . . $ yaml_path_filter_result_t#
664 yaml_path_filter_eventcxx . . $ yaml_path_filter_event(e4b698972853c64d). (yaml_path_tcxx . . $ yaml_path_t# *path, yaml_parser_tcxx . . $ yaml_parser_t# *parser, yaml_event_tcxx . . $ yaml_event_t# *event)
665 {
666 if (path == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || parser == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || event == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || path->sections_countcxx . . $ yaml_path#sections_count. == 0)
667 return YAML_PATH_FILTER_RESULT_OUTcxx . . $ YAML_PATH_FILTER_RESULT_OUT.;
668
669 int res = YAML_PATH_FILTER_RESULT_OUTcxx . . $ YAML_PATH_FILTER_RESULT_OUT.;
670
671 const char *anchor = yaml_path_filter_event_get_anchorcxx . . $ yaml_path_filter_event_get_anchor(49834635e4668d66).(event);
672
673 if (!path->start_levelcxx . . $ yaml_path#start_level.) {
674 switch (yaml_path_section_get_firstcxx . . $ yaml_path_section_get_first(c72568e41fc99c80).(path)->typecxx . . $ yaml_path_section#type.) {
675 case YAML_PATH_SECTION_ROOTcxx . . $ YAML_PATH_SECTION_ROOT.:
676 if (event->typecxx . . $ yaml_event_s#type. == YAML_DOCUMENT_START_EVENTcxx . . $ YAML_DOCUMENT_START_EVENT.) {
677 path->start_levelcxx . . $ yaml_path#start_level. = 1;
678 yaml_path_section_get_firstcxx . . $ yaml_path_section_get_first(c72568e41fc99c80).(path)->validcxx . . $ yaml_path_section#valid. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
679 }
680 break;
681 case YAML_PATH_SECTION_ANCHORcxx . . $ YAML_PATH_SECTION_ANCHOR.:
682 if (anchor != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && !strcmpcxx . . $ strcmp(5ae29d726ae57f88).(yaml_path_section_get_firstcxx . . $ yaml_path_section_get_first(c72568e41fc99c80).(path)->datacxx . . $ yaml_path_section#data..anchorcxx . . $ yaml_path_section#$anonymous_type_1#anchor., anchor)) {
683 path->start_levelcxx . . $ yaml_path#start_level. = path->current_levelcxx . . $ yaml_path#current_level.;
684 }
685 break;
686 default:
687 break;
688 }
689 }
690
691 yaml_path_section_tcxx . . $ yaml_path_section_t# *current_section = yaml_path_section_get_currentcxx . . $ yaml_path_section_get_current(c72568e41fc99c80).(path);
692 if (current_section) {
693 switch (event->typecxx . . $ yaml_event_s#type.) {
694 case YAML_DOCUMENT_START_EVENTcxx . . $ YAML_DOCUMENT_START_EVENT.:
695 case YAML_MAPPING_START_EVENTcxx . . $ YAML_MAPPING_START_EVENT.:
696 case YAML_SEQUENCE_START_EVENTcxx . . $ YAML_SEQUENCE_START_EVENT.:
697 case YAML_ALIAS_EVENTcxx . . $ YAML_ALIAS_EVENT.:
698 case YAML_SCALAR_EVENTcxx . . $ YAML_SCALAR_EVENT.:
699 switch (current_section->node_typecxx . . $ yaml_path_section#node_type.) {
700 case YAML_NO_NODEcxx . . $ YAML_NO_NODE.:
701 if (current_section->typecxx . . $ yaml_path_section#type. == YAML_PATH_SECTION_ANCHORcxx . . $ YAML_PATH_SECTION_ANCHOR.) {
702 current_section->validcxx . . $ yaml_path_section#valid. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
703 if (anchor != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && !strcmpcxx . . $ strcmp(5ae29d726ae57f88).(current_section->datacxx . . $ yaml_path_section#data..anchorcxx . . $ yaml_path_section#$anonymous_type_1#anchor., anchor))
704 current_section->validcxx . . $ yaml_path_section#valid. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
705 }
706 break;
707 case YAML_MAPPING_NODEcxx . . $ YAML_MAPPING_NODE.:
708 if (current_section->typecxx . . $ yaml_path_section#type. == YAML_PATH_SECTION_KEYcxx . . $ YAML_PATH_SECTION_KEY.) {
709 if (current_section->countercxx . . $ yaml_path_section#counter. % 2) {
710 current_section->validcxx . . $ yaml_path_section#valid. = current_section->next_validcxx . . $ yaml_path_section#next_valid.;
711 current_section->next_validcxx . . $ yaml_path_section#next_valid. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
712 } else {
713 current_section->next_validcxx . . $ yaml_path_section#next_valid. = !strcmpcxx . . $ strcmp(5ae29d726ae57f88).(current_section->datacxx . . $ yaml_path_section#data..keycxx . . $ yaml_path_section#$anonymous_type_1#key., (const char *)event->datacxx . . $ yaml_event_s#data..scalarcxx . . $ yaml_event_s#$anonymous_type_8#scalar..valuecxx . . $ yaml_event_s#$anonymous_type_8#$anonymous_type_14#value.);
714 current_section->validcxx . . $ yaml_path_section#valid. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
715 }
716 } else if (current_section->typecxx . . $ yaml_path_section#type. == YAML_PATH_SECTION_SELECTIONcxx . . $ YAML_PATH_SECTION_SELECTION.) {
717 if (current_section->countercxx . . $ yaml_path_section#counter. % 2) {
718 current_section->validcxx . . $ yaml_path_section#valid. = current_section->next_validcxx . . $ yaml_path_section#next_valid.;
719 current_section->next_validcxx . . $ yaml_path_section#next_valid. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
720 } else {
721 current_section->next_validcxx . . $ yaml_path_section#next_valid. = yaml_path_selection_is_emptycxx . . $ yaml_path_selection_is_empty(657966c13978526d).(&current_section->datacxx . . $ yaml_path_section#data..selectioncxx . . $ yaml_path_section#$anonymous_type_1#selection.)
722 || yaml_path_selection_key_getcxx . . $ yaml_path_selection_key_get(a4f3805cb2fdf214).(&current_section->datacxx . . $ yaml_path_section#data..selectioncxx . . $ yaml_path_section#$anonymous_type_1#selection., (const char *)event->datacxx . . $ yaml_event_s#data..scalarcxx . . $ yaml_event_s#$anonymous_type_8#scalar..valuecxx . . $ yaml_event_s#$anonymous_type_8#$anonymous_type_14#value.) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
723 current_section->validcxx . . $ yaml_path_section#valid. = current_section->next_validcxx . . $ yaml_path_section#next_valid.;
724 }
725 } else {
726 current_section->validcxx . . $ yaml_path_section#valid. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
727 }
728 break;
729 case YAML_SEQUENCE_NODEcxx . . $ YAML_SEQUENCE_NODE.:
730 if (current_section->typecxx . . $ yaml_path_section#type. == YAML_PATH_SECTION_INDEXcxx . . $ YAML_PATH_SECTION_INDEX.) {
731 current_section->validcxx . . $ yaml_path_section#valid. = current_section->datacxx . . $ yaml_path_section#data..indexcxx . . $ yaml_path_section#$anonymous_type_1#index. == current_section->countercxx . . $ yaml_path_section#counter.;
732 } else if (current_section->typecxx . . $ yaml_path_section#type. == YAML_PATH_SECTION_SETcxx . . $ YAML_PATH_SECTION_SET.) {
733 current_section->validcxx . . $ yaml_path_section#valid. = yaml_path_set_is_emptycxx . . $ yaml_path_set_is_empty(9ec3b52d217c90a3).(current_section->datacxx . . $ yaml_path_section#data..setcxx . . $ yaml_path_section#$anonymous_type_1#set.)
734 || yaml_path_set_has_indexcxx . . $ yaml_path_set_has_index(8568dec506c55c64).(current_section->datacxx . . $ yaml_path_section#data..setcxx . . $ yaml_path_section#$anonymous_type_1#set., current_section->countercxx . . $ yaml_path_section#counter.);
735 } else {
736 current_section->validcxx . . $ yaml_path_section#valid. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
737 }
738 break;
739 default:
740 break;
741 }
742 current_section->countercxx . . $ yaml_path_section#counter.++;
743 default:
744 break;
745 }
746 }
747
748 switch (event->typecxx . . $ yaml_event_s#type.) {
749 case YAML_STREAM_START_EVENTcxx . . $ YAML_STREAM_START_EVENT.:
750 case YAML_STREAM_END_EVENTcxx . . $ YAML_STREAM_END_EVENT.:
751 case YAML_NO_EVENTcxx . . $ YAML_NO_EVENT.:
752 res = YAML_PATH_FILTER_RESULT_INcxx . . $ YAML_PATH_FILTER_RESULT_IN.;
753 break;
754 case YAML_DOCUMENT_START_EVENTcxx . . $ YAML_DOCUMENT_START_EVENT.:
755 if (path->start_levelcxx . . $ yaml_path#start_level. == 1)
756 path->current_levelcxx . . $ yaml_path#current_level.++;
757 res = YAML_PATH_FILTER_RESULT_INcxx . . $ YAML_PATH_FILTER_RESULT_IN.;
758 break;
759 case YAML_DOCUMENT_END_EVENTcxx . . $ YAML_DOCUMENT_END_EVENT.:
760 if (path->start_levelcxx . . $ yaml_path#start_level. == 1)
761 path->current_levelcxx . . $ yaml_path#current_level.--;
762 res = YAML_PATH_FILTER_RESULT_INcxx . . $ YAML_PATH_FILTER_RESULT_IN.;
763 break;
764 case YAML_MAPPING_START_EVENTcxx . . $ YAML_MAPPING_START_EVENT.:
765 case YAML_SEQUENCE_START_EVENTcxx . . $ YAML_SEQUENCE_START_EVENT.:
766 if (current_section) {
767 if (yaml_path_section_current_is_lastcxx . . $ yaml_path_section_current_is_last(30c5b5719add7fa8).(path))
768 if (yaml_path_is_validcxx . . $ yaml_path_is_valid(30c5b5719add7fa8).(path))
769 res = YAML_PATH_FILTER_RESULT_INcxx . . $ YAML_PATH_FILTER_RESULT_IN.;
770 } else {
771 if (path->current_levelcxx . . $ yaml_path#current_level. > path->start_levelcxx . . $ yaml_path#start_level.) {
772 if (yaml_path_is_validcxx . . $ yaml_path_is_valid(30c5b5719add7fa8).(path))
773 res = YAML_PATH_FILTER_RESULT_INcxx . . $ YAML_PATH_FILTER_RESULT_IN.;
774 }
775 }
776 path->current_levelcxx . . $ yaml_path#current_level.++;
777 current_section = yaml_path_section_get_currentcxx . . $ yaml_path_section_get_current(c72568e41fc99c80).(path);
778 if (current_section) {
779 current_section->node_typecxx . . $ yaml_path_section#node_type. = event->typecxx . . $ yaml_event_s#type. == YAML_MAPPING_START_EVENTcxx . . $ YAML_MAPPING_START_EVENT. ? YAML_MAPPING_NODEcxx . . $ YAML_MAPPING_NODE. : YAML_SEQUENCE_NODEcxx . . $ YAML_SEQUENCE_NODE.;
780 current_section->countercxx . . $ yaml_path_section#counter. = 0;
781 }
782 if (current_section) {
783 if (yaml_path_section_is_mandatory_containercxx . . $ yaml_path_section_is_mandatory_container(3448b73db20c2b57).(current_section) && yaml_path_sections_prev_are_validcxx . . $ yaml_path_sections_prev_are_valid(30c5b5719add7fa8).(path))
784 res = YAML_PATH_FILTER_RESULT_INcxx . . $ YAML_PATH_FILTER_RESULT_IN.;
785 }
786 break;
787 case YAML_MAPPING_END_EVENTcxx . . $ YAML_MAPPING_END_EVENT.:
788 case YAML_SEQUENCE_END_EVENTcxx . . $ YAML_SEQUENCE_END_EVENT.:
789 if (current_section) {
790 if (yaml_path_section_is_mandatory_containercxx . . $ yaml_path_section_is_mandatory_container(3448b73db20c2b57).(current_section) && yaml_path_sections_prev_are_validcxx . . $ yaml_path_sections_prev_are_valid(30c5b5719add7fa8).(path))
791 res = YAML_PATH_FILTER_RESULT_INcxx . . $ YAML_PATH_FILTER_RESULT_IN.;
792
793 }
794 path->current_levelcxx . . $ yaml_path#current_level.--;
795 current_section = yaml_path_section_get_currentcxx . . $ yaml_path_section_get_current(c72568e41fc99c80).(path);
796 if (current_section) {
797 if (yaml_path_section_current_is_lastcxx . . $ yaml_path_section_current_is_last(30c5b5719add7fa8).(path))
798 if (yaml_path_is_validcxx . . $ yaml_path_is_valid(30c5b5719add7fa8).(path))
799 res = YAML_PATH_FILTER_RESULT_INcxx . . $ YAML_PATH_FILTER_RESULT_IN.;
800 } else {
801 if (path->current_levelcxx . . $ yaml_path#current_level. > path->start_levelcxx . . $ yaml_path#start_level.) {
802 if (yaml_path_is_validcxx . . $ yaml_path_is_valid(30c5b5719add7fa8).(path))
803 res = YAML_PATH_FILTER_RESULT_INcxx . . $ YAML_PATH_FILTER_RESULT_IN.;
804 }
805 }
806 break;
807 case YAML_ALIAS_EVENTcxx . . $ YAML_ALIAS_EVENT.:
808 case YAML_SCALAR_EVENTcxx . . $ YAML_SCALAR_EVENT.:
809 if (!current_section) {
810 if (path->current_levelcxx . . $ yaml_path#current_level. >= path->start_levelcxx . . $ yaml_path#start_level.)
811 if (yaml_path_is_validcxx . . $ yaml_path_is_valid(30c5b5719add7fa8).(path))
812 res = YAML_PATH_FILTER_RESULT_INcxx . . $ YAML_PATH_FILTER_RESULT_IN.;
813 } else {
814 if (yaml_path_section_current_is_lastcxx . . $ yaml_path_section_current_is_last(30c5b5719add7fa8).(path) && yaml_path_is_validcxx . . $ yaml_path_is_valid(30c5b5719add7fa8).(path))
815 res = YAML_PATH_FILTER_RESULT_INcxx . . $ YAML_PATH_FILTER_RESULT_IN.;
816 if (current_section->validcxx . . $ yaml_path_section#valid.
817 && current_section->node_typecxx . . $ yaml_path_section#node_type. == YAML_MAPPING_NODEcxx . . $ YAML_MAPPING_NODE.
818 && current_section->countercxx . . $ yaml_path_section#counter. % 2) {
819 if (yaml_path_section_is_mandatory_containercxx . . $ yaml_path_section_is_mandatory_container(3448b73db20c2b57).(current_section) && yaml_path_sections_prev_are_validcxx . . $ yaml_path_sections_prev_are_valid(30c5b5719add7fa8).(path))
820 res = YAML_PATH_FILTER_RESULT_IN_DANGLING_KEYcxx . . $ YAML_PATH_FILTER_RESULT_IN_DANGLING_KEY.;
821 }
822 }
823 break;
824 default:
825 break;
826 }
827
828 return res;
829 }