aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/rc/test.rc
blob: 4a33d87c1be5a1a1ac0a3400b626c5a25460b746 (plain)
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
# test for parser

a
a b
a|b
a | b
{a; b; c}
x=y a && b || c
x=y a | b | c
x=y for(i) a | b
>x for(i) a | b
>x a || b && c
a >x || b && c
a | for(i) b | c
fn x {y; z} | b && c
if (x) y
if not z
`{} >x >[1=2]y >[3=] z <w
~ x y && z
x | y && z
x | y || z
! x | y | z
@ x | y | z
x | ! y | z
x | @y | z
! x | if(y) z
@ x | if(y) z
x=1 y | if(z) w
a'b' c
a^'b'^ c
a^'b' c
$$x
$x($y)
$"x
$#x
$#$x
-$x-
`{a;b;c}
<{a;b}
x for in while if not ~ ! @ switch fn
x not$y
a;b;c
if(x)
y
if(x)
{
y
}
if not
z
for(x)
y
for(x in y)
z
while(x)
y
# yacc doesn't accept a newline before the brace
# even though the rule is written as if it would
switch x {
}
switch (x) {
}
z
x &&
y
x ||
y
x |
y
switch x {y} && z
switch x {} | y

OPTIONS=$OPTIONS' /axescount '^`{echo $1 | sed s/-a//}^' def'

# bug in old printfont script - expected more free carats
# OPTIONS=$OPTIONS' /axescount '`{echo $1 | sed s/-a//}' def'

(x) = y
x=y
x = y

# works now!
# x y=z
# x =y
# x -flag=y

>z x | y

# rejected now, was like parens were spaces before.
# echo Formatting Venti arenas and indices (this takes a while).


# echo $STATLINE(1)^$STATLINE(3)'	'$STATLINE(2)'	'$STATLINE(4)'	'$LSLINE(6)