summaryrefslogtreecommitdiffstats
path: root/regress/roff/esc/B.in
blob: 2cb11403698a7324be2a4db9fdc14cb6a80bf57a (plain) (blame)
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
.\" $OpenBSD: B.in,v 1.4 2022/06/08 13:08:00 schwarze Exp $
.Dd $Mdocdate$
.Dt ESC-B 1
.Os
.Sh NAME
.Nm esc-B
.Nd the roff escape B sequence: validate numerical expression
.Sh DESCRIPTION
empty: \B''
.br
digit: \B'0'
.br
no number: \B'no number'
.br
trailing garbage: \B'1X'
.br
trailing operator: \B'1+'
.br
infix operator: \B'1+1'
.br
infix and trailing operator: \B'1+1+'
.br
chain of operations: \B'1+2+3+4'
.br
trailing para: \B'1+('
.br
unclosed para: \B'(1'
.br
empty pair of parentheses: \B'()'
.br
parentheses containing number: \B'(42)'
.br
complex expression: \B'3+(3*(5==5*2)*4)+(3*5)/2'
.br
other delimiter: \Bx1+1x
.Ss Argument delimiters
unsupported \e!: \B\!42\!u
.br
unsupported \er: \B\r42u
.br
ignored \e%: \B\%42\%u
.br
ignored \e&: \B\&42\&u
.br
ignored \e): \B\)42\)u
.br
ignored \e,: \B\,42\,u
.br
ignored \e/: \B\/42\/u
.br
ignored \e^: \B\^42\^u
.br
ignored \ea: \B\a42\au
.br
ignored \ed: \B\d42\du
.br
ignored \et: \B\t42\tu
.br
ignored \eu: \B\u42\uu
.br
ignored \e{: \B\{42\{u
.br
ignored \e|: \B\|42\|u
.br
ignored \e}: \B\}42\}u
.br
useless \e.: \B\.42.u
.\".br
.\"XXX useless \e\e: \B\\42\\u
.br
invalid \eG: \B\G42Gu
.br
special \e\ : \B\ 42\ u
.br
special \e\(aq: \B\'42\'u
.br
special \e-: \B\-42\-u
.br
special \e0: \B\042\0u
.br
special \e:: \B\:42\:u
.br
special \e_: \B\_42\_u
.br
special \e\(ga: \B\`42\`u
.br
special \ee: \B\e42\eu
.br
special \e~: \B\~42\~u
.br
break \ep: \B\p42\pu
.br
nospace \ec: \B\c42\cu
.\".br
.\"XXX skipchar \ec: \B\z42\zu
.br
.ds mystr x42xu
string expansion: \B\*[mystr]
.br
.nr myreg 23
register expansion: \B\n[myreg]u
.br
ignored \eO: \B\O142\O2u
.br
ignored \eY: \B\Y[mystr]42\Y[mystr]u
.br
ignored \ek: \B\k[myreg]42\k[myreg]u
.br
special character: \B\(hy42\(hyu
.br
ignored \eD: \B\D't 1'42\D't 2'u
.br
ignored \eL: \B\L'2'42u
.br
ignored \eX: \B\X'foo'42\X'bar'u
.br
ignored \eZ: \B\Z'foo'42\Z''u
.br
ignored \eb: \B\b'2'42\b''u
.br
ignored \ev: \B\v'2'42\v'0'u
.br
ignored \ex: \B\x'2'42\v'0'u
.br
horizontal motion: \B\h'1'42\h'3'u
.br
horizontal line: \B\l'4'42\l'2'u
.br
overstrike: \B\o'ab'42\o'cd'u