/[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 185 - (show annotations) (download)
Wed Jul 7 02:49:51 2004 UTC (19 years, 9 months ago) by senkov
File size: 64164 byte(s)
* GET MIDI_INPUT_PORT_PARAMETER INFO command

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

  ViewVC Help
Powered by ViewVC