1 /* $Id: tokenname.c,v 1.9 1994/06/24 11:01:26 ceriel Exp $ */
10 /* To centralize the declaration of %tokens, their presence in this
11 file is taken as their declaration. The Makefile will produce
12 a grammar file (tokenfile.g) from this file. This scheme ensures
13 that all tokens have a printable name.
14 Also, the "token2str.c" file is produced from this file.
18 struct tokenname tkspec[] = { /* the names of the special tokens */
22 {EXPRESSION, "<expression>"},
25 {BIN_OP, "<operator>"},
26 {PREF_OR_BIN_OP, "<operator>"},
27 {PREF_OP, "<operator>"},
28 {POST_OP, "<operator>"},
29 {SEL_OP, "<operator>"},
34 struct tokenname tkidf[] = { /* names of the identifier tokens */
72 struct tokenname tkinternal[] = { /* internal keywords */
76 struct tokenname tkstandard[] = { /* standard identifiers */
81 /* Some routines to handle tokennames */
84 register struct tokenname *resv;
86 /* The names of the tokens described in resv are entered
89 register struct idf *p;
91 while (resv->tn_symbol) {
92 p = str2idf(resv->tn_name, 0);
93 if (!p) fatal("out of Memory");
94 p->id_reserved = resv->tn_symbol;