]> git.saurik.com Git - wxWidgets.git/blame - wxPython/wxSWIG/SWIG/parser.cxx
compilation error fix (trailing comma in an enum)
[wxWidgets.git] / wxPython / wxSWIG / SWIG / parser.cxx
CommitLineData
c90f71dd
RD
1
2/* A Bison parser, made from parser.y
3 by GNU Bison version 1.25
4 */
5
6#define YYBISON 1 /* Identify Bison output. */
7
8#define ID 258
9#define HBLOCK 259
10#define WRAPPER 260
11#define POUND 261
12#define STRING 262
13#define NUM_INT 263
14#define NUM_FLOAT 264
15#define CHARCONST 265
16#define NUM_UNSIGNED 266
17#define NUM_LONG 267
18#define NUM_ULONG 268
19#define TYPEDEF 269
20#define TYPE_INT 270
21#define TYPE_UNSIGNED 271
22#define TYPE_SHORT 272
23#define TYPE_LONG 273
24#define TYPE_FLOAT 274
25#define TYPE_DOUBLE 275
26#define TYPE_CHAR 276
27#define TYPE_VOID 277
28#define TYPE_SIGNED 278
29#define TYPE_BOOL 279
30#define TYPE_TYPEDEF 280
31#define LPAREN 281
32#define RPAREN 282
33#define COMMA 283
34#define SEMI 284
35#define EXTERN 285
36#define INIT 286
37#define LBRACE 287
38#define RBRACE 288
39#define DEFINE 289
40#define PERIOD 290
41#define CONST 291
42#define STRUCT 292
43#define UNION 293
44#define EQUAL 294
45#define SIZEOF 295
46#define MODULE 296
47#define LBRACKET 297
48#define RBRACKET 298
49#define WEXTERN 299
50#define ILLEGAL 300
51#define READONLY 301
52#define READWRITE 302
53#define NAME 303
54#define RENAME 304
55#define INCLUDE 305
56#define CHECKOUT 306
57#define ADDMETHODS 307
58#define PRAGMA 308
59#define CVALUE 309
60#define COUT 310
61#define ENUM 311
62#define ENDDEF 312
63#define MACRO 313
64#define CLASS 314
65#define PRIVATE 315
66#define PUBLIC 316
67#define PROTECTED 317
68#define COLON 318
69#define STATIC 319
70#define VIRTUAL 320
71#define FRIEND 321
72#define OPERATOR 322
73#define THROW 323
74#define TEMPLATE 324
75#define NATIVE 325
76#define INLINE 326
77#define IFDEF 327
78#define IFNDEF 328
79#define ENDIF 329
80#define ELSE 330
81#define UNDEF 331
82#define IF 332
83#define DEFINED 333
84#define ELIF 334
85#define RAW_MODE 335
86#define ALPHA_MODE 336
87#define TEXT 337
88#define DOC_DISABLE 338
89#define DOC_ENABLE 339
90#define STYLE 340
91#define LOCALSTYLE 341
92#define TYPEMAP 342
93#define EXCEPT 343
94#define IMPORT 344
95#define ECHO 345
96#define NEW 346
97#define APPLY 347
98#define CLEAR 348
99#define DOCONLY 349
100#define TITLE 350
101#define SECTION 351
102#define SUBSECTION 352
103#define SUBSUBSECTION 353
104#define LESSTHAN 354
105#define GREATERTHAN 355
106#define USERDIRECTIVE 356
107#define OC_INTERFACE 357
108#define OC_END 358
109#define OC_PUBLIC 359
110#define OC_PRIVATE 360
111#define OC_PROTECTED 361
112#define OC_CLASS 362
113#define OC_IMPLEMENT 363
114#define OC_PROTOCOL 364
115#define OR 365
116#define XOR 366
117#define AND 367
118#define LSHIFT 368
119#define RSHIFT 369
120#define PLUS 370
121#define MINUS 371
122#define STAR 372
123#define SLASH 373
124#define UMINUS 374
125#define NOT 375
126#define LNOT 376
127#define DCOLON 377
128
129#line 1 "parser.y"
130
131/*******************************************************************************
132 * Simplified Wrapper and Interface Generator (SWIG)
133 *
134 * Author : David Beazley
135 *
136 * Department of Computer Science
137 * University of Chicago
138 * 1100 E 58th Street
139 * Chicago, IL 60637
140 * beazley@cs.uchicago.edu
141 *
142 * Please read the file LICENSE for the copyright and terms by which SWIG
143 * can be used and distributed.
144 *******************************************************************************/
145/***********************************************************************
146 * $Header$
147 *
148 * parser.y
149 *
150 * YACC parser for parsing function declarations.
151 *
152 * *** DISCLAIMER ***
153 *
154 * This is the most ugly, incredibly henious, and completely unintelligible
155 * file in SWIG. While it started out simple, it has grown into a
156 * monster that is almost unmaintainable. A complete parser rewrite is
157 * currently in progress that should make this file about 1/4 the size
158 * that it is now. Needless to say, don't modify this file or even look
159 * at it for that matter!
160 ***********************************************************************/
161
162#define yylex yylex
163
164extern "C" int yylex();
165void yyerror (char *s);
166
167extern int line_number;
168extern int start_line;
169extern void skip_brace(void);
170extern void skip_define(void);
171extern void skip_decl(void);
172extern int skip_cond(int);
173extern void skip_to_end(void);
174extern void skip_template(void);
175extern void scanner_check_typedef(void);
176extern void scanner_ignore_typedef(void);
177extern void scanner_clear_start(void);
178extern void start_inline(char *, int);
179extern void format_string(char *);
180extern void swig_pragma(char *, char *);
181
182#include "internal.h"
183
184#ifdef NEED_ALLOC
185void *alloca(unsigned n) {
186 return((void *) malloc(n));
187}
188#else
189// This redefinition is apparently needed on a number of machines,
190// particularly HPUX
191#undef alloca
192#define alloca malloc
193#endif
194
195// Initialization flags. These indicate whether or not certain
196// features have been initialized. These were added to allow
197// interface files without the block (required in previous
198// versions).
199
200static int module_init = 0; /* Indicates whether the %module name was given */
201static int title_init = 0; /* Indicates whether %title directive has been given */
202static int doc_init = 0;
203
204static int lang_init = 0; /* Indicates if the language has been initialized */
205
206static int i;
207 int Error = 0;
208static char temp_name[128];
209static DataType *temp_typeptr, temp_type;
210static char yy_rename[256];
211static int Rename_true = 0;
212static DataType *Active_type = 0; // Used to support variable lists
213static int Active_extern = 0; // Whether or not list is external
214static int Active_static = 0;
215static DataType *Active_typedef = 0; // Used for typedef lists
216static int InArray = 0; // Used when an array declaration is found
217static int in_then = 0;
218static int in_else = 0;
219static int allow = 1; // Used during conditional compilation
220static int doc_scope = 0; // Documentation scoping
221static String ArrayString; // Array type attached to parameter names
222static String ArrayBackup; // Array backup string
223static char *DefArg = 0; // Default argument hack
224static char *ConstChar = 0; // Used to store raw character constants
225static ParmList *tm_parm = 0; // Parameter list used to hold typemap parameters
226static Hash name_hash; // Hash table containing renamings
227 char *objc_construct = "new"; // Objective-C constructor
228 char *objc_destruct = "free"; // Objective-C destructor
229
230/* Some macros for building constants */
231
232#define E_BINARY(TARGET, SRC1, SRC2, OP) \
233 TARGET = new char[strlen(SRC1) + strlen(SRC2) +strlen(OP)+1];\
234 sprintf(TARGET,"%s%s%s",SRC1,OP,SRC2);
235
236/* C++ modes */
237
238#define CPLUS_PUBLIC 1
239#define CPLUS_PRIVATE 2
240#define CPLUS_PROTECTED 3
241
242int cplus_mode;
243
244// Declarations of some functions for handling C++
245
246extern void cplus_open_class(char *name, char *rname, char *ctype);
247extern void cplus_member_func(char *, char *, DataType *, ParmList *, int);
248extern void cplus_constructor(char *, char *, ParmList *);
249extern void cplus_destructor(char *, char *);
250extern void cplus_variable(char *, char *, DataType *);
251extern void cplus_static_func(char *, char *, DataType *, ParmList *);
252extern void cplus_declare_const(char *, char *, DataType *, char *);
253extern void cplus_class_close(char *);
254extern void cplus_inherit(int, char **);
255extern void cplus_cleanup(void);
256extern void cplus_static_var(char *, char *, DataType *);
257extern void cplus_register_type(char *);
258extern void cplus_register_scope(Hash *);
259extern void cplus_inherit_scope(int, char **);
260extern void cplus_add_pragma(char *, char *, char *);
261extern DocEntry *cplus_set_class(char *);
262extern void cplus_unset_class();
263extern void cplus_abort();
264
265// ----------------------------------------------------------------------
266// static init_language()
267//
268// Initialize the target language.
269// Does nothing if this function has already been called.
270// ----------------------------------------------------------------------
271
272static void init_language() {
273 if (!lang_init) {
274 lang->initialize();
275
276 // Initialize the documentation system
277
278 if (!doctitle) {
279 doctitle = new DocTitle(title,0);
280 }
281 if (!doc_init)
282 doctitle->usage = title;
283
284 doc_stack[0] = doctitle;
285 doc_stack_top = 0;
286
287 int oldignore = IgnoreDoc;
288 IgnoreDoc = 1;
289 if (ConfigFile) {
290 include_file(ConfigFile);
291 }
292 IgnoreDoc = oldignore;
293 }
294 lang_init = 1;
295 title_init = 1;
296}
297
298// ----------------------------------------------------------------------
299// int promote(int t1, int t2)
300//
301// Promote types (for constant expressions)
302// ----------------------------------------------------------------------
303
304int promote(int t1, int t2) {
305
306 if ((t1 == T_ERROR) || (t2 == T_ERROR)) return T_ERROR;
307 if ((t1 == T_DOUBLE) || (t2 == T_DOUBLE)) return T_DOUBLE;
308 if ((t1 == T_FLOAT) || (t2 == T_FLOAT)) return T_FLOAT;
309 if ((t1 == T_ULONG) || (t2 == T_ULONG)) return T_ULONG;
310 if ((t1 == T_LONG) || (t2 == T_LONG)) return T_LONG;
311 if ((t1 == T_UINT) || (t2 == T_UINT)) return T_UINT;
312 if ((t1 == T_INT) || (t2 == T_INT)) return T_INT;
313 if ((t1 == T_USHORT) || (t2 == T_USHORT)) return T_SHORT;
314 if ((t1 == T_SHORT) || (t2 == T_SHORT)) return T_SHORT;
315 if ((t1 == T_UCHAR) || (t2 == T_UCHAR)) return T_UCHAR;
316 if (t1 != t2) {
317 fprintf(stderr,"%s : Line %d. Type mismatch in constant expression\n",
318 input_file, line_number);
319 FatalError();
320 }
321 return t1;
322}
323
324/* Generate the scripting name of an object. Takes %name directive into
325 account among other things */
326
327static char *make_name(char *name) {
328 // Check to see if the name is in the hash
329 char *nn = (char *) name_hash.lookup(name);
330 if (nn) return nn; // Yep, return it.
331
332 if (Rename_true) {
333 Rename_true = 0;
334 return yy_rename;
335 } else {
336 // Now check to see if the name contains a $
337 if (strchr(name,'$')) {
338 static String temp;
339 temp = "";
340 temp << name;
341 temp.replace("$","_S_");
342 return temp;
343 } else {
344 return name;
345 }
346 }
347}
348
349/* Return the parent of a documentation entry. If wrapping externally, this is 0 */
350
351static DocEntry *doc_parent() {
352 if (!WrapExtern)
353 return doc_stack[doc_stack_top];
354 else
355 return 0;
356}
357
358// ----------------------------------------------------------------------
359// create_function(int ext, char *name, DataType *t, ParmList *l)
360//
361// Creates a function and manages documentation creation. Really
362// only used internally to the parser.
363// ----------------------------------------------------------------------
364
365void create_function(int ext, char *name, DataType *t, ParmList *l) {
366 if (Active_static) return; // Static declaration. Ignore
367
368 init_language();
369 if (WrapExtern) return; // External wrapper file. Ignore
370
371 char *iname = make_name(name);
372
373 // Check if symbol already exists
374
375 if (add_symbol(iname, t, (char *) 0)) {
376 fprintf(stderr,"%s : Line %d. Function %s multiply defined (2nd definition ignored).\n",
377 input_file, line_number, iname);
378 } else {
379 Stat_func++;
380 if (Verbose) {
381 fprintf(stderr,"Wrapping function : ");
382 emit_extern_func(name, t, l, 0, stderr);
383 }
384
385 // If extern, make an extern declaration in the SWIG wrapper file
386
387 if (ext)
388 emit_extern_func(name, t, l, ext, f_header);
389 else if (ForceExtern) {
390 emit_extern_func(name, t, l, 1, f_header);
391 }
392
393 // If this function has been declared inline, produce a function
394
395 doc_entry = new DocDecl(iname,doc_stack[doc_stack_top]);
396 lang->create_function(name, iname, t, l);
397 l->check_defined();
398 t->check_defined();
399 }
400 scanner_clear_start();
401}
402
403// -------------------------------------------------------------------
404// create_variable(int ext, char *name, DataType *t)
405//
406// Create a link to a global variable.
407// -------------------------------------------------------------------
408
409void create_variable(int ext, char *name, DataType *t) {
410
411 if (WrapExtern) return; // External wrapper file. Ignore
412 int oldstatus = Status;
413
414 if (Active_static) return; // If static ignore
415
416 init_language();
417
418 char *iname = make_name(name);
419 if (add_symbol(iname, t, (char *) 0)) {
420 fprintf(stderr,"%s : Line %d. Variable %s multiply defined (2nd definition ignored).\n",
421 input_file, line_number, iname);
422 } else {
423 Stat_var++;
424 if (Verbose) {
425 fprintf(stderr,"Wrapping variable : ");
426 emit_extern_var(name, t, 0, stderr);
427 }
428
429 // If externed, output an external declaration
430
431 if (ext)
432 emit_extern_var(name, t, ext, f_header);
433 else if (ForceExtern) {
434 emit_extern_var(name, t, 1, f_header);
435 }
436
437 // If variable datatype is read-only, we'll force it to be readonly
438 if (t->status & STAT_READONLY) Status = Status | STAT_READONLY;
439
440 // Now dump it out
441 doc_entry = new DocDecl(iname,doc_stack[doc_stack_top]);
442 lang->link_variable(name, iname, t);
443 t->check_defined();
444 Status = oldstatus;
445 }
446 scanner_clear_start();
447}
448
449// ------------------------------------------------------------------
450// create_constant(char *name, DataType *type, char *value)
451//
452// Creates a new constant.
453// -------------------------------------------------------------------
454
455void create_constant(char *name, DataType *type, char *value) {
456
457 if (Active_static) return;
458 if (WrapExtern) return; // External wrapper file. Ignore
459 init_language();
460
461 if (Rename_true) {
462 fprintf(stderr,"%s : Line %d. %%name directive ignored with #define\n",
463 input_file, line_number);
464 Rename_true = 0;
465 }
466
467 if ((type->type == T_CHAR) && (!type->is_pointer))
468 type->is_pointer++;
469
470 if (!value) value = copy_string(name);
471 sprintf(temp_name,"const:%s", name);
472 if (add_symbol(temp_name, type, value)) {
473 fprintf(stderr,"%s : Line %d. Constant %s multiply defined. (2nd definition ignored)\n",
474 input_file, line_number, name);
475 } else {
476 // Update symbols value if already defined.
477 update_symbol(name, type, value);
478
479 if (!WrapExtern) { // Only wrap the constant if not in %extern mode
480 Stat_const++;
481 if (Verbose)
482 fprintf(stderr,"Creating constant %s = %s\n", name, value);
483
484 doc_entry = new DocDecl(name,doc_stack[doc_stack_top]);
485 lang->declare_const(name, name, type, value);
486 type->check_defined();
487 }
488 }
489 scanner_clear_start();
490}
491
492
493/* Print out array brackets */
494void print_array() {
495 int i;
496 for (i = 0; i < InArray; i++)
497 fprintf(stderr,"[]");
498}
499
500/* manipulate small stack for managing if-then-else */
501
502static int then_data[100];
503static int else_data[100];
504static int allow_data[100];
505static int te_index = 0;
506static int prev_allow = 1;
507
508void if_push() {
509 then_data[te_index] = in_then;
510 else_data[te_index] = in_else;
511 allow_data[te_index] = allow;
512 prev_allow = allow;
513 te_index++;
514 if (te_index >= 100) {
515 fprintf(stderr,"SWIG. Internal parser error. if-then-else stack overflow.\n");
516 SWIG_exit(1);
517 }
518}
519
520void if_pop() {
521 if (te_index > 0) {
522 te_index--;
523 in_then = then_data[te_index];
524 in_else = else_data[te_index];
525 allow = allow_data[te_index];
526 if (te_index > 0) {
527 prev_allow = allow_data[te_index-1];
528 } else {
529 prev_allow = 1;
530 }
531 }
532}
533
534// Structures for handling code fragments built for nested classes
535
536struct Nested {
537 String code; // Associated code fragment
538 int line; // line number where it starts
539 char *name; // Name associated with this nested class
540 DataType *type; // Datatype associated with the name
541 Nested *next; // Next code fragment in list
542};
543
544// Some internal variables for saving nested class information
545
546static Nested *nested_list = 0;
547
548// Add a function to the nested list
549
550static void add_nested(Nested *n) {
551 Nested *n1;
552 if (!nested_list) nested_list = n;
553 else {
554 n1 = nested_list;
555 while (n1->next) n1 = n1->next;
556 n1->next = n;
557 }
558}
559
560// Dump all of the nested class declarations to the inline processor
561// However. We need to do a few name replacements and other munging
562// first. This function must be called before closing a class!
563
564static void dump_nested(char *parent) {
565 Nested *n,*n1;
566 n = nested_list;
567 int oldstatus = Status;
568
569 Status = STAT_READONLY;
570 while (n) {
571 // Token replace the name of the parent class
572 n->code.replace("$classname",parent);
573
574 // Fix up the name of the datatype (for building typedefs and other stuff)
575 sprintf(n->type->name,"%s_%s",parent,n->name);
576
577 // Add the appropriate declaration to the C++ processor
578 doc_entry = new DocDecl(n->name,doc_stack[doc_stack_top]);
579 cplus_variable(n->name,(char *) 0, n->type);
580
581 // Dump the code to the scanner
582 if (Verbose)
583 fprintf(stderr,"Splitting from %s : (line %d) \n%s\n", parent,n->line, n->code.get());
584
585 fprintf(f_header,"\n%s\n", n->code.get());
586 start_inline(n->code.get(),n->line);
587
588 n1 = n->next;
589 delete n;
590 n = n1;
591 }
592 nested_list = 0;
593 Status = oldstatus;
594}
595
596
597#line 475 "parser.y"
598typedef union {
599 char *id;
600 struct Declaration {
601 char *id;
602 int is_pointer;
603 int is_reference;
604 } decl;
605 struct InitList {
606 char **names;
607 int count;
608 } ilist;
609 struct DocList {
610 char **names;
611 char **values;
612 int count;
613 } dlist;
614 struct Define {
615 char *id;
616 int type;
617 } dtype;
618 DataType *type;
619 Parm *p;
620 TMParm *tmparm;
621 ParmList *pl;
622 int ivalue;
623} YYSTYPE;
624#include <stdio.h>
625
626#ifndef __cplusplus
627#ifndef __STDC__
628#define const
629#endif
630#endif
631
632
633
634#define YYFINAL 907
635#define YYFLAG -32768
636#define YYNTBASE 123
637
638#define YYTRANSLATE(x) ((unsigned)(x) <= 377 ? yytranslate[x] : 258)
639
640static const char yytranslate[] = { 0,
641 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
642 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
643 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
644 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
645 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
646 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
647 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
648 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
649 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
650 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
651 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
652 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
653 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
654 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
655 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
656 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
657 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
658 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
659 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
660 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
661 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
662 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
663 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
664 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
665 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
666 2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
667 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
668 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
669 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
670 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
671 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
672 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
673 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
674 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
675 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
676 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
677 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
678 116, 117, 118, 119, 120, 121, 122
679};
680
681#if YYDEBUG != 0
682static const short yyprhs[] = { 0,
683 0, 1, 4, 7, 9, 12, 15, 18, 21, 23,
684 24, 32, 37, 38, 46, 51, 52, 62, 70, 71,
685 80, 88, 96, 97, 107, 109, 111, 116, 121, 122,
686 126, 127, 133, 141, 153, 157, 161, 165, 169, 171,
687 173, 175, 178, 180, 182, 185, 188, 191, 194, 197,
688 199, 203, 207, 211, 214, 217, 218, 227, 228, 229,
689 240, 249, 256, 265, 272, 283, 292, 298, 302, 308,
690 311, 317, 320, 322, 324, 326, 328, 334, 336, 338,
691 341, 344, 346, 348, 350, 351, 357, 368, 380, 381,
692 388, 392, 396, 398, 401, 404, 406, 408, 411, 414,
693 419, 422, 425, 433, 437, 444, 446, 447, 454, 455,
694 464, 467, 469, 472, 474, 476, 479, 482, 485, 487,
695 491, 493, 495, 498, 501, 505, 509, 518, 522, 525,
696 528, 530, 532, 535, 539, 542, 545, 547, 549, 551,
697 554, 556, 558, 561, 564, 567, 570, 574, 579, 581,
698 583, 585, 588, 591, 593, 595, 597, 599, 601, 604,
699 607, 610, 613, 616, 619, 623, 626, 629, 631, 634,
700 637, 639, 641, 643, 645, 647, 650, 653, 656, 659,
701 662, 664, 666, 669, 672, 674, 676, 678, 681, 684,
702 686, 688, 690, 691, 694, 696, 698, 702, 704, 706,
703 708, 712, 714, 716, 717, 722, 725, 727, 729, 731,
704 733, 735, 737, 739, 741, 746, 751, 753, 757, 761,
705 765, 769, 773, 777, 781, 785, 789, 793, 796, 799,
706 803, 805, 807, 808, 817, 818, 819, 831, 832, 833,
707 843, 848, 858, 865, 871, 873, 874, 881, 884, 887,
708 889, 892, 893, 894, 902, 903, 907, 909, 916, 924,
709 930, 937, 944, 945, 951, 956, 957, 963, 971, 974,
710 977, 980, 985, 986, 990, 991, 999, 1001, 1003, 1005,
711 1009, 1011, 1013, 1015, 1019, 1026, 1027, 1034, 1035, 1041,
712 1045, 1049, 1053, 1057, 1059, 1061, 1063, 1065, 1067, 1069,
713 1071, 1073, 1074, 1080, 1081, 1088, 1091, 1094, 1097, 1102,
714 1105, 1109, 1111, 1113, 1117, 1123, 1131, 1134, 1136, 1139,
715 1141, 1143, 1147, 1149, 1152, 1156, 1159, 1163, 1165, 1167,
716 1169, 1171, 1173, 1175, 1177, 1182, 1184, 1188, 1192, 1195,
717 1197, 1199, 1203, 1208, 1212, 1214, 1218, 1219, 1229, 1230,
718 1240, 1242, 1244, 1249, 1253, 1256, 1258, 1260, 1263, 1264,
719 1268, 1269, 1273, 1274, 1278, 1279, 1283, 1285, 1289, 1292,
720 1296, 1297, 1304, 1308, 1313, 1315, 1318, 1319, 1325, 1326,
721 1333, 1334, 1338, 1340, 1346, 1352, 1354, 1356, 1360, 1365,
722 1367, 1371, 1373, 1378, 1380, 1382, 1385, 1389, 1394, 1396,
723 1399, 1402, 1404, 1406, 1408, 1411, 1415, 1417, 1420, 1424,
724 1428, 1437, 1440, 1441, 1446, 1447, 1451, 1453, 1457, 1459,
725 1461, 1463, 1469, 1472, 1475, 1478, 1481
726};
727
728static const short yyrhs[] = { -1,
729 124, 125, 0, 125, 126, 0, 257, 0, 50, 254,
730 0, 44, 254, 0, 89, 254, 0, 51, 254, 0,
731 6, 0, 0, 149, 163, 159, 162, 156, 127, 145,
732 0, 149, 164, 26, 117, 0, 0, 64, 163, 159,
733 162, 156, 128, 145, 0, 64, 164, 26, 117, 0,
734 0, 149, 163, 159, 26, 151, 27, 213, 129, 145,
735 0, 149, 163, 159, 26, 151, 27, 150, 0, 0,
736 149, 159, 26, 151, 27, 213, 130, 145, 0, 64,
737 163, 159, 26, 151, 27, 150, 0, 71, 163, 159,
738 26, 151, 27, 150, 0, 0, 64, 163, 159, 26,
739 151, 27, 213, 131, 145, 0, 46, 0, 47, 0,
740 48, 26, 3, 27, 0, 49, 3, 3, 29, 0,
741 0, 91, 132, 126, 0, 0, 48, 26, 27, 133,
742 177, 0, 70, 26, 3, 27, 149, 3, 29, 0,
743 70, 26, 3, 27, 149, 163, 159, 26, 151, 27,
744 29, 0, 95, 7, 244, 0, 96, 7, 244, 0,
745 97, 7, 244, 0, 98, 7, 244, 0, 81, 0,
746 80, 0, 137, 0, 82, 4, 0, 138, 0, 4,
747 0, 5, 4, 0, 31, 4, 0, 71, 4, 0,
748 90, 4, 0, 90, 7, 0, 94, 0, 31, 3,
749 170, 0, 41, 3, 170, 0, 34, 3, 148, 0,
750 34, 58, 0, 76, 3, 0, 0, 149, 56, 171,
751 32, 134, 172, 33, 29, 0, 0, 0, 14, 56,
752 171, 32, 135, 172, 33, 3, 136, 141, 0, 87,
753 26, 3, 28, 246, 27, 247, 32, 0, 87, 26,
754 246, 27, 247, 32, 0, 87, 26, 3, 28, 246,
755 27, 247, 29, 0, 87, 26, 246, 27, 247, 29,
756 0, 87, 26, 3, 28, 246, 27, 247, 39, 249,
757 29, 0, 87, 26, 246, 27, 247, 39, 249, 29,
758 0, 92, 249, 32, 247, 33, 0, 93, 247, 29,
759 0, 88, 26, 3, 27, 32, 0, 88, 32, 0,
760 88, 26, 3, 27, 29, 0, 88, 29, 0, 29,
761 0, 177, 0, 219, 0, 1, 0, 30, 7, 32,
762 125, 33, 0, 142, 0, 144, 0, 85, 243, 0,
763 86, 243, 0, 255, 0, 83, 0, 84, 0, 0,
764 14, 163, 159, 139, 141, 0, 14, 163, 26, 117,
765 155, 27, 26, 151, 27, 29, 0, 14, 163, 160,
766 26, 117, 155, 27, 26, 151, 27, 29, 0, 0,
767 14, 163, 159, 161, 140, 141, 0, 28, 159, 141,
768 0, 28, 159, 161, 0, 257, 0, 72, 3, 0,
769 73, 3, 0, 75, 0, 74, 0, 77, 143, 0,
770 79, 143, 0, 78, 26, 3, 27, 0, 78, 3,
771 0, 121, 143, 0, 53, 26, 3, 28, 3, 245,
772 27, 0, 53, 3, 245, 0, 53, 26, 3, 27,
773 3, 245, 0, 29, 0, 0, 28, 159, 162, 156,
774 146, 145, 0, 0, 28, 159, 26, 151, 27, 213,
775 147, 145, 0, 168, 57, 0, 57, 0, 1, 57,
776 0, 30, 0, 257, 0, 30, 7, 0, 213, 32,
777 0, 153, 152, 0, 257, 0, 28, 153, 152, 0,
778 257, 0, 154, 0, 158, 154, 0, 163, 155, 0,
779 163, 160, 155, 0, 163, 112, 155, 0, 163, 26,
780 160, 155, 27, 26, 151, 27, 0, 35, 35, 35,
781 0, 3, 156, 0, 3, 161, 0, 161, 0, 257,
782 0, 39, 168, 0, 39, 112, 3, 0, 39, 32,
783 0, 63, 8, 0, 257, 0, 54, 0, 55, 0,
784 158, 157, 0, 157, 0, 3, 0, 160, 3, 0,
785 112, 3, 0, 117, 257, 0, 117, 160, 0, 42,
786 43, 162, 0, 42, 176, 43, 162, 0, 161, 0,
787 257, 0, 15, 0, 17, 167, 0, 18, 167, 0,
788 21, 0, 24, 0, 19, 0, 20, 0, 22, 0,
789 23, 165, 0, 16, 166, 0, 25, 223, 0, 3,
790 223, 0, 36, 163, 0, 212, 3, 0, 3, 122,
791 3, 0, 122, 3, 0, 56, 3, 0, 15, 0,
792 17, 167, 0, 18, 167, 0, 21, 0, 24, 0,
793 19, 0, 20, 0, 22, 0, 23, 165, 0, 16,
794 166, 0, 25, 223, 0, 36, 163, 0, 212, 3,
795 0, 257, 0, 15, 0, 17, 167, 0, 18, 167,
796 0, 21, 0, 257, 0, 15, 0, 17, 167, 0,
797 18, 167, 0, 21, 0, 15, 0, 257, 0, 0,
798 169, 176, 0, 7, 0, 10, 0, 170, 28, 3,
799 0, 257, 0, 3, 0, 257, 0, 172, 28, 173,
800 0, 173, 0, 3, 0, 0, 3, 39, 174, 175,
801 0, 142, 173, 0, 257, 0, 176, 0, 10, 0,
802 8, 0, 9, 0, 11, 0, 12, 0, 13, 0,
803 40, 26, 163, 27, 0, 26, 164, 27, 176, 0,
804 3, 0, 3, 122, 3, 0, 176, 115, 176, 0,
805 176, 116, 176, 0, 176, 117, 176, 0, 176, 118,
806 176, 0, 176, 112, 176, 0, 176, 110, 176, 0,
807 176, 111, 176, 0, 176, 113, 176, 0, 176, 114,
808 176, 0, 116, 176, 0, 120, 176, 0, 26, 176,
809 27, 0, 178, 0, 184, 0, 0, 149, 212, 3,
810 208, 32, 179, 187, 33, 0, 0, 0, 14, 212,
811 3, 208, 32, 180, 187, 33, 159, 181, 141, 0,
812 0, 0, 14, 212, 32, 182, 187, 33, 159, 183,
813 141, 0, 149, 212, 3, 29, 0, 149, 163, 159,
814 122, 3, 26, 151, 27, 29, 0, 149, 163, 159,
815 122, 3, 29, 0, 149, 163, 159, 122, 67, 0,
816 69, 0, 0, 52, 3, 32, 185, 186, 33, 0,
817 191, 187, 0, 237, 233, 0, 257, 0, 191, 187,
818 0, 0, 0, 52, 32, 188, 187, 33, 189, 187,
819 0, 0, 1, 190, 187, 0, 257, 0, 163, 159,
820 26, 151, 27, 204, 0, 65, 163, 159, 26, 151,
821 27, 205, 0, 3, 26, 151, 27, 214, 0, 120,
822 3, 26, 151, 27, 204, 0, 65, 120, 3, 26,
823 27, 204, 0, 0, 163, 159, 156, 192, 201, 0,
824 163, 159, 161, 156, 0, 0, 64, 163, 159, 193,
825 201, 0, 64, 163, 159, 26, 151, 27, 204, 0,
826 61, 63, 0, 60, 63, 0, 62, 63, 0, 48,
827 26, 3, 27, 0, 0, 91, 194, 191, 0, 0,
828 56, 171, 32, 195, 206, 33, 29, 0, 46, 0,
829 47, 0, 66, 0, 163, 200, 67, 0, 142, 0,
830 138, 0, 196, 0, 53, 3, 245, 0, 53, 26,
831 3, 27, 3, 245, 0, 0, 212, 3, 32, 197,
832 199, 29, 0, 0, 212, 32, 198, 159, 29, 0,
833 212, 3, 29, 0, 163, 160, 26, 0, 164, 26,
834 117, 0, 3, 26, 117, 0, 137, 0, 29, 0,
835 159, 0, 257, 0, 160, 0, 112, 0, 257, 0,
836 29, 0, 0, 28, 159, 156, 202, 201, 0, 0,
837 28, 159, 161, 156, 203, 201, 0, 213, 29, 0,
838 213, 32, 0, 213, 29, 0, 213, 39, 168, 29,
839 0, 213, 32, 0, 206, 28, 207, 0, 207, 0,
840 3, 0, 3, 39, 175, 0, 48, 26, 3, 27,
841 3, 0, 48, 26, 3, 27, 3, 39, 175, 0,
842 142, 207, 0, 257, 0, 63, 209, 0, 257, 0,
843 210, 0, 209, 28, 210, 0, 3, 0, 65, 3,
844 0, 65, 211, 3, 0, 211, 3, 0, 211, 65,
845 3, 0, 61, 0, 60, 0, 62, 0, 59, 0,
846 37, 0, 38, 0, 36, 0, 68, 26, 151, 27,
847 0, 257, 0, 213, 215, 29, 0, 213, 215, 32,
848 0, 63, 216, 0, 257, 0, 217, 0, 216, 28,
849 217, 0, 3, 26, 218, 27, 0, 3, 26, 27,
850 0, 176, 0, 218, 28, 176, 0, 0, 102, 3,
851 222, 220, 32, 224, 33, 233, 103, 0, 0, 102,
852 3, 26, 3, 27, 223, 221, 233, 103, 0, 108,
853 0, 109, 0, 107, 3, 170, 29, 0, 63, 3,
854 223, 0, 223, 257, 0, 99, 0, 257, 0, 229,
855 224, 0, 0, 104, 225, 224, 0, 0, 105, 226,
856 224, 0, 0, 106, 227, 224, 0, 0, 1, 228,
857 224, 0, 257, 0, 230, 232, 29, 0, 163, 159,
858 0, 163, 159, 161, 0, 0, 48, 26, 3, 27,
859 231, 230, 0, 28, 159, 232, 0, 28, 159, 161,
860 232, 0, 257, 0, 237, 233, 0, 0, 52, 32,
861 234, 233, 33, 0, 0, 48, 26, 3, 27, 235,
862 233, 0, 0, 1, 236, 233, 0, 257, 0, 116,
863 239, 3, 241, 238, 0, 115, 239, 3, 241, 238,
864 0, 29, 0, 32, 0, 26, 163, 27, 0, 26,
865 163, 160, 27, 0, 257, 0, 26, 153, 27, 0,
866 257, 0, 241, 242, 240, 3, 0, 257, 0, 63,
867 0, 3, 63, 0, 3, 245, 244, 0, 244, 28,
868 3, 245, 0, 257, 0, 39, 8, 0, 39, 7,
869 0, 257, 0, 3, 0, 36, 0, 249, 248, 0,
870 28, 249, 248, 0, 257, 0, 163, 250, 0, 163,
871 160, 250, 0, 163, 112, 250, 0, 163, 26, 160,
872 250, 27, 26, 151, 27, 0, 3, 253, 0, 0,
873 3, 161, 251, 253, 0, 0, 161, 252, 253, 0,
874 253, 0, 26, 151, 27, 0, 257, 0, 3, 0,
875 7, 0, 101, 26, 151, 27, 256, 0, 101, 256,
876 0, 3, 29, 0, 7, 29, 0, 32, 33, 0,
877 0
878};
879
880#endif
881
882#if YYDEBUG != 0
883static const short yyrline[] = { 0,
884 559, 568, 582, 586, 590, 601, 618, 636, 646, 657,
885 684, 688, 696, 702, 708, 717, 729, 733, 746, 755,
886 759, 774, 797, 806, 812, 819, 825, 833, 842, 844,
887 850, 856, 862, 874, 895, 943, 973, 1009, 1046, 1054,
888 1062, 1066, 1075, 1079, 1090, 1100, 1109, 1119, 1125, 1132,
889 1138, 1160, 1176, 1195, 1202, 1208, 1208, 1223, 1223, 1233,
890 1243, 1256, 1275, 1287, 1305, 1320, 1341, 1352, 1369, 1376,
891 1383, 1388, 1394, 1395, 1396, 1397, 1415, 1416, 1420, 1424,
892 1440, 1453, 1459, 1473, 1492, 1504, 1508, 1530, 1554, 1570,
893 1583, 1595, 1606, 1626, 1652, 1675, 1694, 1704, 1730, 1759,
894 1768, 1775, 1781, 1789, 1793, 1801, 1802, 1828, 1829, 1839,
895 1842, 1845, 1848, 1856, 1857, 1858, 1870, 1879, 1885, 1888,
896 1893, 1896, 1901, 1916, 1942, 1961, 1973, 1984, 1994, 2003,
897 2008, 2014, 2021, 2022, 2028, 2032, 2034, 2037, 2038, 2041,
898 2044, 2051, 2055, 2060, 2070, 2071, 2075, 2079, 2086, 2089,
899 2097, 2100, 2103, 2106, 2109, 2112, 2115, 2118, 2121, 2125,
900 2129, 2140, 2155, 2160, 2165, 2174, 2180, 2190, 2193, 2196,
901 2199, 2202, 2205, 2208, 2211, 2214, 2218, 2222, 2226, 2231,
902 2240, 2243, 2249, 2255, 2261, 2271, 2274, 2280, 2286, 2292,
903 2300, 2301, 2304, 2304, 2310, 2317, 2329, 2335, 2345, 2346,
904 2352, 2353, 2357, 2362, 2362, 2369, 2370, 2373, 2385, 2396,
905 2400, 2404, 2408, 2412, 2416, 2421, 2426, 2438, 2445, 2451,
906 2457, 2464, 2471, 2482, 2494, 2506, 2518, 2530, 2537, 2547,
907 2558, 2559, 2562, 2596, 2633, 2667, 2730, 2734, 2757, 2793,
908 2796, 2809, 2830, 2850, 2858, 2866, 2876, 2884, 2885, 2886,
909 2889, 2890, 2892, 2894, 2895, 2905, 2906, 2909, 2933, 2956,
910 2977, 2997, 3017, 3068, 3070, 3101, 3120, 3124, 3144, 3155,
911 3166, 3177, 3185, 3187, 3192, 3192, 3210, 3215, 3221, 3229,
912 3235, 3240, 3244, 3249, 3252, 3275, 3276, 3301, 3302, 3326,
913 3333, 3338, 3343, 3348, 3349, 3352, 3353, 3356, 3357, 3358,
914 3361, 3362, 3386, 3387, 3412, 3415, 3418, 3421, 3422, 3423,
915 3426, 3427, 3430, 3445, 3461, 3476, 3492, 3493, 3496, 3499,
916 3505, 3518, 3527, 3532, 3537, 3546, 3555, 3566, 3567, 3568,
917 3572, 3573, 3574, 3577, 3578, 3579, 3584, 3587, 3590, 3591,
918 3594, 3595, 3598, 3599, 3602, 3603, 3611, 3627, 3644, 3655,
919 3660, 3661, 3662, 3677, 3678, 3682, 3688, 3693, 3694, 3696,
920 3697, 3699, 3700, 3702, 3703, 3716, 3717, 3720, 3727, 3749,
921 3771, 3774, 3776, 3796, 3818, 3821, 3822, 3824, 3827, 3830,
922 3831, 3844, 3845, 3848, 3868, 3889, 3890, 3893, 3896, 3900,
923 3908, 3912, 3920, 3926, 3931, 3932, 3943, 3953, 3960, 3967,
924 3970, 3973, 3983, 3986, 3991, 3997, 4001, 4004, 4017, 4031,
925 4044, 4059, 4063, 4066, 4072, 4075, 4082, 4088, 4091, 4096,
926 4097, 4103, 4104, 4107, 4108, 4109, 4141
927};
928#endif
929
930
931#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
932
933static const char * const yytname[] = { "$","error","$undefined.","ID","HBLOCK",
934"WRAPPER","POUND","STRING","NUM_INT","NUM_FLOAT","CHARCONST","NUM_UNSIGNED",
935"NUM_LONG","NUM_ULONG","TYPEDEF","TYPE_INT","TYPE_UNSIGNED","TYPE_SHORT","TYPE_LONG",
936"TYPE_FLOAT","TYPE_DOUBLE","TYPE_CHAR","TYPE_VOID","TYPE_SIGNED","TYPE_BOOL",
937"TYPE_TYPEDEF","LPAREN","RPAREN","COMMA","SEMI","EXTERN","INIT","LBRACE","RBRACE",
938"DEFINE","PERIOD","CONST","STRUCT","UNION","EQUAL","SIZEOF","MODULE","LBRACKET",
939"RBRACKET","WEXTERN","ILLEGAL","READONLY","READWRITE","NAME","RENAME","INCLUDE",
940"CHECKOUT","ADDMETHODS","PRAGMA","CVALUE","COUT","ENUM","ENDDEF","MACRO","CLASS",
941"PRIVATE","PUBLIC","PROTECTED","COLON","STATIC","VIRTUAL","FRIEND","OPERATOR",
942"THROW","TEMPLATE","NATIVE","INLINE","IFDEF","IFNDEF","ENDIF","ELSE","UNDEF",
943"IF","DEFINED","ELIF","RAW_MODE","ALPHA_MODE","TEXT","DOC_DISABLE","DOC_ENABLE",
944"STYLE","LOCALSTYLE","TYPEMAP","EXCEPT","IMPORT","ECHO","NEW","APPLY","CLEAR",
945"DOCONLY","TITLE","SECTION","SUBSECTION","SUBSUBSECTION","LESSTHAN","GREATERTHAN",
946"USERDIRECTIVE","OC_INTERFACE","OC_END","OC_PUBLIC","OC_PRIVATE","OC_PROTECTED",
947"OC_CLASS","OC_IMPLEMENT","OC_PROTOCOL","OR","XOR","AND","LSHIFT","RSHIFT","PLUS",
948"MINUS","STAR","SLASH","UMINUS","NOT","LNOT","DCOLON","program","@1","command",
949"statement","@2","@3","@4","@5","@6","@7","@8","@9","@10","@11","doc_enable",
950"typedef_decl","@12","@13","typedeflist","cond_compile","cpp_const_expr","pragma",
951"stail","@14","@15","definetail","extern","func_end","parms","ptail","parm",
952"parm_type","pname","def_args","parm_specifier","parm_specifier_list","declaration",
953"stars","array","array2","type","strict_type","opt_signed","opt_unsigned","opt_int",
954"definetype","@16","initlist","ename","enumlist","edecl","@17","etype","expr",
955"cpp","cpp_class","@18","@19","@20","@21","@22","cpp_other","@23","added_members",
956"cpp_members","@24","@25","@26","cpp_member","@27","@28","@29","@30","cpp_pragma",
957"@31","@32","nested_decl","type_extra","cpp_tail","@33","@34","cpp_end","cpp_vend",
958"cpp_enumlist","cpp_edecl","inherit","base_list","base_specifier","access_specifier",
959"cpptype","cpp_const","ctor_end","ctor_initializer","mem_initializer_list","mem_initializer",
960"expr_list","objective_c","@35","@36","objc_inherit","objc_protolist","objc_data",
961"@37","@38","@39","@40","objc_vars","objc_var","@41","objc_vartail","objc_methods",
962"@42","@43","@44","objc_method","objc_end","objc_ret_type","objc_arg_type","objc_args",
963"objc_separator","stylelist","styletail","stylearg","tm_method","tm_list","tm_tail",
964"typemap_parm","typemap_name","@45","@46","typemap_args","idstring","user_directive",
965"uservalue","empty", NULL
966};
967#endif
968
969static const short yyr1[] = { 0,
970 124, 123, 125, 125, 126, 126, 126, 126, 126, 127,
971 126, 126, 128, 126, 126, 129, 126, 126, 130, 126,
972 126, 126, 131, 126, 126, 126, 126, 126, 132, 126,
973 133, 126, 126, 126, 126, 126, 126, 126, 126, 126,
974 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
975 126, 126, 126, 126, 126, 134, 126, 135, 136, 126,
976 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
977 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
978 126, 126, 137, 137, 139, 138, 138, 138, 140, 138,
979 141, 141, 141, 142, 142, 142, 142, 142, 142, 143,
980 143, 143, 144, 144, 144, 145, 146, 145, 147, 145,
981 148, 148, 148, 149, 149, 149, 150, 151, 151, 152,
982 152, 153, 153, 154, 154, 154, 154, 154, 155, 155,
983 155, 155, 156, 156, 156, 156, 156, 157, 157, 158,
984 158, 159, 159, 159, 160, 160, 161, 161, 162, 162,
985 163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
986 163, 163, 163, 163, 163, 163, 163, 164, 164, 164,
987 164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
988 165, 165, 165, 165, 165, 166, 166, 166, 166, 166,
989 167, 167, 169, 168, 168, 168, 170, 170, 171, 171,
990 172, 172, 173, 174, 173, 173, 173, 175, 175, 176,
991 176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
992 176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
993 177, 177, 179, 178, 180, 181, 178, 182, 183, 178,
994 184, 184, 184, 184, 184, 185, 184, 186, 186, 186,
995 187, 188, 189, 187, 190, 187, 187, 191, 191, 191,
996 191, 191, 192, 191, 191, 193, 191, 191, 191, 191,
997 191, 191, 194, 191, 195, 191, 191, 191, 191, 191,
998 191, 191, 191, 196, 196, 197, 196, 198, 196, 196,
999 196, 196, 196, 196, 196, 199, 199, 200, 200, 200,
1000 201, 202, 201, 203, 201, 204, 204, 205, 205, 205,
1001 206, 206, 207, 207, 207, 207, 207, 207, 208, 208,
1002 209, 209, 210, 210, 210, 210, 210, 211, 211, 211,
1003 212, 212, 212, 213, 213, 213, 214, 214, 215, 215,
1004 216, 216, 217, 217, 218, 218, 220, 219, 221, 219,
1005 219, 219, 219, 222, 222, 223, 223, 224, 225, 224,
1006 226, 224, 227, 224, 228, 224, 224, 229, 230, 230,
1007 231, 230, 232, 232, 232, 233, 234, 233, 235, 233,
1008 236, 233, 233, 237, 237, 238, 238, 239, 239, 239,
1009 240, 240, 241, 241, 242, 242, 243, 244, 244, 245,
1010 245, 245, 246, 246, 247, 248, 248, 249, 249, 249,
1011 249, 250, 251, 250, 252, 250, 250, 253, 253, 254,
1012 254, 255, 255, 256, 256, 256, 257
1013};
1014
1015static const short yyr2[] = { 0,
1016 0, 2, 2, 1, 2, 2, 2, 2, 1, 0,
1017 7, 4, 0, 7, 4, 0, 9, 7, 0, 8,
1018 7, 7, 0, 9, 1, 1, 4, 4, 0, 3,
1019 0, 5, 7, 11, 3, 3, 3, 3, 1, 1,
1020 1, 2, 1, 1, 2, 2, 2, 2, 2, 1,
1021 3, 3, 3, 2, 2, 0, 8, 0, 0, 10,
1022 8, 6, 8, 6, 10, 8, 5, 3, 5, 2,
1023 5, 2, 1, 1, 1, 1, 5, 1, 1, 2,
1024 2, 1, 1, 1, 0, 5, 10, 11, 0, 6,
1025 3, 3, 1, 2, 2, 1, 1, 2, 2, 4,
1026 2, 2, 7, 3, 6, 1, 0, 6, 0, 8,
1027 2, 1, 2, 1, 1, 2, 2, 2, 1, 3,
1028 1, 1, 2, 2, 3, 3, 8, 3, 2, 2,
1029 1, 1, 2, 3, 2, 2, 1, 1, 1, 2,
1030 1, 1, 2, 2, 2, 2, 3, 4, 1, 1,
1031 1, 2, 2, 1, 1, 1, 1, 1, 2, 2,
1032 2, 2, 2, 2, 3, 2, 2, 1, 2, 2,
1033 1, 1, 1, 1, 1, 2, 2, 2, 2, 2,
1034 1, 1, 2, 2, 1, 1, 1, 2, 2, 1,
1035 1, 1, 0, 2, 1, 1, 3, 1, 1, 1,
1036 3, 1, 1, 0, 4, 2, 1, 1, 1, 1,
1037 1, 1, 1, 1, 4, 4, 1, 3, 3, 3,
1038 3, 3, 3, 3, 3, 3, 3, 2, 2, 3,
1039 1, 1, 0, 8, 0, 0, 11, 0, 0, 9,
1040 4, 9, 6, 5, 1, 0, 6, 2, 2, 1,
1041 2, 0, 0, 7, 0, 3, 1, 6, 7, 5,
1042 6, 6, 0, 5, 4, 0, 5, 7, 2, 2,
1043 2, 4, 0, 3, 0, 7, 1, 1, 1, 3,
1044 1, 1, 1, 3, 6, 0, 6, 0, 5, 3,
1045 3, 3, 3, 1, 1, 1, 1, 1, 1, 1,
1046 1, 0, 5, 0, 6, 2, 2, 2, 4, 2,
1047 3, 1, 1, 3, 5, 7, 2, 1, 2, 1,
1048 1, 3, 1, 2, 3, 2, 3, 1, 1, 1,
1049 1, 1, 1, 1, 4, 1, 3, 3, 2, 1,
1050 1, 3, 4, 3, 1, 3, 0, 9, 0, 9,
1051 1, 1, 4, 3, 2, 1, 1, 2, 0, 3,
1052 0, 3, 0, 3, 0, 3, 1, 3, 2, 3,
1053 0, 6, 3, 4, 1, 2, 0, 5, 0, 6,
1054 0, 3, 1, 5, 5, 1, 1, 3, 4, 1,
1055 3, 1, 4, 1, 1, 2, 3, 4, 1, 2,
1056 2, 1, 1, 1, 2, 3, 1, 2, 3, 3,
1057 8, 2, 0, 4, 0, 3, 1, 3, 1, 1,
1058 1, 5, 2, 2, 2, 2, 0
1059};
1060
1061static const short yydefact[] = { 1,
1062 427, 0, 4, 76, 44, 0, 9, 0, 73, 114,
1063 0, 0, 0, 0, 25, 26, 0, 0, 0, 0,
1064 0, 0, 0, 245, 0, 0, 0, 0, 97, 96,
1065 0, 0, 0, 40, 39, 0, 83, 84, 0, 0,
1066 0, 0, 0, 0, 29, 0, 0, 50, 0, 0,
1067 0, 0, 0, 0, 0, 351, 352, 3, 41, 43,
1068 78, 79, 0, 74, 231, 232, 75, 82, 115, 45,
1069 427, 151, 427, 427, 427, 156, 157, 154, 158, 427,
1070 155, 427, 0, 332, 333, 427, 331, 0, 0, 0,
1071 116, 427, 46, 0, 54, 427, 420, 421, 6, 0,
1072 0, 5, 8, 0, 427, 0, 151, 427, 427, 427,
1073 156, 157, 154, 158, 427, 155, 427, 0, 0, 0,
1074 0, 0, 0, 47, 0, 0, 94, 95, 55, 0,
1075 0, 98, 99, 42, 427, 80, 81, 0, 0, 72,
1076 70, 7, 48, 49, 0, 427, 0, 0, 427, 427,
1077 427, 427, 427, 0, 0, 427, 0, 423, 427, 427,
1078 427, 427, 0, 427, 0, 0, 0, 0, 0, 356,
1079 0, 162, 357, 187, 427, 427, 190, 160, 186, 191,
1080 152, 192, 153, 182, 427, 427, 185, 159, 181, 161,
1081 163, 167, 0, 200, 166, 142, 0, 85, 0, 164,
1082 238, 427, 51, 198, 0, 195, 196, 112, 53, 0,
1083 0, 52, 0, 31, 0, 246, 0, 104, 402, 0,
1084 160, 152, 153, 159, 161, 163, 167, 427, 0, 164,
1085 0, 0, 164, 101, 0, 102, 427, 403, 404, 0,
1086 0, 30, 427, 427, 0, 427, 427, 415, 408, 417,
1087 419, 0, 68, 0, 405, 407, 35, 399, 36, 37,
1088 38, 424, 425, 0, 138, 139, 0, 427, 122, 141,
1089 0, 427, 119, 426, 0, 0, 347, 427, 0, 0,
1090 144, 146, 145, 427, 143, 427, 0, 164, 165, 188,
1091 189, 183, 184, 58, 427, 427, 89, 0, 0, 0,
1092 320, 0, 0, 0, 113, 111, 217, 210, 211, 212,
1093 213, 214, 0, 0, 0, 0, 194, 27, 427, 28,
1094 427, 401, 400, 0, 0, 427, 149, 427, 150, 15,
1095 427, 427, 0, 397, 0, 0, 0, 427, 413, 412,
1096 0, 427, 427, 0, 410, 409, 427, 0, 427, 0,
1097 0, 0, 0, 118, 121, 123, 140, 427, 0, 427,
1098 124, 427, 131, 132, 0, 427, 0, 355, 353, 56,
1099 0, 427, 0, 427, 12, 241, 0, 427, 0, 0,
1100 86, 93, 427, 427, 323, 329, 328, 330, 0, 319,
1101 321, 0, 235, 255, 427, 0, 295, 277, 278, 0,
1102 0, 0, 427, 0, 0, 0, 0, 0, 279, 273,
1103 0, 294, 282, 281, 427, 0, 0, 0, 283, 0,
1104 257, 77, 197, 0, 168, 427, 427, 427, 173, 174,
1105 171, 175, 427, 172, 427, 0, 0, 0, 0, 0,
1106 228, 229, 0, 0, 0, 0, 0, 0, 0, 0,
1107 0, 0, 114, 0, 32, 427, 427, 0, 0, 0,
1108 250, 427, 427, 0, 193, 0, 13, 137, 0, 0,
1109 100, 403, 0, 0, 71, 69, 427, 418, 0, 147,
1110 427, 416, 67, 406, 427, 128, 422, 427, 129, 130,
1111 427, 126, 125, 427, 354, 0, 427, 427, 0, 0,
1112 244, 10, 233, 203, 427, 0, 202, 207, 0, 427,
1113 90, 0, 324, 0, 0, 326, 0, 0, 0, 427,
1114 0, 252, 427, 0, 0, 270, 269, 271, 0, 0,
1115 0, 0, 0, 299, 427, 298, 0, 300, 0, 0,
1116 251, 164, 288, 218, 177, 169, 170, 176, 178, 179,
1117 0, 230, 180, 0, 224, 225, 223, 226, 227, 219,
1118 220, 221, 222, 0, 116, 0, 0, 0, 0, 390,
1119 0, 247, 248, 381, 0, 0, 249, 0, 383, 105,
1120 0, 427, 135, 0, 133, 136, 0, 427, 0, 427,
1121 0, 64, 62, 0, 414, 0, 148, 398, 120, 0,
1122 349, 365, 0, 359, 361, 363, 0, 0, 0, 427,
1123 367, 0, 334, 0, 19, 336, 427, 427, 243, 0,
1124 0, 204, 206, 427, 0, 427, 91, 92, 0, 325,
1125 322, 327, 0, 256, 293, 0, 0, 0, 284, 0,
1126 275, 266, 0, 0, 274, 427, 427, 263, 427, 291,
1127 280, 292, 239, 290, 286, 0, 216, 215, 427, 0,
1128 164, 0, 427, 427, 0, 0, 377, 376, 103, 21,
1129 23, 134, 0, 106, 14, 33, 0, 22, 0, 0,
1130 0, 427, 0, 0, 0, 0, 0, 0, 0, 369,
1131 0, 358, 0, 0, 375, 0, 427, 0, 18, 16,
1132 0, 11, 0, 0, 201, 59, 0, 427, 0, 427,
1133 272, 0, 0, 427, 427, 0, 0, 427, 0, 0,
1134 0, 265, 427, 427, 0, 388, 0, 0, 394, 0,
1135 382, 0, 0, 117, 0, 427, 427, 63, 61, 0,
1136 66, 0, 427, 0, 366, 0, 360, 362, 364, 370,
1137 0, 427, 368, 57, 0, 20, 0, 0, 234, 209,
1138 205, 208, 427, 0, 0, 236, 427, 260, 253, 427,
1139 313, 0, 427, 0, 312, 318, 0, 0, 301, 267,
1140 427, 0, 427, 427, 264, 240, 296, 0, 297, 289,
1141 389, 0, 386, 387, 395, 385, 427, 384, 379, 0,
1142 24, 427, 427, 0, 0, 411, 0, 350, 371, 348,
1143 427, 373, 335, 17, 242, 60, 87, 0, 427, 0,
1144 0, 340, 0, 285, 0, 0, 317, 427, 0, 427,
1145 427, 262, 0, 427, 261, 258, 287, 396, 0, 0,
1146 392, 0, 378, 0, 107, 0, 65, 127, 0, 374,
1147 88, 237, 0, 339, 341, 337, 338, 254, 314, 0,
1148 311, 276, 268, 302, 427, 306, 307, 259, 0, 0,
1149 393, 380, 427, 0, 34, 372, 0, 0, 0, 0,
1150 304, 308, 310, 193, 391, 109, 108, 344, 345, 0,
1151 342, 315, 303, 0, 0, 0, 343, 0, 0, 305,
1152 309, 110, 346, 316, 0, 0, 0
1153};
1154
1155static const short yydefgoto[] = { 905,
1156 1, 2, 58, 620, 587, 757, 698, 735, 145, 319,
1157 497, 378, 763, 412, 413, 296, 383, 381, 414, 132,
1158 62, 675, 874, 896, 209, 63, 670, 341, 354, 268,
1159 269, 361, 467, 270, 271, 165, 166, 363, 328, 272,
1160 416, 188, 178, 181, 210, 211, 203, 193, 506, 507,
1161 704, 761, 762, 64, 65, 621, 518, 819, 302, 723,
1162 66, 321, 458, 417, 638, 823, 519, 418, 721, 716,
1163 532, 714, 419, 724, 656, 788, 537, 780, 880, 894,
1164 832, 868, 774, 775, 300, 390, 391, 392, 126, 833,
1165 768, 821, 854, 855, 890, 67, 367, 684, 277, 172,
1166 608, 687, 688, 689, 685, 609, 610, 849, 694, 577,
1167 733, 842, 665, 578, 796, 569, 840, 728, 797, 136,
1168 257, 218, 240, 148, 255, 149, 249, 477, 347, 250,
1169 99, 68, 158, 273
1170};
1171
1172static const short yypact[] = {-32768,
1173-32768, 916,-32768,-32768,-32768, 52,-32768, 1863,-32768, 64,
1174 408, 29, 136, 200,-32768,-32768, 115, 201, 200, 200,
1175 231, 328, 1887,-32768, 218, 1747, 266, 281,-32768,-32768,
1176 283, 122, 122,-32768,-32768, 307,-32768,-32768, 321, 321,
1177 313, 586, 200, 39,-32768, 1911, 1911,-32768, 351, 363,
1178 394, 396, 397, 417, 432,-32768,-32768,-32768,-32768,-32768,
1179-32768,-32768, 1702,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
1180 293,-32768, 555, 431, 431,-32768,-32768,-32768,-32768, 567,
1181-32768, 364, 1911,-32768,-32768, 489,-32768, 491, 50, 187,
1182 441,-32768,-32768, 554,-32768,-32768,-32768,-32768,-32768, 251,
1183 499,-32768,-32768, 506, 501, 547, 528, 555, 431, 431,
1184 530, 534, 549, 557, 567, 569, 364, 1911, 587, 54,
1185 576, 603, 626,-32768, 54, 628,-32768,-32768,-32768, 393,
1186 122,-32768,-32768,-32768, 501,-32768,-32768, 217, 633,-32768,
1187-32768,-32768,-32768,-32768, 1180, 80, 590, 613, 616,-32768,
1188-32768,-32768,-32768, 620, 622, 1657, 623,-32768, 130,-32768,
1189 32, 489, 649, 536, 629, 654, 54, 635, 656,-32768,
1190 662,-32768,-32768,-32768, 431, 431,-32768,-32768,-32768,-32768,
1191-32768,-32768,-32768,-32768, 431, 431,-32768,-32768,-32768,-32768,
1192-32768, 634, 636,-32768,-32768,-32768, 552, 625, 407, 147,
1193-32768,-32768, 643,-32768, 615,-32768,-32768,-32768,-32768, 618,
1194 117, 643, 646,-32768, 650,-32768, 551,-32768,-32768, 541,
1195 652, 655, 663, 667, 668, 682,-32768, 238, 563, 684,
1196 685, 695,-32768,-32768, 679,-32768,-32768, 683,-32768, 697,
1197 699,-32768, 279, 1587, 1849, 237, 237,-32768,-32768,-32768,
1198-32768, 1911,-32768, 1911,-32768,-32768, 700,-32768, 700, 700,
1199 700,-32768,-32768, 692,-32768,-32768, 703, 706,-32768,-32768,
1200 1657, 348,-32768,-32768, 735, 739,-32768,-32768, 550, 713,
1201-32768,-32768,-32768, 1657,-32768, 58, 630, 457,-32768,-32768,
1202-32768,-32768,-32768,-32768, 152, 718,-32768, 632, 326, 720,
1203-32768, 1290, 1070, 747,-32768,-32768, 631,-32768,-32768,-32768,
1204-32768,-32768, 1999, 730, 117, 117, 939,-32768, 422,-32768,
1205 1421,-32768,-32768, 754, 756, 1657,-32768, 226,-32768,-32768,
1206 733, 1657, 737, 700, 232, 1911, 399, 1657,-32768,-32768,
1207 738, 237, 625, 930,-32768,-32768, 734, 746, 616, 764,
1208 749, 337, 1657,-32768,-32768,-32768,-32768, 409, 536, 152,
1209-32768, 152,-32768,-32768, 743, 364, 755,-32768,-32768,-32768,
1210 759, 1657, 36, 226,-32768,-32768, 757, 474, 761, 54,
1211-32768,-32768, 718, 152,-32768,-32768,-32768,-32768, 28, 762,
1212-32768, 45,-32768,-32768, 110, 1911,-32768,-32768,-32768, 765,
1213 763, 444, 489, 731, 736, 740, 1911, 1771,-32768,-32768,
1214 790,-32768,-32768,-32768, 99, 772, 767, 1290,-32768, 259,
1215-32768,-32768,-32768, 798,-32768, 555, 431, 431,-32768,-32768,
1216-32768,-32768, 567,-32768, 364, 1911, 777, 789, 802, 1911,
1217-32768,-32768, 117, 117, 117, 117, 117, 117, 117, 117,
1218 117, 468, 799, 1911,-32768, 783, 783, 778, 1290, 248,
1219-32768, 501, 501, 786, 23, 806,-32768,-32768, 1935, 788,
1220-32768,-32768, 792, 22,-32768,-32768, 734,-32768, 793,-32768,
1221 625,-32768,-32768,-32768, 501,-32768,-32768, 706,-32768,-32768,
1222 152,-32768,-32768, 364,-32768, 1367, 474, 202, 796, 453,
1223-32768,-32768,-32768, 785, 474, 338,-32768,-32768, 791, 439,
1224-32768, 801,-32768, 822, 326,-32768, 823, 1290, 1290, 1632,
1225 828,-32768, 501, 829, 804,-32768,-32768,-32768, 54, 831,
1226 54, 1510, 811, 649, 336, 475, 771,-32768, 722, 54,
1227-32768, 595,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
1228 117,-32768,-32768, 813, 588, 602, 660, 523, 523, 517,
1229 517,-32768,-32768, 373,-32768, 54, 839, 1911, 840,-32768,
1230 842,-32768,-32768,-32768, 820, 817,-32768, 240,-32768,-32768,
1231 824, 202,-32768, 847,-32768,-32768, 564, -5, 54, 202,
1232 1911,-32768,-32768, 1911,-32768, 826,-32768,-32768,-32768, 827,
1233-32768,-32768, 830,-32768,-32768,-32768, 54, 825, 1367, 832,
1234-32768, 385,-32768, 833,-32768,-32768, 202, 1657,-32768, 564,
1235 1290,-32768,-32768, 474, 850, 1657,-32768,-32768, 835,-32768,
1236-32768,-32768, 834,-32768,-32768, 836, 838, 1290,-32768, 841,
1237-32768, 843, 844, 848,-32768, 1657, 1657,-32768, 226,-32768,
1238-32768,-32768,-32768,-32768,-32768, 54,-32768,-32768, 810, 753,
1239 15, -2,-32768,-32768, 240, 852,-32768,-32768,-32768,-32768,
1240 845,-32768, 54,-32768,-32768,-32768, 853,-32768, 845, 482,
1241 849, 1657, 855, 265, 1367, 859, 1367, 1367, 1367, 625,
1242 265,-32768, 54, 856,-32768, 857, 1657, 564,-32768, 845,
1243 860,-32768, 851, 56,-32768,-32768, 861, 1657, 54, 202,
1244-32768, 858, 873, 526, 1657, 585, 862, 1657, 863, 866,
1245 585,-32768, 718, 54, 865,-32768, 868, 287,-32768, 287,
1246-32768, 869, 248,-32768, 564, 380, 1657,-32768,-32768, 1911,
1247-32768, 870, 1657, 779,-32768, 881,-32768,-32768,-32768,-32768,
1248 808, 470,-32768,-32768, 882,-32768, 564, 883,-32768,-32768,
1249-32768, 939, 718, 884, 887,-32768, 879,-32768,-32768, 501,
1250 876, 892, 526, 504,-32768,-32768, 896, 54,-32768,-32768,
1251 202, 897, 202, 202,-32768,-32768,-32768, 899,-32768,-32768,
1252-32768, 880,-32768,-32768,-32768,-32768, 900,-32768,-32768, 911,
1253-32768, 1657, 226, 898, 919,-32768, 902,-32768,-32768,-32768,
1254 832,-32768,-32768,-32768,-32768,-32768,-32768, 920, 718, 948,
1255 481,-32768, 1290,-32768, 56, 952,-32768, 526, 927, 202,
1256 409,-32768, 496, 202,-32768,-32768,-32768,-32768, 1657, 955,
1257-32768, 240,-32768, 932,-32768, 941,-32768,-32768, 1817,-32768,
1258-32768,-32768, 935, 943,-32768,-32768,-32768,-32768,-32768, 954,
1259-32768,-32768,-32768,-32768, 226,-32768,-32768,-32768, 494, 956,
1260-32768,-32768, 202, 564,-32768,-32768, 728, 948, 976, 585,
1261-32768,-32768,-32768, 532,-32768,-32768,-32768,-32768, 939, 619,
1262-32768, 945,-32768, 585, 953, 564,-32768, 117, 56,-32768,
1263-32768,-32768, 939,-32768, 994, 1015,-32768
1264};
1265
1266static const short yypgoto[] = {-32768,
1267-32768, 814, 874,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
1268-32768,-32768,-32768, 20, 25,-32768,-32768, -370, 19, -7,
1269-32768, -507,-32768,-32768,-32768, -269, -448, -111, 533, -351,
1270 751, -261, -346, 760,-32768, 88, -66, -60, -283, 289,
1271 -14, -101, -92, 72, -460,-32768, -55, -147, 529, -487,
1272-32768, -806, -6, 701,-32768,-32768,-32768,-32768,-32768,-32768,
1273-32768,-32768,-32768, -407,-32768,-32768,-32768, -314,-32768,-32768,
1274-32768,-32768,-32768,-32768,-32768,-32768,-32768, -692,-32768,-32768,
1275 -524,-32768,-32768, -710, -282,-32768, 512, 641, 12, -365,
1276-32768,-32768,-32768, 154,-32768,-32768,-32768,-32768,-32768, -40,
1277 -413,-32768,-32768,-32768,-32768,-32768, 185,-32768, -714, -538,
1278-32768,-32768,-32768, 714, 306, 580,-32768, 375,-32768, 1018,
1279 71, -125, 724, -244, 711, -42, -210,-32768,-32768, -226,
1280 365,-32768, 709, -1
1281};
1282
1283
1284#define YYLAST 2119
1285
1286
1287static const short yytable[] = { 3,
1288 69, 488, 374, 147, 585, 377, 459, 348, 121, 237,
1289 541, 489, 511, 224, 280, 221, 340, 623, 859, 90,
1290 61, 59, 199, 676, 726, 133, 60, 502, 785, 206,
1291 513, 94, 207, 379, 122, 345, 346, 812, 500, 668,
1292 212, 190, 143, 376, 267, 144, -427, 516, 168, 454,
1293 592, 573, 196, 593, 583, 70, 196, -142, 307, 480,
1294 594, 469, 827, 308, 309, 760, 310, 311, 312, 173,
1295 91, 179, 182, 182, 169, 197, 225, 299, 189, 247,
1296 173, 313, 243, 372, 194, 248, 95, 386, 387, 388,
1297 204, 474, 904, 170, 204, 314, 850, 282, 492, 245,
1298 493, 196, 501, 219, 279, 244, 179, 182, 182, 517,
1299 633, 634, 702, 189, 164, 173, 171, 861, 278, 307,
1300 482, 245, 512, 236, 308, 309, 731, 310, 311, 312,
1301 170, 479, 615, 219, 584, 520, 705, 297, 96, 627,
1302 100, 678, 313, 69, 251, 744, 183, 256, 258, 258,
1303 258, 258, 751, 171, 358, 275, 314, 173, 204, 173,
1304 194, 163, 283, 61, 59, 163, 164, 327, 699, 60,
1305 164, 315, 371, 182, 182, 316, 198, 342, -427, 373,
1306 222, 223, 339, 182, 182, 248, 248, 893, 648, 200,
1307 756, 246, 276, 245, 800, 692, 164, 597, 301, 130,
1308 3, 900, 97, 101, 317, 362, 98, 228, 170, 299,
1309 534, 349, 232, 703, 464, 164, 671, 645, 201, 238,
1310 470, 259, 260, 261, 679, 327, 329, 801, 170, 600,
1311 712, 171, 315, 104, 472, 258, 316, 613, 344, 243,
1312 574, 251, 131, 123, 251, 251, 290, 291, 574, 814,
1313 595, 700, 239, 213, 286, 525, 292, 293, 835, 836,
1314 499, 542, 338, 326, 465, 574, 355, 239, 127, 614,
1315 364, 745, -427, 747, 748, 749, 368, 214, 245, 245,
1316 -427, 248, 327, 128, 329, 129, 301, 575, 466, 792,
1317 543, 576, 491, 364, 382, 575, 89, 490, 437, 576,
1318 421, 69, 722, 872, 338, 863, 438, 334, 441, 442,
1319 134, 120, 575, 420, 125, 793, 576, 69, 794, 461,
1320 245, 61, 59, 135, 439, 495, 468, 60, 385, 69,
1321 105, 548, 420, 545, 146, 146, 580, 581, 138, 154,
1322 251, 329, -427, 155, 767, 251, 680, 256, 536, 795,
1323 358, 167, 786, 106, 456, 457, 468, 150, 364, 598,
1324 364, 647, 456, 457, 173, 624, 887, -427, 157, 151,
1325 625, 191, 468, 359, 465, 659, 508, 245, 377, 456,
1326 457, 382, 364, 102, 103, 386, 387, 388, 902, 245,
1327 389, 170, 816, 173, 549, 234, 505, 639, 466, 154,
1328 152, 194, 153, 155, 201, 802, 226, 142, 636, 285,
1329 92, 93, 624, 538, 171, 858, 421, 696, 235, 159,
1330 327, 245, 156, 895, 179, 182, 182, 475, 157, 420,
1331 476, 189, 298, 173, 160, 452, 555, 556, 557, 558,
1332 559, 560, 561, 562, 563, 180, 523, 465, 852, 628,
1333 245, 453, 803, 601, 570, 570, 845, 421, 579, 360,
1334 219, 219, 170, 564, 164, 567, 380, 510, 869, 524,
1335 420, 466, 202, 21, 649, 251, 504, 285, 618, 329,
1336 245, 619, -180, 219, 864, 376, 355, 870, -427, 364,
1337 24, 192, 173, 195, 611, 508, 616, 693, 546, 547,
1338 650, 215, 535, 508, 84, 85, 701, 886, 382, 856,
1339 738, 245, 857, 739, 707, 505, 421, 421, 881, 299,
1340 740, 219, 882, 505, 866, 883, 87, 867, 771, 420,
1341 420, 828, 884, 468, 719, 720, 829, 216, 206, 217,
1342 146, 207, 146, 420, 657, 27, 28, 29, 30, 220,
1343 32, 681, 33, -168, 205, -173, -193, 322, 323, -174,
1344 206, -193, -193, 207, -193, -193, -193, 324, 325, 174,
1345 742, 175, 176, 772, -171, 177, 579, 304, 369, -193,
1346 616, 184, -175, 185, 186, 755, 173, 187, 616, 227,
1347 415, 673, 674, -193, -172, 727, 765, 27, 28, 29,
1348 30, 229, 32, 777, 33, 230, 782, 611, 695, 415,
1349 208, 139, 778, 779, 140, 616, 642, 141, 644, 421,
1350 -180, 252, 508, 654, 146, 804, 655, 653, 231, 750,
1351 233, 807, 420, 450, 451, 241, 421, 448, 449, 450,
1352 451, 253, 505, 254, 824, 897, 898, 468, 262, 420,
1353 263, 281, 164, 660, 284, 274, 285, 301, 288, 301,
1354 287, 729, 729, 579, 289, -199, 245, 294, 295, -193,
1355 304, 305, 318, -193, 306, 327, 677, -177, 320, 330,
1356 -169, 333, 579, 611, 89, 611, 611, 611, -170, 579,
1357 844, 811, -176, -178, 690, 529, 531, 805, 444, 445,
1358 446, 447, 448, 449, 450, 451, 415, -179, 616, -180,
1359 335, 331, 776, 445, 446, 447, 448, 449, 450, 451,
1360 332, 382, 789, 336, 550, 337, 351, 350, 554, 352,
1361 307, 579, 773, 353, 329, 308, 309, 365, 310, 311,
1362 312, 366, 566, 725, 370, 380, 375, 415, 384, 423,
1363 695, 393, 424, 313, 888, 440, 462, 589, 463, 338,
1364 736, 382, 453, 471, 478, 822, 485, 314, 219, 494,
1365 865, 776, 446, 447, 448, 449, 450, 451, 483, 616,
1366 752, 616, 616, 486, 607, 498, 496, 509, 503, 515,
1367 521, 773, 533, 526, 522, 841, 766, 539, 527, 540,
1368 544, 468, 528, 551, 553, 565, 415, 415, 568, 695,
1369 572, 787, 582, 586, 590, 552, 626, 382, 591, 596,
1370 415, 421, 617, 622, 630, 632, 776, 629, 616, 468,
1371 637, 640, 616, 643, 420, 641, 646, 651, 652, 658,
1372 579, 661, 663, 315, 664, 666, 773, 316, 667, 672,
1373 669, 682, 706, 683, 732, 686, 662, 691, 697, 693,
1374 708, 746, 710, 468, 711, 831, 709, 713, 715, 717,
1375 889, 616, 299, 718, 373, 770, 734, 741, 737, 146,
1376 743, 808, 146, 759, 753, 754, 758, 764, 781, 783,
1377 769, 903, 784, 790, 791, 799, 806, 607, 443, 444,
1378 445, 446, 447, 448, 449, 450, 451, 809, 813, 415,
1379 810, 815, 817, 818, 825, -2, 4, 826, -427, 5,
1380 6, 7, 830, 834, 846, 839, 415, 837, 848, 8,
1381 -427, -427, -427, -427, -427, -427, -427, -427, -427, -427,
1382 -427, 820, 838, 843, 9, 10, 11, 847, 851, 12,
1383 853, -427, -427, -427, 860, 862, 13, 871, 873, 14,
1384 877, 15, 16, 17, 18, 19, 20, 21, 22, 875,
1385 878, -427, 481, 607, -427, 607, 607, 607, 892, 23,
1386 879, 901, 885, 899, 24, 25, 26, 27, 28, 29,
1387 30, 31, 32, 906, 33, 34, 35, 36, 37, 38,
1388 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
1389 49, 50, 51, 52, 907, 303, 53, 54, 242, 455,
1390 599, 356, 55, 56, 57, 612, 631, -427, 146, 514,
1391 357, 891, -427, 876, 460, 798, 571, -427, 730, 443,
1392 444, 445, 446, 447, 448, 449, 450, 451, 443, 444,
1393 445, 446, 447, 448, 449, 450, 451, 137, 473, 484,
1394 487, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1395 4, 0, -427, 5, 6, 7, 0, 0, 0, 0,
1396 0, 0, 0, 8, -427, -427, -427, -427, -427, -427,
1397 -427, -427, -427, -427, -427, 0, 0, 0, 9, 10,
1398 11, 0, 422, 12, 0, -427, -427, -427, 0, 0,
1399 13, 415, 0, 14, 0, 15, 16, 17, 18, 19,
1400 20, 21, 22, 0, 0, -427, 0, 0, -427, 0,
1401 0, 0, 0, 23, 0, 0, 0, 607, 24, 25,
1402 26, 27, 28, 29, 30, 31, 32, 0, 33, 34,
1403 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1404 45, 46, 47, 48, 49, 50, 51, 52, 0, 0,
1405 53, 54, 0, 0, 0, 0, 55, 56, 57, 0,
1406 4, -427, -427, 5, 6, 7, -427, 0, 0, 0,
1407 0, -427, 0, 8, -427, -427, -427, -427, -427, -427,
1408 -427, -427, -427, -427, -427, 0, 0, 0, 9, 10,
1409 11, 0, 0, 12, 0, -427, -427, -427, 0, 0,
1410 13, 0, 0, 14, 0, 15, 16, 17, 18, 19,
1411 20, 21, 22, 0, 0, -427, 0, 0, -427, 0,
1412 0, 0, 0, 23, 0, 0, 0, 0, 24, 25,
1413 26, 27, 28, 29, 30, 31, 32, 0, 33, 34,
1414 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1415 45, 46, 47, 48, 49, 50, 51, 52, 0, 0,
1416 53, 54, 0, 0, 0, 0, 55, 56, 57, 0,
1417 394, -427, 395, 0, 0, 0, -427, 0, 0, 0,
1418 0, -427, 0, 396, 107, 108, 109, 110, 111, 112,
1419 113, 114, 115, 116, 117, 0, 0, 0, 397, 0,
1420 0, 0, -427, 0, 0, 118, 84, 85, 0, 0,
1421 0, 0, 0, 0, 0, 398, 399, 400, 0, 0,
1422 0, 401, 402, 0, 0, 403, 0, 0, 87, 404,
1423 405, 406, 0, 407, 408, 409, 0, 0, 0, 0,
1424 0, 27, 28, 29, 30, 0, 32, 602, 33, 71,
1425 0, 0, 37, 38, 0, 0, 0, 0, 0, 0,
1426 410, 72, 73, 74, 75, 76, 77, 78, 79, 80,
1427 81, 82, 0, 0, 0, 0, 0, 0, 0, -427,
1428 0, 0, 83, 84, 85, 0, 0, 0, 0, 411,
1429 0, 88, 0, 0, 603, 0, 0, 0, 0, 0,
1430 0, 0, 119, 395, 0, 87, 0, 0, 0, 0,
1431 0, 0, 0, 0, 396, 107, 108, 109, 110, 111,
1432 112, 113, 114, 115, 116, 117, 0, 0, 0, 397,
1433 0, 0, 0, 0, 0, 0, 118, 84, 85, 0,
1434 0, 0, 0, 0, 0, 0, 398, 399, 400, 0,
1435 604, 605, 606, 402, 0, 0, 403, 0, 0, 87,
1436 404, 405, 406, 0, 407, 408, 409, 0, 88, 0,
1437 0, 0, 27, 28, 29, 30, 0, 32, 0, 33,
1438 0, 0, 0, 37, 38, 0, 0, 0, 0, 0,
1439 0, 410, 395, 0, 0, 0, 0, 0, 0, 0,
1440 0, 0, 0, 396, 107, 108, 109, 110, 111, 112,
1441 113, 114, 115, 116, 117, 456, 457, 0, 397, 0,
1442 411, 0, 88, 0, 0, 118, 84, 85, 0, 0,
1443 0, 0, 0, 0, 0, 398, 399, 400, 0, 0,
1444 0, 0, 402, 0, 0, 403, 0, 0, 87, 404,
1445 405, 406, 0, 407, 408, 409, 0, 0, 0, 0,
1446 0, 27, 28, 29, 30, 0, 32, 0, 33, 71,
1447 0, 0, 37, 38, 0, 0, 0, 0, 0, 0,
1448 410, 72, 73, 74, 75, 76, 77, 78, 79, 80,
1449 81, 82, 0, 0, 0, 0, 0, 0, 0, 0,
1450 0, 264, 83, 84, 85, 0, 0, 0, 0, 411,
1451 0, 88, 0, 0, 71, 0, 0, 0, 0, 0,
1452 265, 266, 119, 0, 0, 87, 72, 73, 74, 75,
1453 76, 77, 78, 79, 80, 81, 82, 0, 0, 71,
1454 0, 0, 0, 0, 0, 0, 264, 83, 84, 85,
1455 0, 72, 73, 74, 75, 76, 77, 78, 79, 80,
1456 81, 82, 0, 0, 0, 265, 266, 119, 0, 0,
1457 87, 264, 83, 84, 85, 0, 0, 0, 0, 0,
1458 0, 0, 0, 164, 161, 0, 0, 0, 88, 0,
1459 265, 266, 119, 0, 0, 87, 107, 108, 109, 110,
1460 111, 112, 113, 114, 115, 116, 117, 0, 0, 0,
1461 0, 0, 0, 0, 0, 0, 0, 118, 84, 85,
1462 0, 0, 0, 0, 0, 0, 0, 0, 635, 71,
1463 124, 0, 0, 88, 0, 0, 0, 162, 0, 0,
1464 87, 72, 73, 74, 75, 76, 77, 78, 79, 80,
1465 81, 82, 0, 71, 0, 0, 0, 0, 88, 0,
1466 0, 0, 83, 84, 85, 72, 73, 74, 75, 76,
1467 77, 78, 79, 80, 81, 82, 0, 0, 0, 0,
1468 0, 0, 119, 0, 0, 87, 83, 84, 85, 0,
1469 0, 0, 0, 163, 0, 0, 0, 0, 164, 71,
1470 0, 0, 0, 88, 0, 0, 119, 0, 0, 87,
1471 0, 72, 73, 74, 75, 76, 77, 78, 79, 80,
1472 81, 82, 0, 0, 0, 0, 0, 0, 0, 0,
1473 0, 307, 83, 84, 85, 0, 308, 309, 0, 310,
1474 311, 312, 0, 0, 603, 71, 0, 0, 88, 0,
1475 0, 0, 119, 0, 313, 87, 0, 72, 73, 74,
1476 75, 76, 77, 78, 79, 80, 81, 82, 314, 71,
1477 530, 343, 88, 0, 0, 0, 0, 0, 83, 84,
1478 85, 107, 108, 109, 110, 111, 112, 113, 114, 115,
1479 116, 117, 0, 71, 0, 0, 0, 0, 86, 0,
1480 0, 87, 118, 84, 85, 72, 73, 74, 75, 76,
1481 77, 78, 79, 80, 81, 82, 0, 588, 88, 0,
1482 0, 0, 119, 0, 0, 87, 83, 84, 85, 72,
1483 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
1484 0, 0, 0, 0, 315, 0, 119, 0, 316, 87,
1485 83, 84, 85, 0, 0, 0, 0, 0, 0, 0,
1486 0, 0, 0, 0, 88, 0, 0, 0, 0, 0,
1487 119, 0, 0, 87, 0, 0, 0, 0, 0, 0,
1488 0, 307, 0, 0, 0, 0, 308, 309, 88, 310,
1489 311, 312, 0, 425, 426, 427, 428, 429, 430, 431,
1490 432, 433, 434, 435, 313, 0, 0, 0, 0, 0,
1491 0, 0, 88, 0, 436, 84, 85, 0, 314, 0,
1492 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1493 0, 0, 0, 0, 0, 0, 88, 87, 0, 0,
1494 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1495 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1496 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1497 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1498 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1499 0, 0, 0, 0, 315, 0, 0, 0, 316
1500};
1501
1502static const short yycheck[] = { 1,
1503 2, 353, 286, 46, 465, 288, 321, 252, 23, 135,
1504 418, 358, 383, 115, 162, 108, 243, 505, 825, 8,
1505 2, 2, 89, 29, 27, 33, 2, 374, 721, 7,
1506 3, 3, 10, 295, 23, 246, 247, 752, 3, 578,
1507 96, 82, 4, 29, 156, 7, 32, 3, 63, 319,
1508 29, 459, 3, 32, 32, 4, 3, 26, 3, 343,
1509 39, 331, 773, 8, 9, 10, 11, 12, 13, 71,
1510 7, 73, 74, 75, 63, 26, 117, 63, 80, 146,
1511 82, 26, 3, 26, 86, 146, 58, 60, 61, 62,
1512 92, 336, 899, 99, 96, 40, 811, 164, 360, 42,
1513 362, 3, 67, 105, 160, 26, 108, 109, 110, 65,
1514 518, 519, 620, 115, 117, 117, 122, 828, 159, 3,
1515 347, 42, 384, 131, 8, 9, 665, 11, 12, 13,
1516 99, 342, 498, 135, 112, 26, 624, 198, 3, 510,
1517 26, 590, 26, 145, 146, 684, 75, 149, 150, 151,
1518 152, 153, 691, 122, 3, 26, 40, 159, 160, 161,
1519 162, 112, 164, 145, 145, 112, 117, 228, 617, 145,
1520 117, 116, 284, 175, 176, 120, 89, 244, 32, 122,
1521 109, 110, 243, 185, 186, 246, 247, 880, 535, 3,
1522 698, 112, 63, 42, 733, 609, 117, 481, 200, 78,
1523 202, 894, 3, 3, 211, 272, 7, 120, 99, 63,
1524 112, 254, 125, 621, 326, 117, 582, 532, 32, 3,
1525 332, 151, 152, 153, 590, 286, 228, 735, 99, 491,
1526 638, 122, 116, 3, 3, 237, 120, 36, 245, 3,
1527 1, 243, 121, 26, 246, 247, 175, 176, 1, 757,
1528 477, 617, 36, 3, 167, 403, 185, 186, 783, 784,
1529 372, 3, 26, 26, 39, 1, 268, 36, 3, 68,
1530 272, 685, 33, 687, 688, 689, 278, 27, 42, 42,
1531 33, 342, 343, 3, 286, 3, 288, 48, 63, 3,
1532 32, 52, 359, 295, 296, 48, 8, 358, 313, 52,
1533 302, 303, 649, 842, 26, 830, 313, 237, 315, 316,
1534 4, 23, 48, 302, 26, 29, 52, 319, 32, 321,
1535 42, 303, 303, 3, 313, 366, 328, 303, 3, 331,
1536 3, 433, 321, 426, 46, 47, 462, 463, 26, 3,
1537 342, 343, 103, 7, 710, 347, 591, 349, 415, 63,
1538 3, 63, 723, 26, 115, 116, 358, 7, 360, 485,
1539 362, 26, 115, 116, 366, 28, 874, 103, 32, 7,
1540 33, 83, 374, 26, 39, 3, 378, 42, 661, 115,
1541 116, 383, 384, 19, 20, 60, 61, 62, 896, 42,
1542 65, 99, 763, 395, 435, 3, 378, 523, 63, 3,
1543 7, 403, 7, 7, 32, 26, 118, 43, 520, 3,
1544 3, 4, 28, 415, 122, 823, 418, 33, 26, 3,
1545 481, 42, 26, 884, 426, 427, 428, 29, 32, 418,
1546 32, 433, 26, 435, 3, 14, 443, 444, 445, 446,
1547 447, 448, 449, 450, 451, 15, 3, 39, 819, 510,
1548 42, 30, 736, 494, 456, 457, 803, 459, 460, 112,
1549 462, 463, 99, 452, 117, 454, 28, 380, 834, 26,
1550 459, 63, 32, 52, 535, 477, 3, 3, 26, 481,
1551 42, 29, 26, 485, 831, 29, 488, 839, 32, 491,
1552 69, 3, 494, 3, 496, 497, 498, 28, 427, 428,
1553 26, 3, 415, 505, 37, 38, 618, 873, 510, 29,
1554 29, 42, 32, 32, 626, 497, 518, 519, 865, 63,
1555 39, 523, 29, 505, 29, 32, 59, 32, 3, 518,
1556 519, 28, 39, 535, 646, 647, 33, 32, 7, 39,
1557 252, 10, 254, 532, 551, 72, 73, 74, 75, 3,
1558 77, 594, 79, 26, 1, 26, 3, 7, 8, 26,
1559 7, 8, 9, 10, 11, 12, 13, 27, 28, 15,
1560 682, 17, 18, 48, 26, 21, 578, 28, 29, 26,
1561 582, 15, 26, 17, 18, 697, 588, 21, 590, 3,
1562 302, 28, 29, 40, 26, 662, 708, 72, 73, 74,
1563 75, 26, 77, 715, 79, 3, 718, 609, 610, 321,
1564 57, 26, 28, 29, 29, 617, 529, 32, 531, 621,
1565 26, 32, 624, 29, 336, 737, 32, 540, 3, 690,
1566 3, 743, 621, 117, 118, 3, 638, 115, 116, 117,
1567 118, 29, 624, 28, 770, 27, 28, 649, 29, 638,
1568 29, 3, 117, 566, 26, 33, 3, 659, 3, 661,
1569 26, 663, 664, 665, 3, 32, 42, 32, 117, 116,
1570 28, 57, 27, 120, 57, 736, 589, 26, 29, 117,
1571 26, 3, 684, 685, 396, 687, 688, 689, 26, 691,
1572 802, 752, 26, 26, 607, 407, 408, 740, 111, 112,
1573 113, 114, 115, 116, 117, 118, 418, 26, 710, 26,
1574 28, 27, 714, 112, 113, 114, 115, 116, 117, 118,
1575 26, 723, 724, 27, 436, 27, 35, 28, 440, 27,
1576 3, 733, 714, 28, 736, 8, 9, 3, 11, 12,
1577 13, 3, 454, 656, 32, 28, 117, 459, 117, 3,
1578 752, 32, 122, 26, 27, 26, 3, 469, 3, 26,
1579 673, 763, 30, 27, 27, 767, 3, 40, 770, 27,
1580 831, 773, 113, 114, 115, 116, 117, 118, 33, 781,
1581 693, 783, 784, 35, 496, 27, 32, 27, 32, 28,
1582 26, 773, 3, 63, 32, 797, 709, 26, 63, 33,
1583 3, 803, 63, 27, 3, 7, 518, 519, 26, 811,
1584 33, 724, 27, 8, 27, 27, 26, 819, 27, 27,
1585 532, 823, 27, 39, 3, 3, 828, 27, 830, 831,
1586 3, 3, 834, 3, 823, 32, 26, 67, 117, 27,
1587 842, 3, 3, 116, 3, 26, 828, 120, 32, 3,
1588 27, 26, 3, 27, 3, 26, 568, 33, 26, 28,
1589 26, 3, 27, 865, 27, 778, 33, 27, 26, 26,
1590 877, 873, 63, 26, 122, 3, 32, 29, 26, 591,
1591 26, 103, 594, 33, 29, 29, 27, 27, 27, 27,
1592 33, 898, 27, 29, 27, 27, 27, 609, 110, 111,
1593 112, 113, 114, 115, 116, 117, 118, 27, 27, 621,
1594 103, 29, 29, 27, 39, 0, 1, 26, 3, 4,
1595 5, 6, 27, 27, 27, 26, 638, 29, 27, 14,
1596 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1597 25, 63, 63, 33, 29, 30, 31, 29, 29, 34,
1598 3, 36, 37, 38, 3, 29, 41, 3, 27, 44,
1599 26, 46, 47, 48, 49, 50, 51, 52, 53, 29,
1600 28, 56, 43, 685, 59, 687, 688, 689, 3, 64,
1601 27, 29, 27, 39, 69, 70, 71, 72, 73, 74,
1602 75, 76, 77, 0, 79, 80, 81, 82, 83, 84,
1603 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1604 95, 96, 97, 98, 0, 202, 101, 102, 145, 319,
1605 488, 271, 107, 108, 109, 497, 515, 112, 740, 389,
1606 271, 878, 117, 849, 321, 730, 457, 122, 664, 110,
1607 111, 112, 113, 114, 115, 116, 117, 118, 110, 111,
1608 112, 113, 114, 115, 116, 117, 118, 40, 335, 349,
1609 352, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1610 1, -1, 3, 4, 5, 6, -1, -1, -1, -1,
1611 -1, -1, -1, 14, 15, 16, 17, 18, 19, 20,
1612 21, 22, 23, 24, 25, -1, -1, -1, 29, 30,
1613 31, -1, 33, 34, -1, 36, 37, 38, -1, -1,
1614 41, 823, -1, 44, -1, 46, 47, 48, 49, 50,
1615 51, 52, 53, -1, -1, 56, -1, -1, 59, -1,
1616 -1, -1, -1, 64, -1, -1, -1, 849, 69, 70,
1617 71, 72, 73, 74, 75, 76, 77, -1, 79, 80,
1618 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
1619 91, 92, 93, 94, 95, 96, 97, 98, -1, -1,
1620 101, 102, -1, -1, -1, -1, 107, 108, 109, -1,
1621 1, 112, 3, 4, 5, 6, 117, -1, -1, -1,
1622 -1, 122, -1, 14, 15, 16, 17, 18, 19, 20,
1623 21, 22, 23, 24, 25, -1, -1, -1, 29, 30,
1624 31, -1, -1, 34, -1, 36, 37, 38, -1, -1,
1625 41, -1, -1, 44, -1, 46, 47, 48, 49, 50,
1626 51, 52, 53, -1, -1, 56, -1, -1, 59, -1,
1627 -1, -1, -1, 64, -1, -1, -1, -1, 69, 70,
1628 71, 72, 73, 74, 75, 76, 77, -1, 79, 80,
1629 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
1630 91, 92, 93, 94, 95, 96, 97, 98, -1, -1,
1631 101, 102, -1, -1, -1, -1, 107, 108, 109, -1,
1632 1, 112, 3, -1, -1, -1, 117, -1, -1, -1,
1633 -1, 122, -1, 14, 15, 16, 17, 18, 19, 20,
1634 21, 22, 23, 24, 25, -1, -1, -1, 29, -1,
1635 -1, -1, 33, -1, -1, 36, 37, 38, -1, -1,
1636 -1, -1, -1, -1, -1, 46, 47, 48, -1, -1,
1637 -1, 52, 53, -1, -1, 56, -1, -1, 59, 60,
1638 61, 62, -1, 64, 65, 66, -1, -1, -1, -1,
1639 -1, 72, 73, 74, 75, -1, 77, 1, 79, 3,
1640 -1, -1, 83, 84, -1, -1, -1, -1, -1, -1,
1641 91, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1642 24, 25, -1, -1, -1, -1, -1, -1, -1, 33,
1643 -1, -1, 36, 37, 38, -1, -1, -1, -1, 120,
1644 -1, 122, -1, -1, 48, -1, -1, -1, -1, -1,
1645 -1, -1, 56, 3, -1, 59, -1, -1, -1, -1,
1646 -1, -1, -1, -1, 14, 15, 16, 17, 18, 19,
1647 20, 21, 22, 23, 24, 25, -1, -1, -1, 29,
1648 -1, -1, -1, -1, -1, -1, 36, 37, 38, -1,
1649 -1, -1, -1, -1, -1, -1, 46, 47, 48, -1,
1650 104, 105, 106, 53, -1, -1, 56, -1, -1, 59,
1651 60, 61, 62, -1, 64, 65, 66, -1, 122, -1,
1652 -1, -1, 72, 73, 74, 75, -1, 77, -1, 79,
1653 -1, -1, -1, 83, 84, -1, -1, -1, -1, -1,
1654 -1, 91, 3, -1, -1, -1, -1, -1, -1, -1,
1655 -1, -1, -1, 14, 15, 16, 17, 18, 19, 20,
1656 21, 22, 23, 24, 25, 115, 116, -1, 29, -1,
1657 120, -1, 122, -1, -1, 36, 37, 38, -1, -1,
1658 -1, -1, -1, -1, -1, 46, 47, 48, -1, -1,
1659 -1, -1, 53, -1, -1, 56, -1, -1, 59, 60,
1660 61, 62, -1, 64, 65, 66, -1, -1, -1, -1,
1661 -1, 72, 73, 74, 75, -1, 77, -1, 79, 3,
1662 -1, -1, 83, 84, -1, -1, -1, -1, -1, -1,
1663 91, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1664 24, 25, -1, -1, -1, -1, -1, -1, -1, -1,
1665 -1, 35, 36, 37, 38, -1, -1, -1, -1, 120,
1666 -1, 122, -1, -1, 3, -1, -1, -1, -1, -1,
1667 54, 55, 56, -1, -1, 59, 15, 16, 17, 18,
1668 19, 20, 21, 22, 23, 24, 25, -1, -1, 3,
1669 -1, -1, -1, -1, -1, -1, 35, 36, 37, 38,
1670 -1, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1671 24, 25, -1, -1, -1, 54, 55, 56, -1, -1,
1672 59, 35, 36, 37, 38, -1, -1, -1, -1, -1,
1673 -1, -1, -1, 117, 3, -1, -1, -1, 122, -1,
1674 54, 55, 56, -1, -1, 59, 15, 16, 17, 18,
1675 19, 20, 21, 22, 23, 24, 25, -1, -1, -1,
1676 -1, -1, -1, -1, -1, -1, -1, 36, 37, 38,
1677 -1, -1, -1, -1, -1, -1, -1, -1, 117, 3,
1678 4, -1, -1, 122, -1, -1, -1, 56, -1, -1,
1679 59, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1680 24, 25, -1, 3, -1, -1, -1, -1, 122, -1,
1681 -1, -1, 36, 37, 38, 15, 16, 17, 18, 19,
1682 20, 21, 22, 23, 24, 25, -1, -1, -1, -1,
1683 -1, -1, 56, -1, -1, 59, 36, 37, 38, -1,
1684 -1, -1, -1, 112, -1, -1, -1, -1, 117, 3,
1685 -1, -1, -1, 122, -1, -1, 56, -1, -1, 59,
1686 -1, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1687 24, 25, -1, -1, -1, -1, -1, -1, -1, -1,
1688 -1, 3, 36, 37, 38, -1, 8, 9, -1, 11,
1689 12, 13, -1, -1, 48, 3, -1, -1, 122, -1,
1690 -1, -1, 56, -1, 26, 59, -1, 15, 16, 17,
1691 18, 19, 20, 21, 22, 23, 24, 25, 40, 3,
1692 120, 43, 122, -1, -1, -1, -1, -1, 36, 37,
1693 38, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1694 24, 25, -1, 3, -1, -1, -1, -1, 56, -1,
1695 -1, 59, 36, 37, 38, 15, 16, 17, 18, 19,
1696 20, 21, 22, 23, 24, 25, -1, 3, 122, -1,
1697 -1, -1, 56, -1, -1, 59, 36, 37, 38, 15,
1698 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1699 -1, -1, -1, -1, 116, -1, 56, -1, 120, 59,
1700 36, 37, 38, -1, -1, -1, -1, -1, -1, -1,
1701 -1, -1, -1, -1, 122, -1, -1, -1, -1, -1,
1702 56, -1, -1, 59, -1, -1, -1, -1, -1, -1,
1703 -1, 3, -1, -1, -1, -1, 8, 9, 122, 11,
1704 12, 13, -1, 15, 16, 17, 18, 19, 20, 21,
1705 22, 23, 24, 25, 26, -1, -1, -1, -1, -1,
1706 -1, -1, 122, -1, 36, 37, 38, -1, 40, -1,
1707 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1708 -1, -1, -1, -1, -1, -1, 122, 59, -1, -1,
1709 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1710 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1711 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1712 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1713 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1714 -1, -1, -1, -1, 116, -1, -1, -1, 120
1715};
1716/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
1717#line 3 "/usr/local/share/bison.simple"
1718
1719/* Skeleton output parser for bison,
1720 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
1721
1722 This program is free software; you can redistribute it and/or modify
1723 it under the terms of the GNU General Public License as published by
1724 the Free Software Foundation; either version 2, or (at your option)
1725 any later version.
1726
1727 This program is distributed in the hope that it will be useful,
1728 but WITHOUT ANY WARRANTY; without even the implied warranty of
1729 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1730 GNU General Public License for more details.
1731
1732 You should have received a copy of the GNU General Public License
1733 along with this program; if not, write to the Free Software
1734 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
1735
1736/* As a special exception, when this file is copied by Bison into a
1737 Bison output file, you may use that output file without restriction.
1738 This special exception was added by the Free Software Foundation
1739 in version 1.24 of Bison. */
1740
1741#ifndef alloca
1742#ifdef __GNUC__
1743#define alloca __builtin_alloca
1744#else /* not GNU C. */
1745#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
1746#include <alloca.h>
1747#else /* not sparc */
1748#if defined (MSDOS) && !defined (__TURBOC__)
1749#include <malloc.h>
1750#else /* not MSDOS, or __TURBOC__ */
1751#if defined(_AIX)
1752#include <malloc.h>
1753 #pragma alloca
1754#else /* not MSDOS, __TURBOC__, or _AIX */
1755#ifdef __hpux
1756#ifdef __cplusplus
1757extern "C" {
1758void *alloca (unsigned int);
1759};
1760#else /* not __cplusplus */
1761void *alloca ();
1762#endif /* not __cplusplus */
1763#endif /* __hpux */
1764#endif /* not _AIX */
1765#endif /* not MSDOS, or __TURBOC__ */
1766#endif /* not sparc. */
1767#endif /* not GNU C. */
1768#endif /* alloca not defined. */
1769
1770/* This is the parser code that is written into each bison parser
1771 when the %semantic_parser declaration is not specified in the grammar.
1772 It was written by Richard Stallman by simplifying the hairy parser
1773 used when %semantic_parser is specified. */
1774
1775/* Note: there must be only one dollar sign in this file.
1776 It is replaced by the list of actions, each action
1777 as one case of the switch. */
1778
1779#define yyerrok (yyerrstatus = 0)
1780#define yyclearin (yychar = YYEMPTY)
1781#define YYEMPTY -2
1782#define YYEOF 0
1783#define YYACCEPT return(0)
1784#define YYABORT return(1)
1785#define YYERROR goto yyerrlab1
1786/* Like YYERROR except do call yyerror.
1787 This remains here temporarily to ease the
1788 transition to the new meaning of YYERROR, for GCC.
1789 Once GCC version 2 has supplanted version 1, this can go. */
1790#define YYFAIL goto yyerrlab
1791#define YYRECOVERING() (!!yyerrstatus)
1792#define YYBACKUP(token, value) \
1793do \
1794 if (yychar == YYEMPTY && yylen == 1) \
1795 { yychar = (token), yylval = (value); \
1796 yychar1 = YYTRANSLATE (yychar); \
1797 YYPOPSTACK; \
1798 goto yybackup; \
1799 } \
1800 else \
1801 { yyerror ("syntax error: cannot back up"); YYERROR; } \
1802while (0)
1803
1804#define YYTERROR 1
1805#define YYERRCODE 256
1806
1807#ifndef YYPURE
1808#define YYLEX yylex()
1809#endif
1810
1811#ifdef YYPURE
1812#ifdef YYLSP_NEEDED
1813#ifdef YYLEX_PARAM
1814#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
1815#else
1816#define YYLEX yylex(&yylval, &yylloc)
1817#endif
1818#else /* not YYLSP_NEEDED */
1819#ifdef YYLEX_PARAM
1820#define YYLEX yylex(&yylval, YYLEX_PARAM)
1821#else
1822#define YYLEX yylex(&yylval)
1823#endif
1824#endif /* not YYLSP_NEEDED */
1825#endif
1826
1827/* If nonreentrant, generate the variables here */
1828
1829#ifndef YYPURE
1830
1831int yychar; /* the lookahead symbol */
1832YYSTYPE yylval; /* the semantic value of the */
1833 /* lookahead symbol */
1834
1835#ifdef YYLSP_NEEDED
1836YYLTYPE yylloc; /* location data for the lookahead */
1837 /* symbol */
1838#endif
1839
1840int yynerrs; /* number of parse errors so far */
1841#endif /* not YYPURE */
1842
1843#if YYDEBUG != 0
1844int yydebug; /* nonzero means print parse trace */
1845/* Since this is uninitialized, it does not stop multiple parsers
1846 from coexisting. */
1847#endif
1848
1849/* YYINITDEPTH indicates the initial size of the parser's stacks */
1850
1851#ifndef YYINITDEPTH
1852#define YYINITDEPTH 200
1853#endif
1854
1855/* YYMAXDEPTH is the maximum size the stacks can grow to
1856 (effective only if the built-in stack extension method is used). */
1857
1858#if YYMAXDEPTH == 0
1859#undef YYMAXDEPTH
1860#endif
1861
1862#ifndef YYMAXDEPTH
1863#define YYMAXDEPTH 10000
1864#endif
1865
1866/* Prevent warning if -Wstrict-prototypes. */
1867#ifdef __GNUC__
1868int yyparse (void);
1869#endif
1870\f
1871#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
1872#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
1873#else /* not GNU C or C++ */
1874#ifndef __cplusplus
1875
1876/* This is the most reliable way to avoid incompatibilities
1877 in available built-in functions on various systems. */
1878static void
1879__yy_memcpy (to, from, count)
1880 char *to;
1881 char *from;
1882 int count;
1883{
1884 register char *f = from;
1885 register char *t = to;
1886 register int i = count;
1887
1888 while (i-- > 0)
1889 *t++ = *f++;
1890}
1891
1892#else /* __cplusplus */
1893
1894/* This is the most reliable way to avoid incompatibilities
1895 in available built-in functions on various systems. */
1896static void
1897__yy_memcpy (char *to, char *from, int count)
1898{
1899 register char *f = from;
1900 register char *t = to;
1901 register int i = count;
1902
1903 while (i-- > 0)
1904 *t++ = *f++;
1905}
1906
1907#endif
1908#endif
1909\f
1910#line 196 "/usr/local/share/bison.simple"
1911
1912/* The user can define YYPARSE_PARAM as the name of an argument to be passed
1913 into yyparse. The argument should have type void *.
1914 It should actually point to an object.
1915 Grammar actions can access the variable by casting it
1916 to the proper pointer type. */
1917
1918#ifdef YYPARSE_PARAM
1919#ifdef __cplusplus
1920#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
1921#define YYPARSE_PARAM_DECL
1922#else /* not __cplusplus */
1923#define YYPARSE_PARAM_ARG YYPARSE_PARAM
1924#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
1925#endif /* not __cplusplus */
1926#else /* not YYPARSE_PARAM */
1927#define YYPARSE_PARAM_ARG
1928#define YYPARSE_PARAM_DECL
1929#endif /* not YYPARSE_PARAM */
1930
1931int
1932yyparse(YYPARSE_PARAM_ARG)
1933 YYPARSE_PARAM_DECL
1934{
1935 register int yystate;
1936 register int yyn;
1937 register short *yyssp;
1938 register YYSTYPE *yyvsp;
1939 int yyerrstatus; /* number of tokens to shift before error messages enabled */
1940 int yychar1 = 0; /* lookahead token as an internal (translated) token number */
1941
1942 short yyssa[YYINITDEPTH]; /* the state stack */
1943 YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
1944
1945 short *yyss = yyssa; /* refer to the stacks thru separate pointers */
1946 YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
1947
1948#ifdef YYLSP_NEEDED
1949 YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
1950 YYLTYPE *yyls = yylsa;
1951 YYLTYPE *yylsp;
1952
1953#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1954#else
1955#define YYPOPSTACK (yyvsp--, yyssp--)
1956#endif
1957
1958 int yystacksize = YYINITDEPTH;
1959
1960#ifdef YYPURE
1961 int yychar;
1962 YYSTYPE yylval;
1963 int yynerrs;
1964#ifdef YYLSP_NEEDED
1965 YYLTYPE yylloc;
1966#endif
1967#endif
1968
1969 YYSTYPE yyval; /* the variable used to return */
1970 /* semantic values from the action */
1971 /* routines */
1972
1973 int yylen;
1974
1975#if YYDEBUG != 0
1976 if (yydebug)
1977 fprintf(stderr, "Starting parse\n");
1978#endif
1979
1980 yystate = 0;
1981 yyerrstatus = 0;
1982 yynerrs = 0;
1983 yychar = YYEMPTY; /* Cause a token to be read. */
1984
1985 /* Initialize stack pointers.
1986 Waste one element of value and location stack
1987 so that they stay on the same level as the state stack.
1988 The wasted elements are never initialized. */
1989
1990 yyssp = yyss - 1;
1991 yyvsp = yyvs;
1992#ifdef YYLSP_NEEDED
1993 yylsp = yyls;
1994#endif
1995
1996/* Push a new state, which is found in yystate . */
1997/* In all cases, when you get here, the value and location stacks
1998 have just been pushed. so pushing a state here evens the stacks. */
1999yynewstate:
2000
2001 *++yyssp = yystate;
2002
2003 if (yyssp >= yyss + yystacksize - 1)
2004 {
2005 /* Give user a chance to reallocate the stack */
2006 /* Use copies of these so that the &'s don't force the real ones into memory. */
2007 YYSTYPE *yyvs1 = yyvs;
2008 short *yyss1 = yyss;
2009#ifdef YYLSP_NEEDED
2010 YYLTYPE *yyls1 = yyls;
2011#endif
2012
2013 /* Get the current used size of the three stacks, in elements. */
2014 int size = yyssp - yyss + 1;
2015
2016#ifdef yyoverflow
2017 /* Each stack pointer address is followed by the size of
2018 the data in use in that stack, in bytes. */
2019#ifdef YYLSP_NEEDED
2020 /* This used to be a conditional around just the two extra args,
2021 but that might be undefined if yyoverflow is a macro. */
2022 yyoverflow("parser stack overflow",
2023 &yyss1, size * sizeof (*yyssp),
2024 &yyvs1, size * sizeof (*yyvsp),
2025 &yyls1, size * sizeof (*yylsp),
2026 &yystacksize);
2027#else
2028 yyoverflow("parser stack overflow",
2029 &yyss1, size * sizeof (*yyssp),
2030 &yyvs1, size * sizeof (*yyvsp),
2031 &yystacksize);
2032#endif
2033
2034 yyss = yyss1; yyvs = yyvs1;
2035#ifdef YYLSP_NEEDED
2036 yyls = yyls1;
2037#endif
2038#else /* no yyoverflow */
2039 /* Extend the stack our own way. */
2040 if (yystacksize >= YYMAXDEPTH)
2041 {
2042 yyerror("parser stack overflow");
2043 return 2;
2044 }
2045 yystacksize *= 2;
2046 if (yystacksize > YYMAXDEPTH)
2047 yystacksize = YYMAXDEPTH;
2048 yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
2049 __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
2050 yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
2051 __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
2052#ifdef YYLSP_NEEDED
2053 yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
2054 __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
2055#endif
2056#endif /* no yyoverflow */
2057
2058 yyssp = yyss + size - 1;
2059 yyvsp = yyvs + size - 1;
2060#ifdef YYLSP_NEEDED
2061 yylsp = yyls + size - 1;
2062#endif
2063
2064#if YYDEBUG != 0
2065 if (yydebug)
2066 fprintf(stderr, "Stack size increased to %d\n", yystacksize);
2067#endif
2068
2069 if (yyssp >= yyss + yystacksize - 1)
2070 YYABORT;
2071 }
2072
2073#if YYDEBUG != 0
2074 if (yydebug)
2075 fprintf(stderr, "Entering state %d\n", yystate);
2076#endif
2077
2078 goto yybackup;
2079 yybackup:
2080
2081/* Do appropriate processing given the current state. */
2082/* Read a lookahead token if we need one and don't already have one. */
2083/* yyresume: */
2084
2085 /* First try to decide what to do without reference to lookahead token. */
2086
2087 yyn = yypact[yystate];
2088 if (yyn == YYFLAG)
2089 goto yydefault;
2090
2091 /* Not known => get a lookahead token if don't already have one. */
2092
2093 /* yychar is either YYEMPTY or YYEOF
2094 or a valid token in external form. */
2095
2096 if (yychar == YYEMPTY)
2097 {
2098#if YYDEBUG != 0
2099 if (yydebug)
2100 fprintf(stderr, "Reading a token: ");
2101#endif
2102 yychar = YYLEX;
2103 }
2104
2105 /* Convert token to internal form (in yychar1) for indexing tables with */
2106
2107 if (yychar <= 0) /* This means end of input. */
2108 {
2109 yychar1 = 0;
2110 yychar = YYEOF; /* Don't call YYLEX any more */
2111
2112#if YYDEBUG != 0
2113 if (yydebug)
2114 fprintf(stderr, "Now at end of input.\n");
2115#endif
2116 }
2117 else
2118 {
2119 yychar1 = YYTRANSLATE(yychar);
2120
2121#if YYDEBUG != 0
2122 if (yydebug)
2123 {
2124 fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
2125 /* Give the individual parser a way to print the precise meaning
2126 of a token, for further debugging info. */
2127#ifdef YYPRINT
2128 YYPRINT (stderr, yychar, yylval);
2129#endif
2130 fprintf (stderr, ")\n");
2131 }
2132#endif
2133 }
2134
2135 yyn += yychar1;
2136 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
2137 goto yydefault;
2138
2139 yyn = yytable[yyn];
2140
2141 /* yyn is what to do for this token type in this state.
2142 Negative => reduce, -yyn is rule number.
2143 Positive => shift, yyn is new state.
2144 New state is final state => don't bother to shift,
2145 just return success.
2146 0, or most negative number => error. */
2147
2148 if (yyn < 0)
2149 {
2150 if (yyn == YYFLAG)
2151 goto yyerrlab;
2152 yyn = -yyn;
2153 goto yyreduce;
2154 }
2155 else if (yyn == 0)
2156 goto yyerrlab;
2157
2158 if (yyn == YYFINAL)
2159 YYACCEPT;
2160
2161 /* Shift the lookahead token. */
2162
2163#if YYDEBUG != 0
2164 if (yydebug)
2165 fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
2166#endif
2167
2168 /* Discard the token being shifted unless it is eof. */
2169 if (yychar != YYEOF)
2170 yychar = YYEMPTY;
2171
2172 *++yyvsp = yylval;
2173#ifdef YYLSP_NEEDED
2174 *++yylsp = yylloc;
2175#endif
2176
2177 /* count tokens shifted since error; after three, turn off error status. */
2178 if (yyerrstatus) yyerrstatus--;
2179
2180 yystate = yyn;
2181 goto yynewstate;
2182
2183/* Do the default action for the current state. */
2184yydefault:
2185
2186 yyn = yydefact[yystate];
2187 if (yyn == 0)
2188 goto yyerrlab;
2189
2190/* Do a reduction. yyn is the number of a rule to reduce with. */
2191yyreduce:
2192 yylen = yyr2[yyn];
2193 if (yylen > 0)
2194 yyval = yyvsp[1-yylen]; /* implement default value of the action */
2195
2196#if YYDEBUG != 0
2197 if (yydebug)
2198 {
2199 int i;
2200
2201 fprintf (stderr, "Reducing via rule %d (line %d), ",
2202 yyn, yyrline[yyn]);
2203
2204 /* Print the symbols being reduced, and their result. */
2205 for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
2206 fprintf (stderr, "%s ", yytname[yyrhs[i]]);
2207 fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
2208 }
2209#endif
2210
2211
2212 switch (yyn) {
2213
2214case 1:
2215#line 559 "parser.y"
2216{
2217 {
2218 int ii;
2219 for (ii = 0; ii < 256; ii++) {
2220 handler_stack[ii] = 0;
2221 }
2222 handler_stack[0] = comment_handler;
2223 }
2224 doc_stack[0] = doctitle;
2225 ;
2226 break;}
2227case 2:
2228#line 568 "parser.y"
2229{
2230 CommentHandler::cleanup();
2231 cplus_cleanup();
2232 doc_entry = doctitle;
2233 if (lang_init) {
2234 lang->close();
2235 }
2236 if (te_index) {
2237 fprintf(stderr,"%s : EOF. Missing #endif detected.\n", input_file);
2238 FatalError();
2239 }
2240 ;
2241 break;}
2242case 3:
2243#line 582 "parser.y"
2244{
2245 scanner_clear_start();
2246 Error = 0;
2247 ;
2248 break;}
2249case 4:
2250#line 586 "parser.y"
2251{
2252 ;
2253 break;}
2254case 5:
2255#line 590 "parser.y"
2256{
2257 if (allow) {
2258// init_language();
2259 doc_entry = 0;
2260 // comment_handler->clear();
2261 include_file(yyvsp[0].id);
2262 }
2263 ;
2264 break;}
2265case 6:
2266#line 601 "parser.y"
2267{
2268 if (allow) {
2269 int oldextern = WrapExtern;
2270// init_language();
2271 doc_entry = 0;
2272 // comment_handler->clear();
2273 WrapExtern = 1;
2274 if (include_file(yyvsp[0].id) >= 0) {
2275 add_symbol("SWIGEXTERN",0,0);
2276 } else {
2277 WrapExtern = oldextern;
2278 }
2279 }
2280 ;
2281 break;}
2282case 7:
2283#line 618 "parser.y"
2284{
2285 if (allow) {
2286 int oldextern = WrapExtern;
2287 init_language();
2288 doc_entry = 0;
2289 WrapExtern = 1;
2290 if (include_file(yyvsp[0].id) >= 0) {
2291 add_symbol("SWIGEXTERN",0,0);
2292 lang->import(yyvsp[0].id);
2293 } else {
2294 WrapExtern = oldextern;
2295 }
2296 }
2297 ;
2298 break;}
2299case 8:
2300#line 636 "parser.y"
2301{
2302 if (allow) {
2303 if ((checkout_file(yyvsp[0].id,yyvsp[0].id)) == 0) {
2304 fprintf(stderr,"%s checked out from the SWIG library.\n",yyvsp[0].id);
2305 }
2306 }
2307 ;
2308 break;}
2309case 9:
2310#line 646 "parser.y"
2311{
2312 if (allow) {
2313 doc_entry = 0;
2314 if (Verbose) {
2315 fprintf(stderr,"%s : Line %d. CPP %s ignored.\n", input_file, line_number,yyvsp[0].id);
2316 }
2317 }
2318 ;
2319 break;}
2320case 10:
2321#line 657 "parser.y"
2322{
2323 if (allow) {
2324 init_language();
2325 if (Active_type) delete Active_type;
2326 Active_type = new DataType(yyvsp[-3].type);
2327 Active_extern = yyvsp[-4].ivalue;
2328 yyvsp[-3].type->is_pointer += yyvsp[-2].decl.is_pointer;
2329 if (yyvsp[-1].ivalue > 0) {
2330 yyvsp[-3].type->is_pointer++;
2331 yyvsp[-3].type->status = STAT_READONLY;
2332 yyvsp[-3].type->arraystr = copy_string(ArrayString);
2333 }
2334 if (yyvsp[-2].decl.is_reference) {
2335 fprintf(stderr,"%s : Line %d. Error. Linkage to C++ reference not allowed.\n", input_file, line_number);
2336 FatalError();
2337 } else {
2338 if (yyvsp[-3].type->qualifier) {
2339 if ((strcmp(yyvsp[-3].type->qualifier,"const") == 0)) {
2340 if (yyvsp[0].dtype.type != T_ERROR)
2341 create_constant(yyvsp[-2].decl.id, yyvsp[-3].type, yyvsp[0].dtype.id);
2342 } else
2343 create_variable(yyvsp[-4].ivalue,yyvsp[-2].decl.id,yyvsp[-3].type);
2344 } else
2345 create_variable(yyvsp[-4].ivalue,yyvsp[-2].decl.id,yyvsp[-3].type);
2346 }
2347 }
2348 delete yyvsp[-3].type;
2349 ;
2350 break;}
2351case 11:
2352#line 684 "parser.y"
2353{ ;
2354 break;}
2355case 12:
2356#line 688 "parser.y"
2357{
2358 skip_decl();
2359 fprintf(stderr,"%s : Line %d. Function pointers not currently supported.\n",
2360 input_file, line_number);
2361 ;
2362 break;}
2363case 13:
2364#line 696 "parser.y"
2365{
2366 if (Verbose) {
2367 fprintf(stderr,"static variable %s ignored.\n",yyvsp[-2].decl.id);
2368 }
2369 Active_static = 1;
2370 delete yyvsp[-3].type;
2371 ;
2372 break;}
2373case 14:
2374#line 702 "parser.y"
2375{
2376 Active_static = 0;
2377 ;
2378 break;}
2379case 15:
2380#line 708 "parser.y"
2381{
2382 skip_decl();
2383 fprintf(stderr,"%s : Line %d. Function pointers not currently supported.\n",
2384 input_file, line_number);
2385 ;
2386 break;}
2387case 16:
2388#line 717 "parser.y"
2389{
2390 if (allow) {
2391 init_language();
2392 if (Active_type) delete Active_type;
2393 Active_type = new DataType(yyvsp[-5].type);
2394 Active_extern = yyvsp[-6].ivalue;
2395 yyvsp[-5].type->is_pointer += yyvsp[-4].decl.is_pointer;
2396 yyvsp[-5].type->is_reference = yyvsp[-4].decl.is_reference;
2397 create_function(yyvsp[-6].ivalue, yyvsp[-4].decl.id, yyvsp[-5].type, yyvsp[-2].pl);
2398 }
2399 delete yyvsp[-5].type;
2400 delete yyvsp[-2].pl;
2401 ;
2402 break;}
2403case 17:
2404#line 729 "parser.y"
2405{ ;
2406 break;}
2407case 18:
2408#line 733 "parser.y"
2409{
2410 if (allow) {
2411 init_language();
2412 yyvsp[-5].type->is_pointer += yyvsp[-4].decl.is_pointer;
2413 yyvsp[-5].type->is_reference = yyvsp[-4].decl.is_reference;
2414 create_function(yyvsp[-6].ivalue, yyvsp[-4].decl.id, yyvsp[-5].type, yyvsp[-2].pl);
2415 }
2416 delete yyvsp[-5].type;
2417 delete yyvsp[-2].pl;
2418 ;
2419 break;}
2420case 19:
2421#line 746 "parser.y"
2422{
2423 if (allow) {
2424 init_language();
2425 DataType *t = new DataType(T_INT);
2426 t->is_pointer += yyvsp[-4].decl.is_pointer;
2427 t->is_reference = yyvsp[-4].decl.is_reference;
2428 create_function(yyvsp[-5].ivalue,yyvsp[-4].decl.id,t,yyvsp[-2].pl);
2429 delete t;
2430 }
2431 ;
2432 break;}
2433case 20:
2434#line 755 "parser.y"
2435{ ;
2436 break;}
2437case 21:
2438#line 759 "parser.y"
2439{
2440 if ((allow) && (Inline)) {
2441 if (strlen(CCode.get())) {
2442 init_language();
2443 yyvsp[-5].type->is_pointer += yyvsp[-4].decl.is_pointer;
2444 yyvsp[-5].type->is_reference = yyvsp[-4].decl.is_reference;
2445 create_function(0, yyvsp[-4].decl.id, yyvsp[-5].type, yyvsp[-2].pl);
2446 }
2447 }
2448 delete yyvsp[-5].type;
2449 delete yyvsp[-2].pl;
2450 ;
2451 break;}
2452case 22:
2453#line 774 "parser.y"
2454{
2455 if (allow) {
2456 init_language();
2457 yyvsp[-5].type->is_pointer += yyvsp[-4].decl.is_pointer;
2458 yyvsp[-5].type->is_reference = yyvsp[-4].decl.is_reference;
2459 if (Inline) {
2460 fprintf(stderr,"%s : Line %d. Repeated %%inline directive.\n",input_file,line_number);
2461 FatalError();
2462 } else {
2463 if (strlen(CCode.get())) {
2464 fprintf(f_header,"static ");
2465 emit_extern_func(yyvsp[-4].decl.id,yyvsp[-5].type,yyvsp[-2].pl,3,f_header);
2466 fprintf(f_header,"%s\n",CCode.get());
2467 }
2468 create_function(0, yyvsp[-4].decl.id, yyvsp[-5].type, yyvsp[-2].pl);
2469 }
2470 }
2471 delete yyvsp[-5].type;
2472 delete yyvsp[-2].pl;
2473 ;
2474 break;}
2475case 23:
2476#line 797 "parser.y"
2477{
2478 if (allow) {
2479 if (Verbose) {
2480 fprintf(stderr,"static function %s ignored.\n", yyvsp[-4].decl.id);
2481 }
2482 }
2483 Active_static = 1;
2484 delete yyvsp[-5].type;
2485 delete yyvsp[-2].pl;
2486 ;
2487 break;}
2488case 24:
2489#line 806 "parser.y"
2490{
2491 Active_static = 0;
2492 ;
2493 break;}
2494case 25:
2495#line 812 "parser.y"
2496{
2497 if (allow)
2498 Status = Status | STAT_READONLY;
2499 ;
2500 break;}
2501case 26:
2502#line 819 "parser.y"
2503{
2504 if (allow)
2505 Status = Status & ~STAT_READONLY;
2506 ;
2507 break;}
2508case 27:
2509#line 825 "parser.y"
2510{
2511 if (allow) {
2512 strcpy(yy_rename,yyvsp[-1].id);
2513 Rename_true = 1;
2514 }
2515 ;
2516 break;}
2517case 28:
2518#line 833 "parser.y"
2519{
2520 if (name_hash.lookup(yyvsp[-2].id)) {
2521 name_hash.remove(yyvsp[-2].id);
2522 }
2523 name_hash.add(yyvsp[-2].id,copy_string(yyvsp[-1].id));
2524 ;
2525 break;}
2526case 29:
2527#line 842 "parser.y"
2528{
2529 NewObject = 1;
2530 ;
2531 break;}
2532case 30:
2533#line 844 "parser.y"
2534{
2535 NewObject = 0;
2536 ;
2537 break;}
2538case 31:
2539#line 850 "parser.y"
2540{
2541 if (allow) {
2542 fprintf(stderr,"%s : Lind %d. Empty %%name() is no longer supported.\n",
2543 input_file, line_number);
2544 FatalError();
2545 }
2546 ;
2547 break;}
2548case 32:
2549#line 856 "parser.y"
2550{
2551 Rename_true = 0;
2552 ;
2553 break;}
2554case 33:
2555#line 862 "parser.y"
2556{
2557 if (allow && (!WrapExtern)) {
2558 init_language();
2559 if (add_symbol(yyvsp[-4].id,(DataType *) 0, (char *) 0)) {
2560 fprintf(stderr,"%s : Line %d. Name of native function %s conflicts with previous declaration (ignored)\n",
2561 input_file, line_number, yyvsp[-4].id);
2562 } else {
2563 doc_entry = new DocDecl(yyvsp[-4].id,doc_stack[doc_stack_top]);
2564 lang->add_native(yyvsp[-4].id,yyvsp[-1].id);
2565 }
2566 }
2567 ;
2568 break;}
2569case 34:
2570#line 874 "parser.y"
2571{
2572 if (allow && (!WrapExtern)) {
2573 init_language();
2574 yyvsp[-5].type->is_pointer += yyvsp[-4].decl.is_pointer;
2575 if (add_symbol(yyvsp[-8].id,(DataType *) 0, (char *) 0)) {
2576 fprintf(stderr,"%s : Line %d. Name of native function %s conflicts with previous declaration (ignored)\n",
2577 input_file, line_number, yyvsp[-8].id);
2578 } else {
2579 if (yyvsp[-6].ivalue) {
2580 emit_extern_func(yyvsp[-4].decl.id, yyvsp[-5].type, yyvsp[-2].pl, yyvsp[-6].ivalue, f_header);
2581 }
2582 doc_entry = new DocDecl(yyvsp[-8].id,doc_stack[doc_stack_top]);
2583 lang->add_native(yyvsp[-8].id,yyvsp[-4].decl.id);
2584 }
2585 }
2586 delete yyvsp[-5].type;
2587 delete yyvsp[-2].pl;
2588 ;
2589 break;}
2590case 35:
2591#line 895 "parser.y"
2592{
2593 if (allow && (!WrapExtern)) {
2594 if (!title_init) {
2595 title_init = 1;
2596 doc_init = 1;
2597 if (!comment_handler) {
2598 comment_handler = new CommentHandler();
2599 }
2600 {
2601 int ii;
2602 for (ii = 0; ii < yyvsp[0].dlist.count; ii++) {
2603 comment_handler->style(yyvsp[0].dlist.names[ii],yyvsp[0].dlist.values[ii]);
2604 }
2605 }
2606 // Create a new title for documentation
2607 {
2608 int temp = line_number;
2609 line_number = yyvsp[-2].ivalue;
2610 if (!doctitle)
2611 doctitle = new DocTitle(yyvsp[-1].id,0);
2612 else {
2613 doctitle->name = copy_string(title);
2614 doctitle->line_number = yyvsp[-2].ivalue;
2615 doctitle->end_line = yyvsp[-2].ivalue;
2616 }
2617 line_number = temp;
2618 }
2619 doctitle->usage = yyvsp[-1].id;
2620 doc_entry = doctitle;
2621 doc_stack[0] = doc_entry;
2622 doc_stack_top = 0;
2623 handler_stack[0] = comment_handler;
2624 {
2625 int ii;
2626 for (ii = 0; ii < yyvsp[0].dlist.count; ii++) {
2627 doc_stack[doc_stack_top]->style(yyvsp[0].dlist.names[ii],yyvsp[0].dlist.values[ii]);
2628 }
2629 }
2630
2631 } else {
2632 // Ignore it
2633 }
2634 }
2635 ;
2636 break;}
2637case 36:
2638#line 943 "parser.y"
2639{
2640 if (allow && (!WrapExtern) && (!IgnoreDoc)) {
2641 // Copy old comment handler
2642 // if (handler_stack[1]) delete handler_stack[1];
2643 handler_stack[1] = new CommentHandler(handler_stack[0]);
2644 comment_handler = handler_stack[1];
2645 {
2646 int ii;
2647 for (ii = 0; ii < yyvsp[0].dlist.count; ii++) {
2648 comment_handler->style(yyvsp[0].dlist.names[ii],yyvsp[0].dlist.values[ii]);
2649 }
2650 }
2651 {
2652 int temp = line_number;
2653 line_number = yyvsp[-2].ivalue;
2654 doc_entry = new DocSection(yyvsp[-1].id,doc_stack[0]);
2655 line_number = temp;
2656 }
2657 doc_stack_top = 1;
2658 doc_stack[1] = doc_entry;
2659 {
2660 int ii;
2661 for (ii = 0; ii < yyvsp[0].dlist.count; ii++) {
2662 doc_stack[doc_stack_top]->style(yyvsp[0].dlist.names[ii],yyvsp[0].dlist.values[ii]);
2663 }
2664 }
2665 }
2666 ;
2667 break;}
2668case 37:
2669#line 973 "parser.y"
2670{
2671 if (allow && (!WrapExtern) && (!IgnoreDoc)) {
2672 if (doc_stack_top < 1) {
2673 fprintf(stderr,"%s : Line %d. Can't apply %%subsection here.\n", input_file,line_number);
2674 FatalError();
2675 } else {
2676
2677 // Copy old comment handler
2678 // if (handler_stack[2]) delete handler_stack[2];
2679 handler_stack[2] = new CommentHandler(handler_stack[1]);
2680 comment_handler = handler_stack[2];
2681 {
2682 int ii;
2683 for (ii = 0; ii < yyvsp[0].dlist.count; ii++) {
2684 comment_handler->style(yyvsp[0].dlist.names[ii],yyvsp[0].dlist.values[ii]);
2685 }
2686 }
2687 {
2688 int temp = line_number;
2689 line_number = yyvsp[-2].ivalue;
2690 doc_entry = new DocSection(yyvsp[-1].id,doc_stack[1]);
2691 line_number = temp;
2692 }
2693 doc_stack_top = 2;
2694 doc_stack[2] = doc_entry;
2695 {
2696 int ii;
2697 for (ii = 0; ii < yyvsp[0].dlist.count; ii++) {
2698 doc_stack[doc_stack_top]->style(yyvsp[0].dlist.names[ii],yyvsp[0].dlist.values[ii]);
2699 }
2700 }
2701 }
2702 }
2703 ;
2704 break;}
2705case 38:
2706#line 1009 "parser.y"
2707{
2708 if (allow && (!WrapExtern) && (!IgnoreDoc)) {
2709 if (doc_stack_top < 2) {
2710 fprintf(stderr,"%s : Line %d. Can't apply %%subsubsection here.\n", input_file,line_number);
2711 FatalError();
2712 } else {
2713
2714 // Copy old comment handler
2715
2716 // if (handler_stack[3]) delete handler_stack[3];
2717 handler_stack[3] = new CommentHandler(handler_stack[2]);
2718 comment_handler = handler_stack[3];
2719 {
2720 int ii;
2721 for (ii = 0; ii < yyvsp[0].dlist.count; ii++) {
2722 comment_handler->style(yyvsp[0].dlist.names[ii],yyvsp[0].dlist.values[ii]);
2723 }
2724 }
2725 {
2726 int temp = line_number;
2727 line_number = yyvsp[-2].ivalue;
2728 doc_entry = new DocSection(yyvsp[-1].id,doc_stack[2]);
2729 line_number = temp;
2730 }
2731 doc_stack_top = 3;
2732 doc_stack[3] = doc_entry;
2733 {
2734 int ii;
2735 for (ii = 0; ii < yyvsp[0].dlist.count; ii++) {
2736 doc_stack[doc_stack_top]->style(yyvsp[0].dlist.names[ii],yyvsp[0].dlist.values[ii]);
2737 }
2738 }
2739 }
2740 }
2741 ;
2742 break;}
2743case 39:
2744#line 1046 "parser.y"
2745{
2746 if (allow && (!WrapExtern)) {
2747 fprintf(stderr,"%%alpha directive is obsolete. Use '%%style sort' instead.\n");
2748 handler_stack[0]->style("sort",0);
2749 doc_stack[0]->style("sort",0);
2750 }
2751 ;
2752 break;}
2753case 40:
2754#line 1054 "parser.y"
2755{
2756 if (allow && (!WrapExtern)) {
2757 fprintf(stderr,"%%raw directive is obsolete. Use '%%style nosort' instead.\n");
2758 handler_stack[0]->style("nosort",0);
2759 doc_stack[0]->style("nosort",0);
2760 }
2761 ;
2762 break;}
2763case 41:
2764#line 1062 "parser.y"
2765{ ;
2766 break;}
2767case 42:
2768#line 1066 "parser.y"
2769{
2770 if (allow && (!WrapExtern)) {
2771 yyvsp[0].id[strlen(yyvsp[0].id) - 1] = 0;
2772 doc_entry = new DocText(yyvsp[0].id,doc_stack[doc_stack_top]);
2773 doc_entry = 0;
2774 }
2775 ;
2776 break;}
2777case 43:
2778#line 1075 "parser.y"
2779{ ;
2780 break;}
2781case 44:
2782#line 1079 "parser.y"
2783{
2784 if (allow && (!WrapExtern)) {
2785 init_language();
2786 yyvsp[0].id[strlen(yyvsp[0].id) - 1] = 0;
2787// fprintf(f_header,"#line %d \"%s\"\n", start_line, input_file);
2788 fprintf(f_header, "%s\n", yyvsp[0].id);
2789 }
2790 ;
2791 break;}
2792case 45:
2793#line 1090 "parser.y"
2794{
2795 if (allow && (!WrapExtern)) {
2796 init_language();
2797 yyvsp[0].id[strlen(yyvsp[0].id) - 1] = 0;
2798 fprintf(f_wrappers,"%s\n",yyvsp[0].id);
2799 }
2800 ;
2801 break;}
2802case 46:
2803#line 1100 "parser.y"
2804{
2805 if (allow && (!WrapExtern)) {
2806 init_language();
2807 yyvsp[0].id[strlen(yyvsp[0].id) -1] = 0;
2808 fprintf(f_init,"%s\n", yyvsp[0].id);
2809 }
2810 ;
2811 break;}
2812case 47:
2813#line 1109 "parser.y"
2814{
2815 if (allow && (!WrapExtern)) {
2816 init_language();
2817 yyvsp[0].id[strlen(yyvsp[0].id) - 1] = 0;
2818 fprintf(f_header, "%s\n", yyvsp[0].id);
2819 start_inline(yyvsp[0].id,start_line);
2820 }
2821 ;
2822 break;}
2823case 48:
2824#line 1119 "parser.y"
2825{
2826 if (allow && (!WrapExtern)) {
2827 fprintf(stderr,"%s\n", yyvsp[0].id);
2828 }
2829 ;
2830 break;}
2831case 49:
2832#line 1125 "parser.y"
2833{
2834 if (allow && (!WrapExtern)) {
2835 fprintf(stderr,"%s\n", yyvsp[0].id);
2836 }
2837 ;
2838 break;}
2839case 50:
2840#line 1132 "parser.y"
2841{
2842 DocOnly = 1;
2843 ;
2844 break;}
2845case 51:
2846#line 1138 "parser.y"
2847{
2848 if (allow) {
2849 if (!module_init) {
2850 lang->set_init(yyvsp[-1].id);
2851 module_init = 1;
2852 init_language();
2853 } else {
2854 if (Verbose)
2855 fprintf(stderr,"%s : Line %d. %%init %s ignored.\n",
2856 input_file, line_number, yyvsp[-1].id);
2857 }
2858 if (yyvsp[0].ilist.count > 0) {
2859 fprintf(stderr,"%s : Line %d. Warning. Init list no longer supported.\n",
2860 input_file,line_number);
2861 }
2862 }
2863 for (i = 0; i < yyvsp[0].ilist.count; i++)
2864 if (yyvsp[0].ilist.names[i]) delete [] yyvsp[0].ilist.names[i];
2865 delete [] yyvsp[0].ilist.names;
2866 ;
2867 break;}
2868case 52:
2869#line 1160 "parser.y"
2870{
2871 if (allow) {
2872 if (yyvsp[0].ilist.count)
2873 lang->set_module(yyvsp[-1].id,yyvsp[0].ilist.names);
2874 else
2875 lang->set_module(yyvsp[-1].id,0);
2876 module_init = 1;
2877 init_language();
2878 }
2879 for (i = 0; i < yyvsp[0].ilist.count; i++)
2880 if (yyvsp[0].ilist.names[i]) delete [] yyvsp[0].ilist.names[i];
2881 delete [] yyvsp[0].ilist.names;
2882 ;
2883 break;}
2884case 53:
2885#line 1176 "parser.y"
2886{
2887 if (allow) {
2888 if ((yyvsp[0].dtype.type != T_ERROR) && (yyvsp[0].dtype.type != T_SYMBOL)) {
2889 init_language();
2890 temp_typeptr = new DataType(yyvsp[0].dtype.type);
2891 create_constant(yyvsp[-1].id, temp_typeptr, yyvsp[0].dtype.id);
2892 delete temp_typeptr;
2893 } else if (yyvsp[0].dtype.type == T_SYMBOL) {
2894 // Add a symbol to the SWIG symbol table
2895 if (add_symbol(yyvsp[-1].id,(DataType *) 0, (char *) 0)) {
2896 fprintf(stderr,"%s : Line %d. Warning. Symbol %s already defined.\n",
2897 input_file,line_number, yyvsp[-1].id);
2898 }
2899 }
2900 }
2901 ;
2902 break;}
2903case 54:
2904#line 1195 "parser.y"
2905{
2906 if (Verbose) {
2907 fprintf(stderr,"%s : Line %d. CPP Macro ignored.\n", input_file, line_number);
2908 }
2909 ;
2910 break;}
2911case 55:
2912#line 1202 "parser.y"
2913{
2914 remove_symbol(yyvsp[0].id);
2915 ;
2916 break;}
2917case 56:
2918#line 1208 "parser.y"
2919{ scanner_clear_start(); ;
2920 break;}
2921case 57:
2922#line 1208 "parser.y"
2923{
2924 if (allow) {
2925 init_language();
2926 if (yyvsp[-5].id) {
2927 temp_type.type = T_INT;
2928 temp_type.is_pointer = 0;
2929 temp_type.implicit_ptr = 0;
2930 sprintf(temp_type.name,"int");
2931 temp_type.typedef_add(yyvsp[-5].id,1);
2932 }
2933 }
2934 ;
2935 break;}
2936case 58:
2937#line 1223 "parser.y"
2938{ scanner_clear_start(); ;
2939 break;}
2940case 59:
2941#line 1223 "parser.y"
2942{
2943 if (allow) {
2944 init_language();
2945 temp_type.type = T_INT;
2946 temp_type.is_pointer = 0;
2947 temp_type.implicit_ptr = 0;
2948 sprintf(temp_type.name,"int");
2949 Active_typedef = new DataType(&temp_type);
2950 temp_type.typedef_add(yyvsp[0].id,1);
2951 }
2952 ;
2953 break;}
2954case 60:
2955#line 1233 "parser.y"
2956{ ;
2957 break;}
2958case 61:
2959#line 1243 "parser.y"
2960{
2961 TMParm *p;
2962 skip_brace();
2963 p = yyvsp[-1].tmparm;
2964 while (p) {
2965 typemap_register(yyvsp[-3].id,yyvsp[-5].id,p->p->t,p->p->name,CCode,p->args);
2966 p = p->next;
2967 }
2968 delete yyvsp[-5].id;
2969 delete yyvsp[-3].id;
2970 ;
2971 break;}
2972case 62:
2973#line 1256 "parser.y"
2974{
2975 if (!typemap_lang) {
2976 fprintf(stderr,"SWIG internal error. No typemap_lang specified.\n");
2977 fprintf(stderr,"typemap on %s : Line %d. will be ignored.\n",input_file,line_number);
2978 FatalError();
2979 } else {
2980 TMParm *p;
2981 skip_brace();
2982 p = yyvsp[-1].tmparm;
2983 while (p) {
2984 typemap_register(yyvsp[-3].id,typemap_lang,p->p->t,p->p->name,CCode,p->args);
2985 p = p->next;
2986 }
2987 }
2988 delete yyvsp[-3].id;
2989 ;
2990 break;}
2991case 63:
2992#line 1275 "parser.y"
2993{
2994 TMParm *p;
2995 p = yyvsp[-1].tmparm;
2996 while (p) {
2997 typemap_clear(yyvsp[-3].id,yyvsp[-5].id,p->p->t,p->p->name);
2998 p = p->next;
2999 }
3000 delete yyvsp[-5].id;
3001 delete yyvsp[-3].id;
3002 ;
3003 break;}
3004case 64:
3005#line 1287 "parser.y"
3006{
3007 if (!typemap_lang) {
3008 fprintf(stderr,"SWIG internal error. No typemap_lang specified.\n");
3009 fprintf(stderr,"typemap on %s : Line %d. will be ignored.\n",input_file,line_number);
3010 FatalError();
3011 } else {
3012 TMParm *p;
3013 p = yyvsp[-1].tmparm;
3014 while (p) {
3015 typemap_clear(yyvsp[-3].id,typemap_lang,p->p->t,p->p->name);
3016 p = p->next;
3017 }
3018 }
3019 delete yyvsp[-3].id;
3020 ;
3021 break;}
3022case 65:
3023#line 1305 "parser.y"
3024{
3025 TMParm *p;
3026 p = yyvsp[-3].tmparm;
3027 while (p) {
3028 typemap_copy(yyvsp[-5].id,yyvsp[-7].id,yyvsp[-1].tmparm->p->t,yyvsp[-1].tmparm->p->name,p->p->t,p->p->name);
3029 p = p->next;
3030 }
3031 delete yyvsp[-7].id;
3032 delete yyvsp[-5].id;
3033 delete yyvsp[-1].tmparm->p;
3034 delete yyvsp[-1].tmparm;
3035 ;
3036 break;}
3037case 66:
3038#line 1320 "parser.y"
3039{
3040 if (!typemap_lang) {
3041 fprintf(stderr,"SWIG internal error. No typemap_lang specified.\n");
3042 fprintf(stderr,"typemap on %s : Line %d. will be ignored.\n",input_file,line_number);
3043 FatalError();
3044 } else {
3045 TMParm *p;
3046 p = yyvsp[-3].tmparm;
3047 while (p) {
3048 typemap_copy(yyvsp[-5].id,typemap_lang,yyvsp[-1].tmparm->p->t,yyvsp[-1].tmparm->p->name,p->p->t,p->p->name);
3049 p = p->next;
3050 }
3051 }
3052 delete yyvsp[-5].id;
3053 delete yyvsp[-1].tmparm->p;
3054 delete yyvsp[-1].tmparm;
3055 ;
3056 break;}
3057case 67:
3058#line 1341 "parser.y"
3059{
3060 TMParm *p;
3061 p = yyvsp[-1].tmparm;
3062 while(p) {
3063 typemap_apply(yyvsp[-3].tmparm->p->t,yyvsp[-3].tmparm->p->name,p->p->t,p->p->name);
3064 p = p->next;
3065 }
3066 delete yyvsp[-1].tmparm;
3067 delete yyvsp[-3].tmparm->args;
3068 delete yyvsp[-3].tmparm;
3069 ;
3070 break;}
3071case 68:
3072#line 1352 "parser.y"
3073{
3074 TMParm *p;
3075 p = yyvsp[-1].tmparm;
3076 while (p) {
3077 typemap_clear_apply(p->p->t, p->p->name);
3078 p = p->next;
3079 }
3080 ;
3081 break;}
3082case 69:
3083#line 1369 "parser.y"
3084{
3085 skip_brace();
3086 fragment_register("except",yyvsp[-2].id, CCode);
3087 delete yyvsp[-2].id;
3088 ;
3089 break;}
3090case 70:
3091#line 1376 "parser.y"
3092{
3093 skip_brace();
3094 fragment_register("except",typemap_lang, CCode);
3095 ;
3096 break;}
3097case 71:
3098#line 1383 "parser.y"
3099{
3100 fragment_clear("except",yyvsp[-2].id);
3101 ;
3102 break;}
3103case 72:
3104#line 1388 "parser.y"
3105{
3106 fragment_clear("except",typemap_lang);
3107 ;
3108 break;}
3109case 73:
3110#line 1394 "parser.y"
3111{ ;
3112 break;}
3113case 74:
3114#line 1395 "parser.y"
3115{ ;
3116 break;}
3117case 75:
3118#line 1396 "parser.y"
3119{ ;
3120 break;}
3121case 76:
3122#line 1397 "parser.y"
3123{
3124 if (!Error) {
3125 {
3126 static int last_error_line = -1;
3127 if (last_error_line != line_number) {
3128 fprintf(stderr,"%s : Line %d. Syntax error in input.\n", input_file, line_number);
3129 FatalError();
3130 last_error_line = line_number;
3131 // Try to make some kind of recovery.
3132 skip_decl();
3133 }
3134 Error = 1;
3135 }
3136 }
3137 ;
3138 break;}
3139case 77:
3140#line 1415 "parser.y"
3141{ ;
3142 break;}
3143case 78:
3144#line 1416 "parser.y"
3145{ ;
3146 break;}
3147case 79:
3148#line 1420 "parser.y"
3149{ ;
3150 break;}
3151case 80:
3152#line 1424 "parser.y"
3153{
3154 {
3155 int ii,jj;
3156 for (ii = 0; ii < yyvsp[0].dlist.count; ii++) {
3157 comment_handler->style(yyvsp[0].dlist.names[ii],yyvsp[0].dlist.values[ii]);
3158 for (jj = 0; jj < doc_stack_top; jj++)
3159 doc_stack[jj]->style(yyvsp[0].dlist.names[ii],yyvsp[0].dlist.values[ii]);
3160 if (doctitle)
3161 doctitle->style(yyvsp[0].dlist.names[ii],yyvsp[0].dlist.values[ii]);
3162 doc->style(yyvsp[0].dlist.names[ii],yyvsp[0].dlist.values[ii]);
3163 }
3164 }
3165 ;
3166 break;}
3167case 81:
3168#line 1440 "parser.y"
3169{
3170 {
3171 int ii;
3172 for (ii = 0; ii < yyvsp[0].dlist.count; ii++) {
3173 comment_handler = new CommentHandler(comment_handler);
3174 handler_stack[doc_stack_top] = comment_handler;
3175 comment_handler->style(yyvsp[0].dlist.names[ii],yyvsp[0].dlist.values[ii]);
3176 doc_stack[doc_stack_top]->style(yyvsp[0].dlist.names[ii],yyvsp[0].dlist.values[ii]);
3177 }
3178 }
3179 ;
3180 break;}
3181case 82:
3182#line 1453 "parser.y"
3183{ ;
3184 break;}
3185case 83:
3186#line 1459 "parser.y"
3187{
3188 if (allow) {
3189 if (IgnoreDoc) {
3190 /* Already in a disabled documentation */
3191 doc_scope++;
3192 } else {
3193 if (Verbose)
3194 fprintf(stderr,"%s : Line %d. Documentation disabled.\n", input_file, line_number);
3195 IgnoreDoc = 1;
3196 doc_scope = 1;
3197 }
3198 }
3199 ;
3200 break;}
3201case 84:
3202#line 1473 "parser.y"
3203{
3204 if (allow) {
3205 if (IgnoreDoc) {
3206 if (doc_scope > 1) {
3207 doc_scope--;
3208 } else {
3209 if (Verbose)
3210 fprintf(stderr,"%s : Line %d. Documentation enabled.\n", input_file, line_number);
3211 IgnoreDoc = 0;
3212 doc_scope = 0;
3213 }
3214 }
3215 }
3216 ;
3217 break;}
3218case 85:
3219#line 1492 "parser.y"
3220{
3221 if (allow) {
3222 init_language();
3223 /* Add a new typedef */
3224 Active_typedef = new DataType(yyvsp[-1].type);
3225 yyvsp[-1].type->is_pointer += yyvsp[0].decl.is_pointer;
3226 yyvsp[-1].type->typedef_add(yyvsp[0].decl.id);
3227 /* If this is %typedef, add it to the header */
3228 if (yyvsp[-2].ivalue)
3229 fprintf(f_header,"typedef %s %s;\n", yyvsp[-1].type->print_full(), yyvsp[0].decl.id);
3230 cplus_register_type(yyvsp[0].decl.id);
3231 }
3232 ;
3233 break;}
3234case 86:
3235#line 1504 "parser.y"
3236{ ;
3237 break;}
3238case 87:
3239#line 1508 "parser.y"
3240{
3241 if (allow) {
3242 init_language();
3243 /* Typedef'd pointer */
3244 if (yyvsp[-9].ivalue) {
3245 sprintf(temp_name,"(*%s)",yyvsp[-5].id);
3246 fprintf(f_header,"typedef ");
3247 emit_extern_func(temp_name, yyvsp[-8].type,yyvsp[-2].pl,0,f_header);
3248 }
3249 strcpy(yyvsp[-8].type->name,"<function ptr>");
3250 yyvsp[-8].type->type = T_USER;
3251 yyvsp[-8].type->is_pointer = 1;
3252 yyvsp[-8].type->typedef_add(yyvsp[-5].id,1);
3253 cplus_register_type(yyvsp[-5].id);
3254 }
3255 delete yyvsp[-8].type;
3256 delete yyvsp[-5].id;
3257 delete yyvsp[-2].pl;
3258 ;
3259 break;}
3260case 88:
3261#line 1530 "parser.y"
3262{
3263 if (allow) {
3264 init_language();
3265 if (yyvsp[-10].ivalue) {
3266 yyvsp[-9].type->is_pointer += yyvsp[-8].ivalue;
3267 sprintf(temp_name,"(*%s)",yyvsp[-5].id);
3268 fprintf(f_header,"typedef ");
3269 emit_extern_func(temp_name, yyvsp[-9].type,yyvsp[-2].pl,0,f_header);
3270 }
3271
3272 /* Typedef'd pointer */
3273 strcpy(yyvsp[-9].type->name,"<function ptr>");
3274 yyvsp[-9].type->type = T_USER;
3275 yyvsp[-9].type->is_pointer = 1;
3276 yyvsp[-9].type->typedef_add(yyvsp[-5].id,1);
3277 cplus_register_type(yyvsp[-5].id);
3278 }
3279 delete yyvsp[-9].type;
3280 delete yyvsp[-5].id;
3281 delete yyvsp[-2].pl;
3282 ;
3283 break;}
3284case 89:
3285#line 1554 "parser.y"
3286{
3287 if (allow) {
3288 init_language();
3289 Active_typedef = new DataType(yyvsp[-2].type);
3290 // This datatype is going to be readonly
3291
3292 yyvsp[-2].type->status = STAT_READONLY | STAT_REPLACETYPE;
3293 yyvsp[-2].type->is_pointer += yyvsp[-1].decl.is_pointer;
3294 // Turn this into a "pointer" corresponding to the array
3295 yyvsp[-2].type->is_pointer++;
3296 yyvsp[-2].type->arraystr = copy_string(ArrayString);
3297 yyvsp[-2].type->typedef_add(yyvsp[-1].decl.id);
3298 fprintf(stderr,"%s : Line %d. Warning. Array type %s will be read-only without a typemap\n",input_file,line_number, yyvsp[-1].decl.id);
3299 cplus_register_type(yyvsp[-1].decl.id);
3300
3301 }
3302 ;
3303 break;}
3304case 90:
3305#line 1570 "parser.y"
3306{ ;
3307 break;}
3308case 91:
3309#line 1583 "parser.y"
3310{
3311 if (allow) {
3312 if (Active_typedef) {
3313 DataType *t;
3314 t = new DataType(Active_typedef);
3315 t->is_pointer += yyvsp[-1].decl.is_pointer;
3316 t->typedef_add(yyvsp[-1].decl.id);
3317 cplus_register_type(yyvsp[-1].decl.id);
3318 delete t;
3319 }
3320 }
3321 ;
3322 break;}
3323case 92:
3324#line 1595 "parser.y"
3325{
3326 DataType *t;
3327 t = new DataType(Active_typedef);
3328 t->status = STAT_READONLY | STAT_REPLACETYPE;
3329 t->is_pointer += yyvsp[-1].decl.is_pointer + 1;
3330 t->arraystr = copy_string(ArrayString);
3331 t->typedef_add(yyvsp[-1].decl.id);
3332 cplus_register_type(yyvsp[-1].decl.id);
3333 delete t;
3334 fprintf(stderr,"%s : Line %d. Warning. Array type %s will be read-only without a typemap.\n",input_file,line_number, yyvsp[-1].decl.id);
3335 ;
3336 break;}
3337case 93:
3338#line 1606 "parser.y"
3339{ ;
3340 break;}
3341case 94:
3342#line 1626 "parser.y"
3343{
3344 /* Push old if-then-else status */
3345 if_push();
3346 /* Look a symbol up in the symbol table */
3347 if (lookup_symbol(yyvsp[0].id)) {
3348 in_then = 1;
3349 in_else = 0;
3350 allow = 1 & prev_allow;
3351 } else {
3352 /* Condition is false. Skip over whatever is in this block */
3353 in_else = skip_cond(1);
3354 if (in_else == -1) {
3355 /* Unrecoverable error */
3356 SWIG_exit(1);
3357 }
3358 if (!in_else) {
3359 if_pop(); // Pop out. Reached end of block
3360 } else {
3361 allow = prev_allow;
3362 in_then = 0;
3363 }
3364 }
3365 ;
3366 break;}
3367case 95:
3368#line 1652 "parser.y"
3369{
3370 if_push();
3371 if (lookup_symbol(yyvsp[0].id)) {
3372 /* Condition is false. Skip over whatever is in this block */
3373 in_else = skip_cond(1);
3374 if (in_else == -1) {
3375 /* Unrecoverable error */
3376 SWIG_exit(1);
3377 }
3378 if (!in_else) {
3379 if_pop(); // Pop out. Reached end of block
3380 } else {
3381 allow = prev_allow;
3382 in_then = 0;
3383 }
3384 } else {
3385 in_then = 1;
3386 in_else = 0;
3387 allow = 1 & prev_allow;
3388 }
3389 ;
3390 break;}
3391case 96:
3392#line 1675 "parser.y"
3393{
3394 if ((!in_then) || (in_else)) {
3395 fprintf(stderr,"%s : Line %d. Misplaced else\n", input_file, line_number);
3396 FatalError();
3397 } else {
3398 in_then = 0;
3399 in_else = 1;
3400 if (allow) {
3401 allow = 0;
3402 /* Skip over rest of the conditional */
3403 skip_cond(0);
3404 if_pop();
3405 } else {
3406 allow = 1;
3407 }
3408 allow = allow & prev_allow;
3409 }
3410 ;
3411 break;}
3412case 97:
3413#line 1694 "parser.y"
3414{
3415 if ((!in_then) && (!in_else)) {
3416 fprintf(stderr,"%s : Line %d. Misplaced endif\n", input_file, line_number);
3417 FatalError();
3418 } else {
3419 if_pop();
3420 }
3421 ;
3422 break;}
3423case 98:
3424#line 1704 "parser.y"
3425{
3426 /* Push old if-then-else status */
3427 if_push();
3428 if (yyvsp[0].ivalue) {
3429 in_then = 1;
3430 in_else = 0;
3431 allow = 1 & prev_allow;
3432 } else {
3433 /* Condition is false. Skip over whatever is in this block */
3434 in_else = skip_cond(1);
3435 if (in_else == -1) {
3436 /* Unrecoverable error */
3437 SWIG_exit(1);
3438 }
3439 if (!in_else) {
3440 if_pop(); // Pop out. Reached end of block
3441 } else {
3442 allow = prev_allow;
3443 in_then = 0;
3444 }
3445 }
3446 ;
3447 break;}
3448case 99:
3449#line 1730 "parser.y"
3450{
3451 /* have to pop old if clause off */
3452 if_pop();
3453
3454 /* Push old if-then-else status */
3455 if_push();
3456 if (yyvsp[0].ivalue) {
3457 in_then = 1;
3458 in_else = 0;
3459 allow = 1 & prev_allow;
3460 } else {
3461 /* Condition is false. Skip over whatever is in this block */
3462 in_else = skip_cond(1);
3463 if (in_else == -1) {
3464 /* Unrecoverable error */
3465 SWIG_exit(1);
3466 }
3467 if (!in_else) {
3468 if_pop(); // Pop out. Reached end of block
3469 } else {
3470 allow = prev_allow;
3471 in_then = 0;
3472 }
3473 }
3474 ;
3475 break;}
3476case 100:
3477#line 1759 "parser.y"
3478{
3479
3480 /* Look ID up in the symbol table */
3481 if (lookup_symbol(yyvsp[-1].id)) {
3482 yyval.ivalue = 1;
3483 } else {
3484 yyval.ivalue = 0;
3485 }
3486 ;
3487 break;}
3488case 101:
3489#line 1768 "parser.y"
3490{
3491 if (lookup_symbol(yyvsp[0].id)) {
3492 yyval.ivalue = 1;
3493 } else {
3494 yyval.ivalue = 0;
3495 }
3496 ;
3497 break;}
3498case 102:
3499#line 1775 "parser.y"
3500{
3501 if (yyvsp[0].ivalue) yyval.ivalue = 0;
3502 else yyval.ivalue = 1;
3503 ;
3504 break;}
3505case 103:
3506#line 1781 "parser.y"
3507{
3508 if (allow && (!WrapExtern))
3509 lang->pragma(yyvsp[-4].id,yyvsp[-2].id,yyvsp[-1].id);
3510 fprintf(stderr,"%s : Line %d. Warning. '%%pragma(lang,opt=value)' syntax is obsolete.\n",
3511 input_file,line_number);
3512 fprintf(stderr," Use '%%pragma(lang) opt=value' instead.\n");
3513 ;
3514 break;}
3515case 104:
3516#line 1789 "parser.y"
3517{
3518 if (allow && (!WrapExtern))
3519 swig_pragma(yyvsp[-1].id,yyvsp[0].id);
3520 ;
3521 break;}
3522case 105:
3523#line 1793 "parser.y"
3524{
3525 if (allow && (!WrapExtern))
3526 lang->pragma(yyvsp[-3].id,yyvsp[-1].id,yyvsp[0].id);
3527 ;
3528 break;}
3529case 106:
3530#line 1801 "parser.y"
3531{ ;
3532 break;}
3533case 107:
3534#line 1802 "parser.y"
3535{
3536 if (allow) {
3537 init_language();
3538 temp_typeptr = new DataType(Active_type);
3539 temp_typeptr->is_pointer += yyvsp[-2].decl.is_pointer;
3540 if (yyvsp[-1].ivalue > 0) {
3541 temp_typeptr->is_pointer++;
3542 temp_typeptr->status = STAT_READONLY;
3543 temp_typeptr->arraystr = copy_string(ArrayString);
3544 }
3545 if (yyvsp[-2].decl.is_reference) {
3546 fprintf(stderr,"%s : Line %d. Error. Linkage to C++ reference not allowed.\n", input_file, line_number);
3547 FatalError();
3548 } else {
3549 if (temp_typeptr->qualifier) {
3550 if ((strcmp(temp_typeptr->qualifier,"const") == 0)) {
3551 /* Okay. This is really some sort of C++ constant here. */
3552 if (yyvsp[0].dtype.type != T_ERROR)
3553 create_constant(yyvsp[-2].decl.id, temp_typeptr, yyvsp[0].dtype.id);
3554 } else
3555 create_variable(Active_extern,yyvsp[-2].decl.id, temp_typeptr);
3556 } else
3557 create_variable(Active_extern, yyvsp[-2].decl.id, temp_typeptr);
3558 }
3559 delete temp_typeptr;
3560 }
3561 ;
3562 break;}
3563case 108:
3564#line 1828 "parser.y"
3565{ ;
3566 break;}
3567case 109:
3568#line 1829 "parser.y"
3569{
3570 if (allow) {
3571 init_language();
3572 temp_typeptr = new DataType(Active_type);
3573 temp_typeptr->is_pointer += yyvsp[-4].decl.is_pointer;
3574 temp_typeptr->is_reference = yyvsp[-4].decl.is_reference;
3575 create_function(Active_extern, yyvsp[-4].decl.id, temp_typeptr, yyvsp[-2].pl);
3576 delete temp_typeptr;
3577 }
3578 delete yyvsp[-2].pl;
3579 ;
3580 break;}
3581case 110:
3582#line 1839 "parser.y"
3583{ ;
3584 break;}
3585case 111:
3586#line 1842 "parser.y"
3587{
3588 yyval.dtype = yyvsp[-1].dtype;
3589 ;
3590 break;}
3591case 112:
3592#line 1845 "parser.y"
3593{
3594 yyval.dtype.type = T_SYMBOL;
3595 ;
3596 break;}
3597case 113:
3598#line 1848 "parser.y"
3599{
3600 if (Verbose)
3601 fprintf(stderr,"%s : Line %d. Warning. Unable to parse #define (ignored)\n", input_file, line_number);
3602 yyval.dtype.type = T_ERROR;
3603 ;
3604 break;}
3605case 114:
3606#line 1856 "parser.y"
3607{ yyval.ivalue = 1; ;
3608 break;}
3609case 115:
3610#line 1857 "parser.y"
3611{yyval.ivalue = 0; ;
3612 break;}
3613case 116:
3614#line 1858 "parser.y"
3615{
3616 if (strcmp(yyvsp[0].id,"C") == 0) {
3617 yyval.ivalue = 2;
3618 } else {
3619 fprintf(stderr,"%s : Line %d. Unrecognized extern type \"%s\" (ignored).\n", input_file, line_number, yyvsp[0].id);
3620 FatalError();
3621 }
3622 ;
3623 break;}
3624case 117:
3625#line 1870 "parser.y"
3626{ skip_brace(); ;
3627 break;}
3628case 118:
3629#line 1879 "parser.y"
3630{
3631 if ((yyvsp[-1].p->t->type != T_VOID) || (yyvsp[-1].p->t->is_pointer))
3632 yyvsp[0].pl->insert(yyvsp[-1].p,0);
3633 yyval.pl = yyvsp[0].pl;
3634 delete yyvsp[-1].p;
3635 ;
3636 break;}
3637case 119:
3638#line 1885 "parser.y"
3639{ yyval.pl = new ParmList;;
3640 break;}
3641case 120:
3642#line 1888 "parser.y"
3643{
3644 yyvsp[0].pl->insert(yyvsp[-1].p,0);
3645 yyval.pl = yyvsp[0].pl;
3646 delete yyvsp[-1].p;
3647 ;
3648 break;}
3649case 121:
3650#line 1893 "parser.y"
3651{ yyval.pl = new ParmList;;
3652 break;}
3653case 122:
3654#line 1896 "parser.y"
3655{
3656 yyval.p = yyvsp[0].p;
3657 if (typemap_check("ignore",typemap_lang,yyval.p->t,yyval.p->name))
3658 yyval.p->ignore = 1;
3659 ;
3660 break;}
3661case 123:
3662#line 1901 "parser.y"
3663{
3664 yyval.p = yyvsp[0].p;
3665 yyval.p->call_type = yyval.p->call_type | yyvsp[-1].ivalue;
3666 if (InArray && (yyval.p->call_type & CALL_VALUE)) {
3667 fprintf(stderr,"%s : Line %d. Error. Can't use %%val with an array.\n", input_file, line_number);
3668 FatalError();
3669 }
3670 if (!yyval.p->t->is_pointer) {
3671 fprintf(stderr,"%s : Line %d. Error. Can't use %%val or %%out with a non-pointer argument.\n", input_file, line_number);
3672 FatalError();
3673 } else {
3674 yyval.p->t->is_pointer--;
3675 }
3676 ;
3677 break;}
3678case 124:
3679#line 1916 "parser.y"
3680{
3681 if (InArray) {
3682 yyvsp[-1].type->is_pointer++;
3683 if (Verbose) {
3684 fprintf(stderr,"%s : Line %d. Warning. Array %s", input_file, line_number, yyvsp[-1].type->print_type());
3685 print_array();
3686 fprintf(stderr," has been converted to %s.\n", yyvsp[-1].type->print_type());
3687 }
3688 // Add array string to the type
3689 yyvsp[-1].type->arraystr = copy_string(ArrayString.get());
3690 }
3691 yyval.p = new Parm(yyvsp[-1].type,yyvsp[0].id);
3692 yyval.p->call_type = 0;
3693 yyval.p->defvalue = DefArg;
3694 if ((yyvsp[-1].type->type == T_USER) && !(yyvsp[-1].type->is_pointer)) {
3695 if (Verbose)
3696 fprintf(stderr,"%s : Line %d. Warning : Parameter of type '%s'\nhas been remapped to '%s *' and will be called using *((%s *) ptr).\n",
3697 input_file, line_number, yyvsp[-1].type->name, yyvsp[-1].type->name, yyvsp[-1].type->name);
3698
3699 yyval.p->call_type = CALL_REFERENCE;
3700 yyval.p->t->is_pointer++;
3701 }
3702 delete yyvsp[-1].type;
3703 delete yyvsp[0].id;
3704 ;
3705 break;}
3706case 125:
3707#line 1942 "parser.y"
3708{
3709 yyval.p = new Parm(yyvsp[-2].type,yyvsp[0].id);
3710 yyval.p->t->is_pointer += yyvsp[-1].ivalue;
3711 yyval.p->call_type = 0;
3712 yyval.p->defvalue = DefArg;
3713 if (InArray) {
3714 yyval.p->t->is_pointer++;
3715 if (Verbose) {
3716 fprintf(stderr,"%s : Line %d. Warning. Array %s", input_file, line_number, yyval.p->t->print_type());
3717 print_array();
3718 fprintf(stderr," has been converted to %s.\n", yyval.p->t->print_type());
3719 }
3720 // Add array string to the type
3721 yyval.p->t->arraystr = copy_string(ArrayString.get());
3722 }
3723 delete yyvsp[-2].type;
3724 delete yyvsp[0].id;
3725 ;
3726 break;}
3727case 126:
3728#line 1961 "parser.y"
3729{
3730 yyval.p = new Parm(yyvsp[-2].type,yyvsp[0].id);
3731 yyval.p->t->is_reference = 1;
3732 yyval.p->call_type = 0;
3733 yyval.p->t->is_pointer++;
3734 yyval.p->defvalue = DefArg;
3735 if (!CPlusPlus) {
3736 fprintf(stderr,"%s : Line %d. Warning. Use of C++ Reference detected. Use the -c++ option.\n", input_file, line_number);
3737 }
3738 delete yyvsp[-2].type;
3739 delete yyvsp[0].id;
3740 ;
3741 break;}
3742case 127:
3743#line 1973 "parser.y"
3744{
3745 fprintf(stderr,"%s : Line %d. Error. Function pointer not allowed (remap with typedef).\n", input_file, line_number);
3746 FatalError();
3747 yyval.p = new Parm(yyvsp[-7].type,yyvsp[-4].id);
3748 yyval.p->t->type = T_ERROR;
3749 yyval.p->name = copy_string(yyvsp[-4].id);
3750 strcpy(yyval.p->t->name,"<function ptr>");
3751 delete yyvsp[-7].type;
3752 delete yyvsp[-4].id;
3753 delete yyvsp[-1].pl;
3754 ;
3755 break;}
3756case 128:
3757#line 1984 "parser.y"
3758{
3759 fprintf(stderr,"%s : Line %d. Variable length arguments not supported (ignored).\n", input_file, line_number);
3760 yyval.p = new Parm(new DataType(T_INT),"varargs");
3761 yyval.p->t->type = T_ERROR;
3762 yyval.p->name = copy_string("varargs");
3763 strcpy(yyval.p->t->name,"<varargs>");
3764 FatalError();
3765 ;
3766 break;}
3767case 129:
3768#line 1994 "parser.y"
3769{
3770 yyval.id = yyvsp[-1].id;
3771 InArray = 0;
3772 if (yyvsp[0].dtype.type == T_CHAR)
3773 DefArg = copy_string(ConstChar);
3774 else
3775 DefArg = copy_string(yyvsp[0].dtype.id);
3776 if (yyvsp[0].dtype.id) delete yyvsp[0].dtype.id;
3777 ;
3778 break;}
3779case 130:
3780#line 2003 "parser.y"
3781{
3782 yyval.id = yyvsp[-1].id;
3783 InArray = yyvsp[0].ivalue;
3784 DefArg = 0;
3785 ;
3786 break;}
3787case 131:
3788#line 2008 "parser.y"
3789{
3790 yyval.id = new char[1];
3791 yyval.id[0] = 0;
3792 InArray = yyvsp[0].ivalue;
3793 DefArg = 0;
3794 ;
3795 break;}
3796case 132:
3797#line 2014 "parser.y"
3798{ yyval.id = new char[1];
3799 yyval.id[0] = 0;
3800 InArray = 0;
3801 DefArg = 0;
3802 ;
3803 break;}
3804case 133:
3805#line 2021 "parser.y"
3806{ yyval.dtype = yyvsp[0].dtype; ;
3807 break;}
3808case 134:
3809#line 2022 "parser.y"
3810{
3811 yyval.dtype.id = new char[strlen(yyvsp[0].id)+2];
3812 yyval.dtype.id[0] = '&';
3813 strcpy(&yyval.dtype.id[1], yyvsp[0].id);
3814 yyval.dtype.type = T_USER;
3815 ;
3816 break;}
3817case 135:
3818#line 2028 "parser.y"
3819{
3820 skip_brace();
3821 yyval.dtype.id = 0; yyval.dtype.type = T_INT;
3822 ;
3823 break;}
3824case 136:
3825#line 2032 "parser.y"
3826{
3827 ;
3828 break;}
3829case 137:
3830#line 2034 "parser.y"
3831{yyval.dtype.id = 0; yyval.dtype.type = T_INT;;
3832 break;}
3833case 138:
3834#line 2037 "parser.y"
3835{ yyval.ivalue = CALL_VALUE; ;
3836 break;}
3837case 139:
3838#line 2038 "parser.y"
3839{ yyval.ivalue = CALL_OUTPUT; ;
3840 break;}
3841case 140:
3842#line 2041 "parser.y"
3843{
3844 yyval.ivalue = yyvsp[-1].ivalue | yyvsp[0].ivalue;
3845 ;
3846 break;}
3847case 141:
3848#line 2044 "parser.y"
3849{
3850 yyval.ivalue = yyvsp[0].ivalue;
3851 ;
3852 break;}
3853case 142:
3854#line 2051 "parser.y"
3855{ yyval.decl.id = yyvsp[0].id;
3856 yyval.decl.is_pointer = 0;
3857 yyval.decl.is_reference = 0;
3858 ;
3859 break;}
3860case 143:
3861#line 2055 "parser.y"
3862{
3863 yyval.decl.id = yyvsp[0].id;
3864 yyval.decl.is_pointer = yyvsp[-1].ivalue;
3865 yyval.decl.is_reference = 0;
3866 ;
3867 break;}
3868case 144:
3869#line 2060 "parser.y"
3870{
3871 yyval.decl.id = yyvsp[0].id;
3872 yyval.decl.is_pointer = 1;
3873 yyval.decl.is_reference = 1;
3874 if (!CPlusPlus) {
3875 fprintf(stderr,"%s : Line %d. Warning. Use of C++ Reference detected. Use the -c++ option.\n", input_file, line_number);
3876 }
3877 ;
3878 break;}
3879case 145:
3880#line 2070 "parser.y"
3881{ yyval.ivalue = 1; ;
3882 break;}
3883case 146:
3884#line 2071 "parser.y"
3885{ yyval.ivalue = yyvsp[0].ivalue + 1;;
3886 break;}
3887case 147:
3888#line 2075 "parser.y"
3889{
3890 yyval.ivalue = yyvsp[0].ivalue + 1;
3891 "[]" >> ArrayString;
3892 ;
3893 break;}
3894case 148:
3895#line 2079 "parser.y"
3896{
3897 yyval.ivalue = yyvsp[0].ivalue + 1;
3898 "]" >> ArrayString;
3899 yyvsp[-2].dtype.id >> ArrayString;
3900 "[" >> ArrayString;
3901 ;
3902 break;}
3903case 149:
3904#line 2086 "parser.y"
3905{
3906 yyval.ivalue = yyvsp[0].ivalue;
3907 ;
3908 break;}
3909case 150:
3910#line 2089 "parser.y"
3911{ yyval.ivalue = 0;
3912 ArrayString = "";
3913 ;
3914 break;}
3915case 151:
3916#line 2097 "parser.y"
3917{
3918 yyval.type = yyvsp[0].type;
3919 ;
3920 break;}
3921case 152:
3922#line 2100 "parser.y"
3923{
3924 yyval.type = yyvsp[-1].type;
3925 ;
3926 break;}
3927case 153:
3928#line 2103 "parser.y"
3929{
3930 yyval.type = yyvsp[-1].type;
3931 ;
3932 break;}
3933case 154:
3934#line 2106 "parser.y"
3935{
3936 yyval.type = yyvsp[0].type;
3937 ;
3938 break;}
3939case 155:
3940#line 2109 "parser.y"
3941{
3942 yyval.type = yyvsp[0].type;
3943 ;
3944 break;}
3945case 156:
3946#line 2112 "parser.y"
3947{
3948 yyval.type = yyvsp[0].type;
3949 ;
3950 break;}
3951case 157:
3952#line 2115 "parser.y"
3953{
3954 yyval.type = yyvsp[0].type;
3955 ;
3956 break;}
3957case 158:
3958#line 2118 "parser.y"
3959{
3960 yyval.type = yyvsp[0].type;
3961 ;
3962 break;}
3963case 159:
3964#line 2121 "parser.y"
3965{
3966 if (yyvsp[0].type) yyval.type = yyvsp[0].type;
3967 else yyval.type = yyvsp[-1].type;
3968 ;
3969 break;}
3970case 160:
3971#line 2125 "parser.y"
3972{
3973 if (yyvsp[0].type) yyval.type = yyvsp[0].type;
3974 else yyval.type = yyvsp[-1].type;
3975 ;
3976 break;}
3977case 161:
3978#line 2129 "parser.y"
3979{
3980 yyval.type = yyvsp[-1].type;
3981 if (strlen(yyvsp[0].id) > 0) {
3982 if ((strlen(yyvsp[0].id) + strlen(yyval.type->name)) >= MAX_NAME) {
3983 fprintf(stderr,"%s : Line %d. Fatal error. Type-name is too long!\n",
3984 input_file, line_number);
3985 } else {
3986 strcat(yyval.type->name,yyvsp[0].id);
3987 }
3988 }
3989 ;
3990 break;}
3991case 162:
3992#line 2140 "parser.y"
3993{
3994 yyval.type = new DataType;
3995 strcpy(yyval.type->name,yyvsp[-1].id);
3996 yyval.type->type = T_USER;
3997 /* Do a typedef lookup */
3998 yyval.type->typedef_resolve();
3999 if (strlen(yyvsp[0].id) > 0) {
4000 if ((strlen(yyvsp[0].id) + strlen(yyval.type->name)) >= MAX_NAME) {
4001 fprintf(stderr,"%s : Line %d. Fatal error. Type-name is too long!\n",
4002 input_file, line_number);
4003 } else {
4004 strcat(yyval.type->name,yyvsp[0].id);
4005 }
4006 }
4007 ;
4008 break;}
4009case 163:
4010#line 2155 "parser.y"
4011{
4012 yyval.type = yyvsp[0].type;
4013 yyval.type->qualifier = new char[6];
4014 strcpy(yyval.type->qualifier,"const");
4015 ;
4016 break;}
4017case 164:
4018#line 2160 "parser.y"
4019{
4020 yyval.type = new DataType;
4021 sprintf(yyval.type->name,"%s %s",yyvsp[-1].id, yyvsp[0].id);
4022 yyval.type->type = T_USER;
4023 ;
4024 break;}
4025case 165:
4026#line 2165 "parser.y"
4027{
4028 yyval.type = new DataType;
4029 sprintf(yyval.type->name,"%s::%s",yyvsp[-2].id,yyvsp[0].id);
4030 yyval.type->type = T_USER;
4031 yyval.type->typedef_resolve();
4032 ;
4033 break;}
4034case 166:
4035#line 2174 "parser.y"
4036{
4037 yyval.type = new DataType;
4038 sprintf(yyval.type->name,"%s", yyvsp[0].id);
4039 yyval.type->type = T_USER;
4040 yyval.type->typedef_resolve(1);
4041 ;
4042 break;}
4043case 167:
4044#line 2180 "parser.y"
4045{
4046 yyval.type = new DataType;
4047 sprintf(yyval.type->name,"enum %s", yyvsp[0].id);
4048 yyval.type->type = T_INT;
4049 yyval.type->typedef_resolve(1);
4050 ;
4051 break;}
4052case 168:
4053#line 2190 "parser.y"
4054{
4055 yyval.type = yyvsp[0].type;
4056 ;
4057 break;}
4058case 169:
4059#line 2193 "parser.y"
4060{
4061 yyval.type = yyvsp[-1].type;
4062 ;
4063 break;}
4064case 170:
4065#line 2196 "parser.y"
4066{
4067 yyval.type = yyvsp[-1].type;
4068 ;
4069 break;}
4070case 171:
4071#line 2199 "parser.y"
4072{
4073 yyval.type = yyvsp[0].type;
4074 ;
4075 break;}
4076case 172:
4077#line 2202 "parser.y"
4078{
4079 yyval.type = yyvsp[0].type;
4080 ;
4081 break;}
4082case 173:
4083#line 2205 "parser.y"
4084{
4085 yyval.type = yyvsp[0].type;
4086 ;
4087 break;}
4088case 174:
4089#line 2208 "parser.y"
4090{
4091 yyval.type = yyvsp[0].type;
4092 ;
4093 break;}
4094case 175:
4095#line 2211 "parser.y"
4096{
4097 yyval.type = yyvsp[0].type;
4098 ;
4099 break;}
4100case 176:
4101#line 2214 "parser.y"
4102{
4103 if (yyvsp[0].type) yyval.type = yyvsp[0].type;
4104 else yyval.type = yyvsp[-1].type;
4105 ;
4106 break;}
4107case 177:
4108#line 2218 "parser.y"
4109{
4110 if (yyvsp[0].type) yyval.type = yyvsp[0].type;
4111 else yyval.type = yyvsp[-1].type;
4112 ;
4113 break;}
4114case 178:
4115#line 2222 "parser.y"
4116{
4117 yyval.type = yyvsp[-1].type;
4118 strcat(yyval.type->name,yyvsp[0].id);
4119 ;
4120 break;}
4121case 179:
4122#line 2226 "parser.y"
4123{
4124 yyval.type = yyvsp[0].type;
4125 yyval.type->qualifier = new char[6];
4126 strcpy(yyval.type->qualifier,"const");
4127 ;
4128 break;}
4129case 180:
4130#line 2231 "parser.y"
4131{
4132 yyval.type = new DataType;
4133 sprintf(yyval.type->name,"%s %s",yyvsp[-1].id, yyvsp[0].id);
4134 yyval.type->type = T_USER;
4135 ;
4136 break;}
4137case 181:
4138#line 2240 "parser.y"
4139{
4140 yyval.type = (DataType *) 0;
4141 ;
4142 break;}
4143case 182:
4144#line 2243 "parser.y"
4145{
4146 yyval.type = yyvsp[0].type;
4147 yyval.type->type = T_INT;
4148 sprintf(temp_name,"signed %s",yyvsp[0].type->name);
4149 strcpy(yyval.type->name,temp_name);
4150 ;
4151 break;}
4152case 183:
4153#line 2249 "parser.y"
4154{
4155 yyval.type = yyvsp[-1].type;
4156 yyval.type->type = T_SHORT;
4157 sprintf(temp_name,"signed %s",yyvsp[-1].type->name);
4158 strcpy(yyval.type->name,temp_name);
4159 ;
4160 break;}
4161case 184:
4162#line 2255 "parser.y"
4163{
4164 yyval.type = yyvsp[-1].type;
4165 yyval.type->type = T_LONG;
4166 sprintf(temp_name,"signed %s",yyvsp[-1].type->name);
4167 strcpy(yyval.type->name,temp_name);
4168 ;
4169 break;}
4170case 185:
4171#line 2261 "parser.y"
4172{
4173 yyval.type = yyvsp[0].type;
4174 yyval.type->type = T_SCHAR;
4175 sprintf(temp_name,"signed %s",yyvsp[0].type->name);
4176 strcpy(yyval.type->name,temp_name);
4177 ;
4178 break;}
4179case 186:
4180#line 2271 "parser.y"
4181{
4182 yyval.type = (DataType *) 0;
4183 ;
4184 break;}
4185case 187:
4186#line 2274 "parser.y"
4187{
4188 yyval.type = yyvsp[0].type;
4189 yyval.type->type = T_UINT;
4190 sprintf(temp_name,"unsigned %s",yyvsp[0].type->name);
4191 strcpy(yyval.type->name,temp_name);
4192 ;
4193 break;}
4194case 188:
4195#line 2280 "parser.y"
4196{
4197 yyval.type = yyvsp[-1].type;
4198 yyval.type->type = T_USHORT;
4199 sprintf(temp_name,"unsigned %s",yyvsp[-1].type->name);
4200 strcpy(yyval.type->name,temp_name);
4201 ;
4202 break;}
4203case 189:
4204#line 2286 "parser.y"
4205{
4206 yyval.type = yyvsp[-1].type;
4207 yyval.type->type = T_ULONG;
4208 sprintf(temp_name,"unsigned %s",yyvsp[-1].type->name);
4209 strcpy(yyval.type->name,temp_name);
4210 ;
4211 break;}
4212case 190:
4213#line 2292 "parser.y"
4214{
4215 yyval.type = yyvsp[0].type;
4216 yyval.type->type = T_UCHAR;
4217 sprintf(temp_name,"unsigned %s",yyvsp[0].type->name);
4218 strcpy(yyval.type->name,temp_name);
4219 ;
4220 break;}
4221case 191:
4222#line 2300 "parser.y"
4223{ ;
4224 break;}
4225case 192:
4226#line 2301 "parser.y"
4227{ ;
4228 break;}
4229case 193:
4230#line 2304 "parser.y"
4231{ scanner_check_typedef(); ;
4232 break;}
4233case 194:
4234#line 2304 "parser.y"
4235{
4236 yyval.dtype = yyvsp[0].dtype;
4237 scanner_ignore_typedef();
4238 if (ConstChar) delete ConstChar;
4239 ConstChar = 0;
4240 ;
4241 break;}
4242case 195:
4243#line 2310 "parser.y"
4244{
4245 yyval.dtype.id = yyvsp[0].id;
4246 yyval.dtype.type = T_CHAR;
4247 if (ConstChar) delete ConstChar;
4248 ConstChar = new char[strlen(yyvsp[0].id)+3];
4249 sprintf(ConstChar,"\"%s\"",yyvsp[0].id);
4250 ;
4251 break;}
4252case 196:
4253#line 2317 "parser.y"
4254{
4255 yyval.dtype.id = yyvsp[0].id;
4256 yyval.dtype.type = T_CHAR;
4257 if (ConstChar) delete ConstChar;
4258 ConstChar = new char[strlen(yyvsp[0].id)+3];
4259 sprintf(ConstChar,"'%s'",yyvsp[0].id);
4260 ;
4261 break;}
4262case 197:
4263#line 2329 "parser.y"
4264{
4265 yyval.ilist = yyvsp[-2].ilist;
4266 yyval.ilist.names[yyval.ilist.count] = copy_string(yyvsp[0].id);
4267 yyval.ilist.count++;
4268 yyval.ilist.names[yyval.ilist.count] = (char *) 0;
4269 ;
4270 break;}
4271case 198:
4272#line 2335 "parser.y"
4273{
4274 yyval.ilist.names = new char *[NI_NAMES];
4275 yyval.ilist.count = 0;
4276 for (i = 0; i < NI_NAMES; i++)
4277 yyval.ilist.names[i] = (char *) 0;
4278 ;
4279 break;}
4280case 199:
4281#line 2345 "parser.y"
4282{ yyval.id = yyvsp[0].id; ;
4283 break;}
4284case 200:
4285#line 2346 "parser.y"
4286{ yyval.id = (char *) 0;;
4287 break;}
4288case 201:
4289#line 2352 "parser.y"
4290{;
4291 break;}
4292case 202:
4293#line 2353 "parser.y"
4294{;
4295 break;}
4296case 203:
4297#line 2357 "parser.y"
4298{
4299 temp_typeptr = new DataType(T_INT);
4300 create_constant(yyvsp[0].id, temp_typeptr, yyvsp[0].id);
4301 delete temp_typeptr;
4302 ;
4303 break;}
4304case 204:
4305#line 2362 "parser.y"
4306{ scanner_check_typedef();;
4307 break;}
4308case 205:
4309#line 2362 "parser.y"
4310{
4311 temp_typeptr = new DataType(yyvsp[0].dtype.type);
4312// Use enum name instead of value
4313// OLD create_constant($1, temp_typeptr, $4.id);
4314 create_constant(yyvsp[-3].id, temp_typeptr, yyvsp[-3].id);
4315 delete temp_typeptr;
4316 ;
4317 break;}
4318case 206:
4319#line 2369 "parser.y"
4320{ ;
4321 break;}
4322case 207:
4323#line 2370 "parser.y"
4324{ ;
4325 break;}
4326case 208:
4327#line 2373 "parser.y"
4328{
4329 yyval.dtype = yyvsp[0].dtype;
4330 if ((yyval.dtype.type != T_INT) && (yyval.dtype.type != T_UINT) &&
4331 (yyval.dtype.type != T_LONG) && (yyval.dtype.type != T_ULONG) &&
4332 (yyval.dtype.type != T_SHORT) && (yyval.dtype.type != T_USHORT) &&
4333 (yyval.dtype.type != T_SCHAR) && (yyval.dtype.type != T_UCHAR)) {
4334 fprintf(stderr,"%s : Lind %d. Type error. Expecting an int\n",
4335 input_file, line_number);
4336 FatalError();
4337 }
4338
4339 ;
4340 break;}
4341case 209:
4342#line 2385 "parser.y"
4343{
4344 yyval.dtype.id = yyvsp[0].id;
4345 yyval.dtype.type = T_CHAR;
4346 ;
4347 break;}
4348case 210:
4349#line 2396 "parser.y"
4350{
4351 yyval.dtype.id = yyvsp[0].id;
4352 yyval.dtype.type = T_INT;
4353 ;
4354 break;}
4355case 211:
4356#line 2400 "parser.y"
4357{
4358 yyval.dtype.id = yyvsp[0].id;
4359 yyval.dtype.type = T_DOUBLE;
4360 ;
4361 break;}
4362case 212:
4363#line 2404 "parser.y"
4364{
4365 yyval.dtype.id = yyvsp[0].id;
4366 yyval.dtype.type = T_UINT;
4367 ;
4368 break;}
4369case 213:
4370#line 2408 "parser.y"
4371{
4372 yyval.dtype.id = yyvsp[0].id;
4373 yyval.dtype.type = T_LONG;
4374 ;
4375 break;}
4376case 214:
4377#line 2412 "parser.y"
4378{
4379 yyval.dtype.id = yyvsp[0].id;
4380 yyval.dtype.type = T_ULONG;
4381 ;
4382 break;}
4383case 215:
4384#line 2416 "parser.y"
4385{
4386 yyval.dtype.id = new char[strlen(yyvsp[-1].type->name)+9];
4387 sprintf(yyval.dtype.id,"sizeof(%s)", yyvsp[-1].type->name);
4388 yyval.dtype.type = T_INT;
4389 ;
4390 break;}
4391case 216:
4392#line 2421 "parser.y"
4393{
4394 yyval.dtype.id = new char[strlen(yyvsp[0].dtype.id)+strlen(yyvsp[-2].type->name)+3];
4395 sprintf(yyval.dtype.id,"(%s)%s",yyvsp[-2].type->name,yyvsp[0].dtype.id);
4396 yyval.dtype.type = yyvsp[-2].type->type;
4397 ;
4398 break;}
4399case 217:
4400#line 2426 "parser.y"
4401{
4402 yyval.dtype.id = lookup_symvalue(yyvsp[0].id);
4403 if (yyval.dtype.id == (char *) 0)
4404 yyval.dtype.id = yyvsp[0].id;
4405 else {
4406 yyval.dtype.id = new char[strlen(yyval.dtype.id)+3];
4407 sprintf(yyval.dtype.id,"(%s)",lookup_symvalue(yyvsp[0].id));
4408 }
4409 temp_typeptr = lookup_symtype(yyvsp[0].id);
4410 if (temp_typeptr) yyval.dtype.type = temp_typeptr->type;
4411 else yyval.dtype.type = T_INT;
4412 ;
4413 break;}
4414case 218:
4415#line 2438 "parser.y"
4416{
4417 yyval.dtype.id = new char[strlen(yyvsp[-2].id)+strlen(yyvsp[0].id)+3];
4418 sprintf(yyval.dtype.id,"%s::%s",yyvsp[-2].id,yyvsp[0].id);
4419 yyval.dtype.type = T_INT;
4420 delete yyvsp[-2].id;
4421 delete yyvsp[0].id;
4422 ;
4423 break;}
4424case 219:
4425#line 2445 "parser.y"
4426{
4427 E_BINARY(yyval.dtype.id,yyvsp[-2].dtype.id,yyvsp[0].dtype.id,"+");
4428 yyval.dtype.type = promote(yyvsp[-2].dtype.type,yyvsp[0].dtype.type);
4429 delete yyvsp[-2].dtype.id;
4430 delete yyvsp[0].dtype.id;
4431 ;
4432 break;}
4433case 220:
4434#line 2451 "parser.y"
4435{
4436 E_BINARY(yyval.dtype.id,yyvsp[-2].dtype.id,yyvsp[0].dtype.id,"-");
4437 yyval.dtype.type = promote(yyvsp[-2].dtype.type,yyvsp[0].dtype.type);
4438 delete yyvsp[-2].dtype.id;
4439 delete yyvsp[0].dtype.id;
4440 ;
4441 break;}
4442case 221:
4443#line 2457 "parser.y"
4444{
4445 E_BINARY(yyval.dtype.id,yyvsp[-2].dtype.id,yyvsp[0].dtype.id,"*");
4446 yyval.dtype.type = promote(yyvsp[-2].dtype.type,yyvsp[0].dtype.type);
4447 delete yyvsp[-2].dtype.id;
4448 delete yyvsp[0].dtype.id;
4449
4450 ;
4451 break;}
4452case 222:
4453#line 2464 "parser.y"
4454{
4455 E_BINARY(yyval.dtype.id,yyvsp[-2].dtype.id,yyvsp[0].dtype.id,"/");
4456 yyval.dtype.type = promote(yyvsp[-2].dtype.type,yyvsp[0].dtype.type);
4457 delete yyvsp[-2].dtype.id;
4458 delete yyvsp[0].dtype.id;
4459
4460 ;
4461 break;}
4462case 223:
4463#line 2471 "parser.y"
4464{
4465 E_BINARY(yyval.dtype.id,yyvsp[-2].dtype.id,yyvsp[0].dtype.id,"&");
4466 yyval.dtype.type = promote(yyvsp[-2].dtype.type,yyvsp[0].dtype.type);
4467 if ((yyvsp[-2].dtype.type == T_DOUBLE) || (yyvsp[0].dtype.type == T_DOUBLE)) {
4468 fprintf(stderr,"%s : Line %d. Type error in constant expression (expecting integers).\n", input_file, line_number);
4469 FatalError();
4470 }
4471 delete yyvsp[-2].dtype.id;
4472 delete yyvsp[0].dtype.id;
4473
4474 ;
4475 break;}
4476case 224:
4477#line 2482 "parser.y"
4478{
4479 E_BINARY(yyval.dtype.id,yyvsp[-2].dtype.id,yyvsp[0].dtype.id,"|");
4480 yyval.dtype.type = promote(yyvsp[-2].dtype.type,yyvsp[0].dtype.type);
4481 if ((yyvsp[-2].dtype.type == T_DOUBLE) || (yyvsp[0].dtype.type == T_DOUBLE)) {
4482 fprintf(stderr,"%s : Line %d. Type error in constant expression (expecting integers).\n", input_file, line_number);
4483 FatalError();
4484 }
4485 yyval.dtype.type = T_INT;
4486 delete yyvsp[-2].dtype.id;
4487 delete yyvsp[0].dtype.id;
4488
4489 ;
4490 break;}
4491case 225:
4492#line 2494 "parser.y"
4493{
4494 E_BINARY(yyval.dtype.id,yyvsp[-2].dtype.id,yyvsp[0].dtype.id,"^");
4495 yyval.dtype.type = promote(yyvsp[-2].dtype.type,yyvsp[0].dtype.type);
4496 if ((yyvsp[-2].dtype.type == T_DOUBLE) || (yyvsp[0].dtype.type == T_DOUBLE)) {
4497 fprintf(stderr,"%s : Line %d. Type error in constant expression (expecting integers).\n", input_file, line_number);
4498 FatalError();
4499 }
4500 yyval.dtype.type = T_INT;
4501 delete yyvsp[-2].dtype.id;
4502 delete yyvsp[0].dtype.id;
4503
4504 ;
4505 break;}
4506case 226:
4507#line 2506 "parser.y"
4508{
4509 E_BINARY(yyval.dtype.id,yyvsp[-2].dtype.id,yyvsp[0].dtype.id,"<<");
4510 yyval.dtype.type = promote(yyvsp[-2].dtype.type,yyvsp[0].dtype.type);
4511 if ((yyvsp[-2].dtype.type == T_DOUBLE) || (yyvsp[0].dtype.type == T_DOUBLE)) {
4512 fprintf(stderr,"%s : Line %d. Type error in constant expression (expecting integers).\n", input_file, line_number);
4513 FatalError();
4514 }
4515 yyval.dtype.type = T_INT;
4516 delete yyvsp[-2].dtype.id;
4517 delete yyvsp[0].dtype.id;
4518
4519 ;
4520 break;}
4521case 227:
4522#line 2518 "parser.y"
4523{
4524 E_BINARY(yyval.dtype.id,yyvsp[-2].dtype.id,yyvsp[0].dtype.id,">>");
4525 yyval.dtype.type = promote(yyvsp[-2].dtype.type,yyvsp[0].dtype.type);
4526 if ((yyvsp[-2].dtype.type == T_DOUBLE) || (yyvsp[0].dtype.type == T_DOUBLE)) {
4527 fprintf(stderr,"%s : Line %d. Type error in constant expression (expecting integers).\n", input_file, line_number);
4528 FatalError();
4529 }
4530 yyval.dtype.type = T_INT;
4531 delete yyvsp[-2].dtype.id;
4532 delete yyvsp[0].dtype.id;
4533
4534 ;
4535 break;}
4536case 228:
4537#line 2530 "parser.y"
4538{
4539 yyval.dtype.id = new char[strlen(yyvsp[0].dtype.id)+2];
4540 sprintf(yyval.dtype.id,"-%s",yyvsp[0].dtype.id);
4541 yyval.dtype.type = yyvsp[0].dtype.type;
4542 delete yyvsp[0].dtype.id;
4543
4544 ;
4545 break;}
4546case 229:
4547#line 2537 "parser.y"
4548{
4549 yyval.dtype.id = new char[strlen(yyvsp[0].dtype.id)+2];
4550 sprintf(yyval.dtype.id,"~%s",yyvsp[0].dtype.id);
4551 if (yyvsp[0].dtype.type == T_DOUBLE) {
4552 fprintf(stderr,"%s : Line %d. Type error in constant expression (expecting integers).\n", input_file, line_number);
4553 FatalError();
4554 }
4555 yyval.dtype.type = yyvsp[0].dtype.type;
4556 delete yyvsp[0].dtype.id;
4557 ;
4558 break;}
4559case 230:
4560#line 2547 "parser.y"
4561{
4562 yyval.dtype.id = new char[strlen(yyvsp[-1].dtype.id)+3];
4563 sprintf(yyval.dtype.id,"(%s)", yyvsp[-1].dtype.id);
4564 yyval.dtype.type = yyvsp[-1].dtype.type;
4565 delete yyvsp[-1].dtype.id;
4566 ;
4567 break;}
4568case 231:
4569#line 2558 "parser.y"
4570{ ;
4571 break;}
4572case 232:
4573#line 2559 "parser.y"
4574{;
4575 break;}
4576case 233:
4577#line 2565 "parser.y"
4578{
4579 char *iname;
4580 if (allow) {
4581 init_language();
4582 DataType::new_scope();
4583
4584 sprintf(temp_name,"CPP_CLASS:%s\n",yyvsp[-2].id);
4585 if (add_symbol(temp_name, (DataType *) 0, (char *) 0)) {
4586 fprintf(stderr,"%s : Line %d. Error. %s %s is multiply defined.\n", input_file, line_number, yyvsp[-3].id, yyvsp[-2].id);
4587 FatalError();
4588 }
4589 if ((!CPlusPlus) && (strcmp(yyvsp[-3].id,"class") == 0))
4590 fprintf(stderr,"%s : Line %d. *** WARNING ***. C++ mode is disabled (enable using -c++)\n", input_file, line_number);
4591
4592 iname = make_name(yyvsp[-2].id);
4593 doc_entry = new DocClass(iname, doc_parent());
4594 if (iname == yyvsp[-2].id)
4595 cplus_open_class(yyvsp[-2].id, 0, yyvsp[-3].id);
4596 else
4597 cplus_open_class(yyvsp[-2].id, iname, yyvsp[-3].id);
4598 if (strcmp(yyvsp[-3].id,"class") == 0)
4599 cplus_mode = CPLUS_PRIVATE;
4600 else
4601 cplus_mode = CPLUS_PUBLIC;
4602 doc_stack_top++;
4603 doc_stack[doc_stack_top] = doc_entry;
4604 scanner_clear_start();
4605 nested_list = 0;
4606 // Merge in scope from base classes
4607 cplus_inherit_scope(yyvsp[-1].ilist.count,yyvsp[-1].ilist.names);
4608 }
4609 ;
4610 break;}
4611case 234:
4612#line 2596 "parser.y"
4613{
4614 if (allow) {
4615 if (yyvsp[-4].ilist.names) {
4616 if (strcmp(yyvsp[-6].id,"union") != 0)
4617 cplus_inherit(yyvsp[-4].ilist.count, yyvsp[-4].ilist.names);
4618 else {
4619 fprintf(stderr,"%s : Line %d. Inheritance not allowed for unions.\n",input_file, line_number);
4620 FatalError();
4621 }
4622 }
4623 // Clean up the inheritance list
4624 if (yyvsp[-4].ilist.names) {
4625 int j;
4626 for (j = 0; j < yyvsp[-4].ilist.count; j++) {
4627 if (yyvsp[-4].ilist.names[j]) delete [] yyvsp[-4].ilist.names[j];
4628 }
4629 delete [] yyvsp[-4].ilist.names;
4630 }
4631
4632 // Dumped nested declarations (if applicable)
4633 dump_nested(yyvsp[-5].id);
4634
4635 // Save and collapse current scope
4636 cplus_register_scope(DataType::collapse_scope(yyvsp[-5].id));
4637
4638 // Restore the original doc entry for this class
4639 doc_entry = doc_stack[doc_stack_top];
4640 cplus_class_close((char *) 0);
4641 doc_entry = 0;
4642 // Bump the documentation stack back down
4643 doc_stack_top--;
4644 cplus_mode = CPLUS_PUBLIC;
4645 }
4646 ;
4647 break;}
4648case 235:
4649#line 2633 "parser.y"
4650{
4651 if (allow) {
4652 char *iname;
4653 init_language();
4654 DataType::new_scope();
4655
4656 sprintf(temp_name,"CPP_CLASS:%s\n",yyvsp[-2].id);
4657 if (add_symbol(temp_name, (DataType *) 0, (char *) 0)) {
4658 fprintf(stderr,"%s : Line %d. Error. %s %s is multiply defined.\n", input_file, line_number, yyvsp[-3].id, yyvsp[-2].id);
4659 FatalError();
4660 }
4661 if ((!CPlusPlus) && (strcmp(yyvsp[-3].id,"class") == 0))
4662 fprintf(stderr,"%s : Line %d. *** WARNING ***. C++ mode is disabled (enable using -c++)\n", input_file, line_number);
4663
4664 iname = make_name(yyvsp[-2].id);
4665 doc_entry = new DocClass(iname, doc_parent());
4666 if (yyvsp[-2].id == iname)
4667 cplus_open_class(yyvsp[-2].id, 0, yyvsp[-3].id);
4668 else
4669 cplus_open_class(yyvsp[-2].id, iname, yyvsp[-3].id);
4670 if (strcmp(yyvsp[-3].id,"class") == 0)
4671 cplus_mode = CPLUS_PRIVATE;
4672 else
4673 cplus_mode = CPLUS_PUBLIC;
4674 // Create a documentation entry for the class
4675 doc_stack_top++;
4676 doc_stack[doc_stack_top] = doc_entry;
4677 scanner_clear_start();
4678 nested_list = 0;
4679
4680 // Merge in scope from base classes
4681 cplus_inherit_scope(yyvsp[-1].ilist.count,yyvsp[-1].ilist.names);
4682
4683 }
4684 ;
4685 break;}
4686case 236:
4687#line 2667 "parser.y"
4688{
4689 if (allow) {
4690 if (yyvsp[-5].ilist.names) {
4691 if (strcmp(yyvsp[-7].id,"union") != 0)
4692 cplus_inherit(yyvsp[-5].ilist.count, yyvsp[-5].ilist.names);
4693 else {
4694 fprintf(stderr,"%s : Line %d. Inheritance not allowed for unions.\n",input_file, line_number);
4695 FatalError();
4696 }
4697 }
4698 // Create a datatype for correctly processing the typedef
4699 Active_typedef = new DataType();
4700 Active_typedef->type = T_USER;
4701 sprintf(Active_typedef->name,"%s %s", yyvsp[-7].id,yyvsp[-6].id);
4702 Active_typedef->is_pointer = 0;
4703 Active_typedef->implicit_ptr = 0;
4704
4705 // Clean up the inheritance list
4706 if (yyvsp[-5].ilist.names) {
4707 int j;
4708 for (j = 0; j < yyvsp[-5].ilist.count; j++) {
4709 if (yyvsp[-5].ilist.names[j]) delete [] yyvsp[-5].ilist.names[j];
4710 }
4711 delete [] yyvsp[-5].ilist.names;
4712 }
4713
4714 if (yyvsp[0].decl.is_pointer > 0) {
4715 fprintf(stderr,"%s : Line %d. typedef struct { } *id not supported properly. Winging it...\n", input_file, line_number);
4716
4717 }
4718 // Create dump nested class code
4719 if (yyvsp[0].decl.is_pointer > 0) {
4720 dump_nested(yyvsp[-6].id);
4721 } else {
4722 dump_nested(yyvsp[0].decl.id);
4723 }
4724
4725 // Collapse any datatypes created in the the class
4726
4727 cplus_register_scope(DataType::collapse_scope(yyvsp[-6].id));
4728
4729 doc_entry = doc_stack[doc_stack_top];
4730 if (yyvsp[0].decl.is_pointer > 0) {
4731 cplus_class_close(yyvsp[-6].id);
4732 } else {
4733 cplus_class_close(yyvsp[0].decl.id);
4734 }
4735 doc_stack_top--;
4736 doc_entry = 0;
4737
4738 // Create a typedef in global scope
4739
4740 if (yyvsp[0].decl.is_pointer == 0)
4741 Active_typedef->typedef_add(yyvsp[0].decl.id);
4742 else {
4743 DataType *t = new DataType(Active_typedef);
4744 t->is_pointer += yyvsp[0].decl.is_pointer;
4745 t->typedef_add(yyvsp[0].decl.id);
4746 cplus_register_type(yyvsp[0].decl.id);
4747 delete t;
4748 }
4749 cplus_mode = CPLUS_PUBLIC;
4750 }
4751 ;
4752 break;}
4753case 237:
4754#line 2730 "parser.y"
4755{ ;
4756 break;}
4757case 238:
4758#line 2734 "parser.y"
4759{
4760 char *iname;
4761 if (allow) {
4762 init_language();
4763 DataType::new_scope();
4764 if ((!CPlusPlus) && (strcmp(yyvsp[-1].id,"class") == 0))
4765 fprintf(stderr,"%s : Line %d. *** WARNING ***. C++ mode is disabled (enable using -c++)\n", input_file, line_number);
4766
4767 iname = make_name("");
4768 doc_entry = new DocClass(iname,doc_parent());
4769 if (strlen(iname))
4770 cplus_open_class("", iname, yyvsp[-1].id);
4771 else
4772 cplus_open_class("",0,yyvsp[-1].id);
4773 if (strcmp(yyvsp[-1].id,"class") == 0)
4774 cplus_mode = CPLUS_PRIVATE;
4775 else
4776 cplus_mode = CPLUS_PUBLIC;
4777 doc_stack_top++;
4778 doc_stack[doc_stack_top] = doc_entry;
4779 scanner_clear_start();
4780 nested_list = 0;
4781 }
4782 ;
4783 break;}
4784case 239:
4785#line 2757 "parser.y"
4786{
4787 if (allow) {
4788 if (yyvsp[0].decl.is_pointer > 0) {
4789 fprintf(stderr,"%s : Line %d. typedef %s {} *%s not supported correctly. Will be ignored.\n", input_file, line_number, yyvsp[-5].id, yyvsp[0].decl.id);
4790 cplus_abort();
4791 } else {
4792 sprintf(temp_name,"CPP_CLASS:%s\n",yyvsp[0].decl.id);
4793 if (add_symbol(temp_name, (DataType *) 0, (char *) 0)) {
4794 fprintf(stderr,"%s : Line %d. Error. %s %s is multiply defined.\n", input_file, line_number, yyvsp[-5].id, yyvsp[0].decl.id);
4795 FatalError();
4796 }
4797 }
4798 // Create a datatype for correctly processing the typedef
4799 Active_typedef = new DataType();
4800 Active_typedef->type = T_USER;
4801 sprintf(Active_typedef->name,"%s",yyvsp[0].decl.id);
4802 Active_typedef->is_pointer = 0;
4803 Active_typedef->implicit_ptr = 0;
4804
4805 // Dump nested classes
4806 if (yyvsp[0].decl.is_pointer == 0)
4807 dump_nested(yyvsp[0].decl.id);
4808
4809 // Go back to previous scope
4810
4811 cplus_register_scope(DataType::collapse_scope((char *) 0));
4812
4813 doc_entry = doc_stack[doc_stack_top];
4814 // Change name of doc_entry
4815 doc_entry->name = copy_string(yyvsp[0].decl.id);
4816 if (yyvsp[0].decl.is_pointer == 0)
4817 cplus_class_close(yyvsp[0].decl.id);
4818 doc_entry = 0;
4819 doc_stack_top--;
4820 cplus_mode = CPLUS_PUBLIC;
4821 }
4822 ;
4823 break;}
4824case 240:
4825#line 2793 "parser.y"
4826{ ;
4827 break;}
4828case 241:
4829#line 2798 "parser.y"
4830{
4831 char *iname;
4832 if (allow) {
4833 init_language();
4834 iname = make_name(yyvsp[-1].id);
4835 lang->cpp_class_decl(yyvsp[-1].id,iname,yyvsp[-2].id);
4836 }
4837 ;
4838 break;}
4839case 242:
4840#line 2809 "parser.y"
4841{
4842 if (allow) {
4843 init_language();
4844 if (!CPlusPlus)
4845 fprintf(stderr,"%s : Line %d. *** WARNING ***. C++ mode is disabled (enable using -c++)\n", input_file, line_number);
4846
4847 yyvsp[-7].type->is_pointer += yyvsp[-6].decl.is_pointer;
4848 yyvsp[-7].type->is_reference = yyvsp[-6].decl.is_reference;
4849 // Fix up the function name
4850 sprintf(temp_name,"%s::%s",yyvsp[-6].decl.id,yyvsp[-4].id);
4851 if (!Rename_true) {
4852 Rename_true = 1;
4853 sprintf(yy_rename,"%s_%s",yyvsp[-6].decl.id,yyvsp[-4].id);
4854 }
4855 create_function(yyvsp[-8].ivalue, temp_name, yyvsp[-7].type, yyvsp[-2].pl);
4856 }
4857 delete yyvsp[-7].type;
4858 delete yyvsp[-2].pl;
4859 ;
4860 break;}
4861case 243:
4862#line 2830 "parser.y"
4863{
4864 if (allow) {
4865 init_language();
4866 if (!CPlusPlus)
4867 fprintf(stderr,"%s : Line %d. *** WARNING ***. C++ mode is disabled (enable using -c++)\n", input_file, line_number);
4868
4869 yyvsp[-4].type->is_pointer += yyvsp[-3].decl.is_pointer;
4870 // Fix up the function name
4871 sprintf(temp_name,"%s::%s",yyvsp[-3].decl.id,yyvsp[-1].id);
4872 if (!Rename_true) {
4873 Rename_true = 1;
4874 sprintf(yy_rename,"%s_%s",yyvsp[-3].decl.id,yyvsp[-1].id);
4875 }
4876 create_variable(yyvsp[-5].ivalue,temp_name, yyvsp[-4].type);
4877 }
4878 delete yyvsp[-4].type;
4879 ;
4880 break;}
4881case 244:
4882#line 2850 "parser.y"
4883{
4884 fprintf(stderr,"%s : Line %d. Operator overloading not supported (ignored).\n", input_file, line_number);
4885 skip_decl();
4886 delete yyvsp[-3].type;
4887 ;
4888 break;}
4889case 245:
4890#line 2858 "parser.y"
4891{
4892 fprintf(stderr,"%s : Line %d. Templates not currently supported (ignored).\n",
4893 input_file, line_number);
4894 skip_decl();
4895 ;
4896 break;}
4897case 246:
4898#line 2866 "parser.y"
4899{
4900 cplus_mode = CPLUS_PUBLIC;
4901 doc_entry = cplus_set_class(yyvsp[-1].id);
4902 if (!doc_entry) {
4903 doc_entry = new DocClass(yyvsp[-1].id,doc_parent());
4904 };
4905 doc_stack_top++;
4906 doc_stack[doc_stack_top] = doc_entry;
4907 scanner_clear_start();
4908 AddMethods = 1;
4909 ;
4910 break;}
4911case 247:
4912#line 2876 "parser.y"
4913{
4914 cplus_unset_class();
4915 doc_entry = 0;
4916 doc_stack_top--;
4917 AddMethods = 0;
4918 ;
4919 break;}
4920case 248:
4921#line 2884 "parser.y"
4922{ ;
4923 break;}
4924case 249:
4925#line 2885 "parser.y"
4926{ ;
4927 break;}
4928case 250:
4929#line 2886 "parser.y"
4930{ ;
4931 break;}
4932case 251:
4933#line 2889 "parser.y"
4934{;
4935 break;}
4936case 252:
4937#line 2890 "parser.y"
4938{
4939 AddMethods = 1;
4940 ;
4941 break;}
4942case 253:
4943#line 2892 "parser.y"
4944{
4945 AddMethods = 0;
4946 ;
4947 break;}
4948case 254:
4949#line 2894 "parser.y"
4950{ ;
4951 break;}
4952case 255:
4953#line 2895 "parser.y"
4954{
4955 skip_decl();
4956 {
4957 static int last_error_line = -1;
4958 if (last_error_line != line_number) {
4959 fprintf(stderr,"%s : Line %d. Syntax error in input.\n", input_file, line_number);
4960 FatalError();
4961 last_error_line = line_number;
4962 }
4963 }
4964 ;
4965 break;}
4966case 256:
4967#line 2905 "parser.y"
4968{ ;
4969 break;}
4970case 257:
4971#line 2906 "parser.y"
4972{ ;
4973 break;}
4974case 258:
4975#line 2909 "parser.y"
4976{
4977 char *iname;
4978 if (allow) {
4979 init_language();
4980 if (cplus_mode == CPLUS_PUBLIC) {
4981 Stat_func++;
4982 yyvsp[-5].type->is_pointer += yyvsp[-4].decl.is_pointer;
4983 yyvsp[-5].type->is_reference = yyvsp[-4].decl.is_reference;
4984 if (Verbose) {
4985 fprintf(stderr,"Wrapping member function : %s\n",yyvsp[-4].decl.id);
4986 }
4987 iname = make_name(yyvsp[-4].decl.id);
4988 doc_entry = new DocDecl(iname,doc_stack[doc_stack_top]);
4989 if (iname == yyvsp[-4].decl.id) iname = 0;
4990 cplus_member_func(yyvsp[-4].decl.id, iname, yyvsp[-5].type,yyvsp[-2].pl,0);
4991 }
4992 scanner_clear_start();
4993 }
4994 delete yyvsp[-5].type;
4995 delete yyvsp[-2].pl;
4996 ;
4997 break;}
4998case 259:
4999#line 2933 "parser.y"
5000{
5001 char *iname;
5002 if (allow) {
5003 init_language();
5004 if (cplus_mode == CPLUS_PUBLIC) {
5005 Stat_func++;
5006 yyvsp[-5].type->is_pointer += yyvsp[-4].decl.is_pointer;
5007 yyvsp[-5].type->is_reference = yyvsp[-4].decl.is_reference;
5008 if (Verbose) {
5009 fprintf(stderr,"Wrapping virtual member function : %s\n",yyvsp[-4].decl.id);
5010 }
5011 iname = make_name(yyvsp[-4].decl.id);
5012 doc_entry = new DocDecl(iname,doc_stack[doc_stack_top]);
5013 if (iname == yyvsp[-4].decl.id) iname = 0;
5014 cplus_member_func(yyvsp[-4].decl.id,iname,yyvsp[-5].type,yyvsp[-2].pl,1);
5015 }
5016 scanner_clear_start();
5017 }
5018 delete yyvsp[-5].type;
5019 delete yyvsp[-2].pl;
5020 ;
5021 break;}
5022case 260:
5023#line 2956 "parser.y"
5024{
5025 char *iname;
5026 if (allow) {
5027 init_language();
5028 if (cplus_mode == CPLUS_PUBLIC) {
5029 Stat_func++;
5030 if (Verbose) {
5031 fprintf(stderr,"Wrapping C++ constructor %s\n", yyvsp[-4].id);
5032 }
5033 iname = make_name(yyvsp[-4].id);
5034 doc_entry = new DocDecl(iname,doc_stack[doc_stack_top]);
5035 if (iname == yyvsp[-4].id) iname = 0;
5036 cplus_constructor(yyvsp[-4].id,iname, yyvsp[-2].pl);
5037 }
5038 scanner_clear_start();
5039 }
5040 delete yyvsp[-2].pl;
5041 ;
5042 break;}
5043case 261:
5044#line 2977 "parser.y"
5045{
5046 char *iname;
5047 if (allow) {
5048 init_language();
5049 if (cplus_mode == CPLUS_PUBLIC) {
5050 Stat_func++;
5051 if (Verbose) {
5052 fprintf(stderr,"Wrapping C++ destructor %s\n", yyvsp[-4].id);
5053 }
5054 iname = make_name(yyvsp[-4].id);
5055 doc_entry = new DocDecl(iname,doc_stack[doc_stack_top]);
5056 if (iname == yyvsp[-4].id) iname = 0;
5057 cplus_destructor(yyvsp[-4].id,iname);
5058 }
5059 }
5060 scanner_clear_start();
5061 ;
5062 break;}
5063case 262:
5064#line 2997 "parser.y"
5065{
5066 char *iname;
5067 if (allow) {
5068 init_language();
5069 if (cplus_mode == CPLUS_PUBLIC) {
5070 Stat_func++;
5071 if (Verbose) {
5072 fprintf(stderr,"Wrapping C++ destructor %s\n", yyvsp[-3].id);
5073 }
5074 iname = make_name(yyvsp[-3].id);
5075 doc_entry = new DocDecl(iname,doc_stack[doc_stack_top]);
5076 if (iname == yyvsp[-3].id) iname = 0;
5077 cplus_destructor(yyvsp[-3].id,iname);
5078 }
5079 }
5080 scanner_clear_start();
5081 ;
5082 break;}
5083case 263:
5084#line 3017 "parser.y"
5085{
5086 if (allow) {
5087 char *iname;
5088 init_language();
5089 if (cplus_mode == CPLUS_PUBLIC) {
5090 if (Active_type) delete Active_type;
5091 Active_type = new DataType(yyvsp[-2].type);
5092 yyvsp[-2].type->is_pointer += yyvsp[-1].decl.is_pointer;
5093 yyvsp[-2].type->is_reference = yyvsp[-1].decl.is_reference;
5094 if (yyvsp[-2].type->qualifier) {
5095 if ((strcmp(yyvsp[-2].type->qualifier,"const") == 0) && (yyvsp[-2].type->is_pointer == 0)) {
5096 // Okay. This is really some sort of C++ constant here.
5097 if (yyvsp[0].dtype.type != T_ERROR) {
5098 iname = make_name(yyvsp[-1].decl.id);
5099 doc_entry = new DocDecl(iname,doc_stack[doc_stack_top]);
5100 if (iname == yyvsp[-1].decl.id) iname = 0;
5101 cplus_declare_const(yyvsp[-1].decl.id,iname, yyvsp[-2].type, yyvsp[0].dtype.id);
5102 }
5103 } else {
5104 int oldstatus = Status;
5105 char *tm;
5106 if (yyvsp[-2].type->status & STAT_READONLY) {
5107 if (!(tm = typemap_lookup("memberin",typemap_lang,yyvsp[-2].type,yyvsp[-1].decl.id,"","")))
5108 Status = Status | STAT_READONLY;
5109 }
5110 iname = make_name(yyvsp[-1].decl.id);
5111 doc_entry = new DocDecl(iname,doc_stack[doc_stack_top]);
5112 if (iname == yyvsp[-1].decl.id) iname = 0;
5113 cplus_variable(yyvsp[-1].decl.id,iname,yyvsp[-2].type);
5114 Status = oldstatus;
5115 }
5116 } else {
5117 char *tm = 0;
5118 int oldstatus = Status;
5119 if (yyvsp[-2].type->status & STAT_READONLY) {
5120 if (!(tm = typemap_lookup("memberin",typemap_lang,yyvsp[-2].type,yyvsp[-1].decl.id,"","")))
5121 Status = Status | STAT_READONLY;
5122 }
5123 iname = make_name(yyvsp[-1].decl.id);
5124 doc_entry = new DocDecl(iname,doc_stack[doc_stack_top]);
5125 if (iname == yyvsp[-1].decl.id) iname = 0;
5126 cplus_variable(yyvsp[-1].decl.id,iname,yyvsp[-2].type);
5127 Status = oldstatus;
5128 if (Verbose) {
5129 fprintf(stderr,"Wrapping member data %s\n", yyvsp[-1].decl.id);
5130 }
5131 }
5132 }
5133 scanner_clear_start();
5134 }
5135 delete yyvsp[-2].type;
5136 ;
5137 break;}
5138case 264:
5139#line 3068 "parser.y"
5140{ ;
5141 break;}
5142case 265:
5143#line 3070 "parser.y"
5144{
5145 char *iname;
5146 if (allow) {
5147 int oldstatus = Status;
5148 char *tm = 0;
5149 init_language();
5150 if (cplus_mode == CPLUS_PUBLIC) {
5151 if (Active_type) delete Active_type;
5152 Active_type = new DataType(yyvsp[-3].type);
5153 yyvsp[-3].type->is_pointer += yyvsp[-2].decl.is_pointer + 1;
5154 yyvsp[-3].type->is_reference = yyvsp[-2].decl.is_reference;
5155 yyvsp[-3].type->arraystr = copy_string(ArrayString);
5156 if (!(tm = typemap_lookup("memberin",typemap_lang,yyvsp[-3].type,yyvsp[-2].decl.id,"","")))
5157 Status = STAT_READONLY;
5158
5159 iname = make_name(yyvsp[-2].decl.id);
5160 doc_entry = new DocDecl(iname, doc_stack[doc_stack_top]);
5161 if (iname == yyvsp[-2].decl.id) iname = 0;
5162 cplus_variable(yyvsp[-2].decl.id,iname,yyvsp[-3].type);
5163 Status = oldstatus;
5164 if (!tm)
5165 fprintf(stderr,"%s : Line %d. Warning. Array member will be read-only.\n",input_file,line_number);
5166 }
5167 scanner_clear_start();
5168 }
5169 delete yyvsp[-3].type;
5170 ;
5171 break;}
5172case 266:
5173#line 3101 "parser.y"
5174{
5175 char *iname;
5176 if (allow) {
5177 init_language();
5178 if (cplus_mode == CPLUS_PUBLIC) {
5179 yyvsp[-1].type->is_pointer += yyvsp[0].decl.is_pointer;
5180 iname = make_name(yyvsp[0].decl.id);
5181 doc_entry = new DocDecl(iname,doc_stack[doc_stack_top]);
5182 if (iname == yyvsp[0].decl.id) iname = 0;
5183 cplus_static_var(yyvsp[0].decl.id,iname,yyvsp[-1].type);
5184 if (Active_type) delete Active_type;
5185 Active_type = new DataType(yyvsp[-1].type);
5186 if (Verbose) {
5187 fprintf(stderr,"Wrapping static member data %s\n", yyvsp[0].decl.id);
5188 }
5189 }
5190 scanner_clear_start();
5191 }
5192 delete yyvsp[-1].type;
5193 ;
5194 break;}
5195case 267:
5196#line 3120 "parser.y"
5197{ ;
5198 break;}
5199case 268:
5200#line 3124 "parser.y"
5201{
5202 char *iname;
5203 if (allow) {
5204 yyvsp[-5].type->is_pointer += yyvsp[-4].decl.is_pointer;
5205 yyvsp[-5].type->is_reference = yyvsp[-4].decl.is_reference;
5206 if (cplus_mode == CPLUS_PUBLIC) {
5207 iname = make_name(yyvsp[-4].decl.id);
5208 doc_entry = new DocDecl(iname,doc_stack[doc_stack_top]);
5209 if (iname == yyvsp[-4].decl.id) iname = 0;
5210 cplus_static_func(yyvsp[-4].decl.id, iname, yyvsp[-5].type, yyvsp[-2].pl);
5211 if (Verbose)
5212 fprintf(stderr,"Wrapping static member function %s\n",yyvsp[-4].decl.id);
5213 }
5214 scanner_clear_start();
5215 }
5216 delete yyvsp[-5].type;
5217 delete yyvsp[-2].pl;
5218 ;
5219 break;}
5220case 269:
5221#line 3144 "parser.y"
5222{
5223 if (allow) {
5224 cplus_mode = CPLUS_PUBLIC;
5225 if (Verbose)
5226 fprintf(stderr,"Public mode\n");
5227 scanner_clear_start();
5228 }
5229 ;
5230 break;}
5231case 270:
5232#line 3155 "parser.y"
5233{
5234 if (allow) {
5235 cplus_mode = CPLUS_PRIVATE;
5236 if (Verbose)
5237 fprintf(stderr,"Private mode\n");
5238 scanner_clear_start();
5239 }
5240 ;
5241 break;}
5242case 271:
5243#line 3166 "parser.y"
5244{
5245 if (allow) {
5246 cplus_mode = CPLUS_PROTECTED;
5247 if (Verbose)
5248 fprintf(stderr,"Protected mode\n");
5249 scanner_clear_start();
5250 }
5251 ;
5252 break;}
5253case 272:
5254#line 3177 "parser.y"
5255{
5256 if (allow) {
5257 strcpy(yy_rename,yyvsp[-1].id);
5258 Rename_true = 1;
5259 }
5260 ;
5261 break;}
5262case 273:
5263#line 3185 "parser.y"
5264{
5265 NewObject = 1;
5266 ;
5267 break;}
5268case 274:
5269#line 3187 "parser.y"
5270{
5271 NewObject = 0;
5272 ;
5273 break;}
5274case 275:
5275#line 3192 "parser.y"
5276{scanner_clear_start();;
5277 break;}
5278case 276:
5279#line 3192 "parser.y"
5280{
5281
5282 // if ename was supplied. Install it as a new integer datatype.
5283
5284 if (allow) {
5285 init_language();
5286 if (cplus_mode == CPLUS_PUBLIC) {
5287 if (yyvsp[-5].id) {
5288 cplus_register_type(yyvsp[-5].id);
5289 temp_type.type = T_INT;
5290 temp_type.is_pointer = 0;
5291 temp_type.implicit_ptr = 0;
5292 sprintf(temp_type.name,"int");
5293 temp_type.typedef_add(yyvsp[-5].id,1);
5294 }
5295 }
5296 }
5297 ;
5298 break;}
5299case 277:
5300#line 3210 "parser.y"
5301{
5302 if (allow)
5303 Status = Status | STAT_READONLY;
5304 scanner_clear_start();
5305 ;
5306 break;}
5307case 278:
5308#line 3215 "parser.y"
5309{
5310 if (allow)
5311 Status = Status & ~(STAT_READONLY);
5312 scanner_clear_start();
5313 ;
5314 break;}
5315case 279:
5316#line 3221 "parser.y"
5317{
5318 if (allow)
5319 fprintf(stderr,"%s : Line %d. Friends are not allowed--members only! (ignored)\n", input_file, line_number);
5320 skip_decl();
5321 scanner_clear_start();
5322 ;
5323 break;}
5324case 280:
5325#line 3229 "parser.y"
5326{
5327 if (allow)
5328 fprintf(stderr,"%s : Line %d. Operator overloading not supported (ignored).\n", input_file, line_number);
5329 skip_decl();
5330 scanner_clear_start();
5331 ;
5332 break;}
5333case 281:
5334#line 3235 "parser.y"
5335{
5336 scanner_clear_start();
5337 ;
5338 break;}
5339case 282:
5340#line 3240 "parser.y"
5341{ ;
5342 break;}
5343case 283:
5344#line 3244 "parser.y"
5345{
5346 scanner_clear_start();
5347 ;
5348 break;}
5349case 284:
5350#line 3249 "parser.y"
5351{
5352 if (allow && (!WrapExtern)) { }
5353 ;
5354 break;}
5355case 285:
5356#line 3252 "parser.y"
5357{
5358 if (allow && (!WrapExtern))
5359 cplus_add_pragma(yyvsp[-3].id,yyvsp[-1].id,yyvsp[0].id);
5360 ;
5361 break;}
5362case 286:
5363#line 3275 "parser.y"
5364{ start_line = line_number; skip_brace();
5365 ;
5366 break;}
5367case 287:
5368#line 3276 "parser.y"
5369{
5370
5371 if (cplus_mode == CPLUS_PUBLIC) {
5372 cplus_register_type(yyvsp[-4].id);
5373 if (yyvsp[-1].decl.id) {
5374 if (strcmp(yyvsp[-5].id,"class") == 0) {
5375 fprintf(stderr,"%s : Line %d. Warning. Nested classes not currently supported (ignored).\n", input_file, line_number);
5376 /* Generate some code for a new class */
5377 } else {
5378 Nested *n = new Nested;
5379 n->code << "typedef " << yyvsp[-5].id << " "
5380 << CCode.get() << " $classname_" << yyvsp[-1].decl.id << ";\n";
5381 n->name = copy_string(yyvsp[-1].decl.id);
5382 n->line = start_line;
5383 n->type = new DataType;
5384 n->type->type = T_USER;
5385 n->type->is_pointer = yyvsp[-1].decl.is_pointer;
5386 n->type->is_reference = yyvsp[-1].decl.is_reference;
5387 n->next = 0;
5388 add_nested(n);
5389 }
5390 }
5391 }
5392 ;
5393 break;}
5394case 288:
5395#line 3301 "parser.y"
5396{ start_line = line_number; skip_brace();
5397 ;
5398 break;}
5399case 289:
5400#line 3302 "parser.y"
5401{
5402 if (cplus_mode == CPLUS_PUBLIC) {
5403 if (strcmp(yyvsp[-4].id,"class") == 0) {
5404 fprintf(stderr,"%s : Line %d. Warning. Nested classes not currently supported (ignored)\n", input_file, line_number);
5405 /* Generate some code for a new class */
5406 } else {
5407 /* Generate some code for a new class */
5408
5409 Nested *n = new Nested;
5410 n->code << "typedef " << yyvsp[-4].id << " "
5411 << CCode.get() << " $classname_" << yyvsp[-1].decl.id << ";\n";
5412 n->name = copy_string(yyvsp[-1].decl.id);
5413 n->line = start_line;
5414 n->type = new DataType;
5415 n->type->type = T_USER;
5416 n->type->is_pointer = yyvsp[-1].decl.is_pointer;
5417 n->type->is_reference = yyvsp[-1].decl.is_reference;
5418 n->next = 0;
5419 add_nested(n);
5420
5421 }
5422 }
5423 ;
5424 break;}
5425case 290:
5426#line 3326 "parser.y"
5427{
5428 if (cplus_mode == CPLUS_PUBLIC) {
5429 cplus_register_type(yyvsp[-1].id);
5430 }
5431 ;
5432 break;}
5433case 291:
5434#line 3333 "parser.y"
5435{
5436 skip_decl();
5437 fprintf(stderr,"%s : Line %d. Function pointers not currently supported (ignored).\n", input_file, line_number);
5438
5439 ;
5440 break;}
5441case 292:
5442#line 3338 "parser.y"
5443{
5444 skip_decl();
5445 fprintf(stderr,"%s : Line %d. Function pointers not currently supported (ignored).\n", input_file, line_number);
5446
5447 ;
5448 break;}
5449case 293:
5450#line 3343 "parser.y"
5451{
5452 skip_decl();
5453 fprintf(stderr,"%s : Line %d. Function pointers not currently supported (ignored).\n", input_file, line_number);
5454
5455 ;
5456 break;}
5457case 294:
5458#line 3348 "parser.y"
5459{ ;
5460 break;}
5461case 295:
5462#line 3349 "parser.y"
5463{ ;
5464 break;}
5465case 296:
5466#line 3352 "parser.y"
5467{ yyval.decl = yyvsp[0].decl;;
5468 break;}
5469case 297:
5470#line 3353 "parser.y"
5471{ yyval.decl.id = 0; ;
5472 break;}
5473case 298:
5474#line 3356 "parser.y"
5475{;
5476 break;}
5477case 299:
5478#line 3357 "parser.y"
5479{;
5480 break;}
5481case 300:
5482#line 3358 "parser.y"
5483{;
5484 break;}
5485case 301:
5486#line 3361 "parser.y"
5487{ ;
5488 break;}
5489case 302:
5490#line 3362 "parser.y"
5491{
5492 if (allow) {
5493 int oldstatus = Status;
5494 char *tm;
5495
5496 init_language();
5497 if (cplus_mode == CPLUS_PUBLIC) {
5498 temp_typeptr = new DataType(Active_type);
5499 temp_typeptr->is_pointer += yyvsp[-1].decl.is_pointer;
5500 if (Verbose) {
5501 fprintf(stderr,"Wrapping member variable : %s\n",yyvsp[-1].decl.id);
5502 }
5503 Stat_var++;
5504 doc_entry = new DocDecl(yyvsp[-1].decl.id,doc_stack[doc_stack_top]);
5505 if (temp_typeptr->status & STAT_READONLY) {
5506 if (!(tm = typemap_lookup("memberin",typemap_lang,temp_typeptr,yyvsp[-1].decl.id,"","")))
5507 Status = Status | STAT_READONLY;
5508 }
5509 cplus_variable(yyvsp[-1].decl.id,(char *) 0,temp_typeptr);
5510 Status = oldstatus;
5511 delete temp_typeptr;
5512 }
5513 scanner_clear_start();
5514 }
5515 ;
5516 break;}
5517case 303:
5518#line 3386 "parser.y"
5519{ ;
5520 break;}
5521case 304:
5522#line 3387 "parser.y"
5523{
5524 if (allow) {
5525 int oldstatus = Status;
5526 char *tm;
5527
5528 init_language();
5529 if (cplus_mode == CPLUS_PUBLIC) {
5530 temp_typeptr = new DataType(Active_type);
5531 temp_typeptr->is_pointer += yyvsp[-2].decl.is_pointer;
5532 if (Verbose) {
5533 fprintf(stderr,"Wrapping member variable : %s\n",yyvsp[-2].decl.id);
5534 }
5535 Stat_var++;
5536 if (!(tm = typemap_lookup("memberin",typemap_lang,temp_typeptr,yyvsp[-2].decl.id,"","")))
5537 Status = Status | STAT_READONLY;
5538 doc_entry = new DocDecl(yyvsp[-2].decl.id,doc_stack[doc_stack_top]);
5539 if (temp_typeptr->status & STAT_READONLY) Status = Status | STAT_READONLY;
5540 cplus_variable(yyvsp[-2].decl.id,(char *) 0,temp_typeptr);
5541 Status = oldstatus;
5542 if (!tm)
5543 fprintf(stderr,"%s : Line %d. Warning. Array member will be read-only.\n",input_file,line_number);
5544 delete temp_typeptr;
5545 }
5546 scanner_clear_start();
5547 }
5548 ;
5549 break;}
5550case 305:
5551#line 3412 "parser.y"
5552{ ;
5553 break;}
5554case 306:
5555#line 3415 "parser.y"
5556{
5557 CCode = "";
5558 ;
5559 break;}
5560case 307:
5561#line 3418 "parser.y"
5562{ skip_brace(); ;
5563 break;}
5564case 308:
5565#line 3421 "parser.y"
5566{ CCode = ""; ;
5567 break;}
5568case 309:
5569#line 3422 "parser.y"
5570{ CCode = ""; ;
5571 break;}
5572case 310:
5573#line 3423 "parser.y"
5574{ skip_brace(); ;
5575 break;}
5576case 311:
5577#line 3426 "parser.y"
5578{;
5579 break;}
5580case 312:
5581#line 3427 "parser.y"
5582{;
5583 break;}
5584case 313:
5585#line 3430 "parser.y"
5586{
5587 if (allow) {
5588 if (cplus_mode == CPLUS_PUBLIC) {
5589 if (Verbose) {
5590 fprintf(stderr,"Creating enum value %s\n", yyvsp[0].id);
5591 }
5592 Stat_const++;
5593 temp_typeptr = new DataType(T_INT);
5594 doc_entry = new DocDecl(yyvsp[0].id,doc_stack[doc_stack_top]);
5595 cplus_declare_const(yyvsp[0].id, (char *) 0, temp_typeptr, (char *) 0);
5596 delete temp_typeptr;
5597 scanner_clear_start();
5598 }
5599 }
5600 ;
5601 break;}
5602case 314:
5603#line 3445 "parser.y"
5604{
5605 if (allow) {
5606 if (cplus_mode == CPLUS_PUBLIC) {
5607 if (Verbose) {
5608 fprintf(stderr, "Creating enum value %s = %s\n", yyvsp[-2].id, yyvsp[0].dtype.id);
5609 }
5610 Stat_const++;
5611 temp_typeptr = new DataType(T_INT);
5612 doc_entry = new DocDecl(yyvsp[-2].id,doc_stack[doc_stack_top]);
5613 cplus_declare_const(yyvsp[-2].id,(char *) 0, temp_typeptr,(char *) 0);
5614// OLD : Bug with value cplus_declare_const($1,(char *) 0, temp_typeptr,$3.id);
5615 delete temp_typeptr;
5616 scanner_clear_start();
5617 }
5618 }
5619 ;
5620 break;}
5621case 315:
5622#line 3461 "parser.y"
5623{
5624 if (allow) {
5625 if (cplus_mode == CPLUS_PUBLIC) {
5626 if (Verbose) {
5627 fprintf(stderr,"Creating enum value %s\n", yyvsp[0].id);
5628 }
5629 Stat_const++;
5630 temp_typeptr = new DataType(T_INT);
5631 doc_entry = new DocDecl(yyvsp[-2].id,doc_stack[doc_stack_top]);
5632 cplus_declare_const(yyvsp[0].id, yyvsp[-2].id, temp_typeptr, (char *) 0);
5633 delete temp_typeptr;
5634 scanner_clear_start();
5635 }
5636 }
5637 ;
5638 break;}
5639case 316:
5640#line 3476 "parser.y"
5641{
5642 if (allow) {
5643 if (cplus_mode == CPLUS_PUBLIC) {
5644 if (Verbose) {
5645 fprintf(stderr, "Creating enum value %s = %s\n", yyvsp[-2].id, yyvsp[0].dtype.id);
5646 }
5647 Stat_const++;
5648 temp_typeptr = new DataType(T_INT);
5649 doc_entry = new DocDecl(yyvsp[-4].id,doc_stack[doc_stack_top]);
5650 cplus_declare_const(yyvsp[-2].id,yyvsp[-4].id, temp_typeptr, (char *) 0);
5651// Old : bug with value cplus_declare_const($5,$3, temp_typeptr,$7.id);
5652 delete temp_typeptr;
5653 scanner_clear_start();
5654 }
5655 }
5656 ;
5657 break;}
5658case 317:
5659#line 3492 "parser.y"
5660{ ;
5661 break;}
5662case 318:
5663#line 3493 "parser.y"
5664{ ;
5665 break;}
5666case 319:
5667#line 3496 "parser.y"
5668{
5669 yyval.ilist = yyvsp[0].ilist;
5670 ;
5671 break;}
5672case 320:
5673#line 3499 "parser.y"
5674{
5675 yyval.ilist.names = (char **) 0;
5676 yyval.ilist.count = 0;
5677 ;
5678 break;}
5679case 321:
5680#line 3505 "parser.y"
5681{
5682 int i;
5683 yyval.ilist.names = new char *[NI_NAMES];
5684 yyval.ilist.count = 0;
5685 for (i = 0; i < NI_NAMES; i++){
5686 yyval.ilist.names[i] = (char *) 0;
5687 }
5688 if (yyvsp[0].id) {
5689 yyval.ilist.names[yyval.ilist.count] = copy_string(yyvsp[0].id);
5690 yyval.ilist.count++;
5691 }
5692 ;
5693 break;}
5694case 322:
5695#line 3518 "parser.y"
5696{
5697 yyval.ilist = yyvsp[-2].ilist;
5698 if (yyvsp[0].id) {
5699 yyval.ilist.names[yyval.ilist.count] = copy_string(yyvsp[0].id);
5700 yyval.ilist.count++;
5701 }
5702 ;
5703 break;}
5704case 323:
5705#line 3527 "parser.y"
5706{
5707 fprintf(stderr,"%s : Line %d. No access specifier given for base class %s (ignored).\n",
5708 input_file,line_number,yyvsp[0].id);
5709 yyval.id = (char *) 0;
5710 ;
5711 break;}
5712case 324:
5713#line 3532 "parser.y"
5714{
5715 fprintf(stderr,"%s : Line %d. No access specifier given for base class %s (ignored).\n",
5716 input_file,line_number,yyvsp[0].id);
5717 yyval.id = (char *) 0;
5718 ;
5719 break;}
5720case 325:
5721#line 3537 "parser.y"
5722{
5723 if (strcmp(yyvsp[-1].id,"public") == 0) {
5724 yyval.id = yyvsp[0].id;
5725 } else {
5726 fprintf(stderr,"%s : Line %d. %s inheritance not supported (ignored).\n",
5727 input_file,line_number,yyvsp[-1].id);
5728 yyval.id = (char *) 0;
5729 }
5730 ;
5731 break;}
5732case 326:
5733#line 3546 "parser.y"
5734{
5735 if (strcmp(yyvsp[-1].id,"public") == 0) {
5736 yyval.id = yyvsp[0].id;
5737 } else {
5738 fprintf(stderr,"%s : Line %d. %s inheritance not supported (ignored).\n",
5739 input_file,line_number,yyvsp[-1].id);
5740 yyval.id = (char *) 0;
5741 }
5742 ;
5743 break;}
5744case 327:
5745#line 3555 "parser.y"
5746{
5747 if (strcmp(yyvsp[-2].id,"public") == 0) {
5748 yyval.id = yyvsp[0].id;
5749 } else {
5750 fprintf(stderr,"%s : Line %d. %s inheritance not supported (ignored).\n",
5751 input_file,line_number,yyvsp[-2].id);
5752 yyval.id = (char *) 0;
5753 }
5754 ;
5755 break;}
5756case 328:
5757#line 3566 "parser.y"
5758{ yyval.id = "public"; ;
5759 break;}
5760case 329:
5761#line 3567 "parser.y"
5762{ yyval.id = "private"; ;
5763 break;}
5764case 330:
5765#line 3568 "parser.y"
5766{ yyval.id = "protected"; ;
5767 break;}
5768case 331:
5769#line 3572 "parser.y"
5770{ yyval.id = "class"; ;
5771 break;}
5772case 332:
5773#line 3573 "parser.y"
5774{ yyval.id = "struct"; ;
5775 break;}
5776case 333:
5777#line 3574 "parser.y"
5778{yyval.id = "union"; ;
5779 break;}
5780case 334:
5781#line 3577 "parser.y"
5782{;
5783 break;}
5784case 335:
5785#line 3578 "parser.y"
5786{ delete yyvsp[-1].pl;;
5787 break;}
5788case 336:
5789#line 3579 "parser.y"
5790{;
5791 break;}
5792case 337:
5793#line 3584 "parser.y"
5794{
5795 CCode = "";
5796 ;
5797 break;}
5798case 338:
5799#line 3587 "parser.y"
5800{ skip_brace(); ;
5801 break;}
5802case 339:
5803#line 3590 "parser.y"
5804{;
5805 break;}
5806case 340:
5807#line 3591 "parser.y"
5808{;
5809 break;}
5810case 341:
5811#line 3594 "parser.y"
5812{ ;
5813 break;}
5814case 342:
5815#line 3595 "parser.y"
5816{ ;
5817 break;}
5818case 343:
5819#line 3598 "parser.y"
5820{ ;
5821 break;}
5822case 344:
5823#line 3599 "parser.y"
5824{ ;
5825 break;}
5826case 345:
5827#line 3602 "parser.y"
5828{ ;
5829 break;}
5830case 346:
5831#line 3603 "parser.y"
5832{ ;
5833 break;}
5834case 347:
5835#line 3611 "parser.y"
5836{
5837 ObjCClass = 1;
5838 init_language();
5839 cplus_mode = CPLUS_PROTECTED;
5840 sprintf(temp_name,"CPP_CLASS:%s\n",yyvsp[-1].id);
5841 if (add_symbol(temp_name,(DataType *) 0, (char *) 0)) {
5842 fprintf(stderr,"%s : Line %d. @interface %s is multiple defined.\n",
5843 input_file,line_number,yyvsp[-1].id);
5844 FatalError();
5845 }
5846 // Create a new documentation entry
5847 doc_entry = new DocClass(yyvsp[-1].id,doc_parent());
5848 doc_stack_top++;
5849 doc_stack[doc_stack_top] = doc_entry;
5850 scanner_clear_start();
5851 cplus_open_class(yyvsp[-1].id, (char *) 0, ""); // Open up a new C++ class
5852 ;
5853 break;}
5854case 348:
5855#line 3627 "parser.y"
5856{
5857 if (yyvsp[-6].id) {
5858 char *inames[1];
5859 inames[0] = yyvsp[-6].id;
5860 cplus_inherit(1,inames);
5861 }
5862 // Restore original doc entry for this class
5863 doc_entry = doc_stack[doc_stack_top];
5864 cplus_class_close(yyvsp[-7].id);
5865 doc_entry = 0;
5866 doc_stack_top--;
5867 cplus_mode = CPLUS_PUBLIC;
5868 ObjCClass = 0;
5869 delete yyvsp[-7].id;
5870 delete yyvsp[-6].id;
5871 ;
5872 break;}
5873case 349:
5874#line 3644 "parser.y"
5875{
5876 ObjCClass = 1;
5877 init_language();
5878 cplus_mode = CPLUS_PROTECTED;
5879 doc_entry = cplus_set_class(yyvsp[-4].id);
5880 if (!doc_entry) {
5881 doc_entry = new DocClass(yyvsp[-4].id,doc_parent());
5882 }
5883 doc_stack_top++;
5884 doc_stack[doc_stack_top] = doc_entry;
5885 scanner_clear_start();
5886 ;
5887 break;}
5888case 350:
5889#line 3655 "parser.y"
5890{
5891 cplus_unset_class();
5892 doc_entry = 0;
5893 doc_stack_top--;
5894 ;
5895 break;}
5896case 351:
5897#line 3660 "parser.y"
5898{ skip_to_end(); ;
5899 break;}
5900case 352:
5901#line 3661 "parser.y"
5902{ skip_to_end(); ;
5903 break;}
5904case 353:
5905#line 3662 "parser.y"
5906{
5907 char *iname = make_name(yyvsp[-2].id);
5908 init_language();
5909 lang->cpp_class_decl(yyvsp[-2].id,iname,"");
5910 for (int i = 0; i <yyvsp[-1].ilist.count; i++) {
5911 if (yyvsp[-1].ilist.names[i]) {
5912 iname = make_name(yyvsp[-1].ilist.names[i]);
5913 lang->cpp_class_decl(yyvsp[-1].ilist.names[i],iname,"");
5914 delete [] yyvsp[-1].ilist.names[i];
5915 }
5916 }
5917 delete [] yyvsp[-1].ilist.names;
5918 ;
5919 break;}
5920case 354:
5921#line 3677 "parser.y"
5922{ yyval.id = yyvsp[-1].id;;
5923 break;}
5924case 355:
5925#line 3678 "parser.y"
5926{ yyval.id = 0; ;
5927 break;}
5928case 356:
5929#line 3682 "parser.y"
5930{ skip_template();
5931 CCode.strip(); // Strip whitespace
5932 CCode.replace("<","< ");
5933 CCode.replace(">"," >");
5934 yyval.id = CCode.get();
5935 ;
5936 break;}
5937case 357:
5938#line 3688 "parser.y"
5939{
5940 yyval.id = "";
5941 ;
5942 break;}
5943case 358:
5944#line 3693 "parser.y"
5945{ ;
5946 break;}
5947case 359:
5948#line 3694 "parser.y"
5949{
5950 cplus_mode = CPLUS_PUBLIC;
5951 ;
5952 break;}
5953case 360:
5954#line 3696 "parser.y"
5955{ ;
5956 break;}
5957case 361:
5958#line 3697 "parser.y"
5959{
5960 cplus_mode = CPLUS_PRIVATE;
5961 ;
5962 break;}
5963case 362:
5964#line 3699 "parser.y"
5965{ ;
5966 break;}
5967case 363:
5968#line 3700 "parser.y"
5969{
5970 cplus_mode = CPLUS_PROTECTED;
5971 ;
5972 break;}
5973case 364:
5974#line 3702 "parser.y"
5975{ ;
5976 break;}
5977case 365:
5978#line 3703 "parser.y"
5979{
5980 if (!Error) {
5981 skip_decl();
5982 {
5983 static int last_error_line = -1;
5984 if (last_error_line != line_number) {
5985 fprintf(stderr,"%s : Line %d. Syntax error in input.\n", input_file, line_number);
5986 FatalError();
5987 last_error_line = line_number;
5988 }
5989 Error = 1;
5990 }
5991 }
5992 ;
5993 break;}
5994case 366:
5995#line 3716 "parser.y"
5996{ ;
5997 break;}
5998case 367:
5999#line 3717 "parser.y"
6000{ ;
6001 break;}
6002case 368:
6003#line 3720 "parser.y"
6004{
6005
6006 ;
6007 break;}
6008case 369:
6009#line 3727 "parser.y"
6010{
6011 if (cplus_mode == CPLUS_PUBLIC) {
6012 int oldstatus = Status;
6013 char *tm;
6014 char *iname;
6015 if (Active_type) delete Active_type;
6016 Active_type = new DataType(yyvsp[-1].type);
6017 yyvsp[-1].type->is_pointer += yyvsp[0].decl.is_pointer;
6018 yyvsp[-1].type->is_reference = yyvsp[0].decl.is_reference;
6019 if (yyvsp[-1].type->status & STAT_READONLY) {
6020 if (!(tm = typemap_lookup("memberin",typemap_lang,yyvsp[-1].type,yyvsp[0].decl.id,"","")))
6021 Status = Status | STAT_READONLY;
6022 }
6023 iname = make_name(yyvsp[0].decl.id);
6024 doc_entry = new DocDecl(iname,doc_stack[doc_stack_top]);
6025 if (iname == yyvsp[0].decl.id) iname = 0;
6026 cplus_variable(yyvsp[0].decl.id,iname,yyvsp[-1].type);
6027 Status = oldstatus;
6028 }
6029 scanner_clear_start();
6030 delete yyvsp[-1].type;
6031 ;
6032 break;}
6033case 370:
6034#line 3749 "parser.y"
6035{
6036 if (cplus_mode == CPLUS_PUBLIC) {
6037 int oldstatus = Status;
6038 char *tm, *iname;
6039 if (Active_type) delete Active_type;
6040 Active_type = new DataType(yyvsp[-2].type);
6041 yyvsp[-2].type->is_pointer += yyvsp[-1].decl.is_pointer;
6042 yyvsp[-2].type->is_reference = yyvsp[-1].decl.is_reference;
6043 yyvsp[-2].type->arraystr = copy_string(ArrayString);
6044 if (yyvsp[-2].type->status & STAT_READONLY) {
6045 if (!(tm = typemap_lookup("memberin",typemap_lang,yyvsp[-2].type,yyvsp[-1].decl.id,"","")))
6046 Status = Status | STAT_READONLY;
6047 }
6048 iname = make_name(yyvsp[-1].decl.id);
6049 doc_entry = new DocDecl(iname,doc_stack[doc_stack_top]);
6050 if (iname == yyvsp[-1].decl.id) iname = 0;
6051 cplus_variable(yyvsp[-1].decl.id,iname,yyvsp[-2].type);
6052 Status = oldstatus;
6053 }
6054 scanner_clear_start();
6055 delete yyvsp[-2].type;
6056 ;
6057 break;}
6058case 371:
6059#line 3771 "parser.y"
6060{
6061 strcpy(yy_rename,yyvsp[-1].id);
6062 Rename_true = 1;
6063 ;
6064 break;}
6065case 372:
6066#line 3774 "parser.y"
6067{ ;
6068 break;}
6069case 373:
6070#line 3776 "parser.y"
6071{
6072 if (cplus_mode == CPLUS_PUBLIC) {
6073 int oldstatus = Status;
6074 char *tm, *iname;
6075 DataType *t = new DataType (Active_type);
6076 t->is_pointer += yyvsp[-1].decl.is_pointer;
6077 t->is_reference = yyvsp[-1].decl.is_reference;
6078 if (t->status & STAT_READONLY) {
6079 if (!(tm = typemap_lookup("memberin",typemap_lang,t,yyvsp[-1].decl.id,"","")))
6080 Status = Status | STAT_READONLY;
6081 }
6082 iname = make_name(yyvsp[-1].decl.id);
6083 doc_entry = new DocDecl(iname,doc_stack[doc_stack_top]);
6084 if (iname == yyvsp[-1].decl.id) iname = 0;
6085 cplus_variable(yyvsp[-1].decl.id,iname,t);
6086 Status = oldstatus;
6087 delete t;
6088 }
6089 scanner_clear_start();
6090 ;
6091 break;}
6092case 374:
6093#line 3796 "parser.y"
6094{
6095 char *iname;
6096 if (cplus_mode == CPLUS_PUBLIC) {
6097 int oldstatus = Status;
6098 char *tm;
6099 DataType *t = new DataType (Active_type);
6100 t->is_pointer += yyvsp[-2].decl.is_pointer;
6101 t->is_reference = yyvsp[-2].decl.is_reference;
6102 t->arraystr = copy_string(ArrayString);
6103 if (t->status & STAT_READONLY) {
6104 if (!(tm = typemap_lookup("memberin",typemap_lang,t,yyvsp[-2].decl.id,"","")))
6105 Status = Status | STAT_READONLY;
6106 }
6107 iname = make_name(yyvsp[-2].decl.id);
6108 doc_entry = new DocDecl(iname,doc_stack[doc_stack_top]);
6109 if (iname == yyvsp[-2].decl.id) iname = 0;
6110 cplus_variable(yyvsp[-2].decl.id,iname,t);
6111 Status = oldstatus;
6112 delete t;
6113 }
6114 scanner_clear_start();
6115 ;
6116 break;}
6117case 375:
6118#line 3818 "parser.y"
6119{ ;
6120 break;}
6121case 376:
6122#line 3821 "parser.y"
6123{ ;
6124 break;}
6125case 377:
6126#line 3822 "parser.y"
6127{
6128 AddMethods = 1;
6129 ;
6130 break;}
6131case 378:
6132#line 3824 "parser.y"
6133{
6134 AddMethods = 0;
6135 ;
6136 break;}
6137case 379:
6138#line 3827 "parser.y"
6139{
6140 strcpy(yy_rename,yyvsp[-1].id);
6141 Rename_true = 1;
6142 ;
6143 break;}
6144case 380:
6145#line 3830 "parser.y"
6146{ ;
6147 break;}
6148case 381:
6149#line 3831 "parser.y"
6150{
6151 skip_decl();
6152 if (!Error) {
6153 {
6154 static int last_error_line = -1;
6155 if (last_error_line != line_number) {
6156 fprintf(stderr,"%s : Line %d. Syntax error in input.\n", input_file, line_number);
6157 FatalError();
6158 last_error_line = line_number;
6159 }
6160 Error = 1;
6161 }
6162 }
6163 ;
6164 break;}
6165case 382:
6166#line 3844 "parser.y"
6167{ ;
6168 break;}
6169case 383:
6170#line 3845 "parser.y"
6171{ ;
6172 break;}
6173case 384:
6174#line 3848 "parser.y"
6175{
6176 char *iname;
6177 // An objective-C instance function
6178 // This is like a C++ member function
6179
6180 if (strcmp(yyvsp[-2].id,objc_destruct) == 0) {
6181 // This is an objective C destructor
6182 doc_entry = new DocDecl(yyvsp[-2].id,doc_stack[doc_stack_top]);
6183 cplus_destructor(yyvsp[-2].id,(char *) 0);
6184 } else {
6185 iname = make_name(yyvsp[-2].id);
6186 doc_entry = new DocDecl(iname,doc_stack[doc_stack_top]);
6187 if (iname == yyvsp[-2].id) iname = 0;
6188 cplus_member_func(yyvsp[-2].id,iname,yyvsp[-3].type,yyvsp[-1].pl,0);
6189 scanner_clear_start();
6190 delete yyvsp[-3].type;
6191 delete yyvsp[-2].id;
6192 delete yyvsp[-1].pl;
6193 }
6194 ;
6195 break;}
6196case 385:
6197#line 3868 "parser.y"
6198{
6199 char *iname;
6200 // An objective-C class function
6201 // This is like a c++ static member function
6202 if (strcmp(yyvsp[-2].id,objc_construct) == 0) {
6203 // This is an objective C constructor
6204 doc_entry = new DocDecl(yyvsp[-2].id,doc_stack[doc_stack_top]);
6205 cplus_constructor(yyvsp[-2].id,0,yyvsp[-1].pl);
6206 } else {
6207 iname = make_name(yyvsp[-2].id);
6208 doc_entry = new DocDecl(iname,doc_stack[doc_stack_top]);
6209 if (iname == yyvsp[-2].id) iname = 0;
6210 cplus_static_func(yyvsp[-2].id,iname,yyvsp[-3].type,yyvsp[-1].pl);
6211 }
6212 scanner_clear_start();
6213 delete yyvsp[-3].type;
6214 delete yyvsp[-2].id;
6215 delete yyvsp[-1].pl;
6216 ;
6217 break;}
6218case 386:
6219#line 3889 "parser.y"
6220{ CCode = ""; ;
6221 break;}
6222case 387:
6223#line 3890 "parser.y"
6224{ skip_brace(); ;
6225 break;}
6226case 388:
6227#line 3893 "parser.y"
6228{
6229 yyval.type = yyvsp[-1].type;
6230 ;
6231 break;}
6232case 389:
6233#line 3896 "parser.y"
6234{
6235 yyval.type = yyvsp[-2].type;
6236 yyval.type->is_pointer += yyvsp[-1].ivalue;
6237 ;
6238 break;}
6239case 390:
6240#line 3900 "parser.y"
6241{ /* Empty type means "id" type */
6242 yyval.type = new DataType(T_VOID);
6243 sprintf(yyval.type->name,"id");
6244 yyval.type->is_pointer = 1;
6245 yyval.type->implicit_ptr = 1;
6246 ;
6247 break;}
6248case 391:
6249#line 3908 "parser.y"
6250{
6251 yyval.type = new DataType(yyvsp[-1].p->t);
6252 delete yyvsp[-1].p;
6253 ;
6254 break;}
6255case 392:
6256#line 3912 "parser.y"
6257{
6258 yyval.type = new DataType(T_VOID);
6259 sprintf(yyval.type->name,"id");
6260 yyval.type->is_pointer = 1;
6261 yyval.type->implicit_ptr = 1;
6262 ;
6263 break;}
6264case 393:
6265#line 3920 "parser.y"
6266{
6267 Parm *p= new Parm(yyvsp[-1].type,yyvsp[0].id);
6268 p->objc_separator = yyvsp[-2].id;
6269 yyval.pl = yyvsp[-3].pl;
6270 yyval.pl->append(p);
6271 ;
6272 break;}
6273case 394:
6274#line 3926 "parser.y"
6275{
6276 yyval.pl = new ParmList;
6277 ;
6278 break;}
6279case 395:
6280#line 3931 "parser.y"
6281{ yyval.id = copy_string(":"); ;
6282 break;}
6283case 396:
6284#line 3932 "parser.y"
6285{ yyval.id = new char[strlen(yyvsp[-1].id)+2];
6286 strcpy(yyval.id,yyvsp[-1].id);
6287 strcat(yyval.id,":");
6288 delete yyvsp[-1].id;
6289 ;
6290 break;}
6291case 397:
6292#line 3943 "parser.y"
6293{
6294 yyval.dlist = yyvsp[0].dlist;
6295 yyval.dlist.names[yyval.dlist.count] = copy_string(yyvsp[-2].id);
6296 yyval.dlist.values[yyval.dlist.count] = copy_string(yyvsp[-1].id);
6297 format_string(yyval.dlist.values[yyval.dlist.count]);
6298 yyval.dlist.count++;
6299 ;
6300 break;}
6301case 398:
6302#line 3953 "parser.y"
6303{
6304 yyval.dlist = yyvsp[-3].dlist;
6305 yyval.dlist.names[yyval.dlist.count] = copy_string(yyvsp[-1].id);
6306 yyval.dlist.values[yyval.dlist.count] = copy_string(yyvsp[0].id);
6307 format_string(yyval.dlist.values[yyval.dlist.count]);
6308 yyval.dlist.count++;
6309 ;
6310 break;}
6311case 399:
6312#line 3960 "parser.y"
6313{
6314 yyval.dlist.names = new char *[NI_NAMES];
6315 yyval.dlist.values = new char *[NI_NAMES];
6316 yyval.dlist.count = 0;
6317 ;
6318 break;}
6319case 400:
6320#line 3967 "parser.y"
6321{
6322 yyval.id = yyvsp[0].id;
6323 ;
6324 break;}
6325case 401:
6326#line 3970 "parser.y"
6327{
6328 yyval.id = yyvsp[0].id;
6329 ;
6330 break;}
6331case 402:
6332#line 3973 "parser.y"
6333{
6334 yyval.id = 0;
6335 ;
6336 break;}
6337case 403:
6338#line 3983 "parser.y"
6339{
6340 yyval.id = yyvsp[0].id;
6341 ;
6342 break;}
6343case 404:
6344#line 3986 "parser.y"
6345{
6346 yyval.id = copy_string("const");
6347 ;
6348 break;}
6349case 405:
6350#line 3991 "parser.y"
6351{
6352 yyval.tmparm = yyvsp[-1].tmparm;
6353 yyval.tmparm->next = yyvsp[0].tmparm;
6354 ;
6355 break;}
6356case 406:
6357#line 3997 "parser.y"
6358{
6359 yyval.tmparm = yyvsp[-1].tmparm;
6360 yyval.tmparm->next = yyvsp[0].tmparm;
6361 ;
6362 break;}
6363case 407:
6364#line 4001 "parser.y"
6365{ yyval.tmparm = 0;;
6366 break;}
6367case 408:
6368#line 4004 "parser.y"
6369{
6370 if (InArray) {
6371 yyvsp[-1].type->is_pointer++;
6372 yyvsp[-1].type->arraystr = copy_string(ArrayString);
6373 }
6374 yyval.tmparm = new TMParm;
6375 yyval.tmparm->p = new Parm(yyvsp[-1].type,yyvsp[0].id);
6376 yyval.tmparm->p->call_type = 0;
6377 yyval.tmparm->args = tm_parm;
6378 delete yyvsp[-1].type;
6379 delete yyvsp[0].id;
6380 ;
6381 break;}
6382case 409:
6383#line 4017 "parser.y"
6384{
6385 yyval.tmparm = new TMParm;
6386 yyval.tmparm->p = new Parm(yyvsp[-2].type,yyvsp[0].id);
6387 yyval.tmparm->p->t->is_pointer += yyvsp[-1].ivalue;
6388 yyval.tmparm->p->call_type = 0;
6389 if (InArray) {
6390 yyval.tmparm->p->t->is_pointer++;
6391 yyval.tmparm->p->t->arraystr = copy_string(ArrayString);
6392 }
6393 yyval.tmparm->args = tm_parm;
6394 delete yyvsp[-2].type;
6395 delete yyvsp[0].id;
6396 ;
6397 break;}
6398case 410:
6399#line 4031 "parser.y"
6400{
6401 yyval.tmparm = new TMParm;
6402 yyval.tmparm->p = new Parm(yyvsp[-2].type,yyvsp[0].id);
6403 yyval.tmparm->p->t->is_reference = 1;
6404 yyval.tmparm->p->call_type = 0;
6405 yyval.tmparm->p->t->is_pointer++;
6406 if (!CPlusPlus) {
6407 fprintf(stderr,"%s : Line %d. Warning. Use of C++ Reference detected. Use the -c++ option.\n", input_file, line_number);
6408 }
6409 yyval.tmparm->args = tm_parm;
6410 delete yyvsp[-2].type;
6411 delete yyvsp[0].id;
6412 ;
6413 break;}
6414case 411:
6415#line 4044 "parser.y"
6416{
6417 fprintf(stderr,"%s : Line %d. Error. Function pointer not allowed (remap with typedef).\n", input_file, line_number);
6418 FatalError();
6419 yyval.tmparm = new TMParm;
6420 yyval.tmparm->p = new Parm(yyvsp[-7].type,yyvsp[-4].id);
6421 yyval.tmparm->p->t->type = T_ERROR;
6422 yyval.tmparm->p->name = copy_string(yyvsp[-4].id);
6423 strcpy(yyval.tmparm->p->t->name,"<function ptr>");
6424 yyval.tmparm->args = tm_parm;
6425 delete yyvsp[-7].type;
6426 delete yyvsp[-4].id;
6427 delete yyvsp[-1].pl;
6428 ;
6429 break;}
6430case 412:
6431#line 4059 "parser.y"
6432{
6433 yyval.id = yyvsp[-1].id;
6434 InArray = 0;
6435 ;
6436 break;}
6437case 413:
6438#line 4063 "parser.y"
6439{
6440 ArrayBackup = "";
6441 ArrayBackup << ArrayString;
6442 ;
6443 break;}
6444case 414:
6445#line 4066 "parser.y"
6446{
6447 yyval.id = yyvsp[-3].id;
6448 InArray = yyvsp[-2].ivalue;
6449 ArrayString = "";
6450 ArrayString << ArrayBackup;
6451 ;
6452 break;}
6453case 415:
6454#line 4072 "parser.y"
6455{
6456 ArrayBackup = "";
6457 ArrayBackup << ArrayString;
6458 ;
6459 break;}
6460case 416:
6461#line 4075 "parser.y"
6462{
6463 yyval.id = new char[1];
6464 yyval.id[0] = 0;
6465 InArray = yyvsp[-2].ivalue;
6466 ArrayString = "";
6467 ArrayString << ArrayBackup;
6468 ;
6469 break;}
6470case 417:
6471#line 4082 "parser.y"
6472{ yyval.id = new char[1];
6473 yyval.id[0] = 0;
6474 InArray = 0;
6475 ;
6476 break;}
6477case 418:
6478#line 4088 "parser.y"
6479{
6480 tm_parm = yyvsp[-1].pl;
6481 ;
6482 break;}
6483case 419:
6484#line 4091 "parser.y"
6485{
6486 tm_parm = 0;
6487 ;
6488 break;}
6489case 420:
6490#line 4096 "parser.y"
6491{yyval.id = yyvsp[0].id;;
6492 break;}
6493case 421:
6494#line 4097 "parser.y"
6495{ yyval.id = yyvsp[0].id;;
6496 break;}
6497case 422:
6498#line 4103 "parser.y"
6499{ ;
6500 break;}
6501case 423:
6502#line 4104 "parser.y"
6503{ ;
6504 break;}
6505case 424:
6506#line 4107 "parser.y"
6507{ ;
6508 break;}
6509case 425:
6510#line 4108 "parser.y"
6511{ ;
6512 break;}
6513case 426:
6514#line 4109 "parser.y"
6515{ ;
6516 break;}
6517}
6518 /* the action file gets copied in in place of this dollarsign */
6519#line 498 "/usr/local/share/bison.simple"
6520\f
6521 yyvsp -= yylen;
6522 yyssp -= yylen;
6523#ifdef YYLSP_NEEDED
6524 yylsp -= yylen;
6525#endif
6526
6527#if YYDEBUG != 0
6528 if (yydebug)
6529 {
6530 short *ssp1 = yyss - 1;
6531 fprintf (stderr, "state stack now");
6532 while (ssp1 != yyssp)
6533 fprintf (stderr, " %d", *++ssp1);
6534 fprintf (stderr, "\n");
6535 }
6536#endif
6537
6538 *++yyvsp = yyval;
6539
6540#ifdef YYLSP_NEEDED
6541 yylsp++;
6542 if (yylen == 0)
6543 {
6544 yylsp->first_line = yylloc.first_line;
6545 yylsp->first_column = yylloc.first_column;
6546 yylsp->last_line = (yylsp-1)->last_line;
6547 yylsp->last_column = (yylsp-1)->last_column;
6548 yylsp->text = 0;
6549 }
6550 else
6551 {
6552 yylsp->last_line = (yylsp+yylen-1)->last_line;
6553 yylsp->last_column = (yylsp+yylen-1)->last_column;
6554 }
6555#endif
6556
6557 /* Now "shift" the result of the reduction.
6558 Determine what state that goes to,
6559 based on the state we popped back to
6560 and the rule number reduced by. */
6561
6562 yyn = yyr1[yyn];
6563
6564 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
6565 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
6566 yystate = yytable[yystate];
6567 else
6568 yystate = yydefgoto[yyn - YYNTBASE];
6569
6570 goto yynewstate;
6571
6572yyerrlab: /* here on detecting error */
6573
6574 if (! yyerrstatus)
6575 /* If not already recovering from an error, report this error. */
6576 {
6577 ++yynerrs;
6578
6579#ifdef YYERROR_VERBOSE
6580 yyn = yypact[yystate];
6581
6582 if (yyn > YYFLAG && yyn < YYLAST)
6583 {
6584 int size = 0;
6585 char *msg;
6586 int x, count;
6587
6588 count = 0;
6589 /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
6590 for (x = (yyn < 0 ? -yyn : 0);
6591 x < (sizeof(yytname) / sizeof(char *)); x++)
6592 if (yycheck[x + yyn] == x)
6593 size += strlen(yytname[x]) + 15, count++;
6594 msg = (char *) malloc(size + 15);
6595 if (msg != 0)
6596 {
6597 strcpy(msg, "parse error");
6598
6599 if (count < 5)
6600 {
6601 count = 0;
6602 for (x = (yyn < 0 ? -yyn : 0);
6603 x < (sizeof(yytname) / sizeof(char *)); x++)
6604 if (yycheck[x + yyn] == x)
6605 {
6606 strcat(msg, count == 0 ? ", expecting `" : " or `");
6607 strcat(msg, yytname[x]);
6608 strcat(msg, "'");
6609 count++;
6610 }
6611 }
6612 yyerror(msg);
6613 free(msg);
6614 }
6615 else
6616 yyerror ("parse error; also virtual memory exceeded");
6617 }
6618 else
6619#endif /* YYERROR_VERBOSE */
6620 yyerror("parse error");
6621 }
6622
6623 goto yyerrlab1;
6624yyerrlab1: /* here on error raised explicitly by an action */
6625
6626 if (yyerrstatus == 3)
6627 {
6628 /* if just tried and failed to reuse lookahead token after an error, discard it. */
6629
6630 /* return failure if at end of input */
6631 if (yychar == YYEOF)
6632 YYABORT;
6633
6634#if YYDEBUG != 0
6635 if (yydebug)
6636 fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
6637#endif
6638
6639 yychar = YYEMPTY;
6640 }
6641
6642 /* Else will try to reuse lookahead token
6643 after shifting the error token. */
6644
6645 yyerrstatus = 3; /* Each real token shifted decrements this */
6646
6647 goto yyerrhandle;
6648
6649yyerrdefault: /* current state does not do anything special for the error token. */
6650
6651#if 0
6652 /* This is wrong; only states that explicitly want error tokens
6653 should shift them. */
6654 yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
6655 if (yyn) goto yydefault;
6656#endif
6657
6658yyerrpop: /* pop the current state because it cannot handle the error token */
6659
6660 if (yyssp == yyss) YYABORT;
6661 yyvsp--;
6662 yystate = *--yyssp;
6663#ifdef YYLSP_NEEDED
6664 yylsp--;
6665#endif
6666
6667#if YYDEBUG != 0
6668 if (yydebug)
6669 {
6670 short *ssp1 = yyss - 1;
6671 fprintf (stderr, "Error: state stack now");
6672 while (ssp1 != yyssp)
6673 fprintf (stderr, " %d", *++ssp1);
6674 fprintf (stderr, "\n");
6675 }
6676#endif
6677
6678yyerrhandle:
6679
6680 yyn = yypact[yystate];
6681 if (yyn == YYFLAG)
6682 goto yyerrdefault;
6683
6684 yyn += YYTERROR;
6685 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
6686 goto yyerrdefault;
6687
6688 yyn = yytable[yyn];
6689 if (yyn < 0)
6690 {
6691 if (yyn == YYFLAG)
6692 goto yyerrpop;
6693 yyn = -yyn;
6694 goto yyreduce;
6695 }
6696 else if (yyn == 0)
6697 goto yyerrpop;
6698
6699 if (yyn == YYFINAL)
6700 YYACCEPT;
6701
6702#if YYDEBUG != 0
6703 if (yydebug)
6704 fprintf(stderr, "Shifting error token, ");
6705#endif
6706
6707 *++yyvsp = yylval;
6708#ifdef YYLSP_NEEDED
6709 *++yylsp = yylloc;
6710#endif
6711
6712 yystate = yyn;
6713 goto yynewstate;
6714}
6715#line 4143 "parser.y"
6716
6717
6718void error_recover() {
6719 int c;
6720 c = yylex();
6721 while ((c > 0) && (c != SEMI))
6722 c = yylex();
6723}
6724
6725/* Called by the parser (yyparse) when an error is found.*/
6726void yyerror (char *) {
6727 // Fprintf(stderr,"%s : Line %d. Syntax error.\n", input_file, line_number);
6728 // error_recover();
6729}
6730