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

When revision statement enclose a custom statement, Yang Parser fails to parse correctly

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 2291

    Description

      IETF allows custom statement enclosed in the revision statement, as the following YANG ABNF Grammar:

      revision-stmt = revision-keyword sep date-expr-str optsep
      (";" /
      "

      {" stmtsep [description-stmt stmtsep] "}

      ")

      stmtsep = *(WSP / line-break / unknown-statement)

      unknown-statement = prefix ":" identifier [sep string] optsep
      (";" / "

      {" *unknown-statement "}

      ")

      However, Yang Parser fails to parse the following:

      module "bug-ext" {
      yang-version 1;
      namespace "urn:test:bug:bug-ext";
      prefix "bug-ext";

      revision 2012-04-16 {
      }

      extension migration

      { argument level; }

      }

      module bug {
      yang-version 1;
      namespace "urn:test:bug:bug";
      prefix "bug";

      import bug-ext

      { prefix bug-ext; }

      import ietf-inet-types

      { prefix "inet"; }

      revision 2012-04-16

      { description "Initial revision"; bug-ext:migration 1; }

      leaf test

      { type string; }

      }

      Attachments

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

        Activity

          People

            mr.loipan@gmail.com Loi Pan
            mr.loipan@gmail.com Loi Pan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: