[YANGTOOLS-1129] YANG parser is indicating wrong start of statement Created: 11/Aug/20 Updated: 26/Aug/20 Resolved: 11/Aug/20 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | parser |
| Affects Version/s: | None |
| Fix Version/s: | 4.0.14, 5.0.6, 3.0.17 |
| Type: | Bug | Priority: | Low |
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Our current parser grammar parses YANG files as if they are statements. This is true in general, but files can have leading and trailing whitespace, which is not part of the statement itself. We therefore have a bit of a mess in what constitutes a statement – i.e. we allow it to start with whitespace. This leads to source references to point to thee start of whitespace rather that to the start of the keyword for a particular statement. |