[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:
Blocks
blocks YANGTOOLS-1128 Add a dedicated ANTLR token factory Resolved

 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.


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