[YANGTOOLS-397] Parser incorrectly allows usage of union in list Created: 07/Jan/15  Updated: 10/Apr/22  Resolved: 27/Jan/15

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

Type: Bug
Reporter: Tony Tkacik 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: 2561

 Description   

Symptomps:
The following yang syntax is accepted and generates a non-usable Java file.

list foo {
union {
type int32;
type enumeration

{ enum "test"; }

}
}

Supplied model is invalid and should be rejected by parser (union is not substatement of list).



 Comments   
Comment by Martin Ciglan [ 07/Jan/15 ]

New draft of ANTL4 grammar solves this issue by definition. Tested OK now.

Comment by Martin Ciglan [ 13/Jan/15 ]

Fix pushed:

https://git.opendaylight.org/gerrit/#/c/14129/2

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