/[svn]/linuxsampler/trunk/src/network/lscpparser.cpp
ViewVC logotype

Annotation of /linuxsampler/trunk/src/network/lscpparser.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 123 - (hide annotations) (download)
Mon Jun 14 19:33:16 2004 UTC (19 years, 10 months ago) by schoenebeck
File size: 54761 byte(s)
* src/common: added template class 'optional<>' which can be used e.g. as
  return type whenever a value might be returned, but don't has to; this
  template class pretty much acts like a pointer of the given type, but is
  much more safer than a simple pointer
* src/audiodriver: added static class AudioDeviceFactory to create audio
  devices at runtime by using a string and to obtain driver informations
  of drivers at runtime, driver classes should simply use the macro
  REGISTER_AUDIO_OUTPUT_DRIVER(DriverName,DriverClass) in their cpp file
  to register the driver to LinuxSampler (no changes needed anymore in the
  LS code to add a new audio output driver)
* src/drivers: added classes to dynamically manage driver parameters; there
  are two different kinds of parameters: parameters which are need to
  create a new device (DeviceCreationParameterX) used to e.g. create an
  audio output device or a MIDI input device and parameters which are only
  available at runtime, means when a device is already created
  (DeviceRuntimeParameterX) which will be e.g. used as audio channel
  parameters and MIDI port parameters
* src/linuxsampler.cpp: all registered audio output drivers will be shown
  on the console on startup
* src/network: implemented configuration of audio output devices via LSCP

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

  ViewVC Help
Powered by ViewVC