implement all Expr types, refactor grammar