[YANGTOOLS-655] Error parsing enums with unknown substatements inside its values Created: 29/Aug/16 Updated: 10/Apr/22 Resolved: 05/Mar/17 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Patrick Thiago Bard | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Attachments: |
|
| External issue ID: | 6561 |
| Description |
|
Please consider the following YANG excerpt: grouping gigabit-eth-mdix { tailf:info "Configure MDIX mode"; type enumeration { enum xover { tailf:info "Set interface MDIX to X-Over mode"; }enum auto { tailf:info "Set interface MDIX to Automatic Detection mode"; } } When debugging what was being parsed, I encountered this problem: All "tailf" statements (which are considered Unknown Statements) were at at the Leaf level. Although each enum value have a property for unknown statements aswell, they are all empty as you can see in the attached file. I would expect that for this example, only tailf:info "Configure MDIX mode"; should be considered unknown statements of "leaf mdix". The rest, should be inside the collection of unkown statements of its repective enum value IMO. |
| Comments |
| Comment by Patrick Thiago Bard [ 29/Aug/16 ] |
|
Attachment yang-tools-debugging-unknown-statements.txt has been added with description: debugging unknown statements |
| Comment by Igor Foltin [ 31/Aug/16 ] |
|
Hello Patrick, I did some testing and this issue only appears in the old yang parser, which was removed in boron. |
| Comment by Patrick Thiago Bard [ 06/Sep/16 ] |
|
Strange, because in our project we are using the following maven dependency <dependency> |
| Comment by Igor Foltin [ 06/Sep/16 ] |
|
Well, the old yang parser is still there in the beryllium release, it was removed later in the boron release. So could you please try using the new one according to the instructions I posted here earlier. |
| Comment by Robert Varga [ 05/Mar/17 ] |
|
Old vs. new parser is a matter of instantiation, CrossSourceStatementReactor is the entrypoint to the new one. Since this affects desupported codebase with a replacement, closing as WONTFIX. |