diff --git a/src/parser_common.c b/src/parser_common.c
index 9a86ac1..79a0f44 100644
--- a/src/parser_common.c
+++ b/src/parser_common.c
@@ -285,21 +285,21 @@
     return LY_SUCCESS;
 }
 
-static LY_ERR lysp_stmt_container(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
+static LY_ERR lysp_stmt_container(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
         struct lysp_node **siblings);
-static LY_ERR lysp_stmt_choice(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
+static LY_ERR lysp_stmt_choice(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
         struct lysp_node **siblings);
-static LY_ERR lysp_stmt_case(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
+static LY_ERR lysp_stmt_case(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
         struct lysp_node **siblings);
-static LY_ERR lysp_stmt_uses(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
+static LY_ERR lysp_stmt_uses(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
         struct lysp_node **siblings);
-static LY_ERR lysp_stmt_grouping(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
+static LY_ERR lysp_stmt_grouping(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
         struct lysp_node_grp **groupings);
-static LY_ERR lysp_stmt_list(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
+static LY_ERR lysp_stmt_list(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
         struct lysp_node **siblings);
 
 static LY_ERR
-lysp_stmt_validate_value(struct lys_parser_ctx *ctx, enum yang_arg val_type, const char *val)
+lysp_stmt_validate_value(struct lysp_ctx *ctx, enum yang_arg val_type, const char *val)
 {
     uint8_t prefix = 0;
     ly_bool first = 1;
@@ -340,7 +340,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_ext(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, enum ly_stmt insubstmt,
+lysp_stmt_ext(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, enum ly_stmt insubstmt,
         LY_ARRAY_COUNT_TYPE insubstmt_index, struct lysp_ext_instance **exts)
 {
     struct lysp_ext_instance *e;
@@ -376,7 +376,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_text_field(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, uint32_t substmt_index,
+lysp_stmt_text_field(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, uint32_t substmt_index,
         const char **value, enum yang_arg arg, struct lysp_ext_instance **exts)
 {
     if (*value) {
@@ -412,7 +412,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_qnames(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt,
+lysp_stmt_qnames(struct lysp_ctx *ctx, const struct lysp_stmt *stmt,
         struct lysp_qname **qnames, enum yang_arg arg, struct lysp_ext_instance **exts)
 {
     struct lysp_qname *item;
@@ -449,7 +449,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_text_fields(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt,
+lysp_stmt_text_fields(struct lysp_ctx *ctx, const struct lysp_stmt *stmt,
         const char ***texts, enum yang_arg arg, struct lysp_ext_instance **exts)
 {
     const char **item;
@@ -484,7 +484,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_status(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, uint16_t *flags, struct lysp_ext_instance **exts)
+lysp_stmt_status(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, uint16_t *flags, struct lysp_ext_instance **exts)
 {
     size_t arg_len;
 
@@ -529,7 +529,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_when(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_when **when_p)
+lysp_stmt_when(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_when **when_p)
 {
     LY_ERR ret = LY_SUCCESS;
     struct lysp_when *when;
@@ -577,7 +577,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_config(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, uint16_t *flags, struct lysp_ext_instance **exts)
+lysp_stmt_config(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, uint16_t *flags, struct lysp_ext_instance **exts)
 {
     size_t arg_len;
 
@@ -622,7 +622,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_mandatory(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, uint16_t *flags,
+lysp_stmt_mandatory(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, uint16_t *flags,
         struct lysp_ext_instance **exts)
 {
     size_t arg_len;
@@ -667,7 +667,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_restr(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_restr *restr)
+lysp_stmt_restr(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_restr *restr)
 {
     LY_CHECK_RET(lysp_stmt_validate_value(ctx, Y_STR_ARG, stmt->arg));
     LY_CHECK_RET(lydict_insert(PARSER_CTX(ctx), stmt->arg, 0, &restr->arg.str));
@@ -708,7 +708,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_restrs(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_restr **restrs)
+lysp_stmt_restrs(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_restr **restrs)
 {
     struct lysp_restr *restr;
 
@@ -726,7 +726,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_any(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent, struct lysp_node **siblings)
+lysp_stmt_any(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent, struct lysp_node **siblings)
 {
     struct lysp_node_anydata *any;
 
@@ -792,7 +792,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_type_enum_value_pos(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, int64_t *value, uint16_t *flags,
+lysp_stmt_type_enum_value_pos(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, int64_t *value, uint16_t *flags,
         struct lysp_ext_instance **exts)
 {
     size_t arg_len;
@@ -870,7 +870,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_type_enum(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_type_enum **enums)
+lysp_stmt_type_enum(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_type_enum **enums)
 {
     struct lysp_type_enum *enm;
 
@@ -932,7 +932,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_type_fracdigits(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, uint8_t *fracdig,
+lysp_stmt_type_fracdigits(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, uint8_t *fracdig,
         struct lysp_ext_instance **exts)
 {
     char *ptr;
@@ -989,7 +989,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_type_reqinstance(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, uint8_t *reqinst, uint16_t *flags,
+lysp_stmt_type_reqinstance(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, uint8_t *reqinst, uint16_t *flags,
         struct lysp_ext_instance **exts)
 {
     size_t arg_len;
@@ -1033,7 +1033,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_type_pattern_modifier(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, const char **pat,
+lysp_stmt_type_pattern_modifier(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, const char **pat,
         struct lysp_ext_instance **exts)
 {
     size_t arg_len;
@@ -1084,7 +1084,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_type_pattern(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_restr **patterns)
+lysp_stmt_type_pattern(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_restr **patterns)
 {
     char *buf;
     size_t arg_len;
@@ -1142,7 +1142,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_type(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_type *type)
+lysp_stmt_type(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_type *type)
 {
     struct lysp_type *nest_type;
     const char *str_path = NULL;
@@ -1240,7 +1240,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_leaf(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent, struct lysp_node **siblings)
+lysp_stmt_leaf(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent, struct lysp_node **siblings)
 {
     struct lysp_node_leaf *leaf;
 
@@ -1321,7 +1321,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_maxelements(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt,
+lysp_stmt_maxelements(struct lysp_ctx *ctx, const struct lysp_stmt *stmt,
         uint32_t *max, uint16_t *flags, struct lysp_ext_instance **exts)
 {
     size_t arg_len;
@@ -1388,7 +1388,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_minelements(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt,
+lysp_stmt_minelements(struct lysp_ctx *ctx, const struct lysp_stmt *stmt,
         uint32_t *min, uint16_t *flags, struct lysp_ext_instance **exts)
 {
     size_t arg_len;
@@ -1448,7 +1448,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_orderedby(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, uint16_t *flags, struct lysp_ext_instance **exts)
+lysp_stmt_orderedby(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, uint16_t *flags, struct lysp_ext_instance **exts)
 {
     size_t arg_len;
 
@@ -1494,7 +1494,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_leaflist(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
+lysp_stmt_leaflist(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
         struct lysp_node **siblings)
 {
     struct lysp_node_leaflist *llist;
@@ -1580,7 +1580,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_refine(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_refine **refines)
+lysp_stmt_refine(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_refine **refines)
 {
     struct lysp_refine *rf;
 
@@ -1646,7 +1646,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_typedef(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
+lysp_stmt_typedef(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
         struct lysp_tpdf **typedefs)
 {
     struct lysp_tpdf *tpdf;
@@ -1713,7 +1713,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_inout(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
+lysp_stmt_inout(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
         struct lysp_node_action_inout *inout_p)
 {
     if (inout_p->nodetype) {
@@ -1791,7 +1791,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_action(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
+lysp_stmt_action(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
         struct lysp_node_action **actions)
 {
     struct lysp_node_action *act;
@@ -1867,7 +1867,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_notif(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
+lysp_stmt_notif(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
         struct lysp_node_notif **notifs)
 {
     struct lysp_node_notif *notif;
@@ -1953,7 +1953,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_grouping(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
+lysp_stmt_grouping(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
         struct lysp_node_grp **groupings)
 {
     struct lysp_node_grp *grp;
@@ -2040,7 +2040,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_augment(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
+lysp_stmt_augment(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
         struct lysp_node_augment **augments)
 {
     struct lysp_node_augment *aug;
@@ -2130,7 +2130,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_uses(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
+lysp_stmt_uses(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
         struct lysp_node **siblings)
 {
     struct lysp_node_uses *uses;
@@ -2192,7 +2192,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_case(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
+lysp_stmt_case(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
         struct lysp_node **siblings)
 {
     struct lysp_node_case *cas;
@@ -2271,7 +2271,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_choice(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
+lysp_stmt_choice(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
         struct lysp_node **siblings)
 {
     struct lysp_node_choice *choice;
@@ -2360,7 +2360,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_container(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
+lysp_stmt_container(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
         struct lysp_node **siblings)
 {
     struct lysp_node_container *cont;
@@ -2463,7 +2463,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-lysp_stmt_list(struct lys_parser_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
+lysp_stmt_list(struct lysp_ctx *ctx, const struct lysp_stmt *stmt, struct lysp_node *parent,
         struct lysp_node **siblings)
 {
     struct lysp_node_list *list;
@@ -2573,7 +2573,7 @@
 {
     LY_ERR ret = LY_SUCCESS;
     uint16_t flags;
-    struct lys_parser_ctx pctx = {0};
+    struct lysp_ctx pctx = {0};
     struct ly_set pmods = {0};
     void *objs;
 
diff --git a/src/parser_internal.h b/src/parser_internal.h
index 627836a..09410a0 100644
--- a/src/parser_internal.h
+++ b/src/parser_internal.h
@@ -20,9 +20,9 @@
 
 struct lyd_ctx;
 struct ly_in;
-struct lys_yang_parser_ctx;
-struct lys_yin_parser_ctx;
-struct lys_parser_ctx;
+struct lysp_yang_ctx;
+struct lysp_yin_ctx;
+struct lysp_ctx;
 
 /**
  * @brief Callback for ::lyd_ctx to free the structure
@@ -178,7 +178,7 @@
  * @param[out] submod Pointer to the parsed submodule structure.
  * @return LY_ERR value - LY_SUCCESS, LY_EINVAL or LY_EVALID.
  */
-LY_ERR yang_parse_submodule(struct lys_yang_parser_ctx **context, struct ly_ctx *ly_ctx, struct lys_parser_ctx *main_ctx,
+LY_ERR yang_parse_submodule(struct lysp_yang_ctx **context, struct ly_ctx *ly_ctx, struct lysp_ctx *main_ctx,
         struct ly_in *in, struct lysp_submodule **submod);
 
 /**
@@ -189,7 +189,7 @@
  * module structure, will be filled in.
  * @return LY_ERR values.
  */
-LY_ERR yang_parse_module(struct lys_yang_parser_ctx **context, struct ly_in *in, struct lys_module *mod);
+LY_ERR yang_parse_module(struct lysp_yang_ctx **context, struct ly_in *in, struct lys_module *mod);
 
 /**
  * @brief Parse module from YIN data.
@@ -200,7 +200,7 @@
  * module structure, will be filled in.
  * @return LY_ERR values.
  */
-LY_ERR yin_parse_module(struct lys_yin_parser_ctx **yin_ctx, struct ly_in *in, struct lys_module *mod);
+LY_ERR yin_parse_module(struct lysp_yin_ctx **yin_ctx, struct ly_in *in, struct lys_module *mod);
 
 /**
  * @brief Parse submodule from YIN data.
@@ -212,7 +212,7 @@
  * @param[in,out] submod Submodule structure where the parsed information, will be filled in.
  * @return LY_ERR values.
  */
-LY_ERR yin_parse_submodule(struct lys_yin_parser_ctx **yin_ctx, struct ly_ctx *ctx, struct lys_parser_ctx *main_ctx,
+LY_ERR yin_parse_submodule(struct lysp_yin_ctx **yin_ctx, struct ly_ctx *ctx, struct lysp_ctx *main_ctx,
         struct ly_in *in, struct lysp_submodule **submod);
 
 /**
diff --git a/src/parser_yang.c b/src/parser_yang.c
index 3a1fe17..5db623d 100644
--- a/src/parser_yang.c
+++ b/src/parser_yang.c
@@ -106,12 +106,12 @@
         __loop_end = 1; \
     }
 
-LY_ERR parse_container(struct lys_yang_parser_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings);
-LY_ERR parse_uses(struct lys_yang_parser_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings);
-LY_ERR parse_choice(struct lys_yang_parser_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings);
-LY_ERR parse_case(struct lys_yang_parser_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings);
-LY_ERR parse_list(struct lys_yang_parser_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings);
-LY_ERR parse_grouping(struct lys_yang_parser_ctx *ctx, struct lysp_node *parent, struct lysp_node_grp **groupings);
+LY_ERR parse_container(struct lysp_yang_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings);
+LY_ERR parse_uses(struct lysp_yang_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings);
+LY_ERR parse_choice(struct lysp_yang_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings);
+LY_ERR parse_case(struct lysp_yang_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings);
+LY_ERR parse_list(struct lysp_yang_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings);
+LY_ERR parse_grouping(struct lysp_yang_ctx *ctx, struct lysp_node *parent, struct lysp_node_grp **groupings);
 
 /**
  * @brief Add another character to dynamic buffer, a low-level function.
@@ -164,7 +164,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-buf_store_char(struct lys_yang_parser_ctx *ctx, enum yang_arg arg, char **word_p, size_t *word_len,
+buf_store_char(struct lysp_yang_ctx *ctx, enum yang_arg arg, char **word_p, size_t *word_len,
         char **word_b, size_t *buf_len, ly_bool need_buf, uint8_t *prefix)
 {
     uint32_t c;
@@ -188,14 +188,14 @@
     /* check character validity */
     switch (arg) {
     case Y_IDENTIF_ARG:
-        LY_CHECK_RET(lysp_check_identifierchar((struct lys_parser_ctx *)ctx, c, !(*word_len), NULL));
+        LY_CHECK_RET(lysp_check_identifierchar((struct lysp_ctx *)ctx, c, !(*word_len), NULL));
         break;
     case Y_PREF_IDENTIF_ARG:
-        LY_CHECK_RET(lysp_check_identifierchar((struct lys_parser_ctx *)ctx, c, !(*word_len), prefix));
+        LY_CHECK_RET(lysp_check_identifierchar((struct lysp_ctx *)ctx, c, !(*word_len), prefix));
         break;
     case Y_STR_ARG:
     case Y_MAYBE_STR_ARG:
-        LY_CHECK_RET(lysp_check_stringchar((struct lys_parser_ctx *)ctx, c));
+        LY_CHECK_RET(lysp_check_stringchar((struct lysp_ctx *)ctx, c));
         break;
     }
 
@@ -246,7 +246,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-skip_comment(struct lys_yang_parser_ctx *ctx, uint8_t comment)
+skip_comment(struct lysp_yang_ctx *ctx, uint8_t comment)
 {
     /* internal statuses: */
 #define COMMENT_NO        0 /* comment ended */
@@ -319,7 +319,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-read_qstring(struct lys_yang_parser_ctx *ctx, enum yang_arg arg, char **word_p, char **word_b,
+read_qstring(struct lysp_yang_ctx *ctx, enum yang_arg arg, char **word_p, char **word_b,
         size_t *word_len, size_t *buf_len)
 {
     /* string parsing status: */
@@ -572,7 +572,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-get_argument(struct lys_yang_parser_ctx *ctx, enum yang_arg arg, uint16_t *flags, char **word_p,
+get_argument(struct lysp_yang_ctx *ctx, enum yang_arg arg, uint16_t *flags, char **word_p,
         char **word_b, size_t *word_len)
 {
     LY_ERR ret;
@@ -711,7 +711,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-get_keyword(struct lys_yang_parser_ctx *ctx, enum ly_stmt *kw, char **word_p, size_t *word_len)
+get_keyword(struct lysp_yang_ctx *ctx, enum ly_stmt *kw, char **word_p, size_t *word_len)
 {
     uint8_t prefix;
     const char *word_start;
@@ -833,7 +833,7 @@
                     LOGVAL_PARSER(ctx, LY_VCODE_INCHAR, ctx->in->current[-len]), LY_EVALID);
             ++ctx->indent;
             /* check character validity */
-            LY_CHECK_RET(lysp_check_identifierchar((struct lys_parser_ctx *)ctx, c,
+            LY_CHECK_RET(lysp_check_identifierchar((struct lysp_ctx *)ctx, c,
                     ctx->in->current - len == word_start ? 1 : 0, &prefix));
         }
         if (!ctx->in->current[0]) {
@@ -871,7 +871,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_ext_substmt(struct lys_yang_parser_ctx *ctx, enum ly_stmt kw, char *word, size_t word_len,
+parse_ext_substmt(struct lysp_yang_ctx *ctx, enum ly_stmt kw, char *word, size_t word_len,
         struct lysp_stmt **child)
 {
     char *buf;
@@ -925,7 +925,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_ext(struct lys_yang_parser_ctx *ctx, const char *ext_name, size_t ext_name_len, enum ly_stmt insubstmt,
+parse_ext(struct lysp_yang_ctx *ctx, const char *ext_name, size_t ext_name_len, enum ly_stmt insubstmt,
         LY_ARRAY_COUNT_TYPE insubstmt_index, struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
@@ -980,7 +980,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_text_field(struct lys_yang_parser_ctx *ctx, enum ly_stmt substmt, uint32_t substmt_index,
+parse_text_field(struct lysp_yang_ctx *ctx, enum ly_stmt substmt, uint32_t substmt_index,
         const char **value, enum yang_arg arg, struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
@@ -1025,7 +1025,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_yangversion(struct lys_yang_parser_ctx *ctx, uint8_t *version, struct lysp_ext_instance **exts)
+parse_yangversion(struct lysp_yang_ctx *ctx, uint8_t *version, struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -1077,7 +1077,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_belongsto(struct lys_yang_parser_ctx *ctx, const char **prefix, struct lysp_ext_instance **exts)
+parse_belongsto(struct lysp_yang_ctx *ctx, const char **prefix, struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -1134,7 +1134,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_revisiondate(struct lys_yang_parser_ctx *ctx, char *rev, struct lysp_ext_instance **exts)
+parse_revisiondate(struct lysp_yang_ctx *ctx, char *rev, struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -1150,7 +1150,7 @@
     LY_CHECK_RET(get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len));
 
     /* check value */
-    if (lysp_check_date((struct lys_parser_ctx *)ctx, word, word_len, "revision-date")) {
+    if (lysp_check_date((struct lysp_ctx *)ctx, word, word_len, "revision-date")) {
         free(buf);
         return LY_EVALID;
     }
@@ -1185,7 +1185,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_include(struct lys_yang_parser_ctx *ctx, const char *module_name, struct lysp_include **includes)
+parse_include(struct lysp_yang_ctx *ctx, const char *module_name, struct lysp_include **includes)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -1244,7 +1244,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_import(struct lys_yang_parser_ctx *ctx, const char *module_prefix, struct lysp_import **imports)
+parse_import(struct lysp_yang_ctx *ctx, const char *module_prefix, struct lysp_import **imports)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -1262,7 +1262,7 @@
         switch (kw) {
         case LY_STMT_PREFIX:
             LY_CHECK_RET(parse_text_field(ctx, LY_STMT_PREFIX, 0, &imp->prefix, Y_IDENTIF_ARG, &imp->exts));
-            LY_CHECK_RET(lysp_check_prefix((struct lys_parser_ctx *)ctx, *imports, module_prefix, &imp->prefix), LY_EVALID);
+            LY_CHECK_RET(lysp_check_prefix((struct lysp_ctx *)ctx, *imports, module_prefix, &imp->prefix), LY_EVALID);
             break;
         case LY_STMT_DESCRIPTION:
             PARSER_CHECK_STMTVER2_RET(ctx, "description", "import");
@@ -1301,7 +1301,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_revision(struct lys_yang_parser_ctx *ctx, struct lysp_revision **revs)
+parse_revision(struct lysp_yang_ctx *ctx, struct lysp_revision **revs)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -1315,7 +1315,7 @@
     LY_CHECK_RET(get_argument(ctx, Y_STR_ARG, NULL, &word, &buf, &word_len));
 
     /* check value */
-    if (lysp_check_date((struct lys_parser_ctx *)ctx, word, word_len, "revision")) {
+    if (lysp_check_date((struct lysp_ctx *)ctx, word, word_len, "revision")) {
         free(buf);
         return LY_EVALID;
     }
@@ -1357,7 +1357,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_text_fields(struct lys_yang_parser_ctx *ctx, enum ly_stmt substmt, const char ***texts, enum yang_arg arg,
+parse_text_fields(struct lysp_yang_ctx *ctx, enum ly_stmt substmt, const char ***texts, enum yang_arg arg,
         struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
@@ -1401,7 +1401,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_qnames(struct lys_yang_parser_ctx *ctx, enum ly_stmt substmt, struct lysp_qname **qnames,
+parse_qnames(struct lysp_yang_ctx *ctx, enum ly_stmt substmt, struct lysp_qname **qnames,
         enum yang_arg arg, struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
@@ -1444,7 +1444,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_config(struct lys_yang_parser_ctx *ctx, uint16_t *flags, struct lysp_ext_instance **exts)
+parse_config(struct lysp_yang_ctx *ctx, uint16_t *flags, struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -1496,7 +1496,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_mandatory(struct lys_yang_parser_ctx *ctx, uint16_t *flags, struct lysp_ext_instance **exts)
+parse_mandatory(struct lysp_yang_ctx *ctx, uint16_t *flags, struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -1548,7 +1548,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_restr(struct lys_yang_parser_ctx *ctx, enum ly_stmt restr_kw, struct lysp_restr *restr)
+parse_restr(struct lysp_yang_ctx *ctx, enum ly_stmt restr_kw, struct lysp_restr *restr)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -1599,7 +1599,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_restrs(struct lys_yang_parser_ctx *ctx, enum ly_stmt restr_kw, struct lysp_restr **restrs)
+parse_restrs(struct lysp_yang_ctx *ctx, enum ly_stmt restr_kw, struct lysp_restr **restrs)
 {
     struct lysp_restr *restr;
 
@@ -1617,7 +1617,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_status(struct lys_yang_parser_ctx *ctx, uint16_t *flags, struct lysp_ext_instance **exts)
+parse_status(struct lysp_yang_ctx *ctx, uint16_t *flags, struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -1670,7 +1670,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_when(struct lys_yang_parser_ctx *ctx, struct lysp_when **when_p)
+parse_when(struct lysp_yang_ctx *ctx, struct lysp_when **when_p)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -1731,7 +1731,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_any(struct lys_yang_parser_ctx *ctx, enum ly_stmt any_kw, struct lysp_node *parent, struct lysp_node **siblings)
+parse_any(struct lysp_yang_ctx *ctx, enum ly_stmt any_kw, struct lysp_node *parent, struct lysp_node **siblings)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -1802,7 +1802,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_type_enum_value_pos(struct lys_yang_parser_ctx *ctx, enum ly_stmt val_kw, int64_t *value, uint16_t *flags,
+parse_type_enum_value_pos(struct lysp_yang_ctx *ctx, enum ly_stmt val_kw, int64_t *value, uint16_t *flags,
         struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
@@ -1890,7 +1890,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_type_enum(struct lys_yang_parser_ctx *ctx, enum ly_stmt enum_kw, struct lysp_type_enum **enums)
+parse_type_enum(struct lysp_yang_ctx *ctx, enum ly_stmt enum_kw, struct lysp_type_enum **enums)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -1903,7 +1903,7 @@
     /* get value */
     LY_CHECK_RET(get_argument(ctx, enum_kw == LY_STMT_ENUM ? Y_STR_ARG : Y_IDENTIF_ARG, NULL, &word, &buf, &word_len));
     if (enum_kw == LY_STMT_ENUM) {
-        ret = lysp_check_enum_name((struct lys_parser_ctx *)ctx, (const char *)word, word_len);
+        ret = lysp_check_enum_name((struct lysp_ctx *)ctx, (const char *)word, word_len);
         LY_CHECK_ERR_RET(ret, free(buf), ret);
     } /* else nothing specific for YANG_BIT */
 
@@ -1959,7 +1959,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_type_fracdigits(struct lys_yang_parser_ctx *ctx, uint8_t *fracdig, struct lysp_ext_instance **exts)
+parse_type_fracdigits(struct lysp_yang_ctx *ctx, uint8_t *fracdig, struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf = NULL, *word, *ptr;
@@ -2025,7 +2025,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_type_reqinstance(struct lys_yang_parser_ctx *ctx, uint8_t *reqinst, uint16_t *flags,
+parse_type_reqinstance(struct lysp_yang_ctx *ctx, uint8_t *reqinst, uint16_t *flags,
         struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
@@ -2078,7 +2078,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_type_pattern_modifier(struct lys_yang_parser_ctx *ctx, const char **pat, struct lysp_ext_instance **exts)
+parse_type_pattern_modifier(struct lysp_yang_ctx *ctx, const char **pat, struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf = NULL, *word;
@@ -2137,7 +2137,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_type_pattern(struct lys_yang_parser_ctx *ctx, struct lysp_restr **patterns)
+parse_type_pattern(struct lysp_yang_ctx *ctx, struct lysp_restr **patterns)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -2207,7 +2207,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_type(struct lys_yang_parser_ctx *ctx, struct lysp_type *type)
+parse_type(struct lysp_yang_ctx *ctx, struct lysp_type *type)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -2324,7 +2324,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_leaf(struct lys_yang_parser_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings)
+parse_leaf(struct lysp_yang_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -2409,7 +2409,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_maxelements(struct lys_yang_parser_ctx *ctx, uint32_t *max, uint16_t *flags, struct lysp_ext_instance **exts)
+parse_maxelements(struct lysp_yang_ctx *ctx, uint32_t *max, uint16_t *flags, struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf = NULL, *word, *ptr;
@@ -2483,7 +2483,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_minelements(struct lys_yang_parser_ctx *ctx, uint32_t *min, uint16_t *flags, struct lysp_ext_instance **exts)
+parse_minelements(struct lysp_yang_ctx *ctx, uint32_t *min, uint16_t *flags, struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf = NULL, *word, *ptr;
@@ -2549,7 +2549,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_orderedby(struct lys_yang_parser_ctx *ctx, uint16_t *flags, struct lysp_ext_instance **exts)
+parse_orderedby(struct lysp_yang_ctx *ctx, uint16_t *flags, struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf = NULL, *word;
@@ -2601,7 +2601,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_leaflist(struct lys_yang_parser_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings)
+parse_leaflist(struct lysp_yang_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -2690,7 +2690,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_refine(struct lys_yang_parser_ctx *ctx, struct lysp_refine **refines)
+parse_refine(struct lysp_yang_ctx *ctx, struct lysp_refine **refines)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -2761,7 +2761,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_typedef(struct lys_yang_parser_ctx *ctx, struct lysp_node *parent, struct lysp_tpdf **typedefs)
+parse_typedef(struct lysp_yang_ctx *ctx, struct lysp_node *parent, struct lysp_tpdf **typedefs)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -2833,7 +2833,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_inout(struct lys_yang_parser_ctx *ctx, enum ly_stmt inout_kw, struct lysp_node *parent,
+parse_inout(struct lysp_yang_ctx *ctx, enum ly_stmt inout_kw, struct lysp_node *parent,
         struct lysp_node_action_inout *inout_p)
 {
     LY_ERR ret = LY_SUCCESS;
@@ -2917,7 +2917,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_action(struct lys_yang_parser_ctx *ctx, struct lysp_node *parent, struct lysp_node_action **actions)
+parse_action(struct lysp_yang_ctx *ctx, struct lysp_node *parent, struct lysp_node_action **actions)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -2996,7 +2996,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_notif(struct lys_yang_parser_ctx *ctx, struct lysp_node *parent, struct lysp_node_notif **notifs)
+parse_notif(struct lysp_yang_ctx *ctx, struct lysp_node *parent, struct lysp_node_notif **notifs)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -3085,7 +3085,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_grouping(struct lys_yang_parser_ctx *ctx, struct lysp_node *parent, struct lysp_node_grp **groupings)
+parse_grouping(struct lysp_yang_ctx *ctx, struct lysp_node *parent, struct lysp_node_grp **groupings)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -3181,7 +3181,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_augment(struct lys_yang_parser_ctx *ctx, struct lysp_node *parent, struct lysp_node_augment **augments)
+parse_augment(struct lysp_yang_ctx *ctx, struct lysp_node *parent, struct lysp_node_augment **augments)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -3275,7 +3275,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_uses(struct lys_yang_parser_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings)
+parse_uses(struct lysp_yang_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -3340,7 +3340,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_case(struct lys_yang_parser_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings)
+parse_case(struct lysp_yang_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -3423,7 +3423,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_choice(struct lys_yang_parser_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings)
+parse_choice(struct lysp_yang_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -3518,7 +3518,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_container(struct lys_yang_parser_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings)
+parse_container(struct lysp_yang_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings)
 {
     LY_ERR ret = 0;
     char *buf, *word;
@@ -3625,7 +3625,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_list(struct lys_yang_parser_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings)
+parse_list(struct lysp_yang_ctx *ctx, struct lysp_node *parent, struct lysp_node **siblings)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -3745,7 +3745,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_yinelement(struct lys_yang_parser_ctx *ctx, uint16_t *flags, struct lysp_ext_instance **exts)
+parse_yinelement(struct lysp_yang_ctx *ctx, uint16_t *flags, struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -3799,7 +3799,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_argument(struct lys_yang_parser_ctx *ctx, const char **argument, uint16_t *flags, struct lysp_ext_instance **exts)
+parse_argument(struct lysp_yang_ctx *ctx, const char **argument, uint16_t *flags, struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -3843,7 +3843,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-parse_extension(struct lys_yang_parser_ctx *ctx, struct lysp_ext **extensions)
+parse_extension(struct lysp_yang_ctx *ctx, struct lysp_ext **extensions)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -3894,7 +3894,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_deviate(struct lys_yang_parser_ctx *ctx, struct lysp_deviate **deviates)
+parse_deviate(struct lysp_yang_ctx *ctx, struct lysp_deviate **deviates)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf = NULL, *word;
@@ -4124,7 +4124,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_deviation(struct lys_yang_parser_ctx *ctx, struct lysp_deviation **deviations)
+parse_deviation(struct lysp_yang_ctx *ctx, struct lysp_deviation **deviations)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -4186,7 +4186,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_feature(struct lys_yang_parser_ctx *ctx, struct lysp_feature **features)
+parse_feature(struct lysp_yang_ctx *ctx, struct lysp_feature **features)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -4237,7 +4237,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_identity(struct lys_yang_parser_ctx *ctx, struct lysp_ident **identities)
+parse_identity(struct lysp_yang_ctx *ctx, struct lysp_ident **identities)
 {
     LY_ERR ret = LY_SUCCESS;
     char *buf, *word;
@@ -4296,7 +4296,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_module(struct lys_yang_parser_ctx *ctx, struct lysp_module *mod)
+parse_module(struct lysp_yang_ctx *ctx, struct lysp_module *mod)
 {
     LY_ERR ret = 0;
     char *buf, *word;
@@ -4505,7 +4505,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-parse_submodule(struct lys_yang_parser_ctx *ctx, struct lysp_submodule *submod)
+parse_submodule(struct lysp_yang_ctx *ctx, struct lysp_submodule *submod)
 {
     LY_ERR ret = 0;
     char *buf, *word;
@@ -4711,7 +4711,7 @@
  * @return LY_EVALID on invalid comment.
  */
 static LY_ERR
-skip_redundant_chars(struct lys_yang_parser_ctx *ctx)
+skip_redundant_chars(struct lysp_yang_ctx *ctx)
 {
     /* read some trailing spaces, new lines, or comments */
     while (ctx->in->current[0]) {
@@ -4738,7 +4738,7 @@
 }
 
 LY_ERR
-yang_parse_submodule(struct lys_yang_parser_ctx **context, struct ly_ctx *ly_ctx, struct lys_parser_ctx *main_ctx,
+yang_parse_submodule(struct lysp_yang_ctx **context, struct ly_ctx *ly_ctx, struct lysp_ctx *main_ctx,
         struct ly_in *in, struct lysp_submodule **submod)
 {
     LY_ERR ret = LY_SUCCESS;
@@ -4806,7 +4806,7 @@
     LOG_LOCBACK(0, 0, 0, 1);
     if (ret) {
         lysp_module_free(&fctx, (struct lysp_module *)mod_p);
-        yang_parser_ctx_free(*context);
+        lysp_yang_ctx_free(*context);
         *context = NULL;
     }
 
@@ -4814,7 +4814,7 @@
 }
 
 LY_ERR
-yang_parse_module(struct lys_yang_parser_ctx **context, struct ly_in *in, struct lys_module *mod)
+yang_parse_module(struct lysp_yang_ctx **context, struct ly_in *in, struct lys_module *mod)
 {
     LY_ERR ret = LY_SUCCESS;
     char *word;
@@ -4829,7 +4829,7 @@
     (*context)->format = LYS_IN_YANG;
     LY_CHECK_ERR_RET(ly_set_new(&(*context)->parsed_mods), free(*context); LOGMEM(mod->ctx), LY_EMEM);
     (*context)->in = in;
-    (*context)->main_ctx = (struct lys_parser_ctx *)(*context);
+    (*context)->main_ctx = (struct lysp_ctx *)(*context);
 
     mod_p = calloc(1, sizeof *mod_p);
     LY_CHECK_ERR_GOTO(!mod_p, LOGMEM(mod->ctx), cleanup);
@@ -4875,7 +4875,7 @@
     LOG_LOCBACK(0, 0, 0, 1);
     if (ret) {
         lysp_module_free(&fctx, mod_p);
-        yang_parser_ctx_free(*context);
+        lysp_yang_ctx_free(*context);
         *context = NULL;
     }
 
diff --git a/src/parser_yin.c b/src/parser_yin.c
index 964fdd9..50f2b66 100644
--- a/src/parser_yin.c
+++ b/src/parser_yin.c
@@ -157,7 +157,7 @@
     struct lysp_ext_instance **exts;    /**< extension instances to add to. */
 };
 
-LY_ERR yin_parse_content(struct lys_yin_parser_ctx *ctx, struct yin_subelement *subelem_info, size_t subelem_info_size,
+LY_ERR yin_parse_content(struct lysp_yin_ctx *ctx, struct yin_subelement *subelem_info, size_t subelem_info_size,
         enum ly_stmt current_element, const char **text_content, struct lysp_ext_instance **exts);
 
 /**
@@ -173,7 +173,7 @@
  * @return yang_keyword values.
  */
 enum ly_stmt
-yin_match_keyword(struct lys_yin_parser_ctx *ctx, const char *name, size_t name_len,
+yin_match_keyword(struct lysp_yin_ctx *ctx, const char *name, size_t name_len,
         const char *prefix, size_t prefix_len, enum ly_stmt parent)
 {
     const char *start = NULL;
@@ -341,7 +341,7 @@
  * @return LY_SUCCESS on success LY_EMEM on memmory allocation failure.
  */
 static LY_ERR
-subelems_allocator(struct lys_yin_parser_ctx *ctx, size_t count, struct lysp_node *parent,
+subelems_allocator(struct lysp_yin_ctx *ctx, size_t count, struct lysp_node *parent,
         struct yin_subelement **result, ...)
 {
     va_list ap;
@@ -412,7 +412,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-yin_validate_value(struct lys_yin_parser_ctx *ctx, enum yang_arg val_type)
+yin_validate_value(struct lysp_yin_ctx *ctx, enum yang_arg val_type)
 {
     uint8_t prefix = 0;
     uint32_t c;
@@ -424,18 +424,18 @@
     val = ctx->xmlctx->value;
     while (already_read < ctx->xmlctx->value_len) {
         LY_CHECK_ERR_RET(ly_getutf8((const char **)&val, &c, &utf8_char_len),
-                LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INCHAR, (val)[-utf8_char_len]), LY_EVALID);
+                LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INCHAR, (val)[-utf8_char_len]), LY_EVALID);
 
         switch (val_type) {
         case Y_IDENTIF_ARG:
-            LY_CHECK_RET(lysp_check_identifierchar((struct lys_parser_ctx *)ctx, c, already_read ? 0 : 1, NULL));
+            LY_CHECK_RET(lysp_check_identifierchar((struct lysp_ctx *)ctx, c, already_read ? 0 : 1, NULL));
             break;
         case Y_PREF_IDENTIF_ARG:
-            LY_CHECK_RET(lysp_check_identifierchar((struct lys_parser_ctx *)ctx, c, already_read ? 0 : 1, &prefix));
+            LY_CHECK_RET(lysp_check_identifierchar((struct lysp_ctx *)ctx, c, already_read ? 0 : 1, &prefix));
             break;
         case Y_STR_ARG:
         case Y_MAYBE_STR_ARG:
-            LY_CHECK_RET(lysp_check_stringchar((struct lys_parser_ctx *)ctx, c));
+            LY_CHECK_RET(lysp_check_stringchar((struct lysp_ctx *)ctx, c));
             break;
         }
 
@@ -466,7 +466,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_attribute(struct lys_yin_parser_ctx *ctx, enum yin_argument arg_type, const char **arg_val, enum yang_arg val_type,
+yin_parse_attribute(struct lysp_yin_ctx *ctx, enum yin_argument arg_type, const char **arg_val, enum yang_arg val_type,
         enum ly_stmt current_element)
 {
     enum yin_argument arg = YIN_ARG_UNKNOWN;
@@ -481,7 +481,7 @@
                 /* skip it */
                 LY_CHECK_RET(lyxml_ctx_next(ctx->xmlctx));
             } else if (arg == arg_type) {
-                LY_CHECK_ERR_RET(found, LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_DUP_ATTR,
+                LY_CHECK_ERR_RET(found, LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_DUP_ATTR,
                         yin_attr2str(arg), ly_stmt2str(current_element)), LY_EVALID);
                 found = true;
 
@@ -491,7 +491,7 @@
                 INSERT_STRING_RET(ctx->xmlctx->ctx, ctx->xmlctx->value, ctx->xmlctx->value_len, ctx->xmlctx->dynamic, *arg_val);
                 LY_CHECK_RET(!(*arg_val), LY_EMEM);
             } else {
-                LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_UNEXP_ATTR, ctx->xmlctx->name_len,
+                LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_UNEXP_ATTR, ctx->xmlctx->name_len,
                         ctx->xmlctx->name, ly_stmt2str(current_element));
                 return LY_EVALID;
             }
@@ -506,7 +506,7 @@
 
     /* anything else than Y_MAYBE_STR_ARG is mandatory */
     if ((val_type != Y_MAYBE_STR_ARG) && !found) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LYVE_SYNTAX_YIN, "Missing mandatory attribute %s of %s element.",
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LYVE_SYNTAX_YIN, "Missing mandatory attribute %s of %s element.",
                 yin_attr2str(arg_type), ly_stmt2str(current_element));
         return LY_EVALID;
     }
@@ -545,13 +545,13 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_check_subelem_mandatory_constraint(struct lys_yin_parser_ctx *ctx, struct yin_subelement *subelem_info,
+yin_check_subelem_mandatory_constraint(struct lysp_yin_ctx *ctx, struct yin_subelement *subelem_info,
         signed char subelem_info_size, enum ly_stmt current_element)
 {
     for (signed char i = 0; i < subelem_info_size; ++i) {
         /* if there is element that is mandatory and isn't parsed log error and return LY_EVALID */
         if ((subelem_info[i].flags & YIN_SUBELEM_MANDATORY) && !(subelem_info[i].flags & YIN_SUBELEM_PARSED)) {
-            LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_MAND_SUBELEM,
+            LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_MAND_SUBELEM,
                     ly_stmt2str(subelem_info[i].type), ly_stmt2str(current_element));
             return LY_EVALID;
         }
@@ -572,13 +572,13 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_check_subelem_first_constraint(struct lys_yin_parser_ctx *ctx, struct yin_subelement *subelem_info,
+yin_check_subelem_first_constraint(struct lysp_yin_ctx *ctx, struct yin_subelement *subelem_info,
         signed char subelem_info_size, enum ly_stmt current_element,
         struct yin_subelement *exp_first)
 {
     for (signed char i = 0; i < subelem_info_size; ++i) {
         if (subelem_info[i].flags & YIN_SUBELEM_PARSED) {
-            LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_FIRT_SUBELEM,
+            LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_FIRT_SUBELEM,
                     ly_stmt2str(exp_first->type), ly_stmt2str(current_element));
             return LY_EVALID;
         }
@@ -600,7 +600,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_simple_element(struct lys_yin_parser_ctx *ctx, enum ly_stmt kw, const char **value,
+yin_parse_simple_element(struct lysp_yin_ctx *ctx, enum ly_stmt kw, const char **value,
         enum yin_argument arg_type, enum yang_arg arg_val_type, struct lysp_ext_instance **exts)
 {
     LY_CHECK_RET(lyxml_ctx_next(ctx->xmlctx));
@@ -621,7 +621,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_path(struct lys_yin_parser_ctx *ctx, enum ly_stmt kw, struct lysp_type *type)
+yin_parse_path(struct lysp_yin_ctx *ctx, enum ly_stmt kw, struct lysp_type *type)
 {
     LY_ERR ret;
     const char *str_path;
@@ -644,7 +644,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_pattern(struct lys_yin_parser_ctx *ctx, struct lysp_type *type)
+yin_parse_pattern(struct lysp_yin_ctx *ctx, struct lysp_type *type)
 {
     const char *real_value = NULL;
     char *saved_value = NULL;
@@ -690,7 +690,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_fracdigits(struct lys_yin_parser_ctx *ctx, struct lysp_type *type)
+yin_parse_fracdigits(struct lysp_yin_ctx *ctx, struct lysp_type *type)
 {
     const char *temp_val = NULL;
     char *ptr;
@@ -700,7 +700,7 @@
     LY_CHECK_RET(yin_parse_attribute(ctx, YIN_ARG_VALUE, &temp_val, Y_STR_ARG, LY_STMT_FRACTION_DIGITS));
 
     if ((temp_val[0] == '\0') || (temp_val[0] == '0') || !isdigit(temp_val[0])) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", "fraction-digits");
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", "fraction-digits");
         lydict_remove(ctx->xmlctx->ctx, temp_val);
         return LY_EVALID;
     }
@@ -708,12 +708,12 @@
     errno = 0;
     num = strtoull(temp_val, &ptr, LY_BASE_DEC);
     if (*ptr != '\0') {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", "fraction-digits");
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", "fraction-digits");
         lydict_remove(ctx->xmlctx->ctx, temp_val);
         return LY_EVALID;
     }
     if ((errno == ERANGE) || (num > LY_TYPE_DEC64_FD_MAX)) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", "fraction-digits");
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", "fraction-digits");
         lydict_remove(ctx->xmlctx->ctx, temp_val);
         return LY_EVALID;
     }
@@ -740,7 +740,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_enum(struct lys_yin_parser_ctx *ctx, struct lysp_type *type)
+yin_parse_enum(struct lysp_yin_ctx *ctx, struct lysp_type *type)
 {
     struct lysp_type_enum *en;
 
@@ -748,9 +748,9 @@
     type->flags |= LYS_SET_ENUM;
     LY_CHECK_RET(lyxml_ctx_next(ctx->xmlctx));
     LY_CHECK_RET(yin_parse_attribute(ctx, YIN_ARG_NAME, &en->name, Y_STR_ARG, LY_STMT_ENUM));
-    LY_CHECK_RET(lysp_check_enum_name((struct lys_parser_ctx *)ctx, en->name, strlen(en->name)));
-    CHECK_NONEMPTY((struct lys_parser_ctx *)ctx, strlen(en->name), "enum");
-    CHECK_UNIQUENESS((struct lys_parser_ctx *)ctx, type->enums, name, "enum", en->name);
+    LY_CHECK_RET(lysp_check_enum_name((struct lysp_ctx *)ctx, en->name, strlen(en->name)));
+    CHECK_NONEMPTY((struct lysp_ctx *)ctx, strlen(en->name), "enum");
+    CHECK_UNIQUENESS((struct lysp_ctx *)ctx, type->enums, name, "enum", en->name);
 
     struct yin_subelement subelems[] = {
         {LY_STMT_DESCRIPTION, &en->dsc, YIN_SUBELEM_UNIQUE},
@@ -777,7 +777,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_bit(struct lys_yin_parser_ctx *ctx, struct lysp_type *type)
+yin_parse_bit(struct lysp_yin_ctx *ctx, struct lysp_type *type)
 {
     struct lysp_type_enum *en;
 
@@ -785,7 +785,7 @@
     type->flags |= LYS_SET_BIT;
     LY_CHECK_RET(lyxml_ctx_next(ctx->xmlctx));
     LY_CHECK_RET(yin_parse_attribute(ctx, YIN_ARG_NAME, &en->name, Y_IDENTIF_ARG, LY_STMT_BIT));
-    CHECK_UNIQUENESS((struct lys_parser_ctx *)ctx, type->bits, name, "bit", en->name);
+    CHECK_UNIQUENESS((struct lysp_ctx *)ctx, type->bits, name, "bit", en->name);
 
     struct yin_subelement subelems[] = {
         {LY_STMT_DESCRIPTION, &en->dsc, YIN_SUBELEM_UNIQUE},
@@ -817,7 +817,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_simple_elements(struct lys_yin_parser_ctx *ctx, enum ly_stmt kw, const char ***values, enum yin_argument arg_type,
+yin_parse_simple_elements(struct lysp_yin_ctx *ctx, enum ly_stmt kw, const char ***values, enum yin_argument arg_type,
         enum yang_arg arg_val_type, struct lysp_ext_instance **exts)
 {
     const char **value;
@@ -848,7 +848,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_simple_elem(struct lys_yin_parser_ctx *ctx, enum ly_stmt kw, struct yin_subelement *subinfo,
+yin_parse_simple_elem(struct lysp_yin_ctx *ctx, enum ly_stmt kw, struct yin_subelement *subinfo,
         enum yin_argument arg_type, enum yang_arg arg_val_type, struct lysp_ext_instance **exts)
 {
     if (subinfo->flags & YIN_SUBELEM_UNIQUE) {
@@ -872,7 +872,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_base(struct lys_yin_parser_ctx *ctx, enum ly_stmt parent, void *dest, struct lysp_ext_instance **exts)
+yin_parse_base(struct lysp_yin_ctx *ctx, enum ly_stmt parent, void *dest, struct lysp_ext_instance **exts)
 {
     struct lysp_type *type = NULL;
 
@@ -900,7 +900,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_pasrse_reqinstance(struct lys_yin_parser_ctx *ctx, struct lysp_type *type)
+yin_pasrse_reqinstance(struct lysp_yin_ctx *ctx, struct lysp_type *type)
 {
     const char *temp_val = NULL;
     struct yin_subelement subelems[] = {
@@ -913,7 +913,7 @@
     if (strcmp(temp_val, "true") == 0) {
         type->require_instance = 1;
     } else if (strcmp(temp_val, "false") != 0) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_YIN VALID_VALS2, temp_val, "value",
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_YIN VALID_VALS2, temp_val, "value",
                 "require-instance", "true", "false");
         lydict_remove(ctx->xmlctx->ctx, temp_val);
         return LY_EVALID;
@@ -938,7 +938,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_modifier(struct lys_yin_parser_ctx *ctx, const char **pat, struct lysp_ext_instance **exts)
+yin_parse_modifier(struct lysp_yin_ctx *ctx, const char **pat, struct lysp_ext_instance **exts)
 {
     assert(**pat == 0x06);
     const char *temp_val;
@@ -950,7 +950,7 @@
     LY_CHECK_RET(lyxml_ctx_next(ctx->xmlctx));
     LY_CHECK_RET(yin_parse_attribute(ctx, YIN_ARG_VALUE, &temp_val, Y_STR_ARG, LY_STMT_MODIFIER));
     if (strcmp(temp_val, "invert-match") != 0) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_YIN VALID_VALS1, temp_val, "value",
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_YIN VALID_VALS1, temp_val, "value",
                 "modifier", "invert-match");
         lydict_remove(ctx->xmlctx->ctx, temp_val);
         return LY_EVALID;
@@ -980,7 +980,7 @@
  * @param[in] restr Value to write to.
  */
 static LY_ERR
-yin_parse_restriction(struct lys_yin_parser_ctx *ctx, enum ly_stmt restr_kw, struct lysp_restr *restr)
+yin_parse_restriction(struct lysp_yin_ctx *ctx, enum ly_stmt restr_kw, struct lysp_restr *restr)
 {
     assert(restr_kw == LY_STMT_MUST || restr_kw == LY_STMT_LENGTH || restr_kw == LY_STMT_RANGE);
     struct yin_subelement subelems[] = {
@@ -1014,7 +1014,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_range(struct lys_yin_parser_ctx *ctx, struct lysp_type *type)
+yin_parse_range(struct lysp_yin_ctx *ctx, struct lysp_type *type)
 {
     type->range = calloc(1, sizeof *type->range);
     LY_CHECK_ERR_RET(!type->range, LOGMEM(ctx->xmlctx->ctx), LY_EMEM);
@@ -1033,7 +1033,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_length(struct lys_yin_parser_ctx *ctx, struct lysp_type *type)
+yin_parse_length(struct lysp_yin_ctx *ctx, struct lysp_type *type)
 {
     type->length = calloc(1, sizeof *type->length);
     LY_CHECK_ERR_RET(!type->length, LOGMEM(ctx->xmlctx->ctx), LY_EMEM);
@@ -1052,7 +1052,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_must(struct lys_yin_parser_ctx *ctx, struct lysp_restr **restrs)
+yin_parse_must(struct lysp_yin_ctx *ctx, struct lysp_restr **restrs)
 {
     struct lysp_restr *restr;
 
@@ -1071,7 +1071,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_qname(struct lys_yin_parser_ctx *ctx, enum ly_stmt kw, struct yin_subelement *subinfo,
+yin_parse_qname(struct lysp_yin_ctx *ctx, enum ly_stmt kw, struct yin_subelement *subinfo,
         struct lysp_ext_instance **exts)
 {
     struct lysp_qname *qname, **qnames;
@@ -1116,7 +1116,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_value_pos(struct lys_yin_parser_ctx *ctx, enum ly_stmt kw, struct lysp_type_enum *enm)
+yin_parse_value_pos(struct lysp_yin_ctx *ctx, enum ly_stmt kw, struct lysp_type_enum *enm)
 {
     LY_ERR ret = LY_SUCCESS;
     const char *temp_val = NULL;
@@ -1134,7 +1134,7 @@
     LY_CHECK_GOTO(ret = yin_parse_attribute(ctx, YIN_ARG_VALUE, &temp_val, Y_STR_ARG, kw), cleanup);
     if (!temp_val || (temp_val[0] == '\0') || (temp_val[0] == '+') ||
             ((temp_val[0] == '0') && (temp_val[1] != '\0')) || ((kw == LY_STMT_POSITION) && !strcmp(temp_val, "-0"))) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", ly_stmt2str(kw));
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", ly_stmt2str(kw));
         ret = LY_EVALID;
         goto cleanup;
     }
@@ -1144,26 +1144,26 @@
     if (kw == LY_STMT_VALUE) {
         num = strtoll(temp_val, &ptr, LY_BASE_DEC);
         if ((num < INT64_C(-2147483648)) || (num > INT64_C(2147483647))) {
-            LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", ly_stmt2str(kw));
+            LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", ly_stmt2str(kw));
             ret = LY_EVALID;
             goto cleanup;
         }
     } else {
         unum = strtoull(temp_val, &ptr, LY_BASE_DEC);
         if (unum > UINT64_C(4294967295)) {
-            LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", ly_stmt2str(kw));
+            LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", ly_stmt2str(kw));
             ret = LY_EVALID;
             goto cleanup;
         }
     }
     /* check if whole argument value was converted */
     if (*ptr != '\0') {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", ly_stmt2str(kw));
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", ly_stmt2str(kw));
         ret = LY_EVALID;
         goto cleanup;
     }
     if (errno == ERANGE) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_OOB_YIN, temp_val, "value", ly_stmt2str(kw));
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_OOB_YIN, temp_val, "value", ly_stmt2str(kw));
         ret = LY_EVALID;
         goto cleanup;
     }
@@ -1199,7 +1199,7 @@
  * @return LY_ERR values
  */
 static LY_ERR
-yin_parse_belongs_to(struct lys_yin_parser_ctx *ctx, struct lysp_submodule *submod, struct lysp_ext_instance **exts)
+yin_parse_belongs_to(struct lysp_yin_ctx *ctx, struct lysp_submodule *submod, struct lysp_ext_instance **exts)
 {
     const char *belongsto;
     struct yin_subelement subelems[] = {
@@ -1234,7 +1234,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_meta(struct lys_yin_parser_ctx *ctx, enum ly_stmt elem_type, const char **value, struct lysp_ext_instance **exts)
+yin_parse_meta(struct lysp_yin_ctx *ctx, enum ly_stmt elem_type, const char **value, struct lysp_ext_instance **exts)
 {
     assert(elem_type == LY_STMT_ORGANIZATION || elem_type == LY_STMT_CONTACT || elem_type == LY_STMT_DESCRIPTION || elem_type == LY_STMT_REFERENCE);
 
@@ -1263,7 +1263,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_err_msg(struct lys_yin_parser_ctx *ctx, const char **value, struct lysp_ext_instance **exts)
+yin_parse_err_msg(struct lysp_yin_ctx *ctx, const char **value, struct lysp_ext_instance **exts)
 {
     struct yin_subelement subelems[] = {
         {LY_STMT_EXTENSION_INSTANCE, NULL, 0},
@@ -1289,7 +1289,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_type(struct lys_yin_parser_ctx *ctx, enum ly_stmt parent, struct yin_subelement *subinfo)
+yin_parse_type(struct lysp_yin_ctx *ctx, enum ly_stmt parent, struct yin_subelement *subinfo)
 {
     struct lysp_type *type = NULL;
 
@@ -1347,7 +1347,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_maxelements(struct lys_yin_parser_ctx *ctx, uint32_t *max, uint16_t *flags, struct lysp_ext_instance **exts)
+yin_parse_maxelements(struct lysp_yin_ctx *ctx, uint32_t *max, uint16_t *flags, struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
     const char *temp_val = NULL;
@@ -1361,7 +1361,7 @@
     LY_CHECK_GOTO(ret = lyxml_ctx_next(ctx->xmlctx), cleanup);
     LY_CHECK_GOTO(ret = yin_parse_attribute(ctx, YIN_ARG_VALUE, &temp_val, Y_STR_ARG, LY_STMT_MAX_ELEMENTS), cleanup);
     if (!temp_val || (temp_val[0] == '\0') || (temp_val[0] == '0') || ((temp_val[0] != 'u') && !isdigit(temp_val[0]))) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", "max-elements");
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", "max-elements");
         ret = LY_EVALID;
         goto cleanup;
     }
@@ -1370,12 +1370,12 @@
         errno = 0;
         num = strtoull(temp_val, &ptr, LY_BASE_DEC);
         if (*ptr != '\0') {
-            LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", "max-elements");
+            LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", "max-elements");
             ret = LY_EVALID;
             goto cleanup;
         }
         if ((errno == ERANGE) || (num > UINT32_MAX)) {
-            LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_OOB_YIN, temp_val, "value", "max-elements");
+            LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_OOB_YIN, temp_val, "value", "max-elements");
             ret = LY_EVALID;
             goto cleanup;
         }
@@ -1400,7 +1400,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_minelements(struct lys_yin_parser_ctx *ctx, uint32_t *min, uint16_t *flags, struct lysp_ext_instance **exts)
+yin_parse_minelements(struct lysp_yin_ctx *ctx, uint32_t *min, uint16_t *flags, struct lysp_ext_instance **exts)
 {
     const char *temp_val = NULL;
     char *ptr;
@@ -1414,7 +1414,7 @@
     LY_CHECK_RET(yin_parse_attribute(ctx, YIN_ARG_VALUE, &temp_val, Y_STR_ARG, LY_STMT_MIN_ELEMENTS));
 
     if (!temp_val || (temp_val[0] == '\0') || ((temp_val[0] == '0') && (temp_val[1] != '\0'))) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", "min-elements");
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", "min-elements");
         lydict_remove(ctx->xmlctx->ctx, temp_val);
         return LY_EVALID;
     }
@@ -1422,12 +1422,12 @@
     errno = 0;
     num = strtoull(temp_val, &ptr, LY_BASE_DEC);
     if (ptr[0] != 0) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", "min-elements");
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_YIN, temp_val, "value", "min-elements");
         lydict_remove(ctx->xmlctx->ctx, temp_val);
         return LY_EVALID;
     }
     if ((errno == ERANGE) || (num > UINT32_MAX)) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_OOB_YIN, temp_val, "value", "min-elements");
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_OOB_YIN, temp_val, "value", "min-elements");
         lydict_remove(ctx->xmlctx->ctx, temp_val);
         return LY_EVALID;
     }
@@ -1449,7 +1449,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_minmax(struct lys_yin_parser_ctx *ctx, enum ly_stmt parent, enum ly_stmt current, void *dest)
+yin_parse_minmax(struct lysp_yin_ctx *ctx, enum ly_stmt parent, enum ly_stmt current, void *dest)
 {
     assert(current == LY_STMT_MAX_ELEMENTS || current == LY_STMT_MIN_ELEMENTS);
     assert(parent == LY_STMT_LEAF_LIST || parent == LY_STMT_REFINE || parent == LY_STMT_LIST || parent == LY_STMT_DEVIATE);
@@ -1494,7 +1494,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_orderedby(struct lys_yin_parser_ctx *ctx, uint16_t *flags, struct lysp_ext_instance **exts)
+yin_parse_orderedby(struct lysp_yin_ctx *ctx, uint16_t *flags, struct lysp_ext_instance **exts)
 {
     const char *temp_val;
     struct yin_subelement subelems[] = {
@@ -1508,7 +1508,7 @@
     } else if (strcmp(temp_val, "user") == 0) {
         *flags |= LYS_ORDBY_USER;
     } else {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_YIN VALID_VALS2, temp_val, "value",
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_YIN VALID_VALS2, temp_val, "value",
                 "ordered-by", "system", "user");
         lydict_remove(ctx->xmlctx->ctx, temp_val);
         return LY_EVALID;
@@ -1530,7 +1530,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_any(struct lys_yin_parser_ctx *ctx, enum ly_stmt any_kw, struct tree_node_meta *node_meta)
+yin_parse_any(struct lysp_yin_ctx *ctx, enum ly_stmt any_kw, struct tree_node_meta *node_meta)
 {
     struct lysp_node_anydata *any;
 
@@ -1572,7 +1572,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_leaf(struct lys_yin_parser_ctx *ctx, struct tree_node_meta *node_meta)
+yin_parse_leaf(struct lysp_yin_ctx *ctx, struct tree_node_meta *node_meta)
 {
     struct lysp_node_leaf *leaf;
 
@@ -1618,7 +1618,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_leaflist(struct lys_yin_parser_ctx *ctx, struct tree_node_meta *node_meta)
+yin_parse_leaflist(struct lysp_yin_ctx *ctx, struct tree_node_meta *node_meta)
 {
     struct lysp_node_leaflist *llist;
 
@@ -1656,11 +1656,11 @@
 
     /* check invalid combination of subelements */
     if ((llist->min) && (llist->dflts)) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INCHILDSTMSCOMB_YIN, "min-elements", "default", "leaf-list");
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INCHILDSTMSCOMB_YIN, "min-elements", "default", "leaf-list");
         return LY_EVALID;
     }
     if (llist->max && (llist->min > llist->max)) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_MINMAX, llist->min, llist->max);
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_MINMAX, llist->min, llist->max);
         return LY_EVALID;
     }
 
@@ -1676,7 +1676,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_typedef(struct lys_yin_parser_ctx *ctx, struct tree_node_meta *typedef_meta)
+yin_parse_typedef(struct lysp_yin_ctx *ctx, struct tree_node_meta *typedef_meta)
 {
     struct lysp_tpdf *tpdf;
     struct lysp_tpdf **tpdfs = (struct lysp_tpdf **)typedef_meta->nodes;
@@ -1721,7 +1721,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_refine(struct lys_yin_parser_ctx *ctx, struct lysp_refine **refines)
+yin_parse_refine(struct lysp_yin_ctx *ctx, struct lysp_refine **refines)
 {
     struct lysp_refine *rf;
 
@@ -1765,7 +1765,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_uses(struct lys_yin_parser_ctx *ctx, struct tree_node_meta *node_meta)
+yin_parse_uses(struct lysp_yin_ctx *ctx, struct tree_node_meta *node_meta)
 {
     struct lysp_node_uses *uses;
 
@@ -1808,7 +1808,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_revision(struct lys_yin_parser_ctx *ctx, struct lysp_revision **revs)
+yin_parse_revision(struct lysp_yin_ctx *ctx, struct lysp_revision **revs)
 {
     struct lysp_revision *rev;
     const char *temp_date = NULL;
@@ -1820,7 +1820,7 @@
     LY_CHECK_RET(lyxml_ctx_next(ctx->xmlctx));
     LY_CHECK_RET(yin_parse_attribute(ctx, YIN_ARG_DATE, &temp_date, Y_STR_ARG, LY_STMT_REVISION));
     /* check value */
-    if (lysp_check_date((struct lys_parser_ctx *)ctx, temp_date, strlen(temp_date), "revision")) {
+    if (lysp_check_date((struct lysp_ctx *)ctx, temp_date, strlen(temp_date), "revision")) {
         lydict_remove(ctx->xmlctx->ctx, temp_date);
         return LY_EVALID;
     }
@@ -1851,7 +1851,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_include(struct lys_yin_parser_ctx *ctx, struct include_meta *inc_meta)
+yin_parse_include(struct lysp_yin_ctx *ctx, struct include_meta *inc_meta)
 {
     struct lysp_include *inc;
 
@@ -1865,7 +1865,7 @@
     /* submodules share the namespace with the module names, so there must not be
      * a module of the same name in the context, no need for revision matching */
     if (!strcmp(inc_meta->name, inc->name) || ly_ctx_get_module_latest(ctx->xmlctx->ctx, inc->name)) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_NAME2_COL, "module", "submodule", inc->name);
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_NAME2_COL, "module", "submodule", inc->name);
         return LY_EVALID;
     }
 
@@ -1895,7 +1895,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_revision_date(struct lys_yin_parser_ctx *ctx, char *rev, struct lysp_ext_instance **exts)
+yin_parse_revision_date(struct lysp_yin_ctx *ctx, char *rev, struct lysp_ext_instance **exts)
 {
     const char *temp_rev;
     struct yin_subelement subelems[] = {
@@ -1904,7 +1904,7 @@
 
     LY_CHECK_RET(lyxml_ctx_next(ctx->xmlctx));
     LY_CHECK_RET(yin_parse_attribute(ctx, YIN_ARG_DATE, &temp_rev, Y_STR_ARG, LY_STMT_REVISION_DATE));
-    LY_CHECK_ERR_RET(lysp_check_date((struct lys_parser_ctx *)ctx, temp_rev, strlen(temp_rev), "revision-date") != LY_SUCCESS,
+    LY_CHECK_ERR_RET(lysp_check_date((struct lysp_ctx *)ctx, temp_rev, strlen(temp_rev), "revision-date") != LY_SUCCESS,
             lydict_remove(ctx->xmlctx->ctx, temp_rev), LY_EVALID);
 
     strcpy(rev, temp_rev);
@@ -1925,7 +1925,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_config(struct lys_yin_parser_ctx *ctx, uint16_t *flags, struct lysp_ext_instance **exts)
+yin_parse_config(struct lysp_yin_ctx *ctx, uint16_t *flags, struct lysp_ext_instance **exts)
 {
     const char *temp_val = NULL;
     struct yin_subelement subelems[] = {
@@ -1939,7 +1939,7 @@
     } else if (strcmp(temp_val, "false") == 0) {
         *flags |= LYS_CONFIG_R;
     } else {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_YIN VALID_VALS2, temp_val, "value", "config",
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_YIN VALID_VALS2, temp_val, "value", "config",
                 "true", "false");
         lydict_remove(ctx->xmlctx->ctx, temp_val);
         return LY_EVALID;
@@ -1961,7 +1961,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_yangversion(struct lys_yin_parser_ctx *ctx, uint8_t *version, struct lysp_ext_instance **exts)
+yin_parse_yangversion(struct lysp_yin_ctx *ctx, uint8_t *version, struct lysp_ext_instance **exts)
 {
     const char *temp_version = NULL;
     struct yin_subelement subelems[] = {
@@ -1975,7 +1975,7 @@
     } else if (strcmp(temp_version, "1.1") == 0) {
         *version = LYS_VERSION_1_1;
     } else {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_YIN VALID_VALS2, temp_version, "value",
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_YIN VALID_VALS2, temp_version, "value",
                 "yang-version", "1", "1.1");
         lydict_remove(ctx->xmlctx->ctx, temp_version);
         return LY_EVALID;
@@ -1996,7 +1996,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_import(struct lys_yin_parser_ctx *ctx, struct import_meta *imp_meta)
+yin_parse_import(struct lysp_yin_ctx *ctx, struct import_meta *imp_meta)
 {
     struct lysp_import *imp;
 
@@ -2020,7 +2020,7 @@
     LY_CHECK_RET(ly_set_add(&ctx->ext_inst, imp->exts, 1, NULL));
 
     /* check prefix validity */
-    LY_CHECK_RET(lysp_check_prefix((struct lys_parser_ctx *)ctx, *imp_meta->imports, imp_meta->prefix, &imp->prefix), LY_EVALID);
+    LY_CHECK_RET(lysp_check_prefix((struct lysp_ctx *)ctx, *imp_meta->imports, imp_meta->prefix, &imp->prefix), LY_EVALID);
 
     return LY_SUCCESS;
 }
@@ -2035,7 +2035,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_mandatory(struct lys_yin_parser_ctx *ctx, uint16_t *flags, struct lysp_ext_instance **exts)
+yin_parse_mandatory(struct lysp_yin_ctx *ctx, uint16_t *flags, struct lysp_ext_instance **exts)
 {
     const char *temp_val = NULL;
     struct yin_subelement subelems[] = {
@@ -2049,7 +2049,7 @@
     } else if (strcmp(temp_val, "false") == 0) {
         *flags |= LYS_MAND_FALSE;
     } else {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_YIN VALID_VALS2, temp_val, "value",
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_YIN VALID_VALS2, temp_val, "value",
                 "mandatory", "true", "false");
         lydict_remove(ctx->xmlctx->ctx, temp_val);
         return LY_EVALID;
@@ -2071,7 +2071,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_status(struct lys_yin_parser_ctx *ctx, uint16_t *flags, struct lysp_ext_instance **exts)
+yin_parse_status(struct lysp_yin_ctx *ctx, uint16_t *flags, struct lysp_ext_instance **exts)
 {
     const char *value = NULL;
     struct yin_subelement subelems[] = {
@@ -2087,7 +2087,7 @@
     } else if (strcmp(value, "obsolete") == 0) {
         *flags |= LYS_STATUS_OBSLT;
     } else {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_YIN VALID_VALS3, value, "value",
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_YIN VALID_VALS3, value, "value",
                 "status", "current", "deprecated", "obsolete");
         lydict_remove(ctx->xmlctx->ctx, value);
         return LY_EVALID;
@@ -2106,7 +2106,7 @@
  * @param[out] when_p When pointer to parse to.
  */
 static LY_ERR
-yin_parse_when(struct lys_yin_parser_ctx *ctx, struct lysp_when **when_p)
+yin_parse_when(struct lysp_yin_ctx *ctx, struct lysp_when **when_p)
 {
     struct lysp_when *when;
     LY_ERR ret = LY_SUCCESS;
@@ -2146,7 +2146,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_yin_element(struct lys_yin_parser_ctx *ctx, uint16_t *flags, struct lysp_ext_instance **exts)
+yin_parse_yin_element(struct lysp_yin_ctx *ctx, uint16_t *flags, struct lysp_ext_instance **exts)
 {
     const char *temp_val = NULL;
     struct yin_subelement subelems[] = {
@@ -2160,7 +2160,7 @@
     } else if (strcmp(temp_val, "false") == 0) {
         *flags |= LYS_YINELEM_FALSE;
     } else {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_YIN VALID_VALS2, temp_val, "value",
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_YIN VALID_VALS2, temp_val, "value",
                 "yin-element", "true", "false");
         lydict_remove(ctx->xmlctx->ctx, temp_val);
         return LY_EVALID;
@@ -2182,7 +2182,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_argument(struct lys_yin_parser_ctx *ctx, struct yin_argument_meta *arg_meta, struct lysp_ext_instance **exts)
+yin_parse_argument(struct lysp_yin_ctx *ctx, struct yin_argument_meta *arg_meta, struct lysp_ext_instance **exts)
 {
     struct yin_subelement subelems[] = {
         {LY_STMT_YIN_ELEMENT, arg_meta->flags, YIN_SUBELEM_UNIQUE},
@@ -2206,7 +2206,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_extension(struct lys_yin_parser_ctx *ctx, struct lysp_ext **extensions)
+yin_parse_extension(struct lysp_yin_ctx *ctx, struct lysp_ext **extensions)
 {
     struct lysp_ext *ex;
 
@@ -2240,7 +2240,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_feature(struct lys_yin_parser_ctx *ctx, struct lysp_feature **features)
+yin_parse_feature(struct lysp_yin_ctx *ctx, struct lysp_feature **features)
 {
     struct lysp_feature *feat;
 
@@ -2277,7 +2277,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_identity(struct lys_yin_parser_ctx *ctx, struct lysp_ident **identities)
+yin_parse_identity(struct lysp_yin_ctx *ctx, struct lysp_ident **identities)
 {
     struct lysp_ident *ident;
 
@@ -2315,7 +2315,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_list(struct lys_yin_parser_ctx *ctx, struct tree_node_meta *node_meta)
+yin_parse_list(struct lysp_yin_ctx *ctx, struct tree_node_meta *node_meta)
 {
     struct lysp_node_list *list;
     LY_ERR ret = LY_SUCCESS;
@@ -2365,7 +2365,7 @@
     LY_CHECK_RET(ly_set_add(&ctx->ext_inst, list->exts, 1, NULL));
 
     if (list->max && (list->min > list->max)) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_MINMAX, list->min, list->max);
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_MINMAX, list->min, list->max);
         return LY_EVALID;
     }
 
@@ -2381,7 +2381,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_notification(struct lys_yin_parser_ctx *ctx, struct tree_node_meta *notif_meta)
+yin_parse_notification(struct lysp_yin_ctx *ctx, struct tree_node_meta *notif_meta)
 {
     struct lysp_node_notif *notif;
     struct lysp_node_notif **notifs = (struct lysp_node_notif **)notif_meta->nodes;
@@ -2436,7 +2436,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_grouping(struct lys_yin_parser_ctx *ctx, struct tree_node_meta *gr_meta)
+yin_parse_grouping(struct lysp_yin_ctx *ctx, struct tree_node_meta *gr_meta)
 {
     struct lysp_node_grp *grp;
     struct lysp_node_grp **grps = (struct lysp_node_grp **)gr_meta->nodes;
@@ -2495,7 +2495,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_container(struct lys_yin_parser_ctx *ctx, struct tree_node_meta *node_meta)
+yin_parse_container(struct lysp_yin_ctx *ctx, struct tree_node_meta *node_meta)
 {
     struct lysp_node_container *cont;
     LY_ERR ret = LY_SUCCESS;
@@ -2553,7 +2553,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_case(struct lys_yin_parser_ctx *ctx, struct tree_node_meta *node_meta)
+yin_parse_case(struct lysp_yin_ctx *ctx, struct tree_node_meta *node_meta)
 {
     struct lysp_node_case *cas;
     LY_ERR ret = LY_SUCCESS;
@@ -2604,7 +2604,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-yin_parse_choice(struct lys_yin_parser_ctx *ctx, struct tree_node_meta *node_meta)
+yin_parse_choice(struct lysp_yin_ctx *ctx, struct tree_node_meta *node_meta)
 {
     LY_ERR ret = LY_SUCCESS;
     struct yin_subelement *subelems = NULL;
@@ -2660,7 +2660,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_inout(struct lys_yin_parser_ctx *ctx, enum ly_stmt inout_kw, struct inout_meta *inout_meta)
+yin_parse_inout(struct lysp_yin_ctx *ctx, enum ly_stmt inout_kw, struct inout_meta *inout_meta)
 {
     LY_ERR ret = LY_SUCCESS;
     struct yin_subelement *subelems = NULL;
@@ -2697,7 +2697,7 @@
     LY_CHECK_RET(ly_set_add(&ctx->ext_inst, inout_meta->inout_p->exts, 1, NULL));
 
     if (!inout_meta->inout_p->child) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_MISSTMT, "data-def-stmt", ly_stmt2str(inout_kw));
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_MISSTMT, "data-def-stmt", ly_stmt2str(inout_kw));
         return LY_EVALID;
     }
 
@@ -2713,7 +2713,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_action(struct lys_yin_parser_ctx *ctx, struct tree_node_meta *act_meta)
+yin_parse_action(struct lysp_yin_ctx *ctx, struct tree_node_meta *act_meta)
 {
     struct lysp_node_action *act, **acts = (struct lysp_node_action **)act_meta->nodes;
     LY_ERR ret = LY_SUCCESS;
@@ -2769,7 +2769,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_augment(struct lys_yin_parser_ctx *ctx, struct tree_node_meta *aug_meta)
+yin_parse_augment(struct lysp_yin_ctx *ctx, struct tree_node_meta *aug_meta)
 {
     struct lysp_node_augment *aug;
     struct lysp_node_augment **augs = (struct lysp_node_augment **)aug_meta->nodes;
@@ -2785,7 +2785,7 @@
     /* parse argument */
     LY_CHECK_RET(lyxml_ctx_next(ctx->xmlctx));
     LY_CHECK_RET(yin_parse_attribute(ctx, YIN_ARG_TARGET_NODE, &aug->nodeid, Y_STR_ARG, LY_STMT_AUGMENT));
-    CHECK_NONEMPTY((struct lys_parser_ctx *)ctx, strlen(aug->nodeid), "augment");
+    CHECK_NONEMPTY((struct lysp_ctx *)ctx, strlen(aug->nodeid), "augment");
 
     /* parser augment content */
     LY_CHECK_RET(subelems_allocator(ctx, subelems_size = 17, (struct lysp_node *)aug, &subelems,
@@ -2825,7 +2825,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_deviate(struct lys_yin_parser_ctx *ctx, struct lysp_deviate **deviates)
+yin_parse_deviate(struct lysp_yin_ctx *ctx, struct lysp_deviate **deviates)
 {
     LY_ERR ret = LY_SUCCESS;
     uint8_t dev_mod;
@@ -2848,7 +2848,7 @@
     } else if (strcmp(temp_val, "delete") == 0) {
         dev_mod = LYS_DEV_DELETE;
     } else {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INVAL_YIN VALID_VALS4, temp_val, "value", "deviate",
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INVAL_YIN VALID_VALS4, temp_val, "value", "deviate",
                 "not-supported", "add", "replace", "delete");
         lydict_remove(ctx->xmlctx->ctx, temp_val);
         return LY_EVALID;
@@ -2941,7 +2941,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_deviation(struct lys_yin_parser_ctx *ctx, struct lysp_deviation **deviations)
+yin_parse_deviation(struct lysp_yin_ctx *ctx, struct lysp_deviation **deviations)
 {
     LY_ERR ret = LY_SUCCESS;
     struct lysp_deviation *dev = NULL;
@@ -2953,7 +2953,7 @@
     /* parse argument */
     LY_CHECK_GOTO(ret = lyxml_ctx_next(ctx->xmlctx), cleanup);
     LY_CHECK_GOTO(ret = yin_parse_attribute(ctx, YIN_ARG_TARGET_NODE, &dev->nodeid, Y_STR_ARG, LY_STMT_DEVIATION), cleanup);
-    CHECK_NONEMPTY((struct lys_parser_ctx *)ctx, strlen(dev->nodeid), "deviation");
+    CHECK_NONEMPTY((struct lysp_ctx *)ctx, strlen(dev->nodeid), "deviation");
     struct yin_subelement subelems[] = {
         {LY_STMT_DESCRIPTION, &dev->dsc, YIN_SUBELEM_UNIQUE},
         {LY_STMT_DEVIATE, &dev->deviates, YIN_SUBELEM_MANDATORY},
@@ -2983,7 +2983,7 @@
  * @return LY_SUCCESS on success LY_EINT if kw can't be mapped to kw_group, should not happen if called correctly.
  */
 static LY_ERR
-kw2kw_group(struct lys_yin_parser_ctx *ctx, enum ly_stmt kw, enum yang_module_stmt *group)
+kw2kw_group(struct lysp_yin_ctx *ctx, enum ly_stmt kw, enum yang_module_stmt *group)
 {
     switch (kw) {
     /* module header */
@@ -3050,7 +3050,7 @@
  * @return LY_SUCCESS on success and LY_EVALID if relative order is invalid.
  */
 static LY_ERR
-yin_check_relative_order(struct lys_yin_parser_ctx *ctx, enum ly_stmt kw, enum ly_stmt next_kw, enum ly_stmt parrent)
+yin_check_relative_order(struct lysp_yin_ctx *ctx, enum ly_stmt kw, enum ly_stmt next_kw, enum ly_stmt parrent)
 {
     assert(parrent == LY_STMT_MODULE || parrent == LY_STMT_SUBMODULE);
     enum yang_module_stmt gr, next_gr;
@@ -3064,7 +3064,7 @@
     LY_CHECK_RET(kw2kw_group(ctx, next_kw, &next_gr));
 
     if (gr > next_gr) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INORDER_YIN, ly_stmt2str(parrent), ly_stmt2str(next_kw), ly_stmt2str(kw));
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INORDER_YIN, ly_stmt2str(parrent), ly_stmt2str(next_kw), ly_stmt2str(kw));
         return LY_EVALID;
     }
 
@@ -3080,7 +3080,7 @@
  * @return LY_ERR values.
  */
 static LY_ERR
-yin_parse_extension_instance_arg(struct lys_yin_parser_ctx *ctx, enum ly_stmt elem_type, const char **arg)
+yin_parse_extension_instance_arg(struct lysp_yin_ctx *ctx, enum ly_stmt elem_type, const char **arg)
 {
     enum ly_stmt child;
 
@@ -3183,7 +3183,7 @@
             LY_CHECK_RET(lyxml_ctx_next(ctx->xmlctx));
         }
         if (((ctx->xmlctx->status == LYXML_ELEM_CONTENT) && !ctx->xmlctx->ws_only) || (ctx->xmlctx->status != LYXML_ELEMENT)) {
-            LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_FIRT_SUBELEM,
+            LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_FIRT_SUBELEM,
                     elem_type == LY_STMT_ERROR_MESSAGE ? "value" : "text", ly_stmt2str(elem_type));
             return LY_EVALID;
         }
@@ -3192,7 +3192,7 @@
         child = yin_match_keyword(ctx, ctx->xmlctx->name, ctx->xmlctx->name_len, ctx->xmlctx->prefix, ctx->xmlctx->prefix_len, elem_type);
         if (((elem_type == LY_STMT_ERROR_MESSAGE) && (child != LY_STMT_ARG_VALUE)) ||
                 ((elem_type != LY_STMT_ERROR_MESSAGE) && (child != LY_STMT_ARG_TEXT))) {
-            LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_UNEXP_SUBELEM, ctx->xmlctx->name_len, ctx->xmlctx->name,
+            LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_UNEXP_SUBELEM, ctx->xmlctx->name_len, ctx->xmlctx->name,
                     ly_stmt2str(elem_type));
             return LY_EVALID;
         }
@@ -3233,7 +3233,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-yin_parse_element_generic(struct lys_yin_parser_ctx *ctx, enum ly_stmt parent, struct lysp_stmt **element)
+yin_parse_element_generic(struct lysp_yin_ctx *ctx, enum ly_stmt parent, struct lysp_stmt **element)
 {
     LY_ERR ret = LY_SUCCESS;
     struct lysp_stmt *last = NULL, *new = NULL;
@@ -3268,7 +3268,7 @@
     last = (*element)->child;
     if ((*element)->kw == LY_STMT_NONE) {
         /* unrecognized element */
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_UNEXP_SUBELEM, ctx->xmlctx->name_len, ctx->xmlctx->name,
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_UNEXP_SUBELEM, ctx->xmlctx->name_len, ctx->xmlctx->name,
                 ly_stmt2str(parent));
         ret = LY_EVALID;
         goto cleanup;
@@ -3353,7 +3353,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-yin_parse_extension_instance(struct lys_yin_parser_ctx *ctx, enum ly_stmt subelem, LY_ARRAY_COUNT_TYPE subelem_index,
+yin_parse_extension_instance(struct lysp_yin_ctx *ctx, enum ly_stmt subelem, LY_ARRAY_COUNT_TYPE subelem_index,
         struct lysp_ext_instance **exts)
 {
     struct lysp_ext_instance *e;
@@ -3460,7 +3460,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-yin_parse_content(struct lys_yin_parser_ctx *ctx, struct yin_subelement *subelem_info, size_t subelem_info_size,
+yin_parse_content(struct lysp_yin_ctx *ctx, struct yin_subelement *subelem_info, size_t subelem_info_size,
         enum ly_stmt current_element, const char **text_content, struct lysp_ext_instance **exts)
 {
     LY_ERR ret = LY_SUCCESS;
@@ -3492,9 +3492,9 @@
             subelem = get_record(kw, subelem_info_size, subelem_info);
             if (!subelem) {
                 if ((current_element == LY_STMT_DEVIATE) && isdevsub(kw)) {
-                    LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INDEV_YIN, ly_stmt2str(kw));
+                    LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INDEV_YIN, ly_stmt2str(kw));
                 } else {
-                    LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_UNEXP_SUBELEM, ctx->xmlctx->name_len,
+                    LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_UNEXP_SUBELEM, ctx->xmlctx->name_len,
                             ctx->xmlctx->name, ly_stmt2str(current_element));
                 }
                 ret = LY_EVALID;
@@ -3510,7 +3510,7 @@
             /* flag check */
             if ((subelem->flags & YIN_SUBELEM_UNIQUE) && (subelem->flags & YIN_SUBELEM_PARSED)) {
                 /* subelement uniquenes */
-                LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_SUBELEM_REDEF, ly_stmt2str(kw), ly_stmt2str(current_element));
+                LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_SUBELEM_REDEF, ly_stmt2str(kw), ly_stmt2str(current_element));
                 return LY_EVALID;
             }
             if (subelem->flags & YIN_SUBELEM_FIRST) {
@@ -3521,7 +3521,7 @@
             if (subelem->flags & YIN_SUBELEM_VER2) {
                 /* subelement is supported only in version 1.1 or higher */
                 if (PARSER_CUR_PMOD(ctx)->version < LYS_VERSION_1_1) {
-                    LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_INSUBELEM2, ly_stmt2str(kw), ly_stmt2str(current_element));
+                    LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_INSUBELEM2, ly_stmt2str(kw), ly_stmt2str(current_element));
                     ret = LY_EVALID;
                     goto cleanup;
                 }
@@ -3763,7 +3763,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-yin_parse_mod(struct lys_yin_parser_ctx *ctx, struct lysp_module *mod)
+yin_parse_mod(struct lysp_yin_ctx *ctx, struct lysp_module *mod)
 {
     LY_ERR ret = LY_SUCCESS;
     struct yin_subelement *subelems = NULL;
@@ -3815,7 +3815,7 @@
      * a submodule of the same name in the context, no need for revision matching */
     dup = ly_ctx_get_submodule_latest(ctx->xmlctx->ctx, mod->mod->name);
     if (dup) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_NAME2_COL, "module", "submodule", mod->mod->name);
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_NAME2_COL, "module", "submodule", mod->mod->name);
         return LY_EVALID;
     }
 
@@ -3831,7 +3831,7 @@
  * @return LY_ERR values.
  */
 LY_ERR
-yin_parse_submod(struct lys_yin_parser_ctx *ctx, struct lysp_submodule *submod)
+yin_parse_submod(struct lysp_yin_ctx *ctx, struct lysp_submodule *submod)
 {
     LY_ERR ret = LY_SUCCESS;
     struct yin_subelement *subelems = NULL;
@@ -3882,7 +3882,7 @@
      * a submodule of the same name in the context, no need for revision matching */
     dup = ly_ctx_get_submodule_latest(ctx->xmlctx->ctx, submod->name);
     if (dup && strcmp(dup->mod->name, submod->mod->name)) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_NAME_COL, "submodules", dup->name);
+        LOGVAL_PARSER((struct lysp_ctx *)ctx, LY_VCODE_NAME_COL, "submodules", dup->name);
         return LY_EVALID;
     }
 
@@ -3890,7 +3890,7 @@
 }
 
 LY_ERR
-yin_parse_submodule(struct lys_yin_parser_ctx **yin_ctx, struct ly_ctx *ctx, struct lys_parser_ctx *main_ctx,
+yin_parse_submodule(struct lysp_yin_ctx **yin_ctx, struct ly_ctx *ctx, struct lysp_ctx *main_ctx,
         struct ly_in *in, struct lysp_submodule **submod)
 {
     enum ly_stmt kw = LY_STMT_NONE;
@@ -3924,7 +3924,7 @@
         ret = LY_EINVAL;
         goto cleanup;
     } else if (kw != LY_STMT_SUBMODULE) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)*yin_ctx, LY_VCODE_MOD_SUBOMD, ly_stmt2str(kw));
+        LOGVAL_PARSER((struct lysp_ctx *)*yin_ctx, LY_VCODE_MOD_SUBOMD, ly_stmt2str(kw));
         ret = LY_EVALID;
         goto cleanup;
     }
@@ -3940,7 +3940,7 @@
         ly_in_skip(in, 1);
     }
     if (in->current[0]) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)*yin_ctx, LY_VCODE_TRAILING_SUBMOD, 15, in->current,
+        LOGVAL_PARSER((struct lysp_ctx *)*yin_ctx, LY_VCODE_TRAILING_SUBMOD, 15, in->current,
                 strlen(in->current) > 15 ? "..." : "");
         ret = LY_EVALID;
         goto cleanup;
@@ -3952,14 +3952,14 @@
 cleanup:
     if (ret) {
         lysp_module_free(&fctx, (struct lysp_module *)mod_p);
-        yin_parser_ctx_free(*yin_ctx);
+        lysp_yin_ctx_free(*yin_ctx);
         *yin_ctx = NULL;
     }
     return ret;
 }
 
 LY_ERR
-yin_parse_module(struct lys_yin_parser_ctx **yin_ctx, struct ly_in *in, struct lys_module *mod)
+yin_parse_module(struct lysp_yin_ctx **yin_ctx, struct ly_in *in, struct lys_module *mod)
 {
     LY_ERR ret = LY_SUCCESS;
     enum ly_stmt kw = LY_STMT_NONE;
@@ -3972,7 +3972,7 @@
     (*yin_ctx)->format = LYS_IN_YIN;
     LY_CHECK_ERR_RET(ly_set_new(&(*yin_ctx)->parsed_mods), free(*yin_ctx); LOGMEM(mod->ctx), LY_EMEM);
     LY_CHECK_RET(lyxml_ctx_new(mod->ctx, in, &(*yin_ctx)->xmlctx));
-    (*yin_ctx)->main_ctx = (struct lys_parser_ctx *)(*yin_ctx);
+    (*yin_ctx)->main_ctx = (struct lysp_ctx *)(*yin_ctx);
 
     mod_p = calloc(1, sizeof *mod_p);
     LY_CHECK_ERR_GOTO(!mod_p, LOGMEM(mod->ctx), cleanup);
@@ -3987,7 +3987,7 @@
         ret = LY_EINVAL;
         goto cleanup;
     } else if (kw != LY_STMT_MODULE) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)*yin_ctx, LY_VCODE_MOD_SUBOMD, ly_stmt2str(kw));
+        LOGVAL_PARSER((struct lysp_ctx *)*yin_ctx, LY_VCODE_MOD_SUBOMD, ly_stmt2str(kw));
         ret = LY_EVALID;
         goto cleanup;
     }
@@ -4004,7 +4004,7 @@
         ly_in_skip(in, 1);
     }
     if (in->current[0]) {
-        LOGVAL_PARSER((struct lys_parser_ctx *)*yin_ctx, LY_VCODE_TRAILING_MOD, 15, in->current,
+        LOGVAL_PARSER((struct lysp_ctx *)*yin_ctx, LY_VCODE_TRAILING_MOD, 15, in->current,
                 strlen(in->current) > 15 ? "..." : "");
         ret = LY_EVALID;
         goto cleanup;
@@ -4015,7 +4015,7 @@
 cleanup:
     if (ret != LY_SUCCESS) {
         lysp_module_free(&fctx, mod_p);
-        yin_parser_ctx_free(*yin_ctx);
+        lysp_yin_ctx_free(*yin_ctx);
         *yin_ctx = NULL;
     }
     return ret;
diff --git a/src/tree_schema.c b/src/tree_schema.c
index b0be387..3e6d5d2 100644
--- a/src/tree_schema.c
+++ b/src/tree_schema.c
@@ -1260,7 +1260,7 @@
  * @return LY_ERR value.
  */
 static LY_ERR
-lysp_resolve_import_include(struct lys_parser_ctx *pctx, struct lysp_module *pmod, struct ly_set *new_mods)
+lysp_resolve_import_include(struct lysp_ctx *pctx, struct lysp_module *pmod, struct ly_set *new_mods)
 {
     struct lysp_import *imp;
     LY_ARRAY_COUNT_TYPE u, v;
@@ -1300,7 +1300,7 @@
  * @return LY_ERR value.
  */
 static LY_ERR
-lysp_resolve_ext_instance_records(struct lys_parser_ctx *pctx)
+lysp_resolve_ext_instance_records(struct lysp_ctx *pctx)
 {
     struct lysp_ext_instance *exts, *ext;
     const struct lys_module *mod;
@@ -1333,15 +1333,15 @@
 }
 
 LY_ERR
-lys_parse_submodule(struct ly_ctx *ctx, struct ly_in *in, LYS_INFORMAT format, struct lys_parser_ctx *main_ctx,
+lys_parse_submodule(struct ly_ctx *ctx, struct ly_in *in, LYS_INFORMAT format, struct lysp_ctx *main_ctx,
         LY_ERR (*custom_check)(const struct ly_ctx *, struct lysp_module *, struct lysp_submodule *, void *),
         void *check_data, struct ly_set *new_mods, struct lysp_submodule **submodule)
 {
     LY_ERR ret;
     struct lysp_submodule *submod = NULL, *latest_sp;
-    struct lys_yang_parser_ctx *yangctx = NULL;
-    struct lys_yin_parser_ctx *yinctx = NULL;
-    struct lys_parser_ctx *pctx;
+    struct lysp_yang_ctx *yangctx = NULL;
+    struct lysp_yin_ctx *yinctx = NULL;
+    struct lysp_ctx *pctx;
     struct lysf_ctx fctx = {.ctx = ctx};
 
     LY_CHECK_ARG_RET(ctx, ctx, in, LY_EINVAL);
@@ -1349,11 +1349,11 @@
     switch (format) {
     case LYS_IN_YIN:
         ret = yin_parse_submodule(&yinctx, ctx, main_ctx, in, &submod);
-        pctx = (struct lys_parser_ctx *)yinctx;
+        pctx = (struct lysp_ctx *)yinctx;
         break;
     case LYS_IN_YANG:
         ret = yang_parse_submodule(&yangctx, ctx, main_ctx, in, &submod);
-        pctx = (struct lys_parser_ctx *)yangctx;
+        pctx = (struct lysp_ctx *)yangctx;
         break;
     default:
         LOGERR(ctx, LY_EINVAL, "Invalid schema input format.");
@@ -1404,9 +1404,9 @@
     LY_CHECK_GOTO(ret = lysp_resolve_ext_instance_records(pctx), error);
 
     if (format == LYS_IN_YANG) {
-        yang_parser_ctx_free(yangctx);
+        lysp_yang_ctx_free(yangctx);
     } else {
-        yin_parser_ctx_free(yinctx);
+        lysp_yin_ctx_free(yinctx);
     }
     *submodule = submod;
     return LY_SUCCESS;
@@ -1419,9 +1419,9 @@
     }
     lysp_module_free(&fctx, (struct lysp_module *)submod);
     if (format == LYS_IN_YANG) {
-        yang_parser_ctx_free(yangctx);
+        lysp_yang_ctx_free(yangctx);
     } else {
-        yin_parser_ctx_free(yinctx);
+        lysp_yin_ctx_free(yinctx);
     }
     return ret;
 }
@@ -1646,9 +1646,9 @@
 {
     struct lys_module *mod = NULL, *latest, *mod_dup = NULL;
     LY_ERR ret;
-    struct lys_yang_parser_ctx *yangctx = NULL;
-    struct lys_yin_parser_ctx *yinctx = NULL;
-    struct lys_parser_ctx *pctx = NULL;
+    struct lysp_yang_ctx *yangctx = NULL;
+    struct lysp_yin_ctx *yinctx = NULL;
+    struct lysp_ctx *pctx = NULL;
     struct lysf_ctx fctx = {.ctx = ctx};
     char *filename, *rev, *dot;
     size_t len;
@@ -1668,11 +1668,11 @@
     switch (format) {
     case LYS_IN_YIN:
         ret = yin_parse_module(&yinctx, in, mod);
-        pctx = (struct lys_parser_ctx *)yinctx;
+        pctx = (struct lysp_ctx *)yinctx;
         break;
     case LYS_IN_YANG:
         ret = yang_parse_module(&yangctx, in, mod);
-        pctx = (struct lys_parser_ctx *)yangctx;
+        pctx = (struct lysp_ctx *)yangctx;
         break;
     default:
         LOGERR(ctx, LY_EINVAL, "Invalid schema input format.");
@@ -1828,9 +1828,9 @@
     }
 
     if (format == LYS_IN_YANG) {
-        yang_parser_ctx_free(yangctx);
+        lysp_yang_ctx_free(yangctx);
     } else {
-        yin_parser_ctx_free(yinctx);
+        lysp_yin_ctx_free(yinctx);
     }
 
     if (!ret && module) {
diff --git a/src/tree_schema_common.c b/src/tree_schema_common.c
index fe7b741..427d404 100644
--- a/src/tree_schema_common.c
+++ b/src/tree_schema_common.c
@@ -41,7 +41,7 @@
 #include "tree_schema_internal.h"
 
 LY_ERR
-lysp_check_prefix(struct lys_parser_ctx *ctx, struct lysp_import *imports, const char *module_prefix, const char **value)
+lysp_check_prefix(struct lysp_ctx *ctx, struct lysp_import *imports, const char *module_prefix, const char **value)
 {
     struct lysp_import *i;
 
@@ -59,7 +59,7 @@
 }
 
 LY_ERR
-lysp_check_date(struct lys_parser_ctx *ctx, const char *date, size_t date_len, const char *stmt)
+lysp_check_date(struct lysp_ctx *ctx, const char *date, size_t date_len, const char *stmt)
 {
     struct tm tm, tm_;
     char *r;
@@ -126,7 +126,7 @@
 }
 
 LY_ERR
-lysp_check_enum_name(struct lys_parser_ctx *ctx, const char *name, size_t name_len)
+lysp_check_enum_name(struct lysp_ctx *ctx, const char *name, size_t name_len)
 {
     if (!name_len) {
         LOGVAL_PARSER(ctx, LYVE_SYNTAX_YANG, "Enum name must not be zero-length.");
@@ -352,7 +352,7 @@
  * @return LY_ERR, but LY_EEXIST is mapped to LY_EVALID.
  */
 static LY_ERR
-lysp_check_dup_ht_insert(struct lys_parser_ctx *ctx, struct hash_table *ht,
+lysp_check_dup_ht_insert(struct lysp_ctx *ctx, struct hash_table *ht,
         const char *name, const char *statement, const char *err_detail)
 {
     LY_ERR ret;
@@ -383,7 +383,7 @@
  * @return LY_EVALID in case of collision, LY_SUCCESS otherwise.
  */
 static LY_ERR
-lysp_check_dup_typedef(struct lys_parser_ctx *ctx, struct lysp_node *node, const struct lysp_tpdf *tpdf,
+lysp_check_dup_typedef(struct lysp_ctx *ctx, struct lysp_node *node, const struct lysp_tpdf *tpdf,
         struct hash_table *tpdfs_global)
 {
     struct lysp_node *parent;
@@ -463,7 +463,7 @@
 }
 
 LY_ERR
-lysp_check_dup_typedefs(struct lys_parser_ctx *ctx, struct lysp_module *mod)
+lysp_check_dup_typedefs(struct lysp_ctx *ctx, struct lysp_module *mod)
 {
     struct hash_table *ids_global;
     const struct lysp_tpdf *typedefs;
@@ -523,7 +523,7 @@
  * @return LY_EVALID in case of collision, LY_SUCCESS otherwise.
  */
 static LY_ERR
-lysp_check_dup_grouping(struct lys_parser_ctx *ctx, struct lysp_node *node, const struct lysp_node_grp *grp,
+lysp_check_dup_grouping(struct lysp_ctx *ctx, struct lysp_node *node, const struct lysp_node_grp *grp,
         struct hash_table *grps_global)
 {
     struct lysp_node *parent;
@@ -578,7 +578,7 @@
 }
 
 LY_ERR
-lysp_check_dup_groupings(struct lys_parser_ctx *ctx, struct lysp_module *mod)
+lysp_check_dup_groupings(struct lysp_ctx *ctx, struct lysp_module *mod)
 {
     struct hash_table *ids_global;
     const struct lysp_node_grp *groupings, *grp_iter;
@@ -619,7 +619,7 @@
 }
 
 LY_ERR
-lysp_check_dup_features(struct lys_parser_ctx *ctx, struct lysp_module *mod)
+lysp_check_dup_features(struct lysp_ctx *ctx, struct lysp_module *mod)
 {
     LY_ARRAY_COUNT_TYPE u;
     struct hash_table *ht;
@@ -651,7 +651,7 @@
 }
 
 LY_ERR
-lysp_check_dup_identities(struct lys_parser_ctx *ctx, struct lysp_module *mod)
+lysp_check_dup_identities(struct lysp_ctx *ctx, struct lysp_module *mod)
 {
     LY_ARRAY_COUNT_TYPE u;
     struct hash_table *ht;
@@ -782,7 +782,7 @@
  * @return LY_ERR on error.
  */
 static LY_ERR
-lys_parse_localfile(struct ly_ctx *ctx, const char *name, const char *revision, struct lys_parser_ctx *main_ctx,
+lys_parse_localfile(struct ly_ctx *ctx, const char *name, const char *revision, struct lysp_ctx *main_ctx,
         const char *main_name, ly_bool required, struct ly_set *new_mods, void **result)
 {
     struct ly_in *in;
@@ -1017,7 +1017,7 @@
 }
 
 LY_ERR
-lysp_check_stringchar(struct lys_parser_ctx *ctx, uint32_t c)
+lysp_check_stringchar(struct lysp_ctx *ctx, uint32_t c)
 {
     if (!is_yangutf8char(c)) {
         LOGVAL_PARSER(ctx, LY_VCODE_INCHAR, c);
@@ -1027,7 +1027,7 @@
 }
 
 LY_ERR
-lysp_check_identifierchar(struct lys_parser_ctx *ctx, uint32_t c, ly_bool first, uint8_t *prefix)
+lysp_check_identifierchar(struct lysp_ctx *ctx, uint32_t c, ly_bool first, uint8_t *prefix)
 {
     if (first || (prefix && ((*prefix) == 1))) {
         if (!is_yangidentstartchar(c)) {
@@ -1072,7 +1072,7 @@
  * @return LY_EVALID - YANG rule violation
  */
 static LY_ERR
-lysp_main_pmod_get_submodule(struct lys_parser_ctx *pctx, struct lysp_include *inc)
+lysp_main_pmod_get_submodule(struct lysp_ctx *pctx, struct lysp_include *inc)
 {
     LY_ARRAY_COUNT_TYPE i;
     struct lysp_module *main_pmod = PARSER_CUR_PMOD(pctx)->mod->parsed;
@@ -1115,7 +1115,7 @@
  * @return LY_EVALID - YANG rule violation
  */
 static LY_ERR
-lysp_parsed_mods_get_submodule(struct lys_parser_ctx *pctx, struct lysp_include *inc)
+lysp_parsed_mods_get_submodule(struct lysp_ctx *pctx, struct lysp_include *inc)
 {
     uint32_t i;
     struct lysp_submodule *submod;
@@ -1156,7 +1156,7 @@
  * @return LY_ERR value.
  */
 static LY_ERR
-lysp_inject_submodule(struct lys_parser_ctx *pctx, struct lysp_include *inc)
+lysp_inject_submodule(struct lysp_ctx *pctx, struct lysp_include *inc)
 {
     LY_ARRAY_COUNT_TYPE i;
     struct lysp_include *inc_new, *inc_tofill = NULL;
@@ -1188,7 +1188,7 @@
 }
 
 LY_ERR
-lysp_load_submodules(struct lys_parser_ctx *pctx, struct lysp_module *pmod, struct ly_set *new_mods)
+lysp_load_submodules(struct lysp_ctx *pctx, struct lysp_module *pmod, struct ly_set *new_mods)
 {
     LY_ARRAY_COUNT_TYPE u;
     struct ly_ctx *ctx = PARSER_CTX(pctx);
diff --git a/src/tree_schema_free.c b/src/tree_schema_free.c
index 77f9751..d35d8a4 100644
--- a/src/tree_schema_free.c
+++ b/src/tree_schema_free.c
@@ -1488,10 +1488,10 @@
 }
 
 void
-yang_parser_ctx_free(struct lys_yang_parser_ctx *ctx)
+lysp_yang_ctx_free(struct lysp_yang_ctx *ctx)
 {
     if (ctx) {
-        if (ctx->main_ctx == (struct lys_parser_ctx *)ctx) {
+        if (ctx->main_ctx == (struct lysp_ctx *)ctx) {
             ly_set_erase(&ctx->tpdfs_nodes, NULL);
             ly_set_erase(&ctx->grps_nodes, NULL);
         }
@@ -1506,10 +1506,10 @@
 }
 
 void
-yin_parser_ctx_free(struct lys_yin_parser_ctx *ctx)
+lysp_yin_ctx_free(struct lysp_yin_ctx *ctx)
 {
     if (ctx) {
-        if (ctx->main_ctx == (struct lys_parser_ctx *)ctx) {
+        if (ctx->main_ctx == (struct lysp_ctx *)ctx) {
             ly_set_erase(&ctx->tpdfs_nodes, NULL);
             ly_set_erase(&ctx->grps_nodes, NULL);
         }
diff --git a/src/tree_schema_free.h b/src/tree_schema_free.h
index ba5167f..778190b 100644
--- a/src/tree_schema_free.h
+++ b/src/tree_schema_free.h
@@ -18,8 +18,8 @@
 #include "set.h"
 #include "tree_schema.h"
 
-struct lys_yang_parser_ctx;
-struct lys_yin_parser_ctx;
+struct lysp_yang_ctx;
+struct lysp_yin_ctx;
 
 struct lysf_ctx {
     struct ly_ctx *ctx;
@@ -209,13 +209,13 @@
  *
  * @param[in] ctx Context to free.
  */
-void yang_parser_ctx_free(struct lys_yang_parser_ctx *ctx);
+void lysp_yang_ctx_free(struct lysp_yang_ctx *ctx);
 
 /**
  * @brief Free yin parser context
  *
  * @param[in] ctx Context to free.
  */
-void yin_parser_ctx_free(struct lys_yin_parser_ctx *ctx);
+void lysp_yin_ctx_free(struct lysp_yin_ctx *ctx);
 
 #endif /* LY_TREE_SCHEMA_FREE_H_ */
diff --git a/src/tree_schema_internal.h b/src/tree_schema_internal.h
index e16f815..a72ae74 100644
--- a/src/tree_schema_internal.h
+++ b/src/tree_schema_internal.h
@@ -143,15 +143,15 @@
 #define PARSER_CTX(CTX) (PARSER_CUR_PMOD(CTX)->mod->ctx)
 #define LOGVAL_PARSER(CTX, ...) LOGVAL((CTX) ? PARSER_CTX(CTX) : NULL, __VA_ARGS__)
 
-struct lys_parser_ctx {
+struct lysp_ctx {
     LYS_INFORMAT format;             /**< parser format */
     struct ly_set tpdfs_nodes;       /**< Set of nodes that contain typedef(s). Invalid in case of
-                                          submodule, use ::lys_parser_ctx.main_ctx instead. */
+                                          submodule, use ::lysp_ctx.main_ctx instead. */
     struct ly_set grps_nodes;        /**< Set of nodes that contain grouping(s). Invalid in case of
-                                          submodule, use ::lys_parser_ctx.main_ctx instead. */
+                                          submodule, use ::lysp_ctx.main_ctx instead. */
     struct ly_set ext_inst;          /**< parsed extension instances to finish parsing */
     struct ly_set *parsed_mods;      /**< (sub)modules being parsed, the last one is the current */
-    struct lys_parser_ctx *main_ctx; /**< This pointer must not be NULL. If this context deals with the submodule,
+    struct lysp_ctx *main_ctx;       /**< This pointer must not be NULL. If this context deals with the submodule,
                                           then should be set to the context of the module to which it belongs,
                                           otherwise it points to the beginning of this structure. */
 };
@@ -159,15 +159,15 @@
 /**
  * @brief Internal context for yang schema parser.
  */
-struct lys_yang_parser_ctx {
+struct lysp_yang_ctx {
     LYS_INFORMAT format;             /**< parser format */
     struct ly_set tpdfs_nodes;       /**< Set of nodes that contain typedef(s). Invalid in case of
-                                          submodule, use ::lys_parser_ctx.main_ctx instead. */
+                                          submodule, use ::lysp_ctx.main_ctx instead. */
     struct ly_set grps_nodes;        /**< Set of nodes that contain grouping(s). Invalid in case of
-                                          submodule, use ::lys_parser_ctx.main_ctx instead. */
+                                          submodule, use ::lysp_ctx.main_ctx instead. */
     struct ly_set ext_inst;          /**< parsed extension instances to finish parsing */
     struct ly_set *parsed_mods;      /**< (sub)modules being parsed, the last one is the current */
-    struct lys_parser_ctx *main_ctx; /**< This pointer must not be NULL. If this context deals with the submodule,
+    struct lysp_ctx *main_ctx;       /**< This pointer must not be NULL. If this context deals with the submodule,
                                           then should be set to the context of the module to which it belongs,
                                           otherwise it points to the beginning of this structure. */
     struct ly_in *in;                /**< input handler for the parser */
@@ -178,15 +178,15 @@
 /**
  * @brief Internal context for yin schema parser.
  */
-struct lys_yin_parser_ctx {
+struct lysp_yin_ctx {
     LYS_INFORMAT format;             /**< parser format */
     struct ly_set tpdfs_nodes;       /**< Set of nodes that contain typedef(s). Invalid in case of
-                                          submodule, use ::lys_parser_ctx.main_ctx instead. */
+                                          submodule, use ::lysp_ctx.main_ctx instead. */
     struct ly_set grps_nodes;        /**< Set of nodes that contain grouping(s). Invalid in case of
-                                          submodule, use ::lys_parser_ctx.main_ctx instead. */
+                                          submodule, use ::lysp_ctx.main_ctx instead. */
     struct ly_set ext_inst;          /**< parsed extension instances to finish parsing */
     struct ly_set *parsed_mods;      /**< (sub)modules being parsed, the last one is the current */
-    struct lys_parser_ctx *main_ctx; /**< This pointer must not be NULL. If this context deals with the submodule,
+    struct lysp_ctx *main_ctx;       /**< This pointer must not be NULL. If this context deals with the submodule,
                                           then should be set to the context of the module to which it belongs,
                                           otherwise it points to the beginning of this structure. */
     struct lyxml_ctx *xmlctx;        /**< context for xml parser */
@@ -199,7 +199,7 @@
  * @param[in] c UTF8 code point of a character to check.
  * @return LY_ERR values.
  */
-LY_ERR lysp_check_stringchar(struct lys_parser_ctx *ctx, uint32_t c);
+LY_ERR lysp_check_stringchar(struct lysp_ctx *ctx, uint32_t c);
 
 /**
  * @brief Check that \p c is valid UTF8 code point for YANG identifier.
@@ -215,7 +215,7 @@
  * If the identifier cannot be prefixed, NULL is expected.
  * @return LY_ERR values.
  */
-LY_ERR lysp_check_identifierchar(struct lys_parser_ctx *ctx, uint32_t c, ly_bool first, uint8_t *prefix);
+LY_ERR lysp_check_identifierchar(struct lysp_ctx *ctx, uint32_t c, ly_bool first, uint8_t *prefix);
 
 /**
  * @brief Check the currently present prefixes in the module for collision with the new one.
@@ -226,7 +226,7 @@
  * @param[in] value Newly added prefix value (including its location to distinguish collision with itself).
  * @return LY_EEXIST when prefix is already used in the module, LY_SUCCESS otherwise
  */
-LY_ERR lysp_check_prefix(struct lys_parser_ctx *ctx, struct lysp_import *imports, const char *module_prefix, const char **value);
+LY_ERR lysp_check_prefix(struct lysp_ctx *ctx, struct lysp_import *imports, const char *module_prefix, const char **value);
 
 /**
  * @brief Check date string (4DIGIT "-" 2DIGIT "-" 2DIGIT)
@@ -237,7 +237,7 @@
  * @param[in] stmt Statement name for error message.
  * @return LY_ERR value.
  */
-LY_ERR lysp_check_date(struct lys_parser_ctx *ctx, const char *date, size_t date_len, const char *stmt);
+LY_ERR lysp_check_date(struct lysp_ctx *ctx, const char *date, size_t date_len, const char *stmt);
 
 /**
  * @brief Find type specified type definition.
@@ -261,7 +261,7 @@
  * @param[in] mod Module where the type is being defined.
  * @return LY_ERR value.
  */
-LY_ERR lysp_check_dup_typedefs(struct lys_parser_ctx *ctx, struct lysp_module *mod);
+LY_ERR lysp_check_dup_typedefs(struct lysp_ctx *ctx, struct lysp_module *mod);
 
 /**
  * @brief Check names of groupings in the parsed module to detect collisions.
@@ -270,7 +270,7 @@
  * @param[in] mod Module where the type is being defined.
  * @return LY_ERR value.
  */
-LY_ERR lysp_check_dup_groupings(struct lys_parser_ctx *ctx, struct lysp_module *mod);
+LY_ERR lysp_check_dup_groupings(struct lysp_ctx *ctx, struct lysp_module *mod);
 
 /**
  * @brief Check names of features in the parsed module and submodules to detect collisions.
@@ -279,7 +279,7 @@
  * @param[in] mod Module where the type is being defined.
  * @return LY_ERR value.
  */
-LY_ERR lysp_check_dup_features(struct lys_parser_ctx *ctx, struct lysp_module *mod);
+LY_ERR lysp_check_dup_features(struct lysp_ctx *ctx, struct lysp_module *mod);
 
 /**
  * @brief Check names of identities in the parsed module and submodules to detect collisions.
@@ -288,7 +288,7 @@
  * @param[in] mod Module where the type is being defined.
  * @return LY_ERR value.
  */
-LY_ERR lysp_check_dup_identities(struct lys_parser_ctx *ctx, struct lysp_module *mod);
+LY_ERR lysp_check_dup_identities(struct lysp_ctx *ctx, struct lysp_module *mod);
 
 /**
  * @brief Just move the newest revision into the first position, does not sort the rest
@@ -305,7 +305,7 @@
  *
  * @return LY_ERR values
  */
-LY_ERR lysp_check_enum_name(struct lys_parser_ctx *ctx, const char *name, size_t name_len);
+LY_ERR lysp_check_enum_name(struct lysp_ctx *ctx, const char *name, size_t name_len);
 
 /**
  * @brief Find source data for a specific module, parse it, and add into the context.
@@ -332,7 +332,7 @@
  * @param[in,out] new_mods Set of all the new mods added to the context. Includes this module and all of its imports.
  * @return LY_ERR value.
  */
-LY_ERR lysp_load_submodules(struct lys_parser_ctx *pctx, struct lysp_module *pmod, struct ly_set *new_mods);
+LY_ERR lysp_load_submodules(struct lysp_ctx *pctx, struct lysp_module *pmod, struct ly_set *new_mods);
 
 /**
  * @brief Get address of a node's actions list if any.
@@ -578,7 +578,7 @@
  * @param[out] submodule Parsed submodule.
  * @return LY_ERR value.
  */
-LY_ERR lys_parse_submodule(struct ly_ctx *ctx, struct ly_in *in, LYS_INFORMAT format, struct lys_parser_ctx *main_ctx,
+LY_ERR lys_parse_submodule(struct ly_ctx *ctx, struct ly_in *in, LYS_INFORMAT format, struct lysp_ctx *main_ctx,
         lys_custom_check custom_check, void *check_data, struct ly_set *new_mods, struct lysp_submodule **submodule);
 
 /**
