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