Programming Utilities Guide

Reserved Words

Some programming languages permit you to use words like if, which are normally reserved as label or variable names, provided that such use does not conflict with the legal use of these names in the programming language. This is extremely hard to do in the framework of yacc.

It is difficult to pass information to the lexical analyzer, telling it this instance of if is a keyword and that instance is a variable. Using the information found in the previous section, "Lexical Tie-Ins " might prove useful here.