]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/wxSWIG/SWIG/parser.cxx
2 /* A Bison parser, made from parser.y
3 by GNU Bison version 1.25
6 #define YYBISON 1 /* Identify Bison output. */
16 #define NUM_UNSIGNED 266
21 #define TYPE_UNSIGNED 271
22 #define TYPE_SHORT 272
24 #define TYPE_FLOAT 274
25 #define TYPE_DOUBLE 275
28 #define TYPE_SIGNED 278
30 #define TYPE_TYPEDEF 280
57 #define ADDMETHODS 307
86 #define ALPHA_MODE 336
88 #define DOC_DISABLE 338
89 #define DOC_ENABLE 339
91 #define LOCALSTYLE 341
102 #define SUBSECTION 352
103 #define SUBSUBSECTION 353
105 #define GREATERTHAN 355
106 #define USERDIRECTIVE 356
107 #define OC_INTERFACE 357
109 #define OC_PUBLIC 359
110 #define OC_PRIVATE 360
111 #define OC_PROTECTED 361
113 #define OC_IMPLEMENT 363
114 #define OC_PROTOCOL 364
131 /*******************************************************************************
132 * Simplified Wrapper and Interface Generator (SWIG)
134 * Author : David Beazley
136 * Department of Computer Science
137 * University of Chicago
140 * beazley@cs.uchicago.edu
142 * Please read the file LICENSE for the copyright and terms by which SWIG
143 * can be used and distributed.
144 *******************************************************************************/
145 /***********************************************************************
150 * YACC parser for parsing function declarations.
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 ***********************************************************************/
164 extern "C" int yylex();
165 void yyerror (char *s
);
167 extern int line_number
;
168 extern int start_line
;
169 extern void skip_brace(void);
170 extern void skip_define(void);
171 extern void skip_decl(void);
172 extern int skip_cond(int);
173 extern void skip_to_end(void);
174 extern void skip_template(void);
175 extern void scanner_check_typedef(void);
176 extern void scanner_ignore_typedef(void);
177 extern void scanner_clear_start(void);
178 extern void start_inline(char *, int);
179 extern void format_string(char *);
180 extern void swig_pragma(char *, char *);
182 #include "internal.h"
185 void *alloca(unsigned n
) {
186 return((void *) malloc(n
));
189 // This redefinition is apparently needed on a number of machines,
192 #define alloca malloc
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
200 static int module_init
= 0; /* Indicates whether the %module name was given */
201 static int title_init
= 0; /* Indicates whether %title directive has been given */
202 static int doc_init
= 0;
204 static int lang_init
= 0; /* Indicates if the language has been initialized */
208 static char temp_name
[128];
209 static DataType
*temp_typeptr
, temp_type
;
210 static char yy_rename
[256];
211 static int Rename_true
= 0;
212 static DataType
*Active_type
= 0; // Used to support variable lists
213 static int Active_extern
= 0; // Whether or not list is external
214 static int Active_static
= 0;
215 static DataType
*Active_typedef
= 0; // Used for typedef lists
216 static int InArray
= 0; // Used when an array declaration is found
217 static int in_then
= 0;
218 static int in_else
= 0;
219 static int allow
= 1; // Used during conditional compilation
220 static int doc_scope
= 0; // Documentation scoping
221 static String ArrayString
; // Array type attached to parameter names
222 static String ArrayBackup
; // Array backup string
223 static char *DefArg
= 0; // Default argument hack
224 static char *ConstChar
= 0; // Used to store raw character constants
225 static ParmList
*tm_parm
= 0; // Parameter list used to hold typemap parameters
226 static Hash name_hash
; // Hash table containing renamings
227 char *objc_construct
= "new"; // Objective-C constructor
228 char *objc_destruct
= "free"; // Objective-C destructor
230 /* Some macros for building constants */
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);
238 #define CPLUS_PUBLIC 1
239 #define CPLUS_PRIVATE 2
240 #define CPLUS_PROTECTED 3
244 // Declarations of some functions for handling C++
246 extern void cplus_open_class(char *name
, char *rname
, char *ctype
);
247 extern void cplus_member_func(char *, char *, DataType
*, ParmList
*, int);
248 extern void cplus_constructor(char *, char *, ParmList
*);
249 extern void cplus_destructor(char *, char *);
250 extern void cplus_variable(char *, char *, DataType
*);
251 extern void cplus_static_func(char *, char *, DataType
*, ParmList
*);
252 extern void cplus_declare_const(char *, char *, DataType
*, char *);
253 extern void cplus_class_close(char *);
254 extern void cplus_inherit(int, char **);
255 extern void cplus_cleanup(void);
256 extern void cplus_static_var(char *, char *, DataType
*);
257 extern void cplus_register_type(char *);
258 extern void cplus_register_scope(Hash
*);
259 extern void cplus_inherit_scope(int, char **);
260 extern void cplus_add_pragma(char *, char *, char *);
261 extern DocEntry
*cplus_set_class(char *);
262 extern void cplus_unset_class();
263 extern void cplus_abort();
265 // ----------------------------------------------------------------------
266 // static init_language()
268 // Initialize the target language.
269 // Does nothing if this function has already been called.
270 // ----------------------------------------------------------------------
272 static void init_language() {
276 // Initialize the documentation system
279 doctitle
= new DocTitle(title
,0);
282 doctitle
->usage
= title
;
284 doc_stack
[0] = doctitle
;
287 int oldignore
= IgnoreDoc
;
290 include_file(ConfigFile
);
292 IgnoreDoc
= oldignore
;
298 // ----------------------------------------------------------------------
299 // int promote(int t1, int t2)
301 // Promote types (for constant expressions)
302 // ----------------------------------------------------------------------
304 int promote(int t1
, int t2
) {
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
;
317 fprintf(stderr
,"%s : Line %d. Type mismatch in constant expression\n",
318 input_file
, line_number
);
324 /* Generate the scripting name of an object. Takes %name directive into
325 account among other things */
327 static 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.
336 // Now check to see if the name contains a $
337 if (strchr(name
,'$')) {
341 temp
.replace("$","_S_");
349 /* Return the parent of a documentation entry. If wrapping externally, this is 0 */
351 static DocEntry
*doc_parent() {
353 return doc_stack
[doc_stack_top
];
358 // ----------------------------------------------------------------------
359 // create_function(int ext, char *name, DataType *t, ParmList *l)
361 // Creates a function and manages documentation creation. Really
362 // only used internally to the parser.
363 // ----------------------------------------------------------------------
365 void create_function(int ext
, char *name
, DataType
*t
, ParmList
*l
) {
366 if (Active_static
) return; // Static declaration. Ignore
369 if (WrapExtern
) return; // External wrapper file. Ignore
371 char *iname
= make_name(name
);
373 // Check if symbol already exists
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
);
381 fprintf(stderr
,"Wrapping function : ");
382 emit_extern_func(name
, t
, l
, 0, stderr
);
385 // If extern, make an extern declaration in the SWIG wrapper file
388 emit_extern_func(name
, t
, l
, ext
, f_header
);
389 else if (ForceExtern
) {
390 emit_extern_func(name
, t
, l
, 1, f_header
);
393 // If this function has been declared inline, produce a function
395 doc_entry
= new DocDecl(iname
,doc_stack
[doc_stack_top
]);
396 lang
->create_function(name
, iname
, t
, l
);
400 scanner_clear_start();
403 // -------------------------------------------------------------------
404 // create_variable(int ext, char *name, DataType *t)
406 // Create a link to a global variable.
407 // -------------------------------------------------------------------
409 void create_variable(int ext
, char *name
, DataType
*t
) {
411 if (WrapExtern
) return; // External wrapper file. Ignore
412 int oldstatus
= Status
;
414 if (Active_static
) return; // If static ignore
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
);
425 fprintf(stderr
,"Wrapping variable : ");
426 emit_extern_var(name
, t
, 0, stderr
);
429 // If externed, output an external declaration
432 emit_extern_var(name
, t
, ext
, f_header
);
433 else if (ForceExtern
) {
434 emit_extern_var(name
, t
, 1, f_header
);
437 // If variable datatype is read-only, we'll force it to be readonly
438 if (t
->status
& STAT_READONLY
) Status
= Status
| STAT_READONLY
;
441 doc_entry
= new DocDecl(iname
,doc_stack
[doc_stack_top
]);
442 lang
->link_variable(name
, iname
, t
);
446 scanner_clear_start();
449 // ------------------------------------------------------------------
450 // create_constant(char *name, DataType *type, char *value)
452 // Creates a new constant.
453 // -------------------------------------------------------------------
455 void create_constant(char *name
, DataType
*type
, char *value
) {
457 if (Active_static
) return;
458 if (WrapExtern
) return; // External wrapper file. Ignore
462 fprintf(stderr
,"%s : Line %d. %%name directive ignored with #define\n",
463 input_file
, line_number
);
467 if ((type
->type
== T_CHAR
) && (!type
->is_pointer
))
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
);
476 // Update symbols value if already defined.
477 update_symbol(name
, type
, value
);
479 if (!WrapExtern
) { // Only wrap the constant if not in %extern mode
482 fprintf(stderr
,"Creating constant %s = %s\n", name
, value
);
484 doc_entry
= new DocDecl(name
,doc_stack
[doc_stack_top
]);
485 lang
->declare_const(name
, name
, type
, value
);
486 type
->check_defined();
489 scanner_clear_start();
493 /* Print out array brackets */
496 for (i
= 0; i
< InArray
; i
++)
497 fprintf(stderr
,"[]");
500 /* manipulate small stack for managing if-then-else */
502 static int then_data
[100];
503 static int else_data
[100];
504 static int allow_data
[100];
505 static int te_index
= 0;
506 static int prev_allow
= 1;
509 then_data
[te_index
] = in_then
;
510 else_data
[te_index
] = in_else
;
511 allow_data
[te_index
] = allow
;
514 if (te_index
>= 100) {
515 fprintf(stderr
,"SWIG. Internal parser error. if-then-else stack overflow.\n");
523 in_then
= then_data
[te_index
];
524 in_else
= else_data
[te_index
];
525 allow
= allow_data
[te_index
];
527 prev_allow
= allow_data
[te_index
-1];
534 // Structures for handling code fragments built for nested classes
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
544 // Some internal variables for saving nested class information
546 static Nested
*nested_list
= 0;
548 // Add a function to the nested list
550 static void add_nested(Nested
*n
) {
552 if (!nested_list
) nested_list
= n
;
555 while (n1
->next
) n1
= n1
->next
;
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!
564 static void dump_nested(char *parent
) {
567 int oldstatus
= Status
;
569 Status
= STAT_READONLY
;
571 // Token replace the name of the parent class
572 n
->code
.replace("$classname",parent
);
574 // Fix up the name of the datatype (for building typedefs and other stuff)
575 sprintf(n
->type
->name
,"%s_%s",parent
,n
->name
);
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
);
581 // Dump the code to the scanner
583 fprintf(stderr
,"Splitting from %s : (line %d) \n%s\n", parent
,n
->line
, n
->code
.get());
585 fprintf(f_header
,"\n%s\n", n
->code
.get());
586 start_inline(n
->code
.get(),n
->line
);
635 #define YYFLAG -32768
638 #define YYTRANSLATE(x) ((unsigned)(x) <= 377 ? yytranslate[x] : 258)
640 static 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
682 static 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
728 static 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,
883 static 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
931 #if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
933 static 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
969 static 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
1015 static 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,
1061 static 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
1155 static 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,
1172 static 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
1266 static 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,
1287 static 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
1502 static 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
1716 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
1717 #line 3 "/usr/local/share/bison.simple"
1719 /* Skeleton output parser for bison,
1720 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
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)
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.
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. */
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. */
1743 #define alloca __builtin_alloca
1744 #else /* not GNU C. */
1745 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
1747 #else /* not sparc */
1748 #if defined (MSDOS) && !defined (__TURBOC__)
1750 #else /* not MSDOS, or __TURBOC__ */
1754 #else /* not MSDOS, __TURBOC__, or _AIX */
1758 void *alloca (unsigned int);
1760 #else /* not __cplusplus */
1762 #endif /* not __cplusplus */
1764 #endif /* not _AIX */
1765 #endif /* not MSDOS, or __TURBOC__ */
1766 #endif /* not sparc. */
1767 #endif /* not GNU C. */
1768 #endif /* alloca not defined. */
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. */
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. */
1779 #define yyerrok (yyerrstatus = 0)
1780 #define yyclearin (yychar = YYEMPTY)
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) \
1794 if (yychar == YYEMPTY && yylen == 1) \
1795 { yychar = (token), yylval = (value); \
1796 yychar1 = YYTRANSLATE (yychar); \
1801 { yyerror ("syntax error: cannot back up"); YYERROR; } \
1805 #define YYERRCODE 256
1808 #define YYLEX yylex()
1814 #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
1816 #define YYLEX yylex(&yylval, &yylloc)
1818 #else /* not YYLSP_NEEDED */
1820 #define YYLEX yylex(&yylval, YYLEX_PARAM)
1822 #define YYLEX yylex(&yylval)
1824 #endif /* not YYLSP_NEEDED */
1827 /* If nonreentrant, generate the variables here */
1831 int yychar
; /* the lookahead symbol */
1832 YYSTYPE yylval
; /* the semantic value of the */
1833 /* lookahead symbol */
1836 YYLTYPE yylloc
; /* location data for the lookahead */
1840 int yynerrs
; /* number of parse errors so far */
1841 #endif /* not YYPURE */
1844 int yydebug
; /* nonzero means print parse trace */
1845 /* Since this is uninitialized, it does not stop multiple parsers
1849 /* YYINITDEPTH indicates the initial size of the parser's stacks */
1852 #define YYINITDEPTH 200
1855 /* YYMAXDEPTH is the maximum size the stacks can grow to
1856 (effective only if the built-in stack extension method is used). */
1863 #define YYMAXDEPTH 10000
1866 /* Prevent warning if -Wstrict-prototypes. */
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++ */
1876 /* This is the most reliable way to avoid incompatibilities
1877 in available built-in functions on various systems. */
1879 __yy_memcpy (to
, from
, count
)
1884 register char *f
= from
;
1885 register char *t
= to
;
1886 register int i
= count
;
1892 #else /* __cplusplus */
1894 /* This is the most reliable way to avoid incompatibilities
1895 in available built-in functions on various systems. */
1897 __yy_memcpy (char *to
, char *from
, int count
)
1899 register char *f
= from
;
1900 register char *t
= to
;
1901 register int i
= count
;
1910 #line 196 "/usr/local/share/bison.simple"
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. */
1918 #ifdef YYPARSE_PARAM
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 */
1932 yyparse(YYPARSE_PARAM_ARG
)
1935 register int yystate
;
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 */
1942 short yyssa
[YYINITDEPTH
]; /* the state stack */
1943 YYSTYPE yyvsa
[YYINITDEPTH
]; /* the semantic value stack */
1945 short *yyss
= yyssa
; /* refer to the stacks thru separate pointers */
1946 YYSTYPE
*yyvs
= yyvsa
; /* to allow yyoverflow to reallocate them elsewhere */
1949 YYLTYPE yylsa
[YYINITDEPTH
]; /* the location stack */
1950 YYLTYPE
*yyls
= yylsa
;
1953 #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1955 #define YYPOPSTACK (yyvsp--, yyssp--)
1958 int yystacksize
= YYINITDEPTH
;
1969 YYSTYPE yyval
; /* the variable used to return */
1970 /* semantic values from the action */
1977 fprintf(stderr
, "Starting parse\n");
1983 yychar
= YYEMPTY
; /* Cause a token to be read. */
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. */
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. */
2003 if (yyssp
>= yyss
+ yystacksize
- 1)
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
;
2010 YYLTYPE
*yyls1
= yyls
;
2013 /* Get the current used size of the three stacks, in elements. */
2014 int size
= yyssp
- yyss
+ 1;
2017 /* Each stack pointer address is followed by the size of
2018 the data in use in that stack, in bytes. */
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
),
2028 yyoverflow("parser stack overflow",
2029 &yyss1
, size
* sizeof (*yyssp
),
2030 &yyvs1
, size
* sizeof (*yyvsp
),
2034 yyss
= yyss1
; yyvs
= yyvs1
;
2038 #else /* no yyoverflow */
2039 /* Extend the stack our own way. */
2040 if (yystacksize
>= YYMAXDEPTH
)
2042 yyerror("parser stack overflow");
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
));
2053 yyls
= (YYLTYPE
*) alloca (yystacksize
* sizeof (*yylsp
));
2054 __yy_memcpy ((char *)yyls
, (char *)yyls1
, size
* sizeof (*yylsp
));
2056 #endif /* no yyoverflow */
2058 yyssp
= yyss
+ size
- 1;
2059 yyvsp
= yyvs
+ size
- 1;
2061 yylsp
= yyls
+ size
- 1;
2066 fprintf(stderr
, "Stack size increased to %d\n", yystacksize
);
2069 if (yyssp
>= yyss
+ yystacksize
- 1)
2075 fprintf(stderr
, "Entering state %d\n", yystate
);
2081 /* Do appropriate processing given the current state. */
2082 /* Read a lookahead token if we need one and don't already have one. */
2085 /* First try to decide what to do without reference to lookahead token. */
2087 yyn
= yypact
[yystate
];
2091 /* Not known => get a lookahead token if don't already have one. */
2093 /* yychar is either YYEMPTY or YYEOF
2094 or a valid token in external form. */
2096 if (yychar
== YYEMPTY
)
2100 fprintf(stderr
, "Reading a token: ");
2105 /* Convert token to internal form (in yychar1) for indexing tables with */
2107 if (yychar
<= 0) /* This means end of input. */
2110 yychar
= YYEOF
; /* Don't call YYLEX any more */
2114 fprintf(stderr
, "Now at end of input.\n");
2119 yychar1
= YYTRANSLATE(yychar
);
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. */
2128 YYPRINT (stderr
, yychar
, yylval
);
2130 fprintf (stderr
, ")\n");
2136 if (yyn
< 0 || yyn
> YYLAST
|| yycheck
[yyn
] != yychar1
)
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. */
2161 /* Shift the lookahead token. */
2165 fprintf(stderr
, "Shifting token %d (%s), ", yychar
, yytname
[yychar1
]);
2168 /* Discard the token being shifted unless it is eof. */
2169 if (yychar
!= YYEOF
)
2177 /* count tokens shifted since error; after three, turn off error status. */
2178 if (yyerrstatus
) yyerrstatus
--;
2183 /* Do the default action for the current state. */
2186 yyn
= yydefact
[yystate
];
2190 /* Do a reduction. yyn is the number of a rule to reduce with. */
2194 yyval
= yyvsp
[1-yylen
]; /* implement default value of the action */
2201 fprintf (stderr
, "Reducing via rule %d (line %d), ",
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
]]);
2215 #line 559 "parser.y"
2219 for (ii
= 0; ii
< 256; ii
++) {
2220 handler_stack
[ii
] = 0;
2222 handler_stack
[0] = comment_handler
;
2224 doc_stack
[0] = doctitle
;
2228 #line 568 "parser.y"
2230 CommentHandler::cleanup();
2232 doc_entry
= doctitle
;
2237 fprintf(stderr
,"%s : EOF. Missing #endif detected.\n", input_file
);
2243 #line 582 "parser.y"
2245 scanner_clear_start();
2250 #line 586 "parser.y"
2255 #line 590 "parser.y"
2260 // comment_handler->clear();
2261 include_file(yyvsp
[0].id
);
2266 #line 601 "parser.y"
2269 int oldextern
= WrapExtern
;
2272 // comment_handler->clear();
2274 if (include_file(yyvsp
[0].id
) >= 0) {
2275 add_symbol("SWIGEXTERN",0,0);
2277 WrapExtern
= oldextern
;
2283 #line 618 "parser.y"
2286 int oldextern
= WrapExtern
;
2290 if (include_file(yyvsp
[0].id
) >= 0) {
2291 add_symbol("SWIGEXTERN",0,0);
2292 lang
->import(yyvsp
[0].id
);
2294 WrapExtern
= oldextern
;
2300 #line 636 "parser.y"
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
);
2310 #line 646 "parser.y"
2315 fprintf(stderr
,"%s : Line %d. CPP %s ignored.\n", input_file
, line_number
,yyvsp
[0].id
);
2321 #line 657 "parser.y"
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
);
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
);
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
);
2343 create_variable(yyvsp
[-4].ivalue
,yyvsp
[-2].decl
.id
,yyvsp
[-3].type
);
2345 create_variable(yyvsp
[-4].ivalue
,yyvsp
[-2].decl
.id
,yyvsp
[-3].type
);
2348 delete yyvsp
[-3].type
;
2352 #line 684 "parser.y"
2356 #line 688 "parser.y"
2359 fprintf(stderr
,"%s : Line %d. Function pointers not currently supported.\n",
2360 input_file
, line_number
);
2364 #line 696 "parser.y"
2367 fprintf(stderr
,"static variable %s ignored.\n",yyvsp
[-2].decl
.id
);
2370 delete yyvsp
[-3].type
;
2374 #line 702 "parser.y"
2380 #line 708 "parser.y"
2383 fprintf(stderr
,"%s : Line %d. Function pointers not currently supported.\n",
2384 input_file
, line_number
);
2388 #line 717 "parser.y"
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
);
2399 delete yyvsp
[-5].type
;
2400 delete yyvsp
[-2].pl
;
2404 #line 729 "parser.y"
2408 #line 733 "parser.y"
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
);
2416 delete yyvsp
[-5].type
;
2417 delete yyvsp
[-2].pl
;
2421 #line 746 "parser.y"
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
);
2434 #line 755 "parser.y"
2438 #line 759 "parser.y"
2440 if ((allow
) && (Inline
)) {
2441 if (strlen(CCode
.get())) {
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
);
2448 delete yyvsp
[-5].type
;
2449 delete yyvsp
[-2].pl
;
2453 #line 774 "parser.y"
2457 yyvsp
[-5].type
->is_pointer
+= yyvsp
[-4].decl
.is_pointer
;
2458 yyvsp
[-5].type
->is_reference
= yyvsp
[-4].decl
.is_reference
;
2460 fprintf(stderr
,"%s : Line %d. Repeated %%inline directive.\n",input_file
,line_number
);
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());
2468 create_function(0, yyvsp
[-4].decl
.id
, yyvsp
[-5].type
, yyvsp
[-2].pl
);
2471 delete yyvsp
[-5].type
;
2472 delete yyvsp
[-2].pl
;
2476 #line 797 "parser.y"
2480 fprintf(stderr
,"static function %s ignored.\n", yyvsp
[-4].decl
.id
);
2484 delete yyvsp
[-5].type
;
2485 delete yyvsp
[-2].pl
;
2489 #line 806 "parser.y"
2495 #line 812 "parser.y"
2498 Status
= Status
| STAT_READONLY
;
2502 #line 819 "parser.y"
2505 Status
= Status
& ~STAT_READONLY
;
2509 #line 825 "parser.y"
2512 strcpy(yy_rename
,yyvsp
[-1].id
);
2518 #line 833 "parser.y"
2520 if (name_hash
.lookup(yyvsp
[-2].id
)) {
2521 name_hash
.remove(yyvsp
[-2].id
);
2523 name_hash
.add(yyvsp
[-2].id
,copy_string(yyvsp
[-1].id
));
2527 #line 842 "parser.y"
2533 #line 844 "parser.y"
2539 #line 850 "parser.y"
2542 fprintf(stderr
,"%s : Lind %d. Empty %%name() is no longer supported.\n",
2543 input_file
, line_number
);
2549 #line 856 "parser.y"
2555 #line 862 "parser.y"
2557 if (allow
&& (!WrapExtern
)) {
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
);
2563 doc_entry
= new DocDecl(yyvsp
[-4].id
,doc_stack
[doc_stack_top
]);
2564 lang
->add_native(yyvsp
[-4].id
,yyvsp
[-1].id
);
2570 #line 874 "parser.y"
2572 if (allow
&& (!WrapExtern
)) {
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
);
2579 if (yyvsp
[-6].ivalue
) {
2580 emit_extern_func(yyvsp
[-4].decl
.id
, yyvsp
[-5].type
, yyvsp
[-2].pl
, yyvsp
[-6].ivalue
, f_header
);
2582 doc_entry
= new DocDecl(yyvsp
[-8].id
,doc_stack
[doc_stack_top
]);
2583 lang
->add_native(yyvsp
[-8].id
,yyvsp
[-4].decl
.id
);
2586 delete yyvsp
[-5].type
;
2587 delete yyvsp
[-2].pl
;
2591 #line 895 "parser.y"
2593 if (allow
&& (!WrapExtern
)) {
2597 if (!comment_handler
) {
2598 comment_handler
= new CommentHandler();
2602 for (ii
= 0; ii
< yyvsp
[0].dlist
.count
; ii
++) {
2603 comment_handler
->style(yyvsp
[0].dlist
.names
[ii
],yyvsp
[0].dlist
.values
[ii
]);
2606 // Create a new title for documentation
2608 int temp
= line_number
;
2609 line_number
= yyvsp
[-2].ivalue
;
2611 doctitle
= new DocTitle(yyvsp
[-1].id
,0);
2613 doctitle
->name
= copy_string(title
);
2614 doctitle
->line_number
= yyvsp
[-2].ivalue
;
2615 doctitle
->end_line
= yyvsp
[-2].ivalue
;
2619 doctitle
->usage
= yyvsp
[-1].id
;
2620 doc_entry
= doctitle
;
2621 doc_stack
[0] = doc_entry
;
2623 handler_stack
[0] = comment_handler
;
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
]);
2638 #line 943 "parser.y"
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];
2647 for (ii
= 0; ii
< yyvsp
[0].dlist
.count
; ii
++) {
2648 comment_handler
->style(yyvsp
[0].dlist
.names
[ii
],yyvsp
[0].dlist
.values
[ii
]);
2652 int temp
= line_number
;
2653 line_number
= yyvsp
[-2].ivalue
;
2654 doc_entry
= new DocSection(yyvsp
[-1].id
,doc_stack
[0]);
2658 doc_stack
[1] = doc_entry
;
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
]);
2669 #line 973 "parser.y"
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
);
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];
2683 for (ii
= 0; ii
< yyvsp
[0].dlist
.count
; ii
++) {
2684 comment_handler
->style(yyvsp
[0].dlist
.names
[ii
],yyvsp
[0].dlist
.values
[ii
]);
2688 int temp
= line_number
;
2689 line_number
= yyvsp
[-2].ivalue
;
2690 doc_entry
= new DocSection(yyvsp
[-1].id
,doc_stack
[1]);
2694 doc_stack
[2] = doc_entry
;
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
]);
2706 #line 1009 "parser.y"
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
);
2714 // Copy old comment handler
2716 // if (handler_stack[3]) delete handler_stack[3];
2717 handler_stack
[3] = new CommentHandler(handler_stack
[2]);
2718 comment_handler
= handler_stack
[3];
2721 for (ii
= 0; ii
< yyvsp
[0].dlist
.count
; ii
++) {
2722 comment_handler
->style(yyvsp
[0].dlist
.names
[ii
],yyvsp
[0].dlist
.values
[ii
]);
2726 int temp
= line_number
;
2727 line_number
= yyvsp
[-2].ivalue
;
2728 doc_entry
= new DocSection(yyvsp
[-1].id
,doc_stack
[2]);
2732 doc_stack
[3] = doc_entry
;
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
]);
2744 #line 1046 "parser.y"
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);
2754 #line 1054 "parser.y"
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);
2764 #line 1062 "parser.y"
2768 #line 1066 "parser.y"
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
]);
2778 #line 1075 "parser.y"
2782 #line 1079 "parser.y"
2784 if (allow
&& (!WrapExtern
)) {
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
);
2793 #line 1090 "parser.y"
2795 if (allow
&& (!WrapExtern
)) {
2797 yyvsp
[0].id
[strlen(yyvsp
[0].id
) - 1] = 0;
2798 fprintf(f_wrappers
,"%s\n",yyvsp
[0].id
);
2803 #line 1100 "parser.y"
2805 if (allow
&& (!WrapExtern
)) {
2807 yyvsp
[0].id
[strlen(yyvsp
[0].id
) -1] = 0;
2808 fprintf(f_init
,"%s\n", yyvsp
[0].id
);
2813 #line 1109 "parser.y"
2815 if (allow
&& (!WrapExtern
)) {
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
);
2824 #line 1119 "parser.y"
2826 if (allow
&& (!WrapExtern
)) {
2827 fprintf(stderr
,"%s\n", yyvsp
[0].id
);
2832 #line 1125 "parser.y"
2834 if (allow
&& (!WrapExtern
)) {
2835 fprintf(stderr
,"%s\n", yyvsp
[0].id
);
2840 #line 1132 "parser.y"
2846 #line 1138 "parser.y"
2850 lang
->set_init(yyvsp
[-1].id
);
2855 fprintf(stderr
,"%s : Line %d. %%init %s ignored.\n",
2856 input_file
, line_number
, yyvsp
[-1].id
);
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
);
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
;
2869 #line 1160 "parser.y"
2872 if (yyvsp
[0].ilist
.count
)
2873 lang
->set_module(yyvsp
[-1].id
,yyvsp
[0].ilist
.names
);
2875 lang
->set_module(yyvsp
[-1].id
,0);
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
;
2885 #line 1176 "parser.y"
2888 if ((yyvsp
[0].dtype
.type
!= T_ERROR
) && (yyvsp
[0].dtype
.type
!= T_SYMBOL
)) {
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
);
2904 #line 1195 "parser.y"
2907 fprintf(stderr
,"%s : Line %d. CPP Macro ignored.\n", input_file
, line_number
);
2912 #line 1202 "parser.y"
2914 remove_symbol(yyvsp
[0].id
);
2918 #line 1208 "parser.y"
2919 { scanner_clear_start(); ;
2922 #line 1208 "parser.y"
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);
2937 #line 1223 "parser.y"
2938 { scanner_clear_start(); ;
2941 #line 1223 "parser.y"
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);
2955 #line 1233 "parser.y"
2959 #line 1243 "parser.y"
2963 p
= yyvsp
[-1].tmparm
;
2965 typemap_register(yyvsp
[-3].id
,yyvsp
[-5].id
,p
->p
->t
,p
->p
->name
,CCode
,p
->args
);
2968 delete yyvsp
[-5].id
;
2969 delete yyvsp
[-3].id
;
2973 #line 1256 "parser.y"
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
);
2982 p
= yyvsp
[-1].tmparm
;
2984 typemap_register(yyvsp
[-3].id
,typemap_lang
,p
->p
->t
,p
->p
->name
,CCode
,p
->args
);
2988 delete yyvsp
[-3].id
;
2992 #line 1275 "parser.y"
2995 p
= yyvsp
[-1].tmparm
;
2997 typemap_clear(yyvsp
[-3].id
,yyvsp
[-5].id
,p
->p
->t
,p
->p
->name
);
3000 delete yyvsp
[-5].id
;
3001 delete yyvsp
[-3].id
;
3005 #line 1287 "parser.y"
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
);
3013 p
= yyvsp
[-1].tmparm
;
3015 typemap_clear(yyvsp
[-3].id
,typemap_lang
,p
->p
->t
,p
->p
->name
);
3019 delete yyvsp
[-3].id
;
3023 #line 1305 "parser.y"
3026 p
= yyvsp
[-3].tmparm
;
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
);
3031 delete yyvsp
[-7].id
;
3032 delete yyvsp
[-5].id
;
3033 delete yyvsp
[-1].tmparm
->p
;
3034 delete yyvsp
[-1].tmparm
;
3038 #line 1320 "parser.y"
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
);
3046 p
= yyvsp
[-3].tmparm
;
3048 typemap_copy(yyvsp
[-5].id
,typemap_lang
,yyvsp
[-1].tmparm
->p
->t
,yyvsp
[-1].tmparm
->p
->name
,p
->p
->t
,p
->p
->name
);
3052 delete yyvsp
[-5].id
;
3053 delete yyvsp
[-1].tmparm
->p
;
3054 delete yyvsp
[-1].tmparm
;
3058 #line 1341 "parser.y"
3061 p
= yyvsp
[-1].tmparm
;
3063 typemap_apply(yyvsp
[-3].tmparm
->p
->t
,yyvsp
[-3].tmparm
->p
->name
,p
->p
->t
,p
->p
->name
);
3066 delete yyvsp
[-1].tmparm
;
3067 delete yyvsp
[-3].tmparm
->args
;
3068 delete yyvsp
[-3].tmparm
;
3072 #line 1352 "parser.y"
3075 p
= yyvsp
[-1].tmparm
;
3077 typemap_clear_apply(p
->p
->t
, p
->p
->name
);
3083 #line 1369 "parser.y"
3086 fragment_register("except",yyvsp
[-2].id
, CCode
);
3087 delete yyvsp
[-2].id
;
3091 #line 1376 "parser.y"
3094 fragment_register("except",typemap_lang
, CCode
);
3098 #line 1383 "parser.y"
3100 fragment_clear("except",yyvsp
[-2].id
);
3104 #line 1388 "parser.y"
3106 fragment_clear("except",typemap_lang
);
3110 #line 1394 "parser.y"
3114 #line 1395 "parser.y"
3118 #line 1396 "parser.y"
3122 #line 1397 "parser.y"
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
);
3130 last_error_line
= line_number
;
3131 // Try to make some kind of recovery.
3140 #line 1415 "parser.y"
3144 #line 1416 "parser.y"
3148 #line 1420 "parser.y"
3152 #line 1424 "parser.y"
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
]);
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
]);
3168 #line 1440 "parser.y"
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
]);
3182 #line 1453 "parser.y"
3186 #line 1459 "parser.y"
3190 /* Already in a disabled documentation */
3194 fprintf(stderr
,"%s : Line %d. Documentation disabled.\n", input_file
, line_number
);
3202 #line 1473 "parser.y"
3206 if (doc_scope
> 1) {
3210 fprintf(stderr
,"%s : Line %d. Documentation enabled.\n", input_file
, line_number
);
3219 #line 1492 "parser.y"
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
);
3235 #line 1504 "parser.y"
3239 #line 1508 "parser.y"
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
);
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
);
3255 delete yyvsp
[-8].type
;
3256 delete yyvsp
[-5].id
;
3257 delete yyvsp
[-2].pl
;
3261 #line 1530 "parser.y"
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
);
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
);
3279 delete yyvsp
[-9].type
;
3280 delete yyvsp
[-5].id
;
3281 delete yyvsp
[-2].pl
;
3285 #line 1554 "parser.y"
3289 Active_typedef
= new DataType(yyvsp
[-2].type
);
3290 // This datatype is going to be readonly
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
);
3305 #line 1570 "parser.y"
3309 #line 1583 "parser.y"
3312 if (Active_typedef
) {
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
);
3324 #line 1595 "parser.y"
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
);
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
);
3338 #line 1606 "parser.y"
3342 #line 1626 "parser.y"
3344 /* Push old if-then-else status */
3346 /* Look a symbol up in the symbol table */
3347 if (lookup_symbol(yyvsp
[0].id
)) {
3350 allow
= 1 & prev_allow
;
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 */
3359 if_pop(); // Pop out. Reached end of block
3368 #line 1652 "parser.y"
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 */
3379 if_pop(); // Pop out. Reached end of block
3387 allow
= 1 & prev_allow
;
3392 #line 1675 "parser.y"
3394 if ((!in_then
) || (in_else
)) {
3395 fprintf(stderr
,"%s : Line %d. Misplaced else\n", input_file
, line_number
);
3402 /* Skip over rest of the conditional */
3408 allow
= allow
& prev_allow
;
3413 #line 1694 "parser.y"
3415 if ((!in_then
) && (!in_else
)) {
3416 fprintf(stderr
,"%s : Line %d. Misplaced endif\n", input_file
, line_number
);
3424 #line 1704 "parser.y"
3426 /* Push old if-then-else status */
3428 if (yyvsp
[0].ivalue
) {
3431 allow
= 1 & prev_allow
;
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 */
3440 if_pop(); // Pop out. Reached end of block
3449 #line 1730 "parser.y"
3451 /* have to pop old if clause off */
3454 /* Push old if-then-else status */
3456 if (yyvsp
[0].ivalue
) {
3459 allow
= 1 & prev_allow
;
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 */
3468 if_pop(); // Pop out. Reached end of block
3477 #line 1759 "parser.y"
3480 /* Look ID up in the symbol table */
3481 if (lookup_symbol(yyvsp
[-1].id
)) {
3489 #line 1768 "parser.y"
3491 if (lookup_symbol(yyvsp
[0].id
)) {
3499 #line 1775 "parser.y"
3501 if (yyvsp
[0].ivalue
) yyval
.ivalue
= 0;
3502 else yyval
.ivalue
= 1;
3506 #line 1781 "parser.y"
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");
3516 #line 1789 "parser.y"
3518 if (allow
&& (!WrapExtern
))
3519 swig_pragma(yyvsp
[-1].id
,yyvsp
[0].id
);
3523 #line 1793 "parser.y"
3525 if (allow
&& (!WrapExtern
))
3526 lang
->pragma(yyvsp
[-3].id
,yyvsp
[-1].id
,yyvsp
[0].id
);
3530 #line 1801 "parser.y"
3534 #line 1802 "parser.y"
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
);
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
);
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
);
3555 create_variable(Active_extern
,yyvsp
[-2].decl
.id
, temp_typeptr
);
3557 create_variable(Active_extern
, yyvsp
[-2].decl
.id
, temp_typeptr
);
3559 delete temp_typeptr
;
3564 #line 1828 "parser.y"
3568 #line 1829 "parser.y"
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
;
3578 delete yyvsp
[-2].pl
;
3582 #line 1839 "parser.y"
3586 #line 1842 "parser.y"
3588 yyval
.dtype
= yyvsp
[-1].dtype
;
3592 #line 1845 "parser.y"
3594 yyval
.dtype
.type
= T_SYMBOL
;
3598 #line 1848 "parser.y"
3601 fprintf(stderr
,"%s : Line %d. Warning. Unable to parse #define (ignored)\n", input_file
, line_number
);
3602 yyval
.dtype
.type
= T_ERROR
;
3606 #line 1856 "parser.y"
3607 { yyval
.ivalue
= 1; ;
3610 #line 1857 "parser.y"
3611 {yyval
.ivalue
= 0; ;
3614 #line 1858 "parser.y"
3616 if (strcmp(yyvsp
[0].id
,"C") == 0) {
3619 fprintf(stderr
,"%s : Line %d. Unrecognized extern type \"%s\" (ignored).\n", input_file
, line_number
, yyvsp
[0].id
);
3625 #line 1870 "parser.y"
3629 #line 1879 "parser.y"
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
;
3638 #line 1885 "parser.y"
3639 { yyval
.pl
= new ParmList
;;
3642 #line 1888 "parser.y"
3644 yyvsp
[0].pl
->insert(yyvsp
[-1].p
,0);
3645 yyval
.pl
= yyvsp
[0].pl
;
3650 #line 1893 "parser.y"
3651 { yyval
.pl
= new ParmList
;;
3654 #line 1896 "parser.y"
3656 yyval
.p
= yyvsp
[0].p
;
3657 if (typemap_check("ignore",typemap_lang
,yyval
.p
->t
,yyval
.p
->name
))
3658 yyval
.p
->ignore
= 1;
3662 #line 1901 "parser.y"
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
);
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
);
3674 yyval
.p
->t
->is_pointer
--;
3679 #line 1916 "parser.y"
3682 yyvsp
[-1].type
->is_pointer
++;
3684 fprintf(stderr
,"%s : Line %d. Warning. Array %s", input_file
, line_number
, yyvsp
[-1].type
->print_type());
3686 fprintf(stderr
," has been converted to %s.\n", yyvsp
[-1].type
->print_type());
3688 // Add array string to the type
3689 yyvsp
[-1].type
->arraystr
= copy_string(ArrayString
.get());
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
)) {
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
);
3699 yyval
.p
->call_type
= CALL_REFERENCE
;
3700 yyval
.p
->t
->is_pointer
++;
3702 delete yyvsp
[-1].type
;
3707 #line 1942 "parser.y"
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
;
3714 yyval
.p
->t
->is_pointer
++;
3716 fprintf(stderr
,"%s : Line %d. Warning. Array %s", input_file
, line_number
, yyval
.p
->t
->print_type());
3718 fprintf(stderr
," has been converted to %s.\n", yyval
.p
->t
->print_type());
3720 // Add array string to the type
3721 yyval
.p
->t
->arraystr
= copy_string(ArrayString
.get());
3723 delete yyvsp
[-2].type
;
3728 #line 1961 "parser.y"
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
;
3736 fprintf(stderr
,"%s : Line %d. Warning. Use of C++ Reference detected. Use the -c++ option.\n", input_file
, line_number
);
3738 delete yyvsp
[-2].type
;
3743 #line 1973 "parser.y"
3745 fprintf(stderr
,"%s : Line %d. Error. Function pointer not allowed (remap with typedef).\n", input_file
, line_number
);
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
;
3757 #line 1984 "parser.y"
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>");
3768 #line 1994 "parser.y"
3770 yyval
.id
= yyvsp
[-1].id
;
3772 if (yyvsp
[0].dtype
.type
== T_CHAR
)
3773 DefArg
= copy_string(ConstChar
);
3775 DefArg
= copy_string(yyvsp
[0].dtype
.id
);
3776 if (yyvsp
[0].dtype
.id
) delete yyvsp
[0].dtype
.id
;
3780 #line 2003 "parser.y"
3782 yyval
.id
= yyvsp
[-1].id
;
3783 InArray
= yyvsp
[0].ivalue
;
3788 #line 2008 "parser.y"
3790 yyval
.id
= new char[1];
3792 InArray
= yyvsp
[0].ivalue
;
3797 #line 2014 "parser.y"
3798 { yyval
.id
= new char[1];
3805 #line 2021 "parser.y"
3806 { yyval
.dtype
= yyvsp
[0].dtype
; ;
3809 #line 2022 "parser.y"
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
;
3818 #line 2028 "parser.y"
3821 yyval
.dtype
.id
= 0; yyval
.dtype
.type
= T_INT
;
3825 #line 2032 "parser.y"
3830 #line 2034 "parser.y"
3831 {yyval
.dtype
.id
= 0; yyval
.dtype
.type
= T_INT
;;
3834 #line 2037 "parser.y"
3835 { yyval
.ivalue
= CALL_VALUE
; ;
3838 #line 2038 "parser.y"
3839 { yyval
.ivalue
= CALL_OUTPUT
; ;
3842 #line 2041 "parser.y"
3844 yyval
.ivalue
= yyvsp
[-1].ivalue
| yyvsp
[0].ivalue
;
3848 #line 2044 "parser.y"
3850 yyval
.ivalue
= yyvsp
[0].ivalue
;
3854 #line 2051 "parser.y"
3855 { yyval
.decl
.id
= yyvsp
[0].id
;
3856 yyval
.decl
.is_pointer
= 0;
3857 yyval
.decl
.is_reference
= 0;
3861 #line 2055 "parser.y"
3863 yyval
.decl
.id
= yyvsp
[0].id
;
3864 yyval
.decl
.is_pointer
= yyvsp
[-1].ivalue
;
3865 yyval
.decl
.is_reference
= 0;
3869 #line 2060 "parser.y"
3871 yyval
.decl
.id
= yyvsp
[0].id
;
3872 yyval
.decl
.is_pointer
= 1;
3873 yyval
.decl
.is_reference
= 1;
3875 fprintf(stderr
,"%s : Line %d. Warning. Use of C++ Reference detected. Use the -c++ option.\n", input_file
, line_number
);
3880 #line 2070 "parser.y"
3881 { yyval
.ivalue
= 1; ;
3884 #line 2071 "parser.y"
3885 { yyval
.ivalue
= yyvsp
[0].ivalue
+ 1;;
3888 #line 2075 "parser.y"
3890 yyval
.ivalue
= yyvsp
[0].ivalue
+ 1;
3891 "[]" >> ArrayString
;
3895 #line 2079 "parser.y"
3897 yyval
.ivalue
= yyvsp
[0].ivalue
+ 1;
3899 yyvsp
[-2].dtype
.id
>> ArrayString
;
3904 #line 2086 "parser.y"
3906 yyval
.ivalue
= yyvsp
[0].ivalue
;
3910 #line 2089 "parser.y"
3916 #line 2097 "parser.y"
3918 yyval
.type
= yyvsp
[0].type
;
3922 #line 2100 "parser.y"
3924 yyval
.type
= yyvsp
[-1].type
;
3928 #line 2103 "parser.y"
3930 yyval
.type
= yyvsp
[-1].type
;
3934 #line 2106 "parser.y"
3936 yyval
.type
= yyvsp
[0].type
;
3940 #line 2109 "parser.y"
3942 yyval
.type
= yyvsp
[0].type
;
3946 #line 2112 "parser.y"
3948 yyval
.type
= yyvsp
[0].type
;
3952 #line 2115 "parser.y"
3954 yyval
.type
= yyvsp
[0].type
;
3958 #line 2118 "parser.y"
3960 yyval
.type
= yyvsp
[0].type
;
3964 #line 2121 "parser.y"
3966 if (yyvsp
[0].type
) yyval
.type
= yyvsp
[0].type
;
3967 else yyval
.type
= yyvsp
[-1].type
;
3971 #line 2125 "parser.y"
3973 if (yyvsp
[0].type
) yyval
.type
= yyvsp
[0].type
;
3974 else yyval
.type
= yyvsp
[-1].type
;
3978 #line 2129 "parser.y"
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
);
3986 strcat(yyval
.type
->name
,yyvsp
[0].id
);
3992 #line 2140 "parser.y"
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
);
4004 strcat(yyval
.type
->name
,yyvsp
[0].id
);
4010 #line 2155 "parser.y"
4012 yyval
.type
= yyvsp
[0].type
;
4013 yyval
.type
->qualifier
= new char[6];
4014 strcpy(yyval
.type
->qualifier
,"const");
4018 #line 2160 "parser.y"
4020 yyval
.type
= new DataType
;
4021 sprintf(yyval
.type
->name
,"%s %s",yyvsp
[-1].id
, yyvsp
[0].id
);
4022 yyval
.type
->type
= T_USER
;
4026 #line 2165 "parser.y"
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();
4035 #line 2174 "parser.y"
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);
4044 #line 2180 "parser.y"
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);
4053 #line 2190 "parser.y"
4055 yyval
.type
= yyvsp
[0].type
;
4059 #line 2193 "parser.y"
4061 yyval
.type
= yyvsp
[-1].type
;
4065 #line 2196 "parser.y"
4067 yyval
.type
= yyvsp
[-1].type
;
4071 #line 2199 "parser.y"
4073 yyval
.type
= yyvsp
[0].type
;
4077 #line 2202 "parser.y"
4079 yyval
.type
= yyvsp
[0].type
;
4083 #line 2205 "parser.y"
4085 yyval
.type
= yyvsp
[0].type
;
4089 #line 2208 "parser.y"
4091 yyval
.type
= yyvsp
[0].type
;
4095 #line 2211 "parser.y"
4097 yyval
.type
= yyvsp
[0].type
;
4101 #line 2214 "parser.y"
4103 if (yyvsp
[0].type
) yyval
.type
= yyvsp
[0].type
;
4104 else yyval
.type
= yyvsp
[-1].type
;
4108 #line 2218 "parser.y"
4110 if (yyvsp
[0].type
) yyval
.type
= yyvsp
[0].type
;
4111 else yyval
.type
= yyvsp
[-1].type
;
4115 #line 2222 "parser.y"
4117 yyval
.type
= yyvsp
[-1].type
;
4118 strcat(yyval
.type
->name
,yyvsp
[0].id
);
4122 #line 2226 "parser.y"
4124 yyval
.type
= yyvsp
[0].type
;
4125 yyval
.type
->qualifier
= new char[6];
4126 strcpy(yyval
.type
->qualifier
,"const");
4130 #line 2231 "parser.y"
4132 yyval
.type
= new DataType
;
4133 sprintf(yyval
.type
->name
,"%s %s",yyvsp
[-1].id
, yyvsp
[0].id
);
4134 yyval
.type
->type
= T_USER
;
4138 #line 2240 "parser.y"
4140 yyval
.type
= (DataType
*) 0;
4144 #line 2243 "parser.y"
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
);
4153 #line 2249 "parser.y"
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
);
4162 #line 2255 "parser.y"
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
);
4171 #line 2261 "parser.y"
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
);
4180 #line 2271 "parser.y"
4182 yyval
.type
= (DataType
*) 0;
4186 #line 2274 "parser.y"
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
);
4195 #line 2280 "parser.y"
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
);
4204 #line 2286 "parser.y"
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
);
4213 #line 2292 "parser.y"
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
);
4222 #line 2300 "parser.y"
4226 #line 2301 "parser.y"
4230 #line 2304 "parser.y"
4231 { scanner_check_typedef(); ;
4234 #line 2304 "parser.y"
4236 yyval
.dtype
= yyvsp
[0].dtype
;
4237 scanner_ignore_typedef();
4238 if (ConstChar
) delete ConstChar
;
4243 #line 2310 "parser.y"
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
);
4253 #line 2317 "parser.y"
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
);
4263 #line 2329 "parser.y"
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;
4272 #line 2335 "parser.y"
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;
4281 #line 2345 "parser.y"
4282 { yyval
.id
= yyvsp
[0].id
; ;
4285 #line 2346 "parser.y"
4286 { yyval
.id
= (char *) 0;;
4289 #line 2352 "parser.y"
4293 #line 2353 "parser.y"
4297 #line 2357 "parser.y"
4299 temp_typeptr
= new DataType(T_INT
);
4300 create_constant(yyvsp
[0].id
, temp_typeptr
, yyvsp
[0].id
);
4301 delete temp_typeptr
;
4305 #line 2362 "parser.y"
4306 { scanner_check_typedef();;
4309 #line 2362 "parser.y"
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
;
4319 #line 2369 "parser.y"
4323 #line 2370 "parser.y"
4327 #line 2373 "parser.y"
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
);
4342 #line 2385 "parser.y"
4344 yyval
.dtype
.id
= yyvsp
[0].id
;
4345 yyval
.dtype
.type
= T_CHAR
;
4349 #line 2396 "parser.y"
4351 yyval
.dtype
.id
= yyvsp
[0].id
;
4352 yyval
.dtype
.type
= T_INT
;
4356 #line 2400 "parser.y"
4358 yyval
.dtype
.id
= yyvsp
[0].id
;
4359 yyval
.dtype
.type
= T_DOUBLE
;
4363 #line 2404 "parser.y"
4365 yyval
.dtype
.id
= yyvsp
[0].id
;
4366 yyval
.dtype
.type
= T_UINT
;
4370 #line 2408 "parser.y"
4372 yyval
.dtype
.id
= yyvsp
[0].id
;
4373 yyval
.dtype
.type
= T_LONG
;
4377 #line 2412 "parser.y"
4379 yyval
.dtype
.id
= yyvsp
[0].id
;
4380 yyval
.dtype
.type
= T_ULONG
;
4384 #line 2416 "parser.y"
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
;
4392 #line 2421 "parser.y"
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
;
4400 #line 2426 "parser.y"
4402 yyval
.dtype
.id
= lookup_symvalue(yyvsp
[0].id
);
4403 if (yyval
.dtype
.id
== (char *) 0)
4404 yyval
.dtype
.id
= yyvsp
[0].id
;
4406 yyval
.dtype
.id
= new char[strlen(yyval
.dtype
.id
)+3];
4407 sprintf(yyval
.dtype
.id
,"(%s)",lookup_symvalue(yyvsp
[0].id
));
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
;
4415 #line 2438 "parser.y"
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
;
4425 #line 2445 "parser.y"
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
;
4434 #line 2451 "parser.y"
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
;
4443 #line 2457 "parser.y"
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
;
4453 #line 2464 "parser.y"
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
;
4463 #line 2471 "parser.y"
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
);
4471 delete yyvsp
[-2].dtype
.id
;
4472 delete yyvsp
[0].dtype
.id
;
4477 #line 2482 "parser.y"
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
);
4485 yyval
.dtype
.type
= T_INT
;
4486 delete yyvsp
[-2].dtype
.id
;
4487 delete yyvsp
[0].dtype
.id
;
4492 #line 2494 "parser.y"
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
);
4500 yyval
.dtype
.type
= T_INT
;
4501 delete yyvsp
[-2].dtype
.id
;
4502 delete yyvsp
[0].dtype
.id
;
4507 #line 2506 "parser.y"
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
);
4515 yyval
.dtype
.type
= T_INT
;
4516 delete yyvsp
[-2].dtype
.id
;
4517 delete yyvsp
[0].dtype
.id
;
4522 #line 2518 "parser.y"
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
);
4530 yyval
.dtype
.type
= T_INT
;
4531 delete yyvsp
[-2].dtype
.id
;
4532 delete yyvsp
[0].dtype
.id
;
4537 #line 2530 "parser.y"
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
;
4547 #line 2537 "parser.y"
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
);
4555 yyval
.dtype
.type
= yyvsp
[0].dtype
.type
;
4556 delete yyvsp
[0].dtype
.id
;
4560 #line 2547 "parser.y"
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
;
4569 #line 2558 "parser.y"
4573 #line 2559 "parser.y"
4577 #line 2565 "parser.y"
4582 DataType::new_scope();
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
);
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
);
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
);
4597 cplus_open_class(yyvsp
[-2].id
, iname
, yyvsp
[-3].id
);
4598 if (strcmp(yyvsp
[-3].id
,"class") == 0)
4599 cplus_mode
= CPLUS_PRIVATE
;
4601 cplus_mode
= CPLUS_PUBLIC
;
4603 doc_stack
[doc_stack_top
] = doc_entry
;
4604 scanner_clear_start();
4606 // Merge in scope from base classes
4607 cplus_inherit_scope(yyvsp
[-1].ilist
.count
,yyvsp
[-1].ilist
.names
);
4612 #line 2596 "parser.y"
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
);
4619 fprintf(stderr
,"%s : Line %d. Inheritance not allowed for unions.\n",input_file
, line_number
);
4623 // Clean up the inheritance list
4624 if (yyvsp
[-4].ilist
.names
) {
4626 for (j
= 0; j
< yyvsp
[-4].ilist
.count
; j
++) {
4627 if (yyvsp
[-4].ilist
.names
[j
]) delete [] yyvsp
[-4].ilist
.names
[j
];
4629 delete [] yyvsp
[-4].ilist
.names
;
4632 // Dumped nested declarations (if applicable)
4633 dump_nested(yyvsp
[-5].id
);
4635 // Save and collapse current scope
4636 cplus_register_scope(DataType::collapse_scope(yyvsp
[-5].id
));
4638 // Restore the original doc entry for this class
4639 doc_entry
= doc_stack
[doc_stack_top
];
4640 cplus_class_close((char *) 0);
4642 // Bump the documentation stack back down
4644 cplus_mode
= CPLUS_PUBLIC
;
4649 #line 2633 "parser.y"
4654 DataType::new_scope();
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
);
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
);
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
);
4669 cplus_open_class(yyvsp
[-2].id
, iname
, yyvsp
[-3].id
);
4670 if (strcmp(yyvsp
[-3].id
,"class") == 0)
4671 cplus_mode
= CPLUS_PRIVATE
;
4673 cplus_mode
= CPLUS_PUBLIC
;
4674 // Create a documentation entry for the class
4676 doc_stack
[doc_stack_top
] = doc_entry
;
4677 scanner_clear_start();
4680 // Merge in scope from base classes
4681 cplus_inherit_scope(yyvsp
[-1].ilist
.count
,yyvsp
[-1].ilist
.names
);
4687 #line 2667 "parser.y"
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
);
4694 fprintf(stderr
,"%s : Line %d. Inheritance not allowed for unions.\n",input_file
, line_number
);
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;
4705 // Clean up the inheritance list
4706 if (yyvsp
[-5].ilist
.names
) {
4708 for (j
= 0; j
< yyvsp
[-5].ilist
.count
; j
++) {
4709 if (yyvsp
[-5].ilist
.names
[j
]) delete [] yyvsp
[-5].ilist
.names
[j
];
4711 delete [] yyvsp
[-5].ilist
.names
;
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
);
4718 // Create dump nested class code
4719 if (yyvsp
[0].decl
.is_pointer
> 0) {
4720 dump_nested(yyvsp
[-6].id
);
4722 dump_nested(yyvsp
[0].decl
.id
);
4725 // Collapse any datatypes created in the the class
4727 cplus_register_scope(DataType::collapse_scope(yyvsp
[-6].id
));
4729 doc_entry
= doc_stack
[doc_stack_top
];
4730 if (yyvsp
[0].decl
.is_pointer
> 0) {
4731 cplus_class_close(yyvsp
[-6].id
);
4733 cplus_class_close(yyvsp
[0].decl
.id
);
4738 // Create a typedef in global scope
4740 if (yyvsp
[0].decl
.is_pointer
== 0)
4741 Active_typedef
->typedef_add(yyvsp
[0].decl
.id
);
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
);
4749 cplus_mode
= CPLUS_PUBLIC
;
4754 #line 2730 "parser.y"
4758 #line 2734 "parser.y"
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
);
4767 iname
= make_name("");
4768 doc_entry
= new DocClass(iname
,doc_parent());
4770 cplus_open_class("", iname
, yyvsp
[-1].id
);
4772 cplus_open_class("",0,yyvsp
[-1].id
);
4773 if (strcmp(yyvsp
[-1].id
,"class") == 0)
4774 cplus_mode
= CPLUS_PRIVATE
;
4776 cplus_mode
= CPLUS_PUBLIC
;
4778 doc_stack
[doc_stack_top
] = doc_entry
;
4779 scanner_clear_start();
4785 #line 2757 "parser.y"
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
);
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
);
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;
4805 // Dump nested classes
4806 if (yyvsp
[0].decl
.is_pointer
== 0)
4807 dump_nested(yyvsp
[0].decl
.id
);
4809 // Go back to previous scope
4811 cplus_register_scope(DataType::collapse_scope((char *) 0));
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
);
4820 cplus_mode
= CPLUS_PUBLIC
;
4825 #line 2793 "parser.y"
4829 #line 2798 "parser.y"
4834 iname
= make_name(yyvsp
[-1].id
);
4835 lang
->cpp_class_decl(yyvsp
[-1].id
,iname
,yyvsp
[-2].id
);
4840 #line 2809 "parser.y"
4845 fprintf(stderr
,"%s : Line %d. *** WARNING ***. C++ mode is disabled (enable using -c++)\n", input_file
, line_number
);
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
);
4853 sprintf(yy_rename
,"%s_%s",yyvsp
[-6].decl
.id
,yyvsp
[-4].id
);
4855 create_function(yyvsp
[-8].ivalue
, temp_name
, yyvsp
[-7].type
, yyvsp
[-2].pl
);
4857 delete yyvsp
[-7].type
;
4858 delete yyvsp
[-2].pl
;
4862 #line 2830 "parser.y"
4867 fprintf(stderr
,"%s : Line %d. *** WARNING ***. C++ mode is disabled (enable using -c++)\n", input_file
, line_number
);
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
);
4874 sprintf(yy_rename
,"%s_%s",yyvsp
[-3].decl
.id
,yyvsp
[-1].id
);
4876 create_variable(yyvsp
[-5].ivalue
,temp_name
, yyvsp
[-4].type
);
4878 delete yyvsp
[-4].type
;
4882 #line 2850 "parser.y"
4884 fprintf(stderr
,"%s : Line %d. Operator overloading not supported (ignored).\n", input_file
, line_number
);
4886 delete yyvsp
[-3].type
;
4890 #line 2858 "parser.y"
4892 fprintf(stderr
,"%s : Line %d. Templates not currently supported (ignored).\n",
4893 input_file
, line_number
);
4898 #line 2866 "parser.y"
4900 cplus_mode
= CPLUS_PUBLIC
;
4901 doc_entry
= cplus_set_class(yyvsp
[-1].id
);
4903 doc_entry
= new DocClass(yyvsp
[-1].id
,doc_parent());
4906 doc_stack
[doc_stack_top
] = doc_entry
;
4907 scanner_clear_start();
4912 #line 2876 "parser.y"
4914 cplus_unset_class();
4921 #line 2884 "parser.y"
4925 #line 2885 "parser.y"
4929 #line 2886 "parser.y"
4933 #line 2889 "parser.y"
4937 #line 2890 "parser.y"
4943 #line 2892 "parser.y"
4949 #line 2894 "parser.y"
4953 #line 2895 "parser.y"
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
);
4961 last_error_line
= line_number
;
4967 #line 2905 "parser.y"
4971 #line 2906 "parser.y"
4975 #line 2909 "parser.y"
4980 if (cplus_mode
== CPLUS_PUBLIC
) {
4982 yyvsp
[-5].type
->is_pointer
+= yyvsp
[-4].decl
.is_pointer
;
4983 yyvsp
[-5].type
->is_reference
= yyvsp
[-4].decl
.is_reference
;
4985 fprintf(stderr
,"Wrapping member function : %s\n",yyvsp
[-4].decl
.id
);
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);
4992 scanner_clear_start();
4994 delete yyvsp
[-5].type
;
4995 delete yyvsp
[-2].pl
;
4999 #line 2933 "parser.y"
5004 if (cplus_mode
== CPLUS_PUBLIC
) {
5006 yyvsp
[-5].type
->is_pointer
+= yyvsp
[-4].decl
.is_pointer
;
5007 yyvsp
[-5].type
->is_reference
= yyvsp
[-4].decl
.is_reference
;
5009 fprintf(stderr
,"Wrapping virtual member function : %s\n",yyvsp
[-4].decl
.id
);
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);
5016 scanner_clear_start();
5018 delete yyvsp
[-5].type
;
5019 delete yyvsp
[-2].pl
;
5023 #line 2956 "parser.y"
5028 if (cplus_mode
== CPLUS_PUBLIC
) {
5031 fprintf(stderr
,"Wrapping C++ constructor %s\n", yyvsp
[-4].id
);
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
);
5038 scanner_clear_start();
5040 delete yyvsp
[-2].pl
;
5044 #line 2977 "parser.y"
5049 if (cplus_mode
== CPLUS_PUBLIC
) {
5052 fprintf(stderr
,"Wrapping C++ destructor %s\n", yyvsp
[-4].id
);
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
);
5060 scanner_clear_start();
5064 #line 2997 "parser.y"
5069 if (cplus_mode
== CPLUS_PUBLIC
) {
5072 fprintf(stderr
,"Wrapping C++ destructor %s\n", yyvsp
[-3].id
);
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
);
5080 scanner_clear_start();
5084 #line 3017 "parser.y"
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
);
5104 int oldstatus
= Status
;
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
;
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
);
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
;
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
);
5129 fprintf(stderr
,"Wrapping member data %s\n", yyvsp
[-1].decl
.id
);
5133 scanner_clear_start();
5135 delete yyvsp
[-2].type
;
5139 #line 3068 "parser.y"
5143 #line 3070 "parser.y"
5147 int oldstatus
= Status
;
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
;
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
);
5165 fprintf(stderr
,"%s : Line %d. Warning. Array member will be read-only.\n",input_file
,line_number
);
5167 scanner_clear_start();
5169 delete yyvsp
[-3].type
;
5173 #line 3101 "parser.y"
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
);
5187 fprintf(stderr
,"Wrapping static member data %s\n", yyvsp
[0].decl
.id
);
5190 scanner_clear_start();
5192 delete yyvsp
[-1].type
;
5196 #line 3120 "parser.y"
5200 #line 3124 "parser.y"
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
);
5212 fprintf(stderr
,"Wrapping static member function %s\n",yyvsp
[-4].decl
.id
);
5214 scanner_clear_start();
5216 delete yyvsp
[-5].type
;
5217 delete yyvsp
[-2].pl
;
5221 #line 3144 "parser.y"
5224 cplus_mode
= CPLUS_PUBLIC
;
5226 fprintf(stderr
,"Public mode\n");
5227 scanner_clear_start();
5232 #line 3155 "parser.y"
5235 cplus_mode
= CPLUS_PRIVATE
;
5237 fprintf(stderr
,"Private mode\n");
5238 scanner_clear_start();
5243 #line 3166 "parser.y"
5246 cplus_mode
= CPLUS_PROTECTED
;
5248 fprintf(stderr
,"Protected mode\n");
5249 scanner_clear_start();
5254 #line 3177 "parser.y"
5257 strcpy(yy_rename
,yyvsp
[-1].id
);
5263 #line 3185 "parser.y"
5269 #line 3187 "parser.y"
5275 #line 3192 "parser.y"
5276 {scanner_clear_start();;
5279 #line 3192 "parser.y"
5282 // if ename was supplied. Install it as a new integer datatype.
5286 if (cplus_mode
== CPLUS_PUBLIC
) {
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);
5300 #line 3210 "parser.y"
5303 Status
= Status
| STAT_READONLY
;
5304 scanner_clear_start();
5308 #line 3215 "parser.y"
5311 Status
= Status
& ~(STAT_READONLY
);
5312 scanner_clear_start();
5316 #line 3221 "parser.y"
5319 fprintf(stderr
,"%s : Line %d. Friends are not allowed--members only! (ignored)\n", input_file
, line_number
);
5321 scanner_clear_start();
5325 #line 3229 "parser.y"
5328 fprintf(stderr
,"%s : Line %d. Operator overloading not supported (ignored).\n", input_file
, line_number
);
5330 scanner_clear_start();
5334 #line 3235 "parser.y"
5336 scanner_clear_start();
5340 #line 3240 "parser.y"
5344 #line 3244 "parser.y"
5346 scanner_clear_start();
5350 #line 3249 "parser.y"
5352 if (allow
&& (!WrapExtern
)) { }
5356 #line 3252 "parser.y"
5358 if (allow
&& (!WrapExtern
))
5359 cplus_add_pragma(yyvsp
[-3].id
,yyvsp
[-1].id
,yyvsp
[0].id
);
5363 #line 3275 "parser.y"
5364 { start_line
= line_number
; skip_brace();
5368 #line 3276 "parser.y"
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 */
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
;
5395 #line 3301 "parser.y"
5396 { start_line
= line_number
; skip_brace();
5400 #line 3302 "parser.y"
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 */
5407 /* Generate some code for a new class */
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
;
5426 #line 3326 "parser.y"
5428 if (cplus_mode
== CPLUS_PUBLIC
) {
5429 cplus_register_type(yyvsp
[-1].id
);
5434 #line 3333 "parser.y"
5437 fprintf(stderr
,"%s : Line %d. Function pointers not currently supported (ignored).\n", input_file
, line_number
);
5442 #line 3338 "parser.y"
5445 fprintf(stderr
,"%s : Line %d. Function pointers not currently supported (ignored).\n", input_file
, line_number
);
5450 #line 3343 "parser.y"
5453 fprintf(stderr
,"%s : Line %d. Function pointers not currently supported (ignored).\n", input_file
, line_number
);
5458 #line 3348 "parser.y"
5462 #line 3349 "parser.y"
5466 #line 3352 "parser.y"
5467 { yyval
.decl
= yyvsp
[0].decl
;;
5470 #line 3353 "parser.y"
5471 { yyval
.decl
.id
= 0; ;
5474 #line 3356 "parser.y"
5478 #line 3357 "parser.y"
5482 #line 3358 "parser.y"
5486 #line 3361 "parser.y"
5490 #line 3362 "parser.y"
5493 int oldstatus
= Status
;
5497 if (cplus_mode
== CPLUS_PUBLIC
) {
5498 temp_typeptr
= new DataType(Active_type
);
5499 temp_typeptr
->is_pointer
+= yyvsp
[-1].decl
.is_pointer
;
5501 fprintf(stderr
,"Wrapping member variable : %s\n",yyvsp
[-1].decl
.id
);
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
;
5509 cplus_variable(yyvsp
[-1].decl
.id
,(char *) 0,temp_typeptr
);
5511 delete temp_typeptr
;
5513 scanner_clear_start();
5518 #line 3386 "parser.y"
5522 #line 3387 "parser.y"
5525 int oldstatus
= Status
;
5529 if (cplus_mode
== CPLUS_PUBLIC
) {
5530 temp_typeptr
= new DataType(Active_type
);
5531 temp_typeptr
->is_pointer
+= yyvsp
[-2].decl
.is_pointer
;
5533 fprintf(stderr
,"Wrapping member variable : %s\n",yyvsp
[-2].decl
.id
);
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
);
5543 fprintf(stderr
,"%s : Line %d. Warning. Array member will be read-only.\n",input_file
,line_number
);
5544 delete temp_typeptr
;
5546 scanner_clear_start();
5551 #line 3412 "parser.y"
5555 #line 3415 "parser.y"
5561 #line 3418 "parser.y"
5565 #line 3421 "parser.y"
5569 #line 3422 "parser.y"
5573 #line 3423 "parser.y"
5577 #line 3426 "parser.y"
5581 #line 3427 "parser.y"
5585 #line 3430 "parser.y"
5588 if (cplus_mode
== CPLUS_PUBLIC
) {
5590 fprintf(stderr
,"Creating enum value %s\n", yyvsp
[0].id
);
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();
5603 #line 3445 "parser.y"
5606 if (cplus_mode
== CPLUS_PUBLIC
) {
5608 fprintf(stderr
, "Creating enum value %s = %s\n", yyvsp
[-2].id
, yyvsp
[0].dtype
.id
);
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();
5622 #line 3461 "parser.y"
5625 if (cplus_mode
== CPLUS_PUBLIC
) {
5627 fprintf(stderr
,"Creating enum value %s\n", yyvsp
[0].id
);
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();
5640 #line 3476 "parser.y"
5643 if (cplus_mode
== CPLUS_PUBLIC
) {
5645 fprintf(stderr
, "Creating enum value %s = %s\n", yyvsp
[-2].id
, yyvsp
[0].dtype
.id
);
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();
5659 #line 3492 "parser.y"
5663 #line 3493 "parser.y"
5667 #line 3496 "parser.y"
5669 yyval
.ilist
= yyvsp
[0].ilist
;
5673 #line 3499 "parser.y"
5675 yyval
.ilist
.names
= (char **) 0;
5676 yyval
.ilist
.count
= 0;
5680 #line 3505 "parser.y"
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;
5689 yyval
.ilist
.names
[yyval
.ilist
.count
] = copy_string(yyvsp
[0].id
);
5690 yyval
.ilist
.count
++;
5695 #line 3518 "parser.y"
5697 yyval
.ilist
= yyvsp
[-2].ilist
;
5699 yyval
.ilist
.names
[yyval
.ilist
.count
] = copy_string(yyvsp
[0].id
);
5700 yyval
.ilist
.count
++;
5705 #line 3527 "parser.y"
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;
5713 #line 3532 "parser.y"
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;
5721 #line 3537 "parser.y"
5723 if (strcmp(yyvsp
[-1].id
,"public") == 0) {
5724 yyval
.id
= yyvsp
[0].id
;
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;
5733 #line 3546 "parser.y"
5735 if (strcmp(yyvsp
[-1].id
,"public") == 0) {
5736 yyval
.id
= yyvsp
[0].id
;
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;
5745 #line 3555 "parser.y"
5747 if (strcmp(yyvsp
[-2].id
,"public") == 0) {
5748 yyval
.id
= yyvsp
[0].id
;
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;
5757 #line 3566 "parser.y"
5758 { yyval
.id
= "public"; ;
5761 #line 3567 "parser.y"
5762 { yyval
.id
= "private"; ;
5765 #line 3568 "parser.y"
5766 { yyval
.id
= "protected"; ;
5769 #line 3572 "parser.y"
5770 { yyval
.id
= "class"; ;
5773 #line 3573 "parser.y"
5774 { yyval
.id
= "struct"; ;
5777 #line 3574 "parser.y"
5778 {yyval
.id
= "union"; ;
5781 #line 3577 "parser.y"
5785 #line 3578 "parser.y"
5786 { delete yyvsp
[-1].pl
;;
5789 #line 3579 "parser.y"
5793 #line 3584 "parser.y"
5799 #line 3587 "parser.y"
5803 #line 3590 "parser.y"
5807 #line 3591 "parser.y"
5811 #line 3594 "parser.y"
5815 #line 3595 "parser.y"
5819 #line 3598 "parser.y"
5823 #line 3599 "parser.y"
5827 #line 3602 "parser.y"
5831 #line 3603 "parser.y"
5835 #line 3611 "parser.y"
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
);
5846 // Create a new documentation entry
5847 doc_entry
= new DocClass(yyvsp
[-1].id
,doc_parent());
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
5855 #line 3627 "parser.y"
5859 inames
[0] = yyvsp
[-6].id
;
5860 cplus_inherit(1,inames
);
5862 // Restore original doc entry for this class
5863 doc_entry
= doc_stack
[doc_stack_top
];
5864 cplus_class_close(yyvsp
[-7].id
);
5867 cplus_mode
= CPLUS_PUBLIC
;
5869 delete yyvsp
[-7].id
;
5870 delete yyvsp
[-6].id
;
5874 #line 3644 "parser.y"
5878 cplus_mode
= CPLUS_PROTECTED
;
5879 doc_entry
= cplus_set_class(yyvsp
[-4].id
);
5881 doc_entry
= new DocClass(yyvsp
[-4].id
,doc_parent());
5884 doc_stack
[doc_stack_top
] = doc_entry
;
5885 scanner_clear_start();
5889 #line 3655 "parser.y"
5891 cplus_unset_class();
5897 #line 3660 "parser.y"
5901 #line 3661 "parser.y"
5905 #line 3662 "parser.y"
5907 char *iname
= make_name(yyvsp
[-2].id
);
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
];
5917 delete [] yyvsp
[-1].ilist
.names
;
5921 #line 3677 "parser.y"
5922 { yyval
.id
= yyvsp
[-1].id
;;
5925 #line 3678 "parser.y"
5929 #line 3682 "parser.y"
5931 CCode
.strip(); // Strip whitespace
5932 CCode
.replace("<","< ");
5933 CCode
.replace(">"," >");
5934 yyval
.id
= CCode
.get();
5938 #line 3688 "parser.y"
5944 #line 3693 "parser.y"
5948 #line 3694 "parser.y"
5950 cplus_mode
= CPLUS_PUBLIC
;
5954 #line 3696 "parser.y"
5958 #line 3697 "parser.y"
5960 cplus_mode
= CPLUS_PRIVATE
;
5964 #line 3699 "parser.y"
5968 #line 3700 "parser.y"
5970 cplus_mode
= CPLUS_PROTECTED
;
5974 #line 3702 "parser.y"
5978 #line 3703 "parser.y"
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
);
5987 last_error_line
= line_number
;
5995 #line 3716 "parser.y"
5999 #line 3717 "parser.y"
6003 #line 3720 "parser.y"
6009 #line 3727 "parser.y"
6011 if (cplus_mode
== CPLUS_PUBLIC
) {
6012 int oldstatus
= Status
;
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
;
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
);
6029 scanner_clear_start();
6030 delete yyvsp
[-1].type
;
6034 #line 3749 "parser.y"
6036 if (cplus_mode
== CPLUS_PUBLIC
) {
6037 int oldstatus
= Status
;
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
;
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
);
6054 scanner_clear_start();
6055 delete yyvsp
[-2].type
;
6059 #line 3771 "parser.y"
6061 strcpy(yy_rename
,yyvsp
[-1].id
);
6066 #line 3774 "parser.y"
6070 #line 3776 "parser.y"
6072 if (cplus_mode
== CPLUS_PUBLIC
) {
6073 int oldstatus
= Status
;
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
;
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
);
6089 scanner_clear_start();
6093 #line 3796 "parser.y"
6096 if (cplus_mode
== CPLUS_PUBLIC
) {
6097 int oldstatus
= Status
;
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
;
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
);
6114 scanner_clear_start();
6118 #line 3818 "parser.y"
6122 #line 3821 "parser.y"
6126 #line 3822 "parser.y"
6132 #line 3824 "parser.y"
6138 #line 3827 "parser.y"
6140 strcpy(yy_rename
,yyvsp
[-1].id
);
6145 #line 3830 "parser.y"
6149 #line 3831 "parser.y"
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
);
6158 last_error_line
= line_number
;
6166 #line 3844 "parser.y"
6170 #line 3845 "parser.y"
6174 #line 3848 "parser.y"
6177 // An objective-C instance function
6178 // This is like a C++ member function
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);
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
;
6197 #line 3868 "parser.y"
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
);
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
);
6212 scanner_clear_start();
6213 delete yyvsp
[-3].type
;
6214 delete yyvsp
[-2].id
;
6215 delete yyvsp
[-1].pl
;
6219 #line 3889 "parser.y"
6223 #line 3890 "parser.y"
6227 #line 3893 "parser.y"
6229 yyval
.type
= yyvsp
[-1].type
;
6233 #line 3896 "parser.y"
6235 yyval
.type
= yyvsp
[-2].type
;
6236 yyval
.type
->is_pointer
+= yyvsp
[-1].ivalue
;
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;
6249 #line 3908 "parser.y"
6251 yyval
.type
= new DataType(yyvsp
[-1].p
->t
);
6256 #line 3912 "parser.y"
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;
6265 #line 3920 "parser.y"
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
);
6274 #line 3926 "parser.y"
6276 yyval
.pl
= new ParmList
;
6280 #line 3931 "parser.y"
6281 { yyval
.id
= copy_string(":"); ;
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
;
6292 #line 3943 "parser.y"
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
++;
6302 #line 3953 "parser.y"
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
++;
6312 #line 3960 "parser.y"
6314 yyval
.dlist
.names
= new char *[NI_NAMES
];
6315 yyval
.dlist
.values
= new char *[NI_NAMES
];
6316 yyval
.dlist
.count
= 0;
6320 #line 3967 "parser.y"
6322 yyval
.id
= yyvsp
[0].id
;
6326 #line 3970 "parser.y"
6328 yyval
.id
= yyvsp
[0].id
;
6332 #line 3973 "parser.y"
6338 #line 3983 "parser.y"
6340 yyval
.id
= yyvsp
[0].id
;
6344 #line 3986 "parser.y"
6346 yyval
.id
= copy_string("const");
6350 #line 3991 "parser.y"
6352 yyval
.tmparm
= yyvsp
[-1].tmparm
;
6353 yyval
.tmparm
->next
= yyvsp
[0].tmparm
;
6357 #line 3997 "parser.y"
6359 yyval
.tmparm
= yyvsp
[-1].tmparm
;
6360 yyval
.tmparm
->next
= yyvsp
[0].tmparm
;
6364 #line 4001 "parser.y"
6365 { yyval
.tmparm
= 0;;
6368 #line 4004 "parser.y"
6371 yyvsp
[-1].type
->is_pointer
++;
6372 yyvsp
[-1].type
->arraystr
= copy_string(ArrayString
);
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
;
6383 #line 4017 "parser.y"
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;
6390 yyval
.tmparm
->p
->t
->is_pointer
++;
6391 yyval
.tmparm
->p
->t
->arraystr
= copy_string(ArrayString
);
6393 yyval
.tmparm
->args
= tm_parm
;
6394 delete yyvsp
[-2].type
;
6399 #line 4031 "parser.y"
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
++;
6407 fprintf(stderr
,"%s : Line %d. Warning. Use of C++ Reference detected. Use the -c++ option.\n", input_file
, line_number
);
6409 yyval
.tmparm
->args
= tm_parm
;
6410 delete yyvsp
[-2].type
;
6415 #line 4044 "parser.y"
6417 fprintf(stderr
,"%s : Line %d. Error. Function pointer not allowed (remap with typedef).\n", input_file
, line_number
);
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
;
6431 #line 4059 "parser.y"
6433 yyval
.id
= yyvsp
[-1].id
;
6438 #line 4063 "parser.y"
6441 ArrayBackup
<< ArrayString
;
6445 #line 4066 "parser.y"
6447 yyval
.id
= yyvsp
[-3].id
;
6448 InArray
= yyvsp
[-2].ivalue
;
6450 ArrayString
<< ArrayBackup
;
6454 #line 4072 "parser.y"
6457 ArrayBackup
<< ArrayString
;
6461 #line 4075 "parser.y"
6463 yyval
.id
= new char[1];
6465 InArray
= yyvsp
[-2].ivalue
;
6467 ArrayString
<< ArrayBackup
;
6471 #line 4082 "parser.y"
6472 { yyval
.id
= new char[1];
6478 #line 4088 "parser.y"
6480 tm_parm
= yyvsp
[-1].pl
;
6484 #line 4091 "parser.y"
6490 #line 4096 "parser.y"
6491 {yyval
.id
= yyvsp
[0].id
;;
6494 #line 4097 "parser.y"
6495 { yyval
.id
= yyvsp
[0].id
;;
6498 #line 4103 "parser.y"
6502 #line 4104 "parser.y"
6506 #line 4107 "parser.y"
6510 #line 4108 "parser.y"
6514 #line 4109 "parser.y"
6518 /* the action file gets copied in in place of this dollarsign */
6519 #line 498 "/usr/local/share/bison.simple"
6530 short *ssp1
= yyss
- 1;
6531 fprintf (stderr
, "state stack now");
6532 while (ssp1
!= yyssp
)
6533 fprintf (stderr
, " %d", *++ssp1
);
6534 fprintf (stderr
, "\n");
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
;
6552 yylsp
->last_line
= (yylsp
+yylen
-1)->last_line
;
6553 yylsp
->last_column
= (yylsp
+yylen
-1)->last_column
;
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. */
6564 yystate
= yypgoto
[yyn
- YYNTBASE
] + *yyssp
;
6565 if (yystate
>= 0 && yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
6566 yystate
= yytable
[yystate
];
6568 yystate
= yydefgoto
[yyn
- YYNTBASE
];
6572 yyerrlab
: /* here on detecting error */
6575 /* If not already recovering from an error, report this error. */
6579 #ifdef YYERROR_VERBOSE
6580 yyn
= yypact
[yystate
];
6582 if (yyn
> YYFLAG
&& yyn
< YYLAST
)
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);
6597 strcpy(msg
, "parse error");
6602 for (x
= (yyn
< 0 ? -yyn
: 0);
6603 x
< (sizeof(yytname
) / sizeof(char *)); x
++)
6604 if (yycheck
[x
+ yyn
] == x
)
6606 strcat(msg
, count
== 0 ? ", expecting `" : " or `");
6607 strcat(msg
, yytname
[x
]);
6616 yyerror ("parse error; also virtual memory exceeded");
6619 #endif /* YYERROR_VERBOSE */
6620 yyerror("parse error");
6624 yyerrlab1
: /* here on error raised explicitly by an action */
6626 if (yyerrstatus
== 3)
6628 /* if just tried and failed to reuse lookahead token after an error, discard it. */
6630 /* return failure if at end of input */
6631 if (yychar
== YYEOF
)
6636 fprintf(stderr
, "Discarding token %d (%s).\n", yychar
, yytname
[yychar1
]);
6642 /* Else will try to reuse lookahead token
6643 after shifting the error token. */
6645 yyerrstatus
= 3; /* Each real token shifted decrements this */
6649 yyerrdefault
: /* current state does not do anything special for the error token. */
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
;
6658 yyerrpop
: /* pop the current state because it cannot handle the error token */
6660 if (yyssp
== yyss
) YYABORT
;
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");
6680 yyn
= yypact
[yystate
];
6685 if (yyn
< 0 || yyn
> YYLAST
|| yycheck
[yyn
] != YYTERROR
)
6704 fprintf(stderr
, "Shifting error token, ");
6715 #line 4143 "parser.y"
6718 void error_recover() {
6721 while ((c
> 0) && (c
!= SEMI
))
6725 /* Called by the parser (yyparse) when an error is found.*/
6726 void yyerror (char *) {
6727 // Fprintf(stderr,"%s : Line %d. Syntax error.\n", input_file, line_number);