blob: 9bfec7cd98a51d093911decf0c37bcfc75099ed2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# c-ll1
# LL(1)
start = s .
s = i ("=" e | ttail etail) .
s = n ttail etail .
s = "(" e ")" ttail etail .
e = t etail.
etail = { "+" t | "-" t } .
t = f ttail .
ttail = [ "*" t | f "/" t ].
f = i .
f = n .
f = "(" e ")" .
|