commit | 4618fa48500fe3c88b294fa8a5786de44f7f241e | [log] [tgz] |
---|---|---|
author | Václav Kubernát <kubernat@cesnet.cz> | Thu May 07 01:33:19 2020 +0200 |
committer | Václav Kubernát <kubernat@cesnet.cz> | Thu May 14 11:35:49 2020 +0200 |
tree | 3551ac1e2b03172d3b3c846f216a6145489d2fd5 | |
parent | dd5945a16826c4e80f35f7538d10c215d3ef5b20 [diff] |
Rework path parsing Right now, there are two types of path parsing I want to do: either I want parse a data path (which could possibly be one ending with a list with no keys; this patch doesn't handle that), or, I want to parse any path. All of the commands that can take a schema path can also take any other type of path because a data path is just a "subset" of a schema path. So, I changed the schema path parser to an "any path" parser. This any path parser can then work more efficiently than a "dataPath | schemaPath" parser: it will try to parse a data path and on the first non-data node it will switch and continue parsing schema nodes. This has the advantage that I don't have to do workarounds for completion. Before this, if the parser tried to backtrack to the schema path it would always have to clear ParserContext path and completions and do everything again, and that would mean trouble, because I didn't really have much control about where exactly the completions get created. Example: the data path parser would create the completions I wanted, but then fail. The parser would then backtrack to schema path, but it wouldn't parse as much of the input as the other one and that would create different completions. There is a small caveat: I do have create my own local variables for dataPath and schemaPath. Before this I never did have to create a `dataPath_` or a `schemaPath_` instance. However, I think that the control that I get over how nodes are parsed (and over the resulting attribute of the parser) outweighs that. Also, there was another attempt on this, which just used Spirit backtracking. As was said before, more control over this backtracking is better. Also, not having Spirit backtracking will hopefully allow me to transition to new Boost version more easily. Change-Id: I3c8a1ac2ddad83a3da6c654557b36634596a5e8d
This program provides an interactive console for working with YANG data. It can connect to NETCONF servers, and also talk to sysrepo locally.
For building, one needs:
Use an exact commit of any dependencies as specified in submodules/dependencies/*
.
The build process uses CMake. A quick-and-dirty build with no fancy options can be as simple as mkdir build && cd build && cmake .. && make && make install
.
Issue reporting and feature requests are welcome via Taiga.io.
We are using Gerrit for patch submission, code review and Continuous Integration (CI). Development roadmap and planning happens over Taiga.io.
Copyright © CESNET, https://www.cesnet.cz/ . Portions copyright © Faculty of Information Technology, Czech Technical University in Prague, https://fit.cvut.cz/ . Most of the code was written by Václav Kubernát (CESNET, formerly FIT ČVUT) and Jan Kundrát (CESNET). The project is distributed under the terms of the Apache 2.0 license.