Debian Codegraph @

CodeLite/lex.yy.cpp

raw
1 //////////////////////////////////////////////////////////////////////////////
2 //////////////////////////////////////////////////////////////////////////////
3 //
4 // copyright : (C) 2008 by Eran Ifrah
5 // file name : lex.yy.cpp
6 //
7 // -------------------------------------------------------------------------
8 // A
9 // _____ _ _ _ _
10 // / __ \ | | | | (_) |
11 // | / \/ ___ __| | ___| | _| |_ ___
12 // | | / _ \ / _ |/ _ \ | | | __/ _ )
13 // | \__/\ (_) | (_| | __/ |___| | || __/
14 // \____/\___/ \__,_|\___\_____/_|\__\___|
15 //
16 // F i l e
17 //
18 // This program is free software; you can redistribute it and/or modify
19 // it under the terms of the GNU General Public License as published by
20 // the Free Software Foundation; either version 2 of the License, or
21 // (at your option) any later version.
22 //
23 //////////////////////////////////////////////////////////////////////////////
24 //////////////////////////////////////////////////////////////////////////////
25 /* A lexical scanner generated by flex */
26
27 /* Scanner skeleton version:
28 * $Header: /CVS/wxUS/wxXtudio/Apps/USClient/lex.yy.cpp,v 1.3 2005/12/13 07:53:23 eran Exp $
29 */
30
31 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
32 #ifdef c_plusplus
33 #ifndef __cplusplus
34 #define __cplusplus
35 #endif
36 #endif
37
38 #ifdef __cplusplus
39 #include "precompiled_header.h"
40 #include <stdlib.h>
41 #include "unistd.h"
42 #include <iostream>
43
44 #include "FlexLexer.h"
45 #endif
46
47 namespace flex
48 {
49
50 #define FLEX_SCANNER
51 #define YY_FLEX_MAJOR_VERSION 2
52 #define YY_FLEX_MINOR_VERSION 5
53
54 #ifdef __cplusplus
55
56 /* Use prototypes in function declarations. */
57 #define YY_USE_PROTOS
58
59 /* The "const" storage-class-modifier is valid. */
60 #define YY_USE_CONST
61
62 #else /* ! __cplusplus */
63
64 #if __STDC__
65
66 #define YY_USE_PROTOS
67 #define YY_USE_CONST
68
69 #endif /* __STDC__ */
70 #endif /* ! __cplusplus */
71
72 #ifdef __TURBOC__
73 #pragma warn -rch
74 #pragma warn -use
75 #include <io.h>
76 #include <stdlib.h>
77 #define YY_USE_CONST
78 #define YY_USE_PROTOS
79 #endif
80
81 #ifdef YY_USE_CONST
82 #define yyconst const
83 #else
84 #define yyconst
85 #endif
86
87
88 #ifdef YY_USE_PROTOS
89 #define YY_PROTO(proto) proto
90 #else
91 #define YY_PROTO(proto) ()
92 #endif
93
94 /* Returned upon end-of-file. */
95 #define YY_NULL 0
96
97 /* Promotes a possibly negative, possibly signed char to an unsigned
98 * integer for use as an array index. If the signed char is negative,
99 * we want to instead treat it as an 8-bit unsigned char, hence the
100 * double cast.
101 */
102 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
103
104 /* Enter a start condition. This macro really ought to take a parameter,
105 * but we do it the disgusting crufty way forced on us by the ()-less
106 * definition of BEGIN.
107 */
108 #define BEGIN yy_start = 1 + 2 *
109
110 /* Translate the current start state into a value that can be later handed
111 * to BEGIN to return to the state. The YYSTATE alias is for lex
112 * compatibility.
113 */
114 #define YY_START ((yy_start - 1) / 2)
115 #define YYSTATE YY_START
116
117 /* Action number for EOF rule of a given start state. */
118 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
119
120 /* Special action meaning "start processing a new file". */
121 #define YY_NEW_FILE yyrestart( yyin )
122
123 #define YY_END_OF_BUFFER_CHAR 0
124
125 /* Size of default input buffer. */
126 #define YY_BUF_SIZE 16384
127
128 typedef struct yy_buffer_state *YY_BUFFER_STATE;
129
130 extern int yyleng;
131
132 #define EOB_ACT_CONTINUE_SCAN 0
133 #define EOB_ACT_END_OF_FILE 1
134 #define EOB_ACT_LAST_MATCH 2
135
136 /* The funky do-while in the following #define is used to turn the definition
137 * int a single C statement (which needs a semi-colon terminator). This
138 * avoids problems with code like:
139 *
140 * if ( condition_holds )
141 * yyless( 5 );
142 * else
143 * do_something_else();
144 *
145 * Prior to using the do-while the compiler would get upset at the
146 * "else" because it interpreted the "if" statement as being all
147 * done when it reached the ';' after the yyless() call.
148 */
149
150 /* Return all but the first 'n' matched characters back to the input stream. */
151
152 #define yyless(n) \
153 do \
154 { \
155 /* Undo effects of setting up yytext. */ \
156 *yy_cp = yy_hold_char; \
157 YY_RESTORE_YY_MORE_OFFSET \
158 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
159 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
160 } \
161 while ( 0 )
162
163 #define unput(c) yyunput( c, yytext_ptr )
164
165 /* The following is because we cannot portably get our hands on size_t
166 * (without autoconf's help, which isn't available because we want
167 * flex-generated scanners to compile on their own).
168 */
169 typedef unsigned int yy_size_t;
170
171
172 struct yy_buffer_state
173 {
174 std::istream* yy_input_file;
175
176 char *yy_ch_buf; /* input buffer */
177 char *yy_buf_pos; /* current position in input buffer */
178
179 /* Size of input buffer in bytes, not including room for EOB
180 * characters.
181 */
182 yy_size_t yy_buf_size;
183
184 /* Number of characters read into yy_ch_buf, not including EOB
185 * characters.
186 */
187 int yy_n_chars;
188
189 /* Whether we "own" the buffer - i.e., we know we created it,
190 * and can realloc() it to grow it, and should free() it to
191 * delete it.
192 */
193 int yy_is_our_buffer;
194
195 /* Whether this is an "interactive" input source; if so, and
196 * if we're using stdio for input, then we want to use getc()
197 * instead of fread(), to make sure we stop fetching input after
198 * each newline.
199 */
200 int yy_is_interactive;
201
202 /* Whether we're considered to be at the beginning of a line.
203 * If so, '^' rules will be active on the next match, otherwise
204 * not.
205 */
206 int yy_at_bol;
207
208 /* Whether to try to fill the input buffer when we reach the
209 * end of it.
210 */
211 int yy_fill_buffer;
212
213 int yy_buffer_status;
214 #define YY_BUFFER_NEW 0
215 #define YY_BUFFER_NORMAL 1
216 /* When an EOF's been seen but there's still some text to process
217 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
218 * shouldn't try reading from the input source any more. We might
219 * still have a bunch of tokens to match, though, because of
220 * possible backing-up.
221 *
222 * When we actually see the EOF, we change the status to "new"
223 * (via yyrestart()), so that the user can continue scanning by
224 * just pointing yyin at a new input file.
225 */
226 #define YY_BUFFER_EOF_PENDING 2
227
228 };
229
230
231 /* We provide macros for accessing buffer states in case in the
232 * future we want to put the buffer states in a more general
233 * "scanner state".
234 */
235 #define YY_CURRENT_BUFFER yy_current_buffer
236
237
238
239 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
240 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
241 static void yy_flex_free YY_PROTO(( void * ));
242
243 #define yy_new_buffer yy_create_buffer
244
245 #define yy_set_interactive(is_interactive) \
246 { \
247 if ( ! yy_current_buffer ) \
248 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
249 yy_current_buffer->yy_is_interactive = is_interactive; \
250 }
251
252 #define yy_set_bol(at_bol) \
253 { \
254 if ( ! yy_current_buffer ) \
255 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
256 yy_current_buffer->yy_at_bol = at_bol; \
257 }
258
259 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
260
261
262 #define YY_USES_REJECT
263 typedef unsigned char YY_CHAR;
264 #define yytext_ptr yytext
265 #define YY_INTERACTIVE
266
267 /* Done after the current pattern has been matched and before the
268 * corresponding action - sets up yytext.
269 */
270 #define YY_DO_BEFORE_ACTION \
271 yytext_ptr = yy_bp; \
272 yyleng = (int) (yy_cp - yy_bp); \
273 yy_hold_char = *yy_cp; \
274 *yy_cp = '\0'; \
275 yy_c_buf_p = yy_cp;
276
277 #define YY_NUM_RULES 121
278 #define YY_END_OF_BUFFER 122
279 static yyconst short int yy_acclist[493] =
280 { 0,
281 122, 120, 121, 3, 120, 121, 5, 121, 4, 120,
282 121, 84, 120, 121, 120, 121, 72, 120, 121, 86,
283 120, 121, 79, 120, 121, 120, 121, 69, 120, 121,
284 70, 120, 121, 80, 120, 121, 81, 120, 121, 71,
285 120, 121, 82, 120, 121, 78, 120, 121, 85, 120,
286 121, 64, 120, 121, 63, 120, 121, 92, 120, 121,
287 93, 120, 121, 87, 120, 121, 94, 120, 121, 88,
288 120, 121, 91, 120, 121, 62, 120, 121, 62, 120,
289 121, 76, 120, 121, 77, 120, 121, 89, 120, 121,
290 62, 120, 121, 62, 120, 121, 62, 120, 121, 62,
291
292 120, 121, 62, 120, 121, 62, 120, 121, 62, 120,
293 121, 62, 120, 121, 62, 120, 121, 62, 120, 121,
294 62, 120, 121, 62, 120, 121, 62, 120, 121, 62,
295 120, 121, 62, 120, 121, 62, 120, 121, 62, 120,
296 121, 62, 120, 121, 74, 120, 121, 90, 120, 121,
297 75, 120, 121, 83, 120, 121, 3, 5, 4, 106,
298 68, 73, 111, 107, 116, 109, 99, 112, 100, 113,
299 97, 95, 66, 1, 2, 110, 66, 64, 64, 64,
300 63, 63, 63, 96, 101, 103, 105, 104, 102, 62,
301 117, 62, 62, 62, 62, 62, 62, 62, 15, 62,
302
303 62, 62, 62, 62, 62, 62, 62, 62, 26, 62,
304 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
305 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
306 118, 108, 67, 98, 119, 66, 66, 64, 65, 63,
307 114, 115, 62, 62, 62, 62, 62, 62, 62, 62,
308 62, 62, 62, 62, 62, 62, 62, 62, 24, 62,
309 62, 62, 62, 62, 62, 62, 30, 62, 62, 62,
310 62, 54, 62, 62, 62, 62, 62, 62, 62, 62,
311 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
312 62, 62, 62, 62, 62, 62, 66, 65, 65, 6,
313
314 62, 62, 8, 62, 9, 62, 62, 62, 62, 62,
315 62, 62, 62, 17, 62, 18, 62, 62, 20, 62,
316 62, 62, 62, 62, 25, 62, 62, 62, 62, 62,
317 31, 62, 32, 62, 62, 62, 62, 62, 62, 62,
318 62, 62, 62, 62, 62, 62, 62, 62, 62, 60,
319 62, 62, 62, 62, 62, 62, 46, 62, 62, 62,
320 65, 7, 62, 49, 62, 10, 62, 62, 62, 62,
321 62, 62, 19, 62, 21, 62, 62, 23, 62, 62,
322 27, 62, 62, 62, 62, 62, 62, 62, 62, 62,
323 62, 62, 62, 62, 36, 62, 62, 62, 62, 62,
324
325 62, 62, 43, 62, 44, 62, 62, 62, 62, 48,
326 62, 62, 62, 13, 62, 51, 62, 16, 62, 22,
327 62, 52, 62, 28, 62, 62, 53, 62, 62, 62,
328 62, 33, 62, 62, 62, 59, 62, 62, 35, 62,
329 37, 62, 38, 62, 39, 62, 40, 62, 41, 62,
330 62, 62, 62, 62, 62, 12, 62, 14, 62, 29,
331 62, 62, 62, 62, 58, 62, 62, 62, 42, 62,
332 62, 61, 62, 62, 11, 62, 62, 55, 62, 56,
333 62, 62, 34, 62, 45, 62, 47, 62, 50, 62,
334 57, 62
335
336 } ;
337
338 static yyconst short int yy_accept[365] =
339 { 0,
340 1, 1, 1, 2, 4, 7, 9, 12, 15, 17,
341 20, 23, 26, 28, 31, 34, 37, 40, 43, 46,
342 49, 52, 55, 58, 61, 64, 67, 70, 73, 76,
343 79, 82, 85, 88, 91, 94, 97, 100, 103, 106,
344 109, 112, 115, 118, 121, 124, 127, 130, 133, 136,
345 139, 142, 145, 148, 151, 154, 157, 158, 159, 159,
346 160, 161, 161, 162, 162, 163, 164, 165, 166, 166,
347 166, 167, 168, 169, 170, 171, 172, 173, 173, 174,
348 175, 176, 177, 178, 179, 179, 179, 180, 181, 181,
349 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
350
351 191, 191, 192, 193, 194, 195, 196, 197, 198, 199,
352 201, 202, 203, 204, 205, 206, 207, 208, 209, 211,
353 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
354 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
355 232, 233, 233, 233, 234, 234, 234, 235, 236, 236,
356 237, 237, 238, 239, 240, 241, 242, 243, 244, 245,
357 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
358 256, 257, 258, 259, 261, 262, 263, 264, 265, 266,
359 267, 269, 270, 271, 272, 274, 275, 276, 277, 278,
360 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
361
362 289, 290, 291, 292, 293, 294, 295, 296, 297, 297,
363 297, 297, 297, 297, 298, 299, 300, 302, 303, 305,
364 307, 308, 309, 310, 311, 312, 313, 314, 316, 318,
365 319, 321, 322, 323, 324, 325, 327, 328, 329, 330,
366 331, 333, 335, 336, 337, 338, 339, 340, 341, 342,
367 343, 344, 345, 346, 347, 348, 349, 350, 352, 353,
368 354, 355, 356, 357, 359, 360, 361, 361, 361, 361,
369 361, 362, 364, 366, 368, 369, 370, 371, 372, 373,
370 375, 377, 378, 380, 381, 383, 384, 385, 386, 387,
371 388, 389, 390, 391, 392, 393, 394, 395, 397, 398,
372
373 399, 400, 401, 402, 403, 405, 407, 408, 409, 410,
374 412, 413, 414, 416, 418, 420, 422, 424, 426, 427,
375 429, 430, 431, 432, 434, 435, 436, 438, 439, 441,
376 443, 445, 447, 449, 451, 452, 453, 454, 455, 456,
377 458, 460, 462, 463, 464, 465, 467, 468, 469, 471,
378 472, 474, 475, 477, 478, 480, 482, 483, 485, 487,
379 489, 491, 493, 493
380 } ;
381
382 static yyconst int yy_ec[256] =
383 { 0,
384 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
385 4, 5, 6, 1, 1, 1, 1, 1, 1, 1,
386 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
387 1, 7, 8, 9, 10, 1, 11, 12, 13, 14,
388 15, 16, 17, 18, 19, 20, 21, 22, 23, 23,
389 23, 23, 23, 23, 23, 24, 24, 25, 26, 27,
390 28, 29, 30, 1, 31, 31, 31, 31, 32, 33,
391 34, 34, 34, 34, 34, 35, 34, 34, 34, 34,
392 34, 34, 34, 34, 36, 34, 34, 37, 34, 34,
393 38, 39, 40, 41, 34, 1, 42, 43, 44, 45,
394
395 46, 47, 48, 49, 50, 34, 51, 52, 53, 54,
396 55, 56, 34, 57, 58, 59, 60, 61, 62, 63,
397 64, 65, 66, 67, 68, 69, 1, 1, 1, 1,
398 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
399 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
400 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
401 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
402 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
403 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
404 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
405
406 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
407 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
408 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
409 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
410 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
411 1, 1, 1, 1, 1
412 } ;
413
414 static yyconst int yy_meta[70] =
415 { 0,
416 1, 1, 2, 1, 1, 1, 1, 1, 3, 1,
417 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
418 1, 5, 5, 6, 1, 1, 1, 1, 1, 3,
419 6, 6, 6, 7, 7, 7, 7, 1, 3, 1,
420 1, 5, 5, 6, 6, 6, 5, 7, 7, 7,
421 7, 7, 7, 8, 7, 7, 8, 7, 8, 7,
422 8, 7, 8, 7, 7, 1, 1, 1, 1
423 } ;
424
425 static yyconst short int yy_base[372] =
426 { 0,
427 0, 0, 570, 571, 68, 571, 74, 541, 73, 558,
428 539, 71, 527, 571, 571, 537, 67, 571, 68, 69,
429 82, 93, 100, 539, 571, 73, 535, 76, 571, 0,
430 77, 571, 571, 534, 501, 503, 85, 56, 105, 86,
431 504, 60, 71, 102, 86, 49, 512, 105, 69, 503,
432 108, 507, 571, 103, 571, 571, 169, 571, 175, 181,
433 571, 110, 571, 128, 571, 571, 571, 571, 153, 167,
434 571, 571, 571, 571, 571, 539, 571, 534, 171, 571,
435 571, 571, 175, 209, 192, 229, 160, 167, 0, 236,
436 165, 174, 571, 525, 571, 571, 571, 524, 0, 196,
437
438 512, 571, 491, 503, 490, 505, 504, 491, 187, 484,
439 111, 168, 486, 483, 486, 483, 489, 479, 195, 198,
440 483, 482, 482, 472, 487, 486, 212, 488, 152, 475,
441 199, 221, 479, 478, 471, 225, 469, 224, 475, 571,
442 571, 264, 0, 571, 267, 0, 571, 571, 275, 571,
443 278, 285, 571, 269, 571, 571, 571, 469, 481, 476,
444 464, 462, 178, 235, 473, 475, 470, 470, 465, 461,
445 458, 466, 469, 0, 464, 454, 462, 462, 454, 455,
446 0, 458, 455, 456, 0, 444, 443, 451, 437, 438,
447 444, 445, 434, 436, 438, 445, 431, 429, 429, 429,
448
449 440, 439, 429, 433, 423, 436, 438, 427, 301, 332,
450 303, 367, 289, 335, 255, 279, 0, 427, 0, 0,
451 419, 417, 425, 414, 419, 413, 419, 0, 0, 423,
452 0, 412, 411, 408, 412, 0, 418, 418, 403, 408,
453 0, 0, 403, 418, 407, 405, 415, 410, 405, 396,
454 396, 386, 398, 384, 388, 382, 380, 0, 371, 361,
455 353, 357, 344, 0, 344, 356, 256, 0, 280, 0,
456 571, 0, 0, 0, 347, 345, 350, 349, 348, 0,
457 0, 339, 0, 347, 0, 341, 341, 339, 328, 324,
458 326, 331, 313, 325, 323, 307, 308, 0, 316, 313,
459
460 309, 293, 302, 304, 0, 0, 295, 306, 297, 0,
461 286, 286, 299, 0, 0, 0, 0, 0, 297, 0,
462 297, 283, 294, 0, 289, 275, 0, 287, 0, 0,
463 0, 0, 0, 0, 283, 282, 275, 270, 271, 0,
464 0, 0, 240, 224, 234, 0, 220, 186, 0, 120,
465 0, 62, 0, 48, 0, 0, 43, 0, 0, 0,
466 0, 0, 571, 414, 422, 426, 432, 438, 442, 444,
467 446
468 } ;
469
470 static yyconst short int yy_def[372] =
471 { 0,
472 363, 1, 363, 363, 363, 363, 363, 363, 364, 363,
473 363, 363, 365, 363, 363, 363, 363, 363, 363, 363,
474 363, 363, 363, 363, 363, 363, 363, 363, 363, 366,
475 366, 363, 363, 363, 366, 366, 366, 366, 366, 366,
476 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
477 366, 366, 363, 363, 363, 363, 363, 363, 363, 363,
478 363, 364, 363, 367, 363, 363, 363, 363, 365, 368,
479 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
480 363, 363, 363, 363, 363, 363, 363, 363, 369, 363,
481 363, 363, 363, 363, 363, 363, 363, 363, 366, 364,
482
483 365, 363, 366, 366, 366, 366, 366, 366, 366, 366,
484 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
485 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
486 366, 366, 366, 366, 366, 366, 366, 366, 366, 363,
487 363, 364, 370, 363, 365, 371, 363, 363, 363, 363,
488 363, 363, 363, 369, 363, 363, 363, 366, 366, 366,
489 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
490 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
491 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
492 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
493
494 366, 366, 366, 366, 366, 366, 366, 366, 364, 364,
495 365, 365, 363, 363, 363, 363, 366, 366, 366, 366,
496 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
497 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
498 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
499 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
500 366, 366, 366, 366, 366, 366, 364, 210, 365, 212,
501 363, 366, 366, 366, 366, 366, 366, 366, 366, 366,
502 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
503 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
504
505 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
506 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
507 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
508 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
509 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
510 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
511 366, 366, 0, 363, 363, 363, 363, 363, 363, 363,
512 363
513 } ;
514
515 static yyconst short int yy_nxt[641] =
516 { 0,
517 4, 5, 6, 7, 7, 7, 5, 8, 9, 10,
518 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
519 21, 22, 23, 23, 24, 25, 26, 27, 28, 29,
520 30, 30, 30, 30, 31, 30, 30, 32, 4, 33,
521 34, 35, 36, 37, 38, 39, 40, 41, 30, 42,
522 30, 43, 30, 44, 45, 46, 47, 48, 49, 50,
523 51, 52, 30, 30, 30, 53, 54, 55, 56, 57,
524 58, 59, 59, 59, 57, 59, 58, 60, 60, 60,
525 59, 63, 67, 72, 77, 100, 74, 362, 78, 101,
526 79, 79, 79, 361, 73, 75, 76, 80, 68, 94,
527
528 95, 109, 81, 97, 98, 127, 119, 360, 128, 82,
529 110, 64, 83, 120, 84, 84, 85, 134, 63, 83,
530 121, 90, 90, 90, 86, 122, 105, 87, 88, 89,
531 140, 86, 135, 106, 91, 92, 107, 115, 86, 108,
532 116, 125, 117, 123, 87, 86, 126, 124, 64, 142,
533 142, 91, 88, 130, 131, 89, 111, 137, 112, 92,
534 167, 113, 138, 132, 359, 144, 133, 114, 168, 141,
535 57, 58, 59, 59, 59, 57, 59, 58, 59, 59,
536 59, 59, 59, 58, 60, 60, 60, 59, 145, 145,
537 143, 70, 79, 79, 79, 153, 79, 79, 79, 192,
538
539 155, 153, 149, 150, 63, 150, 149, 150, 155, 150,
540 193, 83, 169, 85, 85, 85, 149, 150, 153, 153,
541 149, 150, 150, 86, 155, 155, 150, 170, 83, 146,
542 84, 84, 85, 164, 64, 222, 223, 86, 165, 177,
543 86, 179, 358, 87, 88, 151, 195, 151, 178, 180,
544 152, 152, 152, 188, 86, 83, 181, 90, 90, 90,
545 87, 189, 197, 196, 63, 357, 190, 86, 88, 202,
546 91, 92, 63, 206, 203, 207, 224, 198, 356, 144,
547 355, 86, 204, 354, 225, 209, 209, 91, 211, 211,
548 271, 213, 144, 213, 64, 92, 214, 214, 214, 152,
549
550 152, 152, 64, 215, 216, 70, 152, 152, 152, 63,
551 214, 214, 214, 271, 271, 144, 353, 150, 70, 150,
552 215, 352, 267, 267, 269, 269, 351, 350, 216, 349,
553 271, 150, 348, 347, 346, 345, 150, 344, 343, 64,
554 63, 70, 342, 341, 340, 339, 338, 337, 336, 335,
555 334, 333, 332, 268, 268, 268, 214, 214, 214, 331,
556 330, 329, 268, 268, 268, 328, 327, 150, 326, 150,
557 64, 325, 324, 268, 268, 268, 268, 268, 268, 144,
558 323, 150, 322, 321, 320, 319, 150, 318, 270, 270,
559 270, 317, 316, 315, 314, 313, 312, 270, 270, 270,
560
561 311, 310, 309, 308, 307, 70, 306, 305, 270, 270,
562 270, 270, 270, 270, 62, 304, 62, 62, 62, 62,
563 62, 62, 69, 303, 69, 302, 69, 69, 69, 69,
564 99, 99, 99, 99, 62, 62, 62, 301, 300, 62,
565 69, 69, 69, 299, 298, 69, 154, 154, 210, 210,
566 212, 212, 297, 296, 295, 294, 293, 292, 291, 290,
567 289, 288, 287, 286, 285, 284, 283, 282, 281, 280,
568 279, 278, 277, 276, 275, 274, 273, 272, 266, 265,
569 264, 263, 262, 261, 260, 259, 258, 257, 256, 255,
570 254, 253, 252, 251, 250, 249, 248, 247, 246, 245,
571
572 244, 243, 242, 241, 240, 239, 238, 237, 236, 235,
573 234, 233, 232, 231, 230, 229, 228, 227, 226, 221,
574 220, 219, 218, 217, 208, 205, 201, 200, 199, 194,
575 191, 187, 186, 185, 184, 183, 182, 176, 175, 174,
576 173, 172, 171, 166, 163, 162, 161, 160, 159, 158,
577 70, 157, 156, 148, 147, 139, 136, 129, 118, 104,
578 103, 102, 96, 93, 71, 70, 66, 65, 61, 363,
579 3, 363, 363, 363, 363, 363, 363, 363, 363, 363,
580 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
581 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
582
583 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
584 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
585 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
586 363, 363, 363, 363, 363, 363, 363, 363, 363, 363
587 } ;
588
589 static yyconst short int yy_chk[641] =
590 { 0,
591 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
592 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
593 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
594 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
595 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
596 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
597 1, 1, 1, 1, 1, 1, 1, 1, 1, 5,
598 5, 5, 5, 5, 5, 7, 7, 7, 7, 7,
599 7, 9, 12, 17, 20, 31, 19, 357, 20, 31,
600 20, 20, 20, 354, 17, 19, 19, 21, 12, 26,
601
602 26, 38, 21, 28, 28, 46, 42, 352, 46, 21,
603 38, 9, 22, 42, 22, 22, 22, 49, 62, 23,
604 43, 23, 23, 23, 22, 43, 37, 22, 22, 22,
605 54, 23, 49, 37, 23, 23, 37, 40, 22, 37,
606 40, 45, 40, 44, 22, 23, 45, 44, 62, 64,
607 64, 23, 22, 48, 48, 22, 39, 51, 39, 23,
608 111, 39, 51, 48, 350, 69, 48, 39, 111, 54,
609 57, 57, 57, 57, 57, 57, 59, 59, 59, 59,
610 59, 59, 60, 60, 60, 60, 60, 60, 70, 70,
611 64, 69, 79, 79, 79, 87, 83, 83, 83, 129,
612
613 91, 88, 79, 79, 100, 79, 83, 83, 92, 83,
614 129, 85, 112, 85, 85, 85, 79, 79, 88, 87,
615 83, 83, 79, 85, 91, 92, 83, 112, 84, 70,
616 84, 84, 84, 109, 100, 163, 163, 85, 109, 119,
617 84, 120, 348, 84, 84, 86, 131, 86, 119, 120,
618 86, 86, 86, 127, 84, 90, 120, 90, 90, 90,
619 84, 127, 132, 131, 267, 347, 127, 90, 84, 136,
620 90, 90, 142, 138, 136, 138, 164, 132, 345, 145,
621 344, 90, 136, 343, 164, 142, 142, 90, 145, 145,
622 215, 149, 269, 149, 267, 90, 149, 149, 149, 151,
623
624 151, 151, 142, 154, 154, 145, 152, 152, 152, 209,
625 213, 213, 213, 216, 215, 211, 339, 152, 269, 152,
626 154, 338, 209, 209, 211, 211, 337, 336, 154, 335,
627 216, 152, 328, 326, 325, 323, 152, 322, 321, 209,
628 210, 211, 319, 313, 312, 311, 309, 308, 307, 304,
629 303, 302, 301, 210, 210, 210, 214, 214, 214, 300,
630 299, 297, 210, 210, 210, 296, 295, 214, 294, 214,
631 210, 293, 292, 210, 210, 210, 210, 210, 210, 212,
632 291, 214, 290, 289, 288, 287, 214, 286, 212, 212,
633 212, 284, 282, 279, 278, 277, 276, 212, 212, 212,
634
635 275, 266, 265, 263, 262, 212, 261, 260, 212, 212,
636 212, 212, 212, 212, 364, 259, 364, 364, 364, 364,
637 364, 364, 365, 257, 365, 256, 365, 365, 365, 365,
638 366, 366, 366, 366, 367, 367, 367, 255, 254, 367,
639 368, 368, 368, 253, 252, 368, 369, 369, 370, 370,
640 371, 371, 251, 250, 249, 248, 247, 246, 245, 244,
641 243, 240, 239, 238, 237, 235, 234, 233, 232, 230,
642 227, 226, 225, 224, 223, 222, 221, 218, 208, 207,
643 206, 205, 204, 203, 202, 201, 200, 199, 198, 197,
644 196, 195, 194, 193, 192, 191, 190, 189, 188, 187,
645
646 186, 184, 183, 182, 180, 179, 178, 177, 176, 175,
647 173, 172, 171, 170, 169, 168, 167, 166, 165, 162,
648 161, 160, 159, 158, 139, 137, 135, 134, 133, 130,
649 128, 126, 125, 124, 123, 122, 121, 118, 117, 116,
650 115, 114, 113, 110, 108, 107, 106, 105, 104, 103,
651 101, 98, 94, 78, 76, 52, 50, 47, 41, 36,
652 35, 34, 27, 24, 16, 13, 11, 10, 8, 3,
653 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
654 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
655 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
656
657 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
658 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
659 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
660 363, 363, 363, 363, 363, 363, 363, 363, 363, 363
661 } ;
662
663 #define REJECT \
664 { \
665 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
666 yy_cp = yy_full_match; /* restore poss. backed-over text */ \
667 ++yy_lp; \
668 goto find_rule; \
669 }
670 #define yymore() yymore_used_but_not_detected
671 #define YY_MORE_ADJ 0
672 #define YY_RESTORE_YY_MORE_OFFSET
673 #define INITIAL 0
674
675 /* Copyright (C) 1989-1991 James A. Roskind, All rights reserved.
676 This lexer description was written by James A. Roskind. Copying
677 of this file, as a whole, is permitted providing this notice is
678 intact and applicable in all complete copies. Direct
679 translations as a whole to other lexer generator input languages
680 (or lexical description languages) is permitted provided that
681 this notice is intact and applicable in all such copies, along
682 with a disclaimer that the contents are a translation. The
683 reproduction of derived files or text, such as modified versions
684 of this file, or the output of scanner generators, is permitted,
685 provided the resulting work includes the copyright notice
686 "Portions Copyright (c) 1989, 1990 James A. Roskind". Derived
687 products must also provide the notice "Portions Copyright (c)
688 1989, 1990 James A. Roskind" in a manner appropriate to the
689 utility, and in keeping with copyright law (e.g.: EITHER
690 displayed when first invoked/executed; OR displayed continuously
691 on display terminal; OR via placement in the object code in form
692 readable in a printout, with or near the title of the work, or at
693 the end of the file). No royalties, licenses or commissions of
694 any kind are required to copy this file, its translations, or
695 derivative products, when the copies are made in compliance with
696 this notice. Persons or corporations that do make copies in
697 compliance with this notice may charge whatever price is
698 agreeable to a buyer, for such copies or derivative works. THIS
699 FILE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
700 WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES
701 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
702
703 James A. Roskind
704 Independent Consultant
705 516 Latania Palm Drive
706 Indialantic FL, 32903
707 (407)729-4348
708 [email protected]
709 or ...!uunet!leafusa!jar
710
711 ---end of copyright notice---
712
713
714 COMMENTS-
715
716 My goal is to see software developers adopt my C++ grammar as a
717 standard until such time as a better standard is accessible. The
718 only way to get it to become a standard, is to be sure that people
719 know that derivations are based on a specific work. The intent of
720 releasing this Flex input file is to facilitate experimentation with
721 my C++ grammar. The intent of the copyright notice is to allow
722 arbitrary commercial and non-commercial use of this file, as long as
723 reference is given to my standardization effort. Without reference
724 to a specific standard, many alternative grammars would develop. By
725 referring to the standard, the C++ grammar is given publicity, which
726 should lead to further use in compatible products and systems. The
727 benefits of such a standard to commercial products (browsers,
728 beautifiers, translators, compilers, ...) should be obvious to the
729 developers, in that other compatible products will emerge, and the
730 value of all conforming products will rise. Most developers are
731 aware of the value of acquiring a fairly complete grammar for a
732 language, and the copyright notice (and the resulting affiliation
733 with my work) should not be too high a price to pay. By copyrighting
734 my work, I have some minor control over what this standard is, and I
735 can (hopefully) keep it from degrading without my approval. I will
736 consistently attempt to provide upgraded grammars that are compliant
737 with the current art, and the ANSI C++ Committee recommendation in
738 particular. A developer is never prevented from modifying the
739 grammar or this file to improve it in whatever way is seen fit. There
740 is also no restriction on the sale of copies, or derivative works,
741 providing the request in the copyright notice are satisfied.
742
743 If you are not "copying" my work, but are rather only abstracting
744 some of my work, an acknowledgment with references to such a standard
745 would be appreciated. Specifically, agreements with my grammar and
746 its resolution of otherwise ambiguous constructs, should be noted.
747
748 Simply put: "make whatever use you would like of the grammar and this
749 file, but include the ``portions Copyright ...'' as a reference to
750 this standard."
751
752
753 */
754
755 /* Last modified 7/4/91, Version 2.0 */
756
757 /* File cpp5.l, becomes lex.yy.c after processing by FLEX */
758
759 /* This file is a dramatically cut down version of the FLEX input file
760 used in my ANSI C Preprocessor. The executable version of my
761 preprocessor is available on many platforms (shareware), but this is
762 the only source extract that is currently being distributed. If you
763 need a full ANSI C preprocessor, with extensive diagnostic
764 capabilities and customization facilities, please contact me at the
765 addresses given above. Current platforms include IBMPC (DOS/OS2), Sun
766 (SPARC and Motorola), and IBM R/6000. ... end of commercial
767 announcement.
768
769 This file is being distributed to facilitate experimentation and use
770 of my C and C++ grammar.
771
772
773 Comment removal must be done during the lexing, as context (such as
774 enclosure in string literals) must be observed. For this cut-down
775 lexer, we will assume that comments have been removed (don't assume
776 this if you are writing a compiler or browser!).
777
778
779 For each IDENTIFIER like string that is found, there are several
780 distinct interpretations that can be applied:
781
782 1) The preprocessor may interpret the string as a "keyword" in a
783 directive (eg: "pragma" or "include", "defined").
784
785 2) The parser may interpret the string as a keyword. (eg: "int").
786
787 3) Both parser and preprocessor may interpret the string as a keyword
788 (eg: "if").
789
790 Since this file is based on source that actually lexically analyses
791 text for both preprocessing and parsing, macro definitions were used
792 throughout. The macro definitions supplied here have been customized
793 to a C++ parse only, and all preprocessor keywords are passed as
794 IDENTIFIER or TYPEDEFname. Also, since there is no symbol table to
795 interrogate to decide whether a string is a TYPEDEFname, I simply
796 assume that any identifier beginning with an upper case letter is a
797 TYPEDEFname. This hack should allow you to check out how code
798 segments are parsed using my grammar. Unfortunately, if you really
799 want to parse major league code, you have to write a symbol table, and
800 maintain appropriate scoping information.
801
802
803
804 */
805
806
807 /* Included code before lex code */
808 /*************** Includes and Defines *****************************/
809
810
811 #include "y.tab.h" /* YACC generated definitions based on C++ grammar */
812
813 typedef char * YYSTYPE; /* interface with lexer: should be in header
814 file*/
815
816 extern char * yylval; /* We will always point at the text of the lexeme.
817 This makes it easy to print out nice trees when YYDEBUG is
818 enabled. (see C++ grammar file and its definition of
819 YYDEBUG_LEXER_TEXT to be "yylval" */
820
821 #include <stdlib.h>
822 #include <string.h>
823
824 /* Prototypes */
825
826
827 #define WHITE_RETURN(x) /* do nothing */
828
829 #define NEW_LINE_RETURN() WHITE_RETURN('\n')
830
831 #define PA_KEYWORD_RETURN(x) RETURN_VAL(x) /* standard C PArser Keyword */
832 #define CPP_KEYWORD_RETURN(x) PA_KEYWORD_RETURN(x) /* C++ keyword */
833 #define PPPA_KEYWORD_RETURN(x) RETURN_VAL(x) /* both PreProcessor and PArser keyword */
834 #define PP_KEYWORD_RETURN(x) IDENTIFIER_RETURN()
835
836 #define IDENTIFIER_RETURN() RETURN_VAL(IDENTIFIER)
837
838 #define PPOP_RETURN(x) RETURN_VAL((int)*yytext) /* PreProcess and Parser operator */
839 #define NAMED_PPOP_RETURN(x) RETURN_VAL(x)
840 #define ASCIIOP_RETURN(x) RETURN_VAL((int)*yytext) /* a single character operator */
841 #define NAMEDOP_RETURN(x) RETURN_VAL(x) /* a multichar operator, with a name */
842
843 #define NUMERICAL_RETURN(x) RETURN_VAL(x) /* some sort of constant */
844 #define LITERAL_RETURN(x) RETURN_VAL(x) /* a string literal */
845 #define C_COMMENT_RETURN(x) RETURN_VAL(x) /* C Style comment */
846 #define RETURN_VAL(x) return(x);
847 #define yywrap() 1
848
849
850
851
852 /* Macros after this point can all be overridden by user definitions in
853 * section 1.
854 */
855
856 #ifndef YY_SKIP_YYWRAP
857 #ifdef __cplusplus
858 extern "C" int yywrap YY_PROTO(( void ));
859 #else
860 extern int yywrap YY_PROTO(( void ));
861 #endif
862 #endif
863
864
865 #ifndef yytext_ptr
866 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
867 #endif
868
869 #ifdef YY_NEED_STRLEN
870 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
871 #endif
872
873 #ifndef YY_NO_INPUT
874 #endif
875
876 #if YY_STACK_USED
877 static int yy_start_stack_ptr = 0;
878 static int yy_start_stack_depth = 0;
879 static int *yy_start_stack = 0;
880 #ifndef YY_NO_PUSH_STATE
881 static void yy_push_state YY_PROTO(( int new_state ));
882 #endif
883 #ifndef YY_NO_POP_STATE
884 static void yy_pop_state YY_PROTO(( void ));
885 #endif
886 #ifndef YY_NO_TOP_STATE
887 static int yy_top_state YY_PROTO(( void ));
888 #endif
889
890 #else
891 #define YY_NO_PUSH_STATE 1
892 #define YY_NO_POP_STATE 1
893 #define YY_NO_TOP_STATE 1
894 #endif
895
896 #ifdef YY_MALLOC_DECL
897 YY_MALLOC_DECL
898 #else
899 #if __STDC__
900 #ifndef __cplusplus
901 #include <stdlib.h>
902 #endif
903 #else
904 /* Just try to get by without declaring the routines. This will fail
905 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
906 * or sizeof(void*) != sizeof(int).
907 */
908 #endif
909 #endif
910
911 /* Amount of stuff to slurp up with each read. */
912 #ifndef YY_READ_BUF_SIZE
913 #define YY_READ_BUF_SIZE 8192
914 #endif
915
916 /* Copy whatever the last rule matched to the standard output. */
917
918 #ifndef ECHO
919 #define ECHO LexerOutput( yytext, yyleng )
920 #endif
921
922 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
923 * is returned in "result".
924 */
925 #ifndef YY_INPUT
926 #define YY_INPUT(buf,result,max_size) \
927 if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \
928 YY_FATAL_ERROR( "input in flex scanner failed" );
929 #endif
930
931 /* No semi-colon after return; correct usage is to write "yyterminate();" -
932 * we don't want an extra ';' after the "return" because that will cause
933 * some compilers to complain about unreachable statements.
934 */
935 #ifndef yyterminate
936 #define yyterminate() return YY_NULL
937 #endif
938
939 /* Number of entries by which start-condition stack grows. */
940 #ifndef YY_START_STACK_INCR
941 #define YY_START_STACK_INCR 25
942 #endif
943
944 /* Report a fatal error. */
945 #ifndef YY_FATAL_ERROR
946 #define YY_FATAL_ERROR(msg) LexerError( msg )
947 #endif
948
949 /* Default declaration of generated scanner - a define so the user can
950 * easily add parameters.
951 */
952 #ifndef YY_DECL
953 #define YY_DECL int yyFlexLexer::yylex()
954 #endif
955
956 /* Code executed at the beginning of each rule, after yytext and yyleng
957 * have been set up.
958 */
959 #ifndef YY_USER_ACTION
960 #define YY_USER_ACTION
961 #endif
962
963 /* Code executed at the end of each rule. */
964 #ifndef YY_BREAK
965 #define YY_BREAK break;
966 #endif
967
968 #define YY_RULE_SETUP \
969 YY_USER_ACTION
970
971 YY_DECL
972 {
973 register yy_state_type yy_current_state;
974 register char *yy_cp, *yy_bp;
975 register int yy_act;
976
977
978
979
980 if ( yy_init )
981 {
982 yy_init = 0;
983
984 #ifdef YY_USER_INIT
985
986 YY_USER_INIT;
987 #endif
988
989 if ( ! yy_start )
990 yy_start = 1; /* first start state */
991
992 if ( ! yyin )
993 yyin = &std::cin;
994
995 if ( ! yyout )
996 yyout = &std::cout;
997
998 if ( ! yy_current_buffer )
999 yy_current_buffer =
1000 yy_create_buffer( yyin, YY_BUF_SIZE );
1001
1002 yy_load_buffer_state();
1003 }
1004
1005 while ( 1 ) /* loops until end-of-file is reached */
1006 {
1007 yy_cp = yy_c_buf_p;
1008
1009 /* Support of yytext. */
1010 *yy_cp = yy_hold_char;
1011
1012 /* yy_bp points to the position in yy_ch_buf of the start of
1013 * the current run.
1014 */
1015 yy_bp = yy_cp;
1016
1017 yy_current_state = yy_start;
1018 yy_state_ptr = yy_state_buf;
1019 *yy_state_ptr++ = yy_current_state;
1020 yy_match:
1021 do
1022 {
1023 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1024 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1025 {
1026 yy_current_state = (int) yy_def[yy_current_state];
1027 if ( yy_current_state >= 364 )
1028 yy_c = yy_meta[(unsigned int) yy_c];
1029 }
1030 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1031 *yy_state_ptr++ = yy_current_state;
1032 ++yy_cp;
1033 }
1034 while ( yy_base[yy_current_state] != 571 );
1035
1036 yy_find_action:
1037 yy_current_state = *--yy_state_ptr;
1038 yy_lp = yy_accept[yy_current_state];
1039 find_rule: /* we branch to this label when backing up */
1040 for ( ; ; ) /* until we find what rule we matched */
1041 {
1042 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
1043 {
1044 yy_act = yy_acclist[yy_lp];
1045 {
1046 yy_full_match = yy_cp;
1047 break;
1048 }
1049 }
1050 --yy_cp;
1051 yy_current_state = *--yy_state_ptr;
1052 yy_lp = yy_accept[yy_current_state];
1053 }
1054
1055 YY_DO_BEFORE_ACTION;
1056
1057 if ( yy_act != YY_END_OF_BUFFER )
1058 {
1059 int yyl;
1060 for ( yyl = 0; yyl < yyleng; ++yyl )
1061 if ( yytext[yyl] == '\n' )
1062 ++yylineno;
1063 }
1064
1065 do_action: /* This label is used only to access EOF actions. */
1066
1067
1068 switch ( yy_act )
1069 { /* beginning of action switch */
1070 case 1:
1071 YY_RULE_SETUP
1072 {
1073 /* Handle C-Style comment */
1074 register int c;
1075 if (m_keepComments)
1076 m_comment += _U(yytext);
1077 for ( ; ; )
1078 {
1079 while ( (c = yyinput()) != '*' && c != EOF )
1080 {
1081 if (m_keepComments)
1082 m_comment += c;
1083
1084 ; /* eat up text of comment */
1085 }
1086 if (m_keepComments)
1087 m_comment += c;
1088 if ( c == '*' )
1089 {
1090 while ( (c = yyinput()) == '*' )
1091 {
1092 if (m_keepComments)
1093 m_comment += c;
1094 ;
1095 }
1096 if (m_keepComments)
1097 m_comment += c;
1098 if ( c == '/' )
1099 {
1100 break; /* found the end */
1101 }
1102 }
1103 if ( c == EOF )
1104 {
1105 break;
1106 }
1107 }
1108 if (m_keepComments )
1109 return CComment;
1110 }
1111 YY_BREAK
1112 case 2:
1113 YY_RULE_SETUP
1114 {
1115 /* Handle CPP style comment */
1116 /* Constume everything until the newline */
1117 register int c;
1118 if (m_keepComments)
1119 m_comment += _U(yytext);
1120 while ((c = yyinput()) != '\n' && c != EOF)
1121 {
1122 if (m_keepComments)
1123 m_comment += c;
1124 }
1125 if (m_keepComments)
1126 m_comment += c;
1127 if (m_keepComments )
1128 return CPPComment;
1129 }
1130 YY_BREAK
1131 case 3:
1132 YY_RULE_SETUP
1133 {
1134 if (!m_returnWhite)
1135 WHITE_RETURN(' ');
1136 else
1137 return ' ';
1138
1139 }
1140 YY_BREAK
1141 case 4:
1142 YY_RULE_SETUP
1143 {
1144 if (!m_returnWhite)
1145 WHITE_RETURN(' ');
1146 else
1147 return ' ';
1148 }
1149 YY_BREAK
1150 case 5:
1151 YY_RULE_SETUP
1152 {
1153 if (!m_returnWhite)
1154 NEW_LINE_RETURN();
1155 else
1156 return '\n';
1157 }
1158 YY_BREAK
1159 case 6:
1160 YY_RULE_SETUP
1161 {PA_KEYWORD_RETURN(AUTO);
1162 }
1163 YY_BREAK
1164 case 7:
1165 YY_RULE_SETUP
1166 {PA_KEYWORD_RETURN(BREAK);
1167 }
1168 YY_BREAK
1169 case 8:
1170 YY_RULE_SETUP
1171 {PA_KEYWORD_RETURN(CASE);
1172 }
1173 YY_BREAK
1174 case 9:
1175 YY_RULE_SETUP
1176 {PA_KEYWORD_RETURN(lexCHAR);
1177 }
1178 YY_BREAK
1179 case 10:
1180 YY_RULE_SETUP
1181 {PA_KEYWORD_RETURN(lexCONST);
1182 }
1183 YY_BREAK
1184 case 11:
1185 YY_RULE_SETUP
1186 {PA_KEYWORD_RETURN(CONTINUE);
1187 }
1188 YY_BREAK
1189 case 12:
1190 YY_RULE_SETUP
1191 {PA_KEYWORD_RETURN(lexDEFAULT);
1192 }
1193 YY_BREAK
1194 case 13:
1195 YY_RULE_SETUP
1196 {PP_KEYWORD_RETURN(DEFINE);
1197 }
1198 YY_BREAK
1199 case 14:
1200 YY_RULE_SETUP
1201 {PP_KEYWORD_RETURN(OPDEFINED);
1202 }
1203 YY_BREAK
1204 case 15:
1205 YY_RULE_SETUP
1206 {PA_KEYWORD_RETURN(DO);
1207 }
1208 YY_BREAK
1209 case 16:
1210 YY_RULE_SETUP
1211 {PA_KEYWORD_RETURN(lexDOUBLE);
1212 }
1213 YY_BREAK
1214 case 17:
1215 YY_RULE_SETUP
1216 {PP_KEYWORD_RETURN(ELIF);
1217 }
1218 YY_BREAK
1219 case 18:
1220 YY_RULE_SETUP
1221 {PPPA_KEYWORD_RETURN(ELSE);
1222 }
1223 YY_BREAK
1224 case 19:
1225 YY_RULE_SETUP
1226 {PP_KEYWORD_RETURN(ENDIF);
1227 }
1228 YY_BREAK
1229 case 20:
1230 YY_RULE_SETUP
1231 {PA_KEYWORD_RETURN(lexENUM);
1232 }
1233 YY_BREAK
1234 case 21:
1235 YY_RULE_SETUP
1236 {PP_KEYWORD_RETURN(ERROR);
1237 }
1238 YY_BREAK
1239 case 22:
1240 YY_RULE_SETUP
1241 {PA_KEYWORD_RETURN(EXTERN);
1242 }
1243 YY_BREAK
1244 case 23:
1245 YY_RULE_SETUP
1246 {PA_KEYWORD_RETURN(lexFLOAT);
1247 }
1248 YY_BREAK
1249 case 24:
1250 YY_RULE_SETUP
1251 {PA_KEYWORD_RETURN(FOR);
1252 }
1253 YY_BREAK
1254 case 25:
1255 YY_RULE_SETUP
1256 {PA_KEYWORD_RETURN(GOTO);
1257 }
1258 YY_BREAK
1259 case 26:
1260 YY_RULE_SETUP
1261 {PPPA_KEYWORD_RETURN(IF);
1262 }
1263 YY_BREAK
1264 case 27:
1265 YY_RULE_SETUP
1266 {PP_KEYWORD_RETURN(IFDEF);
1267 }
1268 YY_BREAK
1269 case 28:
1270 YY_RULE_SETUP
1271 {PP_KEYWORD_RETURN(IFNDEF);
1272 }
1273 YY_BREAK
1274 case 29:
1275 YY_RULE_SETUP
1276 {PP_KEYWORD_RETURN(INCLUDE);
1277 }
1278 YY_BREAK
1279 case 30:
1280 YY_RULE_SETUP
1281 {PA_KEYWORD_RETURN(lexINT);
1282 }
1283 YY_BREAK
1284 case 31:
1285 YY_RULE_SETUP
1286 {PP_KEYWORD_RETURN(LINE);
1287 }
1288 YY_BREAK
1289 case 32:
1290 YY_RULE_SETUP
1291 {PA_KEYWORD_RETURN(lexLONG);
1292 }
1293 YY_BREAK
1294 case 33:
1295 YY_RULE_SETUP
1296 {PP_KEYWORD_RETURN(PRAGMA);
1297 }
1298 YY_BREAK
1299 case 34:
1300 YY_RULE_SETUP
1301 {PA_KEYWORD_RETURN(REGISTER);
1302 }
1303 YY_BREAK
1304 case 35:
1305 YY_RULE_SETUP
1306 {PA_KEYWORD_RETURN(RETURN);
1307 }
1308 YY_BREAK
1309 case 36:
1310 YY_RULE_SETUP
1311 {PA_KEYWORD_RETURN(lexSHORT);
1312 }
1313 YY_BREAK
1314 case 37:
1315 YY_RULE_SETUP
1316 {PA_KEYWORD_RETURN(SIGNED);
1317 }
1318 YY_BREAK
1319 case 38:
1320 YY_RULE_SETUP
1321 {PA_KEYWORD_RETURN(SIZEOF);
1322 }
1323 YY_BREAK
1324 case 39:
1325 YY_RULE_SETUP
1326 {PA_KEYWORD_RETURN(STATIC);
1327 }
1328 YY_BREAK
1329 case 40:
1330 YY_RULE_SETUP
1331 {PA_KEYWORD_RETURN(lexSTRUCT);
1332 }
1333 YY_BREAK
1334 case 41:
1335 YY_RULE_SETUP
1336 {PA_KEYWORD_RETURN(SWITCH);
1337 }
1338 YY_BREAK
1339 case 42:
1340 YY_RULE_SETUP
1341 {PA_KEYWORD_RETURN(TYPEDEF);
1342 }
1343 YY_BREAK
1344 case 43:
1345 YY_RULE_SETUP
1346 {PP_KEYWORD_RETURN(UNDEF);
1347 }
1348 YY_BREAK
1349 case 44:
1350 YY_RULE_SETUP
1351 {PA_KEYWORD_RETURN(UNION);
1352 }
1353 YY_BREAK
1354 case 45:
1355 YY_RULE_SETUP
1356 {PA_KEYWORD_RETURN(UNSIGNED);
1357 }
1358 YY_BREAK
1359 case 46:
1360 YY_RULE_SETUP
1361 {PA_KEYWORD_RETURN(lexVOID);
1362 }
1363 YY_BREAK
1364 case 47:
1365 YY_RULE_SETUP
1366 {PA_KEYWORD_RETURN(VOLATILE);
1367 }
1368 YY_BREAK
1369 case 48:
1370 YY_RULE_SETUP
1371 {PA_KEYWORD_RETURN(WHILE);
1372 }
1373 YY_BREAK
1374 case 49:
1375 YY_RULE_SETUP
1376 {CPP_KEYWORD_RETURN(lexCLASS);
1377 }
1378 YY_BREAK
1379 case 50:
1380 YY_RULE_SETUP
1381 {CPP_KEYWORD_RETURN(lexNAMESPACE);
1382 }
1383 YY_BREAK
1384 case 51:
1385 YY_RULE_SETUP
1386 {CPP_KEYWORD_RETURN(lexDELETE);
1387 }
1388 YY_BREAK
1389 case 52:
1390 YY_RULE_SETUP
1391 {CPP_KEYWORD_RETURN(FRIEND);
1392 }
1393 YY_BREAK
1394 case 53:
1395 YY_RULE_SETUP
1396 {CPP_KEYWORD_RETURN(INLINE);
1397 }
1398 YY_BREAK
1399 case 54:
1400 YY_RULE_SETUP
1401 {CPP_KEYWORD_RETURN(NEW);
1402 }
1403 YY_BREAK
1404 case 55:
1405 YY_RULE_SETUP
1406 {CPP_KEYWORD_RETURN(lexOPERATOR);
1407 }
1408 YY_BREAK
1409 case 56:
1410 YY_RULE_SETUP
1411 {CPP_KEYWORD_RETURN(OVERLOAD);
1412 }
1413 YY_BREAK
1414 case 57:
1415 YY_RULE_SETUP
1416 {CPP_KEYWORD_RETURN(lexPROTECTED);
1417 }
1418 YY_BREAK
1419 case 58:
1420 YY_RULE_SETUP
1421 {CPP_KEYWORD_RETURN(lexPRIVATE);
1422 }
1423 YY_BREAK
1424 case 59:
1425 YY_RULE_SETUP
1426 {CPP_KEYWORD_RETURN(lexPUBLIC);
1427 }
1428 YY_BREAK
1429 case 60:
1430 YY_RULE_SETUP
1431 {CPP_KEYWORD_RETURN(lexTHIS);
1432 }
1433 YY_BREAK
1434 case 61:
1435 YY_RULE_SETUP
1436 {CPP_KEYWORD_RETURN(VIRTUAL);
1437 }
1438 YY_BREAK
1439 case 62:
1440 YY_RULE_SETUP
1441 {IDENTIFIER_RETURN();
1442 }
1443 YY_BREAK
1444 case 63:
1445 YY_RULE_SETUP
1446 {NUMERICAL_RETURN(INTEGERconstant);
1447 }
1448 YY_BREAK
1449 case 64:
1450 YY_RULE_SETUP
1451 {NUMERICAL_RETURN(OCTALconstant);
1452 }
1453 YY_BREAK
1454 case 65:
1455 YY_RULE_SETUP
1456 {NUMERICAL_RETURN(HEXconstant);
1457 }
1458 YY_BREAK
1459 case 66:
1460 YY_RULE_SETUP
1461 {NUMERICAL_RETURN(FLOATINGconstant);
1462 }
1463 YY_BREAK
1464 case 67:
1465 YY_RULE_SETUP
1466 {
1467 NUMERICAL_RETURN(CHARACTERconstant);
1468 }
1469 YY_BREAK
1470 case 68:
1471 YY_RULE_SETUP
1472 {
1473 LITERAL_RETURN(STRINGliteral);
1474 }
1475 YY_BREAK
1476 case 69:
1477 YY_RULE_SETUP
1478 {PPOP_RETURN(LP);
1479 }
1480 YY_BREAK
1481 case 70:
1482 YY_RULE_SETUP
1483 {PPOP_RETURN(RP);
1484 }
1485 YY_BREAK
1486 case 71:
1487 YY_RULE_SETUP
1488 {PPOP_RETURN(COMMA);
1489 }
1490 YY_BREAK
1491 case 72:
1492 YY_RULE_SETUP
1493 {NAMED_PPOP_RETURN('#') ;
1494 }
1495 YY_BREAK
1496 case 73:
1497 YY_RULE_SETUP
1498 {NAMED_PPOP_RETURN(POUNDPOUND);
1499 }
1500 YY_BREAK
1501 case 74:
1502 YY_RULE_SETUP
1503 {ASCIIOP_RETURN(LC);
1504 }
1505 YY_BREAK
1506 case 75:
1507 YY_RULE_SETUP
1508 {ASCIIOP_RETURN(RC);
1509 }
1510 YY_BREAK
1511 case 76:
1512 YY_RULE_SETUP
1513 {ASCIIOP_RETURN(LB);
1514 }
1515 YY_BREAK
1516 case 77:
1517 YY_RULE_SETUP
1518 {ASCIIOP_RETURN(RB);
1519 }
1520 YY_BREAK
1521 case 78:
1522 YY_RULE_SETUP
1523 {ASCIIOP_RETURN(DOT);
1524 }
1525 YY_BREAK
1526 case 79:
1527 YY_RULE_SETUP
1528 {ASCIIOP_RETURN(AND);
1529 }
1530 YY_BREAK
1531 case 80:
1532 YY_RULE_SETUP
1533 {ASCIIOP_RETURN(STAR);
1534 }
1535 YY_BREAK
1536 case 81:
1537 YY_RULE_SETUP
1538 {ASCIIOP_RETURN(PLUS);
1539 }
1540 YY_BREAK
1541 case 82:
1542 YY_RULE_SETUP
1543 {ASCIIOP_RETURN(MINUS);
1544 }
1545 YY_BREAK
1546 case 83:
1547 YY_RULE_SETUP
1548 {ASCIIOP_RETURN(NEGATE);
1549 }
1550 YY_BREAK
1551 case 84:
1552 YY_RULE_SETUP
1553 {ASCIIOP_RETURN(NOT);
1554 }
1555 YY_BREAK
1556 case 85:
1557 YY_RULE_SETUP
1558 {ASCIIOP_RETURN(DIV);
1559 }
1560 YY_BREAK
1561 case 86:
1562 YY_RULE_SETUP
1563 {ASCIIOP_RETURN(MOD);
1564 }
1565 YY_BREAK
1566 case 87:
1567 YY_RULE_SETUP
1568 {ASCIIOP_RETURN(LT);
1569 }
1570 YY_BREAK
1571 case 88:
1572 YY_RULE_SETUP
1573 {ASCIIOP_RETURN(GT);
1574 }
1575 YY_BREAK
1576 case 89:
1577 YY_RULE_SETUP
1578 {ASCIIOP_RETURN(XOR);
1579 }
1580 YY_BREAK
1581 case 90:
1582 YY_RULE_SETUP
1583 {ASCIIOP_RETURN(PIPE);
1584 }
1585 YY_BREAK
1586 case 91:
1587 YY_RULE_SETUP
1588 {ASCIIOP_RETURN(QUESTION);
1589 }
1590 YY_BREAK
1591 case 92:
1592 YY_RULE_SETUP
1593 {ASCIIOP_RETURN(COLON);
1594 }
1595 YY_BREAK
1596 case 93:
1597 YY_RULE_SETUP
1598 {ASCIIOP_RETURN(SEMICOLON);
1599 }
1600 YY_BREAK
1601 case 94:
1602 YY_RULE_SETUP
1603 {ASCIIOP_RETURN(ASSIGN);
1604 }
1605 YY_BREAK
1606 case 95:
1607 YY_RULE_SETUP
1608 {NAMEDOP_RETURN(DOTstar);
1609 }
1610 YY_BREAK
1611 case 96:
1612 YY_RULE_SETUP
1613 {NAMEDOP_RETURN(CLCL);
1614 }
1615 YY_BREAK
1616 case 97:
1617 YY_RULE_SETUP
1618 {NAMEDOP_RETURN(lexARROW);
1619 }
1620 YY_BREAK
1621 case 98:
1622 YY_RULE_SETUP
1623 {NAMEDOP_RETURN(ARROWstar);
1624 }
1625 YY_BREAK
1626 case 99:
1627 YY_RULE_SETUP
1628 {NAMEDOP_RETURN(ICR);
1629 }
1630 YY_BREAK
1631 case 100:
1632 YY_RULE_SETUP
1633 {NAMEDOP_RETURN(DECR);
1634 }
1635 YY_BREAK
1636 case 101:
1637 YY_RULE_SETUP
1638 {NAMEDOP_RETURN(LS);
1639 }
1640 YY_BREAK
1641 case 102:
1642 YY_RULE_SETUP
1643 {NAMEDOP_RETURN(RS);
1644 }
1645 YY_BREAK
1646 case 103:
1647 YY_RULE_SETUP
1648 {NAMEDOP_RETURN(LE);
1649 }
1650 YY_BREAK
1651 case 104:
1652 YY_RULE_SETUP
1653 {NAMEDOP_RETURN(GE);
1654 }
1655 YY_BREAK
1656 case 105:
1657 YY_RULE_SETUP
1658 {NAMEDOP_RETURN(EQ);
1659 }
1660 YY_BREAK
1661 case 106:
1662 YY_RULE_SETUP
1663 {NAMEDOP_RETURN(NE);
1664 }
1665 YY_BREAK
1666 case 107:
1667 YY_RULE_SETUP
1668 {NAMEDOP_RETURN(ANDAND);
1669 }
1670 YY_BREAK
1671 case 108:
1672 YY_RULE_SETUP
1673 {NAMEDOP_RETURN(OROR);
1674 }
1675 YY_BREAK
1676 case 109:
1677 YY_RULE_SETUP
1678 {NAMEDOP_RETURN(MULTassign);
1679 }
1680 YY_BREAK
1681 case 110:
1682 YY_RULE_SETUP
1683 {NAMEDOP_RETURN(DIVassign);
1684 }
1685 YY_BREAK
1686 case 111:
1687 YY_RULE_SETUP
1688 {NAMEDOP_RETURN(MODassign);
1689 }
1690 YY_BREAK
1691 case 112:
1692 YY_RULE_SETUP
1693 {NAMEDOP_RETURN(PLUSassign);
1694 }
1695 YY_BREAK
1696 case 113:
1697 YY_RULE_SETUP
1698 {NAMEDOP_RETURN(MINUSassign);
1699 }
1700 YY_BREAK
1701 case 114:
1702 YY_RULE_SETUP
1703 {NAMEDOP_RETURN(LSassign);
1704 }
1705 YY_BREAK
1706 case 115:
1707 YY_RULE_SETUP
1708 {NAMEDOP_RETURN(RSassign);
1709 }
1710 YY_BREAK
1711 case 116:
1712 YY_RULE_SETUP
1713 {NAMEDOP_RETURN(ANDassign);
1714 }
1715 YY_BREAK
1716 case 117:
1717 YY_RULE_SETUP
1718 {NAMEDOP_RETURN(ERassign);
1719 }
1720 YY_BREAK
1721 case 118:
1722 YY_RULE_SETUP
1723 {NAMEDOP_RETURN(ORassign);
1724 }
1725 YY_BREAK
1726 case 119:
1727 YY_RULE_SETUP
1728 {NAMEDOP_RETURN(ELLIPSIS);
1729 }
1730 YY_BREAK
1731 case 120:
1732 YY_RULE_SETUP
1733 { return yytext[0];
1734 }
1735 YY_BREAK
1736 case 121:
1737 YY_RULE_SETUP
1738 ECHO;
1739 YY_BREAK
1740 case YY_STATE_EOF(INITIAL):
1741 yyterminate();
1742
1743 case YY_END_OF_BUFFER:
1744 {
1745 /* Amount of text matched not including the EOB char. */
1746 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1747
1748 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1749 *yy_cp = yy_hold_char;
1750 YY_RESTORE_YY_MORE_OFFSET
1751
1752 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1753 {
1754 /* We're scanning a new file or input source. It's
1755 * possible that this happened because the user
1756 * just pointed yyin at a new source and called
1757 * yylex(). If so, then we have to assure
1758 * consistency between yy_current_buffer and our
1759 * globals. Here is the right place to do so, because
1760 * this is the first action (other than possibly a
1761 * back-up) that will match for the new input source.
1762 */
1763 yy_n_chars = yy_current_buffer->yy_n_chars;
1764 yy_current_buffer->yy_input_file = yyin;
1765 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1766 }
1767
1768 /* Note that here we test for yy_c_buf_p "<=" to the position
1769 * of the first EOB in the buffer, since yy_c_buf_p will
1770 * already have been incremented past the NUL character
1771 * (since all states make transitions on EOB to the
1772 * end-of-buffer state). Contrast this with the test
1773 * in input().
1774 */
1775 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1776 { /* This was really a NUL. */
1777 yy_state_type yy_next_state;
1778
1779 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1780
1781 yy_current_state = yy_get_previous_state();
1782
1783 /* Okay, we're now positioned to make the NUL
1784 * transition. We couldn't have
1785 * yy_get_previous_state() go ahead and do it
1786 * for us because it doesn't know how to deal
1787 * with the possibility of jamming (and we don't
1788 * want to build jamming into it because then it
1789 * will run more slowly).
1790 */
1791
1792 yy_next_state = yy_try_NUL_trans( yy_current_state );
1793
1794 yy_bp = yytext_ptr + YY_MORE_ADJ;
1795
1796 if ( yy_next_state )
1797 {
1798 /* Consume the NUL. */
1799 yy_cp = ++yy_c_buf_p;
1800 yy_current_state = yy_next_state;
1801 goto yy_match;
1802 }
1803
1804 else
1805 {
1806 yy_cp = yy_c_buf_p;
1807 goto yy_find_action;
1808 }
1809 }
1810
1811 else
1812 switch ( yy_get_next_buffer() )
1813 {
1814 case EOB_ACT_END_OF_FILE:
1815 {
1816 yy_did_buffer_switch_on_eof = 0;
1817
1818 if ( yywrap() )
1819 {
1820 /* Note: because we've taken care in
1821 * yy_get_next_buffer() to have set up
1822 * yytext, we can now set up
1823 * yy_c_buf_p so that if some total
1824 * hoser (like flex itself) wants to
1825 * call the scanner after we return the
1826 * YY_NULL, it'll still work - another
1827 * YY_NULL will get returned.
1828 */
1829 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1830
1831 yy_act = YY_STATE_EOF(YY_START);
1832 goto do_action;
1833 }
1834
1835 else
1836 {
1837 if ( ! yy_did_buffer_switch_on_eof )
1838 YY_NEW_FILE;
1839 }
1840 break;
1841 }
1842
1843 case EOB_ACT_CONTINUE_SCAN:
1844 yy_c_buf_p =
1845 yytext_ptr + yy_amount_of_matched_text;
1846
1847 yy_current_state = yy_get_previous_state();
1848
1849 yy_cp = yy_c_buf_p;
1850 yy_bp = yytext_ptr + YY_MORE_ADJ;
1851 goto yy_match;
1852
1853 case EOB_ACT_LAST_MATCH:
1854 yy_c_buf_p =
1855 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1856
1857 yy_current_state = yy_get_previous_state();
1858
1859 yy_cp = yy_c_buf_p;
1860 yy_bp = yytext_ptr + YY_MORE_ADJ;
1861 goto yy_find_action;
1862 }
1863 break;
1864 }
1865
1866 default:
1867 YY_FATAL_ERROR(
1868 "fatal flex scanner internal error--no action found" );
1869 } /* end of action switch */
1870 } /* end of scanning one token */
1871 } /* end of yylex */
1872
1873 yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )
1874 {
1875 yyin = arg_yyin;
1876 yyout = arg_yyout;
1877 yy_c_buf_p = 0;
1878 yy_init = 1;
1879 yy_start = 0;
1880 yy_flex_debug = 0;
1881 yylineno = 1; // this will only get updated if %option yylineno
1882
1883 yy_did_buffer_switch_on_eof = 0;
1884
1885 yy_looking_for_trail_begin = 0;
1886 yy_more_flag = 0;
1887 yy_more_len = 0;
1888 yy_more_offset = yy_prev_more_offset = 0;
1889
1890 yy_start_stack_ptr = yy_start_stack_depth = 0;
1891 yy_start_stack = 0;
1892
1893 yy_current_buffer = 0;
1894
1895 #ifdef YY_USES_REJECT
1896
1897 yy_state_buf = new yy_state_type[YY_BUF_SIZE + 2];
1898 #else
1899
1900 yy_state_buf = 0;
1901 #endif
1902
1903 }
1904
1905 yyFlexLexer::~yyFlexLexer()
1906 {
1907 delete[] yy_state_buf;
1908 yy_delete_buffer( yy_current_buffer );
1909 }
1910
1911 void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )
1912 {
1913 if ( new_in )
1914 {
1915 yy_delete_buffer( yy_current_buffer );
1916 yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) );
1917 }
1918
1919 if ( new_out )
1920 yyout = new_out;
1921 }
1922
1923 #ifdef YY_INTERACTIVE
1924 int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )
1925 #else
1926 int yyFlexLexer::LexerInput( char* buf, int max_size )
1927 #endif
1928 {
1929 if ( yyin->eof() || yyin->fail() )
1930 return 0;
1931
1932 #ifdef YY_INTERACTIVE
1933
1934 yyin->get
1935 ( buf[0] );
1936
1937 if ( yyin->eof() )
1938 return 0;
1939
1940 if ( yyin->bad() )
1941 return -1;
1942
1943 return 1;
1944
1945 #else
1946
1947 (void) yyin->read( buf, max_size );
1948
1949 if ( yyin->bad() )
1950 return -1;
1951 else
1952 return yyin->gcount();
1953 #endif
1954
1955 }
1956
1957 void yyFlexLexer::LexerOutput( const char* buf, int size )
1958 {
1959 (void) yyout->write( buf, size );
1960 }
1961
1962 /* yy_get_next_buffer - try to read in a new buffer
1963 *
1964 * Returns a code representing an action:
1965 * EOB_ACT_LAST_MATCH -
1966 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1967 * EOB_ACT_END_OF_FILE - end of file
1968 */
1969
1970 int yyFlexLexer::yy_get_next_buffer()
1971 {
1972 register char *dest = yy_current_buffer->yy_ch_buf;
1973 register char *source = yytext_ptr;
1974 register int number_to_move, i;
1975 int ret_val;
1976
1977 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1978 YY_FATAL_ERROR(
1979 "fatal flex scanner internal error--end of buffer missed" );
1980
1981 if ( yy_current_buffer->yy_fill_buffer == 0 )
1982 { /* Don't try to fill the buffer, so this is an EOF. */
1983 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1984 {
1985 /* We matched a single character, the EOB, so
1986 * treat this as a final EOF.
1987 */
1988 return EOB_ACT_END_OF_FILE;
1989 }
1990
1991 else
1992 {
1993 /* We matched some text prior to the EOB, first
1994 * process it.
1995 */
1996 return EOB_ACT_LAST_MATCH;
1997 }
1998 }
1999
2000 /* Try to read more data. */
2001
2002 /* First move last chars to start of buffer. */
2003 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
2004
2005 for ( i = 0; i < number_to_move; ++i )
2006 *(dest++) = *(source++);
2007
2008 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2009 /* don't do the read, it's not guaranteed to return an EOF,
2010 * just force an EOF
2011 */
2012 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
2013
2014 else
2015 {
2016 int num_to_read =
2017 yy_current_buffer->yy_buf_size - number_to_move - 1;
2018
2019 while ( num_to_read <= 0 )
2020 { /* Not enough room in the buffer - grow it. */
2021 #if 0
2022 YY_FATAL_ERROR(
2023 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2024 #else
2025
2026 /* just a shorter name for the current buffer */
2027 YY_BUFFER_STATE b = yy_current_buffer;
2028
2029 int yy_c_buf_p_offset =
2030 (int) (yy_c_buf_p - b->yy_ch_buf);
2031
2032 if ( b->yy_is_our_buffer )
2033 {
2034 int new_size = b->yy_buf_size * 2;
2035
2036 if ( new_size <= 0 )
2037 b->yy_buf_size += b->yy_buf_size / 8;
2038 else
2039 b->yy_buf_size *= 2;
2040
2041 b->yy_ch_buf = (char *)
2042 /* Include room in for 2 EOB chars. */
2043 yy_flex_realloc( (void *) b->yy_ch_buf,
2044 b->yy_buf_size + 2 );
2045 }
2046 else
2047 /* Can't grow it, we don't own it. */
2048 b->yy_ch_buf = 0;
2049
2050 if ( ! b->yy_ch_buf )
2051 YY_FATAL_ERROR(
2052 "fatal error - scanner input buffer overflow" );
2053
2054 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2055
2056 num_to_read = yy_current_buffer->yy_buf_size -
2057 number_to_move - 1;
2058 #endif
2059
2060 }
2061
2062 if ( num_to_read > YY_READ_BUF_SIZE )
2063 num_to_read = YY_READ_BUF_SIZE;
2064
2065 /* Read in more data. */
2066 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
2067 yy_n_chars, num_to_read );
2068
2069 yy_current_buffer->yy_n_chars = yy_n_chars;
2070 }
2071
2072 if ( yy_n_chars == 0 )
2073 {
2074 if ( number_to_move == YY_MORE_ADJ )
2075 {
2076 ret_val = EOB_ACT_END_OF_FILE;
2077 yyrestart( yyin );
2078 }
2079
2080 else
2081 {
2082 ret_val = EOB_ACT_LAST_MATCH;
2083 yy_current_buffer->yy_buffer_status =
2084 YY_BUFFER_EOF_PENDING;
2085 }
2086 }
2087
2088 else
2089 ret_val = EOB_ACT_CONTINUE_SCAN;
2090
2091 yy_n_chars += number_to_move;
2092 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2093 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2094
2095 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
2096
2097 return ret_val;
2098 }
2099
2100
2101 /* yy_get_previous_state - get the state just before the EOB char was reached */
2102
2103 yy_state_type yyFlexLexer::yy_get_previous_state()
2104 {
2105 register yy_state_type yy_current_state;
2106 register char *yy_cp;
2107
2108 yy_current_state = yy_start;
2109 yy_state_ptr = yy_state_buf;
2110 *yy_state_ptr++ = yy_current_state;
2111
2112 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
2113 {
2114 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2115 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2116 {
2117 yy_current_state = (int) yy_def[yy_current_state];
2118 if ( yy_current_state >= 364 )
2119 yy_c = yy_meta[(unsigned int) yy_c];
2120 }
2121 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2122 *yy_state_ptr++ = yy_current_state;
2123 }
2124
2125 return yy_current_state;
2126 }
2127
2128
2129 /* yy_try_NUL_trans - try to make a transition on the NUL character
2130 *
2131 * synopsis
2132 * next_state = yy_try_NUL_trans( current_state );
2133 */
2134
2135 yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
2136 {
2137 register int yy_is_jam;
2138
2139 register YY_CHAR yy_c = 1;
2140 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2141 {
2142 yy_current_state = (int) yy_def[yy_current_state];
2143 if ( yy_current_state >= 364 )
2144 yy_c = yy_meta[(unsigned int) yy_c];
2145 }
2146 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2147 yy_is_jam = (yy_current_state == 363);
2148 if ( ! yy_is_jam )
2149 *yy_state_ptr++ = yy_current_state;
2150
2151 return yy_is_jam ? 0 : yy_current_state;
2152 }
2153
2154
2155 void yyFlexLexer::yyunput( int c, register char* yy_bp )
2156 {
2157 register char *yy_cp = yy_c_buf_p;
2158
2159 /* undo effects of setting up yytext */
2160 *yy_cp = yy_hold_char;
2161
2162 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2163 { /* need to shift things up to make room */
2164 /* +2 for EOB chars. */
2165 register int number_to_move = yy_n_chars + 2;
2166 register char *dest = &yy_current_buffer->yy_ch_buf[
2167 yy_current_buffer->yy_buf_size + 2];
2168 register char *source =
2169 &yy_current_buffer->yy_ch_buf[number_to_move];
2170
2171 while ( source > yy_current_buffer->yy_ch_buf )
2172 *--dest = *--source;
2173
2174 yy_cp += (int) (dest - source);
2175 yy_bp += (int) (dest - source);
2176 yy_current_buffer->yy_n_chars =
2177 yy_n_chars = yy_current_buffer->yy_buf_size;
2178
2179 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2180 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2181 }
2182
2183 *--yy_cp = (char) c;
2184
2185 if ( c == '\n' )
2186 --yylineno;
2187
2188 yytext_ptr = yy_bp;
2189 yy_hold_char = *yy_cp;
2190 yy_c_buf_p = yy_cp;
2191 }
2192
2193
2194 int yyFlexLexer::yyinput()
2195 {
2196 int c;
2197
2198 *yy_c_buf_p = yy_hold_char;
2199
2200 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2201 {
2202 /* yy_c_buf_p now points to the character we want to return.
2203 * If this occurs *before* the EOB characters, then it's a
2204 * valid NUL; if not, then we've hit the end of the buffer.
2205 */
2206 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2207 /* This was really a NUL. */
2208 *yy_c_buf_p = '\0';
2209
2210 else
2211 { /* need more input */
2212 int offset = yy_c_buf_p - yytext_ptr;
2213 ++yy_c_buf_p;
2214
2215 switch ( yy_get_next_buffer() )
2216 {
2217 case EOB_ACT_LAST_MATCH:
2218 /* This happens because yy_g_n_b()
2219 * sees that we've accumulated a
2220 * token and flags that we need to
2221 * try matching the token before
2222 * proceeding. But for input(),
2223 * there's no matching to consider.
2224 * So convert the EOB_ACT_LAST_MATCH
2225 * to EOB_ACT_END_OF_FILE.
2226 */
2227
2228 /* Reset buffer status. */
2229 yyrestart( yyin );
2230
2231 /* fall through */
2232
2233 case EOB_ACT_END_OF_FILE:
2234 {
2235 if ( yywrap() )
2236 return EOF;
2237
2238 if ( ! yy_did_buffer_switch_on_eof )
2239 YY_NEW_FILE;
2240 #ifdef __cplusplus
2241
2242 return yyinput();
2243 #else
2244
2245 return input();
2246 #endif
2247
2248 }
2249
2250 case EOB_ACT_CONTINUE_SCAN:
2251 yy_c_buf_p = yytext_ptr + offset;
2252 break;
2253 }
2254 }
2255 }
2256
2257 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
2258 *yy_c_buf_p = '\0'; /* preserve yytext */
2259 yy_hold_char = *++yy_c_buf_p;
2260
2261 if ( c == '\n' )
2262 ++yylineno;
2263
2264 return c;
2265 }
2266
2267
2268 void yyFlexLexer::yyrestart( std::istream* input_file )
2269 {
2270 if ( ! yy_current_buffer )
2271 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2272
2273 yy_init_buffer( yy_current_buffer, input_file );
2274 yy_load_buffer_state();
2275 }
2276
2277
2278 void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2279 {
2280 if ( yy_current_buffer == new_buffer )
2281 return ;
2282
2283 if ( yy_current_buffer )
2284 {
2285 /* Flush out information for old buffer. */
2286 *yy_c_buf_p = yy_hold_char;
2287 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2288 yy_current_buffer->yy_n_chars = yy_n_chars;
2289 }
2290
2291 yy_current_buffer = new_buffer;
2292 yy_load_buffer_state();
2293
2294 /* We don't actually know whether we did this switch during
2295 * EOF (yywrap()) processing, but the only time this flag
2296 * is looked at is after yywrap() is called, so it's safe
2297 * to go ahead and always set it.
2298 */
2299 yy_did_buffer_switch_on_eof = 1;
2300 }
2301
2302
2303 void yyFlexLexer::yy_load_buffer_state()
2304 {
2305 yy_n_chars = yy_current_buffer->yy_n_chars;
2306 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2307 yyin = yy_current_buffer->yy_input_file;
2308 yy_hold_char = *yy_c_buf_p;
2309 }
2310
2311
2312 YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
2313 {
2314 YY_BUFFER_STATE b;
2315
2316 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2317 if ( ! b )
2318 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2319
2320 b->yy_buf_size = size;
2321
2322 /* yy_ch_buf has to be 2 characters longer than the size given because
2323 * we need to put in 2 end-of-buffer characters.
2324 */
2325 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2326 if ( ! b->yy_ch_buf )
2327 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2328
2329 b->yy_is_our_buffer = 1;
2330
2331 yy_init_buffer( b, file );
2332
2333 return b;
2334 }
2335
2336
2337 void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
2338 {
2339 if ( ! b )
2340 return ;
2341
2342 if ( b == yy_current_buffer )
2343 yy_current_buffer = (YY_BUFFER_STATE) 0;
2344
2345 if ( b->yy_is_our_buffer )
2346 yy_flex_free( (void *) b->yy_ch_buf );
2347
2348 yy_flex_free( (void *) b );
2349 }
2350
2351
2352 /*extern "C" int isatty YY_PROTO(( int ));*/
2353 void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file )
2354
2355 {
2356 yy_flush_buffer( b );
2357
2358 b->yy_input_file = file;
2359 b->yy_fill_buffer = 1;
2360
2361 b->yy_is_interactive = 0;
2362 }
2363
2364
2365 void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
2366 {
2367 if ( ! b )
2368 return ;
2369
2370 b->yy_n_chars = 0;
2371
2372 /* We always need two end-of-buffer characters. The first causes
2373 * a transition to the end-of-buffer state. The second causes
2374 * a jam in that state.
2375 */
2376 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2377 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2378
2379 b->yy_buf_pos = &b->yy_ch_buf[0];
2380
2381 b->yy_at_bol = 1;
2382 b->yy_buffer_status = YY_BUFFER_NEW;
2383
2384 if ( b == yy_current_buffer )
2385 yy_load_buffer_state();
2386 }
2387
2388
2389 #ifndef YY_NO_SCAN_BUFFER
2390 #endif
2391
2392
2393 #ifndef YY_NO_SCAN_STRING
2394 #endif
2395
2396
2397 #ifndef YY_NO_SCAN_BYTES
2398 #endif
2399
2400
2401 #ifndef YY_NO_PUSH_STATE
2402 void yyFlexLexer::yy_push_state( int new_state )
2403 {
2404 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2405 {
2406 yy_size_t new_size;
2407
2408 yy_start_stack_depth += YY_START_STACK_INCR;
2409 new_size = yy_start_stack_depth * sizeof( int );
2410
2411 if ( ! yy_start_stack )
2412 yy_start_stack = (int *) yy_flex_alloc( new_size );
2413
2414 else
2415 yy_start_stack = (int *) yy_flex_realloc(
2416 (void *) yy_start_stack, new_size );
2417
2418 if ( ! yy_start_stack )
2419 YY_FATAL_ERROR(
2420 "out of memory expanding start-condition stack" );
2421 }
2422
2423 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2424
2425 BEGIN(new_state);
2426 }
2427 #endif
2428
2429
2430 #ifndef YY_NO_POP_STATE
2431 void yyFlexLexer::yy_pop_state()
2432 {
2433 if ( --yy_start_stack_ptr < 0 )
2434 YY_FATAL_ERROR( "start-condition stack underflow" );
2435
2436 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2437 }
2438 #endif
2439
2440
2441 #ifndef YY_NO_TOP_STATE
2442 int yyFlexLexer::yy_top_state()
2443 {
2444 return yy_start_stack[yy_start_stack_ptr - 1];
2445 }
2446 #endif
2447
2448 #ifndef YY_EXIT_FAILURE
2449 #define YY_EXIT_FAILURE 2
2450 #endif
2451
2452
2453 void yyFlexLexer::LexerError( yyconst char msg[] )
2454 {
2455 std::cerr << msg << '\n';
2456
2457 }
2458
2459
2460 /* Redefine yyless() so it works in section 3 code. */
2461
2462 #undef yyless
2463 #define yyless(n) \
2464 do \
2465 { \
2466 /* Undo effects of setting up yytext. */ \
2467 yytext[yyleng] = yy_hold_char; \
2468 yy_c_buf_p = yytext + n; \
2469 yy_hold_char = *yy_c_buf_p; \
2470 *yy_c_buf_p = '\0'; \
2471 yyleng = n; \
2472 } \
2473 while ( 0 )
2474
2475
2476 /* Internal utility routines. */
2477
2478 #ifndef yytext_ptr
2479 #ifdef YY_USE_PROTOS
2480 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2481 #else
2482 static void yy_flex_strncpy( s1, s2, n )
2483 char *s1;
2484 yyconst char *s2;
2485 int n;
2486 #endif
2487
2488 {
2489 register int i;
2490 for ( i = 0; i < n; ++i )
2491 s1[i] = s2[i];
2492 }
2493 #endif
2494
2495 #ifdef YY_NEED_STRLEN
2496 #ifdef YY_USE_PROTOS
2497 static int yy_flex_strlen( yyconst char *s )
2498 #else
2499 static int yy_flex_strlen( s )
2500 yyconst char *s;
2501 #endif
2502
2503 {
2504 register int n;
2505 for ( n = 0; s[n]; ++n )
2506 ;
2507
2508 return n;
2509 }
2510 #endif
2511
2512
2513 #ifdef YY_USE_PROTOS
2514 static void *yy_flex_alloc( yy_size_t size )
2515 #else
2516 static void *yy_flex_alloc( size )
2517 yy_size_t size;
2518 #endif
2519
2520 {
2521 return (void *) malloc( size );
2522 }
2523
2524 #ifdef YY_USE_PROTOS
2525 static void *yy_flex_realloc( void *ptr, yy_size_t size )
2526 #else
2527 static void *yy_flex_realloc( ptr, size )
2528 void *ptr;
2529 yy_size_t size;
2530 #endif
2531
2532 {
2533 /* The cast to (char *) in the following accommodates both
2534 * implementations that use char* generic pointers, and those
2535 * that use void* generic pointers. It works with the latter
2536 * because both ANSI C and C++ allow castless assignment from
2537 * any pointer type to void*, and deal with argument conversions
2538 * as though doing an assignment.
2539 */
2540 return (void *) realloc( (char *) ptr, size );
2541 }
2542
2543 #ifdef YY_USE_PROTOS
2544 static void yy_flex_free( void *ptr )
2545 #else
2546 static void yy_flex_free( ptr )
2547 void *ptr;
2548 #endif
2549
2550 {
2551 free( ptr );
2552 }
2553
2554 #if YY_MAIN
2555 int main()
2556 {
2557 yylex();
2558 return 0;
2559 }
2560 #endif
2561
2562
2563
2564 } // namespace flex
2565
2566
2567 /*******************************************************************/