1 karl 1.34 /* To be inserted in other files to bypass the chksrc tests */
2 /* NOCHKSRC */
3
4 #line 2 "cimmof_lex.cpp"
5
6 #line 4 "cimmof_lex.cpp"
7
8 #define YY_INT_ALIGNED short int
9
10 /* A lexical scanner generated by flex */
11
|
12 mike 1.3 #define yy_create_buffer cimmof__create_buffer
13 #define yy_delete_buffer cimmof__delete_buffer
14 #define yy_flex_debug cimmof__flex_debug
15 #define yy_init_buffer cimmof__init_buffer
16 #define yy_flush_buffer cimmof__flush_buffer
17 #define yy_load_buffer_state cimmof__load_buffer_state
18 #define yy_switch_to_buffer cimmof__switch_to_buffer
19 #define yyin cimmof_in
20 #define yyleng cimmof_leng
21 #define yylex cimmof_lex
|
22 karl 1.34 #define yylineno cimmof_lineno
|
23 mike 1.3 #define yyout cimmof_out
24 #define yyrestart cimmof_restart
25 #define yytext cimmof_text
26 #define yywrap cimmof_wrap
|
27 karl 1.34 #define yyalloc cimmof_alloc
28 #define yyrealloc cimmof_realloc
29 #define yyfree cimmof_free
|
30 mike 1.3
31 #define FLEX_SCANNER
32 #define YY_FLEX_MAJOR_VERSION 2
33 #define YY_FLEX_MINOR_VERSION 5
|
34 dev.meetei 1.36 #define YY_FLEX_SUBMINOR_VERSION 35
|
35 karl 1.34 #if YY_FLEX_SUBMINOR_VERSION > 0
36 #define FLEX_BETA
37 #endif
38
39 /* First, we deal with platform-specific or compiler-specific issues. */
|
40 mike 1.3
|
41 karl 1.34 /* begin standard C headers. */
|
42 mike 1.3 #include <stdio.h>
|
43 karl 1.34 #include <string.h>
44 #include <errno.h>
45 #include <stdlib.h>
46
47 /* end standard C headers. */
48
49 /* flex integer type definitions */
50
51 #ifndef FLEXINT_H
52 #define FLEXINT_H
53
54 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
55
56 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
57
58 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
|
59 dev.meetei 1.37 * if you want the limit (max/min) macros for int types.
|
60 karl 1.34 */
61 #ifndef __STDC_LIMIT_MACROS
62 #define __STDC_LIMIT_MACROS 1
63 #endif
|
64 mike 1.3
|
65 karl 1.34 #include <inttypes.h>
66 typedef int8_t flex_int8_t;
67 typedef uint8_t flex_uint8_t;
68 typedef int16_t flex_int16_t;
69 typedef uint16_t flex_uint16_t;
70 typedef int32_t flex_int32_t;
71 typedef uint32_t flex_uint32_t;
72 #else
73 typedef signed char flex_int8_t;
74 typedef short int flex_int16_t;
75 typedef int flex_int32_t;
|
76 dev.meetei 1.37 typedef unsigned char flex_uint8_t;
|
77 karl 1.34 typedef unsigned short int flex_uint16_t;
78 typedef unsigned int flex_uint32_t;
|
79 dev.meetei 1.37 #endif /* ! C99 */
|
80 mike 1.3
|
81 karl 1.34 /* Limits of integral types. */
82 #ifndef INT8_MIN
83 #define INT8_MIN (-128)
|
84 mike 1.3 #endif
|
85 karl 1.34 #ifndef INT16_MIN
86 #define INT16_MIN (-32767-1)
87 #endif
88 #ifndef INT32_MIN
89 #define INT32_MIN (-2147483647-1)
90 #endif
91 #ifndef INT8_MAX
92 #define INT8_MAX (127)
93 #endif
94 #ifndef INT16_MAX
95 #define INT16_MAX (32767)
96 #endif
97 #ifndef INT32_MAX
98 #define INT32_MAX (2147483647)
99 #endif
100 #ifndef UINT8_MAX
101 #define UINT8_MAX (255U)
102 #endif
103 #ifndef UINT16_MAX
104 #define UINT16_MAX (65535U)
105 #endif
106 karl 1.34 #ifndef UINT32_MAX
107 #define UINT32_MAX (4294967295U)
|
108 mike 1.3 #endif
109
|
110 karl 1.34 #endif /* ! FLEXINT_H */
|
111 mike 1.3
112 #ifdef __cplusplus
113
114 /* The "const" storage-class-modifier is valid. */
115 #define YY_USE_CONST
116
|
117 kumpf 1.31 #else /* ! __cplusplus */
|
118 mike 1.3
|
119 karl 1.34 /* C99 requires __STDC__ to be defined as 1. */
120 #if defined (__STDC__)
|
121 mike 1.3
122 #define YY_USE_CONST
123
|
124 karl 1.34 #endif /* defined (__STDC__) */
|
125 kumpf 1.31 #endif /* ! __cplusplus */
|
126 mike 1.3
127 #ifdef YY_USE_CONST
128 #define yyconst const
129 #else
130 #define yyconst
131 #endif
132
133 /* Returned upon end-of-file. */
134 #define YY_NULL 0
135
136 /* Promotes a possibly negative, possibly signed char to an unsigned
137 * integer for use as an array index. If the signed char is negative,
138 * we want to instead treat it as an 8-bit unsigned char, hence the
139 * double cast.
140 */
141 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
142
143 /* Enter a start condition. This macro really ought to take a parameter,
144 * but we do it the disgusting crufty way forced on us by the ()-less
145 * definition of BEGIN.
146 */
|
147 karl 1.34 #define BEGIN (yy_start) = 1 + 2 *
|
148 mike 1.3
149 /* Translate the current start state into a value that can be later handed
150 * to BEGIN to return to the state. The YYSTATE alias is for lex
151 * compatibility.
152 */
|
153 karl 1.34 #define YY_START (((yy_start) - 1) / 2)
|
154 mike 1.3 #define YYSTATE YY_START
155
156 /* Action number for EOF rule of a given start state. */
157 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
158
159 /* Special action meaning "start processing a new file". */
|
160 karl 1.34 #define YY_NEW_FILE cimmof_restart(cimmof_in )
|
161 mike 1.3
162 #define YY_END_OF_BUFFER_CHAR 0
163
164 /* Size of default input buffer. */
|
165 karl 1.34 #ifndef YY_BUF_SIZE
|
166 mike 1.3 #define YY_BUF_SIZE 16384
|
167 karl 1.34 #endif
|
168 mike 1.3
|
169 karl 1.34 /* The state buf must be large enough to hold one state per character in the main buffer.
170 */
171 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
172
173 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
174 #define YY_TYPEDEF_YY_BUFFER_STATE
|
175 mike 1.3 typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
176 karl 1.34 #endif
177
178 extern int cimmof_leng;
|
179 mike 1.3
|
180 karl 1.34 extern FILE *cimmof_in, *cimmof_out;
|
181 mike 1.3
182 #define EOB_ACT_CONTINUE_SCAN 0
183 #define EOB_ACT_END_OF_FILE 1
184 #define EOB_ACT_LAST_MATCH 2
185
|
186 karl 1.34 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
187 * access to the local variable yy_act. Since yyless() is a macro, it would break
|
188 dev.meetei 1.37 * existing scanners that call yyless() from OUTSIDE cimmof_lex.
|
189 karl 1.34 * One obvious solution it to make yy_act a global. I tried that, and saw
190 * a 5% performance hit in a non-cimmof_lineno scanner, because yy_act is
191 * normally declared as a register variable-- so it is not worth it.
192 */
193 #define YY_LESS_LINENO(n) \
194 do { \
195 int yyl;\
196 for ( yyl = n; yyl < cimmof_leng; ++yyl )\
197 if ( cimmof_text[yyl] == '\n' )\
198 --cimmof_lineno;\
199 }while(0)
|
200 dev.meetei 1.37
|
201 karl 1.34 /* Return all but the first "n" matched characters back to the input stream. */
|
202 mike 1.3 #define yyless(n) \
|
203 kumpf 1.31 do \
204 { \
|
205 karl 1.34 /* Undo effects of setting up cimmof_text. */ \
206 int yyless_macro_arg = (n); \
207 YY_LESS_LINENO(yyless_macro_arg);\
208 *yy_cp = (yy_hold_char); \
|
209 kumpf 1.31 YY_RESTORE_YY_MORE_OFFSET \
|
210 karl 1.34 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
211 YY_DO_BEFORE_ACTION; /* set up cimmof_text again */ \
|
212 kumpf 1.31 } \
213 while ( 0 )
|
214 mike 1.3
|
215 karl 1.34 #define unput(c) yyunput( c, (yytext_ptr) )
|
216 karl 1.29
|
217 karl 1.34 #ifndef YY_TYPEDEF_YY_SIZE_T
218 #define YY_TYPEDEF_YY_SIZE_T
219 typedef size_t yy_size_t;
220 #endif
|
221 mike 1.3
|
222 karl 1.34 #ifndef YY_STRUCT_YY_BUFFER_STATE
223 #define YY_STRUCT_YY_BUFFER_STATE
|
224 mike 1.3 struct yy_buffer_state
|
225 kumpf 1.31 {
226 FILE *yy_input_file;
|
227 mike 1.3
|
228 kumpf 1.31 char *yy_ch_buf; /* input buffer */
229 char *yy_buf_pos; /* current position in input buffer */
|
230 mike 1.3
|
231 kumpf 1.31 /* Size of input buffer in bytes, not including room for EOB
232 * characters.
233 */
234 yy_size_t yy_buf_size;
235
236 /* Number of characters read into yy_ch_buf, not including EOB
237 * characters.
238 */
239 int yy_n_chars;
240
241 /* Whether we "own" the buffer - i.e., we know we created it,
242 * and can realloc() it to grow it, and should free() it to
243 * delete it.
244 */
245 int yy_is_our_buffer;
246
247 /* Whether this is an "interactive" input source; if so, and
248 * if we're using stdio for input, then we want to use getc()
249 * instead of fread(), to make sure we stop fetching input after
250 * each newline.
251 */
252 kumpf 1.31 int yy_is_interactive;
253
254 /* Whether we're considered to be at the beginning of a line.
255 * If so, '^' rules will be active on the next match, otherwise
256 * not.
257 */
258 int yy_at_bol;
259
|
260 karl 1.34 int yy_bs_lineno; /**< The line count. */
261 int yy_bs_column; /**< The column count. */
|
262 dev.meetei 1.37
|
263 kumpf 1.31 /* Whether to try to fill the input buffer when we reach the
264 * end of it.
265 */
266 int yy_fill_buffer;
|
267 mike 1.3
|
268 kumpf 1.31 int yy_buffer_status;
|
269 karl 1.34
|
270 mike 1.3 #define YY_BUFFER_NEW 0
271 #define YY_BUFFER_NORMAL 1
|
272 kumpf 1.31 /* When an EOF's been seen but there's still some text to process
273 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
274 * shouldn't try reading from the input source any more. We might
275 * still have a bunch of tokens to match, though, because of
276 * possible backing-up.
277 *
278 * When we actually see the EOF, we change the status to "new"
|
279 karl 1.34 * (via cimmof_restart()), so that the user can continue scanning by
280 * just pointing cimmof_in at a new input file.
|
281 kumpf 1.31 */
|
282 mike 1.3 #define YY_BUFFER_EOF_PENDING 2
|
283 karl 1.34
|
284 kumpf 1.31 };
|
285 karl 1.34 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
|
286 mike 1.3
|
287 karl 1.34 /* Stack of input buffers. */
288 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
289 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
290 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
|
291 mike 1.3
292 /* We provide macros for accessing buffer states in case in the
293 * future we want to put the buffer states in a more general
294 * "scanner state".
|
295 karl 1.34 *
296 * Returns the top of the stack, or NULL.
|
297 mike 1.3 */
|
298 karl 1.34 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
299 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
300 : NULL)
|
301 mike 1.3
|
302 karl 1.34 /* Same as previous macro, but useful when we know that the buffer stack is not
303 * NULL or when we need an lvalue. For internal use only.
304 */
305 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
|
306 mike 1.3
|
307 karl 1.34 /* yy_hold_char holds the character lost when cimmof_text is formed. */
|
308 mike 1.3 static char yy_hold_char;
|
309 kumpf 1.31 static int yy_n_chars; /* number of characters read into yy_ch_buf */
|
310 karl 1.34 int cimmof_leng;
|
311 mike 1.3
312 /* Points to current character in buffer. */
313 static char *yy_c_buf_p = (char *) 0;
|
314 karl 1.34 static int yy_init = 0; /* whether we need to initialize */
|
315 kumpf 1.31 static int yy_start = 0; /* start state number */
|
316 mike 1.3
|
317 karl 1.34 /* Flag which is used to allow cimmof_wrap()'s to do buffer switches
318 * instead of setting up a fresh cimmof_in. A bit of a hack ...
|
319 mike 1.3 */
320 static int yy_did_buffer_switch_on_eof;
321
|
322 karl 1.34 void cimmof_restart (FILE *input_file );
323 void cimmof__switch_to_buffer (YY_BUFFER_STATE new_buffer );
324 YY_BUFFER_STATE cimmof__create_buffer (FILE *file,int size );
325 void cimmof__delete_buffer (YY_BUFFER_STATE b );
326 void cimmof__flush_buffer (YY_BUFFER_STATE b );
327 void cimmof_push_buffer_state (YY_BUFFER_STATE new_buffer );
328 void cimmof_pop_buffer_state (void );
329
330 static void cimmof_ensure_buffer_stack (void );
331 static void cimmof__load_buffer_state (void );
332 static void cimmof__init_buffer (YY_BUFFER_STATE b,FILE *file );
333
334 #define YY_FLUSH_BUFFER cimmof__flush_buffer(YY_CURRENT_BUFFER )
335
336 YY_BUFFER_STATE cimmof__scan_buffer (char *base,yy_size_t size );
337 YY_BUFFER_STATE cimmof__scan_string (yyconst char *yy_str );
338 YY_BUFFER_STATE cimmof__scan_bytes (yyconst char *bytes,int len );
339
340 void *cimmof_alloc (yy_size_t );
341 void *cimmof_realloc (void *,yy_size_t );
342 void cimmof_free (void * );
|
343 mike 1.3
|
344 karl 1.34 #define yy_new_buffer cimmof__create_buffer
|
345 mike 1.3
346 #define yy_set_interactive(is_interactive) \
|
347 kumpf 1.31 { \
|
348 karl 1.34 if ( ! YY_CURRENT_BUFFER ){ \
349 cimmof_ensure_buffer_stack (); \
350 YY_CURRENT_BUFFER_LVALUE = \
351 cimmof__create_buffer(cimmof_in,YY_BUF_SIZE ); \
352 } \
353 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
|
354 kumpf 1.31 }
|
355 mike 1.3
356 #define yy_set_bol(at_bol) \
|
357 kumpf 1.31 { \
|
358 karl 1.34 if ( ! YY_CURRENT_BUFFER ){\
359 cimmof_ensure_buffer_stack (); \
360 YY_CURRENT_BUFFER_LVALUE = \
361 cimmof__create_buffer(cimmof_in,YY_BUF_SIZE ); \
362 } \
363 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
|
364 kumpf 1.31 }
|
365 mike 1.3
|
366 karl 1.34 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
|
367 mike 1.3
|
368 karl 1.34 /* Begin user sect3 */
|
369 e.boden 1.21
|
370 mike 1.3 typedef unsigned char YY_CHAR;
|
371 karl 1.34
372 FILE *cimmof_in = (FILE *) 0, *cimmof_out = (FILE *) 0;
373
|
374 mike 1.3 typedef int yy_state_type;
|
375 karl 1.34
376 extern int cimmof_lineno;
377
378 int cimmof_lineno = 1;
379
380 extern char *cimmof_text;
381 #define yytext_ptr cimmof_text
382
383 static yy_state_type yy_get_previous_state (void );
384 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
385 static int yy_get_next_buffer (void );
386 static void yy_fatal_error (yyconst char msg[] );
|
387 mike 1.3
388 /* Done after the current pattern has been matched and before the
|
389 karl 1.34 * corresponding action - sets up cimmof_text.
|
390 mike 1.3 */
391 #define YY_DO_BEFORE_ACTION \
|
392 karl 1.34 (yytext_ptr) = yy_bp; \
393 cimmof_leng = (size_t) (yy_cp - yy_bp); \
394 (yy_hold_char) = *yy_cp; \
|
395 kumpf 1.31 *yy_cp = '\0'; \
|
396 karl 1.34 (yy_c_buf_p) = yy_cp;
|
397 mike 1.3
|
398 e.boden 1.21 #define YY_NUM_RULES 83
399 #define YY_END_OF_BUFFER 84
|
400 karl 1.34 /* This struct is not used in this scanner,
401 but its presence is necessary. */
402 struct yy_trans_info
403 {
404 flex_int32_t yy_verify;
405 flex_int32_t yy_nxt;
406 };
407 static yyconst flex_int16_t yy_accept[300] =
|
408 e.boden 1.21 { 0,
|
409 karl 1.34 0, 0, 0, 0, 0, 0, 84, 82, 3, 1,
410 22, 82, 82, 82, 9, 10, 82, 20, 42, 82,
411 18, 17, 17, 11, 12, 19, 81, 81, 81, 81,
412 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
413 81, 81, 81, 7, 8, 81, 5, 6, 35, 24,
414 23, 83, 37, 83, 36, 0, 64, 0, 0, 18,
415 18, 18, 13, 38, 2, 14, 14, 16, 0, 17,
416 17, 81, 81, 65, 81, 81, 81, 81, 81, 81,
417 81, 81, 81, 81, 45, 81, 81, 81, 81, 81,
418 81, 81, 81, 81, 81, 81, 35, 34, 31, 30,
|
419 e.boden 1.21
|
420 karl 1.34 33, 32, 25, 26, 27, 28, 29, 36, 0, 21,
421 0, 2, 2, 15, 55, 81, 81, 81, 81, 81,
|
422 e.boden 1.21 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
|
423 karl 1.34 81, 81, 56, 81, 81, 81, 81, 81, 81, 81,
424 81, 81, 81, 36, 0, 0, 13, 81, 81, 81,
425 81, 81, 81, 81, 81, 81, 81, 81, 81, 39,
426 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
427 81, 81, 40, 81, 81, 36, 0, 81, 81, 81,
428 79, 81, 81, 81, 41, 81, 81, 81, 81, 81,
429 81, 81, 81, 81, 81, 81, 81, 81, 47, 81,
430
431 81, 81, 73, 81, 81, 81, 81, 81, 81, 69,
432 4, 0, 81, 81, 80, 81, 81, 81, 57, 81,
433 81, 81, 53, 81, 81, 81, 77, 78, 81, 81,
434 48, 74, 75, 76, 66, 81, 81, 70, 71, 72,
435 43, 81, 67, 81, 81, 81, 63, 81, 81, 81,
436 81, 81, 81, 81, 81, 81, 81, 68, 81, 81,
437 81, 44, 81, 51, 81, 81, 81, 81, 81, 81,
438 81, 81, 81, 54, 46, 52, 81, 81, 81, 81,
439 81, 81, 50, 60, 61, 81, 49, 81, 81, 81,
440 81, 81, 62, 81, 81, 81, 58, 59, 0
|
441 e.boden 1.21
|
442 mike 1.3 } ;
443
|
444 karl 1.34 static yyconst flex_int32_t yy_ec[256] =
|
445 mike 1.3 { 0,
446 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
447 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
448 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
449 1, 2, 1, 5, 6, 7, 1, 1, 8, 9,
|
450 dj.gorey 1.20 10, 11, 12, 13, 12, 14, 15, 16, 17, 18,
451 19, 20, 21, 22, 21, 23, 24, 25, 26, 1,
452 27, 1, 1, 1, 28, 29, 30, 31, 32, 33,
453 34, 35, 36, 37, 37, 38, 39, 40, 41, 42,
|
454 e.boden 1.21 43, 44, 45, 46, 47, 48, 37, 49, 50, 37,
455 51, 52, 53, 1, 37, 1, 54, 55, 56, 31,
|
456 dj.gorey 1.20
|
457 e.boden 1.21 32, 57, 34, 35, 36, 37, 37, 58, 39, 59,
458 41, 42, 43, 60, 61, 62, 47, 48, 37, 63,
459 50, 37, 64, 1, 65, 1, 1, 1, 1, 1,
|
460 mike 1.3 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
461 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
462 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
463 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
464 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
465 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
466 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
467
468 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
469 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
470 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
471 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
472 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
473 1, 1, 1, 1, 1
474 } ;
475
|
476 karl 1.34 static yyconst flex_int32_t yy_meta[66] =
|
477 mike 1.3 { 0,
|
478 e.boden 1.21 1, 1, 2, 1, 3, 1, 4, 1, 1, 1,
479 1, 5, 1, 6, 1, 7, 7, 7, 7, 7,
480 7, 7, 7, 7, 1, 1, 1, 8, 8, 8,
481 8, 9, 8, 4, 4, 4, 4, 4, 4, 4,
482 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
483 1, 3, 1, 8, 8, 8, 8, 4, 4, 4,
|
484 kumpf 1.31 4, 4, 4, 1, 1
|
485 mike 1.3 } ;
486
|
487 karl 1.34 static yyconst flex_int16_t yy_base[315] =
|
488 mike 1.3 { 0,
|
489 kumpf 1.31 0, 0, 63, 64, 114, 169, 595, 596, 596, 596,
490 596, 552, 0, 0, 596, 596, 56, 596, 58, 72,
491 213, 263, 68, 596, 596, 596, 46, 552, 557, 60,
492 31, 64, 0, 49, 559, 543, 62, 66, 542, 556,
493 118, 65, 551, 596, 596, 63, 596, 596, 0, 596,
494 596, 314, 596, 596, 0, 67, 0, 578, 139, 0,
495 165, 571, 552, 596, 580, 519, 112, 596, 0, 0,
496 0, 0, 531, 79, 539, 85, 103, 105, 123, 115,
497 124, 183, 149, 138, 0, 159, 538, 155, 210, 58,
498 181, 162, 196, 218, 207, 524, 0, 596, 596, 596,
499
500 596, 596, 596, 596, 596, 596, 596, 0, 156, 569,
501 564, 572, 596, 0, 0, 533, 211, 201, 541, 220,
502 223, 209, 524, 215, 535, 213, 535, 250, 235, 527,
503 252, 253, 536, 247, 535, 524, 250, 529, 517, 254,
504 531, 252, 501, 0, 527, 283, 307, 265, 528, 195,
505 270, 286, 259, 527, 517, 510, 290, 305, 515, 0,
506 516, 522, 517, 81, 290, 291, 513, 519, 320, 296,
507 309, 295, 0, 330, 489, 596, 510, 512, 316, 525,
508 0, 510, 307, 513, 0, 318, 513, 326, 308, 512,
509 510, 324, 324, 523, 520, 507, 502, 332, 0, 511,
510 kumpf 1.31
511 497, 475, 0, 460, 331, 334, 467, 470, 457, 0,
512 0, 347, 351, 343, 0, 433, 439, 408, 0, 415,
513 336, 355, 0, 342, 344, 407, 0, 0, 349, 361,
514 0, 0, 0, 0, 0, 355, 366, 0, 0, 0,
515 596, 350, 0, 410, 400, 392, 0, 403, 404, 403,
516 384, 326, 365, 353, 369, 354, 226, 0, 212, 226,
517 215, 0, 359, 0, 365, 219, 218, 365, 379, 176,
518 184, 370, 378, 0, 0, 0, 184, 377, 395, 387,
519 384, 385, 0, 0, 0, 393, 0, 388, 172, 175,
520 169, 173, 0, 81, 72, 69, 0, 0, 596, 451,
|
521 e.boden 1.21
|
522 kumpf 1.31 460, 466, 475, 479, 483, 492, 501, 504, 507, 516,
523 519, 522, 527, 528
|
524 mike 1.3 } ;
525
|
526 karl 1.34 static yyconst flex_int16_t yy_def[315] =
|
527 mike 1.3 { 0,
|
528 kumpf 1.31 299, 1, 300, 300, 301, 301, 299, 299, 299, 299,
529 299, 299, 302, 303, 299, 299, 304, 299, 299, 299,
530 299, 299, 22, 299, 299, 299, 305, 305, 305, 305,
531 305, 305, 305, 305, 305, 305, 305, 305, 305, 305,
532 305, 305, 305, 299, 299, 305, 299, 299, 306, 299,
533 299, 307, 299, 299, 308, 299, 302, 303, 299, 21,
534 304, 304, 309, 299, 310, 21, 21, 299, 311, 22,
535 23, 305, 305, 305, 305, 305, 305, 305, 305, 305,
536 305, 305, 305, 305, 305, 305, 305, 305, 305, 305,
537 305, 305, 305, 305, 305, 305, 306, 299, 299, 299,
538
539 299, 299, 299, 299, 299, 299, 299, 312, 299, 303,
540 313, 310, 299, 311, 305, 305, 305, 305, 305, 305,
541 305, 305, 305, 305, 305, 305, 305, 305, 305, 305,
542 305, 305, 305, 305, 305, 305, 305, 305, 305, 305,
543 305, 305, 305, 314, 299, 299, 299, 305, 305, 305,
544 305, 305, 305, 305, 305, 305, 305, 305, 305, 305,
545 305, 305, 305, 305, 305, 305, 305, 305, 305, 305,
546 305, 305, 305, 305, 305, 299, 299, 305, 305, 305,
547 305, 305, 305, 305, 305, 305, 305, 305, 305, 305,
548 305, 305, 305, 305, 305, 305, 305, 305, 305, 305,
549 kumpf 1.31
550 305, 305, 305, 305, 305, 305, 305, 305, 305, 305,
551 305, 299, 305, 305, 305, 305, 305, 305, 305, 305,
552 305, 305, 305, 305, 305, 305, 305, 305, 305, 305,
553 305, 305, 305, 305, 305, 305, 305, 305, 305, 305,
554 299, 305, 305, 305, 305, 305, 305, 305, 305, 305,
555 305, 305, 305, 305, 305, 305, 305, 305, 305, 305,
556 305, 305, 305, 305, 305, 305, 305, 305, 305, 305,
557 305, 305, 305, 305, 305, 305, 305, 305, 305, 305,
558 305, 305, 305, 305, 305, 305, 305, 305, 305, 305,
559 305, 305, 305, 305, 305, 305, 305, 305, 0, 299,
|
560 e.boden 1.21
|
561 kumpf 1.31 299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
562 299, 299, 299, 299
|
563 mike 1.3 } ;
564
|
565 karl 1.34 static yyconst flex_int16_t yy_nxt[662] =
|
566 mike 1.3 { 0,
|
567 e.boden 1.21 8, 9, 10, 9, 11, 12, 13, 14, 15, 16,
|
568 kumpf 1.31 8, 17, 18, 19, 20, 21, 22, 23, 23, 23,
569 23, 23, 23, 23, 24, 25, 26, 27, 28, 29,
570 30, 31, 32, 33, 33, 34, 33, 33, 35, 36,
571 37, 38, 39, 40, 41, 42, 43, 33, 33, 33,
572 44, 8, 45, 27, 28, 46, 32, 33, 36, 40,
573 41, 42, 33, 47, 48, 50, 50, 51, 51, 59,
574 79, 60, 61, 63, 63, 63, 63, 63, 63, 63,
575 63, 63, 64, 71, 71, 73, 65, 77, 82, 79,
576 74, 80, 135, 86, 85, 78, 299, 76, 136, 194,
577
578 298, 81, 195, 297, 73, 93, 74, 82, 94, 87,
579 109, 296, 118, 77, 52, 52, 54, 80, 85, 86,
580 96, 81, 299, 116, 94, 87, 109, 67, 67, 55,
581 55, 55, 55, 55, 55, 55, 55, 55, 118, 116,
582 299, 55, 55, 55, 55, 55, 55, 90, 119, 120,
583 121, 123, 122, 91, 63, 63, 63, 63, 63, 63,
584 63, 63, 63, 92, 119, 120, 299, 55, 55, 55,
585 55, 54, 122, 90, 299, 128, 121, 123, 59, 92,
586 61, 61, 131, 145, 55, 55, 55, 55, 55, 55,
587 55, 55, 55, 68, 127, 128, 55, 55, 55, 55,
588
589 kumpf 1.31 55, 55, 129, 295, 294, 138, 293, 292, 131, 145,
590 127, 180, 124, 125, 284, 281, 280, 181, 129, 68,
591 137, 138, 55, 55, 55, 55, 59, 126, 66, 66,
592 67, 67, 67, 67, 67, 62, 62, 132, 124, 137,
593 139, 68, 133, 126, 150, 140, 142, 152, 149, 277,
594 276, 153, 156, 154, 134, 273, 139, 272, 158, 271,
595 150, 270, 161, 132, 141, 142, 133, 68, 149, 154,
596 134, 140, 156, 152, 158, 69, 59, 153, 70, 70,
597 71, 71, 71, 71, 71, 71, 71, 160, 161, 163,
598 164, 68, 166, 172, 178, 169, 184, 174, 147, 147,
599
600 147, 147, 147, 147, 147, 147, 147, 160, 166, 163,
601 164, 169, 172, 174, 183, 182, 184, 68, 99, 188,
602 178, 100, 147, 147, 147, 147, 147, 147, 147, 147,
603 147, 182, 189, 196, 197, 204, 200, 205, 201, 206,
604 183, 202, 203, 214, 217, 188, 207, 222, 208, 196,
605 197, 209, 210, 221, 204, 206, 226, 265, 189, 231,
606 236, 219, 101, 205, 217, 102, 222, 225, 103, 214,
607 104, 237, 105, 106, 241, 107, 101, 219, 242, 221,
608 226, 248, 243, 225, 249, 231, 236, 250, 253, 251,
609 254, 237, 255, 256, 266, 257, 268, 248, 267, 269,
610 kumpf 1.31
611 241, 243, 274, 250, 242, 251, 279, 253, 275, 278,
612 249, 257, 255, 282, 267, 269, 254, 283, 274, 256,
613 266, 285, 268, 286, 275, 278, 287, 288, 289, 282,
614 290, 291, 279, 264, 263, 262, 283, 285, 261, 260,
615 259, 258, 252, 288, 289, 287, 247, 291, 246, 286,
616 290, 49, 49, 49, 49, 49, 49, 49, 49, 49,
617 53, 53, 53, 53, 53, 53, 53, 53, 53, 57,
618 245, 244, 57, 57, 57, 58, 240, 58, 58, 58,
619 58, 58, 58, 58, 62, 62, 72, 239, 238, 72,
620 72, 72, 97, 235, 234, 97, 97, 97, 97, 97,
621
622 97, 98, 98, 98, 98, 98, 98, 98, 98, 98,
623 108, 108, 108, 63, 233, 63, 112, 112, 112, 112,
624 112, 112, 112, 112, 112, 114, 114, 114, 144, 144,
625 144, 147, 232, 147, 176, 176, 176, 230, 229, 228,
626 227, 224, 223, 220, 218, 216, 215, 213, 212, 211,
627 199, 198, 193, 192, 191, 190, 187, 186, 185, 179,
628 177, 175, 173, 171, 170, 168, 167, 165, 162, 159,
629 157, 155, 151, 148, 113, 146, 110, 143, 130, 117,
630 115, 299, 113, 111, 59, 110, 95, 89, 88, 84,
631 kumpf 1.31 83, 76, 75, 56, 299, 7, 299, 299, 299, 299,
632
633 299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
634 299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
635 299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
636 299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
637 299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
638 299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
639 299
|
640 mike 1.3 } ;
641
|
642 karl 1.34 static yyconst flex_int16_t yy_chk[662] =
|
643 mike 1.3 { 0,
644 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
645 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
646 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
647 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
648 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
649 e.boden 1.21 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
650 1, 1, 1, 1, 1, 3, 4, 3, 4, 17,
|
651 kumpf 1.31 31, 17, 17, 19, 19, 19, 19, 19, 19, 19,
652 19, 19, 20, 23, 23, 27, 20, 30, 34, 31,
653 27, 32, 90, 38, 37, 30, 23, 46, 90, 164,
654
655 296, 32, 164, 295, 27, 42, 27, 34, 42, 38,
656 56, 294, 76, 30, 3, 4, 5, 32, 37, 38,
657 46, 32, 23, 74, 42, 38, 56, 67, 67, 5,
658 5, 5, 5, 5, 5, 5, 5, 5, 76, 74,
659 67, 5, 5, 5, 5, 5, 5, 41, 77, 78,
660 79, 81, 80, 41, 59, 59, 59, 59, 59, 59,
661 59, 59, 59, 41, 77, 78, 67, 5, 5, 5,
662 5, 6, 80, 41, 67, 84, 79, 81, 61, 41,
663 61, 61, 88, 109, 6, 6, 6, 6, 6, 6,
664 6, 6, 6, 61, 83, 84, 6, 6, 6, 6,
665
666 6, 6, 86, 292, 291, 92, 290, 289, 88, 109,
667 83, 150, 82, 82, 277, 271, 270, 150, 86, 61,
668 91, 92, 6, 6, 6, 6, 21, 82, 21, 21,
669 21, 21, 21, 21, 21, 21, 21, 89, 82, 91,
670 93, 21, 89, 82, 118, 94, 95, 120, 117, 267,
671 266, 121, 124, 122, 89, 261, 93, 260, 126, 259,
672 kumpf 1.31 118, 257, 129, 89, 94, 95, 89, 21, 117, 122,
673 89, 94, 124, 120, 126, 21, 22, 121, 22, 22,
674 22, 22, 22, 22, 22, 22, 22, 128, 129, 131,
675 132, 22, 134, 140, 148, 137, 153, 142, 146, 146,
676
677 146, 146, 146, 146, 146, 146, 146, 128, 134, 131,
678 132, 137, 140, 142, 152, 151, 153, 22, 52, 157,
679 148, 52, 147, 147, 147, 147, 147, 147, 147, 147,
680 147, 151, 158, 165, 166, 170, 169, 171, 169, 172,
681 152, 169, 169, 179, 183, 157, 174, 189, 174, 165,
682 166, 174, 174, 188, 170, 172, 193, 252, 158, 198,
683 205, 186, 52, 171, 183, 52, 189, 192, 52, 179,
684 52, 206, 52, 52, 212, 52, 52, 186, 213, 188,
685 193, 221, 214, 192, 222, 198, 205, 224, 229, 225,
686 230, 206, 236, 237, 253, 242, 255, 221, 254, 256,
687
688 212, 214, 263, 224, 213, 225, 269, 229, 265, 268,
689 222, 242, 236, 272, 254, 256, 230, 273, 263, 237,
690 253, 278, 255, 279, 265, 268, 280, 281, 282, 272,
691 286, 288, 269, 251, 250, 249, 273, 278, 248, 246,
692 245, 244, 226, 281, 282, 280, 220, 288, 218, 279,
693 kumpf 1.31 286, 300, 300, 300, 300, 300, 300, 300, 300, 300,
694 301, 301, 301, 301, 301, 301, 301, 301, 301, 302,
695 217, 216, 302, 302, 302, 303, 209, 303, 303, 303,
696 303, 303, 303, 303, 304, 304, 305, 208, 207, 305,
697 305, 305, 306, 204, 202, 306, 306, 306, 306, 306,
698
699 306, 307, 307, 307, 307, 307, 307, 307, 307, 307,
700 308, 308, 308, 309, 201, 309, 310, 310, 310, 310,
701 310, 310, 310, 310, 310, 311, 311, 311, 312, 312,
702 312, 313, 200, 313, 314, 314, 314, 197, 196, 195,
703 194, 191, 190, 187, 184, 182, 180, 178, 177, 175,
704 168, 167, 163, 162, 161, 159, 156, 155, 154, 149,
705 145, 143, 141, 139, 138, 136, 135, 133, 130, 127,
706 125, 123, 119, 116, 112, 111, 110, 96, 87, 75,
707 73, 66, 65, 63, 62, 58, 43, 40, 39, 36,
708 35, 29, 28, 12, 7, 299, 299, 299, 299, 299,
709
710 299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
711 299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
712 299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
713 299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
714 kumpf 1.31 299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
715 299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
716 299
|
717 mike 1.3 } ;
718
|
719 karl 1.34 /* Table of booleans, true if rule could match eol. */
720 static yyconst flex_int32_t yy_rule_can_match_eol[84] =
721 { 0,
|
722 dev.meetei 1.37 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
723 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
724 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
725 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
726 karl 1.34 0, 0, 0, 0, };
727
728 static yy_state_type yy_last_accepting_state;
729 static char *yy_last_accepting_cpos;
730
731 extern int cimmof__flex_debug;
732 int cimmof__flex_debug = 0;
733
734 /* The intent behind this definition is that it'll catch
735 * any uses of REJECT which flex missed.
736 */
737 #define REJECT reject_used_but_not_detected
|
738 mike 1.3 #define yymore() yymore_used_but_not_detected
739 #define YY_MORE_ADJ 0
740 #define YY_RESTORE_YY_MORE_OFFSET
|
741 karl 1.34 char *cimmof_text;
|
742 mike 1.3 #line 1 "cimmof.l"
|
743 karl 1.34 /*
744 //%LICENSE////////////////////////////////////////////////////////////////
|
745 kumpf 1.35 //
|
746 karl 1.34 // Licensed to The Open Group (TOG) under one or more contributor license
747 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
748 // this work for additional information regarding copyright ownership.
749 // Each contributor licenses this file to you under the OpenPegasus Open
750 // Source License; you may not use this file except in compliance with the
751 // License.
|
752 kumpf 1.35 //
|
753 karl 1.34 // Permission is hereby granted, free of charge, to any person obtaining a
754 // copy of this software and associated documentation files (the "Software"),
755 // to deal in the Software without restriction, including without limitation
756 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
757 // and/or sell copies of the Software, and to permit persons to whom the
758 // Software is furnished to do so, subject to the following conditions:
|
759 kumpf 1.35 //
|
760 karl 1.34 // The above copyright notice and this permission notice shall be included
761 // in all copies or substantial portions of the Software.
|
762 kumpf 1.35 //
|
763 karl 1.34 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
764 kumpf 1.35 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
765 karl 1.34 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
766 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
767 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
768 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
769 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
770 kumpf 1.35 //
|
771 karl 1.34 //////////////////////////////////////////////////////////////////////////
772 */
|
773 karl 1.29 #line 36 "cimmof.l"
|
774 mike 1.3
|
775 karl 1.34
|
776 mike 1.3 #include "cimmofParser.h"
777 #include "memobjs.h"
778 #include "cimmof_tab.h"
779
|
780 e.boden 1.21 /* */
781 /* 7/27/2004: bug 1330, support for slash* comments, E Boden, IBM */
782 /* 8/14/2004: bug 544, support for string escape characters, E Boden */
783 /* */
784 /* */
785 /* */
|
786 dj.gorey 1.20
|
787 kumpf 1.32 /* Avoid warn_unused_result warnings in Linux RPM build */
|
788 kumpf 1.33 #ifndef ECHO
|
789 karl 1.34 # define ECHO do { size_t ignored = fwrite(cimmof_text, cimmof_leng, 1, cimmof_out); } while(0)
|
790 kumpf 1.33 #endif
|
791 kumpf 1.32
|
792 mike 1.3 /*---------------------------------------------------------------*/
793 /* These routines wrap certain flex functions, keeping down the */
794 /* number of external dependencies */
795 /*---------------------------------------------------------------*/
796 int get_yy_buf_size_wrapper() { return YY_BUF_SIZE; }
797
|
798 karl 1.29 void * get_cimmof__current_buffer_wrapper() {
799 return (void *)YY_CURRENT_BUFFER;
|
800 mike 1.3 }
801
802 void * create_cimmof_buffer_wrapper(const FILE *f, int size) {
|
803 karl 1.34 return (void *)cimmof__create_buffer((FILE *)f,size);
|
804 mike 1.3 }
805
|
806 kumpf 1.16 int switch_to_buffer_wrapper(void *buffstate, Boolean closeCurrent) {
807 if (closeCurrent)
808 {
|
809 karl 1.34 if (cimmof_in != NULL)
|
810 kumpf 1.16 {
|
811 karl 1.34 fflush(cimmof_in);
812 fclose(cimmof_in);
813 cimmof_in = NULL;
|
814 kumpf 1.16 }
|
815 karl 1.34 cimmof__delete_buffer(YY_CURRENT_BUFFER);
|
816 kumpf 1.16 }
|
817 karl 1.34 cimmof__switch_to_buffer((YY_BUFFER_STATE)buffstate);
|
818 mike 1.3 return 0;
819 }
820
|
821 e.boden 1.21 char strbuf[1024], *strbuf_p, slashx[2];
|
822 mike 1.3
823
|
824 karl 1.34
|
825 dev.meetei 1.37 #line 823 "cimmof_lex.cpp"
|
826 karl 1.34
827 #define INITIAL 0
|
828 kumpf 1.25 #define myStr 1
829 #define myHex 2
|
830 e.boden 1.21
|
831 karl 1.34 #ifndef YY_NO_UNISTD_H
832 /* Special case for "unistd.h", since it is non-ANSI. We include it way
833 * down here because we want the user's section 1 to have been scanned first.
834 * The user has a chance to override it with an option.
835 */
836 #include <unistd.h>
837 #endif
838
839 #ifndef YY_EXTRA_TYPE
840 #define YY_EXTRA_TYPE void *
841 #endif
842
843 static int yy_init_globals (void );
|
844 mike 1.3
|
845 dev.meetei 1.36 /* Accessor methods to globals.
846 These are made visible to non-reentrant scanners for convenience. */
847
848 int cimmof_lex_destroy (void );
849
850 int cimmof_get_debug (void );
851
852 void cimmof_set_debug (int debug_flag );
853
854 YY_EXTRA_TYPE cimmof_get_extra (void );
855
856 void cimmof_set_extra (YY_EXTRA_TYPE user_defined );
857
858 FILE *cimmof_get_in (void );
859
860 void cimmof_set_in (FILE * in_str );
861
862 FILE *cimmof_get_out (void );
863
864 void cimmof_set_out (FILE * out_str );
865
866 dev.meetei 1.36 int cimmof_get_leng (void );
867
868 char *cimmof_get_text (void );
869
870 int cimmof_get_lineno (void );
871
872 void cimmof_set_lineno (int line_number );
873
|
874 mike 1.3 /* Macros after this point can all be overridden by user definitions in
875 * section 1.
876 */
877
878 #ifndef YY_SKIP_YYWRAP
879 #ifdef __cplusplus
|
880 karl 1.34 extern "C" int cimmof_wrap (void );
|
881 mike 1.3 #else
|
882 karl 1.34 extern int cimmof_wrap (void );
|
883 mike 1.3 #endif
884 #endif
885
|
886 karl 1.34 static void yyunput (int c,char *buf_ptr );
|
887 dev.meetei 1.37
|
888 mike 1.3 #ifndef yytext_ptr
|
889 karl 1.34 static void yy_flex_strncpy (char *,yyconst char *,int );
|
890 mike 1.3 #endif
891
892 #ifdef YY_NEED_STRLEN
|
893 karl 1.34 static int yy_flex_strlen (yyconst char * );
|
894 mike 1.3 #endif
895
896 #ifndef YY_NO_INPUT
|
897 karl 1.34
|
898 mike 1.3 #ifdef __cplusplus
|
899 karl 1.34 static int yyinput (void );
|
900 mike 1.3 #else
|
901 karl 1.34 static int input (void );
|
902 mike 1.3 #endif
903
904 #endif
905
|
906 karl 1.34 static int yy_start_stack_ptr = 0;
907 static int yy_start_stack_depth = 0;
908 static int *yy_start_stack = NULL;
|
909 dev.meetei 1.37
|
910 karl 1.34 static void yy_push_state (int new_state );
|
911 dev.meetei 1.37
|
912 karl 1.34 static void yy_pop_state (void );
|
913 dev.meetei 1.37
|
914 karl 1.34 static int yy_top_state (void );
|
915 dev.meetei 1.37
|
916 mike 1.3 /* Amount of stuff to slurp up with each read. */
917 #ifndef YY_READ_BUF_SIZE
918 #define YY_READ_BUF_SIZE 8192
919 #endif
920
921 /* Copy whatever the last rule matched to the standard output. */
922 #ifndef ECHO
923 /* This used to be an fputs(), but since the string might contain NUL's,
924 * we now use fwrite().
925 */
|
926 dev.meetei 1.36 #define ECHO do { if (fwrite( cimmof_text, cimmof_leng, 1, cimmof_out )) {} } while (0)
|
927 mike 1.3 #endif
928
929 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
930 * is returned in "result".
931 */
932 #ifndef YY_INPUT
933 #define YY_INPUT(buf,result,max_size) \
|
934 karl 1.34 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
|
935 kumpf 1.31 { \
|
936 karl 1.34 int c = '*'; \
|
937 dev.meetei 1.37 unsigned n; \
|
938 kumpf 1.31 for ( n = 0; n < max_size && \
|
939 karl 1.34 (c = getc( cimmof_in )) != EOF && c != '\n'; ++n ) \
|
940 kumpf 1.31 buf[n] = (char) c; \
941 if ( c == '\n' ) \
942 buf[n++] = (char) c; \
|
943 karl 1.34 if ( c == EOF && ferror( cimmof_in ) ) \
|
944 kumpf 1.31 YY_FATAL_ERROR( "input in flex scanner failed" ); \
945 result = n; \
946 } \
|
947 karl 1.34 else \
948 { \
949 errno=0; \
950 while ( (result = fread(buf, 1, max_size, cimmof_in))==0 && ferror(cimmof_in)) \
951 { \
952 if( errno != EINTR) \
953 { \
954 YY_FATAL_ERROR( "input in flex scanner failed" ); \
955 break; \
956 } \
957 errno=0; \
958 clearerr(cimmof_in); \
959 } \
960 }\
961 \
962
|
963 mike 1.3 #endif
964
965 /* No semi-colon after return; correct usage is to write "yyterminate();" -
966 * we don't want an extra ';' after the "return" because that will cause
967 * some compilers to complain about unreachable statements.
968 */
969 #ifndef yyterminate
970 #define yyterminate() return YY_NULL
971 #endif
972
973 /* Number of entries by which start-condition stack grows. */
974 #ifndef YY_START_STACK_INCR
975 #define YY_START_STACK_INCR 25
976 #endif
977
978 /* Report a fatal error. */
979 #ifndef YY_FATAL_ERROR
980 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
981 #endif
982
|
983 karl 1.34 /* end tables serialization structures and prototypes */
984
|
985 mike 1.3 /* Default declaration of generated scanner - a define so the user can
986 * easily add parameters.
987 */
988 #ifndef YY_DECL
|
989 karl 1.34 #define YY_DECL_IS_OURS 1
990
991 extern int cimmof_lex (void);
992
993 #define YY_DECL int cimmof_lex (void)
994 #endif /* !YY_DECL */
|
995 mike 1.3
|
996 karl 1.34 /* Code executed at the beginning of each rule, after cimmof_text and cimmof_leng
|
997 mike 1.3 * have been set up.
998 */
999 #ifndef YY_USER_ACTION
1000 #define YY_USER_ACTION
1001 #endif
1002
1003 /* Code executed at the end of each rule. */
1004 #ifndef YY_BREAK
1005 #define YY_BREAK break;
1006 #endif
1007
1008 #define YY_RULE_SETUP \
|
1009 kumpf 1.31 YY_USER_ACTION
|
1010 mike 1.3
|
1011 karl 1.34 /** The main scanner function which does all the work.
1012 */
|
1013 mike 1.3 YY_DECL
|
1014 karl 1.34 {
|
1015 kumpf 1.31 register yy_state_type yy_current_state;
|
1016 karl 1.34 register char *yy_cp, *yy_bp;
|
1017 kumpf 1.31 register int yy_act;
|
1018 dev.meetei 1.37
|
1019 kumpf 1.33 #line 90 "cimmof.l"
|
1020 mike 1.3
1021
1022
|
1023 dev.meetei 1.37 #line 1021 "cimmof_lex.cpp"
|
1024 mike 1.3
|
1025 karl 1.34 if ( !(yy_init) )
|
1026 kumpf 1.31 {
|
1027 karl 1.34 (yy_init) = 1;
|
1028 mike 1.3
1029 #ifdef YY_USER_INIT
|
1030 kumpf 1.31 YY_USER_INIT;
|
1031 mike 1.3 #endif
1032
|
1033 karl 1.34 if ( ! (yy_start) )
1034 (yy_start) = 1; /* first start state */
|
1035 mike 1.3
|
1036 karl 1.34 if ( ! cimmof_in )
1037 cimmof_in = stdin;
|
1038 mike 1.3
|
1039 karl 1.34 if ( ! cimmof_out )
1040 cimmof_out = stdout;
|
1041 mike 1.3
|
1042 karl 1.34 if ( ! YY_CURRENT_BUFFER ) {
1043 cimmof_ensure_buffer_stack ();
1044 YY_CURRENT_BUFFER_LVALUE =
1045 cimmof__create_buffer(cimmof_in,YY_BUF_SIZE );
1046 }
|
1047 mike 1.3
|
1048 karl 1.34 cimmof__load_buffer_state( );
|
1049 kumpf 1.31 }
|
1050 mike 1.3
|
1051 kumpf 1.31 while ( 1 ) /* loops until end-of-file is reached */
1052 {
|
1053 karl 1.34 yy_cp = (yy_c_buf_p);
|
1054 mike 1.3
|
1055 karl 1.34 /* Support of cimmof_text. */
1056 *yy_cp = (yy_hold_char);
|
1057 mike 1.3
|
1058 kumpf 1.31 /* yy_bp points to the position in yy_ch_buf of the start of
1059 * the current run.
1060 */
1061 yy_bp = yy_cp;
|
1062 mike 1.3
|
1063 karl 1.34 yy_current_state = (yy_start);
|
1064 mike 1.3 yy_match:
|
1065 kumpf 1.31 do
1066 {
1067 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
|
1068 karl 1.34 if ( yy_accept[yy_current_state] )
1069 {
1070 (yy_last_accepting_state) = yy_current_state;
1071 (yy_last_accepting_cpos) = yy_cp;
1072 }
|
1073 kumpf 1.31 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1074 {
1075 yy_current_state = (int) yy_def[yy_current_state];
1076 if ( yy_current_state >= 300 )
1077 yy_c = yy_meta[(unsigned int) yy_c];
1078 }
1079 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1080 ++yy_cp;
1081 }
|
1082 karl 1.34 while ( yy_current_state != 299 );
1083 yy_cp = (yy_last_accepting_cpos);
1084 yy_current_state = (yy_last_accepting_state);
|
1085 mike 1.3
1086 yy_find_action:
|
1087 karl 1.34 yy_act = yy_accept[yy_current_state];
|
1088 kumpf 1.31
1089 YY_DO_BEFORE_ACTION;
1090
|
1091 karl 1.34 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
|
1092 kumpf 1.31 {
1093 int yyl;
|
1094 karl 1.34 for ( yyl = 0; yyl < cimmof_leng; ++yyl )
1095 if ( cimmof_text[yyl] == '\n' )
|
1096 dev.meetei 1.37
|
1097 karl 1.34 cimmof_lineno++;
1098 ;
|
1099 kumpf 1.31 }
|
1100 mike 1.3
|
1101 kumpf 1.31 do_action: /* This label is used only to access EOF actions. */
|
1102 mike 1.3
|
1103 kumpf 1.31 switch ( yy_act )
1104 { /* beginning of action switch */
|
1105 karl 1.34 case 0: /* must back up */
1106 /* undo the effects of YY_DO_BEFORE_ACTION */
1107 *yy_cp = (yy_hold_char);
1108 yy_cp = (yy_last_accepting_cpos);
1109 yy_current_state = (yy_last_accepting_state);
1110 goto yy_find_action;
1111
|
1112 mike 1.3 case 1:
|
1113 karl 1.34 /* rule 1 can match eol */
|
1114 mike 1.3 YY_RULE_SETUP
|
1115 kumpf 1.33 #line 93 "cimmof.l"
|
1116 karl 1.29 { cimmofParser::Instance()->increment_lineno(); }
|
1117 kumpf 1.31 YY_BREAK
|
1118 mike 1.3 case 2:
|
1119 karl 1.34 /* rule 2 can match eol */
|
1120 mike 1.3 YY_RULE_SETUP
|
1121 kumpf 1.33 #line 94 "cimmof.l"
|
1122 karl 1.29 { cimmofParser::Instance()->increment_lineno(); }
|
1123 kumpf 1.31 YY_BREAK
|
1124 mike 1.3 case 3:
1125 YY_RULE_SETUP
|
1126 kumpf 1.33 #line 95 "cimmof.l"
|
1127 mike 1.3 { /* skip white space */ }
|
1128 kumpf 1.31 YY_BREAK
|
1129 mike 1.3 case 4:
1130 YY_RULE_SETUP
|
1131 kumpf 1.33 #line 96 "cimmof.l"
|
1132 mike 1.3 { return(TOK_CLASS); }
|
1133 kumpf 1.31 YY_BREAK
|
1134 mike 1.3 case 5:
1135 YY_RULE_SETUP
|
1136 kumpf 1.33 #line 97 "cimmof.l"
|
1137 mike 1.3 { return(TOK_LEFTCURLYBRACE); }
|
1138 kumpf 1.31 YY_BREAK
|
1139 mike 1.3 case 6:
1140 YY_RULE_SETUP
|
1141 kumpf 1.33 #line 98 "cimmof.l"
|
1142 mike 1.3 { return(TOK_RIGHTCURLYBRACE); }
|
1143 kumpf 1.31 YY_BREAK
|
1144 mike 1.3 case 7:
1145 YY_RULE_SETUP
|
1146 kumpf 1.33 #line 99 "cimmof.l"
|
1147 mike 1.3 { return(TOK_LEFTSQUAREBRACKET); }
|
1148 kumpf 1.31 YY_BREAK
|
1149 mike 1.3 case 8:
1150 YY_RULE_SETUP
|
1151 kumpf 1.33 #line 100 "cimmof.l"
|
1152 mike 1.3 { return(TOK_RIGHTSQUAREBRACKET); }
|
1153 kumpf 1.31 YY_BREAK
|
1154 mike 1.3 case 9:
1155 YY_RULE_SETUP
|
1156 kumpf 1.33 #line 101 "cimmof.l"
|
1157 mike 1.3 { return(TOK_LEFTPAREN); }
|
1158 kumpf 1.31 YY_BREAK
|
1159 mike 1.3 case 10:
1160 YY_RULE_SETUP
|
1161 kumpf 1.33 #line 102 "cimmof.l"
|
1162 mike 1.3 { return(TOK_RIGHTPAREN); }
|
1163 kumpf 1.31 YY_BREAK
|
1164 mike 1.3 case 11:
1165 YY_RULE_SETUP
|
1166 kumpf 1.33 #line 103 "cimmof.l"
|
1167 mike 1.3 { return(TOK_COLON); }
|
1168 kumpf 1.31 YY_BREAK
|
1169 mike 1.3 case 12:
1170 YY_RULE_SETUP
|
1171 kumpf 1.33 #line 104 "cimmof.l"
|
1172 mike 1.3 { return(TOK_SEMICOLON); }
|
1173 kumpf 1.31 YY_BREAK
|
1174 mike 1.3 case 13:
1175 YY_RULE_SETUP
|
1176 kumpf 1.33 #line 105 "cimmof.l"
|
1177 karl 1.29 {
|
1178 karl 1.34 cimmof_lval.strval = new String(cimmof_text);
|
1179 karl 1.29 return(TOK_REAL_VALUE); }
|
1180 kumpf 1.31 YY_BREAK
|
1181 mike 1.3 case 14:
1182 YY_RULE_SETUP
|
1183 kumpf 1.33 #line 108 "cimmof.l"
|
1184 karl 1.34 { cimmof_lval.strval = new String(cimmof_text);
|
1185 karl 1.29 return(TOK_OCTAL_VALUE); }
|
1186 kumpf 1.31 YY_BREAK
|
1187 mike 1.3 case 15:
1188 YY_RULE_SETUP
|
1189 kumpf 1.33 #line 110 "cimmof.l"
|
1190 karl 1.34 { cimmof_lval.strval = new String(cimmof_text);
|
1191 karl 1.29 return(TOK_HEX_VALUE); }
|
1192 kumpf 1.31 YY_BREAK
|
1193 mike 1.3 case 16:
1194 YY_RULE_SETUP
|
1195 kumpf 1.33 #line 112 "cimmof.l"
|
1196 karl 1.34 { cimmof_lval.strval = new String(cimmof_text);
|
1197 karl 1.29 return(TOK_BINARY_VALUE); }
|
1198 kumpf 1.31 YY_BREAK
|
1199 mike 1.3 case 17:
1200 YY_RULE_SETUP
|
1201 kumpf 1.33 #line 114 "cimmof.l"
|
1202 karl 1.34 { cimmof_lval.strval = new String(cimmof_text);
|
1203 karl 1.29 return(TOK_POSITIVE_DECIMAL_VALUE); }
|
1204 kumpf 1.31 YY_BREAK
|
1205 mike 1.3 case 18:
1206 YY_RULE_SETUP
|
1207 kumpf 1.33 #line 116 "cimmof.l"
|
1208 kumpf 1.31 { /* Note: All non-zero unsigned integers are handled above */
|
1209 karl 1.34 cimmof_lval.strval = new String(cimmof_text);
|
1210 karl 1.29 return(TOK_SIGNED_DECIMAL_VALUE); }
|
1211 kumpf 1.31 YY_BREAK
|
1212 mike 1.3 case 19:
1213 YY_RULE_SETUP
|
1214 kumpf 1.33 #line 119 "cimmof.l"
|
1215 mike 1.3 { return(TOK_EQUAL); }
|
1216 kumpf 1.31 YY_BREAK
|
1217 mike 1.3 case 20:
1218 YY_RULE_SETUP
|
1219 kumpf 1.33 #line 120 "cimmof.l"
|
1220 mike 1.3 { return(TOK_COMMA); }
|
1221 kumpf 1.31 YY_BREAK
|
1222 mike 1.3 case 21:
1223 YY_RULE_SETUP
|
1224 kumpf 1.33 #line 121 "cimmof.l"
|
1225 karl 1.34 { cimmof_lval.strval = new String(cimmof_text);
|
1226 karl 1.29 return(TOK_CHAR_VALUE); }
|
1227 kumpf 1.31 YY_BREAK
|
1228 karl 1.29 /*--- bugzilla 544 fix; handle string escapes ---
1229
1230 an impl. decision: invalid escape sequences
1231 are simply ignored, and left in the string.
1232
|
1233 karl 1.34 an impl. decision: cimmof_leng is set to the len
|
1234 karl 1.29 of resulting string, not the len of the matched
1235 token(s), since they are different, with escapes.
|
1236 karl 1.34 (but note; cimmof.y does not use cimmof_leng!)
|
1237 karl 1.29
1238 an impl. req't: strings are returned to parser
1239 with [no kidding!] enclosing "s.
1240 */
|
1241 mike 1.3 case 22:
1242 YY_RULE_SETUP
|
1243 kumpf 1.33 #line 138 "cimmof.l"
|
1244 karl 1.29 { BEGIN(myStr); strbuf_p = strbuf;
1245 /**strbuf_p++ = '"';*/ }
|
1246 kumpf 1.31 YY_BREAK
|
1247 mike 1.3 case 23:
1248 YY_RULE_SETUP
|
1249 kumpf 1.33 #line 140 "cimmof.l"
|
1250 karl 1.29 { BEGIN(INITIAL);
1251 /**strbuf_p++ = '"';*/ *strbuf_p = '\0';
1252 cimmof_leng = strbuf_p - strbuf;
1253 cimmof_lval.strval = new String(strbuf);
1254 return TOK_STRING_VALUE; }
|
1255 kumpf 1.31 YY_BREAK
|
1256 kumpf 1.25 case YY_STATE_EOF(myStr):
|
1257 kumpf 1.33 #line 145 "cimmof.l"
|
1258 dj.gorey 1.20 case 24:
|
1259 karl 1.34 /* rule 24 can match eol */
|
1260 dj.gorey 1.20 YY_RULE_SETUP
|
1261 kumpf 1.33 #line 146 "cimmof.l"
|
1262 karl 1.29 { BEGIN(INITIAL);
1263 /**strbuf_p++ = '"';*/ *strbuf_p = '\0';
1264 cimmof_leng = strbuf_p - strbuf;
1265 cimmof_lval.strval = new String(strbuf);
1266 return TOK_UNEXPECTED_CHAR; }
|
1267 kumpf 1.31 YY_BREAK
|
1268 dj.gorey 1.20 case 25:
|
1269 mike 1.3 YY_RULE_SETUP
|
1270 kumpf 1.33 #line 151 "cimmof.l"
|
1271 e.boden 1.21 { /* backspace */ *strbuf_p++ = '\b'; }
|
1272 kumpf 1.31 YY_BREAK
|
1273 dj.gorey 1.20 case 26:
|
1274 mike 1.3 YY_RULE_SETUP
|
1275 kumpf 1.33 #line 152 "cimmof.l"
|
1276 e.boden 1.21 { /* form feed */ *strbuf_p++ = '\f'; }
|
1277 kumpf 1.31 YY_BREAK
|
1278 dj.gorey 1.20 case 27:
|
1279 mike 1.3 YY_RULE_SETUP
|
1280 kumpf 1.33 #line 153 "cimmof.l"
|
1281 e.boden 1.21 { /* line feed */ *strbuf_p++ = '\n'; }
|
1282 kumpf 1.31 YY_BREAK
|
1283 dj.gorey 1.20 case 28:
|
1284 mike 1.3 YY_RULE_SETUP
|
1285 kumpf 1.33 #line 154 "cimmof.l"
|
1286 e.boden 1.21 { /* carriage return */ *strbuf_p++ = '\r'; }
|
1287 kumpf 1.31 YY_BREAK
|
1288 e.boden 1.21 case 29:
1289 YY_RULE_SETUP
|
1290 kumpf 1.33 #line 155 "cimmof.l"
|
1291 e.boden 1.21 { /* horizontal tab */ *strbuf_p++ = '\t'; }
|
1292 kumpf 1.31 YY_BREAK
|
1293 e.boden 1.21 case 30:
1294 YY_RULE_SETUP
|
1295 kumpf 1.33 #line 156 "cimmof.l"
|
1296 e.boden 1.21 { /* single quote */ *strbuf_p++ = '\''; }
|
1297 kumpf 1.31 YY_BREAK
|
1298 e.boden 1.21 case 31:
1299 YY_RULE_SETUP
|
1300 kumpf 1.33 #line 157 "cimmof.l"
|
1301 e.boden 1.21 { /* double quote */ *strbuf_p++ = '"'; }
|
1302 kumpf 1.31 YY_BREAK
|
1303 e.boden 1.21 case 32:
1304 YY_RULE_SETUP
|
1305 kumpf 1.33 #line 158 "cimmof.l"
|
1306 e.boden 1.21 { /* backslash */ *strbuf_p++ = '\\'; }
|
1307 kumpf 1.31 YY_BREAK
|
1308 e.boden 1.21 case 33:
1309 YY_RULE_SETUP
|
1310 kumpf 1.33 #line 159 "cimmof.l"
|
1311 kumpf 1.25 { yy_push_state(myHex);
|
1312 karl 1.34 memcpy(slashx,cimmof_text,2);
|
1313 karl 1.29 }
|
1314 kumpf 1.31 YY_BREAK
|
1315 e.boden 1.21 case 34:
|
1316 karl 1.34 /* rule 34 can match eol */
|
1317 e.boden 1.21 YY_RULE_SETUP
|
1318 kumpf 1.33 #line 162 "cimmof.l"
|
1319 e.boden 1.21 { *strbuf_p++ = '\\';
|
1320 karl 1.34 *strbuf_p++ = cimmof_text[1]; }
|
1321 kumpf 1.31 YY_BREAK
|
1322 e.boden 1.21 case 35:
1323 YY_RULE_SETUP
|
1324 kumpf 1.33 #line 164 "cimmof.l"
|
1325 karl 1.34 { char *t = cimmof_text;
|
1326 karl 1.29 while( *t ) *strbuf_p++ = *t++;
1327 *strbuf_p = '\0'; }
|
1328 kumpf 1.31 YY_BREAK
|
1329 e.boden 1.21 case 36:
1330 YY_RULE_SETUP
|
1331 kumpf 1.33 #line 167 "cimmof.l"
|
1332 e.boden 1.21 { /* get escaped hex digits */
|
1333 karl 1.29 char hexfmt[4]; unsigned int n;
|
1334 karl 1.34 sprintf( hexfmt, "%%%dx", cimmof_leng );
1335 sscanf(cimmof_text, hexfmt, &n);
|
1336 karl 1.29 if (n>255) {
1337 memcpy(strbuf_p,slashx,2);
1338 strbuf_p += 2;
|
1339 karl 1.34 char *t = cimmof_text;
|
1340 karl 1.29 while( *t ) *strbuf_p++ = *t++;
1341 }
1342 else *strbuf_p++ = (char)n;
1343 yy_pop_state();
1344 }
|
1345 kumpf 1.31 YY_BREAK
|
1346 e.boden 1.21 case 37:
1347 YY_RULE_SETUP
|
1348 kumpf 1.33 #line 180 "cimmof.l"
|
1349 e.boden 1.21 { memcpy(strbuf_p,slashx,2);
|
1350 karl 1.29 strbuf_p += 2;
|
1351 karl 1.34 *strbuf_p++ = *cimmof_text;
|
1352 karl 1.29 yy_pop_state();
1353 }
|
1354 kumpf 1.31 YY_BREAK
|
1355 e.boden 1.21 /* --- end of bugzilla 544 fix --- */
1356 case 38:
1357 YY_RULE_SETUP
|
1358 kumpf 1.33 #line 189 "cimmof.l"
|
1359 e.boden 1.21 { int c1=0, c2=yyinput();
|
1360 karl 1.29 for(;;) {
1361 if (c2==EOF) break;
1362 if (c1=='*' && c2=='/') break;
1363 c1=c2;
1364 c2=yyinput();
1365 }
1366 }
|
1367 kumpf 1.31 YY_BREAK
|
1368 e.boden 1.21 case YY_STATE_EOF(INITIAL):
|
1369 kumpf 1.25 case YY_STATE_EOF(myHex):
|
1370 kumpf 1.33 #line 197 "cimmof.l"
|
1371 e.boden 1.21 { yyterminate(); }
|
1372 kumpf 1.31 YY_BREAK
|
1373 e.boden 1.21 case 39:
1374 YY_RULE_SETUP
|
1375 kumpf 1.33 #line 198 "cimmof.l"
|
1376 e.boden 1.21 { return(TOK_NULL_VALUE); }
|
1377 kumpf 1.31 YY_BREAK
|
1378 e.boden 1.21 case 40:
1379 YY_RULE_SETUP
|
1380 kumpf 1.33 #line 199 "cimmof.l"
|
1381 e.boden 1.21 { return(TOK_TRUE); }
|
1382 kumpf 1.31 YY_BREAK
|
1383 e.boden 1.21 case 41:
1384 YY_RULE_SETUP
|
1385 kumpf 1.33 #line 200 "cimmof.l"
|
1386 e.boden 1.21 { return(TOK_FALSE); }
|
1387 kumpf 1.31 YY_BREAK
|
1388 e.boden 1.21 case 42:
1389 YY_RULE_SETUP
|
1390 kumpf 1.33 #line 201 "cimmof.l"
|
1391 mike 1.3 { return(TOK_PERIOD); }
|
1392 kumpf 1.31 YY_BREAK
|
1393 e.boden 1.21 case 43:
|
1394 mike 1.3 YY_RULE_SETUP
|
1395 kumpf 1.33 #line 202 "cimmof.l"
|
1396 mike 1.3 { return(TOK_PRAGMA); }
|
1397 kumpf 1.31 YY_BREAK
|
1398 e.boden 1.21 case 44:
|
1399 mike 1.3 YY_RULE_SETUP
|
1400 kumpf 1.33 #line 203 "cimmof.l"
|
1401 karl 1.29 { return(TOK_INSTANCE); }
|
1402 kumpf 1.31 YY_BREAK
|
1403 e.boden 1.21 case 45:
|
1404 mike 1.3 YY_RULE_SETUP
|
1405 kumpf 1.33 #line 204 "cimmof.l"
|
1406 karl 1.29 { return(TOK_OF); }
|
1407 kumpf 1.31 YY_BREAK
|
1408 e.boden 1.21 case 46:
|
1409 mike 1.3 YY_RULE_SETUP
|
1410 kumpf 1.33 #line 205 "cimmof.l"
|
1411 kumpf 1.11 {return(TOK_QUALIFIER); }
|
1412 kumpf 1.31 YY_BREAK
|
1413 e.boden 1.21 case 47:
|
1414 mike 1.3 YY_RULE_SETUP
|
1415 kumpf 1.33 #line 206 "cimmof.l"
|
1416 kumpf 1.11 { return(TOK_SCOPE); }
|
1417 kumpf 1.31 YY_BREAK
|
1418 e.boden 1.21 case 48:
|
1419 mike 1.3 YY_RULE_SETUP
|
1420 kumpf 1.33 #line 207 "cimmof.l"
|
1421 kumpf 1.11 { return(TOK_SCHEMA); }
|
1422 kumpf 1.31 YY_BREAK
|
1423 e.boden 1.21 case 49:
|
1424 mike 1.3 YY_RULE_SETUP
|
1425 kumpf 1.33 #line 208 "cimmof.l"
|
1426 karl 1.29 {return(TOK_ASSOCIATION); }
|
1427 kumpf 1.31 YY_BREAK
|
1428 e.boden 1.21 case 50:
|
1429 mike 1.3 YY_RULE_SETUP
|
1430 kumpf 1.33 #line 209 "cimmof.l"
|
1431 karl 1.29 { return(TOK_INDICATION); }
|
1432 kumpf 1.31 YY_BREAK
|
1433 e.boden 1.21 case 51:
|
1434 mike 1.3 YY_RULE_SETUP
|
1435 kumpf 1.33 #line 210 "cimmof.l"
|
1436 kumpf 1.11 { return(TOK_PROPERTY); }
|
1437 kumpf 1.31 YY_BREAK
|
1438 e.boden 1.21 case 52:
|
1439 mike 1.3 YY_RULE_SETUP
|
1440 kumpf 1.33 #line 211 "cimmof.l"
|
1441 kumpf 1.11 { return(TOK_REFERENCE); }
|
1442 kumpf 1.31 YY_BREAK
|
1443 e.boden 1.21 case 53:
|
1444 mike 1.3 YY_RULE_SETUP
|
1445 kumpf 1.33 #line 212 "cimmof.l"
|
1446 kumpf 1.11 { return(TOK_METHOD); }
|
1447 kumpf 1.31 YY_BREAK
|
1448 e.boden 1.21 case 54:
|
1449 mike 1.3 YY_RULE_SETUP
|
1450 kumpf 1.33 #line 213 "cimmof.l"
|
1451 kumpf 1.11 {return(TOK_PARAMETER); }
|
1452 kumpf 1.31 YY_BREAK
|
1453 e.boden 1.21 case 55:
|
1454 mike 1.3 YY_RULE_SETUP
|
1455 kumpf 1.33 #line 214 "cimmof.l"
|
1456 kumpf 1.11 { return(TOK_ANY); }
|
1457 kumpf 1.31 YY_BREAK
|
1458 e.boden 1.21 case 56:
|
1459 mike 1.3 YY_RULE_SETUP
|
1460 kumpf 1.33 #line 215 "cimmof.l"
|
1461 kumpf 1.11 { return(TOK_REF); }
|
1462 kumpf 1.31 YY_BREAK
|
1463 e.boden 1.21 case 57:
|
1464 mike 1.3 YY_RULE_SETUP
|
1465 kumpf 1.33 #line 216 "cimmof.l"
|
1466 kumpf 1.11 { return(TOK_FLAVOR); }
|
1467 kumpf 1.31 YY_BREAK
|
1468 e.boden 1.21 case 58:
|
1469 mike 1.3 YY_RULE_SETUP
|
1470 kumpf 1.33 #line 217 "cimmof.l"
|
1471 kumpf 1.11 {
|
1472 karl 1.29 return(TOK_ENABLEOVERRIDE); }
|
1473 kumpf 1.31 YY_BREAK
|
1474 e.boden 1.21 case 59:
|
1475 mike 1.3 YY_RULE_SETUP
|
1476 kumpf 1.33 #line 219 "cimmof.l"
|
1477 mike 1.3 {
|
1478 karl 1.29 return(TOK_DISABLEOVERRIDE); }
|
1479 kumpf 1.31 YY_BREAK
|
1480 e.boden 1.21 case 60:
|
1481 mike 1.3 YY_RULE_SETUP
|
1482 kumpf 1.33 #line 221 "cimmof.l"
|
1483 karl 1.29 { return(TOK_RESTRICTED); }
|
1484 kumpf 1.31 YY_BREAK
|
1485 e.boden 1.21 case 61:
|
1486 mike 1.3 YY_RULE_SETUP
|
1487 kumpf 1.33 #line 222 "cimmof.l"
|
1488 karl 1.29 { return(TOK_TOSUBCLASS); }
|
1489 kumpf 1.31 YY_BREAK
|
1490 e.boden 1.21 case 62:
|
1491 mike 1.3 YY_RULE_SETUP
|
1492 kumpf 1.33 #line 223 "cimmof.l"
|
1493 karl 1.29 { return(TOK_TRANSLATABLE); }
|
1494 kumpf 1.31 YY_BREAK
|
1495 e.boden 1.21 case 63:
|
1496 mike 1.3 YY_RULE_SETUP
|
1497 kumpf 1.33 #line 224 "cimmof.l"
|
1498 kumpf 1.11 { return(TOK_INCLUDE); }
|
1499 kumpf 1.31 YY_BREAK
|
1500 e.boden 1.21 case 64:
1501 YY_RULE_SETUP
|
1502 kumpf 1.33 #line 225 "cimmof.l"
|
1503 karl 1.34 { cimmof_lval.strval = new String(cimmof_text);
|
1504 karl 1.29 return TOK_ALIAS_IDENTIFIER; }
|
1505 kumpf 1.31 YY_BREAK
|
1506 e.boden 1.21 case 65:
1507 YY_RULE_SETUP
|
1508 kumpf 1.33 #line 227 "cimmof.l"
|
1509 karl 1.29 { return TOK_AS; }
|
1510 kumpf 1.31 YY_BREAK
|
1511 e.boden 1.21 case 66:
|
1512 mike 1.3 YY_RULE_SETUP
|
1513 kumpf 1.33 #line 228 "cimmof.l"
|
1514 kumpf 1.11 { return(TOK_DT_STR); }
|
1515 kumpf 1.31 YY_BREAK
|
1516 e.boden 1.21 case 67:
|
1517 mike 1.3 YY_RULE_SETUP
|
1518 kumpf 1.33 #line 229 "cimmof.l"
|
1519 kumpf 1.11 { return(TOK_DT_BOOL); }
|
1520 kumpf 1.31 YY_BREAK
|
1521 e.boden 1.21 case 68:
|
1522 mike 1.3 YY_RULE_SETUP
|
1523 kumpf 1.33 #line 230 "cimmof.l"
|
1524 kumpf 1.11 { return(TOK_DT_DATETIME); }
|
1525 kumpf 1.31 YY_BREAK
|
1526 e.boden 1.21 case 69:
|
1527 mike 1.3 YY_RULE_SETUP
|
1528 kumpf 1.33 #line 231 "cimmof.l"
|
1529 kumpf 1.11 { return(TOK_DT_UINT8); }
|
1530 kumpf 1.31 YY_BREAK
|
1531 e.boden 1.21 case 70:
|
1532 mike 1.3 YY_RULE_SETUP
|
1533 kumpf 1.33 #line 232 "cimmof.l"
|
1534 kumpf 1.11 { return(TOK_DT_UINT16); }
|
1535 kumpf 1.31 YY_BREAK
|
1536 e.boden 1.21 case 71:
|
1537 mike 1.3 YY_RULE_SETUP
|
1538 kumpf 1.33 #line 233 "cimmof.l"
|
1539 kumpf 1.11 { return(TOK_DT_UINT32); }
|
1540 kumpf 1.31 YY_BREAK
|
1541 e.boden 1.21 case 72:
|
1542 mike 1.3 YY_RULE_SETUP
|
1543 kumpf 1.33 #line 234 "cimmof.l"
|
1544 kumpf 1.11 { return(TOK_DT_UINT64); }
|
1545 kumpf 1.31 YY_BREAK
|
1546 e.boden 1.21 case 73:
|
1547 mike 1.3 YY_RULE_SETUP
|
1548 kumpf 1.33 #line 235 "cimmof.l"
|
1549 kumpf 1.11 { return(TOK_DT_SINT8); }
|
1550 kumpf 1.31 YY_BREAK
|
1551 e.boden 1.21 case 74:
|
1552 mike 1.3 YY_RULE_SETUP
|
1553 kumpf 1.33 #line 236 "cimmof.l"
|
1554 kumpf 1.11 { return(TOK_DT_SINT16); }
|
1555 kumpf 1.31 YY_BREAK
|
1556 e.boden 1.21 case 75:
|
1557 mike 1.3 YY_RULE_SETUP
|
1558 kumpf 1.33 #line 237 "cimmof.l"
|
1559 kumpf 1.11 { return(TOK_DT_SINT32); }
|
1560 kumpf 1.31 YY_BREAK
|
1561 e.boden 1.21 case 76:
|
1562 mike 1.3 YY_RULE_SETUP
|
1563 kumpf 1.33 #line 238 "cimmof.l"
|
1564 kumpf 1.11 { return(TOK_DT_SINT64); }
|
1565 kumpf 1.31 YY_BREAK
|
1566 e.boden 1.21 case 77:
|
1567 mike 1.3 YY_RULE_SETUP
|
1568 kumpf 1.33 #line 239 "cimmof.l"
|
1569 kumpf 1.11 { return(TOK_DT_REAL32); }
|
1570 kumpf 1.31 YY_BREAK
|
1571 e.boden 1.21 case 78:
|
1572 mike 1.3 YY_RULE_SETUP
|
1573 kumpf 1.33 #line 240 "cimmof.l"
|
1574 kumpf 1.11 { return(TOK_DT_REAL64); }
|
1575 kumpf 1.31 YY_BREAK
|
1576 e.boden 1.21 case 79:
|
1577 mike 1.3 YY_RULE_SETUP
|
1578 kumpf 1.33 #line 241 "cimmof.l"
|
1579 kumpf 1.11 { return(TOK_DT_CHAR8); }
|
1580 kumpf 1.31 YY_BREAK
|
1581 e.boden 1.21 case 80:
|
1582 mike 1.3 YY_RULE_SETUP
|
1583 kumpf 1.33 #line 242 "cimmof.l"
|
1584 kumpf 1.11 { return(TOK_DT_CHAR16); }
|
1585 kumpf 1.31 YY_BREAK
|
1586 e.boden 1.21 case 81:
|
1587 mike 1.3 YY_RULE_SETUP
|
1588 kumpf 1.33 #line 243 "cimmof.l"
|
1589 karl 1.34 { cimmof_lval.strval = new String(cimmof_text);
|
1590 karl 1.29 return(TOK_SIMPLE_IDENTIFIER); }
|
1591 kumpf 1.31 YY_BREAK
|
1592 e.boden 1.21 case 82:
|
1593 mike 1.3 YY_RULE_SETUP
|
1594 kumpf 1.33 #line 245 "cimmof.l"
|
1595 karl 1.34 { cimmof_lval.strval = new String(cimmof_text);
|
1596 karl 1.29 return(TOK_UNEXPECTED_CHAR); }
|
1597 kumpf 1.31 YY_BREAK
|
1598 e.boden 1.21 case 83:
|
1599 mike 1.3 YY_RULE_SETUP
|
1600 kumpf 1.33 #line 248 "cimmof.l"
|
1601 mike 1.3 ECHO;
|
1602 kumpf 1.31 YY_BREAK
|
1603 dev.meetei 1.37 #line 1601 "cimmof_lex.cpp"
|
1604 mike 1.3
|
1605 kumpf 1.31 case YY_END_OF_BUFFER:
1606 {
1607 /* Amount of text matched not including the EOB char. */
|
1608 karl 1.34 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
|
1609 kumpf 1.31
1610 /* Undo the effects of YY_DO_BEFORE_ACTION. */
|
1611 karl 1.34 *yy_cp = (yy_hold_char);
|
1612 kumpf 1.31 YY_RESTORE_YY_MORE_OFFSET
1613
|
1614 karl 1.34 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
|
1615 kumpf 1.31 {
1616 /* We're scanning a new file or input source. It's
1617 * possible that this happened because the user
|
1618 karl 1.34 * just pointed cimmof_in at a new source and called
1619 * cimmof_lex(). If so, then we have to assure
1620 * consistency between YY_CURRENT_BUFFER and our
|
1621 kumpf 1.31 * globals. Here is the right place to do so, because
1622 * this is the first action (other than possibly a
1623 * back-up) that will match for the new input source.
1624 */
|
1625 karl 1.34 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1626 YY_CURRENT_BUFFER_LVALUE->yy_input_file = cimmof_in;
1627 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
|
1628 kumpf 1.31 }
1629
1630 /* Note that here we test for yy_c_buf_p "<=" to the position
1631 * of the first EOB in the buffer, since yy_c_buf_p will
1632 * already have been incremented past the NUL character
1633 * (since all states make transitions on EOB to the
1634 * end-of-buffer state). Contrast this with the test
1635 * in input().
1636 */
|
1637 karl 1.34 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
|
1638 kumpf 1.31 { /* This was really a NUL. */
1639 yy_state_type yy_next_state;
1640
|
1641 karl 1.34 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
|
1642 kumpf 1.31
|
1643 karl 1.34 yy_current_state = yy_get_previous_state( );
|
1644 kumpf 1.31
1645 /* Okay, we're now positioned to make the NUL
1646 * transition. We couldn't have
1647 * yy_get_previous_state() go ahead and do it
1648 * for us because it doesn't know how to deal
1649 * with the possibility of jamming (and we don't
1650 * want to build jamming into it because then it
1651 * will run more slowly).
1652 */
1653
1654 yy_next_state = yy_try_NUL_trans( yy_current_state );
1655
|
1656 karl 1.34 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
|
1657 kumpf 1.31
1658 if ( yy_next_state )
1659 {
1660 /* Consume the NUL. */
|
1661 karl 1.34 yy_cp = ++(yy_c_buf_p);
|
1662 kumpf 1.31 yy_current_state = yy_next_state;
1663 goto yy_match;
1664 }
1665
1666 else
1667 {
|
1668 karl 1.34 yy_cp = (yy_last_accepting_cpos);
1669 yy_current_state = (yy_last_accepting_state);
|
1670 kumpf 1.31 goto yy_find_action;
1671 }
1672 }
1673
|
1674 karl 1.34 else switch ( yy_get_next_buffer( ) )
|
1675 kumpf 1.31 {
1676 case EOB_ACT_END_OF_FILE:
1677 {
|
1678 karl 1.34 (yy_did_buffer_switch_on_eof) = 0;
|
1679 kumpf 1.31
|
1680 karl 1.34 if ( cimmof_wrap( ) )
|
1681 kumpf 1.31 {
1682 /* Note: because we've taken care in
1683 * yy_get_next_buffer() to have set up
|
1684 karl 1.34 * cimmof_text, we can now set up
|
1685 kumpf 1.31 * yy_c_buf_p so that if some total
1686 * hoser (like flex itself) wants to
1687 * call the scanner after we return the
1688 * YY_NULL, it'll still work - another
1689 * YY_NULL will get returned.
1690 */
|
1691 karl 1.34 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
|
1692 kumpf 1.31
1693 yy_act = YY_STATE_EOF(YY_START);
1694 goto do_action;
1695 }
1696
1697 else
1698 {
|
1699 karl 1.34 if ( ! (yy_did_buffer_switch_on_eof) )
|
1700 kumpf 1.31 YY_NEW_FILE;
1701 }
1702 break;
1703 }
1704
1705 case EOB_ACT_CONTINUE_SCAN:
|
1706 karl 1.34 (yy_c_buf_p) =
1707 (yytext_ptr) + yy_amount_of_matched_text;
|
1708 kumpf 1.31
|
1709 karl 1.34 yy_current_state = yy_get_previous_state( );
|
1710 kumpf 1.31
|
1711 karl 1.34 yy_cp = (yy_c_buf_p);
1712 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
|
1713 kumpf 1.31 goto yy_match;
1714
1715 case EOB_ACT_LAST_MATCH:
|
1716 karl 1.34 (yy_c_buf_p) =
1717 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
|
1718 kumpf 1.31
|
1719 karl 1.34 yy_current_state = yy_get_previous_state( );
|
1720 kumpf 1.31
|
1721 karl 1.34 yy_cp = (yy_c_buf_p);
1722 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
|
1723 kumpf 1.31 goto yy_find_action;
1724 }
1725 break;
1726 }
1727
1728 default:
1729 YY_FATAL_ERROR(
1730 "fatal flex scanner internal error--no action found" );
1731 } /* end of action switch */
1732 } /* end of scanning one token */
|
1733 karl 1.34 } /* end of cimmof_lex */
|
1734 mike 1.3
1735 /* yy_get_next_buffer - try to read in a new buffer
1736 *
1737 * Returns a code representing an action:
|
1738 kumpf 1.31 * EOB_ACT_LAST_MATCH -
1739 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1740 * EOB_ACT_END_OF_FILE - end of file
|
1741 mike 1.3 */
|
1742 karl 1.34 static int yy_get_next_buffer (void)
1743 {
1744 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1745 register char *source = (yytext_ptr);
|
1746 kumpf 1.31 register int number_to_move, i;
1747 int ret_val;
1748
|
1749 karl 1.34 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
|
1750 kumpf 1.31 YY_FATAL_ERROR(
1751 "fatal flex scanner internal error--end of buffer missed" );
1752
|
1753 karl 1.34 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
|
1754 kumpf 1.31 { /* Don't try to fill the buffer, so this is an EOF. */
|
1755 karl 1.34 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
|
1756 kumpf 1.31 {
1757 /* We matched a single character, the EOB, so
1758 * treat this as a final EOF.
1759 */
1760 return EOB_ACT_END_OF_FILE;
1761 }
1762
1763 else
1764 {
1765 /* We matched some text prior to the EOB, first
1766 * process it.
1767 */
1768 return EOB_ACT_LAST_MATCH;
1769 }
1770 }
1771
1772 /* Try to read more data. */
1773
1774 /* First move last chars to start of buffer. */
|
1775 karl 1.34 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
|
1776 kumpf 1.31
1777 for ( i = 0; i < number_to_move; ++i )
1778 *(dest++) = *(source++);
1779
|
1780 karl 1.34 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
|
1781 kumpf 1.31 /* don't do the read, it's not guaranteed to return an EOF,
1782 * just force an EOF
1783 */
|
1784 karl 1.34 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
|
1785 kumpf 1.31
1786 else
1787 {
|
1788 karl 1.34 int num_to_read =
1789 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
|
1790 mike 1.3
|
1791 kumpf 1.31 while ( num_to_read <= 0 )
1792 { /* Not enough room in the buffer - grow it. */
|
1793 mike 1.3
|
1794 kumpf 1.31 /* just a shorter name for the current buffer */
|
1795 karl 1.34 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
|
1796 mike 1.3
|
1797 kumpf 1.31 int yy_c_buf_p_offset =
|
1798 karl 1.34 (int) ((yy_c_buf_p) - b->yy_ch_buf);
|
1799 mike 1.3
|
1800 kumpf 1.31 if ( b->yy_is_our_buffer )
1801 {
1802 int new_size = b->yy_buf_size * 2;
1803
1804 if ( new_size <= 0 )
1805 b->yy_buf_size += b->yy_buf_size / 8;
1806 else
1807 b->yy_buf_size *= 2;
1808
1809 b->yy_ch_buf = (char *)
1810 /* Include room in for 2 EOB chars. */
|
1811 karl 1.34 cimmof_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
|
1812 kumpf 1.31 }
1813 else
1814 /* Can't grow it, we don't own it. */
1815 b->yy_ch_buf = 0;
1816
1817 if ( ! b->yy_ch_buf )
1818 YY_FATAL_ERROR(
1819 "fatal error - scanner input buffer overflow" );
1820
|
1821 karl 1.34 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
|
1822 kumpf 1.31
|
1823 karl 1.34 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
|
1824 kumpf 1.31 number_to_move - 1;
|
1825 karl 1.34
|
1826 kumpf 1.31 }
1827
1828 if ( num_to_read > YY_READ_BUF_SIZE )
1829 num_to_read = YY_READ_BUF_SIZE;
1830
1831 /* Read in more data. */
|
1832 karl 1.34 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1833 (yy_n_chars), (size_t) num_to_read );
|
1834 kumpf 1.31
|
1835 karl 1.34 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
|
1836 kumpf 1.31 }
1837
|
1838 karl 1.34 if ( (yy_n_chars) == 0 )
|
1839 kumpf 1.31 {
1840 if ( number_to_move == YY_MORE_ADJ )
1841 {
1842 ret_val = EOB_ACT_END_OF_FILE;
|
1843 karl 1.34 cimmof_restart(cimmof_in );
|
1844 kumpf 1.31 }
1845
1846 else
1847 {
1848 ret_val = EOB_ACT_LAST_MATCH;
|
1849 karl 1.34 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
|
1850 kumpf 1.31 YY_BUFFER_EOF_PENDING;
1851 }
1852 }
1853
1854 else
1855 ret_val = EOB_ACT_CONTINUE_SCAN;
1856
|
1857 karl 1.34 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1858 /* Extend the array by 50%, plus the number we really need. */
1859 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1860 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cimmof_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1861 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1862 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1863 }
1864
1865 (yy_n_chars) += number_to_move;
1866 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1867 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
|
1868 mike 1.3
|
1869 karl 1.34 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
|
1870 mike 1.3
|
1871 kumpf 1.31 return ret_val;
|
1872 karl 1.34 }
|
1873 mike 1.3
1874 /* yy_get_previous_state - get the state just before the EOB char was reached */
1875
|
1876 karl 1.34 static yy_state_type yy_get_previous_state (void)
1877 {
|
1878 kumpf 1.31 register yy_state_type yy_current_state;
1879 register char *yy_cp;
|
1880 dev.meetei 1.37
|
1881 karl 1.34 yy_current_state = (yy_start);
|
1882 kumpf 1.31
|
1883 karl 1.34 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
|
1884 kumpf 1.31 {
1885 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
|
1886 karl 1.34 if ( yy_accept[yy_current_state] )
1887 {
1888 (yy_last_accepting_state) = yy_current_state;
1889 (yy_last_accepting_cpos) = yy_cp;
1890 }
|
1891 kumpf 1.31 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1892 {
1893 yy_current_state = (int) yy_def[yy_current_state];
1894 if ( yy_current_state >= 300 )
1895 yy_c = yy_meta[(unsigned int) yy_c];
1896 }
1897 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1898 }
|
1899 mike 1.3
|
1900 kumpf 1.31 return yy_current_state;
|
1901 karl 1.34 }
|
1902 mike 1.3
1903 /* yy_try_NUL_trans - try to make a transition on the NUL character
1904 *
1905 * synopsis
|
1906 kumpf 1.31 * next_state = yy_try_NUL_trans( current_state );
|
1907 mike 1.3 */
|
1908 karl 1.34 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1909 {
|
1910 kumpf 1.31 register int yy_is_jam;
|
1911 karl 1.34 register char *yy_cp = (yy_c_buf_p);
|
1912 mike 1.3
|
1913 kumpf 1.31 register YY_CHAR yy_c = 1;
|
1914 karl 1.34 if ( yy_accept[yy_current_state] )
1915 {
1916 (yy_last_accepting_state) = yy_current_state;
1917 (yy_last_accepting_cpos) = yy_cp;
1918 }
|
1919 kumpf 1.31 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1920 {
1921 yy_current_state = (int) yy_def[yy_current_state];
1922 if ( yy_current_state >= 300 )
1923 yy_c = yy_meta[(unsigned int) yy_c];
1924 }
1925 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1926 yy_is_jam = (yy_current_state == 299);
|
1927 mike 1.3
|
1928 kumpf 1.31 return yy_is_jam ? 0 : yy_current_state;
|
1929 karl 1.34 }
|
1930 mike 1.3
|
1931 karl 1.34 static void yyunput (int c, register char * yy_bp )
1932 {
1933 register char *yy_cp;
|
1934 dev.meetei 1.37
|
1935 karl 1.34 yy_cp = (yy_c_buf_p);
|
1936 mike 1.3
|
1937 karl 1.34 /* undo effects of setting up cimmof_text */
1938 *yy_cp = (yy_hold_char);
|
1939 mike 1.3
|
1940 karl 1.34 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
|
1941 kumpf 1.31 { /* need to shift things up to make room */
1942 /* +2 for EOB chars. */
|
1943 karl 1.34 register int number_to_move = (yy_n_chars) + 2;
1944 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1945 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
|
1946 kumpf 1.31 register char *source =
|
1947 karl 1.34 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
|
1948 kumpf 1.31
|
1949 karl 1.34 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
|
1950 kumpf 1.31 *--dest = *--source;
1951
1952 yy_cp += (int) (dest - source);
1953 yy_bp += (int) (dest - source);
|
1954 karl 1.34 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1955 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
|
1956 kumpf 1.31
|
1957 karl 1.34 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
|
1958 kumpf 1.31 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1959 }
1960
1961 *--yy_cp = (char) c;
1962
|
1963 karl 1.34 if ( c == '\n' ){
1964 --cimmof_lineno;
1965 }
1966
1967 (yytext_ptr) = yy_bp;
1968 (yy_hold_char) = *yy_cp;
1969 (yy_c_buf_p) = yy_cp;
1970 }
|
1971 mike 1.3
|
1972 karl 1.29 #ifndef YY_NO_INPUT
|
1973 mike 1.3 #ifdef __cplusplus
|
1974 karl 1.34 static int yyinput (void)
|
1975 mike 1.3 #else
|
1976 karl 1.34 static int input (void)
|
1977 mike 1.3 #endif
|
1978 karl 1.34
1979 {
|
1980 kumpf 1.31 int c;
|
1981 dev.meetei 1.37
|
1982 karl 1.34 *(yy_c_buf_p) = (yy_hold_char);
|
1983 mike 1.3
|
1984 karl 1.34 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
|
1985 kumpf 1.31 {
1986 /* yy_c_buf_p now points to the character we want to return.
1987 * If this occurs *before* the EOB characters, then it's a
1988 * valid NUL; if not, then we've hit the end of the buffer.
1989 */
|
1990 karl 1.34 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
|
1991 kumpf 1.31 /* This was really a NUL. */
|
1992 karl 1.34 *(yy_c_buf_p) = '\0';
|
1993 kumpf 1.31
1994 else
1995 { /* need more input */
|
1996 karl 1.34 int offset = (yy_c_buf_p) - (yytext_ptr);
1997 ++(yy_c_buf_p);
|
1998 kumpf 1.31
|
1999 karl 1.34 switch ( yy_get_next_buffer( ) )
|
2000 kumpf 1.31 {
2001 case EOB_ACT_LAST_MATCH:
2002 /* This happens because yy_g_n_b()
2003 * sees that we've accumulated a
2004 * token and flags that we need to
2005 * try matching the token before
2006 * proceeding. But for input(),
2007 * there's no matching to consider.
2008 * So convert the EOB_ACT_LAST_MATCH
2009 * to EOB_ACT_END_OF_FILE.
2010 */
2011
2012 /* Reset buffer status. */
|
2013 karl 1.34 cimmof_restart(cimmof_in );
|
2014 kumpf 1.31
|
2015 karl 1.34 /*FALLTHROUGH*/
|
2016 kumpf 1.31
2017 case EOB_ACT_END_OF_FILE:
2018 {
|
2019 karl 1.34 if ( cimmof_wrap( ) )
|
2020 kumpf 1.31 return EOF;
|
2021 mike 1.3
|
2022 karl 1.34 if ( ! (yy_did_buffer_switch_on_eof) )
|
2023 kumpf 1.31 YY_NEW_FILE;
|
2024 mike 1.3 #ifdef __cplusplus
|
2025 kumpf 1.31 return yyinput();
|
2026 mike 1.3 #else
|
2027 kumpf 1.31 return input();
|
2028 mike 1.3 #endif
|
2029 kumpf 1.31 }
|
2030 mike 1.3
|
2031 kumpf 1.31 case EOB_ACT_CONTINUE_SCAN:
|
2032 karl 1.34 (yy_c_buf_p) = (yytext_ptr) + offset;
|
2033 kumpf 1.31 break;
2034 }
2035 }
2036 }
|
2037 mike 1.3
|
2038 karl 1.34 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2039 *(yy_c_buf_p) = '\0'; /* preserve cimmof_text */
2040 (yy_hold_char) = *++(yy_c_buf_p);
|
2041 mike 1.3
|
2042 kumpf 1.31 if ( c == '\n' )
|
2043 dev.meetei 1.37
|
2044 karl 1.34 cimmof_lineno++;
2045 ;
|
2046 jim.wunderlich 1.26
|
2047 kumpf 1.31 return c;
|
2048 karl 1.34 }
2049 #endif /* ifndef YY_NO_INPUT */
|
2050 mike 1.3
|
2051 karl 1.34 /** Immediately switch to a different input stream.
2052 * @param input_file A readable stream.
|
2053 dev.meetei 1.37 *
|
2054 karl 1.34 * @note This function does not reset the start condition to @c INITIAL .
2055 */
2056 void cimmof_restart (FILE * input_file )
2057 {
|
2058 dev.meetei 1.37
|
2059 karl 1.34 if ( ! YY_CURRENT_BUFFER ){
2060 cimmof_ensure_buffer_stack ();
2061 YY_CURRENT_BUFFER_LVALUE =
2062 cimmof__create_buffer(cimmof_in,YY_BUF_SIZE );
|
2063 kumpf 1.31 }
|
2064 mike 1.3
|
2065 karl 1.34 cimmof__init_buffer(YY_CURRENT_BUFFER,input_file );
2066 cimmof__load_buffer_state( );
2067 }
|
2068 mike 1.3
|
2069 karl 1.34 /** Switch to a different input buffer.
2070 * @param new_buffer The new input buffer.
|
2071 dev.meetei 1.37 *
|
2072 karl 1.34 */
2073 void cimmof__switch_to_buffer (YY_BUFFER_STATE new_buffer )
2074 {
|
2075 dev.meetei 1.37
|
2076 karl 1.34 /* TODO. We should be able to replace this entire function body
2077 * with
2078 * cimmof_pop_buffer_state();
2079 * cimmof_push_buffer_state(new_buffer);
2080 */
2081 cimmof_ensure_buffer_stack ();
2082 if ( YY_CURRENT_BUFFER == new_buffer )
|
2083 kumpf 1.31 return;
2084
|
2085 karl 1.34 if ( YY_CURRENT_BUFFER )
|
2086 kumpf 1.31 {
2087 /* Flush out information for old buffer. */
|
2088 karl 1.34 *(yy_c_buf_p) = (yy_hold_char);
2089 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2090 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
|
2091 kumpf 1.31 }
2092
|
2093 karl 1.34 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2094 cimmof__load_buffer_state( );
|
2095 kumpf 1.31
2096 /* We don't actually know whether we did this switch during
|
2097 karl 1.34 * EOF (cimmof_wrap()) processing, but the only time this flag
2098 * is looked at is after cimmof_wrap() is called, so it's safe
|
2099 kumpf 1.31 * to go ahead and always set it.
2100 */
|
2101 karl 1.34 (yy_did_buffer_switch_on_eof) = 1;
2102 }
|
2103 mike 1.3
|
2104 karl 1.34 static void cimmof__load_buffer_state (void)
2105 {
2106 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2107 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2108 cimmof_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2109 (yy_hold_char) = *(yy_c_buf_p);
2110 }
|
2111 mike 1.3
|
2112 karl 1.34 /** Allocate and initialize an input buffer state.
2113 * @param file A readable stream.
2114 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
|
2115 dev.meetei 1.37 *
|
2116 karl 1.34 * @return the allocated buffer state.
2117 */
2118 YY_BUFFER_STATE cimmof__create_buffer (FILE * file, int size )
2119 {
|
2120 kumpf 1.31 YY_BUFFER_STATE b;
|
2121 dev.meetei 1.37
|
2122 karl 1.34 b = (YY_BUFFER_STATE) cimmof_alloc(sizeof( struct yy_buffer_state ) );
|
2123 kumpf 1.31 if ( ! b )
|
2124 karl 1.34 YY_FATAL_ERROR( "out of dynamic memory in cimmof__create_buffer()" );
|
2125 mike 1.3
|
2126 kumpf 1.31 b->yy_buf_size = size;
|
2127 mike 1.3
|
2128 kumpf 1.31 /* yy_ch_buf has to be 2 characters longer than the size given because
2129 * we need to put in 2 end-of-buffer characters.
2130 */
|
2131 karl 1.34 b->yy_ch_buf = (char *) cimmof_alloc(b->yy_buf_size + 2 );
|
2132 kumpf 1.31 if ( ! b->yy_ch_buf )
|
2133 karl 1.34 YY_FATAL_ERROR( "out of dynamic memory in cimmof__create_buffer()" );
|
2134 mike 1.3
|
2135 kumpf 1.31 b->yy_is_our_buffer = 1;
|
2136 mike 1.3
|
2137 karl 1.34 cimmof__init_buffer(b,file );
|
2138 mike 1.3
|
2139 kumpf 1.31 return b;
|
2140 karl 1.34 }
|
2141 mike 1.3
|
2142 karl 1.34 /** Destroy the buffer.
2143 * @param b a buffer created with cimmof__create_buffer()
|
2144 dev.meetei 1.37 *
|
2145 karl 1.34 */
2146 void cimmof__delete_buffer (YY_BUFFER_STATE b )
2147 {
|
2148 dev.meetei 1.37
|
2149 kumpf 1.31 if ( ! b )
2150 return;
|
2151 mike 1.3
|
2152 karl 1.34 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2153 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
|
2154 mike 1.3
|
2155 kumpf 1.31 if ( b->yy_is_our_buffer )
|
2156 karl 1.34 cimmof_free((void *) b->yy_ch_buf );
|
2157 mike 1.3
|
2158 karl 1.34 cimmof_free((void *) b );
2159 }
|
2160 mike 1.3
|
2161 karl 1.34 /* Initializes or reinitializes a buffer.
2162 * This function is sometimes called more than once on the same buffer,
2163 * such as during a cimmof_restart() or at EOF.
2164 */
2165 static void cimmof__init_buffer (YY_BUFFER_STATE b, FILE * file )
|
2166 mike 1.3
|
2167 karl 1.34 {
2168 int oerrno = errno;
|
2169 dev.meetei 1.37
|
2170 karl 1.34 cimmof__flush_buffer(b );
|
2171 mike 1.3
|
2172 kumpf 1.31 b->yy_input_file = file;
2173 b->yy_fill_buffer = 1;
|
2174 mike 1.3
|
2175 karl 1.34 /* If b is the current buffer, then cimmof__init_buffer was _probably_
2176 * called from cimmof_restart() or through yy_get_next_buffer.
2177 * In that case, we don't want to reset the lineno or column.
2178 */
2179 if (b != YY_CURRENT_BUFFER){
2180 b->yy_bs_lineno = 1;
2181 b->yy_bs_column = 0;
2182 }
2183
2184 b->yy_is_interactive = 0;
|
2185 dev.meetei 1.37
|
2186 karl 1.34 errno = oerrno;
2187 }
|
2188 mike 1.3
|
2189 karl 1.34 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2190 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
|
2191 dev.meetei 1.37 *
|
2192 karl 1.34 */
2193 void cimmof__flush_buffer (YY_BUFFER_STATE b )
2194 {
2195 if ( ! b )
|
2196 kumpf 1.31 return;
2197
2198 b->yy_n_chars = 0;
2199
2200 /* We always need two end-of-buffer characters. The first causes
2201 * a transition to the end-of-buffer state. The second causes
2202 * a jam in that state.
2203 */
2204 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2205 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2206
2207 b->yy_buf_pos = &b->yy_ch_buf[0];
2208
2209 b->yy_at_bol = 1;
2210 b->yy_buffer_status = YY_BUFFER_NEW;
2211
|
2212 karl 1.34 if ( b == YY_CURRENT_BUFFER )
2213 cimmof__load_buffer_state( );
2214 }
2215
2216 /** Pushes the new state onto the stack. The new state becomes
2217 * the current state. This function will allocate the stack
2218 * if necessary.
2219 * @param new_buffer The new state.
|
2220 dev.meetei 1.37 *
|
2221 karl 1.34 */
2222 void cimmof_push_buffer_state (YY_BUFFER_STATE new_buffer )
2223 {
2224 if (new_buffer == NULL)
2225 return;
2226
2227 cimmof_ensure_buffer_stack();
2228
2229 /* This block is copied from cimmof__switch_to_buffer. */
2230 if ( YY_CURRENT_BUFFER )
2231 {
2232 /* Flush out information for old buffer. */
2233 *(yy_c_buf_p) = (yy_hold_char);
2234 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2235 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2236 }
2237
2238 /* Only push if top exists. Otherwise, replace top. */
2239 if (YY_CURRENT_BUFFER)
2240 (yy_buffer_stack_top)++;
2241 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2242 karl 1.34
2243 /* copied from cimmof__switch_to_buffer. */
2244 cimmof__load_buffer_state( );
2245 (yy_did_buffer_switch_on_eof) = 1;
2246 }
2247
2248 /** Removes and deletes the top of the stack, if present.
2249 * The next element becomes the new top.
|
2250 dev.meetei 1.37 *
|
2251 karl 1.34 */
2252 void cimmof_pop_buffer_state (void)
2253 {
2254 if (!YY_CURRENT_BUFFER)
2255 return;
2256
2257 cimmof__delete_buffer(YY_CURRENT_BUFFER );
2258 YY_CURRENT_BUFFER_LVALUE = NULL;
2259 if ((yy_buffer_stack_top) > 0)
2260 --(yy_buffer_stack_top);
2261
2262 if (YY_CURRENT_BUFFER) {
2263 cimmof__load_buffer_state( );
2264 (yy_did_buffer_switch_on_eof) = 1;
|
2265 kumpf 1.31 }
|
2266 karl 1.34 }
|
2267 mike 1.3
|
2268 karl 1.34 /* Allocates the stack if it does not exist.
2269 * Guarantees space for at least one push.
2270 */
2271 static void cimmof_ensure_buffer_stack (void)
2272 {
2273 int num_to_alloc;
|
2274 dev.meetei 1.37
|
2275 karl 1.34 if (!(yy_buffer_stack)) {
2276
2277 /* First allocation is just for 2 elements, since we don't know if this
2278 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2279 * immediate realloc on the next call.
2280 */
2281 num_to_alloc = 1;
2282 (yy_buffer_stack) = (struct yy_buffer_state**)cimmof_alloc
2283 (num_to_alloc * sizeof(struct yy_buffer_state*)
2284 );
2285 if ( ! (yy_buffer_stack) )
2286 YY_FATAL_ERROR( "out of dynamic memory in cimmof_ensure_buffer_stack()" );
|
2287 dev.meetei 1.37
|
2288 karl 1.34 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2289
2290 (yy_buffer_stack_max) = num_to_alloc;
2291 (yy_buffer_stack_top) = 0;
2292 return;
2293 }
2294
2295 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2296
2297 /* Increase the buffer to prepare for a possible push. */
2298 int grow_size = 8 /* arbitrary grow size */;
2299
2300 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2301 (yy_buffer_stack) = (struct yy_buffer_state**)cimmof_realloc
2302 ((yy_buffer_stack),
2303 num_to_alloc * sizeof(struct yy_buffer_state*)
2304 );
2305 if ( ! (yy_buffer_stack) )
2306 YY_FATAL_ERROR( "out of dynamic memory in cimmof_ensure_buffer_stack()" );
2307
2308 /* zero only the new slots.*/
2309 karl 1.34 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2310 (yy_buffer_stack_max) = num_to_alloc;
2311 }
2312 }
|
2313 mike 1.3
|
2314 karl 1.34 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2315 * @param base the character buffer
2316 * @param size the size in bytes of the character buffer
|
2317 dev.meetei 1.37 *
2318 * @return the newly allocated buffer state object.
|
2319 karl 1.34 */
2320 YY_BUFFER_STATE cimmof__scan_buffer (char * base, yy_size_t size )
2321 {
|
2322 kumpf 1.31 YY_BUFFER_STATE b;
|
2323 dev.meetei 1.37
|
2324 kumpf 1.31 if ( size < 2 ||
2325 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2326 base[size-1] != YY_END_OF_BUFFER_CHAR )
2327 /* They forgot to leave room for the EOB's. */
2328 return 0;
2329
|
2330 karl 1.34 b = (YY_BUFFER_STATE) cimmof_alloc(sizeof( struct yy_buffer_state ) );
|
2331 kumpf 1.31 if ( ! b )
|
2332 karl 1.34 YY_FATAL_ERROR( "out of dynamic memory in cimmof__scan_buffer()" );
|
2333 kumpf 1.31
2334 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2335 b->yy_buf_pos = b->yy_ch_buf = base;
2336 b->yy_is_our_buffer = 0;
2337 b->yy_input_file = 0;
2338 b->yy_n_chars = b->yy_buf_size;
2339 b->yy_is_interactive = 0;
2340 b->yy_at_bol = 1;
2341 b->yy_fill_buffer = 0;
2342 b->yy_buffer_status = YY_BUFFER_NEW;
|
2343 mike 1.3
|
2344 karl 1.34 cimmof__switch_to_buffer(b );
|
2345 mike 1.3
|
2346 kumpf 1.31 return b;
|
2347 karl 1.34 }
|
2348 mike 1.3
|
2349 karl 1.34 /** Setup the input buffer state to scan a string. The next call to cimmof_lex() will
2350 * scan from a @e copy of @a str.
2351 * @param yystr a NUL-terminated string to scan
|
2352 dev.meetei 1.37 *
|
2353 karl 1.34 * @return the newly allocated buffer state object.
2354 * @note If you want to scan bytes that may contain NUL values, then use
2355 * cimmof__scan_bytes() instead.
2356 */
2357 YY_BUFFER_STATE cimmof__scan_string (yyconst char * yystr )
2358 {
|
2359 dev.meetei 1.37
|
2360 karl 1.34 return cimmof__scan_bytes(yystr,strlen(yystr) );
2361 }
|
2362 mike 1.3
|
2363 karl 1.34 /** Setup the input buffer state to scan the given bytes. The next call to cimmof_lex() will
2364 * scan from a @e copy of @a bytes.
|
2365 dev.meetei 1.37 * @param bytes the byte buffer to scan
2366 * @param len the number of bytes in the buffer pointed to by @a bytes.
2367 *
|
2368 karl 1.34 * @return the newly allocated buffer state object.
2369 */
2370 YY_BUFFER_STATE cimmof__scan_bytes (yyconst char * yybytes, int _yybytes_len )
2371 {
|
2372 kumpf 1.31 YY_BUFFER_STATE b;
2373 char *buf;
2374 yy_size_t n;
2375 int i;
|
2376 dev.meetei 1.37
|
2377 kumpf 1.31 /* Get memory for full buffer, including space for trailing EOB's. */
|
2378 karl 1.34 n = _yybytes_len + 2;
2379 buf = (char *) cimmof_alloc(n );
|
2380 kumpf 1.31 if ( ! buf )
|
2381 karl 1.34 YY_FATAL_ERROR( "out of dynamic memory in cimmof__scan_bytes()" );
|
2382 kumpf 1.31
|
2383 karl 1.34 for ( i = 0; i < _yybytes_len; ++i )
2384 buf[i] = yybytes[i];
|
2385 kumpf 1.31
|
2386 karl 1.34 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
|
2387 kumpf 1.31
|
2388 karl 1.34 b = cimmof__scan_buffer(buf,n );
|
2389 kumpf 1.31 if ( ! b )
|
2390 karl 1.34 YY_FATAL_ERROR( "bad buffer in cimmof__scan_bytes()" );
|
2391 kumpf 1.31
2392 /* It's okay to grow etc. this buffer, and we should throw it
2393 * away when we're done.
2394 */
2395 b->yy_is_our_buffer = 1;
|
2396 mike 1.3
|
2397 kumpf 1.31 return b;
|
2398 karl 1.34 }
|
2399 mike 1.3
|
2400 karl 1.34 static void yy_push_state (int new_state )
2401 {
2402 if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
|
2403 kumpf 1.31 {
2404 yy_size_t new_size;
2405
|
2406 karl 1.34 (yy_start_stack_depth) += YY_START_STACK_INCR;
2407 new_size = (yy_start_stack_depth) * sizeof( int );
|
2408 kumpf 1.31
|
2409 karl 1.34 if ( ! (yy_start_stack) )
2410 (yy_start_stack) = (int *) cimmof_alloc(new_size );
|
2411 kumpf 1.31
2412 else
|
2413 karl 1.34 (yy_start_stack) = (int *) cimmof_realloc((void *) (yy_start_stack),new_size );
|
2414 kumpf 1.31
|
2415 karl 1.34 if ( ! (yy_start_stack) )
2416 YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
|
2417 kumpf 1.31 }
|
2418 mike 1.3
|
2419 karl 1.34 (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
|
2420 mike 1.3
|
2421 kumpf 1.31 BEGIN(new_state);
|
2422 karl 1.34 }
|
2423 mike 1.3
|
2424 karl 1.34 static void yy_pop_state (void)
2425 {
2426 if ( --(yy_start_stack_ptr) < 0 )
|
2427 kumpf 1.31 YY_FATAL_ERROR( "start-condition stack underflow" );
|
2428 mike 1.3
|
2429 karl 1.34 BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
2430 }
|
2431 mike 1.3
|
2432 karl 1.34 static int yy_top_state (void)
2433 {
2434 return (yy_start_stack)[(yy_start_stack_ptr) - 1];
2435 }
|
2436 mike 1.3
2437 #ifndef YY_EXIT_FAILURE
2438 #define YY_EXIT_FAILURE 2
2439 #endif
2440
|
2441 karl 1.34 static void yy_fatal_error (yyconst char* msg )
2442 {
2443 (void) fprintf( stderr, "%s\n", msg );
|
2444 kumpf 1.31 exit( YY_EXIT_FAILURE );
|
2445 karl 1.34 }
|
2446 mike 1.3
2447 /* Redefine yyless() so it works in section 3 code. */
2448
2449 #undef yyless
2450 #define yyless(n) \
|
2451 kumpf 1.31 do \
2452 { \
|
2453 karl 1.34 /* Undo effects of setting up cimmof_text. */ \
2454 int yyless_macro_arg = (n); \
2455 YY_LESS_LINENO(yyless_macro_arg);\
2456 cimmof_text[cimmof_leng] = (yy_hold_char); \
2457 (yy_c_buf_p) = cimmof_text + yyless_macro_arg; \
2458 (yy_hold_char) = *(yy_c_buf_p); \
2459 *(yy_c_buf_p) = '\0'; \
2460 cimmof_leng = yyless_macro_arg; \
|
2461 kumpf 1.31 } \
2462 while ( 0 )
|
2463 mike 1.3
|
2464 karl 1.34 /* Accessor methods (get/set functions) to struct members. */
2465
2466 /** Get the current line number.
|
2467 dev.meetei 1.37 *
|
2468 karl 1.34 */
2469 int cimmof_get_lineno (void)
2470 {
|
2471 dev.meetei 1.37
|
2472 karl 1.34 return cimmof_lineno;
2473 }
2474
2475 /** Get the input stream.
|
2476 dev.meetei 1.37 *
|
2477 karl 1.34 */
2478 FILE *cimmof_get_in (void)
2479 {
2480 return cimmof_in;
2481 }
2482
2483 /** Get the output stream.
|
2484 dev.meetei 1.37 *
|
2485 karl 1.34 */
2486 FILE *cimmof_get_out (void)
2487 {
2488 return cimmof_out;
2489 }
2490
2491 /** Get the length of the current token.
|
2492 dev.meetei 1.37 *
|
2493 karl 1.34 */
2494 int cimmof_get_leng (void)
2495 {
2496 return cimmof_leng;
2497 }
2498
2499 /** Get the current token.
|
2500 dev.meetei 1.37 *
|
2501 karl 1.34 */
2502
2503 char *cimmof_get_text (void)
2504 {
2505 return cimmof_text;
2506 }
|
2507 mike 1.3
|
2508 karl 1.34 /** Set the current line number.
2509 * @param line_number
|
2510 dev.meetei 1.37 *
|
2511 karl 1.34 */
2512 void cimmof_set_lineno (int line_number )
2513 {
|
2514 dev.meetei 1.37
|
2515 karl 1.34 cimmof_lineno = line_number;
2516 }
2517
2518 /** Set the input stream. This does not discard the current
2519 * input buffer.
2520 * @param in_str A readable stream.
|
2521 dev.meetei 1.37 *
|
2522 karl 1.34 * @see cimmof__switch_to_buffer
2523 */
2524 void cimmof_set_in (FILE * in_str )
2525 {
2526 cimmof_in = in_str ;
2527 }
2528
2529 void cimmof_set_out (FILE * out_str )
2530 {
2531 cimmof_out = out_str ;
2532 }
2533
2534 int cimmof_get_debug (void)
2535 {
2536 return cimmof__flex_debug;
2537 }
2538
2539 void cimmof_set_debug (int bdebug )
2540 {
2541 cimmof__flex_debug = bdebug ;
2542 }
2543 karl 1.34
2544 static int yy_init_globals (void)
2545 {
2546 /* Initialization is the same as for the non-reentrant scanner.
2547 * This function is called from cimmof_lex_destroy(), so don't allocate here.
2548 */
2549
2550 /* We do not touch cimmof_lineno unless the option is enabled. */
2551 cimmof_lineno = 1;
|
2552 dev.meetei 1.37
|
2553 karl 1.34 (yy_buffer_stack) = 0;
2554 (yy_buffer_stack_top) = 0;
2555 (yy_buffer_stack_max) = 0;
2556 (yy_c_buf_p) = (char *) 0;
2557 (yy_init) = 0;
2558 (yy_start) = 0;
2559
2560 (yy_start_stack_ptr) = 0;
2561 (yy_start_stack_depth) = 0;
2562 (yy_start_stack) = NULL;
2563
2564 /* Defined in main.c */
2565 #ifdef YY_STDINIT
2566 cimmof_in = stdin;
2567 cimmof_out = stdout;
2568 #else
2569 cimmof_in = (FILE *) 0;
2570 cimmof_out = (FILE *) 0;
2571 #endif
2572
2573 /* For future reference: Set errno on error, since we are called by
2574 karl 1.34 * cimmof_lex_init()
2575 */
2576 return 0;
2577 }
2578
2579 /* cimmof_lex_destroy is for both reentrant and non-reentrant scanners. */
2580 int cimmof_lex_destroy (void)
2581 {
|
2582 dev.meetei 1.37
|
2583 karl 1.34 /* Pop the buffer stack, destroying each element. */
2584 while(YY_CURRENT_BUFFER){
2585 cimmof__delete_buffer(YY_CURRENT_BUFFER );
2586 YY_CURRENT_BUFFER_LVALUE = NULL;
2587 cimmof_pop_buffer_state();
2588 }
2589
2590 /* Destroy the stack itself. */
2591 cimmof_free((yy_buffer_stack) );
2592 (yy_buffer_stack) = NULL;
2593
2594 /* Destroy the start condition stack. */
2595 cimmof_free((yy_start_stack) );
2596 (yy_start_stack) = NULL;
2597
2598 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2599 * cimmof_lex() is called, initialization will occur. */
2600 yy_init_globals( );
2601
2602 return 0;
2603 }
2604 karl 1.34
2605 /*
2606 * Internal utility routines.
2607 */
|
2608 mike 1.3
2609 #ifndef yytext_ptr
|
2610 karl 1.34 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2611 {
|
2612 kumpf 1.31 register int i;
2613 for ( i = 0; i < n; ++i )
2614 s1[i] = s2[i];
|
2615 karl 1.34 }
|
2616 mike 1.3 #endif
2617
2618 #ifdef YY_NEED_STRLEN
|
2619 karl 1.34 static int yy_flex_strlen (yyconst char * s )
2620 {
|
2621 kumpf 1.31 register int n;
2622 for ( n = 0; s[n]; ++n )
2623 ;
|
2624 mike 1.3
|
2625 kumpf 1.31 return n;
|
2626 karl 1.34 }
|
2627 mike 1.3 #endif
2628
|
2629 karl 1.34 void *cimmof_alloc (yy_size_t size )
2630 {
|
2631 kumpf 1.31 return (void *) malloc( size );
|
2632 karl 1.34 }
|
2633 mike 1.3
|
2634 karl 1.34 void *cimmof_realloc (void * ptr, yy_size_t size )
2635 {
|
2636 kumpf 1.31 /* The cast to (char *) in the following accommodates both
2637 * implementations that use char* generic pointers, and those
2638 * that use void* generic pointers. It works with the latter
2639 * because both ANSI C and C++ allow castless assignment from
2640 * any pointer type to void*, and deal with argument conversions
2641 * as though doing an assignment.
2642 */
2643 return (void *) realloc( (char *) ptr, size );
|
2644 karl 1.34 }
2645
2646 void cimmof_free (void * ptr )
2647 {
2648 free( (char *) ptr ); /* see cimmof_realloc() for (char *) cast */
2649 }
|
2650 mike 1.3
|
2651 karl 1.34 #define YYTABLES_NAME "yytables"
|
2652 mike 1.3
|
2653 kumpf 1.33 #line 248 "cimmof.l"
|
2654 mike 1.3
2655
|
2656 karl 1.34
|
2657 e.boden 1.21 void cimmof_yy_less(int n) { yyless(n); }
|
2658 karl 1.34
|