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

Reserved token names

Avoid using any token names in the grammar that are reserved or significant in C language or the parser. For example, the use of token names if or while will almost certainly cause severe difficulties when the lexical analyzer is compiled. The token name error is reserved for error handling and should not be used naively. One technique for avoiding this kind of difficulty is to preface all token names with some string, such as t_ , that is unlikely to appear in any reserved word.


Next topic: Parsing
Previous topic: End-marker token

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