Pristine Ack-5.5
[Ack-5.5.git] / util / cpp / tokenname.c
1 /*
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".
4  */
5 /* $Id: tokenname.c,v 1.4 1994/06/24 10:19:06 ceriel Exp $ */
6 /* TOKEN NAME DEFINITIONS */
7
8 #include        "idf.h"
9 #include        "LLlex.h"
10 #include        "Lpars.h"
11
12 struct tokenname        {       /*      Used for defining the name of a
13                                         token as identified by its symbol
14                                 */
15         int tn_symbol;
16         char *tn_name;
17 };
18
19 /*      To centralize the declaration of %tokens, their presence in this
20         file is taken as their declaration. The Makefile will produce
21         a grammar file (tokenfile.g) from this file.
22         Moreover, rather than looking up a symbol in all these lists
23         to find its printable name, a fast version of symbol2str() is
24         generated from these tables.
25         Consequenty some of these tables are not referenced explicitly
26         in the C text any more.  To save space and to avoid lint confusion,
27         these have been made pseudo-invisible by #ifdefs.
28 */
29
30 #ifdef  ____
31 struct tokenname tkspec[] =     {       /* the names of the special tokens */
32         {IDENTIFIER, "identifier"},
33         {STRING, "string"},
34         {FILESPECIFIER, "filespecifier"},
35         {INTEGER, "integer"},
36         {0, ""}
37 };
38
39 struct tokenname tkcomp[] =     {       /* names of the composite tokens */
40         {NOTEQUAL, "!="},
41         {AND, "&&"},
42         {LEFT, "<<"},
43         {LESSEQ, "<="},
44         {EQUAL, "=="},
45         {GREATEREQ, ">="},
46         {RIGHT, ">>"},
47         {OR, "||"},
48         {0, ""}
49 };
50
51 struct tokenname tkfunny[] =    {       /* internal keywords */
52         {ERRONEOUS, "erroneous"},
53         {0, ""}
54 };
55 #endif  /* ____ */