1 /* T O K E N D E F I N I T I O N S */
7 /* To centralize the declaration of %tokens, their presence in this
8 file is taken as their declaration. The Makefile will produce
9 a grammar file (tokenfile.g) from this file. This scheme ensures
10 that all tokens have a printable name.
11 Also, the "symbol2str.c" file is produced from this file.
15 struct tokenname tkspec[] = { /* the names of the special tokens */
16 {IDENT, "identifier"},
23 struct tokenname tkcomp[] = { /* names of the composite tokens */
33 struct tokenname tkidf[] = { /* names of the identifier tokens */
46 {FUNCTION, "function"},
57 {PROCEDURE, "procedure"},
72 struct tokenname tkstandard[] = { /* standard identifiers */
73 /* These are the only standard identifiers entered here, because
74 * they can get a variable number of arguments, and there are
75 * special syntaxrules in the grammar for them
84 /* Some routines to handle tokennames */
87 register struct tokenname *resv;
89 /* The names of the tokens described in resv are entered
92 register struct idf *p;
94 while( resv->tn_symbol ) {
95 p = str2idf(resv->tn_name, 0);
96 if( !p ) fatal("out of Memory");
97 p->id_reserved = resv->tn_symbol;