In the grammar rules what you are showing are the category of the terminal tokens and not their values. So you can match against an atom but not against a specific atom. If you are using the Erlang tokenizer then the token generated for "if0"
will be {atom,Line,if0}
while in you grammar you want a {if0,Line}
token. This is what the "Pre-processing" section of the yecc
documentation is trying to explain.
You will need a special tokenizer for this. A simple way of handling this if you want to use the Erlang tokenizer is have a pre-processing pass which scans the token list and converts {atom,Line,if0}
tokens to {if0,Line}
tokens.