You use the symbol in grammar rules to mean that a token in that class is allowed. The symbol is represented in the Bison parser by a numeric code, and the yylex function returns a token type code to indicate what kind of token has been read. A nonterminal symbol stands for a class of syntactically equivalent groupings. The symbol name is used in writing grammar rules. By convention, it should be all lower case.
Periods make sense only in nonterminals.
By convention, it should be all upper case. See section Token Type Names . By convention, a character token type is used only to represent a token that consists of that particular character. Nothing enforces this convention, but if you depart from it, your program will confuse other readers. By convention, a literal string token is used only to represent a token that consists of that particular string.