From: Tan Kian-ting Date: Fri, 29 Sep 2023 03:31:28 +0000 (+0800) Subject: fix parser rule X-Git-Url: https://git.kianting.info/?a=commitdiff_plain;h=40a1652583c4dcac4616f5eec50819d8b4e47c73;p=uann fix parser rule --- diff --git a/parserRule.txt b/parserRule.txt index 8b2b5de..b1bcb74 100644 --- a/parserRule.txt +++ b/parserRule.txt @@ -1,5 +1,8 @@ -single = "(" expr ")" | int -fac1 = applier "(" int ")" | single -applier = expr +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