libyang icon indicating copy to clipboard operation
libyang copied to clipboard

Parsing a comment between double quoted strings not working

Open rekib66 opened this issue 1 year ago • 1 comments

Hello,

I try to parse a yang file which contains comments between double quoted strings and the "+" operator. The module test-concat shows such a scenario. According the RFC 7950 Section 6.1.3 this should work.

module test-concat {
    namespace "http://www.company.com/schema/tests";
    prefix "test-concat";
    organization
        "Company" + // comment
        " Inc.";
    contact
        "Address" + /* comment */ " Person";
    description
        "Description";
    revision "2024-05-18" {
        description "Created";
    }
}

The problem is the same for libyang-2.1.111 / libnetconf2-2.1.37 or libyang-2.2.8 / libnetconf2-3.0.17.

rekib66 avatar May 21 '24 11:05 rekib66

Fair enough, support added and such modules should be successfully parsed now (but the comments are not stored).

michalvasko avatar May 21 '24 13:05 michalvasko