File: diff

package info (click to toggle)
dte 1.10-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,152 kB
  • sloc: ansic: 28,421; sh: 94; awk: 56; makefile: 13; sed: 1
file content (46 lines) | stat: -rw-r--r-- 655 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
syntax diff

state headers header
    str 'diff ' header
    str 'index ' header
    str 'new ' header
    str -- '--- ' header
    str '+++ ' header
    str '@@ ' chunk
    char # comment
    noeat text

state header
    char "\n" headers
    eat this

state chunk
    char "\n" diff chunk
    eat this

state diff code
    char ' ' context
    char + added
    char -- - removed
    str '@@ ' chunk
    noeat headers

state context
    char "\n" diff
    eat this

state added
    char "\n" diff
    eat this

state removed
    char "\n" diff
    eat this

state comment
    char "\n" headers
    eat this

state text
    char "\n" headers
    eat this