1
0
mirror of https://shylinux.com/x/ContextOS synced 2025-04-25 08:48:06 +08:00

add yac.txt

This commit is contained in:
shaoying 2021-06-23 10:14:21 +08:00
parent 39a8a826ba
commit 6677124f1f

18
etc/yac.txt Normal file
View File

@ -0,0 +1,18 @@
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 }