1 karl 1.19 //%2003////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Development
4 // Company, L. P., IBM Corp., The Open Group, Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.;
6 // IBM Corp.; EMC Corporation, The Open Group.
7 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to
10 // deal in the Software without restriction, including without limitation the
11 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12 // sell copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
14 //
15 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
16 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
17 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
18 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
19 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 karl 1.19 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 //
24 //==============================================================================
|
25 mike 1.3 #define yy_create_buffer cimmof__create_buffer
26 #define yy_delete_buffer cimmof__delete_buffer
27 #define yy_scan_buffer cimmof__scan_buffer
28 #define yy_scan_string cimmof__scan_string
29 #define yy_scan_bytes cimmof__scan_bytes
30 #define yy_flex_debug cimmof__flex_debug
31 #define yy_init_buffer cimmof__init_buffer
32 #define yy_flush_buffer cimmof__flush_buffer
33 #define yy_load_buffer_state cimmof__load_buffer_state
34 #define yy_switch_to_buffer cimmof__switch_to_buffer
35 #define yyin cimmof_in
36 #define yyleng cimmof_leng
37 #define yylex cimmof_lex
38 #define yyout cimmof_out
39 #define yyrestart cimmof_restart
40 #define yytext cimmof_text
41 #define yywrap cimmof_wrap
42
43 #line 20 "cimmof_lex.cpp"
44 /* A lexical scanner generated by flex */
45
46 mike 1.3 /* Scanner skeleton version:
|
47 karl 1.19 * $Header: /cvs/MSB/pegasus/src/Pegasus/Compiler/cimmof_lex.cpp,v 1.18 2003/09/09 16:31:56 karl Exp $
|
48 mike 1.3 */
49
50 #define FLEX_SCANNER
51 #define YY_FLEX_MAJOR_VERSION 2
52 #define YY_FLEX_MINOR_VERSION 5
53
54 #include <stdio.h>
55
56
57 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
58 #ifdef c_plusplus
59 #ifndef __cplusplus
60 #define __cplusplus
61 #endif
62 #endif
63
64
65 #ifdef __cplusplus
66
67 #include <stdlib.h>
|
68 kumpf 1.14 #include <unistd.h>
|
69 mike 1.3
70 /* Use prototypes in function declarations. */
71 #define YY_USE_PROTOS
72
73 /* The "const" storage-class-modifier is valid. */
74 #define YY_USE_CONST
75
76 #else /* ! __cplusplus */
77
78 #if __STDC__
79
80 #define YY_USE_PROTOS
81 #define YY_USE_CONST
82
83 #endif /* __STDC__ */
84 #endif /* ! __cplusplus */
85
86 #ifdef __TURBOC__
87 #pragma warn -rch
88 #pragma warn -use
89 #include <io.h>
90 mike 1.3 #include <stdlib.h>
91 #define YY_USE_CONST
92 #define YY_USE_PROTOS
93 #endif
94
95 #ifdef YY_USE_CONST
96 #define yyconst const
97 #else
98 #define yyconst
99 #endif
100
101
102 #ifdef YY_USE_PROTOS
103 #define YY_PROTO(proto) proto
104 #else
105 #define YY_PROTO(proto) ()
106 #endif
107
108 /* Returned upon end-of-file. */
109 #define YY_NULL 0
110
111 mike 1.3 /* Promotes a possibly negative, possibly signed char to an unsigned
112 * integer for use as an array index. If the signed char is negative,
113 * we want to instead treat it as an 8-bit unsigned char, hence the
114 * double cast.
115 */
116 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
117
118 /* Enter a start condition. This macro really ought to take a parameter,
119 * but we do it the disgusting crufty way forced on us by the ()-less
120 * definition of BEGIN.
121 */
122 #define BEGIN yy_start = 1 + 2 *
123
124 /* Translate the current start state into a value that can be later handed
125 * to BEGIN to return to the state. The YYSTATE alias is for lex
126 * compatibility.
127 */
128 #define YY_START ((yy_start - 1) / 2)
129 #define YYSTATE YY_START
130
131 /* Action number for EOF rule of a given start state. */
132 mike 1.3 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
133
134 /* Special action meaning "start processing a new file". */
135 #define YY_NEW_FILE yyrestart( yyin )
136
137 #define YY_END_OF_BUFFER_CHAR 0
138
139 /* Size of default input buffer. */
140 #define YY_BUF_SIZE 16384
141
142 typedef struct yy_buffer_state *YY_BUFFER_STATE;
143
144 extern int yyleng;
145 extern FILE *yyin, *yyout;
146
147 #define EOB_ACT_CONTINUE_SCAN 0
148 #define EOB_ACT_END_OF_FILE 1
149 #define EOB_ACT_LAST_MATCH 2
150
151 /* The funky do-while in the following #define is used to turn the definition
152 * int a single C statement (which needs a semi-colon terminator). This
153 mike 1.3 * avoids problems with code like:
154 *
155 * if ( condition_holds )
156 * yyless( 5 );
157 * else
158 * do_something_else();
159 *
160 * Prior to using the do-while the compiler would get upset at the
161 * "else" because it interpreted the "if" statement as being all
162 * done when it reached the ';' after the yyless() call.
163 */
164
165 /* Return all but the first 'n' matched characters back to the input stream. */
166
167 #define yyless(n) \
168 do \
169 { \
170 /* Undo effects of setting up yytext. */ \
171 *yy_cp = yy_hold_char; \
172 YY_RESTORE_YY_MORE_OFFSET \
173 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
174 mike 1.3 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
175 } \
176 while ( 0 )
177
178 #define unput(c) yyunput( c, yytext_ptr )
179
180 /* The following is because we cannot portably get our hands on size_t
181 * (without autoconf's help, which isn't available because we want
182 * flex-generated scanners to compile on their own).
183 */
184 typedef unsigned int yy_size_t;
185
186
187 struct yy_buffer_state
188 {
189 FILE *yy_input_file;
190
191 char *yy_ch_buf; /* input buffer */
192 char *yy_buf_pos; /* current position in input buffer */
193
194 /* Size of input buffer in bytes, not including room for EOB
195 mike 1.3 * characters.
196 */
197 yy_size_t yy_buf_size;
198
199 /* Number of characters read into yy_ch_buf, not including EOB
200 * characters.
201 */
202 int yy_n_chars;
203
204 /* Whether we "own" the buffer - i.e., we know we created it,
205 * and can realloc() it to grow it, and should free() it to
206 * delete it.
207 */
208 int yy_is_our_buffer;
209
210 /* Whether this is an "interactive" input source; if so, and
211 * if we're using stdio for input, then we want to use getc()
212 * instead of fread(), to make sure we stop fetching input after
213 * each newline.
214 */
215 int yy_is_interactive;
216 mike 1.3
217 /* Whether we're considered to be at the beginning of a line.
218 * If so, '^' rules will be active on the next match, otherwise
219 * not.
220 */
221 int yy_at_bol;
222
223 /* Whether to try to fill the input buffer when we reach the
224 * end of it.
225 */
226 int yy_fill_buffer;
227
228 int yy_buffer_status;
229 #define YY_BUFFER_NEW 0
230 #define YY_BUFFER_NORMAL 1
231 /* When an EOF's been seen but there's still some text to process
232 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
233 * shouldn't try reading from the input source any more. We might
234 * still have a bunch of tokens to match, though, because of
235 * possible backing-up.
236 *
237 mike 1.3 * When we actually see the EOF, we change the status to "new"
238 * (via yyrestart()), so that the user can continue scanning by
239 * just pointing yyin at a new input file.
240 */
241 #define YY_BUFFER_EOF_PENDING 2
242 };
243
244 static YY_BUFFER_STATE yy_current_buffer = 0;
245
246 /* We provide macros for accessing buffer states in case in the
247 * future we want to put the buffer states in a more general
248 * "scanner state".
249 */
250 #define YY_CURRENT_BUFFER yy_current_buffer
251
252
253 /* yy_hold_char holds the character lost when yytext is formed. */
254 static char yy_hold_char;
255
256 static int yy_n_chars; /* number of characters read into yy_ch_buf */
257
258 mike 1.3
259 int yyleng;
260
261 /* Points to current character in buffer. */
262 static char *yy_c_buf_p = (char *) 0;
263 static int yy_init = 1; /* whether we need to initialize */
264 static int yy_start = 0; /* start state number */
265
266 /* Flag which is used to allow yywrap()'s to do buffer switches
267 * instead of setting up a fresh yyin. A bit of a hack ...
268 */
269 static int yy_did_buffer_switch_on_eof;
270
271 void yyrestart YY_PROTO(( FILE *input_file ));
272
273 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
274 void yy_load_buffer_state YY_PROTO(( void ));
275 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
276 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
277 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
278 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
279 mike 1.3 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
280
281 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
282 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
283 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
284
285 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
286 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
287 static void yy_flex_free YY_PROTO(( void * ));
288
289 #define yy_new_buffer yy_create_buffer
290
291 #define yy_set_interactive(is_interactive) \
292 { \
293 if ( ! yy_current_buffer ) \
294 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
295 yy_current_buffer->yy_is_interactive = is_interactive; \
296 }
297
298 #define yy_set_bol(at_bol) \
299 { \
300 mike 1.3 if ( ! yy_current_buffer ) \
301 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
302 yy_current_buffer->yy_at_bol = at_bol; \
303 }
304
305 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
306
307 typedef unsigned char YY_CHAR;
308 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
309 typedef int yy_state_type;
310 extern char *yytext;
311 #define yytext_ptr yytext
312
313 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
314 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
315 static int yy_get_next_buffer YY_PROTO(( void ));
316 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
317
318 /* Done after the current pattern has been matched and before the
319 * corresponding action - sets up yytext.
320 */
321 mike 1.3 #define YY_DO_BEFORE_ACTION \
322 yytext_ptr = yy_bp; \
323 yyleng = (int) (yy_cp - yy_bp); \
324 yy_hold_char = *yy_cp; \
325 *yy_cp = '\0'; \
326 yy_c_buf_p = yy_cp;
327
|
328 kumpf 1.11 #define YY_NUM_RULES 66
329 #define YY_END_OF_BUFFER 67
330 static yyconst short int yy_accept[272] =
|
331 mike 1.3 { 0,
|
332 kumpf 1.11 0, 0, 67, 65, 3, 1, 26, 65, 65, 9,
333 10, 65, 20, 27, 65, 17, 17, 11, 12, 19,
334 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
335 64, 64, 64, 64, 64, 64, 64, 7, 8, 64,
336 5, 6, 0, 22, 0, 0, 0, 18, 18, 18,
337 13, 2, 17, 0, 64, 64, 64, 64, 64, 64,
338 64, 64, 64, 64, 64, 64, 64, 30, 64, 64,
339 64, 64, 64, 64, 64, 64, 64, 64, 64, 0,
340 21, 14, 14, 16, 13, 2, 2, 15, 40, 64,
341 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
342
343 64, 64, 64, 64, 64, 64, 41, 64, 64, 64,
344 64, 64, 64, 64, 64, 64, 64, 0, 13, 13,
345 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
346 64, 64, 23, 64, 64, 64, 64, 64, 64, 64,
347 64, 64, 64, 64, 64, 24, 64, 64, 0, 64,
348 64, 64, 62, 64, 64, 64, 25, 64, 64, 64,
349 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
350 32, 64, 64, 64, 56, 64, 64, 64, 64, 64,
351 64, 52, 4, 0, 64, 64, 63, 64, 64, 64,
352 42, 64, 64, 64, 38, 64, 64, 64, 60, 61,
353 kumpf 1.11
354 64, 64, 33, 57, 58, 59, 49, 64, 64, 53,
355 54, 55, 28, 64, 50, 64, 64, 64, 48, 64,
356 64, 64, 64, 64, 64, 64, 64, 64, 64, 51,
357 64, 64, 64, 29, 64, 36, 64, 64, 64, 64,
358 64, 64, 64, 64, 64, 39, 31, 37, 64, 64,
359 64, 64, 64, 64, 35, 45, 46, 64, 34, 64,
360 64, 64, 64, 64, 47, 64, 64, 64, 43, 44,
361 0
|
362 mike 1.3 } ;
363
364 static yyconst int yy_ec[256] =
365 { 0,
366 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
367 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
368 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
369 1, 2, 1, 5, 6, 7, 1, 1, 8, 9,
370 10, 1, 11, 12, 11, 13, 14, 15, 16, 17,
371 18, 19, 20, 21, 20, 22, 23, 24, 25, 1,
372 26, 1, 1, 1, 27, 28, 29, 30, 31, 32,
373 33, 34, 35, 36, 36, 37, 38, 39, 40, 41,
374 42, 43, 44, 45, 46, 47, 36, 36, 48, 36,
|
375 kumpf 1.11 49, 1, 50, 1, 36, 1, 51, 28, 52, 30,
|
376 mike 1.3
|
377 kumpf 1.11 31, 32, 33, 34, 35, 36, 36, 53, 38, 39,
378 40, 41, 42, 43, 54, 45, 46, 47, 36, 55,
379 48, 36, 56, 1, 57, 1, 1, 1, 1, 1,
|
380 mike 1.3 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
381 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
382 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
383 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
384 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
385 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
386 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
387
388 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
389 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
390 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
391 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
392 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
393 1, 1, 1, 1, 1
394 } ;
395
|
396 kumpf 1.11 static yyconst int yy_meta[58] =
|
397 mike 1.3 { 0,
398 1, 1, 2, 1, 1, 1, 3, 1, 1, 1,
|
399 kumpf 1.11 4, 1, 5, 1, 6, 6, 6, 6, 6, 6,
400 6, 6, 6, 1, 1, 1, 7, 7, 7, 7,
401 7, 7, 3, 3, 3, 3, 3, 3, 3, 3,
|
402 mike 1.3 3, 3, 3, 3, 3, 3, 3, 3, 1, 1,
|
403 kumpf 1.11 7, 7, 3, 3, 8, 1, 1
|
404 mike 1.3 } ;
405
|
406 kumpf 1.11 static yyconst short int yy_base[281] =
|
407 mike 1.3 { 0,
|
408 kumpf 1.11 0, 0, 393, 394, 394, 394, 55, 351, 0, 394,
409 394, 46, 394, 0, 377, 50, 51, 394, 394, 394,
410 26, 350, 355, 39, 349, 40, 0, 348, 355, 339,
411 352, 41, 337, 351, 43, 33, 346, 394, 394, 41,
412 394, 394, 66, 394, 337, 371, 0, 94, 70, 365,
413 346, 373, 0, 0, 0, 327, 35, 334, 69, 328,
414 43, 72, 65, 73, 96, 327, 66, 0, 328, 330,
415 77, 100, 95, 330, 325, 77, 106, 328, 315, 107,
416 357, 0, 121, 394, 353, 360, 394, 0, 0, 322,
417 93, 318, 329, 111, 331, 99, 311, 102, 322, 311,
418
419 321, 108, 114, 313, 110, 119, 322, 307, 320, 309,
420 304, 313, 301, 307, 314, 299, 289, 309, 330, 329,
421 130, 308, 144, 293, 309, 127, 305, 295, 288, 138,
422 141, 293, 0, 294, 300, 295, 152, 286, 285, 289,
423 295, 153, 286, 296, 132, 0, 163, 269, 284, 286,
424 150, 299, 0, 284, 141, 287, 0, 274, 286, 156,
425 276, 284, 282, 269, 279, 293, 290, 277, 272, 160,
426 0, 285, 288, 285, 0, 270, 160, 151, 281, 284,
427 281, 0, 0, 164, 166, 260, 0, 260, 266, 256,
428 0, 264, 249, 166, 0, 248, 247, 256, 0, 0,
429 kumpf 1.11
430 251, 167, 0, 0, 0, 0, 0, 160, 171, 0,
431 0, 0, 394, 244, 0, 257, 247, 239, 0, 250,
432 253, 252, 234, 250, 171, 235, 175, 234, 243, 0,
433 230, 245, 235, 0, 231, 0, 230, 241, 240, 155,
434 176, 230, 238, 224, 213, 0, 0, 0, 221, 162,
435 220, 198, 182, 181, 0, 0, 0, 168, 0, 177,
436 179, 179, 173, 112, 0, 78, 70, 51, 0, 0,
437 394, 227, 235, 239, 75, 241, 247, 255, 258, 262
|
438 mike 1.3 } ;
439
|
440 kumpf 1.11 static yyconst short int yy_def[281] =
|
441 mike 1.3 { 0,
|
442 kumpf 1.11 271, 1, 271, 271, 271, 271, 272, 271, 273, 271,
443 271, 274, 271, 275, 271, 276, 276, 271, 271, 271,
444 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
445 277, 277, 277, 277, 277, 277, 277, 271, 271, 277,
446 271, 271, 272, 271, 271, 273, 275, 271, 274, 274,
447 275, 278, 17, 279, 277, 277, 277, 277, 277, 277,
448 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
449 277, 277, 277, 277, 277, 277, 277, 277, 277, 271,
450 273, 48, 48, 271, 280, 278, 271, 279, 277, 277,
451 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
452
453 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
454 277, 277, 277, 277, 277, 277, 277, 271, 280, 280,
455 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
456 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
457 277, 277, 277, 277, 277, 277, 277, 277, 271, 277,
458 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
459 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
460 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
461 277, 277, 277, 271, 277, 277, 277, 277, 277, 277,
462 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
463 kumpf 1.11
464 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
465 277, 277, 271, 277, 277, 277, 277, 277, 277, 277,
466 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
467 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
468 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
469 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
470 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
471 0, 271, 271, 271, 271, 271, 271, 271, 271, 271
|
472 mike 1.3 } ;
473
|
474 kumpf 1.11 static yyconst short int yy_nxt[452] =
|
475 mike 1.3 { 0,
|
476 kumpf 1.10 4, 5, 6, 5, 7, 8, 4, 9, 10, 11,
477 12, 13, 14, 15, 16, 17, 17, 17, 17, 17,
478 17, 17, 17, 18, 19, 20, 21, 22, 23, 24,
479 25, 26, 27, 27, 28, 27, 27, 29, 30, 31,
480 32, 33, 34, 35, 36, 37, 27, 27, 38, 39,
|
481 kumpf 1.11 21, 40, 27, 35, 27, 41, 42, 44, 47, 44,
482 48, 49, 47, 47, 56, 60, 63, 69, 44, 57,
483 44, 73, 76, 61, 59, 77, 64, 74, 90, 57,
484 51, 270, 47, 70, 49, 49, 94, 75, 90, 60,
485 63, 69, 64, 79, 73, 92, 94, 84, 95, 97,
486
487 269, 96, 102, 105, 54, 271, 47, 268, 82, 82,
488 83, 83, 83, 83, 83, 50, 50, 96, 102, 92,
489 113, 84, 95, 97, 98, 99, 106, 105, 109, 122,
490 113, 107, 114, 118, 110, 83, 83, 125, 129, 100,
491 134, 267, 127, 108, 133, 122, 136, 98, 271, 100,
492 106, 115, 127, 108, 129, 137, 114, 118, 150, 152,
493 133, 125, 136, 156, 134, 153, 160, 161, 172, 166,
494 173, 137, 167, 174, 175, 178, 186, 189, 179, 156,
495 180, 150, 193, 181, 182, 178, 203, 209, 208, 160,
496 213, 161, 214, 189, 221, 226, 227, 228, 250, 238,
497
498 186, 240, 251, 209, 262, 257, 193, 266, 250, 265,
499 203, 208, 227, 264, 213, 257, 214, 221, 226, 263,
500 262, 228, 238, 261, 260, 240, 251, 43, 43, 43,
501 43, 43, 43, 43, 43, 46, 259, 46, 46, 46,
502 kumpf 1.11 46, 46, 46, 50, 50, 53, 53, 258, 53, 55,
503 256, 255, 55, 55, 55, 86, 86, 86, 86, 86,
504 86, 86, 86, 88, 88, 120, 254, 120, 253, 252,
505 249, 248, 247, 246, 245, 244, 243, 242, 241, 239,
506 237, 236, 235, 234, 233, 232, 231, 230, 229, 225,
507 224, 223, 222, 220, 219, 218, 217, 216, 215, 212,
508
509 211, 210, 207, 206, 205, 204, 202, 201, 200, 199,
510 198, 197, 196, 195, 194, 192, 191, 190, 188, 187,
511 185, 184, 183, 177, 176, 171, 170, 169, 168, 165,
512 164, 163, 162, 159, 158, 157, 155, 154, 151, 271,
513 271, 149, 148, 147, 146, 145, 144, 143, 142, 141,
514 140, 139, 138, 135, 132, 131, 130, 128, 126, 124,
515 123, 121, 87, 119, 81, 117, 116, 112, 111, 104,
516 103, 101, 93, 91, 89, 87, 85, 47, 81, 80,
517 78, 72, 71, 68, 67, 66, 65, 62, 59, 58,
518 52, 45, 271, 3, 271, 271, 271, 271, 271, 271,
519
520 271, 271, 271, 271, 271, 271, 271, 271, 271, 271,
521 271, 271, 271, 271, 271, 271, 271, 271, 271, 271,
522 271, 271, 271, 271, 271, 271, 271, 271, 271, 271,
523 kumpf 1.11 271, 271, 271, 271, 271, 271, 271, 271, 271, 271,
524 271, 271, 271, 271, 271, 271, 271, 271, 271, 271,
525 271
|
526 mike 1.3 } ;
527
|
528 kumpf 1.11 static yyconst short int yy_chk[452] =
|
529 mike 1.3 { 0,
530 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
531 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
532 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
533 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
534 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
535 kumpf 1.11 1, 1, 1, 1, 1, 1, 1, 7, 12, 7,
536 12, 12, 16, 17, 21, 24, 26, 32, 43, 21,
537 43, 35, 36, 24, 40, 36, 26, 35, 57, 21,
538 275, 268, 49, 32, 49, 49, 61, 35, 57, 24,
539 26, 32, 26, 40, 35, 59, 61, 49, 62, 64,
540
541 267, 63, 67, 71, 16, 17, 48, 266, 48, 48,
542 48, 48, 48, 48, 48, 48, 48, 63, 67, 59,
543 76, 48, 62, 64, 65, 65, 72, 71, 73, 91,
544 76, 72, 77, 80, 73, 83, 83, 94, 98, 65,
545 103, 264, 96, 72, 102, 91, 105, 65, 83, 65,
546 72, 77, 96, 72, 98, 106, 77, 80, 121, 123,
547 102, 94, 105, 126, 103, 123, 130, 131, 142, 137,
548 142, 106, 137, 142, 142, 145, 151, 155, 147, 126,
549 147, 121, 160, 147, 147, 145, 170, 178, 177, 130,
550 184, 131, 185, 155, 194, 202, 208, 209, 240, 225,
551
552 151, 227, 241, 178, 258, 250, 160, 263, 240, 262,
553 170, 177, 208, 261, 184, 250, 185, 194, 202, 260,
554 258, 209, 225, 254, 253, 227, 241, 272, 272, 272,
555 272, 272, 272, 272, 272, 273, 252, 273, 273, 273,
556 kumpf 1.11 273, 273, 273, 274, 274, 276, 276, 251, 276, 277,
557 249, 245, 277, 277, 277, 278, 278, 278, 278, 278,
558 278, 278, 278, 279, 279, 280, 244, 280, 243, 242,
559 239, 238, 237, 235, 233, 232, 231, 229, 228, 226,
560 224, 223, 222, 221, 220, 218, 217, 216, 214, 201,
561 198, 197, 196, 193, 192, 190, 189, 188, 186, 181,
562
563 180, 179, 176, 174, 173, 172, 169, 168, 167, 166,
564 165, 164, 163, 162, 161, 159, 158, 156, 154, 152,
565 150, 149, 148, 144, 143, 141, 140, 139, 138, 136,
566 135, 134, 132, 129, 128, 127, 125, 124, 122, 120,
567 119, 118, 117, 116, 115, 114, 113, 112, 111, 110,
568 109, 108, 107, 104, 101, 100, 99, 97, 95, 93,
569 92, 90, 86, 85, 81, 79, 78, 75, 74, 70,
570 69, 66, 60, 58, 56, 52, 51, 50, 46, 45,
571 37, 34, 33, 31, 30, 29, 28, 25, 23, 22,
572 15, 8, 3, 271, 271, 271, 271, 271, 271, 271,
573
574 271, 271, 271, 271, 271, 271, 271, 271, 271, 271,
575 271, 271, 271, 271, 271, 271, 271, 271, 271, 271,
576 271, 271, 271, 271, 271, 271, 271, 271, 271, 271,
577 kumpf 1.11 271, 271, 271, 271, 271, 271, 271, 271, 271, 271,
578 271, 271, 271, 271, 271, 271, 271, 271, 271, 271,
579 271
|
580 mike 1.3 } ;
581
582 static yy_state_type yy_last_accepting_state;
583 static char *yy_last_accepting_cpos;
584
585 /* The intent behind this definition is that it'll catch
586 * any uses of REJECT which flex missed.
587 */
588 #define REJECT reject_used_but_not_detected
589 #define yymore() yymore_used_but_not_detected
590 #define YY_MORE_ADJ 0
591 #define YY_RESTORE_YY_MORE_OFFSET
592 char *yytext;
593 #line 1 "cimmof.l"
594 #define INITIAL 0
595 #define YY_NEVER_INTERACTIVE 1
596 #line 3 "cimmof.l"
597
598 #include "cimmofParser.h"
599 #include "memobjs.h"
600 #include "cimmof_tab.h"
601 mike 1.3
|
602 kumpf 1.10 /* ATTN-DME-DEFERRED-20020516 - MOF COMPILER ALIASING DISABLED */
|
603 kumpf 1.11 /* To enable aliasing add the following two lines */
|
604 kumpf 1.10 /* $[_$0-9a-zA-Z]+ { return(TOK_ALIAS_IDENTIFIER); } */
|
605 kumpf 1.11 /* [Aa][Ss] { return(TOK_AS); } */
|
606 kumpf 1.10
|
607 mike 1.3 /*---------------------------------------------------------------*/
608 /* These routines wrap certain flex functions, keeping down the */
609 /* number of external dependencies */
610 /*---------------------------------------------------------------*/
611 int get_yy_buf_size_wrapper() { return YY_BUF_SIZE; }
612
613 void * get_cimmof__current_buffer_wrapper() {
614 return (void *)YY_CURRENT_BUFFER;
615 }
616
617 void * create_cimmof_buffer_wrapper(const FILE *f, int size) {
618 return (void *)yy_create_buffer((FILE *)f, size);
619 }
620
|
621 kumpf 1.16 int switch_to_buffer_wrapper(void *buffstate, Boolean closeCurrent) {
622 if (closeCurrent)
623 {
624 if (yyin != NULL)
625 {
626 fflush(yyin);
627 fclose(yyin);
628 yyin = NULL;
629 }
630 yy_delete_buffer(YY_CURRENT_BUFFER);
631 }
|
632 mike 1.3 yy_switch_to_buffer((YY_BUFFER_STATE)buffstate);
633 return 0;
634 }
635
636
637
|
638 kumpf 1.16 #line 615 "cimmof_lex.cpp"
|
639 mike 1.3
640 /* Macros after this point can all be overridden by user definitions in
641 * section 1.
642 */
643
644 #ifndef YY_SKIP_YYWRAP
645 #ifdef __cplusplus
646 extern "C" int yywrap YY_PROTO(( void ));
647 #else
648 extern int yywrap YY_PROTO(( void ));
649 #endif
650 #endif
651
652 #ifndef YY_NO_UNPUT
653 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
654 #endif
655
656 #ifndef yytext_ptr
657 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
658 #endif
659
660 mike 1.3 #ifdef YY_NEED_STRLEN
661 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
662 #endif
663
664 #ifndef YY_NO_INPUT
665 #ifdef __cplusplus
666 static int yyinput YY_PROTO(( void ));
667 #else
668 static int input YY_PROTO(( void ));
669 #endif
670 #endif
671
672 #if YY_STACK_USED
673 static int yy_start_stack_ptr = 0;
674 static int yy_start_stack_depth = 0;
675 static int *yy_start_stack = 0;
676 #ifndef YY_NO_PUSH_STATE
677 static void yy_push_state YY_PROTO(( int new_state ));
678 #endif
679 #ifndef YY_NO_POP_STATE
680 static void yy_pop_state YY_PROTO(( void ));
681 mike 1.3 #endif
682 #ifndef YY_NO_TOP_STATE
683 static int yy_top_state YY_PROTO(( void ));
684 #endif
685
686 #else
687 #define YY_NO_PUSH_STATE 1
688 #define YY_NO_POP_STATE 1
689 #define YY_NO_TOP_STATE 1
690 #endif
691
692 #ifdef YY_MALLOC_DECL
693 YY_MALLOC_DECL
694 #else
695 #if __STDC__
696 #ifndef __cplusplus
697 #include <stdlib.h>
698 #endif
699 #else
700 /* Just try to get by without declaring the routines. This will fail
701 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
702 mike 1.3 * or sizeof(void*) != sizeof(int).
703 */
704 #endif
705 #endif
706
707 /* Amount of stuff to slurp up with each read. */
708 #ifndef YY_READ_BUF_SIZE
709 #define YY_READ_BUF_SIZE 8192
710 #endif
711
712 /* Copy whatever the last rule matched to the standard output. */
713
714 #ifndef ECHO
715 /* This used to be an fputs(), but since the string might contain NUL's,
716 * we now use fwrite().
717 */
718 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
719 #endif
720
721 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
722 * is returned in "result".
723 mike 1.3 */
724 #ifndef YY_INPUT
725 #define YY_INPUT(buf,result,max_size) \
726 if ( yy_current_buffer->yy_is_interactive ) \
727 { \
728 int c = '*', n; \
729 for ( n = 0; n < max_size && \
730 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
731 buf[n] = (char) c; \
732 if ( c == '\n' ) \
733 buf[n++] = (char) c; \
734 if ( c == EOF && ferror( yyin ) ) \
735 YY_FATAL_ERROR( "input in flex scanner failed" ); \
736 result = n; \
737 } \
738 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
739 && ferror( yyin ) ) \
740 YY_FATAL_ERROR( "input in flex scanner failed" );
741 #endif
742
743 /* No semi-colon after return; correct usage is to write "yyterminate();" -
744 mike 1.3 * we don't want an extra ';' after the "return" because that will cause
745 * some compilers to complain about unreachable statements.
746 */
747 #ifndef yyterminate
748 #define yyterminate() return YY_NULL
749 #endif
750
751 /* Number of entries by which start-condition stack grows. */
752 #ifndef YY_START_STACK_INCR
753 #define YY_START_STACK_INCR 25
754 #endif
755
756 /* Report a fatal error. */
757 #ifndef YY_FATAL_ERROR
758 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
759 #endif
760
761 /* Default declaration of generated scanner - a define so the user can
762 * easily add parameters.
763 */
764 #ifndef YY_DECL
765 mike 1.3 #define YY_DECL int yylex YY_PROTO(( void ))
766 #endif
767
768 /* Code executed at the beginning of each rule, after yytext and yyleng
769 * have been set up.
770 */
771 #ifndef YY_USER_ACTION
772 #define YY_USER_ACTION
773 #endif
774
775 /* Code executed at the end of each rule. */
776 #ifndef YY_BREAK
777 #define YY_BREAK break;
778 #endif
779
780 #define YY_RULE_SETUP \
781 YY_USER_ACTION
782
783 YY_DECL
784 {
785 register yy_state_type yy_current_state;
|
786 kumpf 1.14 register char *yy_cp, *yy_bp;
|
787 mike 1.3 register int yy_act;
788
|
789 kumpf 1.16 #line 47 "cimmof.l"
|
790 mike 1.3
791
792
|
793 kumpf 1.16 #line 770 "cimmof_lex.cpp"
|
794 mike 1.3
795 if ( yy_init )
796 {
797 yy_init = 0;
798
799 #ifdef YY_USER_INIT
800 YY_USER_INIT;
801 #endif
802
803 if ( ! yy_start )
804 yy_start = 1; /* first start state */
805
806 if ( ! yyin )
807 yyin = stdin;
808
809 if ( ! yyout )
810 yyout = stdout;
811
812 if ( ! yy_current_buffer )
813 yy_current_buffer =
814 yy_create_buffer( yyin, YY_BUF_SIZE );
815 mike 1.3
816 yy_load_buffer_state();
817 }
818
819 while ( 1 ) /* loops until end-of-file is reached */
820 {
821 yy_cp = yy_c_buf_p;
822
823 /* Support of yytext. */
824 *yy_cp = yy_hold_char;
825
826 /* yy_bp points to the position in yy_ch_buf of the start of
827 * the current run.
828 */
829 yy_bp = yy_cp;
830
831 yy_current_state = yy_start;
832 yy_match:
833 do
834 {
835 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
836 mike 1.3 if ( yy_accept[yy_current_state] )
837 {
838 yy_last_accepting_state = yy_current_state;
839 yy_last_accepting_cpos = yy_cp;
840 }
841 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
842 {
843 yy_current_state = (int) yy_def[yy_current_state];
|
844 kumpf 1.11 if ( yy_current_state >= 272 )
|
845 mike 1.3 yy_c = yy_meta[(unsigned int) yy_c];
846 }
847 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
848 ++yy_cp;
849 }
|
850 kumpf 1.11 while ( yy_base[yy_current_state] != 394 );
|
851 mike 1.3
852 yy_find_action:
853 yy_act = yy_accept[yy_current_state];
854 if ( yy_act == 0 )
855 { /* have to back up */
856 yy_cp = yy_last_accepting_cpos;
857 yy_current_state = yy_last_accepting_state;
858 yy_act = yy_accept[yy_current_state];
859 }
860
861 YY_DO_BEFORE_ACTION;
862
863
864 do_action: /* This label is used only to access EOF actions. */
865
866
867 switch ( yy_act )
868 { /* beginning of action switch */
869 case 0: /* must back up */
870 /* undo the effects of YY_DO_BEFORE_ACTION */
871 *yy_cp = yy_hold_char;
872 mike 1.3 yy_cp = yy_last_accepting_cpos;
873 yy_current_state = yy_last_accepting_state;
874 goto yy_find_action;
875
876 case 1:
877 YY_RULE_SETUP
|
878 kumpf 1.16 #line 50 "cimmof.l"
|
879 mike 1.3 {
880 cimmofParser::Instance()->increment_lineno(); }
881 YY_BREAK
882 case 2:
883 YY_RULE_SETUP
|
884 kumpf 1.16 #line 52 "cimmof.l"
|
885 mike 1.3 {
886 cimmofParser::Instance()->increment_lineno(); }
887 YY_BREAK
888 case 3:
889 YY_RULE_SETUP
|
890 kumpf 1.16 #line 54 "cimmof.l"
|
891 mike 1.3 { /* skip white space */ }
892 YY_BREAK
893 case 4:
894 YY_RULE_SETUP
|
895 kumpf 1.16 #line 55 "cimmof.l"
|
896 mike 1.3 { return(TOK_CLASS); }
897 YY_BREAK
898 case 5:
899 YY_RULE_SETUP
|
900 kumpf 1.16 #line 56 "cimmof.l"
|
901 mike 1.3 { return(TOK_LEFTCURLYBRACE); }
902 YY_BREAK
903 case 6:
904 YY_RULE_SETUP
|
905 kumpf 1.16 #line 57 "cimmof.l"
|
906 mike 1.3 { return(TOK_RIGHTCURLYBRACE); }
907 YY_BREAK
908 case 7:
909 YY_RULE_SETUP
|
910 kumpf 1.16 #line 58 "cimmof.l"
|
911 mike 1.3 { return(TOK_LEFTSQUAREBRACKET); }
912 YY_BREAK
913 case 8:
914 YY_RULE_SETUP
|
915 kumpf 1.16 #line 59 "cimmof.l"
|
916 mike 1.3 { return(TOK_RIGHTSQUAREBRACKET); }
917 YY_BREAK
918 case 9:
919 YY_RULE_SETUP
|
920 kumpf 1.16 #line 60 "cimmof.l"
|
921 mike 1.3 { return(TOK_LEFTPAREN); }
922 YY_BREAK
923 case 10:
924 YY_RULE_SETUP
|
925 kumpf 1.16 #line 61 "cimmof.l"
|
926 mike 1.3 { return(TOK_RIGHTPAREN); }
927 YY_BREAK
928 case 11:
929 YY_RULE_SETUP
|
930 kumpf 1.16 #line 62 "cimmof.l"
|
931 mike 1.3 { return(TOK_COLON); }
932 YY_BREAK
933 case 12:
934 YY_RULE_SETUP
|
935 kumpf 1.16 #line 63 "cimmof.l"
|
936 mike 1.3 { return(TOK_SEMICOLON); }
937 YY_BREAK
938 case 13:
939 YY_RULE_SETUP
|
940 kumpf 1.16 #line 64 "cimmof.l"
|
941 mike 1.3 {
942 cimmof_lval.strval = new String(yytext);
943 return(TOK_REAL_VALUE); }
944 YY_BREAK
945 case 14:
946 YY_RULE_SETUP
|
947 kumpf 1.16 #line 67 "cimmof.l"
|
948 mike 1.3 { cimmof_lval.strval = new String(yytext);
949 return(TOK_OCTAL_VALUE); }
950 YY_BREAK
951 case 15:
952 YY_RULE_SETUP
|
953 kumpf 1.16 #line 69 "cimmof.l"
|
954 mike 1.3 { cimmof_lval.strval = new String(yytext);
955 return(TOK_HEX_VALUE); }
956 YY_BREAK
957 case 16:
958 YY_RULE_SETUP
|
959 kumpf 1.16 #line 71 "cimmof.l"
|
960 mike 1.3 { cimmof_lval.strval = new String(yytext);
961 return(TOK_BINARY_VALUE); }
962 YY_BREAK
963 case 17:
964 YY_RULE_SETUP
|
965 kumpf 1.16 #line 73 "cimmof.l"
|
966 mike 1.3 { cimmof_lval.strval = new String(yytext);
967 return(TOK_POSITIVE_DECIMAL_VALUE); }
968 YY_BREAK
969 case 18:
970 YY_RULE_SETUP
|
971 kumpf 1.16 #line 75 "cimmof.l"
|
972 mike 1.3 { cimmof_lval.strval = new String(yytext);
973 return(TOK_SIGNED_DECIMAL_VALUE); }
974 YY_BREAK
975 case 19:
976 YY_RULE_SETUP
|
977 kumpf 1.16 #line 77 "cimmof.l"
|
978 mike 1.3 { return(TOK_EQUAL); }
979 YY_BREAK
980 case 20:
981 YY_RULE_SETUP
|
982 kumpf 1.16 #line 78 "cimmof.l"
|
983 mike 1.3 { return(TOK_COMMA); }
984 YY_BREAK
985 case 21:
986 YY_RULE_SETUP
|
987 kumpf 1.16 #line 79 "cimmof.l"
|
988 mike 1.3 { cimmof_lval.strval = new String(yytext);
989 return(TOK_CHAR_VALUE); }
990 YY_BREAK
991 case 22:
992 YY_RULE_SETUP
|
993 kumpf 1.16 #line 81 "cimmof.l"
|
994 mike 1.3 { cimmof_lval.strval = new String(yytext);
995 return(TOK_STRING_VALUE); }
996 YY_BREAK
997 case 23:
998 YY_RULE_SETUP
|
999 kumpf 1.16 #line 83 "cimmof.l"
|
1000 mike 1.3 { return(TOK_NULL_VALUE); }
1001 YY_BREAK
1002 case 24:
1003 YY_RULE_SETUP
|
1004 kumpf 1.16 #line 84 "cimmof.l"
|
1005 mike 1.3 { return(TOK_TRUE); }
1006 YY_BREAK
1007 case 25:
1008 YY_RULE_SETUP
|
1009 kumpf 1.16 #line 85 "cimmof.l"
|
1010 mike 1.3 { return(TOK_FALSE); }
1011 YY_BREAK
1012 case 26:
1013 YY_RULE_SETUP
|
1014 kumpf 1.16 #line 86 "cimmof.l"
|
1015 mike 1.3 { return(TOK_DQUOTE); }
1016 YY_BREAK
1017 case 27:
1018 YY_RULE_SETUP
|
1019 kumpf 1.16 #line 87 "cimmof.l"
|
1020 mike 1.3 { return(TOK_PERIOD); }
1021 YY_BREAK
1022 case 28:
1023 YY_RULE_SETUP
|
1024 kumpf 1.16 #line 88 "cimmof.l"
|
1025 mike 1.3 { return(TOK_PRAGMA); }
1026 YY_BREAK
1027 case 29:
1028 YY_RULE_SETUP
|
1029 kumpf 1.16 #line 89 "cimmof.l"
|
1030 kumpf 1.11 {
1031 return(TOK_INSTANCE); }
|
1032 mike 1.3 YY_BREAK
1033 case 30:
1034 YY_RULE_SETUP
|
1035 kumpf 1.16 #line 91 "cimmof.l"
|
1036 mike 1.3 {
|
1037 kumpf 1.11 return(TOK_OF); }
|
1038 mike 1.3 YY_BREAK
1039 case 31:
1040 YY_RULE_SETUP
|
1041 kumpf 1.16 #line 93 "cimmof.l"
|
1042 kumpf 1.11 {return(TOK_QUALIFIER); }
|
1043 mike 1.3 YY_BREAK
1044 case 32:
1045 YY_RULE_SETUP
|
1046 kumpf 1.16 #line 94 "cimmof.l"
|
1047 kumpf 1.11 { return(TOK_SCOPE); }
|
1048 mike 1.3 YY_BREAK
1049 case 33:
1050 YY_RULE_SETUP
|
1051 kumpf 1.16 #line 95 "cimmof.l"
|
1052 kumpf 1.11 { return(TOK_SCHEMA); }
|
1053 mike 1.3 YY_BREAK
1054 case 34:
1055 YY_RULE_SETUP
|
1056 kumpf 1.16 #line 96 "cimmof.l"
|
1057 kumpf 1.11 {
1058 return(TOK_ASSOCIATION); }
|
1059 mike 1.3 YY_BREAK
1060 case 35:
1061 YY_RULE_SETUP
|
1062 kumpf 1.16 #line 98 "cimmof.l"
|
1063 mike 1.3 {
|
1064 kumpf 1.11 return(TOK_INDICATION); }
|
1065 mike 1.3 YY_BREAK
1066 case 36:
1067 YY_RULE_SETUP
|
1068 kumpf 1.16 #line 100 "cimmof.l"
|
1069 kumpf 1.11 { return(TOK_PROPERTY); }
|
1070 mike 1.3 YY_BREAK
1071 case 37:
1072 YY_RULE_SETUP
|
1073 kumpf 1.16 #line 101 "cimmof.l"
|
1074 kumpf 1.11 { return(TOK_REFERENCE); }
|
1075 mike 1.3 YY_BREAK
1076 case 38:
1077 YY_RULE_SETUP
|
1078 kumpf 1.16 #line 102 "cimmof.l"
|
1079 kumpf 1.11 { return(TOK_METHOD); }
|
1080 mike 1.3 YY_BREAK
1081 case 39:
1082 YY_RULE_SETUP
|
1083 kumpf 1.16 #line 103 "cimmof.l"
|
1084 kumpf 1.11 {return(TOK_PARAMETER); }
|
1085 mike 1.3 YY_BREAK
1086 case 40:
1087 YY_RULE_SETUP
|
1088 kumpf 1.16 #line 104 "cimmof.l"
|
1089 kumpf 1.11 { return(TOK_ANY); }
|
1090 mike 1.3 YY_BREAK
1091 case 41:
1092 YY_RULE_SETUP
|
1093 kumpf 1.16 #line 105 "cimmof.l"
|
1094 kumpf 1.11 { return(TOK_REF); }
|
1095 mike 1.3 YY_BREAK
1096 case 42:
1097 YY_RULE_SETUP
|
1098 kumpf 1.16 #line 106 "cimmof.l"
|
1099 kumpf 1.11 { return(TOK_FLAVOR); }
|
1100 mike 1.3 YY_BREAK
1101 case 43:
1102 YY_RULE_SETUP
|
1103 kumpf 1.16 #line 107 "cimmof.l"
|
1104 kumpf 1.11 {
1105 return(TOK_ENABLEOVERRIDE); }
|
1106 mike 1.3 YY_BREAK
1107 case 44:
1108 YY_RULE_SETUP
|
1109 kumpf 1.16 #line 109 "cimmof.l"
|
1110 mike 1.3 {
|
1111 kumpf 1.11 return(TOK_DISABLEOVERRIDE); }
|
1112 mike 1.3 YY_BREAK
1113 case 45:
1114 YY_RULE_SETUP
|
1115 kumpf 1.16 #line 111 "cimmof.l"
|
1116 mike 1.3 {
|
1117 kumpf 1.11 return(TOK_RESTRICTED); }
|
1118 mike 1.3 YY_BREAK
1119 case 46:
1120 YY_RULE_SETUP
|
1121 kumpf 1.16 #line 113 "cimmof.l"
|
1122 kumpf 1.11 {return(TOK_TOSUBCLASS); }
|
1123 mike 1.3 YY_BREAK
1124 case 47:
1125 YY_RULE_SETUP
|
1126 kumpf 1.16 #line 114 "cimmof.l"
|
1127 kumpf 1.11 {
1128 return(TOK_TRANSLATABLE); }
|
1129 mike 1.3 YY_BREAK
1130 case 48:
1131 YY_RULE_SETUP
|
1132 kumpf 1.16 #line 116 "cimmof.l"
|
1133 kumpf 1.11 { return(TOK_INCLUDE); }
|
1134 mike 1.3 YY_BREAK
1135 case 49:
1136 YY_RULE_SETUP
|
1137 kumpf 1.16 #line 117 "cimmof.l"
|
1138 kumpf 1.11 { return(TOK_DT_STR); }
|
1139 mike 1.3 YY_BREAK
1140 case 50:
1141 YY_RULE_SETUP
|
1142 kumpf 1.16 #line 118 "cimmof.l"
|
1143 kumpf 1.11 { return(TOK_DT_BOOL); }
|
1144 mike 1.3 YY_BREAK
1145 case 51:
1146 YY_RULE_SETUP
|
1147 kumpf 1.16 #line 119 "cimmof.l"
|
1148 kumpf 1.11 { return(TOK_DT_DATETIME); }
|
1149 mike 1.3 YY_BREAK
1150 case 52:
1151 YY_RULE_SETUP
|
1152 kumpf 1.16 #line 120 "cimmof.l"
|
1153 kumpf 1.11 { return(TOK_DT_UINT8); }
|
1154 mike 1.3 YY_BREAK
1155 case 53:
1156 YY_RULE_SETUP
|
1157 kumpf 1.16 #line 121 "cimmof.l"
|
1158 kumpf 1.11 { return(TOK_DT_UINT16); }
|
1159 mike 1.3 YY_BREAK
1160 case 54:
1161 YY_RULE_SETUP
|
1162 kumpf 1.16 #line 122 "cimmof.l"
|
1163 kumpf 1.11 { return(TOK_DT_UINT32); }
|
1164 mike 1.3 YY_BREAK
1165 case 55:
1166 YY_RULE_SETUP
|
1167 kumpf 1.16 #line 123 "cimmof.l"
|
1168 kumpf 1.11 { return(TOK_DT_UINT64); }
|
1169 mike 1.3 YY_BREAK
1170 case 56:
1171 YY_RULE_SETUP
|
1172 kumpf 1.16 #line 124 "cimmof.l"
|
1173 kumpf 1.11 { return(TOK_DT_SINT8); }
|
1174 mike 1.3 YY_BREAK
1175 case 57:
1176 YY_RULE_SETUP
|
1177 kumpf 1.16 #line 125 "cimmof.l"
|
1178 kumpf 1.11 { return(TOK_DT_SINT16); }
|
1179 mike 1.3 YY_BREAK
1180 case 58:
1181 YY_RULE_SETUP
|
1182 kumpf 1.16 #line 126 "cimmof.l"
|
1183 kumpf 1.11 { return(TOK_DT_SINT32); }
|
1184 mike 1.3 YY_BREAK
1185 case 59:
1186 YY_RULE_SETUP
|
1187 kumpf 1.16 #line 127 "cimmof.l"
|
1188 kumpf 1.11 { return(TOK_DT_SINT64); }
|
1189 mike 1.3 YY_BREAK
1190 case 60:
1191 YY_RULE_SETUP
|
1192 kumpf 1.16 #line 128 "cimmof.l"
|
1193 kumpf 1.11 { return(TOK_DT_REAL32); }
|
1194 mike 1.3 YY_BREAK
1195 case 61:
1196 YY_RULE_SETUP
|
1197 kumpf 1.16 #line 129 "cimmof.l"
|
1198 kumpf 1.11 { return(TOK_DT_REAL64); }
|
1199 mike 1.3 YY_BREAK
1200 case 62:
1201 YY_RULE_SETUP
|
1202 kumpf 1.16 #line 130 "cimmof.l"
|
1203 kumpf 1.11 { return(TOK_DT_CHAR8); }
|
1204 mike 1.3 YY_BREAK
1205 case 63:
1206 YY_RULE_SETUP
|
1207 kumpf 1.16 #line 131 "cimmof.l"
|
1208 kumpf 1.11 { return(TOK_DT_CHAR16); }
|
1209 mike 1.3 YY_BREAK
1210 case 64:
1211 YY_RULE_SETUP
|
1212 kumpf 1.16 #line 132 "cimmof.l"
|
1213 kumpf 1.11 { cimmof_lval.strval = new String(yytext);
1214 return(TOK_SIMPLE_IDENTIFIER); }
|
1215 mike 1.3 YY_BREAK
1216 case 65:
1217 YY_RULE_SETUP
|
1218 kumpf 1.16 #line 134 "cimmof.l"
|
1219 kumpf 1.11 { cimmof_lval.strval = new String(yytext);
1220 return(TOK_UNEXPECTED_CHAR); }
|
1221 mike 1.3 YY_BREAK
1222 case 66:
1223 YY_RULE_SETUP
|
1224 kumpf 1.16 #line 137 "cimmof.l"
|
1225 mike 1.3 ECHO;
1226 YY_BREAK
|
1227 kumpf 1.16 #line 1204 "cimmof_lex.cpp"
|
1228 mike 1.3 case YY_STATE_EOF(INITIAL):
1229 yyterminate();
1230
1231 case YY_END_OF_BUFFER:
1232 {
1233 /* Amount of text matched not including the EOB char. */
1234 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1235
1236 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1237 *yy_cp = yy_hold_char;
1238 YY_RESTORE_YY_MORE_OFFSET
1239
1240 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1241 {
1242 /* We're scanning a new file or input source. It's
1243 * possible that this happened because the user
1244 * just pointed yyin at a new source and called
1245 * yylex(). If so, then we have to assure
1246 * consistency between yy_current_buffer and our
1247 * globals. Here is the right place to do so, because
1248 * this is the first action (other than possibly a
1249 mike 1.3 * back-up) that will match for the new input source.
1250 */
1251 yy_n_chars = yy_current_buffer->yy_n_chars;
1252 yy_current_buffer->yy_input_file = yyin;
1253 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1254 }
1255
1256 /* Note that here we test for yy_c_buf_p "<=" to the position
1257 * of the first EOB in the buffer, since yy_c_buf_p will
1258 * already have been incremented past the NUL character
1259 * (since all states make transitions on EOB to the
1260 * end-of-buffer state). Contrast this with the test
1261 * in input().
1262 */
1263 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1264 { /* This was really a NUL. */
1265 yy_state_type yy_next_state;
1266
1267 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1268
1269 yy_current_state = yy_get_previous_state();
1270 mike 1.3
1271 /* Okay, we're now positioned to make the NUL
1272 * transition. We couldn't have
1273 * yy_get_previous_state() go ahead and do it
1274 * for us because it doesn't know how to deal
1275 * with the possibility of jamming (and we don't
1276 * want to build jamming into it because then it
1277 * will run more slowly).
1278 */
1279
1280 yy_next_state = yy_try_NUL_trans( yy_current_state );
1281
1282 yy_bp = yytext_ptr + YY_MORE_ADJ;
1283
1284 if ( yy_next_state )
1285 {
1286 /* Consume the NUL. */
1287 yy_cp = ++yy_c_buf_p;
1288 yy_current_state = yy_next_state;
1289 goto yy_match;
1290 }
1291 mike 1.3
1292 else
1293 {
1294 yy_cp = yy_c_buf_p;
1295 goto yy_find_action;
1296 }
1297 }
1298
1299 else switch ( yy_get_next_buffer() )
1300 {
1301 case EOB_ACT_END_OF_FILE:
1302 {
1303 yy_did_buffer_switch_on_eof = 0;
1304
1305 if ( yywrap() )
1306 {
1307 /* Note: because we've taken care in
1308 * yy_get_next_buffer() to have set up
1309 * yytext, we can now set up
1310 * yy_c_buf_p so that if some total
1311 * hoser (like flex itself) wants to
1312 mike 1.3 * call the scanner after we return the
1313 * YY_NULL, it'll still work - another
1314 * YY_NULL will get returned.
1315 */
1316 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1317
1318 yy_act = YY_STATE_EOF(YY_START);
1319 goto do_action;
1320 }
1321
1322 else
1323 {
1324 if ( ! yy_did_buffer_switch_on_eof )
1325 YY_NEW_FILE;
1326 }
1327 break;
1328 }
1329
1330 case EOB_ACT_CONTINUE_SCAN:
1331 yy_c_buf_p =
1332 yytext_ptr + yy_amount_of_matched_text;
1333 mike 1.3
1334 yy_current_state = yy_get_previous_state();
1335
1336 yy_cp = yy_c_buf_p;
1337 yy_bp = yytext_ptr + YY_MORE_ADJ;
1338 goto yy_match;
1339
1340 case EOB_ACT_LAST_MATCH:
1341 yy_c_buf_p =
1342 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1343
1344 yy_current_state = yy_get_previous_state();
1345
1346 yy_cp = yy_c_buf_p;
1347 yy_bp = yytext_ptr + YY_MORE_ADJ;
1348 goto yy_find_action;
1349 }
1350 break;
1351 }
1352
1353 default:
1354 mike 1.3 YY_FATAL_ERROR(
1355 "fatal flex scanner internal error--no action found" );
1356 } /* end of action switch */
1357 } /* end of scanning one token */
1358 } /* end of yylex */
1359
1360
1361 /* yy_get_next_buffer - try to read in a new buffer
1362 *
1363 * Returns a code representing an action:
1364 * EOB_ACT_LAST_MATCH -
1365 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1366 * EOB_ACT_END_OF_FILE - end of file
1367 */
1368
1369 static int yy_get_next_buffer()
1370 {
1371 register char *dest = yy_current_buffer->yy_ch_buf;
1372 register char *source = yytext_ptr;
1373 register int number_to_move, i;
1374 int ret_val;
1375 mike 1.3
1376 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1377 YY_FATAL_ERROR(
1378 "fatal flex scanner internal error--end of buffer missed" );
1379
1380 if ( yy_current_buffer->yy_fill_buffer == 0 )
1381 { /* Don't try to fill the buffer, so this is an EOF. */
1382 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1383 {
1384 /* We matched a single character, the EOB, so
1385 * treat this as a final EOF.
1386 */
1387 return EOB_ACT_END_OF_FILE;
1388 }
1389
1390 else
1391 {
1392 /* We matched some text prior to the EOB, first
1393 * process it.
1394 */
1395 return EOB_ACT_LAST_MATCH;
1396 mike 1.3 }
1397 }
1398
1399 /* Try to read more data. */
1400
1401 /* First move last chars to start of buffer. */
1402 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1403
1404 for ( i = 0; i < number_to_move; ++i )
1405 *(dest++) = *(source++);
1406
1407 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1408 /* don't do the read, it's not guaranteed to return an EOF,
1409 * just force an EOF
1410 */
1411 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1412
1413 else
1414 {
1415 int num_to_read =
1416 yy_current_buffer->yy_buf_size - number_to_move - 1;
1417 mike 1.3
1418 while ( num_to_read <= 0 )
1419 { /* Not enough room in the buffer - grow it. */
1420 #ifdef YY_USES_REJECT
1421 YY_FATAL_ERROR(
1422 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1423 #else
1424
1425 /* just a shorter name for the current buffer */
1426 YY_BUFFER_STATE b = yy_current_buffer;
1427
1428 int yy_c_buf_p_offset =
1429 (int) (yy_c_buf_p - b->yy_ch_buf);
1430
1431 if ( b->yy_is_our_buffer )
1432 {
1433 int new_size = b->yy_buf_size * 2;
1434
1435 if ( new_size <= 0 )
1436 b->yy_buf_size += b->yy_buf_size / 8;
1437 else
1438 mike 1.3 b->yy_buf_size *= 2;
1439
1440 b->yy_ch_buf = (char *)
1441 /* Include room in for 2 EOB chars. */
1442 yy_flex_realloc( (void *) b->yy_ch_buf,
1443 b->yy_buf_size + 2 );
1444 }
1445 else
1446 /* Can't grow it, we don't own it. */
1447 b->yy_ch_buf = 0;
1448
1449 if ( ! b->yy_ch_buf )
1450 YY_FATAL_ERROR(
1451 "fatal error - scanner input buffer overflow" );
1452
1453 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1454
1455 num_to_read = yy_current_buffer->yy_buf_size -
1456 number_to_move - 1;
1457 #endif
1458 }
1459 mike 1.3
1460 if ( num_to_read > YY_READ_BUF_SIZE )
1461 num_to_read = YY_READ_BUF_SIZE;
1462
1463 /* Read in more data. */
1464 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1465 yy_n_chars, num_to_read );
1466
1467 yy_current_buffer->yy_n_chars = yy_n_chars;
1468 }
1469
1470 if ( yy_n_chars == 0 )
1471 {
1472 if ( number_to_move == YY_MORE_ADJ )
1473 {
1474 ret_val = EOB_ACT_END_OF_FILE;
1475 yyrestart( yyin );
1476 }
1477
1478 else
1479 {
1480 mike 1.3 ret_val = EOB_ACT_LAST_MATCH;
1481 yy_current_buffer->yy_buffer_status =
1482 YY_BUFFER_EOF_PENDING;
1483 }
1484 }
1485
1486 else
1487 ret_val = EOB_ACT_CONTINUE_SCAN;
1488
1489 yy_n_chars += number_to_move;
1490 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1491 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1492
1493 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1494
1495 return ret_val;
1496 }
1497
1498
1499 /* yy_get_previous_state - get the state just before the EOB char was reached */
1500
1501 mike 1.3 static yy_state_type yy_get_previous_state()
1502 {
1503 register yy_state_type yy_current_state;
1504 register char *yy_cp;
1505
1506 yy_current_state = yy_start;
1507
1508 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1509 {
1510 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1511 if ( yy_accept[yy_current_state] )
1512 {
1513 yy_last_accepting_state = yy_current_state;
1514 yy_last_accepting_cpos = yy_cp;
1515 }
1516 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1517 {
1518 yy_current_state = (int) yy_def[yy_current_state];
|
1519 kumpf 1.11 if ( yy_current_state >= 272 )
|
1520 mike 1.3 yy_c = yy_meta[(unsigned int) yy_c];
1521 }
1522 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1523 }
1524
1525 return yy_current_state;
1526 }
1527
1528
1529 /* yy_try_NUL_trans - try to make a transition on the NUL character
1530 *
1531 * synopsis
1532 * next_state = yy_try_NUL_trans( current_state );
1533 */
1534
1535 #ifdef YY_USE_PROTOS
1536 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1537 #else
1538 static yy_state_type yy_try_NUL_trans( yy_current_state )
1539 yy_state_type yy_current_state;
1540 #endif
1541 mike 1.3 {
1542 register int yy_is_jam;
1543 register char *yy_cp = yy_c_buf_p;
1544
1545 register YY_CHAR yy_c = 1;
1546 if ( yy_accept[yy_current_state] )
1547 {
1548 yy_last_accepting_state = yy_current_state;
1549 yy_last_accepting_cpos = yy_cp;
1550 }
1551 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1552 {
1553 yy_current_state = (int) yy_def[yy_current_state];
|
1554 kumpf 1.11 if ( yy_current_state >= 272 )
|
1555 mike 1.3 yy_c = yy_meta[(unsigned int) yy_c];
1556 }
1557 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
1558 kumpf 1.11 yy_is_jam = (yy_current_state == 271);
|
1559 mike 1.3
1560 return yy_is_jam ? 0 : yy_current_state;
1561 }
1562
1563
1564 #ifndef YY_NO_UNPUT
1565 #ifdef YY_USE_PROTOS
1566 static void yyunput( int c, register char *yy_bp )
1567 #else
1568 static void yyunput( c, yy_bp )
1569 int c;
1570 register char *yy_bp;
1571 #endif
1572 {
1573 register char *yy_cp = yy_c_buf_p;
1574
1575 /* undo effects of setting up yytext */
1576 *yy_cp = yy_hold_char;
1577
1578 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1579 { /* need to shift things up to make room */
1580 mike 1.3 /* +2 for EOB chars. */
1581 register int number_to_move = yy_n_chars + 2;
1582 register char *dest = &yy_current_buffer->yy_ch_buf[
1583 yy_current_buffer->yy_buf_size + 2];
1584 register char *source =
1585 &yy_current_buffer->yy_ch_buf[number_to_move];
1586
1587 while ( source > yy_current_buffer->yy_ch_buf )
1588 *--dest = *--source;
1589
1590 yy_cp += (int) (dest - source);
1591 yy_bp += (int) (dest - source);
1592 yy_current_buffer->yy_n_chars =
1593 yy_n_chars = yy_current_buffer->yy_buf_size;
1594
1595 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1596 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1597 }
1598
1599 *--yy_cp = (char) c;
1600
1601 mike 1.3
1602 yytext_ptr = yy_bp;
1603 yy_hold_char = *yy_cp;
1604 yy_c_buf_p = yy_cp;
1605 }
1606 #endif /* ifndef YY_NO_UNPUT */
1607
1608
1609 #ifdef __cplusplus
1610 static int yyinput()
1611 #else
1612 static int input()
1613 #endif
1614 {
1615 int c;
1616
1617 *yy_c_buf_p = yy_hold_char;
1618
1619 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1620 {
1621 /* yy_c_buf_p now points to the character we want to return.
1622 mike 1.3 * If this occurs *before* the EOB characters, then it's a
1623 * valid NUL; if not, then we've hit the end of the buffer.
1624 */
1625 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1626 /* This was really a NUL. */
1627 *yy_c_buf_p = '\0';
1628
1629 else
1630 { /* need more input */
1631 int offset = yy_c_buf_p - yytext_ptr;
1632 ++yy_c_buf_p;
1633
1634 switch ( yy_get_next_buffer() )
1635 {
1636 case EOB_ACT_LAST_MATCH:
1637 /* This happens because yy_g_n_b()
1638 * sees that we've accumulated a
1639 * token and flags that we need to
1640 * try matching the token before
1641 * proceeding. But for input(),
1642 * there's no matching to consider.
1643 mike 1.3 * So convert the EOB_ACT_LAST_MATCH
1644 * to EOB_ACT_END_OF_FILE.
1645 */
1646
1647 /* Reset buffer status. */
1648 yyrestart( yyin );
1649
1650 /* fall through */
1651
1652 case EOB_ACT_END_OF_FILE:
1653 {
1654 if ( yywrap() )
1655 return EOF;
1656
1657 if ( ! yy_did_buffer_switch_on_eof )
1658 YY_NEW_FILE;
1659 #ifdef __cplusplus
1660 return yyinput();
1661 #else
1662 return input();
1663 #endif
1664 mike 1.3 }
1665
1666 case EOB_ACT_CONTINUE_SCAN:
1667 yy_c_buf_p = yytext_ptr + offset;
1668 break;
1669 }
1670 }
1671 }
1672
1673 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1674 *yy_c_buf_p = '\0'; /* preserve yytext */
1675 yy_hold_char = *++yy_c_buf_p;
1676
1677
1678 return c;
1679 }
1680
1681
1682 #ifdef YY_USE_PROTOS
1683 void yyrestart( FILE *input_file )
1684 #else
1685 mike 1.3 void yyrestart( input_file )
1686 FILE *input_file;
1687 #endif
1688 {
1689 if ( ! yy_current_buffer )
1690 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1691
1692 yy_init_buffer( yy_current_buffer, input_file );
1693 yy_load_buffer_state();
1694 }
1695
1696
1697 #ifdef YY_USE_PROTOS
1698 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1699 #else
1700 void yy_switch_to_buffer( new_buffer )
1701 YY_BUFFER_STATE new_buffer;
1702 #endif
1703 {
1704 if ( yy_current_buffer == new_buffer )
1705 return;
1706 mike 1.3
1707 if ( yy_current_buffer )
1708 {
1709 /* Flush out information for old buffer. */
1710 *yy_c_buf_p = yy_hold_char;
1711 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1712 yy_current_buffer->yy_n_chars = yy_n_chars;
1713 }
1714
1715 yy_current_buffer = new_buffer;
1716 yy_load_buffer_state();
1717
1718 /* We don't actually know whether we did this switch during
1719 * EOF (yywrap()) processing, but the only time this flag
1720 * is looked at is after yywrap() is called, so it's safe
1721 * to go ahead and always set it.
1722 */
1723 yy_did_buffer_switch_on_eof = 1;
1724 }
1725
1726
1727 mike 1.3 #ifdef YY_USE_PROTOS
1728 void yy_load_buffer_state( void )
1729 #else
1730 void yy_load_buffer_state()
1731 #endif
1732 {
1733 yy_n_chars = yy_current_buffer->yy_n_chars;
1734 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1735 yyin = yy_current_buffer->yy_input_file;
1736 yy_hold_char = *yy_c_buf_p;
1737 }
1738
1739
1740 #ifdef YY_USE_PROTOS
1741 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1742 #else
1743 YY_BUFFER_STATE yy_create_buffer( file, size )
1744 FILE *file;
1745 int size;
1746 #endif
1747 {
1748 mike 1.3 YY_BUFFER_STATE b;
1749
1750 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1751 if ( ! b )
1752 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1753
1754 b->yy_buf_size = size;
1755
1756 /* yy_ch_buf has to be 2 characters longer than the size given because
1757 * we need to put in 2 end-of-buffer characters.
1758 */
1759 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1760 if ( ! b->yy_ch_buf )
1761 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1762
1763 b->yy_is_our_buffer = 1;
1764
1765 yy_init_buffer( b, file );
1766
1767 return b;
1768 }
1769 mike 1.3
1770
1771 #ifdef YY_USE_PROTOS
1772 void yy_delete_buffer( YY_BUFFER_STATE b )
1773 #else
1774 void yy_delete_buffer( b )
1775 YY_BUFFER_STATE b;
1776 #endif
1777 {
1778 if ( ! b )
1779 return;
1780
1781 if ( b == yy_current_buffer )
1782 yy_current_buffer = (YY_BUFFER_STATE) 0;
1783
1784 if ( b->yy_is_our_buffer )
1785 yy_flex_free( (void *) b->yy_ch_buf );
1786
1787 yy_flex_free( (void *) b );
1788 }
1789
1790 mike 1.3
|
1791 kumpf 1.14 #ifndef YY_ALWAYS_INTERACTIVE
1792 #ifndef YY_NEVER_INTERACTIVE
1793 extern int isatty YY_PROTO(( int ));
1794 #endif
1795 #endif
|
1796 mike 1.3
1797 #ifdef YY_USE_PROTOS
1798 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1799 #else
1800 void yy_init_buffer( b, file )
1801 YY_BUFFER_STATE b;
1802 FILE *file;
1803 #endif
1804
1805
1806 {
1807 yy_flush_buffer( b );
1808
1809 b->yy_input_file = file;
1810 b->yy_fill_buffer = 1;
1811
1812 #if YY_ALWAYS_INTERACTIVE
1813 b->yy_is_interactive = 1;
1814 #else
1815 #if YY_NEVER_INTERACTIVE
1816 b->yy_is_interactive = 0;
1817 mike 1.3 #else
1818 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1819 #endif
1820 #endif
1821 }
1822
1823
1824 #ifdef YY_USE_PROTOS
1825 void yy_flush_buffer( YY_BUFFER_STATE b )
1826 #else
1827 void yy_flush_buffer( b )
1828 YY_BUFFER_STATE b;
1829 #endif
1830
1831 {
1832 if ( ! b )
1833 return;
1834
1835 b->yy_n_chars = 0;
1836
1837 /* We always need two end-of-buffer characters. The first causes
1838 mike 1.3 * a transition to the end-of-buffer state. The second causes
1839 * a jam in that state.
1840 */
1841 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1842 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1843
1844 b->yy_buf_pos = &b->yy_ch_buf[0];
1845
1846 b->yy_at_bol = 1;
1847 b->yy_buffer_status = YY_BUFFER_NEW;
1848
1849 if ( b == yy_current_buffer )
1850 yy_load_buffer_state();
1851 }
1852
1853
1854 #ifndef YY_NO_SCAN_BUFFER
1855 #ifdef YY_USE_PROTOS
1856 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1857 #else
1858 YY_BUFFER_STATE yy_scan_buffer( base, size )
1859 mike 1.3 char *base;
1860 yy_size_t size;
1861 #endif
1862 {
1863 YY_BUFFER_STATE b;
1864
1865 if ( size < 2 ||
1866 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1867 base[size-1] != YY_END_OF_BUFFER_CHAR )
1868 /* They forgot to leave room for the EOB's. */
1869 return 0;
1870
1871 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1872 if ( ! b )
1873 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1874
1875 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1876 b->yy_buf_pos = b->yy_ch_buf = base;
1877 b->yy_is_our_buffer = 0;
1878 b->yy_input_file = 0;
1879 b->yy_n_chars = b->yy_buf_size;
1880 mike 1.3 b->yy_is_interactive = 0;
1881 b->yy_at_bol = 1;
1882 b->yy_fill_buffer = 0;
1883 b->yy_buffer_status = YY_BUFFER_NEW;
1884
1885 yy_switch_to_buffer( b );
1886
1887 return b;
1888 }
1889 #endif
1890
1891
1892 #ifndef YY_NO_SCAN_STRING
1893 #ifdef YY_USE_PROTOS
1894 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1895 #else
1896 YY_BUFFER_STATE yy_scan_string( yy_str )
1897 yyconst char *yy_str;
1898 #endif
1899 {
1900 int len;
1901 mike 1.3 for ( len = 0; yy_str[len]; ++len )
1902 ;
1903
1904 return yy_scan_bytes( yy_str, len );
1905 }
1906 #endif
1907
1908
1909 #ifndef YY_NO_SCAN_BYTES
1910 #ifdef YY_USE_PROTOS
1911 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1912 #else
1913 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1914 yyconst char *bytes;
1915 int len;
1916 #endif
1917 {
1918 YY_BUFFER_STATE b;
1919 char *buf;
1920 yy_size_t n;
1921 int i;
1922 mike 1.3
1923 /* Get memory for full buffer, including space for trailing EOB's. */
1924 n = len + 2;
1925 buf = (char *) yy_flex_alloc( n );
1926 if ( ! buf )
1927 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1928
1929 for ( i = 0; i < len; ++i )
1930 buf[i] = bytes[i];
1931
1932 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1933
1934 b = yy_scan_buffer( buf, n );
1935 if ( ! b )
1936 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1937
1938 /* It's okay to grow etc. this buffer, and we should throw it
1939 * away when we're done.
1940 */
1941 b->yy_is_our_buffer = 1;
1942
1943 mike 1.3 return b;
1944 }
1945 #endif
1946
1947
1948 #ifndef YY_NO_PUSH_STATE
1949 #ifdef YY_USE_PROTOS
1950 static void yy_push_state( int new_state )
1951 #else
1952 static void yy_push_state( new_state )
1953 int new_state;
1954 #endif
1955 {
1956 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1957 {
1958 yy_size_t new_size;
1959
1960 yy_start_stack_depth += YY_START_STACK_INCR;
1961 new_size = yy_start_stack_depth * sizeof( int );
1962
1963 if ( ! yy_start_stack )
1964 mike 1.3 yy_start_stack = (int *) yy_flex_alloc( new_size );
1965
1966 else
1967 yy_start_stack = (int *) yy_flex_realloc(
1968 (void *) yy_start_stack, new_size );
1969
1970 if ( ! yy_start_stack )
1971 YY_FATAL_ERROR(
1972 "out of memory expanding start-condition stack" );
1973 }
1974
1975 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1976
1977 BEGIN(new_state);
1978 }
1979 #endif
1980
1981
1982 #ifndef YY_NO_POP_STATE
1983 static void yy_pop_state()
1984 {
1985 mike 1.3 if ( --yy_start_stack_ptr < 0 )
1986 YY_FATAL_ERROR( "start-condition stack underflow" );
1987
1988 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1989 }
1990 #endif
1991
1992
1993 #ifndef YY_NO_TOP_STATE
1994 static int yy_top_state()
1995 {
1996 return yy_start_stack[yy_start_stack_ptr - 1];
1997 }
1998 #endif
1999
2000 #ifndef YY_EXIT_FAILURE
2001 #define YY_EXIT_FAILURE 2
2002 #endif
2003
2004 #ifdef YY_USE_PROTOS
2005 static void yy_fatal_error( yyconst char msg[] )
2006 mike 1.3 #else
2007 static void yy_fatal_error( msg )
2008 char msg[];
2009 #endif
2010 {
2011 (void) fprintf( stderr, "%s\n", msg );
2012 exit( YY_EXIT_FAILURE );
2013 }
2014
2015
2016
2017 /* Redefine yyless() so it works in section 3 code. */
2018
2019 #undef yyless
2020 #define yyless(n) \
2021 do \
2022 { \
2023 /* Undo effects of setting up yytext. */ \
2024 yytext[yyleng] = yy_hold_char; \
2025 yy_c_buf_p = yytext + n; \
2026 yy_hold_char = *yy_c_buf_p; \
2027 mike 1.3 *yy_c_buf_p = '\0'; \
2028 yyleng = n; \
2029 } \
2030 while ( 0 )
2031
2032
2033 /* Internal utility routines. */
2034
2035 #ifndef yytext_ptr
2036 #ifdef YY_USE_PROTOS
2037 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2038 #else
2039 static void yy_flex_strncpy( s1, s2, n )
2040 char *s1;
2041 yyconst char *s2;
2042 int n;
2043 #endif
2044 {
2045 register int i;
2046 for ( i = 0; i < n; ++i )
2047 s1[i] = s2[i];
2048 mike 1.3 }
2049 #endif
2050
2051 #ifdef YY_NEED_STRLEN
2052 #ifdef YY_USE_PROTOS
2053 static int yy_flex_strlen( yyconst char *s )
2054 #else
2055 static int yy_flex_strlen( s )
2056 yyconst char *s;
2057 #endif
2058 {
2059 register int n;
2060 for ( n = 0; s[n]; ++n )
2061 ;
2062
2063 return n;
2064 }
2065 #endif
2066
2067
2068 #ifdef YY_USE_PROTOS
2069 mike 1.3 static void *yy_flex_alloc( yy_size_t size )
2070 #else
2071 static void *yy_flex_alloc( size )
2072 yy_size_t size;
2073 #endif
2074 {
2075 return (void *) malloc( size );
2076 }
2077
2078 #ifdef YY_USE_PROTOS
2079 static void *yy_flex_realloc( void *ptr, yy_size_t size )
2080 #else
2081 static void *yy_flex_realloc( ptr, size )
2082 void *ptr;
2083 yy_size_t size;
2084 #endif
2085 {
2086 /* The cast to (char *) in the following accommodates both
2087 * implementations that use char* generic pointers, and those
2088 * that use void* generic pointers. It works with the latter
2089 * because both ANSI C and C++ allow castless assignment from
2090 mike 1.3 * any pointer type to void*, and deal with argument conversions
2091 * as though doing an assignment.
2092 */
2093 return (void *) realloc( (char *) ptr, size );
2094 }
2095
2096 #ifdef YY_USE_PROTOS
2097 static void yy_flex_free( void *ptr )
2098 #else
2099 static void yy_flex_free( ptr )
2100 void *ptr;
2101 #endif
2102 {
2103 free( ptr );
2104 }
2105
2106 #if YY_MAIN
2107 int main()
2108 {
2109 yylex();
2110 return 0;
2111 mike 1.3 }
2112 #endif
|
2113 kumpf 1.16 #line 137 "cimmof.l"
|
2114 mike 1.3
2115
2116 void cimmof_yy_less(int n) {
2117 yyless(n);
2118 }
|