ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-1.0/libBASS/BASSlex.c
Revision: 1348
Committed: Mon Jul 19 16:47:57 2004 UTC (20 years ago) by gezelter
Content type: text/plain
File size: 54520 byte(s)
Log Message:
*** empty log message ***

File Contents

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