Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-893

YANG parser does not allow newline in unique statement

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Medium
    • Resolution: Done
    • 2.0.7
    • 2.1.0, 2.0.11, 2.0.6.2
    • parser
    • None

    Description

      See the attached model.   This model contains a unique statement with a newline:

      unique "listkey1
                   listkey2";

      This produces a parser error in 2.0.7 (it was working in 1.2.3):

      Caused by: org.opendaylight.yangtools.yang.parser.spi.source.SourceException: String 'listkey1
      listkey2' is not a valid identifier [at /home/verthezp/logs/unique/testmodule.yang:9:4]
      at org.opendaylight.yangtools.yang.parser.spi.source.SourceException.throwIf(SourceException.java:99)
      at org.opendaylight.yangtools.yang.parser.spi.meta.StmtContextUtils.checkIdentifierString(StmtContextUtils.java:570)
      at org.opendaylight.yangtools.yang.parser.spi.meta.StmtContextUtils.parseNodeIdentifier(StmtContextUtils.java:538)
      at org.opendaylight.yangtools.yang.parser.rfc7950.stmt.ArgumentUtils.nodeIdentifierFromPath(ArgumentUtils.java:132)
      ... 43 more

       

      According to what I see in the RFC this should be allowed: see the "unique-arg" and "sep" definitions in https://tools.ietf.org/html/rfc6020#section-12 .

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            rovarga Robert Varga
            verthezpw Peter Verthez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: