/[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 141 - (show annotations) (download)
Mon Jun 21 01:21:33 2004 UTC (19 years, 10 months ago) by senkov
File size: 56401 byte(s)
* LOAD INSTRUMENT NON_MODAL

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

  ViewVC Help
Powered by ViewVC