Debian Codegraph @

CodeLite/cpp_lexer.cpp

raw
1 #define yy_create_buffer cl_scope__create_buffer
2 #define yy_delete_buffer cl_scope__delete_buffer
3 #define yy_scan_buffer cl_scope__scan_buffer
4 #define yy_scan_string cl_scope__scan_string
5 #define yy_scan_bytes cl_scope__scan_bytes
6 #define yy_flex_debug cl_scope__flex_debug
7 #define yy_init_buffer cl_scope__init_buffer
8 #define yy_flush_buffer cl_scope__flush_buffer
9 #define yy_load_buffer_state cl_scope__load_buffer_state
10 #define yy_switch_to_buffer cl_scope__switch_to_buffer
11 #define yyin cl_scope_in
12 #define yyleng cl_scope_leng
13 #define yylex cl_scope_lex
14 #define yyout cl_scope_out
15 #define yyrestart cl_scope_restart
16 #define yytext cl_scope_text
17 #define yylineno cl_scope_lineno
18 #define yywrap cl_scope_wrap
19
20 /* A lexical scanner generated by flex */
21
22 /* Scanner skeleton version:
23 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
24 */
25
26 #define FLEX_SCANNER
27 #define YY_FLEX_MAJOR_VERSION 2
28 #define YY_FLEX_MINOR_VERSION 5
29
30 #include <stdio.h>
31
32
33 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
34 #ifdef c_plusplus
35 #ifndef __cplusplus
36 #define __cplusplus
37 #endif
38 #endif
39
40
41 #ifdef __cplusplus
42
43 #include <stdlib.h>
44 #include <unistd.h>
45
46 /* Use prototypes in function declarations. */
47 #define YY_USE_PROTOS
48
49 /* The "const" storage-class-modifier is valid. */
50 #define YY_USE_CONST
51
52 #else /* ! __cplusplus */
53
54 #if __STDC__
55
56 #define YY_USE_PROTOS
57 #define YY_USE_CONST
58
59 #endif /* __STDC__ */
60 #endif /* ! __cplusplus */
61
62 #ifdef __TURBOC__
63 #pragma warn -rch
64 #pragma warn -use
65 #include <io.h>
66 #include <stdlib.h>
67 #define YY_USE_CONST
68 #define YY_USE_PROTOS
69 #endif
70
71 #ifdef YY_USE_CONST
72 #define yyconst const
73 #else
74 #define yyconst
75 #endif
76
77
78 #ifdef YY_USE_PROTOS
79 #define YY_PROTO(proto) proto
80 #else
81 #define YY_PROTO(proto) ()
82 #endif
83
84 /* Returned upon end-of-file. */
85 #define YY_NULL 0
86
87 /* Promotes a possibly negative, possibly signed char to an unsigned
88 * integer for use as an array index. If the signed char is negative,
89 * we want to instead treat it as an 8-bit unsigned char, hence the
90 * double cast.
91 */
92 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
93
94 /* Enter a start condition. This macro really ought to take a parameter,
95 * but we do it the disgusting crufty way forced on us by the ()-less
96 * definition of BEGIN.
97 */
98 #define BEGIN yy_start = 1 + 2 *
99
100 /* Translate the current start state into a value that can be later handed
101 * to BEGIN to return to the state. The YYSTATE alias is for lex
102 * compatibility.
103 */
104 #define YY_START ((yy_start - 1) / 2)
105 #define YYSTATE YY_START
106
107 /* Action number for EOF rule of a given start state. */
108 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
109
110 /* Special action meaning "start processing a new file". */
111 #define YY_NEW_FILE yyrestart( yyin )
112
113 #define YY_END_OF_BUFFER_CHAR 0
114
115 /* Size of default input buffer. */
116 #define YY_BUF_SIZE 16384*5
117
118 typedef struct yy_buffer_state *YY_BUFFER_STATE;
119
120 extern int yyleng;
121 extern FILE *yyin, *yyout;
122
123 #define EOB_ACT_CONTINUE_SCAN 0
124 #define EOB_ACT_END_OF_FILE 1
125 #define EOB_ACT_LAST_MATCH 2
126
127 /* The funky do-while in the following #define is used to turn the definition
128 * int a single C statement (which needs a semi-colon terminator). This
129 * avoids problems with code like:
130 *
131 * if ( condition_holds )
132 * yyless( 5 );
133 * else
134 * do_something_else();
135 *
136 * Prior to using the do-while the compiler would get upset at the
137 * "else" because it interpreted the "if" statement as being all
138 * done when it reached the ';' after the yyless() call.
139 */
140
141 /* Return all but the first 'n' matched characters back to the input stream. */
142
143 #define yyless(n) \
144 do \
145 { \
146 /* Undo effects of setting up yytext. */ \
147 *yy_cp = yy_hold_char; \
148 YY_RESTORE_YY_MORE_OFFSET \
149 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
150 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
151 } \
152 while ( 0 )
153
154 #define unput(c) yyunput( c, yytext_ptr )
155
156 /* The following is because we cannot portably get our hands on size_t
157 * (without autoconf's help, which isn't available because we want
158 * flex-generated scanners to compile on their own).
159 */
160 typedef unsigned int yy_size_t;
161
162
163 struct yy_buffer_state
164 {
165 FILE *yy_input_file;
166
167 char *yy_ch_buf; /* input buffer */
168 char *yy_buf_pos; /* current position in input buffer */
169
170 /* Size of input buffer in bytes, not including room for EOB
171 * characters.
172 */
173 yy_size_t yy_buf_size;
174
175 /* Number of characters read into yy_ch_buf, not including EOB
176 * characters.
177 */
178 int yy_n_chars;
179
180 /* Whether we "own" the buffer - i.e., we know we created it,
181 * and can realloc() it to grow it, and should free() it to
182 * delete it.
183 */
184 int yy_is_our_buffer;
185
186 /* Whether this is an "interactive" input source; if so, and
187 * if we're using stdio for input, then we want to use getc()
188 * instead of fread(), to make sure we stop fetching input after
189 * each newline.
190 */
191 int yy_is_interactive;
192
193 /* Whether we're considered to be at the beginning of a line.
194 * If so, '^' rules will be active on the next match, otherwise
195 * not.
196 */
197 int yy_at_bol;
198
199 /* Whether to try to fill the input buffer when we reach the
200 * end of it.
201 */
202 int yy_fill_buffer;
203
204 int yy_buffer_status;
205 #define YY_BUFFER_NEW 0
206 #define YY_BUFFER_NORMAL 1
207 /* When an EOF's been seen but there's still some text to process
208 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
209 * shouldn't try reading from the input source any more. We might
210 * still have a bunch of tokens to match, though, because of
211 * possible backing-up.
212 *
213 * When we actually see the EOF, we change the status to "new"
214 * (via yyrestart()), so that the user can continue scanning by
215 * just pointing yyin at a new input file.
216 */
217 #define YY_BUFFER_EOF_PENDING 2
218 };
219
220 static YY_BUFFER_STATE yy_current_buffer = 0;
221
222 /* We provide macros for accessing buffer states in case in the
223 * future we want to put the buffer states in a more general
224 * "scanner state".
225 */
226 #define YY_CURRENT_BUFFER yy_current_buffer
227
228
229 /* yy_hold_char holds the character lost when yytext is formed. */
230 static char yy_hold_char;
231
232 static int yy_n_chars; /* number of characters read into yy_ch_buf */
233
234
235 int yyleng;
236
237 /* Points to current character in buffer. */
238 static char *yy_c_buf_p = (char *) 0;
239 static int yy_init = 1; /* whether we need to initialize */
240 static int yy_start = 0; /* start state number */
241
242 /* Flag which is used to allow yywrap()'s to do buffer switches
243 * instead of setting up a fresh yyin. A bit of a hack ...
244 */
245 static int yy_did_buffer_switch_on_eof;
246
247 void yyrestart YY_PROTO(( FILE *input_file ));
248
249 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
250 void yy_load_buffer_state YY_PROTO(( void ));
251 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
252 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
253 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
254 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
255 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
256
257 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
258 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
259 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
260
261 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
262 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
263 static void yy_flex_free YY_PROTO(( void * ));
264
265 #define yy_new_buffer yy_create_buffer
266
267 #define yy_set_interactive(is_interactive) \
268 { \
269 if ( ! yy_current_buffer ) \
270 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
271 yy_current_buffer->yy_is_interactive = is_interactive; \
272 }
273
274 #define yy_set_bol(at_bol) \
275 { \
276 if ( ! yy_current_buffer ) \
277 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
278 yy_current_buffer->yy_at_bol = at_bol; \
279 }
280
281 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
282
283
284 #define YY_USES_REJECT
285 typedef unsigned char YY_CHAR;
286 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
287 typedef int yy_state_type;
288 extern int yylineno;
289 int yylineno = 1;
290 extern char *yytext;
291 #define yytext_ptr yytext
292
293 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
294 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
295 static int yy_get_next_buffer YY_PROTO(( void ));
296 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
297
298 /* Done after the current pattern has been matched and before the
299 * corresponding action - sets up yytext.
300 */
301 #define YY_DO_BEFORE_ACTION \
302 yytext_ptr = yy_bp; \
303 yyleng = (int) (yy_cp - yy_bp); \
304 yy_hold_char = *yy_cp; \
305 *yy_cp = '\0'; \
306 yy_c_buf_p = yy_cp;
307
308 #define YY_NUM_RULES 149
309 #define YY_END_OF_BUFFER 150
310 static yyconst short int yy_acclist[652] =
311 { 0,
312 150, 136, 149, 3, 136, 149, 5, 149, 4, 136,
313 149, 100, 136, 149, 136, 149, 102, 136, 149, 95,
314 136, 149, 136, 149, 86, 136, 149, 87, 136, 149,
315 96, 136, 149, 97, 136, 149, 88, 136, 149, 98,
316 136, 149, 94, 136, 149, 101, 136, 149, 81, 136,
317 149, 80, 136, 149, 108, 136, 149, 109, 136, 149,
318 103, 136, 149, 110, 136, 149, 104, 136, 149, 107,
319 136, 149, 79, 136, 149, 79, 136, 149, 92, 136,
320 149, 93, 136, 149, 105, 136, 149, 79, 136, 149,
321 79, 136, 149, 79, 136, 149, 79, 136, 149, 79,
322
323 136, 149, 79, 136, 149, 79, 136, 149, 79, 136,
324 149, 79, 136, 149, 79, 136, 149, 79, 136, 149,
325 79, 136, 149, 79, 136, 149, 79, 136, 149, 79,
326 136, 149, 79, 136, 149, 79, 136, 149, 79, 136,
327 149, 79, 136, 149, 90, 136, 149, 106, 136, 149,
328 91, 136, 149, 99, 136, 149, 3, 136, 149, 89,
329 136, 149, 144, 149, 137, 149, 142, 144, 149, 138,
330 144, 149, 142, 144, 149, 143, 149, 140, 149, 141,
331 143, 149, 146, 149, 145, 149, 148, 149, 149, 148,
332 149, 3, 5, 4, 122, 85, 127, 123, 132, 125,
333
334 115, 128, 116, 129, 113, 111, 83, 1, 2, 126,
335 83, 81, 81, 81, 80, 80, 80, 112, 117, 119,
336 121, 120, 118, 79, 133, 79, 79, 79, 79, 79,
337 79, 79, 79, 79, 79, 15, 79, 79, 79, 79,
338 79, 79, 79, 79, 79, 79, 79, 26, 79, 79,
339 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
340 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
341 79, 79, 134, 124, 3, 89, 142, 142, 141, 147,
342 84, 114, 135, 83, 83, 81, 82, 80, 130, 131,
343 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
344
345 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
346 79, 79, 24, 79, 79, 79, 79, 79, 79, 79,
347 30, 79, 79, 79, 79, 57, 79, 79, 79, 79,
348 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
349 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
350 79, 79, 79, 79, 79, 142, 83, 82, 82, 79,
351 6, 79, 33, 79, 79, 8, 79, 79, 9, 79,
352 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
353 17, 79, 18, 79, 79, 20, 79, 79, 79, 79,
354 79, 79, 25, 79, 79, 79, 79, 79, 31, 79,
355
356 32, 79, 79, 79, 79, 79, 79, 79, 79, 79,
357 79, 79, 79, 79, 79, 79, 79, 79, 79, 65,
358 79, 79, 79, 79, 79, 79, 79, 79, 79, 47,
359 79, 79, 79, 142, 82, 79, 7, 79, 75, 79,
360 52, 79, 10, 79, 79, 79, 79, 79, 79, 79,
361 79, 79, 19, 79, 21, 79, 79, 61, 79, 23,
362 79, 79, 27, 79, 79, 79, 79, 79, 79, 79,
363 79, 79, 79, 79, 79, 79, 79, 79, 37, 79,
364 79, 79, 79, 79, 79, 79, 79, 74, 79, 79,
365 79, 79, 44, 79, 45, 79, 79, 73, 79, 79,
366
367 79, 49, 79, 142, 79, 79, 79, 79, 13, 79,
368 54, 79, 79, 79, 16, 79, 79, 22, 79, 55,
369 79, 28, 79, 79, 56, 79, 79, 79, 79, 79,
370 34, 79, 79, 79, 64, 79, 79, 79, 36, 79,
371 38, 79, 51, 79, 39, 79, 40, 79, 41, 79,
372 42, 79, 79, 50, 79, 79, 79, 79, 79, 79,
373 139, 142, 79, 79, 79, 12, 79, 14, 79, 79,
374 79, 79, 29, 79, 79, 79, 79, 79, 63, 79,
375 79, 79, 79, 79, 79, 43, 79, 79, 79, 66,
376 79, 79, 79, 79, 11, 79, 79, 79, 79, 79,
377
378 58, 79, 59, 79, 60, 79, 79, 35, 79, 79,
379 79, 67, 79, 68, 79, 46, 79, 48, 79, 79,
380 79, 78, 79, 77, 79, 79, 53, 79, 62, 79,
381 79, 79, 76, 79, 71, 79, 79, 79, 79, 79,
382 79, 70, 79, 69, 79, 79, 79, 79, 79, 72,
383 79
384 } ;
385
386 static yyconst short int yy_accept[494] =
387 { 0,
388 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
389 1, 2, 4, 7, 9, 12, 15, 17, 20, 23,
390 25, 28, 31, 34, 37, 40, 43, 46, 49, 52,
391 55, 58, 61, 64, 67, 70, 73, 76, 79, 82,
392 85, 88, 91, 94, 97, 100, 103, 106, 109, 112,
393 115, 118, 121, 124, 127, 130, 133, 136, 139, 142,
394 145, 148, 151, 154, 157, 160, 163, 165, 167, 170,
395 173, 176, 178, 180, 183, 185, 187, 189, 190, 192,
396 193, 194, 194, 195, 196, 196, 197, 197, 198, 199,
397 200, 200, 200, 201, 202, 203, 204, 205, 206, 207,
398
399 207, 208, 209, 210, 211, 212, 213, 213, 213, 214,
400 215, 215, 216, 217, 218, 219, 220, 221, 222, 223,
401 224, 225, 225, 225, 226, 227, 228, 229, 230, 231,
402 232, 233, 234, 235, 236, 238, 239, 240, 241, 242,
403 243, 244, 245, 246, 247, 248, 250, 251, 252, 253,
404 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
405 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
406 274, 275, 276, 277, 278, 279, 280, 281, 281, 281,
407 282, 282, 282, 283, 284, 284, 285, 285, 286, 287,
408 288, 289, 290, 291, 292, 293, 294, 295, 296, 297,
409
410 298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
411 308, 309, 310, 311, 312, 313, 315, 316, 317, 318,
412 319, 320, 321, 323, 324, 325, 326, 328, 329, 330,
413 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
414 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
415 351, 352, 353, 354, 355, 356, 357, 357, 357, 357,
416 357, 357, 358, 359, 360, 361, 363, 365, 366, 368,
417 369, 371, 372, 373, 374, 375, 376, 377, 378, 379,
418 380, 381, 383, 385, 386, 388, 389, 390, 391, 392,
419 393, 395, 396, 397, 398, 399, 401, 403, 404, 405,
420
421 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
422 416, 417, 418, 419, 420, 422, 423, 424, 425, 426,
423 427, 428, 429, 430, 432, 433, 434, 435, 435, 435,
424 435, 435, 436, 437, 439, 441, 443, 445, 446, 447,
425 448, 449, 450, 451, 452, 453, 455, 457, 458, 460,
426 462, 463, 465, 466, 467, 468, 469, 470, 471, 472,
427 473, 474, 475, 476, 477, 478, 479, 481, 482, 483,
428 484, 485, 486, 487, 488, 490, 491, 492, 493, 495,
429 497, 498, 500, 501, 502, 504, 505, 506, 507, 508,
430 509, 511, 513, 514, 515, 517, 518, 520, 522, 524,
431
432 525, 527, 528, 529, 530, 531, 533, 534, 535, 537,
433 538, 539, 541, 543, 545, 547, 549, 551, 553, 554,
434 556, 557, 558, 559, 560, 561, 563, 564, 565, 566,
435 568, 570, 571, 572, 573, 575, 576, 577, 578, 579,
436 581, 582, 583, 584, 585, 586, 588, 589, 590, 592,
437 593, 594, 595, 597, 598, 599, 600, 601, 603, 605,
438 607, 608, 610, 611, 612, 614, 616, 618, 620, 621,
439 622, 624, 626, 627, 629, 631, 632, 633, 635, 637,
440 638, 639, 640, 641, 642, 644, 646, 647, 648, 649,
441 650, 652, 652
442
443 } ;
444
445 static yyconst int yy_ec[256] =
446 { 0,
447 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
448 4, 5, 6, 1, 1, 1, 1, 1, 1, 1,
449 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
450 1, 7, 8, 9, 10, 1, 11, 12, 13, 14,
451 15, 16, 17, 18, 19, 20, 21, 22, 23, 23,
452 23, 23, 23, 23, 23, 24, 24, 25, 26, 27,
453 28, 29, 30, 1, 31, 31, 31, 31, 32, 33,
454 34, 34, 34, 34, 34, 35, 34, 34, 34, 34,
455 34, 34, 34, 34, 36, 34, 34, 37, 34, 34,
456 38, 39, 40, 41, 42, 1, 43, 44, 45, 46,
457
458 47, 48, 49, 50, 51, 34, 52, 53, 54, 55,
459 56, 57, 34, 58, 59, 60, 61, 62, 63, 64,
460 65, 66, 67, 68, 69, 70, 1, 1, 1, 1,
461 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
462 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
463 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
464 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
465 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
466 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
467 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
468
469 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
470 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
471 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
472 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
473 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
474 1, 1, 1, 1, 1
475 } ;
476
477 static yyconst int yy_meta[71] =
478 { 0,
479 1, 1, 2, 1, 1, 1, 1, 1, 3, 1,
480 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
481 1, 5, 5, 6, 1, 1, 1, 1, 1, 3,
482 6, 6, 6, 7, 7, 7, 7, 1, 3, 1,
483 1, 7, 5, 5, 6, 6, 6, 5, 7, 7,
484 7, 7, 7, 7, 8, 7, 7, 8, 7, 8,
485 7, 8, 7, 8, 7, 7, 1, 1, 1, 1
486 } ;
487
488 static yyconst short int yy_base[505] =
489 { 0,
490 0, 69, 79, 0, 149, 0, 857, 856, 217, 218,
491 858, 861, 220, 861, 233, 829, 219, 828, 217, 816,
492 861, 861, 826, 213, 861, 223, 233, 238, 247, 240,
493 828, 861, 45, 824, 46, 861, 0, 234, 861, 861,
494 823, 808, 788, 188, 235, 221, 249, 239, 792, 225,
495 247, 218, 248, 238, 800, 264, 269, 262, 267, 796,
496 861, 261, 861, 861, 333, 861, 861, 861, 0, 861,
497 798, 861, 861, 0, 861, 861, 861, 861, 823, 342,
498 861, 348, 354, 861, 303, 861, 303, 861, 861, 861,
499 293, 308, 861, 861, 861, 861, 861, 827, 861, 822,
500
501 341, 861, 861, 861, 358, 363, 380, 396, 305, 197,
502 0, 406, 335, 344, 861, 813, 861, 861, 861, 812,
503 0, 353, 800, 861, 792, 777, 780, 788, 18, 791,
504 790, 777, 280, 778, 769, 774, 318, 361, 770, 767,
505 771, 769, 766, 772, 762, 329, 372, 766, 765, 765,
506 755, 770, 769, 358, 771, 384, 758, 182, 365, 762,
507 758, 385, 757, 753, 388, 758, 750, 317, 756, 861,
508 861, 458, 861, 0, 758, 0, 861, 447, 0, 861,
509 427, 0, 861, 861, 454, 861, 457, 460, 861, 439,
510 861, 861, 861, 758, 748, 750, 759, 754, 755, 741,
511
512 739, 386, 445, 750, 401, 752, 752, 746, 746, 741,
513 737, 734, 742, 745, 744, 0, 739, 729, 737, 737,
514 729, 730, 0, 733, 730, 731, 0, 719, 718, 726,
515 712, 713, 719, 720, 715, 708, 710, 712, 719, 705,
516 703, 703, 705, 702, 704, 712, 711, 710, 700, 704,
517 699, 693, 706, 708, 697, 698, 476, 507, 481, 543,
518 467, 488, 436, 402, 703, 0, 0, 695, 0, 696,
519 0, 686, 684, 692, 681, 686, 680, 675, 684, 684,
520 682, 0, 0, 687, 0, 676, 675, 679, 671, 675,
521 0, 681, 681, 666, 671, 0, 0, 666, 681, 448,
522
523 669, 679, 674, 669, 660, 658, 659, 656, 668, 463,
524 663, 668, 667, 658, 0, 647, 667, 463, 660, 652,
525 657, 656, 643, 0, 643, 655, 646, 412, 0, 418,
526 0, 861, 647, 0, 0, 0, 657, 643, 644, 649,
527 648, 637, 636, 645, 640, 0, 0, 635, 0, 0,
528 643, 0, 640, 641, 639, 628, 624, 627, 631, 638,
529 620, 634, 633, 617, 629, 620, 0, 628, 613, 624,
530 626, 610, 619, 625, 0, 607, 619, 622, 0, 0,
531 609, 0, 620, 611, 0, 614, 601, 614, 597, 597,
532 610, 0, 599, 598, 0, 601, 0, 0, 0, 598,
533
534 0, 597, 583, 576, 571, 0, 562, 525, 0, 537,
535 525, 0, 0, 0, 0, 539, 0, 0, 520, 0,
536 531, 524, 530, 520, 519, 0, 514, 527, 522, 0,
537 0, 510, 506, 521, 0, 517, 503, 514, 512, 0,
538 511, 499, 492, 503, 500, 0, 498, 498, 0, 496,
539 495, 478, 0, 475, 474, 488, 485, 0, 0, 0,
540 482, 0, 469, 483, 0, 0, 0, 0, 480, 464,
541 0, 0, 479, 0, 0, 470, 455, 0, 0, 448,
542 442, 427, 398, 412, 0, 0, 333, 279, 250, 221,
543 0, 861, 591, 599, 607, 615, 619, 623, 627, 633,
544
545 639, 643, 645, 647
546 } ;
547
548 static yyconst short int yy_def[505] =
549 { 0,
550 492, 1, 492, 3, 492, 5, 493, 493, 494, 494,
551 492, 492, 492, 492, 492, 492, 495, 492, 492, 496,
552 492, 492, 492, 492, 492, 492, 492, 492, 492, 492,
553 492, 492, 492, 492, 492, 492, 497, 497, 492, 492,
554 492, 497, 497, 497, 497, 497, 497, 497, 497, 497,
555 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
556 492, 492, 492, 492, 492, 492, 492, 492, 498, 492,
557 498, 492, 492, 499, 492, 492, 492, 492, 492, 492,
558 492, 492, 492, 492, 495, 492, 500, 492, 492, 492,
559 496, 501, 492, 492, 492, 492, 492, 492, 492, 492,
560
561 492, 492, 492, 492, 492, 492, 492, 492, 492, 492,
562 502, 492, 492, 492, 492, 492, 492, 492, 492, 492,
563 497, 495, 496, 492, 497, 497, 497, 497, 497, 497,
564 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
565 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
566 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
567 497, 497, 497, 497, 497, 497, 497, 497, 497, 492,
568 492, 492, 492, 498, 498, 499, 492, 495, 503, 492,
569 496, 504, 492, 492, 492, 492, 492, 492, 492, 502,
570 492, 492, 492, 497, 497, 497, 497, 497, 497, 497,
571
572 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
573 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
574 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
575 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
576 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
577 497, 497, 497, 497, 497, 498, 495, 495, 496, 496,
578 492, 492, 492, 492, 497, 497, 497, 497, 497, 497,
579 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
580 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
581 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
582
583 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
584 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
585 497, 497, 497, 497, 497, 497, 498, 495, 258, 496,
586 260, 492, 497, 497, 497, 497, 497, 497, 497, 497,
587 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
588 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
589 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
590 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
591 497, 497, 497, 497, 497, 498, 497, 497, 497, 497,
592 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
593
594 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
595 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
596 497, 497, 497, 497, 497, 498, 497, 497, 497, 497,
597 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
598 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
599 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
600 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
601 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
602 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
603 497, 0, 492, 492, 492, 492, 492, 492, 492, 492,
604
605 492, 492, 492, 492
606 } ;
607
608 static yyconst short int yy_nxt[932] =
609 { 0,
610 12, 13, 14, 15, 15, 15, 13, 16, 17, 12,
611 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
612 28, 29, 30, 30, 31, 32, 33, 34, 35, 36,
613 37, 37, 37, 37, 38, 37, 37, 39, 12, 40,
614 41, 42, 43, 44, 45, 46, 47, 48, 49, 37,
615 50, 37, 51, 37, 52, 53, 54, 55, 56, 57,
616 58, 59, 60, 37, 37, 37, 61, 62, 63, 64,
617 65, 116, 117, 119, 120, 65, 198, 199, 66, 67,
618 67, 68, 67, 67, 67, 67, 67, 67, 67, 67,
619 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
620
621 67, 67, 67, 67, 67, 67, 67, 67, 67, 69,
622 69, 69, 69, 69, 69, 69, 67, 70, 67, 67,
623 69, 69, 69, 69, 71, 69, 69, 69, 69, 69,
624 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
625 69, 69, 69, 69, 69, 67, 67, 67, 67, 72,
626 72, 73, 72, 72, 72, 72, 72, 72, 72, 72,
627 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
628 72, 72, 72, 72, 72, 72, 72, 72, 72, 74,
629 74, 74, 74, 74, 74, 74, 72, 72, 72, 72,
630 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
631
632 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
633 74, 74, 74, 74, 74, 72, 72, 72, 72, 78,
634 78, 80, 81, 82, 82, 82, 80, 86, 89, 94,
635 238, 189, 79, 79, 82, 81, 83, 83, 83, 82,
636 95, 96, 122, 127, 90, 128, 123, 239, 99, 189,
637 97, 98, 100, 102, 101, 101, 101, 87, 103, 105,
638 150, 112, 112, 112, 151, 104, 105, 133, 106, 106,
639 107, 108, 146, 134, 113, 114, 135, 129, 108, 147,
640 491, 109, 110, 111, 130, 136, 108, 131, 170, 141,
641 132, 142, 113, 108, 143, 154, 144, 148, 155, 109,
642
643 114, 137, 149, 138, 152, 180, 139, 110, 490, 153,
644 111, 86, 140, 157, 158, 161, 165, 167, 162, 163,
645 166, 489, 168, 159, 178, 178, 160, 203, 171, 181,
646 181, 92, 204, 164, 172, 81, 82, 82, 82, 172,
647 189, 87, 173, 80, 81, 82, 82, 82, 80, 82,
648 81, 82, 82, 82, 82, 82, 81, 83, 83, 83,
649 82, 86, 101, 101, 101, 189, 179, 253, 208, 254,
650 191, 182, 185, 186, 219, 186, 209, 488, 191, 101,
651 101, 101, 105, 220, 106, 106, 107, 185, 186, 185,
652 186, 87, 186, 186, 108, 191, 191, 109, 110, 105,
653
654 230, 107, 107, 107, 185, 186, 210, 240, 231, 108,
655 186, 108, 187, 232, 187, 109, 221, 188, 188, 188,
656 86, 211, 241, 110, 222, 105, 108, 112, 112, 112,
657 180, 223, 234, 248, 235, 244, 332, 108, 249, 180,
658 113, 114, 245, 236, 273, 274, 250, 278, 259, 259,
659 87, 279, 108, 487, 332, 86, 92, 486, 113, 172,
660 81, 82, 82, 82, 172, 92, 114, 173, 257, 257,
661 261, 332, 261, 263, 264, 262, 262, 262, 188, 188,
662 188, 188, 188, 188, 86, 87, 485, 275, 262, 262,
663 262, 263, 186, 180, 186, 276, 332, 328, 328, 264,
664
665 358, 484, 330, 330, 369, 359, 483, 186, 377, 262,
666 262, 262, 186, 482, 87, 86, 481, 378, 370, 92,
667 186, 480, 186, 479, 478, 477, 476, 475, 329, 329,
668 329, 474, 473, 472, 471, 186, 470, 329, 329, 329,
669 186, 469, 468, 467, 466, 87, 465, 464, 463, 329,
670 329, 329, 329, 329, 329, 180, 462, 461, 460, 459,
671 458, 457, 456, 455, 331, 331, 331, 454, 453, 452,
672 451, 450, 449, 331, 331, 331, 448, 447, 446, 445,
673 444, 92, 443, 442, 441, 331, 331, 331, 331, 331,
674 331, 75, 75, 75, 75, 75, 75, 75, 75, 77,
675
676 77, 77, 77, 77, 77, 77, 77, 85, 440, 85,
677 85, 85, 85, 85, 85, 91, 439, 91, 438, 91,
678 91, 91, 91, 121, 121, 121, 121, 174, 174, 174,
679 174, 176, 176, 176, 176, 85, 85, 85, 437, 436,
680 85, 91, 91, 91, 435, 434, 91, 190, 190, 258,
681 258, 260, 260, 433, 432, 431, 430, 429, 428, 427,
682 426, 425, 424, 423, 422, 421, 420, 419, 418, 417,
683 416, 415, 414, 413, 412, 411, 410, 409, 408, 407,
684 406, 405, 404, 403, 402, 401, 400, 399, 398, 397,
685 396, 395, 394, 393, 392, 391, 390, 389, 388, 387,
686
687 386, 385, 384, 383, 382, 381, 380, 379, 376, 375,
688 374, 373, 372, 371, 368, 367, 366, 365, 364, 363,
689 362, 361, 360, 357, 356, 355, 354, 353, 352, 351,
690 350, 349, 348, 347, 346, 345, 344, 343, 342, 341,
691 340, 339, 338, 337, 336, 335, 334, 333, 327, 326,
692 325, 324, 323, 322, 321, 320, 319, 318, 317, 316,
693 315, 314, 313, 312, 311, 310, 309, 308, 307, 306,
694 305, 304, 303, 302, 301, 300, 299, 298, 297, 296,
695 295, 294, 293, 292, 291, 290, 289, 288, 287, 286,
696 285, 284, 283, 282, 281, 280, 277, 272, 271, 270,
697
698 269, 268, 267, 266, 265, 256, 255, 252, 251, 247,
699 246, 243, 242, 237, 233, 229, 228, 227, 226, 225,
700 224, 218, 217, 216, 215, 214, 213, 212, 207, 206,
701 205, 202, 201, 200, 197, 196, 195, 194, 92, 193,
702 192, 184, 183, 177, 175, 169, 156, 145, 126, 125,
703 124, 118, 115, 93, 92, 88, 84, 492, 76, 76,
704 11, 492, 492, 492, 492, 492, 492, 492, 492, 492,
705 492, 492, 492, 492, 492, 492, 492, 492, 492, 492,
706 492, 492, 492, 492, 492, 492, 492, 492, 492, 492,
707 492, 492, 492, 492, 492, 492, 492, 492, 492, 492,
708
709 492, 492, 492, 492, 492, 492, 492, 492, 492, 492,
710 492, 492, 492, 492, 492, 492, 492, 492, 492, 492,
711 492, 492, 492, 492, 492, 492, 492, 492, 492, 492,
712 492
713 } ;
714
715 static yyconst short int yy_chk[932] =
716 { 0,
717 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
718 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
719 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
720 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
721 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
722 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
723 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
724 2, 33, 33, 35, 35, 2, 129, 129, 2, 3,
725 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
726 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
727
728 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
729 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
730 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
731 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
732 3, 3, 3, 3, 3, 3, 3, 3, 3, 5,
733 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
734 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
735 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
736 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
737 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
738
739 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
740 5, 5, 5, 5, 5, 5, 5, 5, 5, 9,
741 10, 13, 13, 13, 13, 13, 13, 17, 19, 24,
742 158, 110, 9, 10, 15, 15, 15, 15, 15, 15,
743 24, 26, 38, 44, 19, 44, 38, 158, 27, 110,
744 26, 26, 27, 28, 27, 27, 27, 17, 28, 30,
745 52, 30, 30, 30, 52, 28, 29, 46, 29, 29,
746 29, 30, 50, 46, 30, 30, 46, 45, 29, 50,
747 490, 29, 29, 29, 45, 46, 30, 45, 62, 48,
748 45, 48, 30, 29, 48, 54, 48, 51, 54, 29,
749
750 30, 47, 51, 47, 53, 91, 47, 29, 489, 53,
751 29, 85, 47, 56, 56, 57, 58, 59, 57, 57,
752 58, 488, 59, 56, 87, 87, 56, 133, 62, 92,
753 92, 91, 133, 57, 65, 65, 65, 65, 65, 65,
754 109, 85, 65, 80, 80, 80, 80, 80, 80, 82,
755 82, 82, 82, 82, 82, 83, 83, 83, 83, 83,
756 83, 122, 101, 101, 101, 109, 87, 168, 137, 168,
757 113, 92, 101, 101, 146, 101, 137, 487, 114, 105,
758 105, 105, 106, 146, 106, 106, 106, 101, 101, 105,
759 105, 122, 105, 101, 106, 113, 114, 106, 106, 107,
760
761 154, 107, 107, 107, 105, 105, 138, 159, 154, 106,
762 105, 107, 108, 154, 108, 106, 147, 108, 108, 108,
763 328, 138, 159, 106, 147, 112, 107, 112, 112, 112,
764 330, 147, 156, 165, 156, 162, 264, 112, 165, 181,
765 112, 112, 162, 156, 202, 202, 165, 205, 181, 181,
766 328, 205, 112, 484, 264, 178, 330, 483, 112, 172,
767 172, 172, 172, 172, 172, 181, 112, 172, 178, 178,
768 185, 263, 185, 190, 190, 185, 185, 185, 187, 187,
769 187, 188, 188, 188, 257, 178, 482, 203, 261, 261,
770 261, 190, 188, 259, 188, 203, 263, 257, 257, 190,
771
772 300, 481, 259, 259, 310, 300, 480, 188, 318, 262,
773 262, 262, 188, 477, 257, 258, 476, 318, 310, 259,
774 262, 473, 262, 470, 469, 464, 463, 461, 258, 258,
775 258, 457, 456, 455, 454, 262, 452, 258, 258, 258,
776 262, 451, 450, 448, 447, 258, 445, 444, 443, 258,
777 258, 258, 258, 258, 258, 260, 442, 441, 439, 438,
778 437, 436, 434, 433, 260, 260, 260, 432, 429, 428,
779 427, 425, 424, 260, 260, 260, 423, 422, 421, 419,
780 416, 260, 411, 410, 408, 260, 260, 260, 260, 260,
781 260, 493, 493, 493, 493, 493, 493, 493, 493, 494,
782
783 494, 494, 494, 494, 494, 494, 494, 495, 407, 495,
784 495, 495, 495, 495, 495, 496, 405, 496, 404, 496,
785 496, 496, 496, 497, 497, 497, 497, 498, 498, 498,
786 498, 499, 499, 499, 499, 500, 500, 500, 403, 402,
787 500, 501, 501, 501, 400, 396, 501, 502, 502, 503,
788 503, 504, 504, 394, 393, 391, 390, 389, 388, 387,
789 386, 384, 383, 381, 378, 377, 376, 374, 373, 372,
790 371, 370, 369, 368, 366, 365, 364, 363, 362, 361,
791 360, 359, 358, 357, 356, 355, 354, 353, 351, 348,
792 345, 344, 343, 342, 341, 340, 339, 338, 337, 333,
793
794 327, 326, 325, 323, 322, 321, 320, 319, 317, 316,
795 314, 313, 312, 311, 309, 308, 307, 306, 305, 304,
796 303, 302, 301, 299, 298, 295, 294, 293, 292, 290,
797 289, 288, 287, 286, 284, 281, 280, 279, 278, 277,
798 276, 275, 274, 273, 272, 270, 268, 265, 256, 255,
799 254, 253, 252, 251, 250, 249, 248, 247, 246, 245,
800 244, 243, 242, 241, 240, 239, 238, 237, 236, 235,
801 234, 233, 232, 231, 230, 229, 228, 226, 225, 224,
802 222, 221, 220, 219, 218, 217, 215, 214, 213, 212,
803 211, 210, 209, 208, 207, 206, 204, 201, 200, 199,
804
805 198, 197, 196, 195, 194, 175, 169, 167, 166, 164,
806 163, 161, 160, 157, 155, 153, 152, 151, 150, 149,
807 148, 145, 144, 143, 142, 141, 140, 139, 136, 135,
808 134, 132, 131, 130, 128, 127, 126, 125, 123, 120,
809 116, 100, 98, 79, 71, 60, 55, 49, 43, 42,
810 41, 34, 31, 23, 20, 18, 16, 11, 8, 7,
811 492, 492, 492, 492, 492, 492, 492, 492, 492, 492,
812 492, 492, 492, 492, 492, 492, 492, 492, 492, 492,
813 492, 492, 492, 492, 492, 492, 492, 492, 492, 492,
814 492, 492, 492, 492, 492, 492, 492, 492, 492, 492,
815
816 492, 492, 492, 492, 492, 492, 492, 492, 492, 492,
817 492, 492, 492, 492, 492, 492, 492, 492, 492, 492,
818 492, 492, 492, 492, 492, 492, 492, 492, 492, 492,
819 492
820 } ;
821
822 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
823 static char *yy_full_match;
824 static int yy_lp;
825 #define REJECT \
826 { \
827 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
828 yy_cp = yy_full_match; /* restore poss. backed-over text */ \
829 ++yy_lp; \
830 goto find_rule; \
831 }
832 #define yymore() yymore_used_but_not_detected
833 #define YY_MORE_ADJ 0
834 #define YY_RESTORE_YY_MORE_OFFSET
835 char *yytext;
836 #define INITIAL 0
837 /* Included code before lex code */
838 /*************** Includes and Defines *****************************/
839
840
841 #include "map"
842 #include "cpp_lexer.h" // YACC generated definitions based on C++ grammar
843 #include "errno.h"
844
845 #define YYSTYPE std::string
846 #define ECHO
847
848 #include "string"
849 #include <stdlib.h>
850 #include <string.h>
851 #include <vector>
852
853 extern std::string cl_scope_lval;
854 extern std::string cl_var_lval;
855 extern std::string cl_func_lval;
856 extern std::string cl_typedef_lval;
857
858 std::vector<std::string> currentScope;
859
860 bool setLexerInput(const std::string &in, const std::map<std::string, std::string> &ignoreTokens);
861 void setUseIgnoreMacros(bool ignore);
862
863 std::string getCurrentScope();
864 void printScopeName();
865 void cl_scope_lex_clean();
866 void cl_scope_less(int count);
867
868 //we keep a very primitive map with only symbol name
869 //that we encountered so far
870 std::map<std::string, std::string> g_symbols;
871 std::map<std::string, std::string> g_macros;
872
873 static std::map<std::string, std::string> g_ignoreList;
874 static bool gs_useMacroIgnore = true;
875
876 bool isaTYPE(char *string);
877 bool isaMACRO(char *string);
878 bool isignoredToken(char *string);
879
880 static bool defineFound = false;
881
882 /* Prototypes */
883 #define WHITE_RETURN(x) /* do nothing */
884
885 #define PA_KEYWORD_RETURN(x) RETURN_VAL(x) /* standard C PArser Keyword */
886 #define CPP_KEYWORD_RETURN(x) PA_KEYWORD_RETURN(x) /* C++ keyword */
887 #define PPPA_KEYWORD_RETURN(x) RETURN_VAL(x) /* both PreProcessor and PArser keyword */
888 #define PP_KEYWORD_RETURN(x) IDENTIFIER_RETURN()
889
890 #define IDENTIFIER_RETURN(){\
891 if(isaTYPE(yytext)){\
892 RETURN_VAL(LE_TYPEDEFname);\
893 }else if(isaMACRO(yytext)){\
894 RETURN_VAL(LE_MACRO);\
895 }else if(isignoredToken(yytext)){\
896 }else{ RETURN_VAL(LE_IDENTIFIER);}\
897 }
898
899
900 #define PPOP_RETURN(x) RETURN_VAL((int)*yytext) /* PreProcess and Parser operator */
901 #define NAMED_PPOP_RETURN(x) RETURN_VAL(x)
902 #define ASCIIOP_RETURN(x) RETURN_VAL((int)*yytext) /* a single character operator */
903 #define NAMEDOP_RETURN(x) RETURN_VAL(x) /* a multichar operator, with a name */
904
905 #define NUMERICAL_RETURN(x) RETURN_VAL(x) /* some sort of constant */
906 #define LITERAL_RETURN(x) RETURN_VAL(x) /* a string literal */
907 #define C_COMMENT_RETURN(x) RETURN_VAL(x) /* C Style comment */
908 #define RETURN_VAL(x) {\
909 cl_scope_lval = yytext;\
910 cl_var_lval = yytext;\
911 cl_func_lval = yytext;\
912 cl_typedef_lval = yytext;\
913 return(x);}
914
915 #define PREPR 1
916
917 #define WRAP_PREP 2
918
919 #define CPP_COMMENT 3
920
921 #define C_COMMENT 4
922
923
924 /* Macros after this point can all be overridden by user definitions in
925 * section 1.
926 */
927
928 #ifndef YY_SKIP_YYWRAP
929 #ifdef __cplusplus
930 extern "C" int yywrap YY_PROTO(( void ));
931 #else
932 extern int yywrap YY_PROTO(( void ));
933 #endif
934 #endif
935
936 #ifndef YY_NO_UNPUT
937 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
938 #endif
939
940 #ifndef yytext_ptr
941 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
942 #endif
943
944 #ifdef YY_NEED_STRLEN
945 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
946 #endif
947
948 #ifndef YY_NO_INPUT
949 #ifdef __cplusplus
950 static int yyinput YY_PROTO(( void ));
951 #else
952 static int input YY_PROTO(( void ));
953 #endif
954 #endif
955
956 #if YY_STACK_USED
957 static int yy_start_stack_ptr = 0;
958 static int yy_start_stack_depth = 0;
959 static int *yy_start_stack = 0;
960 #ifndef YY_NO_PUSH_STATE
961 static void yy_push_state YY_PROTO(( int new_state ));
962 #endif
963 #ifndef YY_NO_POP_STATE
964 static void yy_pop_state YY_PROTO(( void ));
965 #endif
966 #ifndef YY_NO_TOP_STATE
967 static int yy_top_state YY_PROTO(( void ));
968 #endif
969
970 #else
971 #define YY_NO_PUSH_STATE 1
972 #define YY_NO_POP_STATE 1
973 #define YY_NO_TOP_STATE 1
974 #endif
975
976 #ifdef YY_MALLOC_DECL
977 YY_MALLOC_DECL
978 #else
979 #if __STDC__
980 #ifndef __cplusplus
981 #include <stdlib.h>
982 #endif
983 #else
984 /* Just try to get by without declaring the routines. This will fail
985 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
986 * or sizeof(void*) != sizeof(int).
987 */
988 #endif
989 #endif
990
991 /* Amount of stuff to slurp up with each read. */
992 #ifndef YY_READ_BUF_SIZE
993 #define YY_READ_BUF_SIZE 8192
994 #endif
995
996 /* Copy whatever the last rule matched to the standard output. */
997
998 #ifndef ECHO
999 /* This used to be an fputs(), but since the string might contain NUL's,
1000 * we now use fwrite().
1001 */
1002 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
1003 #endif
1004
1005 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1006 * is returned in "result".
1007 */
1008 #ifndef YY_INPUT
1009 #define YY_INPUT(buf,result,max_size) \
1010 if ( yy_current_buffer->yy_is_interactive ) \
1011 { \
1012 int c = '*', n; \
1013 for ( n = 0; n < max_size && \
1014 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1015 buf[n] = (char) c; \
1016 if ( c == '\n' ) \
1017 buf[n++] = (char) c; \
1018 if ( c == EOF && ferror( yyin ) ) \
1019 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1020 result = n; \
1021 } \
1022 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
1023 && ferror( yyin ) ) \
1024 YY_FATAL_ERROR( "input in flex scanner failed" );
1025 #endif
1026
1027 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1028 * we don't want an extra ';' after the "return" because that will cause
1029 * some compilers to complain about unreachable statements.
1030 */
1031 #ifndef yyterminate
1032 #define yyterminate() return YY_NULL
1033 #endif
1034
1035 /* Number of entries by which start-condition stack grows. */
1036 #ifndef YY_START_STACK_INCR
1037 #define YY_START_STACK_INCR 25
1038 #endif
1039
1040 /* Report a fatal error. */
1041 #ifndef YY_FATAL_ERROR
1042 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1043 #endif
1044
1045 /* Default declaration of generated scanner - a define so the user can
1046 * easily add parameters.
1047 */
1048 #ifndef YY_DECL
1049 #define YY_DECL int yylex YY_PROTO(( void ))
1050 #endif
1051
1052 /* Code executed at the beginning of each rule, after yytext and yyleng
1053 * have been set up.
1054 */
1055 #ifndef YY_USER_ACTION
1056 #define YY_USER_ACTION
1057 #endif
1058
1059 /* Code executed at the end of each rule. */
1060 #ifndef YY_BREAK
1061 #define YY_BREAK break;
1062 #endif
1063
1064 #define YY_RULE_SETUP \
1065 if ( yyleng > 0 ) \
1066 yy_current_buffer->yy_at_bol = \
1067 (yytext[yyleng - 1] == '\n'); \
1068 YY_USER_ACTION
1069
1070 YY_DECL
1071 {
1072 register yy_state_type yy_current_state;
1073 register char *yy_cp, *yy_bp;
1074 register int yy_act;
1075
1076
1077
1078
1079 if ( yy_init )
1080 {
1081 yy_init = 0;
1082
1083 #ifdef YY_USER_INIT
1084 YY_USER_INIT;
1085 #endif
1086
1087 if ( ! yy_start )
1088 yy_start = 1; /* first start state */
1089
1090 if ( ! yyin )
1091 yyin = stdin;
1092
1093 if ( ! yyout )
1094 yyout = stdout;
1095
1096 if ( ! yy_current_buffer )
1097 yy_current_buffer =
1098 yy_create_buffer( yyin, YY_BUF_SIZE );
1099
1100 yy_load_buffer_state();
1101 }
1102
1103 while ( 1 ) /* loops until end-of-file is reached */
1104 {
1105 yy_cp = yy_c_buf_p;
1106
1107 /* Support of yytext. */
1108 *yy_cp = yy_hold_char;
1109
1110 /* yy_bp points to the position in yy_ch_buf of the start of
1111 * the current run.
1112 */
1113 yy_bp = yy_cp;
1114
1115 yy_current_state = yy_start;
1116 yy_current_state += YY_AT_BOL();
1117 yy_state_ptr = yy_state_buf;
1118 *yy_state_ptr++ = yy_current_state;
1119 yy_match:
1120 do
1121 {
1122 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1123 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1124 {
1125 yy_current_state = (int) yy_def[yy_current_state];
1126 if ( yy_current_state >= 493 )
1127 yy_c = yy_meta[(unsigned int) yy_c];
1128 }
1129 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1130 *yy_state_ptr++ = yy_current_state;
1131 ++yy_cp;
1132 }
1133 while ( yy_base[yy_current_state] != 861 );
1134
1135 yy_find_action:
1136 yy_current_state = *--yy_state_ptr;
1137 yy_lp = yy_accept[yy_current_state];
1138 find_rule: /* we branch to this label when backing up */
1139 for ( ; ; ) /* until we find what rule we matched */
1140 {
1141 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
1142 {
1143 yy_act = yy_acclist[yy_lp];
1144 {
1145 yy_full_match = yy_cp;
1146 break;
1147 }
1148 }
1149 --yy_cp;
1150 yy_current_state = *--yy_state_ptr;
1151 yy_lp = yy_accept[yy_current_state];
1152 }
1153
1154 YY_DO_BEFORE_ACTION;
1155
1156 if ( yy_act != YY_END_OF_BUFFER )
1157 {
1158 int yyl;
1159 for ( yyl = 0; yyl < yyleng; ++yyl )
1160 if ( yytext[yyl] == '\n' )
1161 ++yylineno;
1162 }
1163
1164 do_action: /* This label is used only to access EOF actions. */
1165
1166
1167 switch ( yy_act )
1168 { /* beginning of action switch */
1169 case 1:
1170 YY_RULE_SETUP
1171 {
1172 BEGIN C_COMMENT;
1173 }
1174 YY_BREAK
1175 case 2:
1176 YY_RULE_SETUP
1177 {
1178 BEGIN CPP_COMMENT;
1179 }
1180 YY_BREAK
1181 case 3:
1182 YY_RULE_SETUP
1183 {
1184 WHITE_RETURN(' ');
1185 }
1186 YY_BREAK
1187 case 4:
1188 YY_RULE_SETUP
1189 {
1190 WHITE_RETURN(' ');
1191 }
1192 YY_BREAK
1193 case 5:
1194 YY_RULE_SETUP
1195 {
1196 WHITE_RETURN('\n');
1197 }
1198 YY_BREAK
1199 case 6:
1200 YY_RULE_SETUP
1201 {PA_KEYWORD_RETURN(LE_AUTO);}
1202 YY_BREAK
1203 case 7:
1204 YY_RULE_SETUP
1205 {PA_KEYWORD_RETURN(LE_BREAK);}
1206 YY_BREAK
1207 case 8:
1208 YY_RULE_SETUP
1209 {PA_KEYWORD_RETURN(LE_CASE);}
1210 YY_BREAK
1211 case 9:
1212 YY_RULE_SETUP
1213 {PA_KEYWORD_RETURN(LE_CHAR);}
1214 YY_BREAK
1215 case 10:
1216 YY_RULE_SETUP
1217 {PA_KEYWORD_RETURN(LE_CONST);}
1218 YY_BREAK
1219 case 11:
1220 YY_RULE_SETUP
1221 {PA_KEYWORD_RETURN(LE_CONTINUE);}
1222 YY_BREAK
1223 case 12:
1224 YY_RULE_SETUP
1225 {PA_KEYWORD_RETURN(LE_DEFAULT);}
1226 YY_BREAK
1227 case 13:
1228 YY_RULE_SETUP
1229 {PP_KEYWORD_RETURN(LE_DEFINE);}
1230 YY_BREAK
1231 case 14:
1232 YY_RULE_SETUP
1233 {PP_KEYWORD_RETURN(LE_OPDEFINED);}
1234 YY_BREAK
1235 case 15:
1236 YY_RULE_SETUP
1237 {PA_KEYWORD_RETURN(LE_DO);}
1238 YY_BREAK
1239 case 16:
1240 YY_RULE_SETUP
1241 {PA_KEYWORD_RETURN(LE_DOUBLE);}
1242 YY_BREAK
1243 case 17:
1244 YY_RULE_SETUP
1245 {PP_KEYWORD_RETURN(LE_ELIF);}
1246 YY_BREAK
1247 case 18:
1248 YY_RULE_SETUP
1249 {PPPA_KEYWORD_RETURN(LE_ELSE);}
1250 YY_BREAK
1251 case 19:
1252 YY_RULE_SETUP
1253 {PP_KEYWORD_RETURN(LE_ENDIF);}
1254 YY_BREAK
1255 case 20:
1256 YY_RULE_SETUP
1257 {PA_KEYWORD_RETURN(LE_ENUM);}
1258 YY_BREAK
1259 case 21:
1260 YY_RULE_SETUP
1261 {PP_KEYWORD_RETURN(LE_ERROR);}
1262 YY_BREAK
1263 case 22:
1264 YY_RULE_SETUP
1265 {PA_KEYWORD_RETURN(LE_EXTERN);}
1266 YY_BREAK
1267 case 23:
1268 YY_RULE_SETUP
1269 {PA_KEYWORD_RETURN(LE_FLOAT);}
1270 YY_BREAK
1271 case 24:
1272 YY_RULE_SETUP
1273 {PA_KEYWORD_RETURN(LE_FOR);}
1274 YY_BREAK
1275 case 25:
1276 YY_RULE_SETUP
1277 {PA_KEYWORD_RETURN(LE_GOTO);}
1278 YY_BREAK
1279 case 26:
1280 YY_RULE_SETUP
1281 {PPPA_KEYWORD_RETURN(LE_IF);}
1282 YY_BREAK
1283 case 27:
1284 YY_RULE_SETUP
1285 {PP_KEYWORD_RETURN(LE_IFDEF);}
1286 YY_BREAK
1287 case 28:
1288 YY_RULE_SETUP
1289 {PP_KEYWORD_RETURN(LE_IFNDEF);}
1290 YY_BREAK
1291 case 29:
1292 YY_RULE_SETUP
1293 {PP_KEYWORD_RETURN(LE_INCLUDE); }
1294 YY_BREAK
1295 case 30:
1296 YY_RULE_SETUP
1297 {PA_KEYWORD_RETURN(LE_INT);}
1298 YY_BREAK
1299 case 31:
1300 YY_RULE_SETUP
1301 {PP_KEYWORD_RETURN(LE_LINE);}
1302 YY_BREAK
1303 case 32:
1304 YY_RULE_SETUP
1305 {PA_KEYWORD_RETURN(LE_LONG);}
1306 YY_BREAK
1307 case 33:
1308 YY_RULE_SETUP
1309 {PA_KEYWORD_RETURN(LE_BOOL);}
1310 YY_BREAK
1311 case 34:
1312 YY_RULE_SETUP
1313 {PP_KEYWORD_RETURN(LE_PRAGMA);}
1314 YY_BREAK
1315 case 35:
1316 YY_RULE_SETUP
1317 {PA_KEYWORD_RETURN(LE_REGISTER);}
1318 YY_BREAK
1319 case 36:
1320 YY_RULE_SETUP
1321 {PA_KEYWORD_RETURN(LE_RETURN);}
1322 YY_BREAK
1323 case 37:
1324 YY_RULE_SETUP
1325 {PA_KEYWORD_RETURN(LE_SHORT);}
1326 YY_BREAK
1327 case 38:
1328 YY_RULE_SETUP
1329 {PA_KEYWORD_RETURN(LE_SIGNED);}
1330 YY_BREAK
1331 case 39:
1332 YY_RULE_SETUP
1333 {PA_KEYWORD_RETURN(LE_SIZEOF);}
1334 YY_BREAK
1335 case 40:
1336 YY_RULE_SETUP
1337 {PA_KEYWORD_RETURN(LE_STATIC);}
1338 YY_BREAK
1339 case 41:
1340 YY_RULE_SETUP
1341 {PA_KEYWORD_RETURN(LE_STRUCT);}
1342 YY_BREAK
1343 case 42:
1344 YY_RULE_SETUP
1345 {PA_KEYWORD_RETURN(LE_SWITCH);}
1346 YY_BREAK
1347 case 43:
1348 YY_RULE_SETUP
1349 {PA_KEYWORD_RETURN(LE_TYPEDEF);}
1350 YY_BREAK
1351 case 44:
1352 YY_RULE_SETUP
1353 {PP_KEYWORD_RETURN(LE_UNDEF);}
1354 YY_BREAK
1355 case 45:
1356 YY_RULE_SETUP
1357 {PA_KEYWORD_RETURN(LE_UNION);}
1358 YY_BREAK
1359 case 46:
1360 YY_RULE_SETUP
1361 {PA_KEYWORD_RETURN(LE_UNSIGNED);}
1362 YY_BREAK
1363 case 47:
1364 YY_RULE_SETUP
1365 {PA_KEYWORD_RETURN(LE_VOID);}
1366 YY_BREAK
1367 case 48:
1368 YY_RULE_SETUP
1369 {PA_KEYWORD_RETURN(LE_VOLATILE);}
1370 YY_BREAK
1371 case 49:
1372 YY_RULE_SETUP
1373 {PA_KEYWORD_RETURN(LE_WHILE);}
1374 YY_BREAK
1375 case 50:
1376 YY_RULE_SETUP
1377 {PA_KEYWORD_RETURN(LE_TIME_T);}
1378 YY_BREAK
1379 case 51:
1380 YY_RULE_SETUP
1381 {PA_KEYWORD_RETURN(LE_SIZE_T);}
1382 YY_BREAK
1383 case 52:
1384 YY_RULE_SETUP
1385 {CPP_KEYWORD_RETURN(LE_CLASS);}
1386 YY_BREAK
1387 case 53:
1388 YY_RULE_SETUP
1389 {CPP_KEYWORD_RETURN(LE_NAMESPACE);}
1390 YY_BREAK
1391 case 54:
1392 YY_RULE_SETUP
1393 {CPP_KEYWORD_RETURN(LE_DELETE);}
1394 YY_BREAK
1395 case 55:
1396 YY_RULE_SETUP
1397 {CPP_KEYWORD_RETURN(LE_FRIEND);}
1398 YY_BREAK
1399 case 56:
1400 YY_RULE_SETUP
1401 {CPP_KEYWORD_RETURN(LE_INLINE);}
1402 YY_BREAK
1403 case 57:
1404 YY_RULE_SETUP
1405 {CPP_KEYWORD_RETURN(LE_NEW);}
1406 YY_BREAK
1407 case 58:
1408 YY_RULE_SETUP
1409 {CPP_KEYWORD_RETURN(LE_OPERATOR);}
1410 YY_BREAK
1411 case 59:
1412 YY_RULE_SETUP
1413 {CPP_KEYWORD_RETURN(LE_OVERLOAD);}
1414 YY_BREAK
1415 case 60:
1416 YY_RULE_SETUP
1417 {CPP_KEYWORD_RETURN(LE_OVERRIDE);}
1418 YY_BREAK
1419 case 61:
1420 YY_RULE_SETUP
1421 {CPP_KEYWORD_RETURN(LE_FINAL);}
1422 YY_BREAK
1423 case 62:
1424 YY_RULE_SETUP
1425 {CPP_KEYWORD_RETURN(LE_PROTECTED);}
1426 YY_BREAK
1427 case 63:
1428 YY_RULE_SETUP
1429 {CPP_KEYWORD_RETURN(LE_PRIVATE);}
1430 YY_BREAK
1431 case 64:
1432 YY_RULE_SETUP
1433 {CPP_KEYWORD_RETURN(LE_PUBLIC);}
1434 YY_BREAK
1435 case 65:
1436 YY_RULE_SETUP
1437 {CPP_KEYWORD_RETURN(LE_THIS);}
1438 YY_BREAK
1439 case 66:
1440 YY_RULE_SETUP
1441 {CPP_KEYWORD_RETURN(LE_VIRTUAL);}
1442 YY_BREAK
1443 case 67:
1444 YY_RULE_SETUP
1445 {CPP_KEYWORD_RETURN(LE_TEMPLATE);}
1446 YY_BREAK
1447 case 68:
1448 YY_RULE_SETUP
1449 {CPP_KEYWORD_RETURN(LE_TYPENAME);}
1450 YY_BREAK
1451 case 69:
1452 YY_RULE_SETUP
1453 {CPP_KEYWORD_RETURN(LE_DYNAMIC_CAST);}
1454 YY_BREAK
1455 case 70:
1456 YY_RULE_SETUP
1457 {CPP_KEYWORD_RETURN(LE_STATIC_CAST);}
1458 YY_BREAK
1459 case 71:
1460 YY_RULE_SETUP
1461 {CPP_KEYWORD_RETURN(LE_CONST_CAST);}
1462 YY_BREAK
1463 case 72:
1464 YY_RULE_SETUP
1465 {CPP_KEYWORD_RETURN(LE_REINTERPRET_CAST);}
1466 YY_BREAK
1467 case 73:
1468 YY_RULE_SETUP
1469 {CPP_KEYWORD_RETURN(LE_USING);}
1470 YY_BREAK
1471 case 74:
1472 YY_RULE_SETUP
1473 {CPP_KEYWORD_RETURN(LE_THROW);}
1474 YY_BREAK
1475 case 75:
1476 YY_RULE_SETUP
1477 {CPP_KEYWORD_RETURN(LE_CATCH);}
1478 YY_BREAK
1479 case 76:
1480 YY_RULE_SETUP
1481 {CPP_KEYWORD_RETURN(LE_DECLSPEC);}
1482 YY_BREAK
1483 case 77:
1484 YY_RULE_SETUP
1485 {CPP_KEYWORD_RETURN(LE_DLLIMPORT);}
1486 YY_BREAK
1487 case 78:
1488 YY_RULE_SETUP
1489 {CPP_KEYWORD_RETURN(LE_DLLIEXPORT);}
1490 YY_BREAK
1491 case 79:
1492 YY_RULE_SETUP
1493 {IDENTIFIER_RETURN();}
1494 YY_BREAK
1495 case 80:
1496 YY_RULE_SETUP
1497 {NUMERICAL_RETURN(LE_INTEGERconstant);}
1498 YY_BREAK
1499 case 81:
1500 YY_RULE_SETUP
1501 {NUMERICAL_RETURN(LE_OCTALconstant);}
1502 YY_BREAK
1503 case 82:
1504 YY_RULE_SETUP
1505 {NUMERICAL_RETURN(LE_HEXconstant);}
1506 YY_BREAK
1507 case 83:
1508 YY_RULE_SETUP
1509 {NUMERICAL_RETURN(LE_FLOATINGconstant);}
1510 YY_BREAK
1511 case 84:
1512 YY_RULE_SETUP
1513 {
1514 NUMERICAL_RETURN(LE_CHARACTERconstant);
1515 }
1516 YY_BREAK
1517 case 85:
1518 YY_RULE_SETUP
1519 {
1520 LITERAL_RETURN(LE_STRINGliteral);}
1521 YY_BREAK
1522 case 86:
1523 YY_RULE_SETUP
1524 {PPOP_RETURN(LE_LP);}
1525 YY_BREAK
1526 case 87:
1527 YY_RULE_SETUP
1528 {PPOP_RETURN(LE_RP);}
1529 YY_BREAK
1530 case 88:
1531 YY_RULE_SETUP
1532 {PPOP_RETURN(LE_COMMA);}
1533 YY_BREAK
1534 case 89:
1535 YY_RULE_SETUP
1536 {BEGIN PREPR;}
1537 YY_BREAK
1538 case 90:
1539 YY_RULE_SETUP
1540 {ASCIIOP_RETURN(LE_LC);}
1541 YY_BREAK
1542 case 91:
1543 YY_RULE_SETUP
1544 {ASCIIOP_RETURN(LE_RC);}
1545 YY_BREAK
1546 case 92:
1547 YY_RULE_SETUP
1548 {ASCIIOP_RETURN(LE_LB);}
1549 YY_BREAK
1550 case 93:
1551 YY_RULE_SETUP
1552 {ASCIIOP_RETURN(LE_RB);}
1553 YY_BREAK
1554 case 94:
1555 YY_RULE_SETUP
1556 {ASCIIOP_RETURN(LE_DOT);}
1557 YY_BREAK
1558 case 95:
1559 YY_RULE_SETUP
1560 {ASCIIOP_RETURN(LE_AND);}
1561 YY_BREAK
1562 case 96:
1563 YY_RULE_SETUP
1564 {ASCIIOP_RETURN(LE_STAR);}
1565 YY_BREAK
1566 case 97:
1567 YY_RULE_SETUP
1568 {ASCIIOP_RETURN(LE_PLUS);}
1569 YY_BREAK
1570 case 98:
1571 YY_RULE_SETUP
1572 {ASCIIOP_RETURN(LE_MINUS);}
1573 YY_BREAK
1574 case 99:
1575 YY_RULE_SETUP
1576 {ASCIIOP_RETURN(LE_NEGATE);}
1577 YY_BREAK
1578 case 100:
1579 YY_RULE_SETUP
1580 {ASCIIOP_RETURN(LE_NOT);}
1581 YY_BREAK
1582 case 101:
1583 YY_RULE_SETUP
1584 {ASCIIOP_RETURN(LE_DIV);}
1585 YY_BREAK
1586 case 102:
1587 YY_RULE_SETUP
1588 {ASCIIOP_RETURN(LE_MOD);}
1589 YY_BREAK
1590 case 103:
1591 YY_RULE_SETUP
1592 {ASCIIOP_RETURN(LE_LT);}
1593 YY_BREAK
1594 case 104:
1595 YY_RULE_SETUP
1596 {ASCIIOP_RETURN(LE_GT);}
1597 YY_BREAK
1598 case 105:
1599 YY_RULE_SETUP
1600 {ASCIIOP_RETURN(LE_XOR);}
1601 YY_BREAK
1602 case 106:
1603 YY_RULE_SETUP
1604 {ASCIIOP_RETURN(LE_PIPE);}
1605 YY_BREAK
1606 case 107:
1607 YY_RULE_SETUP
1608 {ASCIIOP_RETURN(LE_QUESTION);}
1609 YY_BREAK
1610 case 108:
1611 YY_RULE_SETUP
1612 {ASCIIOP_RETURN(LE_COLON);}
1613 YY_BREAK
1614 case 109:
1615 YY_RULE_SETUP
1616 {ASCIIOP_RETURN(LE_SEMICOLON);}
1617 YY_BREAK
1618 case 110:
1619 YY_RULE_SETUP
1620 {ASCIIOP_RETURN(LE_ASSIGN);}
1621 YY_BREAK
1622 case 111:
1623 YY_RULE_SETUP
1624 {NAMEDOP_RETURN(LE_DOTstar);}
1625 YY_BREAK
1626 case 112:
1627 YY_RULE_SETUP
1628 {NAMEDOP_RETURN(LE_CLCL);}
1629 YY_BREAK
1630 case 113:
1631 YY_RULE_SETUP
1632 {NAMEDOP_RETURN(LE_ARROW);}
1633 YY_BREAK
1634 case 114:
1635 YY_RULE_SETUP
1636 {NAMEDOP_RETURN(LE_ARROWstar);}
1637 YY_BREAK
1638 case 115:
1639 YY_RULE_SETUP
1640 {NAMEDOP_RETURN(LE_ICR);}
1641 YY_BREAK
1642 case 116:
1643 YY_RULE_SETUP
1644 {NAMEDOP_RETURN(LE_DECR);}
1645 YY_BREAK
1646 case 117:
1647 YY_RULE_SETUP
1648 {NAMEDOP_RETURN(LE_LS);}
1649 YY_BREAK
1650 case 118:
1651 YY_RULE_SETUP
1652 {NAMEDOP_RETURN(LE_RS);}
1653 YY_BREAK
1654 case 119:
1655 YY_RULE_SETUP
1656 {NAMEDOP_RETURN(LE_LE);}
1657 YY_BREAK
1658 case 120:
1659 YY_RULE_SETUP
1660 {NAMEDOP_RETURN(LE_GE);}
1661 YY_BREAK
1662 case 121:
1663 YY_RULE_SETUP
1664 {NAMEDOP_RETURN(LE_EQ);}
1665 YY_BREAK
1666 case 122:
1667 YY_RULE_SETUP
1668 {NAMEDOP_RETURN(LE_NE);}
1669 YY_BREAK
1670 case 123:
1671 YY_RULE_SETUP
1672 {NAMEDOP_RETURN(LE_ANDAND);}
1673 YY_BREAK
1674 case 124:
1675 YY_RULE_SETUP
1676 {NAMEDOP_RETURN(LE_OROR);}
1677 YY_BREAK
1678 case 125:
1679 YY_RULE_SETUP
1680 {NAMEDOP_RETURN(LE_MULTassign);}
1681 YY_BREAK
1682 case 126:
1683 YY_RULE_SETUP
1684 {NAMEDOP_RETURN(LE_DIVassign);}
1685 YY_BREAK
1686 case 127:
1687 YY_RULE_SETUP
1688 {NAMEDOP_RETURN(LE_MODassign);}
1689 YY_BREAK
1690 case 128:
1691 YY_RULE_SETUP
1692 {NAMEDOP_RETURN(LE_PLUSassign);}
1693 YY_BREAK
1694 case 129:
1695 YY_RULE_SETUP
1696 {NAMEDOP_RETURN(LE_MINUSassign);}
1697 YY_BREAK
1698 case 130:
1699 YY_RULE_SETUP
1700 {NAMEDOP_RETURN(LE_LSassign);}
1701 YY_BREAK
1702 case 131:
1703 YY_RULE_SETUP
1704 {NAMEDOP_RETURN(LE_RSassign);}
1705 YY_BREAK
1706 case 132:
1707 YY_RULE_SETUP
1708 {NAMEDOP_RETURN(LE_ANDassign);}
1709 YY_BREAK
1710 case 133:
1711 YY_RULE_SETUP
1712 {NAMEDOP_RETURN(LE_ERassign);}
1713 YY_BREAK
1714 case 134:
1715 YY_RULE_SETUP
1716 {NAMEDOP_RETURN(LE_ORassign);}
1717 YY_BREAK
1718 case 135:
1719 YY_RULE_SETUP
1720 {NAMEDOP_RETURN(LE_ELLIPSIS);}
1721 YY_BREAK
1722 case YY_STATE_EOF(INITIAL):
1723 case YY_STATE_EOF(PREPR):
1724 case YY_STATE_EOF(WRAP_PREP):
1725 case YY_STATE_EOF(CPP_COMMENT):
1726 case YY_STATE_EOF(C_COMMENT):
1727 {
1728 //reset lexer
1729 yyterminate();
1730 }
1731 YY_BREAK
1732 case 136:
1733 YY_RULE_SETUP
1734 {return yytext[0];}
1735 YY_BREAK
1736 case 137:
1737 YY_RULE_SETUP
1738 {
1739 defineFound = false;
1740 BEGIN INITIAL;
1741 }
1742 YY_BREAK
1743 case 138:
1744 YY_RULE_SETUP
1745 {
1746 BEGIN WRAP_PREP;
1747 }
1748 YY_BREAK
1749 case 139:
1750 YY_RULE_SETUP
1751 {
1752 defineFound = true;
1753 }
1754 YY_BREAK
1755 case 140:
1756 YY_RULE_SETUP
1757 {
1758 BEGIN PREPR;
1759 }
1760 YY_BREAK
1761 case 141:
1762 YY_RULE_SETUP
1763 {
1764 if(defineFound)
1765 {
1766 defineFound = false;
1767 g_macros[yytext] = true;
1768 }
1769 }
1770 YY_BREAK
1771 case 142:
1772 YY_RULE_SETUP
1773 {
1774 if(defineFound)
1775 {
1776 defineFound = false;
1777 g_macros[yytext] = true;
1778 }
1779 }
1780 YY_BREAK
1781 case 143:
1782 YY_RULE_SETUP
1783 {}
1784 YY_BREAK
1785 case 144:
1786 YY_RULE_SETUP
1787 {}
1788 YY_BREAK
1789 case 145:
1790 YY_RULE_SETUP
1791 {BEGIN INITIAL;}
1792 YY_BREAK
1793 case 146:
1794 YY_RULE_SETUP
1795 {}
1796 YY_BREAK
1797 case 147:
1798 YY_RULE_SETUP
1799 {BEGIN INITIAL;}
1800 YY_BREAK
1801 case 148:
1802 YY_RULE_SETUP
1803 {}
1804 YY_BREAK
1805 case 149:
1806 YY_RULE_SETUP
1807 ECHO;
1808 YY_BREAK
1809
1810 case YY_END_OF_BUFFER:
1811 {
1812 /* Amount of text matched not including the EOB char. */
1813 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1814
1815 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1816 *yy_cp = yy_hold_char;
1817 YY_RESTORE_YY_MORE_OFFSET
1818
1819 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1820 {
1821 /* We're scanning a new file or input source. It's
1822 * possible that this happened because the user
1823 * just pointed yyin at a new source and called
1824 * yylex(). If so, then we have to assure
1825 * consistency between yy_current_buffer and our
1826 * globals. Here is the right place to do so, because
1827 * this is the first action (other than possibly a
1828 * back-up) that will match for the new input source.
1829 */
1830 yy_n_chars = yy_current_buffer->yy_n_chars;
1831 yy_current_buffer->yy_input_file = yyin;
1832 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1833 }
1834
1835 /* Note that here we test for yy_c_buf_p "<=" to the position
1836 * of the first EOB in the buffer, since yy_c_buf_p will
1837 * already have been incremented past the NUL character
1838 * (since all states make transitions on EOB to the
1839 * end-of-buffer state). Contrast this with the test
1840 * in input().
1841 */
1842 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1843 { /* This was really a NUL. */
1844 yy_state_type yy_next_state;
1845
1846 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1847
1848 yy_current_state = yy_get_previous_state();
1849
1850 /* Okay, we're now positioned to make the NUL
1851 * transition. We couldn't have
1852 * yy_get_previous_state() go ahead and do it
1853 * for us because it doesn't know how to deal
1854 * with the possibility of jamming (and we don't
1855 * want to build jamming into it because then it
1856 * will run more slowly).
1857 */
1858
1859 yy_next_state = yy_try_NUL_trans( yy_current_state );
1860
1861 yy_bp = yytext_ptr + YY_MORE_ADJ;
1862
1863 if ( yy_next_state )
1864 {
1865 /* Consume the NUL. */
1866 yy_cp = ++yy_c_buf_p;
1867 yy_current_state = yy_next_state;
1868 goto yy_match;
1869 }
1870
1871 else
1872 {
1873 yy_cp = yy_c_buf_p;
1874 goto yy_find_action;
1875 }
1876 }
1877
1878 else switch ( yy_get_next_buffer() )
1879 {
1880 case EOB_ACT_END_OF_FILE:
1881 {
1882 yy_did_buffer_switch_on_eof = 0;
1883
1884 if ( yywrap() )
1885 {
1886 /* Note: because we've taken care in
1887 * yy_get_next_buffer() to have set up
1888 * yytext, we can now set up
1889 * yy_c_buf_p so that if some total
1890 * hoser (like flex itself) wants to
1891 * call the scanner after we return the
1892 * YY_NULL, it'll still work - another
1893 * YY_NULL will get returned.
1894 */
1895 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1896
1897 yy_act = YY_STATE_EOF(YY_START);
1898 goto do_action;
1899 }
1900
1901 else
1902 {
1903 if ( ! yy_did_buffer_switch_on_eof )
1904 YY_NEW_FILE;
1905 }
1906 break;
1907 }
1908
1909 case EOB_ACT_CONTINUE_SCAN:
1910 yy_c_buf_p =
1911 yytext_ptr + yy_amount_of_matched_text;
1912
1913 yy_current_state = yy_get_previous_state();
1914
1915 yy_cp = yy_c_buf_p;
1916 yy_bp = yytext_ptr + YY_MORE_ADJ;
1917 goto yy_match;
1918
1919 case EOB_ACT_LAST_MATCH:
1920 yy_c_buf_p =
1921 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1922
1923 yy_current_state = yy_get_previous_state();
1924
1925 yy_cp = yy_c_buf_p;
1926 yy_bp = yytext_ptr + YY_MORE_ADJ;
1927 goto yy_find_action;
1928 }
1929 break;
1930 }
1931
1932 default:
1933 YY_FATAL_ERROR(
1934 "fatal flex scanner internal error--no action found" );
1935 } /* end of action switch */
1936 } /* end of scanning one token */
1937 } /* end of yylex */
1938
1939
1940 /* yy_get_next_buffer - try to read in a new buffer
1941 *
1942 * Returns a code representing an action:
1943 * EOB_ACT_LAST_MATCH -
1944 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1945 * EOB_ACT_END_OF_FILE - end of file
1946 */
1947
1948 static int yy_get_next_buffer()
1949 {
1950 register char *dest = yy_current_buffer->yy_ch_buf;
1951 register char *source = yytext_ptr;
1952 register int number_to_move, i;
1953 int ret_val;
1954
1955 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1956 YY_FATAL_ERROR(
1957 "fatal flex scanner internal error--end of buffer missed" );
1958
1959 if ( yy_current_buffer->yy_fill_buffer == 0 )
1960 { /* Don't try to fill the buffer, so this is an EOF. */
1961 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1962 {
1963 /* We matched a single character, the EOB, so
1964 * treat this as a final EOF.
1965 */
1966 return EOB_ACT_END_OF_FILE;
1967 }
1968
1969 else
1970 {
1971 /* We matched some text prior to the EOB, first
1972 * process it.
1973 */
1974 return EOB_ACT_LAST_MATCH;
1975 }
1976 }
1977
1978 /* Try to read more data. */
1979
1980 /* First move last chars to start of buffer. */
1981 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1982
1983 for ( i = 0; i < number_to_move; ++i )
1984 *(dest++) = *(source++);
1985
1986 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1987 /* don't do the read, it's not guaranteed to return an EOF,
1988 * just force an EOF
1989 */
1990 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1991
1992 else
1993 {
1994 int num_to_read =
1995 yy_current_buffer->yy_buf_size - number_to_move - 1;
1996
1997 while ( num_to_read <= 0 )
1998 { /* Not enough room in the buffer - grow it. */
1999 #ifdef YY_USES_REJECT
2000 YY_FATAL_ERROR(
2001 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2002 #else
2003
2004 /* just a shorter name for the current buffer */
2005 YY_BUFFER_STATE b = yy_current_buffer;
2006
2007 int yy_c_buf_p_offset =
2008 (int) (yy_c_buf_p - b->yy_ch_buf);
2009
2010 if ( b->yy_is_our_buffer )
2011 {
2012 int new_size = b->yy_buf_size * 2;
2013
2014 if ( new_size <= 0 )
2015 b->yy_buf_size += b->yy_buf_size / 8;
2016 else
2017 b->yy_buf_size *= 2;
2018
2019 b->yy_ch_buf = (char *)
2020 /* Include room in for 2 EOB chars. */
2021 yy_flex_realloc( (void *) b->yy_ch_buf,
2022 b->yy_buf_size + 2 );
2023 }
2024 else
2025 /* Can't grow it, we don't own it. */
2026 b->yy_ch_buf = 0;
2027
2028 if ( ! b->yy_ch_buf )
2029 YY_FATAL_ERROR(
2030 "fatal error - scanner input buffer overflow" );
2031
2032 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2033
2034 num_to_read = yy_current_buffer->yy_buf_size -
2035 number_to_move - 1;
2036 #endif
2037 }
2038
2039 if ( num_to_read > YY_READ_BUF_SIZE )
2040 num_to_read = YY_READ_BUF_SIZE;
2041
2042 /* Read in more data. */
2043 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
2044 yy_n_chars, num_to_read );
2045
2046 yy_current_buffer->yy_n_chars = yy_n_chars;
2047 }
2048
2049 if ( yy_n_chars == 0 )
2050 {
2051 if ( number_to_move == YY_MORE_ADJ )
2052 {
2053 ret_val = EOB_ACT_END_OF_FILE;
2054 yyrestart( yyin );
2055 }
2056
2057 else
2058 {
2059 ret_val = EOB_ACT_LAST_MATCH;
2060 yy_current_buffer->yy_buffer_status =
2061 YY_BUFFER_EOF_PENDING;
2062 }
2063 }
2064
2065 else
2066 ret_val = EOB_ACT_CONTINUE_SCAN;
2067
2068 yy_n_chars += number_to_move;
2069 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2070 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2071
2072 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
2073
2074 return ret_val;
2075 }
2076
2077
2078 /* yy_get_previous_state - get the state just before the EOB char was reached */
2079
2080 static yy_state_type yy_get_previous_state()
2081 {
2082 register yy_state_type yy_current_state;
2083 register char *yy_cp;
2084
2085 yy_current_state = yy_start;
2086 yy_current_state += YY_AT_BOL();
2087 yy_state_ptr = yy_state_buf;
2088 *yy_state_ptr++ = yy_current_state;
2089
2090 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
2091 {
2092 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2093 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2094 {
2095 yy_current_state = (int) yy_def[yy_current_state];
2096 if ( yy_current_state >= 493 )
2097 yy_c = yy_meta[(unsigned int) yy_c];
2098 }
2099 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2100 *yy_state_ptr++ = yy_current_state;
2101 }
2102
2103 return yy_current_state;
2104 }
2105
2106
2107 /* yy_try_NUL_trans - try to make a transition on the NUL character
2108 *
2109 * synopsis
2110 * next_state = yy_try_NUL_trans( current_state );
2111 */
2112
2113 #ifdef YY_USE_PROTOS
2114 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2115 #else
2116 static yy_state_type yy_try_NUL_trans( yy_current_state )
2117 yy_state_type yy_current_state;
2118 #endif
2119 {
2120 register int yy_is_jam;
2121
2122 register YY_CHAR yy_c = 1;
2123 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2124 {
2125 yy_current_state = (int) yy_def[yy_current_state];
2126 if ( yy_current_state >= 493 )
2127 yy_c = yy_meta[(unsigned int) yy_c];
2128 }
2129 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2130 yy_is_jam = (yy_current_state == 492);
2131 if ( ! yy_is_jam )
2132 *yy_state_ptr++ = yy_current_state;
2133
2134 return yy_is_jam ? 0 : yy_current_state;
2135 }
2136
2137
2138 #ifndef YY_NO_UNPUT
2139 #ifdef YY_USE_PROTOS
2140 static void yyunput( int c, register char *yy_bp )
2141 #else
2142 static void yyunput( c, yy_bp )
2143 int c;
2144 register char *yy_bp;
2145 #endif
2146 {
2147 register char *yy_cp = yy_c_buf_p;
2148
2149 /* undo effects of setting up yytext */
2150 *yy_cp = yy_hold_char;
2151
2152 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2153 { /* need to shift things up to make room */
2154 /* +2 for EOB chars. */
2155 register int number_to_move = yy_n_chars + 2;
2156 register char *dest = &yy_current_buffer->yy_ch_buf[
2157 yy_current_buffer->yy_buf_size + 2];
2158 register char *source =
2159 &yy_current_buffer->yy_ch_buf[number_to_move];
2160
2161 while ( source > yy_current_buffer->yy_ch_buf )
2162 *--dest = *--source;
2163
2164 yy_cp += (int) (dest - source);
2165 yy_bp += (int) (dest - source);
2166 yy_current_buffer->yy_n_chars =
2167 yy_n_chars = yy_current_buffer->yy_buf_size;
2168
2169 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2170 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2171 }
2172
2173 *--yy_cp = (char) c;
2174
2175 if ( c == '\n' )
2176 --yylineno;
2177
2178 yytext_ptr = yy_bp;
2179 yy_hold_char = *yy_cp;
2180 yy_c_buf_p = yy_cp;
2181 }
2182 #endif /* ifndef YY_NO_UNPUT */
2183
2184
2185 #ifdef __cplusplus
2186 static int yyinput()
2187 #else
2188 static int input()
2189 #endif
2190 {
2191 int c;
2192
2193 *yy_c_buf_p = yy_hold_char;
2194
2195 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2196 {
2197 /* yy_c_buf_p now points to the character we want to return.
2198 * If this occurs *before* the EOB characters, then it's a
2199 * valid NUL; if not, then we've hit the end of the buffer.
2200 */
2201 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2202 /* This was really a NUL. */
2203 *yy_c_buf_p = '\0';
2204
2205 else
2206 { /* need more input */
2207 int offset = yy_c_buf_p - yytext_ptr;
2208 ++yy_c_buf_p;
2209
2210 switch ( yy_get_next_buffer() )
2211 {
2212 case EOB_ACT_LAST_MATCH:
2213 /* This happens because yy_g_n_b()
2214 * sees that we've accumulated a
2215 * token and flags that we need to
2216 * try matching the token before
2217 * proceeding. But for input(),
2218 * there's no matching to consider.
2219 * So convert the EOB_ACT_LAST_MATCH
2220 * to EOB_ACT_END_OF_FILE.
2221 */
2222
2223 /* Reset buffer status. */
2224 yyrestart( yyin );
2225
2226 /* fall through */
2227
2228 case EOB_ACT_END_OF_FILE:
2229 {
2230 if ( yywrap() )
2231 return EOF;
2232
2233 if ( ! yy_did_buffer_switch_on_eof )
2234 YY_NEW_FILE;
2235 #ifdef __cplusplus
2236 return yyinput();
2237 #else
2238 return input();
2239 #endif
2240 }
2241
2242 case EOB_ACT_CONTINUE_SCAN:
2243 yy_c_buf_p = yytext_ptr + offset;
2244 break;
2245 }
2246 }
2247 }
2248
2249 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
2250 *yy_c_buf_p = '\0'; /* preserve yytext */
2251 yy_hold_char = *++yy_c_buf_p;
2252
2253 yy_current_buffer->yy_at_bol = (c == '\n');
2254 if ( yy_current_buffer->yy_at_bol )
2255 ++yylineno;
2256
2257 return c;
2258 }
2259
2260
2261 #ifdef YY_USE_PROTOS
2262 void yyrestart( FILE *input_file )
2263 #else
2264 void yyrestart( input_file )
2265 FILE *input_file;
2266 #endif
2267 {
2268 if ( ! yy_current_buffer )
2269 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2270
2271 yy_init_buffer( yy_current_buffer, input_file );
2272 yy_load_buffer_state();
2273 }
2274
2275
2276 #ifdef YY_USE_PROTOS
2277 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2278 #else
2279 void yy_switch_to_buffer( new_buffer )
2280 YY_BUFFER_STATE new_buffer;
2281 #endif
2282 {
2283 if ( yy_current_buffer == new_buffer )
2284 return;
2285
2286 if ( yy_current_buffer )
2287 {
2288 /* Flush out information for old buffer. */
2289 *yy_c_buf_p = yy_hold_char;
2290 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2291 yy_current_buffer->yy_n_chars = yy_n_chars;
2292 }
2293
2294 yy_current_buffer = new_buffer;
2295 yy_load_buffer_state();
2296
2297 /* We don't actually know whether we did this switch during
2298 * EOF (yywrap()) processing, but the only time this flag
2299 * is looked at is after yywrap() is called, so it's safe
2300 * to go ahead and always set it.
2301 */
2302 yy_did_buffer_switch_on_eof = 1;
2303 }
2304
2305
2306 #ifdef YY_USE_PROTOS
2307 void yy_load_buffer_state( void )
2308 #else
2309 void yy_load_buffer_state()
2310 #endif
2311 {
2312 yy_n_chars = yy_current_buffer->yy_n_chars;
2313 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2314 yyin = yy_current_buffer->yy_input_file;
2315 yy_hold_char = *yy_c_buf_p;
2316 }
2317
2318
2319 #ifdef YY_USE_PROTOS
2320 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2321 #else
2322 YY_BUFFER_STATE yy_create_buffer( file, size )
2323 FILE *file;
2324 int size;
2325 #endif
2326 {
2327 YY_BUFFER_STATE b;
2328
2329 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2330 if ( ! b )
2331 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2332
2333 b->yy_buf_size = size;
2334
2335 /* yy_ch_buf has to be 2 characters longer than the size given because
2336 * we need to put in 2 end-of-buffer characters.
2337 */
2338 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2339 if ( ! b->yy_ch_buf )
2340 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2341
2342 b->yy_is_our_buffer = 1;
2343
2344 yy_init_buffer( b, file );
2345
2346 return b;
2347 }
2348
2349
2350 #ifdef YY_USE_PROTOS
2351 void yy_delete_buffer( YY_BUFFER_STATE b )
2352 #else
2353 void yy_delete_buffer( b )
2354 YY_BUFFER_STATE b;
2355 #endif
2356 {
2357 if ( ! b )
2358 return;
2359
2360 if ( b == yy_current_buffer )
2361 yy_current_buffer = (YY_BUFFER_STATE) 0;
2362
2363 if ( b->yy_is_our_buffer )
2364 yy_flex_free( (void *) b->yy_ch_buf );
2365
2366 yy_flex_free( (void *) b );
2367 }
2368
2369
2370 #ifndef YY_ALWAYS_INTERACTIVE
2371 #ifndef YY_NEVER_INTERACTIVE
2372 extern int isatty YY_PROTO(( int ));
2373 #endif
2374 #endif
2375
2376 #ifdef YY_USE_PROTOS
2377 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2378 #else
2379 void yy_init_buffer( b, file )
2380 YY_BUFFER_STATE b;
2381 FILE *file;
2382 #endif
2383
2384
2385 {
2386 yy_flush_buffer( b );
2387
2388 b->yy_input_file = file;
2389 b->yy_fill_buffer = 1;
2390
2391 #if YY_ALWAYS_INTERACTIVE
2392 b->yy_is_interactive = 1;
2393 #else
2394 #if YY_NEVER_INTERACTIVE
2395 b->yy_is_interactive = 0;
2396 #else
2397 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2398 #endif
2399 #endif
2400 }
2401
2402
2403 #ifdef YY_USE_PROTOS
2404 void yy_flush_buffer( YY_BUFFER_STATE b )
2405 #else
2406 void yy_flush_buffer( b )
2407 YY_BUFFER_STATE b;
2408 #endif
2409
2410 {
2411 if ( ! b )
2412 return;
2413
2414 b->yy_n_chars = 0;
2415
2416 /* We always need two end-of-buffer characters. The first causes
2417 * a transition to the end-of-buffer state. The second causes
2418 * a jam in that state.
2419 */
2420 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2421 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2422
2423 b->yy_buf_pos = &b->yy_ch_buf[0];
2424
2425 b->yy_at_bol = 1;
2426 b->yy_buffer_status = YY_BUFFER_NEW;
2427
2428 if ( b == yy_current_buffer )
2429 yy_load_buffer_state();
2430 }
2431
2432
2433 #ifndef YY_NO_SCAN_BUFFER
2434 #ifdef YY_USE_PROTOS
2435 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2436 #else
2437 YY_BUFFER_STATE yy_scan_buffer( base, size )
2438 char *base;
2439 yy_size_t size;
2440 #endif
2441 {
2442 YY_BUFFER_STATE b;
2443
2444 if ( size < 2 ||
2445 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2446 base[size-1] != YY_END_OF_BUFFER_CHAR )
2447 /* They forgot to leave room for the EOB's. */
2448 return 0;
2449
2450 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2451 if ( ! b )
2452 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2453
2454 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2455 b->yy_buf_pos = b->yy_ch_buf = base;
2456 b->yy_is_our_buffer = 0;
2457 b->yy_input_file = 0;
2458 b->yy_n_chars = b->yy_buf_size;
2459 b->yy_is_interactive = 0;
2460 b->yy_at_bol = 1;
2461 b->yy_fill_buffer = 0;
2462 b->yy_buffer_status = YY_BUFFER_NEW;
2463
2464 yy_switch_to_buffer( b );
2465
2466 return b;
2467 }
2468 #endif
2469
2470
2471 #ifndef YY_NO_SCAN_STRING
2472 #ifdef YY_USE_PROTOS
2473 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2474 #else
2475 YY_BUFFER_STATE yy_scan_string( yy_str )
2476 yyconst char *yy_str;
2477 #endif
2478 {
2479 int len;
2480 for ( len = 0; yy_str[len]; ++len )
2481 ;
2482
2483 return yy_scan_bytes( yy_str, len );
2484 }
2485 #endif
2486
2487
2488 #ifndef YY_NO_SCAN_BYTES
2489 #ifdef YY_USE_PROTOS
2490 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2491 #else
2492 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2493 yyconst char *bytes;
2494 int len;
2495 #endif
2496 {
2497 YY_BUFFER_STATE b;
2498 char *buf;
2499 yy_size_t n;
2500 int i;
2501
2502 /* Get memory for full buffer, including space for trailing EOB's. */
2503 n = len + 2;
2504 buf = (char *) yy_flex_alloc( n );
2505 if ( ! buf )
2506 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2507
2508 for ( i = 0; i < len; ++i )
2509 buf[i] = bytes[i];
2510
2511 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2512
2513 b = yy_scan_buffer( buf, n );
2514 if ( ! b )
2515 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2516
2517 /* It's okay to grow etc. this buffer, and we should throw it
2518 * away when we're done.
2519 */
2520 b->yy_is_our_buffer = 1;
2521
2522 return b;
2523 }
2524 #endif
2525
2526
2527 #ifndef YY_NO_PUSH_STATE
2528 #ifdef YY_USE_PROTOS
2529 static void yy_push_state( int new_state )
2530 #else
2531 static void yy_push_state( new_state )
2532 int new_state;
2533 #endif
2534 {
2535 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2536 {
2537 yy_size_t new_size;
2538
2539 yy_start_stack_depth += YY_START_STACK_INCR;
2540 new_size = yy_start_stack_depth * sizeof( int );
2541
2542 if ( ! yy_start_stack )
2543 yy_start_stack = (int *) yy_flex_alloc( new_size );
2544
2545 else
2546 yy_start_stack = (int *) yy_flex_realloc(
2547 (void *) yy_start_stack, new_size );
2548
2549 if ( ! yy_start_stack )
2550 YY_FATAL_ERROR(
2551 "out of memory expanding start-condition stack" );
2552 }
2553
2554 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2555
2556 BEGIN(new_state);
2557 }
2558 #endif
2559
2560
2561 #ifndef YY_NO_POP_STATE
2562 static void yy_pop_state()
2563 {
2564 if ( --yy_start_stack_ptr < 0 )
2565 YY_FATAL_ERROR( "start-condition stack underflow" );
2566
2567 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2568 }
2569 #endif
2570
2571
2572 #ifndef YY_NO_TOP_STATE
2573 static int yy_top_state()
2574 {
2575 return yy_start_stack[yy_start_stack_ptr - 1];
2576 }
2577 #endif
2578
2579 #ifndef YY_EXIT_FAILURE
2580 #define YY_EXIT_FAILURE 2
2581 #endif
2582
2583 #ifdef YY_USE_PROTOS
2584 static void yy_fatal_error( yyconst char msg[] )
2585 #else
2586 static void yy_fatal_error( msg )
2587 char msg[];
2588 #endif
2589 {
2590 (void) fprintf( stderr, "%s\n", msg );
2591
2592 }
2593
2594
2595
2596 /* Redefine yyless() so it works in section 3 code. */
2597
2598 #undef yyless
2599 #define yyless(n) \
2600 do \
2601 { \
2602 /* Undo effects of setting up yytext. */ \
2603 yytext[yyleng] = yy_hold_char; \
2604 yy_c_buf_p = yytext + n; \
2605 yy_hold_char = *yy_c_buf_p; \
2606 *yy_c_buf_p = '\0'; \
2607 yyleng = n; \
2608 } \
2609 while ( 0 )
2610
2611
2612 /* Internal utility routines. */
2613
2614 #ifndef yytext_ptr
2615 #ifdef YY_USE_PROTOS
2616 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2617 #else
2618 static void yy_flex_strncpy( s1, s2, n )
2619 char *s1;
2620 yyconst char *s2;
2621 int n;
2622 #endif
2623 {
2624 register int i;
2625 for ( i = 0; i < n; ++i )
2626 s1[i] = s2[i];
2627 }
2628 #endif
2629
2630 #ifdef YY_NEED_STRLEN
2631 #ifdef YY_USE_PROTOS
2632 static int yy_flex_strlen( yyconst char *s )
2633 #else
2634 static int yy_flex_strlen( s )
2635 yyconst char *s;
2636 #endif
2637 {
2638 register int n;
2639 for ( n = 0; s[n]; ++n )
2640 ;
2641
2642 return n;
2643 }
2644 #endif
2645
2646
2647 #ifdef YY_USE_PROTOS
2648 static void *yy_flex_alloc( yy_size_t size )
2649 #else
2650 static void *yy_flex_alloc( size )
2651 yy_size_t size;
2652 #endif
2653 {
2654 return (void *) malloc( size );
2655 }
2656
2657 #ifdef YY_USE_PROTOS
2658 static void *yy_flex_realloc( void *ptr, yy_size_t size )
2659 #else
2660 static void *yy_flex_realloc( ptr, size )
2661 void *ptr;
2662 yy_size_t size;
2663 #endif
2664 {
2665 /* The cast to (char *) in the following accommodates both
2666 * implementations that use char* generic pointers, and those
2667 * that use void* generic pointers. It works with the latter
2668 * because both ANSI C and C++ allow castless assignment from
2669 * any pointer type to void*, and deal with argument conversions
2670 * as though doing an assignment.
2671 */
2672 return (void *) realloc( (char *) ptr, size );
2673 }
2674
2675 #ifdef YY_USE_PROTOS
2676 static void yy_flex_free( void *ptr )
2677 #else
2678 static void yy_flex_free( ptr )
2679 void *ptr;
2680 #endif
2681 {
2682 free( ptr );
2683 }
2684
2685 #if YY_MAIN
2686 int main()
2687 {
2688 yylex();
2689 return 0;
2690 }
2691 #endif
2692
2693
2694 bool isaTYPE(char *string)
2695 {
2696 return g_symbols.find(string) != g_symbols.end();
2697 }
2698
2699 bool isignoredToken(char *string)
2700 {
2701 std::map<std::string, std::string>::iterator iter = g_ignoreList.find(string);
2702 if(iter == g_ignoreList.end()){
2703 /* this string is not in the ignore macro list */
2704 return false;
2705 } else {
2706 /* it exist, but maybe it has a replacement */
2707 return iter->second.empty();
2708 }
2709 }
2710
2711 bool isaMACRO(char *string)
2712 {
2713 if(gs_useMacroIgnore) {
2714 return g_macros.find(string) != g_macros.end();
2715 }else{
2716 return false;
2717 }
2718 }
2719
2720 void cl_scope_lex_clean()
2721 {
2722 yy_flush_buffer(YY_CURRENT_BUFFER);
2723 yy_delete_buffer(YY_CURRENT_BUFFER);
2724 cl_scope_lineno = 1;
2725 currentScope.clear();
2726 g_symbols.clear();
2727 g_macros.clear();
2728 }
2729
2730 /**
2731 * scope util functions
2732 */
2733 void printScopeName()
2734 {
2735 /*
2736 if(currentScope.empty())
2737 {
2738 printf("%d: current scope is global scope\n", cl_scope_lineno );
2739 }
2740 else
2741 {
2742 printf("%d: current scope is %s\n", cl_scope_lineno, getCurrentScope().c_str());
2743 }
2744 */
2745 }
2746
2747 void increaseScope()
2748 {
2749 static int value = 0;
2750 std::string scopeName("__anon_");
2751
2752 char buf[100];
2753 sprintf(buf, "%d", value++);
2754 scopeName += buf;
2755 currentScope.push_back(scopeName);
2756 }
2757
2758 std::string getCurrentScope()
2759 {
2760 //format scope name
2761 std::string scope;
2762 if(currentScope.empty()){
2763 return "";
2764 }
2765
2766 std::vector<std::string> tmpscope(currentScope);
2767
2768 while( tmpscope.empty() == false ){
2769 std::string _scope = tmpscope.front();
2770 tmpscope.erase(tmpscope.begin());
2771
2772 if(_scope.find("__anon_") == (size_t)-1 && _scope.empty() == false){
2773 scope += _scope;
2774 scope += "::";
2775 }
2776 }
2777
2778 //remove the trailing '::'
2779 scope.erase(scope.find_last_not_of(":")+1);
2780 return scope;
2781 }
2782
2783 /*******************************************************************/
2784 bool setLexerInput(const std::string &in, const std::map<std::string, std::string> &ignoreTokens)
2785 {
2786 BEGIN INITIAL;
2787 yy_scan_string(in.c_str());
2788
2789 g_ignoreList = ignoreTokens;
2790
2791 //update the working file name
2792 return true;
2793 }
2794
2795 void setUseIgnoreMacros(bool ignore) {
2796 gs_useMacroIgnore = ignore;
2797 }
2798
2799 int yywrap(){
2800 return 1;
2801 }
2802
2803 void cl_scope_less(int count){
2804 yyless(count);
2805 }