~ubuntu-branches/ubuntu/breezy/ace/breezy

« back to all changes in this revision

Viewing changes to TAO/TAO_IDL/fe/lex.yy.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad, Benjamin Montgomery, Adam Conrad
  • Date: 2005-09-18 22:51:38 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge) (0.1.2 woody)
  • Revision ID: james.westby@ubuntu.com-20050918225138-seav22q6fyylb536
Tags: 5.4.7-3ubuntu1
[ Benjamin Montgomery ]
* Added a patch for amd64 and powerpc that disables the compiler
  option -fvisibility-inlines-hidden

[ Adam Conrad ]
* Added DPATCH_OPTION_CPP=1 to debian/patches/00options to make
  Benjamin's above changes work correctly with dpatch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* A lexical scanner generated by flex */
2
 
 
3
 
/* Scanner skeleton version:
4
 
 * lex.yy.cpp,v 1.116 2004/01/07 02:53:51 parsons Exp
5
 
 */
6
 
 
7
 
#define FLEX_SCANNER
8
 
#define TAO_YY_FLEX_MAJOR_VERSION 2
9
 
#define TAO_YY_FLEX_MINOR_VERSION 5
10
 
 
11
 
 
12
 
 
13
 
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
14
 
#ifdef c_plusplus
15
 
#ifndef __cplusplus
16
 
#define __cplusplus
17
 
#endif
18
 
#endif
19
 
 
20
 
 
21
 
#ifdef __cplusplus
22
 
 
23
 
#include "ace/os_include/os_stdio.h"
24
 
 
25
 
/* Use prototypes in function declarations. */
26
 
#define TAO_YY_USE_PROTOS
27
 
 
28
 
/* The "const" storage-class-modifier is valid. */
29
 
#define TAO_YY_USE_CONST
30
 
 
31
 
#else   /* ! __cplusplus */
32
 
 
33
 
#ifdef __STDC__
34
 
 
35
 
#define TAO_YY_USE_PROTOS
36
 
#define TAO_YY_USE_CONST
37
 
 
38
 
#endif  /* __STDC__ */
39
 
#endif  /* ! __cplusplus */
40
 
 
41
 
#ifdef __TURBOC__
42
 
 #pragma warn -rch
43
 
 #pragma warn -use
44
 
#define TAO_YY_USE_CONST
45
 
#define TAO_YY_USE_PROTOS
46
 
#endif
47
 
 
48
 
#ifdef TAO_YY_USE_CONST
49
 
#define tao_yyconst const
50
 
#else
51
 
#define tao_yyconst
52
 
#endif
53
 
 
54
 
 
55
 
#ifdef TAO_YY_USE_PROTOS
56
 
#define TAO_YY_PROTO(proto) proto
57
 
#else
58
 
#define TAO_YY_PROTO(proto) ()
59
 
#endif
60
 
 
61
 
/* Returned upon end-of-file. */
62
 
#define TAO_YY_NULL 0
63
 
 
64
 
/* Promotes a possibly negative, possibly signed char to an unsigned
65
 
 * integer for use as an array index.  If the signed char is negative,
66
 
 * we want to instead treat it as an 8-bit unsigned char, hence the
67
 
 * double cast.
68
 
 */
69
 
#define TAO_YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
70
 
 
71
 
/* Enter a start condition.  This macro really ought to take a parameter,
72
 
 * but we do it the disgusting crufty way forced on us by the ()-less
73
 
 * definition of BEGIN.
74
 
 */
75
 
#define BEGIN tao_yy_start = 1 + 2 *
76
 
 
77
 
/* Translate the current start state into a value that can be later handed
78
 
 * to BEGIN to return to the state.  The TAO_YYSTATE alias is for lex
79
 
 * compatibility.
80
 
 */
81
 
#define TAO_YY_START ((tao_yy_start - 1) / 2)
82
 
#define TAO_YYSTATE TAO_YY_START
83
 
 
84
 
/* Action number for EOF rule of a given start state. */
85
 
#define TAO_YY_STATE_EOF(state) (TAO_YY_END_OF_BUFFER + state + 1)
86
 
 
87
 
/* Special action meaning "start processing a new file". */
88
 
#define TAO_YY_NEW_FILE tao_yyrestart( tao_yyin )
89
 
 
90
 
#define TAO_YY_END_OF_BUFFER_CHAR 0
91
 
 
92
 
/* Size of default input buffer. */
93
 
#define TAO_YY_BUF_SIZE 16384
94
 
 
95
 
typedef struct tao_yy_buffer_state *TAO_YY_BUFFER_STATE;
96
 
 
97
 
extern int tao_yyleng;
98
 
extern FILE *tao_yyin, *tao_yyout;
99
 
 
100
 
#define EOB_ACT_CONTINUE_SCAN 0
101
 
#define EOB_ACT_END_OF_FILE 1
102
 
#define EOB_ACT_LAST_MATCH 2
103
 
 
104
 
/* The funky do-while in the following #define is used to turn the definition
105
 
 * int a single C statement (which needs a semi-colon terminator).  This
106
 
 * avoids problems with code like:
107
 
 *
108
 
 *      if ( condition_holds )
109
 
 *              tao_yyless( 5 );
110
 
 *      else
111
 
 *              do_something_else();
112
 
 *
113
 
 * Prior to using the do-while the compiler would get upset at the
114
 
 * "else" because it interpreted the "if" statement as being all
115
 
 * done when it reached the ';' after the tao_yyless() call.
116
 
 */
117
 
 
118
 
/* Return all but the first 'n' matched characters back to the input stream. */
119
 
 
120
 
#define tao_yyless(n) \
121
 
        do \
122
 
                { \
123
 
                /* Undo effects of setting up tao_yytext. */ \
124
 
                *tao_yy_cp = tao_yy_hold_char; \
125
 
                TAO_YY_RESTORE_TAO_YY_MORE_OFFSET \
126
 
                tao_yy_c_buf_p = tao_yy_cp = tao_yy_bp + n - TAO_YY_MORE_ADJ; \
127
 
                TAO_YY_DO_BEFORE_ACTION; /* set up tao_yytext again */ \
128
 
                } \
129
 
        while ( 0 )
130
 
 
131
 
#define unput(c) tao_yyunput( c, tao_yytext_ptr )
132
 
 
133
 
/* The following is because we cannot portably get our hands on size_t
134
 
 * (without autoconf's help, which isn't available because we want
135
 
 * flex-generated scanners to compile on their own).
136
 
 */
137
 
typedef unsigned int tao_yy_size_t;
138
 
 
139
 
 
140
 
struct tao_yy_buffer_state
141
 
        {
142
 
        FILE *tao_yy_input_file;
143
 
 
144
 
        char *tao_yy_ch_buf;            /* input buffer */
145
 
        char *tao_yy_buf_pos;           /* current position in input buffer */
146
 
 
147
 
        /* Size of input buffer in bytes, not including room for EOB
148
 
         * characters.
149
 
         */
150
 
        tao_yy_size_t tao_yy_buf_size;
151
 
 
152
 
        /* Number of characters read into tao_yy_ch_buf, not including EOB
153
 
         * characters.
154
 
         */
155
 
        int tao_yy_n_chars;
156
 
 
157
 
        /* Whether we "own" the buffer - i.e., we know we created it,
158
 
         * and can realloc() it to grow it, and should free() it to
159
 
         * delete it.
160
 
         */
161
 
        int tao_yy_is_our_buffer;
162
 
 
163
 
        /* Whether this is an "interactive" input source; if so, and
164
 
         * if we're using stdio for input, then we want to use getc()
165
 
         * instead of fread(), to make sure we stop fetching input after
166
 
         * each newline.
167
 
         */
168
 
        int tao_yy_is_interactive;
169
 
 
170
 
        /* Whether we're considered to be at the beginning of a line.
171
 
         * If so, '^' rules will be active on the next match, otherwise
172
 
         * not.
173
 
         */
174
 
        int tao_yy_at_bol;
175
 
 
176
 
        /* Whether to try to fill the input buffer when we reach the
177
 
         * end of it.
178
 
         */
179
 
        int tao_yy_fill_buffer;
180
 
 
181
 
        int tao_yy_buffer_status;
182
 
#define TAO_YY_BUFFER_NEW 0
183
 
#define TAO_YY_BUFFER_NORMAL 1
184
 
        /* When an EOF's been seen but there's still some text to process
185
 
         * then we mark the buffer as TAO_YY_EOF_PENDING, to indicate that we
186
 
         * shouldn't try reading from the input source any more.  We might
187
 
         * still have a bunch of tokens to match, though, because of
188
 
         * possible backing-up.
189
 
         *
190
 
         * When we actually see the EOF, we change the status to "new"
191
 
         * (via tao_yyrestart()), so that the user can continue scanning by
192
 
         * just pointing tao_yyin at a new input file.
193
 
         */
194
 
#define TAO_YY_BUFFER_EOF_PENDING 2
195
 
        };
196
 
 
197
 
static TAO_YY_BUFFER_STATE tao_yy_current_buffer = 0;
198
 
 
199
 
/* We provide macros for accessing buffer states in case in the
200
 
 * future we want to put the buffer states in a more general
201
 
 * "scanner state".
202
 
 */
203
 
#define TAO_YY_CURRENT_BUFFER tao_yy_current_buffer
204
 
 
205
 
 
206
 
/* tao_yy_hold_char holds the character lost when tao_yytext is formed. */
207
 
static char tao_yy_hold_char;
208
 
 
209
 
static int tao_yy_n_chars;              /* number of characters read into tao_yy_ch_buf */
210
 
 
211
 
 
212
 
int tao_yyleng;
213
 
 
214
 
/* Points to current character in buffer. */
215
 
static char *tao_yy_c_buf_p = (char *) 0;
216
 
static int tao_yy_init = 1;             /* whether we need to initialize */
217
 
static int tao_yy_start = 0;    /* start state number */
218
 
 
219
 
/* Flag which is used to allow tao_yywrap()'s to do buffer switches
220
 
 * instead of setting up a fresh tao_yyin.  A bit of a hack ...
221
 
 */
222
 
static int tao_yy_did_buffer_switch_on_eof;
223
 
 
224
 
void tao_yyrestart TAO_YY_PROTO(( FILE *input_file ));
225
 
 
226
 
void tao_yy_switch_to_buffer TAO_YY_PROTO(( TAO_YY_BUFFER_STATE new_buffer ));
227
 
void tao_yy_load_buffer_state TAO_YY_PROTO(( void ));
228
 
TAO_YY_BUFFER_STATE tao_yy_create_buffer TAO_YY_PROTO(( FILE *file, int size ));
229
 
void tao_yy_delete_buffer TAO_YY_PROTO(( TAO_YY_BUFFER_STATE b ));
230
 
void tao_yy_init_buffer TAO_YY_PROTO(( TAO_YY_BUFFER_STATE b, FILE *file ));
231
 
void tao_yy_flush_buffer TAO_YY_PROTO(( TAO_YY_BUFFER_STATE b ));
232
 
#define TAO_YY_FLUSH_BUFFER tao_yy_flush_buffer( tao_yy_current_buffer )
233
 
 
234
 
TAO_YY_BUFFER_STATE tao_yy_scan_buffer TAO_YY_PROTO(( char *base, tao_yy_size_t size ));
235
 
TAO_YY_BUFFER_STATE tao_yy_scan_string TAO_YY_PROTO(( tao_yyconst char *tao_yy_str ));
236
 
TAO_YY_BUFFER_STATE tao_yy_scan_bytes TAO_YY_PROTO(( tao_yyconst char *bytes, int len ));
237
 
 
238
 
static void *tao_yy_flex_alloc TAO_YY_PROTO(( tao_yy_size_t ));
239
 
static void *tao_yy_flex_realloc TAO_YY_PROTO(( void *, tao_yy_size_t ));
240
 
static void tao_yy_flex_free TAO_YY_PROTO(( void * ));
241
 
 
242
 
#define tao_yy_new_buffer tao_yy_create_buffer
243
 
 
244
 
#define tao_yy_set_interactive(is_interactive) \
245
 
        { \
246
 
        if ( ! tao_yy_current_buffer ) \
247
 
                tao_yy_current_buffer = tao_yy_create_buffer( tao_yyin, TAO_YY_BUF_SIZE ); \
248
 
        tao_yy_current_buffer->tao_yy_is_interactive = is_interactive; \
249
 
        }
250
 
 
251
 
#define tao_yy_set_bol(at_bol) \
252
 
        { \
253
 
        if ( ! tao_yy_current_buffer ) \
254
 
                tao_yy_current_buffer = tao_yy_create_buffer( tao_yyin, TAO_YY_BUF_SIZE ); \
255
 
        tao_yy_current_buffer->tao_yy_at_bol = at_bol; \
256
 
        }
257
 
 
258
 
#define TAO_YY_AT_BOL() (tao_yy_current_buffer->tao_yy_at_bol)
259
 
 
260
 
typedef unsigned char TAO_YY_CHAR;
261
 
FILE *tao_yyin = (FILE *) 0, *tao_yyout = (FILE *) 0;
262
 
typedef int tao_yy_state_type;
263
 
extern char tao_yytext[];
264
 
 
265
 
 
266
 
static tao_yy_state_type tao_yy_get_previous_state TAO_YY_PROTO(( void ));
267
 
static tao_yy_state_type tao_yy_try_NUL_trans TAO_YY_PROTO(( tao_yy_state_type current_state ));
268
 
static int tao_yy_get_next_buffer TAO_YY_PROTO(( void ));
269
 
static void tao_yy_fatal_error TAO_YY_PROTO(( tao_yyconst char msg[] ));
270
 
 
271
 
/* Done after the current pattern has been matched and before the
272
 
 * corresponding action - sets up tao_yytext.
273
 
 */
274
 
#define TAO_YY_DO_BEFORE_ACTION \
275
 
        tao_yytext_ptr = tao_yy_bp; \
276
 
        tao_yyleng = (int) (tao_yy_cp - tao_yy_bp); \
277
 
        tao_yy_hold_char = *tao_yy_cp; \
278
 
        *tao_yy_cp = '\0'; \
279
 
        if ( tao_yyleng >= TAO_YYLMAX ) \
280
 
                TAO_YY_FATAL_ERROR( "token too large, exceeds TAO_YYLMAX" ); \
281
 
        tao_yy_flex_strncpy( tao_yytext, tao_yytext_ptr, tao_yyleng + 1 ); \
282
 
        tao_yy_c_buf_p = tao_yy_cp;
283
 
 
284
 
#define TAO_YY_NUM_RULES 104
285
 
#define TAO_YY_END_OF_BUFFER 105
286
 
static tao_yyconst short int tao_yy_accept[549] =
287
 
    {   0,
288
 
      101,  101,  105,  103,  101,  102,  102,  103,  103,  103,
289
 
      103,  103,   76,   72,  103,  103,  103,   68,   68,   68,
290
 
       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
291
 
       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
292
 
       68,   68,  101,  103,  102,  101,    0,   77,    0,    0,
293
 
        0,    0,   75,   71,   69,  100,    0,   69,   76,    0,
294
 
        0,    0,   72,   67,   65,   66,   68,   68,    0,    0,
295
 
       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
296
 
       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
297
 
       68,   68,   62,   68,   68,   68,   68,   68,   68,   68,
298
 
 
299
 
       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
300
 
       68,   68,   68,   68,   68,   68,   68,   68,  101,    0,
301
 
        0,   95,    0,    0,    0,    0,    0,    0,    0,   77,
302
 
        0,    0,   79,    0,   79,    0,    0,   75,    0,   71,
303
 
        0,   69,    0,   99,   99,   69,    0,   70,   74,   68,
304
 
        0,   78,    0,    0,    0,   68,   68,   68,    1,   68,
305
 
       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
306
 
       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
307
 
       68,   68,   68,   68,   68,   68,   68,   68,   68,   63,
308
 
       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
309
 
 
310
 
       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
311
 
        0,    0,    0,    0,    0,    0,    0,   82,   80,    0,
312
 
        0,   73,    0,   69,   70,   68,    0,   83,    0,   68,
313
 
       59,   68,   68,   68,   20,   27,   68,   68,   68,   68,
314
 
       68,   68,   68,   13,   68,   68,   68,   68,   68,   68,
315
 
       68,   48,   68,   68,   68,   68,   24,   68,   68,   68,
316
 
       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
317
 
       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
318
 
       57,   68,   31,   68,   68,    0,    0,    0,    0,    0,
319
 
        0,    0,   96,    0,    0,    0,    0,    0,    0,   80,
320
 
 
321
 
        0,   81,    0,   60,    0,    0,   68,   68,   68,   68,
322
 
       68,   10,   68,   68,   68,   68,   68,   44,   68,   68,
323
 
       68,   68,   18,   22,   68,   68,   61,   68,   33,   68,
324
 
       68,   68,   68,   30,   68,   68,   68,   68,   68,   68,
325
 
       68,   68,   68,   25,   68,   68,   68,   68,   68,   68,
326
 
       68,   68,   17,   68,   68,   28,   68,   91,    0,    0,
327
 
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
328
 
       84,    0,    2,   68,   68,   68,   68,   68,   68,   35,
329
 
       68,   23,   68,   68,   68,   46,   68,   49,   68,   68,
330
 
        3,   68,   32,   64,   68,   68,   68,   38,   68,    4,
331
 
 
332
 
       68,   68,   68,   14,   12,   68,   19,   68,   68,   55,
333
 
       68,   68,   68,   68,    0,   89,    0,    0,    0,    0,
334
 
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
335
 
       68,   68,   29,   68,   68,    8,   21,   68,   68,   36,
336
 
       68,   68,   58,   68,   68,   37,   68,   68,   68,   68,
337
 
       68,   68,   68,   11,   68,   68,   68,   15,    0,    0,
338
 
       87,   87,    0,    0,   93,    0,    0,   92,    0,    0,
339
 
        0,    0,    0,    0,    0,   34,   68,   68,   43,   68,
340
 
       68,   68,   68,   50,   68,   52,   68,    5,   16,   68,
341
 
       39,   68,   68,   26,   68,    0,   97,   97,    0,    0,
342
 
 
343
 
        0,    0,   90,    0,    0,    0,    0,    0,    0,    0,
344
 
        6,   42,   45,    7,   47,    9,   68,   53,   54,   68,
345
 
       68,   41,    0,   85,   85,    0,    0,   88,   88,    0,
346
 
        0,    0,    0,   51,   68,   56,    0,   98,   98,    0,
347
 
        0,    0,   40,   94,    0,   86,   86,    0
348
 
    } ;
349
 
 
350
 
static tao_yyconst int tao_yy_ec[256] =
351
 
    {   0,
352
 
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
353
 
        1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
354
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
355
 
        1,    5,    1,    6,    7,    1,    1,    1,    8,    1,
356
 
        1,    9,   10,    1,   11,   12,   13,   14,   15,   15,
357
 
       15,   15,   15,   15,   15,   16,   16,   17,    1,   18,
358
 
       19,   20,   21,    1,   22,   23,   23,   23,   24,   25,
359
 
       26,   26,   26,   26,   26,   27,   26,   26,   28,   26,
360
 
       26,   29,   30,   31,   32,   26,   26,   33,   26,   26,
361
 
        1,   34,    1,    1,   26,    1,   35,   36,   37,   38,
362
 
 
363
 
       39,   40,   41,   42,   43,   44,   45,   46,   47,   48,
364
 
       49,   50,   51,   52,   53,   54,   55,   56,   57,   58,
365
 
       59,   26,    1,    1,    1,    1,    1,    1,    1,    1,
366
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
367
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
368
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
369
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
370
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
371
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
372
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
373
 
 
374
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
375
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
376
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
377
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
378
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
379
 
        1,    1,    1,    1,    1
380
 
    } ;
381
 
 
382
 
static tao_yyconst int tao_yy_meta[60] =
383
 
    {   0,
384
 
        1,    1,    2,    1,    1,    3,    1,    4,    1,    1,
385
 
        1,    1,    1,    5,    5,    5,    1,    1,    1,    1,
386
 
        3,    5,    5,    5,    5,    6,    6,    6,    6,    6,
387
 
        6,    6,    6,    3,    7,    7,    5,    5,    5,    7,
388
 
        6,    6,    6,    6,    6,    6,    6,    8,    6,    6,
389
 
        6,    8,    6,    8,    6,    8,    6,    8,    6
390
 
    } ;
391
 
 
392
 
static tao_yyconst short int tao_yy_base[576] =
393
 
    {   0,
394
 
        0,   58, 1037, 1038,   59, 1038, 1038,   56, 1002,   54,
395
 
       57,   65,   68,   73, 1018, 1016, 1013,    0, 1010,   69,
396
 
      995, 1001,   45,  980,   56,   37,   48,   67,  989,  978,
397
 
       61,  977,   65,  990,   79,   63,   82,   83,   71,   71,
398
 
       93,   92,  134,  144, 1003,  130,   97,  148,    0, 1015,
399
 
      147,  152,  158,  184,  210, 1038,  148,  161,  197,  203,
400
 
      229,    0,  239, 1038, 1038, 1038,    0,  995,  137,  987,
401
 
      976,  987,  965,  958,  962,  966,  961,  978,  109,  959,
402
 
      971,  955,  966,  953,  968,  969,  968,  130,  955,  949,
403
 
      955,  951,  132,   96,  952,  961,  952,  943,  942,  956,
404
 
 
405
 
      940,  136,  957,  949,  956,  138,  941,  937,  938,  944,
406
 
      931,  935,  140,  945,  937,  939,  939,  926,  199,    0,
407
 
      174, 1038,  973,  243,  935,  939,  933,  923,  955,  226,
408
 
      196,  204, 1038,  965,  964,  252,  963,  256,    0,  261,
409
 
      272, 1038,  258, 1038,  286,    0,  277,  283,    0,  940,
410
 
      235, 1038,  914,  960,  257,  928,  942,  911,    0,  912,
411
 
      917,  923,  909,  910,  110,  905,  923,  921,  902,  908,
412
 
      906,  914,  898,  913,  911,  914,  896,  908,  897,  890,
413
 
      905,  908,  901,  906,  885,  885,  895,  898,  879,    0,
414
 
      247,  879,  888,  880,  894,  876,  878,  877,  152,  878,
415
 
 
416
 
      873,  878,  886,  875,  880,  869,  866,  882,  884,  866,
417
 
      911,  910,  869,  875,  865,  877,  328, 1038, 1038,  301,
418
 
      903,    0,  290,  310, 1038,  886,    0, 1038,    0,  872,
419
 
        0,  856,  864,  867,    0,    0,  856,  247,  865,  854,
420
 
      847,  855,  847,    0,  845,  848,  848,  857,  857,  840,
421
 
      858,    0,  840,  837,  838,  843,    0,  847,  841,  843,
422
 
      829,  830,  848,  847,  846,  837,  836,  839,  828,  837,
423
 
      840,  820,  825,  835,  822,  833,  832,  284,  820,  826,
424
 
        0,  827,    0,  813,  821,  857,  315,  823,  813,  821,
425
 
      818,  812, 1038,  268,  343,  814,  818,  812,  802, 1038,
426
 
 
427
 
      845, 1038,  844,    0,  373,  843,  796,  814,  812,  812,
428
 
      798,    0,  798,  786,  796,  796,  802,    0,  786,  785,
429
 
      786,  785,    0,    0,  793,  781,    0,  794,    0,  794,
430
 
      793,  781,  791,    0,  770,  776,  773,  788,  301,  772,
431
 
      776,  775,  779,    0,  780,  766,  767,  776,  782,  777,
432
 
      777,  762,    0,  765,  758,    0,  763, 1038,  378,  279,
433
 
      756,  361,  762,  802,  801,  760,  766,  756,  768,  400,
434
 
     1038,  794,    0,  764,  745,  751,  759,  701,  674,    0,
435
 
      662,    0,  653,  666,  647,    0,  641,    0,  656,  629,
436
 
        0,  625,    0,    0,  596,  612,  611,    0,  595,    0,
437
 
 
438
 
      580,  587,  569,    0,    0,  566,    0,  565,  578,    0,
439
 
      578,  577,  556,  573,  427, 1038,  442,  348,  360,  450,
440
 
      465,  578,  605,  381,  562,  551,  558,  551,  473,  579,
441
 
      523,  510,    0,  510,  502,    0,    0,  504,  501,    0,
442
 
      510,  506,    0,  493,  474,    0,  446,  455,  433,  452,
443
 
      443,  408,  425,    0,  414,  411,  378,    0,  469,  369,
444
 
     1038,  397,  400,  472, 1038,  421,  365, 1038,  500,  415,
445
 
      372,  515,  372,  305,  398,    0,  366,  337,    0,  322,
446
 
      312,  302,  314,    0,  306,    0,  288,    0,    0,  287,
447
 
        0,  292,  278,    0,  278,  430, 1038,  497,  307,  503,
448
 
 
449
 
      519,  523, 1038,  531,  538,  448,  546,  551,  558,  261,
450
 
        0,    0,    0,    0,    0,    0,  193,    0,    0,  187,
451
 
      171,    0,  565, 1038,  567,  575,  572, 1038,  577,  579,
452
 
      216,  197,  457,    0,   55,    0,  581, 1038,  591,   61,
453
 
      600,  602,    0, 1038,  604, 1038,  606, 1038,  627,  635,
454
 
      639,  645,  653,  661,  665,  672,  680,  685,  688,  695,
455
 
      700,  703,  706,  710,  717,  722,  729,  734,  741,  749,
456
 
      757,  765,  773,  781,  789
457
 
    } ;
458
 
 
459
 
static tao_yyconst short int tao_yy_def[576] =
460
 
    {   0,
461
 
      548,    1,  548,  548,  548,  548,  548,  549,  550,  548,
462
 
      548,  548,  548,  548,  548,  548,  548,  551,  551,  551,
463
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
464
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
465
 
      551,  551,  548,  548,  548,  548,  549,  548,  552,  548,
466
 
      553,  548,  548,  548,  548,  548,  554,   55,  548,  548,
467
 
      548,  555,  548,  548,  548,  548,  551,  551,  556,  557,
468
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
469
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
470
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
471
 
 
472
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
473
 
      551,  551,  551,  551,  551,  551,  551,  551,  548,   44,
474
 
       44,  548,  121,  548,  548,  548,  548,  548,  548,  548,
475
 
      549,  549,  548,  548,  548,  548,  558,  548,  559,  548,
476
 
      548,  548,  554,  548,  554,   58,  548,  548,  555,  551,
477
 
      556,  548,  548,  548,  548,  551,  551,  551,  551,  551,
478
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
479
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
480
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
481
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
482
 
 
483
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
484
 
      560,  548,  548,  548,  548,  548,  548,  548,  548,  548,
485
 
      561,  559,  548,  548,  548,  551,  562,  548,  563,  551,
486
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
487
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
488
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
489
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
490
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
491
 
      551,  551,  551,  551,  551,  560,  548,  548,  548,  548,
492
 
      548,  217,  548,  217,  548,  548,  548,  548,  548,  548,
493
 
 
494
 
      548,  548,  548,  551,  556,  564,  551,  551,  551,  551,
495
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
496
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
497
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
498
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
499
 
      551,  551,  551,  551,  551,  551,  551,  548,  548,  548,
500
 
      548,  548,  548,  565,  548,  548,  548,  548,  548,  305,
501
 
      548,  566,  551,  551,  551,  551,  551,  551,  551,  551,
502
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
503
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
504
 
 
505
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
506
 
      551,  551,  551,  551,  548,  548,  548,  567,  548,  548,
507
 
      548,  548,  565,  548,  548,  548,  548,  548,  305,  568,
508
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
509
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
510
 
      551,  551,  551,  551,  551,  551,  551,  551,  548,  567,
511
 
      548,  567,  569,  548,  548,  570,  548,  548,  548,  548,
512
 
      548,  548,  548,  556,  548,  551,  551,  551,  551,  551,
513
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
514
 
      551,  551,  551,  551,  551,  569,  548,  569,  570,  548,
515
 
 
516
 
      571,  548,  548,  548,  572,  548,  548,  548,  548,  548,
517
 
      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
518
 
      551,  551,  571,  548,  571,  548,  572,  548,  572,  573,
519
 
      574,  548,  548,  551,  551,  551,  573,  548,  573,  574,
520
 
      548,  575,  551,  548,  575,  548,  575,    0,  548,  548,
521
 
      548,  548,  548,  548,  548,  548,  548,  548,  548,  548,
522
 
      548,  548,  548,  548,  548,  548,  548,  548,  548,  548,
523
 
      548,  548,  548,  548,  548
524
 
    } ;
525
 
 
526
 
static tao_yyconst short int tao_yy_nxt[1098] =
527
 
    {   0,
528
 
        4,    5,    6,    7,    5,    8,    4,    9,    4,    4,
529
 
       10,   11,   12,   13,   14,   14,   15,   16,    4,   17,
530
 
        7,   18,   18,   18,   19,   18,   20,   21,   18,   18,
531
 
       22,   18,   18,    4,   23,   24,   25,   26,   27,   28,
532
 
       29,   30,   31,   18,   18,   32,   33,   34,   35,   36,
533
 
       18,   37,   38,   39,   40,   41,   42,   18,   18,   43,
534
 
       46,   48,   43,   46,   44,   52,  541,   53,   54,   54,
535
 
       55,   55,   55,   56,   69,   81,   70,   57,   45,   58,
536
 
       73,   59,   59,   60,   58,   82,   63,   63,   63,   49,
537
 
       77,   61,   74,  543,   83,   84,   61,   78,   75,   95,
538
 
 
539
 
       62,   87,   48,   85,   79,   86,   61,   92,   93,   88,
540
 
       80,   61,   89,   96,  102,   99,  104,  103,  113,   97,
541
 
      105,  106,  111,  114,  107,   62,  100,  115,  117,  112,
542
 
       49,   46,  182,  101,   46,  119,  108,  109,  119,  110,
543
 
      120,  116,  152,  183,  118,  121,  122,  122,  123,  130,
544
 
      144,  145,  130,  131,  135,  164,  165,  124,  124,  124,
545
 
      136,  136,  238,  239,  122,   55,   55,   55,  145,   58,
546
 
      153,  138,  138,   60,  146,  146,  146,  174,  191,  137,
547
 
      180,   61,  204,  125,  192,  181,  126,  175,  196,  127,
548
 
      139,  197,  205,  128,  273,   58,   61,  140,  140,  140,
549
 
 
550
 
      119,   48,  531,  119,  137,  120,  274,   61,   58,   48,
551
 
       59,   59,   60,  548,   58,  139,   60,   60,   60,  548,
552
 
       61,  541,   61,   55,   55,   55,   61,  130,  536,   49,
553
 
      130,  131,  535,  141,  142,   61,  142,   49,  147,  147,
554
 
      152,   61,  148,  148,  148,  122,  122,  212,  141,  142,
555
 
       58,  534,   63,   63,   63,  142,  124,  124,  124,  219,
556
 
      144,  145,   61,  122,  228,  220,  220,   58,  153,  138,
557
 
      138,   60,   58,  364,  140,  140,  140,   61,  145,   61,
558
 
      418,  223,  223,  418,   61,  224,  224,  224,  144,  145,
559
 
      148,  148,  148,  264,   61,  533,  148,  148,  148,   61,
560
 
 
561
 
      312,  313,  265,  224,  224,  224,  145,  225,  300,  225,
562
 
      152,  229,  500,  548,  301,  301,  522,  358,  358,  359,
563
 
      521,  350,  225,  224,  224,  224,  351,  520,  225,  292,
564
 
      293,  293,  294,  352,  142,  358,  142,  398,  153,  519,
565
 
      518,  295,  295,  295,  517,  293,  293,  365,  293,  142,
566
 
      461,  462,  516,  399,  515,  142,  295,  295,  295,  514,
567
 
      513,  463,  420,  293,  463,  420,  501,  296,  462,  501,
568
 
      297,  461,  462,  298,  421,  421,  421,  299,  152,  415,
569
 
      416,  416,  415,  468,  468,  469,  370,  370,  370,  462,
570
 
      512,  417,  417,  417,  370,  370,  370,  370,  416,  461,
571
 
 
572
 
      462,  468,  497,  498,  511,  371,  153,  370,  370,  370,
573
 
      370,  370,  370,  429,  429,  429,  505,  462,  510,  505,
574
 
      498,  429,  429,  429,  429,  506,  500,  495,  415,  416,
575
 
      416,  415,  497,  498,  429,  429,  429,  429,  429,  429,
576
 
      459,  459,  459,  415,  416,  416,  415,  416,  494,  530,
577
 
      498,  420,  530,  493,  420,  417,  417,  417,  542,  492,
578
 
      491,  542,  416,  421,  421,  421,  464,  465,  465,  464,
579
 
      466,  416,  416,  464,  465,  465,  464,  466,  421,  421,
580
 
      421,  490,  459,  459,  459,  465,  474,  474,  474,  416,
581
 
      489,  488,  465,  487,  474,  474,  474,  474,  486,  497,
582
 
 
583
 
      498,  502,  503,  503,  502,  465,  465,  474,  474,  474,
584
 
      474,  474,  474,  504,  504,  504,  507,  498,  485,  508,
585
 
      503,  524,  525,  465,  502,  503,  503,  502,  509,  509,
586
 
      509,  484,  502,  503,  503,  502,  526,  526,  526,  525,
587
 
      528,  529,  483,  503,  504,  504,  504,  507,  482,  481,
588
 
      508,  503,  507,  480,  479,  508,  531,  478,  529,  509,
589
 
      509,  509,  532,  477,  509,  509,  509,  524,  525,  524,
590
 
      525,  509,  509,  509,  528,  529,  476,  503,  503,  528,
591
 
      529,  538,  539,  538,  539,  525,  371,  525,  526,  526,
592
 
      526,  473,  529,  538,  539,  503,  472,  529,  471,  539,
593
 
 
594
 
      470,  539,  544,  544,  546,  547,  546,  547,  546,  547,
595
 
      424,  539,  467,  458,  457,  456,  455,  454,  453,  452,
596
 
      544,  451,  547,  450,  547,  449,  547,   47,   47,   47,
597
 
       47,   47,   47,   47,   47,   50,  448,   50,   50,   50,
598
 
       50,   50,   50,   67,   67,   67,   67,  132,  132,  447,
599
 
      446,  132,  132,  134,  445,  134,  134,  134,  134,  134,
600
 
      134,  143,  143,  143,  143,  143,  143,  143,  143,  149,
601
 
      444,  149,  151,  151,  151,  151,  151,  151,  151,  151,
602
 
      154,  443,  154,  154,  154,  154,  154,  154,  221,  221,
603
 
      442,  221,  222,  441,  222,  286,  286,  286,  286,  286,
604
 
 
605
 
      286,  286,  286,  303,  303,  440,  303,  305,  439,  305,
606
 
      306,  438,  306,  372,  372,  437,  372,  423,  423,  423,
607
 
      423,  423,  423,  423,  423,  430,  430,  436,  430,  460,
608
 
      460,  460,  460,  460,  460,  460,  460,  475,  475,  435,
609
 
      475,  496,  496,  496,  496,  496,  496,  496,  496,  499,
610
 
      499,  499,  499,  499,  499,  499,  499,  523,  523,  523,
611
 
      523,  523,  523,  523,  523,  527,  527,  527,  527,  527,
612
 
      527,  527,  527,  537,  537,  537,  537,  537,  537,  537,
613
 
      537,  540,  540,  540,  540,  540,  540,  540,  540,  545,
614
 
      545,  545,  545,  545,  545,  545,  545,  434,  433,  432,
615
 
 
616
 
      431,  371,  428,  427,  426,  425,  364,  424,  422,  419,
617
 
      414,  413,  412,  411,  410,  409,  408,  407,  406,  405,
618
 
      404,  403,  402,  401,  400,  397,  396,  395,  394,  393,
619
 
      392,  391,  390,  389,  388,  387,  386,  385,  384,  383,
620
 
      382,  381,  380,  379,  378,  377,  376,  375,  374,  373,
621
 
      371,  302,  300,  369,  368,  367,  366,  548,  363,  362,
622
 
      361,  360,  287,  357,  356,  355,  354,  353,  349,  348,
623
 
      347,  346,  345,  344,  343,  342,  341,  340,  339,  338,
624
 
      337,  336,  335,  334,  333,  332,  331,  330,  329,  328,
625
 
      327,  326,  325,  324,  323,  322,  321,  320,  319,  318,
626
 
 
627
 
      317,  316,  315,  314,  311,  310,  309,  308,  307,  304,
628
 
      302,  291,  290,  289,  288,  211,  287,  285,  284,  283,
629
 
      282,  281,  280,  279,  278,  277,  276,  275,  272,  271,
630
 
      270,  269,  268,  267,  266,  263,  262,  261,  260,  259,
631
 
      258,  257,  256,  255,  254,  253,  252,  251,  250,  249,
632
 
      248,  247,  246,  245,  244,  243,  242,  241,  240,  237,
633
 
      236,  235,  234,  233,  232,  231,  230,  228,  227,  226,
634
 
      218,  218,  218,  217,  216,  215,  214,  213,  211,  210,
635
 
      209,  208,  207,  206,  203,  202,  201,  200,  199,  198,
636
 
      195,  194,  193,  190,  189,  188,  187,  186,  185,  184,
637
 
 
638
 
      179,  178,  177,  176,  173,  172,  171,  170,  169,  168,
639
 
      167,  166,  163,  162,  161,  160,  159,  158,  157,  156,
640
 
      155,  150,  133,  129,   98,   94,   91,   90,   76,   72,
641
 
       71,   68,   66,   65,   64,   51,  548,    3,  548,  548,
642
 
      548,  548,  548,  548,  548,  548,  548,  548,  548,  548,
643
 
      548,  548,  548,  548,  548,  548,  548,  548,  548,  548,
644
 
      548,  548,  548,  548,  548,  548,  548,  548,  548,  548,
645
 
      548,  548,  548,  548,  548,  548,  548,  548,  548,  548,
646
 
      548,  548,  548,  548,  548,  548,  548,  548,  548,  548,
647
 
      548,  548,  548,  548,  548,  548,  548
648
 
 
649
 
    } ;
650
 
 
651
 
static tao_yyconst short int tao_yy_chk[1098] =
652
 
    {   0,
653
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
654
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
655
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
656
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
657
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
658
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    2,
659
 
        5,    8,    2,    5,    2,   10,  540,   10,   10,   10,
660
 
       11,   11,   11,   12,   20,   26,   20,   12,    2,   13,
661
 
       23,   13,   13,   13,   14,   26,   14,   14,   14,    8,
662
 
       25,   13,   23,  535,   27,   27,   14,   25,   23,   33,
663
 
 
664
 
       13,   28,   47,   27,   25,   27,   13,   31,   31,   28,
665
 
       25,   14,   28,   33,   36,   35,   37,   36,   40,   33,
666
 
       37,   38,   39,   40,   38,   13,   35,   41,   42,   39,
667
 
       47,   46,   94,   35,   46,   43,   38,   38,   43,   38,
668
 
       43,   41,   69,   94,   42,   44,   44,   44,   44,   48,
669
 
       57,   57,   48,   48,   51,   79,   79,   44,   44,   44,
670
 
       51,   51,  165,  165,   44,   52,   52,   52,   57,   53,
671
 
       69,   53,   53,   53,   58,   58,   58,   88,  102,   51,
672
 
       93,   53,  113,   44,  102,   93,   44,   88,  106,   44,
673
 
       53,  106,  113,   44,  199,   54,   53,   54,   54,   54,
674
 
 
675
 
      119,  131,  532,  119,   51,  119,  199,   54,   59,  132,
676
 
       59,   59,   59,  121,   60,   53,   60,   60,   60,  121,
677
 
       59,  531,   54,   55,   55,   55,   60,  130,  521,  131,
678
 
      130,  130,  520,   55,   55,   59,   55,  132,   61,   61,
679
 
      151,   60,   61,   61,   61,  124,  124,  124,   55,   55,
680
 
       63,  517,   63,   63,   63,   55,  124,  124,  124,  136,
681
 
      143,  143,   63,  124,  155,  136,  136,  138,  151,  138,
682
 
      138,  138,  140,  294,  140,  140,  140,   63,  143,  138,
683
 
      360,  141,  141,  360,  140,  141,  141,  141,  145,  145,
684
 
      147,  147,  147,  191,  138,  510,  148,  148,  148,  140,
685
 
 
686
 
      238,  238,  191,  223,  223,  223,  145,  148,  220,  148,
687
 
      474,  155,  499,  294,  220,  220,  495,  287,  287,  287,
688
 
      493,  278,  148,  224,  224,  224,  278,  492,  148,  217,
689
 
      217,  217,  217,  278,  224,  287,  224,  339,  474,  490,
690
 
      487,  217,  217,  217,  485,  295,  295,  295,  217,  224,
691
 
      418,  418,  483,  339,  482,  224,  295,  295,  295,  481,
692
 
      480,  419,  362,  295,  419,  362,  467,  217,  418,  467,
693
 
      217,  460,  460,  217,  362,  362,  362,  217,  305,  359,
694
 
      359,  359,  359,  424,  424,  424,  305,  305,  305,  460,
695
 
      478,  359,  359,  359,  305,  305,  305,  305,  359,  462,
696
 
 
697
 
      462,  424,  463,  463,  477,  475,  305,  305,  305,  305,
698
 
      305,  305,  305,  370,  370,  370,  470,  462,  473,  470,
699
 
      463,  370,  370,  370,  370,  471,  466,  457,  415,  415,
700
 
      415,  415,  496,  496,  370,  370,  370,  370,  370,  370,
701
 
      415,  415,  415,  417,  417,  417,  417,  415,  456,  506,
702
 
      496,  420,  506,  455,  420,  417,  417,  417,  533,  453,
703
 
      452,  533,  417,  420,  420,  420,  421,  421,  421,  421,
704
 
      421,  459,  459,  464,  464,  464,  464,  464,  421,  421,
705
 
      421,  451,  459,  459,  459,  421,  429,  429,  429,  459,
706
 
      450,  449,  464,  448,  429,  429,  429,  429,  447,  498,
707
 
 
708
 
      498,  469,  469,  469,  469,  500,  500,  429,  429,  429,
709
 
      429,  429,  429,  469,  469,  469,  472,  498,  445,  472,
710
 
      469,  501,  501,  500,  502,  502,  502,  502,  472,  472,
711
 
      472,  444,  504,  504,  504,  504,  502,  502,  502,  501,
712
 
      505,  505,  442,  502,  504,  504,  504,  507,  441,  439,
713
 
      507,  504,  508,  438,  435,  508,  508,  434,  505,  507,
714
 
      507,  507,  509,  432,  508,  508,  508,  523,  523,  525,
715
 
      525,  509,  509,  509,  527,  527,  431,  526,  526,  529,
716
 
      529,  530,  530,  537,  537,  523,  430,  525,  526,  526,
717
 
      526,  428,  527,  539,  539,  526,  427,  529,  426,  530,
718
 
 
719
 
      425,  537,  541,  541,  542,  542,  545,  545,  547,  547,
720
 
      423,  539,  422,  414,  413,  412,  411,  409,  408,  406,
721
 
      541,  403,  542,  402,  545,  401,  547,  549,  549,  549,
722
 
      549,  549,  549,  549,  549,  550,  399,  550,  550,  550,
723
 
      550,  550,  550,  551,  551,  551,  551,  552,  552,  397,
724
 
      396,  552,  552,  553,  395,  553,  553,  553,  553,  553,
725
 
      553,  554,  554,  554,  554,  554,  554,  554,  554,  555,
726
 
      392,  555,  556,  556,  556,  556,  556,  556,  556,  556,
727
 
      557,  390,  557,  557,  557,  557,  557,  557,  558,  558,
728
 
      389,  558,  559,  387,  559,  560,  560,  560,  560,  560,
729
 
 
730
 
      560,  560,  560,  561,  561,  385,  561,  562,  384,  562,
731
 
      563,  383,  563,  564,  564,  381,  564,  565,  565,  565,
732
 
      565,  565,  565,  565,  565,  566,  566,  379,  566,  567,
733
 
      567,  567,  567,  567,  567,  567,  567,  568,  568,  378,
734
 
      568,  569,  569,  569,  569,  569,  569,  569,  569,  570,
735
 
      570,  570,  570,  570,  570,  570,  570,  571,  571,  571,
736
 
      571,  571,  571,  571,  571,  572,  572,  572,  572,  572,
737
 
      572,  572,  572,  573,  573,  573,  573,  573,  573,  573,
738
 
      573,  574,  574,  574,  574,  574,  574,  574,  574,  575,
739
 
      575,  575,  575,  575,  575,  575,  575,  377,  376,  375,
740
 
 
741
 
      374,  372,  369,  368,  367,  366,  365,  364,  363,  361,
742
 
      357,  355,  354,  352,  351,  350,  349,  348,  347,  346,
743
 
      345,  343,  342,  341,  340,  338,  337,  336,  335,  333,
744
 
      332,  331,  330,  328,  326,  325,  322,  321,  320,  319,
745
 
      317,  316,  315,  314,  313,  311,  310,  309,  308,  307,
746
 
      306,  303,  301,  299,  298,  297,  296,  292,  291,  290,
747
 
      289,  288,  286,  285,  284,  282,  280,  279,  277,  276,
748
 
      275,  274,  273,  272,  271,  270,  269,  268,  267,  266,
749
 
      265,  264,  263,  262,  261,  260,  259,  258,  256,  255,
750
 
      254,  253,  251,  250,  249,  248,  247,  246,  245,  243,
751
 
 
752
 
      242,  241,  240,  239,  237,  234,  233,  232,  230,  226,
753
 
      221,  216,  215,  214,  213,  212,  211,  210,  209,  208,
754
 
      207,  206,  205,  204,  203,  202,  201,  200,  198,  197,
755
 
      196,  195,  194,  193,  192,  189,  188,  187,  186,  185,
756
 
      184,  183,  182,  181,  180,  179,  178,  177,  176,  175,
757
 
      174,  173,  172,  171,  170,  169,  168,  167,  166,  164,
758
 
      163,  162,  161,  160,  158,  157,  156,  154,  153,  150,
759
 
      137,  135,  134,  129,  128,  127,  126,  125,  123,  118,
760
 
      117,  116,  115,  114,  112,  111,  110,  109,  108,  107,
761
 
      105,  104,  103,  101,  100,   99,   98,   97,   96,   95,
762
 
 
763
 
       92,   91,   90,   89,   87,   86,   85,   84,   83,   82,
764
 
       81,   80,   78,   77,   76,   75,   74,   73,   72,   71,
765
 
       70,   68,   50,   45,   34,   32,   30,   29,   24,   22,
766
 
       21,   19,   17,   16,   15,    9,    3,  548,  548,  548,
767
 
      548,  548,  548,  548,  548,  548,  548,  548,  548,  548,
768
 
      548,  548,  548,  548,  548,  548,  548,  548,  548,  548,
769
 
      548,  548,  548,  548,  548,  548,  548,  548,  548,  548,
770
 
      548,  548,  548,  548,  548,  548,  548,  548,  548,  548,
771
 
      548,  548,  548,  548,  548,  548,  548,  548,  548,  548,
772
 
      548,  548,  548,  548,  548,  548,  548
773
 
 
774
 
    } ;
775
 
 
776
 
static tao_yy_state_type tao_yy_last_accepting_state;
777
 
static char *tao_yy_last_accepting_cpos;
778
 
 
779
 
/* The intent behind this definition is that it'll catch
780
 
 * any uses of REJECT which flex missed.
781
 
 */
782
 
#define REJECT reject_used_but_not_detected
783
 
#define tao_yymore() tao_yymore_used_but_not_detected
784
 
#define TAO_YY_MORE_ADJ 0
785
 
#define TAO_YY_RESTORE_TAO_YY_MORE_OFFSET
786
 
#ifndef TAO_YYLMAX
787
 
#define TAO_YYLMAX 8192
788
 
#endif
789
 
 
790
 
char tao_yytext[TAO_YYLMAX];
791
 
char *tao_yytext_ptr;
792
 
#define INITIAL 0
793
 
/*  lex.yy.cpp,v 1.116 2004/01/07 02:53:51 parsons Exp
794
 
 
795
 
COPYRIGHT
796
 
 
797
 
Copyright 1992, 1993, 1994 Sun Microsystems, Inc.  Printed in the United
798
 
States of America.  All Rights Reserved.
799
 
 
800
 
This product is protected by copyright and distributed under the following
801
 
license restricting its use.
802
 
 
803
 
The Interface Definition Language Compiler Front End (CFE) is made
804
 
available for your use provided that you include this license and copyright
805
 
notice on all media and documentation and the software program in which
806
 
this product is incorporated in whole or part. You may copy and extend
807
 
functionality (but may not remove functionality) of the Interface
808
 
Definition Language CFE without charge, but you are not authorized to
809
 
license or distribute it to anyone else except as part of a product or
810
 
program developed by you or with the express written consent of Sun
811
 
Microsystems, Inc. ("Sun").
812
 
 
813
 
The names of Sun Microsystems, Inc. and any of its subsidiaries or
814
 
affiliates may not be used in advertising or publicity pertaining to
815
 
distribution of Interface Definition Language CFE as permitted herein.
816
 
 
817
 
This license is effective until terminated by Sun for failure to comply
818
 
with this license.  Upon termination, you shall destroy or return all code
819
 
and documentation for the Interface Definition Language CFE.
820
 
 
821
 
IDL_INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
822
 
IDL_ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
823
 
FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
824
 
DEALING, USAGE OR TRADE PRACTICE.
825
 
 
826
 
IDL_INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
827
 
IDL_ANY OBLIGATION ON THE PART OF Sun OR IDL_ANY OF ITS SUBSIDIARIES OR AFFILIATES
828
 
TO ASSIST IDL_IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
829
 
 
830
 
SUN OR IDL_ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
831
 
RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR IDL_ANY PATENTS BY
832
 
IDL_INTERFACE DEFINITION LANGUAGE CFE OR IDL_ANY PART THEREOF.
833
 
 
834
 
IDL_IN NO EVENT WILL SUN OR IDL_ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
835
 
IDL_ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
836
 
DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
837
 
 
838
 
Use, duplication, or disclosure by the government is subject to
839
 
restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
840
 
Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
841
 
52.227-19.
842
 
 
843
 
Sun, Sun Microsystems and the Sun logo are trademarks or registered
844
 
trademarks of Sun Microsystems, Inc.
845
 
 
846
 
SunSoft, Inc.
847
 
2550 Garcia Avenue
848
 
Mountain View, California  94043
849
 
 
850
 
NOTE:
851
 
 
852
 
SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
853
 
trademarks or registered trademarks of Sun Microsystems, Inc.
854
 
 
855
 
 */
856
 
 
857
 
/*
858
 
 * idl.ll - Lexical scanner for IDL 1.1
859
 
 */
860
 
 
861
 
#include "utl_strlist.h"
862
 
#include "utl_exprlist.h"
863
 
#include "utl_labellist.h"
864
 
#include "utl_decllist.h"
865
 
#include "utl_string.h"
866
 
#include "utl_err.h"
867
 
#include "ast_union_label.h"
868
 
#include "ast_field.h"
869
 
#include "ast_expression.h"
870
 
#include "ast_argument.h"
871
 
#include "ast_operation.h"
872
 
#include "ast_root.h"
873
 
#include "fe_interface_header.h"
874
 
#include "global_extern.h"
875
 
#include "fe_private.h"
876
 
#include "nr_extern.h"
877
 
#include "y.tab.h"
878
 
 
879
 
static char *           idl_wstring_escape_reader (char *);
880
 
static ACE_CDR::WChar   idl_wchar_escape_reader (char *);
881
 
static char             idl_escape_reader (char *);
882
 
static double           idl_atof (char *);
883
 
static long             idl_atoi (char *, long);
884
 
static ACE_UINT64       idl_atoui (char *, long);
885
 
static void             idl_parse_line_and_file (char *);
886
 
static void             idl_store_pragma (char *);
887
 
static char *           idl_get_pragma_string (char *);
888
 
static idl_bool         idl_valid_version (char *);
889
 
static AST_Decl *       idl_find_node (char *);
890
 
 
891
 
#if 0 /* defined (HPUX) */
892
 
// HPUX has tao_yytext typed to unsigned char *. We make sure here that
893
 
// we'll always use char * static char* __tao_yytext = (char*) tao_yytext;
894
 
// NOTE: This will not work under flex(1) were tao_yytext is not a fixed
895
 
// buffer, but a dynamically allocated one. This function should do
896
 
// the trick for us.
897
 
inline char *__tao_yytext()
898
 
{
899
 
  return (char *) tao_yytext;
900
 
}
901
 
#define ace_tao_yytext __tao_yytext()
902
 
#else
903
 
#define ace_tao_yytext tao_yytext
904
 
#endif /* 0 */
905
 
 
906
 
/* SO we don't choke on files that use \r\n */
907
 
#define TAO_YY_NEVER_INTERACTIVE 1
908
 
 
909
 
/* Macros after this point can all be overridden by user definitions in
910
 
 * section 1.
911
 
 */
912
 
 
913
 
#ifndef TAO_YY_SKIP_TAO_YYWRAP
914
 
#ifdef __cplusplus
915
 
extern "C" int tao_yywrap TAO_YY_PROTO(( void ));
916
 
#else
917
 
extern int tao_yywrap TAO_YY_PROTO(( void ));
918
 
#endif
919
 
#endif
920
 
 
921
 
#ifndef TAO_YY_NO_UNPUT
922
 
static void tao_yyunput TAO_YY_PROTO(( int c, char *buf_ptr ));
923
 
#endif
924
 
 
925
 
#ifndef tao_yytext_ptr
926
 
static void tao_yy_flex_strncpy TAO_YY_PROTO(( char *, tao_yyconst char *, int ));
927
 
#endif
928
 
 
929
 
#ifdef TAO_YY_NEED_STRLEN
930
 
static int tao_yy_flex_strlen TAO_YY_PROTO(( tao_yyconst char * ));
931
 
#endif
932
 
 
933
 
#ifndef TAO_YY_NO_INPUT
934
 
#ifdef __cplusplus
935
 
static int tao_yyinput TAO_YY_PROTO(( void ));
936
 
#else
937
 
static int input TAO_YY_PROTO(( void ));
938
 
#endif
939
 
#endif
940
 
 
941
 
#ifdef TAO_YY_STACK_USED
942
 
static int tao_yy_start_stack_ptr = 0;
943
 
static int tao_yy_start_stack_depth = 0;
944
 
static int *tao_yy_start_stack = 0;
945
 
#ifndef TAO_YY_NO_PUSH_STATE
946
 
static void tao_yy_push_state TAO_YY_PROTO(( int new_state ));
947
 
#endif
948
 
#ifndef TAO_YY_NO_POP_STATE
949
 
static void tao_yy_pop_state TAO_YY_PROTO(( void ));
950
 
#endif
951
 
#ifndef TAO_YY_NO_TOP_STATE
952
 
static int tao_yy_top_state TAO_YY_PROTO(( void ));
953
 
#endif
954
 
 
955
 
#else
956
 
#define TAO_YY_NO_PUSH_STATE 1
957
 
#define TAO_YY_NO_POP_STATE 1
958
 
#define TAO_YY_NO_TOP_STATE 1
959
 
#endif
960
 
 
961
 
#ifdef TAO_YY_MALLOC_DECL
962
 
TAO_YY_MALLOC_DECL
963
 
#else
964
 
#ifdef __STDC__
965
 
#ifndef __cplusplus
966
 
#endif
967
 
#else
968
 
/* Just try to get by without declaring the routines.  This will fail
969
 
 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
970
 
 * or sizeof(void*) != sizeof(int).
971
 
 */
972
 
#endif
973
 
#endif
974
 
 
975
 
/* Amount of stuff to slurp up with each read. */
976
 
#ifndef TAO_YY_READ_BUF_SIZE
977
 
#define TAO_YY_READ_BUF_SIZE 8192
978
 
#endif
979
 
 
980
 
/* Copy whatever the last rule matched to the standard output. */
981
 
 
982
 
#ifndef TAO_YY_ECHO
983
 
/* This used to be an fputs(), but since the string might contain NUL's,
984
 
 * we now use fwrite().
985
 
 */
986
 
#define TAO_YY_ECHO (void) fwrite( tao_yytext, tao_yyleng, 1, tao_yyout )
987
 
#endif
988
 
 
989
 
/* Gets input and stuffs it into "buf".  number of characters read, or TAO_YY_NULL,
990
 
 * is returned in "result".
991
 
 */
992
 
#ifndef TAO_YY_INPUT
993
 
#define TAO_YY_INPUT(buf,result,max_size) \
994
 
        if ( tao_yy_current_buffer->tao_yy_is_interactive ) \
995
 
                { \
996
 
                int c = '*', n; \
997
 
                for ( n = 0; n < max_size && \
998
 
                             (c = getc( tao_yyin )) != EOF && c != '\n'; ++n ) \
999
 
                        buf[n] = (char) c; \
1000
 
                if ( c == '\n' ) \
1001
 
                        buf[n++] = (char) c; \
1002
 
                if ( c == EOF && ferror( tao_yyin ) ) \
1003
 
                        TAO_YY_FATAL_ERROR( "input in flex scanner failed" ); \
1004
 
                result = n; \
1005
 
                } \
1006
 
        else if ( ((result = ACE_static_cast (int, \
1007
 
                                  fread( buf, 1, max_size, tao_yyin ))) == 0) \
1008
 
                  && ferror( tao_yyin ) ) \
1009
 
                TAO_YY_FATAL_ERROR( "input in flex scanner failed" );
1010
 
#endif
1011
 
 
1012
 
/* No semi-colon after return; correct usage is to write "tao_yyterminate();" -
1013
 
 * we don't want an extra ';' after the "return" because that will cause
1014
 
 * some compilers to complain about unreachable statements.
1015
 
 */
1016
 
#ifndef tao_yyterminate
1017
 
#define tao_yyterminate() return TAO_YY_NULL
1018
 
#endif
1019
 
 
1020
 
/* Number of entries by which start-condition stack grows. */
1021
 
#ifndef TAO_YY_START_STACK_INCR
1022
 
#define TAO_YY_START_STACK_INCR 25
1023
 
#endif
1024
 
 
1025
 
/* Report a fatal error. */
1026
 
#ifndef TAO_YY_FATAL_ERROR
1027
 
#define TAO_YY_FATAL_ERROR(msg) tao_yy_fatal_error( msg )
1028
 
#endif
1029
 
 
1030
 
/* Default declaration of generated scanner - a define so the user can
1031
 
 * easily add parameters.
1032
 
 */
1033
 
#ifndef TAO_YY_DECL
1034
 
#define TAO_YY_DECL int tao_yylex TAO_YY_PROTO(( void ))
1035
 
#endif
1036
 
 
1037
 
/* Code executed at the beginning of each rule, after tao_yytext and tao_yyleng
1038
 
 * have been set up.
1039
 
 */
1040
 
#ifndef TAO_YY_USER_ACTION
1041
 
#define TAO_YY_USER_ACTION
1042
 
#endif
1043
 
 
1044
 
/* Code executed at the end of each rule. */
1045
 
#ifndef TAO_YY_BREAK
1046
 
#define TAO_YY_BREAK ACE_NOTREACHED (break;)
1047
 
#endif
1048
 
 
1049
 
#define TAO_YY_RULE_SETUP \
1050
 
        if ( tao_yyleng > 0 ) \
1051
 
                tao_yy_current_buffer->tao_yy_at_bol = \
1052
 
                                (tao_yytext[tao_yyleng - 1] == '\n'); \
1053
 
        TAO_YY_USER_ACTION
1054
 
 
1055
 
TAO_YY_DECL
1056
 
        {
1057
 
        register tao_yy_state_type tao_yy_current_state;
1058
 
        register char *tao_yy_cp = 0, *tao_yy_bp = 0;
1059
 
        register int tao_yy_act;
1060
 
 
1061
 
 
1062
 
 
1063
 
 
1064
 
        if ( tao_yy_init )
1065
 
                {
1066
 
                tao_yy_init = 0;
1067
 
 
1068
 
#ifdef TAO_YY_USER_INIT
1069
 
                TAO_YY_USER_INIT;
1070
 
#endif
1071
 
 
1072
 
                if ( ! tao_yy_start )
1073
 
                        tao_yy_start = 1;       /* first start state */
1074
 
 
1075
 
                if ( ! tao_yyin )
1076
 
                        tao_yyin = stdin;
1077
 
 
1078
 
                if ( ! tao_yyout )
1079
 
                        tao_yyout = stdout;
1080
 
 
1081
 
                if ( ! tao_yy_current_buffer )
1082
 
                        tao_yy_current_buffer =
1083
 
                                tao_yy_create_buffer( tao_yyin, TAO_YY_BUF_SIZE );
1084
 
 
1085
 
                tao_yy_load_buffer_state();
1086
 
                }
1087
 
 
1088
 
        while ( 1 )             /* loops until end-of-file is reached */
1089
 
                {
1090
 
                tao_yy_cp = tao_yy_c_buf_p;
1091
 
 
1092
 
                /* Support of tao_yytext. */
1093
 
                *tao_yy_cp = tao_yy_hold_char;
1094
 
 
1095
 
                /* tao_yy_bp points to the position in tao_yy_ch_buf of the start of
1096
 
                 * the current run.
1097
 
                 */
1098
 
                tao_yy_bp = tao_yy_cp;
1099
 
 
1100
 
                tao_yy_current_state = tao_yy_start;
1101
 
                tao_yy_current_state += TAO_YY_AT_BOL();
1102
 
tao_yy_match:
1103
 
                do
1104
 
                        {
1105
 
                        register TAO_YY_CHAR tao_yy_c = tao_yy_ec[TAO_YY_SC_TO_UI(*tao_yy_cp)];
1106
 
                        if ( tao_yy_accept[tao_yy_current_state] )
1107
 
                                {
1108
 
                                tao_yy_last_accepting_state = tao_yy_current_state;
1109
 
                                tao_yy_last_accepting_cpos = tao_yy_cp;
1110
 
                                }
1111
 
                        while ( tao_yy_chk[tao_yy_base[tao_yy_current_state] + tao_yy_c] != tao_yy_current_state )
1112
 
                                {
1113
 
                                tao_yy_current_state = (int) tao_yy_def[tao_yy_current_state];
1114
 
                                if ( tao_yy_current_state >= 549 )
1115
 
                                        tao_yy_c = tao_yy_meta[(unsigned int) tao_yy_c];
1116
 
                                }
1117
 
                        tao_yy_current_state = tao_yy_nxt[tao_yy_base[tao_yy_current_state] + (unsigned int) tao_yy_c];
1118
 
                        ++tao_yy_cp;
1119
 
                        }
1120
 
                while ( tao_yy_base[tao_yy_current_state] != 1038 );
1121
 
 
1122
 
tao_yy_find_action:
1123
 
                tao_yy_act = tao_yy_accept[tao_yy_current_state];
1124
 
                if ( tao_yy_act == 0 )
1125
 
                        { /* have to back up */
1126
 
                        tao_yy_cp = tao_yy_last_accepting_cpos;
1127
 
                        tao_yy_current_state = tao_yy_last_accepting_state;
1128
 
                        tao_yy_act = tao_yy_accept[tao_yy_current_state];
1129
 
                        }
1130
 
 
1131
 
                TAO_YY_DO_BEFORE_ACTION;
1132
 
 
1133
 
 
1134
 
do_action:      /* This label is used only to access EOF actions. */
1135
 
 
1136
 
 
1137
 
                switch ( tao_yy_act )
1138
 
        { /* beginning of action switch */
1139
 
                        case 0: /* must back up */
1140
 
                        /* undo the effects of TAO_YY_DO_BEFORE_ACTION */
1141
 
                        *tao_yy_cp = tao_yy_hold_char;
1142
 
                        tao_yy_cp = tao_yy_last_accepting_cpos;
1143
 
                        tao_yy_current_state = tao_yy_last_accepting_state;
1144
 
                        goto tao_yy_find_action;
1145
 
 
1146
 
case 1:
1147
 
TAO_YY_RULE_SETUP
1148
 
return IDL_ANY;
1149
 
        TAO_YY_BREAK
1150
 
case 2:
1151
 
TAO_YY_RULE_SETUP
1152
 
return IDL_OBJECT;
1153
 
        TAO_YY_BREAK
1154
 
case 3:
1155
 
TAO_YY_RULE_SETUP
1156
 
return IDL_MODULE;
1157
 
        TAO_YY_BREAK
1158
 
case 4:
1159
 
TAO_YY_RULE_SETUP
1160
 
return IDL_RAISES;
1161
 
        TAO_YY_BREAK
1162
 
case 5:
1163
 
TAO_YY_RULE_SETUP
1164
 
return IDL_READONLY;
1165
 
        TAO_YY_BREAK
1166
 
case 6:
1167
 
TAO_YY_RULE_SETUP
1168
 
return IDL_ATTRIBUTE;
1169
 
        TAO_YY_BREAK
1170
 
case 7:
1171
 
TAO_YY_RULE_SETUP
1172
 
return IDL_EXCEPTION;
1173
 
        TAO_YY_BREAK
1174
 
case 8:
1175
 
TAO_YY_RULE_SETUP
1176
 
return IDL_CONTEXT;
1177
 
        TAO_YY_BREAK
1178
 
case 9:
1179
 
TAO_YY_RULE_SETUP
1180
 
return IDL_INTERFACE;
1181
 
        TAO_YY_BREAK
1182
 
case 10:
1183
 
TAO_YY_RULE_SETUP
1184
 
return IDL_CONST;
1185
 
        TAO_YY_BREAK
1186
 
case 11:
1187
 
TAO_YY_RULE_SETUP
1188
 
return IDL_TYPEDEF;
1189
 
        TAO_YY_BREAK
1190
 
case 12:
1191
 
TAO_YY_RULE_SETUP
1192
 
return IDL_STRUCT;
1193
 
        TAO_YY_BREAK
1194
 
case 13:
1195
 
TAO_YY_RULE_SETUP
1196
 
return IDL_ENUM;
1197
 
        TAO_YY_BREAK
1198
 
case 14:
1199
 
TAO_YY_RULE_SETUP
1200
 
return IDL_STRING;
1201
 
        TAO_YY_BREAK
1202
 
case 15:
1203
 
TAO_YY_RULE_SETUP
1204
 
return IDL_WSTRING;
1205
 
        TAO_YY_BREAK
1206
 
case 16:
1207
 
TAO_YY_RULE_SETUP
1208
 
return IDL_SEQUENCE;
1209
 
        TAO_YY_BREAK
1210
 
case 17:
1211
 
TAO_YY_RULE_SETUP
1212
 
return IDL_UNION;
1213
 
        TAO_YY_BREAK
1214
 
case 18:
1215
 
TAO_YY_RULE_SETUP
1216
 
return IDL_FIXED;
1217
 
        TAO_YY_BREAK
1218
 
case 19:
1219
 
TAO_YY_RULE_SETUP
1220
 
return IDL_SWITCH;
1221
 
        TAO_YY_BREAK
1222
 
case 20:
1223
 
TAO_YY_RULE_SETUP
1224
 
return IDL_CASE;
1225
 
        TAO_YY_BREAK
1226
 
case 21:
1227
 
TAO_YY_RULE_SETUP
1228
 
return IDL_DEFAULT;
1229
 
        TAO_YY_BREAK
1230
 
case 22:
1231
 
TAO_YY_RULE_SETUP
1232
 
return IDL_FLOAT;
1233
 
        TAO_YY_BREAK
1234
 
case 23:
1235
 
TAO_YY_RULE_SETUP
1236
 
return IDL_DOUBLE;
1237
 
        TAO_YY_BREAK
1238
 
case 24:
1239
 
TAO_YY_RULE_SETUP
1240
 
return IDL_LONG;
1241
 
        TAO_YY_BREAK
1242
 
case 25:
1243
 
TAO_YY_RULE_SETUP
1244
 
return IDL_SHORT;
1245
 
        TAO_YY_BREAK
1246
 
case 26:
1247
 
TAO_YY_RULE_SETUP
1248
 
return IDL_UNSIGNED;
1249
 
        TAO_YY_BREAK
1250
 
case 27:
1251
 
TAO_YY_RULE_SETUP
1252
 
return IDL_CHAR;
1253
 
        TAO_YY_BREAK
1254
 
case 28:
1255
 
TAO_YY_RULE_SETUP
1256
 
return IDL_WCHAR;
1257
 
        TAO_YY_BREAK
1258
 
case 29:
1259
 
TAO_YY_RULE_SETUP
1260
 
return IDL_BOOLEAN;
1261
 
        TAO_YY_BREAK
1262
 
case 30:
1263
 
TAO_YY_RULE_SETUP
1264
 
return IDL_OCTET;
1265
 
        TAO_YY_BREAK
1266
 
case 31:
1267
 
TAO_YY_RULE_SETUP
1268
 
return IDL_VOID;
1269
 
        TAO_YY_BREAK
1270
 
case 32:
1271
 
TAO_YY_RULE_SETUP
1272
 
return IDL_NATIVE;
1273
 
        TAO_YY_BREAK
1274
 
case 33:
1275
 
TAO_YY_RULE_SETUP
1276
 
return IDL_LOCAL;
1277
 
        TAO_YY_BREAK
1278
 
case 34:
1279
 
TAO_YY_RULE_SETUP
1280
 
return IDL_ABSTRACT;
1281
 
        TAO_YY_BREAK
1282
 
case 35:
1283
 
TAO_YY_RULE_SETUP
1284
 
return IDL_CUSTOM;
1285
 
        TAO_YY_BREAK
1286
 
case 36:
1287
 
TAO_YY_RULE_SETUP
1288
 
return IDL_FACTORY;
1289
 
        TAO_YY_BREAK
1290
 
case 37:
1291
 
TAO_YY_RULE_SETUP
1292
 
return IDL_PRIVATE;
1293
 
        TAO_YY_BREAK
1294
 
case 38:
1295
 
TAO_YY_RULE_SETUP
1296
 
return IDL_PUBLIC;
1297
 
        TAO_YY_BREAK
1298
 
case 39:
1299
 
TAO_YY_RULE_SETUP
1300
 
return IDL_SUPPORTS;
1301
 
        TAO_YY_BREAK
1302
 
case 40:
1303
 
TAO_YY_RULE_SETUP
1304
 
return IDL_TRUNCATABLE;
1305
 
        TAO_YY_BREAK
1306
 
case 41:
1307
 
TAO_YY_RULE_SETUP
1308
 
return IDL_VALUETYPE;
1309
 
        TAO_YY_BREAK
1310
 
case 42:
1311
 
TAO_YY_RULE_SETUP
1312
 
return IDL_COMPONENT;
1313
 
        TAO_YY_BREAK
1314
 
case 43:
1315
 
TAO_YY_RULE_SETUP
1316
 
return IDL_CONSUMES;
1317
 
        TAO_YY_BREAK
1318
 
case 44:
1319
 
TAO_YY_RULE_SETUP
1320
 
return IDL_EMITS;
1321
 
        TAO_YY_BREAK
1322
 
case 45:
1323
 
TAO_YY_RULE_SETUP
1324
 
return IDL_EVENTTYPE;
1325
 
        TAO_YY_BREAK
1326
 
case 46:
1327
 
TAO_YY_RULE_SETUP
1328
 
return IDL_FINDER;
1329
 
        TAO_YY_BREAK
1330
 
case 47:
1331
 
TAO_YY_RULE_SETUP
1332
 
return IDL_GETRAISES;
1333
 
        TAO_YY_BREAK
1334
 
case 48:
1335
 
TAO_YY_RULE_SETUP
1336
 
return IDL_HOME;
1337
 
        TAO_YY_BREAK
1338
 
case 49:
1339
 
TAO_YY_RULE_SETUP
1340
 
return IDL_IMPORT;
1341
 
        TAO_YY_BREAK
1342
 
case 50:
1343
 
TAO_YY_RULE_SETUP
1344
 
return IDL_MULTIPLE;
1345
 
        TAO_YY_BREAK
1346
 
case 51:
1347
 
TAO_YY_RULE_SETUP
1348
 
return IDL_PRIMARYKEY;
1349
 
        TAO_YY_BREAK
1350
 
case 52:
1351
 
TAO_YY_RULE_SETUP
1352
 
return IDL_PROVIDES;
1353
 
        TAO_YY_BREAK
1354
 
case 53:
1355
 
TAO_YY_RULE_SETUP
1356
 
return IDL_PUBLISHES;
1357
 
        TAO_YY_BREAK
1358
 
case 54:
1359
 
TAO_YY_RULE_SETUP
1360
 
return IDL_SETRAISES;
1361
 
        TAO_YY_BREAK
1362
 
case 55:
1363
 
TAO_YY_RULE_SETUP
1364
 
return IDL_TYPEID;
1365
 
        TAO_YY_BREAK
1366
 
case 56:
1367
 
TAO_YY_RULE_SETUP
1368
 
return IDL_TYPEPREFIX;
1369
 
        TAO_YY_BREAK
1370
 
case 57:
1371
 
TAO_YY_RULE_SETUP
1372
 
return IDL_USES;
1373
 
        TAO_YY_BREAK
1374
 
case 58:
1375
 
TAO_YY_RULE_SETUP
1376
 
return IDL_MANAGES;
1377
 
        TAO_YY_BREAK
1378
 
case 59:
1379
 
TAO_YY_RULE_SETUP
1380
 
return IDL_TRUETOK;
1381
 
        TAO_YY_BREAK
1382
 
case 60:
1383
 
TAO_YY_RULE_SETUP
1384
 
return IDL_FALSETOK;
1385
 
        TAO_YY_BREAK
1386
 
case 61:
1387
 
TAO_YY_RULE_SETUP
1388
 
return IDL_INOUT;
1389
 
        TAO_YY_BREAK
1390
 
case 62:
1391
 
TAO_YY_RULE_SETUP
1392
 
return IDL_IN;
1393
 
        TAO_YY_BREAK
1394
 
case 63:
1395
 
TAO_YY_RULE_SETUP
1396
 
return IDL_OUT;
1397
 
        TAO_YY_BREAK
1398
 
case 64:
1399
 
TAO_YY_RULE_SETUP
1400
 
return IDL_ONEWAY;
1401
 
        TAO_YY_BREAK
1402
 
case 65:
1403
 
TAO_YY_RULE_SETUP
1404
 
return IDL_LEFT_SHIFT;
1405
 
        TAO_YY_BREAK
1406
 
case 66:
1407
 
TAO_YY_RULE_SETUP
1408
 
return IDL_RIGHT_SHIFT;
1409
 
        TAO_YY_BREAK
1410
 
case 67:
1411
 
TAO_YY_RULE_SETUP
1412
 
{
1413
 
                  tao_yylval.strval = (char *) "::";
1414
 
                  return IDL_SCOPE_DELIMITOR;
1415
 
                }
1416
 
        TAO_YY_BREAK
1417
 
case 68:
1418
 
TAO_YY_RULE_SETUP
1419
 
{
1420
 
  // Make sure that this identifier is not a C++ keyword. If it is,
1421
 
  // prepend it with a _cxx_. Lookup in the perfect hash table for C++
1422
 
  // keyword and grab the mapping.  BTW, the reason for the odd
1423
 
  // regular expression is to handle EBCDIC, as well as ASCII.
1424
 
 
1425
 
  TAO_IDL_CPP_Keyword_Table cpp_key_tbl;
1426
 
  const TAO_IDL_CPP_Keyword_Entry *entry = 0;
1427
 
 
1428
 
  if (!idl_global->preserve_cpp_keywords())
1429
 
    {
1430
 
      // This check will ensure that escaped C++ keywords will be
1431
 
      // caught and prepended with '_cxx' as non-escaped keywords
1432
 
      // are now prepended with '_cxx_'.
1433
 
      const char *tmp = 
1434
 
        ace_tao_yytext[0] == '_' ? ace_tao_yytext + 1 : ace_tao_yytext;
1435
 
 
1436
 
      entry = 
1437
 
        cpp_key_tbl.lookup (tmp,
1438
 
                            ACE_static_cast (unsigned int,
1439
 
                                             ACE_OS::strlen (tmp)));
1440
 
    }
1441
 
 
1442
 
  if (entry)
1443
 
    {
1444
 
      tao_yylval.strval = ACE_OS::strdup (entry->mapping_);
1445
 
    }
1446
 
  else
1447
 
    {
1448
 
      tao_yylval.strval = ACE_OS::strdup (ace_tao_yytext);
1449
 
    }
1450
 
 
1451
 
  return IDENTIFIER;
1452
 
}
1453
 
        TAO_YY_BREAK
1454
 
case 69:
1455
 
TAO_YY_RULE_SETUP
1456
 
{
1457
 
                  tao_yylval.dval = idl_atof(ace_tao_yytext);
1458
 
                  return IDL_FLOATING_PT_LITERAL;
1459
 
                }
1460
 
        TAO_YY_BREAK
1461
 
case 70:
1462
 
TAO_YY_RULE_SETUP
1463
 
{
1464
 
                  tao_yylval.dval = idl_atof(ace_tao_yytext);
1465
 
                  return IDL_FLOATING_PT_LITERAL;
1466
 
                }
1467
 
        TAO_YY_BREAK
1468
 
case 71:
1469
 
TAO_YY_RULE_SETUP
1470
 
{
1471
 
                  tao_yylval.ival = idl_atoi(ace_tao_yytext, 10);
1472
 
                  return IDL_INTEGER_LITERAL;
1473
 
                }
1474
 
        TAO_YY_BREAK
1475
 
case 72:
1476
 
TAO_YY_RULE_SETUP
1477
 
{
1478
 
                  tao_yylval.uival = idl_atoui(ace_tao_yytext, 10);
1479
 
                  return IDL_UINTEGER_LITERAL;
1480
 
                }
1481
 
        TAO_YY_BREAK
1482
 
case 73:
1483
 
TAO_YY_RULE_SETUP
1484
 
{
1485
 
                  tao_yylval.ival = idl_atoi(ace_tao_yytext, 16);
1486
 
                  return IDL_INTEGER_LITERAL;
1487
 
                }
1488
 
        TAO_YY_BREAK
1489
 
case 74:
1490
 
TAO_YY_RULE_SETUP
1491
 
{
1492
 
                  tao_yylval.uival = idl_atoui(ace_tao_yytext, 16);
1493
 
                  return IDL_UINTEGER_LITERAL;
1494
 
                }
1495
 
        TAO_YY_BREAK
1496
 
case 75:
1497
 
TAO_YY_RULE_SETUP
1498
 
{
1499
 
                  tao_yylval.ival = idl_atoi(ace_tao_yytext, 8);
1500
 
                  return IDL_INTEGER_LITERAL;
1501
 
                }
1502
 
        TAO_YY_BREAK
1503
 
case 76:
1504
 
TAO_YY_RULE_SETUP
1505
 
{
1506
 
                  tao_yylval.uival = idl_atoui(ace_tao_yytext, 8);
1507
 
                  return IDL_UINTEGER_LITERAL;
1508
 
                }
1509
 
        TAO_YY_BREAK
1510
 
case 77:
1511
 
TAO_YY_RULE_SETUP
1512
 
{
1513
 
                  /* Skip the quotes */
1514
 
                  char *tmp = ace_tao_yytext;
1515
 
                  for(int i = strlen(tmp) - 1; i >= 0; --i) {
1516
 
                    if (isspace(tmp[i])) {
1517
 
                      tmp[i] = '\0';
1518
 
                    }
1519
 
                    else {
1520
 
                      break;
1521
 
                    }
1522
 
                  }
1523
 
                  tmp[strlen (tmp) - 1] = '\0';
1524
 
                  ACE_NEW_RETURN (tao_yylval.sval,
1525
 
                                  UTL_String (tmp + 1),
1526
 
                                  IDL_STRING_LITERAL);
1527
 
                  return IDL_STRING_LITERAL;
1528
 
                }
1529
 
        TAO_YY_BREAK
1530
 
case 78:
1531
 
TAO_YY_RULE_SETUP
1532
 
{
1533
 
                  /* Skip the bookends */
1534
 
                  char *tmp = ACE_OS::strdup (ace_tao_yytext);
1535
 
                  tmp[strlen (tmp) - 1] = '\0';
1536
 
                  tao_yylval.wsval = idl_wstring_escape_reader(tmp + 2);
1537
 
                  return IDL_WSTRING_LITERAL;
1538
 
                }
1539
 
        TAO_YY_BREAK
1540
 
case 79:
1541
 
TAO_YY_RULE_SETUP
1542
 
{
1543
 
                  tao_yylval.cval = ace_tao_yytext [1];
1544
 
                  return IDL_CHARACTER_LITERAL;
1545
 
                }
1546
 
        TAO_YY_BREAK
1547
 
case 80:
1548
 
TAO_YY_RULE_SETUP
1549
 
{
1550
 
                  // octal character constant
1551
 
                  tao_yylval.cval = idl_escape_reader(ace_tao_yytext + 1);
1552
 
                  return IDL_CHARACTER_LITERAL;
1553
 
                }
1554
 
        TAO_YY_BREAK
1555
 
case 81:
1556
 
TAO_YY_RULE_SETUP
1557
 
{
1558
 
                  // hexadecimal character constant
1559
 
                  tao_yylval.cval = idl_escape_reader(ace_tao_yytext + 1);
1560
 
                  return IDL_CHARACTER_LITERAL;
1561
 
                }
1562
 
        TAO_YY_BREAK
1563
 
case 82:
1564
 
TAO_YY_RULE_SETUP
1565
 
{
1566
 
                  tao_yylval.cval = idl_escape_reader(ace_tao_yytext + 1);
1567
 
                  return IDL_CHARACTER_LITERAL;
1568
 
                }
1569
 
        TAO_YY_BREAK
1570
 
case 83:
1571
 
TAO_YY_RULE_SETUP
1572
 
{
1573
 
                  // wide character constant
1574
 
                  tao_yylval.wcval = ace_tao_yytext [2];
1575
 
                  return IDL_WCHAR_LITERAL;
1576
 
                }
1577
 
        TAO_YY_BREAK
1578
 
case 84:
1579
 
TAO_YY_RULE_SETUP
1580
 
{
1581
 
                  // hexadecimal wide character constant
1582
 
                  tao_yylval.wcval = idl_wchar_escape_reader(ace_tao_yytext + 2);
1583
 
                  return IDL_WCHAR_LITERAL;
1584
 
                }
1585
 
        TAO_YY_BREAK
1586
 
case 85:
1587
 
case 86:
1588
 
TAO_YY_RULE_SETUP
1589
 
{/* remember pragma */
1590
 
                  idl_global->set_lineno(idl_global->lineno() + 1);
1591
 
                  idl_store_pragma(ace_tao_yytext);
1592
 
                }
1593
 
        break;
1594
 
case 87:
1595
 
case 88:
1596
 
TAO_YY_RULE_SETUP
1597
 
{/* ignore file */
1598
 
                  idl_global->set_lineno(idl_global->lineno() + 1);
1599
 
                }
1600
 
        break;
1601
 
case 89:
1602
 
case 90:
1603
 
TAO_YY_RULE_SETUP
1604
 
{
1605
 
                  idl_parse_line_and_file(ace_tao_yytext);
1606
 
                }
1607
 
        break;
1608
 
case 91:
1609
 
case 92:
1610
 
TAO_YY_RULE_SETUP
1611
 
{
1612
 
                  idl_parse_line_and_file(ace_tao_yytext);
1613
 
                }
1614
 
        break;
1615
 
case 93:
1616
 
case 94:
1617
 
TAO_YY_RULE_SETUP
1618
 
{
1619
 
                  idl_parse_line_and_file(ace_tao_yytext);
1620
 
                }
1621
 
        break;
1622
 
case 95:
1623
 
case 96:
1624
 
TAO_YY_RULE_SETUP
1625
 
{
1626
 
                  idl_parse_line_and_file(ace_tao_yytext);
1627
 
                }
1628
 
        break;
1629
 
case 97:
1630
 
case 98:
1631
 
TAO_YY_RULE_SETUP
1632
 
{
1633
 
                  /* ignore cpp ident */
1634
 
                  idl_global->set_lineno(idl_global->lineno() + 1);
1635
 
                }
1636
 
        break;
1637
 
case 99:
1638
 
TAO_YY_RULE_SETUP
1639
 
{
1640
 
                  /* ignore comments */
1641
 
                  idl_global->set_lineno(idl_global->lineno() + 1);
1642
 
                }
1643
 
        break;
1644
 
case 100:
1645
 
TAO_YY_RULE_SETUP
1646
 
{
1647
 
                  for(;;) {
1648
 
                    char c = tao_yyinput();
1649
 
                    if (c == '*') {
1650
 
                      char next = tao_yyinput();
1651
 
                      if (next == '/')
1652
 
                        break;
1653
 
                      else
1654
 
                        tao_yyunput(c, NULL);
1655
 
                      if (c == '\n')
1656
 
                        idl_global->set_lineno(idl_global->lineno() + 1);
1657
 
                    }
1658
 
                  }
1659
 
                }
1660
 
        break;
1661
 
case 101:
1662
 
TAO_YY_RULE_SETUP
1663
 
;
1664
 
        break;
1665
 
case 102:
1666
 
TAO_YY_RULE_SETUP
1667
 
{
1668
 
                  idl_global->set_lineno(idl_global->lineno() + 1);
1669
 
                }
1670
 
        break;
1671
 
case 103:
1672
 
TAO_YY_RULE_SETUP
1673
 
return ace_tao_yytext [0];
1674
 
        break;
1675
 
case 104:
1676
 
TAO_YY_RULE_SETUP
1677
 
TAO_YY_ECHO;
1678
 
        break;
1679
 
case TAO_YY_STATE_EOF(INITIAL):
1680
 
        tao_yyterminate();
1681
 
 
1682
 
        case TAO_YY_END_OF_BUFFER:
1683
 
                {
1684
 
                /* Amount of text matched not including the EOB char. */
1685
 
                int tao_yy_amount_of_matched_text = (int) (tao_yy_cp - tao_yytext_ptr) - 1;
1686
 
 
1687
 
                /* Undo the effects of TAO_YY_DO_BEFORE_ACTION. */
1688
 
                *tao_yy_cp = tao_yy_hold_char;
1689
 
                TAO_YY_RESTORE_TAO_YY_MORE_OFFSET
1690
 
 
1691
 
                if ( tao_yy_current_buffer->tao_yy_buffer_status == TAO_YY_BUFFER_NEW )
1692
 
                        {
1693
 
                        /* We're scanning a new file or input source.  It's
1694
 
                         * possible that this happened because the user
1695
 
                         * just pointed tao_yyin at a new source and called
1696
 
                         * tao_yylex().  If so, then we have to assure
1697
 
                         * consistency between tao_yy_current_buffer and our
1698
 
                         * globals.  Here is the right place to do so, because
1699
 
                         * this is the first action (other than possibly a
1700
 
                         * back-up) that will match for the new input source.
1701
 
                         */
1702
 
                        tao_yy_n_chars = tao_yy_current_buffer->tao_yy_n_chars;
1703
 
                        tao_yy_current_buffer->tao_yy_input_file = tao_yyin;
1704
 
                        tao_yy_current_buffer->tao_yy_buffer_status = TAO_YY_BUFFER_NORMAL;
1705
 
                        }
1706
 
 
1707
 
                /* Note that here we test for tao_yy_c_buf_p "<=" to the position
1708
 
                 * of the first EOB in the buffer, since tao_yy_c_buf_p will
1709
 
                 * already have been incremented past the NUL character
1710
 
                 * (since all states make transitions on EOB to the
1711
 
                 * end-of-buffer state).  Contrast this with the test
1712
 
                 * in input().
1713
 
                 */
1714
 
                if ( tao_yy_c_buf_p <= &tao_yy_current_buffer->tao_yy_ch_buf[tao_yy_n_chars] )
1715
 
                        { /* This was really a NUL. */
1716
 
                        tao_yy_state_type tao_yy_next_state;
1717
 
 
1718
 
                        tao_yy_c_buf_p = tao_yytext_ptr + tao_yy_amount_of_matched_text;
1719
 
 
1720
 
                        tao_yy_current_state = tao_yy_get_previous_state();
1721
 
 
1722
 
                        /* Okay, we're now positioned to make the NUL
1723
 
                         * transition.  We couldn't have
1724
 
                         * tao_yy_get_previous_state() go ahead and do it
1725
 
                         * for us because it doesn't know how to deal
1726
 
                         * with the possibility of jamming (and we don't
1727
 
                         * want to build jamming into it because then it
1728
 
                         * will run more slowly).
1729
 
                         */
1730
 
 
1731
 
                        tao_yy_next_state = tao_yy_try_NUL_trans( tao_yy_current_state );
1732
 
 
1733
 
                        tao_yy_bp = tao_yytext_ptr + TAO_YY_MORE_ADJ;
1734
 
 
1735
 
                        if ( tao_yy_next_state )
1736
 
                                {
1737
 
                                /* Consume the NUL. */
1738
 
                                tao_yy_cp = ++tao_yy_c_buf_p;
1739
 
                                tao_yy_current_state = tao_yy_next_state;
1740
 
                                goto tao_yy_match;
1741
 
                                }
1742
 
 
1743
 
                        else
1744
 
                                {
1745
 
                                tao_yy_cp = tao_yy_c_buf_p;
1746
 
                                goto tao_yy_find_action;
1747
 
                                }
1748
 
                        }
1749
 
 
1750
 
                else switch ( tao_yy_get_next_buffer() )
1751
 
                        {
1752
 
                        case EOB_ACT_END_OF_FILE:
1753
 
                                {
1754
 
                                tao_yy_did_buffer_switch_on_eof = 0;
1755
 
 
1756
 
                                if ( tao_yywrap() )
1757
 
                                        {
1758
 
                                        /* Note: because we've taken care in
1759
 
                                         * tao_yy_get_next_buffer() to have set up
1760
 
                                         * tao_yytext, we can now set up
1761
 
                                         * tao_yy_c_buf_p so that if some total
1762
 
                                         * hoser (like flex itself) wants to
1763
 
                                         * call the scanner after we return the
1764
 
                                         * TAO_YY_NULL, it'll still work - another
1765
 
                                         * TAO_YY_NULL will get returned.
1766
 
                                         */
1767
 
                                        tao_yy_c_buf_p = tao_yytext_ptr + TAO_YY_MORE_ADJ;
1768
 
 
1769
 
                                        tao_yy_act = TAO_YY_STATE_EOF(TAO_YY_START);
1770
 
                                        goto do_action;
1771
 
                                        }
1772
 
 
1773
 
                                else
1774
 
                                        {
1775
 
                                        if ( ! tao_yy_did_buffer_switch_on_eof )
1776
 
                                                TAO_YY_NEW_FILE;
1777
 
                                        }
1778
 
                                break;
1779
 
                                }
1780
 
 
1781
 
                        case EOB_ACT_CONTINUE_SCAN:
1782
 
                                tao_yy_c_buf_p =
1783
 
                                        tao_yytext_ptr + tao_yy_amount_of_matched_text;
1784
 
 
1785
 
                                tao_yy_current_state = tao_yy_get_previous_state();
1786
 
 
1787
 
                                tao_yy_cp = tao_yy_c_buf_p;
1788
 
                                tao_yy_bp = tao_yytext_ptr + TAO_YY_MORE_ADJ;
1789
 
                                goto tao_yy_match;
1790
 
 
1791
 
                        case EOB_ACT_LAST_MATCH:
1792
 
                                tao_yy_c_buf_p =
1793
 
                                &tao_yy_current_buffer->tao_yy_ch_buf[tao_yy_n_chars];
1794
 
 
1795
 
                                tao_yy_current_state = tao_yy_get_previous_state();
1796
 
 
1797
 
                                tao_yy_cp = tao_yy_c_buf_p;
1798
 
                                tao_yy_bp = tao_yytext_ptr + TAO_YY_MORE_ADJ;
1799
 
                                goto tao_yy_find_action;
1800
 
                        }
1801
 
                break;
1802
 
                }
1803
 
 
1804
 
        default:
1805
 
                TAO_YY_FATAL_ERROR(
1806
 
                        "fatal flex scanner internal error--no action found" );
1807
 
        } /* end of action switch */
1808
 
                } /* end of scanning one token */
1809
 
        } /* end of tao_yylex */
1810
 
 
1811
 
 
1812
 
/* tao_yy_get_next_buffer - try to read in a new buffer
1813
 
 *
1814
 
 * Returns a code representing an action:
1815
 
 *      EOB_ACT_LAST_MATCH -
1816
 
 *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1817
 
 *      EOB_ACT_END_OF_FILE - end of file
1818
 
 */
1819
 
 
1820
 
static int tao_yy_get_next_buffer()
1821
 
        {
1822
 
        register char *dest = tao_yy_current_buffer->tao_yy_ch_buf;
1823
 
        register char *source = tao_yytext_ptr;
1824
 
        register int number_to_move, i;
1825
 
        int ret_val;
1826
 
 
1827
 
        if ( tao_yy_c_buf_p > &tao_yy_current_buffer->tao_yy_ch_buf[tao_yy_n_chars + 1] )
1828
 
                TAO_YY_FATAL_ERROR(
1829
 
                "fatal flex scanner internal error--end of buffer missed" );
1830
 
 
1831
 
        if ( tao_yy_current_buffer->tao_yy_fill_buffer == 0 )
1832
 
                { /* Don't try to fill the buffer, so this is an EOF. */
1833
 
                if ( tao_yy_c_buf_p - tao_yytext_ptr - TAO_YY_MORE_ADJ == 1 )
1834
 
                        {
1835
 
                        /* We matched a single character, the EOB, so
1836
 
                         * treat this as a final EOF.
1837
 
                         */
1838
 
                        return EOB_ACT_END_OF_FILE;
1839
 
                        }
1840
 
 
1841
 
                else
1842
 
                        {
1843
 
                        /* We matched some text prior to the EOB, first
1844
 
                         * process it.
1845
 
                         */
1846
 
                        return EOB_ACT_LAST_MATCH;
1847
 
                        }
1848
 
                }
1849
 
 
1850
 
        /* Try to read more data. */
1851
 
 
1852
 
        /* First move last chars to start of buffer. */
1853
 
        number_to_move = (int) (tao_yy_c_buf_p - tao_yytext_ptr) - 1;
1854
 
 
1855
 
        for ( i = 0; i < number_to_move; ++i )
1856
 
                *(dest++) = *(source++);
1857
 
 
1858
 
        if ( tao_yy_current_buffer->tao_yy_buffer_status == TAO_YY_BUFFER_EOF_PENDING )
1859
 
                /* don't do the read, it's not guaranteed to return an EOF,
1860
 
                 * just force an EOF
1861
 
                 */
1862
 
                tao_yy_current_buffer->tao_yy_n_chars = tao_yy_n_chars = 0;
1863
 
 
1864
 
        else
1865
 
                {
1866
 
                int num_to_read =
1867
 
                        tao_yy_current_buffer->tao_yy_buf_size - number_to_move - 1;
1868
 
 
1869
 
                while ( num_to_read <= 0 )
1870
 
                        { /* Not enough room in the buffer - grow it. */
1871
 
#ifdef TAO_YY_USES_REJECT
1872
 
                        TAO_YY_FATAL_ERROR(
1873
 
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1874
 
#else
1875
 
 
1876
 
                        /* just a shorter name for the current buffer */
1877
 
                        TAO_YY_BUFFER_STATE b = tao_yy_current_buffer;
1878
 
 
1879
 
                        int tao_yy_c_buf_p_offset =
1880
 
                                (int) (tao_yy_c_buf_p - b->tao_yy_ch_buf);
1881
 
 
1882
 
                        if ( b->tao_yy_is_our_buffer )
1883
 
                                {
1884
 
                                int new_size = b->tao_yy_buf_size * 2;
1885
 
 
1886
 
                                if ( new_size <= 0 )
1887
 
                                        b->tao_yy_buf_size += b->tao_yy_buf_size / 8;
1888
 
                                else
1889
 
                                        b->tao_yy_buf_size *= 2;
1890
 
 
1891
 
                                b->tao_yy_ch_buf = (char *)
1892
 
                                        /* Include room in for 2 EOB chars. */
1893
 
                                        tao_yy_flex_realloc( (void *) b->tao_yy_ch_buf,
1894
 
                                                         b->tao_yy_buf_size + 2 );
1895
 
                                }
1896
 
                        else
1897
 
                                /* Can't grow it, we don't own it. */
1898
 
                                b->tao_yy_ch_buf = 0;
1899
 
 
1900
 
                        if ( ! b->tao_yy_ch_buf )
1901
 
                                TAO_YY_FATAL_ERROR(
1902
 
                                "fatal error - scanner input buffer overflow" );
1903
 
 
1904
 
                        tao_yy_c_buf_p = &b->tao_yy_ch_buf[tao_yy_c_buf_p_offset];
1905
 
 
1906
 
                        num_to_read = tao_yy_current_buffer->tao_yy_buf_size -
1907
 
                                                number_to_move - 1;
1908
 
#endif
1909
 
                        }
1910
 
 
1911
 
                if ( num_to_read > TAO_YY_READ_BUF_SIZE )
1912
 
                        num_to_read = TAO_YY_READ_BUF_SIZE;
1913
 
 
1914
 
                /* Read in more data. */
1915
 
                TAO_YY_INPUT( (&tao_yy_current_buffer->tao_yy_ch_buf[number_to_move]),
1916
 
                        tao_yy_n_chars, num_to_read );
1917
 
 
1918
 
                tao_yy_current_buffer->tao_yy_n_chars = tao_yy_n_chars;
1919
 
                }
1920
 
 
1921
 
        if ( tao_yy_n_chars == 0 )
1922
 
                {
1923
 
                if ( number_to_move == TAO_YY_MORE_ADJ )
1924
 
                        {
1925
 
                        ret_val = EOB_ACT_END_OF_FILE;
1926
 
                        tao_yyrestart( tao_yyin );
1927
 
                        }
1928
 
 
1929
 
                else
1930
 
                        {
1931
 
                        ret_val = EOB_ACT_LAST_MATCH;
1932
 
                        tao_yy_current_buffer->tao_yy_buffer_status =
1933
 
                                TAO_YY_BUFFER_EOF_PENDING;
1934
 
                        }
1935
 
                }
1936
 
 
1937
 
        else
1938
 
                ret_val = EOB_ACT_CONTINUE_SCAN;
1939
 
 
1940
 
        tao_yy_n_chars += number_to_move;
1941
 
        tao_yy_current_buffer->tao_yy_ch_buf[tao_yy_n_chars] = TAO_YY_END_OF_BUFFER_CHAR;
1942
 
        tao_yy_current_buffer->tao_yy_ch_buf[tao_yy_n_chars + 1] = TAO_YY_END_OF_BUFFER_CHAR;
1943
 
 
1944
 
        tao_yytext_ptr = &tao_yy_current_buffer->tao_yy_ch_buf[0];
1945
 
 
1946
 
        return ret_val;
1947
 
        }
1948
 
 
1949
 
 
1950
 
/* tao_yy_get_previous_state - get the state just before the EOB char was reached */
1951
 
 
1952
 
static tao_yy_state_type tao_yy_get_previous_state()
1953
 
        {
1954
 
        register tao_yy_state_type tao_yy_current_state;
1955
 
        register char *tao_yy_cp;
1956
 
 
1957
 
        tao_yy_current_state = tao_yy_start;
1958
 
        tao_yy_current_state += TAO_YY_AT_BOL();
1959
 
 
1960
 
        for ( tao_yy_cp = tao_yytext_ptr + TAO_YY_MORE_ADJ; tao_yy_cp < tao_yy_c_buf_p; ++tao_yy_cp )
1961
 
                {
1962
 
                register TAO_YY_CHAR tao_yy_c = (*tao_yy_cp ? tao_yy_ec[TAO_YY_SC_TO_UI(*tao_yy_cp)] : 1);
1963
 
                if ( tao_yy_accept[tao_yy_current_state] )
1964
 
                        {
1965
 
                        tao_yy_last_accepting_state = tao_yy_current_state;
1966
 
                        tao_yy_last_accepting_cpos = tao_yy_cp;
1967
 
                        }
1968
 
                while ( tao_yy_chk[tao_yy_base[tao_yy_current_state] + tao_yy_c] != tao_yy_current_state )
1969
 
                        {
1970
 
                        tao_yy_current_state = (int) tao_yy_def[tao_yy_current_state];
1971
 
                        if ( tao_yy_current_state >= 549 )
1972
 
                                tao_yy_c = tao_yy_meta[(unsigned int) tao_yy_c];
1973
 
                        }
1974
 
                tao_yy_current_state = tao_yy_nxt[tao_yy_base[tao_yy_current_state] + (unsigned int) tao_yy_c];
1975
 
                }
1976
 
 
1977
 
        return tao_yy_current_state;
1978
 
        }
1979
 
 
1980
 
 
1981
 
/* tao_yy_try_NUL_trans - try to make a transition on the NUL character
1982
 
 *
1983
 
 * synopsis
1984
 
 *      next_state = tao_yy_try_NUL_trans( current_state );
1985
 
 */
1986
 
 
1987
 
#ifdef TAO_YY_USE_PROTOS
1988
 
static tao_yy_state_type tao_yy_try_NUL_trans( tao_yy_state_type tao_yy_current_state )
1989
 
#else
1990
 
static tao_yy_state_type tao_yy_try_NUL_trans( tao_yy_current_state )
1991
 
tao_yy_state_type tao_yy_current_state;
1992
 
#endif
1993
 
        {
1994
 
        register int tao_yy_is_jam;
1995
 
        register char *tao_yy_cp = tao_yy_c_buf_p;
1996
 
 
1997
 
        register TAO_YY_CHAR tao_yy_c = 1;
1998
 
        if ( tao_yy_accept[tao_yy_current_state] )
1999
 
                {
2000
 
                tao_yy_last_accepting_state = tao_yy_current_state;
2001
 
                tao_yy_last_accepting_cpos = tao_yy_cp;
2002
 
                }
2003
 
        while ( tao_yy_chk[tao_yy_base[tao_yy_current_state] + tao_yy_c] != tao_yy_current_state )
2004
 
                {
2005
 
                tao_yy_current_state = (int) tao_yy_def[tao_yy_current_state];
2006
 
                if ( tao_yy_current_state >= 549 )
2007
 
                        tao_yy_c = tao_yy_meta[(unsigned int) tao_yy_c];
2008
 
                }
2009
 
        tao_yy_current_state = tao_yy_nxt[tao_yy_base[tao_yy_current_state] + (unsigned int) tao_yy_c];
2010
 
        tao_yy_is_jam = (tao_yy_current_state == 548);
2011
 
 
2012
 
        return tao_yy_is_jam ? 0 : tao_yy_current_state;
2013
 
        }
2014
 
 
2015
 
 
2016
 
#ifndef TAO_YY_NO_UNPUT
2017
 
#ifdef TAO_YY_USE_PROTOS
2018
 
static void tao_yyunput( int c, register char *tao_yy_bp )
2019
 
#else
2020
 
static void tao_yyunput( c, tao_yy_bp )
2021
 
int c;
2022
 
register char *tao_yy_bp;
2023
 
#endif
2024
 
        {
2025
 
        register char *tao_yy_cp = tao_yy_c_buf_p;
2026
 
 
2027
 
        /* undo effects of setting up tao_yytext */
2028
 
        *tao_yy_cp = tao_yy_hold_char;
2029
 
 
2030
 
        if ( tao_yy_cp < tao_yy_current_buffer->tao_yy_ch_buf + 2 )
2031
 
                { /* need to shift things up to make room */
2032
 
                /* +2 for EOB chars. */
2033
 
                register int number_to_move = tao_yy_n_chars + 2;
2034
 
                register char *dest = &tao_yy_current_buffer->tao_yy_ch_buf[
2035
 
                                        tao_yy_current_buffer->tao_yy_buf_size + 2];
2036
 
                register char *source =
2037
 
                                &tao_yy_current_buffer->tao_yy_ch_buf[number_to_move];
2038
 
 
2039
 
                while ( source > tao_yy_current_buffer->tao_yy_ch_buf )
2040
 
                        *--dest = *--source;
2041
 
 
2042
 
                tao_yy_cp += (int) (dest - source);
2043
 
                tao_yy_bp += (int) (dest - source);
2044
 
                tao_yy_current_buffer->tao_yy_n_chars =
2045
 
                        tao_yy_n_chars = tao_yy_current_buffer->tao_yy_buf_size;
2046
 
 
2047
 
                if ( tao_yy_cp < tao_yy_current_buffer->tao_yy_ch_buf + 2 )
2048
 
                        TAO_YY_FATAL_ERROR( "flex scanner push-back overflow" );
2049
 
                }
2050
 
 
2051
 
        *--tao_yy_cp = (char) c;
2052
 
 
2053
 
 
2054
 
        tao_yytext_ptr = tao_yy_bp;
2055
 
        tao_yy_hold_char = *tao_yy_cp;
2056
 
        tao_yy_c_buf_p = tao_yy_cp;
2057
 
        }
2058
 
#endif  /* ifndef TAO_YY_NO_UNPUT */
2059
 
 
2060
 
 
2061
 
#ifdef __cplusplus
2062
 
static int tao_yyinput()
2063
 
#else
2064
 
static int input()
2065
 
#endif
2066
 
        {
2067
 
        int c;
2068
 
 
2069
 
        *tao_yy_c_buf_p = tao_yy_hold_char;
2070
 
 
2071
 
        if ( *tao_yy_c_buf_p == TAO_YY_END_OF_BUFFER_CHAR )
2072
 
                {
2073
 
                /* tao_yy_c_buf_p now points to the character we want to return.
2074
 
                 * If this occurs *before* the EOB characters, then it's a
2075
 
                 * valid NUL; if not, then we've hit the end of the buffer.
2076
 
                 */
2077
 
                if ( tao_yy_c_buf_p < &tao_yy_current_buffer->tao_yy_ch_buf[tao_yy_n_chars] )
2078
 
                        /* This was really a NUL. */
2079
 
                        *tao_yy_c_buf_p = '\0';
2080
 
 
2081
 
                else
2082
 
                        { /* need more input */
2083
 
                        int offset = tao_yy_c_buf_p - tao_yytext_ptr;
2084
 
                        ++tao_yy_c_buf_p;
2085
 
 
2086
 
                        switch ( tao_yy_get_next_buffer() )
2087
 
                                {
2088
 
                                case EOB_ACT_LAST_MATCH:
2089
 
                                        /* This happens because tao_yy_g_n_b()
2090
 
                                         * sees that we've accumulated a
2091
 
                                         * token and flags that we need to
2092
 
                                         * try matching the token before
2093
 
                                         * proceeding.  But for input(),
2094
 
                                         * there's no matching to consider.
2095
 
                                         * So convert the EOB_ACT_LAST_MATCH
2096
 
                                         * to EOB_ACT_END_OF_FILE.
2097
 
                                         */
2098
 
 
2099
 
                                        /* Reset buffer status. */
2100
 
                                        tao_yyrestart( tao_yyin );
2101
 
 
2102
 
                                        /* fall through */
2103
 
 
2104
 
                                case EOB_ACT_END_OF_FILE:
2105
 
                                        {
2106
 
                                        if ( tao_yywrap() )
2107
 
                                                return EOF;
2108
 
 
2109
 
                                        if ( ! tao_yy_did_buffer_switch_on_eof )
2110
 
                                                TAO_YY_NEW_FILE;
2111
 
#ifdef __cplusplus
2112
 
                                        return tao_yyinput();
2113
 
#else
2114
 
                                        return input();
2115
 
#endif
2116
 
                                        }
2117
 
 
2118
 
                                case EOB_ACT_CONTINUE_SCAN:
2119
 
                                        tao_yy_c_buf_p = tao_yytext_ptr + offset;
2120
 
                                        break;
2121
 
                                }
2122
 
                        }
2123
 
                }
2124
 
 
2125
 
        c = *(unsigned char *) tao_yy_c_buf_p;  /* cast for 8-bit char's */
2126
 
        *tao_yy_c_buf_p = '\0'; /* preserve tao_yytext */
2127
 
        tao_yy_hold_char = *++tao_yy_c_buf_p;
2128
 
 
2129
 
        tao_yy_current_buffer->tao_yy_at_bol = (c == '\n');
2130
 
 
2131
 
        return c;
2132
 
        }
2133
 
 
2134
 
 
2135
 
#ifdef TAO_YY_USE_PROTOS
2136
 
void tao_yyrestart( FILE *input_file )
2137
 
#else
2138
 
void tao_yyrestart( input_file )
2139
 
FILE *input_file;
2140
 
#endif
2141
 
        {
2142
 
        if ( ! tao_yy_current_buffer )
2143
 
                tao_yy_current_buffer = tao_yy_create_buffer( tao_yyin, TAO_YY_BUF_SIZE );
2144
 
 
2145
 
        tao_yy_init_buffer( tao_yy_current_buffer, input_file );
2146
 
        tao_yy_load_buffer_state();
2147
 
        }
2148
 
 
2149
 
 
2150
 
#ifdef TAO_YY_USE_PROTOS
2151
 
void tao_yy_switch_to_buffer( TAO_YY_BUFFER_STATE new_buffer )
2152
 
#else
2153
 
void tao_yy_switch_to_buffer( new_buffer )
2154
 
TAO_YY_BUFFER_STATE new_buffer;
2155
 
#endif
2156
 
        {
2157
 
        if ( tao_yy_current_buffer == new_buffer )
2158
 
                return;
2159
 
 
2160
 
        if ( tao_yy_current_buffer )
2161
 
                {
2162
 
                /* Flush out information for old buffer. */
2163
 
                *tao_yy_c_buf_p = tao_yy_hold_char;
2164
 
                tao_yy_current_buffer->tao_yy_buf_pos = tao_yy_c_buf_p;
2165
 
                tao_yy_current_buffer->tao_yy_n_chars = tao_yy_n_chars;
2166
 
                }
2167
 
 
2168
 
        tao_yy_current_buffer = new_buffer;
2169
 
        tao_yy_load_buffer_state();
2170
 
 
2171
 
        /* We don't actually know whether we did this switch during
2172
 
         * EOF (tao_yywrap()) processing, but the only time this flag
2173
 
         * is looked at is after tao_yywrap() is called, so it's safe
2174
 
         * to go ahead and always set it.
2175
 
         */
2176
 
        tao_yy_did_buffer_switch_on_eof = 1;
2177
 
        }
2178
 
 
2179
 
 
2180
 
#ifdef TAO_YY_USE_PROTOS
2181
 
void tao_yy_load_buffer_state( void )
2182
 
#else
2183
 
void tao_yy_load_buffer_state()
2184
 
#endif
2185
 
        {
2186
 
        tao_yy_n_chars = tao_yy_current_buffer->tao_yy_n_chars;
2187
 
        tao_yytext_ptr = tao_yy_c_buf_p = tao_yy_current_buffer->tao_yy_buf_pos;
2188
 
        tao_yyin = tao_yy_current_buffer->tao_yy_input_file;
2189
 
        tao_yy_hold_char = *tao_yy_c_buf_p;
2190
 
        }
2191
 
 
2192
 
 
2193
 
#ifdef TAO_YY_USE_PROTOS
2194
 
TAO_YY_BUFFER_STATE tao_yy_create_buffer( FILE *file, int size )
2195
 
#else
2196
 
TAO_YY_BUFFER_STATE tao_yy_create_buffer( file, size )
2197
 
FILE *file;
2198
 
int size;
2199
 
#endif
2200
 
        {
2201
 
        TAO_YY_BUFFER_STATE b;
2202
 
 
2203
 
        b = (TAO_YY_BUFFER_STATE) tao_yy_flex_alloc( sizeof( struct tao_yy_buffer_state ) );
2204
 
        if ( ! b )
2205
 
                TAO_YY_FATAL_ERROR( "out of dynamic memory in tao_yy_create_buffer()" );
2206
 
 
2207
 
        b->tao_yy_buf_size = size;
2208
 
 
2209
 
        /* tao_yy_ch_buf has to be 2 characters longer than the size given because
2210
 
         * we need to put in 2 end-of-buffer characters.
2211
 
         */
2212
 
        b->tao_yy_ch_buf = (char *) tao_yy_flex_alloc( b->tao_yy_buf_size + 2 );
2213
 
        if ( ! b->tao_yy_ch_buf )
2214
 
                TAO_YY_FATAL_ERROR( "out of dynamic memory in tao_yy_create_buffer()" );
2215
 
 
2216
 
        b->tao_yy_is_our_buffer = 1;
2217
 
 
2218
 
        tao_yy_init_buffer( b, file );
2219
 
 
2220
 
        return b;
2221
 
        }
2222
 
 
2223
 
 
2224
 
#ifdef TAO_YY_USE_PROTOS
2225
 
void tao_yy_delete_buffer( TAO_YY_BUFFER_STATE b )
2226
 
#else
2227
 
void tao_yy_delete_buffer( b )
2228
 
TAO_YY_BUFFER_STATE b;
2229
 
#endif
2230
 
        {
2231
 
        if ( ! b )
2232
 
                return;
2233
 
 
2234
 
        if ( b == tao_yy_current_buffer )
2235
 
                tao_yy_current_buffer = (TAO_YY_BUFFER_STATE) 0;
2236
 
 
2237
 
        if ( b->tao_yy_is_our_buffer )
2238
 
                tao_yy_flex_free( (void *) b->tao_yy_ch_buf );
2239
 
 
2240
 
        tao_yy_flex_free( (void *) b );
2241
 
        }
2242
 
 
2243
 
 
2244
 
#ifndef TAO_YY_ALWAYS_INTERACTIVE
2245
 
#ifndef TAO_YY_NEVER_INTERACTIVE
2246
 
extern int isatty TAO_YY_PROTO(( int ));
2247
 
#endif
2248
 
#endif
2249
 
 
2250
 
#ifdef TAO_YY_USE_PROTOS
2251
 
void tao_yy_init_buffer( TAO_YY_BUFFER_STATE b, FILE *file )
2252
 
#else
2253
 
void tao_yy_init_buffer( b, file )
2254
 
TAO_YY_BUFFER_STATE b;
2255
 
FILE *file;
2256
 
#endif
2257
 
 
2258
 
 
2259
 
        {
2260
 
        tao_yy_flush_buffer( b );
2261
 
 
2262
 
        b->tao_yy_input_file = file;
2263
 
        b->tao_yy_fill_buffer = 1;
2264
 
 
2265
 
#ifdef TAO_YY_ALWAYS_INTERACTIVE
2266
 
        b->tao_yy_is_interactive = 1;
2267
 
#else
2268
 
#ifdef TAO_YY_NEVER_INTERACTIVE
2269
 
        b->tao_yy_is_interactive = 0;
2270
 
#else
2271
 
        b->tao_yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2272
 
#endif
2273
 
#endif
2274
 
        }
2275
 
 
2276
 
 
2277
 
#ifdef TAO_YY_USE_PROTOS
2278
 
void tao_yy_flush_buffer( TAO_YY_BUFFER_STATE b )
2279
 
#else
2280
 
void tao_yy_flush_buffer( b )
2281
 
TAO_YY_BUFFER_STATE b;
2282
 
#endif
2283
 
 
2284
 
        {
2285
 
        if ( ! b )
2286
 
                return;
2287
 
 
2288
 
        b->tao_yy_n_chars = 0;
2289
 
 
2290
 
        /* We always need two end-of-buffer characters.  The first causes
2291
 
         * a transition to the end-of-buffer state.  The second causes
2292
 
         * a jam in that state.
2293
 
         */
2294
 
        b->tao_yy_ch_buf[0] = TAO_YY_END_OF_BUFFER_CHAR;
2295
 
        b->tao_yy_ch_buf[1] = TAO_YY_END_OF_BUFFER_CHAR;
2296
 
 
2297
 
        b->tao_yy_buf_pos = &b->tao_yy_ch_buf[0];
2298
 
 
2299
 
        b->tao_yy_at_bol = 1;
2300
 
        b->tao_yy_buffer_status = TAO_YY_BUFFER_NEW;
2301
 
 
2302
 
        if ( b == tao_yy_current_buffer )
2303
 
                tao_yy_load_buffer_state();
2304
 
        }
2305
 
 
2306
 
 
2307
 
#ifndef TAO_YY_NO_SCAN_BUFFER
2308
 
#ifdef TAO_YY_USE_PROTOS
2309
 
TAO_YY_BUFFER_STATE tao_yy_scan_buffer( char *base, tao_yy_size_t size )
2310
 
#else
2311
 
TAO_YY_BUFFER_STATE tao_yy_scan_buffer( base, size )
2312
 
char *base;
2313
 
tao_yy_size_t size;
2314
 
#endif
2315
 
        {
2316
 
        TAO_YY_BUFFER_STATE b;
2317
 
 
2318
 
        if ( size < 2 ||
2319
 
             base[size-2] != TAO_YY_END_OF_BUFFER_CHAR ||
2320
 
             base[size-1] != TAO_YY_END_OF_BUFFER_CHAR )
2321
 
                /* They forgot to leave room for the EOB's. */
2322
 
                return 0;
2323
 
 
2324
 
        b = (TAO_YY_BUFFER_STATE) tao_yy_flex_alloc( sizeof( struct tao_yy_buffer_state ) );
2325
 
        if ( ! b )
2326
 
                TAO_YY_FATAL_ERROR( "out of dynamic memory in tao_yy_scan_buffer()" );
2327
 
 
2328
 
        b->tao_yy_buf_size = size - 2;  /* "- 2" to take care of EOB's */
2329
 
        b->tao_yy_buf_pos = b->tao_yy_ch_buf = base;
2330
 
        b->tao_yy_is_our_buffer = 0;
2331
 
        b->tao_yy_input_file = 0;
2332
 
        b->tao_yy_n_chars = b->tao_yy_buf_size;
2333
 
        b->tao_yy_is_interactive = 0;
2334
 
        b->tao_yy_at_bol = 1;
2335
 
        b->tao_yy_fill_buffer = 0;
2336
 
        b->tao_yy_buffer_status = TAO_YY_BUFFER_NEW;
2337
 
 
2338
 
        tao_yy_switch_to_buffer( b );
2339
 
 
2340
 
        return b;
2341
 
        }
2342
 
#endif
2343
 
 
2344
 
 
2345
 
#ifndef TAO_YY_NO_SCAN_STRING
2346
 
#ifdef TAO_YY_USE_PROTOS
2347
 
TAO_YY_BUFFER_STATE tao_yy_scan_string( tao_yyconst char *tao_yy_str )
2348
 
#else
2349
 
TAO_YY_BUFFER_STATE tao_yy_scan_string( tao_yy_str )
2350
 
tao_yyconst char *tao_yy_str;
2351
 
#endif
2352
 
        {
2353
 
        int len;
2354
 
        for ( len = 0; tao_yy_str[len]; ++len )
2355
 
                ;
2356
 
 
2357
 
        return tao_yy_scan_bytes( tao_yy_str, len );
2358
 
        }
2359
 
#endif
2360
 
 
2361
 
 
2362
 
#ifndef TAO_YY_NO_SCAN_BYTES
2363
 
#ifdef TAO_YY_USE_PROTOS
2364
 
TAO_YY_BUFFER_STATE tao_yy_scan_bytes( tao_yyconst char *bytes, int len )
2365
 
#else
2366
 
TAO_YY_BUFFER_STATE tao_yy_scan_bytes( bytes, len )
2367
 
tao_yyconst char *bytes;
2368
 
int len;
2369
 
#endif
2370
 
        {
2371
 
        TAO_YY_BUFFER_STATE b;
2372
 
        char *buf;
2373
 
        tao_yy_size_t n;
2374
 
        int i;
2375
 
 
2376
 
        /* Get memory for full buffer, including space for trailing EOB's. */
2377
 
        n = len + 2;
2378
 
        buf = (char *) tao_yy_flex_alloc( n );
2379
 
        if ( ! buf )
2380
 
                TAO_YY_FATAL_ERROR( "out of dynamic memory in tao_yy_scan_bytes()" );
2381
 
 
2382
 
        for ( i = 0; i < len; ++i )
2383
 
                buf[i] = bytes[i];
2384
 
 
2385
 
        buf[len] = buf[len+1] = TAO_YY_END_OF_BUFFER_CHAR;
2386
 
 
2387
 
        b = tao_yy_scan_buffer( buf, n );
2388
 
        if ( ! b )
2389
 
                TAO_YY_FATAL_ERROR( "bad buffer in tao_yy_scan_bytes()" );
2390
 
 
2391
 
        /* It's okay to grow etc. this buffer, and we should throw it
2392
 
         * away when we're done.
2393
 
         */
2394
 
        b->tao_yy_is_our_buffer = 1;
2395
 
 
2396
 
        return b;
2397
 
        }
2398
 
#endif
2399
 
 
2400
 
 
2401
 
#ifndef TAO_YY_NO_PUSH_STATE
2402
 
#ifdef TAO_YY_USE_PROTOS
2403
 
static void tao_yy_push_state( int new_state )
2404
 
#else
2405
 
static void tao_yy_push_state( new_state )
2406
 
int new_state;
2407
 
#endif
2408
 
        {
2409
 
        if ( tao_yy_start_stack_ptr >= tao_yy_start_stack_depth )
2410
 
                {
2411
 
                tao_yy_size_t new_size;
2412
 
 
2413
 
                tao_yy_start_stack_depth += TAO_YY_START_STACK_INCR;
2414
 
                new_size = tao_yy_start_stack_depth * sizeof( int );
2415
 
 
2416
 
                if ( ! tao_yy_start_stack )
2417
 
                        tao_yy_start_stack = (int *) tao_yy_flex_alloc( new_size );
2418
 
 
2419
 
                else
2420
 
                        tao_yy_start_stack = (int *) tao_yy_flex_realloc(
2421
 
                                        (void *) tao_yy_start_stack, new_size );
2422
 
 
2423
 
                if ( ! tao_yy_start_stack )
2424
 
                        TAO_YY_FATAL_ERROR(
2425
 
                        "out of memory expanding start-condition stack" );
2426
 
                }
2427
 
 
2428
 
        tao_yy_start_stack[tao_yy_start_stack_ptr++] = TAO_YY_START;
2429
 
 
2430
 
        BEGIN(new_state);
2431
 
        }
2432
 
#endif
2433
 
 
2434
 
 
2435
 
#ifndef TAO_YY_NO_POP_STATE
2436
 
static void tao_yy_pop_state()
2437
 
        {
2438
 
        if ( --tao_yy_start_stack_ptr < 0 )
2439
 
                TAO_YY_FATAL_ERROR( "start-condition stack underflow" );
2440
 
 
2441
 
        BEGIN(tao_yy_start_stack[tao_yy_start_stack_ptr]);
2442
 
        }
2443
 
#endif
2444
 
 
2445
 
 
2446
 
#ifndef TAO_YY_NO_TOP_STATE
2447
 
static int tao_yy_top_state()
2448
 
        {
2449
 
        return tao_yy_start_stack[tao_yy_start_stack_ptr - 1];
2450
 
        }
2451
 
#endif
2452
 
 
2453
 
#ifndef TAO_YY_EXIT_FAILURE
2454
 
#define TAO_YY_EXIT_FAILURE 2
2455
 
#endif
2456
 
 
2457
 
#ifdef TAO_YY_USE_PROTOS
2458
 
static void tao_yy_fatal_error( tao_yyconst char msg[] )
2459
 
#else
2460
 
static void tao_yy_fatal_error( msg )
2461
 
char msg[];
2462
 
#endif
2463
 
        {
2464
 
        (void) fprintf( stderr, "%s\n", msg );
2465
 
        exit( TAO_YY_EXIT_FAILURE );
2466
 
        }
2467
 
 
2468
 
 
2469
 
 
2470
 
/* Redefine tao_yyless() so it works in section 3 code. */
2471
 
 
2472
 
#undef tao_yyless
2473
 
#define tao_yyless(n) \
2474
 
        do \
2475
 
                { \
2476
 
                /* Undo effects of setting up tao_yytext. */ \
2477
 
                tao_yytext[tao_yyleng] = tao_yy_hold_char; \
2478
 
                tao_yy_c_buf_p = tao_yytext + n; \
2479
 
                tao_yy_hold_char = *tao_yy_c_buf_p; \
2480
 
                *tao_yy_c_buf_p = '\0'; \
2481
 
                tao_yyleng = n; \
2482
 
                } \
2483
 
        while ( 0 )
2484
 
 
2485
 
 
2486
 
/* Internal utility routines. */
2487
 
 
2488
 
#ifndef tao_yytext_ptr
2489
 
#ifdef TAO_YY_USE_PROTOS
2490
 
static void tao_yy_flex_strncpy( char *s1, tao_yyconst char *s2, int n )
2491
 
#else
2492
 
static void tao_yy_flex_strncpy( s1, s2, n )
2493
 
char *s1;
2494
 
tao_yyconst char *s2;
2495
 
int n;
2496
 
#endif
2497
 
        {
2498
 
        register int i;
2499
 
        for ( i = 0; i < n; ++i )
2500
 
                s1[i] = s2[i];
2501
 
        }
2502
 
#endif
2503
 
 
2504
 
#ifdef TAO_YY_NEED_STRLEN
2505
 
#ifdef TAO_YY_USE_PROTOS
2506
 
static int tao_yy_flex_strlen( tao_yyconst char *s )
2507
 
#else
2508
 
static int tao_yy_flex_strlen( s )
2509
 
tao_yyconst char *s;
2510
 
#endif
2511
 
        {
2512
 
        register int n;
2513
 
        for ( n = 0; s[n]; ++n )
2514
 
                ;
2515
 
 
2516
 
        return n;
2517
 
        }
2518
 
#endif
2519
 
 
2520
 
 
2521
 
#ifdef TAO_YY_USE_PROTOS
2522
 
static void *tao_yy_flex_alloc( tao_yy_size_t size )
2523
 
#else
2524
 
static void *tao_yy_flex_alloc( size )
2525
 
tao_yy_size_t size;
2526
 
#endif
2527
 
        {
2528
 
        return (void *) malloc( size );
2529
 
        }
2530
 
 
2531
 
#ifdef TAO_YY_USE_PROTOS
2532
 
static void *tao_yy_flex_realloc( void *ptr, tao_yy_size_t size )
2533
 
#else
2534
 
static void *tao_yy_flex_realloc( ptr, size )
2535
 
void *ptr;
2536
 
tao_yy_size_t size;
2537
 
#endif
2538
 
        {
2539
 
        /* The cast to (char *) in the following accommodates both
2540
 
         * implementations that use char* generic pointers, and those
2541
 
         * that use void* generic pointers.  It works with the latter
2542
 
         * because both ANSI C and C++ allow castless assignment from
2543
 
         * any pointer type to void*, and deal with argument conversions
2544
 
         * as though doing an assignment.
2545
 
         */
2546
 
        return (void *) realloc( (char *) ptr, size );
2547
 
        }
2548
 
 
2549
 
#ifdef TAO_YY_USE_PROTOS
2550
 
static void tao_yy_flex_free( void *ptr )
2551
 
#else
2552
 
static void tao_yy_flex_free( ptr )
2553
 
void *ptr;
2554
 
#endif
2555
 
        {
2556
 
        free( ptr );
2557
 
        }
2558
 
 
2559
 
#ifdef TAO_YY_MAIN
2560
 
int main()
2561
 
        {
2562
 
        tao_yylex();
2563
 
        return 0;
2564
 
        }
2565
 
#endif
2566
 
 
2567
 
        /* subroutines */
2568
 
 
2569
 
// Parse a #line statement generated by the C preprocessor
2570
 
static void
2571
 
idl_parse_line_and_file (char *buf)
2572
 
{
2573
 
  char *r = buf;
2574
 
  char *h = 0;
2575
 
  UTL_String *nm = 0;
2576
 
 
2577
 
  // Skip initial '#'.
2578
 
  if (*r != '#')
2579
 
    {
2580
 
      return;
2581
 
    }
2582
 
  else
2583
 
    {
2584
 
      r++;
2585
 
    }
2586
 
 
2587
 
  // Check to see if we're running under the screwy Microsoft scheme
2588
 
  // of putting #line num instead of #num.
2589
 
 
2590
 
  if (ACE_OS::strncmp (r, "line", 4) == 0)
2591
 
    {
2592
 
      r += 5;
2593
 
    }
2594
 
 
2595
 
  // Find line number.
2596
 
  while (isspace (*r))
2597
 
    {
2598
 
      r++;
2599
 
    }
2600
 
 
2601
 
  h = r;
2602
 
 
2603
 
  for (; isdigit (*r); r++)
2604
 
    {
2605
 
      continue;
2606
 
    }
2607
 
 
2608
 
  *r++ = 0;
2609
 
  idl_global->set_lineno ((long) idl_atoui (h, 10));
2610
 
 
2611
 
  // Find file name, if present.
2612
 
  for (; *r != '"'; r++)
2613
 
    {
2614
 
      if (*r == '\n' || *r == '\0')
2615
 
        {
2616
 
          return;
2617
 
        }
2618
 
    }
2619
 
 
2620
 
  h = ++r;
2621
 
 
2622
 
  for (; *r != '"'; r++)
2623
 
    {
2624
 
      continue;
2625
 
    }
2626
 
 
2627
 
  *r = 0;
2628
 
  UTL_String *tmp = 0;
2629
 
 
2630
 
  if (*h == '\0')
2631
 
    {
2632
 
      ACE_NEW (tmp,
2633
 
               UTL_String ("standard input"));
2634
 
      idl_global->set_filename (tmp);
2635
 
      return;
2636
 
    }
2637
 
  else
2638
 
    {
2639
 
      long i;
2640
 
      long j;
2641
 
 
2642
 
      // Put Microsoft-style pathnames into a canonical form.
2643
 
      for (i = 0, j = 0; h[j] != '\0'; i++, j++)
2644
 
        {
2645
 
          if (h[j] == '\\' && h[j + 1] == '\\')
2646
 
            {
2647
 
                    j++;
2648
 
            }
2649
 
 
2650
 
                h[i] = h[j];
2651
 
        }
2652
 
 
2653
 
      h[i] = '\0';
2654
 
      ACE_NEW (tmp,
2655
 
               UTL_String (h));
2656
 
      idl_global->update_prefix (tmp->get_string ());
2657
 
      idl_global->set_filename (tmp);
2658
 
    }
2659
 
 
2660
 
  UTL_String *fname = idl_global->filename ();
2661
 
  idl_bool in_main_file = I_FALSE;
2662
 
  idl_bool is_real_filename = fname->compare (idl_global->real_filename ());
2663
 
  idl_bool is_main_filename = I_FALSE;
2664
 
 
2665
 
  if (!is_real_filename)
2666
 
    {
2667
 
      is_main_filename = fname->compare (idl_global->main_filename ());
2668
 
    }
2669
 
 
2670
 
  if (is_real_filename || is_main_filename)
2671
 
    {
2672
 
      in_main_file = I_TRUE;
2673
 
    }
2674
 
 
2675
 
  idl_global->set_in_main_file (in_main_file);
2676
 
 
2677
 
  // Strip off any command line -I prefix that may have been added
2678
 
  // by the preprocessor.
2679
 
  if (!(idl_global->in_main_file ()) && idl_global->import ())
2680
 
    {
2681
 
      ACE_NEW (
2682
 
          nm,
2683
 
          UTL_String (
2684
 
              idl_global->stripped_preproc_include (fname->get_string ())
2685
 
            )
2686
 
        );
2687
 
 
2688
 
      // This call also manages the #pragma prefix.
2689
 
      idl_global->store_include_file_name (nm);
2690
 
    }
2691
 
}
2692
 
 
2693
 
// Store a #pragma line into the list of pragmas
2694
 
static void
2695
 
idl_store_pragma (char *buf)
2696
 
{
2697
 
  char *sp = buf + 1;
2698
 
  int crunched = 0;
2699
 
 
2700
 
  // Remove all the blanks between the '#' and the 'pragma'.
2701
 
  while (*sp != 'p')
2702
 
    {
2703
 
      ++sp;
2704
 
      ++crunched;
2705
 
    }
2706
 
 
2707
 
  char *tp = buf + 1;
2708
 
 
2709
 
  // This copies the crunched string back to the original, and
2710
 
  // also compensates for the behavior of the Sun preprocessor,
2711
 
  // which put spaces around the double colons of a non-quoted
2712
 
  // scoped name, a case which is possible in #pragma version.
2713
 
  while (*sp != '\n')
2714
 
    {
2715
 
      if (*sp == ' ' && *(sp + 1) == ':')
2716
 
        {
2717
 
          ++crunched;
2718
 
        }
2719
 
      else if (*sp == ':' && *(sp + 1) == ' ')
2720
 
        {
2721
 
          *tp = *sp;
2722
 
          ++crunched;
2723
 
          ++sp;
2724
 
          ++tp;
2725
 
        }
2726
 
      else
2727
 
        {
2728
 
          *tp = *sp;
2729
 
          ++tp;
2730
 
        }
2731
 
 
2732
 
      ++sp;
2733
 
    }
2734
 
 
2735
 
  // The '\n' is still <crunched> spaces too far away, with
2736
 
  // garbage characters in between.
2737
 
  sp -= crunched;
2738
 
  *sp = '\0';
2739
 
 
2740
 
  if (ACE_OS::strstr (buf + 8, "import") != 0)
2741
 
    {
2742
 
      idl_global->set_import (I_TRUE);
2743
 
      return;
2744
 
    }
2745
 
 
2746
 
  if (ACE_OS::strstr (buf + 8, "include") != 0)
2747
 
    {
2748
 
      idl_global->set_import (I_FALSE);
2749
 
      return;
2750
 
    }
2751
 
 
2752
 
  if (ACE_OS::strncmp (buf + 8, "prefix", 6) == 0)
2753
 
    {
2754
 
      char *new_prefix = idl_get_pragma_string (buf);
2755
 
 
2756
 
      if (new_prefix != 0)
2757
 
        {
2758
 
          unsigned long depth = idl_global->scopes ().depth ();
2759
 
 
2760
 
          // At global scope, we always replace the prefix. For all
2761
 
          // other scopes, we replace only if there is a prefix already
2762
 
          // associated with that scope, otherwise we add the prefix.
2763
 
          if (depth == 1 || idl_global->scopes ().top ()->has_prefix ())
2764
 
            {
2765
 
              char *trash = 0;
2766
 
              idl_global->pragma_prefixes ().pop (trash);
2767
 
              delete [] trash;
2768
 
            }
2769
 
 
2770
 
          UTL_Scope *top_scope = idl_global->scopes ().top ();
2771
 
 
2772
 
          if (depth > 1)
2773
 
            {
2774
 
              top_scope->has_prefix (I_TRUE);
2775
 
              ScopeAsDecl (top_scope)->prefix_scope (top_scope);
2776
 
            }
2777
 
 
2778
 
          idl_global->pragma_prefixes ().push (new_prefix);
2779
 
 
2780
 
          if (idl_global->in_main_file ())
2781
 
            {
2782
 
              idl_global->root ()->prefix (new_prefix);
2783
 
              idl_global->root ()->set_imported (I_FALSE);
2784
 
              top_scope->has_prefix (I_TRUE);
2785
 
            }
2786
 
 
2787
 
          ACE_CString ext_id;
2788
 
          ext_id.set (idl_global->filename ()->get_string (),
2789
 
                      0);
2790
 
          char *int_id = ACE::strnew (new_prefix);
2791
 
          (void) idl_global->file_prefixes ().rebind (ext_id, 
2792
 
                                                      int_id);
2793
 
        }
2794
 
    }
2795
 
  else if (ACE_OS::strncmp (buf + 8, "version", 7) == 0)
2796
 
    {
2797
 
      char *tmp = buf + 16;
2798
 
 
2799
 
      while (*tmp == ' ' || *tmp == '\t')
2800
 
        {
2801
 
          ++tmp;
2802
 
        }
2803
 
 
2804
 
      char *number = ACE_OS::strchr (tmp, ' ');
2805
 
 
2806
 
      if (number == 0)
2807
 
        {
2808
 
          number = ACE_OS::strchr (tmp, '\t');
2809
 
        }
2810
 
 
2811
 
      while (*number == ' ' || *number == '\t')
2812
 
        {
2813
 
          ++number;
2814
 
        }
2815
 
 
2816
 
      size_t len = ACE_OS::strlen (number);
2817
 
 
2818
 
      // For some reason, the SunCC preprocessor adds a trailing space, which
2819
 
      // messes with idl_valid_version() below, so we check and remove.
2820
 
      while (number[len - 1] == ' ')
2821
 
        {
2822
 
          number[len - 1] = '\0';
2823
 
          len = ACE_OS::strlen (number);
2824
 
        }
2825
 
 
2826
 
      // This call adds a proper null terminator to tmp, so no need to 
2827
 
      // do it here.
2828
 
      AST_Decl *d = idl_find_node (tmp);
2829
 
 
2830
 
      if (d == 0)
2831
 
        {
2832
 
          return;
2833
 
        }
2834
 
 
2835
 
      if (!idl_valid_version (number))
2836
 
        {
2837
 
          idl_global->err ()->version_number_error (number);
2838
 
          return;
2839
 
        }
2840
 
 
2841
 
      d->version (ACE::strnew (number));
2842
 
    }
2843
 
  else if (ACE_OS::strncmp (buf + 8, "ident", 5) == 0)
2844
 
    {
2845
 
      idl_global->ident_string (buf + 8);
2846
 
    }
2847
 
  else if (ACE_OS::strncmp (buf + 8, "ID", 2) == 0)
2848
 
    {
2849
 
      char *tmp = buf + 11;
2850
 
 
2851
 
      while (*tmp == ' ')
2852
 
        {
2853
 
          ++tmp;
2854
 
        }
2855
 
 
2856
 
      AST_Decl *d = idl_find_node (tmp);
2857
 
 
2858
 
      if (d == 0)
2859
 
        {
2860
 
          return;
2861
 
        }
2862
 
 
2863
 
      char *new_id = idl_get_pragma_string (buf);
2864
 
 
2865
 
      if (new_id != 0)
2866
 
        {
2867
 
          d->repoID (new_id);
2868
 
          d->typeid_set (1);
2869
 
        }
2870
 
    }
2871
 
}
2872
 
 
2873
 
/*
2874
 
 * idl_atoi - Convert a string of digits into a negative integer according to base b
2875
 
 */
2876
 
static long
2877
 
idl_atoi(char *s, long b)
2878
 
{
2879
 
  long    r = 0;
2880
 
  s++;
2881
 
 
2882
 
  if (b == 8 && *s == '0')
2883
 
    {
2884
 
      s++;
2885
 
    }
2886
 
  else if (b == 16 && *s == '0' && (*(s + 1) == 'x' || *(s + 1) == 'X'))
2887
 
    {
2888
 
      s += 2;
2889
 
    }
2890
 
 
2891
 
  for (; *s; ++s)
2892
 
    {
2893
 
      if (*s <= '9' && *s >= '0')
2894
 
        {
2895
 
          r = (r * b) + (*s - '0');
2896
 
        }
2897
 
      else if (b > 10 && *s <= 'f' && *s >= 'a')
2898
 
        {
2899
 
          r = (r * b) + (*s - 'a' + 10);
2900
 
        }
2901
 
      else if (b > 10 && *s <= 'F' && *s >= 'A')
2902
 
        {
2903
 
          r = (r * b) + (*s - 'A' + 10);
2904
 
        }
2905
 
      else
2906
 
        {
2907
 
          break;
2908
 
        }
2909
 
    }
2910
 
 
2911
 
  return -r;
2912
 
}
2913
 
 
2914
 
/*
2915
 
 * idl_atoui - Convert a string of digits into an unsigned integer according to base b
2916
 
 */
2917
 
static ACE_UINT64
2918
 
idl_atoui(char *s, long b)
2919
 
{
2920
 
  ACE_UINT64    r = 0;
2921
 
 
2922
 
  if (b == 8 && *s == '0')
2923
 
    {
2924
 
      s++;
2925
 
    }
2926
 
  else if (b == 16 && *s == '0' && (*(s + 1) == 'x' || *(s + 1) == 'X'))
2927
 
    {
2928
 
      s += 2;
2929
 
    }
2930
 
 
2931
 
  for (; *s; ++s)
2932
 
    {
2933
 
      if (*s <= '9' && *s >= '0')
2934
 
        {
2935
 
          r = (r * b) + (*s - '0');
2936
 
        }
2937
 
      else if (b > 10 && *s <= 'f' && *s >= 'a')
2938
 
        {
2939
 
          r = (r * b) + (*s - 'a' + 10);
2940
 
        }
2941
 
      else if (b > 10 && *s <= 'F' && *s >= 'A')
2942
 
        {
2943
 
          r = (r * b) + (*s - 'A' + 10);
2944
 
        }
2945
 
      else
2946
 
        {
2947
 
          break;
2948
 
        }
2949
 
    }
2950
 
 
2951
 
  return r;
2952
 
}
2953
 
 
2954
 
/*
2955
 
 * Convert a string to a float; atof doesn't seem to work, always.
2956
 
 */
2957
 
static double
2958
 
idl_atof (char *s)
2959
 
{
2960
 
  double d = 0.0;
2961
 
  double e, k;
2962
 
  long neg = 0, negexp = 0;
2963
 
 
2964
 
  if (*s == '-') 
2965
 
    {
2966
 
      neg = 1;
2967
 
      s++;
2968
 
    }
2969
 
 
2970
 
  while (*s >= '0' && *s <= '9') 
2971
 
    {
2972
 
      d = (d * 10) + *s - '0';
2973
 
      s++;
2974
 
    }
2975
 
 
2976
 
  if (*s == '.') 
2977
 
    {
2978
 
      s++;
2979
 
      e = 10;
2980
 
 
2981
 
      while (*s >= '0' && *s <= '9') 
2982
 
        {
2983
 
          d += (*s - '0') / (e * 1.0);
2984
 
          e *= 10;
2985
 
          s++;
2986
 
        }
2987
 
    }
2988
 
 
2989
 
  if (*s == 'e' || *s == 'E') 
2990
 
    {
2991
 
      s++;
2992
 
 
2993
 
      if (*s == '-') 
2994
 
        {
2995
 
            negexp = 1;
2996
 
            s++;
2997
 
        } 
2998
 
      else if (*s == '+')
2999
 
        {
3000
 
          s++;
3001
 
        }
3002
 
 
3003
 
      e = 0;
3004
 
 
3005
 
      while (*s >= '0' && *s <= '9') 
3006
 
        {
3007
 
          e = (e * 10) + *s - '0';
3008
 
          s++;
3009
 
        }
3010
 
 
3011
 
      if (e > 0) 
3012
 
        {
3013
 
          for (k = 1; e > 0; k *= 10, e--);
3014
 
 
3015
 
          if (negexp)
3016
 
            {
3017
 
              d /= k;
3018
 
            }
3019
 
          else
3020
 
            {
3021
 
              d *= k;
3022
 
            }
3023
 
        }
3024
 
    }
3025
 
 
3026
 
  if (neg) 
3027
 
    {
3028
 
      d *= -1.0;
3029
 
    }
3030
 
 
3031
 
  return d;
3032
 
}
3033
 
 
3034
 
/*
3035
 
 * Convert (some) escaped characters into their ascii values
3036
 
 */
3037
 
static char
3038
 
idl_escape_reader(
3039
 
    char *str
3040
 
  )
3041
 
{
3042
 
  if (str[0] != '\\') 
3043
 
    {
3044
 
            return str[0];
3045
 
    }
3046
 
 
3047
 
  switch (str[1]) 
3048
 
  {
3049
 
    case 'n':
3050
 
            return '\n';
3051
 
    case 't':
3052
 
            return '\t';
3053
 
    case 'v':
3054
 
            return '\v';
3055
 
    case 'b':
3056
 
            return '\b';
3057
 
    case 'r':
3058
 
            return '\r';
3059
 
    case 'f':
3060
 
            return '\f';
3061
 
    case 'a':
3062
 
            return '\a';
3063
 
    case '\\':
3064
 
            return '\\';
3065
 
    case '\?':
3066
 
            return '?';
3067
 
    case '\'':
3068
 
            return '\'';
3069
 
    case '"':
3070
 
            return '"';
3071
 
    case 'x':
3072
 
            {
3073
 
              int i;
3074
 
 
3075
 
              // hex value
3076
 
              for (i = 2; str[i] != '\0' && isxdigit(str[i]); ++i) 
3077
 
          {
3078
 
                        continue;
3079
 
                }
3080
 
 
3081
 
              char save = str[i];
3082
 
              str[i] = '\0';
3083
 
              char out = (char)idl_atoui(&str[2], 16);
3084
 
              str[i] = save;
3085
 
              return out;
3086
 
            }
3087
 
            ACE_NOTREACHED (break;)
3088
 
    default:
3089
 
            // check for octal value
3090
 
            if (str[1] >= '0' && str[1] <= '7') 
3091
 
        {
3092
 
                int i;
3093
 
 
3094
 
                for (i = 1; str[i] >= '0' && str[i] <= '7'; ++i) 
3095
 
            {
3096
 
                          continue;
3097
 
                  }
3098
 
 
3099
 
                char save = str[i];
3100
 
                str[i] = '\0';
3101
 
                char out = (char)idl_atoui(&str[1], 8);
3102
 
                str[i] = save;
3103
 
                return out;
3104
 
              } 
3105
 
      else 
3106
 
        {
3107
 
                return str[1] - 'a';
3108
 
              }
3109
 
            ACE_NOTREACHED  (break;)
3110
 
  }
3111
 
}
3112
 
/*
3113
 
 * Convert escaped hex digits into a wchar
3114
 
 */
3115
 
static ACE_CDR::WChar
3116
 
idl_wchar_escape_reader (char *str)
3117
 
{
3118
 
  if (str[0] != '\\' || str[1] != 'u')
3119
 
    {
3120
 
      return 0;
3121
 
    }
3122
 
 
3123
 
  int i;
3124
 
  // get the hex digits
3125
 
  for (i = 2; str[i] != '\0' && isxdigit (str[i]); i++)
3126
 
    {
3127
 
      continue;
3128
 
    }
3129
 
 
3130
 
  char save = str[i];
3131
 
  str[i] = '\0';
3132
 
  ACE_CDR::WChar out = (ACE_CDR::WChar) idl_atoui (&str[2], 16);
3133
 
  str[i] = save;
3134
 
  return out;
3135
 
}
3136
 
 
3137
 
/*
3138
 
 * Checks wstring for validity
3139
 
 */
3140
 
static char *
3141
 
idl_wstring_escape_reader (char *str)
3142
 
{
3143
 
  return str;
3144
 
}
3145
 
 
3146
 
static char *
3147
 
idl_get_pragma_string (char *pragma)
3148
 
{
3149
 
  // Get pointers to each end of the substring between the quotes.
3150
 
  const char *start = ACE_OS::strchr (pragma, '"') + 1;
3151
 
  const char *end = ACE_OS::strchr (start, '"');
3152
 
 
3153
 
  if (end == 0)
3154
 
    {
3155
 
      idl_global->err ()->syntax_error (
3156
 
          IDL_GlobalData::PS_PragmaPrefixSyntax
3157
 
        );
3158
 
 
3159
 
      return 0;
3160
 
    }
3161
 
 
3162
 
  int len = end - start;
3163
 
  char *retval = 0;
3164
 
 
3165
 
  ACE_NEW_RETURN (retval,
3166
 
                  char[len + 1],
3167
 
                  0);
3168
 
 
3169
 
  ACE_OS::strncpy (retval,
3170
 
                   start,
3171
 
                   len);
3172
 
 
3173
 
  retval[len] = '\0';
3174
 
  return retval;
3175
 
}
3176
 
 
3177
 
static idl_bool
3178
 
idl_valid_version (char *s)
3179
 
{
3180
 
  // Nothing preceding decimal point.
3181
 
  if (*s == '.')
3182
 
    {
3183
 
      return 0;
3184
 
    }
3185
 
 
3186
 
  char *minor = ACE_OS::strchr (s, '.');
3187
 
  int i;
3188
 
 
3189
 
  if (minor == 0)
3190
 
    {
3191
 
      // No decimal point.
3192
 
      return 0;
3193
 
    }
3194
 
 
3195
 
  if (*(minor + 1) == '\0')
3196
 
    {
3197
 
      // Nothing following decimal point.
3198
 
      return 0;
3199
 
    }
3200
 
 
3201
 
  char *tmp = minor + 1;
3202
 
 
3203
 
  for (i = 0; tmp[i] != '\0'; ++i)
3204
 
    {
3205
 
      if (!isdigit (tmp[i]))
3206
 
        {
3207
 
          return 0;
3208
 
        }
3209
 
    }
3210
 
 
3211
 
  int len = minor - s;
3212
 
 
3213
 
  for (i = 0; i < len; ++i)
3214
 
    {
3215
 
      if (!isdigit (s[i]))
3216
 
        {
3217
 
          return 0;
3218
 
        }
3219
 
    }
3220
 
 
3221
 
  // Major and minor version numbers must be unsigned shorts.
3222
 
  if (ACE_OS::atoi (minor + 1) > ACE_UINT16_MAX
3223
 
      || ACE_OS::atoi (s) > ACE_UINT16_MAX)
3224
 
    {
3225
 
      return 0;
3226
 
    }
3227
 
 
3228
 
  return 1;
3229
 
}
3230
 
 
3231
 
static AST_Decl *
3232
 
idl_find_node (char *s)
3233
 
{
3234
 
  UTL_ScopedName *node = idl_global->string_to_scoped_name (s);
3235
 
  AST_Decl *d = 0;
3236
 
 
3237
 
  if (node != 0)
3238
 
    {
3239
 
      d = idl_global->scopes ().top_non_null ()->lookup_by_name (node,
3240
 
                                                                  I_TRUE);
3241
 
    }
3242
 
 
3243
 
  if (d == 0)
3244
 
    {
3245
 
      idl_global->err ()->lookup_error (node);
3246
 
      node->destroy ();
3247
 
      delete node;
3248
 
      node = 0;
3249
 
    }
3250
 
 
3251
 
  return d;
3252
 
}