24e077fe0e1519136d6bb2f084dfcb4562c49cfc
[Faustine.git] / interpretor / preprocessor / faust-0.9.47mr3 / compiler / parser / faustlexer.cpp
1 #line 2 "parser/faustlexer.cpp"
2
3 #line 4 "parser/faustlexer.cpp"
4
5 #define YY_INT_ALIGNED short int
6
7 /* A lexical scanner generated by flex */
8
9 #define FLEX_SCANNER
10 #define YY_FLEX_MAJOR_VERSION 2
11 #define YY_FLEX_MINOR_VERSION 5
12 #define YY_FLEX_SUBMINOR_VERSION 35
13 #if YY_FLEX_SUBMINOR_VERSION > 0
14 #define FLEX_BETA
15 #endif
16
17 /* First, we deal with platform-specific or compiler-specific issues. */
18
19 /* begin standard C headers. */
20 #include <stdio.h>
21 #include <string.h>
22 #include <errno.h>
23 #include <stdlib.h>
24
25 /* end standard C headers. */
26
27 /* flex integer type definitions */
28
29 #ifndef FLEXINT_H
30 #define FLEXINT_H
31
32 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33
34 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
35
36 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37 * if you want the limit (max/min) macros for int types.
38 */
39 #ifndef __STDC_LIMIT_MACROS
40 #define __STDC_LIMIT_MACROS 1
41 #endif
42
43 #include <inttypes.h>
44 typedef int8_t flex_int8_t;
45 typedef uint8_t flex_uint8_t;
46 typedef int16_t flex_int16_t;
47 typedef uint16_t flex_uint16_t;
48 typedef int32_t flex_int32_t;
49 typedef uint32_t flex_uint32_t;
50 #else
51 typedef signed char flex_int8_t;
52 typedef short int flex_int16_t;
53 typedef int flex_int32_t;
54 typedef unsigned char flex_uint8_t;
55 typedef unsigned short int flex_uint16_t;
56 typedef unsigned int flex_uint32_t;
57
58 /* Limits of integral types. */
59 #ifndef INT8_MIN
60 #define INT8_MIN (-128)
61 #endif
62 #ifndef INT16_MIN
63 #define INT16_MIN (-32767-1)
64 #endif
65 #ifndef INT32_MIN
66 #define INT32_MIN (-2147483647-1)
67 #endif
68 #ifndef INT8_MAX
69 #define INT8_MAX (127)
70 #endif
71 #ifndef INT16_MAX
72 #define INT16_MAX (32767)
73 #endif
74 #ifndef INT32_MAX
75 #define INT32_MAX (2147483647)
76 #endif
77 #ifndef UINT8_MAX
78 #define UINT8_MAX (255U)
79 #endif
80 #ifndef UINT16_MAX
81 #define UINT16_MAX (65535U)
82 #endif
83 #ifndef UINT32_MAX
84 #define UINT32_MAX (4294967295U)
85 #endif
86
87 #endif /* ! C99 */
88
89 #endif /* ! FLEXINT_H */
90
91 #ifdef __cplusplus
92
93 /* The "const" storage-class-modifier is valid. */
94 #define YY_USE_CONST
95
96 #else /* ! __cplusplus */
97
98 /* C99 requires __STDC__ to be defined as 1. */
99 #if defined (__STDC__)
100
101 #define YY_USE_CONST
102
103 #endif /* defined (__STDC__) */
104 #endif /* ! __cplusplus */
105
106 #ifdef YY_USE_CONST
107 #define yyconst const
108 #else
109 #define yyconst
110 #endif
111
112 /* Returned upon end-of-file. */
113 #define YY_NULL 0
114
115 /* Promotes a possibly negative, possibly signed char to an unsigned
116 * integer for use as an array index. If the signed char is negative,
117 * we want to instead treat it as an 8-bit unsigned char, hence the
118 * double cast.
119 */
120 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
121
122 /* Enter a start condition. This macro really ought to take a parameter,
123 * but we do it the disgusting crufty way forced on us by the ()-less
124 * definition of BEGIN.
125 */
126 #define BEGIN (yy_start) = 1 + 2 *
127
128 /* Translate the current start state into a value that can be later handed
129 * to BEGIN to return to the state. The YYSTATE alias is for lex
130 * compatibility.
131 */
132 #define YY_START (((yy_start) - 1) / 2)
133 #define YYSTATE YY_START
134
135 /* Action number for EOF rule of a given start state. */
136 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
137
138 /* Special action meaning "start processing a new file". */
139 #define YY_NEW_FILE yyrestart(yyin )
140
141 #define YY_END_OF_BUFFER_CHAR 0
142
143 /* Size of default input buffer. */
144 #ifndef YY_BUF_SIZE
145 #ifdef __ia64__
146 /* On IA-64, the buffer size is 16k, not 8k.
147 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
148 * Ditto for the __ia64__ case accordingly.
149 */
150 #define YY_BUF_SIZE 32768
151 #else
152 #define YY_BUF_SIZE 16384
153 #endif /* __ia64__ */
154 #endif
155
156 /* The state buf must be large enough to hold one state per character in the main buffer.
157 */
158 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
159
160 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
161 #define YY_TYPEDEF_YY_BUFFER_STATE
162 typedef struct yy_buffer_state *YY_BUFFER_STATE;
163 #endif
164
165 extern int yyleng;
166
167 extern FILE *yyin, *yyout;
168
169 #define EOB_ACT_CONTINUE_SCAN 0
170 #define EOB_ACT_END_OF_FILE 1
171 #define EOB_ACT_LAST_MATCH 2
172
173 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
174 * access to the local variable yy_act. Since yyless() is a macro, it would break
175 * existing scanners that call yyless() from OUTSIDE yylex.
176 * One obvious solution it to make yy_act a global. I tried that, and saw
177 * a 5% performance hit in a non-yylineno scanner, because yy_act is
178 * normally declared as a register variable-- so it is not worth it.
179 */
180 #define YY_LESS_LINENO(n) \
181 do { \
182 int yyl;\
183 for ( yyl = n; yyl < yyleng; ++yyl )\
184 if ( yytext[yyl] == '\n' )\
185 --yylineno;\
186 }while(0)
187
188 /* Return all but the first "n" matched characters back to the input stream. */
189 #define yyless(n) \
190 do \
191 { \
192 /* Undo effects of setting up yytext. */ \
193 int yyless_macro_arg = (n); \
194 YY_LESS_LINENO(yyless_macro_arg);\
195 *yy_cp = (yy_hold_char); \
196 YY_RESTORE_YY_MORE_OFFSET \
197 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
198 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
199 } \
200 while ( 0 )
201
202 #define unput(c) yyunput( c, (yytext_ptr) )
203
204 #ifndef YY_TYPEDEF_YY_SIZE_T
205 #define YY_TYPEDEF_YY_SIZE_T
206 typedef size_t yy_size_t;
207 #endif
208
209 #ifndef YY_STRUCT_YY_BUFFER_STATE
210 #define YY_STRUCT_YY_BUFFER_STATE
211 struct yy_buffer_state
212 {
213 FILE *yy_input_file;
214
215 char *yy_ch_buf; /* input buffer */
216 char *yy_buf_pos; /* current position in input buffer */
217
218 /* Size of input buffer in bytes, not including room for EOB
219 * characters.
220 */
221 yy_size_t yy_buf_size;
222
223 /* Number of characters read into yy_ch_buf, not including EOB
224 * characters.
225 */
226 int yy_n_chars;
227
228 /* Whether we "own" the buffer - i.e., we know we created it,
229 * and can realloc() it to grow it, and should free() it to
230 * delete it.
231 */
232 int yy_is_our_buffer;
233
234 /* Whether this is an "interactive" input source; if so, and
235 * if we're using stdio for input, then we want to use getc()
236 * instead of fread(), to make sure we stop fetching input after
237 * each newline.
238 */
239 int yy_is_interactive;
240
241 /* Whether we're considered to be at the beginning of a line.
242 * If so, '^' rules will be active on the next match, otherwise
243 * not.
244 */
245 int yy_at_bol;
246
247 int yy_bs_lineno; /**< The line count. */
248 int yy_bs_column; /**< The column count. */
249
250 /* Whether to try to fill the input buffer when we reach the
251 * end of it.
252 */
253 int yy_fill_buffer;
254
255 int yy_buffer_status;
256
257 #define YY_BUFFER_NEW 0
258 #define YY_BUFFER_NORMAL 1
259 /* When an EOF's been seen but there's still some text to process
260 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
261 * shouldn't try reading from the input source any more. We might
262 * still have a bunch of tokens to match, though, because of
263 * possible backing-up.
264 *
265 * When we actually see the EOF, we change the status to "new"
266 * (via yyrestart()), so that the user can continue scanning by
267 * just pointing yyin at a new input file.
268 */
269 #define YY_BUFFER_EOF_PENDING 2
270
271 };
272 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
273
274 /* Stack of input buffers. */
275 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
276 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
277 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
278
279 /* We provide macros for accessing buffer states in case in the
280 * future we want to put the buffer states in a more general
281 * "scanner state".
282 *
283 * Returns the top of the stack, or NULL.
284 */
285 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
286 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
287 : NULL)
288
289 /* Same as previous macro, but useful when we know that the buffer stack is not
290 * NULL or when we need an lvalue. For internal use only.
291 */
292 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
293
294 /* yy_hold_char holds the character lost when yytext is formed. */
295 static char yy_hold_char;
296 static int yy_n_chars; /* number of characters read into yy_ch_buf */
297 int yyleng;
298
299 /* Points to current character in buffer. */
300 static char *yy_c_buf_p = (char *) 0;
301 static int yy_init = 0; /* whether we need to initialize */
302 static int yy_start = 0; /* start state number */
303
304 /* Flag which is used to allow yywrap()'s to do buffer switches
305 * instead of setting up a fresh yyin. A bit of a hack ...
306 */
307 static int yy_did_buffer_switch_on_eof;
308
309 void yyrestart (FILE *input_file );
310 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
311 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
312 void yy_delete_buffer (YY_BUFFER_STATE b );
313 void yy_flush_buffer (YY_BUFFER_STATE b );
314 void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
315 void yypop_buffer_state (void );
316
317 static void yyensure_buffer_stack (void );
318 static void yy_load_buffer_state (void );
319 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
320
321 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
322
323 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
324 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
325 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
326
327 void *yyalloc (yy_size_t );
328 void *yyrealloc (void *,yy_size_t );
329 void yyfree (void * );
330
331 #define yy_new_buffer yy_create_buffer
332
333 #define yy_set_interactive(is_interactive) \
334 { \
335 if ( ! YY_CURRENT_BUFFER ){ \
336 yyensure_buffer_stack (); \
337 YY_CURRENT_BUFFER_LVALUE = \
338 yy_create_buffer(yyin,YY_BUF_SIZE ); \
339 } \
340 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
341 }
342
343 #define yy_set_bol(at_bol) \
344 { \
345 if ( ! YY_CURRENT_BUFFER ){\
346 yyensure_buffer_stack (); \
347 YY_CURRENT_BUFFER_LVALUE = \
348 yy_create_buffer(yyin,YY_BUF_SIZE ); \
349 } \
350 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
351 }
352
353 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
354
355 /* Begin user sect3 */
356
357 typedef unsigned char YY_CHAR;
358
359 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
360
361 typedef int yy_state_type;
362
363 extern int yylineno;
364
365 int yylineno = 1;
366
367 extern char *yytext;
368 #define yytext_ptr yytext
369
370 static yy_state_type yy_get_previous_state (void );
371 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
372 static int yy_get_next_buffer (void );
373 static void yy_fatal_error (yyconst char msg[] );
374
375 /* Done after the current pattern has been matched and before the
376 * corresponding action - sets up yytext.
377 */
378 #define YY_DO_BEFORE_ACTION \
379 (yytext_ptr) = yy_bp; \
380 yyleng = (size_t) (yy_cp - yy_bp); \
381 (yy_hold_char) = *yy_cp; \
382 *yy_cp = '\0'; \
383 (yy_c_buf_p) = yy_cp;
384
385 #define YY_NUM_RULES 140
386 #define YY_END_OF_BUFFER 141
387 /* This struct is not used in this scanner,
388 but its presence is necessary. */
389 struct yy_trans_info
390 {
391 flex_int32_t yy_verify;
392 flex_int32_t yy_nxt;
393 };
394 static yyconst flex_int16_t yy_accept[482] =
395 { 0,
396 0, 0, 2, 2, 0, 0, 0, 0, 141, 139,
397 138, 138, 60, 139, 126, 45, 48, 47, 63, 64,
398 43, 41, 36, 42, 70, 44, 29, 35, 61, 53,
399 62, 55, 46, 133, 67, 69, 68, 104, 59, 133,
400 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
401 133, 133, 133, 133, 133, 133, 133, 133, 65, 49,
402 66, 40, 2, 5, 6, 3, 9, 10, 9, 140,
403 27, 140, 26, 140, 140, 140, 140, 138, 58, 0,
404 134, 38, 33, 1, 137, 30, 29, 0, 39, 0,
405 0, 37, 51, 54, 136, 0, 0, 57, 131, 56,
406
407 52, 133, 132, 133, 133, 133, 133, 133, 133, 133,
408 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
409 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
410 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
411 133, 133, 133, 133, 133, 133, 128, 133, 133, 133,
412 133, 133, 133, 2, 4, 3, 3, 7, 0, 0,
413 0, 0, 0, 0, 28, 0, 0, 0, 0, 0,
414 0, 137, 30, 0, 0, 32, 0, 0, 0, 0,
415 0, 132, 107, 133, 133, 133, 133, 133, 133, 133,
416 133, 133, 98, 133, 133, 133, 101, 133, 133, 133,
417
418 133, 133, 133, 133, 133, 133, 74, 133, 102, 109,
419 72, 108, 133, 116, 105, 133, 133, 133, 133, 133,
420 133, 133, 133, 115, 133, 99, 133, 117, 100, 133,
421 133, 133, 133, 133, 133, 50, 0, 0, 0, 0,
422 0, 0, 0, 0, 0, 0, 0, 0, 34, 0,
423 31, 135, 0, 0, 0, 0, 94, 95, 96, 133,
424 133, 130, 113, 133, 133, 133, 129, 133, 133, 133,
425 133, 133, 110, 133, 133, 133, 133, 133, 133, 133,
426 133, 133, 118, 127, 133, 133, 114, 133, 133, 133,
427 106, 133, 133, 133, 133, 133, 71, 0, 0, 0,
428
429 0, 0, 0, 0, 0, 0, 0, 21, 0, 0,
430 0, 0, 97, 133, 133, 133, 133, 133, 133, 133,
431 133, 75, 112, 133, 133, 133, 133, 133, 133, 103,
432 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
433 133, 133, 0, 0, 0, 0, 0, 0, 0, 0,
434 22, 0, 0, 0, 0, 8, 93, 83, 133, 133,
435 133, 133, 133, 133, 133, 133, 89, 133, 119, 133,
436 87, 73, 133, 133, 133, 133, 133, 90, 133, 133,
437 88, 133, 0, 0, 0, 0, 0, 0, 0, 0,
438 0, 0, 0, 0, 133, 133, 123, 133, 133, 133,
439
440 133, 133, 86, 121, 76, 133, 77, 78, 79, 133,
441 133, 133, 85, 20, 0, 0, 0, 0, 0, 0,
442 0, 0, 0, 0, 0, 84, 133, 133, 133, 133,
443 133, 133, 133, 133, 133, 133, 0, 0, 13, 0,
444 0, 0, 0, 0, 24, 0, 0, 0, 120, 133,
445 81, 80, 82, 92, 111, 124, 91, 125, 16, 0,
446 0, 0, 11, 0, 0, 17, 0, 0, 133, 14,
447 18, 12, 0, 0, 15, 19, 122, 0, 25, 23,
448 0
449 } ;
450
451 static yyconst flex_int32_t yy_ec[256] =
452 { 0,
453 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
454 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
455 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
456 1, 5, 6, 7, 8, 1, 9, 10, 11, 12,
457 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
458 23, 24, 24, 24, 24, 24, 24, 25, 26, 27,
459 28, 29, 1, 30, 31, 31, 31, 31, 31, 31,
460 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
461 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
462 32, 33, 34, 35, 36, 1, 37, 38, 39, 40,
463
464 41, 42, 43, 44, 45, 31, 46, 47, 48, 49,
465 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
466 60, 61, 62, 63, 64, 65, 1, 1, 1, 1,
467 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
468 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
469 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
470 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
471 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
472 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
473 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
474
475 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
476 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
477 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
478 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
479 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
480 1, 1, 1, 1, 1
481 } ;
482
483 static yyconst flex_int32_t yy_meta[66] =
484 { 0,
485 1, 1, 2, 2, 1, 1, 1, 1, 1, 1,
486 1, 1, 1, 3, 1, 1, 1, 4, 4, 5,
487 5, 5, 5, 5, 4, 1, 4, 4, 4, 1,
488 6, 1, 1, 1, 1, 5, 6, 6, 6, 6,
489 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
490 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
491 6, 1, 1, 1, 1
492 } ;
493
494 static yyconst flex_int16_t yy_base[494] =
495 { 0,
496 0, 0, 63, 65, 67, 68, 65, 68, 627, 628,
497 78, 86, 598, 618, 628, 628, 628, 628, 628, 628,
498 628, 595, 628, 628, 77, 59, 104, 594, 628, 111,
499 57, 74, 628, 0, 628, 628, 628, 628, 0, 79,
500 566, 100, 65, 55, 104, 104, 63, 103, 119, 580,
501 82, 125, 122, 112, 569, 130, 574, 568, 628, 628,
502 628, 628, 0, 613, 628, 158, 628, 628, 150, 628,
503 628, 587, 628, 134, 578, 574, 560, 183, 628, 605,
504 628, 628, 172, 628, 0, 180, 187, 202, 628, 0,
505 141, 628, 628, 628, 628, 211, 571, 628, 628, 628,
506
507 628, 0, 0, 556, 559, 563, 37, 552, 552, 560,
508 563, 158, 564, 544, 544, 549, 549, 542, 547, 546,
509 558, 557, 540, 545, 540, 535, 551, 545, 528, 538,
510 536, 535, 530, 524, 177, 526, 525, 531, 529, 522,
511 190, 527, 522, 526, 524, 519, 0, 534, 531, 516,
512 521, 512, 513, 0, 628, 201, 227, 628, 517, 519,
513 511, 517, 520, 510, 628, 508, 504, 510, 506, 499,
514 230, 0, 235, 245, 211, 250, 525, 508, 500, 510,
515 500, 0, 0, 495, 499, 498, 509, 490, 503, 496,
516 503, 490, 0, 493, 490, 493, 0, 488, 487, 211,
517
518 495, 481, 480, 482, 486, 480, 0, 476, 507, 0,
519 0, 0, 472, 0, 0, 484, 485, 483, 486, 485,
520 466, 483, 478, 0, 473, 0, 462, 0, 0, 466,
521 462, 459, 463, 467, 467, 0, 470, 472, 452, 453,
522 451, 450, 463, 448, 448, 462, 459, 257, 262, 267,
523 272, 628, 462, 442, 442, 457, 0, 0, 473, 455,
524 443, 0, 0, 446, 441, 453, 0, 436, 434, 448,
525 431, 432, 0, 439, 440, 426, 441, 427, 442, 458,
526 424, 431, 0, 0, 437, 429, 0, 435, 433, 434,
527 0, 414, 426, 418, 411, 426, 0, 415, 421, 426,
528
529 407, 424, 415, 410, 405, 416, 401, 628, 412, 417,
530 416, 423, 0, 407, 401, 411, 399, 394, 396, 390,
531 389, 0, 0, 406, 389, 390, 399, 384, 385, 0,
532 377, 377, 388, 385, 386, 377, 384, 379, 376, 375,
533 376, 385, 386, 371, 368, 377, 381, 381, 379, 373,
534 628, 380, 363, 360, 374, 628, 0, 0, 363, 371,
535 370, 361, 372, 363, 369, 369, 0, 352, 0, 344,
536 0, 0, 362, 362, 360, 241, 355, 0, 362, 353,
537 0, 344, 367, 358, 349, 344, 355, 350, 349, 351,
538 345, 350, 341, 348, 325, 334, 0, 334, 332, 330,
539
540 332, 327, 0, 0, 0, 336, 0, 0, 0, 315,
541 324, 313, 0, 628, 325, 322, 328, 315, 292, 320,
542 312, 313, 318, 315, 309, 0, 308, 321, 306, 305,
543 307, 299, 289, 296, 266, 268, 279, 258, 628, 269,
544 286, 275, 264, 247, 628, 272, 251, 262, 0, 249,
545 0, 0, 0, 0, 0, 0, 0, 0, 628, 246,
546 220, 215, 628, 171, 173, 628, 151, 147, 102, 628,
547 628, 628, 113, 91, 628, 628, 0, 67, 628, 628,
548 628, 311, 317, 323, 329, 332, 334, 103, 340, 346,
549 352, 70, 354
550
551 } ;
552
553 static yyconst flex_int16_t yy_def[494] =
554 { 0,
555 481, 1, 482, 482, 483, 483, 484, 484, 481, 481,
556 481, 481, 481, 485, 481, 481, 481, 481, 481, 481,
557 481, 481, 481, 481, 481, 481, 481, 481, 481, 486,
558 481, 481, 481, 487, 481, 481, 481, 481, 488, 487,
559 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
560 487, 487, 487, 487, 487, 487, 487, 487, 481, 481,
561 481, 481, 489, 481, 481, 490, 481, 481, 481, 481,
562 481, 481, 481, 481, 481, 481, 481, 481, 481, 485,
563 481, 481, 481, 481, 491, 481, 481, 481, 481, 492,
564 481, 481, 481, 481, 481, 486, 96, 481, 481, 481,
565
566 481, 487, 493, 487, 487, 487, 487, 487, 487, 487,
567 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
568 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
569 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
570 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
571 487, 487, 487, 489, 481, 490, 490, 481, 481, 481,
572 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
573 481, 491, 481, 481, 481, 481, 481, 481, 481, 481,
574 96, 493, 487, 487, 487, 487, 487, 487, 487, 487,
575 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
576
577 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
578 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
579 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
580 487, 487, 487, 487, 487, 487, 481, 481, 481, 481,
581 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
582 481, 481, 481, 481, 481, 96, 487, 487, 487, 487,
583 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
584 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
585 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
586 487, 487, 487, 487, 487, 487, 487, 481, 481, 481,
587
588 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
589 481, 96, 487, 487, 487, 487, 487, 487, 487, 487,
590 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
591 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
592 487, 487, 481, 481, 481, 481, 481, 481, 481, 481,
593 481, 481, 481, 481, 481, 481, 487, 487, 487, 487,
594 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
595 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
596 487, 487, 481, 481, 481, 481, 481, 481, 481, 481,
597 481, 481, 481, 481, 487, 487, 487, 487, 487, 487,
598
599 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
600 487, 487, 487, 481, 481, 481, 481, 481, 481, 481,
601 481, 481, 481, 481, 481, 487, 487, 487, 487, 487,
602 487, 487, 487, 487, 487, 487, 481, 481, 481, 481,
603 481, 481, 481, 481, 481, 481, 481, 481, 487, 487,
604 487, 487, 487, 487, 487, 487, 487, 487, 481, 481,
605 481, 481, 481, 481, 481, 481, 481, 481, 487, 481,
606 481, 481, 481, 481, 481, 481, 487, 481, 481, 481,
607 0, 481, 481, 481, 481, 481, 481, 481, 481, 481,
608 481, 481, 481
609
610 } ;
611
612 static yyconst flex_int16_t yy_nxt[694] =
613 { 0,
614 10, 11, 12, 11, 11, 13, 14, 15, 16, 17,
615 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
616 27, 27, 27, 27, 28, 29, 30, 31, 32, 33,
617 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
618 44, 45, 34, 46, 47, 34, 48, 49, 50, 34,
619 51, 34, 52, 53, 54, 55, 56, 57, 58, 34,
620 34, 59, 60, 61, 62, 64, 65, 64, 65, 68,
621 68, 71, 84, 186, 71, 177, 66, 85, 66, 78,
622 78, 78, 78, 72, 98, 99, 72, 78, 78, 78,
623 78, 187, 73, 69, 69, 73, 83, 83, 83, 83,
624
625 83, 100, 101, 115, 74, 113, 75, 74, 103, 75,
626 125, 126, 76, 116, 114, 76, 104, 105, 133, 77,
627 480, 86, 77, 87, 87, 87, 87, 87, 90, 91,
628 479, 134, 106, 107, 135, 92, 109, 93, 94, 95,
629 110, 122, 117, 111, 88, 118, 123, 127, 145, 112,
630 119, 120, 128, 478, 146, 129, 477, 124, 97, 130,
631 121, 136, 141, 131, 137, 138, 142, 148, 159, 139,
632 149, 157, 150, 143, 166, 476, 158, 144, 167, 475,
633 178, 179, 140, 151, 78, 78, 78, 78, 180, 160,
634 161, 83, 83, 83, 83, 83, 162, 163, 164, 173,
635
636 173, 173, 173, 173, 86, 192, 87, 87, 87, 87,
637 87, 193, 171, 474, 481, 473, 175, 216, 175, 481,
638 174, 176, 176, 176, 176, 176, 217, 88, 90, 481,
639 176, 176, 176, 176, 176, 481, 223, 481, 481, 95,
640 157, 224, 225, 472, 248, 158, 248, 271, 471, 249,
641 249, 249, 249, 249, 173, 173, 173, 173, 173, 250,
642 272, 250, 408, 409, 251, 251, 251, 251, 251, 176,
643 176, 176, 176, 176, 470, 174, 249, 249, 249, 249,
644 249, 249, 249, 249, 249, 249, 251, 251, 251, 251,
645 251, 251, 251, 251, 251, 251, 441, 469, 468, 467,
646
647 466, 465, 464, 463, 462, 461, 460, 459, 458, 457,
648 442, 63, 63, 63, 63, 63, 63, 67, 67, 67,
649 67, 67, 67, 70, 70, 70, 70, 70, 70, 80,
650 80, 80, 80, 80, 80, 96, 456, 96, 102, 102,
651 154, 455, 454, 154, 154, 154, 156, 453, 156, 156,
652 156, 156, 172, 452, 172, 172, 172, 172, 182, 182,
653 451, 450, 449, 448, 447, 446, 445, 444, 443, 440,
654 439, 438, 437, 436, 435, 434, 433, 432, 431, 430,
655 429, 428, 427, 426, 425, 424, 423, 422, 421, 420,
656 419, 418, 417, 416, 415, 414, 413, 412, 411, 410,
657
658 407, 406, 405, 404, 403, 402, 401, 400, 399, 398,
659 397, 396, 395, 394, 393, 392, 391, 390, 389, 388,
660 387, 386, 385, 384, 383, 382, 381, 380, 379, 378,
661 377, 376, 375, 374, 373, 372, 371, 370, 369, 368,
662 367, 366, 365, 364, 363, 362, 361, 360, 359, 358,
663 357, 356, 355, 354, 353, 352, 351, 350, 349, 348,
664 347, 346, 345, 344, 343, 342, 341, 340, 339, 338,
665 337, 336, 335, 334, 333, 332, 331, 330, 329, 328,
666 327, 326, 325, 324, 323, 322, 321, 320, 319, 318,
667 317, 316, 315, 314, 313, 312, 311, 310, 309, 308,
668
669 307, 306, 305, 304, 303, 302, 301, 300, 299, 298,
670 297, 296, 295, 294, 293, 292, 291, 290, 289, 288,
671 287, 286, 285, 284, 283, 282, 281, 280, 279, 278,
672 277, 276, 275, 274, 273, 270, 269, 268, 267, 266,
673 265, 264, 263, 262, 261, 260, 259, 258, 257, 256,
674 255, 254, 253, 252, 247, 246, 245, 244, 243, 242,
675 241, 240, 239, 238, 237, 236, 235, 234, 233, 232,
676 231, 230, 229, 228, 227, 226, 222, 221, 220, 219,
677 218, 215, 214, 213, 212, 211, 210, 209, 208, 207,
678 206, 205, 204, 203, 202, 201, 200, 199, 198, 197,
679
680 196, 195, 194, 191, 190, 189, 188, 185, 184, 183,
681 181, 81, 170, 169, 168, 165, 155, 153, 152, 147,
682 132, 108, 89, 82, 81, 79, 481, 9, 481, 481,
683 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
684 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
685 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
686 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
687 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
688 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
689 481, 481, 481
690
691 } ;
692
693 static yyconst flex_int16_t yy_chk[694] =
694 { 0,
695 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
696 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
697 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
698 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
699 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
700 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
701 1, 1, 1, 1, 1, 3, 3, 4, 4, 5,
702 6, 7, 26, 107, 8, 492, 3, 26, 4, 11,
703 11, 11, 11, 7, 31, 31, 8, 12, 12, 12,
704 12, 107, 7, 5, 6, 8, 25, 25, 25, 25,
705
706 25, 32, 32, 44, 7, 43, 7, 8, 488, 8,
707 47, 47, 7, 44, 43, 8, 40, 40, 51, 7,
708 478, 27, 8, 27, 27, 27, 27, 27, 30, 30,
709 474, 51, 40, 40, 51, 30, 42, 30, 30, 30,
710 42, 46, 45, 42, 27, 45, 46, 48, 54, 42,
711 45, 45, 48, 473, 54, 49, 469, 46, 30, 49,
712 45, 52, 53, 49, 52, 52, 53, 56, 69, 52,
713 56, 66, 56, 53, 74, 468, 66, 53, 74, 467,
714 91, 91, 52, 56, 78, 78, 78, 78, 91, 69,
715 69, 83, 83, 83, 83, 83, 69, 69, 69, 86,
716
717 86, 86, 86, 86, 87, 112, 87, 87, 87, 87,
718 87, 112, 83, 465, 156, 464, 88, 135, 88, 156,
719 86, 88, 88, 88, 88, 88, 135, 87, 96, 96,
720 175, 175, 175, 175, 175, 96, 141, 96, 96, 96,
721 157, 141, 141, 462, 171, 157, 171, 200, 461, 171,
722 171, 171, 171, 171, 173, 173, 173, 173, 173, 174,
723 200, 174, 376, 376, 174, 174, 174, 174, 174, 176,
724 176, 176, 176, 176, 460, 173, 248, 248, 248, 248,
725 248, 249, 249, 249, 249, 249, 250, 250, 250, 250,
726 250, 251, 251, 251, 251, 251, 419, 450, 448, 447,
727
728 446, 444, 443, 442, 441, 440, 438, 437, 436, 435,
729 419, 482, 482, 482, 482, 482, 482, 483, 483, 483,
730 483, 483, 483, 484, 484, 484, 484, 484, 484, 485,
731 485, 485, 485, 485, 485, 486, 434, 486, 487, 487,
732 489, 433, 432, 489, 489, 489, 490, 431, 490, 490,
733 490, 490, 491, 430, 491, 491, 491, 491, 493, 493,
734 429, 428, 427, 425, 424, 423, 422, 421, 420, 418,
735 417, 416, 415, 412, 411, 410, 406, 402, 401, 400,
736 399, 398, 396, 395, 394, 393, 392, 391, 390, 389,
737 388, 387, 386, 385, 384, 383, 382, 380, 379, 377,
738
739 375, 374, 373, 370, 368, 366, 365, 364, 363, 362,
740 361, 360, 359, 355, 354, 353, 352, 350, 349, 348,
741 347, 346, 345, 344, 343, 342, 341, 340, 339, 338,
742 337, 336, 335, 334, 333, 332, 331, 329, 328, 327,
743 326, 325, 324, 321, 320, 319, 318, 317, 316, 315,
744 314, 312, 311, 310, 309, 307, 306, 305, 304, 303,
745 302, 301, 300, 299, 298, 296, 295, 294, 293, 292,
746 290, 289, 288, 286, 285, 282, 281, 280, 279, 278,
747 277, 276, 275, 274, 272, 271, 270, 269, 268, 266,
748 265, 264, 261, 260, 259, 256, 255, 254, 253, 247,
749
750 246, 245, 244, 243, 242, 241, 240, 239, 238, 237,
751 235, 234, 233, 232, 231, 230, 227, 225, 223, 222,
752 221, 220, 219, 218, 217, 216, 213, 209, 208, 206,
753 205, 204, 203, 202, 201, 199, 198, 196, 195, 194,
754 192, 191, 190, 189, 188, 187, 186, 185, 184, 181,
755 180, 179, 178, 177, 170, 169, 168, 167, 166, 164,
756 163, 162, 161, 160, 159, 153, 152, 151, 150, 149,
757 148, 146, 145, 144, 143, 142, 140, 139, 138, 137,
758 136, 134, 133, 132, 131, 130, 129, 128, 127, 126,
759 125, 124, 123, 122, 121, 120, 119, 118, 117, 116,
760
761 115, 114, 113, 111, 110, 109, 108, 106, 105, 104,
762 97, 80, 77, 76, 75, 72, 64, 58, 57, 55,
763 50, 41, 28, 22, 14, 13, 9, 481, 481, 481,
764 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
765 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
766 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
767 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
768 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
769 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
770 481, 481, 481
771
772 } ;
773
774 /* Table of booleans, true if rule could match eol. */
775 static yyconst flex_int32_t yy_rule_can_match_eol[141] =
776 { 0,
777 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
778 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
779 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
780 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
781 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
782 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
783 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0,
784 0, };
785
786 static yy_state_type yy_last_accepting_state;
787 static char *yy_last_accepting_cpos;
788
789 extern int yy_flex_debug;
790 int yy_flex_debug = 0;
791
792 /* The intent behind this definition is that it'll catch
793 * any uses of REJECT which flex missed.
794 */
795 #define REJECT reject_used_but_not_detected
796 #define yymore() yymore_used_but_not_detected
797 #define YY_MORE_ADJ 0
798 #define YY_RESTORE_YY_MORE_OFFSET
799 char *yytext;
800 #line 1 "parser/faustlexer.l"
801 /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4 -*- */
802 /* Scanner for the Faust language */
803 #line 6 "parser/faustlexer.l"
804 #include "tree.hh"
805 #include "faustparser.hpp"
806 #define YY_NO_UNISTD_H 1
807 extern int isatty (int );
808
809
810
811 #line 812 "parser/faustlexer.cpp"
812
813 #define INITIAL 0
814 #define comment 1
815 #define doc 2
816 #define lst 3
817
818 #ifndef YY_NO_UNISTD_H
819 /* Special case for "unistd.h", since it is non-ANSI. We include it way
820 * down here because we want the user's section 1 to have been scanned first.
821 * The user has a chance to override it with an option.
822 */
823 #include <unistd.h>
824 #endif
825
826 #ifndef YY_EXTRA_TYPE
827 #define YY_EXTRA_TYPE void *
828 #endif
829
830 static int yy_init_globals (void );
831
832 /* Accessor methods to globals.
833 These are made visible to non-reentrant scanners for convenience. */
834
835 int yylex_destroy (void );
836
837 int yyget_debug (void );
838
839 void yyset_debug (int debug_flag );
840
841 YY_EXTRA_TYPE yyget_extra (void );
842
843 void yyset_extra (YY_EXTRA_TYPE user_defined );
844
845 FILE *yyget_in (void );
846
847 void yyset_in (FILE * in_str );
848
849 FILE *yyget_out (void );
850
851 void yyset_out (FILE * out_str );
852
853 int yyget_leng (void );
854
855 char *yyget_text (void );
856
857 int yyget_lineno (void );
858
859 void yyset_lineno (int line_number );
860
861 /* Macros after this point can all be overridden by user definitions in
862 * section 1.
863 */
864
865 #ifndef YY_SKIP_YYWRAP
866 #ifdef __cplusplus
867 extern "C" int yywrap (void );
868 #else
869 extern int yywrap (void );
870 #endif
871 #endif
872
873 static void yyunput (int c,char *buf_ptr );
874
875 #ifndef yytext_ptr
876 static void yy_flex_strncpy (char *,yyconst char *,int );
877 #endif
878
879 #ifdef YY_NEED_STRLEN
880 static int yy_flex_strlen (yyconst char * );
881 #endif
882
883 #ifndef YY_NO_INPUT
884
885 #ifdef __cplusplus
886 static int yyinput (void );
887 #else
888 static int input (void );
889 #endif
890
891 #endif
892
893 /* Amount of stuff to slurp up with each read. */
894 #ifndef YY_READ_BUF_SIZE
895 #ifdef __ia64__
896 /* On IA-64, the buffer size is 16k, not 8k */
897 #define YY_READ_BUF_SIZE 16384
898 #else
899 #define YY_READ_BUF_SIZE 8192
900 #endif /* __ia64__ */
901 #endif
902
903 /* Copy whatever the last rule matched to the standard output. */
904 #ifndef ECHO
905 /* This used to be an fputs(), but since the string might contain NUL's,
906 * we now use fwrite().
907 */
908 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
909 #endif
910
911 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
912 * is returned in "result".
913 */
914 #ifndef YY_INPUT
915 #define YY_INPUT(buf,result,max_size) \
916 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
917 { \
918 int c = '*'; \
919 size_t n; \
920 for ( n = 0; n < max_size && \
921 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
922 buf[n] = (char) c; \
923 if ( c == '\n' ) \
924 buf[n++] = (char) c; \
925 if ( c == EOF && ferror( yyin ) ) \
926 YY_FATAL_ERROR( "input in flex scanner failed" ); \
927 result = n; \
928 } \
929 else \
930 { \
931 errno=0; \
932 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
933 { \
934 if( errno != EINTR) \
935 { \
936 YY_FATAL_ERROR( "input in flex scanner failed" ); \
937 break; \
938 } \
939 errno=0; \
940 clearerr(yyin); \
941 } \
942 }\
943 \
944
945 #endif
946
947 /* No semi-colon after return; correct usage is to write "yyterminate();" -
948 * we don't want an extra ';' after the "return" because that will cause
949 * some compilers to complain about unreachable statements.
950 */
951 #ifndef yyterminate
952 #define yyterminate() return YY_NULL
953 #endif
954
955 /* Number of entries by which start-condition stack grows. */
956 #ifndef YY_START_STACK_INCR
957 #define YY_START_STACK_INCR 25
958 #endif
959
960 /* Report a fatal error. */
961 #ifndef YY_FATAL_ERROR
962 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
963 #endif
964
965 /* end tables serialization structures and prototypes */
966
967 /* Default declaration of generated scanner - a define so the user can
968 * easily add parameters.
969 */
970 #ifndef YY_DECL
971 #define YY_DECL_IS_OURS 1
972
973 extern int yylex (void);
974
975 #define YY_DECL int yylex (void)
976 #endif /* !YY_DECL */
977
978 /* Code executed at the beginning of each rule, after yytext and yyleng
979 * have been set up.
980 */
981 #ifndef YY_USER_ACTION
982 #define YY_USER_ACTION
983 #endif
984
985 /* Code executed at the end of each rule. */
986 #ifndef YY_BREAK
987 #define YY_BREAK break;
988 #endif
989
990 #define YY_RULE_SETUP \
991 YY_USER_ACTION
992
993 /** The main scanner function which does all the work.
994 */
995 YY_DECL
996 {
997 register yy_state_type yy_current_state;
998 register char *yy_cp, *yy_bp;
999 register int yy_act;
1000
1001 #line 25 "parser/faustlexer.l"
1002
1003
1004
1005 #line 1006 "parser/faustlexer.cpp"
1006
1007 if ( !(yy_init) )
1008 {
1009 (yy_init) = 1;
1010
1011 #ifdef YY_USER_INIT
1012 YY_USER_INIT;
1013 #endif
1014
1015 if ( ! (yy_start) )
1016 (yy_start) = 1; /* first start state */
1017
1018 if ( ! yyin )
1019 yyin = stdin;
1020
1021 if ( ! yyout )
1022 yyout = stdout;
1023
1024 if ( ! YY_CURRENT_BUFFER ) {
1025 yyensure_buffer_stack ();
1026 YY_CURRENT_BUFFER_LVALUE =
1027 yy_create_buffer(yyin,YY_BUF_SIZE );
1028 }
1029
1030 yy_load_buffer_state( );
1031 }
1032
1033 while ( 1 ) /* loops until end-of-file is reached */
1034 {
1035 yy_cp = (yy_c_buf_p);
1036
1037 /* Support of yytext. */
1038 *yy_cp = (yy_hold_char);
1039
1040 /* yy_bp points to the position in yy_ch_buf of the start of
1041 * the current run.
1042 */
1043 yy_bp = yy_cp;
1044
1045 yy_current_state = (yy_start);
1046 yy_match:
1047 do
1048 {
1049 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1050 if ( yy_accept[yy_current_state] )
1051 {
1052 (yy_last_accepting_state) = yy_current_state;
1053 (yy_last_accepting_cpos) = yy_cp;
1054 }
1055 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1056 {
1057 yy_current_state = (int) yy_def[yy_current_state];
1058 if ( yy_current_state >= 482 )
1059 yy_c = yy_meta[(unsigned int) yy_c];
1060 }
1061 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1062 ++yy_cp;
1063 }
1064 while ( yy_base[yy_current_state] != 628 );
1065
1066 yy_find_action:
1067 yy_act = yy_accept[yy_current_state];
1068 if ( yy_act == 0 )
1069 { /* have to back up */
1070 yy_cp = (yy_last_accepting_cpos);
1071 yy_current_state = (yy_last_accepting_state);
1072 yy_act = yy_accept[yy_current_state];
1073 }
1074
1075 YY_DO_BEFORE_ACTION;
1076
1077 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1078 {
1079 int yyl;
1080 for ( yyl = 0; yyl < yyleng; ++yyl )
1081 if ( yytext[yyl] == '\n' )
1082
1083 yylineno++;
1084 ;
1085 }
1086
1087 do_action: /* This label is used only to access EOF actions. */
1088
1089 switch ( yy_act )
1090 { /* beginning of action switch */
1091 case 0: /* must back up */
1092 /* undo the effects of YY_DO_BEFORE_ACTION */
1093 *yy_cp = (yy_hold_char);
1094 yy_cp = (yy_last_accepting_cpos);
1095 yy_current_state = (yy_last_accepting_state);
1096 goto yy_find_action;
1097
1098 case 1:
1099 YY_RULE_SETUP
1100 #line 28 "parser/faustlexer.l"
1101 BEGIN(comment);
1102 YY_BREAK
1103 case 2:
1104 YY_RULE_SETUP
1105 #line 29 "parser/faustlexer.l"
1106 /* eat anything that's not a '*' */
1107 YY_BREAK
1108 case 3:
1109 YY_RULE_SETUP
1110 #line 30 "parser/faustlexer.l"
1111 /* eat up '*'s not followed by '/'s */
1112 YY_BREAK
1113 case 4:
1114 /* rule 4 can match eol */
1115 YY_RULE_SETUP
1116 #line 31 "parser/faustlexer.l"
1117 /* no need to increment yylineno here */
1118 YY_BREAK
1119 case 5:
1120 /* rule 5 can match eol */
1121 YY_RULE_SETUP
1122 #line 32 "parser/faustlexer.l"
1123 /* no need to increment yylineno here */
1124 YY_BREAK
1125 case 6:
1126 YY_RULE_SETUP
1127 #line 33 "parser/faustlexer.l"
1128 /* no need to increment yylineno here */
1129 YY_BREAK
1130 case 7:
1131 YY_RULE_SETUP
1132 #line 34 "parser/faustlexer.l"
1133 BEGIN(INITIAL);
1134 YY_BREAK
1135 case 8:
1136 YY_RULE_SETUP
1137 #line 36 "parser/faustlexer.l"
1138 { BEGIN(doc); return BDOC; }
1139 YY_BREAK
1140 case 9:
1141 YY_RULE_SETUP
1142 #line 37 "parser/faustlexer.l"
1143 return DOCCHAR; /* char by char, may be slow ?? */
1144 YY_BREAK
1145 case 10:
1146 /* rule 10 can match eol */
1147 YY_RULE_SETUP
1148 #line 38 "parser/faustlexer.l"
1149 return DOCCHAR; /* keep newline chars */
1150 YY_BREAK
1151 case 11:
1152 YY_RULE_SETUP
1153 #line 39 "parser/faustlexer.l"
1154 return NOTICE; /* autoclosing tag */
1155 YY_BREAK
1156 case 12:
1157 YY_RULE_SETUP
1158 #line 40 "parser/faustlexer.l"
1159 return NOTICE; /* autoclosing tag */
1160 YY_BREAK
1161 case 13:
1162 YY_RULE_SETUP
1163 #line 41 "parser/faustlexer.l"
1164 { BEGIN(lst); return BLST; } /* autoclosing tag */
1165 YY_BREAK
1166 case 14:
1167 YY_RULE_SETUP
1168 #line 42 "parser/faustlexer.l"
1169 { BEGIN(INITIAL); return BEQN; }
1170 YY_BREAK
1171 case 15:
1172 YY_RULE_SETUP
1173 #line 43 "parser/faustlexer.l"
1174 { BEGIN(doc); return EEQN; }
1175 YY_BREAK
1176 case 16:
1177 YY_RULE_SETUP
1178 #line 44 "parser/faustlexer.l"
1179 { BEGIN(INITIAL); return BDGM; }
1180 YY_BREAK
1181 case 17:
1182 YY_RULE_SETUP
1183 #line 45 "parser/faustlexer.l"
1184 { BEGIN(doc); return EDGM; }
1185 YY_BREAK
1186 case 18:
1187 YY_RULE_SETUP
1188 #line 46 "parser/faustlexer.l"
1189 { BEGIN(INITIAL); return BMETADATA; }
1190 YY_BREAK
1191 case 19:
1192 YY_RULE_SETUP
1193 #line 47 "parser/faustlexer.l"
1194 { BEGIN(doc); return EMETADATA; }
1195 YY_BREAK
1196 case 20:
1197 YY_RULE_SETUP
1198 #line 48 "parser/faustlexer.l"
1199 { BEGIN(INITIAL); return EDOC; }
1200 YY_BREAK
1201 case 21:
1202 YY_RULE_SETUP
1203 #line 50 "parser/faustlexer.l"
1204 return LSTTRUE;
1205 YY_BREAK
1206 case 22:
1207 YY_RULE_SETUP
1208 #line 51 "parser/faustlexer.l"
1209 return LSTFALSE;
1210 YY_BREAK
1211 case 23:
1212 YY_RULE_SETUP
1213 #line 52 "parser/faustlexer.l"
1214 return LSTDEPENDENCIES;
1215 YY_BREAK
1216 case 24:
1217 YY_RULE_SETUP
1218 #line 53 "parser/faustlexer.l"
1219 return LSTMDOCTAGS;
1220 YY_BREAK
1221 case 25:
1222 YY_RULE_SETUP
1223 #line 54 "parser/faustlexer.l"
1224 return LSTDISTRIBUTED;
1225 YY_BREAK
1226 case 26:
1227 YY_RULE_SETUP
1228 #line 55 "parser/faustlexer.l"
1229 return LSTEQ;
1230 YY_BREAK
1231 case 27:
1232 YY_RULE_SETUP
1233 #line 56 "parser/faustlexer.l"
1234 return LSTQ;
1235 YY_BREAK
1236 case 28:
1237 YY_RULE_SETUP
1238 #line 57 "parser/faustlexer.l"
1239 { BEGIN(doc); return ELST; }
1240 YY_BREAK
1241 case 29:
1242 YY_RULE_SETUP
1243 #line 60 "parser/faustlexer.l"
1244 return INT;
1245 YY_BREAK
1246 case 30:
1247 YY_RULE_SETUP
1248 #line 63 "parser/faustlexer.l"
1249 return FLOAT;
1250 YY_BREAK
1251 case 31:
1252 YY_RULE_SETUP
1253 #line 64 "parser/faustlexer.l"
1254 return FLOAT;
1255 YY_BREAK
1256 case 32:
1257 YY_RULE_SETUP
1258 #line 65 "parser/faustlexer.l"
1259 return FLOAT;
1260 YY_BREAK
1261 case 33:
1262 YY_RULE_SETUP
1263 #line 66 "parser/faustlexer.l"
1264 return FLOAT;
1265 YY_BREAK
1266 case 34:
1267 YY_RULE_SETUP
1268 #line 67 "parser/faustlexer.l"
1269 return FLOAT;
1270 YY_BREAK
1271 case 35:
1272 YY_RULE_SETUP
1273 #line 70 "parser/faustlexer.l"
1274 return SEQ;
1275 YY_BREAK
1276 case 36:
1277 YY_RULE_SETUP
1278 #line 71 "parser/faustlexer.l"
1279 return PAR;
1280 YY_BREAK
1281 case 37:
1282 YY_RULE_SETUP
1283 #line 72 "parser/faustlexer.l"
1284 return SPLIT;
1285 YY_BREAK
1286 case 38:
1287 YY_RULE_SETUP
1288 #line 73 "parser/faustlexer.l"
1289 return MIX;
1290 YY_BREAK
1291 case 39:
1292 YY_RULE_SETUP
1293 #line 74 "parser/faustlexer.l"
1294 return MIX;
1295 YY_BREAK
1296 case 40:
1297 YY_RULE_SETUP
1298 #line 75 "parser/faustlexer.l"
1299 return REC;
1300 YY_BREAK
1301 case 41:
1302 YY_RULE_SETUP
1303 #line 77 "parser/faustlexer.l"
1304 return ADD;
1305 YY_BREAK
1306 case 42:
1307 YY_RULE_SETUP
1308 #line 78 "parser/faustlexer.l"
1309 return SUB;
1310 YY_BREAK
1311 case 43:
1312 YY_RULE_SETUP
1313 #line 79 "parser/faustlexer.l"
1314 return MUL;
1315 YY_BREAK
1316 case 44:
1317 YY_RULE_SETUP
1318 #line 80 "parser/faustlexer.l"
1319 return DIV;
1320 YY_BREAK
1321 case 45:
1322 YY_RULE_SETUP
1323 #line 81 "parser/faustlexer.l"
1324 return MOD;
1325 YY_BREAK
1326 case 46:
1327 YY_RULE_SETUP
1328 #line 82 "parser/faustlexer.l"
1329 return FDELAY;
1330 YY_BREAK
1331 case 47:
1332 YY_RULE_SETUP
1333 #line 83 "parser/faustlexer.l"
1334 return DELAY1;
1335 YY_BREAK
1336 case 48:
1337 YY_RULE_SETUP
1338 #line 85 "parser/faustlexer.l"
1339 return AND;
1340 YY_BREAK
1341 case 49:
1342 YY_RULE_SETUP
1343 #line 86 "parser/faustlexer.l"
1344 return OR;
1345 YY_BREAK
1346 case 50:
1347 YY_RULE_SETUP
1348 #line 87 "parser/faustlexer.l"
1349 return XOR;
1350 YY_BREAK
1351 case 51:
1352 YY_RULE_SETUP
1353 #line 89 "parser/faustlexer.l"
1354 return LSH;
1355 YY_BREAK
1356 case 52:
1357 YY_RULE_SETUP
1358 #line 90 "parser/faustlexer.l"
1359 return RSH;
1360 YY_BREAK
1361 case 53:
1362 YY_RULE_SETUP
1363 #line 92 "parser/faustlexer.l"
1364 return LT;
1365 YY_BREAK
1366 case 54:
1367 YY_RULE_SETUP
1368 #line 93 "parser/faustlexer.l"
1369 return LE;
1370 YY_BREAK
1371 case 55:
1372 YY_RULE_SETUP
1373 #line 94 "parser/faustlexer.l"
1374 return GT;
1375 YY_BREAK
1376 case 56:
1377 YY_RULE_SETUP
1378 #line 95 "parser/faustlexer.l"
1379 return GE;
1380 YY_BREAK
1381 case 57:
1382 YY_RULE_SETUP
1383 #line 96 "parser/faustlexer.l"
1384 return EQ;
1385 YY_BREAK
1386 case 58:
1387 YY_RULE_SETUP
1388 #line 97 "parser/faustlexer.l"
1389 return NE;
1390 YY_BREAK
1391 case 59:
1392 YY_RULE_SETUP
1393 #line 99 "parser/faustlexer.l"
1394 return WIRE;
1395 YY_BREAK
1396 case 60:
1397 YY_RULE_SETUP
1398 #line 100 "parser/faustlexer.l"
1399 return CUT;
1400 YY_BREAK
1401 case 61:
1402 YY_RULE_SETUP
1403 #line 102 "parser/faustlexer.l"
1404 return ENDDEF;
1405 YY_BREAK
1406 case 62:
1407 YY_RULE_SETUP
1408 #line 103 "parser/faustlexer.l"
1409 return DEF;
1410 YY_BREAK
1411 case 63:
1412 YY_RULE_SETUP
1413 #line 104 "parser/faustlexer.l"
1414 return LPAR;
1415 YY_BREAK
1416 case 64:
1417 YY_RULE_SETUP
1418 #line 105 "parser/faustlexer.l"
1419 return RPAR;
1420 YY_BREAK
1421 case 65:
1422 YY_RULE_SETUP
1423 #line 106 "parser/faustlexer.l"
1424 return LBRAQ;
1425 YY_BREAK
1426 case 66:
1427 YY_RULE_SETUP
1428 #line 107 "parser/faustlexer.l"
1429 return RBRAQ;
1430 YY_BREAK
1431 case 67:
1432 YY_RULE_SETUP
1433 #line 108 "parser/faustlexer.l"
1434 return LCROC;
1435 YY_BREAK
1436 case 68:
1437 YY_RULE_SETUP
1438 #line 109 "parser/faustlexer.l"
1439 return RCROC;
1440 YY_BREAK
1441 case 69:
1442 YY_RULE_SETUP
1443 #line 111 "parser/faustlexer.l"
1444 return LAMBDA;
1445 YY_BREAK
1446 case 70:
1447 YY_RULE_SETUP
1448 #line 112 "parser/faustlexer.l"
1449 return DOT;
1450 YY_BREAK
1451 case 71:
1452 YY_RULE_SETUP
1453 #line 113 "parser/faustlexer.l"
1454 return WITH;
1455 YY_BREAK
1456 case 72:
1457 YY_RULE_SETUP
1458 #line 115 "parser/faustlexer.l"
1459 return MEM;
1460 YY_BREAK
1461 case 73:
1462 YY_RULE_SETUP
1463 #line 116 "parser/faustlexer.l"
1464 return PREFIX;
1465 YY_BREAK
1466 case 74:
1467 YY_RULE_SETUP
1468 #line 118 "parser/faustlexer.l"
1469 return INTCAST;
1470 YY_BREAK
1471 case 75:
1472 YY_RULE_SETUP
1473 #line 119 "parser/faustlexer.l"
1474 return FLOATCAST;
1475 YY_BREAK
1476 case 76:
1477 YY_RULE_SETUP
1478 #line 121 "parser/faustlexer.l"
1479 return RDTBL;
1480 YY_BREAK
1481 case 77:
1482 YY_RULE_SETUP
1483 #line 122 "parser/faustlexer.l"
1484 return RWTBL;
1485 YY_BREAK
1486 case 78:
1487 YY_RULE_SETUP
1488 #line 124 "parser/faustlexer.l"
1489 return SELECT2;
1490 YY_BREAK
1491 case 79:
1492 YY_RULE_SETUP
1493 #line 125 "parser/faustlexer.l"
1494 return SELECT3;
1495 YY_BREAK
1496 case 80:
1497 YY_RULE_SETUP
1498 #line 127 "parser/faustlexer.l"
1499 return FFUNCTION;
1500 YY_BREAK
1501 case 81:
1502 YY_RULE_SETUP
1503 #line 128 "parser/faustlexer.l"
1504 return FCONSTANT;
1505 YY_BREAK
1506 case 82:
1507 YY_RULE_SETUP
1508 #line 129 "parser/faustlexer.l"
1509 return FVARIABLE;
1510 YY_BREAK
1511 case 83:
1512 YY_RULE_SETUP
1513 #line 131 "parser/faustlexer.l"
1514 return BUTTON;
1515 YY_BREAK
1516 case 84:
1517 YY_RULE_SETUP
1518 #line 132 "parser/faustlexer.l"
1519 return CHECKBOX;
1520 YY_BREAK
1521 case 85:
1522 YY_RULE_SETUP
1523 #line 133 "parser/faustlexer.l"
1524 return VSLIDER;
1525 YY_BREAK
1526 case 86:
1527 YY_RULE_SETUP
1528 #line 134 "parser/faustlexer.l"
1529 return HSLIDER;
1530 YY_BREAK
1531 case 87:
1532 YY_RULE_SETUP
1533 #line 135 "parser/faustlexer.l"
1534 return NENTRY;
1535 YY_BREAK
1536 case 88:
1537 YY_RULE_SETUP
1538 #line 136 "parser/faustlexer.l"
1539 return VGROUP;
1540 YY_BREAK
1541 case 89:
1542 YY_RULE_SETUP
1543 #line 137 "parser/faustlexer.l"
1544 return HGROUP;
1545 YY_BREAK
1546 case 90:
1547 YY_RULE_SETUP
1548 #line 138 "parser/faustlexer.l"
1549 return TGROUP;
1550 YY_BREAK
1551 case 91:
1552 YY_RULE_SETUP
1553 #line 139 "parser/faustlexer.l"
1554 return VBARGRAPH;
1555 YY_BREAK
1556 case 92:
1557 YY_RULE_SETUP
1558 #line 140 "parser/faustlexer.l"
1559 return HBARGRAPH;
1560 YY_BREAK
1561 case 93:
1562 YY_RULE_SETUP
1563 #line 141 "parser/faustlexer.l"
1564 return ATTACH;
1565 YY_BREAK
1566 case 94:
1567 YY_RULE_SETUP
1568 #line 143 "parser/faustlexer.l"
1569 return ACOS;
1570 YY_BREAK
1571 case 95:
1572 YY_RULE_SETUP
1573 #line 144 "parser/faustlexer.l"
1574 return ASIN;
1575 YY_BREAK
1576 case 96:
1577 YY_RULE_SETUP
1578 #line 145 "parser/faustlexer.l"
1579 return ATAN;
1580 YY_BREAK
1581 case 97:
1582 YY_RULE_SETUP
1583 #line 146 "parser/faustlexer.l"
1584 return ATAN2;
1585 YY_BREAK
1586 case 98:
1587 YY_RULE_SETUP
1588 #line 148 "parser/faustlexer.l"
1589 return COS;
1590 YY_BREAK
1591 case 99:
1592 YY_RULE_SETUP
1593 #line 149 "parser/faustlexer.l"
1594 return SIN;
1595 YY_BREAK
1596 case 100:
1597 YY_RULE_SETUP
1598 #line 150 "parser/faustlexer.l"
1599 return TAN;
1600 YY_BREAK
1601 case 101:
1602 YY_RULE_SETUP
1603 #line 152 "parser/faustlexer.l"
1604 return EXP;
1605 YY_BREAK
1606 case 102:
1607 YY_RULE_SETUP
1608 #line 153 "parser/faustlexer.l"
1609 return LOG;
1610 YY_BREAK
1611 case 103:
1612 YY_RULE_SETUP
1613 #line 154 "parser/faustlexer.l"
1614 return LOG10;
1615 YY_BREAK
1616 case 104:
1617 YY_RULE_SETUP
1618 #line 155 "parser/faustlexer.l"
1619 return POWOP;
1620 YY_BREAK
1621 case 105:
1622 YY_RULE_SETUP
1623 #line 156 "parser/faustlexer.l"
1624 return POWFUN;
1625 YY_BREAK
1626 case 106:
1627 YY_RULE_SETUP
1628 #line 157 "parser/faustlexer.l"
1629 return SQRT;
1630 YY_BREAK
1631 case 107:
1632 YY_RULE_SETUP
1633 #line 159 "parser/faustlexer.l"
1634 return ABS;
1635 YY_BREAK
1636 case 108:
1637 YY_RULE_SETUP
1638 #line 160 "parser/faustlexer.l"
1639 return MIN;
1640 YY_BREAK
1641 case 109:
1642 YY_RULE_SETUP
1643 #line 161 "parser/faustlexer.l"
1644 return MAX;
1645 YY_BREAK
1646 case 110:
1647 YY_RULE_SETUP
1648 #line 163 "parser/faustlexer.l"
1649 return FMOD;
1650 YY_BREAK
1651 case 111:
1652 YY_RULE_SETUP
1653 #line 164 "parser/faustlexer.l"
1654 return REMAINDER;
1655 YY_BREAK
1656 case 112:
1657 YY_RULE_SETUP
1658 #line 166 "parser/faustlexer.l"
1659 return FLOOR;
1660 YY_BREAK
1661 case 113:
1662 YY_RULE_SETUP
1663 #line 167 "parser/faustlexer.l"
1664 return CEIL;
1665 YY_BREAK
1666 case 114:
1667 YY_RULE_SETUP
1668 #line 168 "parser/faustlexer.l"
1669 return RINT;
1670 YY_BREAK
1671 case 115:
1672 YY_RULE_SETUP
1673 #line 170 "parser/faustlexer.l"
1674 return ISEQ;
1675 YY_BREAK
1676 case 116:
1677 YY_RULE_SETUP
1678 #line 171 "parser/faustlexer.l"
1679 return IPAR;
1680 YY_BREAK
1681 case 117:
1682 YY_RULE_SETUP
1683 #line 172 "parser/faustlexer.l"
1684 return ISUM;
1685 YY_BREAK
1686 case 118:
1687 YY_RULE_SETUP
1688 #line 173 "parser/faustlexer.l"
1689 return IPROD;
1690 YY_BREAK
1691 case 119:
1692 YY_RULE_SETUP
1693 #line 175 "parser/faustlexer.l"
1694 return IMPORT;
1695 YY_BREAK
1696 case 120:
1697 YY_RULE_SETUP
1698 #line 176 "parser/faustlexer.l"
1699 return COMPONENT;
1700 YY_BREAK
1701 case 121:
1702 YY_RULE_SETUP
1703 #line 177 "parser/faustlexer.l"
1704 return LIBRARY;
1705 YY_BREAK
1706 case 122:
1707 YY_RULE_SETUP
1708 #line 178 "parser/faustlexer.l"
1709 return ENVIRONMENT;
1710 YY_BREAK
1711 case 123:
1712 YY_RULE_SETUP
1713 #line 180 "parser/faustlexer.l"
1714 return DECLARE;
1715 YY_BREAK
1716 case 124:
1717 YY_RULE_SETUP
1718 #line 182 "parser/faustlexer.l"
1719 return SERIALIZE;
1720 YY_BREAK
1721 case 125:
1722 YY_RULE_SETUP
1723 #line 183 "parser/faustlexer.l"
1724 return VECTORIZE;
1725 YY_BREAK
1726 case 126:
1727 YY_RULE_SETUP
1728 #line 184 "parser/faustlexer.l"
1729 return HASH;
1730 YY_BREAK
1731 case 127:
1732 YY_RULE_SETUP
1733 #line 185 "parser/faustlexer.l"
1734 return RATE;
1735 YY_BREAK
1736 case 128:
1737 YY_RULE_SETUP
1738 #line 187 "parser/faustlexer.l"
1739 return UPSAMPLE;
1740 YY_BREAK
1741 case 129:
1742 YY_RULE_SETUP
1743 #line 188 "parser/faustlexer.l"
1744 return DOWNSAMPLE;
1745 YY_BREAK
1746 case 130:
1747 YY_RULE_SETUP
1748 #line 190 "parser/faustlexer.l"
1749 return CASE;
1750 YY_BREAK
1751 case 131:
1752 YY_RULE_SETUP
1753 #line 191 "parser/faustlexer.l"
1754 return ARROW;
1755 YY_BREAK
1756 case 132:
1757 YY_RULE_SETUP
1758 #line 193 "parser/faustlexer.l"
1759 return IDENT;
1760 YY_BREAK
1761 case 133:
1762 YY_RULE_SETUP
1763 #line 194 "parser/faustlexer.l"
1764 return IDENT;
1765 YY_BREAK
1766 case 134:
1767 /* rule 134 can match eol */
1768 YY_RULE_SETUP
1769 #line 196 "parser/faustlexer.l"
1770 return STRING;
1771 YY_BREAK
1772 case 135:
1773 YY_RULE_SETUP
1774 #line 198 "parser/faustlexer.l"
1775 return FSTRING;
1776 YY_BREAK
1777 case 136:
1778 YY_RULE_SETUP
1779 #line 199 "parser/faustlexer.l"
1780 return FSTRING;
1781 YY_BREAK
1782 case 137:
1783 YY_RULE_SETUP
1784 #line 202 "parser/faustlexer.l"
1785 /* eat up one-line comments */
1786 YY_BREAK
1787 case 138:
1788 /* rule 138 can match eol */
1789 YY_RULE_SETUP
1790 #line 204 "parser/faustlexer.l"
1791 /* eat up whitespace */
1792 YY_BREAK
1793 case YY_STATE_EOF(INITIAL):
1794 case YY_STATE_EOF(comment):
1795 case YY_STATE_EOF(doc):
1796 case YY_STATE_EOF(lst):
1797 #line 206 "parser/faustlexer.l"
1798 yyterminate();
1799 YY_BREAK
1800 case 139:
1801 YY_RULE_SETUP
1802 #line 208 "parser/faustlexer.l"
1803 printf("extra text is : %s\n", yytext); return EXTRA;
1804 YY_BREAK
1805 case 140:
1806 YY_RULE_SETUP
1807 #line 211 "parser/faustlexer.l"
1808 ECHO;
1809 YY_BREAK
1810 #line 1811 "parser/faustlexer.cpp"
1811
1812 case YY_END_OF_BUFFER:
1813 {
1814 /* Amount of text matched not including the EOB char. */
1815 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1816
1817 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1818 *yy_cp = (yy_hold_char);
1819 YY_RESTORE_YY_MORE_OFFSET
1820
1821 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1822 {
1823 /* We're scanning a new file or input source. It's
1824 * possible that this happened because the user
1825 * just pointed yyin at a new source and called
1826 * yylex(). If so, then we have to assure
1827 * consistency between YY_CURRENT_BUFFER and our
1828 * globals. Here is the right place to do so, because
1829 * this is the first action (other than possibly a
1830 * back-up) that will match for the new input source.
1831 */
1832 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1833 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1834 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1835 }
1836
1837 /* Note that here we test for yy_c_buf_p "<=" to the position
1838 * of the first EOB in the buffer, since yy_c_buf_p will
1839 * already have been incremented past the NUL character
1840 * (since all states make transitions on EOB to the
1841 * end-of-buffer state). Contrast this with the test
1842 * in input().
1843 */
1844 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1845 { /* This was really a NUL. */
1846 yy_state_type yy_next_state;
1847
1848 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1849
1850 yy_current_state = yy_get_previous_state( );
1851
1852 /* Okay, we're now positioned to make the NUL
1853 * transition. We couldn't have
1854 * yy_get_previous_state() go ahead and do it
1855 * for us because it doesn't know how to deal
1856 * with the possibility of jamming (and we don't
1857 * want to build jamming into it because then it
1858 * will run more slowly).
1859 */
1860
1861 yy_next_state = yy_try_NUL_trans( yy_current_state );
1862
1863 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1864
1865 if ( yy_next_state )
1866 {
1867 /* Consume the NUL. */
1868 yy_cp = ++(yy_c_buf_p);
1869 yy_current_state = yy_next_state;
1870 goto yy_match;
1871 }
1872
1873 else
1874 {
1875 yy_cp = (yy_c_buf_p);
1876 goto yy_find_action;
1877 }
1878 }
1879
1880 else switch ( yy_get_next_buffer( ) )
1881 {
1882 case EOB_ACT_END_OF_FILE:
1883 {
1884 (yy_did_buffer_switch_on_eof) = 0;
1885
1886 if ( yywrap( ) )
1887 {
1888 /* Note: because we've taken care in
1889 * yy_get_next_buffer() to have set up
1890 * yytext, we can now set up
1891 * yy_c_buf_p so that if some total
1892 * hoser (like flex itself) wants to
1893 * call the scanner after we return the
1894 * YY_NULL, it'll still work - another
1895 * YY_NULL will get returned.
1896 */
1897 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1898
1899 yy_act = YY_STATE_EOF(YY_START);
1900 goto do_action;
1901 }
1902
1903 else
1904 {
1905 if ( ! (yy_did_buffer_switch_on_eof) )
1906 YY_NEW_FILE;
1907 }
1908 break;
1909 }
1910
1911 case EOB_ACT_CONTINUE_SCAN:
1912 (yy_c_buf_p) =
1913 (yytext_ptr) + yy_amount_of_matched_text;
1914
1915 yy_current_state = yy_get_previous_state( );
1916
1917 yy_cp = (yy_c_buf_p);
1918 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1919 goto yy_match;
1920
1921 case EOB_ACT_LAST_MATCH:
1922 (yy_c_buf_p) =
1923 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1924
1925 yy_current_state = yy_get_previous_state( );
1926
1927 yy_cp = (yy_c_buf_p);
1928 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1929 goto yy_find_action;
1930 }
1931 break;
1932 }
1933
1934 default:
1935 YY_FATAL_ERROR(
1936 "fatal flex scanner internal error--no action found" );
1937 } /* end of action switch */
1938 } /* end of scanning one token */
1939 } /* end of yylex */
1940
1941 /* yy_get_next_buffer - try to read in a new buffer
1942 *
1943 * Returns a code representing an action:
1944 * EOB_ACT_LAST_MATCH -
1945 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1946 * EOB_ACT_END_OF_FILE - end of file
1947 */
1948 static int yy_get_next_buffer (void)
1949 {
1950 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1951 register char *source = (yytext_ptr);
1952 register int number_to_move, i;
1953 int ret_val;
1954
1955 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1956 YY_FATAL_ERROR(
1957 "fatal flex scanner internal error--end of buffer missed" );
1958
1959 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1960 { /* Don't try to fill the buffer, so this is an EOF. */
1961 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1962 {
1963 /* We matched a single character, the EOB, so
1964 * treat this as a final EOF.
1965 */
1966 return EOB_ACT_END_OF_FILE;
1967 }
1968
1969 else
1970 {
1971 /* We matched some text prior to the EOB, first
1972 * process it.
1973 */
1974 return EOB_ACT_LAST_MATCH;
1975 }
1976 }
1977
1978 /* Try to read more data. */
1979
1980 /* First move last chars to start of buffer. */
1981 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1982
1983 for ( i = 0; i < number_to_move; ++i )
1984 *(dest++) = *(source++);
1985
1986 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1987 /* don't do the read, it's not guaranteed to return an EOF,
1988 * just force an EOF
1989 */
1990 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1991
1992 else
1993 {
1994 int num_to_read =
1995 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1996
1997 while ( num_to_read <= 0 )
1998 { /* Not enough room in the buffer - grow it. */
1999
2000 /* just a shorter name for the current buffer */
2001 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
2002
2003 int yy_c_buf_p_offset =
2004 (int) ((yy_c_buf_p) - b->yy_ch_buf);
2005
2006 if ( b->yy_is_our_buffer )
2007 {
2008 int new_size = b->yy_buf_size * 2;
2009
2010 if ( new_size <= 0 )
2011 b->yy_buf_size += b->yy_buf_size / 8;
2012 else
2013 b->yy_buf_size *= 2;
2014
2015 b->yy_ch_buf = (char *)
2016 /* Include room in for 2 EOB chars. */
2017 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
2018 }
2019 else
2020 /* Can't grow it, we don't own it. */
2021 b->yy_ch_buf = 0;
2022
2023 if ( ! b->yy_ch_buf )
2024 YY_FATAL_ERROR(
2025 "fatal error - scanner input buffer overflow" );
2026
2027 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2028
2029 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2030 number_to_move - 1;
2031
2032 }
2033
2034 if ( num_to_read > YY_READ_BUF_SIZE )
2035 num_to_read = YY_READ_BUF_SIZE;
2036
2037 /* Read in more data. */
2038 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2039 (yy_n_chars), (size_t) num_to_read );
2040
2041 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2042 }
2043
2044 if ( (yy_n_chars) == 0 )
2045 {
2046 if ( number_to_move == YY_MORE_ADJ )
2047 {
2048 ret_val = EOB_ACT_END_OF_FILE;
2049 yyrestart(yyin );
2050 }
2051
2052 else
2053 {
2054 ret_val = EOB_ACT_LAST_MATCH;
2055 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2056 YY_BUFFER_EOF_PENDING;
2057 }
2058 }
2059
2060 else
2061 ret_val = EOB_ACT_CONTINUE_SCAN;
2062
2063 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2064 /* Extend the array by 50%, plus the number we really need. */
2065 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2066 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
2067 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2068 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2069 }
2070
2071 (yy_n_chars) += number_to_move;
2072 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2073 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2074
2075 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2076
2077 return ret_val;
2078 }
2079
2080 /* yy_get_previous_state - get the state just before the EOB char was reached */
2081
2082 static yy_state_type yy_get_previous_state (void)
2083 {
2084 register yy_state_type yy_current_state;
2085 register char *yy_cp;
2086
2087 yy_current_state = (yy_start);
2088
2089 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2090 {
2091 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2092 if ( yy_accept[yy_current_state] )
2093 {
2094 (yy_last_accepting_state) = yy_current_state;
2095 (yy_last_accepting_cpos) = yy_cp;
2096 }
2097 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2098 {
2099 yy_current_state = (int) yy_def[yy_current_state];
2100 if ( yy_current_state >= 482 )
2101 yy_c = yy_meta[(unsigned int) yy_c];
2102 }
2103 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2104 }
2105
2106 return yy_current_state;
2107 }
2108
2109 /* yy_try_NUL_trans - try to make a transition on the NUL character
2110 *
2111 * synopsis
2112 * next_state = yy_try_NUL_trans( current_state );
2113 */
2114 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2115 {
2116 register int yy_is_jam;
2117 register char *yy_cp = (yy_c_buf_p);
2118
2119 register YY_CHAR yy_c = 1;
2120 if ( yy_accept[yy_current_state] )
2121 {
2122 (yy_last_accepting_state) = yy_current_state;
2123 (yy_last_accepting_cpos) = yy_cp;
2124 }
2125 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2126 {
2127 yy_current_state = (int) yy_def[yy_current_state];
2128 if ( yy_current_state >= 482 )
2129 yy_c = yy_meta[(unsigned int) yy_c];
2130 }
2131 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2132 yy_is_jam = (yy_current_state == 481);
2133
2134 return yy_is_jam ? 0 : yy_current_state;
2135 }
2136
2137 static void yyunput (int c, register char * yy_bp )
2138 {
2139 register char *yy_cp;
2140
2141 yy_cp = (yy_c_buf_p);
2142
2143 /* undo effects of setting up yytext */
2144 *yy_cp = (yy_hold_char);
2145
2146 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2147 { /* need to shift things up to make room */
2148 /* +2 for EOB chars. */
2149 register int number_to_move = (yy_n_chars) + 2;
2150 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2151 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2152 register char *source =
2153 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2154
2155 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2156 *--dest = *--source;
2157
2158 yy_cp += (int) (dest - source);
2159 yy_bp += (int) (dest - source);
2160 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2161 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2162
2163 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2164 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2165 }
2166
2167 *--yy_cp = (char) c;
2168
2169 if ( c == '\n' ){
2170 --yylineno;
2171 }
2172
2173 (yytext_ptr) = yy_bp;
2174 (yy_hold_char) = *yy_cp;
2175 (yy_c_buf_p) = yy_cp;
2176 }
2177
2178 #ifndef YY_NO_INPUT
2179 #ifdef __cplusplus
2180 static int yyinput (void)
2181 #else
2182 static int input (void)
2183 #endif
2184
2185 {
2186 int c;
2187
2188 *(yy_c_buf_p) = (yy_hold_char);
2189
2190 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2191 {
2192 /* yy_c_buf_p now points to the character we want to return.
2193 * If this occurs *before* the EOB characters, then it's a
2194 * valid NUL; if not, then we've hit the end of the buffer.
2195 */
2196 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2197 /* This was really a NUL. */
2198 *(yy_c_buf_p) = '\0';
2199
2200 else
2201 { /* need more input */
2202 int offset = (yy_c_buf_p) - (yytext_ptr);
2203 ++(yy_c_buf_p);
2204
2205 switch ( yy_get_next_buffer( ) )
2206 {
2207 case EOB_ACT_LAST_MATCH:
2208 /* This happens because yy_g_n_b()
2209 * sees that we've accumulated a
2210 * token and flags that we need to
2211 * try matching the token before
2212 * proceeding. But for input(),
2213 * there's no matching to consider.
2214 * So convert the EOB_ACT_LAST_MATCH
2215 * to EOB_ACT_END_OF_FILE.
2216 */
2217
2218 /* Reset buffer status. */
2219 yyrestart(yyin );
2220
2221 /*FALLTHROUGH*/
2222
2223 case EOB_ACT_END_OF_FILE:
2224 {
2225 if ( yywrap( ) )
2226 return EOF;
2227
2228 if ( ! (yy_did_buffer_switch_on_eof) )
2229 YY_NEW_FILE;
2230 #ifdef __cplusplus
2231 return yyinput();
2232 #else
2233 return input();
2234 #endif
2235 }
2236
2237 case EOB_ACT_CONTINUE_SCAN:
2238 (yy_c_buf_p) = (yytext_ptr) + offset;
2239 break;
2240 }
2241 }
2242 }
2243
2244 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2245 *(yy_c_buf_p) = '\0'; /* preserve yytext */
2246 (yy_hold_char) = *++(yy_c_buf_p);
2247
2248 if ( c == '\n' )
2249
2250 yylineno++;
2251 ;
2252
2253 return c;
2254 }
2255 #endif /* ifndef YY_NO_INPUT */
2256
2257 /** Immediately switch to a different input stream.
2258 * @param input_file A readable stream.
2259 *
2260 * @note This function does not reset the start condition to @c INITIAL .
2261 */
2262 void yyrestart (FILE * input_file )
2263 {
2264
2265 if ( ! YY_CURRENT_BUFFER ){
2266 yyensure_buffer_stack ();
2267 YY_CURRENT_BUFFER_LVALUE =
2268 yy_create_buffer(yyin,YY_BUF_SIZE );
2269 }
2270
2271 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
2272 yy_load_buffer_state( );
2273 }
2274
2275 /** Switch to a different input buffer.
2276 * @param new_buffer The new input buffer.
2277 *
2278 */
2279 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2280 {
2281
2282 /* TODO. We should be able to replace this entire function body
2283 * with
2284 * yypop_buffer_state();
2285 * yypush_buffer_state(new_buffer);
2286 */
2287 yyensure_buffer_stack ();
2288 if ( YY_CURRENT_BUFFER == new_buffer )
2289 return;
2290
2291 if ( YY_CURRENT_BUFFER )
2292 {
2293 /* Flush out information for old buffer. */
2294 *(yy_c_buf_p) = (yy_hold_char);
2295 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2296 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2297 }
2298
2299 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2300 yy_load_buffer_state( );
2301
2302 /* We don't actually know whether we did this switch during
2303 * EOF (yywrap()) processing, but the only time this flag
2304 * is looked at is after yywrap() is called, so it's safe
2305 * to go ahead and always set it.
2306 */
2307 (yy_did_buffer_switch_on_eof) = 1;
2308 }
2309
2310 static void yy_load_buffer_state (void)
2311 {
2312 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2313 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2314 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2315 (yy_hold_char) = *(yy_c_buf_p);
2316 }
2317
2318 /** Allocate and initialize an input buffer state.
2319 * @param file A readable stream.
2320 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2321 *
2322 * @return the allocated buffer state.
2323 */
2324 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
2325 {
2326 YY_BUFFER_STATE b;
2327
2328 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2329 if ( ! b )
2330 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2331
2332 b->yy_buf_size = size;
2333
2334 /* yy_ch_buf has to be 2 characters longer than the size given because
2335 * we need to put in 2 end-of-buffer characters.
2336 */
2337 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
2338 if ( ! b->yy_ch_buf )
2339 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2340
2341 b->yy_is_our_buffer = 1;
2342
2343 yy_init_buffer(b,file );
2344
2345 return b;
2346 }
2347
2348 /** Destroy the buffer.
2349 * @param b a buffer created with yy_create_buffer()
2350 *
2351 */
2352 void yy_delete_buffer (YY_BUFFER_STATE b )
2353 {
2354
2355 if ( ! b )
2356 return;
2357
2358 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2359 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2360
2361 if ( b->yy_is_our_buffer )
2362 yyfree((void *) b->yy_ch_buf );
2363
2364 yyfree((void *) b );
2365 }
2366
2367 #ifndef __cplusplus
2368 extern int isatty (int );
2369 #endif /* __cplusplus */
2370
2371 /* Initializes or reinitializes a buffer.
2372 * This function is sometimes called more than once on the same buffer,
2373 * such as during a yyrestart() or at EOF.
2374 */
2375 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
2376
2377 {
2378 int oerrno = errno;
2379
2380 yy_flush_buffer(b );
2381
2382 b->yy_input_file = file;
2383 b->yy_fill_buffer = 1;
2384
2385 /* If b is the current buffer, then yy_init_buffer was _probably_
2386 * called from yyrestart() or through yy_get_next_buffer.
2387 * In that case, we don't want to reset the lineno or column.
2388 */
2389 if (b != YY_CURRENT_BUFFER){
2390 b->yy_bs_lineno = 1;
2391 b->yy_bs_column = 0;
2392 }
2393
2394 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2395
2396 errno = oerrno;
2397 }
2398
2399 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2400 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2401 *
2402 */
2403 void yy_flush_buffer (YY_BUFFER_STATE b )
2404 {
2405 if ( ! b )
2406 return;
2407
2408 b->yy_n_chars = 0;
2409
2410 /* We always need two end-of-buffer characters. The first causes
2411 * a transition to the end-of-buffer state. The second causes
2412 * a jam in that state.
2413 */
2414 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2415 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2416
2417 b->yy_buf_pos = &b->yy_ch_buf[0];
2418
2419 b->yy_at_bol = 1;
2420 b->yy_buffer_status = YY_BUFFER_NEW;
2421
2422 if ( b == YY_CURRENT_BUFFER )
2423 yy_load_buffer_state( );
2424 }
2425
2426 /** Pushes the new state onto the stack. The new state becomes
2427 * the current state. This function will allocate the stack
2428 * if necessary.
2429 * @param new_buffer The new state.
2430 *
2431 */
2432 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2433 {
2434 if (new_buffer == NULL)
2435 return;
2436
2437 yyensure_buffer_stack();
2438
2439 /* This block is copied from yy_switch_to_buffer. */
2440 if ( YY_CURRENT_BUFFER )
2441 {
2442 /* Flush out information for old buffer. */
2443 *(yy_c_buf_p) = (yy_hold_char);
2444 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2445 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2446 }
2447
2448 /* Only push if top exists. Otherwise, replace top. */
2449 if (YY_CURRENT_BUFFER)
2450 (yy_buffer_stack_top)++;
2451 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2452
2453 /* copied from yy_switch_to_buffer. */
2454 yy_load_buffer_state( );
2455 (yy_did_buffer_switch_on_eof) = 1;
2456 }
2457
2458 /** Removes and deletes the top of the stack, if present.
2459 * The next element becomes the new top.
2460 *
2461 */
2462 void yypop_buffer_state (void)
2463 {
2464 if (!YY_CURRENT_BUFFER)
2465 return;
2466
2467 yy_delete_buffer(YY_CURRENT_BUFFER );
2468 YY_CURRENT_BUFFER_LVALUE = NULL;
2469 if ((yy_buffer_stack_top) > 0)
2470 --(yy_buffer_stack_top);
2471
2472 if (YY_CURRENT_BUFFER) {
2473 yy_load_buffer_state( );
2474 (yy_did_buffer_switch_on_eof) = 1;
2475 }
2476 }
2477
2478 /* Allocates the stack if it does not exist.
2479 * Guarantees space for at least one push.
2480 */
2481 static void yyensure_buffer_stack (void)
2482 {
2483 int num_to_alloc;
2484
2485 if (!(yy_buffer_stack)) {
2486
2487 /* First allocation is just for 2 elements, since we don't know if this
2488 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2489 * immediate realloc on the next call.
2490 */
2491 num_to_alloc = 1;
2492 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
2493 (num_to_alloc * sizeof(struct yy_buffer_state*)
2494 );
2495 if ( ! (yy_buffer_stack) )
2496 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2497
2498 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2499
2500 (yy_buffer_stack_max) = num_to_alloc;
2501 (yy_buffer_stack_top) = 0;
2502 return;
2503 }
2504
2505 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2506
2507 /* Increase the buffer to prepare for a possible push. */
2508 int grow_size = 8 /* arbitrary grow size */;
2509
2510 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2511 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2512 ((yy_buffer_stack),
2513 num_to_alloc * sizeof(struct yy_buffer_state*)
2514 );
2515 if ( ! (yy_buffer_stack) )
2516 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2517
2518 /* zero only the new slots.*/
2519 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2520 (yy_buffer_stack_max) = num_to_alloc;
2521 }
2522 }
2523
2524 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2525 * @param base the character buffer
2526 * @param size the size in bytes of the character buffer
2527 *
2528 * @return the newly allocated buffer state object.
2529 */
2530 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
2531 {
2532 YY_BUFFER_STATE b;
2533
2534 if ( size < 2 ||
2535 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2536 base[size-1] != YY_END_OF_BUFFER_CHAR )
2537 /* They forgot to leave room for the EOB's. */
2538 return 0;
2539
2540 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2541 if ( ! b )
2542 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2543
2544 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2545 b->yy_buf_pos = b->yy_ch_buf = base;
2546 b->yy_is_our_buffer = 0;
2547 b->yy_input_file = 0;
2548 b->yy_n_chars = b->yy_buf_size;
2549 b->yy_is_interactive = 0;
2550 b->yy_at_bol = 1;
2551 b->yy_fill_buffer = 0;
2552 b->yy_buffer_status = YY_BUFFER_NEW;
2553
2554 yy_switch_to_buffer(b );
2555
2556 return b;
2557 }
2558
2559 /** Setup the input buffer state to scan a string. The next call to yylex() will
2560 * scan from a @e copy of @a str.
2561 * @param yystr a NUL-terminated string to scan
2562 *
2563 * @return the newly allocated buffer state object.
2564 * @note If you want to scan bytes that may contain NUL values, then use
2565 * yy_scan_bytes() instead.
2566 */
2567 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
2568 {
2569
2570 return yy_scan_bytes(yystr,strlen(yystr) );
2571 }
2572
2573 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2574 * scan from a @e copy of @a bytes.
2575 * @param yybytes the byte buffer to scan
2576 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2577 *
2578 * @return the newly allocated buffer state object.
2579 */
2580 YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
2581 {
2582 YY_BUFFER_STATE b;
2583 char *buf;
2584 yy_size_t n;
2585 int i;
2586
2587 /* Get memory for full buffer, including space for trailing EOB's. */
2588 n = _yybytes_len + 2;
2589 buf = (char *) yyalloc(n );
2590 if ( ! buf )
2591 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2592
2593 for ( i = 0; i < _yybytes_len; ++i )
2594 buf[i] = yybytes[i];
2595
2596 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2597
2598 b = yy_scan_buffer(buf,n );
2599 if ( ! b )
2600 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2601
2602 /* It's okay to grow etc. this buffer, and we should throw it
2603 * away when we're done.
2604 */
2605 b->yy_is_our_buffer = 1;
2606
2607 return b;
2608 }
2609
2610 #ifndef YY_EXIT_FAILURE
2611 #define YY_EXIT_FAILURE 2
2612 #endif
2613
2614 static void yy_fatal_error (yyconst char* msg )
2615 {
2616 (void) fprintf( stderr, "%s\n", msg );
2617 exit( YY_EXIT_FAILURE );
2618 }
2619
2620 /* Redefine yyless() so it works in section 3 code. */
2621
2622 #undef yyless
2623 #define yyless(n) \
2624 do \
2625 { \
2626 /* Undo effects of setting up yytext. */ \
2627 int yyless_macro_arg = (n); \
2628 YY_LESS_LINENO(yyless_macro_arg);\
2629 yytext[yyleng] = (yy_hold_char); \
2630 (yy_c_buf_p) = yytext + yyless_macro_arg; \
2631 (yy_hold_char) = *(yy_c_buf_p); \
2632 *(yy_c_buf_p) = '\0'; \
2633 yyleng = yyless_macro_arg; \
2634 } \
2635 while ( 0 )
2636
2637 /* Accessor methods (get/set functions) to struct members. */
2638
2639 /** Get the current line number.
2640 *
2641 */
2642 int yyget_lineno (void)
2643 {
2644
2645 return yylineno;
2646 }
2647
2648 /** Get the input stream.
2649 *
2650 */
2651 FILE *yyget_in (void)
2652 {
2653 return yyin;
2654 }
2655
2656 /** Get the output stream.
2657 *
2658 */
2659 FILE *yyget_out (void)
2660 {
2661 return yyout;
2662 }
2663
2664 /** Get the length of the current token.
2665 *
2666 */
2667 int yyget_leng (void)
2668 {
2669 return yyleng;
2670 }
2671
2672 /** Get the current token.
2673 *
2674 */
2675
2676 char *yyget_text (void)
2677 {
2678 return yytext;
2679 }
2680
2681 /** Set the current line number.
2682 * @param line_number
2683 *
2684 */
2685 void yyset_lineno (int line_number )
2686 {
2687
2688 yylineno = line_number;
2689 }
2690
2691 /** Set the input stream. This does not discard the current
2692 * input buffer.
2693 * @param in_str A readable stream.
2694 *
2695 * @see yy_switch_to_buffer
2696 */
2697 void yyset_in (FILE * in_str )
2698 {
2699 yyin = in_str ;
2700 }
2701
2702 void yyset_out (FILE * out_str )
2703 {
2704 yyout = out_str ;
2705 }
2706
2707 int yyget_debug (void)
2708 {
2709 return yy_flex_debug;
2710 }
2711
2712 void yyset_debug (int bdebug )
2713 {
2714 yy_flex_debug = bdebug ;
2715 }
2716
2717 static int yy_init_globals (void)
2718 {
2719 /* Initialization is the same as for the non-reentrant scanner.
2720 * This function is called from yylex_destroy(), so don't allocate here.
2721 */
2722
2723 /* We do not touch yylineno unless the option is enabled. */
2724 yylineno = 1;
2725
2726 (yy_buffer_stack) = 0;
2727 (yy_buffer_stack_top) = 0;
2728 (yy_buffer_stack_max) = 0;
2729 (yy_c_buf_p) = (char *) 0;
2730 (yy_init) = 0;
2731 (yy_start) = 0;
2732
2733 /* Defined in main.c */
2734 #ifdef YY_STDINIT
2735 yyin = stdin;
2736 yyout = stdout;
2737 #else
2738 yyin = (FILE *) 0;
2739 yyout = (FILE *) 0;
2740 #endif
2741
2742 /* For future reference: Set errno on error, since we are called by
2743 * yylex_init()
2744 */
2745 return 0;
2746 }
2747
2748 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2749 int yylex_destroy (void)
2750 {
2751
2752 /* Pop the buffer stack, destroying each element. */
2753 while(YY_CURRENT_BUFFER){
2754 yy_delete_buffer(YY_CURRENT_BUFFER );
2755 YY_CURRENT_BUFFER_LVALUE = NULL;
2756 yypop_buffer_state();
2757 }
2758
2759 /* Destroy the stack itself. */
2760 yyfree((yy_buffer_stack) );
2761 (yy_buffer_stack) = NULL;
2762
2763 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2764 * yylex() is called, initialization will occur. */
2765 yy_init_globals( );
2766
2767 return 0;
2768 }
2769
2770 /*
2771 * Internal utility routines.
2772 */
2773
2774 #ifndef yytext_ptr
2775 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2776 {
2777 register int i;
2778 for ( i = 0; i < n; ++i )
2779 s1[i] = s2[i];
2780 }
2781 #endif
2782
2783 #ifdef YY_NEED_STRLEN
2784 static int yy_flex_strlen (yyconst char * s )
2785 {
2786 register int n;
2787 for ( n = 0; s[n]; ++n )
2788 ;
2789
2790 return n;
2791 }
2792 #endif
2793
2794 void *yyalloc (yy_size_t size )
2795 {
2796 return (void *) malloc( size );
2797 }
2798
2799 void *yyrealloc (void * ptr, yy_size_t size )
2800 {
2801 /* The cast to (char *) in the following accommodates both
2802 * implementations that use char* generic pointers, and those
2803 * that use void* generic pointers. It works with the latter
2804 * because both ANSI C and C++ allow castless assignment from
2805 * any pointer type to void*, and deal with argument conversions
2806 * as though doing an assignment.
2807 */
2808 return (void *) realloc( (char *) ptr, size );
2809 }
2810
2811 void yyfree (void * ptr )
2812 {
2813 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2814 }
2815
2816 #define YYTABLES_NAME "yytables"
2817
2818 #line 211 "parser/faustlexer.l"
2819
2820
2821 int yywrap() { return 1; }
2822
2823