Page MenuHomeVyOS Platform

libvyosconfig does not allow comments after node
Closed, WontfixPublicBUG


libvyosconfig fails to parse comments that are not before a node.


system {
    host-name vyos
    /* This causes "Parse error" */

Calling from_string() with this example returns a null pointer. Then get_error() returns "Parse error".

I downloaded from

Purposed solution:
Just like multiple comments before a node, these kind of comments can be ignored.


Difficulty level
Easy (less than an hour)
Why the issue appeared?
Will be filled on close

Event Timeline

There are things that should be simply incorrect grammar, and this is one of them, as of me.

Are there any real-life situations when this can appear in the output of any VyOS scripts?

If you simply want to be able to include "normal" comments supposed to be ignored by the parser, that's a good idea, but they should not use the same syntax. I think it should be possible to extend the parser used by the loader to do that, for example, use "// ..." for non-significant comments.

dmbaturin claimed this task.

The use case for it will be addressed by the future support for true (ignored by the parser) comments.