David Sedlák | b1ce3f8 | 2019-06-05 14:37:26 +0200 | [diff] [blame] | 1 | /** |
| 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ák | 2b626ee | 2019-06-03 16:40:18 +0200 | [diff] [blame] | 14 | |
| 15 | #ifndef LY_PARSER_YIN_H_ |
| 16 | #define LY_PARSER_YIN_H_ |
| 17 | |
| 18 | #include <stdio.h> |
David Sedlák | b1ce3f8 | 2019-06-05 14:37:26 +0200 | [diff] [blame] | 19 | #include <stdlib.h> |
| 20 | |
David Sedlák | 2b626ee | 2019-06-03 16:40:18 +0200 | [diff] [blame] | 21 | #include "log.h" |
| 22 | #include "xml.h" |
David Sedlák | 2b626ee | 2019-06-03 16:40:18 +0200 | [diff] [blame] | 23 | |
David Sedlák | f625118 | 2019-06-06 10:22:13 +0200 | [diff] [blame] | 24 | /* list of yin attribute strings */ |
| 25 | extern const char *const yin_attr_list[]; |
| 26 | #define yin_attr2str(STMT) yin_attr_list[STMT] |
| 27 | |
David Sedlák | 2b214ac | 2019-06-06 16:11:03 +0200 | [diff] [blame] | 28 | #define YIN_NS_URI "urn:ietf:params:xml:ns:yang:yin:1" |
David Sedlák | d6e5689 | 2019-07-01 15:40:24 +0200 | [diff] [blame] | 29 | #define name2fullname(name, prefix_len) (prefix_len != 0 ? name - (prefix_len + 1) : name) |
David Sedlák | f250ecf | 2019-07-01 11:02:05 +0200 | [diff] [blame] | 30 | #define namelen2fulllen(name_len, prefix_len) (prefix_len != 0 ? name_len + prefix_len + 1 : name_len) |
David Sedlák | 2b214ac | 2019-06-06 16:11:03 +0200 | [diff] [blame] | 31 | |
David Sedlák | 2b626ee | 2019-06-03 16:40:18 +0200 | [diff] [blame] | 32 | enum YIN_ARGUMENT { |
David Sedlák | 1bccdfa | 2019-06-17 15:55:27 +0200 | [diff] [blame] | 33 | YIN_ARG_UNKNOWN = 0, /**< parsed argument can not be matched with any supported yin argument keyword */ |
David Sedlák | 2b626ee | 2019-06-03 16:40:18 +0200 | [diff] [blame] | 34 | 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 */ |
| 43 | YIN_ARG_XMLNS, /**< argument xmlns */ |
David Sedlák | 1bccdfa | 2019-06-17 15:55:27 +0200 | [diff] [blame] | 44 | YIN_ARG_NONE, /**< empty (special value) */ |
David Sedlák | 7ff55a9 | 2019-06-17 11:11:41 +0200 | [diff] [blame] | 45 | }; |
| 46 | |
David Sedlák | 1bccdfa | 2019-06-17 15:55:27 +0200 | [diff] [blame] | 47 | /** |
| 48 | * @brief structure to store instance of xml attribute |
| 49 | */ |
David Sedlák | 7ff55a9 | 2019-06-17 11:11:41 +0200 | [diff] [blame] | 50 | struct yin_arg_record { |
David Sedlák | 1bccdfa | 2019-06-17 15:55:27 +0200 | [diff] [blame] | 51 | const char *prefix; /**< start of prefix */ |
| 52 | size_t prefix_len; /**< length of prefix */ |
| 53 | const char *name; /**< start of name */ |
| 54 | size_t name_len; /**< length of name */ |
| 55 | char *content; /**< start of content */ |
| 56 | size_t content_len; /**< length of content */ |
| 57 | int dynamic_content; /**< is set to 1 iff content is dynamically allocated 0 otherwise */ |
David Sedlák | 2b626ee | 2019-06-03 16:40:18 +0200 | [diff] [blame] | 58 | }; |
| 59 | |
David Sedlák | 3ffbc52 | 2019-07-02 17:49:28 +0200 | [diff] [blame] | 60 | /* flags to encode cardinality of subelement */ |
| 61 | #define YIN_SUBELEM_MANDATORY 0x01 /**< is set when subelement is mandatory */ |
| 62 | #define YIN_SUBELEM_UNIQUE 0x02 /**< is set when subelement is unique */ |
David Sedlák | 21f87cd | 2019-07-03 16:53:23 +0200 | [diff] [blame] | 63 | #define YIN_SUBELEM_FIRST 0x08 /**< is set when subelement is actually yang argument mapped to yin element */ |
| 64 | |
| 65 | #define YIN_SUBELEM_PARSED 0x80 /**< is set during parsing when given subelement is encountered for the first |
David Sedlák | 3ffbc52 | 2019-07-02 17:49:28 +0200 | [diff] [blame] | 66 | time to simply check validity of given constraints */ |
| 67 | |
David Sedlák | 619db94 | 2019-07-03 14:47:30 +0200 | [diff] [blame] | 68 | #define YIN_ARG_MANDATORY 0x01 /**< is set when attribute is mandatory */ |
| 69 | #define YIN_ARG_IDENTIFIER 0x02 /**< is set when argument value is supposed to be identifier */ |
| 70 | |
David Sedlák | 3ffbc52 | 2019-07-02 17:49:28 +0200 | [diff] [blame] | 71 | struct yin_subelement { |
| 72 | enum yang_keyword type; /**< type of keyword */ |
| 73 | void *dest; /**< meta infromation passed to responsible function (information about where parsed subelement should be stored) */ |
| 74 | uint8_t flags; /**< describes carianlity of subelement can be set to YIN_SUBELEM_MANDATORY and YIN_SUBELEM_UNIQUE */ |
| 75 | }; |
| 76 | |
| 77 | struct sized_string { |
| 78 | const char *value; |
| 79 | size_t len; |
| 80 | }; |
| 81 | |
David Sedlák | 3ffbc52 | 2019-07-02 17:49:28 +0200 | [diff] [blame] | 82 | struct yin_argument_meta { |
| 83 | uint16_t *flags; /**< */ |
| 84 | const char **argument; /**< */ |
| 85 | }; |
| 86 | |
David Sedlák | 2b626ee | 2019-06-03 16:40:18 +0200 | [diff] [blame] | 87 | /** |
| 88 | * @brief Match argument name. |
| 89 | * |
| 90 | * @param[in] name String representing name. |
| 91 | * @param[in] len Lenght of the name. |
| 92 | * |
David Sedlák | b1ce3f8 | 2019-06-05 14:37:26 +0200 | [diff] [blame] | 93 | * @return YIN_ARGUMENT value. |
David Sedlák | 2b626ee | 2019-06-03 16:40:18 +0200 | [diff] [blame] | 94 | */ |
David Sedlák | 060b00e | 2019-06-19 11:12:06 +0200 | [diff] [blame] | 95 | enum YIN_ARGUMENT yin_match_argument_name(const char *name, size_t len); |
David Sedlák | 2b626ee | 2019-06-03 16:40:18 +0200 | [diff] [blame] | 96 | |
| 97 | /** |
David Sedlák | 3ffbc52 | 2019-07-02 17:49:28 +0200 | [diff] [blame] | 98 | * @brief function to parse meta tags eg. elements with text element as child |
| 99 | * |
| 100 | * @param[in] xml_ctx Xml context. |
| 101 | * @param[in] args Sized array of arguments of current element. |
| 102 | * @param[in,out] data Data to read from. |
| 103 | * @param[out] value Where the content of meta tag should be stored. |
| 104 | * |
| 105 | * @return LY_ERR values. |
| 106 | */ |
| 107 | LY_ERR yin_parse_meta_element(struct lyxml_context *xml_ctx, const char **data, enum yang_keyword elem_type, |
| 108 | const char **value, struct lysp_ext_instance **exts); |
| 109 | |
| 110 | /** |
David Sedlák | 619db94 | 2019-07-03 14:47:30 +0200 | [diff] [blame] | 111 | * @brief Map keyword type to substatement info. |
| 112 | * |
| 113 | * @param[in] kw Keyword type. |
| 114 | * |
| 115 | * @return correct LYEXT_SUBSTMT information. |
| 116 | */ |
| 117 | LYEXT_SUBSTMT kw2lyext_substmt(enum yang_keyword kw); |
| 118 | |
| 119 | /** |
David Sedlák | 555c720 | 2019-07-04 12:14:12 +0200 | [diff] [blame^] | 120 | * @brief Generic function for content parsing |
David Sedlák | 2b626ee | 2019-06-03 16:40:18 +0200 | [diff] [blame] | 121 | * |
David Sedlák | 555c720 | 2019-07-04 12:14:12 +0200 | [diff] [blame^] | 122 | * @param[in,out] xml_ctx Xml context. |
| 123 | * @param[in] subelem_info array of valid subelement types and meta information, |
| 124 | * array must be ordered by subelem_info->type in ascending order. |
| 125 | * @param[in] subelem_info_size Size of subelem_info array. |
| 126 | * @param[in,out] data Data to read from, always moved to currently handled character. |
| 127 | * @param[in] current_element Type of current element. |
| 128 | * @param[out] Where the text content of element should be stored. Text content is ignored if set to NULL. |
| 129 | * @param[in] exts Extension instance to add to. Can be null if element cannot have extension as subelement. |
David Sedlák | 2b214ac | 2019-06-06 16:11:03 +0200 | [diff] [blame] | 130 | * @return LY_ERR values. |
David Sedlák | 2b626ee | 2019-06-03 16:40:18 +0200 | [diff] [blame] | 131 | */ |
David Sedlák | 555c720 | 2019-07-04 12:14:12 +0200 | [diff] [blame^] | 132 | LY_ERR yin_parse_content(struct lyxml_context *xml_ctx, struct yin_subelement *subelem_info, size_t subelem_info_size, |
| 133 | const char **data, enum yang_keyword current_element, const char **text_content, |
| 134 | struct lysp_ext_instance **exts); |
David Sedlák | 2b626ee | 2019-06-03 16:40:18 +0200 | [diff] [blame] | 135 | |
David Sedlák | d9d3a31 | 2019-06-04 09:47:10 +0200 | [diff] [blame] | 136 | /** |
David Sedlák | 619db94 | 2019-07-03 14:47:30 +0200 | [diff] [blame] | 137 | * @brief Parse simple element without any special constaints and argument mapped to yin attribute. |
| 138 | * |
| 139 | * @param[in] xml_ctx Xml context. |
| 140 | * @param[in,out] data Data to read from, always moved to currently handled character. |
| 141 | * @param[out] value Where value of attribute should be stored. |
| 142 | * |
| 143 | * @return LY_ERR values. |
| 144 | */ |
| 145 | LY_ERR yin_parse_simple_element(struct lyxml_context *xml_ctx, struct yin_arg_record *attrs, const char **data, |
| 146 | enum yang_keyword kw, const char **value, enum YIN_ARGUMENT arg_type, |
| 147 | uint8_t argument_flags, struct lysp_ext_instance **exts); |
| 148 | |
| 149 | /** |
David Sedlák | 2b214ac | 2019-06-06 16:11:03 +0200 | [diff] [blame] | 150 | * @brief Parse import element. |
David Sedlák | da63c08 | 2019-06-04 13:52:23 +0200 | [diff] [blame] | 151 | * |
| 152 | * @param[in] xml_ctx Xml context. |
David Sedlák | 8f7a117 | 2019-06-20 14:42:18 +0200 | [diff] [blame] | 153 | * @param[in] args Sized array of arguments of current element. |
David Sedlák | da63c08 | 2019-06-04 13:52:23 +0200 | [diff] [blame] | 154 | * @param[in] module_prefix Prefix of the module to check prefix collisions. |
David Sedlák | 3ffbc52 | 2019-07-02 17:49:28 +0200 | [diff] [blame] | 155 | * @param[in,out] data Data to read from. |
David Sedlák | b666bcc | 2019-06-05 15:00:05 +0200 | [diff] [blame] | 156 | * @param[in,out] imports Parsed imports to add to. |
David Sedlák | da63c08 | 2019-06-04 13:52:23 +0200 | [diff] [blame] | 157 | * |
David Sedlák | 2b214ac | 2019-06-06 16:11:03 +0200 | [diff] [blame] | 158 | * @return LY_ERR values. |
David Sedlák | da63c08 | 2019-06-04 13:52:23 +0200 | [diff] [blame] | 159 | */ |
David Sedlák | 619db94 | 2019-07-03 14:47:30 +0200 | [diff] [blame] | 160 | LY_ERR yin_parse_import(struct lyxml_context *xml_ctx, struct yin_arg_record **args, |
| 161 | const char **data, struct lysp_module *mod); |
David Sedlák | 2b626ee | 2019-06-03 16:40:18 +0200 | [diff] [blame] | 162 | |
David Sedlák | 1bccdfa | 2019-06-17 15:55:27 +0200 | [diff] [blame] | 163 | /** |
| 164 | * @brief match yang keyword from yin data |
| 165 | * |
David Sedlák | 8f7a117 | 2019-06-20 14:42:18 +0200 | [diff] [blame] | 166 | * @param[in] xml_ctx Xml context. |
| 167 | * @param[in] name Name Start of keyword name |
| 168 | * @param[in] name_len Lenght of keyword name. |
| 169 | * @param[in] prefix Start of keyword prefix. |
| 170 | * @param[in] prefix_len lenght of prefix. |
David Sedlák | 1bccdfa | 2019-06-17 15:55:27 +0200 | [diff] [blame] | 171 | * |
| 172 | * @return yang_keyword values. |
| 173 | */ |
David Sedlák | 554e36d | 2019-06-20 16:00:04 +0200 | [diff] [blame] | 174 | enum yang_keyword yin_match_keyword(struct lyxml_context *xml_ctx, const char *name, size_t name_len, |
| 175 | const char *prefix, size_t prefix_len); |
David Sedlák | 1bccdfa | 2019-06-17 15:55:27 +0200 | [diff] [blame] | 176 | |
David Sedlák | b6e6597 | 2019-06-19 10:44:13 +0200 | [diff] [blame] | 177 | /** |
| 178 | * @brief Parse status statement. |
| 179 | * |
| 180 | * @param[in] xml_ctx Xml context. |
| 181 | * @param[in,out] data Data to read from. |
| 182 | * @param[in,out] flags Flags to add to. |
| 183 | * @param[in,out] exts Extension instances to add to. |
| 184 | * |
| 185 | * @return LY_ERR values. |
| 186 | */ |
David Sedlák | 554e36d | 2019-06-20 16:00:04 +0200 | [diff] [blame] | 187 | LY_ERR yin_parse_status(struct lyxml_context *xml_ctx, struct yin_arg_record **status_args, const char **data, |
| 188 | uint16_t *flags, struct lysp_ext_instance **exts); |
David Sedlák | 8f7a117 | 2019-06-20 14:42:18 +0200 | [diff] [blame] | 189 | |
| 190 | /** |
David Sedlák | 3ffbc52 | 2019-07-02 17:49:28 +0200 | [diff] [blame] | 191 | * @brief Parse yin argument, arg_val is unchanged if argument arg_type wasn't found. |
David Sedlák | 8f7a117 | 2019-06-20 14:42:18 +0200 | [diff] [blame] | 192 | * |
| 193 | * @param[in] xml_ctx XML parser context. |
| 194 | * @param[in,out] data Data to read from. |
| 195 | * @param[in] arg_type Type of argument that is expected in parsed element (use YIN_ARG_NONE for elements without special arguments). |
| 196 | * @param[out] arg_val Where value of argument should be stored. Can be NULL if arg_type is specified as YIN_ARG_NONE. |
David Sedlák | 619db94 | 2019-07-03 14:47:30 +0200 | [diff] [blame] | 197 | * @param[in] flags Used to define constraints like mandatory of given attribute can be set to YIN_ATTR_MANDATORY. |
| 198 | * @param[in] current_element Identification of current element, used for logging. |
David Sedlák | 8f7a117 | 2019-06-20 14:42:18 +0200 | [diff] [blame] | 199 | * |
| 200 | * @return LY_ERR values. |
| 201 | */ |
David Sedlák | 619db94 | 2019-07-03 14:47:30 +0200 | [diff] [blame] | 202 | LY_ERR yin_parse_attribute(struct lyxml_context *xml_ctx, struct yin_arg_record **args, enum YIN_ARGUMENT arg_type, |
| 203 | const char **arg_val, uint8_t flags, enum yang_keyword current_element); |
David Sedlák | 8f7a117 | 2019-06-20 14:42:18 +0200 | [diff] [blame] | 204 | |
| 205 | /** |
David Sedlák | 3ffbc52 | 2019-07-02 17:49:28 +0200 | [diff] [blame] | 206 | * @brief Parse prefix element. |
| 207 | * |
| 208 | * @param[in] xml_ctx Xml parser context. |
| 209 | * @param[in] attrs Attributes of prefix element. |
| 210 | * @param[in,out] prefix Where the value of prefix should be stored. |
| 211 | * @param[in,out] data Data to read from, always moved to currently handled character. |
| 212 | * @param[in] exts Extension instance to add to. |
| 213 | * |
| 214 | * @return LY_ERR values. |
| 215 | */ |
| 216 | LY_ERR yin_parse_prefix(struct lyxml_context *xml_ctx, struct yin_arg_record *attrs, const char **prefix, |
| 217 | const char **data, struct lysp_ext_instance **exts); |
| 218 | |
| 219 | /** |
| 220 | * @brief Parse revision date. |
| 221 | * |
| 222 | * @param[in] xml_ctx Xml context. |
| 223 | * @param[in] args Sized array of arguments of current element. |
| 224 | * @param[in,out] data Data to read from. |
| 225 | * @param[in,out] rev Array to store the parsed value in. |
| 226 | * @param[in,out] exts Extension instances to add to. |
| 227 | * |
| 228 | * @return LY_ERR values. |
| 229 | */ |
| 230 | LY_ERR yin_parse_revision_date(struct lyxml_context *xml_ctx, struct yin_arg_record **args, const char **data, |
| 231 | char *rev, struct lysp_ext_instance **exts); |
| 232 | |
| 233 | /** |
David Sedlák | 2721d3d | 2019-06-21 15:37:41 +0200 | [diff] [blame] | 234 | * @brief Load all attributes from current element. Caller is supposed to free args array. |
David Sedlák | 8f7a117 | 2019-06-20 14:42:18 +0200 | [diff] [blame] | 235 | * |
| 236 | * @param[in,out] xml_ctx Xml context. |
| 237 | * @param[in,out] data Data to read from, always moved to currently handled position. |
| 238 | * @param[out] args Sized array of attributes. |
| 239 | * |
| 240 | * @return LY_ERR values. |
| 241 | */ |
| 242 | LY_ERR yin_load_attributes(struct lyxml_context *xml_ctx, const char **data, struct yin_arg_record **args); |
David Sedlák | b6e6597 | 2019-06-19 10:44:13 +0200 | [diff] [blame] | 243 | |
David Sedlák | 554e36d | 2019-06-20 16:00:04 +0200 | [diff] [blame] | 244 | /** |
David Sedlák | 2721d3d | 2019-06-21 15:37:41 +0200 | [diff] [blame] | 245 | * @brief Parse yin-elemenet element. |
| 246 | * |
| 247 | * @param[in,out] xml_ctx Xml context. |
| 248 | * @param[in] attrs Sized array of element attributes. |
| 249 | * @param[in,out] data Data to read from, always moved to currently handled position. |
| 250 | * @param[in,out] flags Flags to add to. |
David Sedlák | 3ffbc52 | 2019-07-02 17:49:28 +0200 | [diff] [blame] | 251 | * @prama[in,out] exts Extension instance to add to. |
David Sedlák | 2721d3d | 2019-06-21 15:37:41 +0200 | [diff] [blame] | 252 | * |
| 253 | * @return LY_ERR values. |
| 254 | */ |
David Sedlák | 3ffbc52 | 2019-07-02 17:49:28 +0200 | [diff] [blame] | 255 | LY_ERR yin_parse_yin_element_element(struct lyxml_context *xml_ctx, struct yin_arg_record *attrs, const char **data, |
| 256 | uint16_t *flags, struct lysp_ext_instance **exts); |
| 257 | |
| 258 | /** |
| 259 | * @brief Parse argument element. |
| 260 | * |
| 261 | * @param[in,out] xml_ctx Xml context. |
| 262 | * @param[in] attrs Attributes of this element. |
| 263 | * @param[in,out] data Data to read from, always moved to currently handled character. |
| 264 | * @param[in,out] arg_meta Meta information about destionation af prased data. |
| 265 | * @param[in,out] exts Extension instance to add to. |
| 266 | * |
| 267 | * @return LY_ERR values. |
| 268 | */ |
| 269 | LY_ERR yin_parse_argument_element(struct lyxml_context *xml_ctx, struct yin_arg_record **attrs, const char **data, |
| 270 | struct yin_argument_meta *arg_meta, struct lysp_ext_instance **exts); |
David Sedlák | 2721d3d | 2019-06-21 15:37:41 +0200 | [diff] [blame] | 271 | |
| 272 | /** |
David Sedlák | 554e36d | 2019-06-20 16:00:04 +0200 | [diff] [blame] | 273 | * @brief Parse the extension statement. |
| 274 | * |
| 275 | * @param[in] xml_ctx Xml context. |
| 276 | * @param[in] extension_args Arguments of extension element. |
| 277 | * @param[in,out] data Data to read from. |
| 278 | * @param[in,out] extensions Extensions to add to. |
| 279 | * |
| 280 | * @return LY_ERR values. |
| 281 | */ |
| 282 | LY_ERR yin_parse_extension(struct lyxml_context *xml_ctx, struct yin_arg_record **extension_args, |
| 283 | const char **data, struct lysp_ext **extensions); |
| 284 | |
David Sedlák | b1a7835 | 2019-06-28 16:16:29 +0200 | [diff] [blame] | 285 | /** |
| 286 | * @brief Parse instance of extension. |
| 287 | * |
| 288 | * @param[in,out] xml_ctx Xml context. |
| 289 | * @param[in] attrs Sized array of attributes. |
| 290 | * @param[in,out] data Data to read from, always moved to currently handled character. |
| 291 | * @param[in] ext_name Name of the extension element. |
| 292 | * @param[in] ext_name_len Length of extension name. |
David Sedlák | 3ffbc52 | 2019-07-02 17:49:28 +0200 | [diff] [blame] | 293 | * @param[in,out] metadata Meta information about extension instance passed from caller function. |
David Sedlák | b1a7835 | 2019-06-28 16:16:29 +0200 | [diff] [blame] | 294 | * |
| 295 | * @return LY_ERR values. |
| 296 | */ |
| 297 | LY_ERR yin_parse_extension_instance(struct lyxml_context *xml_ctx, struct yin_arg_record **attrs, const char **data, |
David Sedlák | 619db94 | 2019-07-03 14:47:30 +0200 | [diff] [blame] | 298 | const char *ext_name, int ext_name_len, LYEXT_SUBSTMT subelem, |
| 299 | uint32_t subelem_index, struct lysp_ext_instance **exts); |
David Sedlák | b1a7835 | 2019-06-28 16:16:29 +0200 | [diff] [blame] | 300 | |
| 301 | /** |
| 302 | * @brief Parse yin element into generic structure. |
| 303 | * |
| 304 | * @param[in,out] xml_ctx Xml context. |
| 305 | * @param[in] name Name of element. |
| 306 | * @param[in] name_len Length of elements Name. |
| 307 | * @param[in,out] data Data to read from, always moved to currently handled character. |
| 308 | * @param[out] element Where the element structure should be stored. |
| 309 | * |
| 310 | * @return LY_ERR values. |
| 311 | */ |
David Sedlák | f250ecf | 2019-07-01 11:02:05 +0200 | [diff] [blame] | 312 | LY_ERR yin_parse_element_generic(struct lyxml_context *xml_ctx, const char *name, size_t name_len, const char *prefix, |
| 313 | size_t prefix_len, const char **data, struct lysp_stmt **element); |
David Sedlák | b1a7835 | 2019-06-28 16:16:29 +0200 | [diff] [blame] | 314 | |
David Sedlák | 2b626ee | 2019-06-03 16:40:18 +0200 | [diff] [blame] | 315 | #endif /* LY_PARSER_YIN_H_*/ |