source: project/wiki/eggref/4/sexp-diff @ 25376

Last change on this file since 25376 was 25376, checked in by Mario Domenech Goulart, 9 years ago

sexp-diff (wiki): added main heading

File size: 974 bytes
Line 
1[[tags: egg]]
2[[toc:]]
3
4== sexp-diff
5
6=== Introduction
7
8Diffs s-expressions based on Levenshtein-like edit distance.
9
10
11=== Documentation
12
13DIFF-SEXP computes a diff between two s-expressions which minimizes
14the number of atoms in the result tree, also counting edit
15conditionals #:new, #:old.
16
17
18=== Examples
19
20
21  (sexp-diff
22   '(DEFUN F (X) (+ (* X 2) 1))
23   '(DEFUN F (X) (- (* X 2) 3 1)))
24 
25  ==>
26 
27  ((DEFUN F (X) (#:new - #:old + (* X 2) #:new 3 1)))
28
29  (sexp-diff
30   '(DEFUN F (X) (+ (* X 2) 4 1))
31   '(DEFUN F (X) (- (* X 2) 5 3 1)))
32 
33  ==>
34 
35  ((DEFUN F (X) (#:new - #:old + (* X 2) #:new 5 #:new 3 #:old 4 1)))
36
37  (sexp-diff
38   '(DEFUN F (X) (+ (* X 2) 4 4 1))
39   '(DEFUN F (X) (- (* X 2) 5 5 3 1)))
40 
41  ==>
42 
43  ((DEFUN F (X) (#:new - #:old + (* X 2) #:new 5 #:new 5 #:new 3 #:old 4 #:old 4 1)))
44
45
46
47=== Authors
48
49Michael Weber, ported to racket by Vincent St-Amour, ported to CHICKEN
50by felix winkelmann.
51
52
53=== License
54
55LGPL
56
57
58=== History
59
60* 0.1 Initial import
Note: See TracBrowser for help on using the repository browser.