]> git.kianting.info Git - uann/blobdiff - parserRule.txt
fix parser rule
[uann] / parserRule.txt
index 0bce539eb9b0fb5d2d3389521d2f5535439e7b5a..b1bcb74bc91f0945ef209780bba8b78027141fb2 100644 (file)
@@ -1 +1,8 @@
-expr = int | int add int # expr1 and #expr2
\ No newline at end of file
+single = "(" expr ")" | int
+args = single , args | single
+callees = "(" args ")" | "(" ")"
+facAux = callees facAux |  callees
+single facAux | single
+fac = single facAux | single
+term = fac | fac (MUL | DIV) fac
+expr = term (ADD | SUB) term