1 #line 2 "parser/faustlexer.cpp"
3 #line 4 "parser/faustlexer.cpp"
5 #define YY_INT_ALIGNED short int
7 /* A lexical scanner generated by flex */
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
17 /* First, we deal with platform-specific or compiler-specific issues. */
19 /* begin standard C headers. */
25 /* end standard C headers. */
27 /* flex integer type definitions */
32 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
34 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
36 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37 * if you want the limit (max/min) macros for int types.
39 #ifndef __STDC_LIMIT_MACROS
40 #define __STDC_LIMIT_MACROS 1
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
;
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
;
58 /* Limits of integral types. */
60 #define INT8_MIN (-128)
63 #define INT16_MIN (-32767-1)
66 #define INT32_MIN (-2147483647-1)
69 #define INT8_MAX (127)
72 #define INT16_MAX (32767)
75 #define INT32_MAX (2147483647)
78 #define UINT8_MAX (255U)
81 #define UINT16_MAX (65535U)
84 #define UINT32_MAX (4294967295U)
89 #endif /* ! FLEXINT_H */
93 /* The "const" storage-class-modifier is valid. */
96 #else /* ! __cplusplus */
98 /* C99 requires __STDC__ to be defined as 1. */
99 #if defined (__STDC__)
103 #endif /* defined (__STDC__) */
104 #endif /* ! __cplusplus */
107 #define yyconst const
112 /* Returned upon end-of-file. */
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
120 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
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.
126 #define BEGIN (yy_start) = 1 + 2 *
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
132 #define YY_START (((yy_start) - 1) / 2)
133 #define YYSTATE YY_START
135 /* Action number for EOF rule of a given start state. */
136 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
138 /* Special action meaning "start processing a new file". */
139 #define YY_NEW_FILE yyrestart(yyin )
141 #define YY_END_OF_BUFFER_CHAR 0
143 /* Size of default input buffer. */
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.
150 #define YY_BUF_SIZE 32768
152 #define YY_BUF_SIZE 16384
153 #endif /* __ia64__ */
156 /* The state buf must be large enough to hold one state per character in the main buffer.
158 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
160 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
161 #define YY_TYPEDEF_YY_BUFFER_STATE
162 typedef struct yy_buffer_state
*YY_BUFFER_STATE
;
167 extern FILE *yyin
, *yyout
;
169 #define EOB_ACT_CONTINUE_SCAN 0
170 #define EOB_ACT_END_OF_FILE 1
171 #define EOB_ACT_LAST_MATCH 2
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.
180 #define YY_LESS_LINENO(n) \
183 for ( yyl = n; yyl < yyleng; ++yyl )\
184 if ( yytext[yyl] == '\n' )\
188 /* Return all but the first "n" matched characters back to the input stream. */
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 */ \
202 #define unput(c) yyunput( c, (yytext_ptr) )
204 #ifndef YY_TYPEDEF_YY_SIZE_T
205 #define YY_TYPEDEF_YY_SIZE_T
206 typedef size_t yy_size_t
;
209 #ifndef YY_STRUCT_YY_BUFFER_STATE
210 #define YY_STRUCT_YY_BUFFER_STATE
211 struct yy_buffer_state
215 char *yy_ch_buf
; /* input buffer */
216 char *yy_buf_pos
; /* current position in input buffer */
218 /* Size of input buffer in bytes, not including room for EOB
221 yy_size_t yy_buf_size
;
223 /* Number of characters read into yy_ch_buf, not including EOB
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
232 int yy_is_our_buffer
;
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
239 int yy_is_interactive
;
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
247 int yy_bs_lineno
; /**< The line count. */
248 int yy_bs_column
; /**< The column count. */
250 /* Whether to try to fill the input buffer when we reach the
255 int yy_buffer_status
;
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.
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.
269 #define YY_BUFFER_EOF_PENDING 2
272 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
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. */
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
283 * Returns the top of the stack, or NULL.
285 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
286 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
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.
292 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
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 */
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 */
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 ...
307 static int yy_did_buffer_switch_on_eof
;
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 );
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
);
321 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
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
);
327 void *yyalloc (yy_size_t
);
328 void *yyrealloc (void *,yy_size_t
);
329 void yyfree (void * );
331 #define yy_new_buffer yy_create_buffer
333 #define yy_set_interactive(is_interactive) \
335 if ( ! YY_CURRENT_BUFFER ){ \
336 yyensure_buffer_stack (); \
337 YY_CURRENT_BUFFER_LVALUE = \
338 yy_create_buffer(yyin,YY_BUF_SIZE ); \
340 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
343 #define yy_set_bol(at_bol) \
345 if ( ! YY_CURRENT_BUFFER ){\
346 yyensure_buffer_stack (); \
347 YY_CURRENT_BUFFER_LVALUE = \
348 yy_create_buffer(yyin,YY_BUF_SIZE ); \
350 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
353 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
355 /* Begin user sect3 */
357 typedef unsigned char YY_CHAR
;
359 FILE *yyin
= (FILE *) 0, *yyout
= (FILE *) 0;
361 typedef int yy_state_type
;
368 #define yytext_ptr yytext
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
[] );
375 /* Done after the current pattern has been matched and before the
376 * corresponding action - sets up yytext.
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; \
383 (yy_c_buf_p) = yy_cp;
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. */
391 flex_int32_t yy_verify
;
394 static yyconst flex_int16_t yy_accept
[482] =
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,
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,
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,
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,
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,
451 static yyconst flex_int32_t yy_ec
[256] =
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,
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,
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,
483 static yyconst flex_int32_t yy_meta
[66] =
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,
494 static yyconst flex_int16_t yy_base
[494] =
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,
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,
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,
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,
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,
553 static yyconst flex_int16_t yy_def
[494] =
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,
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,
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,
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,
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,
612 static yyconst flex_int16_t yy_nxt
[694] =
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,
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,
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,
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,
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,
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,
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,
693 static yyconst flex_int16_t yy_chk
[694] =
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,
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,
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,
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,
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,
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,
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,
774 /* Table of booleans, true if rule could match eol. */
775 static yyconst flex_int32_t yy_rule_can_match_eol
[141] =
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,
786 static yy_state_type yy_last_accepting_state
;
787 static char *yy_last_accepting_cpos
;
789 extern int yy_flex_debug
;
790 int yy_flex_debug
= 0;
792 /* The intent behind this definition is that it'll catch
793 * any uses of REJECT which flex missed.
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
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"
805 #include "faustparser.hpp"
806 #define YY_NO_UNISTD_H 1
807 extern int isatty (int );
811 #line 812 "parser/faustlexer.cpp"
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.
826 #ifndef YY_EXTRA_TYPE
827 #define YY_EXTRA_TYPE void *
830 static int yy_init_globals (void );
832 /* Accessor methods to globals.
833 These are made visible to non-reentrant scanners for convenience. */
835 int yylex_destroy (void );
837 int yyget_debug (void );
839 void yyset_debug (int debug_flag
);
841 YY_EXTRA_TYPE
yyget_extra (void );
843 void yyset_extra (YY_EXTRA_TYPE user_defined
);
845 FILE *yyget_in (void );
847 void yyset_in (FILE * in_str
);
849 FILE *yyget_out (void );
851 void yyset_out (FILE * out_str
);
853 int yyget_leng (void );
855 char *yyget_text (void );
857 int yyget_lineno (void );
859 void yyset_lineno (int line_number
);
861 /* Macros after this point can all be overridden by user definitions in
865 #ifndef YY_SKIP_YYWRAP
867 extern "C" int yywrap (void );
869 extern int yywrap (void );
873 static void yyunput (int c
,char *buf_ptr
);
876 static void yy_flex_strncpy (char *,yyconst
char *,int );
879 #ifdef YY_NEED_STRLEN
880 static int yy_flex_strlen (yyconst
char * );
886 static int yyinput (void );
888 static int input (void );
893 /* Amount of stuff to slurp up with each read. */
894 #ifndef YY_READ_BUF_SIZE
896 /* On IA-64, the buffer size is 16k, not 8k */
897 #define YY_READ_BUF_SIZE 16384
899 #define YY_READ_BUF_SIZE 8192
900 #endif /* __ia64__ */
903 /* Copy whatever the last rule matched to the standard output. */
905 /* This used to be an fputs(), but since the string might contain NUL's,
906 * we now use fwrite().
908 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
911 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
912 * is returned in "result".
915 #define YY_INPUT(buf,result,max_size) \
916 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
920 for ( n = 0; n < max_size && \
921 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
924 buf[n++] = (char) c; \
925 if ( c == EOF && ferror( yyin ) ) \
926 YY_FATAL_ERROR( "input in flex scanner failed" ); \
932 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
934 if( errno != EINTR) \
936 YY_FATAL_ERROR( "input in flex scanner failed" ); \
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.
952 #define yyterminate() return YY_NULL
955 /* Number of entries by which start-condition stack grows. */
956 #ifndef YY_START_STACK_INCR
957 #define YY_START_STACK_INCR 25
960 /* Report a fatal error. */
961 #ifndef YY_FATAL_ERROR
962 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
965 /* end tables serialization structures and prototypes */
967 /* Default declaration of generated scanner - a define so the user can
968 * easily add parameters.
971 #define YY_DECL_IS_OURS 1
973 extern int yylex (void);
975 #define YY_DECL int yylex (void)
976 #endif /* !YY_DECL */
978 /* Code executed at the beginning of each rule, after yytext and yyleng
981 #ifndef YY_USER_ACTION
982 #define YY_USER_ACTION
985 /* Code executed at the end of each rule. */
987 #define YY_BREAK break;
990 #define YY_RULE_SETUP \
993 /** The main scanner function which does all the work.
997 register yy_state_type yy_current_state
;
998 register char *yy_cp
, *yy_bp
;
1001 #line 25 "parser/faustlexer.l"
1005 #line 1006 "parser/faustlexer.cpp"
1016 (yy_start
) = 1; /* first start state */
1024 if ( ! YY_CURRENT_BUFFER
) {
1025 yyensure_buffer_stack ();
1026 YY_CURRENT_BUFFER_LVALUE
=
1027 yy_create_buffer(yyin
,YY_BUF_SIZE
);
1030 yy_load_buffer_state( );
1033 while ( 1 ) /* loops until end-of-file is reached */
1035 yy_cp
= (yy_c_buf_p
);
1037 /* Support of yytext. */
1038 *yy_cp
= (yy_hold_char
);
1040 /* yy_bp points to the position in yy_ch_buf of the start of
1045 yy_current_state
= (yy_start
);
1049 register YY_CHAR yy_c
= yy_ec
[YY_SC_TO_UI(*yy_cp
)];
1050 if ( yy_accept
[yy_current_state
] )
1052 (yy_last_accepting_state
) = yy_current_state
;
1053 (yy_last_accepting_cpos
) = yy_cp
;
1055 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
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
];
1061 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1064 while ( yy_base
[yy_current_state
] != 628 );
1067 yy_act
= yy_accept
[yy_current_state
];
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
];
1075 YY_DO_BEFORE_ACTION
;
1077 if ( yy_act
!= YY_END_OF_BUFFER
&& yy_rule_can_match_eol
[yy_act
] )
1080 for ( yyl
= 0; yyl
< yyleng
; ++yyl
)
1081 if ( yytext
[yyl
] == '\n' )
1087 do_action
: /* This label is used only to access EOF actions. */
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
;
1100 #line 28 "parser/faustlexer.l"
1105 #line 29 "parser/faustlexer.l"
1106 /* eat anything that's not a '*' */
1110 #line 30 "parser/faustlexer.l"
1111 /* eat up '*'s not followed by '/'s */
1114 /* rule 4 can match eol */
1116 #line 31 "parser/faustlexer.l"
1117 /* no need to increment yylineno here */
1120 /* rule 5 can match eol */
1122 #line 32 "parser/faustlexer.l"
1123 /* no need to increment yylineno here */
1127 #line 33 "parser/faustlexer.l"
1128 /* no need to increment yylineno here */
1132 #line 34 "parser/faustlexer.l"
1137 #line 36 "parser/faustlexer.l"
1138 { BEGIN(doc
); return BDOC
; }
1142 #line 37 "parser/faustlexer.l"
1143 return DOCCHAR
; /* char by char, may be slow ?? */
1146 /* rule 10 can match eol */
1148 #line 38 "parser/faustlexer.l"
1149 return DOCCHAR
; /* keep newline chars */
1153 #line 39 "parser/faustlexer.l"
1154 return NOTICE
; /* autoclosing tag */
1158 #line 40 "parser/faustlexer.l"
1159 return NOTICE
; /* autoclosing tag */
1163 #line 41 "parser/faustlexer.l"
1164 { BEGIN(lst
); return BLST
; } /* autoclosing tag */
1168 #line 42 "parser/faustlexer.l"
1169 { BEGIN(INITIAL
); return BEQN
; }
1173 #line 43 "parser/faustlexer.l"
1174 { BEGIN(doc
); return EEQN
; }
1178 #line 44 "parser/faustlexer.l"
1179 { BEGIN(INITIAL
); return BDGM
; }
1183 #line 45 "parser/faustlexer.l"
1184 { BEGIN(doc
); return EDGM
; }
1188 #line 46 "parser/faustlexer.l"
1189 { BEGIN(INITIAL
); return BMETADATA
; }
1193 #line 47 "parser/faustlexer.l"
1194 { BEGIN(doc
); return EMETADATA
; }
1198 #line 48 "parser/faustlexer.l"
1199 { BEGIN(INITIAL
); return EDOC
; }
1203 #line 50 "parser/faustlexer.l"
1208 #line 51 "parser/faustlexer.l"
1213 #line 52 "parser/faustlexer.l"
1214 return LSTDEPENDENCIES
;
1218 #line 53 "parser/faustlexer.l"
1223 #line 54 "parser/faustlexer.l"
1224 return LSTDISTRIBUTED
;
1228 #line 55 "parser/faustlexer.l"
1233 #line 56 "parser/faustlexer.l"
1238 #line 57 "parser/faustlexer.l"
1239 { BEGIN(doc
); return ELST
; }
1243 #line 60 "parser/faustlexer.l"
1248 #line 63 "parser/faustlexer.l"
1253 #line 64 "parser/faustlexer.l"
1258 #line 65 "parser/faustlexer.l"
1263 #line 66 "parser/faustlexer.l"
1268 #line 67 "parser/faustlexer.l"
1273 #line 70 "parser/faustlexer.l"
1278 #line 71 "parser/faustlexer.l"
1283 #line 72 "parser/faustlexer.l"
1288 #line 73 "parser/faustlexer.l"
1293 #line 74 "parser/faustlexer.l"
1298 #line 75 "parser/faustlexer.l"
1303 #line 77 "parser/faustlexer.l"
1308 #line 78 "parser/faustlexer.l"
1313 #line 79 "parser/faustlexer.l"
1318 #line 80 "parser/faustlexer.l"
1323 #line 81 "parser/faustlexer.l"
1328 #line 82 "parser/faustlexer.l"
1333 #line 83 "parser/faustlexer.l"
1338 #line 85 "parser/faustlexer.l"
1343 #line 86 "parser/faustlexer.l"
1348 #line 87 "parser/faustlexer.l"
1353 #line 89 "parser/faustlexer.l"
1358 #line 90 "parser/faustlexer.l"
1363 #line 92 "parser/faustlexer.l"
1368 #line 93 "parser/faustlexer.l"
1373 #line 94 "parser/faustlexer.l"
1378 #line 95 "parser/faustlexer.l"
1383 #line 96 "parser/faustlexer.l"
1388 #line 97 "parser/faustlexer.l"
1393 #line 99 "parser/faustlexer.l"
1398 #line 100 "parser/faustlexer.l"
1403 #line 102 "parser/faustlexer.l"
1408 #line 103 "parser/faustlexer.l"
1413 #line 104 "parser/faustlexer.l"
1418 #line 105 "parser/faustlexer.l"
1423 #line 106 "parser/faustlexer.l"
1428 #line 107 "parser/faustlexer.l"
1433 #line 108 "parser/faustlexer.l"
1438 #line 109 "parser/faustlexer.l"
1443 #line 111 "parser/faustlexer.l"
1448 #line 112 "parser/faustlexer.l"
1453 #line 113 "parser/faustlexer.l"
1458 #line 115 "parser/faustlexer.l"
1463 #line 116 "parser/faustlexer.l"
1468 #line 118 "parser/faustlexer.l"
1473 #line 119 "parser/faustlexer.l"
1478 #line 121 "parser/faustlexer.l"
1483 #line 122 "parser/faustlexer.l"
1488 #line 124 "parser/faustlexer.l"
1493 #line 125 "parser/faustlexer.l"
1498 #line 127 "parser/faustlexer.l"
1503 #line 128 "parser/faustlexer.l"
1508 #line 129 "parser/faustlexer.l"
1513 #line 131 "parser/faustlexer.l"
1518 #line 132 "parser/faustlexer.l"
1523 #line 133 "parser/faustlexer.l"
1528 #line 134 "parser/faustlexer.l"
1533 #line 135 "parser/faustlexer.l"
1538 #line 136 "parser/faustlexer.l"
1543 #line 137 "parser/faustlexer.l"
1548 #line 138 "parser/faustlexer.l"
1553 #line 139 "parser/faustlexer.l"
1558 #line 140 "parser/faustlexer.l"
1563 #line 141 "parser/faustlexer.l"
1568 #line 143 "parser/faustlexer.l"
1573 #line 144 "parser/faustlexer.l"
1578 #line 145 "parser/faustlexer.l"
1583 #line 146 "parser/faustlexer.l"
1588 #line 148 "parser/faustlexer.l"
1593 #line 149 "parser/faustlexer.l"
1598 #line 150 "parser/faustlexer.l"
1603 #line 152 "parser/faustlexer.l"
1608 #line 153 "parser/faustlexer.l"
1613 #line 154 "parser/faustlexer.l"
1618 #line 155 "parser/faustlexer.l"
1623 #line 156 "parser/faustlexer.l"
1628 #line 157 "parser/faustlexer.l"
1633 #line 159 "parser/faustlexer.l"
1638 #line 160 "parser/faustlexer.l"
1643 #line 161 "parser/faustlexer.l"
1648 #line 163 "parser/faustlexer.l"
1653 #line 164 "parser/faustlexer.l"
1658 #line 166 "parser/faustlexer.l"
1663 #line 167 "parser/faustlexer.l"
1668 #line 168 "parser/faustlexer.l"
1673 #line 170 "parser/faustlexer.l"
1678 #line 171 "parser/faustlexer.l"
1683 #line 172 "parser/faustlexer.l"
1688 #line 173 "parser/faustlexer.l"
1693 #line 175 "parser/faustlexer.l"
1698 #line 176 "parser/faustlexer.l"
1703 #line 177 "parser/faustlexer.l"
1708 #line 178 "parser/faustlexer.l"
1713 #line 180 "parser/faustlexer.l"
1718 #line 182 "parser/faustlexer.l"
1723 #line 183 "parser/faustlexer.l"
1728 #line 184 "parser/faustlexer.l"
1733 #line 185 "parser/faustlexer.l"
1738 #line 187 "parser/faustlexer.l"
1743 #line 188 "parser/faustlexer.l"
1748 #line 190 "parser/faustlexer.l"
1753 #line 191 "parser/faustlexer.l"
1758 #line 193 "parser/faustlexer.l"
1763 #line 194 "parser/faustlexer.l"
1767 /* rule 134 can match eol */
1769 #line 196 "parser/faustlexer.l"
1774 #line 198 "parser/faustlexer.l"
1779 #line 199 "parser/faustlexer.l"
1784 #line 202 "parser/faustlexer.l"
1785 /* eat up one-line comments */
1788 /* rule 138 can match eol */
1790 #line 204 "parser/faustlexer.l"
1791 /* eat up whitespace */
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"
1802 #line 208 "parser/faustlexer.l"
1803 printf("extra text is : %s\n", yytext
); return EXTRA
;
1807 #line 211 "parser/faustlexer.l"
1810 #line 1811 "parser/faustlexer.cpp"
1812 case YY_END_OF_BUFFER
:
1814 /* Amount of text matched not including the EOB char. */
1815 int yy_amount_of_matched_text
= (int) (yy_cp
- (yytext_ptr
)) - 1;
1817 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1818 *yy_cp
= (yy_hold_char
);
1819 YY_RESTORE_YY_MORE_OFFSET
1821 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_NEW
)
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.
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
;
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
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
;
1848 (yy_c_buf_p
) = (yytext_ptr
) + yy_amount_of_matched_text
;
1850 yy_current_state
= yy_get_previous_state( );
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).
1861 yy_next_state
= yy_try_NUL_trans( yy_current_state
);
1863 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
1865 if ( yy_next_state
)
1867 /* Consume the NUL. */
1868 yy_cp
= ++(yy_c_buf_p
);
1869 yy_current_state
= yy_next_state
;
1875 yy_cp
= (yy_c_buf_p
);
1876 goto yy_find_action
;
1880 else switch ( yy_get_next_buffer( ) )
1882 case EOB_ACT_END_OF_FILE
:
1884 (yy_did_buffer_switch_on_eof
) = 0;
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.
1897 (yy_c_buf_p
) = (yytext_ptr
) + YY_MORE_ADJ
;
1899 yy_act
= YY_STATE_EOF(YY_START
);
1905 if ( ! (yy_did_buffer_switch_on_eof
) )
1911 case EOB_ACT_CONTINUE_SCAN
:
1913 (yytext_ptr
) + yy_amount_of_matched_text
;
1915 yy_current_state
= yy_get_previous_state( );
1917 yy_cp
= (yy_c_buf_p
);
1918 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
1921 case EOB_ACT_LAST_MATCH
:
1923 &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)];
1925 yy_current_state
= yy_get_previous_state( );
1927 yy_cp
= (yy_c_buf_p
);
1928 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
1929 goto yy_find_action
;
1936 "fatal flex scanner internal error--no action found" );
1937 } /* end of action switch */
1938 } /* end of scanning one token */
1939 } /* end of yylex */
1941 /* yy_get_next_buffer - try to read in a new buffer
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
1948 static int yy_get_next_buffer (void)
1950 register char *dest
= YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
;
1951 register char *source
= (yytext_ptr
);
1952 register int number_to_move
, i
;
1955 if ( (yy_c_buf_p
) > &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
) + 1] )
1957 "fatal flex scanner internal error--end of buffer missed" );
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 )
1963 /* We matched a single character, the EOB, so
1964 * treat this as a final EOF.
1966 return EOB_ACT_END_OF_FILE
;
1971 /* We matched some text prior to the EOB, first
1974 return EOB_ACT_LAST_MATCH
;
1978 /* Try to read more data. */
1980 /* First move last chars to start of buffer. */
1981 number_to_move
= (int) ((yy_c_buf_p
) - (yytext_ptr
)) - 1;
1983 for ( i
= 0; i
< number_to_move
; ++i
)
1984 *(dest
++) = *(source
++);
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,
1990 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
) = 0;
1995 YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
- number_to_move
- 1;
1997 while ( num_to_read
<= 0 )
1998 { /* Not enough room in the buffer - grow it. */
2000 /* just a shorter name for the current buffer */
2001 YY_BUFFER_STATE b
= YY_CURRENT_BUFFER
;
2003 int yy_c_buf_p_offset
=
2004 (int) ((yy_c_buf_p
) - b
->yy_ch_buf
);
2006 if ( b
->yy_is_our_buffer
)
2008 int new_size
= b
->yy_buf_size
* 2;
2010 if ( new_size
<= 0 )
2011 b
->yy_buf_size
+= b
->yy_buf_size
/ 8;
2013 b
->yy_buf_size
*= 2;
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 );
2020 /* Can't grow it, we don't own it. */
2023 if ( ! b
->yy_ch_buf
)
2025 "fatal error - scanner input buffer overflow" );
2027 (yy_c_buf_p
) = &b
->yy_ch_buf
[yy_c_buf_p_offset
];
2029 num_to_read
= YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
-
2034 if ( num_to_read
> YY_READ_BUF_SIZE
)
2035 num_to_read
= YY_READ_BUF_SIZE
;
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
);
2041 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
2044 if ( (yy_n_chars
) == 0 )
2046 if ( number_to_move
== YY_MORE_ADJ
)
2048 ret_val
= EOB_ACT_END_OF_FILE
;
2054 ret_val
= EOB_ACT_LAST_MATCH
;
2055 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
=
2056 YY_BUFFER_EOF_PENDING
;
2061 ret_val
= EOB_ACT_CONTINUE_SCAN
;
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()" );
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
;
2075 (yytext_ptr
) = &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[0];
2080 /* yy_get_previous_state - get the state just before the EOB char was reached */
2082 static yy_state_type
yy_get_previous_state (void)
2084 register yy_state_type yy_current_state
;
2085 register char *yy_cp
;
2087 yy_current_state
= (yy_start
);
2089 for ( yy_cp
= (yytext_ptr
) + YY_MORE_ADJ
; yy_cp
< (yy_c_buf_p
); ++yy_cp
)
2091 register YY_CHAR yy_c
= (*yy_cp
? yy_ec
[YY_SC_TO_UI(*yy_cp
)] : 1);
2092 if ( yy_accept
[yy_current_state
] )
2094 (yy_last_accepting_state
) = yy_current_state
;
2095 (yy_last_accepting_cpos
) = yy_cp
;
2097 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
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
];
2103 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
2106 return yy_current_state
;
2109 /* yy_try_NUL_trans - try to make a transition on the NUL character
2112 * next_state = yy_try_NUL_trans( current_state );
2114 static yy_state_type
yy_try_NUL_trans (yy_state_type yy_current_state
)
2116 register int yy_is_jam
;
2117 register char *yy_cp
= (yy_c_buf_p
);
2119 register YY_CHAR yy_c
= 1;
2120 if ( yy_accept
[yy_current_state
] )
2122 (yy_last_accepting_state
) = yy_current_state
;
2123 (yy_last_accepting_cpos
) = yy_cp
;
2125 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
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
];
2131 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
2132 yy_is_jam
= (yy_current_state
== 481);
2134 return yy_is_jam
? 0 : yy_current_state
;
2137 static void yyunput (int c
, register char * yy_bp
)
2139 register char *yy_cp
;
2141 yy_cp
= (yy_c_buf_p
);
2143 /* undo effects of setting up yytext */
2144 *yy_cp
= (yy_hold_char
);
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
];
2155 while ( source
> YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
)
2156 *--dest
= *--source
;
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
;
2163 if ( yy_cp
< YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
+ 2 )
2164 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2167 *--yy_cp
= (char) c
;
2173 (yytext_ptr
) = yy_bp
;
2174 (yy_hold_char
) = *yy_cp
;
2175 (yy_c_buf_p
) = yy_cp
;
2180 static int yyinput (void)
2182 static int input (void)
2188 *(yy_c_buf_p
) = (yy_hold_char
);
2190 if ( *(yy_c_buf_p
) == YY_END_OF_BUFFER_CHAR
)
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.
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';
2201 { /* need more input */
2202 int offset
= (yy_c_buf_p
) - (yytext_ptr
);
2205 switch ( yy_get_next_buffer( ) )
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.
2218 /* Reset buffer status. */
2223 case EOB_ACT_END_OF_FILE
:
2228 if ( ! (yy_did_buffer_switch_on_eof
) )
2237 case EOB_ACT_CONTINUE_SCAN
:
2238 (yy_c_buf_p
) = (yytext_ptr
) + offset
;
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
);
2255 #endif /* ifndef YY_NO_INPUT */
2257 /** Immediately switch to a different input stream.
2258 * @param input_file A readable stream.
2260 * @note This function does not reset the start condition to @c INITIAL .
2262 void yyrestart (FILE * input_file
)
2265 if ( ! YY_CURRENT_BUFFER
){
2266 yyensure_buffer_stack ();
2267 YY_CURRENT_BUFFER_LVALUE
=
2268 yy_create_buffer(yyin
,YY_BUF_SIZE
);
2271 yy_init_buffer(YY_CURRENT_BUFFER
,input_file
);
2272 yy_load_buffer_state( );
2275 /** Switch to a different input buffer.
2276 * @param new_buffer The new input buffer.
2279 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer
)
2282 /* TODO. We should be able to replace this entire function body
2284 * yypop_buffer_state();
2285 * yypush_buffer_state(new_buffer);
2287 yyensure_buffer_stack ();
2288 if ( YY_CURRENT_BUFFER
== new_buffer
)
2291 if ( YY_CURRENT_BUFFER
)
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
);
2299 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
2300 yy_load_buffer_state( );
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.
2307 (yy_did_buffer_switch_on_eof
) = 1;
2310 static void yy_load_buffer_state (void)
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
);
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.
2322 * @return the allocated buffer state.
2324 YY_BUFFER_STATE
yy_create_buffer (FILE * file
, int size
)
2328 b
= (YY_BUFFER_STATE
) yyalloc(sizeof( struct yy_buffer_state
) );
2330 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2332 b
->yy_buf_size
= size
;
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.
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()" );
2341 b
->yy_is_our_buffer
= 1;
2343 yy_init_buffer(b
,file
);
2348 /** Destroy the buffer.
2349 * @param b a buffer created with yy_create_buffer()
2352 void yy_delete_buffer (YY_BUFFER_STATE b
)
2358 if ( b
== YY_CURRENT_BUFFER
) /* Not sure if we should pop here. */
2359 YY_CURRENT_BUFFER_LVALUE
= (YY_BUFFER_STATE
) 0;
2361 if ( b
->yy_is_our_buffer
)
2362 yyfree((void *) b
->yy_ch_buf
);
2364 yyfree((void *) b
);
2368 extern int isatty (int );
2369 #endif /* __cplusplus */
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.
2375 static void yy_init_buffer (YY_BUFFER_STATE b
, FILE * file
)
2380 yy_flush_buffer(b
);
2382 b
->yy_input_file
= file
;
2383 b
->yy_fill_buffer
= 1;
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.
2389 if (b
!= YY_CURRENT_BUFFER
){
2390 b
->yy_bs_lineno
= 1;
2391 b
->yy_bs_column
= 0;
2394 b
->yy_is_interactive
= file
? (isatty( fileno(file
) ) > 0) : 0;
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.
2403 void yy_flush_buffer (YY_BUFFER_STATE b
)
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.
2414 b
->yy_ch_buf
[0] = YY_END_OF_BUFFER_CHAR
;
2415 b
->yy_ch_buf
[1] = YY_END_OF_BUFFER_CHAR
;
2417 b
->yy_buf_pos
= &b
->yy_ch_buf
[0];
2420 b
->yy_buffer_status
= YY_BUFFER_NEW
;
2422 if ( b
== YY_CURRENT_BUFFER
)
2423 yy_load_buffer_state( );
2426 /** Pushes the new state onto the stack. The new state becomes
2427 * the current state. This function will allocate the stack
2429 * @param new_buffer The new state.
2432 void yypush_buffer_state (YY_BUFFER_STATE new_buffer
)
2434 if (new_buffer
== NULL
)
2437 yyensure_buffer_stack();
2439 /* This block is copied from yy_switch_to_buffer. */
2440 if ( YY_CURRENT_BUFFER
)
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
);
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
;
2453 /* copied from yy_switch_to_buffer. */
2454 yy_load_buffer_state( );
2455 (yy_did_buffer_switch_on_eof
) = 1;
2458 /** Removes and deletes the top of the stack, if present.
2459 * The next element becomes the new top.
2462 void yypop_buffer_state (void)
2464 if (!YY_CURRENT_BUFFER
)
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
);
2472 if (YY_CURRENT_BUFFER
) {
2473 yy_load_buffer_state( );
2474 (yy_did_buffer_switch_on_eof
) = 1;
2478 /* Allocates the stack if it does not exist.
2479 * Guarantees space for at least one push.
2481 static void yyensure_buffer_stack (void)
2485 if (!(yy_buffer_stack
)) {
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.
2492 (yy_buffer_stack
) = (struct yy_buffer_state
**)yyalloc
2493 (num_to_alloc
* sizeof(struct yy_buffer_state
*)
2495 if ( ! (yy_buffer_stack
) )
2496 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2498 memset((yy_buffer_stack
), 0, num_to_alloc
* sizeof(struct yy_buffer_state
*));
2500 (yy_buffer_stack_max
) = num_to_alloc
;
2501 (yy_buffer_stack_top
) = 0;
2505 if ((yy_buffer_stack_top
) >= ((yy_buffer_stack_max
)) - 1){
2507 /* Increase the buffer to prepare for a possible push. */
2508 int grow_size
= 8 /* arbitrary grow size */;
2510 num_to_alloc
= (yy_buffer_stack_max
) + grow_size
;
2511 (yy_buffer_stack
) = (struct yy_buffer_state
**)yyrealloc
2513 num_to_alloc
* sizeof(struct yy_buffer_state
*)
2515 if ( ! (yy_buffer_stack
) )
2516 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
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
;
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
2528 * @return the newly allocated buffer state object.
2530 YY_BUFFER_STATE
yy_scan_buffer (char * base
, yy_size_t size
)
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. */
2540 b
= (YY_BUFFER_STATE
) yyalloc(sizeof( struct yy_buffer_state
) );
2542 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
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;
2551 b
->yy_fill_buffer
= 0;
2552 b
->yy_buffer_status
= YY_BUFFER_NEW
;
2554 yy_switch_to_buffer(b
);
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
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.
2567 YY_BUFFER_STATE
yy_scan_string (yyconst
char * yystr
)
2570 return yy_scan_bytes(yystr
,strlen(yystr
) );
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.
2578 * @return the newly allocated buffer state object.
2580 YY_BUFFER_STATE
yy_scan_bytes (yyconst
char * yybytes
, int _yybytes_len
)
2587 /* Get memory for full buffer, including space for trailing EOB's. */
2588 n
= _yybytes_len
+ 2;
2589 buf
= (char *) yyalloc(n
);
2591 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2593 for ( i
= 0; i
< _yybytes_len
; ++i
)
2594 buf
[i
] = yybytes
[i
];
2596 buf
[_yybytes_len
] = buf
[_yybytes_len
+1] = YY_END_OF_BUFFER_CHAR
;
2598 b
= yy_scan_buffer(buf
,n
);
2600 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2602 /* It's okay to grow etc. this buffer, and we should throw it
2603 * away when we're done.
2605 b
->yy_is_our_buffer
= 1;
2610 #ifndef YY_EXIT_FAILURE
2611 #define YY_EXIT_FAILURE 2
2614 static void yy_fatal_error (yyconst
char* msg
)
2616 (void) fprintf( stderr
, "%s\n", msg
);
2617 exit( YY_EXIT_FAILURE
);
2620 /* Redefine yyless() so it works in section 3 code. */
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; \
2637 /* Accessor methods (get/set functions) to struct members. */
2639 /** Get the current line number.
2642 int yyget_lineno (void)
2648 /** Get the input stream.
2651 FILE *yyget_in (void)
2656 /** Get the output stream.
2659 FILE *yyget_out (void)
2664 /** Get the length of the current token.
2667 int yyget_leng (void)
2672 /** Get the current token.
2676 char *yyget_text (void)
2681 /** Set the current line number.
2682 * @param line_number
2685 void yyset_lineno (int line_number
)
2688 yylineno
= line_number
;
2691 /** Set the input stream. This does not discard the current
2693 * @param in_str A readable stream.
2695 * @see yy_switch_to_buffer
2697 void yyset_in (FILE * in_str
)
2702 void yyset_out (FILE * out_str
)
2707 int yyget_debug (void)
2709 return yy_flex_debug
;
2712 void yyset_debug (int bdebug
)
2714 yy_flex_debug
= bdebug
;
2717 static int yy_init_globals (void)
2719 /* Initialization is the same as for the non-reentrant scanner.
2720 * This function is called from yylex_destroy(), so don't allocate here.
2723 /* We do not touch yylineno unless the option is enabled. */
2726 (yy_buffer_stack
) = 0;
2727 (yy_buffer_stack_top
) = 0;
2728 (yy_buffer_stack_max
) = 0;
2729 (yy_c_buf_p
) = (char *) 0;
2733 /* Defined in main.c */
2742 /* For future reference: Set errno on error, since we are called by
2748 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2749 int yylex_destroy (void)
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();
2759 /* Destroy the stack itself. */
2760 yyfree((yy_buffer_stack
) );
2761 (yy_buffer_stack
) = NULL
;
2763 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2764 * yylex() is called, initialization will occur. */
2771 * Internal utility routines.
2775 static void yy_flex_strncpy (char* s1
, yyconst
char * s2
, int n
)
2778 for ( i
= 0; i
< n
; ++i
)
2783 #ifdef YY_NEED_STRLEN
2784 static int yy_flex_strlen (yyconst
char * s
)
2787 for ( n
= 0; s
[n
]; ++n
)
2794 void *yyalloc (yy_size_t size
)
2796 return (void *) malloc( size
);
2799 void *yyrealloc (void * ptr
, yy_size_t size
)
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.
2808 return (void *) realloc( (char *) ptr
, size
);
2811 void yyfree (void * ptr
)
2813 free( (char *) ptr
); /* see yyrealloc() for (char *) cast */
2816 #define YYTABLES_NAME "yytables"
2818 #line 211 "parser/faustlexer.l"
2821 int yywrap() { return 1; }