Fixing lexer state + correcting shunting yard algorithm