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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 212 - (show annotations) (download)
Wed Jul 28 14:17:29 2004 UTC (19 years, 8 months ago) by schoenebeck
File size: 65200 byte(s)
* introduced and implemented new LSCP command "RESET" which resets the
  whole sampler instance
* src/drivers/audio/AudioOutputDeviceAlsa.cpp: parameter 'card' now
  returns all available sound cards as possibility, added dependency to
  parameter 'card' to parameters 'fragments' and 'fragmentsize'
* src/drivers/DeviceParameter.cpp: fixed return value(s) for classes
  'DeviceCreationParameterString' and 'DeviceCreationParameterStrings'
  which returned the default value(s) not encapsulated into apostrophes
* src/network/lscpserver.cpp: fixed implementation of LSCP commands
  "GET MIDI_INPUT_DRIVER_PARAMETER INFO" and
  "GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO"

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

  ViewVC Help
Powered by ViewVC