/[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 210 - (hide annotations) (download)
Sat Jul 24 12:33:49 2004 UTC (19 years, 9 months ago) by schoenebeck
File size: 65047 byte(s)
* implemented "SET ECHO" LSCP command

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

  ViewVC Help
Powered by ViewVC