From 6677124f1f1fa913c72af95b6e504274db52cc31 Mon Sep 17 00:00:00 2001 From: shaoying Date: Wed, 23 Jun 2021 10:14:21 +0800 Subject: [PATCH] add yac.txt --- etc/yac.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 etc/yac.txt diff --git a/etc/yac.txt b/etc/yac.txt new file mode 100644 index 00000000..5cba104e --- /dev/null +++ b/etc/yac.txt @@ -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 } +