blob: 2fcae20aee62b674d97d4063bf9ea3b8fd4c1577 [file] [log] [blame]
David Sedlákb1ce3f82019-06-05 14:37:26 +02001/**
2 * @file parser_yin.h
3 * @author David Sedlák <xsedla1d@stud.fit.vutbr.cz>
4 * @brief YIN parser.
5 *
6 * Copyright (c) 2015 - 2019 CESNET, z.s.p.o.
7 *
8 * This source code is licensed under BSD 3-Clause License (the "License").
9 * You may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * https://opensource.org/licenses/BSD-3-Clause
13 */
David Sedlák2b626ee2019-06-03 16:40:18 +020014
15#ifndef LY_PARSER_YIN_H_
16#define LY_PARSER_YIN_H_
17
18#include <stdio.h>
David Sedlákb1ce3f82019-06-05 14:37:26 +020019#include <stdlib.h>
20
David Sedlák2b626ee2019-06-03 16:40:18 +020021#include "log.h"
22#include "xml.h"
David Sedlák2b626ee2019-06-03 16:40:18 +020023
David Sedlákf6251182019-06-06 10:22:13 +020024/* list of yin attribute strings */
25extern const char *const yin_attr_list[];
26#define yin_attr2str(STMT) yin_attr_list[STMT]
27
David Sedlák2b214ac2019-06-06 16:11:03 +020028#define YIN_NS_URI "urn:ietf:params:xml:ns:yang:yin:1"
David Sedlákd6e56892019-07-01 15:40:24 +020029#define name2fullname(name, prefix_len) (prefix_len != 0 ? name - (prefix_len + 1) : name)
David Sedlákf250ecf2019-07-01 11:02:05 +020030#define namelen2fulllen(name_len, prefix_len) (prefix_len != 0 ? name_len + prefix_len + 1 : name_len)
David Sedlák2b214ac2019-06-06 16:11:03 +020031
David Sedlák2b626ee2019-06-03 16:40:18 +020032enum YIN_ARGUMENT {
David Sedlák1bccdfa2019-06-17 15:55:27 +020033 YIN_ARG_UNKNOWN = 0, /**< parsed argument can not be matched with any supported yin argument keyword */
David Sedlák2b626ee2019-06-03 16:40:18 +020034 YIN_ARG_NAME, /**< argument name */
35 YIN_ARG_TARGET_NODE, /**< argument target-node */
36 YIN_ARG_MODULE, /**< argument module */
37 YIN_ARG_VALUE, /**< argument value */
38 YIN_ARG_TEXT, /**< argument text */
39 YIN_ARG_CONDITION, /**< argument condition */
40 YIN_ARG_URI, /**< argument uri */
41 YIN_ARG_DATE, /**< argument data */
42 YIN_ARG_TAG, /**< argument tag */
David Sedlák1bccdfa2019-06-17 15:55:27 +020043 YIN_ARG_NONE, /**< empty (special value) */
David Sedlák7ff55a92019-06-17 11:11:41 +020044};
45
David Sedlák1bccdfa2019-06-17 15:55:27 +020046/**
47 * @brief structure to store instance of xml attribute
48 */
David Sedlák7ff55a92019-06-17 11:11:41 +020049struct yin_arg_record {
David Sedlák1bccdfa2019-06-17 15:55:27 +020050 const char *prefix; /**< start of prefix */
51 size_t prefix_len; /**< length of prefix */
52 const char *name; /**< start of name */
53 size_t name_len; /**< length of name */
54 char *content; /**< start of content */
55 size_t content_len; /**< length of content */
56 int dynamic_content; /**< is set to 1 iff content is dynamically allocated 0 otherwise */
David Sedlák2b626ee2019-06-03 16:40:18 +020057};
58
David Sedlákda8ffa32019-07-08 14:17:10 +020059struct yin_parser_ctx {
David Sedlák04e17b22019-07-19 15:29:48 +020060 struct ly_set tpdfs_nodes;
61 struct ly_set grps_nodes;
David Sedlákbba38e52019-07-09 15:20:01 +020062 uint8_t mod_version; /**< module's version */
David Sedlák04e17b22019-07-19 15:29:48 +020063 struct lyxml_context xml_ctx; /**< context for xml parser */
David Sedlákda8ffa32019-07-08 14:17:10 +020064};
65
David Sedlák3ffbc522019-07-02 17:49:28 +020066/* flags to encode cardinality of subelement */
67#define YIN_SUBELEM_MANDATORY 0x01 /**< is set when subelement is mandatory */
68#define YIN_SUBELEM_UNIQUE 0x02 /**< is set when subelement is unique */
David Sedláke1a30302019-07-10 13:49:38 +020069#define YIN_SUBELEM_FIRST 0x04 /**< is set when subelement is actually yang argument mapped to yin element */
David Sedlák0c2bab92019-07-22 15:33:19 +020070#define YIN_SUBELEM_VER2 0x08 /**< subelemnt is allowed only in modules with version at least 2 (YANG 1.1) */
David Sedlák21f87cd2019-07-03 16:53:23 +020071
72#define YIN_SUBELEM_PARSED 0x80 /**< is set during parsing when given subelement is encountered for the first
David Sedlák3ffbc522019-07-02 17:49:28 +020073 time to simply check validity of given constraints */
74
75struct yin_subelement {
76 enum yang_keyword type; /**< type of keyword */
David Sedlák4a650532019-07-10 11:55:18 +020077 void *dest; /**< meta infromation passed to responsible function (mostly information about where parsed subelement should be stored) */
David Sedlákb4e44562019-07-04 15:42:12 +020078 uint8_t flags; /**< describes cardianlity of subelement can be set to YIN_SUBELEM_MANDATORY and YIN_SUBELEM_UNIQUE and YIN_SUBELEM_FIRST */
David Sedlák3ffbc522019-07-02 17:49:28 +020079};
80
David Sedlákb4e44562019-07-04 15:42:12 +020081/* helper structure just to make code look simpler */
David Sedlák3ffbc522019-07-02 17:49:28 +020082struct sized_string {
83 const char *value;
84 size_t len;
85};
86
David Sedlákb4e44562019-07-04 15:42:12 +020087/* Meta information passed to yin_parse_argument function,
88 holds information about where content of argument element will be stored. */
David Sedlák3ffbc522019-07-02 17:49:28 +020089struct yin_argument_meta {
David Sedlákb4e44562019-07-04 15:42:12 +020090 uint16_t *flags; /**< Argument flags */
91 const char **argument; /**< Argument value */
David Sedlák3ffbc522019-07-02 17:49:28 +020092};
93
David Sedlák04e17b22019-07-19 15:29:48 +020094/* Meta information passed to functions working with tree schema such as yin_parse_any */
David Sedlák8a83bbb2019-07-18 14:46:00 +020095struct tree_node_meta {
96 struct lysp_node *parent; /**< parent node */
97 struct lysp_node **siblings; /**< linked list of siblings */
98};
99
David Sedlák04e17b22019-07-19 15:29:48 +0200100/* Meta information passed to yin_parse_typedef */
101struct typedef_meta {
102 struct lysp_node *parent; /**< parent node */
David Sedlák0d6de5a2019-07-22 13:25:44 +0200103 struct lysp_tpdf **typedefs; /**< [Sized array](@ref sizedarrays) of typedefs to add to */
104};
105
David Sedlák0c2bab92019-07-22 15:33:19 +0200106/* Meta information passed to yin_parse_augment function */
David Sedlák0d6de5a2019-07-22 13:25:44 +0200107struct augment_meta {
108 struct lysp_node *parent; /**< parent node */
109 struct lysp_augment **augments; /**< [Sized array](@ref sizedarrays) of augments to add to */
David Sedlák04e17b22019-07-19 15:29:48 +0200110};
111
David Sedlák0c2bab92019-07-22 15:33:19 +0200112/* Meta information passed to yin_parse_include function */
113struct include_meta {
114 const char *name; /**< module/submodule name */
115 struct lysp_include **includes; /**< [Sized array](@ref sizedarrays) of parsed includes to add to */
116};
117
David Sedlák2b626ee2019-06-03 16:40:18 +0200118/**
119 * @brief Match argument name.
120 *
121 * @param[in] name String representing name.
122 * @param[in] len Lenght of the name.
123 *
David Sedlákb1ce3f82019-06-05 14:37:26 +0200124 * @return YIN_ARGUMENT value.
David Sedlák2b626ee2019-06-03 16:40:18 +0200125 */
David Sedlák060b00e2019-06-19 11:12:06 +0200126enum YIN_ARGUMENT yin_match_argument_name(const char *name, size_t len);
David Sedlák2b626ee2019-06-03 16:40:18 +0200127
128/**
David Sedlák555c7202019-07-04 12:14:12 +0200129 * @brief Generic function for content parsing
David Sedlák2b626ee2019-06-03 16:40:18 +0200130 *
David Sedlákda8ffa32019-07-08 14:17:10 +0200131 * @param[in,out] ctx Yin parser context for logging and to store current state.
David Sedlák555c7202019-07-04 12:14:12 +0200132 * @param[in] subelem_info array of valid subelement types and meta information,
133 * array must be ordered by subelem_info->type in ascending order.
134 * @param[in] subelem_info_size Size of subelem_info array.
135 * @param[in,out] data Data to read from, always moved to currently handled character.
136 * @param[in] current_element Type of current element.
David Sedlákb4e44562019-07-04 15:42:12 +0200137 * @param[out] text_content Where the text content of element should be stored if any. Text content is ignored if set to NULL.
David Sedlákda8ffa32019-07-08 14:17:10 +0200138 * @param[in,out] exts Extension instance to add to. Can be se to null if element cannot have extension as subelements.
David Sedlákb4e44562019-07-04 15:42:12 +0200139
David Sedlák2b214ac2019-06-06 16:11:03 +0200140 * @return LY_ERR values.
David Sedlák2b626ee2019-06-03 16:40:18 +0200141 */
David Sedlákda8ffa32019-07-08 14:17:10 +0200142LY_ERR yin_parse_content(struct yin_parser_ctx *ctx, struct yin_subelement *subelem_info, signed char subelem_info_size,
David Sedlák555c7202019-07-04 12:14:12 +0200143 const char **data, enum yang_keyword current_element, const char **text_content,
144 struct lysp_ext_instance **exts);
David Sedlák2b626ee2019-06-03 16:40:18 +0200145
David Sedlákd9d3a312019-06-04 09:47:10 +0200146/**
David Sedlák92147b02019-07-09 14:01:01 +0200147 * @brief Parse yang-version element.
148 *
149 * @param[in,out] ctx Yin parser context for logging and to store current state.
David Sedlákbba38e52019-07-09 15:20:01 +0200150 * @param[in] attrs [Sized array](@ref sizedarrays) of attributes of yang-version element.
David Sedlák92147b02019-07-09 14:01:01 +0200151 * @param[in] data Data to read from, always moved to currently handled character.
152 * @param[out] version Storage for the parsed information.
153 * @param[in,out] exts Extension instance to add to.
154 *
155 * @return LY_ERR values.
156 */
157LY_ERR yin_parse_yangversion(struct yin_parser_ctx *ctx, struct yin_arg_record *attrs, const char **data, uint8_t *version,
158 struct lysp_ext_instance **exts);
159
160/**
David Sedlák4a650532019-07-10 11:55:18 +0200161 * @brief Check that val is valid UTF8 character sequence of val_type.
162 * Doesn't check empty string, only character validity.
163 *
164 * @param[in] ctx Yin parser context for logging.
165 * @param[in] val_type Type of the input string to select method of checking character validity.
166 * @param[in] val Input to validate.
167 * @param[in] len Length of input.
168 *
169 * @return LY_ERR values.
170 */
171LY_ERR yin_validate_value(struct yin_parser_ctx *ctx, enum yang_arg val_type, char *val, size_t len);
172
173/**
David Sedlák2b214ac2019-06-06 16:11:03 +0200174 * @brief Parse import element.
David Sedlákda63c082019-06-04 13:52:23 +0200175 *
David Sedlákda8ffa32019-07-08 14:17:10 +0200176 * @param[in,out] ctx Yin parser context for logging and to store current state.
David Sedlákbba38e52019-07-09 15:20:01 +0200177 * @param[in] attrs [Sized array](@ref sizedarrays) of attributes of import element.
David Sedlákda8ffa32019-07-08 14:17:10 +0200178 * @param[in,out] data Data to read from, always moved to currently handled character.
David Sedlákb4e44562019-07-04 15:42:12 +0200179 * @param[in,out] mod Structure of module that is being parsed.
David Sedlákda63c082019-06-04 13:52:23 +0200180 *
David Sedlák2b214ac2019-06-06 16:11:03 +0200181 * @return LY_ERR values.
David Sedlákda63c082019-06-04 13:52:23 +0200182 */
David Sedlák1f90d252019-07-10 17:09:32 +0200183LY_ERR yin_parse_import(struct yin_parser_ctx *ctx, struct yin_arg_record *attrs,
David Sedlák619db942019-07-03 14:47:30 +0200184 const char **data, struct lysp_module *mod);
David Sedlák2b626ee2019-06-03 16:40:18 +0200185
David Sedlák1bccdfa2019-06-17 15:55:27 +0200186/**
David Sedlákb4e44562019-07-04 15:42:12 +0200187 * @brief Match yang keyword from yin data.
David Sedlák1bccdfa2019-06-17 15:55:27 +0200188 *
David Sedlákda8ffa32019-07-08 14:17:10 +0200189 * @param[in,out] ctx Yin parser context for logging and to store current state.
David Sedlákb4e44562019-07-04 15:42:12 +0200190 * @param[in] name Start of keyword name
David Sedlák8f7a1172019-06-20 14:42:18 +0200191 * @param[in] name_len Lenght of keyword name.
192 * @param[in] prefix Start of keyword prefix.
193 * @param[in] prefix_len lenght of prefix.
David Sedlákc1771b12019-07-10 15:55:46 +0200194 * @param[in] parrent Identification of parrent element, use YANG_NONE for elements without parrent.
David Sedlák1bccdfa2019-06-17 15:55:27 +0200195 *
196 * @return yang_keyword values.
197 */
David Sedlákda8ffa32019-07-08 14:17:10 +0200198enum yang_keyword yin_match_keyword(struct yin_parser_ctx *ctx, const char *name, size_t name_len,
David Sedlákc1771b12019-07-10 15:55:46 +0200199 const char *prefix, size_t prefix_len, enum yang_keyword parrent);
David Sedlák1bccdfa2019-06-17 15:55:27 +0200200
David Sedlákb6e65972019-06-19 10:44:13 +0200201/**
David Sedlák1fdb2522019-07-09 16:22:57 +0200202 * @brief Parse mandatory element.
203 *
204 * @param[in,out] ctx Yin parser context for logging and to store current state.
205 * @param[in] attrs [Sized array](@ref sizedarrays) of attributes of status element.
206 * @param[in,out] data Data to read from, always moved to currently handled character.
207 * @param[in,out] flags Flags to add to.
208 * @param[in,out] exts Extension instances to add to.
209 *
210 * @return LY_ERR values.
211 */
212LY_ERR yin_parse_mandatory(struct yin_parser_ctx *ctx, struct yin_arg_record *attrs, const char **data,
213 uint16_t *flags, struct lysp_ext_instance **exts);
214
215/**
David Sedlákb4e44562019-07-04 15:42:12 +0200216 * @brief Parse status element.
David Sedlákb6e65972019-06-19 10:44:13 +0200217 *
David Sedlákda8ffa32019-07-08 14:17:10 +0200218 * @param[in,out] ctx Yin parser context for logging and to store current state.
David Sedlákbba38e52019-07-09 15:20:01 +0200219 * @param[in] attrs [Sized array](@ref sizedarrays) of attributes of status element.
David Sedlákda8ffa32019-07-08 14:17:10 +0200220 * @param[in,out] data Data to read from, always moved to currently handled character.
David Sedlákb6e65972019-06-19 10:44:13 +0200221 * @param[in,out] flags Flags to add to.
222 * @param[in,out] exts Extension instances to add to.
223 *
224 * @return LY_ERR values.
225 */
David Sedlák1f90d252019-07-10 17:09:32 +0200226LY_ERR yin_parse_status(struct yin_parser_ctx *ctx, struct yin_arg_record *attrs, const char **data,
David Sedlák554e36d2019-06-20 16:00:04 +0200227 uint16_t *flags, struct lysp_ext_instance **exts);
David Sedlák8f7a1172019-06-20 14:42:18 +0200228
229/**
David Sedlák32eee7b2019-07-09 12:38:44 +0200230 * @brief Parse when element.
231 *
232 * @param[in,out] ctx Yin parser context for logging and to store current state.
David Sedlákbba38e52019-07-09 15:20:01 +0200233 * @param[in] attrs [Sized array](@ref sizedarrays) of attributes of when element.
David Sedlák32eee7b2019-07-09 12:38:44 +0200234 * @param[in,out] data Data to read from, always moved to currently handled character.
235 * @param[out] when_p When pointer to parse to.
236 */
David Sedlákbba38e52019-07-09 15:20:01 +0200237LY_ERR yin_parse_when(struct yin_parser_ctx *ctx, struct yin_arg_record *attrs, const char **data,
238 struct lysp_when **when_p);
David Sedlák32eee7b2019-07-09 12:38:44 +0200239
240/**
David Sedlákb4e44562019-07-04 15:42:12 +0200241 * @brief Parse revision date element.
David Sedlák3ffbc522019-07-02 17:49:28 +0200242 *
David Sedlákda8ffa32019-07-08 14:17:10 +0200243 * @param[in,out] ctx Yin parser context for logging and to store current state.
David Sedlákbba38e52019-07-09 15:20:01 +0200244 * @param[in] attrs [Sized array](@ref sizedarrays) of attributes of revision-date element.
David Sedlákda8ffa32019-07-08 14:17:10 +0200245 * @param[in,out] data Data to read from, always moved to currently handled character.
David Sedlák3ffbc522019-07-02 17:49:28 +0200246 * @param[in,out] rev Array to store the parsed value in.
247 * @param[in,out] exts Extension instances to add to.
248 *
249 * @return LY_ERR values.
250 */
David Sedlák1f90d252019-07-10 17:09:32 +0200251LY_ERR yin_parse_revision_date(struct yin_parser_ctx *ctx, struct yin_arg_record *attrs, const char **data,
David Sedlák3ffbc522019-07-02 17:49:28 +0200252 char *rev, struct lysp_ext_instance **exts);
253
254/**
David Sedlákbba38e52019-07-09 15:20:01 +0200255 * @brief load all attributes of element into ([sized array](@ref sizedarrays)). Caller is suposed to free the array.
David Sedlák8f7a1172019-06-20 14:42:18 +0200256 *
David Sedlákda8ffa32019-07-08 14:17:10 +0200257 * @param[in,out] ctx Yin parser context for logging and to store current state.
258 * @param[in,out] data Data to read from, always moved to currently handled character.
David Sedlákbba38e52019-07-09 15:20:01 +0200259 * @param[out] attrs ([Sized array](@ref sizedarrays)) of attributes.
David Sedlák8f7a1172019-06-20 14:42:18 +0200260 *
261 * @return LY_ERR values.
262 */
David Sedlákda8ffa32019-07-08 14:17:10 +0200263LY_ERR yin_load_attributes(struct yin_parser_ctx *ctx, const char **data, struct yin_arg_record **attrs);
David Sedlákb6e65972019-06-19 10:44:13 +0200264
David Sedlák554e36d2019-06-20 16:00:04 +0200265/**
David Sedlák2721d3d2019-06-21 15:37:41 +0200266 * @brief Parse yin-elemenet element.
267 *
David Sedlákda8ffa32019-07-08 14:17:10 +0200268 * @param[in,out] ctx Yin parser context for logging and to store current state.
David Sedlákbba38e52019-07-09 15:20:01 +0200269 * @param[in] attrs [Sized array](@ref sizedarrays) of attributes of yin-element element.
David Sedlák2721d3d2019-06-21 15:37:41 +0200270 * @param[in,out] data Data to read from, always moved to currently handled position.
271 * @param[in,out] flags Flags to add to.
David Sedlák3ffbc522019-07-02 17:49:28 +0200272 * @prama[in,out] exts Extension instance to add to.
David Sedlák2721d3d2019-06-21 15:37:41 +0200273 *
274 * @return LY_ERR values.
275 */
David Sedlákda8ffa32019-07-08 14:17:10 +0200276LY_ERR yin_parse_yin_element_element(struct yin_parser_ctx *ctx, struct yin_arg_record *attrs, const char **data,
David Sedlák3ffbc522019-07-02 17:49:28 +0200277 uint16_t *flags, struct lysp_ext_instance **exts);
278
279/**
280 * @brief Parse argument element.
281 *
282 * @param[in,out] xml_ctx Xml context.
David Sedlákbba38e52019-07-09 15:20:01 +0200283 * @param[in] attrs [Sized array](@ref sizedarrays) of attributes of argument element.
David Sedlák3ffbc522019-07-02 17:49:28 +0200284 * @param[in,out] data Data to read from, always moved to currently handled character.
285 * @param[in,out] arg_meta Meta information about destionation af prased data.
286 * @param[in,out] exts Extension instance to add to.
287 *
288 * @return LY_ERR values.
289 */
David Sedlák1f90d252019-07-10 17:09:32 +0200290LY_ERR yin_parse_argument_element(struct yin_parser_ctx *ctx, struct yin_arg_record *attrs, const char **data,
David Sedlák3ffbc522019-07-02 17:49:28 +0200291 struct yin_argument_meta *arg_meta, struct lysp_ext_instance **exts);
David Sedlák2721d3d2019-06-21 15:37:41 +0200292
293/**
David Sedlák554e36d2019-06-20 16:00:04 +0200294 * @brief Parse the extension statement.
295 *
David Sedlákda8ffa32019-07-08 14:17:10 +0200296 * @param[in,out] ctx Yin parser context for logging and to store current state.
David Sedlákbba38e52019-07-09 15:20:01 +0200297 * @param[in] attrs [Sized array](@ref sizedarrays) of attributes of extension element.
David Sedlák554e36d2019-06-20 16:00:04 +0200298 * @param[in,out] data Data to read from.
299 * @param[in,out] extensions Extensions to add to.
300 *
301 * @return LY_ERR values.
302 */
David Sedlák1f90d252019-07-10 17:09:32 +0200303LY_ERR yin_parse_extension(struct yin_parser_ctx *ctx, struct yin_arg_record *attrs,
David Sedlák554e36d2019-06-20 16:00:04 +0200304 const char **data, struct lysp_ext **extensions);
305
David Sedlákb1a78352019-06-28 16:16:29 +0200306/**
307 * @brief Parse instance of extension.
308 *
David Sedlákda8ffa32019-07-08 14:17:10 +0200309 * @param[in,out] ctx Yin parser context for logging and to store current state.
David Sedlákbba38e52019-07-09 15:20:01 +0200310 * @param[in] attrs [Sized array](@ref sizedarrays) of attributes of extension instance.
David Sedlákb1a78352019-06-28 16:16:29 +0200311 * @param[in,out] data Data to read from, always moved to currently handled character.
312 * @param[in] ext_name Name of the extension element.
313 * @param[in] ext_name_len Length of extension name.
David Sedlákb4e44562019-07-04 15:42:12 +0200314 * @param[in] subelem Type of the keyword this extension instance is a subelement of.
315 * @param[in] subelem_index Index of the keyword instance this extension instance is a subelement of
316 * @param[in,out] exts Extension instance to add to.
David Sedlákb1a78352019-06-28 16:16:29 +0200317 *
318 * @return LY_ERR values.
319 */
David Sedlák1f90d252019-07-10 17:09:32 +0200320LY_ERR yin_parse_extension_instance(struct yin_parser_ctx *ctx, struct yin_arg_record *attrs, const char **data,
David Sedlák619db942019-07-03 14:47:30 +0200321 const char *ext_name, int ext_name_len, LYEXT_SUBSTMT subelem,
322 uint32_t subelem_index, struct lysp_ext_instance **exts);
David Sedlákb1a78352019-06-28 16:16:29 +0200323
324/**
325 * @brief Parse yin element into generic structure.
326 *
David Sedlákda8ffa32019-07-08 14:17:10 +0200327 * @param[in,out] ctx Yin parser context for logging and to store current state.
David Sedlákb1a78352019-06-28 16:16:29 +0200328 * @param[in] name Name of element.
329 * @param[in] name_len Length of elements Name.
David Sedlákb4e44562019-07-04 15:42:12 +0200330 * @param[in] prefix Element prefix.
331 * @param[in] prefix_len Length of element prefix.
David Sedlákb1a78352019-06-28 16:16:29 +0200332 * @param[in,out] data Data to read from, always moved to currently handled character.
333 * @param[out] element Where the element structure should be stored.
334 *
335 * @return LY_ERR values.
336 */
David Sedlákda8ffa32019-07-08 14:17:10 +0200337LY_ERR yin_parse_element_generic(struct yin_parser_ctx *ctx, const char *name, size_t name_len, const char *prefix,
338 size_t prefix_len, const char **data, struct lysp_stmt **element);
David Sedlákb1a78352019-06-28 16:16:29 +0200339
David Sedlák2b626ee2019-06-03 16:40:18 +0200340#endif /* LY_PARSER_YIN_H_*/