Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / ETCL / ETCL_l.cpp.diff
blob277bc31756838f68158e47c491ec52e6943ad7d0
1 --- bison_gen\ETCL_l.cpp 2005-07-19 10:09:28.523824100 -0700
2 +++ ETCL_l.cpp 2005-07-19 09:47:22.138585300 -0700
3 @@ -1,15 +1,14 @@
5 /* A lexical scanner generated by flex */
7 /* Scanner skeleton version:
8 - * $Header$
9 */
11 #define FLEX_SCANNER
12 #define YY_FLEX_MAJOR_VERSION 2
13 #define YY_FLEX_MINOR_VERSION 5
15 -#include <stdio.h>
18 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
19 #ifdef c_plusplus
20 @@ -21,8 +20,7 @@
22 #ifdef __cplusplus
24 -#include <stdlib.h>
25 -#include <unistd.h>
26 +#include "ace/OS_NS_unistd.h"
27 +#include "ace/OS_NS_stdio.h"
29 /* Use prototypes in function declarations. */
30 #define YY_USE_PROTOS
31 @@ -262,8 +260,8 @@
32 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
35 -#define yywrap() 1
36 -#define YY_SKIP_YYWRAP
37 +//#define yywrap() 1
38 +//#define YY_SKIP_YYWRAP
39 typedef unsigned char YY_CHAR;
40 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
41 typedef int yy_state_type;
42 @@ -444,15 +442,15 @@
43 #define YY_MORE_ADJ 0
44 #define YY_RESTORE_YY_MORE_OFFSET
45 char *yytext;
46 -#line 1 "ETCL.ll"
47 +//#line 1 "ETCL/ETCL.ll"
48 #define INITIAL 0
49 -#line 4 "ETCL.ll"
50 +//#line 4 "ETCL/ETCL.ll"
51 // ========================================================================
53 // = LIBRARY
54 // orbsvcs/ECTL
55 -//
56 +//
57 // = FILENAME
58 // ETCL.ll
60 @@ -462,12 +460,12 @@
62 // ========================================================================
64 -#include "ace/OS.h"
66 +#include "ETCL_Interpreter.h"
67 #include "ETCL_Constraint.h"
68 #include "ETCL_y.h"
70 -static const char * extract_string(char*);
71 +static const char* extract_string(char*);
72 +//static const char * extract_string(char*);
74 #define TAO_YY_LEX_DEBUG
76 @@ -475,12 +473,11 @@
77 #define TAO_YY_LEX_DEBUG TAO_OS::fprintf(stderr, "%s\n", yytext)
78 #endif /* TAO_CONSTRAINT_DEBUG */
80 -#define YY_DECL int TAO_ETCL_yylex (TAO_ETCL_YYSTYPE *lvalp, void* state)
81 +//#define YY_DECL int TAO_ETCL_yylex (TAO_ETCL_YYSTYPE *lvalp, void* state)
83 #define YY_BREAK
84 #define YY_NO_UNPUT
86 -#line 484 "lex.yy.c"
88 /* Macros after this point can all be overridden by user definitions in
89 * section 1.
90 @@ -494,10 +491,6 @@
91 #endif
92 #endif
94 -#ifndef YY_NO_UNPUT
95 -static void yyunput YY_PROTO(( int c, char *buf_ptr ));
96 -#endif
98 #ifndef yytext_ptr
99 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
100 #endif
101 @@ -556,11 +549,11 @@
103 /* Copy whatever the last rule matched to the standard output. */
105 -#ifndef ECHO
106 +#ifndef TAO_ETCL_ECHO
107 /* This used to be an fputs(), but since the string might contain NUL's,
108 * we now use fwrite().
110 -#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
111 +#define TAO_ETCL_ECHO (void) fwrite( yytext, yyleng, 1, yyout )
112 #endif
114 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
115 @@ -628,13 +621,11 @@
116 YY_DECL
118 ACE_REGISTER yy_state_type yy_current_state;
119 - ACE_REGISTER char *yy_cp, *yy_bp;
120 + ACE_REGISTER char *yy_cp = 0;
121 + ACE_REGISTER char *yy_bp = 0;
122 ACE_REGISTER int yy_act;
124 -#line 50 "ETCL.ll"
127 -#line 638 "lex.yy.c"
128 +//#line 50 "ETCL/ETCL.ll"
130 if ( yy_init )
132 @@ -719,240 +710,239 @@
134 case 1:
135 YY_RULE_SETUP
136 -#line 52 "ETCL.ll"
137 +//#line 52 "ETCL/ETCL.ll"
138 { TAO_YY_LEX_DEBUG; return TAO_ETCL_MIN; }
139 YY_BREAK
140 case 2:
141 YY_RULE_SETUP
142 -#line 53 "ETCL.ll"
143 +//#line 53 "ETCL/ETCL.ll"
144 { TAO_YY_LEX_DEBUG; return TAO_ETCL_MAX; }
145 YY_BREAK
146 case 3:
147 YY_RULE_SETUP
148 -#line 54 "ETCL.ll"
149 +//#line 54 "ETCL/ETCL.ll"
150 { TAO_YY_LEX_DEBUG; return TAO_ETCL_FIRST; }
151 YY_BREAK
152 case 4:
153 YY_RULE_SETUP
154 -#line 55 "ETCL.ll"
155 +//#line 55 "ETCL/ETCL.ll"
156 { TAO_YY_LEX_DEBUG; return TAO_ETCL_RANDOM; }
157 YY_BREAK
158 case 5:
159 YY_RULE_SETUP
160 -#line 56 "ETCL.ll"
161 +//#line 56 "ETCL/ETCL.ll"
162 { TAO_YY_LEX_DEBUG; return TAO_ETCL_WITH; }
163 YY_BREAK
164 case 6:
165 YY_RULE_SETUP
166 -#line 57 "ETCL.ll"
167 +//#line 57 "ETCL/ETCL.ll"
168 { TAO_YY_LEX_DEBUG; return TAO_ETCL_EXIST; }
169 YY_BREAK
170 case 7:
171 YY_RULE_SETUP
172 -#line 58 "ETCL.ll"
173 +//#line 58 "ETCL/ETCL.ll"
174 { TAO_YY_LEX_DEBUG; return TAO_ETCL_NOT; }
175 YY_BREAK
176 case 8:
177 YY_RULE_SETUP
178 -#line 59 "ETCL.ll"
179 +//#line 59 "ETCL/ETCL.ll"
180 { TAO_YY_LEX_DEBUG; return TAO_ETCL_AND; }
181 YY_BREAK
182 case 9:
183 YY_RULE_SETUP
184 -#line 60 "ETCL.ll"
185 +//#line 60 "ETCL/ETCL.ll"
186 { TAO_YY_LEX_DEBUG; return TAO_ETCL_OR; }
187 YY_BREAK
188 case 10:
189 YY_RULE_SETUP
190 -#line 61 "ETCL.ll"
191 +//#line 61 "ETCL/ETCL.ll"
192 { TAO_YY_LEX_DEBUG; return TAO_ETCL_IN; }
193 YY_BREAK
194 case 11:
195 YY_RULE_SETUP
196 -#line 62 "ETCL.ll"
197 +//#line 62 "ETCL/ETCL.ll"
198 { TAO_YY_LEX_DEBUG; return TAO_ETCL_TWIDDLE; }
199 YY_BREAK
200 case 12:
201 YY_RULE_SETUP
202 -#line 63 "ETCL.ll"
203 +//#line 63 "ETCL/ETCL.ll"
204 { TAO_YY_LEX_DEBUG; return TAO_ETCL_PLUS; }
205 YY_BREAK
206 case 13:
207 YY_RULE_SETUP
208 -#line 64 "ETCL.ll"
209 +//#line 64 "ETCL/ETCL.ll"
210 { TAO_YY_LEX_DEBUG; return TAO_ETCL_MINUS; }
211 YY_BREAK
212 case 14:
213 YY_RULE_SETUP
214 -#line 65 "ETCL.ll"
215 +//#line 65 "ETCL/ETCL.ll"
216 { TAO_YY_LEX_DEBUG; return TAO_ETCL_MULT; }
217 YY_BREAK
218 case 15:
219 YY_RULE_SETUP
220 -#line 66 "ETCL.ll"
221 +//#line 66 "ETCL/ETCL.ll"
222 { TAO_YY_LEX_DEBUG; return TAO_ETCL_DIV; }
223 YY_BREAK
224 case 16:
225 YY_RULE_SETUP
226 -#line 67 "ETCL.ll"
227 +//#line 67 "ETCL/ETCL.ll"
228 { TAO_YY_LEX_DEBUG; return TAO_ETCL_LT; }
229 YY_BREAK
230 case 17:
231 YY_RULE_SETUP
232 -#line 68 "ETCL.ll"
233 +//#line 68 "ETCL/ETCL.ll"
234 { TAO_YY_LEX_DEBUG; return TAO_ETCL_LE; }
235 YY_BREAK
236 case 18:
237 YY_RULE_SETUP
238 -#line 69 "ETCL.ll"
239 +//#line 69 "ETCL/ETCL.ll"
240 { TAO_YY_LEX_DEBUG; return TAO_ETCL_GT; }
241 YY_BREAK
242 case 19:
243 YY_RULE_SETUP
244 -#line 70 "ETCL.ll"
245 +//#line 70 "ETCL/ETCL.ll"
246 { TAO_YY_LEX_DEBUG; return TAO_ETCL_GE; }
247 YY_BREAK
248 case 20:
249 YY_RULE_SETUP
250 -#line 71 "ETCL.ll"
251 +//#line 71 "ETCL/ETCL.ll"
252 { TAO_YY_LEX_DEBUG; return TAO_ETCL_EQ; }
253 YY_BREAK
254 case 21:
255 YY_RULE_SETUP
256 -#line 72 "ETCL.ll"
257 +//#line 72 "ETCL/ETCL.ll"
258 { TAO_YY_LEX_DEBUG; return TAO_ETCL_NE; }
259 YY_BREAK
260 case 22:
261 YY_RULE_SETUP
262 -#line 73 "ETCL.ll"
263 +//#line 73 "ETCL/ETCL.ll"
264 { TAO_YY_LEX_DEBUG; return TAO_ETCL_LPAREN; }
265 YY_BREAK
266 case 23:
267 YY_RULE_SETUP
268 -#line 74 "ETCL.ll"
269 +//#line 74 "ETCL/ETCL.ll"
270 { TAO_YY_LEX_DEBUG; return TAO_ETCL_RPAREN; }
271 YY_BREAK
272 case 24:
273 YY_RULE_SETUP
274 -#line 75 "ETCL.ll"
275 +//#line 75 "ETCL/ETCL.ll"
276 { TAO_YY_LEX_DEBUG; return TAO_ETCL_DOLLAR; }
277 YY_BREAK
278 case 25:
279 YY_RULE_SETUP
280 -#line 76 "ETCL.ll"
281 +//#line 76 "ETCL/ETCL.ll"
282 { TAO_YY_LEX_DEBUG; return TAO_ETCL_DOT; }
283 YY_BREAK
284 case 26:
285 YY_RULE_SETUP
286 -#line 77 "ETCL.ll"
287 +//#line 77 "ETCL/ETCL.ll"
288 { TAO_YY_LEX_DEBUG; return TAO_ETCL_DEFAULT; }
289 YY_BREAK
290 case 27:
291 YY_RULE_SETUP
292 -#line 78 "ETCL.ll"
293 +//#line 78 "ETCL/ETCL.ll"
294 { TAO_YY_LEX_DEBUG; return TAO_ETCL_DISCRIMINANT; }
295 YY_BREAK
296 case 28:
297 YY_RULE_SETUP
298 -#line 79 "ETCL.ll"
299 +//#line 79 "ETCL/ETCL.ll"
300 { TAO_YY_LEX_DEBUG; return TAO_ETCL_TYPE_ID; }
301 YY_BREAK
302 case 29:
303 YY_RULE_SETUP
304 -#line 80 "ETCL.ll"
305 +//#line 80 "ETCL/ETCL.ll"
306 { TAO_YY_LEX_DEBUG; return TAO_ETCL_REPOS_ID; }
307 YY_BREAK
308 case 30:
309 YY_RULE_SETUP
310 -#line 81 "ETCL.ll"
311 +//#line 81 "ETCL/ETCL.ll"
312 { TAO_YY_LEX_DEBUG; return TAO_ETCL_LENGTH; }
313 YY_BREAK
314 case 31:
315 YY_RULE_SETUP
316 -#line 82 "ETCL.ll"
317 +//#line 82 "ETCL/ETCL.ll"
318 { TAO_YY_LEX_DEBUG; return TAO_ETCL_LBRA; }
319 YY_BREAK
320 case 32:
321 YY_RULE_SETUP
322 -#line 83 "ETCL.ll"
323 +//#line 83 "ETCL/ETCL.ll"
324 { TAO_YY_LEX_DEBUG; return TAO_ETCL_RBRA; }
325 YY_BREAK
326 case 33:
327 YY_RULE_SETUP
328 -#line 84 "ETCL.ll"
330 - lvalp->constraint =
331 +//#line 84 "ETCL/ETCL.ll"
333 + yylval.constraint =
334 new TAO_ETCL_Literal_Constraint ((CORBA::Boolean) 1);
335 TAO_YY_LEX_DEBUG; return TAO_ETCL_BOOLEAN;
337 YY_BREAK
338 case 34:
339 YY_RULE_SETUP
340 -#line 89 "ETCL.ll"
342 - lvalp->constraint =
343 +//#line 89 "ETCL/ETCL.ll"
345 + yylval.constraint =
346 new TAO_ETCL_Literal_Constraint ((CORBA::Boolean) 0);
347 TAO_YY_LEX_DEBUG; return TAO_ETCL_BOOLEAN;
349 YY_BREAK
350 case 35:
351 YY_RULE_SETUP
352 -#line 94 "ETCL.ll"
354 - lvalp->constraint =
355 +//#line 94 "ETCL/ETCL.ll"
357 + yylval.constraint =
358 new TAO_ETCL_Literal_Constraint (ACE_OS::atoi (yytext));
359 - TAO_YY_LEX_DEBUG; return TAO_ETCL_INTEGER;
360 + TAO_YY_LEX_DEBUG; return TAO_ETCL_INTEGER;
362 YY_BREAK
363 case 36:
364 YY_RULE_SETUP
365 -#line 99 "ETCL.ll"
366 +//#line 99 "ETCL/ETCL.ll"
368 double v;
369 - sscanf (yytext, "%lf", &v);
370 - lvalp->constraint =
371 + sscanf (yytext, "%lf", &v);
372 + yylval.constraint =
373 new TAO_ETCL_Literal_Constraint (v);
374 - TAO_YY_LEX_DEBUG; return TAO_ETCL_FLOAT;
375 + TAO_YY_LEX_DEBUG; return TAO_ETCL_FLOAT;
377 YY_BREAK
378 case 37:
379 YY_RULE_SETUP
380 -#line 106 "ETCL.ll"
382 - lvalp->constraint =
383 - new TAO_ETCL_Literal_Constraint (extract_string (yytext));
384 - TAO_YY_LEX_DEBUG; return TAO_ETCL_STRING;
385 +//#line 106 "ETCL/ETCL.ll"
387 + yylval.constraint =
388 + new TAO_ETCL_Literal_Constraint (extract_string(yytext));
389 + TAO_YY_LEX_DEBUG; return TAO_ETCL_STRING;
391 YY_BREAK
392 case 38:
393 YY_RULE_SETUP
394 -#line 111 "ETCL.ll"
396 - lvalp->constraint =
397 +//#line 111 "ETCL/ETCL.ll"
399 + yylval.constraint =
400 new TAO_ETCL_Identifier (yytext);
401 - TAO_YY_LEX_DEBUG; return TAO_ETCL_IDENT;
402 + TAO_YY_LEX_DEBUG; return TAO_ETCL_IDENT;
404 YY_BREAK
405 case 39:
406 YY_RULE_SETUP
407 -#line 116 "ETCL.ll"
409 +//#line 116 "ETCL/ETCL.ll"
411 TAO_YY_LEX_DEBUG; break; // Ignore
413 YY_BREAK
414 case 40:
415 YY_RULE_SETUP
416 -#line 119 "ETCL.ll"
418 +//#line 119 "ETCL/ETCL.ll"
420 TAO_YY_LEX_DEBUG; break; // @@ TODO
422 YY_BREAK
423 case 41:
424 YY_RULE_SETUP
425 -#line 122 "ETCL.ll"
426 -ECHO;
427 +//#line 122 "ETCL/ETCL.ll"
428 +TAO_ETCL_ECHO;
429 YY_BREAK
430 -#line 956 "lex.yy.c"
431 case YY_STATE_EOF(INITIAL):
432 yyterminate();
434 @@ -1288,7 +1278,7 @@
435 return yy_is_jam ? 0 : yy_current_state;
439 +#if 0
440 #ifndef YY_NO_UNPUT
441 #ifdef YY_USE_PROTOS
442 static void yyunput( int c, ACE_REGISTER char *yy_bp )
443 @@ -1332,7 +1322,7 @@
444 yy_c_buf_p = yy_cp;
446 #endif /* ifndef YY_NO_UNPUT */
448 +#endif /* 0 */
450 #ifdef __cplusplus
451 static int yyinput()
452 @@ -1406,6 +1396,11 @@
453 return c;
456 +void yyflush_current_buffer (void)
458 + YY_FLUSH_BUFFER;
462 #ifdef YY_USE_PROTOS
463 void yyrestart( FILE *input_file )
464 @@ -1516,11 +1511,6 @@
468 -#ifndef YY_ALWAYS_INTERACTIVE
469 -#ifndef YY_NEVER_INTERACTIVE
470 -extern int isatty YY_PROTO(( int ));
471 -#endif
472 -#endif
474 #ifdef YY_USE_PROTOS
475 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
476 @@ -1537,15 +1527,18 @@
477 b->yy_input_file = file;
478 b->yy_fill_buffer = 1;
480 -#if YY_ALWAYS_INTERACTIVE
481 - b->yy_is_interactive = 1;
482 -#else
483 -#if YY_NEVER_INTERACTIVE
484 - b->yy_is_interactive = 0;
485 +#if defined (ACE_HAS_WINCE)
486 + // Mimic the behavior as WinCE does not have isatty().
487 + if ((file != 0) && (file == ACE_OS::fileno(file))) {
488 + b->yy_is_interactive = 1;
490 + else {
491 + b->yy_is_interactive = 0;
493 #else
494 b->yy_is_interactive = file ? (ACE_OS::isatty( ACE_OS::fileno(file) ) > 0) : 0;
495 -#endif
496 -#endif
497 +#endif // ACE_HAS_WINCE
502 @@ -1838,7 +1831,7 @@
503 return 0;
505 #endif
506 -#line 122 "ETCL.ll"
507 +//#line 122 "ETCL/ETCL.ll"
510 const char*