2 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3 * See the copyright notice in the ACK home directory, in the file "Copyright".
5 * Author: Ceriel J.H. Jacobs
8 /* T O K E N D E F I N I T I O N S */
10 /* $Id: tokenname.c,v 1.20 1994/06/24 12:43:03 ceriel Exp $ */
12 #include "tokenname.h"
16 /* To centralize the declaration of %tokens, their presence in this
17 file is taken as their declaration. The Makefile will produce
18 a grammar file (tokenfile.g) from this file. This scheme ensures
19 that all tokens have a printable name.
20 Also, the "token2str.c" file is produced from this file.
24 struct tokenname tkspec[] = { /* the names of the special tokens */
25 {IDENT, "identifier"},
32 struct tokenname tkcomp[] = { /* names of the composite tokens */
41 struct tokenname tkidf[] = { /* names of the identifier tokens */
48 {DEFINITION, "DEFINITION"},
59 {IMPLEMENTATION, "IMPLEMENTATION"},
69 {PROCEDURE, "PROCEDURE"},
70 {QUALIFIED, "QUALIFIED"},
86 struct tokenname tkinternal[] = { /* internal keywords */
93 struct tokenname tkstandard[] = { /* standard identifiers */
98 /* Some routines to handle tokennames */
101 register struct tokenname *resv;
103 /* The names of the tokens described in resv are entered
108 while (resv->tn_symbol) {
109 p = str2idf(resv->tn_name, 0);
110 if (!p) fatal("out of Memory");
111 p->id_reserved = resv->tn_symbol;