A little more progress on my syntactic differ: now it only shows lines of things that have changed!
Here's a Scheme example. Note that line 16 on the right has moved, but it's actually unchanged. Difftastic understands this :)
A little more progress on my syntactic differ: now it only shows lines of things that have changed!
Here's a Scheme example. Note that line 16 on the right has moved, but it's actually unchanged. Difftastic understands this :)
How it works, roughly:
The parsing is inspired by Comby: everything is an atom or a list.
Tree diffing applies LCS diff at each level, then looks for subtrees that have moved.
Finally there's tons of futzing with line positions to print something comprehensible.
The test file is from https://fosdem.org/2021/schedule/event/sexpressiondiff/, which is a project exploring a pure-lisp solution to this problem.
tiflolinux.org - GNU Social is a social network, courtesy of tiflolinux.org. It runs on GNU social, version 2.0.1-beta0, available under the GNU Affero General Public License.
All tiflolinux.org - GNU Social content and data are available under the Creative Commons Attribution 3.0 license.