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 #include <R.h>
8
9 #define FLEX_SCANNER
10 #define YY_FLEX_MAJOR_VERSION 2
11 #define YY_FLEX_MINOR_VERSION 5
12
13 #include <stdio.h>
14
15
16 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
17 #ifdef c_plusplus
18 #ifndef __cplusplus
19 #define __cplusplus
20 #endif
21 #endif
22
23
24 #ifdef __cplusplus
25
26 #include <stdlib.h>
27 #include <unistd.h>
28
29 /* Use prototypes in function declarations. */
30 #define YY_USE_PROTOS
31
32 /* The "const" storage-class-modifier is valid. */
33 #define YY_USE_CONST
34
35 #else /* ! __cplusplus */
36
37 #if __STDC__
38
39 #define YY_USE_PROTOS
40 #define YY_USE_CONST
41
42 #endif /* __STDC__ */
43 #endif /* ! __cplusplus */
44
45 #ifdef __TURBOC__
46 #pragma warn -rch
47 #pragma warn -use
48 #include <io.h>
49 #include <stdlib.h>
50 #define YY_USE_CONST
51 #define YY_USE_PROTOS
52 #endif
53
54 #ifdef YY_USE_CONST
55 #define lp_yyconst const
56 #else
57 #define lp_yyconst
58 #endif
59
60
61 #ifdef YY_USE_PROTOS
62 #define YY_PROTO(proto) proto
63 #else
64 #define YY_PROTO(proto) ()
65 #endif
66
67 /* Returned upon end-of-file. */
68 #define YY_NULL 0
69
70 /* Promotes a possibly negative, possibly signed char to an unsigned
71 * integer for use as an array index. If the signed char is negative,
72 * we want to instead treat it as an 8-bit unsigned char, hence the
73 * double cast.
74 */
75 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
76
77 /* Enter a start condition. This macro really ought to take a parameter,
78 * but we do it the disgusting crufty way forced on us by the ()-less
79 * definition of BEGIN.
80 */
81 #define BEGIN lp_yy_start = 1 + 2 *
82
83 /* Translate the current start state into a value that can be later handed
84 * to BEGIN to return to the state. The YYSTATE alias is for lex
85 * compatibility.
86 */
87 #define YY_START ((lp_yy_start - 1) / 2)
88 #define YYSTATE YY_START
89
90 /* Action number for EOF rule of a given start state. */
91 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
92
93 /* Special action meaning "start processing a new file". */
94 #define YY_NEW_FILE lp_yyrestart( lp_yyin )
95
96 #define YY_END_OF_BUFFER_CHAR 0
97
98 /* Size of default input buffer. */
99 #define YY_BUF_SIZE 16384
100
101 typedef struct lp_yy_buffer_state *YY_BUFFER_STATE;
102
103 extern int lp_yyleng;
104 extern FILE *lp_yyin, *lp_yyout;
105
106 #define EOB_ACT_CONTINUE_SCAN 0
107 #define EOB_ACT_END_OF_FILE 1
108 #define EOB_ACT_LAST_MATCH 2
109
110 /* The funky do-while in the following #define is used to turn the definition
111 * int a single C statement (which needs a semi-colon terminator). This
112 * avoids problems with code like:
113 *
114 * if ( condition_holds )
115 * lp_yyless( 5 );
116 * else
117 * do_something_else();
118 *
119 * Prior to using the do-while the compiler would get upset at the
120 * "else" because it interpreted the "if" statement as being all
121 * done when it reached the ';' after the lp_yyless() call.
122 */
123
124 /* Return all but the first 'n' matched characters back to the input stream. */
125
126 #define lp_yyless(n) \
127 do \
128 { \
129 /* Undo effects of setting up lp_yytext. */ \
130 *lp_yy_cp = lp_yy_hold_char; \
131 YY_RESTORE_YY_MORE_OFFSET \
132 lp_yy_c_buf_p = lp_yy_cp = lp_yy_bp + n - YY_MORE_ADJ; \
133 YY_DO_BEFORE_ACTION; /* set up lp_yytext again */ \
134 } \
135 while ( 0 )
136
137 #define unput(c) lp_yyunput( c, lp_yytext_ptr )
138
139 /* The following is because we cannot portably get our hands on size_t
140 * (without autoconf's help, which isn't available because we want
141 * flex-generated scanners to compile on their own).
142 */
143 typedef unsigned int lp_yy_size_t;
144
145
146 struct lp_yy_buffer_state
147 {
148 FILE *lp_yy_input_file;
149
150 char *lp_yy_ch_buf; /* input buffer */
151 char *lp_yy_buf_pos; /* current position in input buffer */
152
153 /* Size of input buffer in bytes, not including room for EOB
154 * characters.
155 */
156 lp_yy_size_t lp_yy_buf_size;
157
158 /* Number of characters read into lp_yy_ch_buf, not including EOB
159 * characters.
160 */
161 int lp_yy_n_chars;
162
163 /* Whether we "own" the buffer - i.e., we know we created it,
164 * and can realloc() it to grow it, and should free() it to
165 * delete it.
166 */
167 int lp_yy_is_our_buffer;
168
169 /* Whether this is an "interactive" input source; if so, and
170 * if we're using stdio for input, then we want to use getc()
171 * instead of fread(), to make sure we stop fetching input after
172 * each newline.
173 */
174 int lp_yy_is_interactive;
175
176 /* Whether we're considered to be at the beginning of a line.
177 * If so, '^' rules will be active on the next match, otherwise
178 * not.
179 */
180 int lp_yy_at_bol;
181
182 /* Whether to try to fill the input buffer when we reach the
183 * end of it.
184 */
185 int lp_yy_fill_buffer;
186
187 int lp_yy_buffer_status;
188 #define YY_BUFFER_NEW 0
189 #define YY_BUFFER_NORMAL 1
190 /* When an EOF's been seen but there's still some text to process
191 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
192 * shouldn't try reading from the input source any more. We might
193 * still have a bunch of tokens to match, though, because of
194 * possible backing-up.
195 *
196 * When we actually see the EOF, we change the status to "new"
197 * (via lp_yyrestart()), so that the user can continue scanning by
198 * just pointing lp_yyin at a new input file.
199 */
200 #define YY_BUFFER_EOF_PENDING 2
201 };
202
203 static YY_BUFFER_STATE lp_yy_current_buffer = 0;
204
205 /* We provide macros for accessing buffer states in case in the
206 * future we want to put the buffer states in a more general
207 * "scanner state".
208 */
209 #define YY_CURRENT_BUFFER lp_yy_current_buffer
210
211
212 /* lp_yy_hold_char holds the character lost when lp_yytext is formed. */
213 static char lp_yy_hold_char;
214
215 static int lp_yy_n_chars; /* number of characters read into lp_yy_ch_buf */
216
217
218 int lp_yyleng;
219
220 /* Points to current character in buffer. */
221 static char *lp_yy_c_buf_p = (char *) 0;
222 static int lp_yy_init = 1; /* whether we need to initialize */
223 static int lp_yy_start = 0; /* start state number */
224
225 /* Flag which is used to allow lp_yywrap()'s to do buffer switches
226 * instead of setting up a fresh lp_yyin. A bit of a hack ...
227 */
228 static int lp_yy_did_buffer_switch_on_eof;
229
230 void lp_yyrestart YY_PROTO(( FILE *input_file ));
231
232 void lp_yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
233 void lp_yy_load_buffer_state YY_PROTO(( void ));
234 YY_BUFFER_STATE lp_yy_create_buffer YY_PROTO(( FILE *file, int size ));
235 void lp_yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
236 void lp_yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
237 void lp_yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
238 #define YY_FLUSH_BUFFER lp_yy_flush_buffer( lp_yy_current_buffer )
239
240 YY_BUFFER_STATE lp_yy_scan_buffer YY_PROTO(( char *base, lp_yy_size_t size ));
241 YY_BUFFER_STATE lp_yy_scan_string YY_PROTO(( lp_yyconst char *lp_yy_str ));
242 YY_BUFFER_STATE lp_yy_scan_bytes YY_PROTO(( lp_yyconst char *bytes, int len ));
243
244 static void *lp_yy_flex_alloc YY_PROTO(( lp_yy_size_t ));
245 static void *lp_yy_flex_realloc YY_PROTO(( void *, lp_yy_size_t ));
246 static void lp_yy_flex_free YY_PROTO(( void * ));
247
248 #define lp_yy_new_buffer lp_yy_create_buffer
249
250 #define lp_yy_set_interactive(is_interactive) \
251 { \
252 if ( ! lp_yy_current_buffer ) \
253 lp_yy_current_buffer = lp_yy_create_buffer( lp_yyin, YY_BUF_SIZE ); \
254 lp_yy_current_buffer->lp_yy_is_interactive = is_interactive; \
255 }
256
257 #define lp_yy_set_bol(at_bol) \
258 { \
259 if ( ! lp_yy_current_buffer ) \
260 lp_yy_current_buffer = lp_yy_create_buffer( lp_yyin, YY_BUF_SIZE ); \
261 lp_yy_current_buffer->lp_yy_at_bol = at_bol; \
262 }
263
264 #define YY_AT_BOL() (lp_yy_current_buffer->lp_yy_at_bol)
265
266
267 #define YY_USES_REJECT
268 typedef unsigned char YY_CHAR;
269 FILE *lp_yyin = (FILE *) 0, *lp_yyout = (FILE *) 0;
270 typedef int lp_yy_state_type;
271 #define YY_FLEX_LEX_COMPAT
272 extern int lp_yylineno;
273 int lp_yylineno = 1;
274 extern char lp_yytext[];
275
276
277 static lp_yy_state_type lp_yy_get_previous_state YY_PROTO(( void ));
278 static lp_yy_state_type lp_yy_try_NUL_trans YY_PROTO(( lp_yy_state_type current_state ));
279 static int lp_yy_get_next_buffer YY_PROTO(( void ));
280 static void lp_yy_fatal_error YY_PROTO(( lp_yyconst char msg[] ));
281
282 /* Done after the current pattern has been matched and before the
283 * corresponding action - sets up lp_yytext.
284 */
285 #define YY_DO_BEFORE_ACTION \
286 lp_yytext_ptr = lp_yy_bp; \
287 lp_yyleng = (int) (lp_yy_cp - lp_yy_bp); \
288 lp_yy_hold_char = *lp_yy_cp; \
289 *lp_yy_cp = '\0'; \
290 if ( lp_yyleng + lp_yy_more_offset >= YYLMAX ) \
291 YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \
292 lp_yy_flex_strncpy( &lp_yytext[lp_yy_more_offset], lp_yytext_ptr, lp_yyleng + 1 ); \
293 lp_yyleng += lp_yy_more_offset; \
294 lp_yy_prev_more_offset = lp_yy_more_offset; \
295 lp_yy_more_offset = 0; \
296 lp_yy_c_buf_p = lp_yy_cp;
297
298 #define YY_NUM_RULES 30
299 #define YY_END_OF_BUFFER 31
300 static lp_yyconst short int lp_yy_acclist[149] =
301 { 0,
302 26, 26, 31, 29, 30, 10, 17, 29, 30, 10,
303 17, 30, 25, 29, 30, 17, 29, 30, 11, 29,
304 30, 29, 30, 29, 30, 14, 15, 29, 30, 24,
305 29, 30, 28, 29, 30, 26, 29, 30, 26, 29,
306 30, 27, 29, 30, 23, 29, 30, 23, 29, 30,
307 10, 17, 29, 30, 23, 29, 30, 23, 29, 30,
308 3, 30, 4, 30, 3, 5, 30, 3, 30, 9,
309 30, 7, 30, 8, 9, 30, 10, 17, 17, 17,
310 15, 1, 6, 15, 14, 15, 26, 27, 23, 22,
311 23, 23, 10, 17, 23, 23, 23, 2, 15, 15,
312
313 21, 23, 23, 18, 23, 19, 23, 23, 23, 20,
314 23,16400, 23, 13, 22, 23, 12, 22, 23, 18,
315 19, 20, 23, 19, 23, 20, 23, 20, 23, 8208,
316 8208, 13, 23, 12, 23, 20, 23, 23, 23, 23,
317 23, 23, 18, 23, 23, 23, 18,16400
318 } ;
319
320 static lp_yyconst short int lp_yy_accept[126] =
321 { 0,
322 1, 2, 3, 3, 3, 3, 3, 4, 6, 10,
323 13, 16, 19, 22, 24, 26, 30, 33, 36, 39,
324 42, 45, 48, 51, 55, 58, 61, 63, 65, 68,
325 70, 72, 74, 77, 79, 80, 81, 81, 82, 83,
326 84, 85, 87, 87, 88, 89, 90, 91, 91, 92,
327 93, 95, 95, 95, 96, 97, 98, 99, 99, 100,
328 100, 101, 102, 102, 103, 104, 104, 104, 104, 106,
329 108, 109, 110, 112, 113, 114, 114, 116, 117, 117,
330 119, 120, 121, 122, 123, 124, 126, 128, 130, 131,
331 132, 132, 133, 134, 135, 136, 136, 137, 138, 138,
332
333 138, 139, 140, 140, 141, 141, 141, 142, 143, 143,
334 145, 145, 145, 146, 147, 148, 148, 149, 149, 149,
335 149, 149, 149, 149, 149
336 } ;
337
338 static lp_yyconst int lp_yy_ec[256] =
339 { 0,
340 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
341 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
342 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
343 1, 2, 1, 1, 5, 6, 5, 5, 5, 1,
344 1, 7, 8, 9, 10, 11, 12, 13, 14, 14,
345 13, 13, 13, 13, 13, 13, 13, 15, 16, 17,
346 18, 19, 1, 5, 20, 21, 22, 21, 23, 24,
347 25, 21, 26, 21, 21, 21, 27, 28, 29, 21,
348 21, 30, 31, 32, 33, 21, 21, 34, 35, 36,
349 5, 1, 5, 5, 5, 1, 20, 21, 22, 21,
350
351 23, 24, 25, 21, 26, 21, 21, 21, 27, 28,
352 29, 21, 21, 30, 31, 32, 33, 21, 21, 34,
353 35, 36, 5, 1, 5, 5, 1, 1, 1, 1,
354 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
355 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
356 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
357 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
358 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
359 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
360 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
361
362 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
363 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
364 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
365 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
366 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
367 1, 1, 1, 1, 1
368 } ;
369
370 static lp_yyconst int lp_yy_meta[37] =
371 { 0,
372 1, 2, 2, 2, 3, 4, 5, 2, 5, 2,
373 4, 4, 4, 4, 6, 5, 6, 5, 5, 3,
374 3, 3, 3, 3, 3, 7, 3, 3, 3, 3,
375 3, 3, 3, 3, 3, 3
376 } ;
377
378 static lp_yyconst short int lp_yy_base[131] =
379 { 0,
380 0, 35, 35, 37, 42, 44, 288, 297, 47, 50,
381 297, 257, 297, 49, 52, 54, 297, 297, 261, 297,
382 260, 54, 55, 80, 59, 63, 297, 297, 297, 265,
383 297, 297, 297, 91, 250, 94, 231, 94, 297, 297,
384 96, 101, 108, 297, 297, 74, 243, 0, 108, 111,
385 0, 229, 50, 88, 114, 117, 297, 232, 124, 130,
386 136, 297, 236, 138, 143, 222, 231, 221, 139, 118,
387 142, 146, 156, 163, 236, 41, 235, 157, 98, 234,
388 161, 225, 297, 233, 165, 176, 164, 180, 196, 297,
389 217, 297, 170, 297, 186, 218, 228, 187, 219, 214,
390
391 191, 194, 216, 198, 205, 200, 201, 206, 175, 202,
392 164, 191, 218, 229, 297, 151, 234, 149, 124, 118,
393 101, 94, 54, 297, 260, 267, 273, 278, 283, 289
394 } ;
395
396 static lp_yyconst short int lp_yy_def[131] =
397 { 0,
398 124, 1, 125, 125, 126, 126, 124, 124, 124, 124,
399 124, 127, 124, 124, 124, 124, 124, 124, 124, 124,
400 124, 128, 128, 124, 128, 128, 124, 124, 124, 124,
401 124, 124, 124, 124, 127, 124, 124, 124, 124, 124,
402 124, 124, 124, 124, 124, 128, 124, 129, 128, 128,
403 24, 124, 124, 128, 128, 128, 124, 124, 124, 124,
404 124, 124, 129, 128, 128, 124, 124, 124, 128, 128,
405 128, 128, 128, 130, 124, 124, 124, 128, 124, 124,
406 128, 124, 124, 124, 128, 128, 128, 128, 124, 124,
407 124, 124, 128, 124, 128, 124, 124, 128, 124, 124,
408
409 128, 128, 124, 128, 124, 124, 128, 128, 124, 128,
410 124, 124, 128, 128, 124, 124, 130, 124, 124, 124,
411 124, 124, 124, 0, 124, 124, 124, 124, 124, 124
412 } ;
413
414 static lp_yyconst short int lp_yy_nxt[334] =
415 { 0,
416 8, 9, 10, 9, 8, 8, 11, 12, 13, 12,
417 14, 15, 16, 16, 17, 18, 19, 20, 21, 22,
418 22, 22, 22, 22, 22, 22, 23, 22, 22, 22,
419 22, 22, 22, 22, 22, 22, 24, 28, 29, 28,
420 29, 30, 76, 30, 32, 33, 32, 33, 34, 34,
421 34, 34, 34, 34, 35, 92, 35, 35, 39, 35,
422 25, 38, 38, 40, 41, 26, 42, 42, 47, 47,
423 48, 48, 67, 47, 49, 48, 43, 47, 68, 48,
424 50, 51, 34, 34, 83, 55, 54, 35, 47, 35,
425 48, 56, 34, 34, 34, 36, 36, 36, 35, 79,
426
427 35, 36, 47, 36, 48, 52, 38, 38, 59, 59,
428 53, 41, 94, 42, 42, 60, 43, 60, 43, 69,
429 61, 61, 47, 43, 48, 47, 123, 48, 47, 122,
430 48, 47, 47, 48, 48, 70, 59, 59, 65, 76,
431 71, 64, 61, 61, 79, 72, 43, 73, 61, 61,
432 121, 120, 77, 47, 48, 48, 47, 80, 48, 48,
433 47, 85, 48, 78, 89, 89, 89, 86, 81, 88,
434 47, 47, 48, 48, 119, 47, 87, 48, 47, 47,
435 48, 48, 118, 93, 47, 99, 48, 95, 91, 98,
436 47, 116, 48, 88, 47, 101, 48, 89, 89, 89,
437
438 47, 47, 48, 48, 115, 47, 70, 48, 47, 104,
439 48, 102, 47, 117, 48, 47, 47, 48, 48, 76,
440 47, 107, 48, 113, 108, 117, 107, 110, 114, 108,
441 79, 112, 77, 111, 48, 89, 89, 89, 109, 106,
442 105, 97, 103, 80, 100, 48, 97, 96, 62, 62,
443 47, 84, 83, 82, 75, 74, 66, 62, 58, 124,
444 27, 27, 27, 27, 27, 27, 27, 31, 31, 31,
445 31, 31, 31, 31, 36, 37, 57, 45, 44, 36,
446 46, 46, 37, 46, 46, 63, 63, 124, 124, 63,
447 90, 124, 90, 90, 90, 90, 7, 124, 124, 124,
448
449 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
450 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
451 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
452 124, 124, 124
453 } ;
454
455 static lp_yyconst short int lp_yy_chk[334] =
456 { 0,
457 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
458 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
459 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
460 1, 1, 1, 1, 1, 1, 2, 3, 3, 4,
461 4, 3, 76, 4, 5, 5, 6, 6, 9, 9,
462 9, 10, 10, 10, 9, 76, 9, 10, 15, 10,
463 2, 14, 14, 15, 16, 2, 16, 16, 22, 23,
464 22, 23, 53, 25, 23, 25, 16, 26, 53, 26,
465 23, 24, 24, 24, 123, 26, 25, 24, 46, 24,
466 46, 26, 34, 34, 34, 36, 36, 36, 34, 79,
467
468 34, 36, 54, 36, 54, 24, 38, 38, 41, 41,
469 24, 42, 79, 42, 42, 43, 38, 43, 41, 54,
470 43, 43, 49, 42, 49, 50, 122, 50, 55, 121,
471 55, 56, 70, 56, 70, 55, 59, 59, 50, 64,
472 55, 49, 60, 60, 65, 55, 59, 56, 61, 61,
473 120, 119, 64, 69, 64, 69, 71, 65, 71, 65,
474 72, 69, 72, 64, 74, 74, 74, 71, 65, 73,
475 73, 78, 73, 78, 118, 81, 72, 81, 87, 85,
476 87, 85, 116, 78, 93, 86, 93, 81, 74, 85,
477 86, 111, 86, 88, 88, 93, 88, 89, 89, 89,
478
479 95, 98, 95, 98, 109, 101, 86, 101, 102, 98,
480 102, 95, 104, 112, 104, 107, 110, 107, 110, 113,
481 108, 101, 108, 107, 102, 112, 101, 104, 108, 102,
482 114, 106, 113, 105, 113, 117, 117, 117, 103, 100,
483 99, 97, 96, 114, 91, 114, 84, 82, 80, 77,
484 75, 68, 67, 66, 63, 58, 52, 47, 37, 117,
485 125, 125, 125, 125, 125, 125, 125, 126, 126, 126,
486 126, 126, 126, 126, 127, 35, 30, 21, 19, 127,
487 128, 128, 12, 128, 128, 129, 129, 7, 0, 129,
488 130, 0, 130, 130, 130, 130, 124, 124, 124, 124,
489
490 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
491 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
492 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
493 124, 124, 124
494 } ;
495
496 static lp_yy_state_type lp_yy_state_buf[YY_BUF_SIZE + 2], *lp_yy_state_ptr;
497 static char *lp_yy_full_match;
498 static int lp_yy_lp;
499 static int lp_yy_looking_for_trail_begin = 0;
500 static int lp_yy_full_lp;
501 static int *lp_yy_full_state;
502 #define YY_TRAILING_MASK 0x2000
503 #define YY_TRAILING_HEAD_MASK 0x4000
504 #define REJECT \
505 { \
506 *lp_yy_cp = lp_yy_hold_char; /* undo effects of setting up lp_yytext */ \
507 lp_yy_cp = lp_yy_full_match; /* restore poss. backed-over text */ \
508 lp_yy_lp = lp_yy_full_lp; /* restore orig. accepting pos. */ \
509 lp_yy_state_ptr = lp_yy_full_state; /* restore orig. state */ \
510 lp_yy_current_state = *lp_yy_state_ptr; /* restore curr. state */ \
511 ++lp_yy_lp; \
512 goto find_rule; \
513 }
514 static int lp_yy_more_offset = 0;
515 static int lp_yy_prev_more_offset = 0;
516 #define lp_yymore() (lp_yy_more_offset = lp_yy_flex_strlen( lp_yytext ))
517 #define YY_NEED_STRLEN
518 #define YY_MORE_ADJ 0
519 #define YY_RESTORE_YY_MORE_OFFSET \
520 { \
521 lp_yy_more_offset = lp_yy_prev_more_offset; \
522 lp_yyleng -= lp_yy_more_offset; \
523 }
524 #ifndef YYLMAX
525 #define YYLMAX 8192
526 #endif
527
528 char lp_yytext[YYLMAX];
529 char *lp_yytext_ptr;
530 #define INITIAL 0
531 #define COMMENT 1
532
533 #define LINECOMMENT 2
534
535
536 /* Macros after this point can all be overridden by user definitions in
537 * section 1.
538 */
539
540 #ifndef YY_SKIP_YYWRAP
541 #ifdef __cplusplus
542 extern "C" int lp_yywrap YY_PROTO(( void ));
543 #else
544 extern int lp_yywrap YY_PROTO(( void ));
545 #endif
546 #endif
547
548 #ifndef YY_NO_UNPUT
549 static void lp_yyunput YY_PROTO(( int c, char *buf_ptr ));
550 #endif
551
552 #ifndef lp_yytext_ptr
553 static void lp_yy_flex_strncpy YY_PROTO(( char *, lp_yyconst char *, int ));
554 #endif
555
556 #ifdef YY_NEED_STRLEN
557 static int lp_yy_flex_strlen YY_PROTO(( lp_yyconst char * ));
558 #endif
559
560 #ifndef YY_NO_INPUT
561 #ifdef __cplusplus
562 static int lp_yyinput YY_PROTO(( void ));
563 #else
564 static int input YY_PROTO(( void ));
565 #endif
566 #endif
567
568 #if YY_STACK_USED
569 static int lp_yy_start_stack_ptr = 0;
570 static int lp_yy_start_stack_depth = 0;
571 static int *lp_yy_start_stack = 0;
572 #ifndef YY_NO_PUSH_STATE
573 static void lp_yy_push_state YY_PROTO(( int new_state ));
574 #endif
575 #ifndef YY_NO_POP_STATE
576 static void lp_yy_pop_state YY_PROTO(( void ));
577 #endif
578 #ifndef YY_NO_TOP_STATE
579 static int lp_yy_top_state YY_PROTO(( void ));
580 #endif
581
582 #else
583 #define YY_NO_PUSH_STATE 1
584 #define YY_NO_POP_STATE 1
585 #define YY_NO_TOP_STATE 1
586 #endif
587
588 #ifdef YY_MALLOC_DECL
589 YY_MALLOC_DECL
590 #else
591 #if __STDC__
592 #ifndef __cplusplus
593 #include <stdlib.h>
594 #endif
595 #else
596 /* Just try to get by without declaring the routines. This will fail
597 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
598 * or sizeof(void*) != sizeof(int).
599 */
600 #endif
601 #endif
602
603 /* Amount of stuff to slurp up with each read. */
604 #ifndef YY_READ_BUF_SIZE
605 #define YY_READ_BUF_SIZE 8192
606 #endif
607
608 /* Copy whatever the last rule matched to the standard output. */
609
610 #ifndef ECHO
611 /* This used to be an fputs(), but since the string might contain NUL's,
612 * we now use fwrite().
613 */
614 /* #define ECHO (void) fwrite( lp_yytext, lp_yyleng, 1, lp_yyout )
615 ** #endif */
616
617 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
618 * is returned in "result".
619 */
620 #endif
621 #ifndef YY_INPUT
622 #define YY_INPUT(buf,result,max_size) \
623 if ( lp_yy_current_buffer->lp_yy_is_interactive ) \
624 { \
625 int c = '*', n; \
626 for ( n = 0; n < max_size && \
627 (c = getc( lp_yyin )) != EOF && c != '\n'; ++n ) \
628 buf[n] = (char) c; \
629 if ( c == '\n' ) \
630 buf[n++] = (char) c; \
631 if ( c == EOF && ferror( lp_yyin ) ) \
632 YY_FATAL_ERROR( "input in flex scanner failed" ); \
633 result = n; \
634 } \
635 else if ( ((result = fread( buf, 1, max_size, lp_yyin )) == 0) \
636 && ferror( lp_yyin ) ) \
637 YY_FATAL_ERROR( "input in flex scanner failed" );
638 #endif
639
640 /* No semi-colon after return; correct usage is to write "lp_yyterminate();" -
641 * we don't want an extra ';' after the "return" because that will cause
642 * some compilers to complain about unreachable statements.
643 */
644 #ifndef lp_yyterminate
645 #define lp_yyterminate() return YY_NULL
646 #endif
647
648 /* Number of entries by which start-condition stack grows. */
649 #ifndef YY_START_STACK_INCR
650 #define YY_START_STACK_INCR 25
651 #endif
652
653 /* Report a fatal error. */
654 #ifndef YY_FATAL_ERROR
655 #define YY_FATAL_ERROR(msg) lp_yy_fatal_error( msg )
656 #endif
657
658 /* Default declaration of generated scanner - a define so the user can
659 * easily add parameters.
660 */
661 #ifndef YY_DECL
662 #define YY_DECL int lp_yylex YY_PROTO(( void ))
663 #endif
664
665 /* Code executed at the beginning of each rule, after lp_yytext and lp_yyleng
666 * have been set up.
667 */
668 #ifndef YY_USER_ACTION
669 #define YY_USER_ACTION
670 #endif
671
672 /* Code executed at the end of each rule. */
673 #ifndef YY_BREAK
674 #define YY_BREAK break;
675 #endif
676
677 #define YY_RULE_SETUP \
678 if ( lp_yyleng > 0 ) \
679 lp_yy_current_buffer->lp_yy_at_bol = \
680 (lp_yytext[lp_yyleng - 1] == '\n'); \
681 YY_USER_ACTION
682
683 YY_DECL
684 {
685 register lp_yy_state_type lp_yy_current_state;
686 register char *lp_yy_cp, *lp_yy_bp;
687 register int lp_yy_act;
688
689
690
691 if ( lp_yy_init )
692 {
693 lp_yy_init = 0;
694
695 #ifdef YY_USER_INIT
696 YY_USER_INIT;
697 #endif
698
699 if ( ! lp_yy_start )
700 lp_yy_start = 1; /* first start state */
701
702 /* if ( ! lp_yyin )
703 ** lp_yyin = stdin;
704
705 ** if ( ! lp_yyout )
706 ** lp_yyout = stdout;
707 */
708
709 if ( ! lp_yy_current_buffer )
710 lp_yy_current_buffer =
711 lp_yy_create_buffer( lp_yyin, YY_BUF_SIZE );
712
713 lp_yy_load_buffer_state();
714 }
715
716 while ( 1 ) /* loops until end-of-file is reached */
717 {
718 lp_yy_cp = lp_yy_c_buf_p;
719
720 /* Support of lp_yytext. */
721 *lp_yy_cp = lp_yy_hold_char;
722
723 /* lp_yy_bp points to the position in lp_yy_ch_buf of the start of
724 * the current run.
725 */
726 lp_yy_bp = lp_yy_cp;
727
728 lp_yy_current_state = lp_yy_start;
729 lp_yy_current_state += YY_AT_BOL();
730 lp_yy_state_ptr = lp_yy_state_buf;
731 *lp_yy_state_ptr++ = lp_yy_current_state;
732 lp_yy_match:
733 do
734 {
735 register YY_CHAR lp_yy_c = lp_yy_ec[YY_SC_TO_UI(*lp_yy_cp)];
736 while ( lp_yy_chk[lp_yy_base[lp_yy_current_state] + lp_yy_c] != lp_yy_current_state )
737 {
738 lp_yy_current_state = (int) lp_yy_def[lp_yy_current_state];
739 if ( lp_yy_current_state >= 125 )
740 lp_yy_c = lp_yy_meta[(unsigned int) lp_yy_c];
741 }
742 lp_yy_current_state = lp_yy_nxt[lp_yy_base[lp_yy_current_state] + (unsigned int) lp_yy_c];
743 *lp_yy_state_ptr++ = lp_yy_current_state;
744 ++lp_yy_cp;
745 }
746 while ( lp_yy_base[lp_yy_current_state] != 297 );
747
748 lp_yy_find_action:
749 lp_yy_current_state = *--lp_yy_state_ptr;
750 lp_yy_lp = lp_yy_accept[lp_yy_current_state];
751 find_rule: /* we branch to this label when backing up */
752 for ( ; ; ) /* until we find what rule we matched */
753 {
754 if ( lp_yy_lp && lp_yy_lp < lp_yy_accept[lp_yy_current_state + 1] )
755 {
756 lp_yy_act = lp_yy_acclist[lp_yy_lp];
757 if ( lp_yy_act & YY_TRAILING_HEAD_MASK ||
758 lp_yy_looking_for_trail_begin )
759 {
760 if ( lp_yy_act == lp_yy_looking_for_trail_begin )
761 {
762 lp_yy_looking_for_trail_begin = 0;
763 lp_yy_act &= ~YY_TRAILING_HEAD_MASK;
764 break;
765 }
766 }
767 else if ( lp_yy_act & YY_TRAILING_MASK )
768 {
769 lp_yy_looking_for_trail_begin = lp_yy_act & ~YY_TRAILING_MASK;
770 lp_yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
771 lp_yy_full_match = lp_yy_cp;
772 lp_yy_full_state = lp_yy_state_ptr;
773 lp_yy_full_lp = lp_yy_lp;
774 }
775 else
776 {
777 lp_yy_full_match = lp_yy_cp;
778 lp_yy_full_state = lp_yy_state_ptr;
779 lp_yy_full_lp = lp_yy_lp;
780 break;
781 }
782 ++lp_yy_lp;
783 goto find_rule;
784 }
785 --lp_yy_cp;
786 lp_yy_current_state = *--lp_yy_state_ptr;
787 lp_yy_lp = lp_yy_accept[lp_yy_current_state];
788 }
789
790 YY_DO_BEFORE_ACTION;
791
792 if ( lp_yy_act != YY_END_OF_BUFFER )
793 {
794 int lp_yyl;
795 for ( lp_yyl = 0; lp_yyl < lp_yyleng; ++lp_yyl )
796 if ( lp_yytext[lp_yyl] == '\n' )
797 ++lp_yylineno;
798 }
799
800 do_action: /* This label is used only to access EOF actions. */
801
802
803 switch ( lp_yy_act )
804 { /* beginning of action switch */
805 case 1:
806 YY_RULE_SETUP
807 {
808 BEGIN COMMENT;
809 } /* begin skip comment */
810 YY_BREAK
811 case 2:
812 YY_RULE_SETUP
813 {
814 BEGIN INITIAL;
815 } /* end skip comment */
816 YY_BREAK
817 case 3:
818 YY_RULE_SETUP
819 {
820 }
821 YY_BREAK
822 case 4:
823 YY_RULE_SETUP
824 {
825 }
826 YY_BREAK
827 case 5:
828 YY_RULE_SETUP
829 {
830 }
831 YY_BREAK
832 case 6:
833 YY_RULE_SETUP
834 {
835 BEGIN LINECOMMENT;
836 } /* begin skip LINECOMMENT */
837 YY_BREAK
838 case 7:
839 YY_RULE_SETUP
840 {
841 BEGIN INITIAL;
842 } /* end skip LINECOMMENT */
843 YY_BREAK
844 case 8:
845 YY_RULE_SETUP
846 {
847 BEGIN INITIAL;
848 } /* end skip LINECOMMENT */
849 YY_BREAK
850 case 9:
851 YY_RULE_SETUP
852 {
853 }
854 YY_BREAK
855 case 10:
856 YY_RULE_SETUP
857 {
858 }
859 YY_BREAK
860 case 11:
861 YY_RULE_SETUP
862 {
863 return(COMMA);
864 }
865 YY_BREAK
866 case 12:
867 YY_RULE_SETUP
868 {
869 return(MINIMISE);
870 }
871 YY_BREAK
872 case 13:
873 YY_RULE_SETUP
874 {
875 return(MAXIMISE);
876 }
877 YY_BREAK
878 case 14:
879 YY_RULE_SETUP
880 {
881 f = atof((char *)lp_yytext);
882 return(INTCONS);
883 } /* f contains the last float */
884 YY_BREAK
885 case 15:
886 YY_RULE_SETUP
887 {
888 f = atof((char *)lp_yytext);
889 return(CONS);
890 } /* f contains the last float */
891 YY_BREAK
892 case 16:
893 YY_RULE_SETUP
894 {
895 char *ptr;
896
897 f = DEF_INFINITE;
898 Sign = 0;
899 ptr = (char *)lp_yytext;
900 while (isspace(*ptr)) ptr++;
901 if(*ptr == '-')
902 Sign = 1;
903 return(INF);
904 } /* f contains the last float */
905 YY_BREAK
906 case 17:
907 YY_RULE_SETUP
908 {
909 Sign = 0;
910 for(x = 0; x < lp_yyleng; x++)
911 if(lp_yytext[x] == '-' || lp_yytext[x] == '+')
912 Sign = (Sign == (lp_yytext[x] == '+'));
913 return (SIGN);
914 /* Sign is TRUE if the sign-string
915 represents a '-'. Otherwise Sign
916 is FALSE */
917 }
918 YY_BREAK
919 case 18:
920 YY_RULE_SETUP
921 {
922 if((!Within_int_decl) && (!Within_sec_decl) && (!Within_sos_decl)) {
923 Within_int_decl = TRUE;
924 Within_sos_decl1 = FALSE;
925 }
926 return(SEC_INT);
927 }
928 YY_BREAK
929 case 19:
930 YY_RULE_SETUP
931 {
932 if((!Within_int_decl) && (!Within_sec_decl) && (!Within_sos_decl)) {
933 Within_sec_decl = TRUE;
934 Within_sos_decl1 = FALSE;
935 }
936 return(SEC_SEC);
937 }
938 YY_BREAK
939 case 20:
940 YY_RULE_SETUP
941 {
942 if(!Within_sos_decl)
943 SOStype0 = (short)atoi(((char *)lp_yytext) + 3);
944 if((!Within_int_decl) && (!Within_sec_decl) && (!Within_sos_decl))
945 Within_sos_decl = TRUE;
946 return(SEC_SOS);
947 }
948 YY_BREAK
949 case 21:
950 YY_RULE_SETUP
951 {
952 FREE(Last_var);
953 Last_var = strdup((char *)lp_yytext);
954 Last_var[strlen(Last_var) - 2] = 0;
955 return(SOSDESCR);
956 }
957 YY_BREAK
958 case 22:
959 YY_RULE_SETUP
960 {
961 FREE(Last_var);
962 Last_var = strdup((char *)lp_yytext);
963 Last_var[strlen(Last_var) - 1] = 0;
964 return(VARIABLECOLON);
965 }
966 YY_BREAK
967 case 23:
968 YY_RULE_SETUP
969 {
970 FREE(Last_var);
971 Last_var = strdup((char *)lp_yytext);
972 return(VAR);
973 }
974 YY_BREAK
975 case 24:
976 YY_RULE_SETUP
977 {
978 return (COLON);
979 }
980 YY_BREAK
981 case 25:
982 YY_RULE_SETUP
983 {
984 return(AR_M_OP);
985 }
986 YY_BREAK
987 case 26:
988 YY_RULE_SETUP
989 {
990 return(RE_OPLE);
991 }
992 YY_BREAK
993 case 27:
994 YY_RULE_SETUP
995 {
996 return(RE_OPGE);
997 }
998 YY_BREAK
999 case 28:
1000 YY_RULE_SETUP
1001 {
1002 Within_int_decl = Within_sec_decl = Within_sos_decl = FALSE;
1003 check_int_sec_sos_decl(Within_int_decl, Within_sec_decl, Within_sos_decl);
1004 return(END_C);
1005 }
1006 YY_BREAK
1007 case 29:
1008 YY_RULE_SETUP
1009 {
1010 report(NULL, CRITICAL, "LEX ERROR : %s lineno %d\n", lp_yytext, lp_yylineno);
1011 return(UNDEFINED);
1012 }
1013 YY_BREAK
1014 case 30:
1015 YY_RULE_SETUP
1016 /* ECHO; */
1017 YY_BREAK
1018 case YY_STATE_EOF(INITIAL):
1019 case YY_STATE_EOF(COMMENT):
1020 case YY_STATE_EOF(LINECOMMENT):
1021 lp_yyterminate();
1022
1023 case YY_END_OF_BUFFER:
1024 {
1025 /* Amount of text matched not including the EOB char. */
1026 int lp_yy_amount_of_matched_text = (int) (lp_yy_cp - lp_yytext_ptr) - 1;
1027
1028 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1029 *lp_yy_cp = lp_yy_hold_char;
1030 YY_RESTORE_YY_MORE_OFFSET
1031
1032 if ( lp_yy_current_buffer->lp_yy_buffer_status == YY_BUFFER_NEW )
1033 {
1034 /* We're scanning a new file or input source. It's
1035 * possible that this happened because the user
1036 * just pointed lp_yyin at a new source and called
1037 * lp_yylex(). If so, then we have to assure
1038 * consistency between lp_yy_current_buffer and our
1039 * globals. Here is the right place to do so, because
1040 * this is the first action (other than possibly a
1041 * back-up) that will match for the new input source.
1042 */
1043 lp_yy_n_chars = lp_yy_current_buffer->lp_yy_n_chars;
1044 lp_yy_current_buffer->lp_yy_input_file = lp_yyin;
1045 lp_yy_current_buffer->lp_yy_buffer_status = YY_BUFFER_NORMAL;
1046 }
1047
1048 /* Note that here we test for lp_yy_c_buf_p "<=" to the position
1049 * of the first EOB in the buffer, since lp_yy_c_buf_p will
1050 * already have been incremented past the NUL character
1051 * (since all states make transitions on EOB to the
1052 * end-of-buffer state). Contrast this with the test
1053 * in input().
1054 */
1055 if ( lp_yy_c_buf_p <= &lp_yy_current_buffer->lp_yy_ch_buf[lp_yy_n_chars] )
1056 { /* This was really a NUL. */
1057 lp_yy_state_type lp_yy_next_state;
1058
1059 lp_yy_c_buf_p = lp_yytext_ptr + lp_yy_amount_of_matched_text;
1060
1061 lp_yy_current_state = lp_yy_get_previous_state();
1062
1063 /* Okay, we're now positioned to make the NUL
1064 * transition. We couldn't have
1065 * lp_yy_get_previous_state() go ahead and do it
1066 * for us because it doesn't know how to deal
1067 * with the possibility of jamming (and we don't
1068 * want to build jamming into it because then it
1069 * will run more slowly).
1070 */
1071
1072 lp_yy_next_state = lp_yy_try_NUL_trans( lp_yy_current_state );
1073
1074 lp_yy_bp = lp_yytext_ptr + YY_MORE_ADJ;
1075
1076 if ( lp_yy_next_state )
1077 {
1078 /* Consume the NUL. */
1079 lp_yy_cp = ++lp_yy_c_buf_p;
1080 lp_yy_current_state = lp_yy_next_state;
1081 goto lp_yy_match;
1082 }
1083
1084 else
1085 {
1086 lp_yy_cp = lp_yy_c_buf_p;
1087 goto lp_yy_find_action;
1088 }
1089 }
1090
1091 else switch ( lp_yy_get_next_buffer() )
1092 {
1093 case EOB_ACT_END_OF_FILE:
1094 {
1095 lp_yy_did_buffer_switch_on_eof = 0;
1096
1097 if ( lp_yywrap() )
1098 {
1099 /* Note: because we've taken care in
1100 * lp_yy_get_next_buffer() to have set up
1101 * lp_yytext, we can now set up
1102 * lp_yy_c_buf_p so that if some total
1103 * hoser (like flex itself) wants to
1104 * call the scanner after we return the
1105 * YY_NULL, it'll still work - another
1106 * YY_NULL will get returned.
1107 */
1108 lp_yy_c_buf_p = lp_yytext_ptr + YY_MORE_ADJ;
1109
1110 lp_yy_act = YY_STATE_EOF(YY_START);
1111 goto do_action;
1112 }
1113
1114 else
1115 {
1116 if ( ! lp_yy_did_buffer_switch_on_eof )
1117 YY_NEW_FILE;
1118 }
1119 break;
1120 }
1121
1122 case EOB_ACT_CONTINUE_SCAN:
1123 lp_yy_c_buf_p =
1124 lp_yytext_ptr + lp_yy_amount_of_matched_text;
1125
1126 lp_yy_current_state = lp_yy_get_previous_state();
1127
1128 lp_yy_cp = lp_yy_c_buf_p;
1129 lp_yy_bp = lp_yytext_ptr + YY_MORE_ADJ;
1130 goto lp_yy_match;
1131
1132 case EOB_ACT_LAST_MATCH:
1133 lp_yy_c_buf_p =
1134 &lp_yy_current_buffer->lp_yy_ch_buf[lp_yy_n_chars];
1135
1136 lp_yy_current_state = lp_yy_get_previous_state();
1137
1138 lp_yy_cp = lp_yy_c_buf_p;
1139 lp_yy_bp = lp_yytext_ptr + YY_MORE_ADJ;
1140 goto lp_yy_find_action;
1141 }
1142 break;
1143 }
1144
1145 default:
1146 YY_FATAL_ERROR(
1147 "fatal flex scanner internal error--no action found" );
1148 } /* end of action switch */
1149 } /* end of scanning one token */
1150 } /* end of lp_yylex */
1151
1152
1153 /* lp_yy_get_next_buffer - try to read in a new buffer
1154 *
1155 * Returns a code representing an action:
1156 * EOB_ACT_LAST_MATCH -
1157 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1158 * EOB_ACT_END_OF_FILE - end of file
1159 */
1160
lp_yy_get_next_buffer()1161 static int lp_yy_get_next_buffer()
1162 {
1163 register char *dest = lp_yy_current_buffer->lp_yy_ch_buf;
1164 register char *source = lp_yytext_ptr;
1165 register int number_to_move, i;
1166 int ret_val;
1167
1168 if ( lp_yy_c_buf_p > &lp_yy_current_buffer->lp_yy_ch_buf[lp_yy_n_chars + 1] )
1169 YY_FATAL_ERROR(
1170 "fatal flex scanner internal error--end of buffer missed" );
1171
1172 if ( lp_yy_current_buffer->lp_yy_fill_buffer == 0 )
1173 { /* Don't try to fill the buffer, so this is an EOF. */
1174 if ( lp_yy_c_buf_p - lp_yytext_ptr - YY_MORE_ADJ == 1 )
1175 {
1176 /* We matched a single character, the EOB, so
1177 * treat this as a final EOF.
1178 */
1179 return EOB_ACT_END_OF_FILE;
1180 }
1181
1182 else
1183 {
1184 /* We matched some text prior to the EOB, first
1185 * process it.
1186 */
1187 return EOB_ACT_LAST_MATCH;
1188 }
1189 }
1190
1191 /* Try to read more data. */
1192
1193 /* First move last chars to start of buffer. */
1194 number_to_move = (int) (lp_yy_c_buf_p - lp_yytext_ptr) - 1;
1195
1196 for ( i = 0; i < number_to_move; ++i )
1197 *(dest++) = *(source++);
1198
1199 if ( lp_yy_current_buffer->lp_yy_buffer_status == YY_BUFFER_EOF_PENDING )
1200 /* don't do the read, it's not guaranteed to return an EOF,
1201 * just force an EOF
1202 */
1203 lp_yy_current_buffer->lp_yy_n_chars = lp_yy_n_chars = 0;
1204
1205 else
1206 {
1207 int num_to_read =
1208 lp_yy_current_buffer->lp_yy_buf_size - number_to_move - 1;
1209
1210 while ( num_to_read <= 0 )
1211 { /* Not enough room in the buffer - grow it. */
1212 #ifdef YY_USES_REJECT
1213 YY_FATAL_ERROR(
1214 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1215 #else
1216
1217 /* just a shorter name for the current buffer */
1218 YY_BUFFER_STATE b = lp_yy_current_buffer;
1219
1220 int lp_yy_c_buf_p_offset =
1221 (int) (lp_yy_c_buf_p - b->lp_yy_ch_buf);
1222
1223 if ( b->lp_yy_is_our_buffer )
1224 {
1225 int new_size = b->lp_yy_buf_size * 2;
1226
1227 if ( new_size <= 0 )
1228 b->lp_yy_buf_size += b->lp_yy_buf_size / 8;
1229 else
1230 b->lp_yy_buf_size *= 2;
1231
1232 b->lp_yy_ch_buf = (char *)
1233 /* Include room in for 2 EOB chars. */
1234 lp_yy_flex_realloc( (void *) b->lp_yy_ch_buf,
1235 b->lp_yy_buf_size + 2 );
1236 }
1237 else
1238 /* Can't grow it, we don't own it. */
1239 b->lp_yy_ch_buf = 0;
1240
1241 if ( ! b->lp_yy_ch_buf )
1242 YY_FATAL_ERROR(
1243 "fatal error - scanner input buffer overflow" );
1244
1245 lp_yy_c_buf_p = &b->lp_yy_ch_buf[lp_yy_c_buf_p_offset];
1246
1247 num_to_read = lp_yy_current_buffer->lp_yy_buf_size -
1248 number_to_move - 1;
1249 #endif
1250 }
1251
1252 if ( num_to_read > YY_READ_BUF_SIZE )
1253 num_to_read = YY_READ_BUF_SIZE;
1254
1255 /* Read in more data. */
1256 YY_INPUT( (&lp_yy_current_buffer->lp_yy_ch_buf[number_to_move]),
1257 lp_yy_n_chars, num_to_read );
1258
1259 lp_yy_current_buffer->lp_yy_n_chars = lp_yy_n_chars;
1260 }
1261
1262 if ( lp_yy_n_chars == 0 )
1263 {
1264 if ( number_to_move == YY_MORE_ADJ )
1265 {
1266 ret_val = EOB_ACT_END_OF_FILE;
1267 lp_yyrestart( lp_yyin );
1268 }
1269
1270 else
1271 {
1272 ret_val = EOB_ACT_LAST_MATCH;
1273 lp_yy_current_buffer->lp_yy_buffer_status =
1274 YY_BUFFER_EOF_PENDING;
1275 }
1276 }
1277
1278 else
1279 ret_val = EOB_ACT_CONTINUE_SCAN;
1280
1281 lp_yy_n_chars += number_to_move;
1282 lp_yy_current_buffer->lp_yy_ch_buf[lp_yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1283 lp_yy_current_buffer->lp_yy_ch_buf[lp_yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1284
1285 lp_yytext_ptr = &lp_yy_current_buffer->lp_yy_ch_buf[0];
1286
1287 return ret_val;
1288 }
1289
1290
1291 /* lp_yy_get_previous_state - get the state just before the EOB char was reached */
1292
lp_yy_get_previous_state()1293 static lp_yy_state_type lp_yy_get_previous_state()
1294 {
1295 register lp_yy_state_type lp_yy_current_state;
1296 register char *lp_yy_cp;
1297
1298 lp_yy_current_state = lp_yy_start;
1299 lp_yy_current_state += YY_AT_BOL();
1300 lp_yy_state_ptr = lp_yy_state_buf;
1301 *lp_yy_state_ptr++ = lp_yy_current_state;
1302
1303 for ( lp_yy_cp = lp_yytext_ptr + YY_MORE_ADJ; lp_yy_cp < lp_yy_c_buf_p; ++lp_yy_cp )
1304 {
1305 register YY_CHAR lp_yy_c = (*lp_yy_cp ? lp_yy_ec[YY_SC_TO_UI(*lp_yy_cp)] : 1);
1306 while ( lp_yy_chk[lp_yy_base[lp_yy_current_state] + lp_yy_c] != lp_yy_current_state )
1307 {
1308 lp_yy_current_state = (int) lp_yy_def[lp_yy_current_state];
1309 if ( lp_yy_current_state >= 125 )
1310 lp_yy_c = lp_yy_meta[(unsigned int) lp_yy_c];
1311 }
1312 lp_yy_current_state = lp_yy_nxt[lp_yy_base[lp_yy_current_state] + (unsigned int) lp_yy_c];
1313 *lp_yy_state_ptr++ = lp_yy_current_state;
1314 }
1315
1316 return lp_yy_current_state;
1317 }
1318
1319
1320 /* lp_yy_try_NUL_trans - try to make a transition on the NUL character
1321 *
1322 * synopsis
1323 * next_state = lp_yy_try_NUL_trans( current_state );
1324 */
1325
1326 #ifdef YY_USE_PROTOS
lp_yy_try_NUL_trans(lp_yy_state_type lp_yy_current_state)1327 static lp_yy_state_type lp_yy_try_NUL_trans( lp_yy_state_type lp_yy_current_state )
1328 #else
1329 static lp_yy_state_type lp_yy_try_NUL_trans( lp_yy_current_state )
1330 lp_yy_state_type lp_yy_current_state;
1331 #endif
1332 {
1333 register int lp_yy_is_jam;
1334
1335 register YY_CHAR lp_yy_c = 1;
1336 while ( lp_yy_chk[lp_yy_base[lp_yy_current_state] + lp_yy_c] != lp_yy_current_state )
1337 {
1338 lp_yy_current_state = (int) lp_yy_def[lp_yy_current_state];
1339 if ( lp_yy_current_state >= 125 )
1340 lp_yy_c = lp_yy_meta[(unsigned int) lp_yy_c];
1341 }
1342 lp_yy_current_state = lp_yy_nxt[lp_yy_base[lp_yy_current_state] + (unsigned int) lp_yy_c];
1343 lp_yy_is_jam = (lp_yy_current_state == 124);
1344 if ( ! lp_yy_is_jam )
1345 *lp_yy_state_ptr++ = lp_yy_current_state;
1346
1347 return lp_yy_is_jam ? 0 : lp_yy_current_state;
1348 }
1349
1350
1351 #ifndef YY_NO_UNPUT
1352 #ifdef YY_USE_PROTOS
lp_yyunput(int c,register char * lp_yy_bp)1353 static void lp_yyunput( int c, register char *lp_yy_bp )
1354 #else
1355 static void lp_yyunput( c, lp_yy_bp )
1356 int c;
1357 register char *lp_yy_bp;
1358 #endif
1359 {
1360 register char *lp_yy_cp = lp_yy_c_buf_p;
1361
1362 /* undo effects of setting up lp_yytext */
1363 *lp_yy_cp = lp_yy_hold_char;
1364
1365 if ( lp_yy_cp < lp_yy_current_buffer->lp_yy_ch_buf + 2 )
1366 { /* need to shift things up to make room */
1367 /* +2 for EOB chars. */
1368 register int number_to_move = lp_yy_n_chars + 2;
1369 register char *dest = &lp_yy_current_buffer->lp_yy_ch_buf[
1370 lp_yy_current_buffer->lp_yy_buf_size + 2];
1371 register char *source =
1372 &lp_yy_current_buffer->lp_yy_ch_buf[number_to_move];
1373
1374 while ( source > lp_yy_current_buffer->lp_yy_ch_buf )
1375 *--dest = *--source;
1376
1377 lp_yy_cp += (int) (dest - source);
1378 lp_yy_bp += (int) (dest - source);
1379 lp_yy_current_buffer->lp_yy_n_chars =
1380 lp_yy_n_chars = lp_yy_current_buffer->lp_yy_buf_size;
1381
1382 if ( lp_yy_cp < lp_yy_current_buffer->lp_yy_ch_buf + 2 )
1383 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1384 }
1385
1386 *--lp_yy_cp = (char) c;
1387
1388 if ( c == '\n' )
1389 --lp_yylineno;
1390
1391 lp_yytext_ptr = lp_yy_bp;
1392 lp_yy_hold_char = *lp_yy_cp;
1393 lp_yy_c_buf_p = lp_yy_cp;
1394 }
1395 #endif /* ifndef YY_NO_UNPUT */
1396
1397
1398 #ifdef __cplusplus
lp_yyinput()1399 static int lp_yyinput()
1400 #else
1401 static int input()
1402 #endif
1403 {
1404 int c;
1405
1406 *lp_yy_c_buf_p = lp_yy_hold_char;
1407
1408 if ( *lp_yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1409 {
1410 /* lp_yy_c_buf_p now points to the character we want to return.
1411 * If this occurs *before* the EOB characters, then it's a
1412 * valid NUL; if not, then we've hit the end of the buffer.
1413 */
1414 if ( lp_yy_c_buf_p < &lp_yy_current_buffer->lp_yy_ch_buf[lp_yy_n_chars] )
1415 /* This was really a NUL. */
1416 *lp_yy_c_buf_p = '\0';
1417
1418 else
1419 { /* need more input */
1420 int offset = lp_yy_c_buf_p - lp_yytext_ptr;
1421 ++lp_yy_c_buf_p;
1422
1423 switch ( lp_yy_get_next_buffer() )
1424 {
1425 case EOB_ACT_LAST_MATCH:
1426 /* This happens because lp_yy_g_n_b()
1427 * sees that we've accumulated a
1428 * token and flags that we need to
1429 * try matching the token before
1430 * proceeding. But for input(),
1431 * there's no matching to consider.
1432 * So convert the EOB_ACT_LAST_MATCH
1433 * to EOB_ACT_END_OF_FILE.
1434 */
1435
1436 /* Reset buffer status. */
1437 lp_yyrestart( lp_yyin );
1438
1439 /* fall through */
1440
1441 case EOB_ACT_END_OF_FILE:
1442 {
1443 if ( lp_yywrap() )
1444 return EOF;
1445
1446 if ( ! lp_yy_did_buffer_switch_on_eof )
1447 YY_NEW_FILE;
1448 #ifdef __cplusplus
1449 return lp_yyinput();
1450 #else
1451 return input();
1452 #endif
1453 }
1454
1455 case EOB_ACT_CONTINUE_SCAN:
1456 lp_yy_c_buf_p = lp_yytext_ptr + offset;
1457 break;
1458 }
1459 }
1460 }
1461
1462 c = *(unsigned char *) lp_yy_c_buf_p; /* cast for 8-bit char's */
1463 *lp_yy_c_buf_p = '\0'; /* preserve lp_yytext */
1464 lp_yy_hold_char = *++lp_yy_c_buf_p;
1465
1466 lp_yy_current_buffer->lp_yy_at_bol = (c == '\n');
1467 if ( lp_yy_current_buffer->lp_yy_at_bol )
1468 ++lp_yylineno;
1469
1470 return c;
1471 }
1472
1473
1474 #ifdef YY_USE_PROTOS
lp_yyrestart(FILE * input_file)1475 void lp_yyrestart( FILE *input_file )
1476 #else
1477 void lp_yyrestart( input_file )
1478 FILE *input_file;
1479 #endif
1480 {
1481 if ( ! lp_yy_current_buffer )
1482 lp_yy_current_buffer = lp_yy_create_buffer( lp_yyin, YY_BUF_SIZE );
1483
1484 lp_yy_init_buffer( lp_yy_current_buffer, input_file );
1485 lp_yy_load_buffer_state();
1486 }
1487
1488
1489 #ifdef YY_USE_PROTOS
lp_yy_switch_to_buffer(YY_BUFFER_STATE new_buffer)1490 void lp_yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1491 #else
1492 void lp_yy_switch_to_buffer( new_buffer )
1493 YY_BUFFER_STATE new_buffer;
1494 #endif
1495 {
1496 if ( lp_yy_current_buffer == new_buffer )
1497 return;
1498
1499 if ( lp_yy_current_buffer )
1500 {
1501 /* Flush out information for old buffer. */
1502 *lp_yy_c_buf_p = lp_yy_hold_char;
1503 lp_yy_current_buffer->lp_yy_buf_pos = lp_yy_c_buf_p;
1504 lp_yy_current_buffer->lp_yy_n_chars = lp_yy_n_chars;
1505 }
1506
1507 lp_yy_current_buffer = new_buffer;
1508 lp_yy_load_buffer_state();
1509
1510 /* We don't actually know whether we did this switch during
1511 * EOF (lp_yywrap()) processing, but the only time this flag
1512 * is looked at is after lp_yywrap() is called, so it's safe
1513 * to go ahead and always set it.
1514 */
1515 lp_yy_did_buffer_switch_on_eof = 1;
1516 }
1517
1518
1519 #ifdef YY_USE_PROTOS
lp_yy_load_buffer_state(void)1520 void lp_yy_load_buffer_state( void )
1521 #else
1522 void lp_yy_load_buffer_state()
1523 #endif
1524 {
1525 lp_yy_n_chars = lp_yy_current_buffer->lp_yy_n_chars;
1526 lp_yytext_ptr = lp_yy_c_buf_p = lp_yy_current_buffer->lp_yy_buf_pos;
1527 lp_yyin = lp_yy_current_buffer->lp_yy_input_file;
1528 lp_yy_hold_char = *lp_yy_c_buf_p;
1529 }
1530
1531
1532 #ifdef YY_USE_PROTOS
lp_yy_create_buffer(FILE * file,int size)1533 YY_BUFFER_STATE lp_yy_create_buffer( FILE *file, int size )
1534 #else
1535 YY_BUFFER_STATE lp_yy_create_buffer( file, size )
1536 FILE *file;
1537 int size;
1538 #endif
1539 {
1540 YY_BUFFER_STATE b;
1541
1542 b = (YY_BUFFER_STATE) lp_yy_flex_alloc( sizeof( struct lp_yy_buffer_state ) );
1543 if ( ! b )
1544 YY_FATAL_ERROR( "out of dynamic memory in lp_yy_create_buffer()" );
1545
1546 b->lp_yy_buf_size = size;
1547
1548 /* lp_yy_ch_buf has to be 2 characters longer than the size given because
1549 * we need to put in 2 end-of-buffer characters.
1550 */
1551 b->lp_yy_ch_buf = (char *) lp_yy_flex_alloc( b->lp_yy_buf_size + 2 );
1552 if ( ! b->lp_yy_ch_buf )
1553 YY_FATAL_ERROR( "out of dynamic memory in lp_yy_create_buffer()" );
1554
1555 b->lp_yy_is_our_buffer = 1;
1556
1557 lp_yy_init_buffer( b, file );
1558
1559 return b;
1560 }
1561
1562
1563 #ifdef YY_USE_PROTOS
lp_yy_delete_buffer(YY_BUFFER_STATE b)1564 void lp_yy_delete_buffer( YY_BUFFER_STATE b )
1565 #else
1566 void lp_yy_delete_buffer( b )
1567 YY_BUFFER_STATE b;
1568 #endif
1569 {
1570 if ( ! b )
1571 return;
1572
1573 if ( b == lp_yy_current_buffer )
1574 lp_yy_current_buffer = (YY_BUFFER_STATE) 0;
1575
1576 if ( b->lp_yy_is_our_buffer )
1577 lp_yy_flex_free( (void *) b->lp_yy_ch_buf );
1578
1579 lp_yy_flex_free( (void *) b );
1580 }
1581
1582
1583 #ifndef YY_ALWAYS_INTERACTIVE
1584 #ifndef YY_NEVER_INTERACTIVE
1585 extern int isatty YY_PROTO(( int ));
1586 #endif
1587 #endif
1588
1589 #ifdef YY_USE_PROTOS
lp_yy_init_buffer(YY_BUFFER_STATE b,FILE * file)1590 void lp_yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1591 #else
1592 void lp_yy_init_buffer( b, file )
1593 YY_BUFFER_STATE b;
1594 FILE *file;
1595 #endif
1596
1597
1598 {
1599 lp_yy_flush_buffer( b );
1600
1601 b->lp_yy_input_file = file;
1602 b->lp_yy_fill_buffer = 1;
1603
1604 #if YY_ALWAYS_INTERACTIVE
1605 b->lp_yy_is_interactive = 1;
1606 #else
1607 #if YY_NEVER_INTERACTIVE
1608 b->lp_yy_is_interactive = 0;
1609 #else
1610 b->lp_yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1611 #endif
1612 #endif
1613 }
1614
1615
1616 #ifdef YY_USE_PROTOS
lp_yy_flush_buffer(YY_BUFFER_STATE b)1617 void lp_yy_flush_buffer( YY_BUFFER_STATE b )
1618 #else
1619 void lp_yy_flush_buffer( b )
1620 YY_BUFFER_STATE b;
1621 #endif
1622
1623 {
1624 if ( ! b )
1625 return;
1626
1627 b->lp_yy_n_chars = 0;
1628
1629 /* We always need two end-of-buffer characters. The first causes
1630 * a transition to the end-of-buffer state. The second causes
1631 * a jam in that state.
1632 */
1633 b->lp_yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1634 b->lp_yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1635
1636 b->lp_yy_buf_pos = &b->lp_yy_ch_buf[0];
1637
1638 b->lp_yy_at_bol = 1;
1639 b->lp_yy_buffer_status = YY_BUFFER_NEW;
1640
1641 if ( b == lp_yy_current_buffer )
1642 lp_yy_load_buffer_state();
1643 }
1644
1645
1646 #ifndef YY_NO_SCAN_BUFFER
1647 #ifdef YY_USE_PROTOS
lp_yy_scan_buffer(char * base,lp_yy_size_t size)1648 YY_BUFFER_STATE lp_yy_scan_buffer( char *base, lp_yy_size_t size )
1649 #else
1650 YY_BUFFER_STATE lp_yy_scan_buffer( base, size )
1651 char *base;
1652 lp_yy_size_t size;
1653 #endif
1654 {
1655 YY_BUFFER_STATE b;
1656
1657 if ( size < 2 ||
1658 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1659 base[size-1] != YY_END_OF_BUFFER_CHAR )
1660 /* They forgot to leave room for the EOB's. */
1661 return 0;
1662
1663 b = (YY_BUFFER_STATE) lp_yy_flex_alloc( sizeof( struct lp_yy_buffer_state ) );
1664 if ( ! b )
1665 YY_FATAL_ERROR( "out of dynamic memory in lp_yy_scan_buffer()" );
1666
1667 b->lp_yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1668 b->lp_yy_buf_pos = b->lp_yy_ch_buf = base;
1669 b->lp_yy_is_our_buffer = 0;
1670 b->lp_yy_input_file = 0;
1671 b->lp_yy_n_chars = b->lp_yy_buf_size;
1672 b->lp_yy_is_interactive = 0;
1673 b->lp_yy_at_bol = 1;
1674 b->lp_yy_fill_buffer = 0;
1675 b->lp_yy_buffer_status = YY_BUFFER_NEW;
1676
1677 lp_yy_switch_to_buffer( b );
1678
1679 return b;
1680 }
1681 #endif
1682
1683
1684 #ifndef YY_NO_SCAN_STRING
1685 #ifdef YY_USE_PROTOS
lp_yy_scan_string(lp_yyconst char * lp_yy_str)1686 YY_BUFFER_STATE lp_yy_scan_string( lp_yyconst char *lp_yy_str )
1687 #else
1688 YY_BUFFER_STATE lp_yy_scan_string( lp_yy_str )
1689 lp_yyconst char *lp_yy_str;
1690 #endif
1691 {
1692 int len;
1693 for ( len = 0; lp_yy_str[len]; ++len )
1694 ;
1695
1696 return lp_yy_scan_bytes( lp_yy_str, len );
1697 }
1698 #endif
1699
1700
1701 #ifndef YY_NO_SCAN_BYTES
1702 #ifdef YY_USE_PROTOS
lp_yy_scan_bytes(lp_yyconst char * bytes,int len)1703 YY_BUFFER_STATE lp_yy_scan_bytes( lp_yyconst char *bytes, int len )
1704 #else
1705 YY_BUFFER_STATE lp_yy_scan_bytes( bytes, len )
1706 lp_yyconst char *bytes;
1707 int len;
1708 #endif
1709 {
1710 YY_BUFFER_STATE b;
1711 char *buf;
1712 lp_yy_size_t n;
1713 int i;
1714
1715 /* Get memory for full buffer, including space for trailing EOB's. */
1716 n = len + 2;
1717 buf = (char *) lp_yy_flex_alloc( n );
1718 if ( ! buf )
1719 YY_FATAL_ERROR( "out of dynamic memory in lp_yy_scan_bytes()" );
1720
1721 for ( i = 0; i < len; ++i )
1722 buf[i] = bytes[i];
1723
1724 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1725
1726 b = lp_yy_scan_buffer( buf, n );
1727 if ( ! b )
1728 YY_FATAL_ERROR( "bad buffer in lp_yy_scan_bytes()" );
1729
1730 /* It's okay to grow etc. this buffer, and we should throw it
1731 * away when we're done.
1732 */
1733 b->lp_yy_is_our_buffer = 1;
1734
1735 return b;
1736 }
1737 #endif
1738
1739
1740 #ifndef YY_NO_PUSH_STATE
1741 #ifdef YY_USE_PROTOS
lp_yy_push_state(int new_state)1742 static void lp_yy_push_state( int new_state )
1743 #else
1744 static void lp_yy_push_state( new_state )
1745 int new_state;
1746 #endif
1747 {
1748 if ( lp_yy_start_stack_ptr >= lp_yy_start_stack_depth )
1749 {
1750 lp_yy_size_t new_size;
1751
1752 lp_yy_start_stack_depth += YY_START_STACK_INCR;
1753 new_size = lp_yy_start_stack_depth * sizeof( int );
1754
1755 if ( ! lp_yy_start_stack )
1756 lp_yy_start_stack = (int *) lp_yy_flex_alloc( new_size );
1757
1758 else
1759 lp_yy_start_stack = (int *) lp_yy_flex_realloc(
1760 (void *) lp_yy_start_stack, new_size );
1761
1762 if ( ! lp_yy_start_stack )
1763 YY_FATAL_ERROR(
1764 "out of memory expanding start-condition stack" );
1765 }
1766
1767 lp_yy_start_stack[lp_yy_start_stack_ptr++] = YY_START;
1768
1769 BEGIN(new_state);
1770 }
1771 #endif
1772
1773
1774 #ifndef YY_NO_POP_STATE
lp_yy_pop_state()1775 static void lp_yy_pop_state()
1776 {
1777 if ( --lp_yy_start_stack_ptr < 0 )
1778 YY_FATAL_ERROR( "start-condition stack underflow" );
1779
1780 BEGIN(lp_yy_start_stack[lp_yy_start_stack_ptr]);
1781 }
1782 #endif
1783
1784
1785 #ifndef YY_NO_TOP_STATE
lp_yy_top_state()1786 static int lp_yy_top_state()
1787 {
1788 return lp_yy_start_stack[lp_yy_start_stack_ptr - 1];
1789 }
1790 #endif
1791
1792 #ifndef YY_EXIT_FAILURE
1793 #define YY_EXIT_FAILURE 2
1794 #endif
1795
1796 #ifdef YY_USE_PROTOS
lp_yy_fatal_error(lp_yyconst char msg[])1797 static void lp_yy_fatal_error( lp_yyconst char msg[] )
1798 #else
1799 static void lp_yy_fatal_error( msg )
1800 char msg[];
1801 #endif
1802 {
1803 /* (void) fprintf( stderr, "%s\n", msg ); */
1804 lex_fatal_error (msg); /* exit( YY_EXIT_FAILURE ); */
1805 }
1806
1807
1808
1809 /* Redefine lp_yyless() so it works in section 3 code. */
1810
1811 #undef lp_yyless
1812 #define lp_yyless(n) \
1813 do \
1814 { \
1815 /* Undo effects of setting up lp_yytext. */ \
1816 lp_yytext[lp_yyleng] = lp_yy_hold_char; \
1817 lp_yy_c_buf_p = lp_yytext + n; \
1818 lp_yy_hold_char = *lp_yy_c_buf_p; \
1819 *lp_yy_c_buf_p = '\0'; \
1820 lp_yyleng = n; \
1821 } \
1822 while ( 0 )
1823
1824
1825 /* Internal utility routines. */
1826
1827 #ifndef lp_yytext_ptr
1828 #ifdef YY_USE_PROTOS
lp_yy_flex_strncpy(char * s1,lp_yyconst char * s2,int n)1829 static void lp_yy_flex_strncpy( char *s1, lp_yyconst char *s2, int n )
1830 #else
1831 static void lp_yy_flex_strncpy( s1, s2, n )
1832 char *s1;
1833 lp_yyconst char *s2;
1834 int n;
1835 #endif
1836 {
1837 register int i;
1838 for ( i = 0; i < n; ++i )
1839 s1[i] = s2[i];
1840 }
1841 #endif
1842
1843 #ifdef YY_NEED_STRLEN
1844 #ifdef YY_USE_PROTOS
lp_yy_flex_strlen(lp_yyconst char * s)1845 static int lp_yy_flex_strlen( lp_yyconst char *s )
1846 #else
1847 static int lp_yy_flex_strlen( s )
1848 lp_yyconst char *s;
1849 #endif
1850 {
1851 register int n;
1852 for ( n = 0; s[n]; ++n )
1853 ;
1854
1855 return n;
1856 }
1857 #endif
1858
1859
1860 #ifdef YY_USE_PROTOS
lp_yy_flex_alloc(lp_yy_size_t size)1861 static void *lp_yy_flex_alloc( lp_yy_size_t size )
1862 #else
1863 static void *lp_yy_flex_alloc( size )
1864 lp_yy_size_t size;
1865 #endif
1866 {
1867 return (void *) malloc( size );
1868 }
1869
1870 #ifdef YY_USE_PROTOS
lp_yy_flex_realloc(void * ptr,lp_yy_size_t size)1871 static void *lp_yy_flex_realloc( void *ptr, lp_yy_size_t size )
1872 #else
1873 static void *lp_yy_flex_realloc( ptr, size )
1874 void *ptr;
1875 lp_yy_size_t size;
1876 #endif
1877 {
1878 /* The cast to (char *) in the following accommodates both
1879 * implementations that use char* generic pointers, and those
1880 * that use void* generic pointers. It works with the latter
1881 * because both ANSI C and C++ allow castless assignment from
1882 * any pointer type to void*, and deal with argument conversions
1883 * as though doing an assignment.
1884 */
1885 return (void *) realloc( (char *) ptr, size );
1886 }
1887
1888 #ifdef YY_USE_PROTOS
lp_yy_flex_free(void * ptr)1889 static void lp_yy_flex_free( void *ptr )
1890 #else
1891 static void lp_yy_flex_free( ptr )
1892 void *ptr;
1893 #endif
1894 {
1895 free( ptr );
1896 }
1897
1898 #if YY_MAIN
main()1899 int main()
1900 {
1901 lp_yylex();
1902 return 0;
1903 }
1904 #endif
1905
1906