sl@0
|
1 |
/*=============================================================================
|
sl@0
|
2 |
Boost.Wave: A Standard compliant C++ preprocessor library
|
sl@0
|
3 |
The definition of a default set of token identifiers and related
|
sl@0
|
4 |
functions.
|
sl@0
|
5 |
|
sl@0
|
6 |
http://www.boost.org/
|
sl@0
|
7 |
|
sl@0
|
8 |
Copyright (c) 2001-2007 Hartmut Kaiser. Distributed under the Boost
|
sl@0
|
9 |
Software License, Version 1.0. (See accompanying file
|
sl@0
|
10 |
LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
sl@0
|
11 |
=============================================================================*/
|
sl@0
|
12 |
|
sl@0
|
13 |
#if !defined(TOKEN_IDS_HPP_414E9A58_F079_4789_8AFF_513815CE475B_INCLUDED)
|
sl@0
|
14 |
#define TOKEN_IDS_HPP_414E9A58_F079_4789_8AFF_513815CE475B_INCLUDED
|
sl@0
|
15 |
|
sl@0
|
16 |
#include <string>
|
sl@0
|
17 |
|
sl@0
|
18 |
#include <boost/wave/wave_config.hpp>
|
sl@0
|
19 |
|
sl@0
|
20 |
// this must occur after all of the includes and before any code appears
|
sl@0
|
21 |
#ifdef BOOST_HAS_ABI_HEADERS
|
sl@0
|
22 |
#include BOOST_ABI_PREFIX
|
sl@0
|
23 |
#endif
|
sl@0
|
24 |
|
sl@0
|
25 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
26 |
// Allow external redefinition of the token identifiers to use
|
sl@0
|
27 |
#if !defined(BOOST_WAVE_TOKEN_IDS_DEFINED)
|
sl@0
|
28 |
#define BOOST_WAVE_TOKEN_IDS_DEFINED
|
sl@0
|
29 |
|
sl@0
|
30 |
#if defined (__FreeBSD__) && defined (T_DIVIDE)
|
sl@0
|
31 |
#undef T_DIVIDE
|
sl@0
|
32 |
#endif
|
sl@0
|
33 |
|
sl@0
|
34 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
35 |
namespace boost {
|
sl@0
|
36 |
namespace wave {
|
sl@0
|
37 |
|
sl@0
|
38 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
39 |
// assemble tokenid's
|
sl@0
|
40 |
#define TOKEN_FROM_ID(id, cat) ((id) | (cat))
|
sl@0
|
41 |
#define ID_FROM_TOKEN(tok) ((tok) & ~TokenTypeMask)
|
sl@0
|
42 |
#define BASEID_FROM_TOKEN(tok) ((tok) & ~ExtTokenTypeMask)
|
sl@0
|
43 |
|
sl@0
|
44 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
45 |
// the token_category helps to classify the different token types
|
sl@0
|
46 |
enum token_category {
|
sl@0
|
47 |
IdentifierTokenType = 0x10000000,
|
sl@0
|
48 |
ParameterTokenType = 0x11000000,
|
sl@0
|
49 |
ExtParameterTokenType = 0x11100000,
|
sl@0
|
50 |
KeywordTokenType = 0x20000000,
|
sl@0
|
51 |
OperatorTokenType = 0x30000000,
|
sl@0
|
52 |
LiteralTokenType = 0x40000000,
|
sl@0
|
53 |
IntegerLiteralTokenType = 0x41000000,
|
sl@0
|
54 |
FloatingLiteralTokenType = 0x42000000,
|
sl@0
|
55 |
StringLiteralTokenType = 0x43000000,
|
sl@0
|
56 |
CharacterLiteralTokenType = 0x44000000,
|
sl@0
|
57 |
BoolLiteralTokenType = 0x45000000,
|
sl@0
|
58 |
PPTokenType = 0x50000000,
|
sl@0
|
59 |
PPConditionalTokenType = 0x50800000,
|
sl@0
|
60 |
|
sl@0
|
61 |
UnknownTokenType = 0xA0000000,
|
sl@0
|
62 |
EOLTokenType = 0xB0000000,
|
sl@0
|
63 |
EOFTokenType = 0xC0000000,
|
sl@0
|
64 |
WhiteSpaceTokenType = 0xD0000000,
|
sl@0
|
65 |
InternalTokenType = 0xE0000000,
|
sl@0
|
66 |
|
sl@0
|
67 |
TokenTypeMask = 0xFF000000,
|
sl@0
|
68 |
AltTokenType = 0x00100000,
|
sl@0
|
69 |
TriGraphTokenType = 0x00200000,
|
sl@0
|
70 |
AltExtTokenType = 0x00500000, // and, bit_and etc.
|
sl@0
|
71 |
ExtTokenTypeMask = 0xFFF00000,
|
sl@0
|
72 |
ExtTokenOnlyMask = 0x00F00000,
|
sl@0
|
73 |
TokenValueMask = 0x000FFFFF,
|
sl@0
|
74 |
MainTokenMask = 0xFF0FFFFF // TokenTypeMask|TokenValueMask
|
sl@0
|
75 |
};
|
sl@0
|
76 |
|
sl@0
|
77 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
78 |
// the token_id assigns unique numbers to the different C++ lexemes
|
sl@0
|
79 |
enum token_id {
|
sl@0
|
80 |
T_UNKNOWN = 0,
|
sl@0
|
81 |
T_FIRST_TOKEN = 256,
|
sl@0
|
82 |
T_AND = TOKEN_FROM_ID(T_FIRST_TOKEN, OperatorTokenType),
|
sl@0
|
83 |
T_AND_ALT = TOKEN_FROM_ID(T_FIRST_TOKEN, OperatorTokenType|AltExtTokenType),
|
sl@0
|
84 |
T_ANDAND = TOKEN_FROM_ID(257, OperatorTokenType),
|
sl@0
|
85 |
T_ANDAND_ALT = TOKEN_FROM_ID(257, OperatorTokenType|AltExtTokenType),
|
sl@0
|
86 |
T_ASSIGN = TOKEN_FROM_ID(258, OperatorTokenType),
|
sl@0
|
87 |
T_ANDASSIGN = TOKEN_FROM_ID(259, OperatorTokenType),
|
sl@0
|
88 |
T_ANDASSIGN_ALT = TOKEN_FROM_ID(259, OperatorTokenType|AltExtTokenType),
|
sl@0
|
89 |
T_OR = TOKEN_FROM_ID(260, OperatorTokenType),
|
sl@0
|
90 |
T_OR_ALT = TOKEN_FROM_ID(260, OperatorTokenType|AltExtTokenType),
|
sl@0
|
91 |
T_OR_TRIGRAPH = TOKEN_FROM_ID(260, OperatorTokenType|TriGraphTokenType),
|
sl@0
|
92 |
T_ORASSIGN = TOKEN_FROM_ID(261, OperatorTokenType),
|
sl@0
|
93 |
T_ORASSIGN_ALT = TOKEN_FROM_ID(261, OperatorTokenType|AltExtTokenType),
|
sl@0
|
94 |
T_ORASSIGN_TRIGRAPH = TOKEN_FROM_ID(261, OperatorTokenType|TriGraphTokenType),
|
sl@0
|
95 |
T_XOR = TOKEN_FROM_ID(262, OperatorTokenType),
|
sl@0
|
96 |
T_XOR_ALT = TOKEN_FROM_ID(262, OperatorTokenType|AltExtTokenType),
|
sl@0
|
97 |
T_XOR_TRIGRAPH = TOKEN_FROM_ID(262, OperatorTokenType|TriGraphTokenType),
|
sl@0
|
98 |
T_XORASSIGN = TOKEN_FROM_ID(263, OperatorTokenType),
|
sl@0
|
99 |
T_XORASSIGN_ALT = TOKEN_FROM_ID(263, OperatorTokenType|AltExtTokenType),
|
sl@0
|
100 |
T_XORASSIGN_TRIGRAPH = TOKEN_FROM_ID(263, OperatorTokenType|TriGraphTokenType),
|
sl@0
|
101 |
T_COMMA = TOKEN_FROM_ID(264, OperatorTokenType),
|
sl@0
|
102 |
T_COLON = TOKEN_FROM_ID(265, OperatorTokenType),
|
sl@0
|
103 |
T_DIVIDE = TOKEN_FROM_ID(266, OperatorTokenType),
|
sl@0
|
104 |
T_DIVIDEASSIGN = TOKEN_FROM_ID(267, OperatorTokenType),
|
sl@0
|
105 |
T_DOT = TOKEN_FROM_ID(268, OperatorTokenType),
|
sl@0
|
106 |
T_DOTSTAR = TOKEN_FROM_ID(269, OperatorTokenType),
|
sl@0
|
107 |
T_ELLIPSIS = TOKEN_FROM_ID(270, OperatorTokenType),
|
sl@0
|
108 |
T_EQUAL = TOKEN_FROM_ID(271, OperatorTokenType),
|
sl@0
|
109 |
T_GREATER = TOKEN_FROM_ID(272, OperatorTokenType),
|
sl@0
|
110 |
T_GREATEREQUAL = TOKEN_FROM_ID(273, OperatorTokenType),
|
sl@0
|
111 |
T_LEFTBRACE = TOKEN_FROM_ID(274, OperatorTokenType),
|
sl@0
|
112 |
T_LEFTBRACE_ALT = TOKEN_FROM_ID(274, OperatorTokenType|AltTokenType),
|
sl@0
|
113 |
T_LEFTBRACE_TRIGRAPH = TOKEN_FROM_ID(274, OperatorTokenType|TriGraphTokenType),
|
sl@0
|
114 |
T_LESS = TOKEN_FROM_ID(275, OperatorTokenType),
|
sl@0
|
115 |
T_LESSEQUAL = TOKEN_FROM_ID(276, OperatorTokenType),
|
sl@0
|
116 |
T_LEFTPAREN = TOKEN_FROM_ID(277, OperatorTokenType),
|
sl@0
|
117 |
T_LEFTBRACKET = TOKEN_FROM_ID(278, OperatorTokenType),
|
sl@0
|
118 |
T_LEFTBRACKET_ALT = TOKEN_FROM_ID(278, OperatorTokenType|AltTokenType),
|
sl@0
|
119 |
T_LEFTBRACKET_TRIGRAPH = TOKEN_FROM_ID(278, OperatorTokenType|TriGraphTokenType),
|
sl@0
|
120 |
T_MINUS = TOKEN_FROM_ID(279, OperatorTokenType),
|
sl@0
|
121 |
T_MINUSASSIGN = TOKEN_FROM_ID(280, OperatorTokenType),
|
sl@0
|
122 |
T_MINUSMINUS = TOKEN_FROM_ID(281, OperatorTokenType),
|
sl@0
|
123 |
T_PERCENT = TOKEN_FROM_ID(282, OperatorTokenType),
|
sl@0
|
124 |
T_PERCENTASSIGN = TOKEN_FROM_ID(283, OperatorTokenType),
|
sl@0
|
125 |
T_NOT = TOKEN_FROM_ID(284, OperatorTokenType),
|
sl@0
|
126 |
T_NOT_ALT = TOKEN_FROM_ID(284, OperatorTokenType|AltExtTokenType),
|
sl@0
|
127 |
T_NOTEQUAL = TOKEN_FROM_ID(285, OperatorTokenType),
|
sl@0
|
128 |
T_NOTEQUAL_ALT = TOKEN_FROM_ID(285, OperatorTokenType|AltExtTokenType),
|
sl@0
|
129 |
T_OROR = TOKEN_FROM_ID(286, OperatorTokenType),
|
sl@0
|
130 |
T_OROR_ALT = TOKEN_FROM_ID(286, OperatorTokenType|AltExtTokenType),
|
sl@0
|
131 |
T_OROR_TRIGRAPH = TOKEN_FROM_ID(286, OperatorTokenType|TriGraphTokenType),
|
sl@0
|
132 |
T_PLUS = TOKEN_FROM_ID(287, OperatorTokenType),
|
sl@0
|
133 |
T_PLUSASSIGN = TOKEN_FROM_ID(288, OperatorTokenType),
|
sl@0
|
134 |
T_PLUSPLUS = TOKEN_FROM_ID(289, OperatorTokenType),
|
sl@0
|
135 |
T_ARROW = TOKEN_FROM_ID(290, OperatorTokenType),
|
sl@0
|
136 |
T_ARROWSTAR = TOKEN_FROM_ID(291, OperatorTokenType),
|
sl@0
|
137 |
T_QUESTION_MARK = TOKEN_FROM_ID(292, OperatorTokenType),
|
sl@0
|
138 |
T_RIGHTBRACE = TOKEN_FROM_ID(293, OperatorTokenType),
|
sl@0
|
139 |
T_RIGHTBRACE_ALT = TOKEN_FROM_ID(293, OperatorTokenType|AltTokenType),
|
sl@0
|
140 |
T_RIGHTBRACE_TRIGRAPH = TOKEN_FROM_ID(293, OperatorTokenType|TriGraphTokenType),
|
sl@0
|
141 |
T_RIGHTPAREN = TOKEN_FROM_ID(294, OperatorTokenType),
|
sl@0
|
142 |
T_RIGHTBRACKET = TOKEN_FROM_ID(295, OperatorTokenType),
|
sl@0
|
143 |
T_RIGHTBRACKET_ALT = TOKEN_FROM_ID(295, OperatorTokenType|AltTokenType),
|
sl@0
|
144 |
T_RIGHTBRACKET_TRIGRAPH = TOKEN_FROM_ID(295, OperatorTokenType|TriGraphTokenType),
|
sl@0
|
145 |
T_COLON_COLON = TOKEN_FROM_ID(296, OperatorTokenType),
|
sl@0
|
146 |
T_SEMICOLON = TOKEN_FROM_ID(297, OperatorTokenType),
|
sl@0
|
147 |
T_SHIFTLEFT = TOKEN_FROM_ID(298, OperatorTokenType),
|
sl@0
|
148 |
T_SHIFTLEFTASSIGN = TOKEN_FROM_ID(299, OperatorTokenType),
|
sl@0
|
149 |
T_SHIFTRIGHT = TOKEN_FROM_ID(300, OperatorTokenType),
|
sl@0
|
150 |
T_SHIFTRIGHTASSIGN = TOKEN_FROM_ID(301, OperatorTokenType),
|
sl@0
|
151 |
T_STAR = TOKEN_FROM_ID(302, OperatorTokenType),
|
sl@0
|
152 |
T_COMPL = TOKEN_FROM_ID(303, OperatorTokenType),
|
sl@0
|
153 |
T_COMPL_ALT = TOKEN_FROM_ID(303, OperatorTokenType|AltExtTokenType),
|
sl@0
|
154 |
T_COMPL_TRIGRAPH = TOKEN_FROM_ID(303, OperatorTokenType|TriGraphTokenType),
|
sl@0
|
155 |
T_STARASSIGN = TOKEN_FROM_ID(304, OperatorTokenType),
|
sl@0
|
156 |
T_ASM = TOKEN_FROM_ID(305, KeywordTokenType),
|
sl@0
|
157 |
T_AUTO = TOKEN_FROM_ID(306, KeywordTokenType),
|
sl@0
|
158 |
T_BOOL = TOKEN_FROM_ID(307, KeywordTokenType),
|
sl@0
|
159 |
T_FALSE = TOKEN_FROM_ID(308, BoolLiteralTokenType),
|
sl@0
|
160 |
T_TRUE = TOKEN_FROM_ID(309, BoolLiteralTokenType),
|
sl@0
|
161 |
T_BREAK = TOKEN_FROM_ID(310, KeywordTokenType),
|
sl@0
|
162 |
T_CASE = TOKEN_FROM_ID(311, KeywordTokenType),
|
sl@0
|
163 |
T_CATCH = TOKEN_FROM_ID(312, KeywordTokenType),
|
sl@0
|
164 |
T_CHAR = TOKEN_FROM_ID(313, KeywordTokenType),
|
sl@0
|
165 |
T_CLASS = TOKEN_FROM_ID(314, KeywordTokenType),
|
sl@0
|
166 |
T_CONST = TOKEN_FROM_ID(315, KeywordTokenType),
|
sl@0
|
167 |
T_CONSTCAST = TOKEN_FROM_ID(316, KeywordTokenType),
|
sl@0
|
168 |
T_CONTINUE = TOKEN_FROM_ID(317, KeywordTokenType),
|
sl@0
|
169 |
T_DEFAULT = TOKEN_FROM_ID(318, KeywordTokenType),
|
sl@0
|
170 |
T_DEFINED = TOKEN_FROM_ID(319, KeywordTokenType),
|
sl@0
|
171 |
T_DELETE = TOKEN_FROM_ID(320, KeywordTokenType),
|
sl@0
|
172 |
T_DO = TOKEN_FROM_ID(321, KeywordTokenType),
|
sl@0
|
173 |
T_DOUBLE = TOKEN_FROM_ID(322, KeywordTokenType),
|
sl@0
|
174 |
T_DYNAMICCAST = TOKEN_FROM_ID(323, KeywordTokenType),
|
sl@0
|
175 |
T_ELSE = TOKEN_FROM_ID(324, KeywordTokenType),
|
sl@0
|
176 |
T_ENUM = TOKEN_FROM_ID(325, KeywordTokenType),
|
sl@0
|
177 |
T_EXPLICIT = TOKEN_FROM_ID(326, KeywordTokenType),
|
sl@0
|
178 |
T_EXPORT = TOKEN_FROM_ID(327, KeywordTokenType),
|
sl@0
|
179 |
T_EXTERN = TOKEN_FROM_ID(328, KeywordTokenType),
|
sl@0
|
180 |
T_FLOAT = TOKEN_FROM_ID(329, KeywordTokenType),
|
sl@0
|
181 |
T_FOR = TOKEN_FROM_ID(330, KeywordTokenType),
|
sl@0
|
182 |
T_FRIEND = TOKEN_FROM_ID(331, KeywordTokenType),
|
sl@0
|
183 |
T_GOTO = TOKEN_FROM_ID(332, KeywordTokenType),
|
sl@0
|
184 |
T_IF = TOKEN_FROM_ID(333, KeywordTokenType),
|
sl@0
|
185 |
T_INLINE = TOKEN_FROM_ID(334, KeywordTokenType),
|
sl@0
|
186 |
T_INT = TOKEN_FROM_ID(335, KeywordTokenType),
|
sl@0
|
187 |
T_LONG = TOKEN_FROM_ID(336, KeywordTokenType),
|
sl@0
|
188 |
T_MUTABLE = TOKEN_FROM_ID(337, KeywordTokenType),
|
sl@0
|
189 |
T_NAMESPACE = TOKEN_FROM_ID(338, KeywordTokenType),
|
sl@0
|
190 |
T_NEW = TOKEN_FROM_ID(339, KeywordTokenType),
|
sl@0
|
191 |
T_OPERATOR = TOKEN_FROM_ID(340, KeywordTokenType),
|
sl@0
|
192 |
T_PRIVATE = TOKEN_FROM_ID(341, KeywordTokenType),
|
sl@0
|
193 |
T_PROTECTED = TOKEN_FROM_ID(342, KeywordTokenType),
|
sl@0
|
194 |
T_PUBLIC = TOKEN_FROM_ID(343, KeywordTokenType),
|
sl@0
|
195 |
T_REGISTER = TOKEN_FROM_ID(344, KeywordTokenType),
|
sl@0
|
196 |
T_REINTERPRETCAST = TOKEN_FROM_ID(345, KeywordTokenType),
|
sl@0
|
197 |
T_RETURN = TOKEN_FROM_ID(346, KeywordTokenType),
|
sl@0
|
198 |
T_SHORT = TOKEN_FROM_ID(347, KeywordTokenType),
|
sl@0
|
199 |
T_SIGNED = TOKEN_FROM_ID(348, KeywordTokenType),
|
sl@0
|
200 |
T_SIZEOF = TOKEN_FROM_ID(349, KeywordTokenType),
|
sl@0
|
201 |
T_STATIC = TOKEN_FROM_ID(350, KeywordTokenType),
|
sl@0
|
202 |
T_STATICCAST = TOKEN_FROM_ID(351, KeywordTokenType),
|
sl@0
|
203 |
T_STRUCT = TOKEN_FROM_ID(352, KeywordTokenType),
|
sl@0
|
204 |
T_SWITCH = TOKEN_FROM_ID(353, KeywordTokenType),
|
sl@0
|
205 |
T_TEMPLATE = TOKEN_FROM_ID(354, KeywordTokenType),
|
sl@0
|
206 |
T_THIS = TOKEN_FROM_ID(355, KeywordTokenType),
|
sl@0
|
207 |
T_THROW = TOKEN_FROM_ID(356, KeywordTokenType),
|
sl@0
|
208 |
T_TRY = TOKEN_FROM_ID(357, KeywordTokenType),
|
sl@0
|
209 |
T_TYPEDEF = TOKEN_FROM_ID(358, KeywordTokenType),
|
sl@0
|
210 |
T_TYPEID = TOKEN_FROM_ID(359, KeywordTokenType),
|
sl@0
|
211 |
T_TYPENAME = TOKEN_FROM_ID(360, KeywordTokenType),
|
sl@0
|
212 |
T_UNION = TOKEN_FROM_ID(361, KeywordTokenType),
|
sl@0
|
213 |
T_UNSIGNED = TOKEN_FROM_ID(362, KeywordTokenType),
|
sl@0
|
214 |
T_USING = TOKEN_FROM_ID(363, KeywordTokenType),
|
sl@0
|
215 |
T_VIRTUAL = TOKEN_FROM_ID(364, KeywordTokenType),
|
sl@0
|
216 |
T_VOID = TOKEN_FROM_ID(365, KeywordTokenType),
|
sl@0
|
217 |
T_VOLATILE = TOKEN_FROM_ID(366, KeywordTokenType),
|
sl@0
|
218 |
T_WCHART = TOKEN_FROM_ID(367, KeywordTokenType),
|
sl@0
|
219 |
T_WHILE = TOKEN_FROM_ID(368, KeywordTokenType),
|
sl@0
|
220 |
T_PP_DEFINE = TOKEN_FROM_ID(369, PPTokenType),
|
sl@0
|
221 |
T_PP_IF = TOKEN_FROM_ID(370, PPConditionalTokenType),
|
sl@0
|
222 |
T_PP_IFDEF = TOKEN_FROM_ID(371, PPConditionalTokenType),
|
sl@0
|
223 |
T_PP_IFNDEF = TOKEN_FROM_ID(372, PPConditionalTokenType),
|
sl@0
|
224 |
T_PP_ELSE = TOKEN_FROM_ID(373, PPConditionalTokenType),
|
sl@0
|
225 |
T_PP_ELIF = TOKEN_FROM_ID(374, PPConditionalTokenType),
|
sl@0
|
226 |
T_PP_ENDIF = TOKEN_FROM_ID(375, PPConditionalTokenType),
|
sl@0
|
227 |
T_PP_ERROR = TOKEN_FROM_ID(376, PPTokenType),
|
sl@0
|
228 |
T_PP_LINE = TOKEN_FROM_ID(377, PPTokenType),
|
sl@0
|
229 |
T_PP_PRAGMA = TOKEN_FROM_ID(378, PPTokenType),
|
sl@0
|
230 |
T_PP_UNDEF = TOKEN_FROM_ID(379, PPTokenType),
|
sl@0
|
231 |
T_PP_WARNING = TOKEN_FROM_ID(380, PPTokenType),
|
sl@0
|
232 |
T_IDENTIFIER = TOKEN_FROM_ID(381, IdentifierTokenType),
|
sl@0
|
233 |
T_OCTALINT = TOKEN_FROM_ID(382, IntegerLiteralTokenType),
|
sl@0
|
234 |
T_DECIMALINT = TOKEN_FROM_ID(383, IntegerLiteralTokenType),
|
sl@0
|
235 |
T_HEXAINT = TOKEN_FROM_ID(384, IntegerLiteralTokenType),
|
sl@0
|
236 |
T_INTLIT = TOKEN_FROM_ID(385, IntegerLiteralTokenType),
|
sl@0
|
237 |
T_LONGINTLIT = TOKEN_FROM_ID(386, IntegerLiteralTokenType),
|
sl@0
|
238 |
T_FLOATLIT = TOKEN_FROM_ID(387, FloatingLiteralTokenType),
|
sl@0
|
239 |
T_FIXEDPOINTLIT = TOKEN_FROM_ID(387, FloatingLiteralTokenType|AltTokenType), // IDL specific
|
sl@0
|
240 |
T_CCOMMENT = TOKEN_FROM_ID(388, WhiteSpaceTokenType|AltTokenType),
|
sl@0
|
241 |
T_CPPCOMMENT = TOKEN_FROM_ID(389, WhiteSpaceTokenType|AltTokenType),
|
sl@0
|
242 |
T_CHARLIT = TOKEN_FROM_ID(390, CharacterLiteralTokenType),
|
sl@0
|
243 |
T_STRINGLIT = TOKEN_FROM_ID(391, StringLiteralTokenType),
|
sl@0
|
244 |
T_CONTLINE = TOKEN_FROM_ID(392, EOLTokenType),
|
sl@0
|
245 |
T_SPACE = TOKEN_FROM_ID(393, WhiteSpaceTokenType),
|
sl@0
|
246 |
T_SPACE2 = TOKEN_FROM_ID(394, WhiteSpaceTokenType),
|
sl@0
|
247 |
T_NEWLINE = TOKEN_FROM_ID(395, EOLTokenType),
|
sl@0
|
248 |
T_GENERATEDNEWLINE = TOKEN_FROM_ID(395, EOLTokenType|AltTokenType),
|
sl@0
|
249 |
T_POUND_POUND = TOKEN_FROM_ID(396, OperatorTokenType),
|
sl@0
|
250 |
T_POUND_POUND_ALT = TOKEN_FROM_ID(396, OperatorTokenType|AltTokenType),
|
sl@0
|
251 |
T_POUND_POUND_TRIGRAPH = TOKEN_FROM_ID(396, OperatorTokenType|TriGraphTokenType),
|
sl@0
|
252 |
T_POUND = TOKEN_FROM_ID(397, OperatorTokenType),
|
sl@0
|
253 |
T_POUND_ALT = TOKEN_FROM_ID(397, OperatorTokenType|AltTokenType),
|
sl@0
|
254 |
T_POUND_TRIGRAPH = TOKEN_FROM_ID(397, OperatorTokenType|TriGraphTokenType),
|
sl@0
|
255 |
T_ANY = TOKEN_FROM_ID(398, UnknownTokenType),
|
sl@0
|
256 |
T_ANY_TRIGRAPH = TOKEN_FROM_ID(398, UnknownTokenType|TriGraphTokenType),
|
sl@0
|
257 |
T_PP_INCLUDE = TOKEN_FROM_ID(399, PPTokenType),
|
sl@0
|
258 |
T_PP_QHEADER = TOKEN_FROM_ID(400, PPTokenType),
|
sl@0
|
259 |
T_PP_HHEADER = TOKEN_FROM_ID(401, PPTokenType),
|
sl@0
|
260 |
T_PP_INCLUDE_NEXT = TOKEN_FROM_ID(399, PPTokenType|AltTokenType),
|
sl@0
|
261 |
T_PP_QHEADER_NEXT = TOKEN_FROM_ID(400, PPTokenType|AltTokenType),
|
sl@0
|
262 |
T_PP_HHEADER_NEXT = TOKEN_FROM_ID(401, PPTokenType|AltTokenType),
|
sl@0
|
263 |
T_EOF = TOKEN_FROM_ID(402, EOFTokenType), // end of file reached
|
sl@0
|
264 |
T_EOI = TOKEN_FROM_ID(403, EOFTokenType), // end of input reached
|
sl@0
|
265 |
T_PP_NUMBER = TOKEN_FROM_ID(404, InternalTokenType),
|
sl@0
|
266 |
|
sl@0
|
267 |
// MS extensions
|
sl@0
|
268 |
T_MSEXT_INT8 = TOKEN_FROM_ID(405, KeywordTokenType),
|
sl@0
|
269 |
T_MSEXT_INT16 = TOKEN_FROM_ID(406, KeywordTokenType),
|
sl@0
|
270 |
T_MSEXT_INT32 = TOKEN_FROM_ID(407, KeywordTokenType),
|
sl@0
|
271 |
T_MSEXT_INT64 = TOKEN_FROM_ID(408, KeywordTokenType),
|
sl@0
|
272 |
T_MSEXT_BASED = TOKEN_FROM_ID(409, KeywordTokenType),
|
sl@0
|
273 |
T_MSEXT_DECLSPEC = TOKEN_FROM_ID(410, KeywordTokenType),
|
sl@0
|
274 |
T_MSEXT_CDECL = TOKEN_FROM_ID(411, KeywordTokenType),
|
sl@0
|
275 |
T_MSEXT_FASTCALL = TOKEN_FROM_ID(412, KeywordTokenType),
|
sl@0
|
276 |
T_MSEXT_STDCALL = TOKEN_FROM_ID(413, KeywordTokenType),
|
sl@0
|
277 |
T_MSEXT_TRY = TOKEN_FROM_ID(414, KeywordTokenType),
|
sl@0
|
278 |
T_MSEXT_EXCEPT = TOKEN_FROM_ID(415, KeywordTokenType),
|
sl@0
|
279 |
T_MSEXT_FINALLY = TOKEN_FROM_ID(416, KeywordTokenType),
|
sl@0
|
280 |
T_MSEXT_LEAVE = TOKEN_FROM_ID(417, KeywordTokenType),
|
sl@0
|
281 |
T_MSEXT_INLINE = TOKEN_FROM_ID(418, KeywordTokenType),
|
sl@0
|
282 |
T_MSEXT_ASM = TOKEN_FROM_ID(419, KeywordTokenType),
|
sl@0
|
283 |
|
sl@0
|
284 |
T_MSEXT_PP_REGION = TOKEN_FROM_ID(420, PPTokenType),
|
sl@0
|
285 |
T_MSEXT_PP_ENDREGION = TOKEN_FROM_ID(421, PPTokenType),
|
sl@0
|
286 |
|
sl@0
|
287 |
T_LAST_TOKEN_ID,
|
sl@0
|
288 |
T_LAST_TOKEN = ID_FROM_TOKEN(T_LAST_TOKEN_ID),
|
sl@0
|
289 |
|
sl@0
|
290 |
// pseudo tokens to help streamlining macro replacement, these should not
|
sl@0
|
291 |
// returned from the lexer nor should these be returned from the pp-iterator
|
sl@0
|
292 |
T_NONREPLACABLE_IDENTIFIER = TOKEN_FROM_ID(T_LAST_TOKEN+1, IdentifierTokenType),
|
sl@0
|
293 |
T_PLACEHOLDER = TOKEN_FROM_ID(T_LAST_TOKEN+2, WhiteSpaceTokenType),
|
sl@0
|
294 |
T_PLACEMARKER = TOKEN_FROM_ID(T_LAST_TOKEN+3, InternalTokenType),
|
sl@0
|
295 |
T_PARAMETERBASE = TOKEN_FROM_ID(T_LAST_TOKEN+4, ParameterTokenType),
|
sl@0
|
296 |
T_EXTPARAMETERBASE = TOKEN_FROM_ID(T_LAST_TOKEN+5, ExtParameterTokenType)
|
sl@0
|
297 |
};
|
sl@0
|
298 |
|
sl@0
|
299 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
300 |
// redefine the TOKEN_FROM_ID macro to be more type safe
|
sl@0
|
301 |
#undef TOKEN_FROM_ID
|
sl@0
|
302 |
#define TOKEN_FROM_ID(id, cat) boost::wave::token_id((id) | (cat))
|
sl@0
|
303 |
|
sl@0
|
304 |
#undef ID_FROM_TOKEN
|
sl@0
|
305 |
#define ID_FROM_TOKEN(tok) ((tok) & ~boost::wave::TokenTypeMask)
|
sl@0
|
306 |
|
sl@0
|
307 |
#undef BASEID_FROM_TOKEN
|
sl@0
|
308 |
#define BASEID_FROM_TOKEN(tok) \
|
sl@0
|
309 |
boost::wave::token_id(((tok) & ~boost::wave::ExtTokenTypeMask)) \
|
sl@0
|
310 |
/**/
|
sl@0
|
311 |
#define BASE_TOKEN(tok) \
|
sl@0
|
312 |
boost::wave::token_id((tok) & boost::wave::MainTokenMask) \
|
sl@0
|
313 |
/**/
|
sl@0
|
314 |
#define CATEGORY_FROM_TOKEN(tok) ((tok) & boost::wave::TokenTypeMask)
|
sl@0
|
315 |
#define EXTCATEGORY_FROM_TOKEN(tok) ((tok) & boost::wave::ExtTokenTypeMask)
|
sl@0
|
316 |
#define IS_CATEGORY(tok, cat) \
|
sl@0
|
317 |
((CATEGORY_FROM_TOKEN(tok) == (cat)) ? true : false) \
|
sl@0
|
318 |
/**/
|
sl@0
|
319 |
#define IS_EXTCATEGORY(tok, cat) \
|
sl@0
|
320 |
((EXTCATEGORY_FROM_TOKEN(tok) == (cat)) ? true : false) \
|
sl@0
|
321 |
/**/
|
sl@0
|
322 |
|
sl@0
|
323 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
324 |
// return a token name
|
sl@0
|
325 |
BOOST_WAVE_DECL
|
sl@0
|
326 |
BOOST_WAVE_STRINGTYPE get_token_name(token_id tokid);
|
sl@0
|
327 |
|
sl@0
|
328 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
329 |
// return a token name
|
sl@0
|
330 |
BOOST_WAVE_DECL
|
sl@0
|
331 |
char const *get_token_value(token_id tokid);
|
sl@0
|
332 |
|
sl@0
|
333 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
334 |
} // namespace wave
|
sl@0
|
335 |
} // namespace boost
|
sl@0
|
336 |
|
sl@0
|
337 |
#endif // #if !defined(BOOST_WAVE_TOKEN_IDS_DEFINED)
|
sl@0
|
338 |
|
sl@0
|
339 |
// the suffix header occurs after all of the code
|
sl@0
|
340 |
#ifdef BOOST_HAS_ABI_HEADERS
|
sl@0
|
341 |
#include BOOST_ABI_SUFFIX
|
sl@0
|
342 |
#endif
|
sl@0
|
343 |
|
sl@0
|
344 |
#endif // !defined(TOKEN_IDS_HPP_414E9A58_F079_4789_8AFF_513815CE475B_INCLUDED)
|
sl@0
|
345 |
|