Open Mingun opened 4 years ago
That absolute positions must be stored in the debug maps (_attrStart, _attrEnd, _arrStart, _arrEnd). Without that it is impossible or too hard to determine correct position of parsed objects, especially of instances objects.
_attrStart
_attrEnd
_arrStart
_arrEnd
instances
For example, consider following KSY:
meta: id: offsets seq: - id: padding type: u1 - id: unsized type: type - id: sized type: type size: 10 types: type: seq: - id: padding type: u1 - id: unsized_simple type: u1 - id: sized_simple size: 1 - id: unsized_array type: elem repeat: expr repeat-expr: 2 - id: sized_array type: elem size: 3 repeat: expr repeat-expr: 1 elem: seq: - id: padding type: u1 - id: value type: u1
The following problem is currently being observed: This show correct location That location is wrong, must be inside previous region:
The example input works correctly in the web IDE:
I hope this can get fixed in the Java implementation
That absolute positions must be stored in the debug maps (
_attrStart
,_attrEnd
,_arrStart
,_arrEnd
). Without that it is impossible or too hard to determine correct position of parsed objects, especially ofinstances
objects.For example, consider following KSY:
The following problem is currently being observed: This show correct location
That location is wrong, must be inside previous region:
![Content](https://user-images.githubusercontent.com/450131/74091173-93b83080-4ad6-11ea-88f0-9cac89bd80d5.png)