1 | /* A lexical scanner generated by flex */ |
---|
2 | |
---|
3 | /* Scanner skeleton version: |
---|
4 | * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern 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 | |
---|
13 | |
---|
14 | /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ |
---|
15 | #ifdef c_plusplus |
---|
16 | #ifndef __cplusplus |
---|
17 | #define __cplusplus |
---|
18 | #endif |
---|
19 | #endif |
---|
20 | |
---|
21 | |
---|
22 | #ifdef __cplusplus |
---|
23 | |
---|
24 | #include <stdlib.h> |
---|
25 | #include <unistd.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 yyconst const |
---|
54 | #else |
---|
55 | #define yyconst |
---|
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 yy_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 ((yy_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 yyrestart( yyin ) |
---|
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 yy_buffer_state *YY_BUFFER_STATE; |
---|
100 | |
---|
101 | extern int yyleng; |
---|
102 | extern FILE *yyin, *yyout; |
---|
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 | * yyless( 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 yyless() call. |
---|
120 | */ |
---|
121 | |
---|
122 | /* Return all but the first 'n' matched characters back to the input stream. */ |
---|
123 | |
---|
124 | #define yyless(n) \ |
---|
125 | do \ |
---|
126 | { \ |
---|
127 | /* Undo effects of setting up yytext. */ \ |
---|
128 | *yy_cp = yy_hold_char; \ |
---|
129 | YY_RESTORE_YY_MORE_OFFSET \ |
---|
130 | yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ |
---|
131 | YY_DO_BEFORE_ACTION; /* set up yytext again */ \ |
---|
132 | } \ |
---|
133 | while ( 0 ) |
---|
134 | |
---|
135 | #define unput(c) yyunput( c, yytext_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 yy_size_t; |
---|
142 | |
---|
143 | |
---|
144 | struct yy_buffer_state |
---|
145 | { |
---|
146 | FILE *yy_input_file; |
---|
147 | |
---|
148 | char *yy_ch_buf; /* input buffer */ |
---|
149 | char *yy_buf_pos; /* current position in input buffer */ |
---|
150 | |
---|
151 | /* Size of input buffer in bytes, not including room for EOB |
---|
152 | * characters. |
---|
153 | */ |
---|
154 | yy_size_t yy_buf_size; |
---|
155 | |
---|
156 | /* Number of characters read into yy_ch_buf, not including EOB |
---|
157 | * characters. |
---|
158 | */ |
---|
159 | int yy_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 yy_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 yy_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 yy_at_bol; |
---|
179 | |
---|
180 | /* Whether to try to fill the input buffer when we reach the |
---|
181 | * end of it. |
---|
182 | */ |
---|
183 | int yy_fill_buffer; |
---|
184 | |
---|
185 | int yy_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 yyrestart()), so that the user can continue scanning by |
---|
196 | * just pointing yyin at a new input file. |
---|
197 | */ |
---|
198 | #define YY_BUFFER_EOF_PENDING 2 |
---|
199 | }; |
---|
200 | |
---|
201 | static YY_BUFFER_STATE yy_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 yy_current_buffer |
---|
208 | |
---|
209 | |
---|
210 | /* yy_hold_char holds the character lost when yytext is formed. */ |
---|
211 | static char yy_hold_char; |
---|
212 | |
---|
213 | static int yy_n_chars; /* number of characters read into yy_ch_buf */ |
---|
214 | |
---|
215 | |
---|
216 | int yyleng; |
---|
217 | |
---|
218 | /* Points to current character in buffer. */ |
---|
219 | static char *yy_c_buf_p = (char *) 0; |
---|
220 | static int yy_init = 1; /* whether we need to initialize */ |
---|
221 | static int yy_start = 0; /* start state number */ |
---|
222 | |
---|
223 | /* Flag which is used to allow yywrap()'s to do buffer switches |
---|
224 | * instead of setting up a fresh yyin. A bit of a hack ... |
---|
225 | */ |
---|
226 | static int yy_did_buffer_switch_on_eof; |
---|
227 | |
---|
228 | void yyrestart YY_PROTO(( FILE *input_file )); |
---|
229 | |
---|
230 | void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); |
---|
231 | void yy_load_buffer_state YY_PROTO(( void )); |
---|
232 | YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); |
---|
233 | void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); |
---|
234 | void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); |
---|
235 | void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); |
---|
236 | #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) |
---|
237 | |
---|
238 | YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); |
---|
239 | YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); |
---|
240 | YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); |
---|
241 | |
---|
242 | static void *yy_flex_alloc YY_PROTO(( yy_size_t )); |
---|
243 | static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); |
---|
244 | static void yy_flex_free YY_PROTO(( void * )); |
---|
245 | |
---|
246 | #define yy_new_buffer yy_create_buffer |
---|
247 | |
---|
248 | #define yy_set_interactive(is_interactive) \ |
---|
249 | { \ |
---|
250 | if ( ! yy_current_buffer ) \ |
---|
251 | yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ |
---|
252 | yy_current_buffer->yy_is_interactive = is_interactive; \ |
---|
253 | } |
---|
254 | |
---|
255 | #define yy_set_bol(at_bol) \ |
---|
256 | { \ |
---|
257 | if ( ! yy_current_buffer ) \ |
---|
258 | yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ |
---|
259 | yy_current_buffer->yy_at_bol = at_bol; \ |
---|
260 | } |
---|
261 | |
---|
262 | #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) |
---|
263 | |
---|
264 | typedef unsigned char YY_CHAR; |
---|
265 | FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; |
---|
266 | typedef int yy_state_type; |
---|
267 | extern char *yytext; |
---|
268 | #define yytext_ptr yytext |
---|
269 | |
---|
270 | static yy_state_type yy_get_previous_state YY_PROTO(( void )); |
---|
271 | static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); |
---|
272 | static int yy_get_next_buffer YY_PROTO(( void )); |
---|
273 | static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); |
---|
274 | |
---|
275 | /* Done after the current pattern has been matched and before the |
---|
276 | * corresponding action - sets up yytext. |
---|
277 | */ |
---|
278 | #define YY_DO_BEFORE_ACTION \ |
---|
279 | yytext_ptr = yy_bp; \ |
---|
280 | yytext_ptr -= yy_more_len; \ |
---|
281 | yyleng = (int) (yy_cp - yytext_ptr); \ |
---|
282 | yy_hold_char = *yy_cp; \ |
---|
283 | *yy_cp = '\0'; \ |
---|
284 | yy_c_buf_p = yy_cp; |
---|
285 | |
---|
286 | #define YY_NUM_RULES 66 |
---|
287 | #define YY_END_OF_BUFFER 67 |
---|
288 | static yyconst short int yy_accept[171] = |
---|
289 | { 0, |
---|
290 | 0, 0, 0, 0, 30, 30, 0, 0, 0, 0, |
---|
291 | 0, 0, 20, 20, 0, 0, 67, 65, 40, 40, |
---|
292 | 50, 34, 64, 59, 65, 64, 65, 65, 65, 65, |
---|
293 | 65, 57, 65, 65, 65, 65, 6, 55, 64, 64, |
---|
294 | 64, 64, 64, 64, 64, 64, 24, 65, 35, 36, |
---|
295 | 39, 36, 30, 25, 30, 32, 33, 26, 29, 26, |
---|
296 | 13, 11, 12, 15, 14, 17, 16, 21, 20, 21, |
---|
297 | 18, 23, 19, 9, 66, 10, 51, 2, 46, 64, |
---|
298 | 64, 64, 53, 44, 43, 54, 41, 61, 3, 1, |
---|
299 | 61, 0, 0, 57, 42, 48, 52, 45, 49, 6, |
---|
300 | |
---|
301 | 64, 64, 64, 64, 64, 64, 64, 47, 38, 37, |
---|
302 | 30, 30, 28, 27, 21, 20, 21, 0, 21, 9, |
---|
303 | 2, 0, 1, 61, 63, 61, 63, 58, 64, 64, |
---|
304 | 5, 64, 64, 64, 64, 64, 30, 31, 22, 0, |
---|
305 | 0, 0, 64, 64, 6, 64, 64, 64, 61, 62, |
---|
306 | 0, 64, 0, 60, 64, 0, 4, 64, 64, 0, |
---|
307 | 0, 7, 56, 0, 0, 8, 0, 0, 7, 0 |
---|
308 | } ; |
---|
309 | |
---|
310 | static yyconst int yy_ec[256] = |
---|
311 | { 0, |
---|
312 | 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, |
---|
313 | 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, |
---|
314 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
315 | 1, 2, 5, 6, 7, 8, 1, 9, 10, 11, |
---|
316 | 12, 13, 14, 15, 16, 17, 18, 19, 19, 19, |
---|
317 | 19, 19, 19, 19, 19, 19, 19, 20, 21, 22, |
---|
318 | 23, 24, 25, 10, 10, 10, 10, 10, 10, 10, |
---|
319 | 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, |
---|
320 | 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, |
---|
321 | 1, 26, 1, 1, 27, 1, 28, 10, 29, 10, |
---|
322 | |
---|
323 | 30, 31, 10, 32, 33, 10, 10, 34, 35, 36, |
---|
324 | 37, 38, 39, 40, 10, 41, 42, 10, 43, 44, |
---|
325 | 10, 10, 45, 46, 47, 48, 1, 1, 1, 1, |
---|
326 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
327 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
328 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
329 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
330 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
331 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
332 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
333 | |
---|
334 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
335 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
336 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
337 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
338 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
339 | 1, 1, 1, 1, 1 |
---|
340 | } ; |
---|
341 | |
---|
342 | static yyconst int yy_meta[49] = |
---|
343 | { 0, |
---|
344 | 1, 2, 3, 1, 1, 4, 1, 1, 1, 5, |
---|
345 | 6, 7, 1, 1, 7, 1, 8, 9, 10, 1, |
---|
346 | 11, 1, 1, 1, 1, 1, 12, 5, 5, 5, |
---|
347 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
---|
348 | 5, 5, 5, 5, 4, 1, 4, 1 |
---|
349 | } ; |
---|
350 | |
---|
351 | static yyconst short int yy_base[192] = |
---|
352 | { 0, |
---|
353 | 0, 0, 43, 44, 45, 46, 47, 48, 50, 54, |
---|
354 | 295, 294, 74, 92, 75, 76, 296, 561, 561, 561, |
---|
355 | 269, 561, 271, 561, 254, 40, 230, 227, 84, 38, |
---|
356 | 69, 92, 197, 60, 181, 177, 99, 561, 561, 86, |
---|
357 | 87, 93, 98, 99, 100, 102, 561, 136, 561, 561, |
---|
358 | 561, 62, 0, 561, 158, 561, 561, 561, 561, 109, |
---|
359 | 561, 561, 561, 561, 561, 561, 561, 0, 129, 134, |
---|
360 | 561, 561, 561, 0, 561, 561, 561, 0, 561, 114, |
---|
361 | 124, 125, 561, 561, 561, 561, 561, 128, 561, 0, |
---|
362 | 136, 129, 149, 143, 561, 561, 561, 561, 561, 154, |
---|
363 | |
---|
364 | 144, 146, 147, 148, 151, 136, 151, 561, 561, 561, |
---|
365 | 0, 177, 561, 561, 0, 187, 190, 144, 0, 0, |
---|
366 | 0, 171, 0, 180, 561, 176, 193, 193, 180, 186, |
---|
367 | 188, 190, 192, 201, 203, 204, 236, 0, 561, 119, |
---|
368 | 103, 97, 207, 244, 246, 222, 231, 223, 80, 39, |
---|
369 | 243, 224, 266, 561, 238, 252, 242, 252, 256, 286, |
---|
370 | 70, 288, 245, 192, 291, 561, 292, 293, 296, 561, |
---|
371 | 320, 332, 344, 356, 368, 380, 392, 400, 408, 418, |
---|
372 | 430, 442, 454, 466, 478, 490, 502, 514, 526, 537, |
---|
373 | 548 |
---|
374 | |
---|
375 | } ; |
---|
376 | |
---|
377 | static yyconst short int yy_def[192] = |
---|
378 | { 0, |
---|
379 | 170, 1, 171, 171, 172, 172, 173, 173, 174, 174, |
---|
380 | 175, 175, 176, 176, 177, 177, 170, 170, 170, 170, |
---|
381 | 170, 170, 170, 170, 170, 178, 170, 170, 170, 170, |
---|
382 | 170, 179, 170, 170, 170, 170, 170, 170, 170, 178, |
---|
383 | 178, 178, 178, 178, 178, 178, 170, 170, 170, 170, |
---|
384 | 170, 170, 180, 170, 180, 170, 170, 170, 170, 170, |
---|
385 | 170, 170, 170, 170, 170, 170, 170, 181, 170, 182, |
---|
386 | 170, 170, 170, 183, 170, 170, 170, 184, 170, 178, |
---|
387 | 178, 178, 170, 170, 170, 170, 170, 170, 170, 185, |
---|
388 | 179, 186, 170, 179, 170, 170, 170, 170, 170, 170, |
---|
389 | |
---|
390 | 178, 178, 178, 178, 178, 101, 101, 170, 170, 170, |
---|
391 | 180, 187, 170, 170, 181, 170, 182, 188, 181, 183, |
---|
392 | 184, 170, 185, 179, 170, 170, 170, 179, 101, 101, |
---|
393 | 101, 101, 101, 101, 101, 101, 187, 189, 170, 170, |
---|
394 | 170, 170, 101, 101, 144, 101, 101, 101, 170, 170, |
---|
395 | 179, 101, 170, 170, 101, 190, 101, 101, 101, 191, |
---|
396 | 170, 144, 101, 170, 191, 170, 191, 191, 170, 0, |
---|
397 | 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, |
---|
398 | 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, |
---|
399 | 170 |
---|
400 | |
---|
401 | } ; |
---|
402 | |
---|
403 | static yyconst short int yy_nxt[610] = |
---|
404 | { 0, |
---|
405 | 18, 19, 20, 19, 21, 22, 23, 24, 25, 26, |
---|
406 | 18, 18, 27, 28, 18, 29, 30, 31, 32, 33, |
---|
407 | 18, 34, 35, 36, 37, 38, 39, 26, 26, 40, |
---|
408 | 41, 42, 26, 26, 26, 43, 26, 44, 45, 26, |
---|
409 | 26, 26, 46, 26, 47, 48, 18, 49, 51, 51, |
---|
410 | 54, 54, 59, 59, 87, 62, 88, 150, 81, 62, |
---|
411 | 63, 64, 55, 55, 63, 64, 82, 109, 52, 52, |
---|
412 | 65, 164, 60, 60, 65, 69, 69, 75, 75, 70, |
---|
413 | 166, 89, 96, 97, 71, 72, 90, 110, 73, 56, |
---|
414 | 56, 57, 57, 69, 69, 76, 76, 70, 149, 85, |
---|
415 | |
---|
416 | 100, 100, 71, 72, 81, 81, 73, 86, 92, 93, |
---|
417 | 94, 81, 82, 82, 113, 151, 81, 81, 81, 82, |
---|
418 | 81, 150, 103, 102, 82, 82, 82, 104, 82, 101, |
---|
419 | 116, 116, 81, 107, 114, 118, 118, 149, 105, 119, |
---|
420 | 82, 106, 81, 81, 118, 118, 88, 126, 118, 139, |
---|
421 | 82, 82, 170, 170, 124, 100, 100, 122, 127, 92, |
---|
422 | 93, 94, 81, 80, 81, 81, 81, 128, 135, 81, |
---|
423 | 82, 129, 82, 82, 82, 112, 130, 82, 80, 111, |
---|
424 | 132, 108, 138, 136, 140, 131, 140, 134, 116, 116, |
---|
425 | 133, 118, 118, 164, 88, 119, 170, 170, 124, 99, |
---|
426 | |
---|
427 | 118, 118, 166, 98, 118, 122, 141, 80, 141, 170, |
---|
428 | 142, 128, 80, 80, 143, 80, 95, 80, 80, 80, |
---|
429 | 80, 138, 80, 138, 80, 146, 144, 145, 80, 147, |
---|
430 | 80, 80, 156, 80, 80, 80, 80, 148, 111, 80, |
---|
431 | 84, 138, 83, 144, 152, 153, 153, 100, 100, 80, |
---|
432 | 80, 80, 157, 156, 155, 80, 80, 158, 80, 170, |
---|
433 | 142, 151, 79, 80, 154, 80, 170, 153, 153, 80, |
---|
434 | 80, 80, 80, 159, 80, 78, 80, 80, 161, 80, |
---|
435 | 138, 162, 138, 80, 80, 163, 154, 164, 80, 169, |
---|
436 | 169, 77, 164, 164, 164, 170, 166, 169, 169, 67, |
---|
437 | |
---|
438 | 67, 166, 166, 166, 167, 170, 170, 170, 170, 167, |
---|
439 | 167, 167, 168, 170, 170, 170, 170, 168, 168, 168, |
---|
440 | 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, |
---|
441 | 50, 50, 53, 53, 53, 53, 53, 53, 53, 53, |
---|
442 | 53, 53, 53, 53, 58, 58, 58, 58, 58, 58, |
---|
443 | 58, 58, 58, 58, 58, 58, 61, 61, 61, 61, |
---|
444 | 61, 61, 61, 61, 61, 61, 61, 61, 66, 66, |
---|
445 | 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, |
---|
446 | 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, |
---|
447 | 68, 68, 74, 74, 74, 74, 74, 74, 74, 74, |
---|
448 | |
---|
449 | 74, 74, 74, 74, 80, 170, 170, 170, 170, 80, |
---|
450 | 170, 80, 91, 170, 170, 91, 91, 91, 111, 111, |
---|
451 | 111, 170, 111, 111, 111, 111, 111, 111, 111, 111, |
---|
452 | 115, 170, 170, 115, 115, 170, 170, 115, 115, 115, |
---|
453 | 115, 115, 117, 117, 117, 117, 117, 117, 117, 117, |
---|
454 | 117, 117, 117, 117, 120, 120, 170, 120, 120, 120, |
---|
455 | 120, 120, 120, 120, 170, 120, 121, 121, 170, 121, |
---|
456 | 121, 121, 121, 121, 121, 121, 121, 121, 123, 123, |
---|
457 | 170, 123, 123, 123, 123, 123, 123, 123, 123, 123, |
---|
458 | 125, 125, 125, 125, 125, 125, 125, 170, 125, 125, |
---|
459 | |
---|
460 | 125, 125, 137, 137, 137, 137, 137, 137, 137, 137, |
---|
461 | 137, 137, 137, 137, 118, 118, 118, 118, 118, 118, |
---|
462 | 118, 118, 118, 118, 118, 118, 138, 138, 170, 138, |
---|
463 | 138, 138, 138, 138, 138, 138, 138, 138, 160, 170, |
---|
464 | 170, 160, 170, 170, 170, 170, 170, 170, 160, 165, |
---|
465 | 170, 170, 165, 165, 170, 170, 170, 165, 170, 165, |
---|
466 | 17, 170, 170, 170, 170, 170, 170, 170, 170, 170, |
---|
467 | 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, |
---|
468 | 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, |
---|
469 | 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, |
---|
470 | |
---|
471 | 170, 170, 170, 170, 170, 170, 170, 170, 170 |
---|
472 | } ; |
---|
473 | |
---|
474 | static yyconst short int yy_chk[610] = |
---|
475 | { 0, |
---|
476 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
477 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
478 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
479 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
---|
480 | 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, |
---|
481 | 5, 6, 7, 8, 30, 9, 30, 150, 26, 10, |
---|
482 | 9, 9, 5, 6, 10, 10, 26, 52, 3, 4, |
---|
483 | 9, 161, 7, 8, 10, 13, 13, 15, 16, 13, |
---|
484 | 161, 31, 34, 34, 13, 13, 31, 52, 13, 5, |
---|
485 | 6, 5, 6, 14, 14, 15, 16, 14, 149, 29, |
---|
486 | |
---|
487 | 37, 37, 14, 14, 40, 41, 14, 29, 32, 32, |
---|
488 | 32, 42, 40, 41, 60, 142, 43, 44, 45, 42, |
---|
489 | 46, 141, 42, 41, 43, 44, 45, 43, 46, 40, |
---|
490 | 69, 69, 80, 46, 60, 70, 70, 140, 44, 70, |
---|
491 | 80, 45, 81, 82, 70, 70, 88, 92, 70, 118, |
---|
492 | 81, 82, 91, 91, 91, 100, 100, 88, 92, 94, |
---|
493 | 94, 94, 101, 106, 102, 103, 104, 93, 106, 105, |
---|
494 | 101, 101, 102, 103, 104, 55, 101, 105, 107, 112, |
---|
495 | 103, 48, 112, 107, 122, 102, 122, 105, 116, 116, |
---|
496 | 104, 117, 117, 164, 126, 117, 124, 124, 124, 36, |
---|
497 | |
---|
498 | 117, 117, 164, 35, 117, 126, 127, 129, 127, 128, |
---|
499 | 128, 128, 129, 130, 129, 131, 33, 132, 130, 133, |
---|
500 | 131, 112, 132, 112, 133, 133, 130, 132, 134, 134, |
---|
501 | 135, 136, 147, 134, 143, 135, 136, 136, 137, 143, |
---|
502 | 28, 137, 27, 135, 143, 144, 144, 145, 145, 146, |
---|
503 | 148, 152, 148, 156, 146, 148, 152, 152, 147, 151, |
---|
504 | 151, 151, 25, 147, 144, 155, 145, 153, 153, 157, |
---|
505 | 155, 144, 163, 155, 157, 23, 144, 163, 156, 158, |
---|
506 | 137, 158, 137, 159, 158, 159, 153, 160, 159, 162, |
---|
507 | 162, 21, 165, 167, 168, 17, 160, 169, 169, 12, |
---|
508 | |
---|
509 | 11, 165, 167, 168, 160, 0, 0, 0, 162, 165, |
---|
510 | 167, 168, 160, 0, 0, 0, 0, 165, 167, 168, |
---|
511 | 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, |
---|
512 | 171, 171, 172, 172, 172, 172, 172, 172, 172, 172, |
---|
513 | 172, 172, 172, 172, 173, 173, 173, 173, 173, 173, |
---|
514 | 173, 173, 173, 173, 173, 173, 174, 174, 174, 174, |
---|
515 | 174, 174, 174, 174, 174, 174, 174, 174, 175, 175, |
---|
516 | 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, |
---|
517 | 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, |
---|
518 | 176, 176, 177, 177, 177, 177, 177, 177, 177, 177, |
---|
519 | |
---|
520 | 177, 177, 177, 177, 178, 0, 0, 0, 0, 178, |
---|
521 | 0, 178, 179, 0, 0, 179, 179, 179, 180, 180, |
---|
522 | 180, 0, 180, 180, 180, 180, 180, 180, 180, 180, |
---|
523 | 181, 0, 0, 181, 181, 0, 0, 181, 181, 181, |
---|
524 | 181, 181, 182, 182, 182, 182, 182, 182, 182, 182, |
---|
525 | 182, 182, 182, 182, 183, 183, 0, 183, 183, 183, |
---|
526 | 183, 183, 183, 183, 0, 183, 184, 184, 0, 184, |
---|
527 | 184, 184, 184, 184, 184, 184, 184, 184, 185, 185, |
---|
528 | 0, 185, 185, 185, 185, 185, 185, 185, 185, 185, |
---|
529 | 186, 186, 186, 186, 186, 186, 186, 0, 186, 186, |
---|
530 | |
---|
531 | 186, 186, 187, 187, 187, 187, 187, 187, 187, 187, |
---|
532 | 187, 187, 187, 187, 188, 188, 188, 188, 188, 188, |
---|
533 | 188, 188, 188, 188, 188, 188, 189, 189, 0, 189, |
---|
534 | 189, 189, 189, 189, 189, 189, 189, 189, 190, 0, |
---|
535 | 0, 190, 0, 0, 0, 0, 0, 0, 190, 191, |
---|
536 | 0, 0, 191, 191, 0, 0, 0, 191, 0, 191, |
---|
537 | 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, |
---|
538 | 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, |
---|
539 | 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, |
---|
540 | 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, |
---|
541 | |
---|
542 | 170, 170, 170, 170, 170, 170, 170, 170, 170 |
---|
543 | } ; |
---|
544 | |
---|
545 | static yy_state_type yy_last_accepting_state; |
---|
546 | static char *yy_last_accepting_cpos; |
---|
547 | |
---|
548 | /* The intent behind this definition is that it'll catch |
---|
549 | * any uses of REJECT which flex missed. |
---|
550 | */ |
---|
551 | #define REJECT reject_used_but_not_detected |
---|
552 | static int yy_more_flag = 0; |
---|
553 | static int yy_more_len = 0; |
---|
554 | #define yymore() (yy_more_flag = 1) |
---|
555 | #define YY_MORE_ADJ yy_more_len |
---|
556 | #define YY_RESTORE_YY_MORE_OFFSET |
---|
557 | char *yytext; |
---|
558 | #line 1 "scanner.l" |
---|
559 | #define INITIAL 0 |
---|
560 | #line 2 "scanner.l" |
---|
561 | /**************************************** |
---|
562 | * Computer Algebra System SINGULAR * |
---|
563 | ****************************************/ |
---|
564 | #include <stdio.h> |
---|
565 | #include <string.h> |
---|
566 | #include <stdlib.h> |
---|
567 | #include <ctype.h> |
---|
568 | |
---|
569 | #include "kernel/mod2.h" |
---|
570 | #include "omalloc/omalloc.h" |
---|
571 | #include "Singular/tok.h" |
---|
572 | #include "Singular/stype.h" |
---|
573 | #include "Singular/ipshell.h" |
---|
574 | #include "Singular/fevoices.h" |
---|
575 | #include "kernel/oswrapper/feread.h" |
---|
576 | |
---|
577 | int feReadLine(char* b, int l); |
---|
578 | #define ALLOC(a) omAlloc((a)) |
---|
579 | #ifndef NEW_FLEX |
---|
580 | #endif /* NEW_LEX */ |
---|
581 | int blocknest = 0; |
---|
582 | extern char * yytext; |
---|
583 | //extern unsigned char * yytext; |
---|
584 | extern int yyleng; |
---|
585 | extern int inerror; |
---|
586 | |
---|
587 | #ifndef SING_NDEBUG |
---|
588 | // this is to shadow the malloc/realloc |
---|
589 | // used by yy_flex_malloc/yy_flex_realloc |
---|
590 | // so that we can mark stuff as static |
---|
591 | static void* my_malloc(size_t size) |
---|
592 | { |
---|
593 | void* addr = omAlloc(size); |
---|
594 | omMarkAsStaticAddr(addr); |
---|
595 | return addr; |
---|
596 | } |
---|
597 | |
---|
598 | static void* my_realloc(void* addr, size_t size) |
---|
599 | { |
---|
600 | void* new_addr = omRealloc(addr, size); |
---|
601 | omMarkAsStaticAddr(new_addr); |
---|
602 | return new_addr; |
---|
603 | } |
---|
604 | #undef malloc |
---|
605 | #define malloc my_malloc |
---|
606 | #undef realloc |
---|
607 | #define realloc my_realloc |
---|
608 | #else |
---|
609 | #undef malloc |
---|
610 | #define malloc omAlloc |
---|
611 | #undef realloc |
---|
612 | #define realloc omRealloc |
---|
613 | #endif |
---|
614 | #undef free |
---|
615 | #define free omFree |
---|
616 | static char * dupyytext() |
---|
617 | { |
---|
618 | char* s; |
---|
619 | if (yyleng>0) yytext[yyleng-1] = '\0'; |
---|
620 | s = omStrDup((char *)yytext); |
---|
621 | omMarkAsStaticAddr(s); |
---|
622 | return s; |
---|
623 | } |
---|
624 | |
---|
625 | static char * dupyytextNL() |
---|
626 | { |
---|
627 | int i = yyleng;//strlen((char *)yytext); |
---|
628 | char * rc = (char*)omAlloc( 3 + i ); |
---|
629 | omMarkAsStaticAddr(rc); |
---|
630 | if (i>0) |
---|
631 | { |
---|
632 | strncpy( rc, (char *)yytext, i-1 ); |
---|
633 | } |
---|
634 | else |
---|
635 | { |
---|
636 | i++; |
---|
637 | } |
---|
638 | rc[i-1] = '\n'; |
---|
639 | rc[i] = '\n'; |
---|
640 | rc[i+1] = '\0'; |
---|
641 | return rc; |
---|
642 | } |
---|
643 | |
---|
644 | #undef YY_DECL |
---|
645 | #define YY_DECL int yylex(YYSTYPE* lvalp) |
---|
646 | |
---|
647 | #undef yywrap |
---|
648 | extern "C" { |
---|
649 | int yywrap() { return exitVoice(); } |
---|
650 | } |
---|
651 | |
---|
652 | #undef YY_INPUT |
---|
653 | #define YY_INPUT(buf,result,max_size) \ |
---|
654 | result = feReadLine( (char *) (buf), (max_size) ) |
---|
655 | |
---|
656 | #undef YY_USER_ACTION |
---|
657 | #define YY_USER_ACTION \ |
---|
658 | if ((inerror==1)&&(*yytext>=' '))\ |
---|
659 | { Print(" skipping text from `%s`",yytext);inerror=2; } |
---|
660 | |
---|
661 | /* %start START */ |
---|
662 | #define YY_ALWAYS_INTERACTIVE 1 |
---|
663 | #define string 1 |
---|
664 | |
---|
665 | #define block 2 |
---|
666 | |
---|
667 | #define blockstr 3 |
---|
668 | |
---|
669 | #define brace 4 |
---|
670 | |
---|
671 | #define bracestr 5 |
---|
672 | |
---|
673 | #define bracket 6 |
---|
674 | |
---|
675 | #define asstring 7 |
---|
676 | |
---|
677 | |
---|
678 | /* Macros after this point can all be overridden by user definitions in |
---|
679 | * section 1. |
---|
680 | */ |
---|
681 | |
---|
682 | #ifndef YY_SKIP_YYWRAP |
---|
683 | #ifdef __cplusplus |
---|
684 | extern "C" int yywrap YY_PROTO(( void )); |
---|
685 | #else |
---|
686 | extern int yywrap YY_PROTO(( void )); |
---|
687 | #endif |
---|
688 | #endif |
---|
689 | |
---|
690 | #ifndef YY_NO_UNPUT |
---|
691 | static void yyunput YY_PROTO(( int c, char *buf_ptr )); |
---|
692 | #endif |
---|
693 | |
---|
694 | #ifndef yytext_ptr |
---|
695 | static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); |
---|
696 | #endif |
---|
697 | |
---|
698 | #ifdef YY_NEED_STRLEN |
---|
699 | static int yy_flex_strlen YY_PROTO(( yyconst char * )); |
---|
700 | #endif |
---|
701 | |
---|
702 | #ifndef YY_NO_INPUT |
---|
703 | #ifdef __cplusplus |
---|
704 | static int yyinput YY_PROTO(( void )); |
---|
705 | #else |
---|
706 | static int input YY_PROTO(( void )); |
---|
707 | #endif |
---|
708 | #endif |
---|
709 | |
---|
710 | #if YY_STACK_USED |
---|
711 | static int yy_start_stack_ptr = 0; |
---|
712 | static int yy_start_stack_depth = 0; |
---|
713 | static int *yy_start_stack = 0; |
---|
714 | #ifndef YY_NO_PUSH_STATE |
---|
715 | static void yy_push_state YY_PROTO(( int new_state )); |
---|
716 | #endif |
---|
717 | #ifndef YY_NO_POP_STATE |
---|
718 | static void yy_pop_state YY_PROTO(( void )); |
---|
719 | #endif |
---|
720 | #ifndef YY_NO_TOP_STATE |
---|
721 | static int yy_top_state YY_PROTO(( void )); |
---|
722 | #endif |
---|
723 | |
---|
724 | #else |
---|
725 | #define YY_NO_PUSH_STATE 1 |
---|
726 | #define YY_NO_POP_STATE 1 |
---|
727 | #define YY_NO_TOP_STATE 1 |
---|
728 | #endif |
---|
729 | |
---|
730 | #ifdef YY_MALLOC_DECL |
---|
731 | YY_MALLOC_DECL |
---|
732 | #else |
---|
733 | #if __STDC__ |
---|
734 | #ifndef __cplusplus |
---|
735 | #include <stdlib.h> |
---|
736 | #endif |
---|
737 | #else |
---|
738 | /* Just try to get by without declaring the routines. This will fail |
---|
739 | * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) |
---|
740 | * or sizeof(void*) != sizeof(int). |
---|
741 | */ |
---|
742 | #endif |
---|
743 | #endif |
---|
744 | |
---|
745 | /* Amount of stuff to slurp up with each read. */ |
---|
746 | #ifndef YY_READ_BUF_SIZE |
---|
747 | #define YY_READ_BUF_SIZE 8192 |
---|
748 | #endif |
---|
749 | |
---|
750 | /* Copy whatever the last rule matched to the standard output. */ |
---|
751 | |
---|
752 | #ifndef ECHO |
---|
753 | /* This used to be an fputs(), but since the string might contain NUL's, |
---|
754 | * we now use fwrite(). |
---|
755 | */ |
---|
756 | #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) |
---|
757 | #endif |
---|
758 | |
---|
759 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
---|
760 | * is returned in "result". |
---|
761 | */ |
---|
762 | #ifndef YY_INPUT |
---|
763 | #define YY_INPUT(buf,result,max_size) \ |
---|
764 | if ( yy_current_buffer->yy_is_interactive ) \ |
---|
765 | { \ |
---|
766 | int c = '*', n; \ |
---|
767 | for ( n = 0; n < max_size && \ |
---|
768 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ |
---|
769 | buf[n] = (char) c; \ |
---|
770 | if ( c == '\n' ) \ |
---|
771 | buf[n++] = (char) c; \ |
---|
772 | if ( c == EOF && ferror( yyin ) ) \ |
---|
773 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
---|
774 | result = n; \ |
---|
775 | } \ |
---|
776 | else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ |
---|
777 | && ferror( yyin ) ) \ |
---|
778 | YY_FATAL_ERROR( "input in flex scanner failed" ); |
---|
779 | #endif |
---|
780 | |
---|
781 | /* No semi-colon after return; correct usage is to write "yyterminate();" - |
---|
782 | * we don't want an extra ';' after the "return" because that will cause |
---|
783 | * some compilers to complain about unreachable statements. |
---|
784 | */ |
---|
785 | #ifndef yyterminate |
---|
786 | #define yyterminate() return YY_NULL |
---|
787 | #endif |
---|
788 | |
---|
789 | /* Number of entries by which start-condition stack grows. */ |
---|
790 | #ifndef YY_START_STACK_INCR |
---|
791 | #define YY_START_STACK_INCR 25 |
---|
792 | #endif |
---|
793 | |
---|
794 | /* Report a fatal error. */ |
---|
795 | #ifndef YY_FATAL_ERROR |
---|
796 | #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) |
---|
797 | #endif |
---|
798 | |
---|
799 | /* Default declaration of generated scanner - a define so the user can |
---|
800 | * easily add parameters. |
---|
801 | */ |
---|
802 | #ifndef YY_DECL |
---|
803 | #define YY_DECL int yylex YY_PROTO(( void )) |
---|
804 | #endif |
---|
805 | |
---|
806 | /* Code executed at the beginning of each rule, after yytext and yyleng |
---|
807 | * have been set up. |
---|
808 | */ |
---|
809 | #ifndef YY_USER_ACTION |
---|
810 | #define YY_USER_ACTION |
---|
811 | #endif |
---|
812 | |
---|
813 | /* Code executed at the end of each rule. */ |
---|
814 | #ifndef YY_BREAK |
---|
815 | #define YY_BREAK break; |
---|
816 | #endif |
---|
817 | |
---|
818 | #define YY_RULE_SETUP \ |
---|
819 | YY_USER_ACTION |
---|
820 | |
---|
821 | YY_DECL |
---|
822 | { |
---|
823 | register yy_state_type yy_current_state; |
---|
824 | register char *yy_cp, *yy_bp; |
---|
825 | register int yy_act; |
---|
826 | |
---|
827 | #line 121 "scanner.l" |
---|
828 | |
---|
829 | |
---|
830 | if ( yy_init ) |
---|
831 | { |
---|
832 | yy_init = 0; |
---|
833 | |
---|
834 | #ifdef YY_USER_INIT |
---|
835 | YY_USER_INIT; |
---|
836 | #endif |
---|
837 | |
---|
838 | if ( ! yy_start ) |
---|
839 | yy_start = 1; /* first start state */ |
---|
840 | |
---|
841 | if ( ! yyin ) |
---|
842 | yyin = stdin; |
---|
843 | |
---|
844 | if ( ! yyout ) |
---|
845 | yyout = stdout; |
---|
846 | |
---|
847 | if ( ! yy_current_buffer ) |
---|
848 | yy_current_buffer = |
---|
849 | yy_create_buffer( yyin, YY_BUF_SIZE ); |
---|
850 | |
---|
851 | yy_load_buffer_state(); |
---|
852 | } |
---|
853 | |
---|
854 | while ( 1 ) /* loops until end-of-file is reached */ |
---|
855 | { |
---|
856 | yy_more_len = 0; |
---|
857 | if ( yy_more_flag ) |
---|
858 | { |
---|
859 | yy_more_len = yy_c_buf_p - yytext_ptr; |
---|
860 | yy_more_flag = 0; |
---|
861 | } |
---|
862 | yy_cp = yy_c_buf_p; |
---|
863 | |
---|
864 | /* Support of yytext. */ |
---|
865 | *yy_cp = yy_hold_char; |
---|
866 | |
---|
867 | /* yy_bp points to the position in yy_ch_buf of the start of |
---|
868 | * the current run. |
---|
869 | */ |
---|
870 | yy_bp = yy_cp; |
---|
871 | |
---|
872 | yy_current_state = yy_start; |
---|
873 | yy_match: |
---|
874 | do |
---|
875 | { |
---|
876 | register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; |
---|
877 | if ( yy_accept[yy_current_state] ) |
---|
878 | { |
---|
879 | yy_last_accepting_state = yy_current_state; |
---|
880 | yy_last_accepting_cpos = yy_cp; |
---|
881 | } |
---|
882 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
---|
883 | { |
---|
884 | yy_current_state = (int) yy_def[yy_current_state]; |
---|
885 | if ( yy_current_state >= 171 ) |
---|
886 | yy_c = yy_meta[(unsigned int) yy_c]; |
---|
887 | } |
---|
888 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
---|
889 | ++yy_cp; |
---|
890 | } |
---|
891 | while ( yy_base[yy_current_state] != 561 ); |
---|
892 | |
---|
893 | yy_find_action: |
---|
894 | yy_act = yy_accept[yy_current_state]; |
---|
895 | if ( yy_act == 0 ) |
---|
896 | { /* have to back up */ |
---|
897 | yy_cp = yy_last_accepting_cpos; |
---|
898 | yy_current_state = yy_last_accepting_state; |
---|
899 | yy_act = yy_accept[yy_current_state]; |
---|
900 | } |
---|
901 | |
---|
902 | YY_DO_BEFORE_ACTION; |
---|
903 | |
---|
904 | |
---|
905 | do_action: /* This label is used only to access EOF actions. */ |
---|
906 | |
---|
907 | |
---|
908 | switch ( yy_act ) |
---|
909 | { /* beginning of action switch */ |
---|
910 | case 0: /* must back up */ |
---|
911 | /* undo the effects of YY_DO_BEFORE_ACTION */ |
---|
912 | *yy_cp = yy_hold_char; |
---|
913 | yy_cp = yy_last_accepting_cpos; |
---|
914 | yy_current_state = yy_last_accepting_state; |
---|
915 | goto yy_find_action; |
---|
916 | |
---|
917 | case 1: |
---|
918 | YY_RULE_SETUP |
---|
919 | #line 122 "scanner.l" |
---|
920 | { } |
---|
921 | YY_BREAK |
---|
922 | case 2: |
---|
923 | YY_RULE_SETUP |
---|
924 | #line 123 "scanner.l" |
---|
925 | { } |
---|
926 | YY_BREAK |
---|
927 | case 3: |
---|
928 | YY_RULE_SETUP |
---|
929 | #line 124 "scanner.l" |
---|
930 | { |
---|
931 | yy_noeof=noeof_comment; |
---|
932 | loop |
---|
933 | { |
---|
934 | register int c; |
---|
935 | while ( (c = yyinput()) != '*' && c != EOF ); |
---|
936 | if ( c == '*' ) |
---|
937 | { |
---|
938 | while ( (c = yyinput()) == '*' ); |
---|
939 | if ( c == '/' ) break; /* found the end */ |
---|
940 | } |
---|
941 | else |
---|
942 | { |
---|
943 | break; |
---|
944 | } |
---|
945 | } |
---|
946 | yy_noeof=0; |
---|
947 | } |
---|
948 | YY_BREAK |
---|
949 | case 4: |
---|
950 | YY_RULE_SETUP |
---|
951 | #line 142 "scanner.l" |
---|
952 | { prompt_char='.'; |
---|
953 | blocknest = 0; yy_noeof = noeof_brace; BEGIN(brace); |
---|
954 | return WHILE_CMD;} |
---|
955 | YY_BREAK |
---|
956 | case 5: |
---|
957 | YY_RULE_SETUP |
---|
958 | #line 145 "scanner.l" |
---|
959 | { prompt_char='.'; |
---|
960 | blocknest = 0; yy_noeof = noeof_brace; BEGIN(brace); |
---|
961 | return FOR_CMD;} |
---|
962 | YY_BREAK |
---|
963 | case 6: |
---|
964 | YY_RULE_SETUP |
---|
965 | #line 149 "scanner.l" |
---|
966 | { yy_noeof = noeof_asstring; |
---|
967 | BEGIN(asstring); |
---|
968 | return HELP_CMD; |
---|
969 | } |
---|
970 | YY_BREAK |
---|
971 | case 7: |
---|
972 | YY_RULE_SETUP |
---|
973 | #line 154 "scanner.l" |
---|
974 | { yy_noeof = noeof_asstring; |
---|
975 | BEGIN(asstring); |
---|
976 | return EXAMPLE_CMD; |
---|
977 | } |
---|
978 | YY_BREAK |
---|
979 | case 8: |
---|
980 | YY_RULE_SETUP |
---|
981 | #line 159 "scanner.l" |
---|
982 | { |
---|
983 | char c; char *cp; |
---|
984 | lvalp->name = omStrDup(iiProcName((char *)yytext,c,cp)); |
---|
985 | yy_noeof = noeof_procname; |
---|
986 | blocknest = 1; |
---|
987 | BEGIN(brace); |
---|
988 | return PROC_DEF; |
---|
989 | } |
---|
990 | YY_BREAK |
---|
991 | case 9: |
---|
992 | YY_RULE_SETUP |
---|
993 | #line 167 "scanner.l" |
---|
994 | { |
---|
995 | lvalp->name = omStrDup((char *)yytext); |
---|
996 | yy_noeof = 0; BEGIN(INITIAL); |
---|
997 | return STRINGTOK; |
---|
998 | } |
---|
999 | YY_BREAK |
---|
1000 | case 10: |
---|
1001 | YY_RULE_SETUP |
---|
1002 | #line 172 "scanner.l" |
---|
1003 | { |
---|
1004 | yy_noeof = 0; BEGIN(INITIAL); |
---|
1005 | return *yytext; |
---|
1006 | } |
---|
1007 | YY_BREAK |
---|
1008 | case 11: |
---|
1009 | YY_RULE_SETUP |
---|
1010 | #line 177 "scanner.l" |
---|
1011 | { |
---|
1012 | yy_noeof = noeof_string; |
---|
1013 | BEGIN(bracestr); |
---|
1014 | yymore(); |
---|
1015 | } |
---|
1016 | YY_BREAK |
---|
1017 | case 12: |
---|
1018 | YY_RULE_SETUP |
---|
1019 | #line 182 "scanner.l" |
---|
1020 | { if (blocknest++) yymore(); } |
---|
1021 | YY_BREAK |
---|
1022 | case 13: |
---|
1023 | YY_RULE_SETUP |
---|
1024 | #line 183 "scanner.l" |
---|
1025 | { if (blocknest) yymore(); } |
---|
1026 | YY_BREAK |
---|
1027 | case 14: |
---|
1028 | YY_RULE_SETUP |
---|
1029 | #line 184 "scanner.l" |
---|
1030 | { |
---|
1031 | if (blocknest) |
---|
1032 | { |
---|
1033 | lvalp->name = dupyytext(); |
---|
1034 | return STRINGTOK; |
---|
1035 | } |
---|
1036 | } |
---|
1037 | YY_BREAK |
---|
1038 | case 15: |
---|
1039 | YY_RULE_SETUP |
---|
1040 | #line 191 "scanner.l" |
---|
1041 | { |
---|
1042 | if (--blocknest <= 0) |
---|
1043 | { |
---|
1044 | yy_noeof = 0; |
---|
1045 | BEGIN(INITIAL); |
---|
1046 | lvalp->name = dupyytext(); |
---|
1047 | return STRINGTOK; |
---|
1048 | } |
---|
1049 | yymore(); |
---|
1050 | } |
---|
1051 | YY_BREAK |
---|
1052 | case 16: |
---|
1053 | YY_RULE_SETUP |
---|
1054 | #line 201 "scanner.l" |
---|
1055 | { |
---|
1056 | yy_noeof = noeof_brace; |
---|
1057 | BEGIN(brace); |
---|
1058 | yymore(); |
---|
1059 | } |
---|
1060 | YY_BREAK |
---|
1061 | case 17: |
---|
1062 | YY_RULE_SETUP |
---|
1063 | #line 206 "scanner.l" |
---|
1064 | { yymore(); } |
---|
1065 | YY_BREAK |
---|
1066 | case 18: |
---|
1067 | YY_RULE_SETUP |
---|
1068 | #line 207 "scanner.l" |
---|
1069 | { return '('; } |
---|
1070 | YY_BREAK |
---|
1071 | case 19: |
---|
1072 | YY_RULE_SETUP |
---|
1073 | #line 208 "scanner.l" |
---|
1074 | { return ','; } |
---|
1075 | YY_BREAK |
---|
1076 | case 20: |
---|
1077 | YY_RULE_SETUP |
---|
1078 | #line 209 "scanner.l" |
---|
1079 | { ; } |
---|
1080 | YY_BREAK |
---|
1081 | case 21: |
---|
1082 | YY_RULE_SETUP |
---|
1083 | #line 210 "scanner.l" |
---|
1084 | { |
---|
1085 | lvalp->name = omStrDup((char *)yytext); |
---|
1086 | return STRINGTOK; |
---|
1087 | } |
---|
1088 | YY_BREAK |
---|
1089 | case 22: |
---|
1090 | YY_RULE_SETUP |
---|
1091 | #line 214 "scanner.l" |
---|
1092 | { |
---|
1093 | lvalp->name = omStrDup((char *)yytext); |
---|
1094 | return STRINGTOK; |
---|
1095 | } |
---|
1096 | YY_BREAK |
---|
1097 | case 23: |
---|
1098 | YY_RULE_SETUP |
---|
1099 | #line 218 "scanner.l" |
---|
1100 | { |
---|
1101 | yy_noeof = 0; BEGIN(INITIAL); |
---|
1102 | return ')'; |
---|
1103 | } |
---|
1104 | YY_BREAK |
---|
1105 | case 24: |
---|
1106 | YY_RULE_SETUP |
---|
1107 | #line 223 "scanner.l" |
---|
1108 | { |
---|
1109 | yy_blocklineno = yylineno; |
---|
1110 | blocknest = 1; |
---|
1111 | yy_noeof = noeof_block; |
---|
1112 | BEGIN(block); |
---|
1113 | } |
---|
1114 | YY_BREAK |
---|
1115 | case 25: |
---|
1116 | YY_RULE_SETUP |
---|
1117 | #line 229 "scanner.l" |
---|
1118 | { |
---|
1119 | yy_noeof = noeof_string; |
---|
1120 | BEGIN(blockstr); |
---|
1121 | yymore(); |
---|
1122 | } |
---|
1123 | YY_BREAK |
---|
1124 | case 26: |
---|
1125 | YY_RULE_SETUP |
---|
1126 | #line 234 "scanner.l" |
---|
1127 | { yymore(); } |
---|
1128 | YY_BREAK |
---|
1129 | case 27: |
---|
1130 | YY_RULE_SETUP |
---|
1131 | #line 235 "scanner.l" |
---|
1132 | { yymore(); } |
---|
1133 | YY_BREAK |
---|
1134 | case 28: |
---|
1135 | YY_RULE_SETUP |
---|
1136 | #line 236 "scanner.l" |
---|
1137 | { yymore(); } |
---|
1138 | YY_BREAK |
---|
1139 | case 29: |
---|
1140 | YY_RULE_SETUP |
---|
1141 | #line 237 "scanner.l" |
---|
1142 | { |
---|
1143 | yy_noeof = noeof_block; |
---|
1144 | BEGIN(block); |
---|
1145 | yymore(); |
---|
1146 | } |
---|
1147 | YY_BREAK |
---|
1148 | case 30: |
---|
1149 | YY_RULE_SETUP |
---|
1150 | #line 242 "scanner.l" |
---|
1151 | { yymore(); } |
---|
1152 | YY_BREAK |
---|
1153 | case 31: |
---|
1154 | YY_RULE_SETUP |
---|
1155 | #line 243 "scanner.l" |
---|
1156 | { yymore(); } |
---|
1157 | YY_BREAK |
---|
1158 | case 32: |
---|
1159 | YY_RULE_SETUP |
---|
1160 | #line 244 "scanner.l" |
---|
1161 | { blocknest++; yymore(); } |
---|
1162 | YY_BREAK |
---|
1163 | case 33: |
---|
1164 | YY_RULE_SETUP |
---|
1165 | #line 245 "scanner.l" |
---|
1166 | { |
---|
1167 | if (--blocknest <= 0) |
---|
1168 | { |
---|
1169 | BEGIN(INITIAL); |
---|
1170 | yy_noeof = 0; |
---|
1171 | lvalp->name = dupyytextNL(); |
---|
1172 | return BLOCKTOK; |
---|
1173 | } |
---|
1174 | yymore(); |
---|
1175 | } |
---|
1176 | YY_BREAK |
---|
1177 | case 34: |
---|
1178 | YY_RULE_SETUP |
---|
1179 | #line 255 "scanner.l" |
---|
1180 | { BEGIN(string); yy_noeof = noeof_string;} |
---|
1181 | YY_BREAK |
---|
1182 | case 35: |
---|
1183 | YY_RULE_SETUP |
---|
1184 | #line 256 "scanner.l" |
---|
1185 | { return SYS_BREAK; } |
---|
1186 | YY_BREAK |
---|
1187 | case 36: |
---|
1188 | YY_RULE_SETUP |
---|
1189 | #line 257 "scanner.l" |
---|
1190 | { yymore(); } |
---|
1191 | YY_BREAK |
---|
1192 | case 37: |
---|
1193 | YY_RULE_SETUP |
---|
1194 | #line 258 "scanner.l" |
---|
1195 | { yymore(); } |
---|
1196 | YY_BREAK |
---|
1197 | case 38: |
---|
1198 | YY_RULE_SETUP |
---|
1199 | #line 259 "scanner.l" |
---|
1200 | { yymore(); } |
---|
1201 | YY_BREAK |
---|
1202 | case 39: |
---|
1203 | YY_RULE_SETUP |
---|
1204 | #line 260 "scanner.l" |
---|
1205 | { |
---|
1206 | char * s; |
---|
1207 | yy_noeof = 0; |
---|
1208 | BEGIN(INITIAL); |
---|
1209 | s = lvalp->name = dupyytext(); |
---|
1210 | while (*yytext) |
---|
1211 | { |
---|
1212 | if (*yytext == '\\') yytext++; |
---|
1213 | *s++ = *yytext++; |
---|
1214 | } |
---|
1215 | *s++ = *yytext++; |
---|
1216 | return STRINGTOK; |
---|
1217 | } |
---|
1218 | YY_BREAK |
---|
1219 | case 40: |
---|
1220 | YY_RULE_SETUP |
---|
1221 | #line 274 "scanner.l" |
---|
1222 | /* skip whitespace */ |
---|
1223 | YY_BREAK |
---|
1224 | case 41: |
---|
1225 | YY_RULE_SETUP |
---|
1226 | #line 275 "scanner.l" |
---|
1227 | { return DOTDOT; } |
---|
1228 | YY_BREAK |
---|
1229 | case 42: |
---|
1230 | YY_RULE_SETUP |
---|
1231 | #line 276 "scanner.l" |
---|
1232 | { return COLONCOLON; } |
---|
1233 | YY_BREAK |
---|
1234 | case 43: |
---|
1235 | YY_RULE_SETUP |
---|
1236 | #line 277 "scanner.l" |
---|
1237 | { return MINUSMINUS; } |
---|
1238 | YY_BREAK |
---|
1239 | case 44: |
---|
1240 | YY_RULE_SETUP |
---|
1241 | #line 278 "scanner.l" |
---|
1242 | { return PLUSPLUS ; } |
---|
1243 | YY_BREAK |
---|
1244 | case 45: |
---|
1245 | YY_RULE_SETUP |
---|
1246 | #line 279 "scanner.l" |
---|
1247 | { return EQUAL_EQUAL; } |
---|
1248 | YY_BREAK |
---|
1249 | case 46: |
---|
1250 | YY_RULE_SETUP |
---|
1251 | #line 280 "scanner.l" |
---|
1252 | { lvalp->i='&'; return LOGIC_OP; } |
---|
1253 | YY_BREAK |
---|
1254 | case 47: |
---|
1255 | YY_RULE_SETUP |
---|
1256 | #line 281 "scanner.l" |
---|
1257 | { lvalp->i='|'; return LOGIC_OP; } |
---|
1258 | YY_BREAK |
---|
1259 | case 48: |
---|
1260 | YY_RULE_SETUP |
---|
1261 | #line 282 "scanner.l" |
---|
1262 | { lvalp->i=LE; return COMP_OP; } |
---|
1263 | YY_BREAK |
---|
1264 | case 49: |
---|
1265 | YY_RULE_SETUP |
---|
1266 | #line 283 "scanner.l" |
---|
1267 | { lvalp->i=GE; return COMP_OP; } |
---|
1268 | YY_BREAK |
---|
1269 | case 50: |
---|
1270 | YY_RULE_SETUP |
---|
1271 | #line 284 "scanner.l" |
---|
1272 | { return NOT; } |
---|
1273 | YY_BREAK |
---|
1274 | case 51: |
---|
1275 | YY_RULE_SETUP |
---|
1276 | #line 285 "scanner.l" |
---|
1277 | { return NOTEQUAL; } |
---|
1278 | YY_BREAK |
---|
1279 | case 52: |
---|
1280 | YY_RULE_SETUP |
---|
1281 | #line 286 "scanner.l" |
---|
1282 | { return NOTEQUAL; } |
---|
1283 | YY_BREAK |
---|
1284 | case 53: |
---|
1285 | YY_RULE_SETUP |
---|
1286 | #line 287 "scanner.l" |
---|
1287 | { return '^'; } |
---|
1288 | YY_BREAK |
---|
1289 | case 54: |
---|
1290 | YY_RULE_SETUP |
---|
1291 | #line 288 "scanner.l" |
---|
1292 | { return ARROW; } |
---|
1293 | YY_BREAK |
---|
1294 | case 55: |
---|
1295 | YY_RULE_SETUP |
---|
1296 | #line 289 "scanner.l" |
---|
1297 | { return '\\'; } |
---|
1298 | YY_BREAK |
---|
1299 | case 56: |
---|
1300 | YY_RULE_SETUP |
---|
1301 | #line 290 "scanner.l" |
---|
1302 | { |
---|
1303 | lvalp->name = omStrDup("\n"); |
---|
1304 | return STRINGTOK; |
---|
1305 | } |
---|
1306 | YY_BREAK |
---|
1307 | case 57: |
---|
1308 | YY_RULE_SETUP |
---|
1309 | #line 294 "scanner.l" |
---|
1310 | { |
---|
1311 | lvalp->name = (char *)yytext; |
---|
1312 | return INT_CONST; |
---|
1313 | } |
---|
1314 | YY_BREAK |
---|
1315 | case 58: |
---|
1316 | YY_RULE_SETUP |
---|
1317 | #line 298 "scanner.l" |
---|
1318 | { |
---|
1319 | lvalp->name = (char *)yytext; |
---|
1320 | return RINGVAR; |
---|
1321 | } |
---|
1322 | YY_BREAK |
---|
1323 | case 59: |
---|
1324 | YY_RULE_SETUP |
---|
1325 | #line 302 "scanner.l" |
---|
1326 | { |
---|
1327 | m2_end(-1); |
---|
1328 | } |
---|
1329 | YY_BREAK |
---|
1330 | case 60: |
---|
1331 | YY_RULE_SETUP |
---|
1332 | #line 305 "scanner.l" |
---|
1333 | { |
---|
1334 | #ifdef MM_STAT |
---|
1335 | mmStat(-500); |
---|
1336 | #endif |
---|
1337 | #ifdef OM_TRACK |
---|
1338 | #ifndef SING_NDEBUG |
---|
1339 | omPrintUsedTrackAddrs(stdout, 10); |
---|
1340 | #endif |
---|
1341 | #endif |
---|
1342 | m2_end(0); |
---|
1343 | } |
---|
1344 | YY_BREAK |
---|
1345 | case 61: |
---|
1346 | YY_RULE_SETUP |
---|
1347 | #line 317 "scanner.l" |
---|
1348 | { |
---|
1349 | lvalp->name = (char *)yytext; |
---|
1350 | return RINGVAR; |
---|
1351 | } |
---|
1352 | YY_BREAK |
---|
1353 | case 62: |
---|
1354 | YY_RULE_SETUP |
---|
1355 | #line 321 "scanner.l" |
---|
1356 | { |
---|
1357 | lvalp->name = (char *)yytext; |
---|
1358 | return RINGVAR; |
---|
1359 | } |
---|
1360 | YY_BREAK |
---|
1361 | case 63: |
---|
1362 | *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ |
---|
1363 | yy_c_buf_p = yy_cp -= 1; |
---|
1364 | YY_DO_BEFORE_ACTION; /* set up yytext again */ |
---|
1365 | YY_RULE_SETUP |
---|
1366 | #line 325 "scanner.l" |
---|
1367 | { |
---|
1368 | lvalp->name = (char *)yytext; |
---|
1369 | return RINGVAR; |
---|
1370 | } |
---|
1371 | YY_BREAK |
---|
1372 | case 64: |
---|
1373 | YY_RULE_SETUP |
---|
1374 | #line 330 "scanner.l" |
---|
1375 | { |
---|
1376 | /* {name} */ |
---|
1377 | int rc=0; |
---|
1378 | if (yytext[strlen((char *)yytext)-1] == '\n') |
---|
1379 | { |
---|
1380 | yytext[strlen((char *)yytext)-1] = '\0'; |
---|
1381 | } |
---|
1382 | if (yyleng > 1) |
---|
1383 | { |
---|
1384 | rc = IsCmd((char *)yytext,lvalp->i); |
---|
1385 | if (rc) return rc; |
---|
1386 | } |
---|
1387 | lvalp->name = omStrDup((char *)yytext); |
---|
1388 | return UNKNOWN_IDENT; |
---|
1389 | } |
---|
1390 | YY_BREAK |
---|
1391 | case 65: |
---|
1392 | YY_RULE_SETUP |
---|
1393 | #line 346 "scanner.l" |
---|
1394 | { |
---|
1395 | /*if (*yytext == '\n') REJECT;*/ |
---|
1396 | register char ch= *yytext; |
---|
1397 | lvalp->i = ch; |
---|
1398 | switch(ch) |
---|
1399 | { |
---|
1400 | /* case '&': */ |
---|
1401 | case '|': |
---|
1402 | return LOGIC_OP; |
---|
1403 | /* case '/': */ |
---|
1404 | case '%': |
---|
1405 | case '*': |
---|
1406 | return MULDIV_OP; |
---|
1407 | /* case '<': */ |
---|
1408 | case '>': |
---|
1409 | return COMP_OP; |
---|
1410 | default: |
---|
1411 | break; |
---|
1412 | } |
---|
1413 | return ch; |
---|
1414 | } |
---|
1415 | YY_BREAK |
---|
1416 | case 66: |
---|
1417 | YY_RULE_SETUP |
---|
1418 | #line 367 "scanner.l" |
---|
1419 | YY_FATAL_ERROR( "flex scanner jammed" ); |
---|
1420 | YY_BREAK |
---|
1421 | case YY_STATE_EOF(INITIAL): |
---|
1422 | case YY_STATE_EOF(string): |
---|
1423 | case YY_STATE_EOF(block): |
---|
1424 | case YY_STATE_EOF(blockstr): |
---|
1425 | case YY_STATE_EOF(brace): |
---|
1426 | case YY_STATE_EOF(bracestr): |
---|
1427 | case YY_STATE_EOF(bracket): |
---|
1428 | case YY_STATE_EOF(asstring): |
---|
1429 | yyterminate(); |
---|
1430 | |
---|
1431 | case YY_END_OF_BUFFER: |
---|
1432 | { |
---|
1433 | /* Amount of text matched not including the EOB char. */ |
---|
1434 | int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; |
---|
1435 | |
---|
1436 | /* Undo the effects of YY_DO_BEFORE_ACTION. */ |
---|
1437 | *yy_cp = yy_hold_char; |
---|
1438 | YY_RESTORE_YY_MORE_OFFSET |
---|
1439 | |
---|
1440 | if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) |
---|
1441 | { |
---|
1442 | /* We're scanning a new file or input source. It's |
---|
1443 | * possible that this happened because the user |
---|
1444 | * just pointed yyin at a new source and called |
---|
1445 | * yylex(). If so, then we have to assure |
---|
1446 | * consistency between yy_current_buffer and our |
---|
1447 | * globals. Here is the right place to do so, because |
---|
1448 | * this is the first action (other than possibly a |
---|
1449 | * back-up) that will match for the new input source. |
---|
1450 | */ |
---|
1451 | yy_n_chars = yy_current_buffer->yy_n_chars; |
---|
1452 | yy_current_buffer->yy_input_file = yyin; |
---|
1453 | yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; |
---|
1454 | } |
---|
1455 | |
---|
1456 | /* Note that here we test for yy_c_buf_p "<=" to the position |
---|
1457 | * of the first EOB in the buffer, since yy_c_buf_p will |
---|
1458 | * already have been incremented past the NUL character |
---|
1459 | * (since all states make transitions on EOB to the |
---|
1460 | * end-of-buffer state). Contrast this with the test |
---|
1461 | * in input(). |
---|
1462 | */ |
---|
1463 | if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) |
---|
1464 | { /* This was really a NUL. */ |
---|
1465 | yy_state_type yy_next_state; |
---|
1466 | |
---|
1467 | yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; |
---|
1468 | |
---|
1469 | yy_current_state = yy_get_previous_state(); |
---|
1470 | |
---|
1471 | /* Okay, we're now positioned to make the NUL |
---|
1472 | * transition. We couldn't have |
---|
1473 | * yy_get_previous_state() go ahead and do it |
---|
1474 | * for us because it doesn't know how to deal |
---|
1475 | * with the possibility of jamming (and we don't |
---|
1476 | * want to build jamming into it because then it |
---|
1477 | * will run more slowly). |
---|
1478 | */ |
---|
1479 | |
---|
1480 | yy_next_state = yy_try_NUL_trans( yy_current_state ); |
---|
1481 | |
---|
1482 | yy_bp = yytext_ptr + YY_MORE_ADJ; |
---|
1483 | |
---|
1484 | if ( yy_next_state ) |
---|
1485 | { |
---|
1486 | /* Consume the NUL. */ |
---|
1487 | yy_cp = ++yy_c_buf_p; |
---|
1488 | yy_current_state = yy_next_state; |
---|
1489 | goto yy_match; |
---|
1490 | } |
---|
1491 | |
---|
1492 | else |
---|
1493 | { |
---|
1494 | yy_cp = yy_c_buf_p; |
---|
1495 | goto yy_find_action; |
---|
1496 | } |
---|
1497 | } |
---|
1498 | |
---|
1499 | else switch ( yy_get_next_buffer() ) |
---|
1500 | { |
---|
1501 | case EOB_ACT_END_OF_FILE: |
---|
1502 | { |
---|
1503 | yy_did_buffer_switch_on_eof = 0; |
---|
1504 | |
---|
1505 | if ( yywrap() ) |
---|
1506 | { |
---|
1507 | /* Note: because we've taken care in |
---|
1508 | * yy_get_next_buffer() to have set up |
---|
1509 | * yytext, we can now set up |
---|
1510 | * yy_c_buf_p so that if some total |
---|
1511 | * hoser (like flex itself) wants to |
---|
1512 | * call the scanner after we return the |
---|
1513 | * YY_NULL, it'll still work - another |
---|
1514 | * YY_NULL will get returned. |
---|
1515 | */ |
---|
1516 | yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; |
---|
1517 | |
---|
1518 | yy_act = YY_STATE_EOF(YY_START); |
---|
1519 | goto do_action; |
---|
1520 | } |
---|
1521 | |
---|
1522 | else |
---|
1523 | { |
---|
1524 | if ( ! yy_did_buffer_switch_on_eof ) |
---|
1525 | YY_NEW_FILE; |
---|
1526 | } |
---|
1527 | break; |
---|
1528 | } |
---|
1529 | |
---|
1530 | case EOB_ACT_CONTINUE_SCAN: |
---|
1531 | yy_c_buf_p = |
---|
1532 | yytext_ptr + yy_amount_of_matched_text; |
---|
1533 | |
---|
1534 | yy_current_state = yy_get_previous_state(); |
---|
1535 | |
---|
1536 | yy_cp = yy_c_buf_p; |
---|
1537 | yy_bp = yytext_ptr + YY_MORE_ADJ; |
---|
1538 | goto yy_match; |
---|
1539 | |
---|
1540 | case EOB_ACT_LAST_MATCH: |
---|
1541 | yy_c_buf_p = |
---|
1542 | &yy_current_buffer->yy_ch_buf[yy_n_chars]; |
---|
1543 | |
---|
1544 | yy_current_state = yy_get_previous_state(); |
---|
1545 | |
---|
1546 | yy_cp = yy_c_buf_p; |
---|
1547 | yy_bp = yytext_ptr + YY_MORE_ADJ; |
---|
1548 | goto yy_find_action; |
---|
1549 | } |
---|
1550 | break; |
---|
1551 | } |
---|
1552 | |
---|
1553 | default: |
---|
1554 | YY_FATAL_ERROR( |
---|
1555 | "fatal flex scanner internal error--no action found" ); |
---|
1556 | } /* end of action switch */ |
---|
1557 | } /* end of scanning one token */ |
---|
1558 | } /* end of yylex */ |
---|
1559 | |
---|
1560 | |
---|
1561 | /* yy_get_next_buffer - try to read in a new buffer |
---|
1562 | * |
---|
1563 | * Returns a code representing an action: |
---|
1564 | * EOB_ACT_LAST_MATCH - |
---|
1565 | * EOB_ACT_CONTINUE_SCAN - continue scanning from current position |
---|
1566 | * EOB_ACT_END_OF_FILE - end of file |
---|
1567 | */ |
---|
1568 | |
---|
1569 | static int yy_get_next_buffer() |
---|
1570 | { |
---|
1571 | register char *dest = yy_current_buffer->yy_ch_buf; |
---|
1572 | register char *source = yytext_ptr; |
---|
1573 | register int number_to_move, i; |
---|
1574 | int ret_val; |
---|
1575 | |
---|
1576 | if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) |
---|
1577 | YY_FATAL_ERROR( |
---|
1578 | "fatal flex scanner internal error--end of buffer missed" ); |
---|
1579 | |
---|
1580 | if ( yy_current_buffer->yy_fill_buffer == 0 ) |
---|
1581 | { /* Don't try to fill the buffer, so this is an EOF. */ |
---|
1582 | if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) |
---|
1583 | { |
---|
1584 | /* We matched a single character, the EOB, so |
---|
1585 | * treat this as a final EOF. |
---|
1586 | */ |
---|
1587 | return EOB_ACT_END_OF_FILE; |
---|
1588 | } |
---|
1589 | |
---|
1590 | else |
---|
1591 | { |
---|
1592 | /* We matched some text prior to the EOB, first |
---|
1593 | * process it. |
---|
1594 | */ |
---|
1595 | return EOB_ACT_LAST_MATCH; |
---|
1596 | } |
---|
1597 | } |
---|
1598 | |
---|
1599 | /* Try to read more data. */ |
---|
1600 | |
---|
1601 | /* First move last chars to start of buffer. */ |
---|
1602 | number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; |
---|
1603 | |
---|
1604 | for ( i = 0; i < number_to_move; ++i ) |
---|
1605 | *(dest++) = *(source++); |
---|
1606 | |
---|
1607 | if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) |
---|
1608 | /* don't do the read, it's not guaranteed to return an EOF, |
---|
1609 | * just force an EOF |
---|
1610 | */ |
---|
1611 | yy_current_buffer->yy_n_chars = yy_n_chars = 0; |
---|
1612 | |
---|
1613 | else |
---|
1614 | { |
---|
1615 | int num_to_read = |
---|
1616 | yy_current_buffer->yy_buf_size - number_to_move - 1; |
---|
1617 | |
---|
1618 | while ( num_to_read <= 0 ) |
---|
1619 | { /* Not enough room in the buffer - grow it. */ |
---|
1620 | #ifdef YY_USES_REJECT |
---|
1621 | YY_FATAL_ERROR( |
---|
1622 | "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); |
---|
1623 | #else |
---|
1624 | |
---|
1625 | /* just a shorter name for the current buffer */ |
---|
1626 | YY_BUFFER_STATE b = yy_current_buffer; |
---|
1627 | |
---|
1628 | int yy_c_buf_p_offset = |
---|
1629 | (int) (yy_c_buf_p - b->yy_ch_buf); |
---|
1630 | |
---|
1631 | if ( b->yy_is_our_buffer ) |
---|
1632 | { |
---|
1633 | int new_size = b->yy_buf_size * 2; |
---|
1634 | |
---|
1635 | if ( new_size <= 0 ) |
---|
1636 | b->yy_buf_size += b->yy_buf_size / 8; |
---|
1637 | else |
---|
1638 | b->yy_buf_size *= 2; |
---|
1639 | |
---|
1640 | b->yy_ch_buf = (char *) |
---|
1641 | /* Include room in for 2 EOB chars. */ |
---|
1642 | yy_flex_realloc( (void *) b->yy_ch_buf, |
---|
1643 | b->yy_buf_size + 2 ); |
---|
1644 | } |
---|
1645 | else |
---|
1646 | /* Can't grow it, we don't own it. */ |
---|
1647 | b->yy_ch_buf = 0; |
---|
1648 | |
---|
1649 | if ( ! b->yy_ch_buf ) |
---|
1650 | YY_FATAL_ERROR( |
---|
1651 | "fatal error - scanner input buffer overflow" ); |
---|
1652 | |
---|
1653 | yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; |
---|
1654 | |
---|
1655 | num_to_read = yy_current_buffer->yy_buf_size - |
---|
1656 | number_to_move - 1; |
---|
1657 | #endif |
---|
1658 | } |
---|
1659 | |
---|
1660 | if ( num_to_read > YY_READ_BUF_SIZE ) |
---|
1661 | num_to_read = YY_READ_BUF_SIZE; |
---|
1662 | |
---|
1663 | /* Read in more data. */ |
---|
1664 | YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), |
---|
1665 | yy_n_chars, num_to_read ); |
---|
1666 | |
---|
1667 | yy_current_buffer->yy_n_chars = yy_n_chars; |
---|
1668 | } |
---|
1669 | |
---|
1670 | if ( yy_n_chars == 0 ) |
---|
1671 | { |
---|
1672 | if ( number_to_move == YY_MORE_ADJ ) |
---|
1673 | { |
---|
1674 | ret_val = EOB_ACT_END_OF_FILE; |
---|
1675 | yyrestart( yyin ); |
---|
1676 | } |
---|
1677 | |
---|
1678 | else |
---|
1679 | { |
---|
1680 | ret_val = EOB_ACT_LAST_MATCH; |
---|
1681 | yy_current_buffer->yy_buffer_status = |
---|
1682 | YY_BUFFER_EOF_PENDING; |
---|
1683 | } |
---|
1684 | } |
---|
1685 | |
---|
1686 | else |
---|
1687 | ret_val = EOB_ACT_CONTINUE_SCAN; |
---|
1688 | |
---|
1689 | yy_n_chars += number_to_move; |
---|
1690 | yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; |
---|
1691 | yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; |
---|
1692 | |
---|
1693 | yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; |
---|
1694 | |
---|
1695 | return ret_val; |
---|
1696 | } |
---|
1697 | |
---|
1698 | |
---|
1699 | /* yy_get_previous_state - get the state just before the EOB char was reached */ |
---|
1700 | |
---|
1701 | static yy_state_type yy_get_previous_state() |
---|
1702 | { |
---|
1703 | register yy_state_type yy_current_state; |
---|
1704 | register char *yy_cp; |
---|
1705 | |
---|
1706 | yy_current_state = yy_start; |
---|
1707 | |
---|
1708 | for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) |
---|
1709 | { |
---|
1710 | register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); |
---|
1711 | if ( yy_accept[yy_current_state] ) |
---|
1712 | { |
---|
1713 | yy_last_accepting_state = yy_current_state; |
---|
1714 | yy_last_accepting_cpos = yy_cp; |
---|
1715 | } |
---|
1716 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
---|
1717 | { |
---|
1718 | yy_current_state = (int) yy_def[yy_current_state]; |
---|
1719 | if ( yy_current_state >= 171 ) |
---|
1720 | yy_c = yy_meta[(unsigned int) yy_c]; |
---|
1721 | } |
---|
1722 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
---|
1723 | } |
---|
1724 | |
---|
1725 | return yy_current_state; |
---|
1726 | } |
---|
1727 | |
---|
1728 | |
---|
1729 | /* yy_try_NUL_trans - try to make a transition on the NUL character |
---|
1730 | * |
---|
1731 | * synopsis |
---|
1732 | * next_state = yy_try_NUL_trans( current_state ); |
---|
1733 | */ |
---|
1734 | |
---|
1735 | #ifdef YY_USE_PROTOS |
---|
1736 | static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) |
---|
1737 | #else |
---|
1738 | static yy_state_type yy_try_NUL_trans( yy_current_state ) |
---|
1739 | yy_state_type yy_current_state; |
---|
1740 | #endif |
---|
1741 | { |
---|
1742 | register int yy_is_jam; |
---|
1743 | register char *yy_cp = yy_c_buf_p; |
---|
1744 | |
---|
1745 | register YY_CHAR yy_c = 1; |
---|
1746 | if ( yy_accept[yy_current_state] ) |
---|
1747 | { |
---|
1748 | yy_last_accepting_state = yy_current_state; |
---|
1749 | yy_last_accepting_cpos = yy_cp; |
---|
1750 | } |
---|
1751 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
---|
1752 | { |
---|
1753 | yy_current_state = (int) yy_def[yy_current_state]; |
---|
1754 | if ( yy_current_state >= 171 ) |
---|
1755 | yy_c = yy_meta[(unsigned int) yy_c]; |
---|
1756 | } |
---|
1757 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
---|
1758 | yy_is_jam = (yy_current_state == 170); |
---|
1759 | |
---|
1760 | return yy_is_jam ? 0 : yy_current_state; |
---|
1761 | } |
---|
1762 | |
---|
1763 | |
---|
1764 | #ifndef YY_NO_UNPUT |
---|
1765 | #ifdef YY_USE_PROTOS |
---|
1766 | static void yyunput( int c, register char *yy_bp ) |
---|
1767 | #else |
---|
1768 | static void yyunput( c, yy_bp ) |
---|
1769 | int c; |
---|
1770 | register char *yy_bp; |
---|
1771 | #endif |
---|
1772 | { |
---|
1773 | register char *yy_cp = yy_c_buf_p; |
---|
1774 | |
---|
1775 | /* undo effects of setting up yytext */ |
---|
1776 | *yy_cp = yy_hold_char; |
---|
1777 | |
---|
1778 | if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) |
---|
1779 | { /* need to shift things up to make room */ |
---|
1780 | /* +2 for EOB chars. */ |
---|
1781 | register int number_to_move = yy_n_chars + 2; |
---|
1782 | register char *dest = &yy_current_buffer->yy_ch_buf[ |
---|
1783 | yy_current_buffer->yy_buf_size + 2]; |
---|
1784 | register char *source = |
---|
1785 | &yy_current_buffer->yy_ch_buf[number_to_move]; |
---|
1786 | |
---|
1787 | while ( source > yy_current_buffer->yy_ch_buf ) |
---|
1788 | *--dest = *--source; |
---|
1789 | |
---|
1790 | yy_cp += (int) (dest - source); |
---|
1791 | yy_bp += (int) (dest - source); |
---|
1792 | yy_current_buffer->yy_n_chars = |
---|
1793 | yy_n_chars = yy_current_buffer->yy_buf_size; |
---|
1794 | |
---|
1795 | if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) |
---|
1796 | YY_FATAL_ERROR( "flex scanner push-back overflow" ); |
---|
1797 | } |
---|
1798 | |
---|
1799 | *--yy_cp = (char) c; |
---|
1800 | |
---|
1801 | |
---|
1802 | yytext_ptr = yy_bp; |
---|
1803 | yy_hold_char = *yy_cp; |
---|
1804 | yy_c_buf_p = yy_cp; |
---|
1805 | } |
---|
1806 | #endif /* ifndef YY_NO_UNPUT */ |
---|
1807 | |
---|
1808 | |
---|
1809 | #ifdef __cplusplus |
---|
1810 | static int yyinput() |
---|
1811 | #else |
---|
1812 | static int input() |
---|
1813 | #endif |
---|
1814 | { |
---|
1815 | int c; |
---|
1816 | |
---|
1817 | *yy_c_buf_p = yy_hold_char; |
---|
1818 | |
---|
1819 | if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) |
---|
1820 | { |
---|
1821 | /* yy_c_buf_p now points to the character we want to return. |
---|
1822 | * If this occurs *before* the EOB characters, then it's a |
---|
1823 | * valid NUL; if not, then we've hit the end of the buffer. |
---|
1824 | */ |
---|
1825 | if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) |
---|
1826 | /* This was really a NUL. */ |
---|
1827 | *yy_c_buf_p = '\0'; |
---|
1828 | |
---|
1829 | else |
---|
1830 | { /* need more input */ |
---|
1831 | int offset = yy_c_buf_p - yytext_ptr; |
---|
1832 | ++yy_c_buf_p; |
---|
1833 | |
---|
1834 | switch ( yy_get_next_buffer() ) |
---|
1835 | { |
---|
1836 | case EOB_ACT_LAST_MATCH: |
---|
1837 | /* This happens because yy_g_n_b() |
---|
1838 | * sees that we've accumulated a |
---|
1839 | * token and flags that we need to |
---|
1840 | * try matching the token before |
---|
1841 | * proceeding. But for input(), |
---|
1842 | * there's no matching to consider. |
---|
1843 | * So convert the EOB_ACT_LAST_MATCH |
---|
1844 | * to EOB_ACT_END_OF_FILE. |
---|
1845 | */ |
---|
1846 | |
---|
1847 | /* Reset buffer status. */ |
---|
1848 | yyrestart( yyin ); |
---|
1849 | |
---|
1850 | /* fall through */ |
---|
1851 | |
---|
1852 | case EOB_ACT_END_OF_FILE: |
---|
1853 | { |
---|
1854 | if ( yywrap() ) |
---|
1855 | return EOF; |
---|
1856 | |
---|
1857 | if ( ! yy_did_buffer_switch_on_eof ) |
---|
1858 | YY_NEW_FILE; |
---|
1859 | #ifdef __cplusplus |
---|
1860 | return yyinput(); |
---|
1861 | #else |
---|
1862 | return input(); |
---|
1863 | #endif |
---|
1864 | } |
---|
1865 | |
---|
1866 | case EOB_ACT_CONTINUE_SCAN: |
---|
1867 | yy_c_buf_p = yytext_ptr + offset; |
---|
1868 | break; |
---|
1869 | } |
---|
1870 | } |
---|
1871 | } |
---|
1872 | |
---|
1873 | c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ |
---|
1874 | *yy_c_buf_p = '\0'; /* preserve yytext */ |
---|
1875 | yy_hold_char = *++yy_c_buf_p; |
---|
1876 | |
---|
1877 | |
---|
1878 | return c; |
---|
1879 | } |
---|
1880 | |
---|
1881 | |
---|
1882 | #ifdef YY_USE_PROTOS |
---|
1883 | void yyrestart( FILE *input_file ) |
---|
1884 | #else |
---|
1885 | void yyrestart( input_file ) |
---|
1886 | FILE *input_file; |
---|
1887 | #endif |
---|
1888 | { |
---|
1889 | if ( ! yy_current_buffer ) |
---|
1890 | yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); |
---|
1891 | |
---|
1892 | yy_init_buffer( yy_current_buffer, input_file ); |
---|
1893 | yy_load_buffer_state(); |
---|
1894 | } |
---|
1895 | |
---|
1896 | |
---|
1897 | #ifdef YY_USE_PROTOS |
---|
1898 | void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) |
---|
1899 | #else |
---|
1900 | void yy_switch_to_buffer( new_buffer ) |
---|
1901 | YY_BUFFER_STATE new_buffer; |
---|
1902 | #endif |
---|
1903 | { |
---|
1904 | if ( yy_current_buffer == new_buffer ) |
---|
1905 | return; |
---|
1906 | |
---|
1907 | if ( yy_current_buffer ) |
---|
1908 | { |
---|
1909 | /* Flush out information for old buffer. */ |
---|
1910 | *yy_c_buf_p = yy_hold_char; |
---|
1911 | yy_current_buffer->yy_buf_pos = yy_c_buf_p; |
---|
1912 | yy_current_buffer->yy_n_chars = yy_n_chars; |
---|
1913 | } |
---|
1914 | |
---|
1915 | yy_current_buffer = new_buffer; |
---|
1916 | yy_load_buffer_state(); |
---|
1917 | |
---|
1918 | /* We don't actually know whether we did this switch during |
---|
1919 | * EOF (yywrap()) processing, but the only time this flag |
---|
1920 | * is looked at is after yywrap() is called, so it's safe |
---|
1921 | * to go ahead and always set it. |
---|
1922 | */ |
---|
1923 | yy_did_buffer_switch_on_eof = 1; |
---|
1924 | } |
---|
1925 | |
---|
1926 | |
---|
1927 | #ifdef YY_USE_PROTOS |
---|
1928 | void yy_load_buffer_state( void ) |
---|
1929 | #else |
---|
1930 | void yy_load_buffer_state() |
---|
1931 | #endif |
---|
1932 | { |
---|
1933 | yy_n_chars = yy_current_buffer->yy_n_chars; |
---|
1934 | yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; |
---|
1935 | yyin = yy_current_buffer->yy_input_file; |
---|
1936 | yy_hold_char = *yy_c_buf_p; |
---|
1937 | } |
---|
1938 | |
---|
1939 | |
---|
1940 | #ifdef YY_USE_PROTOS |
---|
1941 | YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) |
---|
1942 | #else |
---|
1943 | YY_BUFFER_STATE yy_create_buffer( file, size ) |
---|
1944 | FILE *file; |
---|
1945 | int size; |
---|
1946 | #endif |
---|
1947 | { |
---|
1948 | YY_BUFFER_STATE b; |
---|
1949 | |
---|
1950 | b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); |
---|
1951 | if ( ! b ) |
---|
1952 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
---|
1953 | |
---|
1954 | b->yy_buf_size = size; |
---|
1955 | |
---|
1956 | /* yy_ch_buf has to be 2 characters longer than the size given because |
---|
1957 | * we need to put in 2 end-of-buffer characters. |
---|
1958 | */ |
---|
1959 | b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); |
---|
1960 | if ( ! b->yy_ch_buf ) |
---|
1961 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
---|
1962 | |
---|
1963 | b->yy_is_our_buffer = 1; |
---|
1964 | |
---|
1965 | yy_init_buffer( b, file ); |
---|
1966 | |
---|
1967 | return b; |
---|
1968 | } |
---|
1969 | |
---|
1970 | |
---|
1971 | #ifdef YY_USE_PROTOS |
---|
1972 | void yy_delete_buffer( YY_BUFFER_STATE b ) |
---|
1973 | #else |
---|
1974 | void yy_delete_buffer( b ) |
---|
1975 | YY_BUFFER_STATE b; |
---|
1976 | #endif |
---|
1977 | { |
---|
1978 | if ( ! b ) |
---|
1979 | return; |
---|
1980 | |
---|
1981 | if ( b == yy_current_buffer ) |
---|
1982 | yy_current_buffer = (YY_BUFFER_STATE) 0; |
---|
1983 | |
---|
1984 | if ( b->yy_is_our_buffer ) |
---|
1985 | yy_flex_free( (void *) b->yy_ch_buf ); |
---|
1986 | |
---|
1987 | yy_flex_free( (void *) b ); |
---|
1988 | } |
---|
1989 | |
---|
1990 | |
---|
1991 | #ifndef YY_ALWAYS_INTERACTIVE |
---|
1992 | #ifndef YY_NEVER_INTERACTIVE |
---|
1993 | extern int isatty YY_PROTO(( int )); |
---|
1994 | #endif |
---|
1995 | #endif |
---|
1996 | |
---|
1997 | #ifdef YY_USE_PROTOS |
---|
1998 | void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) |
---|
1999 | #else |
---|
2000 | void yy_init_buffer( b, file ) |
---|
2001 | YY_BUFFER_STATE b; |
---|
2002 | FILE *file; |
---|
2003 | #endif |
---|
2004 | |
---|
2005 | |
---|
2006 | { |
---|
2007 | yy_flush_buffer( b ); |
---|
2008 | |
---|
2009 | b->yy_input_file = file; |
---|
2010 | b->yy_fill_buffer = 1; |
---|
2011 | |
---|
2012 | #if YY_ALWAYS_INTERACTIVE |
---|
2013 | b->yy_is_interactive = 1; |
---|
2014 | #else |
---|
2015 | #if YY_NEVER_INTERACTIVE |
---|
2016 | b->yy_is_interactive = 0; |
---|
2017 | #else |
---|
2018 | b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; |
---|
2019 | #endif |
---|
2020 | #endif |
---|
2021 | } |
---|
2022 | |
---|
2023 | |
---|
2024 | #ifdef YY_USE_PROTOS |
---|
2025 | void yy_flush_buffer( YY_BUFFER_STATE b ) |
---|
2026 | #else |
---|
2027 | void yy_flush_buffer( b ) |
---|
2028 | YY_BUFFER_STATE b; |
---|
2029 | #endif |
---|
2030 | |
---|
2031 | { |
---|
2032 | if ( ! b ) |
---|
2033 | return; |
---|
2034 | |
---|
2035 | b->yy_n_chars = 0; |
---|
2036 | |
---|
2037 | /* We always need two end-of-buffer characters. The first causes |
---|
2038 | * a transition to the end-of-buffer state. The second causes |
---|
2039 | * a jam in that state. |
---|
2040 | */ |
---|
2041 | b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; |
---|
2042 | b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; |
---|
2043 | |
---|
2044 | b->yy_buf_pos = &b->yy_ch_buf[0]; |
---|
2045 | |
---|
2046 | b->yy_at_bol = 1; |
---|
2047 | b->yy_buffer_status = YY_BUFFER_NEW; |
---|
2048 | |
---|
2049 | if ( b == yy_current_buffer ) |
---|
2050 | yy_load_buffer_state(); |
---|
2051 | } |
---|
2052 | |
---|
2053 | |
---|
2054 | #ifndef YY_NO_SCAN_BUFFER |
---|
2055 | #ifdef YY_USE_PROTOS |
---|
2056 | YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) |
---|
2057 | #else |
---|
2058 | YY_BUFFER_STATE yy_scan_buffer( base, size ) |
---|
2059 | char *base; |
---|
2060 | yy_size_t size; |
---|
2061 | #endif |
---|
2062 | { |
---|
2063 | YY_BUFFER_STATE b; |
---|
2064 | |
---|
2065 | if ( size < 2 || |
---|
2066 | base[size-2] != YY_END_OF_BUFFER_CHAR || |
---|
2067 | base[size-1] != YY_END_OF_BUFFER_CHAR ) |
---|
2068 | /* They forgot to leave room for the EOB's. */ |
---|
2069 | return 0; |
---|
2070 | |
---|
2071 | b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); |
---|
2072 | if ( ! b ) |
---|
2073 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); |
---|
2074 | |
---|
2075 | b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ |
---|
2076 | b->yy_buf_pos = b->yy_ch_buf = base; |
---|
2077 | b->yy_is_our_buffer = 0; |
---|
2078 | b->yy_input_file = 0; |
---|
2079 | b->yy_n_chars = b->yy_buf_size; |
---|
2080 | b->yy_is_interactive = 0; |
---|
2081 | b->yy_at_bol = 1; |
---|
2082 | b->yy_fill_buffer = 0; |
---|
2083 | b->yy_buffer_status = YY_BUFFER_NEW; |
---|
2084 | |
---|
2085 | yy_switch_to_buffer( b ); |
---|
2086 | |
---|
2087 | return b; |
---|
2088 | } |
---|
2089 | #endif |
---|
2090 | |
---|
2091 | |
---|
2092 | #ifndef YY_NO_SCAN_STRING |
---|
2093 | #ifdef YY_USE_PROTOS |
---|
2094 | YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) |
---|
2095 | #else |
---|
2096 | YY_BUFFER_STATE yy_scan_string( yy_str ) |
---|
2097 | yyconst char *yy_str; |
---|
2098 | #endif |
---|
2099 | { |
---|
2100 | int len; |
---|
2101 | for ( len = 0; yy_str[len]; ++len ) |
---|
2102 | ; |
---|
2103 | |
---|
2104 | return yy_scan_bytes( yy_str, len ); |
---|
2105 | } |
---|
2106 | #endif |
---|
2107 | |
---|
2108 | |
---|
2109 | #ifndef YY_NO_SCAN_BYTES |
---|
2110 | #ifdef YY_USE_PROTOS |
---|
2111 | YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) |
---|
2112 | #else |
---|
2113 | YY_BUFFER_STATE yy_scan_bytes( bytes, len ) |
---|
2114 | yyconst char *bytes; |
---|
2115 | int len; |
---|
2116 | #endif |
---|
2117 | { |
---|
2118 | YY_BUFFER_STATE b; |
---|
2119 | char *buf; |
---|
2120 | yy_size_t n; |
---|
2121 | int i; |
---|
2122 | |
---|
2123 | /* Get memory for full buffer, including space for trailing EOB's. */ |
---|
2124 | n = len + 2; |
---|
2125 | buf = (char *) yy_flex_alloc( n ); |
---|
2126 | if ( ! buf ) |
---|
2127 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); |
---|
2128 | |
---|
2129 | for ( i = 0; i < len; ++i ) |
---|
2130 | buf[i] = bytes[i]; |
---|
2131 | |
---|
2132 | buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; |
---|
2133 | |
---|
2134 | b = yy_scan_buffer( buf, n ); |
---|
2135 | if ( ! b ) |
---|
2136 | YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); |
---|
2137 | |
---|
2138 | /* It's okay to grow etc. this buffer, and we should throw it |
---|
2139 | * away when we're done. |
---|
2140 | */ |
---|
2141 | b->yy_is_our_buffer = 1; |
---|
2142 | |
---|
2143 | return b; |
---|
2144 | } |
---|
2145 | #endif |
---|
2146 | |
---|
2147 | |
---|
2148 | #ifndef YY_NO_PUSH_STATE |
---|
2149 | #ifdef YY_USE_PROTOS |
---|
2150 | static void yy_push_state( int new_state ) |
---|
2151 | #else |
---|
2152 | static void yy_push_state( new_state ) |
---|
2153 | int new_state; |
---|
2154 | #endif |
---|
2155 | { |
---|
2156 | if ( yy_start_stack_ptr >= yy_start_stack_depth ) |
---|
2157 | { |
---|
2158 | yy_size_t new_size; |
---|
2159 | |
---|
2160 | yy_start_stack_depth += YY_START_STACK_INCR; |
---|
2161 | new_size = yy_start_stack_depth * sizeof( int ); |
---|
2162 | |
---|
2163 | if ( ! yy_start_stack ) |
---|
2164 | yy_start_stack = (int *) yy_flex_alloc( new_size ); |
---|
2165 | |
---|
2166 | else |
---|
2167 | yy_start_stack = (int *) yy_flex_realloc( |
---|
2168 | (void *) yy_start_stack, new_size ); |
---|
2169 | |
---|
2170 | if ( ! yy_start_stack ) |
---|
2171 | YY_FATAL_ERROR( |
---|
2172 | "out of memory expanding start-condition stack" ); |
---|
2173 | } |
---|
2174 | |
---|
2175 | yy_start_stack[yy_start_stack_ptr++] = YY_START; |
---|
2176 | |
---|
2177 | BEGIN(new_state); |
---|
2178 | } |
---|
2179 | #endif |
---|
2180 | |
---|
2181 | |
---|
2182 | #ifndef YY_NO_POP_STATE |
---|
2183 | static void yy_pop_state() |
---|
2184 | { |
---|
2185 | if ( --yy_start_stack_ptr < 0 ) |
---|
2186 | YY_FATAL_ERROR( "start-condition stack underflow" ); |
---|
2187 | |
---|
2188 | BEGIN(yy_start_stack[yy_start_stack_ptr]); |
---|
2189 | } |
---|
2190 | #endif |
---|
2191 | |
---|
2192 | |
---|
2193 | #ifndef YY_NO_TOP_STATE |
---|
2194 | static int yy_top_state() |
---|
2195 | { |
---|
2196 | return yy_start_stack[yy_start_stack_ptr - 1]; |
---|
2197 | } |
---|
2198 | #endif |
---|
2199 | |
---|
2200 | #ifndef YY_EXIT_FAILURE |
---|
2201 | #define YY_EXIT_FAILURE 2 |
---|
2202 | #endif |
---|
2203 | |
---|
2204 | #ifdef YY_USE_PROTOS |
---|
2205 | static void yy_fatal_error( yyconst char msg[] ) |
---|
2206 | #else |
---|
2207 | static void yy_fatal_error( msg ) |
---|
2208 | char msg[]; |
---|
2209 | #endif |
---|
2210 | { |
---|
2211 | (void) fprintf( stderr, "%s\n", msg ); |
---|
2212 | exit( YY_EXIT_FAILURE ); |
---|
2213 | } |
---|
2214 | |
---|
2215 | |
---|
2216 | |
---|
2217 | /* Redefine yyless() so it works in section 3 code. */ |
---|
2218 | |
---|
2219 | #undef yyless |
---|
2220 | #define yyless(n) \ |
---|
2221 | do \ |
---|
2222 | { \ |
---|
2223 | /* Undo effects of setting up yytext. */ \ |
---|
2224 | yytext[yyleng] = yy_hold_char; \ |
---|
2225 | yy_c_buf_p = yytext + n; \ |
---|
2226 | yy_hold_char = *yy_c_buf_p; \ |
---|
2227 | *yy_c_buf_p = '\0'; \ |
---|
2228 | yyleng = n; \ |
---|
2229 | } \ |
---|
2230 | while ( 0 ) |
---|
2231 | |
---|
2232 | |
---|
2233 | /* Internal utility routines. */ |
---|
2234 | |
---|
2235 | #ifndef yytext_ptr |
---|
2236 | #ifdef YY_USE_PROTOS |
---|
2237 | static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) |
---|
2238 | #else |
---|
2239 | static void yy_flex_strncpy( s1, s2, n ) |
---|
2240 | char *s1; |
---|
2241 | yyconst char *s2; |
---|
2242 | int n; |
---|
2243 | #endif |
---|
2244 | { |
---|
2245 | register int i; |
---|
2246 | for ( i = 0; i < n; ++i ) |
---|
2247 | s1[i] = s2[i]; |
---|
2248 | } |
---|
2249 | #endif |
---|
2250 | |
---|
2251 | #ifdef YY_NEED_STRLEN |
---|
2252 | #ifdef YY_USE_PROTOS |
---|
2253 | static int yy_flex_strlen( yyconst char *s ) |
---|
2254 | #else |
---|
2255 | static int yy_flex_strlen( s ) |
---|
2256 | yyconst char *s; |
---|
2257 | #endif |
---|
2258 | { |
---|
2259 | register int n; |
---|
2260 | for ( n = 0; s[n]; ++n ) |
---|
2261 | ; |
---|
2262 | |
---|
2263 | return n; |
---|
2264 | } |
---|
2265 | #endif |
---|
2266 | |
---|
2267 | |
---|
2268 | #ifdef YY_USE_PROTOS |
---|
2269 | static void *yy_flex_alloc( yy_size_t size ) |
---|
2270 | #else |
---|
2271 | static void *yy_flex_alloc( size ) |
---|
2272 | yy_size_t size; |
---|
2273 | #endif |
---|
2274 | { |
---|
2275 | return (void *) malloc( size ); |
---|
2276 | } |
---|
2277 | |
---|
2278 | #ifdef YY_USE_PROTOS |
---|
2279 | static void *yy_flex_realloc( void *ptr, yy_size_t size ) |
---|
2280 | #else |
---|
2281 | static void *yy_flex_realloc( ptr, size ) |
---|
2282 | void *ptr; |
---|
2283 | yy_size_t size; |
---|
2284 | #endif |
---|
2285 | { |
---|
2286 | /* The cast to (char *) in the following accommodates both |
---|
2287 | * implementations that use char* generic pointers, and those |
---|
2288 | * that use void* generic pointers. It works with the latter |
---|
2289 | * because both ANSI C and C++ allow castless assignment from |
---|
2290 | * any pointer type to void*, and deal with argument conversions |
---|
2291 | * as though doing an assignment. |
---|
2292 | */ |
---|
2293 | return (void *) realloc( (char *) ptr, size ); |
---|
2294 | } |
---|
2295 | |
---|
2296 | #ifdef YY_USE_PROTOS |
---|
2297 | static void yy_flex_free( void *ptr ) |
---|
2298 | #else |
---|
2299 | static void yy_flex_free( ptr ) |
---|
2300 | void *ptr; |
---|
2301 | #endif |
---|
2302 | { |
---|
2303 | free( ptr ); |
---|
2304 | } |
---|
2305 | |
---|
2306 | #if YY_MAIN |
---|
2307 | int main() |
---|
2308 | { |
---|
2309 | yylex(); |
---|
2310 | return 0; |
---|
2311 | } |
---|
2312 | #endif |
---|
2313 | #line 367 "scanner.l" |
---|
2314 | |
---|
2315 | |
---|
2316 | void * myynewbuffer() |
---|
2317 | { |
---|
2318 | void * oldb = YY_CURRENT_BUFFER; |
---|
2319 | yy_switch_to_buffer(yy_create_buffer(NULL, YY_BUF_SIZE)); |
---|
2320 | return oldb; |
---|
2321 | } |
---|
2322 | |
---|
2323 | void myyoldbuffer(void * oldb) |
---|
2324 | { |
---|
2325 | yy_delete_buffer(YY_CURRENT_BUFFER); |
---|
2326 | yy_switch_to_buffer((YY_BUFFER_STATE)oldb); |
---|
2327 | //yy_flush_buffer((YY_BUFFER_STATE)oldb); |
---|
2328 | } |
---|
2329 | |
---|
2330 | void myychangebuffer() |
---|
2331 | { |
---|
2332 | yy_flush_buffer((YY_BUFFER_STATE)YY_CURRENT_BUFFER); |
---|
2333 | yy_delete_buffer(YY_CURRENT_BUFFER); |
---|
2334 | yy_switch_to_buffer(yy_create_buffer(NULL, YY_BUF_SIZE)); |
---|
2335 | } |
---|
2336 | |
---|
2337 | void my_yy_flush() { YY_FLUSH_BUFFER;BEGIN(0); } |
---|