/[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 135 - (show annotations) (download)
Sun Jun 20 16:01:50 2004 UTC (19 years, 10 months ago) by senkov
File size: 56117 byte(s)
* Update parser to comply with the latest spec

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

  ViewVC Help
Powered by ViewVC