-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsyntax3
66 lines (51 loc) · 1.21 KB
/
syntax3
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
From shriram@asia.cs.rice.edu Sat Feb 18 15:48:25 1995
Date: Sat, 18 Feb 95 15:48:20 CST
From: shriram@asia.cs.rice.edu (Shriram Krishnamurthi)
To: duba@aten.cs.rice.edu (Bruce Duba)
Cc: matthias@aten.cs.rice.edu
Subject: JAM
In-Reply-To: <9502172052.AA01679@aten.cs.rice.edu>
References: <9502172052.AA01679@aten.cs.rice.edu>
D := i = E
| i(P) = E
| kind i(P) : i
Ds := epsilon
| D{; D}*
P := epsilon
| i{, i}*
E := C
| i
| i(A)
| i[A]
| P(A)
| if E then E {elseif E then E}* ({else E}| endif)
| let Ds in E
| inorder E{; E}* return E
| set L to E
| (E)
| Uop E
| E Bop E
| [A{; A}*]
A := epsilon
| E{, E}*
L := i
| i[A]
Uop := - | +
Bop := + | - | * | / | ^ | = | <= | >= | =/= | < | >
P := tuple? | tabulate | size(?)
| array? | array | size(?)
| text?
| number? | zero? | positive? | odd? | sqrt | log | sin | cos | tan | atan
| boolean? | and | or | not | xor | nand | nor
? | list? | null? | pair? | cons | list | car | cdr
| function?
| equal?
C := true | false
| Sym
| Num
| empty
Sym := `c*'
c := \Char
| Char \ { \ , ' }
where Num, Sym and Char represent all the syntactic numbers, symbols
and characters, respectively.