[YANGTOOLS-491] Yang parser not able to deal with short-case-stmt in augment/uses-augment Created: 25/Aug/15  Updated: 10/Apr/22  Resolved: 06/Nov/15

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

Type: Bug
Reporter: Martin Ciglan Assignee: Martin Ciglan
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: 4183

 Description   

Issue: module stated below causes NullPointerException in code generator.

Solution: short-case-stmt should be expanded during parsing to full case-stmt to avoid it.

module uses-augment-test {

yang-version 1;
prefix "uat";
namespace "urn:uat";

grouping grp1 {
uses grp2 {
augment mychoice {
//here it comes...
leaf myleaf1

{ type string; }

}
}
}

grouping grp2 {
choice mychoice {
leaf myleaf2

{ type string; }


}
}

container cont {
uses grp1;
leaf myleaf3

{ type string; }

}

}



 Comments   
Comment by Martin Ciglan [ 28/Aug/15 ]

just to be precise, with actual ANTLR grammar, statement in augment or uses-augment is recognized as data-def-stmt, not short-case-stmt

Comment by Martin Ciglan [ 18/Sep/15 ]

fix pushed:

https://git.opendaylight.org/gerrit/#/c/27143/

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