/[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 160 - (show annotations) (download)
Tue Jun 29 21:44:12 2004 UTC (19 years, 9 months ago) by capela
File size: 64276 byte(s)
Parser regeneration missed on last commit.

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

  ViewVC Help
Powered by ViewVC