[YANGTOOLS-377] Yang parser fails when extension is used between two revision statements Created: 19/Nov/14 Updated: 10/Apr/22 Resolved: 09/Feb/15 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Peter Kajsa | Assignee: | Peter Kajsa |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 2406 |
| Description |
|
RFC6020 ABNF grammar says: revision-stmts = *(revision-stmt stmtsep) stmtsep = *(WSP / line-break / unknown-statement) Our YANG.g4 grammar says: revision_stmts : (revision_stmt )* (stmtsep)*; stmtsep : IDENTIFIER string? (stmtend | (LEFT_BRACE unknown_statement* RIGHT_BRACE)); So, in our grammar unknown-statement can occur only after all revision statements, but in RFC grammar unknown-statement can occur also before or between two revision statements etc. For an example, parsing of following model fails: ... revision "2007-06-09" { description "Initial revision."; }my-prefix:my-extension 1; revision "2008-06-09" { description "Revision 2."; }} |
| Comments |
| Comment by Peter Kajsa [ 01/Dec/14 ] |