You are looking at historical revision 23095 of this page. It may differ significantly from its current revision.
Introduction
Diffs s-expressions based on Levenshtein-like edit distance.
Documentation
DIFF-SEXP computes a diff between two s-expressions which minimizes the number of atoms in the result tree, also counting edit conditionals #:new, #:old.
Examples
(sexp-diff '(DEFUN F (X) (+ (* X 2) 1)) '(DEFUN F (X) (- (* X 2) 3 1))) ==> ((DEFUN F (X) (#:new - #:old + (* X 2) #:new 3 1))) (sexp-diff '(DEFUN F (X) (+ (* X 2) 4 1)) '(DEFUN F (X) (- (* X 2) 5 3 1))) ==> ((DEFUN F (X) (#:new - #:old + (* X 2) #:new 5 #:new 3 #:old 4 1))) (sexp-diff '(DEFUN F (X) (+ (* X 2) 4 4 1)) '(DEFUN F (X) (- (* X 2) 5 5 3 1))) ==> ((DEFUN F (X) (#:new - #:old + (* X 2) #:new 5 #:new 5 #:new 3 #:old 4 #:old 4 1)))
Authors
Michael Weber, ported to racket by Vincent St-Amour, ported to CHICKEN by felix winkelmann.
License
LGPL
History
- 0.1 Initial import