/[svn]/linuxsampler/trunk/src/network/lscpparser.cpp
ViewVC logotype

Annotation of /linuxsampler/trunk/src/network/lscpparser.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 155 - (hide annotations) (download)
Mon Jun 28 04:30:11 2004 UTC (19 years, 9 months ago) by senkov
File size: 62433 byte(s)
* Updated parser, lscp server and sampler class for new MIDI_INPUT
* Minor fixes (and major new bugs) here and there
* Consolidated 3 SET CHANNEL MIDI_xxx commands into one:
SET CHANNEL MIDI_INPUT

1 senkov 135 /* A Bison parser, made by GNU Bison 1.875. */
2 schoenebeck 35
3     /* Skeleton parser for Yacc-like parsing with Bison,
4 senkov 135 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
5 schoenebeck 35
6     This program is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2, or (at your option)
9     any later version.
10    
11     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14     GNU General Public License for more details.
15    
16     You should have received a copy of the GNU General Public License
17     along with this program; if not, write to the Free Software
18     Foundation, Inc., 59 Temple Place - Suite 330,
19     Boston, MA 02111-1307, USA. */
20    
21     /* As a special exception, when this file is copied by Bison into a
22     Bison output file, you may use that output file without restriction.
23     This special exception was added by the Free Software Foundation
24     in version 1.24 of Bison. */
25    
26     /* Written by Richard Stallman by simplifying the original so called
27     ``semantic'' parser. */
28    
29     /* All symbols defined below should begin with yy or YY, to avoid
30     infringing on user name space. This should be done even for local
31     variables, as they might otherwise be expanded by user macros.
32     There are some unavoidable exceptions within include files to
33     define necessary library symbols; they are noted "INFRINGES ON
34     USER NAME SPACE" below. */
35    
36     /* Identify Bison output. */
37     #define YYBISON 1
38    
39     /* Skeleton name. */
40     #define YYSKELETON_NAME "yacc.c"
41    
42     /* Pure parsers. */
43     #define YYPURE 1
44    
45     /* Using locations. */
46     #define YYLSP_NEEDED 0
47    
48    
49    
50     /* Tokens. */
51     #ifndef YYTOKENTYPE
52     # define YYTOKENTYPE
53     /* Put the tokens into the symbol table, so that GDB and other debuggers
54     know about them. */
55     enum yytokentype {
56     CHAR = 258,
57     DOTNUM = 259,
58     NUMBER = 260,
59 senkov 135 STRINGVAL = 261,
60     SP = 262,
61     LF = 263,
62     CR = 264,
63     HASH = 265,
64     EQ = 266,
65     ADD = 267,
66     GET = 268,
67     CREATE = 269,
68     DESTROY = 270,
69     LIST = 271,
70     LOAD = 272,
71 senkov 141 NON_MODAL = 273,
72 senkov 135 REMOVE = 274,
73     SET = 275,
74     SUBSCRIBE = 276,
75     UNSUBSCRIBE = 277,
76     RESET = 278,
77     QUIT = 279,
78     CHANNEL = 280,
79     NOTIFICATION = 281,
80     AVAILABLE_ENGINES = 282,
81     AVAILABLE_AUDIO_OUTPUT_DRIVERS = 283,
82     CHANNELS = 284,
83     INFO = 285,
84     BUFFER_FILL = 286,
85     STREAM_COUNT = 287,
86     VOICE_COUNT = 288,
87     INSTRUMENT = 289,
88     ENGINE = 290,
89     AUDIO_OUTPUT_CHANNEL = 291,
90     AUDIO_OUTPUT_CHANNEL_PARAMETER = 292,
91     AUDIO_OUTPUT_DEVICE = 293,
92     AUDIO_OUTPUT_DEVICES = 294,
93     AUDIO_OUTPUT_DEVICE_PARAMETER = 295,
94     AUDIO_OUTPUT_DRIVER = 296,
95     AUDIO_OUTPUT_DRIVER_PARAMETER = 297,
96 capela 143 AUDIO_OUTPUT_TYPE = 298,
97 senkov 155 MIDI_INPUT = 299,
98     MIDI_INPUT_TYPE = 300,
99     MIDI_INPUT_PORT = 301,
100     MIDI_INPUT_CHANNEL = 302,
101     VOLUME = 303,
102     MIDI_INPUT_DRIVER = 304,
103     MIDI_INPUT_DRIVER_PARAMETER = 305,
104     AVAILABLE_MIDI_INPUT_DRIVERS = 306,
105     MIDI_INPUT_DEVICE = 307,
106     MIDI_INPUT_DEVICES = 308,
107     MIDI_INPUT_DEVICE_PARAMETER = 309,
108     MIDI_INPUT_PORT_PARAMETER = 310,
109     BYTES = 311,
110     PERCENTAGE = 312,
111     MISCELLANEOUS = 313
112 schoenebeck 35 };
113     #endif
114     #define CHAR 258
115     #define DOTNUM 259
116     #define NUMBER 260
117 senkov 135 #define STRINGVAL 261
118     #define SP 262
119     #define LF 263
120     #define CR 264
121     #define HASH 265
122     #define EQ 266
123     #define ADD 267
124     #define GET 268
125     #define CREATE 269
126     #define DESTROY 270
127     #define LIST 271
128     #define LOAD 272
129 senkov 141 #define NON_MODAL 273
130 senkov 135 #define REMOVE 274
131     #define SET 275
132     #define SUBSCRIBE 276
133     #define UNSUBSCRIBE 277
134     #define RESET 278
135     #define QUIT 279
136     #define CHANNEL 280
137     #define NOTIFICATION 281
138     #define AVAILABLE_ENGINES 282
139     #define AVAILABLE_AUDIO_OUTPUT_DRIVERS 283
140     #define CHANNELS 284
141     #define INFO 285
142     #define BUFFER_FILL 286
143     #define STREAM_COUNT 287
144     #define VOICE_COUNT 288
145     #define INSTRUMENT 289
146     #define ENGINE 290
147     #define AUDIO_OUTPUT_CHANNEL 291
148     #define AUDIO_OUTPUT_CHANNEL_PARAMETER 292
149     #define AUDIO_OUTPUT_DEVICE 293
150     #define AUDIO_OUTPUT_DEVICES 294
151     #define AUDIO_OUTPUT_DEVICE_PARAMETER 295
152     #define AUDIO_OUTPUT_DRIVER 296
153     #define AUDIO_OUTPUT_DRIVER_PARAMETER 297
154 capela 143 #define AUDIO_OUTPUT_TYPE 298
155 senkov 155 #define MIDI_INPUT 299
156     #define MIDI_INPUT_TYPE 300
157     #define MIDI_INPUT_PORT 301
158     #define MIDI_INPUT_CHANNEL 302
159     #define VOLUME 303
160     #define MIDI_INPUT_DRIVER 304
161     #define MIDI_INPUT_DRIVER_PARAMETER 305
162     #define AVAILABLE_MIDI_INPUT_DRIVERS 306
163     #define MIDI_INPUT_DEVICE 307
164     #define MIDI_INPUT_DEVICES 308
165     #define MIDI_INPUT_DEVICE_PARAMETER 309
166     #define MIDI_INPUT_PORT_PARAMETER 310
167     #define BYTES 311
168     #define PERCENTAGE 312
169     #define MISCELLANEOUS 313
170 schoenebeck 35
171    
172    
173    
174     /* Copy the first part of user declarations. */
175     #line 23 "lscp.y"
176    
177    
178     #include "lscpparser.h"
179     #include "lscpserver.h"
180    
181     // as we need an reentrant scanner, we have to pass the pointer to the scanner with each yylex() call
182     #define YYLEX_PARAM ((yyparse_param_t*) yyparse_param)->pScanner
183    
184     // to save us typing work in the rules action definitions
185     #define LSCPSERVER ((yyparse_param_t*) yyparse_param)->pServer
186    
187     // clears input buffer and restarts scanner.
188     void restart(yyparse_param_t* pparam, int& yychar);
189     #define RESTART restart((yyparse_param_t*) YYPARSE_PARAM, yychar)
190    
191     // external reference to the main scanner function yylex()
192     extern YY_DECL;
193    
194     // external reference to restart the lex scanner
195     extern void yyrestart(FILE* input_file, yyscan_t yyscanner);
196    
197     // we provide our own version of yyerror() so we don't have to link against the yacc library
198     void yyerror(const char* s);
199    
200    
201    
202     /* Enabling traces. */
203     #ifndef YYDEBUG
204     # define YYDEBUG 0
205     #endif
206    
207     /* Enabling verbose error messages. */
208     #ifdef YYERROR_VERBOSE
209     # undef YYERROR_VERBOSE
210     # define YYERROR_VERBOSE 1
211     #else
212     # define YYERROR_VERBOSE 0
213     #endif
214    
215     #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
216     typedef int YYSTYPE;
217     # define yystype YYSTYPE /* obsolescent; will be withdrawn */
218     # define YYSTYPE_IS_DECLARED 1
219     # define YYSTYPE_IS_TRIVIAL 1
220     #endif
221    
222    
223    
224     /* Copy the second part of user declarations. */
225    
226    
227     /* Line 214 of yacc.c. */
228 senkov 155 #line 228 "y.tab.c"
229 schoenebeck 35
230     #if ! defined (yyoverflow) || YYERROR_VERBOSE
231    
232     /* The parser invokes alloca or malloc; define the necessary symbols. */
233    
234     # if YYSTACK_USE_ALLOCA
235     # define YYSTACK_ALLOC alloca
236     # else
237     # ifndef YYSTACK_USE_ALLOCA
238     # if defined (alloca) || defined (_ALLOCA_H)
239     # define YYSTACK_ALLOC alloca
240     # else
241     # ifdef __GNUC__
242     # define YYSTACK_ALLOC __builtin_alloca
243     # endif
244     # endif
245     # endif
246     # endif
247    
248     # ifdef YYSTACK_ALLOC
249     /* Pacify GCC's `empty if-body' warning. */
250     # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
251     # else
252     # if defined (__STDC__) || defined (__cplusplus)
253     # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
254     # define YYSIZE_T size_t
255     # endif
256     # define YYSTACK_ALLOC malloc
257     # define YYSTACK_FREE free
258     # endif
259     #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
260    
261    
262     #if (! defined (yyoverflow) \
263     && (! defined (__cplusplus) \
264     || (YYSTYPE_IS_TRIVIAL)))
265    
266     /* A type that is properly aligned for any stack member. */
267     union yyalloc
268     {
269     short yyss;
270     YYSTYPE yyvs;
271     };
272    
273     /* The size of the maximum gap between one aligned stack and the next. */
274     # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
275    
276     /* The size of an array large to enough to hold all stacks, each with
277     N elements. */
278     # define YYSTACK_BYTES(N) \
279     ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
280     + YYSTACK_GAP_MAXIMUM)
281    
282     /* Copy COUNT objects from FROM to TO. The source and destination do
283     not overlap. */
284     # ifndef YYCOPY
285     # if 1 < __GNUC__
286     # define YYCOPY(To, From, Count) \
287     __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
288     # else
289     # define YYCOPY(To, From, Count) \
290     do \
291     { \
292     register YYSIZE_T yyi; \
293     for (yyi = 0; yyi < (Count); yyi++) \
294     (To)[yyi] = (From)[yyi]; \
295     } \
296     while (0)
297     # endif
298     # endif
299    
300     /* Relocate STACK from its old location to the new one. The
301     local variables YYSIZE and YYSTACKSIZE give the old and new number of
302     elements in the stack, and YYPTR gives the new location of the
303     stack. Advance YYPTR to a properly aligned location for the next
304     stack. */
305     # define YYSTACK_RELOCATE(Stack) \
306     do \
307     { \
308     YYSIZE_T yynewbytes; \
309     YYCOPY (&yyptr->Stack, Stack, yysize); \
310     Stack = &yyptr->Stack; \
311     yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
312     yyptr += yynewbytes / sizeof (*yyptr); \
313     } \
314     while (0)
315    
316     #endif
317    
318     #if defined (__STDC__) || defined (__cplusplus)
319     typedef signed char yysigned_char;
320     #else
321     typedef short yysigned_char;
322     #endif
323    
324     /* YYFINAL -- State number of the termination state. */
325 senkov 141 #define YYFINAL 30
326 schoenebeck 35 /* YYLAST -- Last index in YYTABLE. */
327 senkov 155 #define YYLAST 285
328 schoenebeck 35
329     /* YYNTOKENS -- Number of terminals. */
330 senkov 155 #define YYNTOKENS 59
331 schoenebeck 35 /* YYNNTS -- Number of nonterminals. */
332 senkov 155 #define YYNNTS 31
333 schoenebeck 35 /* YYNRULES -- Number of rules. */
334 senkov 155 #define YYNRULES 104
335 schoenebeck 35 /* YYNRULES -- Number of states. */
336 senkov 155 #define YYNSTATES 290
337 schoenebeck 35
338     /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
339     #define YYUNDEFTOK 2
340 senkov 155 #define YYMAXUTOK 313
341 schoenebeck 35
342     #define YYTRANSLATE(YYX) \
343     ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
344    
345     /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
346     static const unsigned char yytranslate[] =
347     {
348     0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
349     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
350     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
351     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
352     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
353     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
354     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
355     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
356     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
357     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
358     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
359     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
360     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
361     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
362     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
363     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
364     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
365     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
366     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
367     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
368     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
369     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
370     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
371     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
372     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
373     2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
374     5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
375     15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
376     25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
377 schoenebeck 123 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
378 senkov 155 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
379     55, 56, 57, 58
380 schoenebeck 35 };
381    
382     #if YYDEBUG
383     /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
384     YYRHS. */
385 schoenebeck 123 static const unsigned short yyprhs[] =
386 schoenebeck 35 {
387 schoenebeck 111 0, 0, 3, 5, 9, 14, 15, 17, 19, 21,
388 schoenebeck 123 23, 26, 29, 32, 35, 39, 43, 47, 51, 55,
389 senkov 141 59, 65, 69, 73, 77, 83, 85, 87, 89, 91,
390     93, 95, 97, 99, 101, 103, 105, 107, 109, 111,
391 senkov 155 113, 119, 127, 137, 139, 145, 153, 163, 165, 167,
392     173, 179, 187, 195, 205, 207, 213, 221, 227, 233,
393     239, 247, 257, 265, 275, 279, 285, 289, 293, 297,
394     301, 305, 309, 315, 323, 329, 339, 345, 351, 355,
395     361, 363, 365, 367, 369, 375, 383, 387, 389, 391,
396     393, 395, 397, 399, 401, 403, 405, 407, 409, 411,
397     413, 415, 417, 419, 421
398 schoenebeck 35 };
399    
400     /* YYRHS -- A `-1'-separated list of the rules' RHS. */
401     static const yysigned_char yyrhs[] =
402     {
403 senkov 155 60, 0, -1, 61, -1, 60, 8, 61, -1, 60,
404     9, 8, 61, -1, -1, 62, -1, 63, -1, 1,
405     -1, 10, -1, 62, 10, -1, 62, 7, -1, 62,
406     5, -1, 62, 89, -1, 12, 7, 25, -1, 13,
407     7, 66, -1, 14, 7, 68, -1, 15, 7, 69,
408     -1, 16, 7, 74, -1, 17, 7, 70, -1, 19,
409     7, 25, 7, 83, -1, 20, 7, 67, -1, 21,
410     7, 64, -1, 22, 7, 65, -1, 23, 7, 25,
411     7, 83, -1, 24, -1, 29, -1, 33, -1, 32,
412     -1, 31, -1, 30, -1, 58, -1, 29, -1, 33,
413     -1, 32, -1, 31, -1, 30, -1, 58, -1, 27,
414     -1, 51, -1, 49, 7, 30, 7, 89, -1, 50,
415     7, 30, 7, 89, 7, 89, -1, 50, 7, 30,
416     7, 89, 7, 89, 7, 72, -1, 28, -1, 41,
417     7, 30, 7, 89, -1, 42, 7, 30, 7, 89,
418     7, 89, -1, 42, 7, 30, 7, 89, 7, 89,
419     7, 72, -1, 39, -1, 53, -1, 38, 7, 30,
420     7, 5, -1, 52, 7, 30, 7, 5, -1, 46,
421     7, 30, 7, 5, 7, 5, -1, 36, 7, 30,
422     7, 5, 7, 5, -1, 37, 7, 30, 7, 5,
423     7, 5, 7, 89, -1, 29, -1, 25, 7, 30,
424     7, 83, -1, 25, 7, 31, 7, 73, 7, 83,
425     -1, 25, 7, 32, 7, 83, -1, 25, 7, 33,
426     7, 83, -1, 35, 7, 30, 7, 86, -1, 40,
427     7, 5, 7, 89, 11, 88, -1, 37, 7, 5,
428     7, 5, 7, 89, 11, 88, -1, 54, 7, 5,
429     7, 89, 11, 88, -1, 55, 7, 5, 7, 5,
430     7, 89, 11, 88, -1, 25, 7, 71, -1, 38,
431     7, 89, 7, 72, -1, 38, 7, 89, -1, 52,
432     7, 89, -1, 38, 7, 5, -1, 52, 7, 5,
433     -1, 34, 7, 75, -1, 35, 7, 76, -1, 38,
434     7, 83, 7, 5, -1, 36, 7, 83, 7, 85,
435     7, 85, -1, 43, 7, 83, 7, 77, -1, 44,
436     7, 83, 7, 78, 7, 79, 7, 80, -1, 45,
437     7, 83, 7, 81, -1, 48, 7, 83, 7, 82,
438     -1, 89, 11, 88, -1, 72, 7, 89, 11, 88,
439     -1, 56, -1, 57, -1, 39, -1, 53, -1, 87,
440     7, 84, 7, 83, -1, 18, 7, 87, 7, 84,
441     7, 83, -1, 86, 7, 83, -1, 89, -1, 5,
442     -1, 5, -1, 5, -1, 89, -1, 4, -1, 5,
443     -1, 5, -1, 5, -1, 5, -1, 89, -1, 6,
444     -1, 89, -1, 6, -1, 5, -1, 4, -1, 3,
445     -1, 89, 3, -1
446 schoenebeck 35 };
447    
448     /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
449     static const unsigned char yyrline[] =
450     {
451 senkov 155 0, 78, 78, 79, 80, 83, 84, 85, 86, 89,
452     90, 91, 92, 93, 96, 97, 98, 99, 100, 101,
453     102, 103, 104, 105, 106, 107, 110, 111, 112, 113,
454     114, 115, 118, 119, 120, 121, 122, 123, 126, 127,
455     128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
456     138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
457     150, 151, 152, 153, 154, 157, 158, 159, 162, 163,
458     166, 167, 170, 171, 172, 173, 174, 175, 178, 179,
459     182, 183, 186, 187, 190, 191, 194, 197, 200, 203,
460     206, 209, 212, 213, 216, 219, 222, 225, 228, 229,
461     232, 233, 234, 237, 238
462 schoenebeck 35 };
463     #endif
464    
465     #if YYDEBUG || YYERROR_VERBOSE
466     /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
467     First, the terminals, then, starting at YYNTOKENS, nonterminals. */
468     static const char *const yytname[] =
469     {
470 senkov 135 "$end", "error", "$undefined", "CHAR", "DOTNUM", "NUMBER", "STRINGVAL",
471     "SP", "LF", "CR", "HASH", "EQ", "ADD", "GET", "CREATE", "DESTROY",
472 senkov 141 "LIST", "LOAD", "NON_MODAL", "REMOVE", "SET", "SUBSCRIBE",
473 senkov 135 "UNSUBSCRIBE", "RESET", "QUIT", "CHANNEL", "NOTIFICATION",
474     "AVAILABLE_ENGINES", "AVAILABLE_AUDIO_OUTPUT_DRIVERS", "CHANNELS",
475     "INFO", "BUFFER_FILL", "STREAM_COUNT", "VOICE_COUNT", "INSTRUMENT",
476     "ENGINE", "AUDIO_OUTPUT_CHANNEL", "AUDIO_OUTPUT_CHANNEL_PARAMETER",
477     "AUDIO_OUTPUT_DEVICE", "AUDIO_OUTPUT_DEVICES",
478     "AUDIO_OUTPUT_DEVICE_PARAMETER", "AUDIO_OUTPUT_DRIVER",
479 senkov 155 "AUDIO_OUTPUT_DRIVER_PARAMETER", "AUDIO_OUTPUT_TYPE", "MIDI_INPUT",
480     "MIDI_INPUT_TYPE", "MIDI_INPUT_PORT", "MIDI_INPUT_CHANNEL", "VOLUME",
481     "MIDI_INPUT_DRIVER", "MIDI_INPUT_DRIVER_PARAMETER",
482     "AVAILABLE_MIDI_INPUT_DRIVERS", "MIDI_INPUT_DEVICE",
483     "MIDI_INPUT_DEVICES", "MIDI_INPUT_DEVICE_PARAMETER",
484     "MIDI_INPUT_PORT_PARAMETER", "BYTES", "PERCENTAGE", "MISCELLANEOUS",
485     "$accept", "input", "line", "comment", "command", "subscribe_event",
486     "unsubscribe_event", "get_instruction", "set_instruction",
487     "create_instruction", "destroy_instruction", "load_instruction",
488     "set_chan_instruction", "key_val_list", "buffer_size_type",
489     "list_instruction", "load_instr_args", "load_engine_args",
490     "audio_output_type", "midi_input_device", "midi_input_port",
491     "midi_input_channel", "midi_input_type", "volume", "sampler_channel",
492     "instrument_index", "audio_output_channel", "engine_name", "filename",
493 capela 143 "param_val", "string", 0
494 schoenebeck 35 };
495     #endif
496    
497     # ifdef YYPRINT
498     /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
499     token YYLEX-NUM. */
500     static const unsigned short yytoknum[] =
501     {
502     0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
503     265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
504     275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
505 schoenebeck 123 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
506 capela 143 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
507 senkov 155 305, 306, 307, 308, 309, 310, 311, 312, 313
508 schoenebeck 35 };
509     # endif
510    
511     /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
512     static const unsigned char yyr1[] =
513     {
514 senkov 155 0, 59, 60, 60, 60, 61, 61, 61, 61, 62,
515     62, 62, 62, 62, 63, 63, 63, 63, 63, 63,
516     63, 63, 63, 63, 63, 63, 64, 64, 64, 64,
517     64, 64, 65, 65, 65, 65, 65, 65, 66, 66,
518     66, 66, 66, 66, 66, 66, 66, 66, 66, 66,
519     66, 66, 66, 66, 66, 66, 66, 66, 66, 66,
520     67, 67, 67, 67, 67, 68, 68, 68, 69, 69,
521     70, 70, 71, 71, 71, 71, 71, 71, 72, 72,
522     73, 73, 74, 74, 75, 75, 76, 77, 78, 79,
523     80, 81, 82, 82, 83, 84, 85, 86, 87, 87,
524     88, 88, 88, 89, 89
525 schoenebeck 35 };
526    
527     /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
528     static const unsigned char yyr2[] =
529     {
530 schoenebeck 111 0, 2, 1, 3, 4, 0, 1, 1, 1, 1,
531 schoenebeck 123 2, 2, 2, 2, 3, 3, 3, 3, 3, 3,
532 senkov 141 5, 3, 3, 3, 5, 1, 1, 1, 1, 1,
533 senkov 135 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
534 senkov 155 5, 7, 9, 1, 5, 7, 9, 1, 1, 5,
535     5, 7, 7, 9, 1, 5, 7, 5, 5, 5,
536     7, 9, 7, 9, 3, 5, 3, 3, 3, 3,
537     3, 3, 5, 7, 5, 9, 5, 5, 3, 5,
538     1, 1, 1, 1, 5, 7, 3, 1, 1, 1,
539 capela 143 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
540 senkov 155 1, 1, 1, 1, 2
541 schoenebeck 35 };
542    
543     /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
544     STATE-NUM when YYTABLE doesn't specify something else to do. Zero
545     means the default is an error. */
546     static const unsigned char yydefact[] =
547     {
548 schoenebeck 111 0, 8, 9, 0, 0, 0, 0, 0, 0, 0,
549 senkov 141 0, 0, 0, 0, 25, 0, 2, 6, 7, 0,
550 schoenebeck 123 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
551 senkov 155 1, 0, 0, 103, 12, 11, 10, 13, 14, 0,
552     38, 43, 54, 0, 0, 0, 0, 47, 0, 0,
553     0, 0, 0, 39, 0, 48, 15, 0, 0, 16,
554     0, 0, 17, 82, 83, 18, 0, 0, 19, 0,
555     0, 0, 0, 0, 0, 21, 26, 30, 29, 28,
556     27, 31, 22, 32, 36, 35, 34, 33, 37, 23,
557     0, 3, 0, 104, 0, 0, 0, 0, 0, 0,
558 schoenebeck 123 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
559 senkov 155 0, 0, 0, 0, 0, 0, 0, 0, 4, 0,
560 schoenebeck 123 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
561 senkov 155 0, 0, 0, 66, 67, 68, 69, 98, 0, 70,
562     0, 99, 71, 0, 97, 94, 20, 0, 0, 0,
563     0, 0, 0, 64, 0, 0, 0, 0, 24, 0,
564 schoenebeck 123 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
565 capela 143 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
566 senkov 155 0, 0, 0, 0, 0, 0, 0, 55, 80, 81,
567     0, 57, 58, 59, 0, 0, 49, 44, 0, 0,
568     40, 0, 50, 65, 0, 0, 95, 0, 86, 0,
569     0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
570     0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
571     0, 0, 0, 0, 0, 0, 0, 0, 0, 56,
572     52, 0, 45, 51, 41, 0, 102, 101, 100, 78,
573     0, 84, 96, 0, 72, 74, 87, 88, 0, 76,
574     91, 92, 93, 77, 0, 60, 62, 0, 0, 0,
575     0, 0, 0, 0, 0, 0, 0, 53, 46, 42,
576     79, 85, 73, 89, 0, 61, 63, 0, 90, 75
577 schoenebeck 35 };
578    
579     /* YYDEFGOTO[NTERM-NUM]. */
580     static const short yydefgoto[] =
581     {
582 senkov 155 -1, 15, 16, 17, 18, 82, 89, 56, 75, 59,
583     62, 68, 153, 203, 190, 65, 139, 142, 255, 258,
584     284, 289, 259, 263, 146, 207, 253, 143, 140, 249,
585     204
586 schoenebeck 35 };
587    
588     /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
589     STATE-NUM. */
590 senkov 155 #define YYPACT_NINF -235
591 schoenebeck 123 static const short yypact[] =
592 schoenebeck 35 {
593 senkov 155 101, -235, -235, 10, 40, 62, 78, 83, 92, 112,
594     133, 138, 140, 141, -235, 44, -235, 134, -235, 127,
595     45, -24, -20, -14, 71, 130, -21, -22, -9, 135,
596     -235, 101, 150, -235, -235, -235, -235, 146, -235, 152,
597     -235, -235, -235, 154, 155, 156, 157, -235, 158, 159,
598     162, 163, 164, -235, 165, -235, -235, 166, 167, -235,
599     168, 169, -235, -235, -235, -235, 170, 171, -235, 172,
600     173, 174, 175, 176, 177, -235, -235, -235, -235, -235,
601     -235, -235, -235, -235, -235, -235, -235, -235, -235, -235,
602     178, -235, 101, -235, 24, 160, 161, 179, 180, 181,
603     182, 183, 185, 187, 189, 184, 184, 188, 190, 9,
604     184, 191, 90, 192, 193, 194, 195, 191, -235, 196,
605     197, 199, 213, 215, 216, 217, 218, 219, 220, 221,
606     222, 223, 224, 28, 146, -235, -235, -235, 225, -235,
607     226, 146, -235, 227, 146, -235, -235, 228, 229, 230,
608     231, 232, 233, -235, 234, 235, 236, 237, -235, 191,
609     51, 191, 191, 184, 240, 241, 242, 184, 184, 243,
610     184, 184, 244, 184, 23, 245, 191, 191, 191, 191,
611     191, 191, 191, 247, 184, 184, 248, -235, -235, -235,
612     249, -235, -235, -235, 250, 251, -235, 146, 68, 252,
613     146, 97, -235, 253, 2, 254, -235, 255, -235, 256,
614     257, 258, 259, 260, 261, 262, 27, 37, 263, 191,
615     266, 267, 184, 268, 184, 184, 73, 245, 191, 269,
616     270, 184, 271, 184, 125, 184, 73, 73, 184, -235,
617     -235, 272, 124, -235, 129, 47, -235, -235, -235, -235,
618     273, -235, -235, 274, -235, -235, 146, -235, 275, -235,
619     146, -235, -235, -235, 48, -235, -235, 65, 184, 184,
620     184, 73, 191, 269, 278, 73, 73, 146, 253, 253,
621     -235, -235, -235, -235, 277, -235, -235, 280, -235, -235
622 schoenebeck 35 };
623    
624     /* YYPGOTO[NTERM-NUM]. */
625 senkov 135 static const short yypgoto[] =
626 schoenebeck 35 {
627 senkov 155 -235, -235, -25, -235, -235, -235, -235, -235, -235, -235,
628     -235, -235, -235, -127, -235, -235, -235, -235, -235, -235,
629     -235, -235, -235, -235, -116, -41, -85, 26, 18, -234,
630     -17
631 schoenebeck 35 };
632    
633     /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
634     positive, shift that token. If negative, reduce the rule which
635     number is the opposite. If zero, do what YYDEFACT says.
636     If YYTABLE_NINF, syntax error. */
637 senkov 135 #define YYTABLE_NINF -6
638 schoenebeck 35 static const short yytable[] =
639     {
640 senkov 155 37, 158, 265, 266, 70, 93, 91, 76, 77, 78,
641     79, 80, 33, 226, 57, 137, 71, 19, 60, 72,
642     83, 84, 85, 86, 87, 63, 33, 138, 58, 137,
643     93, 93, 61, 73, 74, 173, 81, 280, 236, 64,
644     93, 285, 286, 187, 30, 191, 192, 20, 237, 88,
645     93, 93, 31, 32, 119, 120, 121, 122, 271, 275,
646     208, 209, 210, 211, 212, 213, 214, 118, 93, 21,
647     39, 93, 40, 41, 42, 222, 276, 246, 247, 248,
648     43, 44, 45, 46, 47, 22, 48, 49, 133, 134,
649     23, 50, 141, 144, 51, 52, 53, 54, 55, 24,
650     93, -5, 1, 239, 224, 66, 67, 188, 189, -5,
651     -5, 2, 251, 3, 4, 5, 6, 7, 8, 25,
652     9, 10, 11, 12, 13, 14, 147, 93, 148, 261,
653     262, 269, 93, 149, 150, 151, 270, 33, 152, 34,
654     26, 35, 278, 279, 36, 27, 144, 28, 29, 93,
655     197, 198, 38, 200, 201, 69, 281, 141, 92, 94,
656     90, 95, 96, 97, 98, 99, 100, 216, 217, 101,
657     102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
658     112, 113, 114, 115, 116, 117, 250, 33, 282, 193,
659     123, 124, 205, 135, 0, 136, 145, 154, 155, 156,
660     157, 0, 0, 159, 160, 242, 161, 244, 245, 125,
661     126, 127, 128, 129, 256, 130, 260, 131, 264, 132,
662     162, 267, 163, 164, 165, 166, 167, 168, 169, 170,
663     171, 172, 174, 175, 176, 177, 178, 179, 180, 181,
664     182, 183, 184, 185, 186, 194, 195, 196, 199, 202,
665     206, 277, 215, 218, 0, 0, 219, 220, 221, 223,
666     225, 227, 228, 229, 230, 231, 232, 233, 234, 235,
667     238, 240, 241, 243, 252, 254, 257, 0, 0, 268,
668     272, 273, 274, 283, 287, 288
669 schoenebeck 35 };
670    
671 schoenebeck 123 static const short yycheck[] =
672 schoenebeck 35 {
673 senkov 155 17, 117, 236, 237, 25, 3, 31, 29, 30, 31,
674     32, 33, 3, 11, 38, 6, 37, 7, 38, 40,
675     29, 30, 31, 32, 33, 39, 3, 18, 52, 6,
676     3, 3, 52, 54, 55, 7, 58, 271, 11, 53,
677     3, 275, 276, 159, 0, 161, 162, 7, 11, 58,
678     3, 3, 8, 9, 30, 31, 32, 33, 11, 11,
679     176, 177, 178, 179, 180, 181, 182, 92, 3, 7,
680     25, 3, 27, 28, 29, 7, 11, 4, 5, 6,
681     35, 36, 37, 38, 39, 7, 41, 42, 105, 106,
682     7, 46, 109, 110, 49, 50, 51, 52, 53, 7,
683     3, 0, 1, 219, 7, 34, 35, 56, 57, 8,
684     9, 10, 228, 12, 13, 14, 15, 16, 17, 7,
685     19, 20, 21, 22, 23, 24, 36, 3, 38, 4,
686     5, 7, 3, 43, 44, 45, 7, 3, 48, 5,
687     7, 7, 269, 270, 10, 7, 163, 7, 7, 3,
688     167, 168, 25, 170, 171, 25, 272, 174, 8, 7,
689     25, 7, 7, 7, 7, 7, 7, 184, 185, 7,
690 capela 143 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
691 senkov 155 7, 7, 7, 7, 7, 7, 227, 3, 273, 163,
692     30, 30, 174, 5, -1, 5, 5, 5, 5, 5,
693     5, -1, -1, 7, 7, 222, 7, 224, 225, 30,
694     30, 30, 30, 30, 231, 30, 233, 30, 235, 30,
695     7, 238, 7, 7, 7, 7, 7, 7, 7, 7,
696 capela 143 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
697 senkov 155 7, 7, 7, 7, 7, 5, 5, 5, 5, 5,
698     5, 268, 5, 5, -1, -1, 7, 7, 7, 7,
699     7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
700     7, 5, 5, 5, 5, 5, 5, -1, -1, 7,
701     7, 7, 7, 5, 7, 5
702 schoenebeck 35 };
703    
704     /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
705     symbol of state STATE-NUM. */
706     static const unsigned char yystos[] =
707     {
708 senkov 141 0, 1, 10, 12, 13, 14, 15, 16, 17, 19,
709 senkov 155 20, 21, 22, 23, 24, 60, 61, 62, 63, 7,
710 senkov 135 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
711 senkov 155 0, 8, 9, 3, 5, 7, 10, 89, 25, 25,
712 senkov 141 27, 28, 29, 35, 36, 37, 38, 39, 41, 42,
713 senkov 155 46, 49, 50, 51, 52, 53, 66, 38, 52, 68,
714     38, 52, 69, 39, 53, 74, 34, 35, 70, 25,
715     25, 37, 40, 54, 55, 67, 29, 30, 31, 32,
716     33, 58, 64, 29, 30, 31, 32, 33, 58, 65,
717     25, 61, 8, 3, 7, 7, 7, 7, 7, 7,
718 senkov 135 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
719 senkov 155 7, 7, 7, 7, 7, 7, 7, 7, 61, 30,
720     31, 32, 33, 30, 30, 30, 30, 30, 30, 30,
721     30, 30, 30, 89, 89, 5, 5, 6, 18, 75,
722     87, 89, 76, 86, 89, 5, 83, 36, 38, 43,
723     44, 45, 48, 71, 5, 5, 5, 5, 83, 7,
724     7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
725     7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
726     7, 7, 7, 7, 7, 7, 7, 83, 56, 57,
727     73, 83, 83, 86, 5, 5, 5, 89, 89, 5,
728     89, 89, 5, 72, 89, 87, 5, 84, 83, 83,
729     83, 83, 83, 83, 83, 5, 89, 89, 5, 7,
730     7, 7, 7, 7, 7, 7, 11, 7, 7, 7,
731     7, 7, 7, 7, 7, 7, 11, 11, 7, 83,
732     5, 5, 89, 5, 89, 89, 4, 5, 6, 88,
733     84, 83, 5, 85, 5, 77, 89, 5, 78, 81,
734     89, 4, 5, 82, 89, 88, 88, 89, 7, 7,
735     7, 11, 7, 7, 7, 11, 11, 89, 72, 72,
736     88, 83, 85, 5, 79, 88, 88, 7, 5, 80
737 schoenebeck 35 };
738    
739     #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
740     # define YYSIZE_T __SIZE_TYPE__
741     #endif
742     #if ! defined (YYSIZE_T) && defined (size_t)
743     # define YYSIZE_T size_t
744     #endif
745     #if ! defined (YYSIZE_T)
746     # if defined (__STDC__) || defined (__cplusplus)
747     # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
748     # define YYSIZE_T size_t
749     # endif
750     #endif
751     #if ! defined (YYSIZE_T)
752     # define YYSIZE_T unsigned int
753     #endif
754    
755     #define yyerrok (yyerrstatus = 0)
756     #define yyclearin (yychar = YYEMPTY)
757     #define YYEMPTY (-2)
758     #define YYEOF 0
759    
760     #define YYACCEPT goto yyacceptlab
761     #define YYABORT goto yyabortlab
762     #define YYERROR goto yyerrlab1
763    
764    
765     /* Like YYERROR except do call yyerror. This remains here temporarily
766     to ease the transition to the new meaning of YYERROR, for GCC.
767     Once GCC version 2 has supplanted version 1, this can go. */
768    
769     #define YYFAIL goto yyerrlab
770    
771     #define YYRECOVERING() (!!yyerrstatus)
772    
773     #define YYBACKUP(Token, Value) \
774     do \
775     if (yychar == YYEMPTY && yylen == 1) \
776     { \
777     yychar = (Token); \
778     yylval = (Value); \
779     yytoken = YYTRANSLATE (yychar); \
780     YYPOPSTACK; \
781     goto yybackup; \
782     } \
783     else \
784     { \
785     yyerror ("syntax error: cannot back up");\
786     YYERROR; \
787     } \
788     while (0)
789    
790     #define YYTERROR 1
791     #define YYERRCODE 256
792    
793     /* YYLLOC_DEFAULT -- Compute the default location (before the actions
794     are run). */
795    
796     #ifndef YYLLOC_DEFAULT
797     # define YYLLOC_DEFAULT(Current, Rhs, N) \
798     Current.first_line = Rhs[1].first_line; \
799     Current.first_column = Rhs[1].first_column; \
800     Current.last_line = Rhs[N].last_line; \
801     Current.last_column = Rhs[N].last_column;
802     #endif
803    
804     /* YYLEX -- calling `yylex' with the right arguments. */
805    
806     #ifdef YYLEX_PARAM
807     # define YYLEX yylex (&yylval, YYLEX_PARAM)
808     #else
809     # define YYLEX yylex (&yylval)
810     #endif
811    
812     /* Enable debugging if requested. */
813     #if YYDEBUG
814    
815     # ifndef YYFPRINTF
816     # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
817     # define YYFPRINTF fprintf
818     # endif
819    
820     # define YYDPRINTF(Args) \
821     do { \
822     if (yydebug) \
823     YYFPRINTF Args; \
824     } while (0)
825    
826     # define YYDSYMPRINT(Args) \
827     do { \
828     if (yydebug) \
829     yysymprint Args; \
830     } while (0)
831    
832     # define YYDSYMPRINTF(Title, Token, Value, Location) \
833     do { \
834     if (yydebug) \
835     { \
836     YYFPRINTF (stderr, "%s ", Title); \
837     yysymprint (stderr, \
838     Token, Value); \
839     YYFPRINTF (stderr, "\n"); \
840     } \
841     } while (0)
842    
843     /*------------------------------------------------------------------.
844     | yy_stack_print -- Print the state stack from its BOTTOM up to its |
845     | TOP (cinluded). |
846     `------------------------------------------------------------------*/
847    
848     #if defined (__STDC__) || defined (__cplusplus)
849     static void
850     yy_stack_print (short *bottom, short *top)
851     #else
852     static void
853     yy_stack_print (bottom, top)
854     short *bottom;
855     short *top;
856     #endif
857     {
858     YYFPRINTF (stderr, "Stack now");
859     for (/* Nothing. */; bottom <= top; ++bottom)
860     YYFPRINTF (stderr, " %d", *bottom);
861     YYFPRINTF (stderr, "\n");
862     }
863    
864     # define YY_STACK_PRINT(Bottom, Top) \
865     do { \
866     if (yydebug) \
867     yy_stack_print ((Bottom), (Top)); \
868     } while (0)
869    
870    
871     /*------------------------------------------------.
872     | Report that the YYRULE is going to be reduced. |
873     `------------------------------------------------*/
874    
875     #if defined (__STDC__) || defined (__cplusplus)
876     static void
877     yy_reduce_print (int yyrule)
878     #else
879     static void
880     yy_reduce_print (yyrule)
881     int yyrule;
882     #endif
883     {
884     int yyi;
885     unsigned int yylineno = yyrline[yyrule];
886     YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
887     yyrule - 1, yylineno);
888     /* Print the symbols being reduced, and their result. */
889     for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
890     YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
891     YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
892     }
893    
894     # define YY_REDUCE_PRINT(Rule) \
895     do { \
896     if (yydebug) \
897     yy_reduce_print (Rule); \
898     } while (0)
899    
900     /* Nonzero means print parse trace. It is left uninitialized so that
901     multiple parsers can coexist. */
902     int yydebug;
903     #else /* !YYDEBUG */
904     # define YYDPRINTF(Args)
905     # define YYDSYMPRINT(Args)
906     # define YYDSYMPRINTF(Title, Token, Value, Location)
907     # define YY_STACK_PRINT(Bottom, Top)
908     # define YY_REDUCE_PRINT(Rule)
909     #endif /* !YYDEBUG */
910    
911    
912     /* YYINITDEPTH -- initial size of the parser's stacks. */
913     #ifndef YYINITDEPTH
914     # define YYINITDEPTH 200
915     #endif
916    
917     /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
918     if the built-in stack extension method is used).
919    
920     Do not make this value too large; the results are undefined if
921     SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
922     evaluated with infinite-precision integer arithmetic. */
923    
924     #if YYMAXDEPTH == 0
925     # undef YYMAXDEPTH
926     #endif
927    
928     #ifndef YYMAXDEPTH
929     # define YYMAXDEPTH 10000
930     #endif
931    
932    
933    
934     #if YYERROR_VERBOSE
935    
936     # ifndef yystrlen
937     # if defined (__GLIBC__) && defined (_STRING_H)
938     # define yystrlen strlen
939     # else
940     /* Return the length of YYSTR. */
941     static YYSIZE_T
942     # if defined (__STDC__) || defined (__cplusplus)
943     yystrlen (const char *yystr)
944     # else
945     yystrlen (yystr)
946     const char *yystr;
947     # endif
948     {
949     register const char *yys = yystr;
950    
951     while (*yys++ != '\0')
952     continue;
953    
954     return yys - yystr - 1;
955     }
956     # endif
957     # endif
958    
959     # ifndef yystpcpy
960     # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
961     # define yystpcpy stpcpy
962     # else
963     /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
964     YYDEST. */
965     static char *
966     # if defined (__STDC__) || defined (__cplusplus)
967     yystpcpy (char *yydest, const char *yysrc)
968     # else
969     yystpcpy (yydest, yysrc)
970     char *yydest;
971     const char *yysrc;
972     # endif
973     {
974     register char *yyd = yydest;
975     register const char *yys = yysrc;
976    
977     while ((*yyd++ = *yys++) != '\0')
978     continue;
979    
980     return yyd - 1;
981     }
982     # endif
983     # endif
984    
985     #endif /* !YYERROR_VERBOSE */
986    
987    
988    
989     #if YYDEBUG
990     /*--------------------------------.
991     | Print this symbol on YYOUTPUT. |
992     `--------------------------------*/
993    
994     #if defined (__STDC__) || defined (__cplusplus)
995     static void
996     yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
997     #else
998     static void
999     yysymprint (yyoutput, yytype, yyvaluep)
1000     FILE *yyoutput;
1001     int yytype;
1002     YYSTYPE *yyvaluep;
1003     #endif
1004     {
1005     /* Pacify ``unused variable'' warnings. */
1006     (void) yyvaluep;
1007    
1008     if (yytype < YYNTOKENS)
1009     {
1010     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1011     # ifdef YYPRINT
1012     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1013     # endif
1014     }
1015     else
1016     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1017    
1018     switch (yytype)
1019     {
1020     default:
1021     break;
1022     }
1023     YYFPRINTF (yyoutput, ")");
1024     }
1025    
1026     #endif /* ! YYDEBUG */
1027     /*-----------------------------------------------.
1028     | Release the memory associated to this symbol. |
1029     `-----------------------------------------------*/
1030    
1031     #if defined (__STDC__) || defined (__cplusplus)
1032     static void
1033     yydestruct (int yytype, YYSTYPE *yyvaluep)
1034     #else
1035     static void
1036     yydestruct (yytype, yyvaluep)
1037     int yytype;
1038     YYSTYPE *yyvaluep;
1039     #endif
1040     {
1041     /* Pacify ``unused variable'' warnings. */
1042     (void) yyvaluep;
1043    
1044     switch (yytype)
1045     {
1046    
1047     default:
1048     break;
1049     }
1050     }
1051    
1052    
1053     /* Prevent warnings from -Wmissing-prototypes. */
1054    
1055     #ifdef YYPARSE_PARAM
1056     # if defined (__STDC__) || defined (__cplusplus)
1057     int yyparse (void *YYPARSE_PARAM);
1058     # else
1059     int yyparse ();
1060     # endif
1061     #else /* ! YYPARSE_PARAM */
1062     #if defined (__STDC__) || defined (__cplusplus)
1063     int yyparse (void);
1064     #else
1065     int yyparse ();
1066     #endif
1067     #endif /* ! YYPARSE_PARAM */
1068    
1069    
1070    
1071    
1072    
1073    
1074     /*----------.
1075     | yyparse. |
1076     `----------*/
1077    
1078     #ifdef YYPARSE_PARAM
1079     # if defined (__STDC__) || defined (__cplusplus)
1080     int yyparse (void *YYPARSE_PARAM)
1081     # else
1082     int yyparse (YYPARSE_PARAM)
1083     void *YYPARSE_PARAM;
1084     # endif
1085     #else /* ! YYPARSE_PARAM */
1086     #if defined (__STDC__) || defined (__cplusplus)
1087     int
1088     yyparse (void)
1089     #else
1090     int
1091     yyparse ()
1092    
1093     #endif
1094     #endif
1095     {
1096     /* The lookahead symbol. */
1097     int yychar;
1098    
1099     /* The semantic value of the lookahead symbol. */
1100     YYSTYPE yylval;
1101    
1102     /* Number of syntax errors so far. */
1103     int yynerrs;
1104    
1105     register int yystate;
1106     register int yyn;
1107     int yyresult;
1108     /* Number of tokens to shift before error messages enabled. */
1109     int yyerrstatus;
1110     /* Lookahead token as an internal (translated) token number. */
1111     int yytoken = 0;
1112    
1113     /* Three stacks and their tools:
1114     `yyss': related to states,
1115     `yyvs': related to semantic values,
1116     `yyls': related to locations.
1117    
1118     Refer to the stacks thru separate pointers, to allow yyoverflow
1119     to reallocate them elsewhere. */
1120    
1121     /* The state stack. */
1122     short yyssa[YYINITDEPTH];
1123     short *yyss = yyssa;
1124     register short *yyssp;
1125    
1126     /* The semantic value stack. */
1127     YYSTYPE yyvsa[YYINITDEPTH];
1128     YYSTYPE *yyvs = yyvsa;
1129     register YYSTYPE *yyvsp;
1130    
1131    
1132    
1133     #define YYPOPSTACK (yyvsp--, yyssp--)
1134    
1135     YYSIZE_T yystacksize = YYINITDEPTH;
1136    
1137     /* The variables used to return semantic value and location from the
1138     action routines. */
1139     YYSTYPE yyval;
1140    
1141    
1142     /* When reducing, the number of symbols on the RHS of the reduced
1143     rule. */
1144     int yylen;
1145    
1146     YYDPRINTF ((stderr, "Starting parse\n"));
1147    
1148     yystate = 0;
1149     yyerrstatus = 0;
1150     yynerrs = 0;
1151     yychar = YYEMPTY; /* Cause a token to be read. */
1152    
1153     /* Initialize stack pointers.
1154     Waste one element of value and location stack
1155     so that they stay on the same level as the state stack.
1156     The wasted elements are never initialized. */
1157    
1158     yyssp = yyss;
1159     yyvsp = yyvs;
1160    
1161     goto yysetstate;
1162    
1163     /*------------------------------------------------------------.
1164     | yynewstate -- Push a new state, which is found in yystate. |
1165     `------------------------------------------------------------*/
1166     yynewstate:
1167     /* In all cases, when you get here, the value and location stacks
1168     have just been pushed. so pushing a state here evens the stacks.
1169     */
1170     yyssp++;
1171    
1172     yysetstate:
1173     *yyssp = yystate;
1174    
1175     if (yyss + yystacksize - 1 <= yyssp)
1176     {
1177     /* Get the current used size of the three stacks, in elements. */
1178     YYSIZE_T yysize = yyssp - yyss + 1;
1179    
1180     #ifdef yyoverflow
1181     {
1182     /* Give user a chance to reallocate the stack. Use copies of
1183     these so that the &'s don't force the real ones into
1184     memory. */
1185     YYSTYPE *yyvs1 = yyvs;
1186     short *yyss1 = yyss;
1187    
1188    
1189     /* Each stack pointer address is followed by the size of the
1190     data in use in that stack, in bytes. This used to be a
1191     conditional around just the two extra args, but that might
1192     be undefined if yyoverflow is a macro. */
1193     yyoverflow ("parser stack overflow",
1194     &yyss1, yysize * sizeof (*yyssp),
1195     &yyvs1, yysize * sizeof (*yyvsp),
1196    
1197     &yystacksize);
1198    
1199     yyss = yyss1;
1200     yyvs = yyvs1;
1201     }
1202     #else /* no yyoverflow */
1203     # ifndef YYSTACK_RELOCATE
1204     goto yyoverflowlab;
1205     # else
1206     /* Extend the stack our own way. */
1207     if (YYMAXDEPTH <= yystacksize)
1208     goto yyoverflowlab;
1209     yystacksize *= 2;
1210     if (YYMAXDEPTH < yystacksize)
1211     yystacksize = YYMAXDEPTH;
1212    
1213     {
1214     short *yyss1 = yyss;
1215     union yyalloc *yyptr =
1216     (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1217     if (! yyptr)
1218     goto yyoverflowlab;
1219     YYSTACK_RELOCATE (yyss);
1220     YYSTACK_RELOCATE (yyvs);
1221    
1222     # undef YYSTACK_RELOCATE
1223     if (yyss1 != yyssa)
1224     YYSTACK_FREE (yyss1);
1225     }
1226     # endif
1227     #endif /* no yyoverflow */
1228    
1229     yyssp = yyss + yysize - 1;
1230     yyvsp = yyvs + yysize - 1;
1231    
1232    
1233     YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1234     (unsigned long int) yystacksize));
1235    
1236     if (yyss + yystacksize - 1 <= yyssp)
1237     YYABORT;
1238     }
1239    
1240     YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1241    
1242     goto yybackup;
1243    
1244     /*-----------.
1245     | yybackup. |
1246     `-----------*/
1247     yybackup:
1248    
1249     /* Do appropriate processing given the current state. */
1250     /* Read a lookahead token if we need one and don't already have one. */
1251     /* yyresume: */
1252    
1253     /* First try to decide what to do without reference to lookahead token. */
1254    
1255     yyn = yypact[yystate];
1256     if (yyn == YYPACT_NINF)
1257     goto yydefault;
1258    
1259     /* Not known => get a lookahead token if don't already have one. */
1260    
1261     /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1262     if (yychar == YYEMPTY)
1263     {
1264     YYDPRINTF ((stderr, "Reading a token: "));
1265     yychar = YYLEX;
1266     }
1267    
1268     if (yychar <= YYEOF)
1269     {
1270     yychar = yytoken = YYEOF;
1271     YYDPRINTF ((stderr, "Now at end of input.\n"));
1272     }
1273     else
1274     {
1275     yytoken = YYTRANSLATE (yychar);
1276     YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
1277     }
1278    
1279     /* If the proper action on seeing token YYTOKEN is to reduce or to
1280     detect an error, take that action. */
1281     yyn += yytoken;
1282     if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1283     goto yydefault;
1284     yyn = yytable[yyn];
1285     if (yyn <= 0)
1286     {
1287     if (yyn == 0 || yyn == YYTABLE_NINF)
1288     goto yyerrlab;
1289     yyn = -yyn;
1290     goto yyreduce;
1291     }
1292    
1293     if (yyn == YYFINAL)
1294     YYACCEPT;
1295    
1296     /* Shift the lookahead token. */
1297     YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
1298    
1299     /* Discard the token being shifted unless it is eof. */
1300     if (yychar != YYEOF)
1301     yychar = YYEMPTY;
1302    
1303     *++yyvsp = yylval;
1304    
1305    
1306     /* Count tokens shifted since error; after three, turn off error
1307     status. */
1308     if (yyerrstatus)
1309     yyerrstatus--;
1310    
1311     yystate = yyn;
1312     goto yynewstate;
1313    
1314    
1315     /*-----------------------------------------------------------.
1316     | yydefault -- do the default action for the current state. |
1317     `-----------------------------------------------------------*/
1318     yydefault:
1319     yyn = yydefact[yystate];
1320     if (yyn == 0)
1321     goto yyerrlab;
1322     goto yyreduce;
1323    
1324    
1325     /*-----------------------------.
1326     | yyreduce -- Do a reduction. |
1327     `-----------------------------*/
1328     yyreduce:
1329     /* yyn is the number of a rule to reduce with. */
1330     yylen = yyr2[yyn];
1331    
1332     /* If YYLEN is nonzero, implement the default value of the action:
1333     `$$ = $1'.
1334    
1335     Otherwise, the following line sets YYVAL to garbage.
1336     This behavior is undocumented and Bison
1337     users should not rely upon it. Assigning to YYVAL
1338     unconditionally makes the parser a bit smaller, and it avoids a
1339     GCC warning that YYVAL may be used uninitialized. */
1340     yyval = yyvsp[1-yylen];
1341    
1342    
1343     YY_REDUCE_PRINT (yyn);
1344     switch (yyn)
1345     {
1346 schoenebeck 111 case 7:
1347 senkov 155 #line 85 "lscp.y"
1348 schoenebeck 35 { LSCPSERVER->AnswerClient(yyvsp[0].String); }
1349     break;
1350    
1351 schoenebeck 111 case 8:
1352 senkov 155 #line 86 "lscp.y"
1353 schoenebeck 35 { LSCPSERVER->AnswerClient("Err:0:Unknown command.\r\n"); RESTART; return LSCP_SYNTAX_ERROR; }
1354     break;
1355    
1356 schoenebeck 111 case 14:
1357 senkov 155 #line 96 "lscp.y"
1358 schoenebeck 35 { yyval.String = LSCPSERVER->AddChannel(); }
1359     break;
1360    
1361 schoenebeck 111 case 15:
1362 senkov 155 #line 97 "lscp.y"
1363 schoenebeck 35 { yyval.String = yyvsp[0].String; }
1364     break;
1365    
1366 schoenebeck 111 case 16:
1367 senkov 155 #line 98 "lscp.y"
1368 schoenebeck 35 { yyval.String = yyvsp[0].String; }
1369     break;
1370    
1371 schoenebeck 111 case 17:
1372 senkov 155 #line 99 "lscp.y"
1373 schoenebeck 123 { yyval.String = yyvsp[0].String; }
1374 schoenebeck 35 break;
1375    
1376 schoenebeck 111 case 18:
1377 senkov 155 #line 100 "lscp.y"
1378 schoenebeck 35 { yyval.String = yyvsp[0].String; }
1379     break;
1380    
1381 schoenebeck 111 case 19:
1382 senkov 155 #line 101 "lscp.y"
1383 senkov 141 { yyval.String = yyvsp[0].String; }
1384 schoenebeck 35 break;
1385    
1386 schoenebeck 111 case 20:
1387 senkov 155 #line 102 "lscp.y"
1388 senkov 141 { yyval.String = LSCPSERVER->RemoveChannel(yyvsp[0].Number); }
1389 schoenebeck 35 break;
1390    
1391 schoenebeck 111 case 21:
1392 senkov 155 #line 103 "lscp.y"
1393 senkov 141 { yyval.String = yyvsp[0].String; }
1394 schoenebeck 35 break;
1395    
1396 schoenebeck 111 case 22:
1397 senkov 155 #line 104 "lscp.y"
1398 senkov 135 { yyval.String = yyvsp[0].String; }
1399 schoenebeck 35 break;
1400    
1401 schoenebeck 111 case 23:
1402 senkov 155 #line 105 "lscp.y"
1403 senkov 135 { yyval.String = yyvsp[0].String; }
1404 schoenebeck 35 break;
1405    
1406 schoenebeck 111 case 24:
1407 senkov 155 #line 106 "lscp.y"
1408 senkov 141 { yyval.String = LSCPSERVER->ResetChannel(yyvsp[0].Number); }
1409 schoenebeck 35 break;
1410    
1411 schoenebeck 111 case 25:
1412 senkov 155 #line 107 "lscp.y"
1413 senkov 141 { LSCPSERVER->AnswerClient("Bye!\r\n"); return 0; }
1414 schoenebeck 35 break;
1415    
1416 schoenebeck 111 case 26:
1417 senkov 155 #line 110 "lscp.y"
1418 senkov 141 { yyval.String = LSCPSERVER->SubscribeNotification(event_channels); }
1419 schoenebeck 35 break;
1420    
1421 schoenebeck 111 case 27:
1422 senkov 155 #line 111 "lscp.y"
1423 senkov 141 { yyval.String = LSCPSERVER->SubscribeNotification(event_voice_count); }
1424 schoenebeck 35 break;
1425    
1426 schoenebeck 111 case 28:
1427 senkov 155 #line 112 "lscp.y"
1428 senkov 141 { yyval.String = LSCPSERVER->SubscribeNotification(event_stream_count); }
1429 schoenebeck 35 break;
1430    
1431 schoenebeck 111 case 29:
1432 senkov 155 #line 113 "lscp.y"
1433 senkov 141 { yyval.String = LSCPSERVER->SubscribeNotification(event_channel_buffer_fill); }
1434 schoenebeck 35 break;
1435    
1436 schoenebeck 111 case 30:
1437 senkov 155 #line 114 "lscp.y"
1438 senkov 141 { yyval.String = LSCPSERVER->SubscribeNotification(event_channel_info); }
1439 schoenebeck 35 break;
1440    
1441 schoenebeck 111 case 31:
1442 senkov 155 #line 115 "lscp.y"
1443 senkov 141 { yyval.String = LSCPSERVER->SubscribeNotification(event_misc); }
1444 schoenebeck 35 break;
1445    
1446 schoenebeck 111 case 32:
1447 senkov 155 #line 118 "lscp.y"
1448 senkov 141 { yyval.String = LSCPSERVER->UnsubscribeNotification(event_channels); }
1449 schoenebeck 35 break;
1450    
1451 schoenebeck 111 case 33:
1452 senkov 155 #line 119 "lscp.y"
1453 senkov 141 { yyval.String = LSCPSERVER->UnsubscribeNotification(event_voice_count); }
1454 schoenebeck 35 break;
1455    
1456 schoenebeck 111 case 34:
1457 senkov 155 #line 120 "lscp.y"
1458 senkov 141 { yyval.String = LSCPSERVER->UnsubscribeNotification(event_stream_count); }
1459 schoenebeck 35 break;
1460    
1461 schoenebeck 111 case 35:
1462 senkov 155 #line 121 "lscp.y"
1463 senkov 141 { yyval.String = LSCPSERVER->UnsubscribeNotification(event_channel_buffer_fill); }
1464 schoenebeck 35 break;
1465    
1466 schoenebeck 111 case 36:
1467 senkov 155 #line 122 "lscp.y"
1468 senkov 141 { yyval.String = LSCPSERVER->UnsubscribeNotification(event_channel_info); }
1469 schoenebeck 35 break;
1470    
1471 schoenebeck 111 case 37:
1472 senkov 155 #line 123 "lscp.y"
1473 senkov 141 { yyval.String = LSCPSERVER->UnsubscribeNotification(event_misc); }
1474 schoenebeck 123 break;
1475    
1476     case 38:
1477 senkov 155 #line 126 "lscp.y"
1478 senkov 141 { yyval.String = LSCPSERVER->GetAvailableEngines(); }
1479 schoenebeck 123 break;
1480    
1481     case 39:
1482 senkov 155 #line 127 "lscp.y"
1483     { yyval.String = LSCPSERVER->GetAvailableMidiInputDrivers(); }
1484 schoenebeck 123 break;
1485    
1486     case 40:
1487 senkov 155 #line 128 "lscp.y"
1488     { yyval.String = LSCPSERVER->GetMidiInputDriverInfo(yyvsp[0].String); }
1489 schoenebeck 123 break;
1490    
1491     case 41:
1492 senkov 155 #line 129 "lscp.y"
1493     { yyval.String = LSCPSERVER->GetMidiInputDriverParameterInfo(yyvsp[-2].String, yyvsp[0].String); }
1494 schoenebeck 35 break;
1495    
1496 schoenebeck 123 case 42:
1497 senkov 155 #line 130 "lscp.y"
1498     { yyval.String = LSCPSERVER->GetMidiInputDriverParameterInfo(yyvsp[-4].String, yyvsp[-2].String, yyvsp[0].KeyValList); }
1499 schoenebeck 123 break;
1500    
1501     case 43:
1502 senkov 155 #line 131 "lscp.y"
1503     { yyval.String = LSCPSERVER->GetAvailableAudioOutputDrivers(); }
1504 schoenebeck 123 break;
1505    
1506     case 44:
1507 senkov 155 #line 132 "lscp.y"
1508     { yyval.String = LSCPSERVER->GetAudioOutputDriverInfo(yyvsp[0].String); }
1509 schoenebeck 35 break;
1510    
1511 schoenebeck 123 case 45:
1512 senkov 155 #line 133 "lscp.y"
1513     { yyval.String = LSCPSERVER->GetAudioOutputDriverParameterInfo(yyvsp[-2].String, yyvsp[0].String); }
1514 schoenebeck 35 break;
1515    
1516 schoenebeck 123 case 46:
1517 senkov 155 #line 134 "lscp.y"
1518     { yyval.String = LSCPSERVER->GetAudioOutputDriverParameterInfo(yyvsp[-4].String, yyvsp[-2].String, yyvsp[0].KeyValList); }
1519 schoenebeck 35 break;
1520    
1521 schoenebeck 123 case 47:
1522 senkov 155 #line 135 "lscp.y"
1523     { yyval.String = LSCPSERVER->GetAudioOutputDeviceCount(); }
1524 schoenebeck 35 break;
1525    
1526 schoenebeck 123 case 48:
1527 senkov 155 #line 136 "lscp.y"
1528     { yyval.String = LSCPSERVER->GetMidiInputDeviceCount(); }
1529 schoenebeck 35 break;
1530    
1531 schoenebeck 123 case 49:
1532 senkov 155 #line 137 "lscp.y"
1533     { yyval.String = LSCPSERVER->GetAudioOutputDeviceInfo(yyvsp[0].Number); }
1534 schoenebeck 35 break;
1535    
1536 schoenebeck 123 case 50:
1537 senkov 155 #line 138 "lscp.y"
1538     { yyval.String = LSCPSERVER->GetMidiInputDeviceInfo(yyvsp[0].Number); }
1539 schoenebeck 35 break;
1540    
1541 schoenebeck 123 case 51:
1542 senkov 155 #line 139 "lscp.y"
1543     { yyval.String = LSCPSERVER->GetMidiInputPortInfo(yyvsp[-2].Number, yyvsp[0].Number); }
1544 schoenebeck 123 break;
1545    
1546     case 52:
1547 senkov 155 #line 140 "lscp.y"
1548     { yyval.String = LSCPSERVER->GetAudioOutputChannelInfo(yyvsp[-2].Number, yyvsp[0].Number); }
1549 schoenebeck 123 break;
1550    
1551     case 53:
1552 senkov 155 #line 141 "lscp.y"
1553     { yyval.String = LSCPSERVER->GetAudioOutputChannelParameterInfo(yyvsp[-4].Number, yyvsp[-2].Number, yyvsp[0].String); }
1554 schoenebeck 123 break;
1555    
1556     case 54:
1557 senkov 155 #line 142 "lscp.y"
1558     { yyval.String = LSCPSERVER->GetChannels(); }
1559 schoenebeck 123 break;
1560    
1561     case 55:
1562 senkov 155 #line 143 "lscp.y"
1563     { yyval.String = LSCPSERVER->GetChannelInfo(yyvsp[0].Number); }
1564 schoenebeck 123 break;
1565    
1566     case 56:
1567 senkov 155 #line 144 "lscp.y"
1568     { yyval.String = LSCPSERVER->GetBufferFill(yyvsp[-2].FillResponse, yyvsp[0].Number); }
1569 schoenebeck 123 break;
1570    
1571     case 57:
1572 senkov 155 #line 145 "lscp.y"
1573     { yyval.String = LSCPSERVER->GetStreamCount(yyvsp[0].Number); }
1574 schoenebeck 123 break;
1575    
1576     case 58:
1577 senkov 155 #line 146 "lscp.y"
1578     { yyval.String = LSCPSERVER->GetVoiceCount(yyvsp[0].Number); }
1579 schoenebeck 123 break;
1580    
1581     case 59:
1582 senkov 155 #line 147 "lscp.y"
1583     { yyval.String = LSCPSERVER->GetEngineInfo(yyvsp[0].String); }
1584 schoenebeck 123 break;
1585    
1586     case 60:
1587 senkov 155 #line 150 "lscp.y"
1588     { yyval.String = LSCPSERVER->SetAudioOutputDeviceParameter(yyvsp[-4].Number, yyvsp[-2].String, yyvsp[0].String); }
1589 schoenebeck 123 break;
1590    
1591     case 61:
1592 senkov 155 #line 151 "lscp.y"
1593     { yyval.String = LSCPSERVER->SetAudioOutputChannelParameter(yyvsp[-6].Number, yyvsp[-4].Number, yyvsp[-2].String, yyvsp[0].String); }
1594 schoenebeck 123 break;
1595    
1596     case 62:
1597 senkov 155 #line 152 "lscp.y"
1598     { yyval.String = LSCPSERVER->SetMidiInputDeviceParameter(yyvsp[-4].Number, yyvsp[-2].String, yyvsp[0].String); }
1599 schoenebeck 123 break;
1600    
1601 senkov 135 case 63:
1602 senkov 155 #line 153 "lscp.y"
1603     { yyval.String = LSCPSERVER->SetMidiInputPortParameter(yyvsp[-6].Number, yyvsp[-4].Number, yyvsp[-2].String, yyvsp[0].String); }
1604 senkov 135 break;
1605    
1606     case 64:
1607 senkov 155 #line 154 "lscp.y"
1608     { yyval.String = yyvsp[0].String; }
1609 senkov 135 break;
1610    
1611 schoenebeck 123 case 65:
1612 senkov 155 #line 157 "lscp.y"
1613     { yyval.String = LSCPSERVER->CreateAudioOutputDevice(yyvsp[-2].String,yyvsp[0].KeyValList); }
1614     break;
1615    
1616     case 66:
1617     #line 158 "lscp.y"
1618     { yyval.String = LSCPSERVER->CreateAudioOutputDevice(yyvsp[0].String); }
1619     break;
1620    
1621     case 67:
1622     #line 159 "lscp.y"
1623     { yyval.String = LSCPSERVER->CreateMidiInputDevice(yyvsp[0].String); }
1624     break;
1625    
1626     case 68:
1627 senkov 141 #line 162 "lscp.y"
1628 senkov 155 { yyval.String = LSCPSERVER->DestroyAudioOutputDevice(yyvsp[0].Number); }
1629 schoenebeck 35 break;
1630    
1631 senkov 155 case 69:
1632 senkov 141 #line 163 "lscp.y"
1633 senkov 155 { yyval.String = LSCPSERVER->DestroyMidiInputDevice(yyvsp[0].Number); }
1634     break;
1635    
1636     case 70:
1637     #line 166 "lscp.y"
1638     { yyval.String = yyvsp[0].String; }
1639     break;
1640    
1641     case 71:
1642     #line 167 "lscp.y"
1643     { yyval.String = yyvsp[0].String; }
1644     break;
1645    
1646     case 72:
1647     #line 170 "lscp.y"
1648     { yyval.String = LSCPSERVER->SetAudioOutputDevice(yyvsp[0].Number, yyvsp[-2].Number); }
1649     break;
1650    
1651     case 73:
1652     #line 171 "lscp.y"
1653     { yyval.String = LSCPSERVER->SetAudioOutputChannel(yyvsp[-2].Number, yyvsp[0].Number, yyvsp[-4].Number); }
1654     break;
1655    
1656     case 74:
1657     #line 172 "lscp.y"
1658     { yyval.String = LSCPSERVER->SetAudioOutputType(yyvsp[0].String, yyvsp[-2].Number); }
1659     break;
1660    
1661     case 75:
1662     #line 173 "lscp.y"
1663     { yyval.String = LSCPSERVER->SetMIDIInput(yyvsp[-4].Number, yyvsp[-2].Number, yyvsp[0].Number, yyvsp[-6].Number); }
1664     break;
1665    
1666     case 76:
1667     #line 174 "lscp.y"
1668 capela 143 { yyval.String = LSCPSERVER->SetMIDIInputType(yyvsp[0].String, yyvsp[-2].Number); }
1669 schoenebeck 35 break;
1670    
1671 senkov 155 case 77:
1672     #line 175 "lscp.y"
1673 capela 143 { yyval.String = LSCPSERVER->SetVolume(yyvsp[0].Dotnum, yyvsp[-2].Number); }
1674 senkov 135 break;
1675    
1676 senkov 155 case 78:
1677     #line 178 "lscp.y"
1678 capela 143 { yyval.KeyValList[yyvsp[-2].String] = yyvsp[0].String; }
1679 senkov 135 break;
1680    
1681 senkov 155 case 79:
1682     #line 179 "lscp.y"
1683 capela 143 { yyval.KeyValList = yyvsp[-4].KeyValList; yyval.KeyValList[yyvsp[-2].String] = yyvsp[0].String; }
1684 senkov 135 break;
1685    
1686 senkov 155 case 80:
1687     #line 182 "lscp.y"
1688 capela 143 { yyval.FillResponse = fill_response_bytes; }
1689 senkov 135 break;
1690    
1691 senkov 155 case 81:
1692     #line 183 "lscp.y"
1693 capela 143 { yyval.FillResponse = fill_response_percentage; }
1694 senkov 135 break;
1695    
1696 senkov 155 case 82:
1697     #line 186 "lscp.y"
1698 capela 143 { yyval.String = LSCPSERVER->GetAudioOutputDevices(); }
1699 senkov 135 break;
1700    
1701 senkov 155 case 83:
1702     #line 187 "lscp.y"
1703     { yyval.String = LSCPSERVER->GetMidiInputDevices(); }
1704     break;
1705    
1706     case 84:
1707     #line 190 "lscp.y"
1708 capela 143 { yyval.String = LSCPSERVER->LoadInstrument(yyvsp[-4].String, yyvsp[-2].Number, yyvsp[0].Number); }
1709     break;
1710    
1711 senkov 155 case 85:
1712     #line 191 "lscp.y"
1713 senkov 141 { yyval.String = LSCPSERVER->LoadInstrument(yyvsp[-4].String, yyvsp[-2].Number, yyvsp[0].Number, true); }
1714 senkov 138 break;
1715    
1716 senkov 155 case 86:
1717     #line 194 "lscp.y"
1718 senkov 135 { yyval.String = LSCPSERVER->LoadEngine(yyvsp[-2].String, yyvsp[0].Number); }
1719     break;
1720    
1721 senkov 155 case 93:
1722     #line 213 "lscp.y"
1723 senkov 135 { yyval.Dotnum = yyvsp[0].Number; }
1724     break;
1725    
1726 senkov 155 case 100:
1727     #line 232 "lscp.y"
1728 schoenebeck 35 { yyval.String = yyvsp[0].String; }
1729     break;
1730    
1731 senkov 155 case 101:
1732     #line 233 "lscp.y"
1733 schoenebeck 35 { std::stringstream ss; ss << yyvsp[0].Number; yyval.String = ss.str(); }
1734     break;
1735    
1736 senkov 155 case 102:
1737     #line 234 "lscp.y"
1738 senkov 135 { std::stringstream ss; ss << yyvsp[0].Dotnum; yyval.String = ss.str(); }
1739 schoenebeck 35 break;
1740    
1741 senkov 155 case 103:
1742     #line 237 "lscp.y"
1743 schoenebeck 35 { std::string s; s = yyvsp[0].Char; yyval.String = s; }
1744     break;
1745    
1746 senkov 155 case 104:
1747     #line 238 "lscp.y"
1748 schoenebeck 35 { yyval.String = yyvsp[-1].String + yyvsp[0].Char; }
1749     break;
1750    
1751    
1752     }
1753    
1754     /* Line 999 of yacc.c. */
1755 senkov 155 #line 1755 "y.tab.c"
1756 schoenebeck 35
1757     yyvsp -= yylen;
1758     yyssp -= yylen;
1759    
1760    
1761     YY_STACK_PRINT (yyss, yyssp);
1762    
1763     *++yyvsp = yyval;
1764    
1765    
1766     /* Now `shift' the result of the reduction. Determine what state
1767     that goes to, based on the state we popped back to and the rule
1768     number reduced by. */
1769    
1770     yyn = yyr1[yyn];
1771    
1772     yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1773     if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1774     yystate = yytable[yystate];
1775     else
1776     yystate = yydefgoto[yyn - YYNTOKENS];
1777    
1778     goto yynewstate;
1779    
1780    
1781     /*------------------------------------.
1782     | yyerrlab -- here on detecting error |
1783     `------------------------------------*/
1784     yyerrlab:
1785     /* If not already recovering from an error, report this error. */
1786     if (!yyerrstatus)
1787     {
1788     ++yynerrs;
1789     #if YYERROR_VERBOSE
1790     yyn = yypact[yystate];
1791    
1792     if (YYPACT_NINF < yyn && yyn < YYLAST)
1793     {
1794     YYSIZE_T yysize = 0;
1795     int yytype = YYTRANSLATE (yychar);
1796     char *yymsg;
1797     int yyx, yycount;
1798    
1799     yycount = 0;
1800     /* Start YYX at -YYN if negative to avoid negative indexes in
1801     YYCHECK. */
1802     for (yyx = yyn < 0 ? -yyn : 0;
1803     yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1804     if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1805     yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1806     yysize += yystrlen ("syntax error, unexpected ") + 1;
1807     yysize += yystrlen (yytname[yytype]);
1808     yymsg = (char *) YYSTACK_ALLOC (yysize);
1809     if (yymsg != 0)
1810     {
1811     char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
1812     yyp = yystpcpy (yyp, yytname[yytype]);
1813    
1814     if (yycount < 5)
1815     {
1816     yycount = 0;
1817     for (yyx = yyn < 0 ? -yyn : 0;
1818     yyx < (int) (sizeof (yytname) / sizeof (char *));
1819     yyx++)
1820     if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1821     {
1822     const char *yyq = ! yycount ? ", expecting " : " or ";
1823     yyp = yystpcpy (yyp, yyq);
1824     yyp = yystpcpy (yyp, yytname[yyx]);
1825     yycount++;
1826     }
1827     }
1828     yyerror (yymsg);
1829     YYSTACK_FREE (yymsg);
1830     }
1831     else
1832     yyerror ("syntax error; also virtual memory exhausted");
1833     }
1834     else
1835     #endif /* YYERROR_VERBOSE */
1836     yyerror ("syntax error");
1837     }
1838    
1839    
1840    
1841     if (yyerrstatus == 3)
1842     {
1843     /* If just tried and failed to reuse lookahead token after an
1844     error, discard it. */
1845    
1846     /* Return failure if at end of input. */
1847     if (yychar == YYEOF)
1848     {
1849     /* Pop the error token. */
1850     YYPOPSTACK;
1851     /* Pop the rest of the stack. */
1852     while (yyss < yyssp)
1853     {
1854     YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
1855     yydestruct (yystos[*yyssp], yyvsp);
1856     YYPOPSTACK;
1857     }
1858     YYABORT;
1859     }
1860    
1861     YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
1862     yydestruct (yytoken, &yylval);
1863     yychar = YYEMPTY;
1864    
1865     }
1866    
1867     /* Else will try to reuse lookahead token after shifting the error
1868     token. */
1869     goto yyerrlab1;
1870    
1871    
1872     /*----------------------------------------------------.
1873     | yyerrlab1 -- error raised explicitly by an action. |
1874     `----------------------------------------------------*/
1875     yyerrlab1:
1876     yyerrstatus = 3; /* Each real token shifted decrements this. */
1877    
1878     for (;;)
1879     {
1880     yyn = yypact[yystate];
1881     if (yyn != YYPACT_NINF)
1882     {
1883     yyn += YYTERROR;
1884     if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1885     {
1886     yyn = yytable[yyn];
1887     if (0 < yyn)
1888     break;
1889     }
1890     }
1891    
1892     /* Pop the current state because it cannot handle the error token. */
1893     if (yyssp == yyss)
1894     YYABORT;
1895    
1896     YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
1897     yydestruct (yystos[yystate], yyvsp);
1898     yyvsp--;
1899     yystate = *--yyssp;
1900    
1901     YY_STACK_PRINT (yyss, yyssp);
1902     }
1903    
1904     if (yyn == YYFINAL)
1905     YYACCEPT;
1906    
1907     YYDPRINTF ((stderr, "Shifting error token, "));
1908    
1909     *++yyvsp = yylval;
1910    
1911    
1912     yystate = yyn;
1913     goto yynewstate;
1914    
1915    
1916     /*-------------------------------------.
1917     | yyacceptlab -- YYACCEPT comes here. |
1918     `-------------------------------------*/
1919     yyacceptlab:
1920     yyresult = 0;
1921     goto yyreturn;
1922    
1923     /*-----------------------------------.
1924     | yyabortlab -- YYABORT comes here. |
1925     `-----------------------------------*/
1926     yyabortlab:
1927     yyresult = 1;
1928     goto yyreturn;
1929    
1930     #ifndef yyoverflow
1931     /*----------------------------------------------.
1932     | yyoverflowlab -- parser overflow comes here. |
1933     `----------------------------------------------*/
1934     yyoverflowlab:
1935     yyerror ("parser stack overflow");
1936     yyresult = 2;
1937     /* Fall through. */
1938     #endif
1939    
1940     yyreturn:
1941     #ifndef yyoverflow
1942     if (yyss != yyssa)
1943     YYSTACK_FREE (yyss);
1944     #endif
1945     return yyresult;
1946     }
1947    
1948    
1949 senkov 155 #line 78 "lscp.y"
1950 schoenebeck 35
1951    
1952     /**
1953     * Will be called when an error occured (usually syntax error).
1954     */
1955     void yyerror(const char* s) {
1956     dmsg(2,("LSCPParser: %s\n", s));
1957     }
1958    
1959     /**
1960     * Clears input buffer and restarts scanner.
1961     */
1962     void restart(yyparse_param_t* pparam, int& yychar) {
1963     // restart scanner
1964     yyrestart(stdin, pparam->pScanner);
1965     // flush input buffer
1966     static char buf[1024];
1967     while(recv(hSession, buf, 1024, MSG_DONTWAIT) > 0);
1968     // reset lookahead symbol
1969     yyclearin;
1970     }
1971    
1972    

  ViewVC Help
Powered by ViewVC