xref: /original-bsd/old/as.vax/astoks.h (revision d25e1985)
1 /* Copyright (c) 1980 Regents of the University of California */
2 /* "@(#)astoks.h 4.2 08/16/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 # define IQUAD		22
43 /*
44  *	Tokens between ISTAB and REG are used in the per token switch
45  */
46 # define ISTAB 		23
47 # define ISTABSTR 	24
48 # define ISTABNONE 	25
49 # define ISTABDOT 	26
50 # define IJXXX 		27
51 # define IALIGN 	28
52 # define INST0 		29
53 # define INSTn 		30
54 
55 # define BFINT		31
56 # define PARSEEOF	32
57 # define ILINESKIP	33
58 # define VOID		34
59 # define SKIP		35
60 # define INT		36
61 # define FLTNUM		37
62 # define NAME		38
63 # define STRING		39
64 # define QUAD		40
65 /*
66  *	Tokens between SIZESPEC and REGOP are used in the instruction
67  *	argument switch
68  */
69 # define SIZESPEC 	41
70 # define REG		42
71 # define MUL		43
72 # define LITOP		44
73 # define LP		45
74 # define MP		46
75 /*
76  *	Tokens between REGOP and DIV are used in the per character switch
77  */
78 # define NEEDSBUF	48	/*signal refilling the input buffer*/
79 # define REGOP		49	/*the percent sign*/
80 # define NL		50
81 # define SCANEOF	51
82 # define BADCHAR	52
83 # define SP		53
84 # define ALPH		54
85 # define DIG		55
86 # define SQ		56
87 # define DQ		57
88 # define SH		58
89 # define LSH		59
90 # define RSH		60
91 # define MINUS		61
92 # define SIZEQUOTE	62
93 /*
94  *	Tokens between XOR and RP are used at random (primarily by the
95  *	expression analyzer), and not used in any switch
96  */
97 # define XOR		64
98 # define DIV		65
99 
100 # define SEMI		66
101 # define COLON		67
102 # define PLUS		68
103 # define IOR		69
104 # define AND		70
105 # define TILDE		71
106 # define ORNOT		72
107 # define CM		73
108 # define LB		74
109 # define RB		75
110 # define RP		76
111 
112 # define LASTTOKEN	80
113