File: | lex.c |
Location: | line 1436, column 2 |
Description: | Array access (from variable 'yy_buffer_stack') results in a null pointer dereference |
1 | |||||
2 | #line 3 "lex.c" | ||||
3 | |||||
4 | #define YY_INT_ALIGNEDshort int short int | ||||
5 | |||||
6 | /* A lexical scanner generated by flex */ | ||||
7 | |||||
8 | #define FLEX_SCANNER | ||||
9 | #define YY_FLEX_MAJOR_VERSION2 2 | ||||
10 | #define YY_FLEX_MINOR_VERSION5 5 | ||||
11 | #define YY_FLEX_SUBMINOR_VERSION35 35 | ||||
12 | #if YY_FLEX_SUBMINOR_VERSION35 > 0 | ||||
13 | #define FLEX_BETA | ||||
14 | #endif | ||||
15 | |||||
16 | /* First, we deal with platform-specific or compiler-specific issues. */ | ||||
17 | |||||
18 | /* begin standard C headers. */ | ||||
19 | #include <stdio.h> | ||||
20 | #include <string.h> | ||||
21 | #include <errno(*__errno_location ()).h> | ||||
22 | #include <stdlib.h> | ||||
23 | |||||
24 | /* end standard C headers. */ | ||||
25 | |||||
26 | /* flex integer type definitions */ | ||||
27 | |||||
28 | #ifndef FLEXINT_H | ||||
29 | #define FLEXINT_H | ||||
30 | |||||
31 | /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ | ||||
32 | |||||
33 | #if defined (__STDC_VERSION__199901L) && __STDC_VERSION__199901L >= 199901L | ||||
34 | |||||
35 | /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, | ||||
36 | * if you want the limit (max/min) macros for int types. | ||||
37 | */ | ||||
38 | #ifndef __STDC_LIMIT_MACROS1 | ||||
39 | #define __STDC_LIMIT_MACROS1 1 | ||||
40 | #endif | ||||
41 | |||||
42 | #include <inttypes.h> | ||||
43 | typedef int8_t flex_int8_t; | ||||
44 | typedef uint8_t flex_uint8_t; | ||||
45 | typedef int16_t flex_int16_t; | ||||
46 | typedef uint16_t flex_uint16_t; | ||||
47 | typedef int32_t flex_int32_t; | ||||
48 | typedef uint32_t flex_uint32_t; | ||||
49 | #else | ||||
50 | typedef signed char flex_int8_t; | ||||
51 | typedef short int flex_int16_t; | ||||
52 | typedef int flex_int32_t; | ||||
53 | typedef unsigned char flex_uint8_t; | ||||
54 | typedef unsigned short int flex_uint16_t; | ||||
55 | typedef unsigned int flex_uint32_t; | ||||
56 | |||||
57 | /* Limits of integral types. */ | ||||
58 | #ifndef INT8_MIN(-128) | ||||
59 | #define INT8_MIN(-128) (-128) | ||||
60 | #endif | ||||
61 | #ifndef INT16_MIN(-32767 -1) | ||||
62 | #define INT16_MIN(-32767 -1) (-32767-1) | ||||
63 | #endif | ||||
64 | #ifndef INT32_MIN(-2147483647 -1) | ||||
65 | #define INT32_MIN(-2147483647 -1) (-2147483647-1) | ||||
66 | #endif | ||||
67 | #ifndef INT8_MAX(127) | ||||
68 | #define INT8_MAX(127) (127) | ||||
69 | #endif | ||||
70 | #ifndef INT16_MAX(32767) | ||||
71 | #define INT16_MAX(32767) (32767) | ||||
72 | #endif | ||||
73 | #ifndef INT32_MAX(2147483647) | ||||
74 | #define INT32_MAX(2147483647) (2147483647) | ||||
75 | #endif | ||||
76 | #ifndef UINT8_MAX(255) | ||||
77 | #define UINT8_MAX(255) (255U) | ||||
78 | #endif | ||||
79 | #ifndef UINT16_MAX(65535) | ||||
80 | #define UINT16_MAX(65535) (65535U) | ||||
81 | #endif | ||||
82 | #ifndef UINT32_MAX(4294967295U) | ||||
83 | #define UINT32_MAX(4294967295U) (4294967295U) | ||||
84 | #endif | ||||
85 | |||||
86 | #endif /* ! C99 */ | ||||
87 | |||||
88 | #endif /* ! FLEXINT_H */ | ||||
89 | |||||
90 | #ifdef __cplusplus | ||||
91 | |||||
92 | /* The "const" storage-class-modifier is valid. */ | ||||
93 | #define YY_USE_CONST | ||||
94 | |||||
95 | #else /* ! __cplusplus */ | ||||
96 | |||||
97 | /* C99 requires __STDC__ to be defined as 1. */ | ||||
98 | #if defined (__STDC__1) | ||||
99 | |||||
100 | #define YY_USE_CONST | ||||
101 | |||||
102 | #endif /* defined (__STDC__) */ | ||||
103 | #endif /* ! __cplusplus */ | ||||
104 | |||||
105 | #ifdef YY_USE_CONST | ||||
106 | #define yyconstconst const | ||||
107 | #else | ||||
108 | #define yyconstconst | ||||
109 | #endif | ||||
110 | |||||
111 | /* Returned upon end-of-file. */ | ||||
112 | #define YY_NULL0 0 | ||||
113 | |||||
114 | /* Promotes a possibly negative, possibly signed char to an unsigned | ||||
115 | * integer for use as an array index. If the signed char is negative, | ||||
116 | * we want to instead treat it as an 8-bit unsigned char, hence the | ||||
117 | * double cast. | ||||
118 | */ | ||||
119 | #define YY_SC_TO_UI(c)((unsigned int) (unsigned char) c) ((unsigned int) (unsigned char) c) | ||||
120 | |||||
121 | /* Enter a start condition. This macro really ought to take a parameter, | ||||
122 | * but we do it the disgusting crufty way forced on us by the ()-less | ||||
123 | * definition of BEGIN. | ||||
124 | */ | ||||
125 | #define BEGIN(yy_start) = 1 + 2 * (yy_start) = 1 + 2 * | ||||
126 | |||||
127 | /* Translate the current start state into a value that can be later handed | ||||
128 | * to BEGIN to return to the state. The YYSTATE alias is for lex | ||||
129 | * compatibility. | ||||
130 | */ | ||||
131 | #define YY_START(((yy_start) - 1) / 2) (((yy_start) - 1) / 2) | ||||
132 | #define YYSTATE(((yy_start) - 1) / 2) YY_START(((yy_start) - 1) / 2) | ||||
133 | |||||
134 | /* Action number for EOF rule of a given start state. */ | ||||
135 | #define YY_STATE_EOF(state)(19 + state + 1) (YY_END_OF_BUFFER19 + state + 1) | ||||
136 | |||||
137 | /* Special action meaning "start processing a new file". */ | ||||
138 | #define YY_NEW_FILEyyrestart(yyin ) yyrestart(yyin ) | ||||
139 | |||||
140 | #define YY_END_OF_BUFFER_CHAR0 0 | ||||
141 | |||||
142 | /* Size of default input buffer. */ | ||||
143 | #ifndef YY_BUF_SIZE16384 | ||||
144 | #ifdef __ia64__ | ||||
145 | /* On IA-64, the buffer size is 16k, not 8k. | ||||
146 | * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. | ||||
147 | * Ditto for the __ia64__ case accordingly. | ||||
148 | */ | ||||
149 | #define YY_BUF_SIZE16384 32768 | ||||
150 | #else | ||||
151 | #define YY_BUF_SIZE16384 16384 | ||||
152 | #endif /* __ia64__ */ | ||||
153 | #endif | ||||
154 | |||||
155 | /* The state buf must be large enough to hold one state per character in the main buffer. | ||||
156 | */ | ||||
157 | #define YY_STATE_BUF_SIZE((16384 + 2) * sizeof(yy_state_type)) ((YY_BUF_SIZE16384 + 2) * sizeof(yy_state_type)) | ||||
158 | |||||
159 | #ifndef YY_TYPEDEF_YY_BUFFER_STATE | ||||
160 | #define YY_TYPEDEF_YY_BUFFER_STATE | ||||
161 | typedef struct yy_buffer_state *YY_BUFFER_STATE; | ||||
162 | #endif | ||||
163 | |||||
164 | extern int yyleng; | ||||
165 | |||||
166 | extern FILE *yyin, *yyout; | ||||
167 | |||||
168 | #define EOB_ACT_CONTINUE_SCAN0 0 | ||||
169 | #define EOB_ACT_END_OF_FILE1 1 | ||||
170 | #define EOB_ACT_LAST_MATCH2 2 | ||||
171 | |||||
172 | #define YY_LESS_LINENO(n) | ||||
173 | |||||
174 | /* Return all but the first "n" matched characters back to the input stream. */ | ||||
175 | #define yyless(n)do { int yyless_macro_arg = (n); ; yytext[yyleng] = (yy_hold_char ); (yy_c_buf_p) = yytext + yyless_macro_arg; (yy_hold_char) = *(yy_c_buf_p); *(yy_c_buf_p) = '\0'; yyleng = yyless_macro_arg ; } while ( 0 ) \ | ||||
176 | do \ | ||||
177 | { \ | ||||
178 | /* Undo effects of setting up yytext. */ \ | ||||
179 | int yyless_macro_arg = (n); \ | ||||
180 | YY_LESS_LINENO(yyless_macro_arg);\ | ||||
181 | *yy_cp = (yy_hold_char); \ | ||||
182 | YY_RESTORE_YY_MORE_OFFSET \ | ||||
183 | (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ0; \ | ||||
184 | YY_DO_BEFORE_ACTION(yytext) = yy_bp; yyleng = (size_t) (yy_cp - yy_bp); (yy_hold_char ) = *yy_cp; *yy_cp = '\0'; (yy_c_buf_p) = yy_cp;; /* set up yytext again */ \ | ||||
185 | } \ | ||||
186 | while ( 0 ) | ||||
187 | |||||
188 | #define unput(c)twmUnput(c) yyunput( c, (yytext_ptryytext) ) | ||||
189 | |||||
190 | #ifndef YY_TYPEDEF_YY_SIZE_T | ||||
191 | #define YY_TYPEDEF_YY_SIZE_T | ||||
192 | typedef size_t yy_size_t; | ||||
193 | #endif | ||||
194 | |||||
195 | #ifndef YY_STRUCT_YY_BUFFER_STATE | ||||
196 | #define YY_STRUCT_YY_BUFFER_STATE | ||||
197 | struct yy_buffer_state | ||||
198 | { | ||||
199 | FILE *yy_input_file; | ||||
200 | |||||
201 | char *yy_ch_buf; /* input buffer */ | ||||
202 | char *yy_buf_pos; /* current position in input buffer */ | ||||
203 | |||||
204 | /* Size of input buffer in bytes, not including room for EOB | ||||
205 | * characters. | ||||
206 | */ | ||||
207 | yy_size_t yy_buf_size; | ||||
208 | |||||
209 | /* Number of characters read into yy_ch_buf, not including EOB | ||||
210 | * characters. | ||||
211 | */ | ||||
212 | int yy_n_chars; | ||||
213 | |||||
214 | /* Whether we "own" the buffer - i.e., we know we created it, | ||||
215 | * and can realloc() it to grow it, and should free() it to | ||||
216 | * delete it. | ||||
217 | */ | ||||
218 | int yy_is_our_buffer; | ||||
219 | |||||
220 | /* Whether this is an "interactive" input source; if so, and | ||||
221 | * if we're using stdio for input, then we want to use getc() | ||||
222 | * instead of fread(), to make sure we stop fetching input after | ||||
223 | * each newline. | ||||
224 | */ | ||||
225 | int yy_is_interactive; | ||||
226 | |||||
227 | /* Whether we're considered to be at the beginning of a line. | ||||
228 | * If so, '^' rules will be active on the next match, otherwise | ||||
229 | * not. | ||||
230 | */ | ||||
231 | int yy_at_bol; | ||||
232 | |||||
233 | int yy_bs_lineno; /**< The line count. */ | ||||
234 | int yy_bs_column; /**< The column count. */ | ||||
235 | |||||
236 | /* Whether to try to fill the input buffer when we reach the | ||||
237 | * end of it. | ||||
238 | */ | ||||
239 | int yy_fill_buffer; | ||||
240 | |||||
241 | int yy_buffer_status; | ||||
242 | |||||
243 | #define YY_BUFFER_NEW0 0 | ||||
244 | #define YY_BUFFER_NORMAL1 1 | ||||
245 | /* When an EOF's been seen but there's still some text to process | ||||
246 | * then we mark the buffer as YY_EOF_PENDING, to indicate that we | ||||
247 | * shouldn't try reading from the input source any more. We might | ||||
248 | * still have a bunch of tokens to match, though, because of | ||||
249 | * possible backing-up. | ||||
250 | * | ||||
251 | * When we actually see the EOF, we change the status to "new" | ||||
252 | * (via yyrestart()), so that the user can continue scanning by | ||||
253 | * just pointing yyin at a new input file. | ||||
254 | */ | ||||
255 | #define YY_BUFFER_EOF_PENDING2 2 | ||||
256 | |||||
257 | }; | ||||
258 | #endif /* !YY_STRUCT_YY_BUFFER_STATE */ | ||||
259 | |||||
260 | /* Stack of input buffers. */ | ||||
261 | static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ | ||||
262 | static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ | ||||
263 | static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ | ||||
264 | |||||
265 | /* We provide macros for accessing buffer states in case in the | ||||
266 | * future we want to put the buffer states in a more general | ||||
267 | * "scanner state". | ||||
268 | * | ||||
269 | * Returns the top of the stack, or NULL. | ||||
270 | */ | ||||
271 | #define YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void*)0)) ( (yy_buffer_stack) \ | ||||
272 | ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ | ||||
273 | : NULL((void*)0)) | ||||
274 | |||||
275 | /* Same as previous macro, but useful when we know that the buffer stack is not | ||||
276 | * NULL or when we need an lvalue. For internal use only. | ||||
277 | */ | ||||
278 | #define YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)] (yy_buffer_stack)[(yy_buffer_stack_top)] | ||||
279 | |||||
280 | /* yy_hold_char holds the character lost when yytext is formed. */ | ||||
281 | static char yy_hold_char; | ||||
282 | static int yy_n_chars; /* number of characters read into yy_ch_buf */ | ||||
283 | int yyleng; | ||||
284 | |||||
285 | /* Points to current character in buffer. */ | ||||
286 | static char *yy_c_buf_p = (char *) 0; | ||||
287 | static int yy_init = 0; /* whether we need to initialize */ | ||||
288 | static int yy_start = 0; /* start state number */ | ||||
289 | |||||
290 | /* Flag which is used to allow yywrap()'s to do buffer switches | ||||
291 | * instead of setting up a fresh yyin. A bit of a hack ... | ||||
292 | */ | ||||
293 | static int yy_did_buffer_switch_on_eof; | ||||
294 | |||||
295 | void yyrestart (FILE *input_file ); | ||||
296 | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); | ||||
297 | YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); | ||||
298 | void yy_delete_buffer (YY_BUFFER_STATE b ); | ||||
299 | void yy_flush_buffer (YY_BUFFER_STATE b ); | ||||
300 | void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); | ||||
301 | void yypop_buffer_state (void ); | ||||
302 | |||||
303 | static void yyensure_buffer_stack (void ); | ||||
304 | static void yy_load_buffer_state (void ); | ||||
305 | static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); | ||||
306 | |||||
307 | #define YY_FLUSH_BUFFERyy_flush_buffer(( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top )] : ((void*)0)) ) yy_flush_buffer(YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void*)0)) ) | ||||
308 | |||||
309 | YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); | ||||
310 | YY_BUFFER_STATE yy_scan_string (yyconstconst char *yy_str ); | ||||
311 | YY_BUFFER_STATE yy_scan_bytes (yyconstconst char *bytes,int len ); | ||||
312 | |||||
313 | void *yyalloc (yy_size_t ); | ||||
314 | void *yyrealloc (void *,yy_size_t ); | ||||
315 | void yyfree (void * ); | ||||
316 | |||||
317 | #define yy_new_bufferyy_create_buffer yy_create_buffer | ||||
318 | |||||
319 | #define yy_set_interactive(is_interactive){ if ( ! ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top )] : ((void*)0)) ){ yyensure_buffer_stack (); (yy_buffer_stack )[(yy_buffer_stack_top)] = yy_create_buffer(yyin,16384 ); } ( yy_buffer_stack)[(yy_buffer_stack_top)]->yy_is_interactive = is_interactive; } \ | ||||
320 | { \ | ||||
321 | if ( ! YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void*)0)) ){ \ | ||||
322 | yyensure_buffer_stack (); \ | ||||
323 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)] = \ | ||||
324 | yy_create_buffer(yyin,YY_BUF_SIZE16384 ); \ | ||||
325 | } \ | ||||
326 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_is_interactive = is_interactive; \ | ||||
327 | } | ||||
328 | |||||
329 | #define yy_set_bol(at_bol){ if ( ! ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top )] : ((void*)0)) ){ yyensure_buffer_stack (); (yy_buffer_stack )[(yy_buffer_stack_top)] = yy_create_buffer(yyin,16384 ); } ( yy_buffer_stack)[(yy_buffer_stack_top)]->yy_at_bol = at_bol ; } \ | ||||
330 | { \ | ||||
331 | if ( ! YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void*)0)) ){\ | ||||
332 | yyensure_buffer_stack (); \ | ||||
333 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)] = \ | ||||
334 | yy_create_buffer(yyin,YY_BUF_SIZE16384 ); \ | ||||
335 | } \ | ||||
336 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_at_bol = at_bol; \ | ||||
337 | } | ||||
338 | |||||
339 | #define YY_AT_BOL()((yy_buffer_stack)[(yy_buffer_stack_top)]->yy_at_bol) (YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_at_bol) | ||||
340 | |||||
341 | /* Begin user sect3 */ | ||||
342 | |||||
343 | typedef unsigned char YY_CHAR; | ||||
344 | |||||
345 | FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; | ||||
346 | |||||
347 | typedef int yy_state_type; | ||||
348 | |||||
349 | extern int yylineno; | ||||
350 | |||||
351 | int yylineno = 1; | ||||
352 | |||||
353 | extern char *yytext; | ||||
354 | #define yytext_ptryytext yytext | ||||
355 | |||||
356 | static yy_state_type yy_get_previous_state (void ); | ||||
357 | static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); | ||||
358 | static int yy_get_next_buffer (void ); | ||||
359 | static void yy_fatal_error (yyconstconst char msg[] ); | ||||
360 | |||||
361 | /* Done after the current pattern has been matched and before the | ||||
362 | * corresponding action - sets up yytext. | ||||
363 | */ | ||||
364 | #define YY_DO_BEFORE_ACTION(yytext) = yy_bp; yyleng = (size_t) (yy_cp - yy_bp); (yy_hold_char ) = *yy_cp; *yy_cp = '\0'; (yy_c_buf_p) = yy_cp; \ | ||||
365 | (yytext_ptryytext) = yy_bp; \ | ||||
366 | yyleng = (size_t) (yy_cp - yy_bp); \ | ||||
367 | (yy_hold_char) = *yy_cp; \ | ||||
368 | *yy_cp = '\0'; \ | ||||
369 | (yy_c_buf_p) = yy_cp; | ||||
370 | |||||
371 | #define YY_NUM_RULES18 18 | ||||
372 | #define YY_END_OF_BUFFER19 19 | ||||
373 | /* This struct is not used in this scanner, | ||||
374 | but its presence is necessary. */ | ||||
375 | struct yy_trans_info | ||||
376 | { | ||||
377 | flex_int32_t yy_verify; | ||||
378 | flex_int32_t yy_nxt; | ||||
379 | }; | ||||
380 | static yyconstconst flex_int16_t yy_accept[33] = | ||||
381 | { 0, | ||||
382 | 0, 0, 19, 17, 16, 16, 11, 17, 17, 3, | ||||
383 | 4, 7, 8, 10, 14, 6, 5, 12, 1, 9, | ||||
384 | 2, 0, 13, 0, 0, 15, 10, 14, 0, 13, | ||||
385 | 0, 0 | ||||
386 | } ; | ||||
387 | |||||
388 | static yyconstconst flex_int32_t yy_ec[256] = | ||||
389 | { 0, | ||||
390 | 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, | ||||
391 | 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, | ||||
392 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||||
393 | 1, 2, 4, 5, 6, 1, 1, 1, 1, 7, | ||||
394 | 8, 1, 9, 1, 10, 11, 1, 12, 12, 12, | ||||
395 | 12, 12, 12, 12, 12, 12, 12, 13, 1, 1, | ||||
396 | 14, 1, 1, 1, 11, 11, 11, 11, 11, 11, | ||||
397 | 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, | ||||
398 | 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, | ||||
399 | 1, 15, 1, 16, 1, 1, 11, 11, 11, 11, | ||||
400 | |||||
401 | 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, | ||||
402 | 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, | ||||
403 | 11, 11, 17, 18, 19, 1, 1, 1, 1, 1, | ||||
404 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||||
405 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||||
406 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||||
407 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||||
408 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||||
409 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||||
410 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||||
411 | |||||
412 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||||
413 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||||
414 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||||
415 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||||
416 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||||
417 | 1, 1, 1, 1, 1 | ||||
418 | } ; | ||||
419 | |||||
420 | static yyconstconst flex_int32_t yy_meta[20] = | ||||
421 | { 0, | ||||
422 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||||
423 | 1, 1, 1, 1, 1, 1, 1, 1, 1 | ||||
424 | } ; | ||||
425 | |||||
426 | static yyconstconst flex_int16_t yy_base[36] = | ||||
427 | { 0, | ||||
428 | 0, 0, 39, 58, 58, 58, 58, 15, 35, 58, | ||||
429 | 58, 58, 58, 26, 24, 58, 58, 58, 58, 58, | ||||
430 | 58, 16, 58, 29, 26, 58, 17, 15, 18, 20, | ||||
431 | 42, 58, 25, 23, 21 | ||||
432 | } ; | ||||
433 | |||||
434 | static yyconstconst flex_int16_t yy_def[36] = | ||||
435 | { 0, | ||||
436 | 32, 1, 32, 32, 32, 32, 32, 33, 34, 32, | ||||
437 | 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, | ||||
438 | 32, 33, 32, 35, 34, 32, 32, 32, 33, 33, | ||||
439 | 35, 0, 32, 32, 32 | ||||
440 | } ; | ||||
441 | |||||
442 | static yyconstconst flex_int16_t yy_nxt[78] = | ||||
443 | { 0, | ||||
444 | 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, | ||||
445 | 14, 15, 16, 17, 4, 18, 19, 20, 21, 23, | ||||
446 | 23, 29, 23, 25, 23, 22, 28, 27, 26, 24, | ||||
447 | 24, 22, 24, 30, 24, 28, 27, 26, 32, 32, | ||||
448 | 32, 32, 32, 31, 22, 32, 30, 32, 32, 32, | ||||
449 | 32, 32, 32, 32, 32, 32, 31, 3, 32, 32, | ||||
450 | 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, | ||||
451 | 32, 32, 32, 32, 32, 32, 32 | ||||
452 | } ; | ||||
453 | |||||
454 | static yyconstconst flex_int16_t yy_chk[78] = | ||||
455 | { 0, | ||||
456 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||||
457 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, | ||||
458 | 22, 35, 29, 34, 30, 33, 28, 27, 25, 8, | ||||
459 | 22, 24, 29, 24, 30, 15, 14, 9, 3, 0, | ||||
460 | 0, 0, 0, 24, 31, 0, 31, 0, 0, 0, | ||||
461 | 0, 0, 0, 0, 0, 0, 31, 32, 32, 32, | ||||
462 | 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, | ||||
463 | 32, 32, 32, 32, 32, 32, 32 | ||||
464 | } ; | ||||
465 | |||||
466 | static yy_state_type yy_last_accepting_state; | ||||
467 | static char *yy_last_accepting_cpos; | ||||
468 | |||||
469 | extern int yy_flex_debug; | ||||
470 | int yy_flex_debug = 0; | ||||
471 | |||||
472 | /* The intent behind this definition is that it'll catch | ||||
473 | * any uses of REJECT which flex missed. | ||||
474 | */ | ||||
475 | #define REJECTreject_used_but_not_detected reject_used_but_not_detected | ||||
476 | #define yymore()yymore_used_but_not_detected yymore_used_but_not_detected | ||||
477 | #define YY_MORE_ADJ0 0 | ||||
478 | #define YY_RESTORE_YY_MORE_OFFSET | ||||
479 | char *yytext; | ||||
480 | #line 1 "lex.l" | ||||
481 | #line 2 "lex.l" | ||||
482 | /*****************************************************************************/ | ||||
483 | /* | ||||
484 | |||||
485 | Copyright 1989,1998 The Open Group | ||||
486 | |||||
487 | Permission to use, copy, modify, distribute, and sell this software and its | ||||
488 | documentation for any purpose is hereby granted without fee, provided that | ||||
489 | the above copyright notice appear in all copies and that both that | ||||
490 | copyright notice and this permission notice appear in supporting | ||||
491 | documentation. | ||||
492 | |||||
493 | The above copyright notice and this permission notice shall be included in | ||||
494 | all copies or substantial portions of the Software. | ||||
495 | |||||
496 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
497 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
498 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||
499 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | ||||
500 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||||
501 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||||
502 | |||||
503 | Except as contained in this notice, the name of The Open Group shall not be | ||||
504 | used in advertising or otherwise to promote the sale, use or other dealings | ||||
505 | in this Software without prior written authorization from The Open Group. | ||||
506 | |||||
507 | */ | ||||
508 | /** Copyright 1988 by Evans & Sutherland Computer Corporation, **/ | ||||
509 | /** Salt Lake City, Utah **/ | ||||
510 | /** Cambridge, Massachusetts **/ | ||||
511 | /** **/ | ||||
512 | /** All Rights Reserved **/ | ||||
513 | /** **/ | ||||
514 | /** Permission to use, copy, modify, and distribute this software and **/ | ||||
515 | /** its documentation for any purpose and without fee is hereby **/ | ||||
516 | /** granted, provided that the above copyright notice appear in all **/ | ||||
517 | /** copies and that both that copyright notice and this permis- **/ | ||||
518 | /** sion notice appear in supporting documentation, and that the **/ | ||||
519 | /** name of Evans & Sutherland not be used in advertising **/ | ||||
520 | /** in publicity pertaining to distribution of the software without **/ | ||||
521 | /** specific, written prior permission. **/ | ||||
522 | /** **/ | ||||
523 | /** EVANS & SUTHERLAND DISCLAIMs ALL WARRANTIES WITH REGARD **/ | ||||
524 | /** TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- **/ | ||||
525 | /** ABILITY AND FITNESS, IN NO EVENT SHALL EVANS & SUTHERLAND **/ | ||||
526 | /** BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAM- **/ | ||||
527 | /** AGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA **/ | ||||
528 | /** OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER **/ | ||||
529 | /** TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE **/ | ||||
530 | /** OR PERFORMANCE OF THIS SOFTWARE. **/ | ||||
531 | /*****************************************************************************/ | ||||
532 | |||||
533 | /*********************************************************************** | ||||
534 | * | ||||
535 | * $Xorg: lex.l,v 1.4 2001/02/09 02:05:36 xorgcvs Exp $ | ||||
536 | * | ||||
537 | * .twmrc lex file | ||||
538 | * | ||||
539 | * 12-Nov-87 Thomas E. LaStrange File created | ||||
540 | * | ||||
541 | ***********************************************************************/ | ||||
542 | /* $XFree86: xc/programs/twm/lex.l,v 3.13 2001/08/27 21:11:39 dawes Exp $ */ | ||||
543 | |||||
544 | /* #include <stdio.h> */ /* lex already includes stdio.h */ | ||||
545 | #include "twm.h" | ||||
546 | #include "gram.h" | ||||
547 | #include "list.h" | ||||
548 | #include "parse.h" | ||||
549 | |||||
550 | #ifdef FLEX_SCANNER | ||||
551 | int yylineno; | ||||
552 | |||||
553 | #undef YY_INPUT | ||||
554 | #define YY_INPUT(buf,result,size)((result) = doinput((buf),(size))) ((result) = doinput((buf),(size))) | ||||
555 | int doinput (char *buf, int size) | ||||
556 | { | ||||
557 | int c; | ||||
558 | |||||
559 | if (size == 0) | ||||
560 | return (0); | ||||
561 | |||||
562 | if ((c = (*twmInputFunc)()) <= 0) | ||||
563 | return (0); | ||||
564 | |||||
565 | buf[0] = c; | ||||
566 | return (1); | ||||
567 | } | ||||
568 | #define YY_NO_UNPUT | ||||
569 | #endif | ||||
570 | |||||
571 | #line 572 "lex.c" | ||||
572 | |||||
573 | #define INITIAL0 0 | ||||
574 | |||||
575 | #ifndef YY_NO_UNISTD_H | ||||
576 | /* Special case for "unistd.h", since it is non-ANSI. We include it way | ||||
577 | * down here because we want the user's section 1 to have been scanned first. | ||||
578 | * The user has a chance to override it with an option. | ||||
579 | */ | ||||
580 | #include <unistd.h> | ||||
581 | #endif | ||||
582 | |||||
583 | #ifndef YY_EXTRA_TYPEvoid * | ||||
584 | #define YY_EXTRA_TYPEvoid * void * | ||||
585 | #endif | ||||
586 | |||||
587 | static int yy_init_globals (void ); | ||||
588 | |||||
589 | /* Accessor methods to globals. | ||||
590 | These are made visible to non-reentrant scanners for convenience. */ | ||||
591 | |||||
592 | int yylex_destroy (void ); | ||||
593 | |||||
594 | int yyget_debug (void ); | ||||
595 | |||||
596 | void yyset_debug (int debug_flag ); | ||||
597 | |||||
598 | YY_EXTRA_TYPEvoid * yyget_extra (void ); | ||||
599 | |||||
600 | void yyset_extra (YY_EXTRA_TYPEvoid * user_defined ); | ||||
601 | |||||
602 | FILE *yyget_in (void ); | ||||
603 | |||||
604 | void yyset_in (FILE * in_str ); | ||||
605 | |||||
606 | FILE *yyget_out (void ); | ||||
607 | |||||
608 | void yyset_out (FILE * out_str ); | ||||
609 | |||||
610 | int yyget_leng (void ); | ||||
611 | |||||
612 | char *yyget_text (void ); | ||||
613 | |||||
614 | int yyget_lineno (void ); | ||||
615 | |||||
616 | void yyset_lineno (int line_number ); | ||||
617 | |||||
618 | /* Macros after this point can all be overridden by user definitions in | ||||
619 | * section 1. | ||||
620 | */ | ||||
621 | |||||
622 | #ifndef YY_SKIP_YYWRAP | ||||
623 | #ifdef __cplusplus | ||||
624 | extern "C" int yywrap (void ); | ||||
625 | #else | ||||
626 | extern int yywrap (void ); | ||||
627 | #endif | ||||
628 | #endif | ||||
629 | |||||
630 | static void yyunput (int c,char *buf_ptr ); | ||||
631 | |||||
632 | #ifndef yytext_ptryytext | ||||
633 | static void yy_flex_strncpy (char *,yyconstconst char *,int ); | ||||
634 | #endif | ||||
635 | |||||
636 | #ifdef YY_NEED_STRLEN | ||||
637 | static int yy_flex_strlen (yyconstconst char * ); | ||||
638 | #endif | ||||
639 | |||||
640 | #ifndef YY_NO_INPUT | ||||
641 | |||||
642 | #ifdef __cplusplus | ||||
643 | static int yyinput (void ); | ||||
644 | #else | ||||
645 | static int input (void ); | ||||
646 | #endif | ||||
647 | |||||
648 | #endif | ||||
649 | |||||
650 | /* Amount of stuff to slurp up with each read. */ | ||||
651 | #ifndef YY_READ_BUF_SIZE8192 | ||||
652 | #ifdef __ia64__ | ||||
653 | /* On IA-64, the buffer size is 16k, not 8k */ | ||||
654 | #define YY_READ_BUF_SIZE8192 16384 | ||||
655 | #else | ||||
656 | #define YY_READ_BUF_SIZE8192 8192 | ||||
657 | #endif /* __ia64__ */ | ||||
658 | #endif | ||||
659 | |||||
660 | /* Copy whatever the last rule matched to the standard output. */ | ||||
661 | #ifndef ECHOdo { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) | ||||
662 | /* This used to be an fputs(), but since the string might contain NUL's, | ||||
663 | * we now use fwrite(). | ||||
664 | */ | ||||
665 | #define ECHOdo { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) | ||||
666 | #endif | ||||
667 | |||||
668 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, | ||||
669 | * is returned in "result". | ||||
670 | */ | ||||
671 | #ifndef YY_INPUT | ||||
672 | #define YY_INPUT(buf,result,max_size)((result) = doinput((buf),(max_size))) \ | ||||
673 | if ( YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_is_interactive ) \ | ||||
674 | { \ | ||||
675 | int c = '*'; \ | ||||
676 | size_t n; \ | ||||
677 | for ( n = 0; n < max_size && \ | ||||
678 | (c = getc( yyin )_IO_getc (yyin)) != EOF(-1) && c != '\n'; ++n ) \ | ||||
679 | buf[n] = (char) c; \ | ||||
680 | if ( c == '\n' ) \ | ||||
681 | buf[n++] = (char) c; \ | ||||
682 | if ( c == EOF(-1) && ferror( yyin ) ) \ | ||||
683 | YY_FATAL_ERROR( "input in flex scanner failed" )yy_fatal_error( "input in flex scanner failed" ); \ | ||||
684 | result = n; \ | ||||
685 | } \ | ||||
686 | else \ | ||||
687 | { \ | ||||
688 | errno(*__errno_location ())=0; \ | ||||
689 | while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ | ||||
690 | { \ | ||||
691 | if( errno(*__errno_location ()) != EINTR4) \ | ||||
692 | { \ | ||||
693 | YY_FATAL_ERROR( "input in flex scanner failed" )yy_fatal_error( "input in flex scanner failed" ); \ | ||||
694 | break; \ | ||||
695 | } \ | ||||
696 | errno(*__errno_location ())=0; \ | ||||
697 | clearerr(yyin); \ | ||||
698 | } \ | ||||
699 | }\ | ||||
700 | \ | ||||
701 | |||||
702 | #endif | ||||
703 | |||||
704 | /* No semi-colon after return; correct usage is to write "yyterminate();" - | ||||
705 | * we don't want an extra ';' after the "return" because that will cause | ||||
706 | * some compilers to complain about unreachable statements. | ||||
707 | */ | ||||
708 | #ifndef yyterminate | ||||
709 | #define yyterminate()return 0 return YY_NULL0 | ||||
710 | #endif | ||||
711 | |||||
712 | /* Number of entries by which start-condition stack grows. */ | ||||
713 | #ifndef YY_START_STACK_INCR25 | ||||
714 | #define YY_START_STACK_INCR25 25 | ||||
715 | #endif | ||||
716 | |||||
717 | /* Report a fatal error. */ | ||||
718 | #ifndef YY_FATAL_ERROR | ||||
719 | #define YY_FATAL_ERROR(msg)yy_fatal_error( msg ) yy_fatal_error( msg ) | ||||
720 | #endif | ||||
721 | |||||
722 | /* end tables serialization structures and prototypes */ | ||||
723 | |||||
724 | /* Default declaration of generated scanner - a define so the user can | ||||
725 | * easily add parameters. | ||||
726 | */ | ||||
727 | #ifndef YY_DECLint yylex (void) | ||||
728 | #define YY_DECL_IS_OURS1 1 | ||||
729 | |||||
730 | extern int yylex (void); | ||||
731 | |||||
732 | #define YY_DECLint yylex (void) int yylex (void) | ||||
733 | #endif /* !YY_DECL */ | ||||
734 | |||||
735 | /* Code executed at the beginning of each rule, after yytext and yyleng | ||||
736 | * have been set up. | ||||
737 | */ | ||||
738 | #ifndef YY_USER_ACTION | ||||
739 | #define YY_USER_ACTION | ||||
740 | #endif | ||||
741 | |||||
742 | /* Code executed at the end of each rule. */ | ||||
743 | #ifndef YY_BREAKbreak; | ||||
744 | #define YY_BREAKbreak; break; | ||||
745 | #endif | ||||
746 | |||||
747 | #define YY_RULE_SETUP \ | ||||
748 | YY_USER_ACTION | ||||
749 | |||||
750 | /** The main scanner function which does all the work. | ||||
751 | */ | ||||
752 | YY_DECLint yylex (void) | ||||
753 | { | ||||
754 | register yy_state_type yy_current_state; | ||||
755 | register char *yy_cp, *yy_bp; | ||||
756 | register int yy_act; | ||||
757 | |||||
758 | #line 95 "lex.l" | ||||
759 | |||||
760 | #line 761 "lex.c" | ||||
761 | |||||
762 | if ( !(yy_init) ) | ||||
763 | { | ||||
764 | (yy_init) = 1; | ||||
765 | |||||
766 | #ifdef YY_USER_INIT | ||||
767 | YY_USER_INIT; | ||||
768 | #endif | ||||
769 | |||||
770 | if ( ! (yy_start) ) | ||||
771 | (yy_start) = 1; /* first start state */ | ||||
772 | |||||
773 | if ( ! yyin ) | ||||
774 | yyin = stdinstdin; | ||||
775 | |||||
776 | if ( ! yyout ) | ||||
777 | yyout = stdoutstdout; | ||||
778 | |||||
779 | if ( ! YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void*)0)) ) { | ||||
780 | yyensure_buffer_stack (); | ||||
781 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)] = | ||||
782 | yy_create_buffer(yyin,YY_BUF_SIZE16384 ); | ||||
783 | } | ||||
784 | |||||
785 | yy_load_buffer_state( ); | ||||
786 | } | ||||
787 | |||||
788 | while ( 1 ) /* loops until end-of-file is reached */ | ||||
789 | { | ||||
790 | yy_cp = (yy_c_buf_p); | ||||
791 | |||||
792 | /* Support of yytext. */ | ||||
793 | *yy_cp = (yy_hold_char); | ||||
794 | |||||
795 | /* yy_bp points to the position in yy_ch_buf of the start of | ||||
796 | * the current run. | ||||
797 | */ | ||||
798 | yy_bp = yy_cp; | ||||
799 | |||||
800 | yy_current_state = (yy_start); | ||||
801 | yy_match: | ||||
802 | do | ||||
803 | { | ||||
804 | register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)((unsigned int) (unsigned char) *yy_cp)]; | ||||
805 | if ( yy_accept[yy_current_state] ) | ||||
806 | { | ||||
807 | (yy_last_accepting_state) = yy_current_state; | ||||
808 | (yy_last_accepting_cpos) = yy_cp; | ||||
809 | } | ||||
810 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) | ||||
811 | { | ||||
812 | yy_current_state = (int) yy_def[yy_current_state]; | ||||
813 | if ( yy_current_state >= 33 ) | ||||
814 | yy_c = yy_meta[(unsigned int) yy_c]; | ||||
815 | } | ||||
816 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; | ||||
817 | ++yy_cp; | ||||
818 | } | ||||
819 | while ( yy_base[yy_current_state] != 58 ); | ||||
820 | |||||
821 | yy_find_action: | ||||
822 | yy_act = yy_accept[yy_current_state]; | ||||
823 | if ( yy_act == 0 ) | ||||
824 | { /* have to back up */ | ||||
825 | yy_cp = (yy_last_accepting_cpos); | ||||
826 | yy_current_state = (yy_last_accepting_state); | ||||
827 | yy_act = yy_accept[yy_current_state]; | ||||
828 | } | ||||
829 | |||||
830 | YY_DO_BEFORE_ACTION(yytext) = yy_bp; yyleng = (size_t) (yy_cp - yy_bp); (yy_hold_char ) = *yy_cp; *yy_cp = '\0'; (yy_c_buf_p) = yy_cp;; | ||||
831 | |||||
832 | do_action: /* This label is used only to access EOF actions. */ | ||||
833 | |||||
834 | switch ( yy_act ) | ||||
835 | { /* beginning of action switch */ | ||||
836 | case 0: /* must back up */ | ||||
837 | /* undo the effects of YY_DO_BEFORE_ACTION */ | ||||
838 | *yy_cp = (yy_hold_char); | ||||
839 | yy_cp = (yy_last_accepting_cpos); | ||||
840 | yy_current_state = (yy_last_accepting_state); | ||||
841 | goto yy_find_action; | ||||
842 | |||||
843 | case 1: | ||||
844 | YY_RULE_SETUP | ||||
845 | #line 96 "lex.l" | ||||
846 | { return (LB257); } | ||||
847 | YY_BREAKbreak; | ||||
848 | case 2: | ||||
849 | YY_RULE_SETUP | ||||
850 | #line 97 "lex.l" | ||||
851 | { return (RB258); } | ||||
852 | YY_BREAKbreak; | ||||
853 | case 3: | ||||
854 | YY_RULE_SETUP | ||||
855 | #line 98 "lex.l" | ||||
856 | { return (LP259); } | ||||
857 | YY_BREAKbreak; | ||||
858 | case 4: | ||||
859 | YY_RULE_SETUP | ||||
860 | #line 99 "lex.l" | ||||
861 | { return (RP260); } | ||||
862 | YY_BREAKbreak; | ||||
863 | case 5: | ||||
864 | YY_RULE_SETUP | ||||
865 | #line 100 "lex.l" | ||||
866 | { return (EQUALS301); } | ||||
867 | YY_BREAKbreak; | ||||
868 | case 6: | ||||
869 | YY_RULE_SETUP | ||||
870 | #line 101 "lex.l" | ||||
871 | { return (COLON300); } | ||||
872 | YY_BREAKbreak; | ||||
873 | case 7: | ||||
874 | YY_RULE_SETUP | ||||
875 | #line 102 "lex.l" | ||||
876 | { return PLUS265; } | ||||
877 | YY_BREAKbreak; | ||||
878 | case 8: | ||||
879 | YY_RULE_SETUP | ||||
880 | #line 103 "lex.l" | ||||
881 | { return MINUS266; } | ||||
882 | YY_BREAKbreak; | ||||
883 | case 9: | ||||
884 | YY_RULE_SETUP | ||||
885 | #line 104 "lex.l" | ||||
886 | { return OR268; } | ||||
887 | YY_BREAKbreak; | ||||
888 | case 10: | ||||
889 | YY_RULE_SETUP | ||||
890 | #line 106 "lex.l" | ||||
891 | { int token = parse_keyword ((char *)yytext, | ||||
892 | &yylval.num); | ||||
893 | if (token == ERRORTOKEN326) { | ||||
894 | twmrc_error_prefix(); | ||||
895 | fprintf (stderrstderr, | ||||
896 | "ignoring unknown keyword: %s\n", | ||||
897 | yytext); | ||||
898 | ParseError = 1; | ||||
899 | } else | ||||
900 | return token; | ||||
901 | } | ||||
902 | YY_BREAKbreak; | ||||
903 | case 11: | ||||
904 | YY_RULE_SETUP | ||||
905 | #line 118 "lex.l" | ||||
906 | { yylval.num = F_EXEC106; return FSKEYWORD320; } | ||||
907 | YY_BREAKbreak; | ||||
908 | case 12: | ||||
909 | YY_RULE_SETUP | ||||
910 | #line 119 "lex.l" | ||||
911 | { yylval.num = F_CUT107; return FSKEYWORD320; } | ||||
912 | YY_BREAKbreak; | ||||
913 | case 13: | ||||
914 | /* rule 13 can match eol */ | ||||
915 | YY_RULE_SETUP | ||||
916 | #line 121 "lex.l" | ||||
917 | { yylval.ptr = (char *)yytext; return STRING328; } | ||||
918 | YY_BREAKbreak; | ||||
919 | case 14: | ||||
920 | YY_RULE_SETUP | ||||
921 | #line 122 "lex.l" | ||||
922 | { (void)sscanf((char *)yytext, "%d", &yylval.num); | ||||
923 | return (NUMBER314); | ||||
924 | } | ||||
925 | YY_BREAKbreak; | ||||
926 | case 15: | ||||
927 | /* rule 15 can match eol */ | ||||
928 | YY_RULE_SETUP | ||||
929 | #line 125 "lex.l" | ||||
930 | {;} | ||||
931 | YY_BREAKbreak; | ||||
932 | case 16: | ||||
933 | /* rule 16 can match eol */ | ||||
934 | YY_RULE_SETUP | ||||
935 | #line 126 "lex.l" | ||||
936 | {;} | ||||
937 | YY_BREAKbreak; | ||||
938 | case 17: | ||||
939 | YY_RULE_SETUP | ||||
940 | #line 127 "lex.l" | ||||
941 | { | ||||
942 | twmrc_error_prefix(); | ||||
943 | fprintf (stderrstderr, | ||||
944 | "ignoring character \"%s\"\n", | ||||
945 | yytext); | ||||
946 | ParseError = 1; | ||||
947 | } | ||||
948 | YY_BREAKbreak; | ||||
949 | case 18: | ||||
950 | YY_RULE_SETUP | ||||
951 | #line 134 "lex.l" | ||||
952 | ECHOdo { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0); | ||||
953 | YY_BREAKbreak; | ||||
954 | #line 955 "lex.c" | ||||
955 | case YY_STATE_EOF(INITIAL)(19 + 0 + 1): | ||||
956 | yyterminate()return 0; | ||||
957 | |||||
958 | case YY_END_OF_BUFFER19: | ||||
959 | { | ||||
960 | /* Amount of text matched not including the EOB char. */ | ||||
961 | int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptryytext)) - 1; | ||||
962 | |||||
963 | /* Undo the effects of YY_DO_BEFORE_ACTION. */ | ||||
964 | *yy_cp = (yy_hold_char); | ||||
965 | YY_RESTORE_YY_MORE_OFFSET | ||||
966 | |||||
967 | if ( YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buffer_status == YY_BUFFER_NEW0 ) | ||||
968 | { | ||||
969 | /* We're scanning a new file or input source. It's | ||||
970 | * possible that this happened because the user | ||||
971 | * just pointed yyin at a new source and called | ||||
972 | * yylex(). If so, then we have to assure | ||||
973 | * consistency between YY_CURRENT_BUFFER and our | ||||
974 | * globals. Here is the right place to do so, because | ||||
975 | * this is the first action (other than possibly a | ||||
976 | * back-up) that will match for the new input source. | ||||
977 | */ | ||||
978 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_n_chars; | ||||
979 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_input_file = yyin; | ||||
980 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buffer_status = YY_BUFFER_NORMAL1; | ||||
981 | } | ||||
982 | |||||
983 | /* Note that here we test for yy_c_buf_p "<=" to the position | ||||
984 | * of the first EOB in the buffer, since yy_c_buf_p will | ||||
985 | * already have been incremented past the NUL character | ||||
986 | * (since all states make transitions on EOB to the | ||||
987 | * end-of-buffer state). Contrast this with the test | ||||
988 | * in input(). | ||||
989 | */ | ||||
990 | if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[(yy_n_chars)] ) | ||||
991 | { /* This was really a NUL. */ | ||||
992 | yy_state_type yy_next_state; | ||||
993 | |||||
994 | (yy_c_buf_p) = (yytext_ptryytext) + yy_amount_of_matched_text; | ||||
995 | |||||
996 | yy_current_state = yy_get_previous_state( ); | ||||
997 | |||||
998 | /* Okay, we're now positioned to make the NUL | ||||
999 | * transition. We couldn't have | ||||
1000 | * yy_get_previous_state() go ahead and do it | ||||
1001 | * for us because it doesn't know how to deal | ||||
1002 | * with the possibility of jamming (and we don't | ||||
1003 | * want to build jamming into it because then it | ||||
1004 | * will run more slowly). | ||||
1005 | */ | ||||
1006 | |||||
1007 | yy_next_state = yy_try_NUL_trans( yy_current_state ); | ||||
1008 | |||||
1009 | yy_bp = (yytext_ptryytext) + YY_MORE_ADJ0; | ||||
1010 | |||||
1011 | if ( yy_next_state ) | ||||
1012 | { | ||||
1013 | /* Consume the NUL. */ | ||||
1014 | yy_cp = ++(yy_c_buf_p); | ||||
1015 | yy_current_state = yy_next_state; | ||||
1016 | goto yy_match; | ||||
1017 | } | ||||
1018 | |||||
1019 | else | ||||
1020 | { | ||||
1021 | yy_cp = (yy_c_buf_p); | ||||
1022 | goto yy_find_action; | ||||
1023 | } | ||||
1024 | } | ||||
1025 | |||||
1026 | else switch ( yy_get_next_buffer( ) ) | ||||
1027 | { | ||||
1028 | case EOB_ACT_END_OF_FILE1: | ||||
1029 | { | ||||
1030 | (yy_did_buffer_switch_on_eof) = 0; | ||||
1031 | |||||
1032 | if ( yywrap( ) ) | ||||
1033 | { | ||||
1034 | /* Note: because we've taken care in | ||||
1035 | * yy_get_next_buffer() to have set up | ||||
1036 | * yytext, we can now set up | ||||
1037 | * yy_c_buf_p so that if some total | ||||
1038 | * hoser (like flex itself) wants to | ||||
1039 | * call the scanner after we return the | ||||
1040 | * YY_NULL, it'll still work - another | ||||
1041 | * YY_NULL will get returned. | ||||
1042 | */ | ||||
1043 | (yy_c_buf_p) = (yytext_ptryytext) + YY_MORE_ADJ0; | ||||
1044 | |||||
1045 | yy_act = YY_STATE_EOF(YY_START)(19 + (((yy_start) - 1) / 2) + 1); | ||||
1046 | goto do_action; | ||||
1047 | } | ||||
1048 | |||||
1049 | else | ||||
1050 | { | ||||
1051 | if ( ! (yy_did_buffer_switch_on_eof) ) | ||||
1052 | YY_NEW_FILEyyrestart(yyin ); | ||||
1053 | } | ||||
1054 | break; | ||||
1055 | } | ||||
1056 | |||||
1057 | case EOB_ACT_CONTINUE_SCAN0: | ||||
1058 | (yy_c_buf_p) = | ||||
1059 | (yytext_ptryytext) + yy_amount_of_matched_text; | ||||
1060 | |||||
1061 | yy_current_state = yy_get_previous_state( ); | ||||
1062 | |||||
1063 | yy_cp = (yy_c_buf_p); | ||||
1064 | yy_bp = (yytext_ptryytext) + YY_MORE_ADJ0; | ||||
1065 | goto yy_match; | ||||
1066 | |||||
1067 | case EOB_ACT_LAST_MATCH2: | ||||
1068 | (yy_c_buf_p) = | ||||
1069 | &YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[(yy_n_chars)]; | ||||
1070 | |||||
1071 | yy_current_state = yy_get_previous_state( ); | ||||
1072 | |||||
1073 | yy_cp = (yy_c_buf_p); | ||||
1074 | yy_bp = (yytext_ptryytext) + YY_MORE_ADJ0; | ||||
1075 | goto yy_find_action; | ||||
1076 | } | ||||
1077 | break; | ||||
1078 | } | ||||
1079 | |||||
1080 | default: | ||||
1081 | YY_FATAL_ERROR(yy_fatal_error( "fatal flex scanner internal error--no action found" ) | ||||
1082 | "fatal flex scanner internal error--no action found" )yy_fatal_error( "fatal flex scanner internal error--no action found" ); | ||||
1083 | } /* end of action switch */ | ||||
1084 | } /* end of scanning one token */ | ||||
1085 | } /* end of yylex */ | ||||
1086 | |||||
1087 | /* yy_get_next_buffer - try to read in a new buffer | ||||
1088 | * | ||||
1089 | * Returns a code representing an action: | ||||
1090 | * EOB_ACT_LAST_MATCH - | ||||
1091 | * EOB_ACT_CONTINUE_SCAN - continue scanning from current position | ||||
1092 | * EOB_ACT_END_OF_FILE - end of file | ||||
1093 | */ | ||||
1094 | static int yy_get_next_buffer (void) | ||||
1095 | { | ||||
1096 | register char *dest = YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf; | ||||
1097 | register char *source = (yytext_ptryytext); | ||||
1098 | register int number_to_move, i; | ||||
1099 | int ret_val; | ||||
1100 | |||||
1101 | if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[(yy_n_chars) + 1] ) | ||||
1102 | YY_FATAL_ERROR(yy_fatal_error( "fatal flex scanner internal error--end of buffer missed" ) | ||||
1103 | "fatal flex scanner internal error--end of buffer missed" )yy_fatal_error( "fatal flex scanner internal error--end of buffer missed" ); | ||||
1104 | |||||
1105 | if ( YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_fill_buffer == 0 ) | ||||
1106 | { /* Don't try to fill the buffer, so this is an EOF. */ | ||||
1107 | if ( (yy_c_buf_p) - (yytext_ptryytext) - YY_MORE_ADJ0 == 1 ) | ||||
1108 | { | ||||
1109 | /* We matched a single character, the EOB, so | ||||
1110 | * treat this as a final EOF. | ||||
1111 | */ | ||||
1112 | return EOB_ACT_END_OF_FILE1; | ||||
1113 | } | ||||
1114 | |||||
1115 | else | ||||
1116 | { | ||||
1117 | /* We matched some text prior to the EOB, first | ||||
1118 | * process it. | ||||
1119 | */ | ||||
1120 | return EOB_ACT_LAST_MATCH2; | ||||
1121 | } | ||||
1122 | } | ||||
1123 | |||||
1124 | /* Try to read more data. */ | ||||
1125 | |||||
1126 | /* First move last chars to start of buffer. */ | ||||
1127 | number_to_move = (int) ((yy_c_buf_p) - (yytext_ptryytext)) - 1; | ||||
1128 | |||||
1129 | for ( i = 0; i < number_to_move; ++i ) | ||||
1130 | *(dest++) = *(source++); | ||||
1131 | |||||
1132 | if ( YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buffer_status == YY_BUFFER_EOF_PENDING2 ) | ||||
1133 | /* don't do the read, it's not guaranteed to return an EOF, | ||||
1134 | * just force an EOF | ||||
1135 | */ | ||||
1136 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_n_chars = (yy_n_chars) = 0; | ||||
1137 | |||||
1138 | else | ||||
1139 | { | ||||
1140 | int num_to_read = | ||||
1141 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buf_size - number_to_move - 1; | ||||
1142 | |||||
1143 | while ( num_to_read <= 0 ) | ||||
1144 | { /* Not enough room in the buffer - grow it. */ | ||||
1145 | |||||
1146 | /* just a shorter name for the current buffer */ | ||||
1147 | YY_BUFFER_STATE b = YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void*)0)); | ||||
1148 | |||||
1149 | int yy_c_buf_p_offset = | ||||
1150 | (int) ((yy_c_buf_p) - b->yy_ch_buf); | ||||
1151 | |||||
1152 | if ( b->yy_is_our_buffer ) | ||||
1153 | { | ||||
1154 | int new_size = b->yy_buf_size * 2; | ||||
1155 | |||||
1156 | if ( new_size <= 0 ) | ||||
1157 | b->yy_buf_size += b->yy_buf_size / 8; | ||||
1158 | else | ||||
1159 | b->yy_buf_size *= 2; | ||||
1160 | |||||
1161 | b->yy_ch_buf = (char *) | ||||
1162 | /* Include room in for 2 EOB chars. */ | ||||
1163 | yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); | ||||
1164 | } | ||||
1165 | else | ||||
1166 | /* Can't grow it, we don't own it. */ | ||||
1167 | b->yy_ch_buf = 0; | ||||
1168 | |||||
1169 | if ( ! b->yy_ch_buf ) | ||||
1170 | YY_FATAL_ERROR(yy_fatal_error( "fatal error - scanner input buffer overflow" ) | ||||
1171 | "fatal error - scanner input buffer overflow" )yy_fatal_error( "fatal error - scanner input buffer overflow" ); | ||||
1172 | |||||
1173 | (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; | ||||
1174 | |||||
1175 | num_to_read = YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buf_size - | ||||
1176 | number_to_move - 1; | ||||
1177 | |||||
1178 | } | ||||
1179 | |||||
1180 | if ( num_to_read > YY_READ_BUF_SIZE8192 ) | ||||
1181 | num_to_read = YY_READ_BUF_SIZE8192; | ||||
1182 | |||||
1183 | /* Read in more data. */ | ||||
1184 | YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),(((yy_n_chars)) = doinput(((&(yy_buffer_stack)[(yy_buffer_stack_top )]->yy_ch_buf[number_to_move])),((size_t) num_to_read))) | ||||
1185 | (yy_n_chars), (size_t) num_to_read )(((yy_n_chars)) = doinput(((&(yy_buffer_stack)[(yy_buffer_stack_top )]->yy_ch_buf[number_to_move])),((size_t) num_to_read))); | ||||
1186 | |||||
1187 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_n_chars = (yy_n_chars); | ||||
1188 | } | ||||
1189 | |||||
1190 | if ( (yy_n_chars) == 0 ) | ||||
1191 | { | ||||
1192 | if ( number_to_move == YY_MORE_ADJ0 ) | ||||
1193 | { | ||||
1194 | ret_val = EOB_ACT_END_OF_FILE1; | ||||
1195 | yyrestart(yyin ); | ||||
1196 | } | ||||
1197 | |||||
1198 | else | ||||
1199 | { | ||||
1200 | ret_val = EOB_ACT_LAST_MATCH2; | ||||
1201 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buffer_status = | ||||
1202 | YY_BUFFER_EOF_PENDING2; | ||||
1203 | } | ||||
1204 | } | ||||
1205 | |||||
1206 | else | ||||
1207 | ret_val = EOB_ACT_CONTINUE_SCAN0; | ||||
1208 | |||||
1209 | if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buf_size) { | ||||
1210 | /* Extend the array by 50%, plus the number we really need. */ | ||||
1211 | yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); | ||||
1212 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf,new_size ); | ||||
1213 | if ( ! YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf ) | ||||
1214 | YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" )yy_fatal_error( "out of dynamic memory in yy_get_next_buffer()" ); | ||||
1215 | } | ||||
1216 | |||||
1217 | (yy_n_chars) += number_to_move; | ||||
1218 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR0; | ||||
1219 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR0; | ||||
1220 | |||||
1221 | (yytext_ptryytext) = &YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[0]; | ||||
1222 | |||||
1223 | return ret_val; | ||||
1224 | } | ||||
1225 | |||||
1226 | /* yy_get_previous_state - get the state just before the EOB char was reached */ | ||||
1227 | |||||
1228 | static yy_state_type yy_get_previous_state (void) | ||||
1229 | { | ||||
1230 | register yy_state_type yy_current_state; | ||||
1231 | register char *yy_cp; | ||||
1232 | |||||
1233 | yy_current_state = (yy_start); | ||||
1234 | |||||
1235 | for ( yy_cp = (yytext_ptryytext) + YY_MORE_ADJ0; yy_cp < (yy_c_buf_p); ++yy_cp ) | ||||
1236 | { | ||||
1237 | register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)((unsigned int) (unsigned char) *yy_cp)] : 1); | ||||
1238 | if ( yy_accept[yy_current_state] ) | ||||
1239 | { | ||||
1240 | (yy_last_accepting_state) = yy_current_state; | ||||
1241 | (yy_last_accepting_cpos) = yy_cp; | ||||
1242 | } | ||||
1243 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) | ||||
1244 | { | ||||
1245 | yy_current_state = (int) yy_def[yy_current_state]; | ||||
1246 | if ( yy_current_state >= 33 ) | ||||
1247 | yy_c = yy_meta[(unsigned int) yy_c]; | ||||
1248 | } | ||||
1249 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; | ||||
1250 | } | ||||
1251 | |||||
1252 | return yy_current_state; | ||||
1253 | } | ||||
1254 | |||||
1255 | /* yy_try_NUL_trans - try to make a transition on the NUL character | ||||
1256 | * | ||||
1257 | * synopsis | ||||
1258 | * next_state = yy_try_NUL_trans( current_state ); | ||||
1259 | */ | ||||
1260 | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) | ||||
1261 | { | ||||
1262 | register int yy_is_jam; | ||||
1263 | register char *yy_cp = (yy_c_buf_p); | ||||
1264 | |||||
1265 | register YY_CHAR yy_c = 1; | ||||
1266 | if ( yy_accept[yy_current_state] ) | ||||
1267 | { | ||||
1268 | (yy_last_accepting_state) = yy_current_state; | ||||
1269 | (yy_last_accepting_cpos) = yy_cp; | ||||
1270 | } | ||||
1271 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) | ||||
1272 | { | ||||
1273 | yy_current_state = (int) yy_def[yy_current_state]; | ||||
1274 | if ( yy_current_state >= 33 ) | ||||
1275 | yy_c = yy_meta[(unsigned int) yy_c]; | ||||
1276 | } | ||||
1277 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; | ||||
1278 | yy_is_jam = (yy_current_state == 32); | ||||
1279 | |||||
1280 | return yy_is_jam ? 0 : yy_current_state; | ||||
1281 | } | ||||
1282 | |||||
1283 | static void yyunput (int c, register char * yy_bp ) | ||||
1284 | { | ||||
1285 | register char *yy_cp; | ||||
1286 | |||||
1287 | yy_cp = (yy_c_buf_p); | ||||
1288 | |||||
1289 | /* undo effects of setting up yytext */ | ||||
1290 | *yy_cp = (yy_hold_char); | ||||
1291 | |||||
1292 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf + 2 ) | ||||
1293 | { /* need to shift things up to make room */ | ||||
1294 | /* +2 for EOB chars. */ | ||||
1295 | register int number_to_move = (yy_n_chars) + 2; | ||||
1296 | register char *dest = &YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[ | ||||
1297 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buf_size + 2]; | ||||
1298 | register char *source = | ||||
1299 | &YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[number_to_move]; | ||||
1300 | |||||
1301 | while ( source > YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf ) | ||||
1302 | *--dest = *--source; | ||||
1303 | |||||
1304 | yy_cp += (int) (dest - source); | ||||
1305 | yy_bp += (int) (dest - source); | ||||
1306 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_n_chars = | ||||
1307 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buf_size; | ||||
1308 | |||||
1309 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf + 2 ) | ||||
1310 | YY_FATAL_ERROR( "flex scanner push-back overflow" )yy_fatal_error( "flex scanner push-back overflow" ); | ||||
1311 | } | ||||
1312 | |||||
1313 | *--yy_cp = (char) c; | ||||
1314 | |||||
1315 | (yytext_ptryytext) = yy_bp; | ||||
1316 | (yy_hold_char) = *yy_cp; | ||||
1317 | (yy_c_buf_p) = yy_cp; | ||||
1318 | } | ||||
1319 | |||||
1320 | #ifndef YY_NO_INPUT | ||||
1321 | #ifdef __cplusplus | ||||
1322 | static int yyinput (void) | ||||
1323 | #else | ||||
1324 | static int input (void) | ||||
1325 | #endif | ||||
1326 | |||||
1327 | { | ||||
1328 | int c; | ||||
1329 | |||||
1330 | *(yy_c_buf_p) = (yy_hold_char); | ||||
1331 | |||||
1332 | if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR0 ) | ||||
1333 | { | ||||
1334 | /* yy_c_buf_p now points to the character we want to return. | ||||
1335 | * If this occurs *before* the EOB characters, then it's a | ||||
1336 | * valid NUL; if not, then we've hit the end of the buffer. | ||||
1337 | */ | ||||
1338 | if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[(yy_n_chars)] ) | ||||
1339 | /* This was really a NUL. */ | ||||
1340 | *(yy_c_buf_p) = '\0'; | ||||
1341 | |||||
1342 | else | ||||
1343 | { /* need more input */ | ||||
1344 | int offset = (yy_c_buf_p) - (yytext_ptryytext); | ||||
1345 | ++(yy_c_buf_p); | ||||
1346 | |||||
1347 | switch ( yy_get_next_buffer( ) ) | ||||
1348 | { | ||||
1349 | case EOB_ACT_LAST_MATCH2: | ||||
1350 | /* This happens because yy_g_n_b() | ||||
1351 | * sees that we've accumulated a | ||||
1352 | * token and flags that we need to | ||||
1353 | * try matching the token before | ||||
1354 | * proceeding. But for input(), | ||||
1355 | * there's no matching to consider. | ||||
1356 | * So convert the EOB_ACT_LAST_MATCH | ||||
1357 | * to EOB_ACT_END_OF_FILE. | ||||
1358 | */ | ||||
1359 | |||||
1360 | /* Reset buffer status. */ | ||||
1361 | yyrestart(yyin ); | ||||
1362 | |||||
1363 | /*FALLTHROUGH*/ | ||||
1364 | |||||
1365 | case EOB_ACT_END_OF_FILE1: | ||||
1366 | { | ||||
1367 | if ( yywrap( ) ) | ||||
1368 | return EOF(-1); | ||||
1369 | |||||
1370 | if ( ! (yy_did_buffer_switch_on_eof) ) | ||||
1371 | YY_NEW_FILEyyrestart(yyin ); | ||||
1372 | #ifdef __cplusplus | ||||
1373 | return yyinput(); | ||||
1374 | #else | ||||
1375 | return input()(*twmInputFunc)(); | ||||
1376 | #endif | ||||
1377 | } | ||||
1378 | |||||
1379 | case EOB_ACT_CONTINUE_SCAN0: | ||||
1380 | (yy_c_buf_p) = (yytext_ptryytext) + offset; | ||||
1381 | break; | ||||
1382 | } | ||||
1383 | } | ||||
1384 | } | ||||
1385 | |||||
1386 | c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ | ||||
1387 | *(yy_c_buf_p) = '\0'; /* preserve yytext */ | ||||
1388 | (yy_hold_char) = *++(yy_c_buf_p); | ||||
1389 | |||||
1390 | return c; | ||||
1391 | } | ||||
1392 | #endif /* ifndef YY_NO_INPUT */ | ||||
1393 | |||||
1394 | /** Immediately switch to a different input stream. | ||||
1395 | * @param input_file A readable stream. | ||||
1396 | * | ||||
1397 | * @note This function does not reset the start condition to @c INITIAL . | ||||
1398 | */ | ||||
1399 | void yyrestart (FILE * input_file ) | ||||
1400 | { | ||||
1401 | |||||
1402 | if ( ! YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void*)0)) ){ | ||||
1403 | yyensure_buffer_stack (); | ||||
1404 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)] = | ||||
1405 | yy_create_buffer(yyin,YY_BUF_SIZE16384 ); | ||||
1406 | } | ||||
1407 | |||||
1408 | yy_init_buffer(YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void*)0)),input_file ); | ||||
1409 | yy_load_buffer_state( ); | ||||
1410 | } | ||||
1411 | |||||
1412 | /** Switch to a different input buffer. | ||||
1413 | * @param new_buffer The new input buffer. | ||||
1414 | * | ||||
1415 | */ | ||||
1416 | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) | ||||
1417 | { | ||||
1418 | |||||
1419 | /* TODO. We should be able to replace this entire function body | ||||
1420 | * with | ||||
1421 | * yypop_buffer_state(); | ||||
1422 | * yypush_buffer_state(new_buffer); | ||||
1423 | */ | ||||
1424 | yyensure_buffer_stack (); | ||||
1425 | if ( YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void*)0)) == new_buffer ) | ||||
| |||||
| |||||
1426 | return; | ||||
1427 | |||||
1428 | if ( YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void*)0)) ) | ||||
| |||||
1429 | { | ||||
1430 | /* Flush out information for old buffer. */ | ||||
1431 | *(yy_c_buf_p) = (yy_hold_char); | ||||
1432 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buf_pos = (yy_c_buf_p); | ||||
1433 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_n_chars = (yy_n_chars); | ||||
1434 | } | ||||
1435 | |||||
1436 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)] = new_buffer; | ||||
| |||||
1437 | yy_load_buffer_state( ); | ||||
1438 | |||||
1439 | /* We don't actually know whether we did this switch during | ||||
1440 | * EOF (yywrap()) processing, but the only time this flag | ||||
1441 | * is looked at is after yywrap() is called, so it's safe | ||||
1442 | * to go ahead and always set it. | ||||
1443 | */ | ||||
1444 | (yy_did_buffer_switch_on_eof) = 1; | ||||
1445 | } | ||||
1446 | |||||
1447 | static void yy_load_buffer_state (void) | ||||
1448 | { | ||||
1449 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_n_chars; | ||||
1450 | (yytext_ptryytext) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buf_pos; | ||||
1451 | yyin = YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_input_file; | ||||
1452 | (yy_hold_char) = *(yy_c_buf_p); | ||||
1453 | } | ||||
1454 | |||||
1455 | /** Allocate and initialize an input buffer state. | ||||
1456 | * @param file A readable stream. | ||||
1457 | * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. | ||||
1458 | * | ||||
1459 | * @return the allocated buffer state. | ||||
1460 | */ | ||||
1461 | YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) | ||||
1462 | { | ||||
1463 | YY_BUFFER_STATE b; | ||||
1464 | |||||
1465 | b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); | ||||
1466 | if ( ! b ) | ||||
1467 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" )yy_fatal_error( "out of dynamic memory in yy_create_buffer()" ); | ||||
1468 | |||||
1469 | b->yy_buf_size = size; | ||||
1470 | |||||
1471 | /* yy_ch_buf has to be 2 characters longer than the size given because | ||||
1472 | * we need to put in 2 end-of-buffer characters. | ||||
1473 | */ | ||||
1474 | b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); | ||||
1475 | if ( ! b->yy_ch_buf ) | ||||
1476 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" )yy_fatal_error( "out of dynamic memory in yy_create_buffer()" ); | ||||
1477 | |||||
1478 | b->yy_is_our_buffer = 1; | ||||
1479 | |||||
1480 | yy_init_buffer(b,file ); | ||||
1481 | |||||
1482 | return b; | ||||
1483 | } | ||||
1484 | |||||
1485 | /** Destroy the buffer. | ||||
1486 | * @param b a buffer created with yy_create_buffer() | ||||
1487 | * | ||||
1488 | */ | ||||
1489 | void yy_delete_buffer (YY_BUFFER_STATE b ) | ||||
1490 | { | ||||
1491 | |||||
1492 | if ( ! b ) | ||||
1493 | return; | ||||
1494 | |||||
1495 | if ( b == YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void*)0)) ) /* Not sure if we should pop here. */ | ||||
1496 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)] = (YY_BUFFER_STATE) 0; | ||||
1497 | |||||
1498 | if ( b->yy_is_our_buffer ) | ||||
1499 | yyfree((void *) b->yy_ch_buf ); | ||||
1500 | |||||
1501 | yyfree((void *) b ); | ||||
1502 | } | ||||
1503 | |||||
1504 | #ifndef __cplusplus | ||||
1505 | extern int isatty (int ); | ||||
1506 | #endif /* __cplusplus */ | ||||
1507 | |||||
1508 | /* Initializes or reinitializes a buffer. | ||||
1509 | * This function is sometimes called more than once on the same buffer, | ||||
1510 | * such as during a yyrestart() or at EOF. | ||||
1511 | */ | ||||
1512 | static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) | ||||
1513 | |||||
1514 | { | ||||
1515 | int oerrno = errno(*__errno_location ()); | ||||
1516 | |||||
1517 | yy_flush_buffer(b ); | ||||
1518 | |||||
1519 | b->yy_input_file = file; | ||||
1520 | b->yy_fill_buffer = 1; | ||||
1521 | |||||
1522 | /* If b is the current buffer, then yy_init_buffer was _probably_ | ||||
1523 | * called from yyrestart() or through yy_get_next_buffer. | ||||
1524 | * In that case, we don't want to reset the lineno or column. | ||||
1525 | */ | ||||
1526 | if (b != YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void*)0))){ | ||||
1527 | b->yy_bs_lineno = 1; | ||||
1528 | b->yy_bs_column = 0; | ||||
1529 | } | ||||
1530 | |||||
1531 | b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; | ||||
1532 | |||||
1533 | errno(*__errno_location ()) = oerrno; | ||||
1534 | } | ||||
1535 | |||||
1536 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. | ||||
1537 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. | ||||
1538 | * | ||||
1539 | */ | ||||
1540 | void yy_flush_buffer (YY_BUFFER_STATE b ) | ||||
1541 | { | ||||
1542 | if ( ! b ) | ||||
1543 | return; | ||||
1544 | |||||
1545 | b->yy_n_chars = 0; | ||||
1546 | |||||
1547 | /* We always need two end-of-buffer characters. The first causes | ||||
1548 | * a transition to the end-of-buffer state. The second causes | ||||
1549 | * a jam in that state. | ||||
1550 | */ | ||||
1551 | b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR0; | ||||
1552 | b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR0; | ||||
1553 | |||||
1554 | b->yy_buf_pos = &b->yy_ch_buf[0]; | ||||
1555 | |||||
1556 | b->yy_at_bol = 1; | ||||
1557 | b->yy_buffer_status = YY_BUFFER_NEW0; | ||||
1558 | |||||
1559 | if ( b == YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void*)0)) ) | ||||
1560 | yy_load_buffer_state( ); | ||||
1561 | } | ||||
1562 | |||||
1563 | /** Pushes the new state onto the stack. The new state becomes | ||||
1564 | * the current state. This function will allocate the stack | ||||
1565 | * if necessary. | ||||
1566 | * @param new_buffer The new state. | ||||
1567 | * | ||||
1568 | */ | ||||
1569 | void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) | ||||
1570 | { | ||||
1571 | if (new_buffer == NULL((void*)0)) | ||||
1572 | return; | ||||
1573 | |||||
1574 | yyensure_buffer_stack(); | ||||
1575 | |||||
1576 | /* This block is copied from yy_switch_to_buffer. */ | ||||
1577 | if ( YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void*)0)) ) | ||||
1578 | { | ||||
1579 | /* Flush out information for old buffer. */ | ||||
1580 | *(yy_c_buf_p) = (yy_hold_char); | ||||
1581 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buf_pos = (yy_c_buf_p); | ||||
1582 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_n_chars = (yy_n_chars); | ||||
1583 | } | ||||
1584 | |||||
1585 | /* Only push if top exists. Otherwise, replace top. */ | ||||
1586 | if (YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void*)0))) | ||||
1587 | (yy_buffer_stack_top)++; | ||||
1588 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)] = new_buffer; | ||||
1589 | |||||
1590 | /* copied from yy_switch_to_buffer. */ | ||||
1591 | yy_load_buffer_state( ); | ||||
1592 | (yy_did_buffer_switch_on_eof) = 1; | ||||
1593 | } | ||||
1594 | |||||
1595 | /** Removes and deletes the top of the stack, if present. | ||||
1596 | * The next element becomes the new top. | ||||
1597 | * | ||||
1598 | */ | ||||
1599 | void yypop_buffer_state (void) | ||||
1600 | { | ||||
1601 | if (!YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void*)0))) | ||||
1602 | return; | ||||
1603 | |||||
1604 | yy_delete_buffer(YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void*)0)) ); | ||||
1605 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)] = NULL((void*)0); | ||||
1606 | if ((yy_buffer_stack_top) > 0) | ||||
1607 | --(yy_buffer_stack_top); | ||||
1608 | |||||
1609 | if (YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void*)0))) { | ||||
1610 | yy_load_buffer_state( ); | ||||
1611 | (yy_did_buffer_switch_on_eof) = 1; | ||||
1612 | } | ||||
1613 | } | ||||
1614 | |||||
1615 | /* Allocates the stack if it does not exist. | ||||
1616 | * Guarantees space for at least one push. | ||||
1617 | */ | ||||
1618 | static void yyensure_buffer_stack (void) | ||||
1619 | { | ||||
1620 | int num_to_alloc; | ||||
1621 | |||||
1622 | if (!(yy_buffer_stack)) { | ||||
1623 | |||||
1624 | /* First allocation is just for 2 elements, since we don't know if this | ||||
1625 | * scanner will even need a stack. We use 2 instead of 1 to avoid an | ||||
1626 | * immediate realloc on the next call. | ||||
1627 | */ | ||||
1628 | num_to_alloc = 1; | ||||
1629 | (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc | ||||
1630 | (num_to_alloc * sizeof(struct yy_buffer_state*) | ||||
1631 | ); | ||||
1632 | if ( ! (yy_buffer_stack) ) | ||||
1633 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" )yy_fatal_error( "out of dynamic memory in yyensure_buffer_stack()" ); | ||||
1634 | |||||
1635 | memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); | ||||
1636 | |||||
1637 | (yy_buffer_stack_max) = num_to_alloc; | ||||
1638 | (yy_buffer_stack_top) = 0; | ||||
1639 | return; | ||||
1640 | } | ||||
1641 | |||||
1642 | if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ | ||||
1643 | |||||
1644 | /* Increase the buffer to prepare for a possible push. */ | ||||
1645 | int grow_size = 8 /* arbitrary grow size */; | ||||
1646 | |||||
1647 | num_to_alloc = (yy_buffer_stack_max) + grow_size; | ||||
1648 | (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc | ||||
1649 | ((yy_buffer_stack), | ||||
1650 | num_to_alloc * sizeof(struct yy_buffer_state*) | ||||
1651 | ); | ||||
1652 | if ( ! (yy_buffer_stack) ) | ||||
1653 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" )yy_fatal_error( "out of dynamic memory in yyensure_buffer_stack()" ); | ||||
1654 | |||||
1655 | /* zero only the new slots.*/ | ||||
1656 | memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); | ||||
1657 | (yy_buffer_stack_max) = num_to_alloc; | ||||
1658 | } | ||||
1659 | } | ||||
1660 | |||||
1661 | /** Setup the input buffer state to scan directly from a user-specified character buffer. | ||||
1662 | * @param base the character buffer | ||||
1663 | * @param size the size in bytes of the character buffer | ||||
1664 | * | ||||
1665 | * @return the newly allocated buffer state object. | ||||
1666 | */ | ||||
1667 | YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) | ||||
1668 | { | ||||
1669 | YY_BUFFER_STATE b; | ||||
1670 | |||||
1671 | if ( size < 2 || | ||||
1672 | base[size-2] != YY_END_OF_BUFFER_CHAR0 || | ||||
1673 | base[size-1] != YY_END_OF_BUFFER_CHAR0 ) | ||||
1674 | /* They forgot to leave room for the EOB's. */ | ||||
1675 | return 0; | ||||
1676 | |||||
1677 | b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); | ||||
1678 | if ( ! b ) | ||||
1679 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" )yy_fatal_error( "out of dynamic memory in yy_scan_buffer()" ); | ||||
1680 | |||||
1681 | b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ | ||||
1682 | b->yy_buf_pos = b->yy_ch_buf = base; | ||||
1683 | b->yy_is_our_buffer = 0; | ||||
1684 | b->yy_input_file = 0; | ||||
1685 | b->yy_n_chars = b->yy_buf_size; | ||||
1686 | b->yy_is_interactive = 0; | ||||
1687 | b->yy_at_bol = 1; | ||||
1688 | b->yy_fill_buffer = 0; | ||||
1689 | b->yy_buffer_status = YY_BUFFER_NEW0; | ||||
1690 | |||||
1691 | yy_switch_to_buffer(b ); | ||||
1692 | |||||
1693 | return b; | ||||
1694 | } | ||||
1695 | |||||
1696 | /** Setup the input buffer state to scan a string. The next call to yylex() will | ||||
1697 | * scan from a @e copy of @a str. | ||||
1698 | * @param yystr a NUL-terminated string to scan | ||||
1699 | * | ||||
1700 | * @return the newly allocated buffer state object. | ||||
1701 | * @note If you want to scan bytes that may contain NUL values, then use | ||||
1702 | * yy_scan_bytes() instead. | ||||
1703 | */ | ||||
1704 | YY_BUFFER_STATE yy_scan_string (yyconstconst char * yystr ) | ||||
1705 | { | ||||
1706 | |||||
1707 | return yy_scan_bytes(yystr,strlen(yystr) ); | ||||
1708 | } | ||||
1709 | |||||
1710 | /** Setup the input buffer state to scan the given bytes. The next call to yylex() will | ||||
1711 | * scan from a @e copy of @a bytes. | ||||
1712 | * @param yybytes the byte buffer to scan | ||||
1713 | * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. | ||||
1714 | * | ||||
1715 | * @return the newly allocated buffer state object. | ||||
1716 | */ | ||||
1717 | YY_BUFFER_STATE yy_scan_bytes (yyconstconst char * yybytes, int _yybytes_len ) | ||||
1718 | { | ||||
1719 | YY_BUFFER_STATE b; | ||||
1720 | char *buf; | ||||
1721 | yy_size_t n; | ||||
1722 | int i; | ||||
1723 | |||||
1724 | /* Get memory for full buffer, including space for trailing EOB's. */ | ||||
1725 | n = _yybytes_len + 2; | ||||
1726 | buf = (char *) yyalloc(n ); | ||||
1727 | if ( ! buf ) | ||||
1728 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" )yy_fatal_error( "out of dynamic memory in yy_scan_bytes()" ); | ||||
1729 | |||||
1730 | for ( i = 0; i < _yybytes_len; ++i ) | ||||
1731 | buf[i] = yybytes[i]; | ||||
1732 | |||||
1733 | buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR0; | ||||
1734 | |||||
1735 | b = yy_scan_buffer(buf,n ); | ||||
1736 | if ( ! b ) | ||||
1737 | YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" )yy_fatal_error( "bad buffer in yy_scan_bytes()" ); | ||||
1738 | |||||
1739 | /* It's okay to grow etc. this buffer, and we should throw it | ||||
1740 | * away when we're done. | ||||
1741 | */ | ||||
1742 | b->yy_is_our_buffer = 1; | ||||
1743 | |||||
1744 | return b; | ||||
1745 | } | ||||
1746 | |||||
1747 | #ifndef YY_EXIT_FAILURE2 | ||||
1748 | #define YY_EXIT_FAILURE2 2 | ||||
1749 | #endif | ||||
1750 | |||||
1751 | static void yy_fatal_error (yyconstconst char* msg ) | ||||
1752 | { | ||||
1753 | (void) fprintf( stderrstderr, "%s\n", msg ); | ||||
1754 | exit( YY_EXIT_FAILURE2 ); | ||||
1755 | } | ||||
1756 | |||||
1757 | /* Redefine yyless() so it works in section 3 code. */ | ||||
1758 | |||||
1759 | #undef yyless | ||||
1760 | #define yyless(n)do { int yyless_macro_arg = (n); ; yytext[yyleng] = (yy_hold_char ); (yy_c_buf_p) = yytext + yyless_macro_arg; (yy_hold_char) = *(yy_c_buf_p); *(yy_c_buf_p) = '\0'; yyleng = yyless_macro_arg ; } while ( 0 ) \ | ||||
1761 | do \ | ||||
1762 | { \ | ||||
1763 | /* Undo effects of setting up yytext. */ \ | ||||
1764 | int yyless_macro_arg = (n); \ | ||||
1765 | YY_LESS_LINENO(yyless_macro_arg);\ | ||||
1766 | yytext[yyleng] = (yy_hold_char); \ | ||||
1767 | (yy_c_buf_p) = yytext + yyless_macro_arg; \ | ||||
1768 | (yy_hold_char) = *(yy_c_buf_p); \ | ||||
1769 | *(yy_c_buf_p) = '\0'; \ | ||||
1770 | yyleng = yyless_macro_arg; \ | ||||
1771 | } \ | ||||
1772 | while ( 0 ) | ||||
1773 | |||||
1774 | /* Accessor methods (get/set functions) to struct members. */ | ||||
1775 | |||||
1776 | /** Get the current line number. | ||||
1777 | * | ||||
1778 | */ | ||||
1779 | int yyget_lineno (void) | ||||
1780 | { | ||||
1781 | |||||
1782 | return yylineno; | ||||
1783 | } | ||||
1784 | |||||
1785 | /** Get the input stream. | ||||
1786 | * | ||||
1787 | */ | ||||
1788 | FILE *yyget_in (void) | ||||
1789 | { | ||||
1790 | return yyin; | ||||
1791 | } | ||||
1792 | |||||
1793 | /** Get the output stream. | ||||
1794 | * | ||||
1795 | */ | ||||
1796 | FILE *yyget_out (void) | ||||
1797 | { | ||||
1798 | return yyout; | ||||
1799 | } | ||||
1800 | |||||
1801 | /** Get the length of the current token. | ||||
1802 | * | ||||
1803 | */ | ||||
1804 | int yyget_leng (void) | ||||
1805 | { | ||||
1806 | return yyleng; | ||||
1807 | } | ||||
1808 | |||||
1809 | /** Get the current token. | ||||
1810 | * | ||||
1811 | */ | ||||
1812 | |||||
1813 | char *yyget_text (void) | ||||
1814 | { | ||||
1815 | return yytext; | ||||
1816 | } | ||||
1817 | |||||
1818 | /** Set the current line number. | ||||
1819 | * @param line_number | ||||
1820 | * | ||||
1821 | */ | ||||
1822 | void yyset_lineno (int line_number ) | ||||
1823 | { | ||||
1824 | |||||
1825 | yylineno = line_number; | ||||
1826 | } | ||||
1827 | |||||
1828 | /** Set the input stream. This does not discard the current | ||||
1829 | * input buffer. | ||||
1830 | * @param in_str A readable stream. | ||||
1831 | * | ||||
1832 | * @see yy_switch_to_buffer | ||||
1833 | */ | ||||
1834 | void yyset_in (FILE * in_str ) | ||||
1835 | { | ||||
1836 | yyin = in_str ; | ||||
1837 | } | ||||
1838 | |||||
1839 | void yyset_out (FILE * out_str ) | ||||
1840 | { | ||||
1841 | yyout = out_str ; | ||||
1842 | } | ||||
1843 | |||||
1844 | int yyget_debug (void) | ||||
1845 | { | ||||
1846 | return yy_flex_debug; | ||||
1847 | } | ||||
1848 | |||||
1849 | void yyset_debug (int bdebug ) | ||||
1850 | { | ||||
1851 | yy_flex_debug = bdebug ; | ||||
1852 | } | ||||
1853 | |||||
1854 | static int yy_init_globals (void) | ||||
1855 | { | ||||
1856 | /* Initialization is the same as for the non-reentrant scanner. | ||||
1857 | * This function is called from yylex_destroy(), so don't allocate here. | ||||
1858 | */ | ||||
1859 | |||||
1860 | (yy_buffer_stack) = 0; | ||||
1861 | (yy_buffer_stack_top) = 0; | ||||
1862 | (yy_buffer_stack_max) = 0; | ||||
1863 | (yy_c_buf_p) = (char *) 0; | ||||
1864 | (yy_init) = 0; | ||||
1865 | (yy_start) = 0; | ||||
1866 | |||||
1867 | /* Defined in main.c */ | ||||
1868 | #ifdef YY_STDINIT | ||||
1869 | yyin = stdinstdin; | ||||
1870 | yyout = stdoutstdout; | ||||
1871 | #else | ||||
1872 | yyin = (FILE *) 0; | ||||
1873 | yyout = (FILE *) 0; | ||||
1874 | #endif | ||||
1875 | |||||
1876 | /* For future reference: Set errno on error, since we are called by | ||||
1877 | * yylex_init() | ||||
1878 | */ | ||||
1879 | return 0; | ||||
1880 | } | ||||
1881 | |||||
1882 | /* yylex_destroy is for both reentrant and non-reentrant scanners. */ | ||||
1883 | int yylex_destroy (void) | ||||
1884 | { | ||||
1885 | |||||
1886 | /* Pop the buffer stack, destroying each element. */ | ||||
1887 | while(YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void*)0))){ | ||||
1888 | yy_delete_buffer(YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void*)0)) ); | ||||
1889 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)] = NULL((void*)0); | ||||
1890 | yypop_buffer_state(); | ||||
1891 | } | ||||
1892 | |||||
1893 | /* Destroy the stack itself. */ | ||||
1894 | yyfree((yy_buffer_stack) ); | ||||
1895 | (yy_buffer_stack) = NULL((void*)0); | ||||
1896 | |||||
1897 | /* Reset the globals. This is important in a non-reentrant scanner so the next time | ||||
1898 | * yylex() is called, initialization will occur. */ | ||||
1899 | yy_init_globals( ); | ||||
1900 | |||||
1901 | return 0; | ||||
1902 | } | ||||
1903 | |||||
1904 | /* | ||||
1905 | * Internal utility routines. | ||||
1906 | */ | ||||
1907 | |||||
1908 | #ifndef yytext_ptryytext | ||||
1909 | static void yy_flex_strncpy (char* s1, yyconstconst char * s2, int n ) | ||||
1910 | { | ||||
1911 | register int i; | ||||
1912 | for ( i = 0; i < n; ++i ) | ||||
1913 | s1[i] = s2[i]; | ||||
1914 | } | ||||
1915 | #endif | ||||
1916 | |||||
1917 | #ifdef YY_NEED_STRLEN | ||||
1918 | static int yy_flex_strlen (yyconstconst char * s ) | ||||
1919 | { | ||||
1920 | register int n; | ||||
1921 | for ( n = 0; s[n]; ++n ) | ||||
1922 | ; | ||||
1923 | |||||
1924 | return n; | ||||
1925 | } | ||||
1926 | #endif | ||||
1927 | |||||
1928 | void *yyalloc (yy_size_t size ) | ||||
1929 | { | ||||
1930 | return (void *) malloc( size ); | ||||
1931 | } | ||||
1932 | |||||
1933 | void *yyrealloc (void * ptr, yy_size_t size ) | ||||
1934 | { | ||||
1935 | /* The cast to (char *) in the following accommodates both | ||||
1936 | * implementations that use char* generic pointers, and those | ||||
1937 | * that use void* generic pointers. It works with the latter | ||||
1938 | * because both ANSI C and C++ allow castless assignment from | ||||
1939 | * any pointer type to void*, and deal with argument conversions | ||||
1940 | * as though doing an assignment. | ||||
1941 | */ | ||||
1942 | return (void *) realloc( (char *) ptr, size ); | ||||
1943 | } | ||||
1944 | |||||
1945 | void yyfree (void * ptr ) | ||||
1946 | { | ||||
1947 | free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ | ||||
1948 | } | ||||
1949 | |||||
1950 | #define YYTABLES_NAME"yytables" "yytables" | ||||
1951 | |||||
1952 | #line 134 "lex.l" | ||||
1953 | |||||
1954 | |||||
1955 | #ifndef yywrap | ||||
1956 | int yywrap() { return(1);} | ||||
1957 | #endif | ||||
1958 | |||||
1959 | #undef unput | ||||
1960 | #undef input | ||||
1961 | #undef output | ||||
1962 | #undef feof | ||||
1963 | #define unput(c)twmUnput(c) twmUnput(c) | ||||
1964 | #define input()(*twmInputFunc)() (*twmInputFunc)() | ||||
1965 | #define output(c)TwmOutput(c) TwmOutput(c) | ||||
1966 | #define feof()(1) (1) | ||||
1967 |