chip@tct.uucp (Chip Salzenberg) (09/19/90)
Archive-name: spiff/06-Sep-90 Original-posting-by: chip@tct.uucp (Chip Salzenberg) Original-subject: Re: A *real* difference Archive-site: wuarchive.wustl.edu [128.252.135.4] Archive-directory: /usenet/comp.sources.unix/volume16/spiff Reposted-by: emv@math.lsa.umich.edu (Edward Vielmetti) A token-based diff is in the c.s.u archives: "spiff". -- Chip Salzenberg at Teltronics/TCT <chip@tct.uucp>, <uunet!pdn!tct!chip> [I looked this one up, here's a full citation from comp.sources.unix, edited slightly. --Ed] Submitted-by: Daniel W Nachbar <daniel@wind.bellcore.com> Posting-number: Volume 16, Issue 67 Archive-name: spiff/part01 [ This is the program Dan presented at his \fIexcellent\fP talk at SF Usenix. For those who weren't there, yes, Spiff is named after the comic strip character in Calvin and Hobbes.... --r$ ] The well known program diff is inappropriate for some common tasks such as comparing the output of floating point calculations where roundoff errors lead diff astray and comparing program source code where some differences in the text (such as white space and comments) have no effect on the operation of the compiled code. A new program, named spiff, addresses these and other similar cases by lexical parsing of the input files and then applying a differencing algorithm to the token sequences. Spiff ignores differences between floating point numbers that are below a user settable tolerance. Other features include user settable commenting and literal string conventions and a choice of differencing algorithm. There is also an interactive mode wherein the input texts are displayed with differences highlighted. The user can change numeric tolerances "on the fly" and spiff will adjust the highlighting accordingly.