xref: /csrg-svn/old/as.vax/astoks.h (revision 605)
1 /* Copyright (c) 1980 Regents of the University of California */
2 /* "@(#)astoks.h 4.1 08/13/80" */
3 /*
4  *	Message to the wary:  The order of tokens has been
5  *	hand optimized and assigned to that all switch statements
6  *	are implemented by a casel instruction on the VAX.
7  *	there are 4 switch statements that have to be worried about:
8  *	l)	Per character switch in the character scanner (scan_dot_s)
9  *	2)	Per token switch in the buffer manager (yylex)
10  *	3)	Per keyword switch in the parser (yyparse)
11  *	4)	Leading token switch for argments to opcodes
12  *
13  *	You can't just add new tokens willy-nilly; make sure that you
14  *	add them into the proper order!
15  */
16 # define FIRSTTOKEN	0
17 
18 /*
19  *	Tokens between ISPACE and INSTn are used by the per keyword switch
20  */
21 # define ISPACE 	1
22 # define IBYTE 		2
23 # define IWORD 		3
24 # define IINT 		4
25 # define ILONG 		5
26 # define IDATA 		6
27 # define IGLOBAL 	7
28 # define ISET 		8
29 # define ITEXT 		9
30 # define ICOMM 		10
31 # define ILCOMM 	11
32 # define IFLOAT 	12
33 # define IDOUBLE 	13
34 # define IORG 		14
35 # define IASCII 	15
36 # define IASCIZ 	16
37 # define ILSYM 		17
38 # define IFILE 		18
39 # define ILINENO 	19
40 # define IABORT 	20
41 # define IFILL		21
42 /*
43  *	Tokens between ISTAB and REG are used in the per token switch
44  */
45 # define ISTAB 		23
46 # define ISTABSTR 	24
47 # define ISTABNONE 	25
48 # define ISTABDOT 	26
49 # define IJXXX 		27
50 # define IALIGN 	28
51 # define INST0 		29
52 # define INSTn 		30
53 
54 # define BFINT		31
55 # define PARSEEOF	32
56 # define ILINESKIP	33
57 # define VOID		34
58 # define SKIP		35
59 # define INT		36
60 # define FLTNUM		37
61 # define NAME		38
62 # define STRING		39
63 # define QUAD		40
64 /*
65  *	Tokens between SIZESPEC and REGOP are used in the instruction
66  *	argument switch
67  */
68 # define SIZESPEC 	41
69 # define REG		42
70 # define MUL		43
71 # define LITOP		44
72 # define LP		45
73 # define MP		46
74 /*
75  *	Tokens between REGOP and DIV are used in the per character switch
76  */
77 # define NEEDSBUF	48	/*signal refilling the input buffer*/
78 # define REGOP		49	/*the percent sign*/
79 # define NL		50
80 # define SCANEOF	51
81 # define BADCHAR	52
82 # define SP		53
83 # define ALPH		54
84 # define DIG		55
85 # define SQ		56
86 # define DQ		57
87 # define SH		58
88 # define LSH		59
89 # define RSH		60
90 # define MINUS		61
91 # define SIZEQUOTE	62
92 /*
93  *	Tokens between XOR and RP are used at random (primarily by the
94  *	expression analyzer), and not used in any switch
95  */
96 # define XOR		64
97 # define DIV		65
98 
99 # define SEMI		66
100 # define COLON		67
101 # define PLUS		68
102 # define IOR		69
103 # define AND		70
104 # define TILDE		71
105 # define ORNOT		72
106 # define CM		73
107 # define LB		74
108 # define RB		75
109 # define RP		76
110 
111 # define LASTTOKEN	80
112