From 3108dfca1ed312f744a3fdc7b221a00d4541e16b Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Sat, 21 Sep 2024 11:04:03 +0200 Subject: [PATCH] Fixed: [Clixon fails to load yang with extension](https://github.com/clicon/clixon/issues/554) --- CHANGELOG.md | 1 + lib/src/clixon_yang_parse.y | 1 + test/test_yang_extension.sh | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce0fc239..c7e7537b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,7 @@ Developers may need to change their code ### Corrected Busg +* Fixed: [Clixon fails to load yang with extension](https://github.com/clicon/clixon/issues/554) * Fixed: Double top-levels in xmldb_get that could occur with xpath containing choice. * Fixed: [RESTCONF exit on cert error + complex accept](https://github.com/clicon/clixon/issues/551) * Fixed: [Deletion of leaf in YANG choice removes leaf in a different choice/case](https://github.com/clicon/clixon/issues/542) diff --git a/lib/src/clixon_yang_parse.y b/lib/src/clixon_yang_parse.y index 931fec07..6f9ee608 100644 --- a/lib/src/clixon_yang_parse.y +++ b/lib/src/clixon_yang_parse.y @@ -624,6 +624,7 @@ argument_substmts : argument_substmts argument_substmt argument_substmt : yin_element_stmt1 { _PARSE_DEBUG("argument-substmt -> yin-element-stmt1");} | unknown_stmt { _PARSE_DEBUG("argument-substmt -> unknown-stmt");} + | ; diff --git a/test/test_yang_extension.sh b/test/test_yang_extension.sh index 2d09b6a8..2c780cb3 100755 --- a/test/test_yang_extension.sh +++ b/test/test_yang_extension.sh @@ -81,10 +81,12 @@ module $APPNAME{ ex:e4 arg1{ uses bar; } - extension posix-pattern { argument "pattern"; } + extension extra { + argument "pattern"{} /* See https://github.com/clicon/clixon/issues/554 */ + } typedef dotted-quad { description "Only present for complex parsing of unknown-stmt"; type string {