Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / TAO_IDL / fe / idl.yy.cpp
blob21634a13bc1c5c5b9a76414d0f20f8148d82eb34
1 #line 2 "fe/idl.yy.cpp"
3 #line 4 "fe/idl.yy.cpp"
5 #define YY_INT_ALIGNED short int
7 /* A lexical scanner generated by flex */
9 #define yy_create_buffer tao_yy_create_buffer
10 #define yy_delete_buffer tao_yy_delete_buffer
11 #define yy_scan_buffer tao_yy_scan_buffer
12 #define yy_scan_string tao_yy_scan_string
13 #define yy_scan_bytes tao_yy_scan_bytes
14 #define yy_init_buffer tao_yy_init_buffer
15 #define yy_flush_buffer tao_yy_flush_buffer
16 #define yy_load_buffer_state tao_yy_load_buffer_state
17 #define yy_switch_to_buffer tao_yy_switch_to_buffer
18 #define yypush_buffer_state tao_yypush_buffer_state
19 #define yypop_buffer_state tao_yypop_buffer_state
20 #define yyensure_buffer_stack tao_yyensure_buffer_stack
21 #define yy_flex_debug tao_yy_flex_debug
22 #define yyin tao_yyin
23 #define yyleng tao_yyleng
24 #define yylex tao_yylex
25 #define yylineno tao_yylineno
26 #define yyout tao_yyout
27 #define yyrestart tao_yyrestart
28 #define yytext tao_yytext
29 #define yywrap tao_yywrap
30 #define yyalloc tao_yyalloc
31 #define yyrealloc tao_yyrealloc
32 #define yyfree tao_yyfree
34 #define FLEX_SCANNER
35 #define YY_FLEX_MAJOR_VERSION 2
36 #define YY_FLEX_MINOR_VERSION 6
37 #define YY_FLEX_SUBMINOR_VERSION 4
38 #if YY_FLEX_SUBMINOR_VERSION > 0
39 #define FLEX_BETA
40 #endif
42 #ifdef yy_create_buffer
43 #define tao_yy_create_buffer_ALREADY_DEFINED
44 #else
45 #define yy_create_buffer tao_yy_create_buffer
46 #endif
48 #ifdef yy_delete_buffer
49 #define tao_yy_delete_buffer_ALREADY_DEFINED
50 #else
51 #define yy_delete_buffer tao_yy_delete_buffer
52 #endif
54 #ifdef yy_scan_buffer
55 #define tao_yy_scan_buffer_ALREADY_DEFINED
56 #else
57 #define yy_scan_buffer tao_yy_scan_buffer
58 #endif
60 #ifdef yy_scan_string
61 #define tao_yy_scan_string_ALREADY_DEFINED
62 #else
63 #define yy_scan_string tao_yy_scan_string
64 #endif
66 #ifdef yy_scan_bytes
67 #define tao_yy_scan_bytes_ALREADY_DEFINED
68 #else
69 #define yy_scan_bytes tao_yy_scan_bytes
70 #endif
72 #ifdef yy_init_buffer
73 #define tao_yy_init_buffer_ALREADY_DEFINED
74 #else
75 #define yy_init_buffer tao_yy_init_buffer
76 #endif
78 #ifdef yy_flush_buffer
79 #define tao_yy_flush_buffer_ALREADY_DEFINED
80 #else
81 #define yy_flush_buffer tao_yy_flush_buffer
82 #endif
84 #ifdef yy_load_buffer_state
85 #define tao_yy_load_buffer_state_ALREADY_DEFINED
86 #else
87 #define yy_load_buffer_state tao_yy_load_buffer_state
88 #endif
90 #ifdef yy_switch_to_buffer
91 #define tao_yy_switch_to_buffer_ALREADY_DEFINED
92 #else
93 #define yy_switch_to_buffer tao_yy_switch_to_buffer
94 #endif
96 #ifdef yypush_buffer_state
97 #define tao_yypush_buffer_state_ALREADY_DEFINED
98 #else
99 #define yypush_buffer_state tao_yypush_buffer_state
100 #endif
102 #ifdef yypop_buffer_state
103 #define tao_yypop_buffer_state_ALREADY_DEFINED
104 #else
105 #define yypop_buffer_state tao_yypop_buffer_state
106 #endif
108 #ifdef yyensure_buffer_stack
109 #define tao_yyensure_buffer_stack_ALREADY_DEFINED
110 #else
111 #define yyensure_buffer_stack tao_yyensure_buffer_stack
112 #endif
114 #ifdef yylex
115 #define tao_yylex_ALREADY_DEFINED
116 #else
117 #define yylex tao_yylex
118 #endif
120 #ifdef yyrestart
121 #define tao_yyrestart_ALREADY_DEFINED
122 #else
123 #define yyrestart tao_yyrestart
124 #endif
126 #ifdef yylex_init
127 #define tao_yylex_init_ALREADY_DEFINED
128 #else
129 #define yylex_init tao_yylex_init
130 #endif
132 #ifdef yylex_init_extra
133 #define tao_yylex_init_extra_ALREADY_DEFINED
134 #else
135 #define yylex_init_extra tao_yylex_init_extra
136 #endif
138 #ifdef yylex_destroy
139 #define tao_yylex_destroy_ALREADY_DEFINED
140 #else
141 #define yylex_destroy tao_yylex_destroy
142 #endif
144 #ifdef yyget_debug
145 #define tao_yyget_debug_ALREADY_DEFINED
146 #else
147 #define yyget_debug tao_yyget_debug
148 #endif
150 #ifdef yyset_debug
151 #define tao_yyset_debug_ALREADY_DEFINED
152 #else
153 #define yyset_debug tao_yyset_debug
154 #endif
156 #ifdef yyget_extra
157 #define tao_yyget_extra_ALREADY_DEFINED
158 #else
159 #define yyget_extra tao_yyget_extra
160 #endif
162 #ifdef yyset_extra
163 #define tao_yyset_extra_ALREADY_DEFINED
164 #else
165 #define yyset_extra tao_yyset_extra
166 #endif
168 #ifdef yyget_in
169 #define tao_yyget_in_ALREADY_DEFINED
170 #else
171 #define yyget_in tao_yyget_in
172 #endif
174 #ifdef yyset_in
175 #define tao_yyset_in_ALREADY_DEFINED
176 #else
177 #define yyset_in tao_yyset_in
178 #endif
180 #ifdef yyget_out
181 #define tao_yyget_out_ALREADY_DEFINED
182 #else
183 #define yyget_out tao_yyget_out
184 #endif
186 #ifdef yyset_out
187 #define tao_yyset_out_ALREADY_DEFINED
188 #else
189 #define yyset_out tao_yyset_out
190 #endif
192 #ifdef yyget_leng
193 #define tao_yyget_leng_ALREADY_DEFINED
194 #else
195 #define yyget_leng tao_yyget_leng
196 #endif
198 #ifdef yyget_text
199 #define tao_yyget_text_ALREADY_DEFINED
200 #else
201 #define yyget_text tao_yyget_text
202 #endif
204 #ifdef yyget_lineno
205 #define tao_yyget_lineno_ALREADY_DEFINED
206 #else
207 #define yyget_lineno tao_yyget_lineno
208 #endif
210 #ifdef yyset_lineno
211 #define tao_yyset_lineno_ALREADY_DEFINED
212 #else
213 #define yyset_lineno tao_yyset_lineno
214 #endif
216 #ifdef yywrap
217 #define tao_yywrap_ALREADY_DEFINED
218 #else
219 #define yywrap tao_yywrap
220 #endif
222 #ifdef yyalloc
223 #define tao_yyalloc_ALREADY_DEFINED
224 #else
225 #define yyalloc tao_yyalloc
226 #endif
228 #ifdef yyrealloc
229 #define tao_yyrealloc_ALREADY_DEFINED
230 #else
231 #define yyrealloc tao_yyrealloc
232 #endif
234 #ifdef yyfree
235 #define tao_yyfree_ALREADY_DEFINED
236 #else
237 #define yyfree tao_yyfree
238 #endif
240 #ifdef yytext
241 #define tao_yytext_ALREADY_DEFINED
242 #else
243 #define yytext tao_yytext
244 #endif
246 #ifdef yyleng
247 #define tao_yyleng_ALREADY_DEFINED
248 #else
249 #define yyleng tao_yyleng
250 #endif
252 #ifdef yyin
253 #define tao_yyin_ALREADY_DEFINED
254 #else
255 #define yyin tao_yyin
256 #endif
258 #ifdef yyout
259 #define tao_yyout_ALREADY_DEFINED
260 #else
261 #define yyout tao_yyout
262 #endif
264 #ifdef yy_flex_debug
265 #define tao_yy_flex_debug_ALREADY_DEFINED
266 #else
267 #define yy_flex_debug tao_yy_flex_debug
268 #endif
270 #ifdef yylineno
271 #define tao_yylineno_ALREADY_DEFINED
272 #else
273 #define yylineno tao_yylineno
274 #endif
276 /* First, we deal with platform-specific or compiler-specific issues. */
278 /* begin standard C headers. */
279 #include "ace/OS_NS_stdio.h"
280 #include "ace/OS_NS_errno.h"
282 /* end standard C headers. */
284 /* flex integer type definitions */
286 #ifndef FLEXINT_H
287 #define FLEXINT_H
289 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
291 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L || defined (__HP_aCC)
293 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
294 * if you want the limit (max/min) macros for int types.
296 #ifndef __STDC_LIMIT_MACROS
297 #define __STDC_LIMIT_MACROS 1
298 #endif
300 #include <inttypes.h>
301 typedef int8_t flex_int8_t;
302 typedef uint8_t flex_uint8_t;
303 typedef int16_t flex_int16_t;
304 typedef uint16_t flex_uint16_t;
305 typedef int32_t flex_int32_t;
306 typedef uint32_t flex_uint32_t;
307 #else
308 typedef signed char flex_int8_t;
309 typedef short int flex_int16_t;
310 typedef int flex_int32_t;
311 typedef unsigned char flex_uint8_t;
312 typedef unsigned short int flex_uint16_t;
313 typedef unsigned int flex_uint32_t;
315 /* Limits of integral types. */
316 #ifndef INT8_MIN
317 #define INT8_MIN (-128)
318 #endif
319 #ifndef INT16_MIN
320 #define INT16_MIN (-32767-1)
321 #endif
322 #ifndef INT32_MIN
323 #define INT32_MIN (-2147483647-1)
324 #endif
325 #ifndef INT8_MAX
326 #define INT8_MAX (127)
327 #endif
328 #ifndef INT16_MAX
329 #define INT16_MAX (32767)
330 #endif
331 #ifndef INT32_MAX
332 #define INT32_MAX (2147483647)
333 #endif
334 #ifndef UINT8_MAX
335 #define UINT8_MAX (255U)
336 #endif
337 #ifndef UINT16_MAX
338 #define UINT16_MAX (65535U)
339 #endif
340 #ifndef UINT32_MAX
341 #define UINT32_MAX (4294967295U)
342 #endif
344 #ifndef SIZE_MAX
345 #define SIZE_MAX (~(size_t)0)
346 #endif
348 #endif /* ! C99 */
350 #endif /* ! FLEXINT_H */
352 /* begin standard C++ headers. */
354 /* TODO: this is always defined, so inline it */
355 #define yyconst const
357 #if defined(__GNUC__) && __GNUC__ >= 3
358 #define yynoreturn __attribute__((__noreturn__))
359 #else
360 #define yynoreturn
361 #endif
363 /* Returned upon end-of-file. */
364 #define YY_NULL 0
366 /* Promotes a possibly negative, possibly signed char to an
367 * integer in range [0..255] for use as an array index.
369 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
371 /* Enter a start condition. This macro really ought to take a parameter,
372 * but we do it the disgusting crufty way forced on us by the ()-less
373 * definition of BEGIN.
375 #define BEGIN (yy_start) = 1 + 2 *
376 /* Translate the current start state into a value that can be later handed
377 * to BEGIN to return to the state. The YYSTATE alias is for lex
378 * compatibility.
380 #define YY_START (((yy_start) - 1) / 2)
381 #define YYSTATE YY_START
382 /* Action number for EOF rule of a given start state. */
383 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
384 /* Special action meaning "start processing a new file". */
385 #define YY_NEW_FILE yyrestart( yyin )
386 #define YY_END_OF_BUFFER_CHAR 0
388 /* Size of default input buffer. */
389 #ifndef YY_BUF_SIZE
390 #ifdef __ia64__
391 /* On IA-64, the buffer size is 16k, not 8k.
392 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
393 * Ditto for the __ia64__ case accordingly.
395 #define YY_BUF_SIZE 32768
396 #else
397 #define YY_BUF_SIZE 16384
398 #endif /* __ia64__ */
399 #endif
401 /* The state buf must be large enough to hold one state per character in the main buffer.
403 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
405 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
406 #define YY_TYPEDEF_YY_BUFFER_STATE
407 typedef struct yy_buffer_state *YY_BUFFER_STATE;
408 #endif
410 #ifndef YY_TYPEDEF_YY_SIZE_T
411 #define YY_TYPEDEF_YY_SIZE_T
412 typedef size_t yy_size_t;
413 #endif
415 extern int yyleng;
417 extern FILE *yyin, *yyout;
419 #define EOB_ACT_CONTINUE_SCAN 0
420 #define EOB_ACT_END_OF_FILE 1
421 #define EOB_ACT_LAST_MATCH 2
423 #define YY_LESS_LINENO(n)
424 #define YY_LINENO_REWIND_TO(ptr)
426 /* Return all but the first "n" matched characters back to the input stream. */
427 #define yyless(n) \
428 do \
430 /* Undo effects of setting up yytext. */ \
431 int yyless_macro_arg = (n); \
432 YY_LESS_LINENO(yyless_macro_arg);\
433 *yy_cp = (yy_hold_char); \
434 YY_RESTORE_YY_MORE_OFFSET \
435 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
436 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
438 while ( 0 )
439 #define unput(c) yyunput( c, (yytext_ptr) )
441 #ifndef YY_STRUCT_YY_BUFFER_STATE
442 #define YY_STRUCT_YY_BUFFER_STATE
443 struct yy_buffer_state
445 FILE *yy_input_file;
447 char *yy_ch_buf; /* input buffer */
448 char *yy_buf_pos; /* current position in input buffer */
450 /* Size of input buffer in bytes, not including room for EOB
451 * characters.
453 int yy_buf_size;
455 /* Number of characters read into yy_ch_buf, not including EOB
456 * characters.
458 int yy_n_chars;
460 /* Whether we "own" the buffer - i.e., we know we created it,
461 * and can realloc() it to grow it, and should free() it to
462 * delete it.
464 int yy_is_our_buffer;
466 /* Whether this is an "interactive" input source; if so, and
467 * if we're using stdio for input, then we want to use getc()
468 * instead of fread(), to make sure we stop fetching input after
469 * each newline.
471 int yy_is_interactive;
473 /* Whether we're considered to be at the beginning of a line.
474 * If so, '^' rules will be active on the next match, otherwise
475 * not.
477 int yy_at_bol;
479 int yy_bs_lineno; /**< The line count. */
480 int yy_bs_column; /**< The column count. */
482 /* Whether to try to fill the input buffer when we reach the
483 * end of it.
485 int yy_fill_buffer;
487 int yy_buffer_status;
489 #define YY_BUFFER_NEW 0
490 #define YY_BUFFER_NORMAL 1
491 /* When an EOF's been seen but there's still some text to process
492 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
493 * shouldn't try reading from the input source any more. We might
494 * still have a bunch of tokens to match, though, because of
495 * possible backing-up.
497 * When we actually see the EOF, we change the status to "new"
498 * (via yyrestart()), so that the user can continue scanning by
499 * just pointing yyin at a new input file.
501 #define YY_BUFFER_EOF_PENDING 2
504 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
506 /* Stack of input buffers. */
507 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
508 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
509 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
511 /* We provide macros for accessing buffer states in case in the
512 * future we want to put the buffer states in a more general
513 * "scanner state".
515 * Returns the top of the stack, or 0.
517 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
518 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
519 : 0)
520 /* Same as previous macro, but useful when we know that the buffer stack is not
521 * 0 or when we need an lvalue. For internal use only.
523 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
525 /* yy_hold_char holds the character lost when yytext is formed. */
526 static char yy_hold_char;
527 static int yy_n_chars; /* number of characters read into yy_ch_buf */
528 int yyleng;
530 /* Points to current character in buffer. */
531 static char *yy_c_buf_p = 0;
532 static int yy_init = 0; /* whether we need to initialize */
533 static int yy_start = 0; /* start state number */
535 /* Flag which is used to allow yywrap()'s to do buffer switches
536 * instead of setting up a fresh yyin. A bit of a hack ...
538 static int yy_did_buffer_switch_on_eof;
540 void yyrestart ( FILE *input_file );
541 void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
542 YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
543 void yy_delete_buffer ( YY_BUFFER_STATE b );
544 void yy_flush_buffer ( YY_BUFFER_STATE b );
545 void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
546 void yypop_buffer_state ( void );
548 static void yyensure_buffer_stack ( void );
549 static void yy_load_buffer_state ( void );
550 static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
551 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
553 YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
554 YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
555 YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
557 void *yyalloc ( yy_size_t );
558 void *yyrealloc ( void *, yy_size_t );
559 void yyfree ( void * );
561 #define yy_new_buffer yy_create_buffer
562 #define yy_set_interactive(is_interactive) \
564 if ( ! YY_CURRENT_BUFFER ){ \
565 yyensure_buffer_stack (); \
566 YY_CURRENT_BUFFER_LVALUE = \
567 yy_create_buffer( yyin, YY_BUF_SIZE ); \
569 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
571 #define yy_set_bol(at_bol) \
573 if ( ! YY_CURRENT_BUFFER ){\
574 yyensure_buffer_stack (); \
575 YY_CURRENT_BUFFER_LVALUE = \
576 yy_create_buffer( yyin, YY_BUF_SIZE ); \
578 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
580 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
582 /* Begin user sect3 */
583 typedef flex_uint8_t YY_CHAR;
585 FILE *yyin = 0, *yyout = 0;
587 typedef int yy_state_type;
589 extern int yylineno;
590 int yylineno = 1;
592 extern char yytext[];
594 static yy_state_type yy_get_previous_state ( void );
595 static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
596 static int yy_get_next_buffer ( void );
597 static void yynoreturn yy_fatal_error ( const char* msg );
599 /* Done after the current pattern has been matched and before the
600 * corresponding action - sets up yytext.
602 #define YY_DO_BEFORE_ACTION \
603 (yytext_ptr) = yy_bp; \
604 yyleng = (int) (yy_cp - yy_bp); \
605 (yy_hold_char) = *yy_cp; \
606 *yy_cp = '\0'; \
607 if ( yyleng >= YYLMAX ) \
608 YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \
609 yy_flex_strncpy( yytext, (yytext_ptr), yyleng + 1 ); \
610 (yy_c_buf_p) = yy_cp;
611 #define YY_NUM_RULES 125
612 #define YY_END_OF_BUFFER 126
613 /* This struct is not used in this scanner,
614 but its presence is necessary. */
615 struct yy_trans_info
617 flex_int32_t yy_verify;
618 flex_int32_t yy_nxt;
620 static const flex_int16_t yy_acclist[645] =
621 { 0,
622 122, 122, 126, 124, 125, 122, 124, 125, 123, 125,
623 123, 124, 125, 124, 125, 124, 125, 124, 125, 124,
624 125, 124, 125, 97, 124, 125, 93, 124, 125, 124,
625 125, 124, 125, 124, 125, 75, 124, 125, 88, 124,
626 125, 88, 124, 125, 88, 124, 125, 88, 124, 125,
627 88, 124, 125, 88, 124, 125, 88, 124, 125, 88,
628 124, 125, 88, 124, 125, 88, 124, 125, 88, 124,
629 125, 88, 124, 125, 88, 124, 125, 88, 124, 125,
630 88, 124, 125, 88, 124, 125, 88, 124, 125, 88,
631 124, 125, 88, 124, 125, 88, 124, 125, 88, 124,
633 125, 88, 124, 125, 88, 124, 125, 88, 124, 125,
634 88, 124, 125, 122, 124, 125, 124, 125, 123, 124,
635 125, 122, 98, 96, 92, 89, 121, 89, 97, 91,
636 93, 73, 71, 72, 88, 88, 88, 88, 88, 88,
637 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
638 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
639 68, 88, 88, 88, 88, 88, 88, 88, 88, 88,
640 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
641 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
642 122, 116, 98, 100, 100, 96, 92, 89, 120, 120,
644 89, 90, 95, 88, 99, 88, 88, 88, 88, 1,
645 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
646 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
647 88, 88, 88, 88, 88, 88, 88, 87, 88, 88,
648 88, 88, 88, 88, 88, 69, 88, 88, 88, 88,
649 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
650 88, 88, 88, 88, 88, 88, 88, 88, 88, 103,
651 101, 103, 94, 89, 90, 88, 99, 104, 88, 65,
652 88, 88, 88, 88, 88, 88, 88, 88, 20, 88,
653 27, 88, 88, 88, 88, 88, 88, 88, 88, 88,
655 13, 88, 88, 88, 88, 88, 88, 88, 88, 48,
656 88, 88, 88, 88, 88, 88, 76, 88, 88, 88,
657 24, 88, 88, 88, 88, 88, 88, 88, 88, 60,
658 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
659 88, 88, 88, 88, 88, 88, 88, 88, 88, 57,
660 88, 88, 31, 88, 88, 88, 117, 101, 102, 66,
661 88, 88, 88, 64, 88, 88, 88, 88, 88, 88,
662 88, 88, 10, 88, 88, 88, 88, 88, 88, 44,
663 88, 88, 88, 88, 88, 18, 88, 22, 88, 88,
664 88, 67, 88, 78, 88, 80, 88, 82, 88, 88,
666 33, 88, 88, 88, 88, 88, 88, 30, 88, 88,
667 88, 88, 88, 88, 88, 88, 88, 88, 88, 25,
668 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
669 88, 88, 88, 77, 88, 17, 88, 88, 88, 28,
670 88, 88, 112, 105, 2, 88, 88, 88, 88, 88,
671 86, 88, 88, 88, 88, 88, 88, 35, 88, 88,
672 23, 88, 88, 88, 88, 46, 88, 88, 49, 88,
673 88, 88, 88, 3, 88, 88, 32, 88, 70, 88,
674 88, 88, 88, 88, 38, 88, 88, 4, 88, 88,
675 88, 88, 14, 88, 12, 88, 88, 19, 88, 88,
677 88, 55, 88, 88, 88, 79, 88, 81, 88, 83,
678 88, 88, 88, 88, 110, 88, 88, 88, 85, 88,
679 29, 88, 88, 88, 88, 8, 88, 21, 88, 88,
680 88, 36, 88, 88, 88, 58, 88, 88, 88, 88,
681 88, 37, 88, 88, 88, 88, 88, 88, 88, 88,
682 11, 88, 88, 88, 88, 88, 15, 88, 108, 108,
683 114, 113, 34, 88, 88, 84, 88, 88, 88, 43,
684 88, 88, 88, 88, 88, 88, 50, 88, 62, 88,
685 88, 52, 88, 88, 5, 88, 16, 88, 88, 39,
686 88, 88, 59, 88, 88, 26, 88, 88, 118, 118,
688 111, 6, 88, 42, 88, 63, 88, 45, 88, 7,
689 88, 47, 88, 9, 88, 88, 88, 53, 88, 54,
690 88, 88, 88, 41, 88, 106, 106, 109, 109, 61,
691 88, 51, 88, 88, 56, 88, 119, 119, 40, 88,
692 115, 107, 107, 74
695 static const flex_int16_t yy_accept[638] =
696 { 0,
697 1, 2, 3, 4, 6, 9, 11, 14, 16, 18,
698 20, 22, 24, 27, 30, 32, 34, 36, 39, 42,
699 45, 48, 51, 54, 57, 60, 63, 66, 69, 72,
700 75, 78, 81, 84, 87, 90, 93, 96, 99, 102,
701 105, 108, 111, 114, 117, 119, 122, 123, 123, 124,
702 124, 124, 124, 124, 125, 126, 127, 128, 128, 129,
703 130, 130, 131, 131, 131, 132, 133, 134, 135, 135,
704 136, 137, 137, 137, 138, 139, 140, 141, 142, 143,
705 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
706 154, 155, 156, 157, 158, 159, 160, 161, 163, 164,
708 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
709 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
710 185, 186, 187, 188, 189, 190, 191, 192, 192, 192,
711 193, 193, 193, 193, 193, 193, 193, 193, 194, 194,
712 194, 194, 195, 195, 196, 196, 196, 197, 197, 198,
713 198, 199, 199, 200, 201, 202, 202, 203, 204, 204,
714 205, 205, 206, 206, 206, 206, 207, 208, 209, 210,
715 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
716 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
717 232, 233, 234, 235, 236, 237, 238, 240, 241, 242,
719 243, 244, 245, 246, 248, 249, 250, 251, 252, 253,
720 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
721 264, 265, 266, 267, 268, 269, 270, 270, 270, 270,
722 270, 270, 270, 270, 270, 271, 273, 273, 273, 274,
723 274, 275, 276, 276, 277, 278, 278, 278, 278, 278,
724 279, 279, 280, 282, 283, 284, 285, 286, 287, 288,
725 289, 291, 293, 294, 295, 296, 297, 298, 299, 300,
726 301, 303, 304, 305, 306, 307, 308, 309, 310, 312,
727 313, 314, 315, 316, 317, 319, 320, 321, 323, 324,
728 325, 326, 327, 328, 329, 330, 332, 333, 334, 335,
730 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
731 346, 347, 348, 349, 350, 352, 353, 355, 356, 357,
732 357, 357, 357, 357, 357, 357, 357, 358, 358, 358,
733 358, 358, 358, 358, 358, 359, 359, 360, 360, 360,
734 362, 362, 362, 362, 363, 364, 366, 367, 368, 369,
735 370, 371, 372, 373, 375, 376, 377, 378, 379, 380,
736 382, 383, 384, 385, 386, 388, 390, 391, 392, 394,
737 396, 398, 400, 401, 403, 404, 405, 406, 407, 408,
738 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
739 420, 422, 423, 424, 425, 426, 427, 428, 429, 430,
741 431, 432, 433, 434, 436, 438, 439, 440, 442, 443,
742 444, 444, 444, 444, 444, 444, 444, 444, 444, 444,
743 444, 444, 444, 444, 444, 445, 445, 447, 448, 449,
744 450, 451, 453, 454, 455, 456, 457, 458, 460, 461,
745 463, 464, 465, 466, 468, 469, 471, 472, 473, 474,
746 476, 477, 479, 481, 482, 483, 484, 485, 487, 488,
747 490, 491, 492, 493, 495, 497, 498, 500, 501, 502,
748 504, 505, 506, 508, 510, 512, 513, 514, 515, 515,
749 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
750 516, 516, 516, 516, 516, 516, 517, 518, 519, 521,
752 523, 524, 525, 526, 528, 530, 531, 532, 534, 535,
753 536, 538, 539, 540, 541, 542, 544, 545, 546, 547,
754 548, 549, 550, 551, 553, 554, 555, 556, 557, 559,
755 559, 559, 560, 561, 561, 561, 562, 562, 562, 563,
756 563, 563, 563, 563, 563, 563, 563, 563, 565, 566,
757 568, 569, 570, 572, 573, 574, 575, 576, 577, 579,
758 581, 582, 584, 585, 587, 589, 590, 592, 593, 595,
759 596, 598, 599, 599, 600, 601, 601, 601, 601, 601,
760 602, 602, 602, 602, 602, 602, 602, 602, 602, 604,
761 606, 608, 610, 612, 614, 616, 617, 618, 620, 622,
763 623, 624, 626, 626, 626, 626, 627, 628, 628, 628,
764 629, 630, 630, 630, 630, 630, 630, 632, 634, 635,
765 637, 637, 637, 638, 639, 639, 639, 639, 639, 641,
766 641, 642, 642, 643, 644, 645, 645
769 static const YY_CHAR yy_ec[256] =
770 { 0,
771 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
772 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
773 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
774 1, 5, 1, 6, 7, 1, 1, 1, 8, 1,
775 1, 9, 10, 1, 11, 12, 13, 14, 15, 16,
776 17, 18, 19, 20, 19, 21, 22, 23, 1, 24,
777 25, 26, 27, 28, 29, 30, 30, 31, 32, 33,
778 34, 34, 34, 34, 34, 35, 34, 34, 36, 34,
779 34, 37, 38, 39, 40, 34, 34, 41, 34, 34,
780 1, 42, 1, 1, 34, 1, 43, 44, 45, 46,
782 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
783 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
784 67, 34, 1, 1, 1, 1, 1, 1, 1, 1,
785 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
786 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
787 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
788 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
789 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
790 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
791 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
793 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
794 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
795 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
796 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
797 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
798 1, 1, 1, 1, 1
801 static const YY_CHAR yy_meta[68] =
802 { 0,
803 1, 2, 3, 4, 2, 5, 1, 6, 1, 7,
804 7, 8, 1, 9, 9, 9, 9, 9, 9, 9,
805 10, 10, 1, 1, 1, 1, 11, 1, 12, 12,
806 13, 13, 12, 14, 14, 14, 14, 14, 14, 14,
807 14, 5, 15, 15, 12, 13, 13, 15, 14, 14,
808 14, 14, 14, 14, 14, 16, 14, 14, 14, 16,
809 14, 16, 17, 16, 14, 16, 14
812 static const flex_int16_t yy_base[679] =
813 { 0,
814 0, 66, 1515, 1516, 67, 1516, 1516, 64, 1472, 62,
815 80, 76, 95, 91, 1490, 1488, 1485, 1467, 0, 1480,
816 80, 1464, 1470, 77, 67, 97, 72, 79, 101, 1459,
817 1448, 35, 1447, 105, 1460, 101, 106, 61, 120, 65,
818 120, 108, 113, 170, 184, 1475, 148, 86, 188, 198,
819 1493, 211, 229, 266, 208, 319, 1516, 206, 360, 64,
820 225, 1516, 168, 0, 229, 1516, 1516, 1516, 1444, 0,
821 1464, 153, 1456, 1445, 1456, 1434, 1443, 1426, 1430, 1429,
822 1433, 1428, 1445, 136, 1426, 1438, 1422, 1433, 1420, 1435,
823 1436, 1435, 141, 1422, 1416, 1422, 1418, 196, 128, 165,
825 1415, 1428, 1419, 1410, 1409, 1423, 1407, 1408, 208, 1423,
826 1415, 1422, 204, 1407, 1403, 1404, 1410, 1397, 1401, 1402,
827 173, 1410, 1402, 1404, 1404, 1391, 262, 0, 214, 1516,
828 267, 351, 1401, 1405, 1399, 1389, 1423, 287, 264, 268,
829 285, 1516, 1439, 1438, 402, 1437, 253, 0, 297, 285,
830 1516, 319, 1516, 321, 0, 409, 350, 0, 1388, 1405,
831 284, 312, 418, 1434, 300, 1394, 1408, 1377, 1395, 0,
832 1377, 294, 1382, 1388, 1374, 1375, 308, 1370, 1388, 1386,
833 1367, 1373, 1371, 1379, 1363, 1378, 1376, 1379, 1361, 1373,
834 1362, 1355, 424, 1374, 1367, 1372, 0, 1354, 1350, 1350,
836 1360, 1363, 1344, 0, 1346, 256, 1343, 1352, 1344, 1358,
837 1340, 1342, 1341, 24, 1342, 1337, 1342, 1350, 1334, 1338,
838 1343, 1332, 1329, 1345, 1347, 1329, 1382, 1381, 1332, 1338,
839 1328, 1340, 480, 434, 1516, 1516, 447, 1374, 0, 494,
840 494, 1516, 1324, 1348, 366, 1373, 352, 535, 0, 1516,
841 0, 1333, 0, 1317, 1315, 1324, 1323, 1330, 1325, 1324,
842 0, 0, 1313, 1322, 268, 1321, 1310, 1303, 1311, 1303,
843 0, 1301, 1304, 1304, 1313, 1313, 1296, 1314, 0, 1296,
844 1293, 1334, 1337, 1334, 0, 1291, 1296, 0, 1300, 1291,
845 1293, 1295, 1281, 1282, 1300, 1280, 1298, 1297, 1288, 1287,
847 1290, 1279, 1288, 1291, 1271, 1276, 1286, 1273, 1284, 1283,
848 422, 369, 1271, 1277, 0, 1278, 0, 1264, 1272, 1315,
849 516, 1273, 1235, 1243, 1240, 1234, 1516, 405, 520, 1179,
850 1183, 1177, 1167, 437, 1516, 1195, 1516, 1194, 1139, 0,
851 566, 603, 1192, 1132, 1150, 0, 1148, 1144, 1129, 1127,
852 1141, 1127, 1137, 0, 1126, 1076, 1084, 1082, 1088, 0,
853 1051, 1050, 1051, 1050, 0, 0, 1054, 1040, 0, 0,
854 0, 0, 1051, 0, 1051, 1017, 1029, 1017, 1027, 0,
855 1006, 1005, 1007, 1004, 1019, 135, 1003, 1003, 1000, 1002,
856 0, 1003, 987, 986, 992, 996, 988, 986, 986, 968,
858 986, 989, 986, 0, 0, 946, 938, 0, 943, 1516,
859 542, 357, 932, 395, 936, 982, 978, 927, 931, 921,
860 918, 897, 450, 638, 1516, 929, 0, 887, 866, 874,
861 853, 0, 849, 840, 820, 834, 818, 0, 816, 0,
862 809, 824, 799, 0, 801, 0, 818, 782, 764, 0,
863 767, 0, 0, 762, 751, 770, 769, 0, 764, 0,
864 759, 767, 750, 0, 0, 748, 0, 747, 759, 0,
865 751, 758, 0, 0, 0, 756, 734, 740, 560, 1516,
866 586, 443, 410, 455, 599, 744, 776, 532, 729, 716,
867 709, 698, 675, 673, 727, 669, 668, 669, 0, 0,
869 644, 639, 619, 0, 0, 621, 608, 0, 617, 618,
870 0, 604, 584, 582, 575, 0, 566, 568, 547, 565,
871 564, 549, 557, 0, 551, 549, 550, 537, 0, 635,
872 529, 1516, 572, 589, 670, 1516, 588, 467, 1516, 639,
873 472, 517, 484, 518, 515, 481, 550, 0, 493, 0,
874 477, 470, 0, 479, 468, 457, 470, 415, 0, 0,
875 411, 0, 381, 0, 0, 352, 0, 359, 0, 345,
876 0, 341, 603, 1516, 674, 381, 705, 695, 709, 1516,
877 721, 724, 486, 488, 555, 724, 329, 300, 0, 0,
878 0, 0, 0, 0, 0, 283, 251, 0, 0, 262,
880 213, 0, 750, 501, 730, 1516, 746, 756, 759, 1516,
881 761, 763, 230, 216, 565, 152, 0, 0, 102, 0,
882 766, 771, 1516, 775, 114, 777, 781, 0, 0, 792,
883 1516, 788, 1516, 796, 1516, 1516, 823, 840, 850, 855,
884 868, 884, 894, 907, 917, 924, 926, 941, 958, 970,
885 977, 986, 992, 1009, 1021, 1028, 1035, 1045, 1059, 1069,
886 1079, 1091, 1105, 1116, 1128, 1143, 1160, 1176, 1186, 1195,
887 1206, 1222, 1233, 1250, 1267, 1283, 1294, 1311
890 static const flex_int16_t yy_def[679] =
891 { 0,
892 636, 1, 636, 636, 636, 636, 636, 637, 638, 636,
893 636, 636, 636, 639, 636, 636, 636, 636, 640, 640,
894 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
895 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
896 640, 640, 640, 636, 636, 636, 636, 637, 636, 641,
897 636, 642, 636, 636, 643, 636, 636, 644, 636, 13,
898 645, 636, 646, 647, 639, 636, 636, 636, 636, 640,
899 640, 648, 649, 640, 640, 640, 640, 640, 640, 640,
900 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
901 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
903 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
904 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
905 640, 640, 640, 640, 640, 640, 636, 45, 45, 636,
906 45, 45, 636, 636, 636, 636, 636, 636, 637, 637,
907 637, 636, 636, 636, 636, 650, 54, 651, 643, 652,
908 636, 644, 636, 644, 59, 636, 646, 647, 636, 640,
909 648, 636, 653, 636, 636, 640, 640, 640, 640, 640,
910 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
911 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
912 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
914 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
915 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
916 640, 640, 640, 640, 640, 640, 654, 636, 636, 636,
917 636, 636, 636, 637, 636, 636, 636, 655, 651, 636,
918 652, 636, 636, 640, 636, 636, 648, 648, 656, 636,
919 657, 640, 640, 640, 640, 640, 640, 640, 640, 640,
920 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
921 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
922 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
923 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
925 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
926 640, 640, 640, 640, 640, 640, 640, 640, 640, 654,
927 636, 636, 636, 636, 636, 233, 636, 233, 233, 636,
928 636, 636, 636, 637, 636, 636, 636, 636, 636, 640,
929 648, 648, 658, 640, 640, 640, 640, 640, 640, 640,
930 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
931 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
932 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
933 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
934 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
936 640, 640, 640, 640, 640, 640, 640, 640, 640, 636,
937 659, 636, 636, 660, 636, 661, 636, 636, 636, 636,
938 636, 636, 648, 342, 636, 662, 640, 640, 640, 640,
939 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
940 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
941 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
942 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
943 640, 640, 640, 640, 640, 640, 640, 640, 663, 636,
944 659, 664, 636, 660, 660, 636, 661, 636, 636, 636,
945 636, 636, 636, 342, 665, 640, 640, 640, 640, 640,
947 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
948 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
949 640, 640, 640, 640, 640, 640, 640, 640, 640, 663,
950 664, 636, 664, 666, 636, 636, 667, 636, 636, 668,
951 636, 636, 669, 636, 636, 648, 636, 640, 640, 640,
952 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
953 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
954 640, 640, 666, 636, 666, 667, 670, 671, 672, 636,
955 668, 673, 636, 669, 669, 636, 636, 636, 640, 640,
956 640, 640, 640, 640, 640, 640, 640, 640, 640, 640,
958 640, 640, 670, 603, 671, 636, 671, 672, 673, 636,
959 673, 674, 675, 636, 636, 636, 640, 640, 640, 640,
960 676, 674, 636, 674, 675, 636, 677, 678, 640, 676,
961 636, 677, 636, 677, 636, 0, 636, 636, 636, 636,
962 636, 636, 636, 636, 636, 636, 636, 636, 636, 636,
963 636, 636, 636, 636, 636, 636, 636, 636, 636, 636,
964 636, 636, 636, 636, 636, 636, 636, 636, 636, 636,
965 636, 636, 636, 636, 636, 636, 636, 636
968 static const flex_int16_t yy_nxt[1584] =
969 { 0,
970 4, 5, 6, 7, 5, 8, 4, 9, 4, 4,
971 10, 11, 12, 13, 14, 14, 14, 14, 14, 14,
972 14, 14, 15, 16, 4, 17, 7, 18, 19, 19,
973 19, 19, 20, 19, 21, 22, 19, 19, 23, 19,
974 19, 4, 24, 25, 26, 27, 28, 29, 30, 31,
975 32, 19, 19, 33, 34, 35, 36, 37, 19, 38,
976 39, 40, 41, 42, 43, 19, 19, 44, 47, 49,
977 44, 47, 45, 53, 306, 54, 55, 55, 55, 55,
978 55, 55, 55, 55, 57, 72, 307, 73, 58, 97,
979 98, 49, 46, 56, 56, 56, 56, 56, 56, 56,
981 56, 56, 59, 111, 636, 50, 59, 112, 60, 60,
982 60, 60, 60, 60, 60, 61, 61, 80, 86, 626,
983 76, 62, 63, 81, 118, 62, 63, 50, 87, 636,
984 77, 119, 78, 88, 89, 64, 62, 63, 79, 82,
985 62, 63, 90, 92, 91, 105, 83, 100, 629, 47,
986 123, 93, 47, 84, 94, 101, 106, 125, 162, 85,
987 64, 102, 108, 107, 124, 109, 113, 103, 110, 114,
988 120, 127, 194, 126, 127, 121, 128, 156, 156, 458,
989 122, 115, 116, 195, 117, 129, 130, 130, 131, 138,
990 176, 177, 138, 139, 163, 459, 186, 132, 132, 132,
992 132, 132, 132, 132, 132, 132, 187, 628, 153, 154,
993 130, 141, 141, 141, 141, 141, 141, 141, 144, 59,
994 196, 613, 197, 220, 145, 145, 145, 145, 145, 145,
995 145, 133, 154, 221, 134, 626, 59, 135, 62, 63,
996 59, 136, 56, 56, 56, 56, 56, 56, 56, 56,
997 56, 146, 192, 62, 63, 62, 63, 193, 206, 62,
998 63, 636, 211, 127, 207, 212, 127, 636, 128, 49,
999 62, 63, 227, 49, 62, 63, 146, 59, 620, 147,
1000 147, 147, 147, 147, 147, 147, 61, 61, 138, 162,
1001 49, 138, 139, 636, 240, 240, 62, 63, 234, 234,
1003 234, 234, 234, 234, 234, 50, 148, 250, 59, 50,
1004 297, 62, 63, 245, 636, 619, 245, 618, 636, 298,
1005 636, 153, 154, 153, 154, 163, 50, 62, 63, 354,
1006 355, 148, 56, 56, 56, 56, 56, 56, 56, 56,
1007 56, 257, 62, 63, 617, 154, 246, 154, 258, 62,
1008 150, 151, 636, 151, 259, 228, 616, 162, 482, 636,
1009 636, 482, 251, 264, 62, 150, 151, 245, 265, 266,
1010 245, 615, 151, 155, 155, 155, 155, 155, 155, 155,
1011 155, 155, 242, 401, 242, 402, 577, 602, 403, 404,
1012 62, 150, 151, 163, 151, 601, 484, 242, 636, 484,
1014 246, 636, 600, 242, 636, 62, 150, 151, 636, 236,
1015 416, 534, 599, 151, 534, 237, 237, 237, 237, 237,
1016 237, 237, 157, 157, 157, 157, 157, 157, 157, 157,
1017 157, 248, 248, 248, 248, 248, 248, 248, 282, 49,
1018 283, 598, 49, 284, 285, 532, 533, 334, 334, 334,
1019 334, 334, 334, 334, 335, 162, 484, 597, 636, 484,
1020 336, 336, 336, 336, 336, 336, 336, 397, 578, 533,
1021 286, 578, 398, 582, 596, 50, 582, 399, 50, 400,
1022 249, 326, 327, 327, 328, 584, 162, 612, 585, 584,
1023 612, 163, 585, 329, 329, 329, 329, 329, 329, 329,
1025 329, 329, 621, 636, 636, 621, 327, 241, 241, 241,
1026 241, 241, 241, 241, 241, 241, 595, 594, 410, 410,
1027 411, 636, 163, 593, 417, 592, 151, 330, 151, 591,
1028 331, 532, 533, 332, 539, 539, 540, 333, 590, 589,
1029 162, 151, 410, 479, 480, 480, 479, 151, 341, 341,
1030 341, 341, 341, 341, 341, 533, 584, 425, 539, 585,
1031 613, 479, 480, 480, 479, 588, 627, 636, 480, 627,
1032 636, 162, 587, 636, 532, 533, 163, 636, 583, 423,
1033 423, 423, 423, 423, 423, 423, 480, 479, 480, 480,
1034 479, 574, 575, 577, 572, 571, 570, 569, 533, 568,
1036 535, 536, 536, 535, 537, 574, 575, 163, 162, 567,
1037 566, 565, 480, 564, 563, 575, 424, 424, 424, 424,
1038 424, 424, 424, 424, 424, 536, 562, 561, 560, 575,
1039 559, 424, 424, 424, 424, 424, 479, 480, 480, 479,
1040 579, 580, 580, 579, 163, 424, 424, 424, 424, 424,
1041 424, 494, 494, 494, 494, 494, 494, 494, 494, 494,
1042 558, 480, 557, 556, 555, 580, 494, 494, 494, 494,
1043 494, 535, 536, 536, 535, 537, 574, 575, 554, 553,
1044 494, 494, 494, 494, 494, 494, 546, 546, 546, 546,
1045 546, 546, 546, 546, 546, 552, 536, 606, 607, 551,
1047 575, 546, 546, 546, 546, 546, 603, 536, 536, 603,
1048 579, 580, 580, 579, 550, 546, 546, 546, 546, 546,
1049 546, 607, 579, 580, 580, 579, 610, 611, 614, 549,
1050 548, 536, 606, 607, 425, 580, 545, 586, 586, 586,
1051 586, 586, 586, 586, 586, 586, 544, 580, 606, 607,
1052 611, 603, 536, 536, 603, 543, 607, 636, 580, 580,
1053 636, 610, 611, 610, 611, 623, 624, 621, 536, 536,
1054 621, 542, 607, 623, 624, 541, 536, 623, 624, 631,
1055 631, 488, 580, 633, 634, 611, 538, 611, 529, 624,
1056 633, 634, 536, 636, 536, 536, 636, 624, 633, 634,
1058 528, 624, 527, 631, 526, 525, 524, 634, 523, 522,
1059 521, 520, 519, 518, 634, 517, 516, 515, 536, 514,
1060 513, 512, 634, 48, 48, 48, 48, 48, 48, 48,
1061 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
1062 51, 51, 511, 51, 51, 51, 51, 51, 51, 51,
1063 51, 51, 51, 51, 51, 51, 51, 65, 65, 65,
1064 510, 509, 65, 70, 70, 508, 70, 70, 70, 70,
1065 70, 70, 140, 140, 507, 506, 140, 505, 140, 504,
1066 503, 502, 140, 140, 143, 143, 501, 143, 143, 143,
1067 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
1069 143, 149, 149, 149, 500, 499, 149, 152, 152, 152,
1070 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
1071 152, 152, 152, 152, 61, 61, 61, 498, 497, 61,
1072 157, 496, 157, 157, 158, 158, 425, 158, 158, 493,
1073 158, 161, 161, 161, 161, 161, 161, 161, 161, 161,
1074 161, 161, 161, 161, 161, 161, 161, 161, 164, 164,
1075 492, 164, 164, 164, 164, 164, 164, 164, 164, 164,
1076 164, 164, 164, 164, 164, 238, 491, 490, 238, 238,
1077 489, 238, 238, 416, 238, 239, 239, 488, 239, 239,
1078 486, 239, 241, 483, 241, 241, 247, 247, 478, 477,
1080 247, 476, 247, 475, 474, 473, 247, 247, 247, 320,
1081 320, 320, 320, 320, 320, 320, 320, 320, 320, 320,
1082 320, 320, 320, 320, 320, 320, 338, 472, 471, 338,
1083 338, 470, 338, 338, 469, 338, 342, 342, 468, 342,
1084 342, 467, 342, 343, 343, 466, 343, 343, 465, 343,
1085 426, 464, 463, 426, 426, 462, 426, 426, 461, 426,
1086 481, 481, 481, 460, 457, 456, 455, 481, 481, 481,
1087 485, 454, 453, 452, 451, 450, 449, 485, 485, 487,
1088 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
1089 487, 487, 487, 487, 487, 487, 495, 448, 447, 495,
1091 495, 446, 495, 495, 445, 495, 530, 530, 530, 444,
1092 443, 442, 441, 530, 530, 530, 531, 531, 531, 531,
1093 531, 531, 531, 531, 531, 531, 531, 531, 531, 531,
1094 531, 531, 531, 547, 440, 439, 547, 547, 438, 547,
1095 547, 437, 547, 573, 573, 573, 573, 573, 573, 573,
1096 573, 573, 573, 573, 573, 573, 573, 573, 573, 573,
1097 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
1098 576, 576, 576, 576, 576, 576, 576, 581, 581, 581,
1099 436, 435, 434, 433, 581, 581, 581, 586, 432, 431,
1100 430, 429, 428, 427, 586, 586, 604, 604, 604, 425,
1102 422, 337, 335, 604, 604, 604, 605, 605, 605, 605,
1103 605, 605, 605, 605, 605, 605, 605, 605, 605, 605,
1104 605, 605, 605, 608, 608, 608, 421, 420, 419, 418,
1105 608, 608, 608, 609, 609, 609, 609, 609, 609, 609,
1106 609, 609, 609, 609, 609, 609, 609, 609, 609, 609,
1107 622, 622, 622, 622, 622, 622, 622, 622, 622, 622,
1108 622, 622, 622, 622, 622, 622, 622, 625, 625, 625,
1109 625, 625, 625, 625, 625, 625, 625, 625, 625, 625,
1110 625, 625, 625, 625, 630, 630, 630, 636, 415, 414,
1111 413, 630, 630, 630, 632, 632, 632, 632, 632, 632,
1113 632, 632, 632, 632, 632, 632, 632, 632, 632, 632,
1114 632, 635, 635, 635, 635, 635, 635, 635, 635, 412,
1115 321, 635, 409, 408, 407, 406, 405, 396, 395, 394,
1116 393, 392, 391, 390, 389, 388, 387, 386, 385, 384,
1117 383, 382, 381, 380, 379, 378, 377, 376, 375, 374,
1118 373, 372, 371, 370, 369, 368, 367, 366, 365, 364,
1119 363, 362, 361, 360, 359, 358, 357, 356, 353, 352,
1120 351, 350, 349, 348, 347, 346, 345, 344, 72, 340,
1121 339, 337, 325, 324, 323, 322, 227, 321, 319, 318,
1122 317, 316, 315, 314, 313, 312, 311, 310, 309, 308,
1124 305, 304, 303, 302, 301, 300, 299, 296, 295, 294,
1125 293, 292, 291, 290, 289, 288, 287, 281, 280, 279,
1126 278, 277, 276, 275, 274, 273, 272, 271, 270, 269,
1127 268, 267, 263, 262, 261, 260, 256, 255, 254, 253,
1128 252, 250, 244, 243, 235, 235, 235, 233, 232, 231,
1129 230, 229, 226, 225, 224, 223, 222, 219, 218, 217,
1130 216, 215, 214, 213, 210, 209, 208, 205, 204, 203,
1131 202, 201, 200, 199, 198, 191, 190, 189, 188, 185,
1132 184, 183, 182, 181, 180, 179, 178, 175, 174, 173,
1133 172, 171, 170, 169, 168, 167, 166, 165, 160, 159,
1135 142, 137, 104, 99, 96, 95, 75, 74, 71, 69,
1136 68, 67, 66, 52, 636, 3, 636, 636, 636, 636,
1137 636, 636, 636, 636, 636, 636, 636, 636, 636, 636,
1138 636, 636, 636, 636, 636, 636, 636, 636, 636, 636,
1139 636, 636, 636, 636, 636, 636, 636, 636, 636, 636,
1140 636, 636, 636, 636, 636, 636, 636, 636, 636, 636,
1141 636, 636, 636, 636, 636, 636, 636, 636, 636, 636,
1142 636, 636, 636, 636, 636, 636, 636, 636, 636, 636,
1143 636, 636, 636
1146 static const flex_int16_t yy_chk[1584] =
1147 { 0,
1148 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1149 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1150 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1151 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1152 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1153 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1154 1, 1, 1, 1, 1, 1, 1, 2, 5, 8,
1155 2, 5, 2, 10, 214, 10, 10, 10, 10, 10,
1156 10, 10, 10, 10, 12, 21, 214, 21, 12, 32,
1157 32, 48, 2, 11, 11, 11, 11, 11, 11, 11,
1159 11, 11, 14, 38, 60, 8, 13, 38, 13, 13,
1160 13, 13, 13, 13, 13, 13, 13, 25, 27, 625,
1161 24, 14, 14, 25, 40, 13, 13, 48, 27, 60,
1162 24, 40, 24, 28, 28, 13, 14, 14, 24, 26,
1163 13, 13, 28, 29, 28, 36, 26, 34, 619, 47,
1164 42, 29, 47, 26, 29, 34, 36, 43, 72, 26,
1165 13, 34, 37, 36, 42, 37, 39, 34, 37, 39,
1166 41, 44, 99, 43, 44, 41, 44, 63, 63, 386,
1167 41, 39, 39, 99, 39, 45, 45, 45, 45, 49,
1168 84, 84, 49, 49, 72, 386, 93, 45, 45, 45,
1170 45, 45, 45, 45, 45, 45, 93, 616, 58, 58,
1171 45, 50, 50, 50, 50, 50, 50, 50, 52, 55,
1172 100, 614, 100, 121, 52, 52, 52, 52, 52, 52,
1173 52, 45, 58, 121, 45, 613, 61, 45, 55, 55,
1174 65, 45, 53, 53, 53, 53, 53, 53, 53, 53,
1175 53, 52, 98, 55, 55, 61, 61, 98, 109, 65,
1176 65, 129, 113, 127, 109, 113, 127, 129, 127, 139,
1177 61, 61, 131, 140, 65, 65, 52, 54, 601, 54,
1178 54, 54, 54, 54, 54, 54, 54, 54, 138, 161,
1179 141, 138, 138, 147, 150, 150, 54, 54, 141, 141,
1181 141, 141, 141, 141, 141, 139, 54, 165, 149, 140,
1182 206, 54, 54, 162, 131, 600, 162, 597, 147, 206,
1183 131, 152, 152, 154, 154, 161, 141, 149, 149, 265,
1184 265, 54, 56, 56, 56, 56, 56, 56, 56, 56,
1185 56, 172, 149, 149, 596, 152, 162, 154, 172, 56,
1186 56, 56, 132, 56, 172, 132, 588, 247, 412, 157,
1187 157, 412, 165, 177, 56, 56, 56, 245, 177, 177,
1188 245, 587, 56, 59, 59, 59, 59, 59, 59, 59,
1189 59, 59, 157, 312, 157, 312, 576, 572, 312, 312,
1190 59, 59, 59, 247, 59, 570, 414, 157, 132, 414,
1192 245, 132, 568, 157, 132, 59, 59, 59, 132, 145,
1193 328, 483, 566, 59, 483, 145, 145, 145, 145, 145,
1194 145, 145, 156, 156, 156, 156, 156, 156, 156, 156,
1195 156, 163, 163, 163, 163, 163, 163, 163, 193, 234,
1196 193, 563, 334, 193, 193, 482, 482, 234, 234, 234,
1197 234, 234, 234, 234, 237, 423, 484, 561, 328, 484,
1198 237, 237, 237, 237, 237, 237, 237, 311, 538, 482,
1199 193, 538, 311, 541, 558, 234, 541, 311, 334, 311,
1200 163, 233, 233, 233, 233, 543, 546, 583, 543, 584,
1201 583, 423, 584, 233, 233, 233, 233, 233, 233, 233,
1203 233, 233, 604, 241, 241, 604, 233, 240, 240, 240,
1204 240, 240, 240, 240, 240, 240, 557, 556, 321, 321,
1205 321, 329, 546, 555, 329, 554, 241, 233, 241, 552,
1206 233, 531, 531, 233, 488, 488, 488, 233, 551, 549,
1207 248, 241, 321, 411, 411, 411, 411, 241, 248, 248,
1208 248, 248, 248, 248, 248, 531, 585, 547, 488, 585,
1209 585, 479, 479, 479, 479, 545, 615, 329, 411, 615,
1210 329, 341, 544, 329, 533, 533, 248, 329, 542, 341,
1211 341, 341, 341, 341, 341, 341, 479, 481, 481, 481,
1212 481, 534, 534, 537, 528, 527, 526, 525, 533, 523,
1214 485, 485, 485, 485, 485, 573, 573, 341, 342, 522,
1215 521, 520, 481, 519, 518, 534, 342, 342, 342, 342,
1216 342, 342, 342, 342, 342, 485, 517, 515, 514, 573,
1217 513, 342, 342, 342, 342, 342, 530, 530, 530, 530,
1218 540, 540, 540, 540, 342, 342, 342, 342, 342, 342,
1219 342, 424, 424, 424, 424, 424, 424, 424, 424, 424,
1220 512, 530, 510, 509, 507, 540, 424, 424, 424, 424,
1221 424, 535, 535, 535, 535, 535, 575, 575, 506, 503,
1222 424, 424, 424, 424, 424, 424, 494, 494, 494, 494,
1223 494, 494, 494, 494, 494, 502, 535, 578, 578, 501,
1225 575, 494, 494, 494, 494, 494, 577, 577, 577, 577,
1226 579, 579, 579, 579, 498, 494, 494, 494, 494, 494,
1227 494, 578, 581, 581, 581, 581, 582, 582, 586, 497,
1228 496, 577, 605, 605, 495, 579, 493, 586, 586, 586,
1229 586, 586, 586, 586, 586, 586, 492, 581, 607, 607,
1230 582, 603, 603, 603, 603, 491, 605, 608, 608, 608,
1231 608, 609, 609, 611, 611, 612, 612, 621, 621, 621,
1232 621, 490, 607, 622, 622, 489, 603, 624, 624, 626,
1233 626, 487, 608, 627, 627, 609, 486, 611, 478, 612,
1234 632, 632, 621, 630, 630, 630, 630, 622, 634, 634,
1236 477, 624, 476, 626, 472, 471, 469, 627, 468, 466,
1237 463, 462, 461, 459, 632, 457, 456, 455, 630, 454,
1238 451, 449, 634, 637, 637, 637, 637, 637, 637, 637,
1239 637, 637, 637, 637, 637, 637, 637, 637, 637, 637,
1240 638, 638, 448, 638, 638, 638, 638, 638, 638, 638,
1241 638, 638, 638, 638, 638, 638, 638, 639, 639, 639,
1242 447, 445, 639, 640, 640, 443, 640, 640, 640, 640,
1243 640, 640, 641, 641, 442, 441, 641, 439, 641, 437,
1244 436, 435, 641, 641, 642, 642, 434, 642, 642, 642,
1245 642, 642, 642, 642, 642, 642, 642, 642, 642, 642,
1247 642, 643, 643, 643, 433, 431, 643, 644, 644, 644,
1248 644, 644, 644, 644, 644, 644, 644, 644, 644, 644,
1249 644, 644, 644, 644, 645, 645, 645, 430, 429, 645,
1250 646, 428, 646, 646, 647, 647, 426, 647, 647, 422,
1251 647, 648, 648, 648, 648, 648, 648, 648, 648, 648,
1252 648, 648, 648, 648, 648, 648, 648, 648, 649, 649,
1253 421, 649, 649, 649, 649, 649, 649, 649, 649, 649,
1254 649, 649, 649, 649, 649, 650, 420, 419, 650, 650,
1255 418, 650, 650, 417, 650, 651, 651, 416, 651, 651,
1256 415, 651, 652, 413, 652, 652, 653, 653, 409, 407,
1258 653, 406, 653, 403, 402, 401, 653, 653, 653, 654,
1259 654, 654, 654, 654, 654, 654, 654, 654, 654, 654,
1260 654, 654, 654, 654, 654, 654, 655, 400, 399, 655,
1261 655, 398, 655, 655, 397, 655, 656, 656, 396, 656,
1262 656, 395, 656, 657, 657, 394, 657, 657, 393, 657,
1263 658, 392, 390, 658, 658, 389, 658, 658, 388, 658,
1264 659, 659, 659, 387, 385, 384, 383, 659, 659, 659,
1265 660, 382, 381, 379, 378, 377, 376, 660, 660, 661,
1266 661, 661, 661, 661, 661, 661, 661, 661, 661, 661,
1267 661, 661, 661, 661, 661, 661, 662, 375, 373, 662,
1269 662, 368, 662, 662, 367, 662, 663, 663, 663, 364,
1270 363, 362, 361, 663, 663, 663, 664, 664, 664, 664,
1271 664, 664, 664, 664, 664, 664, 664, 664, 664, 664,
1272 664, 664, 664, 665, 359, 358, 665, 665, 357, 665,
1273 665, 356, 665, 666, 666, 666, 666, 666, 666, 666,
1274 666, 666, 666, 666, 666, 666, 666, 666, 666, 666,
1275 667, 667, 667, 667, 667, 667, 667, 667, 667, 667,
1276 667, 667, 667, 667, 667, 667, 667, 668, 668, 668,
1277 355, 353, 352, 351, 668, 668, 668, 669, 350, 349,
1278 348, 347, 345, 344, 669, 669, 670, 670, 670, 343,
1280 339, 338, 336, 670, 670, 670, 671, 671, 671, 671,
1281 671, 671, 671, 671, 671, 671, 671, 671, 671, 671,
1282 671, 671, 671, 672, 672, 672, 333, 332, 331, 330,
1283 672, 672, 672, 673, 673, 673, 673, 673, 673, 673,
1284 673, 673, 673, 673, 673, 673, 673, 673, 673, 673,
1285 674, 674, 674, 674, 674, 674, 674, 674, 674, 674,
1286 674, 674, 674, 674, 674, 674, 674, 675, 675, 675,
1287 675, 675, 675, 675, 675, 675, 675, 675, 675, 675,
1288 675, 675, 675, 675, 676, 676, 676, 326, 325, 324,
1289 323, 676, 676, 676, 677, 677, 677, 677, 677, 677,
1291 677, 677, 677, 677, 677, 677, 677, 677, 677, 677,
1292 677, 678, 678, 678, 678, 678, 678, 678, 678, 322,
1293 320, 678, 319, 318, 316, 314, 313, 310, 309, 308,
1294 307, 306, 305, 304, 303, 302, 301, 300, 299, 298,
1295 297, 296, 295, 294, 293, 292, 291, 290, 289, 287,
1296 286, 284, 283, 282, 281, 280, 278, 277, 276, 275,
1297 274, 273, 272, 270, 269, 268, 267, 266, 264, 263,
1298 260, 259, 258, 257, 256, 255, 254, 252, 246, 244,
1299 243, 238, 232, 231, 230, 229, 228, 227, 226, 225,
1300 224, 223, 222, 221, 220, 219, 218, 217, 216, 215,
1302 213, 212, 211, 210, 209, 208, 207, 205, 203, 202,
1303 201, 200, 199, 198, 196, 195, 194, 192, 191, 190,
1304 189, 188, 187, 186, 185, 184, 183, 182, 181, 180,
1305 179, 178, 176, 175, 174, 173, 171, 169, 168, 167,
1306 166, 164, 160, 159, 146, 144, 143, 137, 136, 135,
1307 134, 133, 126, 125, 124, 123, 122, 120, 119, 118,
1308 117, 116, 115, 114, 112, 111, 110, 108, 107, 106,
1309 105, 104, 103, 102, 101, 97, 96, 95, 94, 92,
1310 91, 90, 89, 88, 87, 86, 85, 83, 82, 81,
1311 80, 79, 78, 77, 76, 75, 74, 73, 71, 69,
1313 51, 46, 35, 33, 31, 30, 23, 22, 20, 18,
1314 17, 16, 15, 9, 3, 636, 636, 636, 636, 636,
1315 636, 636, 636, 636, 636, 636, 636, 636, 636, 636,
1316 636, 636, 636, 636, 636, 636, 636, 636, 636, 636,
1317 636, 636, 636, 636, 636, 636, 636, 636, 636, 636,
1318 636, 636, 636, 636, 636, 636, 636, 636, 636, 636,
1319 636, 636, 636, 636, 636, 636, 636, 636, 636, 636,
1320 636, 636, 636, 636, 636, 636, 636, 636, 636, 636,
1321 636, 636, 636
1324 extern int yy_flex_debug;
1325 int yy_flex_debug = 0;
1327 static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
1328 static char *yy_full_match;
1329 static int yy_lp;
1330 #define REJECT \
1332 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
1333 yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
1334 ++(yy_lp); \
1335 goto find_rule; \
1338 #define yymore() yymore_used_but_not_detected
1339 #define YY_MORE_ADJ 0
1340 #define YY_RESTORE_YY_MORE_OFFSET
1341 #ifndef YYLMAX
1342 #define YYLMAX 8192
1343 #endif
1345 char yytext[YYLMAX];
1346 char *yytext_ptr;
1347 #line 1 "fe/idl.ll"
1348 #line 2 "fe/idl.ll"
1351 COPYRIGHT
1353 Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
1354 States of America. All Rights Reserved.
1356 This product is protected by copyright and distributed under the following
1357 license restricting its use.
1359 The Interface Definition Language Compiler Front End (CFE) is made
1360 available for your use provided that you include this license and copyright
1361 notice on all media and documentation and the software program in which
1362 this product is incorporated in whole or part. You may copy and extend
1363 functionality (but may not remove functionality) of the Interface
1364 Definition Language CFE without charge, but you are not authorized to
1365 license or distribute it to anyone else except as part of a product or
1366 program developed by you or with the express written consent of Sun
1367 Microsystems, Inc. ("Sun").
1369 The names of Sun Microsystems, Inc. and any of its subsidiaries or
1370 affiliates may not be used in advertising or publicity pertaining to
1371 distribution of Interface Definition Language CFE as permitted herein.
1373 This license is effective until terminated by Sun for failure to comply
1374 with this license. Upon termination, you shall destroy or return all code
1375 and documentation for the Interface Definition Language CFE.
1377 IDL_INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
1378 IDL_ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
1379 FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
1380 DEALING, USAGE OR TRADE PRACTICE.
1382 IDL_INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
1383 IDL_ANY OBLIGATION ON THE PART OF Sun OR IDL_ANY OF ITS SUBSIDIARIES OR AFFILIATES
1384 TO ASSIST IDL_IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
1386 SUN OR IDL_ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
1387 RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR IDL_ANY PATENTS BY
1388 IDL_INTERFACE DEFINITION LANGUAGE CFE OR IDL_ANY PART THEREOF.
1390 IDL_IN NO EVENT WILL SUN OR IDL_ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
1391 IDL_ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
1392 DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
1394 Use, duplication, or disclosure by the government is subject to
1395 restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
1396 Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
1397 52.227-19.
1399 Sun, Sun Microsystems and the Sun logo are trademarks or registered
1400 trademarks of Sun Microsystems, Inc.
1402 SunSoft, Inc.
1403 2550 Garcia Avenue
1404 Mountain View, California 94043
1406 NOTE:
1408 SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
1409 trademarks or registered trademarks of Sun Microsystems, Inc.
1414 * idl.ll - Lexical scanner for IDL
1417 #include "global_extern.h"
1418 #include "nr_extern.h"
1419 #include "utl_strlist.h"
1420 #include "utl_exprlist.h"
1421 #include "utl_labellist.h"
1422 #include "utl_decllist.h"
1423 #include "utl_string.h"
1424 #include "utl_err.h"
1425 #include "ast_union_label.h"
1426 #include "ast_field.h"
1427 #include "ast_expression.h"
1428 #include "ast_argument.h"
1429 #include "ast_operation.h"
1430 #include "ast_root.h"
1431 #include "fe_interface_header.h"
1432 #include "fe_obv_header.h"
1433 #include "fe_component_header.h"
1434 #include "fe_home_header.h"
1435 #include "fe_private.h"
1436 #include "fe_extern.h"
1437 #include "ast_annotation_appl.h"
1438 #include "idl.tab.hpp"
1440 static char * idl_wstring_escape_reader (char *);
1441 static ACE_CDR::WChar idl_wchar_escape_reader (char *);
1442 static ACE_CDR::Char idl_escape_reader (char *);
1443 static ACE_CDR::Double idl_atof (char *);
1444 static ACE_CDR::LongLong idl_atoi (char *, long);
1445 static ACE_CDR::ULongLong idl_atoui (char *, long);
1446 static void idl_parse_line_and_file (char *);
1447 static void idl_store_pragma (char *);
1448 static char * idl_get_pragma_string (char *);
1449 static bool idl_valid_version (char *);
1450 static AST_Decl * idl_find_node (const char *);
1452 #define ace_yytext yytext
1454 #ifdef USE_MCPP_BUFFER_LEXING
1455 #include "mcpp_yyinput.h"
1456 #endif /*USE_MCPP_BUFFER_LEXING*/
1458 #if defined __ANDROID__ && defined ECHO
1459 #undef ECHO
1460 #endif
1462 #define IDL4_KEYWORD(TOKEN_NAME) if (idl_global->idl_version_ >= IDL_VERSION_4) return TOKEN_NAME;
1464 #line 1467 "fe/idl.yy.cpp"
1465 /* SO we don't choke on files that use \r\n */
1466 #line 1469 "fe/idl.yy.cpp"
1468 #define INITIAL 0
1470 #ifndef YY_NO_UNISTD_H
1471 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1472 * down here because we want the user's section 1 to have been scanned first.
1473 * The user has a chance to override it with an option.
1475 #include "ace/os_include/os_ctype.h"
1476 #endif
1478 #ifndef YY_EXTRA_TYPE
1479 #define YY_EXTRA_TYPE void *
1480 #endif
1482 static int yy_init_globals ( void );
1484 /* Accessor methods to globals.
1485 These are made visible to non-reentrant scanners for convenience. */
1487 int yylex_destroy ( void );
1489 int yyget_debug ( void );
1491 void yyset_debug ( int debug_flag );
1493 YY_EXTRA_TYPE yyget_extra ( void );
1495 void yyset_extra ( YY_EXTRA_TYPE user_defined );
1497 FILE *yyget_in ( void );
1499 void yyset_in ( FILE * _in_str );
1501 FILE *yyget_out ( void );
1503 void yyset_out ( FILE * _out_str );
1505 int yyget_leng ( void );
1507 char *yyget_text ( void );
1509 int yyget_lineno ( void );
1511 void yyset_lineno ( int _line_number );
1513 /* Macros after this point can all be overridden by user definitions in
1514 * section 1.
1517 #ifndef YY_SKIP_YYWRAP
1518 #ifdef __cplusplus
1519 extern "C" int yywrap ( void );
1520 #else
1521 extern int yywrap ( void );
1522 #endif
1523 #endif
1525 #ifndef YY_NO_UNPUT
1527 static void yyunput ( int c, char *buf_ptr );
1529 #endif
1531 #ifndef yytext_ptr
1532 static void yy_flex_strncpy ( char *, const char *, int );
1533 #endif
1535 #ifdef YY_NEED_STRLEN
1536 static int yy_flex_strlen ( const char * );
1537 #endif
1539 #ifndef YY_NO_INPUT
1540 #ifdef __cplusplus
1541 static int yyinput ( void );
1542 #else
1543 static int input ( void );
1544 #endif
1546 #endif
1548 /* Amount of stuff to slurp up with each read. */
1549 #ifndef YY_READ_BUF_SIZE
1550 #ifdef __ia64__
1551 /* On IA-64, the buffer size is 16k, not 8k */
1552 #define YY_READ_BUF_SIZE 16384
1553 #else
1554 #define YY_READ_BUF_SIZE 8192
1555 #endif /* __ia64__ */
1556 #endif
1558 /* Copy whatever the last rule matched to the standard output. */
1559 #ifndef ECHO
1560 /* This used to be an fputs(), but since the string might contain NUL's,
1561 * we now use fwrite().
1563 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1564 #endif
1566 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1567 * is returned in "result".
1569 #ifndef YY_INPUT
1570 #define YY_INPUT(buf,result,max_size) \
1571 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1573 int c = '*'; \
1574 int n; \
1575 for ( n = 0; n < max_size && \
1576 (c = ACE_OS::getc( yyin )) != EOF && c != '\n'; ++n ) \
1577 buf[n] = (char) c; \
1578 if ( c == '\n' ) \
1579 buf[n++] = (char) c; \
1580 if ( c == EOF && ferror( yyin ) ) \
1581 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1582 result = n; \
1584 else \
1586 errno=0; \
1587 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1589 if( errno != EINTR) \
1591 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1592 break; \
1594 errno=0; \
1595 clearerr(yyin); \
1600 #endif
1602 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1603 * we don't want an extra ';' after the "return" because that will cause
1604 * some compilers to complain about unreachable statements.
1606 #ifndef yyterminate
1607 #define yyterminate() return YY_NULL
1608 #endif
1610 /* Number of entries by which start-condition stack grows. */
1611 #ifndef YY_START_STACK_INCR
1612 #define YY_START_STACK_INCR 25
1613 #endif
1615 /* Report a fatal error. */
1616 #ifndef YY_FATAL_ERROR
1617 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1618 #endif
1620 /* end tables serialization structures and prototypes */
1622 /* Default declaration of generated scanner - a define so the user can
1623 * easily add parameters.
1625 #ifndef YY_DECL
1626 #define YY_DECL_IS_OURS 1
1628 extern int yylex (void);
1630 #define YY_DECL int yylex (void)
1631 #endif /* !YY_DECL */
1633 /* Code executed at the beginning of each rule, after yytext and yyleng
1634 * have been set up.
1636 #ifndef YY_USER_ACTION
1637 #define YY_USER_ACTION
1638 #endif
1640 /* Code executed at the end of each rule. */
1641 #ifndef YY_BREAK
1642 #define YY_BREAK /*LINTED*/break;
1643 #endif
1645 #define YY_RULE_SETUP \
1646 if ( yyleng > 0 ) \
1647 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1648 (yytext[yyleng - 1] == '\n'); \
1649 YY_USER_ACTION
1651 /** The main scanner function which does all the work.
1653 YY_DECL
1655 yy_state_type yy_current_state;
1656 char *yy_cp, *yy_bp;
1657 int yy_act;
1659 if ( !(yy_init) )
1661 (yy_init) = 1;
1663 #ifdef YY_USER_INIT
1664 YY_USER_INIT;
1665 #endif
1667 /* Create the reject buffer large enough to save one state per allowed character. */
1668 if ( ! (yy_state_buf) )
1669 (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE );
1670 if ( ! (yy_state_buf) )
1671 YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
1673 if ( ! (yy_start) )
1674 (yy_start) = 1; /* first start state */
1676 if ( ! yyin )
1677 yyin = stdin;
1679 if ( ! yyout )
1680 yyout = stdout;
1682 if ( ! YY_CURRENT_BUFFER ) {
1683 yyensure_buffer_stack ();
1684 YY_CURRENT_BUFFER_LVALUE =
1685 yy_create_buffer( yyin, YY_BUF_SIZE );
1688 yy_load_buffer_state( );
1692 #line 125 "fe/idl.ll"
1695 #line 1698 "fe/idl.yy.cpp"
1697 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1699 yy_cp = (yy_c_buf_p);
1701 /* Support of yytext. */
1702 *yy_cp = (yy_hold_char);
1704 /* yy_bp points to the position in yy_ch_buf of the start of
1705 * the current run.
1707 yy_bp = yy_cp;
1709 yy_current_state = (yy_start);
1710 yy_current_state += YY_AT_BOL();
1712 (yy_state_ptr) = (yy_state_buf);
1713 *(yy_state_ptr)++ = yy_current_state;
1715 yy_match:
1718 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1719 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1721 yy_current_state = (int) yy_def[yy_current_state];
1722 if ( yy_current_state >= 637 )
1723 yy_c = yy_meta[yy_c];
1725 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1726 *(yy_state_ptr)++ = yy_current_state;
1727 ++yy_cp;
1729 while ( yy_current_state != 636 );
1731 yy_find_action:
1732 yy_current_state = *--(yy_state_ptr);
1733 (yy_lp) = yy_accept[yy_current_state];
1735 find_rule: /* we branch to this label when backing up */
1737 for ( ; ; ) /* until we find what rule we matched */
1739 if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
1741 yy_act = yy_acclist[(yy_lp)];
1743 (yy_full_match) = yy_cp;
1744 break;
1747 --yy_cp;
1748 yy_current_state = *--(yy_state_ptr);
1749 (yy_lp) = yy_accept[yy_current_state];
1752 YY_DO_BEFORE_ACTION;
1754 do_action: /* This label is used only to access EOF actions. */
1756 switch ( yy_act )
1757 { /* beginning of action switch */
1758 case 1:
1759 YY_RULE_SETUP
1760 #line 127 "fe/idl.ll"
1761 return IDL_ANY;
1762 YY_BREAK
1763 case 2:
1764 YY_RULE_SETUP
1765 #line 128 "fe/idl.ll"
1766 return IDL_OBJECT;
1767 YY_BREAK
1768 case 3:
1769 YY_RULE_SETUP
1770 #line 129 "fe/idl.ll"
1771 return IDL_MODULE;
1772 YY_BREAK
1773 case 4:
1774 YY_RULE_SETUP
1775 #line 130 "fe/idl.ll"
1776 return IDL_RAISES;
1777 YY_BREAK
1778 case 5:
1779 YY_RULE_SETUP
1780 #line 131 "fe/idl.ll"
1781 return IDL_READONLY;
1782 YY_BREAK
1783 case 6:
1784 YY_RULE_SETUP
1785 #line 132 "fe/idl.ll"
1786 return IDL_ATTRIBUTE;
1787 YY_BREAK
1788 case 7:
1789 YY_RULE_SETUP
1790 #line 133 "fe/idl.ll"
1791 return IDL_EXCEPTION;
1792 YY_BREAK
1793 case 8:
1794 YY_RULE_SETUP
1795 #line 134 "fe/idl.ll"
1796 return IDL_CONTEXT;
1797 YY_BREAK
1798 case 9:
1799 YY_RULE_SETUP
1800 #line 135 "fe/idl.ll"
1801 return IDL_INTERFACE;
1802 YY_BREAK
1803 case 10:
1804 YY_RULE_SETUP
1805 #line 136 "fe/idl.ll"
1806 return IDL_CONST;
1807 YY_BREAK
1808 case 11:
1809 YY_RULE_SETUP
1810 #line 137 "fe/idl.ll"
1811 return IDL_TYPEDEF;
1812 YY_BREAK
1813 case 12:
1814 YY_RULE_SETUP
1815 #line 138 "fe/idl.ll"
1816 return IDL_STRUCT;
1817 YY_BREAK
1818 case 13:
1819 YY_RULE_SETUP
1820 #line 139 "fe/idl.ll"
1821 return IDL_ENUM;
1822 YY_BREAK
1823 case 14:
1824 YY_RULE_SETUP
1825 #line 140 "fe/idl.ll"
1826 return IDL_STRING;
1827 YY_BREAK
1828 case 15:
1829 YY_RULE_SETUP
1830 #line 141 "fe/idl.ll"
1831 return IDL_WSTRING;
1832 YY_BREAK
1833 case 16:
1834 YY_RULE_SETUP
1835 #line 142 "fe/idl.ll"
1836 return IDL_SEQUENCE;
1837 YY_BREAK
1838 case 17:
1839 YY_RULE_SETUP
1840 #line 143 "fe/idl.ll"
1841 return IDL_UNION;
1842 YY_BREAK
1843 case 18:
1844 YY_RULE_SETUP
1845 #line 144 "fe/idl.ll"
1846 return IDL_FIXED;
1847 YY_BREAK
1848 case 19:
1849 YY_RULE_SETUP
1850 #line 145 "fe/idl.ll"
1851 return IDL_SWITCH;
1852 YY_BREAK
1853 case 20:
1854 YY_RULE_SETUP
1855 #line 146 "fe/idl.ll"
1856 return IDL_CASE;
1857 YY_BREAK
1858 case 21:
1859 YY_RULE_SETUP
1860 #line 147 "fe/idl.ll"
1861 return IDL_DEFAULT;
1862 YY_BREAK
1863 case 22:
1864 YY_RULE_SETUP
1865 #line 148 "fe/idl.ll"
1866 return IDL_FLOAT;
1867 YY_BREAK
1868 case 23:
1869 YY_RULE_SETUP
1870 #line 149 "fe/idl.ll"
1871 return IDL_DOUBLE;
1872 YY_BREAK
1873 case 24:
1874 YY_RULE_SETUP
1875 #line 150 "fe/idl.ll"
1876 return IDL_LONG;
1877 YY_BREAK
1878 case 25:
1879 YY_RULE_SETUP
1880 #line 151 "fe/idl.ll"
1881 return IDL_SHORT;
1882 YY_BREAK
1883 case 26:
1884 YY_RULE_SETUP
1885 #line 152 "fe/idl.ll"
1886 return IDL_UNSIGNED;
1887 YY_BREAK
1888 case 27:
1889 YY_RULE_SETUP
1890 #line 153 "fe/idl.ll"
1891 return IDL_CHAR;
1892 YY_BREAK
1893 case 28:
1894 YY_RULE_SETUP
1895 #line 154 "fe/idl.ll"
1896 return IDL_WCHAR;
1897 YY_BREAK
1898 case 29:
1899 YY_RULE_SETUP
1900 #line 155 "fe/idl.ll"
1901 return IDL_BOOLEAN;
1902 YY_BREAK
1903 case 30:
1904 YY_RULE_SETUP
1905 #line 156 "fe/idl.ll"
1906 return IDL_OCTET;
1907 YY_BREAK
1908 case 31:
1909 YY_RULE_SETUP
1910 #line 157 "fe/idl.ll"
1911 return IDL_VOID;
1912 YY_BREAK
1913 case 32:
1914 YY_RULE_SETUP
1915 #line 158 "fe/idl.ll"
1916 return IDL_NATIVE;
1917 YY_BREAK
1918 case 33:
1919 YY_RULE_SETUP
1920 #line 159 "fe/idl.ll"
1921 return IDL_LOCAL;
1922 YY_BREAK
1923 case 34:
1924 YY_RULE_SETUP
1925 #line 160 "fe/idl.ll"
1926 return IDL_ABSTRACT;
1927 YY_BREAK
1928 case 35:
1929 YY_RULE_SETUP
1930 #line 162 "fe/idl.ll"
1931 return IDL_CUSTOM;
1932 YY_BREAK
1933 case 36:
1934 YY_RULE_SETUP
1935 #line 163 "fe/idl.ll"
1936 return IDL_FACTORY;
1937 YY_BREAK
1938 case 37:
1939 YY_RULE_SETUP
1940 #line 164 "fe/idl.ll"
1941 return IDL_PRIVATE;
1942 YY_BREAK
1943 case 38:
1944 YY_RULE_SETUP
1945 #line 165 "fe/idl.ll"
1946 return IDL_PUBLIC;
1947 YY_BREAK
1948 case 39:
1949 YY_RULE_SETUP
1950 #line 166 "fe/idl.ll"
1951 return IDL_SUPPORTS;
1952 YY_BREAK
1953 case 40:
1954 YY_RULE_SETUP
1955 #line 167 "fe/idl.ll"
1956 return IDL_TRUNCATABLE;
1957 YY_BREAK
1958 case 41:
1959 YY_RULE_SETUP
1960 #line 168 "fe/idl.ll"
1961 return IDL_VALUETYPE;
1962 YY_BREAK
1963 case 42:
1964 YY_RULE_SETUP
1965 #line 170 "fe/idl.ll"
1966 return IDL_COMPONENT;
1967 YY_BREAK
1968 case 43:
1969 YY_RULE_SETUP
1970 #line 171 "fe/idl.ll"
1971 return IDL_CONSUMES;
1972 YY_BREAK
1973 case 44:
1974 YY_RULE_SETUP
1975 #line 172 "fe/idl.ll"
1976 return IDL_EMITS;
1977 YY_BREAK
1978 case 45:
1979 YY_RULE_SETUP
1980 #line 173 "fe/idl.ll"
1981 return IDL_EVENTTYPE;
1982 YY_BREAK
1983 case 46:
1984 YY_RULE_SETUP
1985 #line 174 "fe/idl.ll"
1986 return IDL_FINDER;
1987 YY_BREAK
1988 case 47:
1989 YY_RULE_SETUP
1990 #line 175 "fe/idl.ll"
1991 return IDL_GETRAISES;
1992 YY_BREAK
1993 case 48:
1994 YY_RULE_SETUP
1995 #line 176 "fe/idl.ll"
1996 return IDL_HOME;
1997 YY_BREAK
1998 case 49:
1999 YY_RULE_SETUP
2000 #line 177 "fe/idl.ll"
2001 return IDL_IMPORT;
2002 YY_BREAK
2003 case 50:
2004 YY_RULE_SETUP
2005 #line 178 "fe/idl.ll"
2006 return IDL_MULTIPLE;
2007 YY_BREAK
2008 case 51:
2009 YY_RULE_SETUP
2010 #line 179 "fe/idl.ll"
2011 return IDL_PRIMARYKEY;
2012 YY_BREAK
2013 case 52:
2014 YY_RULE_SETUP
2015 #line 180 "fe/idl.ll"
2016 return IDL_PROVIDES;
2017 YY_BREAK
2018 case 53:
2019 YY_RULE_SETUP
2020 #line 181 "fe/idl.ll"
2021 return IDL_PUBLISHES;
2022 YY_BREAK
2023 case 54:
2024 YY_RULE_SETUP
2025 #line 182 "fe/idl.ll"
2026 return IDL_SETRAISES;
2027 YY_BREAK
2028 case 55:
2029 YY_RULE_SETUP
2030 #line 183 "fe/idl.ll"
2031 return IDL_TYPEID;
2032 YY_BREAK
2033 case 56:
2034 YY_RULE_SETUP
2035 #line 184 "fe/idl.ll"
2036 return IDL_TYPEPREFIX;
2037 YY_BREAK
2038 case 57:
2039 YY_RULE_SETUP
2040 #line 185 "fe/idl.ll"
2041 return IDL_USES;
2042 YY_BREAK
2043 case 58:
2044 YY_RULE_SETUP
2045 #line 186 "fe/idl.ll"
2046 return IDL_MANAGES;
2047 YY_BREAK
2048 case 59:
2049 YY_RULE_SETUP
2050 #line 188 "fe/idl.ll"
2051 return IDL_TYPENAME;
2052 YY_BREAK
2053 case 60:
2054 YY_RULE_SETUP
2055 #line 189 "fe/idl.ll"
2056 return IDL_PORT;
2057 YY_BREAK
2058 case 61:
2059 YY_RULE_SETUP
2060 #line 190 "fe/idl.ll"
2061 return IDL_MIRRORPORT;
2062 YY_BREAK
2063 case 62:
2064 YY_RULE_SETUP
2065 #line 191 "fe/idl.ll"
2066 return IDL_PORTTYPE;
2067 YY_BREAK
2068 case 63:
2069 YY_RULE_SETUP
2070 #line 192 "fe/idl.ll"
2071 return IDL_CONNECTOR;
2072 YY_BREAK
2073 case 64:
2074 YY_RULE_SETUP
2075 #line 193 "fe/idl.ll"
2076 return IDL_ALIAS;
2077 YY_BREAK
2078 case 65:
2079 YY_RULE_SETUP
2080 #line 195 "fe/idl.ll"
2081 return IDL_TRUETOK;
2082 YY_BREAK
2083 case 66:
2084 YY_RULE_SETUP
2085 #line 196 "fe/idl.ll"
2086 return IDL_FALSETOK;
2087 YY_BREAK
2088 case 67:
2089 YY_RULE_SETUP
2090 #line 198 "fe/idl.ll"
2091 return IDL_INOUT;
2092 YY_BREAK
2093 case 68:
2094 YY_RULE_SETUP
2095 #line 199 "fe/idl.ll"
2096 return IDL_IN;
2097 YY_BREAK
2098 case 69:
2099 YY_RULE_SETUP
2100 #line 200 "fe/idl.ll"
2101 return IDL_OUT;
2102 YY_BREAK
2103 case 70:
2104 YY_RULE_SETUP
2105 #line 201 "fe/idl.ll"
2106 return IDL_ONEWAY;
2107 YY_BREAK
2108 case 71:
2109 YY_RULE_SETUP
2110 #line 203 "fe/idl.ll"
2111 return IDL_LEFT_SHIFT;
2112 YY_BREAK
2113 case 72:
2114 YY_RULE_SETUP
2115 #line 204 "fe/idl.ll"
2116 return IDL_RIGHT_SHIFT;
2117 YY_BREAK
2118 case 73:
2119 YY_RULE_SETUP
2120 #line 205 "fe/idl.ll"
2122 tao_yylval.strval = ACE::strnew ("::");
2123 return IDL_SCOPE_DELIMITOR;
2125 YY_BREAK
2126 case 74:
2127 /* rule 74 can match eol */
2128 YY_RULE_SETUP
2129 #line 210 "fe/idl.ll"
2130 return IDL_ANNOTATION_DECL; // Allow annotation names that start with "annotation"
2131 YY_BREAK
2132 case 75:
2133 YY_RULE_SETUP
2134 #line 211 "fe/idl.ll"
2135 return IDL_ANNOTATION_SYMBOL;
2136 YY_BREAK
2137 case 76:
2138 YY_RULE_SETUP
2139 #line 213 "fe/idl.ll"
2140 IDL4_KEYWORD(IDL_INT8); REJECT;
2141 YY_BREAK
2142 case 77:
2143 YY_RULE_SETUP
2144 #line 214 "fe/idl.ll"
2145 IDL4_KEYWORD(IDL_UINT8); REJECT;
2146 YY_BREAK
2147 case 78:
2148 YY_RULE_SETUP
2149 #line 215 "fe/idl.ll"
2150 IDL4_KEYWORD(IDL_INT16); REJECT;
2151 YY_BREAK
2152 case 79:
2153 YY_RULE_SETUP
2154 #line 216 "fe/idl.ll"
2155 IDL4_KEYWORD(IDL_UINT16); REJECT;
2156 YY_BREAK
2157 case 80:
2158 YY_RULE_SETUP
2159 #line 217 "fe/idl.ll"
2160 IDL4_KEYWORD(IDL_INT32); REJECT;
2161 YY_BREAK
2162 case 81:
2163 YY_RULE_SETUP
2164 #line 218 "fe/idl.ll"
2165 IDL4_KEYWORD(IDL_UINT32); REJECT;
2166 YY_BREAK
2167 case 82:
2168 YY_RULE_SETUP
2169 #line 219 "fe/idl.ll"
2170 IDL4_KEYWORD(IDL_INT64); REJECT;
2171 YY_BREAK
2172 case 83:
2173 YY_RULE_SETUP
2174 #line 220 "fe/idl.ll"
2175 IDL4_KEYWORD(IDL_UINT64); REJECT;
2176 YY_BREAK
2177 case 84:
2178 YY_RULE_SETUP
2179 #line 222 "fe/idl.ll"
2180 IDL4_KEYWORD(IDL_BITFIELD); REJECT;
2181 YY_BREAK
2182 case 85:
2183 YY_RULE_SETUP
2184 #line 223 "fe/idl.ll"
2185 IDL4_KEYWORD(IDL_BITMASK); REJECT;
2186 YY_BREAK
2187 case 86:
2188 YY_RULE_SETUP
2189 #line 224 "fe/idl.ll"
2190 IDL4_KEYWORD(IDL_BITSET); REJECT;
2191 YY_BREAK
2192 case 87:
2193 YY_RULE_SETUP
2194 #line 225 "fe/idl.ll"
2195 IDL4_KEYWORD(IDL_MAP); REJECT;
2196 YY_BREAK
2197 case 88:
2198 YY_RULE_SETUP
2199 #line 227 "fe/idl.ll"
2201 // Make sure that this identifier is not a C++ keyword. If it is,
2202 // prepend it with a _cxx_. Lookup in the perfect hash table for C++
2203 // keyword and grab the mapping. BTW, the reason for the odd
2204 // regular expression is to handle EBCDIC, as well as ASCII.
2206 TAO_IDL_CPP_Keyword_Table cpp_key_tbl;
2207 const TAO_IDL_CPP_Keyword_Entry *entry = 0;
2208 if (!idl_global->preserve_cpp_keywords())
2210 // This check will ensure that escaped C++ keywords will be
2211 // caught and prepended with '_cxx' as non-escaped keywords
2212 // are now prepended with '_cxx_'.
2213 const char *tmp =
2214 ace_yytext[0] == '_' ? ace_yytext + 1 : ace_yytext;
2216 entry =
2217 cpp_key_tbl.lookup (tmp,
2218 static_cast<unsigned int> (ACE_OS::strlen (tmp)));
2221 if (entry)
2223 tao_yylval.strval = ACE::strnew (entry->mapping_);
2225 else
2227 tao_yylval.strval = ACE::strnew (ace_yytext);
2230 return IDENTIFIER;
2232 YY_BREAK
2233 case 89:
2234 YY_RULE_SETUP
2235 #line 260 "fe/idl.ll"
2237 tao_yylval.dval = idl_atof (ace_yytext);
2238 return IDL_FLOATING_PT_LITERAL;
2240 YY_BREAK
2241 case 90:
2242 YY_RULE_SETUP
2243 #line 264 "fe/idl.ll"
2245 tao_yylval.dval = idl_atof (ace_yytext);
2246 return IDL_FLOATING_PT_LITERAL;
2248 YY_BREAK
2249 case 91:
2250 YY_RULE_SETUP
2251 #line 269 "fe/idl.ll"
2253 tao_yylval.fixval = ACE_CDR::Fixed::from_string (ace_yytext);
2254 return IDL_FIXED_PT_LITERAL;
2256 YY_BREAK
2257 case 92:
2258 YY_RULE_SETUP
2259 #line 274 "fe/idl.ll"
2261 tao_yylval.ival = idl_atoi (ace_yytext, 10);
2262 return IDL_INTEGER_LITERAL;
2264 YY_BREAK
2265 case 93:
2266 YY_RULE_SETUP
2267 #line 278 "fe/idl.ll"
2269 tao_yylval.uival = idl_atoui (ace_yytext, 10);
2270 return IDL_UINTEGER_LITERAL;
2272 YY_BREAK
2273 case 94:
2274 YY_RULE_SETUP
2275 #line 282 "fe/idl.ll"
2277 tao_yylval.ival = idl_atoi (ace_yytext, 16);
2278 return IDL_INTEGER_LITERAL;
2280 YY_BREAK
2281 case 95:
2282 YY_RULE_SETUP
2283 #line 286 "fe/idl.ll"
2285 tao_yylval.uival = idl_atoui (ace_yytext, 16);
2286 return IDL_UINTEGER_LITERAL;
2288 YY_BREAK
2289 case 96:
2290 YY_RULE_SETUP
2291 #line 290 "fe/idl.ll"
2293 tao_yylval.ival = idl_atoi (ace_yytext, 8);
2294 return IDL_INTEGER_LITERAL;
2296 YY_BREAK
2297 case 97:
2298 YY_RULE_SETUP
2299 #line 294 "fe/idl.ll"
2301 tao_yylval.uival = idl_atoui (ace_yytext, 8);
2302 return IDL_UINTEGER_LITERAL;
2304 YY_BREAK
2305 case 98:
2306 /* rule 98 can match eol */
2307 YY_RULE_SETUP
2308 #line 299 "fe/idl.ll"
2310 /* Skip the quotes */
2311 char * const tmp = ace_yytext;
2312 for (size_t i = ACE_OS::strlen (tmp); i-- != 0; )
2314 if (isspace (tmp[i]))
2316 tmp[i] = '\0';
2318 else
2320 break;
2323 tmp[ACE_OS::strlen (tmp) - 1] = '\0';
2324 ACE_NEW_RETURN (tao_yylval.sval,
2325 UTL_String (tmp + 1, true),
2326 IDL_STRING_LITERAL);
2327 return IDL_STRING_LITERAL;
2329 YY_BREAK
2330 case 99:
2331 /* rule 99 can match eol */
2332 YY_RULE_SETUP
2333 #line 319 "fe/idl.ll"
2335 /* Skip the bookends */
2336 char * const tmp = ACE_OS::strdup (ace_yytext);
2337 for (size_t i = ACE_OS::strlen (tmp); i-- != 0; )
2339 if (isspace (tmp[i]))
2341 tmp[i] = '\0';
2343 else
2345 break;
2348 tmp[ACE_OS::strlen (tmp) - 1] = '\0';
2349 tao_yylval.wsval = ACE_OS::strdup (idl_wstring_escape_reader (tmp + 2));
2350 ACE_OS::free (tmp);
2351 return IDL_WSTRING_LITERAL;
2353 YY_BREAK
2354 case 100:
2355 YY_RULE_SETUP
2356 #line 338 "fe/idl.ll"
2358 tao_yylval.cval = ace_yytext[1];
2359 return IDL_CHARACTER_LITERAL;
2361 YY_BREAK
2362 case 101:
2363 YY_RULE_SETUP
2364 #line 342 "fe/idl.ll"
2366 // octal character constant
2367 tao_yylval.cval = idl_escape_reader (ace_yytext + 1);
2368 return IDL_CHARACTER_LITERAL;
2370 YY_BREAK
2371 case 102:
2372 YY_RULE_SETUP
2373 #line 347 "fe/idl.ll"
2375 // hexadecimal character constant
2376 tao_yylval.cval = idl_escape_reader (ace_yytext + 1);
2377 return IDL_CHARACTER_LITERAL;
2379 YY_BREAK
2380 case 103:
2381 YY_RULE_SETUP
2382 #line 352 "fe/idl.ll"
2384 tao_yylval.cval = idl_escape_reader (ace_yytext + 1);
2385 return IDL_CHARACTER_LITERAL;
2387 YY_BREAK
2388 case 104:
2389 YY_RULE_SETUP
2390 #line 356 "fe/idl.ll"
2392 // wide character constant
2393 tao_yylval.wcval = ace_yytext[2];
2394 return IDL_WCHAR_LITERAL;
2396 YY_BREAK
2397 case 105:
2398 YY_RULE_SETUP
2399 #line 361 "fe/idl.ll"
2401 // hexadecimal wide character constant
2402 tao_yylval.wcval = idl_wchar_escape_reader (ace_yytext + 2);
2403 return IDL_WCHAR_LITERAL;
2405 YY_BREAK
2406 case 106:
2407 /* rule 106 can match eol */
2408 #line 367 "fe/idl.ll"
2409 case 107:
2410 /* rule 107 can match eol */
2411 YY_RULE_SETUP
2412 #line 367 "fe/idl.ll"
2413 {/* remember pragma */
2414 idl_global->set_lineno (idl_global->lineno () + 1);
2415 idl_store_pragma (ace_yytext);
2416 break;
2418 YY_BREAK
2419 case 108:
2420 /* rule 108 can match eol */
2421 #line 373 "fe/idl.ll"
2422 case 109:
2423 /* rule 109 can match eol */
2424 YY_RULE_SETUP
2425 #line 373 "fe/idl.ll"
2426 {/* ignore file */
2427 idl_global->set_lineno(idl_global->lineno () + 1);
2428 break;
2430 YY_BREAK
2431 case 110:
2432 /* rule 110 can match eol */
2433 #line 378 "fe/idl.ll"
2434 case 111:
2435 /* rule 111 can match eol */
2436 YY_RULE_SETUP
2437 #line 378 "fe/idl.ll"
2439 idl_parse_line_and_file (ace_yytext);
2440 break;
2442 YY_BREAK
2443 case 112:
2444 /* rule 112 can match eol */
2445 #line 383 "fe/idl.ll"
2446 case 113:
2447 /* rule 113 can match eol */
2448 YY_RULE_SETUP
2449 #line 383 "fe/idl.ll"
2451 idl_parse_line_and_file (ace_yytext);
2452 break;
2454 YY_BREAK
2455 case 114:
2456 /* rule 114 can match eol */
2457 #line 388 "fe/idl.ll"
2458 case 115:
2459 /* rule 115 can match eol */
2460 YY_RULE_SETUP
2461 #line 388 "fe/idl.ll"
2463 idl_parse_line_and_file (ace_yytext);
2464 break;
2466 YY_BREAK
2467 case 116:
2468 /* rule 116 can match eol */
2469 #line 393 "fe/idl.ll"
2470 case 117:
2471 /* rule 117 can match eol */
2472 YY_RULE_SETUP
2473 #line 393 "fe/idl.ll"
2475 idl_parse_line_and_file (ace_yytext);
2476 break;
2478 YY_BREAK
2479 case 118:
2480 /* rule 118 can match eol */
2481 #line 398 "fe/idl.ll"
2482 case 119:
2483 /* rule 119 can match eol */
2484 YY_RULE_SETUP
2485 #line 398 "fe/idl.ll"
2487 /* ignore cpp ident */
2488 idl_global->set_lineno (idl_global->lineno () + 1);
2489 break;
2491 YY_BREAK
2492 case 120:
2493 /* rule 120 can match eol */
2494 YY_RULE_SETUP
2495 #line 403 "fe/idl.ll"
2497 /* ignore comments */
2498 idl_global->set_lineno(idl_global->lineno () + 1);
2499 break;
2501 YY_BREAK
2502 case 121:
2503 YY_RULE_SETUP
2504 #line 408 "fe/idl.ll"
2506 for (;;)
2508 char const c = yyinput ();
2509 if (c == '*')
2511 char const next = yyinput ();
2512 if (next == '/')
2513 break;
2514 else
2515 yyunput (c, 0);
2517 else if (c == '\n')
2519 idl_global->set_lineno (idl_global->lineno () + 1);
2522 break;
2524 YY_BREAK
2525 case 122:
2526 YY_RULE_SETUP
2527 #line 427 "fe/idl.ll"
2528 break;
2529 YY_BREAK
2530 case 123:
2531 /* rule 123 can match eol */
2532 YY_RULE_SETUP
2533 #line 428 "fe/idl.ll"
2535 idl_global->set_lineno (idl_global->lineno () + 1);
2536 break;
2538 YY_BREAK
2539 case 124:
2540 YY_RULE_SETUP
2541 #line 432 "fe/idl.ll"
2542 return ace_yytext[0];
2543 YY_BREAK
2544 case 125:
2545 YY_RULE_SETUP
2546 #line 434 "fe/idl.ll"
2547 ECHO;
2548 YY_BREAK
2549 #line 2552 "fe/idl.yy.cpp"
2550 case YY_STATE_EOF(INITIAL):
2551 yyterminate();
2553 case YY_END_OF_BUFFER:
2555 /* Amount of text matched not including the EOB char. */
2556 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2558 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2559 *yy_cp = (yy_hold_char);
2560 YY_RESTORE_YY_MORE_OFFSET
2562 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2564 /* We're scanning a new file or input source. It's
2565 * possible that this happened because the user
2566 * just pointed yyin at a new source and called
2567 * yylex(). If so, then we have to assure
2568 * consistency between YY_CURRENT_BUFFER and our
2569 * globals. Here is the right place to do so, because
2570 * this is the first action (other than possibly a
2571 * back-up) that will match for the new input source.
2573 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2574 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2575 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2578 /* Note that here we test for yy_c_buf_p "<=" to the position
2579 * of the first EOB in the buffer, since yy_c_buf_p will
2580 * already have been incremented past the NUL character
2581 * (since all states make transitions on EOB to the
2582 * end-of-buffer state). Contrast this with the test
2583 * in input().
2585 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2586 { /* This was really a NUL. */
2587 yy_state_type yy_next_state;
2589 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2591 yy_current_state = yy_get_previous_state( );
2593 /* Okay, we're now positioned to make the NUL
2594 * transition. We couldn't have
2595 * yy_get_previous_state() go ahead and do it
2596 * for us because it doesn't know how to deal
2597 * with the possibility of jamming (and we don't
2598 * want to build jamming into it because then it
2599 * will run more slowly).
2602 yy_next_state = yy_try_NUL_trans( yy_current_state );
2604 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2606 if ( yy_next_state )
2608 /* Consume the NUL. */
2609 yy_cp = ++(yy_c_buf_p);
2610 yy_current_state = yy_next_state;
2611 goto yy_match;
2614 else
2616 yy_cp = (yy_c_buf_p);
2617 goto yy_find_action;
2621 else switch ( yy_get_next_buffer( ) )
2623 case EOB_ACT_END_OF_FILE:
2625 (yy_did_buffer_switch_on_eof) = 0;
2627 if ( yywrap( ) )
2629 /* Note: because we've taken care in
2630 * yy_get_next_buffer() to have set up
2631 * yytext, we can now set up
2632 * yy_c_buf_p so that if some total
2633 * hoser (like flex itself) wants to
2634 * call the scanner after we return the
2635 * YY_NULL, it'll still work - another
2636 * YY_NULL will get returned.
2638 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2640 yy_act = YY_STATE_EOF(YY_START);
2641 goto do_action;
2644 else
2646 if ( ! (yy_did_buffer_switch_on_eof) )
2647 YY_NEW_FILE;
2649 break;
2652 case EOB_ACT_CONTINUE_SCAN:
2653 (yy_c_buf_p) =
2654 (yytext_ptr) + yy_amount_of_matched_text;
2656 yy_current_state = yy_get_previous_state( );
2658 yy_cp = (yy_c_buf_p);
2659 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2660 goto yy_match;
2662 case EOB_ACT_LAST_MATCH:
2663 (yy_c_buf_p) =
2664 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2666 yy_current_state = yy_get_previous_state( );
2668 yy_cp = (yy_c_buf_p);
2669 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2670 goto yy_find_action;
2672 break;
2675 default:
2676 YY_FATAL_ERROR(
2677 "fatal flex scanner internal error--no action found" );
2678 } /* end of action switch */
2679 } /* end of scanning one token */
2680 } /* end of user's declarations */
2681 } /* end of yylex */
2683 /* yy_get_next_buffer - try to read in a new buffer
2685 * Returns a code representing an action:
2686 * EOB_ACT_LAST_MATCH -
2687 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2688 * EOB_ACT_END_OF_FILE - end of file
2690 static int yy_get_next_buffer (void)
2692 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2693 char *source = (yytext_ptr);
2694 int number_to_move, i;
2695 int ret_val;
2697 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2698 YY_FATAL_ERROR(
2699 "fatal flex scanner internal error--end of buffer missed" );
2701 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2702 { /* Don't try to fill the buffer, so this is an EOF. */
2703 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2705 /* We matched a single character, the EOB, so
2706 * treat this as a final EOF.
2708 return EOB_ACT_END_OF_FILE;
2711 else
2713 /* We matched some text prior to the EOB, first
2714 * process it.
2716 return EOB_ACT_LAST_MATCH;
2720 /* Try to read more data. */
2722 /* First move last chars to start of buffer. */
2723 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
2725 for ( i = 0; i < number_to_move; ++i )
2726 *(dest++) = *(source++);
2728 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2729 /* don't do the read, it's not guaranteed to return an EOF,
2730 * just force an EOF
2732 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2734 else
2736 int num_to_read =
2737 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2739 while ( num_to_read <= 0 )
2740 { /* Not enough room in the buffer - grow it. */
2742 YY_FATAL_ERROR(
2743 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2747 if ( num_to_read > YY_READ_BUF_SIZE )
2748 num_to_read = YY_READ_BUF_SIZE;
2750 /* Read in more data. */
2751 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2752 (yy_n_chars), num_to_read );
2754 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2757 if ( (yy_n_chars) == 0 )
2759 if ( number_to_move == YY_MORE_ADJ )
2761 ret_val = EOB_ACT_END_OF_FILE;
2762 yyrestart( yyin );
2765 else
2767 ret_val = EOB_ACT_LAST_MATCH;
2768 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2769 YY_BUFFER_EOF_PENDING;
2773 else
2774 ret_val = EOB_ACT_CONTINUE_SCAN;
2776 if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2777 /* Extend the array by 50%, plus the number we really need. */
2778 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2779 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
2780 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
2781 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2782 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2783 /* "- 2" to take care of EOB's */
2784 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
2787 (yy_n_chars) += number_to_move;
2788 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2789 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2791 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2793 return ret_val;
2796 /* yy_get_previous_state - get the state just before the EOB char was reached */
2798 static yy_state_type yy_get_previous_state (void)
2800 yy_state_type yy_current_state;
2801 char *yy_cp;
2803 yy_current_state = (yy_start);
2804 yy_current_state += YY_AT_BOL();
2806 (yy_state_ptr) = (yy_state_buf);
2807 *(yy_state_ptr)++ = yy_current_state;
2809 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2811 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2812 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2814 yy_current_state = (int) yy_def[yy_current_state];
2815 if ( yy_current_state >= 637 )
2816 yy_c = yy_meta[yy_c];
2818 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2819 *(yy_state_ptr)++ = yy_current_state;
2822 return yy_current_state;
2825 /* yy_try_NUL_trans - try to make a transition on the NUL character
2827 * synopsis
2828 * next_state = yy_try_NUL_trans( current_state );
2830 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2832 int yy_is_jam;
2834 YY_CHAR yy_c = 1;
2835 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2837 yy_current_state = (int) yy_def[yy_current_state];
2838 if ( yy_current_state >= 637 )
2839 yy_c = yy_meta[yy_c];
2841 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2842 yy_is_jam = (yy_current_state == 636);
2843 if ( ! yy_is_jam )
2844 *(yy_state_ptr)++ = yy_current_state;
2846 return yy_is_jam ? 0 : yy_current_state;
2849 #ifndef YY_NO_UNPUT
2851 static void yyunput (int c, char * yy_bp )
2853 char *yy_cp;
2855 yy_cp = (yy_c_buf_p);
2857 /* undo effects of setting up yytext */
2858 *yy_cp = (yy_hold_char);
2860 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2861 { /* need to shift things up to make room */
2862 /* +2 for EOB chars. */
2863 int number_to_move = (yy_n_chars) + 2;
2864 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2865 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2866 char *source =
2867 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2869 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2870 *--dest = *--source;
2872 yy_cp += (int) (dest - source);
2873 yy_bp += (int) (dest - source);
2874 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2875 (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2877 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2878 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2881 *--yy_cp = (char) c;
2883 (yytext_ptr) = yy_bp;
2884 (yy_hold_char) = *yy_cp;
2885 (yy_c_buf_p) = yy_cp;
2888 #endif
2890 #ifndef YY_NO_INPUT
2891 #ifdef __cplusplus
2892 static int yyinput (void)
2893 #else
2894 static int input (void)
2895 #endif
2898 int c;
2900 *(yy_c_buf_p) = (yy_hold_char);
2902 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2904 /* yy_c_buf_p now points to the character we want to return.
2905 * If this occurs *before* the EOB characters, then it's a
2906 * valid NUL; if not, then we've hit the end of the buffer.
2908 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2909 /* This was really a NUL. */
2910 *(yy_c_buf_p) = '\0';
2912 else
2913 { /* need more input */
2914 int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
2915 ++(yy_c_buf_p);
2917 switch ( yy_get_next_buffer( ) )
2919 case EOB_ACT_LAST_MATCH:
2920 /* This happens because yy_g_n_b()
2921 * sees that we've accumulated a
2922 * token and flags that we need to
2923 * try matching the token before
2924 * proceeding. But for input(),
2925 * there's no matching to consider.
2926 * So convert the EOB_ACT_LAST_MATCH
2927 * to EOB_ACT_END_OF_FILE.
2930 /* Reset buffer status. */
2931 yyrestart( yyin );
2933 /*FALLTHROUGH*/
2935 case EOB_ACT_END_OF_FILE:
2937 if ( yywrap( ) )
2938 return 0;
2940 if ( ! (yy_did_buffer_switch_on_eof) )
2941 YY_NEW_FILE;
2942 #ifdef __cplusplus
2943 return yyinput();
2944 #else
2945 return input();
2946 #endif
2949 case EOB_ACT_CONTINUE_SCAN:
2950 (yy_c_buf_p) = (yytext_ptr) + offset;
2951 break;
2956 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2957 *(yy_c_buf_p) = '\0'; /* preserve yytext */
2958 (yy_hold_char) = *++(yy_c_buf_p);
2960 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
2962 return c;
2964 #endif /* ifndef YY_NO_INPUT */
2966 /** Immediately switch to a different input stream.
2967 * @param input_file A readable stream.
2969 * @note This function does not reset the start condition to @c INITIAL .
2971 void yyrestart (FILE * input_file )
2974 if ( ! YY_CURRENT_BUFFER ){
2975 yyensure_buffer_stack ();
2976 YY_CURRENT_BUFFER_LVALUE =
2977 yy_create_buffer( yyin, YY_BUF_SIZE );
2980 yy_init_buffer( YY_CURRENT_BUFFER, input_file );
2981 yy_load_buffer_state( );
2984 /** Switch to a different input buffer.
2985 * @param new_buffer The new input buffer.
2988 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2991 /* TODO. We should be able to replace this entire function body
2992 * with
2993 * yypop_buffer_state();
2994 * yypush_buffer_state(new_buffer);
2996 yyensure_buffer_stack ();
2997 if ( YY_CURRENT_BUFFER == new_buffer )
2998 return;
3000 if ( YY_CURRENT_BUFFER )
3002 /* Flush out information for old buffer. */
3003 *(yy_c_buf_p) = (yy_hold_char);
3004 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3005 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3008 YY_CURRENT_BUFFER_LVALUE = new_buffer;
3009 yy_load_buffer_state( );
3011 /* We don't actually know whether we did this switch during
3012 * EOF (yywrap()) processing, but the only time this flag
3013 * is looked at is after yywrap() is called, so it's safe
3014 * to go ahead and always set it.
3016 (yy_did_buffer_switch_on_eof) = 1;
3019 static void yy_load_buffer_state (void)
3021 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3022 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
3023 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
3024 (yy_hold_char) = *(yy_c_buf_p);
3027 /** Allocate and initialize an input buffer state.
3028 * @param file A readable stream.
3029 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
3031 * @return the allocated buffer state.
3033 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
3035 YY_BUFFER_STATE b;
3037 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
3038 if ( ! b )
3039 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
3041 b->yy_buf_size = size;
3043 /* yy_ch_buf has to be 2 characters longer than the size given because
3044 * we need to put in 2 end-of-buffer characters.
3046 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
3047 if ( ! b->yy_ch_buf )
3048 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
3050 b->yy_is_our_buffer = 1;
3052 yy_init_buffer( b, file );
3054 return b;
3057 /** Destroy the buffer.
3058 * @param b a buffer created with yy_create_buffer()
3061 void yy_delete_buffer (YY_BUFFER_STATE b )
3064 if ( ! b )
3065 return;
3067 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
3068 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
3070 if ( b->yy_is_our_buffer )
3071 yyfree( (void *) b->yy_ch_buf );
3073 yyfree( (void *) b );
3076 /* Initializes or reinitializes a buffer.
3077 * This function is sometimes called more than once on the same buffer,
3078 * such as during a yyrestart() or at EOF.
3080 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
3083 int oerrno = errno;
3085 yy_flush_buffer( b );
3087 b->yy_input_file = file;
3088 b->yy_fill_buffer = 1;
3090 /* If b is the current buffer, then yy_init_buffer was _probably_
3091 * called from yyrestart() or through yy_get_next_buffer.
3092 * In that case, we don't want to reset the lineno or column.
3094 if (b != YY_CURRENT_BUFFER){
3095 b->yy_bs_lineno = 1;
3096 b->yy_bs_column = 0;
3099 b->yy_is_interactive = 0;
3101 errno = oerrno;
3104 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
3105 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
3108 void yy_flush_buffer (YY_BUFFER_STATE b )
3110 if ( ! b )
3111 return;
3113 b->yy_n_chars = 0;
3115 /* We always need two end-of-buffer characters. The first causes
3116 * a transition to the end-of-buffer state. The second causes
3117 * a jam in that state.
3119 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
3120 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
3122 b->yy_buf_pos = &b->yy_ch_buf[0];
3124 b->yy_at_bol = 1;
3125 b->yy_buffer_status = YY_BUFFER_NEW;
3127 if ( b == YY_CURRENT_BUFFER )
3128 yy_load_buffer_state( );
3131 /** Pushes the new state onto the stack. The new state becomes
3132 * the current state. This function will allocate the stack
3133 * if necessary.
3134 * @param new_buffer The new state.
3137 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
3139 if (new_buffer == 0)
3140 return;
3142 yyensure_buffer_stack();
3144 /* This block is copied from yy_switch_to_buffer. */
3145 if ( YY_CURRENT_BUFFER )
3147 /* Flush out information for old buffer. */
3148 *(yy_c_buf_p) = (yy_hold_char);
3149 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3150 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3153 /* Only push if top exists. Otherwise, replace top. */
3154 if (YY_CURRENT_BUFFER)
3155 (yy_buffer_stack_top)++;
3156 YY_CURRENT_BUFFER_LVALUE = new_buffer;
3158 /* copied from yy_switch_to_buffer. */
3159 yy_load_buffer_state( );
3160 (yy_did_buffer_switch_on_eof) = 1;
3163 /** Removes and deletes the top of the stack, if present.
3164 * The next element becomes the new top.
3167 void yypop_buffer_state (void)
3169 if (!YY_CURRENT_BUFFER)
3170 return;
3172 yy_delete_buffer(YY_CURRENT_BUFFER );
3173 YY_CURRENT_BUFFER_LVALUE = 0;
3174 if ((yy_buffer_stack_top) > 0)
3175 --(yy_buffer_stack_top);
3177 if (YY_CURRENT_BUFFER) {
3178 yy_load_buffer_state( );
3179 (yy_did_buffer_switch_on_eof) = 1;
3183 /* Allocates the stack if it does not exist.
3184 * Guarantees space for at least one push.
3186 static void yyensure_buffer_stack (void)
3188 yy_size_t num_to_alloc;
3190 if (!(yy_buffer_stack)) {
3192 /* First allocation is just for 2 elements, since we don't know if this
3193 * scanner will even need a stack. We use 2 instead of 1 to avoid an
3194 * immediate realloc on the next call.
3196 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
3197 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
3198 (num_to_alloc * sizeof(struct yy_buffer_state*)
3200 if ( ! (yy_buffer_stack) )
3201 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3203 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3205 (yy_buffer_stack_max) = num_to_alloc;
3206 (yy_buffer_stack_top) = 0;
3207 return;
3210 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3212 /* Increase the buffer to prepare for a possible push. */
3213 yy_size_t grow_size = 8 /* arbitrary grow size */;
3215 num_to_alloc = (yy_buffer_stack_max) + grow_size;
3216 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
3217 ((yy_buffer_stack),
3218 num_to_alloc * sizeof(struct yy_buffer_state*)
3220 if ( ! (yy_buffer_stack) )
3221 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3223 /* zero only the new slots.*/
3224 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
3225 (yy_buffer_stack_max) = num_to_alloc;
3229 /** Setup the input buffer state to scan directly from a user-specified character buffer.
3230 * @param base the character buffer
3231 * @param size the size in bytes of the character buffer
3233 * @return the newly allocated buffer state object.
3235 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
3237 YY_BUFFER_STATE b;
3239 if ( size < 2 ||
3240 base[size-2] != YY_END_OF_BUFFER_CHAR ||
3241 base[size-1] != YY_END_OF_BUFFER_CHAR )
3242 /* They forgot to leave room for the EOB's. */
3243 return 0;
3245 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
3246 if ( ! b )
3247 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3249 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
3250 b->yy_buf_pos = b->yy_ch_buf = base;
3251 b->yy_is_our_buffer = 0;
3252 b->yy_input_file = 0;
3253 b->yy_n_chars = b->yy_buf_size;
3254 b->yy_is_interactive = 0;
3255 b->yy_at_bol = 1;
3256 b->yy_fill_buffer = 0;
3257 b->yy_buffer_status = YY_BUFFER_NEW;
3259 yy_switch_to_buffer( b );
3261 return b;
3264 /** Setup the input buffer state to scan a string. The next call to yylex() will
3265 * scan from a @e copy of @a str.
3266 * @param yystr a NUL-terminated string to scan
3268 * @return the newly allocated buffer state object.
3269 * @note If you want to scan bytes that may contain NUL values, then use
3270 * yy_scan_bytes() instead.
3272 YY_BUFFER_STATE yy_scan_string (const char * yystr )
3275 return yy_scan_bytes( yystr, (int) strlen(yystr) );
3278 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
3279 * scan from a @e copy of @a bytes.
3280 * @param yybytes the byte buffer to scan
3281 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
3283 * @return the newly allocated buffer state object.
3285 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
3287 YY_BUFFER_STATE b;
3288 char *buf;
3289 yy_size_t n;
3290 int i;
3292 /* Get memory for full buffer, including space for trailing EOB's. */
3293 n = (yy_size_t) (_yybytes_len + 2);
3294 buf = (char *) yyalloc( n );
3295 if ( ! buf )
3296 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3298 for ( i = 0; i < _yybytes_len; ++i )
3299 buf[i] = yybytes[i];
3301 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3303 b = yy_scan_buffer( buf, n );
3304 if ( ! b )
3305 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3307 /* It's okay to grow etc. this buffer, and we should throw it
3308 * away when we're done.
3310 b->yy_is_our_buffer = 1;
3312 return b;
3315 #ifndef YY_EXIT_FAILURE
3316 #define YY_EXIT_FAILURE 2
3317 #endif
3319 static void yynoreturn yy_fatal_error (const char* msg )
3321 fprintf( stderr, "%s\n", msg );
3322 exit( YY_EXIT_FAILURE );
3325 /* Redefine yyless() so it works in section 3 code. */
3327 #undef yyless
3328 #define yyless(n) \
3329 do \
3331 /* Undo effects of setting up yytext. */ \
3332 int yyless_macro_arg = (n); \
3333 YY_LESS_LINENO(yyless_macro_arg);\
3334 yytext[yyleng] = (yy_hold_char); \
3335 (yy_c_buf_p) = yytext + yyless_macro_arg; \
3336 (yy_hold_char) = *(yy_c_buf_p); \
3337 *(yy_c_buf_p) = '\0'; \
3338 yyleng = yyless_macro_arg; \
3340 while ( 0 )
3342 /* Accessor methods (get/set functions) to struct members. */
3344 /** Get the current line number.
3347 int yyget_lineno (void)
3350 return yylineno;
3353 /** Get the input stream.
3356 FILE *yyget_in (void)
3358 return yyin;
3361 /** Get the output stream.
3364 FILE *yyget_out (void)
3366 return yyout;
3369 /** Get the length of the current token.
3372 int yyget_leng (void)
3374 return yyleng;
3377 /** Get the current token.
3381 char *yyget_text (void)
3383 return yytext;
3386 /** Set the current line number.
3387 * @param _line_number line number
3390 void yyset_lineno (int _line_number )
3393 yylineno = _line_number;
3396 /** Set the input stream. This does not discard the current
3397 * input buffer.
3398 * @param _in_str A readable stream.
3400 * @see yy_switch_to_buffer
3402 void yyset_in (FILE * _in_str )
3404 yyin = _in_str ;
3407 void yyset_out (FILE * _out_str )
3409 yyout = _out_str ;
3412 int yyget_debug (void)
3414 return yy_flex_debug;
3417 void yyset_debug (int _bdebug )
3419 yy_flex_debug = _bdebug ;
3422 static int yy_init_globals (void)
3424 /* Initialization is the same as for the non-reentrant scanner.
3425 * This function is called from yylex_destroy(), so don't allocate here.
3428 (yy_buffer_stack) = 0;
3429 (yy_buffer_stack_top) = 0;
3430 (yy_buffer_stack_max) = 0;
3431 (yy_c_buf_p) = 0;
3432 (yy_init) = 0;
3433 (yy_start) = 0;
3435 (yy_state_buf) = 0;
3436 (yy_state_ptr) = 0;
3437 (yy_full_match) = 0;
3438 (yy_lp) = 0;
3440 /* Defined in main.c */
3441 #ifdef YY_STDINIT
3442 yyin = stdin;
3443 yyout = stdout;
3444 #else
3445 yyin = 0;
3446 yyout = 0;
3447 #endif
3449 /* For future reference: Set errno on error, since we are called by
3450 * yylex_init()
3452 return 0;
3455 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
3456 int yylex_destroy (void)
3459 /* Pop the buffer stack, destroying each element. */
3460 while(YY_CURRENT_BUFFER){
3461 yy_delete_buffer( YY_CURRENT_BUFFER );
3462 YY_CURRENT_BUFFER_LVALUE = 0;
3463 yypop_buffer_state();
3466 /* Destroy the stack itself. */
3467 yyfree((yy_buffer_stack) );
3468 (yy_buffer_stack) = 0;
3470 yyfree ( (yy_state_buf) );
3471 (yy_state_buf) = 0;
3473 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3474 * yylex() is called, initialization will occur. */
3475 yy_init_globals( );
3477 return 0;
3481 * Internal utility routines.
3484 #ifndef yytext_ptr
3485 static void yy_flex_strncpy (char* s1, const char * s2, int n )
3488 int i;
3489 for ( i = 0; i < n; ++i )
3490 s1[i] = s2[i];
3492 #endif
3494 #ifdef YY_NEED_STRLEN
3495 static int yy_flex_strlen (const char * s )
3497 int n;
3498 for ( n = 0; s[n]; ++n )
3501 return n;
3503 #endif
3505 void *yyalloc (yy_size_t size )
3507 return malloc(size);
3510 void *yyrealloc (void * ptr, yy_size_t size )
3513 /* The cast to (char *) in the following accommodates both
3514 * implementations that use char* generic pointers, and those
3515 * that use void* generic pointers. It works with the latter
3516 * because both ANSI C and C++ allow castless assignment from
3517 * any pointer type to void*, and deal with argument conversions
3518 * as though doing an assignment.
3520 return realloc(ptr, size);
3523 void yyfree (void * ptr )
3525 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
3528 #define YYTABLES_NAME "yytables"
3530 #line 434 "fe/idl.ll"
3532 /* subroutines */
3534 static bool
3535 same_file (char *path1, char *path2)
3537 char fullpath1 [MAXPATHLEN + 1] = {0};
3538 char fullpath2 [MAXPATHLEN + 1] = {0};
3540 char *fp1 = ACE_OS::realpath (path1, fullpath1);
3541 char *fp2 = ACE_OS::realpath (path2, fullpath2);
3543 return
3544 (fp1 == 0 || fp2 == 0)
3545 ? false
3546 : FE_Utils::path_cmp (fullpath1,fullpath2) == 0;
3549 // Parse a #line statement generated by the C preprocessor
3550 static void
3551 idl_parse_line_and_file (char *buf)
3553 char *r = buf;
3554 char *h = 0;
3555 UTL_String *nm = 0;
3557 // Skip initial '#'.
3558 if (*r != '#')
3560 return;
3562 else
3564 ++r;
3567 // Check to see if we're running under the screwy Microsoft scheme
3568 // of putting #line num instead of #num.
3570 if (ACE_OS::strncmp (r, "line", 4) == 0)
3572 r += 5;
3575 // Find line number.
3576 while (isspace (*r))
3578 ++r;
3581 h = r;
3583 for (; isdigit (*r); ++r)
3585 continue;
3588 *r++ = 0;
3589 idl_global->set_lineno ((long) idl_atoui (h, 10));
3591 // Find file name, if present.
3592 for (; *r != '"'; ++r)
3594 if (*r == '\n' || *r == '\0')
3596 return;
3600 h = ++r;
3602 for (; *r != '"'; ++r)
3604 continue;
3607 *r = 0;
3608 UTL_String *tmp = 0;
3610 if (*h == '\0')
3612 ACE_ERROR ((LM_ERROR,
3613 ACE_TEXT ("IDL: No input files\n")));
3615 throw Bailout ();
3617 else
3619 long i;
3620 long j;
3622 // Put Microsoft-style pathnames into a canonical form.
3623 for (i = 0, j = 0; h[j] != '\0'; i++, j++)
3625 if (h[j] == '\\' && h[j + 1] == '\\')
3627 j++;
3630 h[i] = h[j];
3633 h[i] = '\0';
3634 ACE_NEW (tmp,
3635 UTL_String (h, true));
3636 idl_global->update_prefix (tmp->get_string ());
3637 idl_global->set_filename (tmp);
3640 UTL_String *fname = idl_global->filename ();
3641 bool in_main_file = false;
3643 bool is_real_filename =
3644 fname->compare (idl_global->real_filename ())
3645 || same_file (fname->get_string(),
3646 idl_global->real_filename ()->get_string ());
3648 bool is_main_filename = false;
3650 if (!is_real_filename)
3652 is_main_filename =
3653 fname->compare (idl_global->main_filename ())
3654 || same_file (fname->get_string (),
3655 idl_global->main_filename ()->get_string ());
3658 if (is_real_filename || is_main_filename)
3660 in_main_file = true;
3663 idl_global->set_in_main_file (in_main_file);
3665 // Strip off any command line -I prefix that may have been added
3666 // by the preprocessor.
3667 if (!(idl_global->in_main_file ()) && idl_global->import ())
3669 ACE_NEW (nm,
3670 UTL_String (
3671 FE_Utils::stripped_preproc_include (
3672 fname->get_string ()), true));
3674 // This call also manages the #pragma prefix.
3675 idl_global->store_include_file_name (nm);
3679 // Store a #pragma line into the list of pragmas
3680 static void
3681 idl_store_pragma (char *buf)
3683 char *sp = buf + 1;
3684 int crunched = 0;
3686 // Remove all the blanks between the '#' and the 'pragma'.
3687 while (*sp != 'p')
3689 ++sp;
3690 ++crunched;
3693 char *tp = buf + 1;
3695 // This copies the crunched string back to the original, and
3696 // also compensates for the behavior of the Sun preprocessor,
3697 // which put spaces around the double colons of a non-quoted
3698 // scoped name, a case which is possible in #pragma version.
3699 // Also eats whitespace, which some preprocessors (for example
3700 // Intel) don't automatically do.
3701 while (*sp != '\n')
3703 if (*sp == ' ' && (*(sp + 1) == ':' || *(sp + 1) == ' '))
3705 ++crunched;
3707 else if (*sp == ':' && *(sp + 1) == ' ')
3709 *tp = *sp;
3710 ++crunched;
3711 ++sp;
3712 ++tp;
3714 else
3716 *tp = *sp;
3717 ++tp;
3720 ++sp;
3723 // The '\n' is still <crunched> spaces too far away, with
3724 // garbage characters in between.
3725 sp -= crunched;
3726 *sp = '\0';
3728 if (ACE_OS::strstr (buf + 8, "import") != 0)
3730 idl_global->set_import (true);
3731 return;
3734 if (ACE_OS::strstr (buf + 8, "include") != 0)
3736 idl_global->set_import (false);
3737 return;
3740 if (ACE_OS::strncmp (buf + 8, "prefix", 6) == 0)
3742 char *new_prefix = idl_get_pragma_string (buf);
3744 if (new_prefix != 0)
3746 unsigned long depth = idl_global->scopes ().depth ();
3748 // We replace the prefix only if there is a prefix already
3749 // associated with this file, otherwise we add the prefix.
3750 char *ext_id = idl_global->filename ()->get_string ();
3751 ACE_Hash_Map_Entry<char *, char *> *entry = 0;
3752 int const status =
3753 idl_global->file_prefixes ().find (ext_id, entry);
3755 if (status == 0)
3757 if (ACE_OS::strcmp (entry->int_id_, "") != 0)
3759 char *trash = 0;
3760 idl_global->pragma_prefixes ().pop (trash);
3761 delete [] trash;
3763 else if (depth == 1)
3765 // Remove the default "" and bind the new prefix.
3766 ACE::strdelete (entry->ext_id_);
3767 ACE::strdelete (entry->int_id_);
3768 (void) idl_global->file_prefixes ().unbind (entry);
3769 (void) idl_global->file_prefixes ().bind (ACE::strnew (ext_id),
3770 ACE::strnew (new_prefix));
3774 UTL_Scope *top_scope = idl_global->scopes ().top ();
3776 if (depth > 1)
3778 top_scope->has_prefix (true);
3779 ScopeAsDecl (top_scope)->prefix_scope (top_scope);
3782 idl_global->pragma_prefixes ().push (new_prefix);
3784 if (depth == 1)
3786 idl_global->root ()->prefix (new_prefix);
3789 if (idl_global->in_main_file ())
3791 idl_global->root ()->set_imported (false);
3792 top_scope->has_prefix (true);
3795 if (status != 0)
3797 (void) idl_global->file_prefixes ().bind (ACE::strnew (ext_id),
3798 ACE::strnew (new_prefix));
3802 else if (ACE_OS::strncmp (buf + 8, "version", 7) == 0)
3804 char *tmp = buf + 16;
3806 while (*tmp == ' ' || *tmp == '\t')
3808 ++tmp;
3811 char *number = ACE_OS::strchr (tmp, ' ');
3813 if (number == 0)
3815 number = ACE_OS::strchr (tmp, '\t');
3818 // Used later to trim the type string.
3819 ptrdiff_t cutoff = number - tmp;
3821 // Most likely this means there is only a version number
3822 // without an identifier to apply it to.
3823 if (number == 0)
3825 const char *msg = "no identifier or scoped name";
3826 idl_global->err ()->version_syntax_error (msg);
3827 return;
3830 while (*number == ' ' || *number == '\t')
3832 ++number;
3835 size_t len = ACE_OS::strlen (number);
3837 // For some reason, the SunCC preprocessor adds a trailing space, which
3838 // messes with idl_valid_version() below, so we check and remove.
3839 while (number[len - 1] == ' ')
3841 number[len - 1] = '\0';
3842 len = ACE_OS::strlen (number);
3845 // Trim the type string after trimming the number string.
3846 tmp[cutoff] = '\0';
3848 // This call adds a proper null terminator to tmp, so no need to
3849 // do it here.
3850 AST_Decl *d = idl_find_node (tmp);
3852 if (d == 0)
3854 return;
3857 if (!idl_valid_version (number))
3859 idl_global->err ()->version_number_error (number);
3860 return;
3863 d->version (ACE::strnew (number));
3865 else if (ACE_OS::strncmp (buf + 8, "ident", 5) == 0)
3867 idl_global->ident_string (buf + 8);
3869 else if (ACE_OS::strncmp (buf + 8, "ID", 2) == 0)
3871 char *tmp = buf + 11;
3873 while (*tmp == ' ')
3875 ++tmp;
3878 ACE_CString work (tmp);
3879 work = work.substr (0, work.find (' '));
3881 AST_Decl *d = idl_find_node (work.c_str ());
3883 if (d == 0)
3885 return;
3888 char *new_id = idl_get_pragma_string (buf);
3890 if (new_id != 0)
3892 if (d->typeid_set ())
3894 idl_global->err ()->id_reset_error (d->repoID (),
3895 new_id);
3896 return;
3899 d->repoID (new_id);
3900 d->typeid_set (true);
3903 else if (ACE_OS::strncmp (buf + 8, "DCPS_DATA_TYPE", 14) == 0)
3905 char *sample_type = idl_get_pragma_string (buf);
3906 idl_global->add_dcps_data_type (sample_type);
3908 // Delete sample_type since add_dcps_data_type() doesn't take its ownership.
3909 delete [] sample_type;
3911 else if (ACE_OS::strncmp (buf + 8, "DCPS_DATA_KEY", 13) == 0)
3913 char *tmp = idl_get_pragma_string (buf);
3915 // Split up data type and key strings
3916 char *sample_type = tmp;
3918 while (*tmp && !isspace (*tmp))
3920 ++tmp;
3923 while (isspace (*tmp))
3925 *tmp = '\0';
3926 tmp++;
3929 char *key = tmp;
3931 if (!idl_global->add_dcps_data_key (sample_type, key))
3933 ACE_ERROR((LM_ERROR, "DCPS_DATA_TYPE \"%C\" not found for key \"%C\"\n",
3934 sample_type, key));
3937 // Delete sample_type since add_dcps_data_key() doesn't take its ownership.
3938 delete [] sample_type;
3940 else if (ACE_OS::strncmp (buf + 8, "DCPS_DATA_SEQUENCE_TYPE", 23) == 0)
3942 char *seq_type = idl_get_pragma_string (buf);
3943 idl_global->set_dcps_sequence_type (seq_type);
3945 delete [] seq_type;
3947 else if (ACE_OS::strncmp (buf + 8, "DCPS_SUPPORT_ZERO_COPY_READ", 27) == 0)
3949 idl_global->dcps_support_zero_copy_read (true);
3951 else if (ACE_OS::strncmp (buf + 8, "DCPS_GEN_ZERO_COPY_READ", 23) == 0)
3953 idl_global->dcps_gen_zero_copy_read (true);
3955 else if (ACE_OS::strncmp (buf + 8, "ciao lem", 8) == 0)
3957 char *tmp = idl_get_pragma_string (buf);
3958 idl_global->add_ciao_lem_file_names (tmp);
3960 // Delete tmp since add_ciao_lem_file_names() doesn't take its ownership.
3961 delete [] tmp;
3963 else if (ACE_OS::strncmp (buf + 8, "ndds typesupport", 16) == 0)
3965 char *tmp = idl_get_pragma_string (buf);
3966 idl_global->add_ciao_rti_ts_file_names (tmp);
3968 // Delete tmp since add_ciao_rti_ts_file_names() doesn't take its ownership.
3969 delete [] tmp;
3971 else if (ACE_OS::strncmp (buf + 8, "coredx typesupport", 18) == 0)
3973 char *tmp = idl_get_pragma_string (buf);
3974 idl_global->add_ciao_coredx_ts_file_names (tmp);
3976 // Delete tmp since add_ciao_coredx_ts_file_names() doesn't take its ownership.
3977 delete [] tmp;
3979 else if (ACE_OS::strncmp (buf + 8, "opendds typesupport", 19) == 0)
3981 char *tmp = idl_get_pragma_string (buf);
3982 idl_global->add_ciao_oci_ts_file_names (tmp);
3984 // Delete tmp since add_ciao_oci_ts_file_names() doesn't take its ownership.
3985 delete [] tmp;
3987 else if (ACE_OS::strncmp (buf + 8, "splice typesupport", 18) == 0)
3989 char *tmp = idl_get_pragma_string (buf);
3990 idl_global->add_ciao_spl_ts_file_names (tmp);
3992 // Delete tmp since add_ciao_spl_ts_file_names() doesn't take its ownership.
3993 delete [] tmp;
3995 else if ((ACE_OS::strncmp (buf + 8, "ciao ami4ccm interface", 22) == 0) ||
3996 (ACE_OS::strncmp (buf + 8, "ami4ccm interface", 17) == 0))
3998 if (idl_global->in_main_file ())
4000 char *tmp = idl_get_pragma_string (buf);
4001 idl_global->add_ciao_ami_iface_names (tmp);
4003 // Delete tmp since add_ciao_ami_iface_names() doesn't take its ownership.
4004 delete [] tmp;
4007 else if ((ACE_OS::strncmp (buf + 8, "ciao ami4ccm receptacle", 23) == 0) ||
4008 (ACE_OS::strncmp (buf + 8, "ami4ccm receptacle", 18) == 0))
4010 char *tmp = idl_get_pragma_string (buf);
4012 if (idl_global->in_main_file ())
4014 idl_global->add_ciao_ami_recep_names (tmp);
4016 else
4018 /// This is intended for the executor IDL file,
4019 /// when a pragma is seen in the main file, but
4020 /// it will do no harm in other cases.
4021 idl_global->add_included_ami_recep_names (tmp);
4024 // Delete tmp since add_ciao_spl_ts_file_names() doesn't take its ownership.
4025 delete [] tmp;
4027 else if ((ACE_OS::strncmp (buf + 8, "ciao ami4ccm idl", 16) == 0) ||
4028 (ACE_OS::strncmp (buf + 8, "ami4ccm idl", 11) == 0))
4030 char *tmp = idl_get_pragma_string (buf);
4032 /// These pragmas are found in the file where the interface
4033 /// that has a AMI4CCM_* counterpart in the *A.idl file
4034 /// is declared. We add the filename to the list in all
4035 /// IDL files *except* the one where it is found, to
4036 /// eliminate a circular include of xxxC.h and xxxAC.h.
4037 if (!idl_global->in_main_file ())
4039 idl_global->add_ciao_ami_idl_fnames (tmp);
4042 // Delete tmp since add_ciao_ami_idl_fnames() doesn't take its ownership.
4043 delete [] tmp;
4045 else if (ACE_OS::strncmp (buf + 8, "dds4ccm impl", 12) == 0)
4047 char *tmp = idl_get_pragma_string (buf);
4049 idl_global->add_dds4ccm_impl_fnames (tmp);
4051 // Delete tmp since add_dds4ccm_impl_fnames() doesn't take its ownership.
4052 delete [] tmp;
4057 * idl_atoi - Convert a string of digits into a negative integer according to base b
4059 static ACE_CDR::LongLong
4060 idl_atoi (char *s, long b)
4062 ACE_CDR::LongLong r = 0;
4064 // Skip over the dash and possibly spaces after the dash
4065 while (*s == '-' || *s == ' ' || *s == '\t')
4067 ++s;
4070 if (b == 8 && *s == '0')
4072 ++s;
4074 else if (b == 16 && *s == '0' && (*(s + 1) == 'x' || *(s + 1) == 'X'))
4076 s += 2;
4079 for (; *s; ++s)
4081 if (*s <= '9' && *s >= '0')
4083 r = (r * b) + (*s - '0');
4085 else if (b > 10 && *s <= 'f' && *s >= 'a')
4087 r = (r * b) + (*s - 'a' + 10);
4089 else if (b > 10 && *s <= 'F' && *s >= 'A')
4091 r = (r * b) + (*s - 'A' + 10);
4093 else
4095 break;
4099 return -r;
4103 * idl_atoui - Convert a string of digits into an unsigned integer according to base b
4105 static ACE_CDR::ULongLong
4106 idl_atoui (char *s, long b)
4108 ACE_CDR::ULongLong r = 0;
4110 if (b == 8 && *s == '0')
4112 ++s;
4114 else if (b == 16 && *s == '0' && (*(s + 1) == 'x' || *(s + 1) == 'X'))
4116 s += 2;
4119 for (; *s; ++s)
4121 if (*s <= '9' && *s >= '0')
4123 r = (r * b) + (*s - '0');
4125 else if (b > 10 && *s <= 'f' && *s >= 'a')
4127 r = (r * b) + (*s - 'a' + 10);
4129 else if (b > 10 && *s <= 'F' && *s >= 'A')
4131 r = (r * b) + (*s - 'A' + 10);
4133 else
4135 break;
4139 return r;
4143 * Convert a string to a float; atof doesn't seem to work, always.
4145 static ACE_CDR::Double
4146 idl_atof (char *s)
4148 double d = 0.0;
4149 double e, k;
4150 long neg = 0, negexp = 0;
4152 if (*s == '-')
4154 neg = 1;
4156 // Skip over the dash and possibly spaces after the dash
4157 while (*s == '-' || *s == ' ' || *s == '\t')
4159 ++s;
4163 while (*s >= '0' && *s <= '9')
4165 d = (d * 10) + *s - '0';
4166 ++s;
4169 if (*s == '.')
4171 ++s;
4172 e = 10;
4174 while (*s >= '0' && *s <= '9')
4176 d += (*s - '0') / (e * 1.0);
4177 e *= 10;
4178 ++s;
4182 if (*s == 'e' || *s == 'E')
4184 ++s;
4186 if (*s == '-')
4188 negexp = 1;
4189 s++;
4191 else if (*s == '+')
4193 ++s;
4196 e = 0;
4198 while (*s >= '0' && *s <= '9')
4200 e = (e * 10) + *s - '0';
4201 ++s;
4204 if (e > 0)
4206 for (k = 1; e > 0; k *= 10, e--) ;
4208 if (negexp)
4210 d /= k;
4212 else
4214 d *= k;
4219 if (neg)
4221 d *= -1.0;
4224 return d;
4228 * Convert (some) escaped characters into their ascii values
4230 static char
4231 idl_escape_reader (char *str)
4233 if (str[0] != '\\')
4235 return str[0];
4238 switch (str[1])
4240 case 'n':
4241 return '\n';
4242 case 't':
4243 return '\t';
4244 case 'v':
4245 return '\v';
4246 case 'b':
4247 return '\b';
4248 case 'r':
4249 return '\r';
4250 case 'f':
4251 return '\f';
4252 case 'a':
4253 return '\a';
4254 case '\\':
4255 return '\\';
4256 case '\?':
4257 return '?';
4258 case '\'':
4259 return '\'';
4260 case '"':
4261 return '"';
4262 case 'x':
4264 int i;
4266 // hex value
4267 for (i = 2; str[i] != '\0' && isxdigit (str[i]); ++i)
4269 continue;
4272 char save = str[i];
4273 str[i] = '\0';
4274 char out = (char)idl_atoui(&str[2], 16);
4275 str[i] = save;
4276 return out;
4278 ACE_NOTREACHED (break;)
4279 default:
4280 // check for octal value
4281 if (str[1] >= '0' && str[1] <= '7')
4283 int i;
4285 for (i = 1; str[i] >= '0' && str[i] <= '7'; ++i)
4287 continue;
4290 char save = str[i];
4291 str[i] = '\0';
4292 char out = (char)idl_atoui(&str[1], 8);
4293 str[i] = save;
4294 return out;
4296 else
4298 return str[1] - 'a';
4300 ACE_NOTREACHED (break;)
4304 * Convert escaped hex digits into a wchar
4306 static ACE_CDR::WChar
4307 idl_wchar_escape_reader (char *str)
4309 if (str[0] != '\\' || str[1] != 'u')
4311 return 0;
4314 int i;
4315 // get the hex digits
4316 for (i = 2; str[i] != '\0' && isxdigit (str[i]); i++)
4318 continue;
4320 char save = str[i];
4321 str[i] = '\0';
4322 ACE_CDR::WChar out = (ACE_CDR::WChar) idl_atoui (&str[2], 16);
4323 str[i] = save;
4324 return out;
4328 * Checks wstring for validity
4330 static char *
4331 idl_wstring_escape_reader (char *str)
4333 return str;
4336 static char *
4337 idl_get_pragma_string (char *pragma)
4339 // Get pointers to each end of the substring between the quotes.
4340 const char *firstquote = ACE_OS::strchr (pragma, '"');
4342 if (!firstquote)
4344 idl_global->err ()->syntax_error (IDL_GlobalData::PS_PragmaPrefixSyntax);
4346 return nullptr;
4349 const char *start = firstquote + 1;
4350 const char *end = ACE_OS::strchr (start, '"');
4352 if (!end)
4354 idl_global->err ()->syntax_error (IDL_GlobalData::PS_PragmaPrefixSyntax);
4356 return nullptr;
4359 size_t const len = end - start;
4360 char *retval {};
4362 ACE_NEW_RETURN (retval,
4363 char[len + 1],
4364 nullptr);
4366 ACE_OS::strncpy (retval,
4367 start,
4368 len);
4370 retval[len] = '\0';
4371 return retval;
4374 static bool
4375 idl_valid_version (char *s)
4377 // Nothing preceding decimal point.
4378 if (*s == '.')
4380 return 0;
4383 char *minor = ACE_OS::strchr (s, '.');
4384 int i;
4386 if (minor == 0)
4388 // No decimal point.
4389 return 0;
4392 if (*(minor + 1) == '\0')
4394 // Nothing following decimal point.
4395 return 0;
4398 char *tmp = minor + 1;
4400 for (i = 0; tmp[i] != '\0'; ++i)
4402 if (!isdigit (tmp[i]))
4404 return 0;
4408 ptrdiff_t const len = minor - s;
4410 for (i = 0; i < len; ++i)
4412 if (!isdigit (s[i]))
4414 return 0;
4418 // Major and minor version numbers must be unsigned shorts.
4419 if (ACE_OS::atoi (minor + 1) > ACE_UINT16_MAX
4420 || ACE_OS::atoi (s) > ACE_UINT16_MAX)
4422 return 0;
4425 return 1;
4428 static AST_Decl *
4429 idl_find_node (const char *s)
4431 UTL_ScopedName * node = FE_Utils::string_to_scoped_name (s);
4432 AST_Decl * d = 0;
4434 if (node != 0)
4436 d = idl_global->scopes ().top_non_null ()->lookup_by_name (node);
4438 if (d == 0)
4440 idl_global->err ()->lookup_error (node);
4443 node->destroy ();
4444 delete node;
4447 return d;