DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Parsing with 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 valid 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. You can make a stab at it using the mechanism described in the last subsection, but it is difficult.


Next topic: Advanced topics
Previous topic: Lexical tie-ins

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005