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:
First Line will be the first line and column in the parse, excluding leading whitespace
Last Line will be the last line and column in the parse, unless the lineNo is the same as the lineNo of the first line, in which case it should be discarded
All lines with distinct lineNo values must be included at least once
Lines which have the same lineNo and a different colNo value from a line which is already included by some other rule should be discarded.
Lines should be ordered by lineNo
Thus, any given lineNo will appear at most once, with the first and last Line instances bounding the start/end columns for the fragment.
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:Line
will be the first line and column in the parse, excluding leading whitespaceLine
will be the last line and column in the parse, unless thelineNo
is the same as thelineNo
of the first line, in which case it should be discardedlineNo
values must be included at least oncelineNo
and a differentcolNo
value from a line which is already included by some other rule should be discarded.lineNo
Thus, any given
lineNo
will appear at most once, with the first and lastLine
instances bounding the start/end columns for the fragment.