djspiewak / parseback

A Scala implementation of parsing with derivatives
http://parseback.io
Apache License 2.0
197 stars 22 forks source link

Reduce lines tracked by Apply #21

Closed djspiewak closed 7 years ago

djspiewak commented 7 years ago

At present, I'm pretty sure Apply will just track every line which comes through it, including those which are the same as prior lines only one column over. Line tracking should be reduced, both to save space and to make the results more useful to users. Reduction should be according to the following rules:

Thus, any given lineNo will appear at most once, with the first and last Line instances bounding the start/end columns for the fragment.