File: troff.jsf

package info (click to toggle)
ne 3.3.3-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,192 kB
  • sloc: ansic: 28,739; perl: 571; makefile: 265; sh: 9
file content (82 lines) | stat: -rw-r--r-- 982 bytes parent folder | download | duplicates (19)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Syntax file for Troff

=Idle
=Comment	green
=Escape		magenta
=Command	bold
=Bad		red

# First character of line

:first Idle
	*		rest		noeat
	".'"		command_1

:rest Idle
	*		rest
	"\n"		first
	"\\"		escape		recolor=-1

:command_1 Command
	*		rest		noeat
	" 	"	command_1
	"a-zA-Z_"	command_2

:command_2 Command
	*		rest
	"a-zA-Z0-9_"	command_done	recolor=-1

:command_done Command
	*		rest		noeat

:escape Escape
	*		bad		recolor=-2
	"-\\e'`. 0|^&!%acdprtu{}"	rest
	"*fgn"			name
	"k"			reg
	"z"			reg
	"("			name2
	"$s"			num
	"bCDhHlLNoSvwxX"	str
	"\n"		first
	"\""		comment		recolor=-2

# A name: ( means two characters

:name Escape
	*		rest
	"("		name2

# Two character name

:name2 Escape
	*		reg

# One character name

:reg Escape
	*		rest

# String

:str Escape
	*		bad	recolor=-1
	"'"		str_body

:str_body Escape
	*		str_body
	"\n"		first
	"'"		rest

# Number

:num Escape
	*		rest	noeat
	"-+0-9"		num

:comment Comment
	*		comment
	"\n"		first

:bad Bad
	*		rest		noeat