summaryrefslogtreecommitdiff
path: root/usr/src/lib/libpp/i386/pptab.h
blob: d153e8e65c7ea41a1b3933f79958eb159982d601 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/*
 * 
 * Glenn Fowler
 * AT&T Research
 * 
 * @(#)pp.tab (AT&T Labs Research) 2006-05-09
 * 
 * C preprocessor tables and states
 * 
 * + marks extensions to the standard
 * 
 */

static struct ppkeyword directives[] =
{
	"define",	DEFINE,
	"elif",	ELIF,
	"else",	ELSE,
	"endif",	ENDIF,
	"+endmac",	ENDMAC,
	"error",	ERROR,
	"if",	IF,
	"ifdef",	IFDEF,
	"ifndef",	IFNDEF,
	"include",	INCLUDE,
	"+let",	LET,
	"line",	LINE,
	"+macdef",	MACDEF,
	"pragma",	PRAGMA,
	"+rename",	RENAME,
	"undef",	UNDEF,
	"+warning",	WARNING,
	0,	0
};

static struct ppkeyword options[] =
{
	"allmultiple",	X_ALLMULTIPLE,
	"allpossible",	X_ALLPOSSIBLE,
	"builtin",	X_BUILTIN,
	"catliteral",	X_CATLITERAL,
	"cdir",	X_CDIR,
	"checkpoint",	X_CHECKPOINT,
	"chop",	X_CHOP,
	"compatibility",	X_COMPATIBILITY,
	"debug",	X_DEBUG,
	"elseif",	X_ELSEIF,
	"externalize",	X_EXTERNALIZE,
	"final",	X_FINAL,
	"hide",	X_HIDE,
	"headerexpand",	X_HEADEREXPAND,
	"headerexpandall",	X_HEADEREXPANDALL,
	"hosted",	X_HOSTED,
	"hostedtransition",	X_HOSTEDTRANSITION,
	"hostdir",	X_HOSTDIR,
	"id",	X_ID,
	"ignore",	X_IGNORE,
	"include",	X_INCLUDE,
	"initial",	X_INITIAL,
	"keyargs",	X_KEYARGS,
	"line",	X_LINE,
	"linebase",	X_LINEBASE,
	"linefile",	X_LINEFILE,
	"lineid",	X_LINEID,
	"linetype",	X_LINETYPE,
	"macref",	X_MACREF,
	"map",	X_MAP,
	"mapinclude",	X_MAPINCLUDE,
	"modern",	X_MODERN,
	"multiple",	X_MULTIPLE,
	"native",	X_NATIVE,
	"note",	X_NOTE,
	"opspace",	X_OPSPACE,
	"passthrough",	X_PASSTHROUGH,
	"pedantic",	X_PEDANTIC,
	"pluscomment",	X_PLUSCOMMENT,
	"plusplus",	X_PLUSPLUS,
	"plussplice",	X_PLUSSPLICE,
	"pragmaflags",	X_PRAGMAFLAGS,
	"pragmaexpand",	X_PRAGMAEXPAND,
	"predefined",	X_PREDEFINED,
	"prefix",	X_PREFIX,
	"preserve",	X_PRESERVE,
	"proto",	X_PROTO,
	"prototyped",	X_PROTOTYPED,
	"quote",	X_QUOTE,
	"readonly",	X_READONLY,
	"reguard",	X_REGUARD,
	"reserved",	X_RESERVED,
	"spaceout",	X_SPACEOUT,
	"splicecat",	X_SPLICECAT,
	"splicespace",	X_SPLICESPACE,
	"standard",	X_STANDARD,
	"statement",	X_STATEMENT,
	"strict",	X_STRICT,
	"stringspan",	X_STRINGSPAN,
	"stringsplit",	X_STRINGSPLIT,
	"system_header",	X_SYSTEM_HEADER,
	"test",	X_TEST,
	"text",	X_TEXT,
	"transition",	X_TRANSITION,
	"truncate",	X_TRUNCATE,
	"vendor",	X_VENDOR,
	"version",	X_VERSION,
	"warn",	X_WARN,
	"zeof",	X_ZEOF,
	0,	0
};

static struct ppkeyword predicates[] =
{
	"defined",	X_DEFINED,
	"+exists",	X_EXISTS,
	"+included",	X_INCLUDED,
	"+match",	X_MATCH,
	"+noticed",	X_NOTICED,
	"+option",	X_OPTION,
	"sizeof",	X_SIZEOF,
	"+strcmp",	X_STRCMP,
	0,	0
};

static struct ppkeyword readonlys[] =
{
	"defined",	R_DEFINED,
	0,	0
};

static struct ppkeyword variables[] =
{
	"_Pragma",	V__PRAGMA,
	"+ARGC",	V_ARGC,
	"+BASE",	V_BASE,
	"DATE",	V_DATE,
	"FILE",	V_FILE,
	"+FUNCTION",	V_FUNCTION,
	"LINE",	V_LINE,
	"+PATH",	V_PATH,
	"+SOURCE",	V_SOURCE,
	"-STDC",	V_STDC,
	"TIME",	V_TIME,
	"+VERSION",	V_VERSION,
	"-default",	V_DEFAULT,
	"-directive",	V_DIRECTIVE,
	"-empty",	V_EMPTY,
	"-getenv",	V_GETENV,
	"-getmac",	V_GETMAC,
	"-getopt",	V_GETOPT,
	"-getprd",	V_GETPRD,
	"-iterate",	V_ITERATE,
	0,	0
};