fix parser rule
This commit is contained in:
parent
d3447bfe84
commit
40a1652583
1 changed files with 6 additions and 3 deletions
|
@ -1,5 +1,8 @@
|
||||||
single = "(" expr ")" | int
|
single = "(" expr ")" | int
|
||||||
fac1 = applier "(" int ")" | single
|
args = single , args | single
|
||||||
applier = expr
|
callees = "(" args ")" | "(" ")"
|
||||||
|
facAux = callees facAux | callees
|
||||||
|
single facAux | single
|
||||||
|
fac = single facAux | single
|
||||||
term = fac | fac (MUL | DIV) fac
|
term = fac | fac (MUL | DIV) fac
|
||||||
expr = term (ADD | SUB) term
|
expr = term (ADD | SUB) term
|
||||||
|
|
Loading…
Reference in a new issue