updated grammar for arithmetic