/[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 209 - (show annotations) (download)
Sun Jul 18 00:29:39 2004 UTC (19 years, 9 months ago) by schoenebeck
File size: 64330 byte(s)
* src/Sampler.cpp: changed sampler channel index allocation from consistent
channel index allocation to incrementing channel index allocation, that is
it doesn't fill channel index gaps anymore (to avoid race conditions)
* implemented "LIST CHANNELS" LSCP command

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

  ViewVC Help
Powered by ViewVC