DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
yacc

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 the lexical analyzer information telling it one instance of if is a keyword and another instance is a variable. The user can attempt to implement this using the mechanism described in the last subsection, but this is not trivial. It is better that the keywords be reserved, that is, forbidden for use as variable names.


Next topic: Examples of using yacc
Previous topic: Lexical tie-ins

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003