[YANGTOOLS-353] When revision statement enclose a custom statement, Yang Parser fails to parse correctly Created: 31/Oct/14  Updated: 10/Apr/22  Resolved: 01/Dec/14

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Loi Pan Assignee: Loi Pan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 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; }

}



 Comments   
Comment by Loi Pan [ 01/Nov/14 ]

I have submitted a patch for this bug:
https://git.opendaylight.org/gerrit/#/c/12432/

Generated at Wed Feb 07 20:52:58 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.