Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / tests / Concurrency / lex.CC_command.cpp
blob40321000308c26ffd7e59786493c92c2bfc2c5e3
1 /* A lexical scanner generated by flex */
3 /* Scanner skeleton version:
4 */
6 #define FLEX_SCANNER
7 #define ACE_CC_YY_FLEX_MAJOR_VERSION 2
8 #define ACE_CC_YY_FLEX_MINOR_VERSION 5
10 #include "ace/OS_NS_string.h"
13 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
14 #ifdef c_plusplus
15 #ifndef __cplusplus
16 #define __cplusplus
17 #endif
18 #endif
21 #ifdef __cplusplus
23 #include /**/ <stdlib.h>
25 /* Use prototypes in function declarations. */
26 #define ACE_CC_YY_USE_PROTOS
28 /* The "const" storage-class-modifier is valid. */
29 #define ACE_CC_YY_USE_CONST
31 #else /* ! __cplusplus */
33 #if __STDC__
35 #define ACE_CC_YY_USE_PROTOS
36 #define ACE_CC_YY_USE_CONST
38 #endif /* __STDC__ */
39 #endif /* ! __cplusplus */
41 #ifdef __TURBOC__
42 #pragma warn -rch
43 #pragma warn -use
44 #include /**/ <io.h>
45 #include /**/ <stdlib.h>
46 #define ACE_CC_YY_USE_CONST
47 #define ACE_CC_YY_USE_PROTOS
48 #endif
50 #ifdef ACE_CC_YY_USE_CONST
51 #define ace_cc_yyconst const
52 #else
53 #define ace_cc_yyconst
54 #endif
57 #ifdef ACE_CC_YY_USE_PROTOS
58 #define ACE_CC_YY_PROTO(proto) proto
59 #else
60 #define ACE_CC_YY_PROTO(proto) ()
61 #endif
63 /* Returned upon end-of-file. */
64 #define ACE_CC_YY_NULL 0
66 /* Promotes a possibly negative, possibly signed char to an unsigned
67 * integer for use as an array index. If the signed char is negative,
68 * we want to instead treat it as an 8-bit unsigned char, hence the
69 * double cast.
71 #define ACE_CC_YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
73 /* Enter a start condition. This macro really ought to take a parameter,
74 * but we do it the disgusting crufty way forced on us by the ()-less
75 * definition of BEGIN.
77 #define BEGIN ace_cc_yy_start = 1 + 2 *
79 /* Translate the current start state into a value that can be later handed
80 * to BEGIN to return to the state. The ACE_CC_YYSTATE alias is for lex
81 * compatibility.
83 #define ACE_CC_YY_START ((ace_cc_yy_start - 1) / 2)
84 #define ACE_CC_YYSTATE ACE_CC_YY_START
86 /* Action number for EOF rule of a given start state. */
87 #define ACE_CC_YY_STATE_EOF(state) (ACE_CC_YY_END_OF_BUFFER + state + 1)
89 /* Special action meaning "start processing a new file". */
90 #define ACE_CC_YY_NEW_FILE ace_cc_yyrestart( ace_cc_yyin )
92 #define ACE_CC_YY_END_OF_BUFFER_CHAR 0
94 /* Size of default input buffer. */
95 #define ACE_CC_YY_BUF_SIZE 16384
97 typedef struct ace_cc_yy_buffer_state *ACE_CC_YY_BUFFER_STATE;
99 extern int ace_cc_yyleng;
100 extern FILE *ace_cc_yyin, *ace_cc_yyout;
102 #define EOB_ACT_CONTINUE_SCAN 0
103 #define EOB_ACT_END_OF_FILE 1
104 #define EOB_ACT_LAST_MATCH 2
106 /* The funky do-while in the following #define is used to turn the definition
107 * int a single C statement (which needs a semi-colon terminator). This
108 * avoids problems with code like:
110 * if ( condition_holds )
111 * ace_cc_yyless( 5 );
112 * else
113 * do_something_else();
115 * Prior to using the do-while the compiler would get upset at the
116 * "else" because it interpreted the "if" statement as being all
117 * done when it reached the ';' after the ace_cc_yyless() call.
120 /* Return all but the first 'n' matched characters back to the input stream. */
122 #define ace_cc_yyless(n) \
123 do \
125 /* Undo effects of setting up ace_cc_yytext. */ \
126 *ace_cc_yy_cp = ace_cc_yy_hold_char; \
127 ACE_CC_YY_RESTORE_ACE_CC_YY_MORE_OFFSET \
128 ace_cc_yy_c_buf_p = ace_cc_yy_cp = ace_cc_yy_bp + n - ACE_CC_YY_MORE_ADJ; \
129 ACE_CC_YY_DO_BEFORE_ACTION; /* set up ace_cc_yytext again */ \
131 while ( 0 )
133 #define unput(c) ace_cc_yyunput( c, ace_cc_yytext_ptr )
135 /* The following is because we cannot portably get our hands on size_t
136 * (without autoconf's help, which isn't available because we want
137 * flex-generated scanners to compile on their own).
139 typedef unsigned int ace_cc_yy_size_t;
142 struct ace_cc_yy_buffer_state
144 FILE *ace_cc_yy_input_file;
146 char *ace_cc_yy_ch_buf; /* input buffer */
147 char *ace_cc_yy_buf_pos; /* current position in input buffer */
149 /* Size of input buffer in bytes, not including room for EOB
150 * characters.
152 ace_cc_yy_size_t ace_cc_yy_buf_size;
154 /* Number of characters read into ace_cc_yy_ch_buf, not including EOB
155 * characters.
157 int ace_cc_yy_n_chars;
159 /* Whether we "own" the buffer - i.e., we know we created it,
160 * and can realloc() it to grow it, and should free() it to
161 * delete it.
163 int ace_cc_yy_is_our_buffer;
165 /* Whether this is an "interactive" input source; if so, and
166 * if we're using stdio for input, then we want to use getc()
167 * instead of fread(), to make sure we stop fetching input after
168 * each newline.
170 int ace_cc_yy_is_interactive;
172 /* Whether we're considered to be at the beginning of a line.
173 * If so, '^' rules will be active on the next match, otherwise
174 * not.
176 int ace_cc_yy_at_bol;
178 /* Whether to try to fill the input buffer when we reach the
179 * end of it.
181 int ace_cc_yy_fill_buffer;
183 int ace_cc_yy_buffer_status;
184 #define ACE_CC_YY_BUFFER_NEW 0
185 #define ACE_CC_YY_BUFFER_NORMAL 1
186 /* When an EOF's been seen but there's still some text to process
187 * then we mark the buffer as ACE_CC_YY_EOF_PENDING, to indicate that we
188 * shouldn't try reading from the input source any more. We might
189 * still have a bunch of tokens to match, though, because of
190 * possible backing-up.
192 * When we actually see the EOF, we change the status to "new"
193 * (via ace_cc_yyrestart()), so that the user can continue scanning by
194 * just pointing ace_cc_yyin at a new input file.
196 #define ACE_CC_YY_BUFFER_EOF_PENDING 2
199 static ACE_CC_YY_BUFFER_STATE ace_cc_yy_current_buffer = 0;
201 /* We provide macros for accessing buffer states in case in the
202 * future we want to put the buffer states in a more general
203 * "scanner state".
205 #define ACE_CC_YY_CURRENT_BUFFER ace_cc_yy_current_buffer
208 /* ace_cc_yy_hold_char holds the character lost when ace_cc_yytext is formed. */
209 static char ace_cc_yy_hold_char;
211 static int ace_cc_yy_n_chars; /* number of characters read into ace_cc_yy_ch_buf */
214 int ace_cc_yyleng;
216 /* Points to current character in buffer. */
217 static char *ace_cc_yy_c_buf_p = (char *) 0;
218 static int ace_cc_yy_init = 1; /* whether we need to initialize */
219 static int ace_cc_yy_start = 0; /* start state number */
221 #define ace_cc_yywrap() 1
222 /* Flag which is used to allow ace_cc_yywrap()'s to do buffer switches
223 * instead of setting up a fresh ace_cc_yyin. A bit of a hack ...
225 #if (ace_cc_yywrap() != 1)
226 static int ace_cc_yy_did_buffer_switch_on_eof;
227 #endif
229 void ace_cc_yyrestart ACE_CC_YY_PROTO(( FILE *input_file ));
231 void ace_cc_yy_switch_to_buffer ACE_CC_YY_PROTO(( ACE_CC_YY_BUFFER_STATE new_buffer ));
232 void ace_cc_yy_load_buffer_state ACE_CC_YY_PROTO(( void ));
233 ACE_CC_YY_BUFFER_STATE ace_cc_yy_create_buffer ACE_CC_YY_PROTO(( FILE *file, int size ));
234 void ace_cc_yy_delete_buffer ACE_CC_YY_PROTO(( ACE_CC_YY_BUFFER_STATE b ));
235 void ace_cc_yy_init_buffer ACE_CC_YY_PROTO(( ACE_CC_YY_BUFFER_STATE b, FILE *file ));
236 void ace_cc_yy_flush_buffer ACE_CC_YY_PROTO(( ACE_CC_YY_BUFFER_STATE b ));
237 #define ACE_CC_YY_FLUSH_BUFFER ace_cc_yy_flush_buffer( ace_cc_yy_current_buffer )
239 ACE_CC_YY_BUFFER_STATE ace_cc_yy_scan_buffer ACE_CC_YY_PROTO(( char *base, ace_cc_yy_size_t size ));
240 ACE_CC_YY_BUFFER_STATE ace_cc_yy_scan_string ACE_CC_YY_PROTO(( ace_cc_yyconst char *ace_cc_yy_str ));
241 ACE_CC_YY_BUFFER_STATE ace_cc_yy_scan_bytes ACE_CC_YY_PROTO(( ace_cc_yyconst char *bytes, int len ));
243 static void *ace_cc_yy_flex_alloc ACE_CC_YY_PROTO(( ace_cc_yy_size_t ));
244 static void *ace_cc_yy_flex_realloc ACE_CC_YY_PROTO(( void *, ace_cc_yy_size_t ));
245 static void ace_cc_yy_flex_free ACE_CC_YY_PROTO(( void * ));
247 #define ace_cc_yy_new_buffer ace_cc_yy_create_buffer
249 #define ace_cc_yy_set_interactive(is_interactive) \
251 if ( ! ace_cc_yy_current_buffer ) \
252 ace_cc_yy_current_buffer = ace_cc_yy_create_buffer( ace_cc_yyin, ACE_CC_YY_BUF_SIZE ); \
253 ace_cc_yy_current_buffer->ace_cc_yy_is_interactive = is_interactive; \
256 #define ace_cc_yy_set_bol(at_bol) \
258 if ( ! ace_cc_yy_current_buffer ) \
259 ace_cc_yy_current_buffer = ace_cc_yy_create_buffer( ace_cc_yyin, ACE_CC_YY_BUF_SIZE ); \
260 ace_cc_yy_current_buffer->ace_cc_yy_at_bol = at_bol; \
263 #define ACE_CC_YY_AT_BOL() (ace_cc_yy_current_buffer->ace_cc_yy_at_bol)
266 #define ACE_CC_YY_SKIP_ACE_CC_YYWRAP
267 typedef unsigned char ACE_CC_YY_CHAR;
268 FILE *ace_cc_yyin = (FILE *) 0, *ace_cc_yyout = (FILE *) 0;
269 typedef int ace_cc_yy_state_type;
270 extern char *ace_cc_yytext;
271 #define ace_cc_yytext_ptr ace_cc_yytext
273 static ace_cc_yy_state_type ace_cc_yy_get_previous_state ACE_CC_YY_PROTO(( void ));
274 static ace_cc_yy_state_type ace_cc_yy_try_NUL_trans ACE_CC_YY_PROTO(( ace_cc_yy_state_type current_state ));
275 static int ace_cc_yy_get_next_buffer ACE_CC_YY_PROTO(( void ));
276 static void ace_cc_yy_fatal_error ACE_CC_YY_PROTO(( ace_cc_yyconst char msg[] ));
278 /* Done after the current pattern has been matched and before the
279 * corresponding action - sets up ace_cc_yytext.
281 #define ACE_CC_YY_DO_BEFORE_ACTION \
282 ace_cc_yytext_ptr = ace_cc_yy_bp; \
283 ace_cc_yyleng = (int) (ace_cc_yy_cp - ace_cc_yy_bp); \
284 ace_cc_yy_hold_char = *ace_cc_yy_cp; \
285 *ace_cc_yy_cp = '\0'; \
286 ace_cc_yy_c_buf_p = ace_cc_yy_cp;
288 #define ACE_CC_YY_NUM_RULES 25
289 #define ACE_CC_YY_END_OF_BUFFER 26
290 static ace_cc_yyconst short int ace_cc_yy_accept[124] =
291 { 0,
292 0, 0, 26, 25, 24, 23, 25, 20, 1, 21,
293 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
294 25, 24, 23, 0, 19, 20, 21, 21, 21, 21,
295 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
296 21, 0, 21, 21, 21, 21, 21, 21, 21, 21,
297 21, 21, 21, 21, 21, 21, 21, 21, 0, 22,
298 21, 21, 21, 21, 4, 21, 21, 14, 21, 21,
299 21, 21, 21, 21, 9, 21, 21, 21, 21, 21,
300 21, 10, 21, 8, 2, 21, 21, 21, 17, 21,
301 3, 21, 21, 13, 11, 21, 5, 21, 21, 21,
303 21, 21, 16, 21, 21, 21, 6, 21, 12, 21,
304 21, 21, 7, 21, 21, 21, 21, 21, 21, 15,
305 21, 18, 0
308 static ace_cc_yyconst int ace_cc_yy_ec[256] =
309 { 0,
310 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
311 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
312 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
313 1, 3, 1, 4, 1, 1, 1, 1, 1, 1,
314 1, 1, 1, 1, 1, 5, 6, 7, 7, 7,
315 7, 7, 7, 7, 7, 7, 7, 5, 8, 1,
316 1, 1, 1, 1, 9, 9, 9, 9, 9, 9,
317 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
318 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
319 1, 1, 1, 1, 10, 1, 11, 9, 12, 13,
321 14, 9, 15, 16, 17, 9, 18, 19, 20, 21,
322 22, 23, 9, 24, 25, 26, 27, 9, 28, 29,
323 30, 9, 1, 1, 1, 1, 1, 1, 1, 1,
324 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
325 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
326 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
327 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
328 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
329 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
330 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
332 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
333 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
334 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
335 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
336 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
337 1, 1, 1, 1, 1
340 static ace_cc_yyconst int ace_cc_yy_meta[31] =
341 { 0,
342 1, 2, 1, 1, 3, 3, 3, 1, 3, 3,
343 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
344 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
347 static ace_cc_yyconst short int ace_cc_yy_base[128] =
348 { 0,
349 0, 136, 141, 143, 0, 137, 135, 131, 143, 0,
350 15, 108, 115, 113, 110, 119, 14, 108, 11, 24,
351 125, 0, 127, 125, 124, 120, 0, 115, 111, 112,
352 97, 24, 105, 26, 107, 109, 89, 99, 102, 99,
353 98, 112, 92, 101, 97, 96, 91, 90, 86, 93,
354 91, 90, 79, 92, 79, 76, 73, 72, 95, 143,
355 81, 69, 71, 72, 0, 65, 65, 0, 79, 66,
356 62, 68, 74, 74, 0, 70, 69, 68, 55, 54,
357 56, 0, 52, 0, 0, 55, 58, 62, 0, 64,
358 0, 56, 55, 0, 0, 59, 0, 56, 49, 46,
360 45, 48, 0, 43, 43, 42, 0, 49, 0, 51,
361 46, 14, 0, 45, 30, 40, 30, 32, 18, 0,
362 29, 0, 143, 49, 52, 38, 55
365 static ace_cc_yyconst short int ace_cc_yy_def[128] =
366 { 0,
367 123, 1, 123, 123, 124, 123, 125, 123, 123, 126,
368 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
369 123, 124, 123, 125, 125, 123, 126, 126, 126, 126,
370 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
371 126, 127, 126, 126, 126, 126, 126, 126, 126, 126,
372 126, 126, 126, 126, 126, 126, 126, 126, 127, 123,
373 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
374 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
375 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
376 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
378 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
379 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
380 126, 126, 0, 123, 123, 123, 123
383 static ace_cc_yyconst short int ace_cc_yy_nxt[174] =
384 { 0,
385 4, 5, 6, 7, 4, 4, 8, 9, 10, 4,
386 10, 11, 10, 12, 10, 10, 13, 10, 14, 10,
387 10, 10, 15, 16, 17, 18, 19, 20, 10, 10,
388 28, 38, 35, 39, 40, 47, 50, 114, 29, 36,
389 27, 115, 122, 121, 120, 48, 119, 41, 51, 22,
390 118, 22, 24, 117, 24, 59, 59, 59, 116, 113,
391 112, 111, 110, 109, 108, 107, 106, 105, 104, 103,
392 102, 101, 100, 99, 98, 97, 96, 95, 94, 93,
393 92, 91, 90, 89, 88, 87, 86, 85, 84, 83,
394 82, 81, 80, 79, 78, 77, 60, 76, 75, 74,
396 73, 72, 71, 70, 69, 68, 67, 66, 65, 64,
397 63, 62, 61, 60, 58, 57, 56, 55, 54, 53,
398 52, 49, 46, 45, 44, 43, 26, 25, 25, 23,
399 42, 37, 34, 33, 32, 31, 30, 26, 25, 23,
400 123, 21, 3, 123, 123, 123, 123, 123, 123, 123,
401 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
402 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
403 123, 123, 123
406 static ace_cc_yyconst short int ace_cc_yy_chk[174] =
407 { 0,
408 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
409 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
410 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
411 11, 19, 17, 19, 20, 32, 34, 112, 11, 17,
412 126, 112, 121, 119, 118, 32, 117, 20, 34, 124,
413 116, 124, 125, 115, 125, 127, 127, 127, 114, 111,
414 110, 108, 106, 105, 104, 102, 101, 100, 99, 98,
415 96, 93, 92, 90, 88, 87, 86, 83, 81, 80,
416 79, 78, 77, 76, 74, 73, 72, 71, 70, 69,
417 67, 66, 64, 63, 62, 61, 59, 58, 57, 56,
419 55, 54, 53, 52, 51, 50, 49, 48, 47, 46,
420 45, 44, 43, 42, 41, 40, 39, 38, 37, 36,
421 35, 33, 31, 30, 29, 28, 26, 25, 24, 23,
422 21, 18, 16, 15, 14, 13, 12, 8, 7, 6,
423 3, 2, 123, 123, 123, 123, 123, 123, 123, 123,
424 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
425 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
426 123, 123, 123
429 static ace_cc_yy_state_type ace_cc_yy_last_accepting_state;
430 static char *ace_cc_yy_last_accepting_cpos;
432 /* The intent behind this definition is that it'll catch
433 * any uses of REJECT which flex missed.
435 #define REJECT reject_used_but_not_detected
436 #define ace_cc_yymore() ace_cc_yymore_used_but_not_detected
437 #define ACE_CC_YY_MORE_ADJ 0
438 #define ACE_CC_YY_RESTORE_ACE_CC_YY_MORE_OFFSET
439 char *ace_cc_yytext;
440 #define INITIAL 0
441 //=============================================================================
443 * This is the lex file for the concurrency service script language.
445 //=============================================================================
447 #define ACE_CC_YY_NO_UNPUT 1
448 #define ACE_CC_YY_NO_INPUT 1
449 #define ACE_CC_YY_ALWAYS_INTERACTIVE 1
450 #include "CC_command.h"
451 #include "CC_command.tab.h"
452 #include "ace/ACE.h"
454 extern int line_no;
455 extern char line_buf[500];
457 /* Macros after this point can all be overridden by user definitions in
458 * section 1.
461 #ifndef ACE_CC_YY_SKIP_ACE_CC_YYWRAP
462 #ifdef __cplusplus
463 extern "C" int ace_cc_yywrap ACE_CC_YY_PROTO(( void ));
464 #else
465 extern int ace_cc_yywrap ACE_CC_YY_PROTO(( void ));
466 #endif
467 #endif
469 #ifndef ACE_CC_YY_NO_UNPUT
470 static void ace_cc_yyunput ACE_CC_YY_PROTO(( int c, char *buf_ptr ));
471 #endif
473 #ifndef ace_cc_yytext_ptr
474 static void ace_cc_yy_flex_strncpy ACE_CC_YY_PROTO(( char *, ace_cc_yyconst char *, int ));
475 #endif
477 #ifdef ACE_CC_YY_NEED_STRLEN
478 static int ace_cc_yy_flex_strlen ACE_CC_YY_PROTO(( ace_cc_yyconst char * ));
479 #endif
481 #ifndef ACE_CC_YY_NO_INPUT
482 #ifdef __cplusplus
483 static int ace_cc_yyinput ACE_CC_YY_PROTO(( void ));
484 #else
485 static int input ACE_CC_YY_PROTO(( void ));
486 #endif
487 #endif
489 #if ACE_CC_YY_STACK_USED
490 static int ace_cc_yy_start_stack_ptr = 0;
491 static int ace_cc_yy_start_stack_depth = 0;
492 static int *ace_cc_yy_start_stack = 0;
493 #ifndef ACE_CC_YY_NO_PUSH_STATE
494 static void ace_cc_yy_push_state ACE_CC_YY_PROTO(( int new_state ));
495 #endif
496 #ifndef ACE_CC_YY_NO_POP_STATE
497 static void ace_cc_yy_pop_state ACE_CC_YY_PROTO(( void ));
498 #endif
499 #ifndef ACE_CC_YY_NO_TOP_STATE
500 static int ace_cc_yy_top_state ACE_CC_YY_PROTO(( void ));
501 #endif
503 #else
504 #define ACE_CC_YY_NO_PUSH_STATE 1
505 #define ACE_CC_YY_NO_POP_STATE 1
506 #define ACE_CC_YY_NO_TOP_STATE 1
507 #endif
509 #ifdef ACE_CC_YY_MALLOC_DECL
510 ACE_CC_YY_MALLOC_DECL
511 #else
512 #if __STDC__
513 #ifndef __cplusplus
514 #include /**/ <stdlib.h>
515 #endif
516 #else
517 /* Just try to get by without declaring the routines. This will fail
518 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
519 * or sizeof(void*) != sizeof(int).
521 #endif
522 #endif
524 /* Amount of stuff to slurp up with each read. */
525 #ifndef ACE_CC_YY_READ_BUF_SIZE
526 #define ACE_CC_YY_READ_BUF_SIZE 8192
527 #endif
529 /* Copy whatever the last rule matched to the standard output. */
531 //FUZZ: disable check_for_lack_ACE_OS
532 #ifndef ACE_CC_ECHO
533 /* This used to be an fputs(), but since the string might contain NUL's,
534 * we now use fwrite().
536 #define ACE_CC_ECHO { size_t __dum_ret = fwrite( ace_cc_yytext, ace_cc_yyleng, 1, ace_cc_yyout ); (void) __dum_ret; }
537 #endif
538 //FUZZ: enable check_for_lack_ACE_OS
540 /* Gets input and stuffs it into "buf". number of characters read, or ACE_CC_YY_NULL,
541 * is returned in "result".
543 #ifndef ACE_CC_YY_INPUT
544 #define ACE_CC_YY_INPUT(buf,result,max_size) \
545 if ( ace_cc_yy_current_buffer->ace_cc_yy_is_interactive ) \
547 int c = '*', n; \
548 for ( n = 0; n < max_size && \
549 (c = ACE_OS::getc( ace_cc_yyin )) != EOF && c != '\n'; ++n ) \
550 buf[n] = (char) c; \
551 if ( c == '\n' ) \
552 buf[n++] = (char) c; \
553 if ( c == EOF && ferror( ace_cc_yyin ) ) \
554 ACE_CC_YY_FATAL_ERROR( "input in flex scanner failed" ); \
555 result = n; \
557 else if ( ((result = ACE_OS::fread( buf, 1, max_size, ace_cc_yyin )) == 0) \
558 && ferror( ace_cc_yyin ) ) \
559 ACE_CC_YY_FATAL_ERROR( "input in flex scanner failed" );
560 #endif
562 /* No semi-colon after return; correct usage is to write "ace_cc_yyterminate();" -
563 * we don't want an extra ';' after the "return" because that will cause
564 * some compilers to complain about unreachable statements.
566 #ifndef ace_cc_yyterminate
567 #define ace_cc_yyterminate() return ACE_CC_YY_NULL
568 #endif
570 /* Number of entries by which start-condition stack grows. */
571 #ifndef ACE_CC_YY_START_STACK_INCR
572 #define ACE_CC_YY_START_STACK_INCR 25
573 #endif
575 /* Report a fatal error. */
576 #ifndef ACE_CC_YY_FATAL_ERROR
577 #define ACE_CC_YY_FATAL_ERROR(msg) ace_cc_yy_fatal_error( msg )
578 #endif
580 /* Default declaration of generated scanner - a define so the user can
581 * easily add parameters.
583 #ifndef ACE_CC_YY_DECL
584 #define ACE_CC_YY_DECL int ace_cc_yylex ACE_CC_YY_PROTO(( void ))
585 #endif
587 /* Code executed at the beginning of each rule, after ace_cc_yytext and ace_cc_yyleng
588 * have been set up.
590 #ifndef ACE_CC_YY_USER_ACTION
591 #define ACE_CC_YY_USER_ACTION
592 #endif
594 /* Code executed at the end of each rule. */
595 #ifndef ACE_CC_YY_BREAK
596 #define ACE_CC_YY_BREAK break;
597 #endif
599 #define ACE_CC_YY_RULE_SETUP \
600 if ( ace_cc_yyleng > 0 ) \
601 ace_cc_yy_current_buffer->ace_cc_yy_at_bol = \
602 (ace_cc_yytext[ace_cc_yyleng - 1] == '\n'); \
603 ACE_CC_YY_USER_ACTION
605 ACE_CC_YY_DECL
607 ace_cc_yy_state_type ace_cc_yy_current_state;
608 char *ace_cc_yy_cp = 0, *ace_cc_yy_bp = 0;
609 int ace_cc_yy_act;
613 if ( ace_cc_yy_init )
615 ace_cc_yy_init = 0;
617 #ifdef ACE_CC_YY_USER_INIT
618 ACE_CC_YY_USER_INIT;
619 #endif
621 if ( ! ace_cc_yy_start )
622 ace_cc_yy_start = 1; /* first start state */
624 if ( ! ace_cc_yyin )
625 ace_cc_yyin = stdin;
627 if ( ! ace_cc_yyout )
628 ace_cc_yyout = stdout;
630 if ( ! ace_cc_yy_current_buffer )
631 ace_cc_yy_current_buffer =
632 ace_cc_yy_create_buffer( ace_cc_yyin, ACE_CC_YY_BUF_SIZE );
634 ace_cc_yy_load_buffer_state();
637 ace_cc_yy_cp = ace_cc_yy_bp = 0; /* To avoid g++ warning about
638 possible uninitialized use. */
639 while ( 1 ) /* loops until end-of-file is reached */
641 ace_cc_yy_cp = ace_cc_yy_c_buf_p;
643 /* Support of ace_cc_yytext. */
644 *ace_cc_yy_cp = ace_cc_yy_hold_char;
646 /* ace_cc_yy_bp points to the position in ace_cc_yy_ch_buf of the start of
647 * the current run.
649 ace_cc_yy_bp = ace_cc_yy_cp;
651 ace_cc_yy_current_state = ace_cc_yy_start;
652 ace_cc_yy_current_state += ACE_CC_YY_AT_BOL();
653 ace_cc_yy_match:
656 ACE_CC_YY_CHAR ace_cc_yy_c = ace_cc_yy_ec[ACE_CC_YY_SC_TO_UI(*ace_cc_yy_cp)];
657 if ( ace_cc_yy_accept[ace_cc_yy_current_state] )
659 ace_cc_yy_last_accepting_state = ace_cc_yy_current_state;
660 ace_cc_yy_last_accepting_cpos = ace_cc_yy_cp;
662 while ( ace_cc_yy_chk[ace_cc_yy_base[ace_cc_yy_current_state] + ace_cc_yy_c] != ace_cc_yy_current_state )
664 ace_cc_yy_current_state = (int) ace_cc_yy_def[ace_cc_yy_current_state];
665 if ( ace_cc_yy_current_state >= 124 )
666 ace_cc_yy_c = ace_cc_yy_meta[(unsigned int) ace_cc_yy_c];
668 ace_cc_yy_current_state = ace_cc_yy_nxt[ace_cc_yy_base[ace_cc_yy_current_state] + (unsigned int) ace_cc_yy_c];
669 ++ace_cc_yy_cp;
671 while ( ace_cc_yy_base[ace_cc_yy_current_state] != 143 );
673 ace_cc_yy_find_action:
674 ace_cc_yy_act = ace_cc_yy_accept[ace_cc_yy_current_state];
675 if ( ace_cc_yy_act == 0 )
676 { /* have to back up */
677 ace_cc_yy_cp = ace_cc_yy_last_accepting_cpos;
678 ace_cc_yy_current_state = ace_cc_yy_last_accepting_state;
679 ace_cc_yy_act = ace_cc_yy_accept[ace_cc_yy_current_state];
682 ACE_CC_YY_DO_BEFORE_ACTION;
685 do_action: /* This label is used only to access EOF actions. */
688 switch ( ace_cc_yy_act )
689 { /* beginning of action switch */
690 case 0: /* must back up */
691 /* undo the effects of ACE_CC_YY_DO_BEFORE_ACTION */
692 *ace_cc_yy_cp = ace_cc_yy_hold_char;
693 ace_cc_yy_cp = ace_cc_yy_last_accepting_cpos;
694 ace_cc_yy_current_state = ace_cc_yy_last_accepting_state;
695 goto ace_cc_yy_find_action;
697 case 1:
698 ACE_CC_YY_RULE_SETUP
699 return T_TERM;
700 /* ACE_CC_YY_BREAK */
701 case 2:
702 ACE_CC_YY_RULE_SETUP
703 return T_START_CMD;
704 /* ACE_CC_YY_BREAK */
705 case 3:
706 ACE_CC_YY_RULE_SETUP
707 return T_CREATE_CMD;
708 /* ACE_CC_YY_BREAK */
709 case 4:
710 ACE_CC_YY_RULE_SETUP
711 return T_LOCK_CMD;
712 /* ACE_CC_YY_BREAK */
713 case 5:
714 ACE_CC_YY_RULE_SETUP
715 return T_UNLOCK_CMD;
716 /* ACE_CC_YY_BREAK */
717 case 6:
718 ACE_CC_YY_RULE_SETUP
719 return T_TRYLOCK_CMD;
720 /* ACE_CC_YY_BREAK */
721 case 7:
722 ACE_CC_YY_RULE_SETUP
723 return T_CHANGEMODE_CMD;
724 /* ACE_CC_YY_BREAK */
725 case 8:
726 ACE_CC_YY_RULE_SETUP
727 return T_SLEEP_CMD;
728 /* ACE_CC_YY_BREAK */
729 case 9:
730 ACE_CC_YY_RULE_SETUP
731 return T_WAIT_CMD;
732 /* ACE_CC_YY_BREAK */
733 case 10:
734 ACE_CC_YY_RULE_SETUP
735 return T_PRINT_CMD;
736 /* ACE_CC_YY_BREAK */
737 case 11:
738 ACE_CC_YY_RULE_SETUP
739 return T_REPEAT_CMD;
740 /* ACE_CC_YY_BREAK */
741 case 12:
742 ACE_CC_YY_RULE_SETUP
743 return T_EXCEP_CMD;
744 /* ACE_CC_YY_BREAK */
745 case 13:
746 ACE_CC_YY_RULE_SETUP
747 return T_LOOKUP_CMD;
748 /* ACE_CC_YY_BREAK */
749 case 14:
750 ACE_CC_YY_RULE_SETUP
751 return T_READ;
752 /* ACE_CC_YY_BREAK */
753 case 15:
754 ACE_CC_YY_RULE_SETUP
755 return T_IREAD;
756 /* ACE_CC_YY_BREAK */
757 case 16:
758 ACE_CC_YY_RULE_SETUP
759 return T_UPGRADE;
760 /* ACE_CC_YY_BREAK */
761 case 17:
762 ACE_CC_YY_RULE_SETUP
763 return T_WRITE;
764 /* ACE_CC_YY_BREAK */
765 case 18:
766 ACE_CC_YY_RULE_SETUP
767 return T_IWRITE;
768 /* ACE_CC_YY_BREAK */
769 case 19:
770 ACE_CC_YY_RULE_SETUP
771 { ace_cc_yylval.id = ACE_OS::strdup(&ace_cc_yytext[1]);
772 ace_cc_yylval.id[ace_cc_yyleng-2]='\0';
773 return Q_STRING; }
774 /* ACE_CC_YY_BREAK */
775 case 20:
776 ACE_CC_YY_RULE_SETUP
777 { ace_cc_yylval.num = ACE_OS::atoi(ace_cc_yytext); return T_NUM; }
778 /* ACE_CC_YY_BREAK */
779 case 21:
780 ACE_CC_YY_RULE_SETUP
781 { ace_cc_yylval.id = ACE_OS::strdup(ace_cc_yytext);
782 return T_IDENT; }
783 /* ACE_CC_YY_BREAK */
784 case 22:
785 ACE_CC_YY_RULE_SETUP
787 ACE_CC_YY_BREAK
788 case 23:
789 ACE_CC_YY_RULE_SETUP
791 ACE_CC_YY_BREAK
792 case 24:
793 ACE_CC_YY_RULE_SETUP
794 { line_no ++;
795 ACE_OS::strcpy(line_buf, ace_cc_yytext+1);
796 ace_cc_yyless(1); }
797 ACE_CC_YY_BREAK
798 case 25:
799 ACE_CC_YY_RULE_SETUP
800 ACE_CC_ECHO;
801 ACE_CC_YY_BREAK
802 case ACE_CC_YY_STATE_EOF(INITIAL):
803 ace_cc_yyterminate();
805 case ACE_CC_YY_END_OF_BUFFER:
807 /* Amount of text matched not including the EOB char. */
808 int ace_cc_yy_amount_of_matched_text = (int) (ace_cc_yy_cp - ace_cc_yytext_ptr) - 1;
810 /* Undo the effects of ACE_CC_YY_DO_BEFORE_ACTION. */
811 *ace_cc_yy_cp = ace_cc_yy_hold_char;
812 ACE_CC_YY_RESTORE_ACE_CC_YY_MORE_OFFSET
814 if ( ace_cc_yy_current_buffer->ace_cc_yy_buffer_status == ACE_CC_YY_BUFFER_NEW )
816 /* We're scanning a new file or input source. It's
817 * possible that this happened because the user
818 * just pointed ace_cc_yyin at a new source and called
819 * ace_cc_yylex(). If so, then we have to assure
820 * consistency between ace_cc_yy_current_buffer and our
821 * globals. Here is the right place to do so, because
822 * this is the first action (other than possibly a
823 * back-up) that will match for the new input source.
825 ace_cc_yy_n_chars = ace_cc_yy_current_buffer->ace_cc_yy_n_chars;
826 ace_cc_yy_current_buffer->ace_cc_yy_input_file = ace_cc_yyin;
827 ace_cc_yy_current_buffer->ace_cc_yy_buffer_status = ACE_CC_YY_BUFFER_NORMAL;
830 /* Note that here we test for ace_cc_yy_c_buf_p "<=" to the position
831 * of the first EOB in the buffer, since ace_cc_yy_c_buf_p will
832 * already have been incremented past the NUL character
833 * (since all states make transitions on EOB to the
834 * end-of-buffer state). Contrast this with the test
835 * in input().
837 if ( ace_cc_yy_c_buf_p <= &ace_cc_yy_current_buffer->ace_cc_yy_ch_buf[ace_cc_yy_n_chars] )
838 { /* This was really a NUL. */
839 ace_cc_yy_state_type ace_cc_yy_next_state;
841 ace_cc_yy_c_buf_p = ace_cc_yytext_ptr + ace_cc_yy_amount_of_matched_text;
843 ace_cc_yy_current_state = ace_cc_yy_get_previous_state();
845 /* Okay, we're now positioned to make the NUL
846 * transition. We couldn't have
847 * ace_cc_yy_get_previous_state() go ahead and do it
848 * for us because it doesn't know how to deal
849 * with the possibility of jamming (and we don't
850 * want to build jamming into it because then it
851 * will run more slowly).
854 ace_cc_yy_next_state = ace_cc_yy_try_NUL_trans( ace_cc_yy_current_state );
856 ace_cc_yy_bp = ace_cc_yytext_ptr + ACE_CC_YY_MORE_ADJ;
858 if ( ace_cc_yy_next_state )
860 /* Consume the NUL. */
861 ace_cc_yy_cp = ++ace_cc_yy_c_buf_p;
862 ace_cc_yy_current_state = ace_cc_yy_next_state;
863 goto ace_cc_yy_match;
866 else
868 ace_cc_yy_cp = ace_cc_yy_c_buf_p;
869 goto ace_cc_yy_find_action;
873 else switch ( ace_cc_yy_get_next_buffer() )
875 case EOB_ACT_END_OF_FILE:
877 #if (ace_cc_yywrap() != 1)
878 ace_cc_yy_did_buffer_switch_on_eof = 0;
879 #endif
881 if ( ace_cc_yywrap() )
883 /* Note: because we've taken care in
884 * ace_cc_yy_get_next_buffer() to have set up
885 * ace_cc_yytext, we can now set up
886 * ace_cc_yy_c_buf_p so that if some total
887 * hoser (like flex itself) wants to
888 * call the scanner after we return the
889 * ACE_CC_YY_NULL, it'll still work - another
890 * ACE_CC_YY_NULL will get returned.
892 ace_cc_yy_c_buf_p = ace_cc_yytext_ptr + ACE_CC_YY_MORE_ADJ;
894 ace_cc_yy_act = ACE_CC_YY_STATE_EOF(ACE_CC_YY_START);
895 goto do_action;
898 else
900 #if (ace_cc_yywrap() != 1)
901 if ( ! ace_cc_yy_did_buffer_switch_on_eof )
902 ACE_CC_YY_NEW_FILE;
903 #endif
905 break;
908 case EOB_ACT_CONTINUE_SCAN:
909 ace_cc_yy_c_buf_p =
910 ace_cc_yytext_ptr + ace_cc_yy_amount_of_matched_text;
912 ace_cc_yy_current_state = ace_cc_yy_get_previous_state();
914 ace_cc_yy_cp = ace_cc_yy_c_buf_p;
915 ace_cc_yy_bp = ace_cc_yytext_ptr + ACE_CC_YY_MORE_ADJ;
916 goto ace_cc_yy_match;
918 case EOB_ACT_LAST_MATCH:
919 ace_cc_yy_c_buf_p =
920 &ace_cc_yy_current_buffer->ace_cc_yy_ch_buf[ace_cc_yy_n_chars];
922 ace_cc_yy_current_state = ace_cc_yy_get_previous_state();
924 ace_cc_yy_cp = ace_cc_yy_c_buf_p;
925 ace_cc_yy_bp = ace_cc_yytext_ptr + ACE_CC_YY_MORE_ADJ;
926 goto ace_cc_yy_find_action;
928 break;
931 default:
932 ACE_CC_YY_FATAL_ERROR(
933 "fatal flex scanner internal error--no action found" );
934 } /* end of action switch */
935 } /* end of scanning one token */
936 } /* end of ace_cc_yylex */
939 /* ace_cc_yy_get_next_buffer - try to read in a new buffer
941 * Returns a code representing an action:
942 * EOB_ACT_LAST_MATCH -
943 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
944 * EOB_ACT_END_OF_FILE - end of file
947 static int ace_cc_yy_get_next_buffer()
949 char *dest = ace_cc_yy_current_buffer->ace_cc_yy_ch_buf;
950 char *source = ace_cc_yytext_ptr;
951 int number_to_move, i;
952 int ret_val;
954 if ( ace_cc_yy_c_buf_p > &ace_cc_yy_current_buffer->ace_cc_yy_ch_buf[ace_cc_yy_n_chars + 1] )
955 ACE_CC_YY_FATAL_ERROR(
956 "fatal flex scanner internal error--end of buffer missed" );
958 if ( ace_cc_yy_current_buffer->ace_cc_yy_fill_buffer == 0 )
959 { /* Don't try to fill the buffer, so this is an EOF. */
960 if ( ace_cc_yy_c_buf_p - ace_cc_yytext_ptr - ACE_CC_YY_MORE_ADJ == 1 )
962 /* We matched a single character, the EOB, so
963 * treat this as a final EOF.
965 return EOB_ACT_END_OF_FILE;
968 else
970 /* We matched some text prior to the EOB, first
971 * process it.
973 return EOB_ACT_LAST_MATCH;
977 /* Try to read more data. */
979 /* First move last chars to start of buffer. */
980 number_to_move = (int) (ace_cc_yy_c_buf_p - ace_cc_yytext_ptr) - 1;
982 for ( i = 0; i < number_to_move; ++i )
983 *(dest++) = *(source++);
985 if ( ace_cc_yy_current_buffer->ace_cc_yy_buffer_status == ACE_CC_YY_BUFFER_EOF_PENDING )
986 /* don't do the read, it's not guaranteed to return an EOF,
987 * just force an EOF
989 ace_cc_yy_current_buffer->ace_cc_yy_n_chars = ace_cc_yy_n_chars = 0;
991 else
993 int num_to_read =
994 ace_cc_yy_current_buffer->ace_cc_yy_buf_size - number_to_move - 1;
996 while ( num_to_read <= 0 )
997 { /* Not enough room in the buffer - grow it. */
998 #ifdef ACE_CC_YY_USES_REJECT
999 ACE_CC_YY_FATAL_ERROR(
1000 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1001 #else
1003 /* just a shorter name for the current buffer */
1004 ACE_CC_YY_BUFFER_STATE b = ace_cc_yy_current_buffer;
1006 int ace_cc_yy_c_buf_p_offset =
1007 (int) (ace_cc_yy_c_buf_p - b->ace_cc_yy_ch_buf);
1009 if ( b->ace_cc_yy_is_our_buffer )
1011 int new_size = b->ace_cc_yy_buf_size * 2;
1013 if ( new_size <= 0 )
1014 b->ace_cc_yy_buf_size += b->ace_cc_yy_buf_size / 8;
1015 else
1016 b->ace_cc_yy_buf_size *= 2;
1018 b->ace_cc_yy_ch_buf = (char *)
1019 /* Include room in for 2 EOB chars. */
1020 ace_cc_yy_flex_realloc( (void *) b->ace_cc_yy_ch_buf,
1021 b->ace_cc_yy_buf_size + 2 );
1023 else
1024 /* Can't grow it, we don't own it. */
1025 b->ace_cc_yy_ch_buf = 0;
1027 if ( ! b->ace_cc_yy_ch_buf )
1028 ACE_CC_YY_FATAL_ERROR(
1029 "fatal error - scanner input buffer overflow" );
1031 ace_cc_yy_c_buf_p = &b->ace_cc_yy_ch_buf[ace_cc_yy_c_buf_p_offset];
1033 num_to_read = ace_cc_yy_current_buffer->ace_cc_yy_buf_size -
1034 number_to_move - 1;
1035 #endif
1038 if ( num_to_read > ACE_CC_YY_READ_BUF_SIZE )
1039 num_to_read = ACE_CC_YY_READ_BUF_SIZE;
1041 /* Read in more data. */
1042 ACE_CC_YY_INPUT( (&ace_cc_yy_current_buffer->ace_cc_yy_ch_buf[number_to_move]),
1043 ace_cc_yy_n_chars, num_to_read );
1045 ace_cc_yy_current_buffer->ace_cc_yy_n_chars = ace_cc_yy_n_chars;
1048 if ( ace_cc_yy_n_chars == 0 )
1050 if ( number_to_move == ACE_CC_YY_MORE_ADJ )
1052 ret_val = EOB_ACT_END_OF_FILE;
1053 ace_cc_yyrestart( ace_cc_yyin );
1056 else
1058 ret_val = EOB_ACT_LAST_MATCH;
1059 ace_cc_yy_current_buffer->ace_cc_yy_buffer_status =
1060 ACE_CC_YY_BUFFER_EOF_PENDING;
1064 else
1065 ret_val = EOB_ACT_CONTINUE_SCAN;
1067 ace_cc_yy_n_chars += number_to_move;
1068 ace_cc_yy_current_buffer->ace_cc_yy_ch_buf[ace_cc_yy_n_chars] = ACE_CC_YY_END_OF_BUFFER_CHAR;
1069 ace_cc_yy_current_buffer->ace_cc_yy_ch_buf[ace_cc_yy_n_chars + 1] = ACE_CC_YY_END_OF_BUFFER_CHAR;
1071 ace_cc_yytext_ptr = &ace_cc_yy_current_buffer->ace_cc_yy_ch_buf[0];
1073 return ret_val;
1077 /* ace_cc_yy_get_previous_state - get the state just before the EOB char was reached */
1079 static ace_cc_yy_state_type ace_cc_yy_get_previous_state()
1081 ace_cc_yy_state_type ace_cc_yy_current_state;
1082 char *ace_cc_yy_cp;
1084 ace_cc_yy_current_state = ace_cc_yy_start;
1085 ace_cc_yy_current_state += ACE_CC_YY_AT_BOL();
1087 for ( ace_cc_yy_cp = ace_cc_yytext_ptr + ACE_CC_YY_MORE_ADJ; ace_cc_yy_cp < ace_cc_yy_c_buf_p; ++ace_cc_yy_cp )
1089 ACE_CC_YY_CHAR ace_cc_yy_c = (*ace_cc_yy_cp ? ace_cc_yy_ec[ACE_CC_YY_SC_TO_UI(*ace_cc_yy_cp)] : 1);
1090 if ( ace_cc_yy_accept[ace_cc_yy_current_state] )
1092 ace_cc_yy_last_accepting_state = ace_cc_yy_current_state;
1093 ace_cc_yy_last_accepting_cpos = ace_cc_yy_cp;
1095 while ( ace_cc_yy_chk[ace_cc_yy_base[ace_cc_yy_current_state] + ace_cc_yy_c] != ace_cc_yy_current_state )
1097 ace_cc_yy_current_state = (int) ace_cc_yy_def[ace_cc_yy_current_state];
1098 if ( ace_cc_yy_current_state >= 124 )
1099 ace_cc_yy_c = ace_cc_yy_meta[(unsigned int) ace_cc_yy_c];
1101 ace_cc_yy_current_state = ace_cc_yy_nxt[ace_cc_yy_base[ace_cc_yy_current_state] + (unsigned int) ace_cc_yy_c];
1104 return ace_cc_yy_current_state;
1108 /* ace_cc_yy_try_NUL_trans - try to make a transition on the NUL character
1110 * synopsis
1111 * next_state = ace_cc_yy_try_NUL_trans( current_state );
1114 #ifdef ACE_CC_YY_USE_PROTOS
1115 static ace_cc_yy_state_type ace_cc_yy_try_NUL_trans( ace_cc_yy_state_type ace_cc_yy_current_state )
1116 #else
1117 static ace_cc_yy_state_type ace_cc_yy_try_NUL_trans( ace_cc_yy_current_state )
1118 ace_cc_yy_state_type ace_cc_yy_current_state;
1119 #endif
1121 int ace_cc_yy_is_jam;
1122 char *ace_cc_yy_cp = ace_cc_yy_c_buf_p;
1124 ACE_CC_YY_CHAR ace_cc_yy_c = 1;
1125 if ( ace_cc_yy_accept[ace_cc_yy_current_state] )
1127 ace_cc_yy_last_accepting_state = ace_cc_yy_current_state;
1128 ace_cc_yy_last_accepting_cpos = ace_cc_yy_cp;
1130 while ( ace_cc_yy_chk[ace_cc_yy_base[ace_cc_yy_current_state] + ace_cc_yy_c] != ace_cc_yy_current_state )
1132 ace_cc_yy_current_state = (int) ace_cc_yy_def[ace_cc_yy_current_state];
1133 if ( ace_cc_yy_current_state >= 124 )
1134 ace_cc_yy_c = ace_cc_yy_meta[(unsigned int) ace_cc_yy_c];
1136 ace_cc_yy_current_state = ace_cc_yy_nxt[ace_cc_yy_base[ace_cc_yy_current_state] + (unsigned int) ace_cc_yy_c];
1137 ace_cc_yy_is_jam = (ace_cc_yy_current_state == 123);
1139 return ace_cc_yy_is_jam ? 0 : ace_cc_yy_current_state;
1143 #ifndef ACE_CC_YY_NO_UNPUT
1144 #ifdef ACE_CC_YY_USE_PROTOS
1145 static void ace_cc_yyunput( int c, char *ace_cc_yy_bp )
1146 #else
1147 static void ace_cc_yyunput( c, ace_cc_yy_bp )
1148 int c;
1149 char *ace_cc_yy_bp;
1150 #endif
1152 char *ace_cc_yy_cp = ace_cc_yy_c_buf_p;
1154 /* undo effects of setting up ace_cc_yytext */
1155 *ace_cc_yy_cp = ace_cc_yy_hold_char;
1157 if ( ace_cc_yy_cp < ace_cc_yy_current_buffer->ace_cc_yy_ch_buf + 2 )
1158 { /* need to shift things up to make room */
1159 /* +2 for EOB chars. */
1160 int number_to_move = ace_cc_yy_n_chars + 2;
1161 char *dest = &ace_cc_yy_current_buffer->ace_cc_yy_ch_buf[
1162 ace_cc_yy_current_buffer->ace_cc_yy_buf_size + 2];
1163 char *source =
1164 &ace_cc_yy_current_buffer->ace_cc_yy_ch_buf[number_to_move];
1166 while ( source > ace_cc_yy_current_buffer->ace_cc_yy_ch_buf )
1167 *--dest = *--source;
1169 ace_cc_yy_cp += (int) (dest - source);
1170 ace_cc_yy_bp += (int) (dest - source);
1171 ace_cc_yy_current_buffer->ace_cc_yy_n_chars =
1172 ace_cc_yy_n_chars = ace_cc_yy_current_buffer->ace_cc_yy_buf_size;
1174 if ( ace_cc_yy_cp < ace_cc_yy_current_buffer->ace_cc_yy_ch_buf + 2 )
1175 ACE_CC_YY_FATAL_ERROR( "flex scanner push-back overflow" );
1178 *--ace_cc_yy_cp = (char) c;
1181 ace_cc_yytext_ptr = ace_cc_yy_bp;
1182 ace_cc_yy_hold_char = *ace_cc_yy_cp;
1183 ace_cc_yy_c_buf_p = ace_cc_yy_cp;
1185 #endif /* ifndef ACE_CC_YY_NO_UNPUT */
1187 #ifndef ACE_CC_YY_NO_INPUT
1188 #ifdef __cplusplus
1189 static int ace_cc_yyinput()
1190 #else
1191 static int input()
1192 #endif
1194 int c;
1196 *ace_cc_yy_c_buf_p = ace_cc_yy_hold_char;
1198 if ( *ace_cc_yy_c_buf_p == ACE_CC_YY_END_OF_BUFFER_CHAR )
1200 /* ace_cc_yy_c_buf_p now points to the character we want to return.
1201 * If this occurs *before* the EOB characters, then it's a
1202 * valid NUL; if not, then we've hit the end of the buffer.
1204 if ( ace_cc_yy_c_buf_p < &ace_cc_yy_current_buffer->ace_cc_yy_ch_buf[ace_cc_yy_n_chars] )
1205 /* This was really a NUL. */
1206 *ace_cc_yy_c_buf_p = '\0';
1208 else
1209 { /* need more input */
1210 int offset = ace_cc_yy_c_buf_p - ace_cc_yytext_ptr;
1211 ++ace_cc_yy_c_buf_p;
1213 switch ( ace_cc_yy_get_next_buffer() )
1215 case EOB_ACT_LAST_MATCH:
1216 /* This happens because ace_cc_yy_g_n_b()
1217 * sees that we've accumulated a
1218 * token and flags that we need to
1219 * try matching the token before
1220 * proceeding. But for input(),
1221 * there's no matching to consider.
1222 * So convert the EOB_ACT_LAST_MATCH
1223 * to EOB_ACT_END_OF_FILE.
1226 /* Reset buffer status. */
1227 ace_cc_yyrestart( ace_cc_yyin );
1229 /* fall through */
1231 case EOB_ACT_END_OF_FILE:
1233 if ( ace_cc_yywrap() )
1234 return EOF;
1236 /* if ( ! ace_cc_yy_did_buffer_switch_on_eof )
1237 ACE_CC_YY_NEW_FILE;
1238 #ifdef __cplusplus
1239 return ace_cc_yyinput();
1240 #else
1241 return input();
1242 #endif */
1245 case EOB_ACT_CONTINUE_SCAN:
1246 ace_cc_yy_c_buf_p = ace_cc_yytext_ptr + offset;
1247 break;
1252 c = *(unsigned char *) ace_cc_yy_c_buf_p; /* cast for 8-bit char's */
1253 *ace_cc_yy_c_buf_p = '\0'; /* preserve ace_cc_yytext */
1254 ace_cc_yy_hold_char = *++ace_cc_yy_c_buf_p;
1256 ace_cc_yy_current_buffer->ace_cc_yy_at_bol = (c == '\n');
1258 return c;
1260 #endif /* ! ACE_CC_YY_NO_INPUT */
1263 #ifdef ACE_CC_YY_USE_PROTOS
1264 void ace_cc_yyrestart( FILE *input_file )
1265 #else
1266 void ace_cc_yyrestart( input_file )
1267 FILE *input_file;
1268 #endif
1270 if ( ! ace_cc_yy_current_buffer )
1271 ace_cc_yy_current_buffer = ace_cc_yy_create_buffer( ace_cc_yyin, ACE_CC_YY_BUF_SIZE );
1273 ace_cc_yy_init_buffer( ace_cc_yy_current_buffer, input_file );
1274 ace_cc_yy_load_buffer_state();
1278 #ifdef ACE_CC_YY_USE_PROTOS
1279 void ace_cc_yy_switch_to_buffer( ACE_CC_YY_BUFFER_STATE new_buffer )
1280 #else
1281 void ace_cc_yy_switch_to_buffer( new_buffer )
1282 ACE_CC_YY_BUFFER_STATE new_buffer;
1283 #endif
1285 if ( ace_cc_yy_current_buffer == new_buffer )
1286 return;
1288 if ( ace_cc_yy_current_buffer )
1290 /* Flush out information for old buffer. */
1291 *ace_cc_yy_c_buf_p = ace_cc_yy_hold_char;
1292 ace_cc_yy_current_buffer->ace_cc_yy_buf_pos = ace_cc_yy_c_buf_p;
1293 ace_cc_yy_current_buffer->ace_cc_yy_n_chars = ace_cc_yy_n_chars;
1296 ace_cc_yy_current_buffer = new_buffer;
1297 ace_cc_yy_load_buffer_state();
1299 /* We don't actually know whether we did this switch during
1300 * EOF (ace_cc_yywrap()) processing, but the only time this flag
1301 * is looked at is after ace_cc_yywrap() is called, so it's safe
1302 * to go ahead and always set it.
1304 #if (ace_cc_yywrap() != 1)
1305 ace_cc_yy_did_buffer_switch_on_eof = 1;
1306 #endif
1310 #ifdef ACE_CC_YY_USE_PROTOS
1311 void ace_cc_yy_load_buffer_state()
1312 #else
1313 void ace_cc_yy_load_buffer_state()
1314 #endif
1316 ace_cc_yy_n_chars = ace_cc_yy_current_buffer->ace_cc_yy_n_chars;
1317 ace_cc_yytext_ptr = ace_cc_yy_c_buf_p = ace_cc_yy_current_buffer->ace_cc_yy_buf_pos;
1318 ace_cc_yyin = ace_cc_yy_current_buffer->ace_cc_yy_input_file;
1319 ace_cc_yy_hold_char = *ace_cc_yy_c_buf_p;
1323 #ifdef ACE_CC_YY_USE_PROTOS
1324 ACE_CC_YY_BUFFER_STATE ace_cc_yy_create_buffer( FILE *file, int size )
1325 #else
1326 ACE_CC_YY_BUFFER_STATE ace_cc_yy_create_buffer( file, size )
1327 FILE *file;
1328 int size;
1329 #endif
1331 ACE_CC_YY_BUFFER_STATE b;
1333 b = (ACE_CC_YY_BUFFER_STATE) ace_cc_yy_flex_alloc( sizeof( struct ace_cc_yy_buffer_state ) );
1334 if ( ! b )
1335 ACE_CC_YY_FATAL_ERROR( "out of dynamic memory in ace_cc_yy_create_buffer()" );
1337 b->ace_cc_yy_buf_size = size;
1339 /* ace_cc_yy_ch_buf has to be 2 characters longer than the size given because
1340 * we need to put in 2 end-of-buffer characters.
1342 b->ace_cc_yy_ch_buf = (char *) ace_cc_yy_flex_alloc( b->ace_cc_yy_buf_size + 2 );
1343 if ( ! b->ace_cc_yy_ch_buf )
1344 ACE_CC_YY_FATAL_ERROR( "out of dynamic memory in ace_cc_yy_create_buffer()" );
1346 b->ace_cc_yy_is_our_buffer = 1;
1348 ace_cc_yy_init_buffer( b, file );
1350 return b;
1354 #ifdef ACE_CC_YY_USE_PROTOS
1355 void ace_cc_yy_delete_buffer( ACE_CC_YY_BUFFER_STATE b )
1356 #else
1357 void ace_cc_yy_delete_buffer( b )
1358 ACE_CC_YY_BUFFER_STATE b;
1359 #endif
1361 if ( ! b )
1362 return;
1364 if ( b == ace_cc_yy_current_buffer )
1365 ace_cc_yy_current_buffer = (ACE_CC_YY_BUFFER_STATE) 0;
1367 if ( b->ace_cc_yy_is_our_buffer )
1368 ace_cc_yy_flex_free( (void *) b->ace_cc_yy_ch_buf );
1370 ace_cc_yy_flex_free( (void *) b );
1374 #ifdef ACE_CC_YY_USE_PROTOS
1375 void ace_cc_yy_init_buffer( ACE_CC_YY_BUFFER_STATE b, FILE *file )
1376 #else
1377 void ace_cc_yy_init_buffer( b, file )
1378 ACE_CC_YY_BUFFER_STATE b;
1379 FILE *file;
1380 #endif
1384 ace_cc_yy_flush_buffer( b );
1386 b->ace_cc_yy_input_file = file;
1387 b->ace_cc_yy_fill_buffer = 1;
1389 #if ACE_CC_YY_ALWAYS_INTERACTIVE
1390 b->ace_cc_yy_is_interactive = 1;
1391 #else
1392 #if ACE_CC_YY_NEVER_INTERACTIVE
1393 b->ace_cc_yy_is_interactive = 0;
1394 #else
1395 b->ace_cc_yy_is_interactive = file ? (ACE_OS::ace_isatty( fileno(file) ) > 0) : 0;
1396 #endif
1397 #endif
1401 #ifdef ACE_CC_YY_USE_PROTOS
1402 void ace_cc_yy_flush_buffer( ACE_CC_YY_BUFFER_STATE b )
1403 #else
1404 void ace_cc_yy_flush_buffer( b )
1405 ACE_CC_YY_BUFFER_STATE b;
1406 #endif
1409 if ( ! b )
1410 return;
1412 b->ace_cc_yy_n_chars = 0;
1414 /* We always need two end-of-buffer characters. The first causes
1415 * a transition to the end-of-buffer state. The second causes
1416 * a jam in that state.
1418 b->ace_cc_yy_ch_buf[0] = ACE_CC_YY_END_OF_BUFFER_CHAR;
1419 b->ace_cc_yy_ch_buf[1] = ACE_CC_YY_END_OF_BUFFER_CHAR;
1421 b->ace_cc_yy_buf_pos = &b->ace_cc_yy_ch_buf[0];
1423 b->ace_cc_yy_at_bol = 1;
1424 b->ace_cc_yy_buffer_status = ACE_CC_YY_BUFFER_NEW;
1426 if ( b == ace_cc_yy_current_buffer )
1427 ace_cc_yy_load_buffer_state();
1431 #ifndef ACE_CC_YY_NO_SCAN_BUFFER
1432 #ifdef ACE_CC_YY_USE_PROTOS
1433 ACE_CC_YY_BUFFER_STATE ace_cc_yy_scan_buffer( char *base, ace_cc_yy_size_t size )
1434 #else
1435 ACE_CC_YY_BUFFER_STATE ace_cc_yy_scan_buffer( base, size )
1436 char *base;
1437 ace_cc_yy_size_t size;
1438 #endif
1440 ACE_CC_YY_BUFFER_STATE b;
1442 if ( size < 2 ||
1443 base[size-2] != ACE_CC_YY_END_OF_BUFFER_CHAR ||
1444 base[size-1] != ACE_CC_YY_END_OF_BUFFER_CHAR )
1445 /* They forgot to leave room for the EOB's. */
1446 return 0;
1448 b = (ACE_CC_YY_BUFFER_STATE) ace_cc_yy_flex_alloc( sizeof( struct ace_cc_yy_buffer_state ) );
1449 if ( ! b )
1450 ACE_CC_YY_FATAL_ERROR( "out of dynamic memory in ace_cc_yy_scan_buffer()" );
1452 b->ace_cc_yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1453 b->ace_cc_yy_buf_pos = b->ace_cc_yy_ch_buf = base;
1454 b->ace_cc_yy_is_our_buffer = 0;
1455 b->ace_cc_yy_input_file = 0;
1456 b->ace_cc_yy_n_chars = b->ace_cc_yy_buf_size;
1457 b->ace_cc_yy_is_interactive = 0;
1458 b->ace_cc_yy_at_bol = 1;
1459 b->ace_cc_yy_fill_buffer = 0;
1460 b->ace_cc_yy_buffer_status = ACE_CC_YY_BUFFER_NEW;
1462 ace_cc_yy_switch_to_buffer( b );
1464 return b;
1466 #endif
1469 #ifndef ACE_CC_YY_NO_SCAN_STRING
1470 #ifdef ACE_CC_YY_USE_PROTOS
1471 ACE_CC_YY_BUFFER_STATE ace_cc_yy_scan_string( ace_cc_yyconst char *ace_cc_yy_str )
1472 #else
1473 ACE_CC_YY_BUFFER_STATE ace_cc_yy_scan_string( ace_cc_yy_str )
1474 ace_cc_yyconst char *ace_cc_yy_str;
1475 #endif
1477 int len;
1478 for ( len = 0; ace_cc_yy_str[len]; ++len )
1481 return ace_cc_yy_scan_bytes( ace_cc_yy_str, len );
1483 #endif
1486 #ifndef ACE_CC_YY_NO_SCAN_BYTES
1487 #ifdef ACE_CC_YY_USE_PROTOS
1488 ACE_CC_YY_BUFFER_STATE ace_cc_yy_scan_bytes( ace_cc_yyconst char *bytes, int len )
1489 #else
1490 ACE_CC_YY_BUFFER_STATE ace_cc_yy_scan_bytes( bytes, len )
1491 ace_cc_yyconst char *bytes;
1492 int len;
1493 #endif
1495 ACE_CC_YY_BUFFER_STATE b;
1496 char *buf;
1497 ace_cc_yy_size_t n;
1498 int i;
1500 /* Get memory for full buffer, including space for trailing EOB's. */
1501 n = len + 2;
1502 buf = (char *) ace_cc_yy_flex_alloc( n );
1503 if ( ! buf )
1504 ACE_CC_YY_FATAL_ERROR( "out of dynamic memory in ace_cc_yy_scan_bytes()" );
1506 for ( i = 0; i < len; ++i )
1507 buf[i] = bytes[i];
1509 buf[len] = buf[len+1] = ACE_CC_YY_END_OF_BUFFER_CHAR;
1511 b = ace_cc_yy_scan_buffer( buf, n );
1512 if ( ! b )
1513 ACE_CC_YY_FATAL_ERROR( "bad buffer in ace_cc_yy_scan_bytes()" );
1515 /* It's okay to grow etc. this buffer, and we should throw it
1516 * away when we're done.
1518 b->ace_cc_yy_is_our_buffer = 1;
1520 return b;
1522 #endif
1525 #ifndef ACE_CC_YY_NO_PUSH_STATE
1526 #ifdef ACE_CC_YY_USE_PROTOS
1527 static void ace_cc_yy_push_state( int new_state )
1528 #else
1529 static void ace_cc_yy_push_state( new_state )
1530 int new_state;
1531 #endif
1533 if ( ace_cc_yy_start_stack_ptr >= ace_cc_yy_start_stack_depth )
1535 ace_cc_yy_size_t new_size;
1537 ace_cc_yy_start_stack_depth += ACE_CC_YY_START_STACK_INCR;
1538 new_size = ace_cc_yy_start_stack_depth * sizeof( int );
1540 if ( ! ace_cc_yy_start_stack )
1541 ace_cc_yy_start_stack = (int *) ace_cc_yy_flex_alloc( new_size );
1543 else
1544 ace_cc_yy_start_stack = (int *) ace_cc_yy_flex_realloc(
1545 (void *) ace_cc_yy_start_stack, new_size );
1547 if ( ! ace_cc_yy_start_stack )
1548 ACE_CC_YY_FATAL_ERROR(
1549 "out of memory expanding start-condition stack" );
1552 ace_cc_yy_start_stack[ace_cc_yy_start_stack_ptr++] = ACE_CC_YY_START;
1554 BEGIN(new_state);
1556 #endif
1559 #ifndef ACE_CC_YY_NO_POP_STATE
1560 static void ace_cc_yy_pop_state()
1562 if ( --ace_cc_yy_start_stack_ptr < 0 )
1563 ACE_CC_YY_FATAL_ERROR( "start-condition stack underflow" );
1565 BEGIN(ace_cc_yy_start_stack[ace_cc_yy_start_stack_ptr]);
1567 #endif
1570 #ifndef ACE_CC_YY_NO_TOP_STATE
1571 static int ace_cc_yy_top_state()
1573 return ace_cc_yy_start_stack[ace_cc_yy_start_stack_ptr - 1];
1575 #endif
1577 #ifndef ACE_CC_YY_EXIT_FAILURE
1578 #define ACE_CC_YY_EXIT_FAILURE 2
1579 #endif
1581 #ifdef ACE_CC_YY_USE_PROTOS
1582 static void ace_cc_yy_fatal_error( ace_cc_yyconst char msg[] )
1583 #else
1584 static void ace_cc_yy_fatal_error( msg )
1585 char msg[];
1586 #endif
1588 (void) ACE_OS::fprintf( stderr, "%s\n", msg );
1589 ACE_OS::exit( ACE_CC_YY_EXIT_FAILURE );
1593 /* Redefine ace_cc_yyless() so it works in section 3 code. */
1595 #undef ace_cc_yyless
1596 #define ace_cc_yyless(n) \
1597 do \
1599 /* Undo effects of setting up ace_cc_yytext. */ \
1600 ace_cc_yytext[ace_cc_yyleng] = ace_cc_yy_hold_char; \
1601 ace_cc_yy_c_buf_p = ace_cc_yytext + n; \
1602 ace_cc_yy_hold_char = *ace_cc_yy_c_buf_p; \
1603 *ace_cc_yy_c_buf_p = '\0'; \
1604 ace_cc_yyleng = n; \
1606 while ( 0 )
1609 /* Internal utility routines. */
1611 #ifndef ace_cc_yytext_ptr
1612 #ifdef ACE_CC_YY_USE_PROTOS
1613 static void ace_cc_yy_flex_strncpy( char *s1, ace_cc_yyconst char *s2, int n )
1614 #else
1615 static void ace_cc_yy_flex_strncpy( s1, s2, n )
1616 char *s1;
1617 ace_cc_yyconst char *s2;
1618 int n;
1619 #endif
1621 int i;
1622 for ( i = 0; i < n; ++i )
1623 s1[i] = s2[i];
1625 #endif
1627 #ifdef ACE_CC_YY_NEED_STRLEN
1628 #ifdef ACE_CC_YY_USE_PROTOS
1629 static int ace_cc_yy_flex_strlen( ace_cc_yyconst char *s )
1630 #else
1631 static int ace_cc_yy_flex_strlen( s )
1632 ace_cc_yyconst char *s;
1633 #endif
1635 int n;
1636 for ( n = 0; s[n]; ++n )
1639 return n;
1641 #endif
1644 #ifdef ACE_CC_YY_USE_PROTOS
1645 static void *ace_cc_yy_flex_alloc( ace_cc_yy_size_t size )
1646 #else
1647 static void *ace_cc_yy_flex_alloc( size )
1648 ace_cc_yy_size_t size;
1649 #endif
1651 return (void *) ACE_OS::malloc( size );
1654 #ifdef ACE_CC_YY_USE_PROTOS
1655 static void *ace_cc_yy_flex_realloc( void *ptr, ace_cc_yy_size_t size )
1656 #else
1657 static void *ace_cc_yy_flex_realloc( ptr, size )
1658 void *ptr;
1659 ace_cc_yy_size_t size;
1660 #endif
1662 /* The cast to (char *) in the following accommodates both
1663 * implementations that use char* generic pointers, and those
1664 * that use void* generic pointers. It works with the latter
1665 * because both ANSI C and C++ allow castless assignment from
1666 * any pointer type to void*, and deal with argument conversions
1667 * as though doing an assignment.
1669 return (void *) ACE_OS::realloc( (char *) ptr, size );
1672 #ifdef ACE_CC_YY_USE_PROTOS
1673 static void ace_cc_yy_flex_free( void *ptr )
1674 #else
1675 static void ace_cc_yy_flex_free( ptr )
1676 void *ptr;
1677 #endif
1679 ACE_OS::free( ACE_MALLOC_T (ptr) );
1682 #if ACE_CC_YY_MAIN
1683 int main()
1685 ace_cc_yylex();
1686 return 0;
1688 #endif