< EBNF > Expr ::= Term([+|-] Expr)? Term ::= Factor ([*|/] Term)? Factor :: = (Expr) | Value Value ::= Integer | Double < > Expr ::= Term expr.isDouble = term.isDouble Expr1 ::= Term [+-] Expr2 expr1.isDouble = term.isDouble or expr2.isDouble Factor ::= (Expr) factor.isDouble = expr.isDouble Factor ::= Value factor.isDouble = value.isDouble Value :: Decimal Integer value.isDouble = false Value :: Double value.isDouble = true