Imported Upstream version 2.9.0
[debian/cc1111] / sim / ucsim / cmd.src / cmdpars.cc
1 #define YY_cl_ucsim_parser_h_included
2 #define YY_USE_CLASS
3
4 /*  A Bison++ parser, made from cmdpars.y  */
5
6  /* with Bison++ version bison++ Version 1.21.9-1, adapted from GNU bison by coetmeur@icdc.fr
7 Maintained by Magnus Ekdahl <magnus@debian.org>
8   */
9
10 #define YY_USE_CLASS
11
12 #line 1 "/usr/share/bison++/bison.cc"
13 /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
14 /* Skeleton output parser for bison,
15    Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman
16
17    This program is free software; you can redistribute it and/or modify
18    it under the terms of the GNU General Public License as published by
19    the Free Software Foundation; either version 1, or (at your option)
20    any later version.
21
22    This program is distributed in the hope that it will be useful,
23    but WITHOUT ANY WARRANTY; without even the implied warranty of
24    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25    GNU General Public License for more details.
26
27    You should have received a copy of the GNU General Public License
28    along with this program; if not, write to the Free Software
29    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  
30
31    As a special exception, when this file is copied by Bison++ into a
32    Bison++ output file, you may use that output file without restriction.
33    This special exception was added by the Free Software Foundation
34    in version 1.24 of Bison, and has been in Bison++ since 1.21.9.  
35
36 */
37
38 /* HEADER SECTION */
39 #if defined( _MSDOS ) || defined(MSDOS) || defined(__MSDOS__) 
40  #define __MSDOS_AND_ALIKE
41 #endif
42
43 #if defined(_WINDOWS) && defined(_MSC_VER)
44  #define __HAVE_NO_ALLOCA
45  #define __MSDOS_AND_ALIKE
46 #endif
47
48 #ifndef alloca
49  #if defined( __GNUC__)
50   #define alloca __builtin_alloca
51
52  #elif (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc)  || defined (__sgi)
53   #include <alloca.h>
54
55  #elif defined (__MSDOS_AND_ALIKE)
56   #include <malloc.h>
57   #ifndef __TURBOC__
58    /* MS C runtime lib */
59    #define alloca _alloca
60   #endif
61
62  #elif defined(_AIX)
63   /* pragma must be put before any C/C++ instruction !! */
64   #pragma alloca
65   #include <malloc.h>
66
67  #elif defined(__hpux)
68   #ifdef __cplusplus
69    extern "C" {
70      void *alloca (unsigned int);
71    };
72   #else /* not __cplusplus */
73    void *alloca ();
74   #endif /* not __cplusplus */
75
76  #endif /* not _AIX  not MSDOS, or __TURBOC__ or _AIX, not sparc.  */
77 #endif /* alloca not defined.  */
78
79 #ifdef c_plusplus
80  #ifndef __cplusplus
81   #define __cplusplus
82  #endif
83 #endif
84
85 #ifdef __cplusplus
86  #ifndef YY_USE_CLASS
87 /*#warning "For C++ its recomended to use bison++, otherwise classes won't be generated"*/
88  #endif
89 #else
90  #ifndef __STDC__
91   #define const
92  #endif
93  #ifdef YY_USE_CLASS
94   #error "This is a C++ header generated by bison++, please use a C++ compiler!"
95  #endif
96 #endif
97
98 #include <stdio.h>
99 #define YYBISON 1  
100
101  #line 88 "/usr/share/bison++/bison.cc"
102 #line 3 "cmdpars.y"
103
104 #include "cmdlexcl.h"
105 #include "memcl.h"
106 #include "globals.h"
107 #include "stypes.h"
108 #define YY_cl_ucsim_parser_INHERIT  : public cl_base
109 #define YY_cl_ucsim_parser_MEMBERS  class cl_ucsim_lexer *lexer_object;\
110 virtual ~YY_cl_ucsim_parser_CLASS(void) { delete lexer_object; }
111 #define YY_cl_ucsim_parser_CONSTRUCTOR_PARAM  \
112 class cl_ucsim_lexer *the_lexer
113 #define YY_cl_ucsim_parser_CONSTRUCTOR_CODE  \
114 lexer_object= the_lexer;
115
116 #line 43 "cmdpars.y"
117 typedef union {
118   long number;
119   class cl_memory *memory_object;
120   struct {
121     class cl_memory *memory;
122     long address;
123   } memory;
124   struct {
125     class cl_memory *memory;
126     long mem_address, bit_address;
127     long mask;
128   } bit;
129 } yy_cl_ucsim_parser_stype;
130 #define YY_cl_ucsim_parser_STYPE yy_cl_ucsim_parser_stype
131
132 #line 88 "/usr/share/bison++/bison.cc"
133 /* %{ and %header{ and %union, during decl */
134 #define YY_cl_ucsim_parser_BISON 1
135
136 #ifndef YY_cl_ucsim_parser_COMPATIBILITY
137  #ifndef YY_USE_CLASS
138   #define  YY_cl_ucsim_parser_COMPATIBILITY 1
139  #else
140   #define  YY_cl_ucsim_parser_COMPATIBILITY 0
141  #endif
142 #endif
143
144 #if YY_cl_ucsim_parser_COMPATIBILITY != 0
145  /* backward compatibility */
146  #ifdef YYLTYPE
147   #ifndef YY_cl_ucsim_parser_LTYPE
148    #define YY_cl_ucsim_parser_LTYPE YYLTYPE
149   #endif
150  #endif
151 /* Testing alternative bison solution
152    /#ifdef YYSTYPE*/
153 #ifndef YY_cl_ucsim_parser_STYPE 
154    #define YY_cl_ucsim_parser_STYPE YYSTYPE
155 #endif
156 /*#endif*/
157  #ifdef YYDEBUG
158   #ifndef YY_cl_ucsim_parser_DEBUG
159    #define  YY_cl_ucsim_parser_DEBUG YYDEBUG
160   #endif
161  #endif
162  
163  /* use goto to be compatible */
164  #ifndef YY_cl_ucsim_parser_USE_GOTO
165   #define YY_cl_ucsim_parser_USE_GOTO 1
166  #endif
167 #endif
168
169 /* use no goto to be clean in C++ */
170 #ifndef YY_cl_ucsim_parser_USE_GOTO
171  #define YY_cl_ucsim_parser_USE_GOTO 0
172 #endif
173
174 #ifndef YY_cl_ucsim_parser_PURE
175
176  #line 130 "/usr/share/bison++/bison.cc"
177 #define YY_cl_ucsim_parser_PURE 1
178
179 #line 130 "/usr/share/bison++/bison.cc"
180 /*  YY_cl_ucsim_parser_PURE */
181 #endif
182
183 /* section apres lecture def, avant lecture grammaire S2 */
184
185  #line 134 "/usr/share/bison++/bison.cc"
186
187 #line 134 "/usr/share/bison++/bison.cc"
188 /* prefix */
189 #ifndef YY_cl_ucsim_parser_DEBUG
190
191  #line 136 "/usr/share/bison++/bison.cc"
192
193 #line 136 "/usr/share/bison++/bison.cc"
194 /* YY_cl_ucsim_parser_DEBUG */
195 #endif
196
197
198 #ifndef YY_cl_ucsim_parser_LSP_NEEDED
199
200  #line 141 "/usr/share/bison++/bison.cc"
201
202 #line 141 "/usr/share/bison++/bison.cc"
203  /* YY_cl_ucsim_parser_LSP_NEEDED*/
204 #endif
205
206
207
208 /* DEFAULT LTYPE*/
209 #ifdef YY_cl_ucsim_parser_LSP_NEEDED
210 #ifndef YY_cl_ucsim_parser_LTYPE
211 #ifndef BISON_YYLTYPE_ISDECLARED
212 #define BISON_YYLTYPE_ISDECLARED
213 typedef
214   struct yyltype
215     {
216       int timestamp;
217       int first_line;
218       int first_column;
219       int last_line;
220       int last_column;
221       char *text;
222    }
223   yyltype;
224
225 #endif
226 #define YY_cl_ucsim_parser_LTYPE yyltype
227 #endif
228 #endif
229 /* DEFAULT STYPE*/
230       /* We used to use `unsigned long' as YY_cl_ucsim_parser_STYPE on MSDOS,
231          but it seems better to be consistent.
232          Most programs should declare their own type anyway.  */
233
234 #ifndef YY_cl_ucsim_parser_STYPE
235 #define YY_cl_ucsim_parser_STYPE int
236 #endif
237 /* DEFAULT MISCELANEOUS */
238 #ifndef YY_cl_ucsim_parser_PARSE
239 #define YY_cl_ucsim_parser_PARSE yyparse
240 #endif
241 #ifndef YY_cl_ucsim_parser_LEX
242 #define YY_cl_ucsim_parser_LEX yylex
243 #endif
244 #ifndef YY_cl_ucsim_parser_LVAL
245 #define YY_cl_ucsim_parser_LVAL yylval
246 #endif
247 #ifndef YY_cl_ucsim_parser_LLOC
248 #define YY_cl_ucsim_parser_LLOC yylloc
249 #endif
250 #ifndef YY_cl_ucsim_parser_CHAR
251 #define YY_cl_ucsim_parser_CHAR yychar
252 #endif
253 #ifndef YY_cl_ucsim_parser_NERRS
254 #define YY_cl_ucsim_parser_NERRS yynerrs
255 #endif
256 #ifndef YY_cl_ucsim_parser_DEBUG_FLAG
257 #define YY_cl_ucsim_parser_DEBUG_FLAG yydebug
258 #endif
259 #ifndef YY_cl_ucsim_parser_ERROR
260 #define YY_cl_ucsim_parser_ERROR yyerror
261 #endif
262
263 #ifndef YY_cl_ucsim_parser_PARSE_PARAM
264  #ifndef YY_USE_CLASS
265   #ifdef YYPARSE_PARAM
266    #define YY_cl_ucsim_parser_PARSE_PARAM void* YYPARSE_PARAM 
267   #else
268    #ifndef __STDC__
269     #ifndef __cplusplus
270      #define YY_cl_ucsim_parser_PARSE_PARAM
271     #endif
272    #endif
273   #endif
274  #endif
275  #ifndef YY_cl_ucsim_parser_PARSE_PARAM
276   #define YY_cl_ucsim_parser_PARSE_PARAM void
277  #endif
278 #endif
279
280 #if YY_cl_ucsim_parser_COMPATIBILITY != 0
281 /* backward compatibility */
282 #ifdef YY_cl_ucsim_parser_LTYPE
283 #ifndef YYLTYPE
284 #define YYLTYPE YY_cl_ucsim_parser_LTYPE
285 #else
286 /* WARNING obsolete !!! user defined YYLTYPE not reported into generated header */
287 #endif
288 #endif
289
290 /* Removed due to bison compabilityproblems
291 /#ifndef YYSTYPE
292 /#define YYSTYPE YY_cl_ucsim_parser_STYPE
293 /#else*/
294 /* WARNING obsolete !!! user defined YYSTYPE not reported into generated header */
295 /*#endif*/
296
297 #ifdef YY_cl_ucsim_parser_PURE
298 #  ifndef YYPURE
299 #    define YYPURE YY_cl_ucsim_parser_PURE
300 #  endif
301 #endif
302
303 #ifdef YY_cl_ucsim_parser_DEBUG
304 #  ifndef YYDEBUG
305 #    define YYDEBUG YY_cl_ucsim_parser_DEBUG 
306 #  endif
307 #endif
308
309 #ifndef YY_cl_ucsim_parser_ERROR_VERBOSE
310  #ifdef YYERROR_VERBOSE
311   #define YY_cl_ucsim_parser_ERROR_VERBOSE YYERROR_VERBOSE
312  #endif
313 #endif
314
315 #ifndef YY_cl_ucsim_parser_LSP_NEEDED
316 #  ifdef YYLSP_NEEDED
317 #    define YY_cl_ucsim_parser_LSP_NEEDED YYLSP_NEEDED
318 #  endif
319 #endif
320
321 #endif
322
323 #ifndef YY_USE_CLASS
324 /* TOKEN C */
325
326  #line 263 "/usr/share/bison++/bison.cc"
327 #define PTOK_PLUS       258
328 #define PTOK_MINUS      259
329 #define PTOK_ASTERIX    260
330 #define PTOK_SLASH      261
331 #define PTOK_EQUAL      262
332 #define PTOK_LEFT_PAREN 263
333 #define PTOK_RIGHT_PAREN        264
334 #define PTOK_LEFT_BRACKET       265
335 #define PTOK_RIGHT_BRACKET      266
336 #define PTOK_DOT        267
337 #define PTOK_AMPERSAND  268
338 #define PTOK_MEMORY_OBJECT      269
339 #define PTOK_MEMORY     270
340 #define PTOK_NUMBER     271
341 #define PTOK_BIT        272
342 #define UNARYMINUS      273
343
344
345 #line 263 "/usr/share/bison++/bison.cc"
346  /* #defines tokens */
347 #else
348 /* CLASS */
349 #ifndef YY_cl_ucsim_parser_CLASS
350 #define YY_cl_ucsim_parser_CLASS cl_ucsim_parser
351 #endif
352 #ifndef YY_cl_ucsim_parser_INHERIT
353 #define YY_cl_ucsim_parser_INHERIT
354 #endif
355 #ifndef YY_cl_ucsim_parser_MEMBERS
356 #define YY_cl_ucsim_parser_MEMBERS 
357 #endif
358 #ifndef YY_cl_ucsim_parser_LEX_BODY
359 #define YY_cl_ucsim_parser_LEX_BODY  
360 #endif
361 #ifndef YY_cl_ucsim_parser_ERROR_BODY
362 #define YY_cl_ucsim_parser_ERROR_BODY  
363 #endif
364 #ifndef YY_cl_ucsim_parser_CONSTRUCTOR_PARAM
365 #define YY_cl_ucsim_parser_CONSTRUCTOR_PARAM
366 #endif
367 #ifndef YY_cl_ucsim_parser_CONSTRUCTOR_CODE
368 #define YY_cl_ucsim_parser_CONSTRUCTOR_CODE
369 #endif
370 #ifndef YY_cl_ucsim_parser_CONSTRUCTOR_INIT
371 #define YY_cl_ucsim_parser_CONSTRUCTOR_INIT
372 #endif
373 /* choose between enum and const */
374 #ifndef YY_cl_ucsim_parser_USE_CONST_TOKEN
375 #define YY_cl_ucsim_parser_USE_CONST_TOKEN 0
376 /* yes enum is more compatible with flex,  */
377 /* so by default we use it */ 
378 #endif
379 #if YY_cl_ucsim_parser_USE_CONST_TOKEN != 0
380 #ifndef YY_cl_ucsim_parser_ENUM_TOKEN
381 #define YY_cl_ucsim_parser_ENUM_TOKEN yy_cl_ucsim_parser_enum_token
382 #endif
383 #endif
384
385 class YY_cl_ucsim_parser_CLASS YY_cl_ucsim_parser_INHERIT
386 {
387 public: 
388 #if YY_cl_ucsim_parser_USE_CONST_TOKEN != 0
389 /* static const int token ... */
390
391  #line 307 "/usr/share/bison++/bison.cc"
392 static const int PTOK_PLUS;
393 static const int PTOK_MINUS;
394 static const int PTOK_ASTERIX;
395 static const int PTOK_SLASH;
396 static const int PTOK_EQUAL;
397 static const int PTOK_LEFT_PAREN;
398 static const int PTOK_RIGHT_PAREN;
399 static const int PTOK_LEFT_BRACKET;
400 static const int PTOK_RIGHT_BRACKET;
401 static const int PTOK_DOT;
402 static const int PTOK_AMPERSAND;
403 static const int PTOK_MEMORY_OBJECT;
404 static const int PTOK_MEMORY;
405 static const int PTOK_NUMBER;
406 static const int PTOK_BIT;
407 static const int UNARYMINUS;
408
409
410 #line 307 "/usr/share/bison++/bison.cc"
411  /* decl const */
412 #else
413 enum YY_cl_ucsim_parser_ENUM_TOKEN { YY_cl_ucsim_parser_NULL_TOKEN=0
414
415  #line 310 "/usr/share/bison++/bison.cc"
416         ,PTOK_PLUS=258
417         ,PTOK_MINUS=259
418         ,PTOK_ASTERIX=260
419         ,PTOK_SLASH=261
420         ,PTOK_EQUAL=262
421         ,PTOK_LEFT_PAREN=263
422         ,PTOK_RIGHT_PAREN=264
423         ,PTOK_LEFT_BRACKET=265
424         ,PTOK_RIGHT_BRACKET=266
425         ,PTOK_DOT=267
426         ,PTOK_AMPERSAND=268
427         ,PTOK_MEMORY_OBJECT=269
428         ,PTOK_MEMORY=270
429         ,PTOK_NUMBER=271
430         ,PTOK_BIT=272
431         ,UNARYMINUS=273
432
433
434 #line 310 "/usr/share/bison++/bison.cc"
435  /* enum token */
436      }; /* end of enum declaration */
437 #endif
438 public:
439  int YY_cl_ucsim_parser_PARSE (YY_cl_ucsim_parser_PARSE_PARAM);
440  virtual void YY_cl_ucsim_parser_ERROR(char *msg) YY_cl_ucsim_parser_ERROR_BODY;
441 #ifdef YY_cl_ucsim_parser_PURE
442 #ifdef YY_cl_ucsim_parser_LSP_NEEDED
443  virtual int  YY_cl_ucsim_parser_LEX (YY_cl_ucsim_parser_STYPE *YY_cl_ucsim_parser_LVAL,YY_cl_ucsim_parser_LTYPE *YY_cl_ucsim_parser_LLOC) YY_cl_ucsim_parser_LEX_BODY;
444 #else
445  virtual int  YY_cl_ucsim_parser_LEX (YY_cl_ucsim_parser_STYPE *YY_cl_ucsim_parser_LVAL) YY_cl_ucsim_parser_LEX_BODY;
446 #endif
447 #else
448  virtual int YY_cl_ucsim_parser_LEX() YY_cl_ucsim_parser_LEX_BODY;
449  YY_cl_ucsim_parser_STYPE YY_cl_ucsim_parser_LVAL;
450 #ifdef YY_cl_ucsim_parser_LSP_NEEDED
451  YY_cl_ucsim_parser_LTYPE YY_cl_ucsim_parser_LLOC;
452 #endif
453  int   YY_cl_ucsim_parser_NERRS;
454  int    YY_cl_ucsim_parser_CHAR;
455 #endif
456 #if YY_cl_ucsim_parser_DEBUG != 0
457  int YY_cl_ucsim_parser_DEBUG_FLAG;   /*  nonzero means print parse trace     */
458 #endif
459 public:
460  YY_cl_ucsim_parser_CLASS(YY_cl_ucsim_parser_CONSTRUCTOR_PARAM);
461 public:
462  YY_cl_ucsim_parser_MEMBERS 
463 };
464 /* other declare folow */
465 #if YY_cl_ucsim_parser_USE_CONST_TOKEN != 0
466
467  #line 341 "/usr/share/bison++/bison.cc"
468 const int YY_cl_ucsim_parser_CLASS::PTOK_PLUS=258;
469 const int YY_cl_ucsim_parser_CLASS::PTOK_MINUS=259;
470 const int YY_cl_ucsim_parser_CLASS::PTOK_ASTERIX=260;
471 const int YY_cl_ucsim_parser_CLASS::PTOK_SLASH=261;
472 const int YY_cl_ucsim_parser_CLASS::PTOK_EQUAL=262;
473 const int YY_cl_ucsim_parser_CLASS::PTOK_LEFT_PAREN=263;
474 const int YY_cl_ucsim_parser_CLASS::PTOK_RIGHT_PAREN=264;
475 const int YY_cl_ucsim_parser_CLASS::PTOK_LEFT_BRACKET=265;
476 const int YY_cl_ucsim_parser_CLASS::PTOK_RIGHT_BRACKET=266;
477 const int YY_cl_ucsim_parser_CLASS::PTOK_DOT=267;
478 const int YY_cl_ucsim_parser_CLASS::PTOK_AMPERSAND=268;
479 const int YY_cl_ucsim_parser_CLASS::PTOK_MEMORY_OBJECT=269;
480 const int YY_cl_ucsim_parser_CLASS::PTOK_MEMORY=270;
481 const int YY_cl_ucsim_parser_CLASS::PTOK_NUMBER=271;
482 const int YY_cl_ucsim_parser_CLASS::PTOK_BIT=272;
483 const int YY_cl_ucsim_parser_CLASS::UNARYMINUS=273;
484
485
486 #line 341 "/usr/share/bison++/bison.cc"
487  /* const YY_cl_ucsim_parser_CLASS::token */
488 #endif
489 /*apres const  */
490 YY_cl_ucsim_parser_CLASS::YY_cl_ucsim_parser_CLASS(YY_cl_ucsim_parser_CONSTRUCTOR_PARAM) YY_cl_ucsim_parser_CONSTRUCTOR_INIT
491 {
492 #if YY_cl_ucsim_parser_DEBUG != 0
493 YY_cl_ucsim_parser_DEBUG_FLAG=0;
494 #endif
495 YY_cl_ucsim_parser_CONSTRUCTOR_CODE;
496 };
497 #endif
498
499  #line 352 "/usr/share/bison++/bison.cc"
500
501
502 #define YYFINAL         37
503 #define YYFLAG          -32768
504 #define YYNTBASE        19
505
506 #define YYTRANSLATE(x) ((unsigned)(x) <= 273 ? yytranslate[x] : 25)
507
508 static const char yytranslate[] = {     0,
509      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
510      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
511      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
512      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
513      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
514      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
515      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
516      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
517      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
518      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
519      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
520      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
521      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
522      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
523      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
524      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
525      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
526      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
527      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
528      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
529      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
530      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
531      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
532      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
533      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
534      2,     2,     2,     2,     2,     1,     2,     3,     4,     5,
535      6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
536     16,    17,    18
537 };
538
539 #if YY_cl_ucsim_parser_DEBUG != 0
540 static const short yyprhs[] = {     0,
541      0,     2,     6,    10,    12,    16,    20,    24,    28,    31,
542     33,    37,    39,    41,    43,    46,    49,    51,    56,    58
543 };
544
545 static const short yyrhs[] = {    21,
546      0,    23,     7,    21,     0,    24,     7,    21,     0,    20,
547      0,    21,     3,    21,     0,    21,     4,    21,     0,    21,
548      5,    21,     0,    21,     6,    21,     0,     4,    21,     0,
549     22,     0,     8,    21,     9,     0,    16,     0,    23,     0,
550     24,     0,    13,    23,     0,    13,    24,     0,    15,     0,
551     14,    10,    21,    11,     0,    17,     0,    23,    12,    21,
552      0
553 };
554
555 #endif
556
557 #if (YY_cl_ucsim_parser_DEBUG != 0) || defined(YY_cl_ucsim_parser_ERROR_VERBOSE) 
558 static const short yyrline[] = { 0,
559     59,    63,    69,    86,    88,    89,    90,    91,    98,    99,
560    100,   101,   102,   103,   106,   108,   119,   121,   127,   129
561 };
562
563 static const char * const yytname[] = {   "$","error","$illegal.","PTOK_PLUS",
564 "PTOK_MINUS","PTOK_ASTERIX","PTOK_SLASH","PTOK_EQUAL","PTOK_LEFT_PAREN","PTOK_RIGHT_PAREN",
565 "PTOK_LEFT_BRACKET","PTOK_RIGHT_BRACKET","PTOK_DOT","PTOK_AMPERSAND","PTOK_MEMORY_OBJECT",
566 "PTOK_MEMORY","PTOK_NUMBER","PTOK_BIT","UNARYMINUS","ucsim_grammar","assignment",
567 "expression","address_of_expression","memory","bit",""
568 };
569 #endif
570
571 static const short yyr1[] = {     0,
572     19,    20,    20,    21,    21,    21,    21,    21,    21,    21,
573     21,    21,    21,    21,    22,    22,    23,    23,    24,    24
574 };
575
576 static const short yyr2[] = {     0,
577      1,     3,     3,     1,     3,     3,     3,     3,     2,     1,
578      3,     1,     1,     1,     2,     2,     1,     4,     1,     3
579 };
580
581 static const short yydefact[] = {     0,
582      0,     0,     0,     0,    17,    12,    19,     4,     1,    10,
583     13,    14,     9,     0,    15,    16,     0,     0,     0,     0,
584      0,     0,     0,     0,    11,     0,     5,     6,     7,     8,
585      2,    20,     3,    18,     0,     0,     0
586 };
587
588 static const short yydefgoto[] = {    35,
589      8,     9,    10,    11,    12
590 };
591
592 static const short yypact[] = {    -2,
593     -2,    -2,   -10,    23,-32768,-32768,-32768,-32768,    32,-32768,
594     -4,    33,-32768,    25,    27,-32768,    -2,    -2,    -2,    -2,
595     -2,    -2,    -2,    -2,-32768,    21,     4,     4,-32768,-32768,
596     32,    32,    32,-32768,    41,    42,-32768
597 };
598
599 static const short yypgoto[] = {-32768,
600 -32768,    -1,-32768,    40,    43
601 };
602
603
604 #define YYLAST          46
605
606
607 static const short yytable[] = {    13,
608     14,     1,    22,     4,     5,     2,     7,    23,    20,    21,
609      3,     4,     5,     6,     7,    26,    27,    28,    29,    30,
610     31,    32,    33,    18,    19,    20,    21,    18,    19,    20,
611     21,    34,    17,    25,    18,    19,    20,    21,    23,    24,
612     36,    37,    15,     0,     0,    16
613 };
614
615 static const short yycheck[] = {     1,
616      2,     4,     7,    14,    15,     8,    17,    12,     5,     6,
617     13,    14,    15,    16,    17,    17,    18,    19,    20,    21,
618     22,    23,    24,     3,     4,     5,     6,     3,     4,     5,
619      6,    11,    10,     9,     3,     4,     5,     6,    12,     7,
620      0,     0,     3,    -1,    -1,     3
621 };
622
623 #line 352 "/usr/share/bison++/bison.cc"
624  /* fattrs + tables */
625
626 /* parser code folow  */
627
628
629 /* This is the parser code that is written into each bison parser
630   when the %semantic_parser declaration is not specified in the grammar.
631   It was written by Richard Stallman by simplifying the hairy parser
632   used when %semantic_parser is specified.  */
633
634 /* Note: dollar marks section change
635    the next  is replaced by the list of actions, each action
636    as one case of the switch.  */ 
637
638 #if YY_cl_ucsim_parser_USE_GOTO != 0
639 /* 
640  SUPRESSION OF GOTO : on some C++ compiler (sun c++)
641   the goto is strictly forbidden if any constructor/destructor
642   is used in the whole function (very stupid isn't it ?)
643  so goto are to be replaced with a 'while/switch/case construct'
644  here are the macro to keep some apparent compatibility
645 */
646 #define YYGOTO(lb) {yy_gotostate=lb;continue;}
647 #define YYBEGINGOTO  enum yy_labels yy_gotostate=yygotostart; \
648                      for(;;) switch(yy_gotostate) { case yygotostart: {
649 #define YYLABEL(lb) } case lb: {
650 #define YYENDGOTO } } 
651 #define YYBEGINDECLARELABEL enum yy_labels {yygotostart
652 #define YYDECLARELABEL(lb) ,lb
653 #define YYENDDECLARELABEL  };
654 #else
655 /* macro to keep goto */
656 #define YYGOTO(lb) goto lb
657 #define YYBEGINGOTO 
658 #define YYLABEL(lb) lb:
659 #define YYENDGOTO
660 #define YYBEGINDECLARELABEL 
661 #define YYDECLARELABEL(lb)
662 #define YYENDDECLARELABEL 
663 #endif
664 /* LABEL DECLARATION */
665 YYBEGINDECLARELABEL
666   YYDECLARELABEL(yynewstate)
667   YYDECLARELABEL(yybackup)
668 /* YYDECLARELABEL(yyresume) */
669   YYDECLARELABEL(yydefault)
670   YYDECLARELABEL(yyreduce)
671   YYDECLARELABEL(yyerrlab)   /* here on detecting error */
672   YYDECLARELABEL(yyerrlab1)   /* here on error raised explicitly by an action */
673   YYDECLARELABEL(yyerrdefault)  /* current state does not do anything special for the error token. */
674   YYDECLARELABEL(yyerrpop)   /* pop the current state because it cannot handle the error token */
675   YYDECLARELABEL(yyerrhandle)  
676 YYENDDECLARELABEL
677 /* ALLOCA SIMULATION */
678 /* __HAVE_NO_ALLOCA */
679 #ifdef __HAVE_NO_ALLOCA
680 int __alloca_free_ptr(char *ptr,char *ref)
681 {if(ptr!=ref) free(ptr);
682  return 0;}
683
684 #define __ALLOCA_alloca(size) malloc(size)
685 #define __ALLOCA_free(ptr,ref) __alloca_free_ptr((char *)ptr,(char *)ref)
686
687 #ifdef YY_cl_ucsim_parser_LSP_NEEDED
688 #define __ALLOCA_return(num) \
689             do { return( __ALLOCA_free(yyss,yyssa)+\
690                     __ALLOCA_free(yyvs,yyvsa)+\
691                     __ALLOCA_free(yyls,yylsa)+\
692                    (num)); } while(0)
693 #else
694 #define __ALLOCA_return(num) \
695             do { return( __ALLOCA_free(yyss,yyssa)+\
696                     __ALLOCA_free(yyvs,yyvsa)+\
697                    (num)); } while(0)
698 #endif
699 #else
700 #define __ALLOCA_return(num) do { return(num); } while(0)
701 #define __ALLOCA_alloca(size) alloca(size)
702 #define __ALLOCA_free(ptr,ref) 
703 #endif
704
705 /* ENDALLOCA SIMULATION */
706
707 #define yyerrok         (yyerrstatus = 0)
708 #define yyclearin       (YY_cl_ucsim_parser_CHAR = YYEMPTY)
709 #define YYEMPTY         -2
710 #define YYEOF           0
711 #define YYACCEPT        __ALLOCA_return(0)
712 #define YYABORT         __ALLOCA_return(1)
713 #define YYERROR         YYGOTO(yyerrlab1)
714 /* Like YYERROR except do call yyerror.
715    This remains here temporarily to ease the
716    transition to the new meaning of YYERROR, for GCC.
717    Once GCC version 2 has supplanted version 1, this can go.  */
718 #define YYFAIL          YYGOTO(yyerrlab)
719 #define YYRECOVERING()  (!!yyerrstatus)
720 #define YYBACKUP(token, value) \
721 do                                                              \
722   if (YY_cl_ucsim_parser_CHAR == YYEMPTY && yylen == 1)                               \
723     { YY_cl_ucsim_parser_CHAR = (token), YY_cl_ucsim_parser_LVAL = (value);                 \
724       yychar1 = YYTRANSLATE (YY_cl_ucsim_parser_CHAR);                                \
725       YYPOPSTACK;                                               \
726       YYGOTO(yybackup);                                            \
727     }                                                           \
728   else                                                          \
729     { YY_cl_ucsim_parser_ERROR ((char *)"syntax error: cannot back up"); YYERROR; }   \
730 while (0)
731
732 #define YYTERROR        1
733 #define YYERRCODE       256
734
735 #ifndef YY_cl_ucsim_parser_PURE
736 /* UNPURE */
737 #define YYLEX           YY_cl_ucsim_parser_LEX()
738 #ifndef YY_USE_CLASS
739 /* If nonreentrant, and not class , generate the variables here */
740 int     YY_cl_ucsim_parser_CHAR;                      /*  the lookahead symbol        */
741 YY_cl_ucsim_parser_STYPE      YY_cl_ucsim_parser_LVAL;              /*  the semantic value of the */
742                                 /*  lookahead symbol    */
743 int YY_cl_ucsim_parser_NERRS;                 /*  number of parse errors so far */
744 #ifdef YY_cl_ucsim_parser_LSP_NEEDED
745 YY_cl_ucsim_parser_LTYPE YY_cl_ucsim_parser_LLOC;   /*  location data for the lookahead     */
746                         /*  symbol                              */
747 #endif
748 #endif
749
750
751 #else
752 /* PURE */
753 #ifdef YY_cl_ucsim_parser_LSP_NEEDED
754 #define YYLEX           YY_cl_ucsim_parser_LEX(&YY_cl_ucsim_parser_LVAL, &YY_cl_ucsim_parser_LLOC)
755 #else
756 #define YYLEX           YY_cl_ucsim_parser_LEX(&YY_cl_ucsim_parser_LVAL)
757 #endif
758 #endif
759 #ifndef YY_USE_CLASS
760 #if YY_cl_ucsim_parser_DEBUG != 0
761 int YY_cl_ucsim_parser_DEBUG_FLAG;                    /*  nonzero means print parse trace     */
762 /* Since this is uninitialized, it does not stop multiple parsers
763    from coexisting.  */
764 #endif
765 #endif
766
767
768
769 /*  YYINITDEPTH indicates the initial size of the parser's stacks       */
770
771 #ifndef YYINITDEPTH
772 #define YYINITDEPTH 200
773 #endif
774
775 /*  YYMAXDEPTH is the maximum size the stacks can grow to
776     (effective only if the built-in stack extension method is used).  */
777
778 #if YYMAXDEPTH == 0
779 #undef YYMAXDEPTH
780 #endif
781
782 #ifndef YYMAXDEPTH
783 #define YYMAXDEPTH 10000
784 #endif
785
786
787 #if __GNUC__ > 1                /* GNU C and GNU C++ define this.  */
788 #define __yy_bcopy(FROM,TO,COUNT)       __builtin_memcpy(TO,FROM,COUNT)
789 #else                           /* not GNU C or C++ */
790
791 /* This is the most reliable way to avoid incompatibilities
792    in available built-in functions on various systems.  */
793
794 #ifdef __cplusplus
795 static void __yy_bcopy (char *from, char *to, int count)
796 #else
797 #ifdef __STDC__
798 static void __yy_bcopy (char *from, char *to, int count)
799 #else
800 static void __yy_bcopy (from, to, count)
801      char *from;
802      char *to;
803      int count;
804 #endif
805 #endif
806 {
807   register char *f = from;
808   register char *t = to;
809   register int i = count;
810
811   while (i-- > 0)
812     *t++ = *f++;
813 }
814 #endif
815
816
817 int
818 #ifdef YY_USE_CLASS
819  YY_cl_ucsim_parser_CLASS::
820 #endif
821      YY_cl_ucsim_parser_PARSE(YY_cl_ucsim_parser_PARSE_PARAM)
822 #ifndef __STDC__
823 #ifndef __cplusplus
824 #ifndef YY_USE_CLASS
825 /* parameter definition without protypes */
826 YY_cl_ucsim_parser_PARSE_PARAM_DEF
827 #endif
828 #endif
829 #endif
830 {
831   register int yystate;
832   register int yyn;
833   register short *yyssp;
834   register YY_cl_ucsim_parser_STYPE *yyvsp;
835   int yyerrstatus;      /*  number of tokens to shift before error messages enabled */
836   int yychar1=0;          /*  lookahead token as an internal (translated) token number */
837
838   short yyssa[YYINITDEPTH];     /*  the state stack                     */
839   YY_cl_ucsim_parser_STYPE yyvsa[YYINITDEPTH];        /*  the semantic value stack            */
840
841   short *yyss = yyssa;          /*  refer to the stacks thru separate pointers */
842   YY_cl_ucsim_parser_STYPE *yyvs = yyvsa;     /*  to allow yyoverflow to reallocate them elsewhere */
843
844 #ifdef YY_cl_ucsim_parser_LSP_NEEDED
845   YY_cl_ucsim_parser_LTYPE yylsa[YYINITDEPTH];        /*  the location stack                  */
846   YY_cl_ucsim_parser_LTYPE *yyls = yylsa;
847   YY_cl_ucsim_parser_LTYPE *yylsp;
848
849 #define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
850 #else
851 #define YYPOPSTACK   (yyvsp--, yyssp--)
852 #endif
853
854   int yystacksize = YYINITDEPTH;
855
856 #ifdef YY_cl_ucsim_parser_PURE
857   int YY_cl_ucsim_parser_CHAR;
858   YY_cl_ucsim_parser_STYPE YY_cl_ucsim_parser_LVAL;
859   int YY_cl_ucsim_parser_NERRS;
860 #ifdef YY_cl_ucsim_parser_LSP_NEEDED
861   YY_cl_ucsim_parser_LTYPE YY_cl_ucsim_parser_LLOC;
862 #endif
863 #endif
864
865   YY_cl_ucsim_parser_STYPE yyval;             /*  the variable used to return         */
866                                 /*  semantic values from the action     */
867                                 /*  routines                            */
868
869   int yylen;
870 /* start loop, in which YYGOTO may be used. */
871 YYBEGINGOTO
872
873 #if YY_cl_ucsim_parser_DEBUG != 0
874   if (YY_cl_ucsim_parser_DEBUG_FLAG)
875     fprintf(stderr, "Starting parse\n");
876 #endif
877   yystate = 0;
878   yyerrstatus = 0;
879   YY_cl_ucsim_parser_NERRS = 0;
880   YY_cl_ucsim_parser_CHAR = YYEMPTY;          /* Cause a token to be read.  */
881
882   /* Initialize stack pointers.
883      Waste one element of value and location stack
884      so that they stay on the same level as the state stack.
885      The wasted elements are never initialized.  */
886
887   yyssp = yyss - 1;
888   yyvsp = yyvs;
889 #ifdef YY_cl_ucsim_parser_LSP_NEEDED
890   yylsp = yyls;
891 #endif
892
893 /* Push a new state, which is found in  yystate  .  */
894 /* In all cases, when you get here, the value and location stacks
895    have just been pushed. so pushing a state here evens the stacks.  */
896 YYLABEL(yynewstate)
897
898   *++yyssp = yystate;
899
900   if (yyssp >= yyss + yystacksize - 1)
901     {
902       /* Give user a chance to reallocate the stack */
903       /* Use copies of these so that the &'s don't force the real ones into memory. */
904       YY_cl_ucsim_parser_STYPE *yyvs1 = yyvs;
905       short *yyss1 = yyss;
906 #ifdef YY_cl_ucsim_parser_LSP_NEEDED
907       YY_cl_ucsim_parser_LTYPE *yyls1 = yyls;
908 #endif
909
910       /* Get the current used size of the three stacks, in elements.  */
911       int size = yyssp - yyss + 1;
912
913 #ifdef yyoverflow
914       /* Each stack pointer address is followed by the size of
915          the data in use in that stack, in bytes.  */
916 #ifdef YY_cl_ucsim_parser_LSP_NEEDED
917       /* This used to be a conditional around just the two extra args,
918          but that might be undefined if yyoverflow is a macro.  */
919       yyoverflow("parser stack overflow",
920                  &yyss1, size * sizeof (*yyssp),
921                  &yyvs1, size * sizeof (*yyvsp),
922                  &yyls1, size * sizeof (*yylsp),
923                  &yystacksize);
924 #else
925       yyoverflow("parser stack overflow",
926                  &yyss1, size * sizeof (*yyssp),
927                  &yyvs1, size * sizeof (*yyvsp),
928                  &yystacksize);
929 #endif
930
931       yyss = yyss1; yyvs = yyvs1;
932 #ifdef YY_cl_ucsim_parser_LSP_NEEDED
933       yyls = yyls1;
934 #endif
935 #else /* no yyoverflow */
936       /* Extend the stack our own way.  */
937       if (yystacksize >= YYMAXDEPTH)
938         {
939           YY_cl_ucsim_parser_ERROR((char *)"parser stack overflow");
940           __ALLOCA_return(2);
941         }
942       yystacksize *= 2;
943       if (yystacksize > YYMAXDEPTH)
944         yystacksize = YYMAXDEPTH;
945       yyss = (short *) __ALLOCA_alloca (yystacksize * sizeof (*yyssp));
946       __yy_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
947       __ALLOCA_free(yyss1,yyssa);
948       yyvs = (YY_cl_ucsim_parser_STYPE *) __ALLOCA_alloca (yystacksize * sizeof (*yyvsp));
949       __yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
950       __ALLOCA_free(yyvs1,yyvsa);
951 #ifdef YY_cl_ucsim_parser_LSP_NEEDED
952       yyls = (YY_cl_ucsim_parser_LTYPE *) __ALLOCA_alloca (yystacksize * sizeof (*yylsp));
953       __yy_bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
954       __ALLOCA_free(yyls1,yylsa);
955 #endif
956 #endif /* no yyoverflow */
957
958       yyssp = yyss + size - 1;
959       yyvsp = yyvs + size - 1;
960 #ifdef YY_cl_ucsim_parser_LSP_NEEDED
961       yylsp = yyls + size - 1;
962 #endif
963
964 #if YY_cl_ucsim_parser_DEBUG != 0
965       if (YY_cl_ucsim_parser_DEBUG_FLAG)
966         fprintf(stderr, "Stack size increased to %d\n", yystacksize);
967 #endif
968
969       if (yyssp >= yyss + yystacksize - 1)
970         YYABORT;
971     }
972
973 #if YY_cl_ucsim_parser_DEBUG != 0
974   if (YY_cl_ucsim_parser_DEBUG_FLAG)
975     fprintf(stderr, "Entering state %d\n", yystate);
976 #endif
977
978   YYGOTO(yybackup);
979 YYLABEL(yybackup)
980
981 /* Do appropriate processing given the current state.  */
982 /* Read a lookahead token if we need one and don't already have one.  */
983 /* YYLABEL(yyresume) */
984
985   /* First try to decide what to do without reference to lookahead token.  */
986
987   yyn = yypact[yystate];
988   if (yyn == YYFLAG)
989     YYGOTO(yydefault);
990
991   /* Not known => get a lookahead token if don't already have one.  */
992
993   /* yychar is either YYEMPTY or YYEOF
994      or a valid token in external form.  */
995
996   if (YY_cl_ucsim_parser_CHAR == YYEMPTY)
997     {
998 #if YY_cl_ucsim_parser_DEBUG != 0
999       if (YY_cl_ucsim_parser_DEBUG_FLAG)
1000         fprintf(stderr, "Reading a token: ");
1001 #endif
1002       YY_cl_ucsim_parser_CHAR = YYLEX;
1003     }
1004
1005   /* Convert token to internal form (in yychar1) for indexing tables with */
1006
1007   if (YY_cl_ucsim_parser_CHAR <= 0)           /* This means end of input. */
1008     {
1009       yychar1 = 0;
1010       YY_cl_ucsim_parser_CHAR = YYEOF;                /* Don't call YYLEX any more */
1011
1012 #if YY_cl_ucsim_parser_DEBUG != 0
1013       if (YY_cl_ucsim_parser_DEBUG_FLAG)
1014         fprintf(stderr, "Now at end of input.\n");
1015 #endif
1016     }
1017   else
1018     {
1019       yychar1 = YYTRANSLATE(YY_cl_ucsim_parser_CHAR);
1020
1021 #if YY_cl_ucsim_parser_DEBUG != 0
1022       if (YY_cl_ucsim_parser_DEBUG_FLAG)
1023         {
1024           fprintf (stderr, "Next token is %d (%s", YY_cl_ucsim_parser_CHAR, yytname[yychar1]);
1025           /* Give the individual parser a way to print the precise meaning
1026              of a token, for further debugging info.  */
1027 #ifdef YYPRINT
1028           YYPRINT (stderr, YY_cl_ucsim_parser_CHAR, YY_cl_ucsim_parser_LVAL);
1029 #endif
1030           fprintf (stderr, ")\n");
1031         }
1032 #endif
1033     }
1034
1035   yyn += yychar1;
1036   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
1037     YYGOTO(yydefault);
1038
1039   yyn = yytable[yyn];
1040
1041   /* yyn is what to do for this token type in this state.
1042      Negative => reduce, -yyn is rule number.
1043      Positive => shift, yyn is new state.
1044        New state is final state => don't bother to shift,
1045        just return success.
1046      0, or most negative number => error.  */
1047
1048   if (yyn < 0)
1049     {
1050       if (yyn == YYFLAG)
1051         YYGOTO(yyerrlab);
1052       yyn = -yyn;
1053       YYGOTO(yyreduce);
1054     }
1055   else if (yyn == 0)
1056     YYGOTO(yyerrlab);
1057
1058   if (yyn == YYFINAL)
1059     YYACCEPT;
1060
1061   /* Shift the lookahead token.  */
1062
1063 #if YY_cl_ucsim_parser_DEBUG != 0
1064   if (YY_cl_ucsim_parser_DEBUG_FLAG)
1065     fprintf(stderr, "Shifting token %d (%s), ", YY_cl_ucsim_parser_CHAR, yytname[yychar1]);
1066 #endif
1067
1068   /* Discard the token being shifted unless it is eof.  */
1069   if (YY_cl_ucsim_parser_CHAR != YYEOF)
1070     YY_cl_ucsim_parser_CHAR = YYEMPTY;
1071
1072   *++yyvsp = YY_cl_ucsim_parser_LVAL;
1073 #ifdef YY_cl_ucsim_parser_LSP_NEEDED
1074   *++yylsp = YY_cl_ucsim_parser_LLOC;
1075 #endif
1076
1077   /* count tokens shifted since error; after three, turn off error status.  */
1078   if (yyerrstatus) yyerrstatus--;
1079
1080   yystate = yyn;
1081   YYGOTO(yynewstate);
1082
1083 /* Do the default action for the current state.  */
1084 YYLABEL(yydefault)
1085
1086   yyn = yydefact[yystate];
1087   if (yyn == 0)
1088     YYGOTO(yyerrlab);
1089
1090 /* Do a reduction.  yyn is the number of a rule to reduce with.  */
1091 YYLABEL(yyreduce)
1092   yylen = yyr2[yyn];
1093   if (yylen > 0)
1094     yyval = yyvsp[1-yylen]; /* implement default value of the action */
1095
1096 #if YY_cl_ucsim_parser_DEBUG != 0
1097   if (YY_cl_ucsim_parser_DEBUG_FLAG)
1098     {
1099       int i;
1100
1101       fprintf (stderr, "Reducing via rule %d (line %d), ",
1102                yyn, yyrline[yyn]);
1103
1104       /* Print the symbols being reduced, and their result.  */
1105       for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
1106         fprintf (stderr, "%s ", yytname[yyrhs[i]]);
1107       fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
1108     }
1109 #endif
1110
1111
1112  #line 839 "/usr/share/bison++/bison.cc"
1113
1114   switch (yyn) {
1115
1116 case 1:
1117 #line 60 "cmdpars.y"
1118 { application->dd_printf("%d\n", yyvsp[0].number); ;
1119     break;}
1120 case 2:
1121 #line 65 "cmdpars.y"
1122 {
1123             yyvsp[-2].memory.memory->write(yyvsp[-2].memory.address, yyvsp[0].number);
1124             yyval.number= yyvsp[0].number;
1125           ;
1126     break;}
1127 case 3:
1128 #line 70 "cmdpars.y"
1129 {
1130             if (yyvsp[0].number)
1131               {
1132                 yyvsp[-2].bit.memory->write(yyvsp[-2].bit.mem_address,
1133                                  yyvsp[-2].bit.memory->read(yyvsp[-2].bit.mem_address) | yyvsp[-2].bit.mask);
1134                 yyval.number= 1;
1135               }
1136             else
1137               {
1138                 yyvsp[-2].bit.memory->write(yyvsp[-2].bit.mem_address,
1139                                  yyvsp[-2].bit.memory->read(yyvsp[-2].bit.mem_address) & ~(yyvsp[-2].bit.mask));
1140                 yyval.number= 0;
1141               }
1142           ;
1143     break;}
1144 case 4:
1145 #line 87 "cmdpars.y"
1146 { yyval.number= yyvsp[0].number; ;
1147     break;}
1148 case 5:
1149 #line 88 "cmdpars.y"
1150 { yyval.number= yyvsp[-2].number + yyvsp[0].number; ;
1151     break;}
1152 case 6:
1153 #line 89 "cmdpars.y"
1154 { yyval.number= yyvsp[-2].number - yyvsp[0].number; ;
1155     break;}
1156 case 7:
1157 #line 90 "cmdpars.y"
1158 { yyval.number= yyvsp[-2].number * yyvsp[0].number; ;
1159     break;}
1160 case 8:
1161 #line 92 "cmdpars.y"
1162 {
1163             if (yyvsp[0].number == 0)
1164               yyerror((char *)"Divide by zero");
1165             else
1166               yyval.number= yyvsp[-2].number / yyvsp[0].number;
1167           ;
1168     break;}
1169 case 9:
1170 #line 98 "cmdpars.y"
1171 { yyval.number= -yyvsp[0].number; ;
1172     break;}
1173 case 10:
1174 #line 99 "cmdpars.y"
1175 { yyval.number= yyvsp[0].number; ;
1176     break;}
1177 case 11:
1178 #line 100 "cmdpars.y"
1179 { yyval.number= yyvsp[-1].number; ;
1180     break;}
1181 case 12:
1182 #line 101 "cmdpars.y"
1183 { yyval.number= yyvsp[0].number; ;
1184     break;}
1185 case 13:
1186 #line 102 "cmdpars.y"
1187 { yyval.number= yyvsp[0].memory.memory->read(yyvsp[0].memory.address); ;
1188     break;}
1189 case 14:
1190 #line 103 "cmdpars.y"
1191 { yyval.number= (yyvsp[0].bit.memory->read(yyvsp[0].bit.mem_address) & yyvsp[0].bit.mask)?1:0; ;
1192     break;}
1193 case 15:
1194 #line 107 "cmdpars.y"
1195 { yyval.number= yyvsp[0].memory.address; ;
1196     break;}
1197 case 16:
1198 #line 109 "cmdpars.y"
1199 {
1200           yyval.number= yyvsp[0].bit.bit_address;
1201           if (yyval.number < 0)
1202             {
1203               yyerror((char *)"Bit has no address.");
1204               yyval.number= 0;
1205             }
1206         ;
1207     break;}
1208 case 18:
1209 #line 122 "cmdpars.y"
1210 {
1211             yyval.memory.memory= yyvsp[-3].memory_object;
1212             yyval.memory.address= yyvsp[-1].number;
1213           ;
1214     break;}
1215 case 20:
1216 #line 130 "cmdpars.y"
1217 {
1218             yyval.bit.memory= yyvsp[-2].memory.memory;
1219             yyval.bit.mem_address= yyvsp[-2].memory.address;
1220             yyval.bit.mask= 1 << yyvsp[0].number;
1221             yyval.bit.bit_address= -1;
1222             class cl_uc *uc= application->get_uc();
1223             if (uc)
1224               yyval.bit.bit_address= uc->bit_address(yyvsp[-2].memory.memory, yyvsp[-2].memory.address, yyvsp[0].number);
1225           ;
1226     break;}
1227 }
1228
1229 #line 839 "/usr/share/bison++/bison.cc"
1230    /* the action file gets copied in in place of this dollarsign  */
1231   yyvsp -= yylen;
1232   yyssp -= yylen;
1233 #ifdef YY_cl_ucsim_parser_LSP_NEEDED
1234   yylsp -= yylen;
1235 #endif
1236
1237 #if YY_cl_ucsim_parser_DEBUG != 0
1238   if (YY_cl_ucsim_parser_DEBUG_FLAG)
1239     {
1240       short *ssp1 = yyss - 1;
1241       fprintf (stderr, "state stack now");
1242       while (ssp1 != yyssp)
1243         fprintf (stderr, " %d", *++ssp1);
1244       fprintf (stderr, "\n");
1245     }
1246 #endif
1247
1248   *++yyvsp = yyval;
1249
1250 #ifdef YY_cl_ucsim_parser_LSP_NEEDED
1251   yylsp++;
1252   if (yylen == 0)
1253     {
1254       yylsp->first_line = YY_cl_ucsim_parser_LLOC.first_line;
1255       yylsp->first_column = YY_cl_ucsim_parser_LLOC.first_column;
1256       yylsp->last_line = (yylsp-1)->last_line;
1257       yylsp->last_column = (yylsp-1)->last_column;
1258       yylsp->text = 0;
1259     }
1260   else
1261     {
1262       yylsp->last_line = (yylsp+yylen-1)->last_line;
1263       yylsp->last_column = (yylsp+yylen-1)->last_column;
1264     }
1265 #endif
1266
1267   /* Now "shift" the result of the reduction.
1268      Determine what state that goes to,
1269      based on the state we popped back to
1270      and the rule number reduced by.  */
1271
1272   yyn = yyr1[yyn];
1273
1274   yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
1275   if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1276     yystate = yytable[yystate];
1277   else
1278     yystate = yydefgoto[yyn - YYNTBASE];
1279
1280   YYGOTO(yynewstate);
1281
1282 YYLABEL(yyerrlab)   /* here on detecting error */
1283
1284   if (! yyerrstatus)
1285     /* If not already recovering from an error, report this error.  */
1286     {
1287       ++YY_cl_ucsim_parser_NERRS;
1288
1289 #ifdef YY_cl_ucsim_parser_ERROR_VERBOSE
1290       yyn = yypact[yystate];
1291
1292       if (yyn > YYFLAG && yyn < YYLAST)
1293         {
1294           int size = 0;
1295           char *msg;
1296           int x, count;
1297
1298           count = 0;
1299           /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
1300           for (x = (yyn < 0 ? -yyn : 0);
1301                x < (sizeof(yytname) / sizeof(char *)); x++)
1302             if (yycheck[x + yyn] == x)
1303               size += strlen(yytname[x]) + 15, count++;
1304           msg = (char *) malloc(size + 15);
1305           if (msg != 0)
1306             {
1307               strcpy(msg, "parse error");
1308
1309               if (count < 5)
1310                 {
1311                   count = 0;
1312                   for (x = (yyn < 0 ? -yyn : 0);
1313                        x < (sizeof(yytname) / sizeof(char *)); x++)
1314                     if (yycheck[x + yyn] == x)
1315                       {
1316                         strcat(msg, count == 0 ? ", expecting `" : " or `");
1317                         strcat(msg, yytname[x]);
1318                         strcat(msg, "'");
1319                         count++;
1320                       }
1321                 }
1322               YY_cl_ucsim_parser_ERROR(msg);
1323               free(msg);
1324             }
1325           else
1326             YY_cl_ucsim_parser_ERROR ((char *)"parse error; also virtual memory exceeded");
1327         }
1328       else
1329 #endif /* YY_cl_ucsim_parser_ERROR_VERBOSE */
1330         YY_cl_ucsim_parser_ERROR((char *)"parse error");
1331     }
1332
1333   YYGOTO(yyerrlab1);
1334 YYLABEL(yyerrlab1)   /* here on error raised explicitly by an action */
1335
1336   if (yyerrstatus == 3)
1337     {
1338       /* if just tried and failed to reuse lookahead token after an error, discard it.  */
1339
1340       /* return failure if at end of input */
1341       if (YY_cl_ucsim_parser_CHAR == YYEOF)
1342         YYABORT;
1343
1344 #if YY_cl_ucsim_parser_DEBUG != 0
1345       if (YY_cl_ucsim_parser_DEBUG_FLAG)
1346         fprintf(stderr, "Discarding token %d (%s).\n", YY_cl_ucsim_parser_CHAR, yytname[yychar1]);
1347 #endif
1348
1349       YY_cl_ucsim_parser_CHAR = YYEMPTY;
1350     }
1351
1352   /* Else will try to reuse lookahead token
1353      after shifting the error token.  */
1354
1355   yyerrstatus = 3;              /* Each real token shifted decrements this */
1356
1357   YYGOTO(yyerrhandle);
1358
1359 YYLABEL(yyerrdefault)  /* current state does not do anything special for the error token. */
1360
1361 #if 0
1362   /* This is wrong; only states that explicitly want error tokens
1363      should shift them.  */
1364   yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
1365   if (yyn) YYGOTO(yydefault);
1366 #endif
1367
1368 YYLABEL(yyerrpop)   /* pop the current state because it cannot handle the error token */
1369
1370   if (yyssp == yyss) YYABORT;
1371   yyvsp--;
1372   yystate = *--yyssp;
1373 #ifdef YY_cl_ucsim_parser_LSP_NEEDED
1374   yylsp--;
1375 #endif
1376
1377 #if YY_cl_ucsim_parser_DEBUG != 0
1378   if (YY_cl_ucsim_parser_DEBUG_FLAG)
1379     {
1380       short *ssp1 = yyss - 1;
1381       fprintf (stderr, "Error: state stack now");
1382       while (ssp1 != yyssp)
1383         fprintf (stderr, " %d", *++ssp1);
1384       fprintf (stderr, "\n");
1385     }
1386 #endif
1387
1388 YYLABEL(yyerrhandle)
1389
1390   yyn = yypact[yystate];
1391   if (yyn == YYFLAG)
1392     YYGOTO(yyerrdefault);
1393
1394   yyn += YYTERROR;
1395   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1396     YYGOTO(yyerrdefault);
1397
1398   yyn = yytable[yyn];
1399   if (yyn < 0)
1400     {
1401       if (yyn == YYFLAG)
1402         YYGOTO(yyerrpop);
1403       yyn = -yyn;
1404       YYGOTO(yyreduce);
1405     }
1406   else if (yyn == 0)
1407     YYGOTO(yyerrpop);
1408
1409   if (yyn == YYFINAL)
1410     YYACCEPT;
1411
1412 #if YY_cl_ucsim_parser_DEBUG != 0
1413   if (YY_cl_ucsim_parser_DEBUG_FLAG)
1414     fprintf(stderr, "Shifting error token, ");
1415 #endif
1416
1417   *++yyvsp = YY_cl_ucsim_parser_LVAL;
1418 #ifdef YY_cl_ucsim_parser_LSP_NEEDED
1419   *++yylsp = YY_cl_ucsim_parser_LLOC;
1420 #endif
1421
1422   yystate = yyn;
1423   YYGOTO(yynewstate);
1424 /* end loop, in which YYGOTO may be used. */
1425   YYENDGOTO
1426 }
1427
1428 /* END */
1429
1430  #line 1038 "/usr/share/bison++/bison.cc"
1431 #line 141 "cmdpars.y"
1432
1433
1434 int
1435 YY_cl_ucsim_parser_CLASS::yylex(YY_cl_ucsim_parser_STYPE *yylval)
1436 {
1437   lexer_object->activate_lexer_to_parse_into(yylval);
1438   return(lexer_object->yylex());
1439 }
1440
1441 void
1442 YY_cl_ucsim_parser_CLASS::yyerror(char *msg)
1443 {
1444   application->dd_printf("Parser error: %s\n", msg);
1445 }