1
0
mirror of https://shylinux.com/x/ContextOS synced 2025-04-26 01:04:06 +08:00
ContextOS/etc/yac.txt
2021-06-23 10:14:21 +08:00

19 lines
246 B
Plaintext

num num [0-9]+
key key [a-zA-Z]+
op2 op2 [>=<]
op2 op2 [+\-*/%]
val val mul{ num key }
exp exp val
exp exp val op2 val
stm var var key = exp
stm let let key = exp
stm for for exp
stm if if exp
stm end end
stm cmd pwd
script script rep{ stm }