summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2019-01-26 01:27:42 +0100
committerDaniil Baturin <daniil@baturin.org>2019-01-26 01:27:42 +0100
commit1dd05b330f3adfe828ba3ca4c71db2e12b8968f6 (patch)
tree86cf04a15c50d2e99105a660f99e862d7ea0c299
parente75e4ae638c49e512a3013d1806e59a67978c5f9 (diff)
downloadlibvyosconfig-1dd05b330f3adfe828ba3ca4c71db2e12b8968f6.tar.gz
libvyosconfig-1dd05b330f3adfe828ba3ca4c71db2e12b8968f6.zip
T1193: allow top level leaf and tag nodes.v0.0.5
The original config backend allows them, and it's needed ofr correct operation of the commands pipe at edit levels other than the top level.
-rw-r--r--parser/vyos1x_parser.mly3
1 files changed, 2 insertions, 1 deletions
diff --git a/parser/vyos1x_parser.mly b/parser/vyos1x_parser.mly
index 80ed4df..17f4909 100644
--- a/parser/vyos1x_parser.mly
+++ b/parser/vyos1x_parser.mly
@@ -95,8 +95,9 @@ tag_node:
node_content: n = node { n } | n = leaf_node { n } | n = tag_node { n };
+
%public config:
- | ns = list(node); EOF
+ | ns = list(node_content); EOF
{
let root = make "root" in
let root = List.fold_left Vytree.adopt root (List.rev ns) |> Vytree.merge_children merge_data in