rewriting with shunting yard and non-garbage names/syntax