/[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 214 - (show annotations) (download)
Sat Aug 14 23:00:44 2004 UTC (19 years, 8 months ago) by schoenebeck
File size: 65198 byte(s)
* src/drivers/DeviceParameter.cpp: fixed return values for
classes 'DeviceRuntimeParameterString' and 'DeviceCreationParameterString'
which returned their values without being encapsulated into apostrophes,
fixed return values for 'DeviceRuntimeParameterBool' and
'DeviceCreationParameterBool' to be returned in lower case (as defined in
the LSCP documentation)
* src/network/lscp.y: key value pairs now also allow strings (without
spaces) to be not encapsulated into apostrophes (e.g. foo=bar instead of
foo='bar')
* src/linuxsampler.cpp: show on the console which TCP port the LSCP server
is using

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

  ViewVC Help
Powered by ViewVC