Logical grammar (if-then-else)