1 | /* A lexical scanner generated by flex */ |
---|
2 | |
---|
3 | /* Scanner skeleton version: |
---|
4 | * $Header: /afs/dev.mit.edu/source/repository/third/libIDL/lexer.c,v 1.1.1.1 2002-12-26 17:10:45 ghudson Exp $ |
---|
5 | */ |
---|
6 | |
---|
7 | #define FLEX_SCANNER |
---|
8 | #define YY_FLEX_MAJOR_VERSION 2 |
---|
9 | #define YY_FLEX_MINOR_VERSION 5 |
---|
10 | |
---|
11 | #include <stdio.h> |
---|
12 | #include <unistd.h> |
---|
13 | |
---|
14 | |
---|
15 | /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ |
---|
16 | #ifdef c_plusplus |
---|
17 | #ifndef __cplusplus |
---|
18 | #define __cplusplus |
---|
19 | #endif |
---|
20 | #endif |
---|
21 | |
---|
22 | |
---|
23 | #ifdef __cplusplus |
---|
24 | |
---|
25 | #include <stdlib.h> |
---|
26 | |
---|
27 | /* Use prototypes in function declarations. */ |
---|
28 | #define YY_USE_PROTOS |
---|
29 | |
---|
30 | /* The "const" storage-class-modifier is valid. */ |
---|
31 | #define YY_USE_CONST |
---|
32 | |
---|
33 | #else /* ! __cplusplus */ |
---|
34 | |
---|
35 | #if __STDC__ |
---|
36 | |
---|
37 | #define YY_USE_PROTOS |
---|
38 | #define YY_USE_CONST |
---|
39 | |
---|
40 | #endif /* __STDC__ */ |
---|
41 | #endif /* ! __cplusplus */ |
---|
42 | |
---|
43 | #ifdef __TURBOC__ |
---|
44 | #pragma warn -rch |
---|
45 | #pragma warn -use |
---|
46 | #include <io.h> |
---|
47 | #include <stdlib.h> |
---|
48 | #define YY_USE_CONST |
---|
49 | #define YY_USE_PROTOS |
---|
50 | #endif |
---|
51 | |
---|
52 | #ifdef YY_USE_CONST |
---|
53 | #define __IDL_const const |
---|
54 | #else |
---|
55 | #define __IDL_const |
---|
56 | #endif |
---|
57 | |
---|
58 | |
---|
59 | #ifdef YY_USE_PROTOS |
---|
60 | #define YY_PROTO(proto) proto |
---|
61 | #else |
---|
62 | #define YY_PROTO(proto) () |
---|
63 | #endif |
---|
64 | |
---|
65 | /* Returned upon end-of-file. */ |
---|
66 | #define YY_NULL 0 |
---|
67 | |
---|
68 | /* Promotes a possibly negative, possibly signed char to an unsigned |
---|
69 | * integer for use as an array index. If the signed char is negative, |
---|
70 | * we want to instead treat it as an 8-bit unsigned char, hence the |
---|
71 | * double cast. |
---|
72 | */ |
---|
73 | #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) |
---|
74 | |
---|
75 | /* Enter a start condition. This macro really ought to take a parameter, |
---|
76 | * but we do it the disgusting crufty way forced on us by the ()-less |
---|
77 | * definition of BEGIN. |
---|
78 | */ |
---|
79 | #define BEGIN __IDL__start = 1 + 2 * |
---|
80 | |
---|
81 | /* Translate the current start state into a value that can be later handed |
---|
82 | * to BEGIN to return to the state. The YYSTATE alias is for lex |
---|
83 | * compatibility. |
---|
84 | */ |
---|
85 | #define YY_START ((__IDL__start - 1) / 2) |
---|
86 | #define YYSTATE YY_START |
---|
87 | |
---|
88 | /* Action number for EOF rule of a given start state. */ |
---|
89 | #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
---|
90 | |
---|
91 | /* Special action meaning "start processing a new file". */ |
---|
92 | #define YY_NEW_FILE __IDL_restart( __IDL_in ) |
---|
93 | |
---|
94 | #define YY_END_OF_BUFFER_CHAR 0 |
---|
95 | |
---|
96 | /* Size of default input buffer. */ |
---|
97 | #define YY_BUF_SIZE 16384 |
---|
98 | |
---|
99 | typedef struct __IDL__buffer_state *YY_BUFFER_STATE; |
---|
100 | |
---|
101 | extern int __IDL_leng; |
---|
102 | extern FILE *__IDL_in, *__IDL_out; |
---|
103 | |
---|
104 | #define EOB_ACT_CONTINUE_SCAN 0 |
---|
105 | #define EOB_ACT_END_OF_FILE 1 |
---|
106 | #define EOB_ACT_LAST_MATCH 2 |
---|
107 | |
---|
108 | /* The funky do-while in the following #define is used to turn the definition |
---|
109 | * int a single C statement (which needs a semi-colon terminator). This |
---|
110 | * avoids problems with code like: |
---|
111 | * |
---|
112 | * if ( condition_holds ) |
---|
113 | * __IDL_less( 5 ); |
---|
114 | * else |
---|
115 | * do_something_else(); |
---|
116 | * |
---|
117 | * Prior to using the do-while the compiler would get upset at the |
---|
118 | * "else" because it interpreted the "if" statement as being all |
---|
119 | * done when it reached the ';' after the __IDL_less() call. |
---|
120 | */ |
---|
121 | |
---|
122 | /* Return all but the first 'n' matched characters back to the input stream. */ |
---|
123 | |
---|
124 | #define __IDL_less(n) \ |
---|
125 | do \ |
---|
126 | { \ |
---|
127 | /* Undo effects of setting up __IDL_text. */ \ |
---|
128 | *__IDL__cp = __IDL__hold_char; \ |
---|
129 | YY_RESTORE_YY_MORE_OFFSET \ |
---|
130 | __IDL__c_buf_p = __IDL__cp = __IDL__bp + n - YY_MORE_ADJ; \ |
---|
131 | YY_DO_BEFORE_ACTION; /* set up __IDL_text again */ \ |
---|
132 | } \ |
---|
133 | while ( 0 ) |
---|
134 | |
---|
135 | #define unput(c) __IDL_unput( c, __IDL_text_ptr ) |
---|
136 | |
---|
137 | /* The following is because we cannot portably get our hands on size_t |
---|
138 | * (without autoconf's help, which isn't available because we want |
---|
139 | * flex-generated scanners to compile on their own). |
---|
140 | */ |
---|
141 | typedef unsigned int __IDL__size_t; |
---|
142 | |
---|
143 | |
---|
144 | struct __IDL__buffer_state |
---|
145 | { |
---|
146 | FILE *__IDL__input_file; |
---|
147 | |
---|
148 | char *__IDL__ch_buf; /* input buffer */ |
---|
149 | char *__IDL__buf_pos; /* current position in input buffer */ |
---|
150 | |
---|
151 | /* Size of input buffer in bytes, not including room for EOB |
---|
152 | * characters. |
---|
153 | */ |
---|
154 | __IDL__size_t __IDL__buf_size; |
---|
155 | |
---|
156 | /* Number of characters read into __IDL__ch_buf, not including EOB |
---|
157 | * characters. |
---|
158 | */ |
---|
159 | int __IDL__n_chars; |
---|
160 | |
---|
161 | /* Whether we "own" the buffer - i.e., we know we created it, |
---|
162 | * and can realloc() it to grow it, and should free() it to |
---|
163 | * delete it. |
---|
164 | */ |
---|
165 | int __IDL__is_our_buffer; |
---|
166 | |
---|
167 | /* Whether this is an "interactive" input source; if so, and |
---|
168 | * if we're using stdio for input, then we want to use getc() |
---|
169 | * instead of fread(), to make sure we stop fetching input after |
---|
170 | * each newline. |
---|
171 | */ |
---|
172 | int __IDL__is_interactive; |
---|
173 | |
---|
174 | /* Whether we're considered to be at the beginning of a line. |
---|
175 | * If so, '^' rules will be active on the next match, otherwise |
---|
176 | * not. |
---|
177 | */ |
---|
178 | int __IDL__at_bol; |
---|
179 | |
---|
180 | /* Whether to try to fill the input buffer when we reach the |
---|
181 | * end of it. |
---|
182 | */ |
---|
183 | int __IDL__fill_buffer; |
---|
184 | |
---|
185 | int __IDL__buffer_status; |
---|
186 | #define YY_BUFFER_NEW 0 |
---|
187 | #define YY_BUFFER_NORMAL 1 |
---|
188 | /* When an EOF's been seen but there's still some text to process |
---|
189 | * then we mark the buffer as YY_EOF_PENDING, to indicate that we |
---|
190 | * shouldn't try reading from the input source any more. We might |
---|
191 | * still have a bunch of tokens to match, though, because of |
---|
192 | * possible backing-up. |
---|
193 | * |
---|
194 | * When we actually see the EOF, we change the status to "new" |
---|
195 | * (via __IDL_restart()), so that the user can continue scanning by |
---|
196 | * just pointing __IDL_in at a new input file. |
---|
197 | */ |
---|
198 | #define YY_BUFFER_EOF_PENDING 2 |
---|
199 | }; |
---|
200 | |
---|
201 | static YY_BUFFER_STATE __IDL__current_buffer = 0; |
---|
202 | |
---|
203 | /* We provide macros for accessing buffer states in case in the |
---|
204 | * future we want to put the buffer states in a more general |
---|
205 | * "scanner state". |
---|
206 | */ |
---|
207 | #define YY_CURRENT_BUFFER __IDL__current_buffer |
---|
208 | |
---|
209 | |
---|
210 | /* __IDL__hold_char holds the character lost when __IDL_text is formed. */ |
---|
211 | static char __IDL__hold_char; |
---|
212 | |
---|
213 | static int __IDL__n_chars; /* number of characters read into __IDL__ch_buf */ |
---|
214 | |
---|
215 | |
---|
216 | int __IDL_leng; |
---|
217 | |
---|
218 | /* Points to current character in buffer. */ |
---|
219 | static char *__IDL__c_buf_p = (char *) 0; |
---|
220 | static int __IDL__init = 1; /* whether we need to initialize */ |
---|
221 | static int __IDL__start = 0; /* start state number */ |
---|
222 | |
---|
223 | /* Flag which is used to allow __IDL_wrap()'s to do buffer switches |
---|
224 | * instead of setting up a fresh __IDL_in. A bit of a hack ... |
---|
225 | */ |
---|
226 | static int __IDL__did_buffer_switch_on_eof; |
---|
227 | |
---|
228 | void __IDL_restart YY_PROTO(( FILE *input_file )); |
---|
229 | |
---|
230 | void __IDL__switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); |
---|
231 | void __IDL__load_buffer_state YY_PROTO(( void )); |
---|
232 | YY_BUFFER_STATE __IDL__create_buffer YY_PROTO(( FILE *file, int size )); |
---|
233 | void __IDL__delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); |
---|
234 | void __IDL__init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); |
---|
235 | void __IDL__flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); |
---|
236 | #define YY_FLUSH_BUFFER __IDL__flush_buffer( __IDL__current_buffer ) |
---|
237 | |
---|
238 | YY_BUFFER_STATE __IDL__scan_buffer YY_PROTO(( char *base, __IDL__size_t size )); |
---|
239 | YY_BUFFER_STATE __IDL__scan_string YY_PROTO(( __IDL_const char *__IDL__str )); |
---|
240 | YY_BUFFER_STATE __IDL__scan_bytes YY_PROTO(( __IDL_const char *bytes, int len )); |
---|
241 | |
---|
242 | static void *__IDL__flex_alloc YY_PROTO(( __IDL__size_t )); |
---|
243 | static void *__IDL__flex_realloc YY_PROTO(( void *, __IDL__size_t )); |
---|
244 | static void __IDL__flex_free YY_PROTO(( void * )); |
---|
245 | |
---|
246 | #define __IDL__new_buffer __IDL__create_buffer |
---|
247 | |
---|
248 | #define __IDL__set_interactive(is_interactive) \ |
---|
249 | { \ |
---|
250 | if ( ! __IDL__current_buffer ) \ |
---|
251 | __IDL__current_buffer = __IDL__create_buffer( __IDL_in, YY_BUF_SIZE ); \ |
---|
252 | __IDL__current_buffer->__IDL__is_interactive = is_interactive; \ |
---|
253 | } |
---|
254 | |
---|
255 | #define __IDL__set_bol(at_bol) \ |
---|
256 | { \ |
---|
257 | if ( ! __IDL__current_buffer ) \ |
---|
258 | __IDL__current_buffer = __IDL__create_buffer( __IDL_in, YY_BUF_SIZE ); \ |
---|
259 | __IDL__current_buffer->__IDL__at_bol = at_bol; \ |
---|
260 | } |
---|
261 | |
---|
262 | #define YY_AT_BOL() (__IDL__current_buffer->__IDL__at_bol) |
---|
263 | |
---|
264 | typedef unsigned char YY_CHAR; |
---|
265 | FILE *__IDL_in = (FILE *) 0, *__IDL_out = (FILE *) 0; |
---|
266 | typedef int __IDL__state_type; |
---|
267 | extern char *__IDL_text; |
---|
268 | #define __IDL_text_ptr __IDL_text |
---|
269 | |
---|
270 | static __IDL__state_type __IDL__get_previous_state YY_PROTO(( void )); |
---|
271 | static __IDL__state_type __IDL__try_NUL_trans YY_PROTO(( __IDL__state_type current_state )); |
---|
272 | static int __IDL__get_next_buffer YY_PROTO(( void )); |
---|
273 | static void __IDL__fatal_error YY_PROTO(( __IDL_const char msg[] )); |
---|
274 | |
---|
275 | /* Done after the current pattern has been matched and before the |
---|
276 | * corresponding action - sets up __IDL_text. |
---|
277 | */ |
---|
278 | #define YY_DO_BEFORE_ACTION \ |
---|
279 | __IDL_text_ptr = __IDL__bp; \ |
---|
280 | __IDL_leng = (int) (__IDL__cp - __IDL__bp); \ |
---|
281 | __IDL__hold_char = *__IDL__cp; \ |
---|
282 | *__IDL__cp = '\0'; \ |
---|
283 | __IDL__c_buf_p = __IDL__cp; |
---|
284 | |
---|
285 | #define YY_NUM_RULES 68 |
---|
286 | #define YY_END_OF_BUFFER 69 |
---|
287 | static __IDL_const short int __IDL__accept[351] = |
---|
288 | { 0, |
---|
289 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, |
---|
290 | 3, 3, 69, 67, 7, 64, 67, 67, 67, 67, |
---|
291 | 67, 8, 9, 67, 67, 67, 55, 55, 55, 67, |
---|
292 | 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, |
---|
293 | 55, 55, 55, 55, 55, 55, 55, 7, 6, 67, |
---|
294 | 67, 67, 59, 58, 67, 7, 64, 67, 7, 6, |
---|
295 | 3, 3, 3, 3, 3, 3, 7, 0, 63, 0, |
---|
296 | 62, 0, 12, 66, 65, 12, 8, 11, 0, 0, |
---|
297 | 9, 51, 53, 52, 55, 57, 55, 55, 56, 56, |
---|
298 | 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, |
---|
299 | |
---|
300 | 55, 55, 28, 55, 55, 55, 55, 55, 55, 55, |
---|
301 | 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, |
---|
302 | 7, 6, 6, 6, 5, 6, 1, 0, 0, 59, |
---|
303 | 0, 61, 7, 66, 65, 7, 6, 6, 6, 6, |
---|
304 | 5, 6, 3, 3, 3, 3, 3, 3, 3, 3, |
---|
305 | 3, 3, 2, 0, 0, 0, 65, 12, 0, 12, |
---|
306 | 10, 55, 55, 56, 15, 55, 55, 55, 55, 55, |
---|
307 | 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, |
---|
308 | 55, 55, 55, 36, 55, 55, 55, 55, 55, 55, |
---|
309 | 55, 55, 55, 55, 55, 55, 5, 5, 6, 1, |
---|
310 | |
---|
311 | 47, 60, 65, 61, 5, 5, 5, 6, 3, 3, |
---|
312 | 3, 3, 2, 0, 0, 12, 55, 14, 56, 55, |
---|
313 | 55, 18, 19, 55, 55, 55, 55, 24, 55, 55, |
---|
314 | 55, 55, 55, 31, 55, 55, 55, 55, 55, 55, |
---|
315 | 55, 55, 55, 55, 55, 55, 55, 55, 48, 55, |
---|
316 | 55, 6, 6, 3, 13, 56, 55, 55, 20, 55, |
---|
317 | 55, 55, 55, 26, 27, 29, 55, 55, 55, 34, |
---|
318 | 55, 55, 55, 55, 40, 55, 55, 55, 55, 45, |
---|
319 | 55, 49, 55, 6, 6, 3, 56, 55, 55, 55, |
---|
320 | 55, 23, 55, 55, 32, 33, 35, 37, 55, 55, |
---|
321 | |
---|
322 | 41, 42, 43, 55, 55, 55, 6, 6, 3, 56, |
---|
323 | 55, 17, 21, 22, 55, 55, 55, 55, 44, 55, |
---|
324 | 50, 4, 4, 3, 56, 55, 55, 55, 38, 39, |
---|
325 | 46, 4, 4, 4, 4, 4, 3, 3, 56, 16, |
---|
326 | 25, 30, 56, 0, 0, 0, 54, 0, 0, 0 |
---|
327 | } ; |
---|
328 | |
---|
329 | static __IDL_const int __IDL__ec[256] = |
---|
330 | { 0, |
---|
331 | 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, |
---|
332 | 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, |
---|
333 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
334 | 1, 2, 1, 4, 5, 1, 6, 1, 7, 8, |
---|
335 | 9, 10, 1, 1, 11, 12, 13, 14, 15, 15, |
---|
336 | 15, 15, 15, 15, 15, 15, 15, 16, 1, 17, |
---|
337 | 1, 18, 1, 1, 19, 20, 20, 21, 22, 23, |
---|
338 | 24, 24, 24, 24, 24, 25, 24, 24, 24, 24, |
---|
339 | 24, 26, 27, 28, 29, 24, 24, 30, 24, 24, |
---|
340 | 1, 1, 31, 1, 32, 1, 33, 34, 35, 36, |
---|
341 | |
---|
342 | 37, 38, 39, 40, 41, 24, 24, 42, 43, 44, |
---|
343 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
---|
344 | 55, 24, 56, 1, 57, 1, 1, 1, 1, 1, |
---|
345 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
346 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
347 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
348 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
349 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
350 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
351 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
352 | |
---|
353 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
354 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
355 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
356 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
357 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
358 | 1, 1, 1, 1, 1 |
---|
359 | } ; |
---|
360 | |
---|
361 | static __IDL_const int __IDL__meta[58] = |
---|
362 | { 0, |
---|
363 | 1, 2, 3, 1, 1, 1, 1, 1, 4, 1, |
---|
364 | 1, 1, 1, 5, 5, 1, 1, 1, 6, 6, |
---|
365 | 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, |
---|
366 | 1, 8, 6, 6, 6, 6, 6, 6, 7, 7, |
---|
367 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, |
---|
368 | 7, 7, 7, 7, 7, 1, 1 |
---|
369 | } ; |
---|
370 | |
---|
371 | static __IDL_const short int __IDL__base[379] = |
---|
372 | { 0, |
---|
373 | 0, 56, 925, 58, 70, 127, 87, 90, 0, 63, |
---|
374 | 95, 104, 936, 938, 933, 938, 63, 108, 90, 98, |
---|
375 | 81, 173, 134, 918, 916, 914, 899, 128, 88, 898, |
---|
376 | 118, 119, 121, 120, 135, 131, 137, 145, 146, 86, |
---|
377 | 161, 143, 167, 142, 154, 168, 176, 119, 200, 873, |
---|
378 | 204, 0, 0, 938, 919, 114, 918, 213, 219, 227, |
---|
379 | 0, 924, 112, 229, 230, 868, 922, 234, 938, 232, |
---|
380 | 938, 235, 238, 938, 0, 243, 269, 938, 240, 0, |
---|
381 | 273, 938, 938, 938, 891, 0, 208, 234, 0, 886, |
---|
382 | 237, 211, 254, 240, 235, 238, 264, 150, 246, 266, |
---|
383 | |
---|
384 | 261, 268, 271, 275, 272, 279, 280, 285, 282, 286, |
---|
385 | 291, 230, 288, 293, 294, 160, 296, 299, 302, 304, |
---|
386 | 341, 336, 0, 342, 333, 873, 0, 908, 910, 0, |
---|
387 | 909, 938, 350, 908, 346, 356, 360, 357, 369, 0, |
---|
388 | 376, 361, 0, 914, 0, 0, 371, 366, 0, 384, |
---|
389 | 378, 867, 0, 380, 390, 399, 0, 403, 382, 393, |
---|
390 | 0, 395, 345, 877, 881, 355, 387, 391, 388, 399, |
---|
391 | 400, 403, 357, 406, 409, 412, 402, 410, 418, 419, |
---|
392 | 420, 422, 423, 880, 424, 426, 428, 432, 431, 433, |
---|
393 | 434, 436, 437, 452, 442, 445, 0, 471, 878, 0, |
---|
394 | |
---|
395 | 938, 938, 486, 0, 487, 0, 488, 489, 0, 0, |
---|
396 | 485, 877, 0, 490, 492, 494, 488, 877, 873, 480, |
---|
397 | 481, 875, 874, 469, 491, 482, 483, 873, 307, 495, |
---|
398 | 484, 485, 492, 872, 497, 435, 498, 504, 506, 500, |
---|
399 | 509, 510, 512, 515, 517, 519, 521, 522, 871, 525, |
---|
400 | 526, 863, 559, 862, 868, 857, 532, 537, 866, 527, |
---|
401 | 540, 539, 542, 865, 864, 863, 545, 543, 547, 862, |
---|
402 | 531, 546, 553, 555, 861, 557, 556, 561, 568, 860, |
---|
403 | 558, 859, 559, 847, 601, 846, 839, 562, 575, 576, |
---|
404 | 577, 855, 579, 582, 854, 853, 852, 851, 580, 586, |
---|
405 | |
---|
406 | 848, 839, 823, 585, 592, 593, 814, 625, 806, 785, |
---|
407 | 598, 775, 767, 753, 601, 603, 584, 599, 745, 605, |
---|
408 | 737, 740, 640, 731, 644, 608, 615, 618, 647, 646, |
---|
409 | 636, 0, 654, 648, 651, 0, 0, 650, 459, 389, |
---|
410 | 216, 27, 659, 661, 663, 668, 938, 671, 673, 938, |
---|
411 | 682, 690, 698, 706, 714, 718, 722, 730, 738, 742, |
---|
412 | 750, 758, 766, 774, 782, 786, 788, 796, 804, 812, |
---|
413 | 820, 828, 836, 844, 852, 860, 868, 875 |
---|
414 | } ; |
---|
415 | |
---|
416 | static __IDL_const short int __IDL__def[379] = |
---|
417 | { 0, |
---|
418 | 350, 1, 1, 1, 351, 351, 352, 352, 1, 1, |
---|
419 | 353, 353, 350, 350, 350, 350, 354, 355, 350, 350, |
---|
420 | 350, 350, 350, 350, 350, 350, 356, 356, 356, 357, |
---|
421 | 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, |
---|
422 | 356, 356, 356, 356, 356, 356, 356, 350, 358, 350, |
---|
423 | 350, 359, 360, 350, 361, 361, 361, 361, 361, 362, |
---|
424 | 363, 363, 363, 363, 364, 363, 350, 354, 350, 355, |
---|
425 | 350, 350, 350, 350, 365, 350, 350, 350, 350, 366, |
---|
426 | 350, 350, 350, 350, 356, 367, 356, 356, 357, 357, |
---|
427 | 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, |
---|
428 | |
---|
429 | 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, |
---|
430 | 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, |
---|
431 | 350, 358, 358, 358, 368, 358, 369, 350, 359, 360, |
---|
432 | 361, 350, 361, 361, 370, 361, 362, 362, 362, 358, |
---|
433 | 371, 362, 363, 363, 363, 372, 363, 364, 364, 364, |
---|
434 | 373, 364, 374, 350, 350, 350, 365, 350, 350, 350, |
---|
435 | 366, 356, 356, 357, 356, 356, 356, 356, 356, 356, |
---|
436 | 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, |
---|
437 | 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, |
---|
438 | 356, 356, 356, 356, 356, 356, 368, 368, 358, 369, |
---|
439 | |
---|
440 | 350, 350, 370, 365, 371, 368, 371, 362, 372, 373, |
---|
441 | 373, 364, 374, 350, 350, 350, 356, 356, 357, 356, |
---|
442 | 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, |
---|
443 | 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, |
---|
444 | 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, |
---|
445 | 356, 358, 362, 364, 356, 357, 356, 356, 356, 356, |
---|
446 | 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, |
---|
447 | 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, |
---|
448 | 356, 356, 356, 358, 362, 364, 357, 356, 356, 356, |
---|
449 | 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, |
---|
450 | |
---|
451 | 356, 356, 356, 356, 356, 356, 358, 362, 364, 357, |
---|
452 | 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, |
---|
453 | 356, 375, 376, 377, 357, 356, 356, 356, 356, 356, |
---|
454 | 356, 375, 375, 376, 376, 375, 377, 377, 357, 356, |
---|
455 | 356, 356, 357, 350, 378, 378, 350, 378, 350, 0, |
---|
456 | 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, |
---|
457 | 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, |
---|
458 | 350, 350, 350, 350, 350, 350, 350, 350 |
---|
459 | } ; |
---|
460 | |
---|
461 | static __IDL_const short int __IDL__nxt[996] = |
---|
462 | { 0, |
---|
463 | 14, 15, 16, 17, 14, 14, 18, 14, 14, 14, |
---|
464 | 19, 20, 21, 22, 23, 24, 25, 26, 27, 27, |
---|
465 | 27, 27, 28, 27, 27, 27, 27, 29, 27, 27, |
---|
466 | 14, 30, 31, 32, 33, 34, 35, 36, 27, 27, |
---|
467 | 37, 38, 39, 40, 41, 27, 27, 42, 43, 44, |
---|
468 | 45, 46, 47, 27, 27, 14, 14, 48, 86, 48, |
---|
469 | 49, 50, 49, 50, 48, 69, 69, 49, 50, 51, |
---|
470 | 14, 15, 16, 14, 14, 14, 14, 52, 14, 14, |
---|
471 | 14, 14, 21, 14, 14, 14, 14, 14, 56, 57, |
---|
472 | 74, 59, 57, 75, 60, 14, 62, 16, 14, 58, |
---|
473 | |
---|
474 | 54, 14, 58, 72, 72, 64, 16, 63, 65, 66, |
---|
475 | 71, 73, 73, 88, 71, 133, 63, 86, 106, 86, |
---|
476 | 121, 145, 132, 122, 146, 14, 14, 14, 48, 16, |
---|
477 | 14, 49, 14, 14, 52, 14, 14, 14, 14, 21, |
---|
478 | 14, 14, 14, 14, 14, 76, 87, 81, 81, 86, |
---|
479 | 86, 86, 86, 94, 78, 79, 97, 54, 14, 86, |
---|
480 | 95, 91, 86, 93, 98, 96, 86, 92, 86, 78, |
---|
481 | 79, 101, 102, 86, 86, 110, 86, 86, 99, 111, |
---|
482 | 103, 86, 14, 14, 76, 86, 77, 77, 100, 104, |
---|
483 | 105, 86, 86, 78, 79, 107, 116, 117, 86, 86, |
---|
484 | |
---|
485 | 172, 124, 80, 112, 108, 191, 113, 86, 78, 79, |
---|
486 | 119, 109, 118, 125, 125, 128, 114, 73, 73, 115, |
---|
487 | 136, 132, 134, 137, 120, 135, 80, 132, 139, 131, |
---|
488 | 147, 150, 162, 148, 71, 140, 69, 69, 71, 86, |
---|
489 | 141, 141, 86, 151, 151, 126, 154, 86, 155, 155, |
---|
490 | 159, 73, 73, 160, 160, 78, 158, 158, 78, 156, |
---|
491 | 166, 86, 163, 78, 79, 86, 86, 169, 86, 86, |
---|
492 | 78, 86, 142, 78, 156, 152, 187, 86, 78, 79, |
---|
493 | 76, 170, 77, 77, 76, 86, 81, 81, 168, 78, |
---|
494 | 79, 165, 86, 78, 79, 86, 173, 86, 167, 86, |
---|
495 | |
---|
496 | 174, 171, 86, 86, 78, 79, 86, 180, 78, 79, |
---|
497 | 86, 86, 176, 86, 175, 177, 86, 86, 179, 86, |
---|
498 | 178, 183, 86, 186, 86, 86, 185, 86, 181, 182, |
---|
499 | 86, 184, 188, 86, 190, 86, 192, 124, 86, 194, |
---|
500 | 189, 195, 121, 124, 193, 122, 198, 198, 131, 125, |
---|
501 | 125, 133, 263, 196, 204, 125, 125, 136, 132, 131, |
---|
502 | 137, 139, 131, 131, 132, 140, 218, 150, 140, 140, |
---|
503 | 139, 131, 147, 141, 141, 148, 86, 140, 131, 151, |
---|
504 | 151, 126, 141, 141, 206, 150, 86, 126, 86, 207, |
---|
505 | 207, 211, 211, 214, 214, 160, 160, 151, 151, 228, |
---|
506 | |
---|
507 | 78, 154, 220, 155, 155, 142, 160, 160, 208, 215, |
---|
508 | 78, 152, 216, 216, 142, 78, 158, 158, 86, 86, |
---|
509 | 86, 217, 86, 78, 156, 78, 86, 222, 221, 152, |
---|
510 | 86, 86, 226, 86, 86, 223, 227, 86, 78, 156, |
---|
511 | 86, 86, 229, 86, 231, 230, 233, 224, 225, 86, |
---|
512 | 86, 86, 232, 86, 86, 86, 234, 86, 237, 86, |
---|
513 | 236, 240, 86, 86, 86, 86, 86, 86, 86, 235, |
---|
514 | 246, 243, 239, 86, 250, 238, 86, 248, 241, 242, |
---|
515 | 247, 244, 245, 86, 198, 198, 269, 249, 131, 131, |
---|
516 | 131, 131, 251, 343, 204, 206, 206, 140, 211, 211, |
---|
517 | |
---|
518 | 86, 207, 207, 214, 214, 216, 216, 216, 216, 255, |
---|
519 | 78, 86, 86, 86, 86, 86, 86, 258, 259, 86, |
---|
520 | 257, 253, 86, 86, 262, 78, 86, 260, 86, 86, |
---|
521 | 264, 86, 261, 265, 266, 86, 271, 86, 268, 267, |
---|
522 | 86, 86, 272, 86, 273, 274, 86, 270, 86, 277, |
---|
523 | 86, 278, 86, 86, 279, 276, 86, 86, 86, 275, |
---|
524 | 281, 131, 86, 86, 280, 288, 283, 140, 86, 289, |
---|
525 | 86, 86, 282, 86, 86, 292, 86, 86, 86, 295, |
---|
526 | 290, 291, 294, 296, 86, 297, 86, 86, 86, 86, |
---|
527 | 86, 293, 86, 86, 298, 301, 299, 285, 300, 86, |
---|
528 | |
---|
529 | 303, 305, 306, 131, 304, 302, 86, 86, 86, 140, |
---|
530 | 86, 86, 311, 86, 316, 86, 86, 86, 312, 315, |
---|
531 | 318, 317, 319, 86, 86, 313, 314, 131, 320, 86, |
---|
532 | 86, 321, 86, 140, 86, 330, 86, 328, 329, 86, |
---|
533 | 331, 335, 131, 308, 340, 327, 86, 326, 336, 86, |
---|
534 | 131, 338, 335, 131, 342, 333, 336, 323, 341, 336, |
---|
535 | 344, 344, 344, 344, 346, 346, 345, 86, 345, 346, |
---|
536 | 346, 347, 349, 349, 349, 349, 347, 86, 86, 347, |
---|
537 | 339, 347, 53, 53, 53, 53, 53, 53, 53, 53, |
---|
538 | 55, 55, 55, 55, 55, 55, 55, 55, 61, 61, |
---|
539 | |
---|
540 | 61, 61, 61, 61, 61, 61, 68, 68, 68, 68, |
---|
541 | 68, 68, 68, 68, 70, 70, 70, 70, 70, 70, |
---|
542 | 70, 70, 85, 85, 85, 85, 89, 89, 89, 89, |
---|
543 | 123, 123, 338, 123, 123, 123, 123, 123, 129, 129, |
---|
544 | 129, 333, 129, 129, 129, 129, 130, 130, 130, 130, |
---|
545 | 131, 131, 131, 131, 131, 131, 131, 131, 138, 138, |
---|
546 | 138, 138, 138, 138, 138, 138, 143, 143, 86, 143, |
---|
547 | 143, 143, 143, 143, 149, 149, 86, 149, 149, 149, |
---|
548 | 149, 149, 157, 157, 86, 157, 157, 157, 157, 157, |
---|
549 | 161, 161, 86, 86, 86, 86, 197, 197, 86, 197, |
---|
550 | |
---|
551 | 197, 197, 197, 197, 200, 200, 86, 200, 200, 200, |
---|
552 | 200, 200, 203, 203, 203, 203, 203, 203, 203, 203, |
---|
553 | 205, 205, 205, 205, 205, 205, 205, 205, 209, 209, |
---|
554 | 325, 209, 209, 209, 209, 209, 210, 210, 324, 210, |
---|
555 | 210, 210, 210, 210, 213, 213, 322, 213, 213, 213, |
---|
556 | 213, 213, 332, 332, 86, 332, 332, 332, 332, 332, |
---|
557 | 334, 334, 334, 334, 334, 334, 334, 334, 337, 337, |
---|
558 | 86, 337, 337, 337, 337, 337, 348, 348, 348, 86, |
---|
559 | 348, 348, 86, 86, 86, 86, 86, 310, 309, 307, |
---|
560 | 86, 86, 86, 86, 86, 86, 86, 86, 287, 86, |
---|
561 | |
---|
562 | 286, 284, 86, 86, 86, 86, 86, 256, 86, 254, |
---|
563 | 252, 86, 86, 219, 212, 144, 132, 132, 202, 201, |
---|
564 | 199, 164, 86, 67, 153, 144, 132, 132, 127, 90, |
---|
565 | 86, 84, 83, 82, 67, 350, 51, 13, 350, 350, |
---|
566 | 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, |
---|
567 | 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, |
---|
568 | 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, |
---|
569 | 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, |
---|
570 | 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, |
---|
571 | 350, 350, 350, 350, 350 |
---|
572 | |
---|
573 | } ; |
---|
574 | |
---|
575 | static __IDL_const short int __IDL__chk[996] = |
---|
576 | { 0, |
---|
577 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
578 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
579 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
580 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
581 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
582 | 1, 1, 1, 1, 1, 1, 1, 2, 342, 4, |
---|
583 | 2, 2, 4, 4, 10, 17, 17, 10, 10, 4, |
---|
584 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
---|
585 | 5, 5, 5, 5, 5, 5, 5, 5, 7, 7, |
---|
586 | 21, 8, 8, 21, 8, 7, 11, 11, 8, 7, |
---|
587 | |
---|
588 | 5, 5, 8, 19, 19, 12, 12, 11, 12, 12, |
---|
589 | 18, 20, 20, 29, 18, 56, 12, 40, 40, 29, |
---|
590 | 48, 63, 56, 48, 63, 5, 5, 6, 6, 6, |
---|
591 | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
---|
592 | 6, 6, 6, 6, 6, 23, 28, 23, 23, 31, |
---|
593 | 32, 34, 33, 33, 23, 23, 34, 6, 6, 28, |
---|
594 | 33, 31, 36, 32, 34, 33, 35, 31, 37, 23, |
---|
595 | 23, 36, 36, 44, 42, 42, 38, 39, 35, 42, |
---|
596 | 37, 98, 6, 6, 22, 45, 22, 22, 35, 38, |
---|
597 | 39, 116, 41, 22, 22, 41, 44, 45, 43, 46, |
---|
598 | |
---|
599 | 98, 49, 22, 43, 41, 116, 43, 47, 22, 22, |
---|
600 | 47, 41, 46, 49, 49, 51, 43, 51, 51, 43, |
---|
601 | 59, 58, 58, 59, 47, 58, 22, 59, 60, 60, |
---|
602 | 64, 65, 87, 64, 70, 60, 68, 68, 70, 87, |
---|
603 | 60, 60, 92, 65, 65, 49, 72, 341, 72, 72, |
---|
604 | 79, 73, 73, 79, 79, 72, 76, 76, 73, 73, |
---|
605 | 92, 112, 88, 76, 76, 88, 95, 95, 91, 96, |
---|
606 | 72, 94, 60, 73, 73, 65, 112, 99, 76, 76, |
---|
607 | 77, 96, 77, 77, 81, 93, 81, 81, 94, 77, |
---|
608 | 77, 91, 101, 81, 81, 97, 99, 100, 93, 102, |
---|
609 | |
---|
610 | 100, 97, 103, 105, 77, 77, 104, 105, 81, 81, |
---|
611 | 106, 107, 102, 109, 101, 103, 108, 110, 104, 113, |
---|
612 | 103, 108, 111, 111, 114, 115, 110, 117, 106, 107, |
---|
613 | 118, 109, 113, 119, 115, 120, 117, 122, 229, 118, |
---|
614 | 114, 119, 121, 124, 117, 121, 125, 125, 135, 122, |
---|
615 | 122, 133, 229, 120, 135, 124, 124, 136, 133, 138, |
---|
616 | 136, 137, 137, 142, 136, 138, 163, 148, 137, 142, |
---|
617 | 139, 139, 147, 137, 137, 147, 163, 139, 141, 148, |
---|
618 | 148, 122, 139, 139, 141, 150, 166, 124, 173, 141, |
---|
619 | 141, 151, 151, 154, 154, 159, 159, 150, 150, 173, |
---|
620 | |
---|
621 | 154, 155, 166, 155, 155, 137, 160, 160, 142, 156, |
---|
622 | 155, 148, 156, 156, 139, 154, 158, 158, 167, 169, |
---|
623 | 340, 162, 168, 158, 158, 155, 162, 168, 167, 150, |
---|
624 | 170, 171, 171, 177, 172, 169, 172, 174, 158, 158, |
---|
625 | 175, 178, 174, 176, 176, 175, 178, 170, 170, 179, |
---|
626 | 180, 181, 177, 182, 183, 185, 179, 186, 182, 187, |
---|
627 | 181, 186, 189, 188, 190, 191, 236, 192, 193, 180, |
---|
628 | 191, 189, 185, 195, 195, 183, 196, 193, 187, 188, |
---|
629 | 192, 189, 190, 194, 198, 198, 236, 194, 203, 205, |
---|
630 | 207, 208, 196, 339, 203, 205, 207, 208, 211, 211, |
---|
631 | |
---|
632 | 224, 207, 207, 214, 214, 215, 215, 216, 216, 217, |
---|
633 | 214, 220, 221, 226, 227, 231, 232, 221, 224, 217, |
---|
634 | 220, 208, 225, 233, 227, 214, 230, 225, 235, 237, |
---|
635 | 230, 240, 226, 231, 232, 238, 238, 239, 235, 233, |
---|
636 | 241, 242, 239, 243, 240, 241, 244, 237, 245, 244, |
---|
637 | 246, 245, 247, 248, 246, 243, 250, 251, 260, 242, |
---|
638 | 248, 253, 271, 257, 247, 257, 251, 253, 258, 258, |
---|
639 | 262, 261, 250, 263, 268, 262, 267, 272, 269, 268, |
---|
640 | 260, 261, 267, 269, 273, 271, 274, 277, 276, 281, |
---|
641 | 283, 263, 278, 288, 272, 276, 273, 253, 274, 279, |
---|
642 | |
---|
643 | 278, 281, 283, 285, 279, 277, 289, 290, 291, 285, |
---|
644 | 293, 299, 288, 294, 294, 317, 304, 300, 289, 293, |
---|
645 | 300, 299, 304, 305, 306, 290, 291, 308, 305, 311, |
---|
646 | 318, 306, 315, 308, 316, 318, 320, 316, 317, 326, |
---|
647 | 320, 323, 323, 285, 326, 315, 327, 311, 323, 328, |
---|
648 | 334, 338, 335, 335, 328, 333, 334, 308, 327, 335, |
---|
649 | 343, 343, 344, 344, 345, 345, 343, 331, 344, 346, |
---|
650 | 346, 345, 348, 348, 349, 349, 346, 330, 329, 348, |
---|
651 | 325, 349, 351, 351, 351, 351, 351, 351, 351, 351, |
---|
652 | 352, 352, 352, 352, 352, 352, 352, 352, 353, 353, |
---|
653 | |
---|
654 | 353, 353, 353, 353, 353, 353, 354, 354, 354, 354, |
---|
655 | 354, 354, 354, 354, 355, 355, 355, 355, 355, 355, |
---|
656 | 355, 355, 356, 356, 356, 356, 357, 357, 357, 357, |
---|
657 | 358, 358, 324, 358, 358, 358, 358, 358, 359, 359, |
---|
658 | 359, 322, 359, 359, 359, 359, 360, 360, 360, 360, |
---|
659 | 361, 361, 361, 361, 361, 361, 361, 361, 362, 362, |
---|
660 | 362, 362, 362, 362, 362, 362, 363, 363, 321, 363, |
---|
661 | 363, 363, 363, 363, 364, 364, 319, 364, 364, 364, |
---|
662 | 364, 364, 365, 365, 314, 365, 365, 365, 365, 365, |
---|
663 | 366, 366, 367, 367, 367, 367, 368, 368, 313, 368, |
---|
664 | |
---|
665 | 368, 368, 368, 368, 369, 369, 312, 369, 369, 369, |
---|
666 | 369, 369, 370, 370, 370, 370, 370, 370, 370, 370, |
---|
667 | 371, 371, 371, 371, 371, 371, 371, 371, 372, 372, |
---|
668 | 310, 372, 372, 372, 372, 372, 373, 373, 309, 373, |
---|
669 | 373, 373, 373, 373, 374, 374, 307, 374, 374, 374, |
---|
670 | 374, 374, 375, 375, 303, 375, 375, 375, 375, 375, |
---|
671 | 376, 376, 376, 376, 376, 376, 376, 376, 377, 377, |
---|
672 | 302, 377, 377, 377, 377, 377, 378, 378, 378, 301, |
---|
673 | 378, 378, 298, 297, 296, 295, 292, 287, 286, 284, |
---|
674 | 282, 280, 275, 270, 266, 265, 264, 259, 256, 255, |
---|
675 | |
---|
676 | 254, 252, 249, 234, 228, 223, 222, 219, 218, 212, |
---|
677 | 199, 184, 165, 164, 152, 144, 134, 131, 129, 128, |
---|
678 | 126, 90, 85, 67, 66, 62, 57, 55, 50, 30, |
---|
679 | 27, 26, 25, 24, 15, 13, 3, 350, 350, 350, |
---|
680 | 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, |
---|
681 | 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, |
---|
682 | 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, |
---|
683 | 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, |
---|
684 | 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, |
---|
685 | 350, 350, 350, 350, 350 |
---|
686 | |
---|
687 | } ; |
---|
688 | |
---|
689 | static __IDL__state_type __IDL__last_accepting_state; |
---|
690 | static char *__IDL__last_accepting_cpos; |
---|
691 | |
---|
692 | /* The intent behind this definition is that it'll catch |
---|
693 | * any uses of REJECT which flex missed. |
---|
694 | */ |
---|
695 | #define REJECT reject_used_but_not_detected |
---|
696 | #define __IDL_more() __IDL_more_used_but_not_detected |
---|
697 | #define YY_MORE_ADJ 0 |
---|
698 | #define YY_RESTORE_YY_MORE_OFFSET |
---|
699 | char *__IDL_text; |
---|
700 | #line 1 "./lexer.l" |
---|
701 | #define INITIAL 0 |
---|
702 | /*************************************************************************** |
---|
703 | |
---|
704 | lexer.l (IDL lex scanner) |
---|
705 | |
---|
706 | Copyright (C) 1998, 1999 Andrew T. Veliath |
---|
707 | |
---|
708 | This library is free software; you can redistribute it and/or |
---|
709 | modify it under the terms of the GNU Library General Public |
---|
710 | License as published by the Free Software Foundation; either |
---|
711 | version 2 of the License, or (at your option) any later version. |
---|
712 | |
---|
713 | This library is distributed in the hope that it will be useful, |
---|
714 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
715 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
716 | Library General Public License for more details. |
---|
717 | |
---|
718 | You should have received a copy of the GNU Library General Public |
---|
719 | License along with this library; if not, write to the Free |
---|
720 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
721 | |
---|
722 | $Id: lexer.c,v 1.1.1.1 2002-12-26 17:10:45 ghudson Exp $ |
---|
723 | |
---|
724 | ***************************************************************************/ |
---|
725 | #line 25 "./lexer.l" |
---|
726 | #include <assert.h> |
---|
727 | #include <stdio.h> |
---|
728 | #include <stdlib.h> |
---|
729 | #include <ctype.h> |
---|
730 | #include <string.h> |
---|
731 | #include "rename.h" |
---|
732 | #include "util.h" |
---|
733 | #include "parser.h" |
---|
734 | |
---|
735 | #ifdef XP_MAC |
---|
736 | # include <unix.h> |
---|
737 | # define YY_NEVER_INTERACTIVE 1 |
---|
738 | #endif |
---|
739 | |
---|
740 | /* Eliminate warning */ |
---|
741 | #define YY_NO_UNPUT 1 |
---|
742 | |
---|
743 | #define YY_INPUT(buf,result,the_max_size) do { \ |
---|
744 | if (__IDL_inputcb == NULL) { \ |
---|
745 | if ((result = fread (buf, 1, the_max_size, __IDL_in)) == YY_NULL && \ |
---|
746 | ferror (__IDL_in)) \ |
---|
747 | YY_FATAL_ERROR ("input in scanner failed"); \ |
---|
748 | } else { \ |
---|
749 | union IDL_input_data data; \ |
---|
750 | \ |
---|
751 | data.fill.buffer = buf; \ |
---|
752 | data.fill.max_size = the_max_size; \ |
---|
753 | result = (*__IDL_inputcb) (IDL_INPUT_REASON_FILL, &data, \ |
---|
754 | __IDL_inputcb_user_data); \ |
---|
755 | if (result < 0) \ |
---|
756 | YY_FATAL_ERROR ("input callback returned failure"); \ |
---|
757 | } \ |
---|
758 | } while (0) |
---|
759 | |
---|
760 | #define tokreturn(token) do { \ |
---|
761 | __IDL_prev_token_line = __IDL_cur_token_line; \ |
---|
762 | __IDL_cur_token_line = __IDL_cur_line; \ |
---|
763 | return token; \ |
---|
764 | } while (0) |
---|
765 | |
---|
766 | #define SELECT_START \ |
---|
767 | /* Parser driven start conditions */ \ |
---|
768 | if (__IDL_flagsi & IDLFP_PROPERTIES) \ |
---|
769 | BEGIN (PROP); \ |
---|
770 | else if (__IDL_flagsi & IDLFP_NATIVE) \ |
---|
771 | BEGIN (NATIVE); \ |
---|
772 | /* Global syntax start conditions */ \ |
---|
773 | else if (__IDL_flags & IDLF_XPIDL) \ |
---|
774 | BEGIN (XP); \ |
---|
775 | else if (__IDL_flags & IDLF_CODEFRAGS) \ |
---|
776 | BEGIN (CFRG); |
---|
777 | |
---|
778 | #define SELECT_RESTART \ |
---|
779 | SELECT_START \ |
---|
780 | else \ |
---|
781 | BEGIN (INITIAL); |
---|
782 | |
---|
783 | static int count_nl (const char *s); |
---|
784 | |
---|
785 | #ifdef YYDEBUG |
---|
786 | extern int __IDL_debug; |
---|
787 | #endif |
---|
788 | int __IDL_prev_token_line; |
---|
789 | int __IDL_cur_token_line; |
---|
790 | static int warn_underscores; |
---|
791 | static char * codefrag_desc; |
---|
792 | static GSList * codefrag_list; |
---|
793 | static GSList * codefrag_list_tail; |
---|
794 | #define XP 1 |
---|
795 | |
---|
796 | #define PROP 2 |
---|
797 | |
---|
798 | #define NATIVE 3 |
---|
799 | |
---|
800 | #define CFRG 4 |
---|
801 | |
---|
802 | #define CFRGX 5 |
---|
803 | |
---|
804 | |
---|
805 | /* Macros after this point can all be overridden by user definitions in |
---|
806 | * section 1. |
---|
807 | */ |
---|
808 | |
---|
809 | #ifndef YY_SKIP_YYWRAP |
---|
810 | #ifdef __cplusplus |
---|
811 | extern "C" int __IDL_wrap YY_PROTO(( void )); |
---|
812 | #else |
---|
813 | extern int __IDL_wrap YY_PROTO(( void )); |
---|
814 | #endif |
---|
815 | #endif |
---|
816 | |
---|
817 | #ifndef YY_NO_UNPUT |
---|
818 | static void __IDL_unput YY_PROTO(( int c, char *buf_ptr )); |
---|
819 | #endif |
---|
820 | |
---|
821 | #ifndef __IDL_text_ptr |
---|
822 | static void __IDL__flex_strncpy YY_PROTO(( char *, __IDL_const char *, int )); |
---|
823 | #endif |
---|
824 | |
---|
825 | #ifdef YY_NEED_STRLEN |
---|
826 | static int __IDL__flex_strlen YY_PROTO(( __IDL_const char * )); |
---|
827 | #endif |
---|
828 | |
---|
829 | #ifndef YY_NO_INPUT |
---|
830 | #ifdef __cplusplus |
---|
831 | static int __IDL_input YY_PROTO(( void )); |
---|
832 | #else |
---|
833 | static int input YY_PROTO(( void )); |
---|
834 | #endif |
---|
835 | #endif |
---|
836 | |
---|
837 | #if YY_STACK_USED |
---|
838 | static int __IDL__start_stack_ptr = 0; |
---|
839 | static int __IDL__start_stack_depth = 0; |
---|
840 | static int *__IDL__start_stack = 0; |
---|
841 | #ifndef YY_NO_PUSH_STATE |
---|
842 | static void __IDL__push_state YY_PROTO(( int new_state )); |
---|
843 | #endif |
---|
844 | #ifndef YY_NO_POP_STATE |
---|
845 | static void __IDL__pop_state YY_PROTO(( void )); |
---|
846 | #endif |
---|
847 | #ifndef YY_NO_TOP_STATE |
---|
848 | static int __IDL__top_state YY_PROTO(( void )); |
---|
849 | #endif |
---|
850 | |
---|
851 | #else |
---|
852 | #define YY_NO_PUSH_STATE 1 |
---|
853 | #define YY_NO_POP_STATE 1 |
---|
854 | #define YY_NO_TOP_STATE 1 |
---|
855 | #endif |
---|
856 | |
---|
857 | #ifdef YY_MALLOC_DECL |
---|
858 | YY_MALLOC_DECL |
---|
859 | #else |
---|
860 | #if __STDC__ |
---|
861 | #ifndef __cplusplus |
---|
862 | #include <stdlib.h> |
---|
863 | #endif |
---|
864 | #else |
---|
865 | /* Just try to get by without declaring the routines. This will fail |
---|
866 | * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) |
---|
867 | * or sizeof(void*) != sizeof(int). |
---|
868 | */ |
---|
869 | #endif |
---|
870 | #endif |
---|
871 | |
---|
872 | /* Amount of stuff to slurp up with each read. */ |
---|
873 | #ifndef YY_READ_BUF_SIZE |
---|
874 | #define YY_READ_BUF_SIZE 8192 |
---|
875 | #endif |
---|
876 | |
---|
877 | /* Copy whatever the last rule matched to the standard output. */ |
---|
878 | |
---|
879 | #ifndef ECHO |
---|
880 | /* This used to be an fputs(), but since the string might contain NUL's, |
---|
881 | * we now use fwrite(). |
---|
882 | */ |
---|
883 | #define ECHO (void) fwrite( __IDL_text, __IDL_leng, 1, __IDL_out ) |
---|
884 | #endif |
---|
885 | |
---|
886 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
---|
887 | * is returned in "result". |
---|
888 | */ |
---|
889 | #ifndef YY_INPUT |
---|
890 | #define YY_INPUT(buf,result,max_size) \ |
---|
891 | if ( __IDL__current_buffer->__IDL__is_interactive ) \ |
---|
892 | { \ |
---|
893 | int c = '*', n; \ |
---|
894 | for ( n = 0; n < max_size && \ |
---|
895 | (c = getc( __IDL_in )) != EOF && c != '\n'; ++n ) \ |
---|
896 | buf[n] = (char) c; \ |
---|
897 | if ( c == '\n' ) \ |
---|
898 | buf[n++] = (char) c; \ |
---|
899 | if ( c == EOF && ferror( __IDL_in ) ) \ |
---|
900 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
---|
901 | result = n; \ |
---|
902 | } \ |
---|
903 | else if ( ((result = fread( buf, 1, max_size, __IDL_in )) == 0) \ |
---|
904 | && ferror( __IDL_in ) ) \ |
---|
905 | YY_FATAL_ERROR( "input in flex scanner failed" ); |
---|
906 | #endif |
---|
907 | |
---|
908 | /* No semi-colon after return; correct usage is to write "__IDL_terminate();" - |
---|
909 | * we don't want an extra ';' after the "return" because that will cause |
---|
910 | * some compilers to complain about unreachable statements. |
---|
911 | */ |
---|
912 | #ifndef __IDL_terminate |
---|
913 | #define __IDL_terminate() return YY_NULL |
---|
914 | #endif |
---|
915 | |
---|
916 | /* Number of entries by which start-condition stack grows. */ |
---|
917 | #ifndef YY_START_STACK_INCR |
---|
918 | #define YY_START_STACK_INCR 25 |
---|
919 | #endif |
---|
920 | |
---|
921 | /* Report a fatal error. */ |
---|
922 | #ifndef YY_FATAL_ERROR |
---|
923 | #define YY_FATAL_ERROR(msg) __IDL__fatal_error( msg ) |
---|
924 | #endif |
---|
925 | |
---|
926 | /* Default declaration of generated scanner - a define so the user can |
---|
927 | * easily add parameters. |
---|
928 | */ |
---|
929 | #ifndef YY_DECL |
---|
930 | #define YY_DECL int __IDL_lex YY_PROTO(( void )) |
---|
931 | #endif |
---|
932 | |
---|
933 | /* Code executed at the beginning of each rule, after __IDL_text and __IDL_leng |
---|
934 | * have been set up. |
---|
935 | */ |
---|
936 | #ifndef YY_USER_ACTION |
---|
937 | #define YY_USER_ACTION |
---|
938 | #endif |
---|
939 | |
---|
940 | /* Code executed at the end of each rule. */ |
---|
941 | #ifndef YY_BREAK |
---|
942 | #define YY_BREAK break; |
---|
943 | #endif |
---|
944 | |
---|
945 | #define YY_RULE_SETUP \ |
---|
946 | if ( __IDL_leng > 0 ) \ |
---|
947 | __IDL__current_buffer->__IDL__at_bol = \ |
---|
948 | (__IDL_text[__IDL_leng - 1] == '\n'); \ |
---|
949 | YY_USER_ACTION |
---|
950 | |
---|
951 | YY_DECL |
---|
952 | { |
---|
953 | register __IDL__state_type __IDL__current_state; |
---|
954 | register char *__IDL__cp = NULL, *__IDL__bp = NULL; |
---|
955 | register int __IDL__act; |
---|
956 | |
---|
957 | #line 126 "./lexer.l" |
---|
958 | |
---|
959 | |
---|
960 | SELECT_START; |
---|
961 | |
---|
962 | |
---|
963 | if ( __IDL__init ) |
---|
964 | { |
---|
965 | __IDL__init = 0; |
---|
966 | |
---|
967 | #ifdef YY_USER_INIT |
---|
968 | YY_USER_INIT; |
---|
969 | #endif |
---|
970 | |
---|
971 | if ( ! __IDL__start ) |
---|
972 | __IDL__start = 1; /* first start state */ |
---|
973 | |
---|
974 | if ( ! __IDL_in ) |
---|
975 | __IDL_in = stdin; |
---|
976 | |
---|
977 | if ( ! __IDL_out ) |
---|
978 | __IDL_out = stdout; |
---|
979 | |
---|
980 | if ( ! __IDL__current_buffer ) |
---|
981 | __IDL__current_buffer = |
---|
982 | __IDL__create_buffer( __IDL_in, YY_BUF_SIZE ); |
---|
983 | |
---|
984 | __IDL__load_buffer_state(); |
---|
985 | } |
---|
986 | |
---|
987 | while ( 1 ) /* loops until end-of-file is reached */ |
---|
988 | { |
---|
989 | __IDL__cp = __IDL__c_buf_p; |
---|
990 | |
---|
991 | /* Support of __IDL_text. */ |
---|
992 | *__IDL__cp = __IDL__hold_char; |
---|
993 | |
---|
994 | /* __IDL__bp points to the position in __IDL__ch_buf of the start of |
---|
995 | * the current run. |
---|
996 | */ |
---|
997 | __IDL__bp = __IDL__cp; |
---|
998 | |
---|
999 | __IDL__current_state = __IDL__start; |
---|
1000 | __IDL__current_state += YY_AT_BOL(); |
---|
1001 | __IDL__match: |
---|
1002 | do |
---|
1003 | { |
---|
1004 | register YY_CHAR __IDL__c = __IDL__ec[YY_SC_TO_UI(*__IDL__cp)]; |
---|
1005 | if ( __IDL__accept[__IDL__current_state] ) |
---|
1006 | { |
---|
1007 | __IDL__last_accepting_state = __IDL__current_state; |
---|
1008 | __IDL__last_accepting_cpos = __IDL__cp; |
---|
1009 | } |
---|
1010 | while ( __IDL__chk[__IDL__base[__IDL__current_state] + __IDL__c] != __IDL__current_state ) |
---|
1011 | { |
---|
1012 | __IDL__current_state = (int) __IDL__def[__IDL__current_state]; |
---|
1013 | if ( __IDL__current_state >= 351 ) |
---|
1014 | __IDL__c = __IDL__meta[(unsigned int) __IDL__c]; |
---|
1015 | } |
---|
1016 | __IDL__current_state = __IDL__nxt[__IDL__base[__IDL__current_state] + (unsigned int) __IDL__c]; |
---|
1017 | ++__IDL__cp; |
---|
1018 | } |
---|
1019 | while ( __IDL__base[__IDL__current_state] != 938 ); |
---|
1020 | |
---|
1021 | __IDL__find_action: |
---|
1022 | __IDL__act = __IDL__accept[__IDL__current_state]; |
---|
1023 | if ( __IDL__act == 0 ) |
---|
1024 | { /* have to back up */ |
---|
1025 | __IDL__cp = __IDL__last_accepting_cpos; |
---|
1026 | __IDL__current_state = __IDL__last_accepting_state; |
---|
1027 | __IDL__act = __IDL__accept[__IDL__current_state]; |
---|
1028 | } |
---|
1029 | |
---|
1030 | YY_DO_BEFORE_ACTION; |
---|
1031 | |
---|
1032 | |
---|
1033 | do_action: /* This label is used only to access EOF actions. */ |
---|
1034 | |
---|
1035 | |
---|
1036 | switch ( __IDL__act ) |
---|
1037 | { /* beginning of action switch */ |
---|
1038 | case 0: /* must back up */ |
---|
1039 | /* undo the effects of YY_DO_BEFORE_ACTION */ |
---|
1040 | *__IDL__cp = __IDL__hold_char; |
---|
1041 | __IDL__cp = __IDL__last_accepting_cpos; |
---|
1042 | __IDL__current_state = __IDL__last_accepting_state; |
---|
1043 | goto __IDL__find_action; |
---|
1044 | |
---|
1045 | case 1: |
---|
1046 | YY_RULE_SETUP |
---|
1047 | #line 130 "./lexer.l" |
---|
1048 | { |
---|
1049 | char *s = __IDL_text + 2; |
---|
1050 | |
---|
1051 | while (g_ascii_isspace (*s)) ++s; |
---|
1052 | codefrag_desc = g_strdup (s); |
---|
1053 | codefrag_list = codefrag_list_tail = NULL; |
---|
1054 | |
---|
1055 | if (!(__IDL_flags & IDLF_XPIDL || __IDL_flags & IDLF_CODEFRAGS)) |
---|
1056 | __IDL_error ("Code fragment syntax not enabled"); |
---|
1057 | else |
---|
1058 | BEGIN (CFRGX); |
---|
1059 | } |
---|
1060 | YY_BREAK |
---|
1061 | case 2: |
---|
1062 | YY_RULE_SETUP |
---|
1063 | #line 142 "./lexer.l" |
---|
1064 | { |
---|
1065 | __IDL_lval.tree = IDL_codefrag_new (codefrag_desc, codefrag_list); |
---|
1066 | tokreturn (TOK_CODEFRAG); |
---|
1067 | } |
---|
1068 | YY_BREAK |
---|
1069 | case 3: |
---|
1070 | YY_RULE_SETUP |
---|
1071 | #line 146 "./lexer.l" |
---|
1072 | { |
---|
1073 | char *s; |
---|
1074 | GSList *slist; |
---|
1075 | |
---|
1076 | s = g_strdup (__IDL_text); |
---|
1077 | slist = g_slist_alloc (); |
---|
1078 | slist->data = s; |
---|
1079 | |
---|
1080 | if (codefrag_list == NULL) { |
---|
1081 | codefrag_list = slist; |
---|
1082 | codefrag_list_tail = slist; |
---|
1083 | } else { |
---|
1084 | codefrag_list_tail->next = slist; |
---|
1085 | codefrag_list_tail = slist; |
---|
1086 | } |
---|
1087 | } |
---|
1088 | YY_BREAK |
---|
1089 | case 4: |
---|
1090 | YY_RULE_SETUP |
---|
1091 | #line 162 "./lexer.l" |
---|
1092 | { |
---|
1093 | int n; |
---|
1094 | char *p = __IDL_text; |
---|
1095 | char *s, *t; |
---|
1096 | |
---|
1097 | while (g_ascii_isspace (*p) || *p == '#') ++p; |
---|
1098 | s = p; |
---|
1099 | sscanf (p, "%*6s%n", &n); s += n; |
---|
1100 | while (g_ascii_isspace (*s)) ++s; |
---|
1101 | |
---|
1102 | t = s + strlen(s) - 1; |
---|
1103 | while(g_ascii_isspace(*t) && t > s) *(t--) = '\0'; /* Chomp trailing spaces */ |
---|
1104 | |
---|
1105 | __IDL_do_pragma (s); |
---|
1106 | } |
---|
1107 | YY_BREAK |
---|
1108 | case 5: |
---|
1109 | YY_RULE_SETUP |
---|
1110 | #line 177 "./lexer.l" |
---|
1111 | { |
---|
1112 | gchar *mytext = __IDL_text; |
---|
1113 | gint line; |
---|
1114 | |
---|
1115 | while (g_ascii_isspace (*mytext)) |
---|
1116 | mytext++; |
---|
1117 | |
---|
1118 | g_assert (mytext [0] == '#' && mytext [1] == ' '); |
---|
1119 | |
---|
1120 | mytext += 2; |
---|
1121 | |
---|
1122 | line = atoi (mytext); |
---|
1123 | |
---|
1124 | while (g_ascii_isdigit (*mytext)) |
---|
1125 | mytext++; |
---|
1126 | |
---|
1127 | if (g_ascii_isspace (*mytext)) { |
---|
1128 | mytext++; |
---|
1129 | |
---|
1130 | if (mytext [0] == '"') { |
---|
1131 | gchar *p = ++mytext; |
---|
1132 | |
---|
1133 | while (*p && *p != '"') p++; |
---|
1134 | |
---|
1135 | *p = '\0'; |
---|
1136 | } |
---|
1137 | |
---|
1138 | if (mytext [0] == '<' && |
---|
1139 | (!strcmp (mytext, "<builtin>") || |
---|
1140 | !strcmp (mytext, "<built-in>") || |
---|
1141 | !strcmp (mytext, "<stdin>") || |
---|
1142 | !strcmp (mytext, "<command line>"))) |
---|
1143 | |
---|
1144 | __IDL_lval.tree = IDL_file_set ("", line); |
---|
1145 | else { |
---|
1146 | gchar *filename = g_strdup (mytext); |
---|
1147 | |
---|
1148 | __IDL_lval.tree = IDL_file_set (filename, line); |
---|
1149 | |
---|
1150 | g_free (filename); |
---|
1151 | } |
---|
1152 | } |
---|
1153 | else |
---|
1154 | __IDL_lval.tree = IDL_file_set ("", line); |
---|
1155 | |
---|
1156 | if (__IDL_lval.tree) |
---|
1157 | tokreturn (TOK_SRCFILE); |
---|
1158 | } |
---|
1159 | YY_BREAK |
---|
1160 | case 6: |
---|
1161 | YY_RULE_SETUP |
---|
1162 | #line 225 "./lexer.l" |
---|
1163 | ; |
---|
1164 | YY_BREAK |
---|
1165 | case 7: |
---|
1166 | YY_RULE_SETUP |
---|
1167 | #line 226 "./lexer.l" |
---|
1168 | ; |
---|
1169 | YY_BREAK |
---|
1170 | case 8: |
---|
1171 | YY_RULE_SETUP |
---|
1172 | #line 227 "./lexer.l" |
---|
1173 | { |
---|
1174 | __IDL_lval.integer = 0; |
---|
1175 | sscanf (__IDL_text, "%" IDL_LL "o", &__IDL_lval.integer); |
---|
1176 | tokreturn (TOK_INTEGER); |
---|
1177 | } |
---|
1178 | YY_BREAK |
---|
1179 | case 9: |
---|
1180 | YY_RULE_SETUP |
---|
1181 | #line 232 "./lexer.l" |
---|
1182 | { |
---|
1183 | __IDL_lval.integer = 0; |
---|
1184 | sscanf (__IDL_text, "%" IDL_LL "u", &__IDL_lval.integer); |
---|
1185 | tokreturn (TOK_INTEGER); |
---|
1186 | } |
---|
1187 | YY_BREAK |
---|
1188 | case 10: |
---|
1189 | YY_RULE_SETUP |
---|
1190 | #line 237 "./lexer.l" |
---|
1191 | { |
---|
1192 | __IDL_lval.integer = 0; |
---|
1193 | sscanf (__IDL_text + 2, "%" IDL_LL "x", &__IDL_lval.integer); |
---|
1194 | tokreturn (TOK_INTEGER); |
---|
1195 | } |
---|
1196 | YY_BREAK |
---|
1197 | case 11: |
---|
1198 | YY_RULE_SETUP |
---|
1199 | #line 242 "./lexer.l" |
---|
1200 | { |
---|
1201 | __IDL_lval.str = g_strdup (__IDL_text); |
---|
1202 | tokreturn (TOK_FIXEDP); |
---|
1203 | } |
---|
1204 | YY_BREAK |
---|
1205 | case 12: |
---|
1206 | YY_RULE_SETUP |
---|
1207 | #line 246 "./lexer.l" |
---|
1208 | { |
---|
1209 | __IDL_lval.floatp = atof (__IDL_text); |
---|
1210 | tokreturn (TOK_FLOATP); |
---|
1211 | } |
---|
1212 | YY_BREAK |
---|
1213 | case 13: |
---|
1214 | YY_RULE_SETUP |
---|
1215 | #line 250 "./lexer.l" |
---|
1216 | tokreturn (TOK_FALSE); |
---|
1217 | YY_BREAK |
---|
1218 | case 14: |
---|
1219 | YY_RULE_SETUP |
---|
1220 | #line 251 "./lexer.l" |
---|
1221 | tokreturn (TOK_TRUE); |
---|
1222 | YY_BREAK |
---|
1223 | case 15: |
---|
1224 | YY_RULE_SETUP |
---|
1225 | #line 252 "./lexer.l" |
---|
1226 | tokreturn (TOK_ANY); |
---|
1227 | YY_BREAK |
---|
1228 | case 16: |
---|
1229 | YY_RULE_SETUP |
---|
1230 | #line 253 "./lexer.l" |
---|
1231 | tokreturn (TOK_ATTRIBUTE); |
---|
1232 | YY_BREAK |
---|
1233 | case 17: |
---|
1234 | YY_RULE_SETUP |
---|
1235 | #line 254 "./lexer.l" |
---|
1236 | tokreturn (TOK_BOOLEAN); |
---|
1237 | YY_BREAK |
---|
1238 | case 18: |
---|
1239 | YY_RULE_SETUP |
---|
1240 | #line 255 "./lexer.l" |
---|
1241 | tokreturn (TOK_CASE); |
---|
1242 | YY_BREAK |
---|
1243 | case 19: |
---|
1244 | YY_RULE_SETUP |
---|
1245 | #line 256 "./lexer.l" |
---|
1246 | tokreturn (TOK_CHAR); |
---|
1247 | YY_BREAK |
---|
1248 | case 20: |
---|
1249 | YY_RULE_SETUP |
---|
1250 | #line 257 "./lexer.l" |
---|
1251 | tokreturn (TOK_CONST); |
---|
1252 | YY_BREAK |
---|
1253 | case 21: |
---|
1254 | YY_RULE_SETUP |
---|
1255 | #line 258 "./lexer.l" |
---|
1256 | tokreturn (TOK_CONTEXT); |
---|
1257 | YY_BREAK |
---|
1258 | case 22: |
---|
1259 | YY_RULE_SETUP |
---|
1260 | #line 259 "./lexer.l" |
---|
1261 | tokreturn (TOK_DEFAULT); |
---|
1262 | YY_BREAK |
---|
1263 | case 23: |
---|
1264 | YY_RULE_SETUP |
---|
1265 | #line 260 "./lexer.l" |
---|
1266 | tokreturn (TOK_DOUBLE); |
---|
1267 | YY_BREAK |
---|
1268 | case 24: |
---|
1269 | YY_RULE_SETUP |
---|
1270 | #line 261 "./lexer.l" |
---|
1271 | tokreturn (TOK_ENUM); |
---|
1272 | YY_BREAK |
---|
1273 | case 25: |
---|
1274 | YY_RULE_SETUP |
---|
1275 | #line 262 "./lexer.l" |
---|
1276 | tokreturn (TOK_EXCEPTION); |
---|
1277 | YY_BREAK |
---|
1278 | case 26: |
---|
1279 | YY_RULE_SETUP |
---|
1280 | #line 263 "./lexer.l" |
---|
1281 | tokreturn (TOK_FIXED); |
---|
1282 | YY_BREAK |
---|
1283 | case 27: |
---|
1284 | YY_RULE_SETUP |
---|
1285 | #line 264 "./lexer.l" |
---|
1286 | tokreturn (TOK_FLOAT); |
---|
1287 | YY_BREAK |
---|
1288 | case 28: |
---|
1289 | YY_RULE_SETUP |
---|
1290 | #line 265 "./lexer.l" |
---|
1291 | tokreturn (TOK_IN); |
---|
1292 | YY_BREAK |
---|
1293 | case 29: |
---|
1294 | YY_RULE_SETUP |
---|
1295 | #line 266 "./lexer.l" |
---|
1296 | tokreturn (TOK_INOUT); |
---|
1297 | YY_BREAK |
---|
1298 | case 30: |
---|
1299 | YY_RULE_SETUP |
---|
1300 | #line 267 "./lexer.l" |
---|
1301 | tokreturn (TOK_INTERFACE); |
---|
1302 | YY_BREAK |
---|
1303 | case 31: |
---|
1304 | YY_RULE_SETUP |
---|
1305 | #line 268 "./lexer.l" |
---|
1306 | tokreturn (TOK_LONG); |
---|
1307 | YY_BREAK |
---|
1308 | case 32: |
---|
1309 | YY_RULE_SETUP |
---|
1310 | #line 269 "./lexer.l" |
---|
1311 | tokreturn (TOK_MODULE); |
---|
1312 | YY_BREAK |
---|
1313 | case 33: |
---|
1314 | YY_RULE_SETUP |
---|
1315 | #line 270 "./lexer.l" |
---|
1316 | tokreturn (TOK_NATIVE); |
---|
1317 | YY_BREAK |
---|
1318 | case 34: |
---|
1319 | YY_RULE_SETUP |
---|
1320 | #line 271 "./lexer.l" |
---|
1321 | tokreturn (TOK_OCTET); |
---|
1322 | YY_BREAK |
---|
1323 | case 35: |
---|
1324 | YY_RULE_SETUP |
---|
1325 | #line 272 "./lexer.l" |
---|
1326 | tokreturn (TOK_ONEWAY); |
---|
1327 | YY_BREAK |
---|
1328 | case 36: |
---|
1329 | YY_RULE_SETUP |
---|
1330 | #line 273 "./lexer.l" |
---|
1331 | tokreturn (TOK_OUT); |
---|
1332 | YY_BREAK |
---|
1333 | case 37: |
---|
1334 | YY_RULE_SETUP |
---|
1335 | #line 274 "./lexer.l" |
---|
1336 | tokreturn (TOK_RAISES); |
---|
1337 | YY_BREAK |
---|
1338 | case 38: |
---|
1339 | YY_RULE_SETUP |
---|
1340 | #line 275 "./lexer.l" |
---|
1341 | tokreturn (TOK_READONLY); |
---|
1342 | YY_BREAK |
---|
1343 | case 39: |
---|
1344 | YY_RULE_SETUP |
---|
1345 | #line 276 "./lexer.l" |
---|
1346 | tokreturn (TOK_SEQUENCE); |
---|
1347 | YY_BREAK |
---|
1348 | case 40: |
---|
1349 | YY_RULE_SETUP |
---|
1350 | #line 277 "./lexer.l" |
---|
1351 | tokreturn (TOK_SHORT); |
---|
1352 | YY_BREAK |
---|
1353 | case 41: |
---|
1354 | YY_RULE_SETUP |
---|
1355 | #line 278 "./lexer.l" |
---|
1356 | tokreturn (TOK_STRING); |
---|
1357 | YY_BREAK |
---|
1358 | case 42: |
---|
1359 | YY_RULE_SETUP |
---|
1360 | #line 279 "./lexer.l" |
---|
1361 | tokreturn (TOK_STRUCT); |
---|
1362 | YY_BREAK |
---|
1363 | case 43: |
---|
1364 | YY_RULE_SETUP |
---|
1365 | #line 280 "./lexer.l" |
---|
1366 | tokreturn (TOK_SWITCH); |
---|
1367 | YY_BREAK |
---|
1368 | case 44: |
---|
1369 | YY_RULE_SETUP |
---|
1370 | #line 281 "./lexer.l" |
---|
1371 | tokreturn (TOK_TYPEDEF); |
---|
1372 | YY_BREAK |
---|
1373 | case 45: |
---|
1374 | YY_RULE_SETUP |
---|
1375 | #line 282 "./lexer.l" |
---|
1376 | tokreturn (TOK_UNION); |
---|
1377 | YY_BREAK |
---|
1378 | case 46: |
---|
1379 | YY_RULE_SETUP |
---|
1380 | #line 283 "./lexer.l" |
---|
1381 | tokreturn (TOK_UNSIGNED); |
---|
1382 | YY_BREAK |
---|
1383 | case 47: |
---|
1384 | YY_RULE_SETUP |
---|
1385 | #line 284 "./lexer.l" |
---|
1386 | tokreturn (TOK_VARARGS); |
---|
1387 | YY_BREAK |
---|
1388 | case 48: |
---|
1389 | YY_RULE_SETUP |
---|
1390 | #line 285 "./lexer.l" |
---|
1391 | tokreturn (TOK_VOID); |
---|
1392 | YY_BREAK |
---|
1393 | case 49: |
---|
1394 | YY_RULE_SETUP |
---|
1395 | #line 286 "./lexer.l" |
---|
1396 | tokreturn (TOK_WCHAR); |
---|
1397 | YY_BREAK |
---|
1398 | case 50: |
---|
1399 | YY_RULE_SETUP |
---|
1400 | #line 287 "./lexer.l" |
---|
1401 | tokreturn (TOK_WSTRING); |
---|
1402 | YY_BREAK |
---|
1403 | case 51: |
---|
1404 | YY_RULE_SETUP |
---|
1405 | #line 288 "./lexer.l" |
---|
1406 | tokreturn (TOK_OP_SCOPE); |
---|
1407 | YY_BREAK |
---|
1408 | case 52: |
---|
1409 | YY_RULE_SETUP |
---|
1410 | #line 289 "./lexer.l" |
---|
1411 | tokreturn (TOK_OP_SHR); |
---|
1412 | YY_BREAK |
---|
1413 | case 53: |
---|
1414 | YY_RULE_SETUP |
---|
1415 | #line 290 "./lexer.l" |
---|
1416 | tokreturn (TOK_OP_SHL); |
---|
1417 | YY_BREAK |
---|
1418 | case 54: |
---|
1419 | YY_RULE_SETUP |
---|
1420 | #line 291 "./lexer.l" |
---|
1421 | { |
---|
1422 | char *s = g_strdup (__IDL_text); |
---|
1423 | |
---|
1424 | /* Get the parenthesized expression (ignoring whitespace) */ |
---|
1425 | sscanf (__IDL_text, "__declspec %*[(] %[A-Za-z_] %*[)]", s); |
---|
1426 | __IDL_lval.str = s; |
---|
1427 | __IDL_cur_line += count_nl (__IDL_text); |
---|
1428 | tokreturn (TOK_DECLSPEC); |
---|
1429 | } |
---|
1430 | YY_BREAK |
---|
1431 | case 55: |
---|
1432 | YY_RULE_SETUP |
---|
1433 | #line 300 "./lexer.l" |
---|
1434 | { |
---|
1435 | #if 0 |
---|
1436 | if ((__IDL_flags & IDLF_TYPECODES) && strcmp (__IDL_text, "TypeCode") == 0) |
---|
1437 | tokreturn (TOK_TYPECODE); |
---|
1438 | #endif |
---|
1439 | if (__IDL_typecodes_as_tok>0 && strcmp (__IDL_text, "TypeCode") == 0) |
---|
1440 | tokreturn (TOK_TYPECODE); |
---|
1441 | if ( (__IDL_pidl <= 0) && strcmp(__IDL_text, "Object")==0 ) |
---|
1442 | tokreturn (TOK_OBJECT); |
---|
1443 | __IDL_lval.str = g_strdup (__IDL_text); |
---|
1444 | tokreturn (TOK_IDENT); |
---|
1445 | } |
---|
1446 | YY_BREAK |
---|
1447 | case 56: |
---|
1448 | YY_RULE_SETUP |
---|
1449 | #line 312 "./lexer.l" |
---|
1450 | { |
---|
1451 | __IDL_errorv ("`%s' is not a valid identifier in IDL", __IDL_text); |
---|
1452 | __IDL_error ("(Identifiers cannot start with an underscore)"); |
---|
1453 | __IDL_lval.str = g_strdup (__IDL_text); |
---|
1454 | tokreturn (TOK_IDENT); |
---|
1455 | } |
---|
1456 | YY_BREAK |
---|
1457 | case 57: |
---|
1458 | YY_RULE_SETUP |
---|
1459 | #line 318 "./lexer.l" |
---|
1460 | { |
---|
1461 | if (!warn_underscores) { |
---|
1462 | __IDL_warningv (IDL_WARNING2, |
---|
1463 | "`%s' underscores within identifiers are discouraged for use " |
---|
1464 | "with C-language IDL mappings", __IDL_text); |
---|
1465 | warn_underscores = 1; |
---|
1466 | } |
---|
1467 | __IDL_lval.str = g_strdup (__IDL_text); |
---|
1468 | tokreturn (TOK_IDENT); |
---|
1469 | } |
---|
1470 | YY_BREAK |
---|
1471 | case 58: |
---|
1472 | YY_RULE_SETUP |
---|
1473 | #line 328 "./lexer.l" |
---|
1474 | { |
---|
1475 | __IDL_flagsi &= ~IDLFP_PROPERTIES; |
---|
1476 | SELECT_RESTART; |
---|
1477 | tokreturn (__IDL_text[0]); |
---|
1478 | } |
---|
1479 | YY_BREAK |
---|
1480 | case 59: |
---|
1481 | YY_RULE_SETUP |
---|
1482 | #line 333 "./lexer.l" |
---|
1483 | { |
---|
1484 | __IDL_lval.str = g_strdup (__IDL_text); |
---|
1485 | tokreturn (TOK_PROP_KEY); |
---|
1486 | } |
---|
1487 | YY_BREAK |
---|
1488 | case 60: |
---|
1489 | YY_RULE_SETUP |
---|
1490 | #line 337 "./lexer.l" |
---|
1491 | { |
---|
1492 | __IDL_lval.str = g_strdup (__IDL_text + 1); |
---|
1493 | __IDL_lval.str[strlen (__IDL_lval.str) - 1] = 0; |
---|
1494 | tokreturn (TOK_PROP_VALUE); |
---|
1495 | } |
---|
1496 | YY_BREAK |
---|
1497 | case 61: |
---|
1498 | YY_RULE_SETUP |
---|
1499 | #line 342 "./lexer.l" |
---|
1500 | { |
---|
1501 | __IDL_flagsi &= ~IDLFP_NATIVE; |
---|
1502 | __IDL_lval.str = g_strdup (__IDL_text); |
---|
1503 | __IDL_lval.str[strlen (__IDL_lval.str) - 1] = 0; |
---|
1504 | tokreturn (TOK_NATIVE_TYPE); |
---|
1505 | } |
---|
1506 | YY_BREAK |
---|
1507 | case 62: |
---|
1508 | YY_RULE_SETUP |
---|
1509 | #line 348 "./lexer.l" |
---|
1510 | { |
---|
1511 | __IDL_lval.str = g_strdup (__IDL_text + 1); |
---|
1512 | __IDL_lval.str[strlen (__IDL_text) - 2] = 0; |
---|
1513 | tokreturn (TOK_SQSTRING); |
---|
1514 | } |
---|
1515 | YY_BREAK |
---|
1516 | case 63: |
---|
1517 | YY_RULE_SETUP |
---|
1518 | #line 353 "./lexer.l" |
---|
1519 | { |
---|
1520 | __IDL_lval.str = g_strdup (__IDL_text + 1); |
---|
1521 | __IDL_lval.str[strlen (__IDL_text) - 2] = 0; |
---|
1522 | tokreturn (TOK_DQSTRING); |
---|
1523 | } |
---|
1524 | YY_BREAK |
---|
1525 | case 64: |
---|
1526 | YY_RULE_SETUP |
---|
1527 | #line 358 "./lexer.l" |
---|
1528 | ++__IDL_cur_line; |
---|
1529 | YY_BREAK |
---|
1530 | case 65: |
---|
1531 | YY_RULE_SETUP |
---|
1532 | #line 359 "./lexer.l" |
---|
1533 | ; |
---|
1534 | YY_BREAK |
---|
1535 | case 66: |
---|
1536 | YY_RULE_SETUP |
---|
1537 | #line 360 "./lexer.l" |
---|
1538 | { |
---|
1539 | int c; |
---|
1540 | |
---|
1541 | while (1) { |
---|
1542 | while ((c = input ()) != '*' && c != EOF) |
---|
1543 | if (c == '\n') ++__IDL_cur_line; |
---|
1544 | if (c == '*') { |
---|
1545 | while ((c = input ()) == '*') ; |
---|
1546 | if (c == '/') break; |
---|
1547 | } |
---|
1548 | if (c == '\n') ++__IDL_cur_line; |
---|
1549 | if (c == EOF) { |
---|
1550 | __IDL_warning (IDL_WARNING1, "End of file in comment"); |
---|
1551 | break; |
---|
1552 | } |
---|
1553 | } |
---|
1554 | } |
---|
1555 | YY_BREAK |
---|
1556 | case 67: |
---|
1557 | YY_RULE_SETUP |
---|
1558 | #line 377 "./lexer.l" |
---|
1559 | tokreturn (__IDL_text[0]); |
---|
1560 | YY_BREAK |
---|
1561 | case 68: |
---|
1562 | YY_RULE_SETUP |
---|
1563 | #line 379 "./lexer.l" |
---|
1564 | ECHO; |
---|
1565 | YY_BREAK |
---|
1566 | case YY_STATE_EOF(INITIAL): |
---|
1567 | case YY_STATE_EOF(XP): |
---|
1568 | case YY_STATE_EOF(PROP): |
---|
1569 | case YY_STATE_EOF(NATIVE): |
---|
1570 | case YY_STATE_EOF(CFRG): |
---|
1571 | case YY_STATE_EOF(CFRGX): |
---|
1572 | __IDL_terminate(); |
---|
1573 | |
---|
1574 | case YY_END_OF_BUFFER: |
---|
1575 | { |
---|
1576 | /* Amount of text matched not including the EOB char. */ |
---|
1577 | int __IDL__amount_of_matched_text = (int) (__IDL__cp - __IDL_text_ptr) - 1; |
---|
1578 | |
---|
1579 | /* Undo the effects of YY_DO_BEFORE_ACTION. */ |
---|
1580 | *__IDL__cp = __IDL__hold_char; |
---|
1581 | YY_RESTORE_YY_MORE_OFFSET |
---|
1582 | |
---|
1583 | if ( __IDL__current_buffer->__IDL__buffer_status == YY_BUFFER_NEW ) |
---|
1584 | { |
---|
1585 | /* We're scanning a new file or input source. It's |
---|
1586 | * possible that this happened because the user |
---|
1587 | * just pointed __IDL_in at a new source and called |
---|
1588 | * __IDL_lex(). If so, then we have to assure |
---|
1589 | * consistency between __IDL__current_buffer and our |
---|
1590 | * globals. Here is the right place to do so, because |
---|
1591 | * this is the first action (other than possibly a |
---|
1592 | * back-up) that will match for the new input source. |
---|
1593 | */ |
---|
1594 | __IDL__n_chars = __IDL__current_buffer->__IDL__n_chars; |
---|
1595 | __IDL__current_buffer->__IDL__input_file = __IDL_in; |
---|
1596 | __IDL__current_buffer->__IDL__buffer_status = YY_BUFFER_NORMAL; |
---|
1597 | } |
---|
1598 | |
---|
1599 | /* Note that here we test for __IDL__c_buf_p "<=" to the position |
---|
1600 | * of the first EOB in the buffer, since __IDL__c_buf_p will |
---|
1601 | * already have been incremented past the NUL character |
---|
1602 | * (since all states make transitions on EOB to the |
---|
1603 | * end-of-buffer state). Contrast this with the test |
---|
1604 | * in input(). |
---|
1605 | */ |
---|
1606 | if ( __IDL__c_buf_p <= &__IDL__current_buffer->__IDL__ch_buf[__IDL__n_chars] ) |
---|
1607 | { /* This was really a NUL. */ |
---|
1608 | __IDL__state_type __IDL__next_state; |
---|
1609 | |
---|
1610 | __IDL__c_buf_p = __IDL_text_ptr + __IDL__amount_of_matched_text; |
---|
1611 | |
---|
1612 | __IDL__current_state = __IDL__get_previous_state(); |
---|
1613 | |
---|
1614 | /* Okay, we're now positioned to make the NUL |
---|
1615 | * transition. We couldn't have |
---|
1616 | * __IDL__get_previous_state() go ahead and do it |
---|
1617 | * for us because it doesn't know how to deal |
---|
1618 | * with the possibility of jamming (and we don't |
---|
1619 | * want to build jamming into it because then it |
---|
1620 | * will run more slowly). |
---|
1621 | */ |
---|
1622 | |
---|
1623 | __IDL__next_state = __IDL__try_NUL_trans( __IDL__current_state ); |
---|
1624 | |
---|
1625 | __IDL__bp = __IDL_text_ptr + YY_MORE_ADJ; |
---|
1626 | |
---|
1627 | if ( __IDL__next_state ) |
---|
1628 | { |
---|
1629 | /* Consume the NUL. */ |
---|
1630 | __IDL__cp = ++__IDL__c_buf_p; |
---|
1631 | __IDL__current_state = __IDL__next_state; |
---|
1632 | goto __IDL__match; |
---|
1633 | } |
---|
1634 | |
---|
1635 | else |
---|
1636 | { |
---|
1637 | __IDL__cp = __IDL__c_buf_p; |
---|
1638 | goto __IDL__find_action; |
---|
1639 | } |
---|
1640 | } |
---|
1641 | |
---|
1642 | else switch ( __IDL__get_next_buffer() ) |
---|
1643 | { |
---|
1644 | case EOB_ACT_END_OF_FILE: |
---|
1645 | { |
---|
1646 | __IDL__did_buffer_switch_on_eof = 0; |
---|
1647 | |
---|
1648 | if ( __IDL_wrap() ) |
---|
1649 | { |
---|
1650 | /* Note: because we've taken care in |
---|
1651 | * __IDL__get_next_buffer() to have set up |
---|
1652 | * __IDL_text, we can now set up |
---|
1653 | * __IDL__c_buf_p so that if some total |
---|
1654 | * hoser (like flex itself) wants to |
---|
1655 | * call the scanner after we return the |
---|
1656 | * YY_NULL, it'll still work - another |
---|
1657 | * YY_NULL will get returned. |
---|
1658 | */ |
---|
1659 | __IDL__c_buf_p = __IDL_text_ptr + YY_MORE_ADJ; |
---|
1660 | |
---|
1661 | __IDL__act = YY_STATE_EOF(YY_START); |
---|
1662 | goto do_action; |
---|
1663 | } |
---|
1664 | |
---|
1665 | else |
---|
1666 | { |
---|
1667 | if ( ! __IDL__did_buffer_switch_on_eof ) |
---|
1668 | YY_NEW_FILE; |
---|
1669 | } |
---|
1670 | break; |
---|
1671 | } |
---|
1672 | |
---|
1673 | case EOB_ACT_CONTINUE_SCAN: |
---|
1674 | __IDL__c_buf_p = |
---|
1675 | __IDL_text_ptr + __IDL__amount_of_matched_text; |
---|
1676 | |
---|
1677 | __IDL__current_state = __IDL__get_previous_state(); |
---|
1678 | |
---|
1679 | __IDL__cp = __IDL__c_buf_p; |
---|
1680 | __IDL__bp = __IDL_text_ptr + YY_MORE_ADJ; |
---|
1681 | goto __IDL__match; |
---|
1682 | |
---|
1683 | case EOB_ACT_LAST_MATCH: |
---|
1684 | __IDL__c_buf_p = |
---|
1685 | &__IDL__current_buffer->__IDL__ch_buf[__IDL__n_chars]; |
---|
1686 | |
---|
1687 | __IDL__current_state = __IDL__get_previous_state(); |
---|
1688 | |
---|
1689 | __IDL__cp = __IDL__c_buf_p; |
---|
1690 | __IDL__bp = __IDL_text_ptr + YY_MORE_ADJ; |
---|
1691 | goto __IDL__find_action; |
---|
1692 | } |
---|
1693 | break; |
---|
1694 | } |
---|
1695 | |
---|
1696 | default: |
---|
1697 | YY_FATAL_ERROR( |
---|
1698 | "fatal flex scanner internal error--no action found" ); |
---|
1699 | } /* end of action switch */ |
---|
1700 | } /* end of scanning one token */ |
---|
1701 | } /* end of __IDL_lex */ |
---|
1702 | |
---|
1703 | |
---|
1704 | /* __IDL__get_next_buffer - try to read in a new buffer |
---|
1705 | * |
---|
1706 | * Returns a code representing an action: |
---|
1707 | * EOB_ACT_LAST_MATCH - |
---|
1708 | * EOB_ACT_CONTINUE_SCAN - continue scanning from current position |
---|
1709 | * EOB_ACT_END_OF_FILE - end of file |
---|
1710 | */ |
---|
1711 | |
---|
1712 | static int __IDL__get_next_buffer() |
---|
1713 | { |
---|
1714 | register char *dest = __IDL__current_buffer->__IDL__ch_buf; |
---|
1715 | register char *source = __IDL_text_ptr; |
---|
1716 | register int number_to_move, i; |
---|
1717 | int ret_val; |
---|
1718 | |
---|
1719 | if ( __IDL__c_buf_p > &__IDL__current_buffer->__IDL__ch_buf[__IDL__n_chars + 1] ) |
---|
1720 | YY_FATAL_ERROR( |
---|
1721 | "fatal flex scanner internal error--end of buffer missed" ); |
---|
1722 | |
---|
1723 | if ( __IDL__current_buffer->__IDL__fill_buffer == 0 ) |
---|
1724 | { /* Don't try to fill the buffer, so this is an EOF. */ |
---|
1725 | if ( __IDL__c_buf_p - __IDL_text_ptr - YY_MORE_ADJ == 1 ) |
---|
1726 | { |
---|
1727 | /* We matched a single character, the EOB, so |
---|
1728 | * treat this as a final EOF. |
---|
1729 | */ |
---|
1730 | return EOB_ACT_END_OF_FILE; |
---|
1731 | } |
---|
1732 | |
---|
1733 | else |
---|
1734 | { |
---|
1735 | /* We matched some text prior to the EOB, first |
---|
1736 | * process it. |
---|
1737 | */ |
---|
1738 | return EOB_ACT_LAST_MATCH; |
---|
1739 | } |
---|
1740 | } |
---|
1741 | |
---|
1742 | /* Try to read more data. */ |
---|
1743 | |
---|
1744 | /* First move last chars to start of buffer. */ |
---|
1745 | number_to_move = (int) (__IDL__c_buf_p - __IDL_text_ptr) - 1; |
---|
1746 | |
---|
1747 | for ( i = 0; i < number_to_move; ++i ) |
---|
1748 | *(dest++) = *(source++); |
---|
1749 | |
---|
1750 | if ( __IDL__current_buffer->__IDL__buffer_status == YY_BUFFER_EOF_PENDING ) |
---|
1751 | /* don't do the read, it's not guaranteed to return an EOF, |
---|
1752 | * just force an EOF |
---|
1753 | */ |
---|
1754 | __IDL__current_buffer->__IDL__n_chars = __IDL__n_chars = 0; |
---|
1755 | |
---|
1756 | else |
---|
1757 | { |
---|
1758 | int num_to_read = |
---|
1759 | __IDL__current_buffer->__IDL__buf_size - number_to_move - 1; |
---|
1760 | |
---|
1761 | while ( num_to_read <= 0 ) |
---|
1762 | { /* Not enough room in the buffer - grow it. */ |
---|
1763 | #ifdef YY_USES_REJECT |
---|
1764 | YY_FATAL_ERROR( |
---|
1765 | "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); |
---|
1766 | #else |
---|
1767 | |
---|
1768 | /* just a shorter name for the current buffer */ |
---|
1769 | YY_BUFFER_STATE b = __IDL__current_buffer; |
---|
1770 | |
---|
1771 | int __IDL__c_buf_p_offset = |
---|
1772 | (int) (__IDL__c_buf_p - b->__IDL__ch_buf); |
---|
1773 | |
---|
1774 | if ( b->__IDL__is_our_buffer ) |
---|
1775 | { |
---|
1776 | int new_size = b->__IDL__buf_size * 2; |
---|
1777 | |
---|
1778 | if ( new_size <= 0 ) |
---|
1779 | b->__IDL__buf_size += b->__IDL__buf_size / 8; |
---|
1780 | else |
---|
1781 | b->__IDL__buf_size *= 2; |
---|
1782 | |
---|
1783 | b->__IDL__ch_buf = (char *) |
---|
1784 | /* Include room in for 2 EOB chars. */ |
---|
1785 | __IDL__flex_realloc( (void *) b->__IDL__ch_buf, |
---|
1786 | b->__IDL__buf_size + 2 ); |
---|
1787 | } |
---|
1788 | else |
---|
1789 | /* Can't grow it, we don't own it. */ |
---|
1790 | b->__IDL__ch_buf = 0; |
---|
1791 | |
---|
1792 | if ( ! b->__IDL__ch_buf ) |
---|
1793 | YY_FATAL_ERROR( |
---|
1794 | "fatal error - scanner input buffer overflow" ); |
---|
1795 | |
---|
1796 | __IDL__c_buf_p = &b->__IDL__ch_buf[__IDL__c_buf_p_offset]; |
---|
1797 | |
---|
1798 | num_to_read = __IDL__current_buffer->__IDL__buf_size - |
---|
1799 | number_to_move - 1; |
---|
1800 | #endif |
---|
1801 | } |
---|
1802 | |
---|
1803 | if ( num_to_read > YY_READ_BUF_SIZE ) |
---|
1804 | num_to_read = YY_READ_BUF_SIZE; |
---|
1805 | |
---|
1806 | /* Read in more data. */ |
---|
1807 | YY_INPUT( (&__IDL__current_buffer->__IDL__ch_buf[number_to_move]), |
---|
1808 | __IDL__n_chars, num_to_read ); |
---|
1809 | |
---|
1810 | __IDL__current_buffer->__IDL__n_chars = __IDL__n_chars; |
---|
1811 | } |
---|
1812 | |
---|
1813 | if ( __IDL__n_chars == 0 ) |
---|
1814 | { |
---|
1815 | if ( number_to_move == YY_MORE_ADJ ) |
---|
1816 | { |
---|
1817 | ret_val = EOB_ACT_END_OF_FILE; |
---|
1818 | __IDL_restart( __IDL_in ); |
---|
1819 | } |
---|
1820 | |
---|
1821 | else |
---|
1822 | { |
---|
1823 | ret_val = EOB_ACT_LAST_MATCH; |
---|
1824 | __IDL__current_buffer->__IDL__buffer_status = |
---|
1825 | YY_BUFFER_EOF_PENDING; |
---|
1826 | } |
---|
1827 | } |
---|
1828 | |
---|
1829 | else |
---|
1830 | ret_val = EOB_ACT_CONTINUE_SCAN; |
---|
1831 | |
---|
1832 | __IDL__n_chars += number_to_move; |
---|
1833 | __IDL__current_buffer->__IDL__ch_buf[__IDL__n_chars] = YY_END_OF_BUFFER_CHAR; |
---|
1834 | __IDL__current_buffer->__IDL__ch_buf[__IDL__n_chars + 1] = YY_END_OF_BUFFER_CHAR; |
---|
1835 | |
---|
1836 | __IDL_text_ptr = &__IDL__current_buffer->__IDL__ch_buf[0]; |
---|
1837 | |
---|
1838 | return ret_val; |
---|
1839 | } |
---|
1840 | |
---|
1841 | |
---|
1842 | /* __IDL__get_previous_state - get the state just before the EOB char was reached */ |
---|
1843 | |
---|
1844 | static __IDL__state_type __IDL__get_previous_state() |
---|
1845 | { |
---|
1846 | register __IDL__state_type __IDL__current_state; |
---|
1847 | register char *__IDL__cp; |
---|
1848 | |
---|
1849 | __IDL__current_state = __IDL__start; |
---|
1850 | __IDL__current_state += YY_AT_BOL(); |
---|
1851 | |
---|
1852 | for ( __IDL__cp = __IDL_text_ptr + YY_MORE_ADJ; __IDL__cp < __IDL__c_buf_p; ++__IDL__cp ) |
---|
1853 | { |
---|
1854 | register YY_CHAR __IDL__c = (*__IDL__cp ? __IDL__ec[YY_SC_TO_UI(*__IDL__cp)] : 1); |
---|
1855 | if ( __IDL__accept[__IDL__current_state] ) |
---|
1856 | { |
---|
1857 | __IDL__last_accepting_state = __IDL__current_state; |
---|
1858 | __IDL__last_accepting_cpos = __IDL__cp; |
---|
1859 | } |
---|
1860 | while ( __IDL__chk[__IDL__base[__IDL__current_state] + __IDL__c] != __IDL__current_state ) |
---|
1861 | { |
---|
1862 | __IDL__current_state = (int) __IDL__def[__IDL__current_state]; |
---|
1863 | if ( __IDL__current_state >= 351 ) |
---|
1864 | __IDL__c = __IDL__meta[(unsigned int) __IDL__c]; |
---|
1865 | } |
---|
1866 | __IDL__current_state = __IDL__nxt[__IDL__base[__IDL__current_state] + (unsigned int) __IDL__c]; |
---|
1867 | } |
---|
1868 | |
---|
1869 | return __IDL__current_state; |
---|
1870 | } |
---|
1871 | |
---|
1872 | |
---|
1873 | /* __IDL__try_NUL_trans - try to make a transition on the NUL character |
---|
1874 | * |
---|
1875 | * synopsis |
---|
1876 | * next_state = __IDL__try_NUL_trans( current_state ); |
---|
1877 | */ |
---|
1878 | |
---|
1879 | #ifdef YY_USE_PROTOS |
---|
1880 | static __IDL__state_type __IDL__try_NUL_trans( __IDL__state_type __IDL__current_state ) |
---|
1881 | #else |
---|
1882 | static __IDL__state_type __IDL__try_NUL_trans( __IDL__current_state ) |
---|
1883 | __IDL__state_type __IDL__current_state; |
---|
1884 | #endif |
---|
1885 | { |
---|
1886 | register int __IDL__is_jam; |
---|
1887 | register char *__IDL__cp = __IDL__c_buf_p; |
---|
1888 | |
---|
1889 | register YY_CHAR __IDL__c = 1; |
---|
1890 | if ( __IDL__accept[__IDL__current_state] ) |
---|
1891 | { |
---|
1892 | __IDL__last_accepting_state = __IDL__current_state; |
---|
1893 | __IDL__last_accepting_cpos = __IDL__cp; |
---|
1894 | } |
---|
1895 | while ( __IDL__chk[__IDL__base[__IDL__current_state] + __IDL__c] != __IDL__current_state ) |
---|
1896 | { |
---|
1897 | __IDL__current_state = (int) __IDL__def[__IDL__current_state]; |
---|
1898 | if ( __IDL__current_state >= 351 ) |
---|
1899 | __IDL__c = __IDL__meta[(unsigned int) __IDL__c]; |
---|
1900 | } |
---|
1901 | __IDL__current_state = __IDL__nxt[__IDL__base[__IDL__current_state] + (unsigned int) __IDL__c]; |
---|
1902 | __IDL__is_jam = (__IDL__current_state == 350); |
---|
1903 | |
---|
1904 | return __IDL__is_jam ? 0 : __IDL__current_state; |
---|
1905 | } |
---|
1906 | |
---|
1907 | |
---|
1908 | #ifndef YY_NO_UNPUT |
---|
1909 | #ifdef YY_USE_PROTOS |
---|
1910 | static void __IDL_unput( int c, register char *__IDL__bp ) |
---|
1911 | #else |
---|
1912 | static void __IDL_unput( c, __IDL__bp ) |
---|
1913 | int c; |
---|
1914 | register char *__IDL__bp; |
---|
1915 | #endif |
---|
1916 | { |
---|
1917 | register char *__IDL__cp = __IDL__c_buf_p; |
---|
1918 | |
---|
1919 | /* undo effects of setting up __IDL_text */ |
---|
1920 | *__IDL__cp = __IDL__hold_char; |
---|
1921 | |
---|
1922 | if ( __IDL__cp < __IDL__current_buffer->__IDL__ch_buf + 2 ) |
---|
1923 | { /* need to shift things up to make room */ |
---|
1924 | /* +2 for EOB chars. */ |
---|
1925 | register int number_to_move = __IDL__n_chars + 2; |
---|
1926 | register char *dest = &__IDL__current_buffer->__IDL__ch_buf[ |
---|
1927 | __IDL__current_buffer->__IDL__buf_size + 2]; |
---|
1928 | register char *source = |
---|
1929 | &__IDL__current_buffer->__IDL__ch_buf[number_to_move]; |
---|
1930 | |
---|
1931 | while ( source > __IDL__current_buffer->__IDL__ch_buf ) |
---|
1932 | *--dest = *--source; |
---|
1933 | |
---|
1934 | __IDL__cp += (int) (dest - source); |
---|
1935 | __IDL__bp += (int) (dest - source); |
---|
1936 | __IDL__current_buffer->__IDL__n_chars = |
---|
1937 | __IDL__n_chars = __IDL__current_buffer->__IDL__buf_size; |
---|
1938 | |
---|
1939 | if ( __IDL__cp < __IDL__current_buffer->__IDL__ch_buf + 2 ) |
---|
1940 | YY_FATAL_ERROR( "flex scanner push-back overflow" ); |
---|
1941 | } |
---|
1942 | |
---|
1943 | *--__IDL__cp = (char) c; |
---|
1944 | |
---|
1945 | |
---|
1946 | __IDL_text_ptr = __IDL__bp; |
---|
1947 | __IDL__hold_char = *__IDL__cp; |
---|
1948 | __IDL__c_buf_p = __IDL__cp; |
---|
1949 | } |
---|
1950 | #endif /* ifndef YY_NO_UNPUT */ |
---|
1951 | |
---|
1952 | |
---|
1953 | #ifdef __cplusplus |
---|
1954 | static int __IDL_input() |
---|
1955 | #else |
---|
1956 | static int input() |
---|
1957 | #endif |
---|
1958 | { |
---|
1959 | int c; |
---|
1960 | |
---|
1961 | *__IDL__c_buf_p = __IDL__hold_char; |
---|
1962 | |
---|
1963 | if ( *__IDL__c_buf_p == YY_END_OF_BUFFER_CHAR ) |
---|
1964 | { |
---|
1965 | /* __IDL__c_buf_p now points to the character we want to return. |
---|
1966 | * If this occurs *before* the EOB characters, then it's a |
---|
1967 | * valid NUL; if not, then we've hit the end of the buffer. |
---|
1968 | */ |
---|
1969 | if ( __IDL__c_buf_p < &__IDL__current_buffer->__IDL__ch_buf[__IDL__n_chars] ) |
---|
1970 | /* This was really a NUL. */ |
---|
1971 | *__IDL__c_buf_p = '\0'; |
---|
1972 | |
---|
1973 | else |
---|
1974 | { /* need more input */ |
---|
1975 | int offset = __IDL__c_buf_p - __IDL_text_ptr; |
---|
1976 | ++__IDL__c_buf_p; |
---|
1977 | |
---|
1978 | switch ( __IDL__get_next_buffer() ) |
---|
1979 | { |
---|
1980 | case EOB_ACT_LAST_MATCH: |
---|
1981 | /* This happens because __IDL__g_n_b() |
---|
1982 | * sees that we've accumulated a |
---|
1983 | * token and flags that we need to |
---|
1984 | * try matching the token before |
---|
1985 | * proceeding. But for input(), |
---|
1986 | * there's no matching to consider. |
---|
1987 | * So convert the EOB_ACT_LAST_MATCH |
---|
1988 | * to EOB_ACT_END_OF_FILE. |
---|
1989 | */ |
---|
1990 | |
---|
1991 | /* Reset buffer status. */ |
---|
1992 | __IDL_restart( __IDL_in ); |
---|
1993 | |
---|
1994 | /* fall through */ |
---|
1995 | |
---|
1996 | case EOB_ACT_END_OF_FILE: |
---|
1997 | { |
---|
1998 | if ( __IDL_wrap() ) |
---|
1999 | return EOF; |
---|
2000 | |
---|
2001 | if ( ! __IDL__did_buffer_switch_on_eof ) |
---|
2002 | YY_NEW_FILE; |
---|
2003 | #ifdef __cplusplus |
---|
2004 | return __IDL_input(); |
---|
2005 | #else |
---|
2006 | return input(); |
---|
2007 | #endif |
---|
2008 | } |
---|
2009 | |
---|
2010 | case EOB_ACT_CONTINUE_SCAN: |
---|
2011 | __IDL__c_buf_p = __IDL_text_ptr + offset; |
---|
2012 | break; |
---|
2013 | } |
---|
2014 | } |
---|
2015 | } |
---|
2016 | |
---|
2017 | c = *(unsigned char *) __IDL__c_buf_p; /* cast for 8-bit char's */ |
---|
2018 | *__IDL__c_buf_p = '\0'; /* preserve __IDL_text */ |
---|
2019 | __IDL__hold_char = *++__IDL__c_buf_p; |
---|
2020 | |
---|
2021 | __IDL__current_buffer->__IDL__at_bol = (c == '\n'); |
---|
2022 | |
---|
2023 | return c; |
---|
2024 | } |
---|
2025 | |
---|
2026 | |
---|
2027 | #ifdef YY_USE_PROTOS |
---|
2028 | void __IDL_restart( FILE *input_file ) |
---|
2029 | #else |
---|
2030 | void __IDL_restart( input_file ) |
---|
2031 | FILE *input_file; |
---|
2032 | #endif |
---|
2033 | { |
---|
2034 | if ( ! __IDL__current_buffer ) |
---|
2035 | __IDL__current_buffer = __IDL__create_buffer( __IDL_in, YY_BUF_SIZE ); |
---|
2036 | |
---|
2037 | __IDL__init_buffer( __IDL__current_buffer, input_file ); |
---|
2038 | __IDL__load_buffer_state(); |
---|
2039 | } |
---|
2040 | |
---|
2041 | |
---|
2042 | #ifdef YY_USE_PROTOS |
---|
2043 | void __IDL__switch_to_buffer( YY_BUFFER_STATE new_buffer ) |
---|
2044 | #else |
---|
2045 | void __IDL__switch_to_buffer( new_buffer ) |
---|
2046 | YY_BUFFER_STATE new_buffer; |
---|
2047 | #endif |
---|
2048 | { |
---|
2049 | if ( __IDL__current_buffer == new_buffer ) |
---|
2050 | return; |
---|
2051 | |
---|
2052 | if ( __IDL__current_buffer ) |
---|
2053 | { |
---|
2054 | /* Flush out information for old buffer. */ |
---|
2055 | *__IDL__c_buf_p = __IDL__hold_char; |
---|
2056 | __IDL__current_buffer->__IDL__buf_pos = __IDL__c_buf_p; |
---|
2057 | __IDL__current_buffer->__IDL__n_chars = __IDL__n_chars; |
---|
2058 | } |
---|
2059 | |
---|
2060 | __IDL__current_buffer = new_buffer; |
---|
2061 | __IDL__load_buffer_state(); |
---|
2062 | |
---|
2063 | /* We don't actually know whether we did this switch during |
---|
2064 | * EOF (__IDL_wrap()) processing, but the only time this flag |
---|
2065 | * is looked at is after __IDL_wrap() is called, so it's safe |
---|
2066 | * to go ahead and always set it. |
---|
2067 | */ |
---|
2068 | __IDL__did_buffer_switch_on_eof = 1; |
---|
2069 | } |
---|
2070 | |
---|
2071 | |
---|
2072 | #ifdef YY_USE_PROTOS |
---|
2073 | void __IDL__load_buffer_state( void ) |
---|
2074 | #else |
---|
2075 | void __IDL__load_buffer_state() |
---|
2076 | #endif |
---|
2077 | { |
---|
2078 | __IDL__n_chars = __IDL__current_buffer->__IDL__n_chars; |
---|
2079 | __IDL_text_ptr = __IDL__c_buf_p = __IDL__current_buffer->__IDL__buf_pos; |
---|
2080 | __IDL_in = __IDL__current_buffer->__IDL__input_file; |
---|
2081 | __IDL__hold_char = *__IDL__c_buf_p; |
---|
2082 | } |
---|
2083 | |
---|
2084 | |
---|
2085 | #ifdef YY_USE_PROTOS |
---|
2086 | YY_BUFFER_STATE __IDL__create_buffer( FILE *file, int size ) |
---|
2087 | #else |
---|
2088 | YY_BUFFER_STATE __IDL__create_buffer( file, size ) |
---|
2089 | FILE *file; |
---|
2090 | int size; |
---|
2091 | #endif |
---|
2092 | { |
---|
2093 | YY_BUFFER_STATE b; |
---|
2094 | |
---|
2095 | b = (YY_BUFFER_STATE) __IDL__flex_alloc( sizeof( struct __IDL__buffer_state ) ); |
---|
2096 | if ( ! b ) |
---|
2097 | YY_FATAL_ERROR( "out of dynamic memory in __IDL__create_buffer()" ); |
---|
2098 | |
---|
2099 | b->__IDL__buf_size = size; |
---|
2100 | |
---|
2101 | /* __IDL__ch_buf has to be 2 characters longer than the size given because |
---|
2102 | * we need to put in 2 end-of-buffer characters. |
---|
2103 | */ |
---|
2104 | b->__IDL__ch_buf = (char *) __IDL__flex_alloc( b->__IDL__buf_size + 2 ); |
---|
2105 | if ( ! b->__IDL__ch_buf ) |
---|
2106 | YY_FATAL_ERROR( "out of dynamic memory in __IDL__create_buffer()" ); |
---|
2107 | |
---|
2108 | b->__IDL__is_our_buffer = 1; |
---|
2109 | |
---|
2110 | __IDL__init_buffer( b, file ); |
---|
2111 | |
---|
2112 | return b; |
---|
2113 | } |
---|
2114 | |
---|
2115 | |
---|
2116 | #ifdef YY_USE_PROTOS |
---|
2117 | void __IDL__delete_buffer( YY_BUFFER_STATE b ) |
---|
2118 | #else |
---|
2119 | void __IDL__delete_buffer( b ) |
---|
2120 | YY_BUFFER_STATE b; |
---|
2121 | #endif |
---|
2122 | { |
---|
2123 | if ( ! b ) |
---|
2124 | return; |
---|
2125 | |
---|
2126 | if ( b == __IDL__current_buffer ) |
---|
2127 | __IDL__current_buffer = (YY_BUFFER_STATE) 0; |
---|
2128 | |
---|
2129 | if ( b->__IDL__is_our_buffer ) |
---|
2130 | __IDL__flex_free( (void *) b->__IDL__ch_buf ); |
---|
2131 | |
---|
2132 | __IDL__flex_free( (void *) b ); |
---|
2133 | } |
---|
2134 | |
---|
2135 | |
---|
2136 | |
---|
2137 | #ifdef YY_USE_PROTOS |
---|
2138 | void __IDL__init_buffer( YY_BUFFER_STATE b, FILE *file ) |
---|
2139 | #else |
---|
2140 | void __IDL__init_buffer( b, file ) |
---|
2141 | YY_BUFFER_STATE b; |
---|
2142 | FILE *file; |
---|
2143 | #endif |
---|
2144 | |
---|
2145 | |
---|
2146 | { |
---|
2147 | __IDL__flush_buffer( b ); |
---|
2148 | |
---|
2149 | b->__IDL__input_file = file; |
---|
2150 | b->__IDL__fill_buffer = 1; |
---|
2151 | |
---|
2152 | #if YY_ALWAYS_INTERACTIVE |
---|
2153 | b->__IDL__is_interactive = 1; |
---|
2154 | #else |
---|
2155 | #if YY_NEVER_INTERACTIVE |
---|
2156 | b->__IDL__is_interactive = 0; |
---|
2157 | #else |
---|
2158 | b->__IDL__is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; |
---|
2159 | #endif |
---|
2160 | #endif |
---|
2161 | } |
---|
2162 | |
---|
2163 | |
---|
2164 | #ifdef YY_USE_PROTOS |
---|
2165 | void __IDL__flush_buffer( YY_BUFFER_STATE b ) |
---|
2166 | #else |
---|
2167 | void __IDL__flush_buffer( b ) |
---|
2168 | YY_BUFFER_STATE b; |
---|
2169 | #endif |
---|
2170 | |
---|
2171 | { |
---|
2172 | if ( ! b ) |
---|
2173 | return; |
---|
2174 | |
---|
2175 | b->__IDL__n_chars = 0; |
---|
2176 | |
---|
2177 | /* We always need two end-of-buffer characters. The first causes |
---|
2178 | * a transition to the end-of-buffer state. The second causes |
---|
2179 | * a jam in that state. |
---|
2180 | */ |
---|
2181 | b->__IDL__ch_buf[0] = YY_END_OF_BUFFER_CHAR; |
---|
2182 | b->__IDL__ch_buf[1] = YY_END_OF_BUFFER_CHAR; |
---|
2183 | |
---|
2184 | b->__IDL__buf_pos = &b->__IDL__ch_buf[0]; |
---|
2185 | |
---|
2186 | b->__IDL__at_bol = 1; |
---|
2187 | b->__IDL__buffer_status = YY_BUFFER_NEW; |
---|
2188 | |
---|
2189 | if ( b == __IDL__current_buffer ) |
---|
2190 | __IDL__load_buffer_state(); |
---|
2191 | } |
---|
2192 | |
---|
2193 | |
---|
2194 | #ifndef YY_NO_SCAN_BUFFER |
---|
2195 | #ifdef YY_USE_PROTOS |
---|
2196 | YY_BUFFER_STATE __IDL__scan_buffer( char *base, __IDL__size_t size ) |
---|
2197 | #else |
---|
2198 | YY_BUFFER_STATE __IDL__scan_buffer( base, size ) |
---|
2199 | char *base; |
---|
2200 | __IDL__size_t size; |
---|
2201 | #endif |
---|
2202 | { |
---|
2203 | YY_BUFFER_STATE b; |
---|
2204 | |
---|
2205 | if ( size < 2 || |
---|
2206 | base[size-2] != YY_END_OF_BUFFER_CHAR || |
---|
2207 | base[size-1] != YY_END_OF_BUFFER_CHAR ) |
---|
2208 | /* They forgot to leave room for the EOB's. */ |
---|
2209 | return 0; |
---|
2210 | |
---|
2211 | b = (YY_BUFFER_STATE) __IDL__flex_alloc( sizeof( struct __IDL__buffer_state ) ); |
---|
2212 | if ( ! b ) |
---|
2213 | YY_FATAL_ERROR( "out of dynamic memory in __IDL__scan_buffer()" ); |
---|
2214 | |
---|
2215 | b->__IDL__buf_size = size - 2; /* "- 2" to take care of EOB's */ |
---|
2216 | b->__IDL__buf_pos = b->__IDL__ch_buf = base; |
---|
2217 | b->__IDL__is_our_buffer = 0; |
---|
2218 | b->__IDL__input_file = 0; |
---|
2219 | b->__IDL__n_chars = b->__IDL__buf_size; |
---|
2220 | b->__IDL__is_interactive = 0; |
---|
2221 | b->__IDL__at_bol = 1; |
---|
2222 | b->__IDL__fill_buffer = 0; |
---|
2223 | b->__IDL__buffer_status = YY_BUFFER_NEW; |
---|
2224 | |
---|
2225 | __IDL__switch_to_buffer( b ); |
---|
2226 | |
---|
2227 | return b; |
---|
2228 | } |
---|
2229 | #endif |
---|
2230 | |
---|
2231 | |
---|
2232 | #ifndef YY_NO_SCAN_STRING |
---|
2233 | #ifdef YY_USE_PROTOS |
---|
2234 | YY_BUFFER_STATE __IDL__scan_string( __IDL_const char *__IDL__str ) |
---|
2235 | #else |
---|
2236 | YY_BUFFER_STATE __IDL__scan_string( __IDL__str ) |
---|
2237 | __IDL_const char *__IDL__str; |
---|
2238 | #endif |
---|
2239 | { |
---|
2240 | int len; |
---|
2241 | for ( len = 0; __IDL__str[len]; ++len ) |
---|
2242 | ; |
---|
2243 | |
---|
2244 | return __IDL__scan_bytes( __IDL__str, len ); |
---|
2245 | } |
---|
2246 | #endif |
---|
2247 | |
---|
2248 | |
---|
2249 | #ifndef YY_NO_SCAN_BYTES |
---|
2250 | #ifdef YY_USE_PROTOS |
---|
2251 | YY_BUFFER_STATE __IDL__scan_bytes( __IDL_const char *bytes, int len ) |
---|
2252 | #else |
---|
2253 | YY_BUFFER_STATE __IDL__scan_bytes( bytes, len ) |
---|
2254 | __IDL_const char *bytes; |
---|
2255 | int len; |
---|
2256 | #endif |
---|
2257 | { |
---|
2258 | YY_BUFFER_STATE b; |
---|
2259 | char *buf; |
---|
2260 | __IDL__size_t n; |
---|
2261 | int i; |
---|
2262 | |
---|
2263 | /* Get memory for full buffer, including space for trailing EOB's. */ |
---|
2264 | n = len + 2; |
---|
2265 | buf = (char *) __IDL__flex_alloc( n ); |
---|
2266 | if ( ! buf ) |
---|
2267 | YY_FATAL_ERROR( "out of dynamic memory in __IDL__scan_bytes()" ); |
---|
2268 | |
---|
2269 | for ( i = 0; i < len; ++i ) |
---|
2270 | buf[i] = bytes[i]; |
---|
2271 | |
---|
2272 | buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; |
---|
2273 | |
---|
2274 | b = __IDL__scan_buffer( buf, n ); |
---|
2275 | if ( ! b ) |
---|
2276 | YY_FATAL_ERROR( "bad buffer in __IDL__scan_bytes()" ); |
---|
2277 | |
---|
2278 | /* It's okay to grow etc. this buffer, and we should throw it |
---|
2279 | * away when we're done. |
---|
2280 | */ |
---|
2281 | b->__IDL__is_our_buffer = 1; |
---|
2282 | |
---|
2283 | return b; |
---|
2284 | } |
---|
2285 | #endif |
---|
2286 | |
---|
2287 | |
---|
2288 | #ifndef YY_NO_PUSH_STATE |
---|
2289 | #ifdef YY_USE_PROTOS |
---|
2290 | static void __IDL__push_state( int new_state ) |
---|
2291 | #else |
---|
2292 | static void __IDL__push_state( new_state ) |
---|
2293 | int new_state; |
---|
2294 | #endif |
---|
2295 | { |
---|
2296 | if ( __IDL__start_stack_ptr >= __IDL__start_stack_depth ) |
---|
2297 | { |
---|
2298 | __IDL__size_t new_size; |
---|
2299 | |
---|
2300 | __IDL__start_stack_depth += YY_START_STACK_INCR; |
---|
2301 | new_size = __IDL__start_stack_depth * sizeof( int ); |
---|
2302 | |
---|
2303 | if ( ! __IDL__start_stack ) |
---|
2304 | __IDL__start_stack = (int *) __IDL__flex_alloc( new_size ); |
---|
2305 | |
---|
2306 | else |
---|
2307 | __IDL__start_stack = (int *) __IDL__flex_realloc( |
---|
2308 | (void *) __IDL__start_stack, new_size ); |
---|
2309 | |
---|
2310 | if ( ! __IDL__start_stack ) |
---|
2311 | YY_FATAL_ERROR( |
---|
2312 | "out of memory expanding start-condition stack" ); |
---|
2313 | } |
---|
2314 | |
---|
2315 | __IDL__start_stack[__IDL__start_stack_ptr++] = YY_START; |
---|
2316 | |
---|
2317 | BEGIN(new_state); |
---|
2318 | } |
---|
2319 | #endif |
---|
2320 | |
---|
2321 | |
---|
2322 | #ifndef YY_NO_POP_STATE |
---|
2323 | static void __IDL__pop_state() |
---|
2324 | { |
---|
2325 | if ( --__IDL__start_stack_ptr < 0 ) |
---|
2326 | YY_FATAL_ERROR( "start-condition stack underflow" ); |
---|
2327 | |
---|
2328 | BEGIN(__IDL__start_stack[__IDL__start_stack_ptr]); |
---|
2329 | } |
---|
2330 | #endif |
---|
2331 | |
---|
2332 | |
---|
2333 | #ifndef YY_NO_TOP_STATE |
---|
2334 | static int __IDL__top_state() |
---|
2335 | { |
---|
2336 | return __IDL__start_stack[__IDL__start_stack_ptr - 1]; |
---|
2337 | } |
---|
2338 | #endif |
---|
2339 | |
---|
2340 | #ifndef YY_EXIT_FAILURE |
---|
2341 | #define YY_EXIT_FAILURE 2 |
---|
2342 | #endif |
---|
2343 | |
---|
2344 | #ifdef YY_USE_PROTOS |
---|
2345 | static void __IDL__fatal_error( __IDL_const char msg[] ) |
---|
2346 | #else |
---|
2347 | static void __IDL__fatal_error( msg ) |
---|
2348 | char msg[]; |
---|
2349 | #endif |
---|
2350 | { |
---|
2351 | (void) fprintf( stderr, "%s\n", msg ); |
---|
2352 | exit( YY_EXIT_FAILURE ); |
---|
2353 | } |
---|
2354 | |
---|
2355 | |
---|
2356 | |
---|
2357 | /* Redefine __IDL_less() so it works in section 3 code. */ |
---|
2358 | |
---|
2359 | #undef __IDL_less |
---|
2360 | #define __IDL_less(n) \ |
---|
2361 | do \ |
---|
2362 | { \ |
---|
2363 | /* Undo effects of setting up __IDL_text. */ \ |
---|
2364 | __IDL_text[__IDL_leng] = __IDL__hold_char; \ |
---|
2365 | __IDL__c_buf_p = __IDL_text + n; \ |
---|
2366 | __IDL__hold_char = *__IDL__c_buf_p; \ |
---|
2367 | *__IDL__c_buf_p = '\0'; \ |
---|
2368 | __IDL_leng = n; \ |
---|
2369 | } \ |
---|
2370 | while ( 0 ) |
---|
2371 | |
---|
2372 | |
---|
2373 | /* Internal utility routines. */ |
---|
2374 | |
---|
2375 | #ifndef __IDL_text_ptr |
---|
2376 | #ifdef YY_USE_PROTOS |
---|
2377 | static void __IDL__flex_strncpy( char *s1, __IDL_const char *s2, int n ) |
---|
2378 | #else |
---|
2379 | static void __IDL__flex_strncpy( s1, s2, n ) |
---|
2380 | char *s1; |
---|
2381 | __IDL_const char *s2; |
---|
2382 | int n; |
---|
2383 | #endif |
---|
2384 | { |
---|
2385 | register int i; |
---|
2386 | for ( i = 0; i < n; ++i ) |
---|
2387 | s1[i] = s2[i]; |
---|
2388 | } |
---|
2389 | #endif |
---|
2390 | |
---|
2391 | #ifdef YY_NEED_STRLEN |
---|
2392 | #ifdef YY_USE_PROTOS |
---|
2393 | static int __IDL__flex_strlen( __IDL_const char *s ) |
---|
2394 | #else |
---|
2395 | static int __IDL__flex_strlen( s ) |
---|
2396 | __IDL_const char *s; |
---|
2397 | #endif |
---|
2398 | { |
---|
2399 | register int n; |
---|
2400 | for ( n = 0; s[n]; ++n ) |
---|
2401 | ; |
---|
2402 | |
---|
2403 | return n; |
---|
2404 | } |
---|
2405 | #endif |
---|
2406 | |
---|
2407 | |
---|
2408 | #ifdef YY_USE_PROTOS |
---|
2409 | static void *__IDL__flex_alloc( __IDL__size_t size ) |
---|
2410 | #else |
---|
2411 | static void *__IDL__flex_alloc( size ) |
---|
2412 | __IDL__size_t size; |
---|
2413 | #endif |
---|
2414 | { |
---|
2415 | return (void *) malloc( size ); |
---|
2416 | } |
---|
2417 | |
---|
2418 | #ifdef YY_USE_PROTOS |
---|
2419 | static void *__IDL__flex_realloc( void *ptr, __IDL__size_t size ) |
---|
2420 | #else |
---|
2421 | static void *__IDL__flex_realloc( ptr, size ) |
---|
2422 | void *ptr; |
---|
2423 | __IDL__size_t size; |
---|
2424 | #endif |
---|
2425 | { |
---|
2426 | /* The cast to (char *) in the following accommodates both |
---|
2427 | * implementations that use char* generic pointers, and those |
---|
2428 | * that use void* generic pointers. It works with the latter |
---|
2429 | * because both ANSI C and C++ allow castless assignment from |
---|
2430 | * any pointer type to void*, and deal with argument conversions |
---|
2431 | * as though doing an assignment. |
---|
2432 | */ |
---|
2433 | return (void *) realloc( (char *) ptr, size ); |
---|
2434 | } |
---|
2435 | |
---|
2436 | #ifdef YY_USE_PROTOS |
---|
2437 | static void __IDL__flex_free( void *ptr ) |
---|
2438 | #else |
---|
2439 | static void __IDL__flex_free( ptr ) |
---|
2440 | void *ptr; |
---|
2441 | #endif |
---|
2442 | { |
---|
2443 | free( ptr ); |
---|
2444 | } |
---|
2445 | |
---|
2446 | #if YY_MAIN |
---|
2447 | int main() |
---|
2448 | { |
---|
2449 | __IDL_lex(); |
---|
2450 | return 0; |
---|
2451 | } |
---|
2452 | #endif |
---|
2453 | #line 379 "./lexer.l" |
---|
2454 | |
---|
2455 | |
---|
2456 | void __IDL_lex_init (void) |
---|
2457 | { |
---|
2458 | __IDL_inputcb = NULL; |
---|
2459 | __IDL_cur_line = 1; |
---|
2460 | __IDL_cur_token_line = 0; |
---|
2461 | __IDL_prev_token_line = 0; |
---|
2462 | __IDL_cur_filename = NULL; |
---|
2463 | __IDL_cur_fileinfo = NULL; |
---|
2464 | warn_underscores = 0; |
---|
2465 | } |
---|
2466 | |
---|
2467 | void __IDL_lex_cleanup (void) |
---|
2468 | { |
---|
2469 | __IDL_cur_filename = NULL; |
---|
2470 | YY_NEW_FILE; |
---|
2471 | } |
---|
2472 | |
---|
2473 | int __IDL_wrap (void) |
---|
2474 | { |
---|
2475 | return 1; |
---|
2476 | } |
---|
2477 | |
---|
2478 | static int count_nl (const char *s) |
---|
2479 | { |
---|
2480 | int i; |
---|
2481 | |
---|
2482 | for (i = 0; |
---|
2483 | (s = strchr (s, '\n')) != NULL; |
---|
2484 | ++s, ++i) ; |
---|
2485 | |
---|
2486 | return i; |
---|
2487 | } |
---|
2488 | |
---|
2489 | /* |
---|
2490 | * Local variables: |
---|
2491 | * mode: C |
---|
2492 | * c-basic-offset: 8 |
---|
2493 | * tab-width: 8 |
---|
2494 | * indent-tabs-mode: t |
---|
2495 | * End: |
---|
2496 | */ |
---|