~ubuntu-branches/ubuntu/hoary/kdemultimedia/hoary

« back to all changes in this revision

Viewing changes to kmidi/cfg.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Martin Schulze
  • Date: 2003-01-22 15:00:51 UTC
  • Revision ID: james.westby@ubuntu.com-20030122150051-uihwkdoxf15mi1tn
Tags: upstream-2.2.2
ImportĀ upstreamĀ versionĀ 2.2.2

Show diffs side-by-side

added added

removed removed

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