I agree. I'm very weak in grammar, but I dont understand how this one would work. Shouldn't it be ?
Expr ::= Expr + Term | Expr - Term | Term;
Term ::= Term * Factor | Term / Factor | Factor
Factor ::= Int | ( Expr )
Exactly. And yet it's not easy to infer mechanically that an Expr (but not its Term branch) must be printed in "( ... )" when it's in the Factor branch of an AST.
There are precedence indicators to describe precedence (BTW, this is needed for formatting as well as parsing). The details are too complicated for a reply, but they are in the language manual.