Apply automake everywhere
Keep configure scripts so that people are not *forced* to autoconf
Keep sources generated by yacc so that compilation without yacc
is possible.
Source/LParse/cscanner.c: change lyacc.h into parser.h to please
default yacc generation rules.
Use AC_CONFIG_SUBDIRS in configure.in instead of hand made script.
Update all relevant .cvsignore to include .deps
Fixed missing ; line 136 Source/Swig/swig.h
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@164 626c5289-ae23-0410-ae9c-e8d60b6d4f22
4269 lines
139 KiB
C
4269 lines
139 KiB
C
|
||
/* A Bison parser, made from parser.y
|
||
by GNU Bison version 1.27
|
||
*/
|
||
|
||
#define YYBISON 1 /* Identify Bison output. */
|
||
|
||
#define ID 257
|
||
#define TYPE_TYPEDEF 258
|
||
#define HBLOCK 259
|
||
#define STRING 260
|
||
#define NUM_INT 261
|
||
#define NUM_FLOAT 262
|
||
#define CHARCONST 263
|
||
#define NUM_UNSIGNED 264
|
||
#define NUM_LONG 265
|
||
#define NUM_ULONG 266
|
||
#define LPAREN 267
|
||
#define RPAREN 268
|
||
#define LBRACE 269
|
||
#define RBRACE 270
|
||
#define COMMA 271
|
||
#define SEMI 272
|
||
#define PERIOD 273
|
||
#define LBRACKET 274
|
||
#define RBRACKET 275
|
||
#define EQUAL 276
|
||
#define COLON 277
|
||
#define POUND 278
|
||
#define CONST 279
|
||
#define DEFINED 280
|
||
#define ENUM 281
|
||
#define EXTERN 282
|
||
#define SIZEOF 283
|
||
#define STATIC 284
|
||
#define STRUCT 285
|
||
#define TYPEDEF 286
|
||
#define UNION 287
|
||
#define CLASS 288
|
||
#define FRIEND 289
|
||
#define OPERATOR 290
|
||
#define PRIVATE 291
|
||
#define PROTECTED 292
|
||
#define PUBLIC 293
|
||
#define TEMPLATE 294
|
||
#define THROW 295
|
||
#define VIRTUAL 296
|
||
#define OC_INTERFACE 297
|
||
#define OC_END 298
|
||
#define OC_PUBLIC 299
|
||
#define OC_PRIVATE 300
|
||
#define OC_PROTECTED 301
|
||
#define OC_CLASS 302
|
||
#define OC_IMPLEMENT 303
|
||
#define OC_PROTOCOL 304
|
||
#define TYPE_INT 305
|
||
#define TYPE_UNSIGNED 306
|
||
#define TYPE_SHORT 307
|
||
#define TYPE_LONG 308
|
||
#define TYPE_FLOAT 309
|
||
#define TYPE_DOUBLE 310
|
||
#define TYPE_CHAR 311
|
||
#define TYPE_VOID 312
|
||
#define TYPE_SIGNED 313
|
||
#define TYPE_BOOL 314
|
||
#define ADDMETHODS 315
|
||
#define ALPHA_MODE 316
|
||
#define APPLY 317
|
||
#define CHECKOUT 318
|
||
#define CLEAR 319
|
||
#define CONSTANT 320
|
||
#define DOCONLY 321
|
||
#define DOC_DISABLE 322
|
||
#define DOC_ENABLE 323
|
||
#define ECHO 324
|
||
#define EXCEPT 325
|
||
#define ILLEGAL 326
|
||
#define IMPORT 327
|
||
#define INCLUDE 328
|
||
#define INIT 329
|
||
#define INLINE 330
|
||
#define LOCALSTYLE 331
|
||
#define MACRO 332
|
||
#define MODULE 333
|
||
#define NAME 334
|
||
#define NATIVE 335
|
||
#define NEW 336
|
||
#define PRAGMA 337
|
||
#define RAW_MODE 338
|
||
#define READONLY 339
|
||
#define READWRITE 340
|
||
#define RENAME 341
|
||
#define SECTION 342
|
||
#define STYLE 343
|
||
#define SUBSECTION 344
|
||
#define SUBSUBSECTION 345
|
||
#define TEXT 346
|
||
#define TITLE 347
|
||
#define TYPE 348
|
||
#define TYPEMAP 349
|
||
#define USERDIRECTIVE 350
|
||
#define WEXTERN 351
|
||
#define WRAPPER 352
|
||
#define LOR 353
|
||
#define LAND 354
|
||
#define EQUALTO 355
|
||
#define NOTEQUAL 356
|
||
#define GREATERTHAN 357
|
||
#define LESSTHAN 358
|
||
#define LTEQUAL 359
|
||
#define GTEQUAL 360
|
||
#define OR 361
|
||
#define XOR 362
|
||
#define AND 363
|
||
#define LSHIFT 364
|
||
#define RSHIFT 365
|
||
#define PLUS 366
|
||
#define MINUS 367
|
||
#define STAR 368
|
||
#define SLASH 369
|
||
#define UMINUS 370
|
||
#define NOT 371
|
||
#define LNOT 372
|
||
#define DCOLON 373
|
||
|
||
#line 1 "parser.y"
|
||
|
||
/* -----------------------------------------------------------------------------
|
||
* parser.y
|
||
*
|
||
* YACC grammar for Dave's lame C parser. Based loosely on the SWIG1.1
|
||
* parser
|
||
*
|
||
* Author(s) : David Beazley (beazley@cs.uchicago.edu)
|
||
*
|
||
* Copyright (C) 1999-2000. The University of Chicago
|
||
* See the file LICENSE for information on usage and redistribution.
|
||
* ----------------------------------------------------------------------------- */
|
||
|
||
/* These defines are to move the bison generated functions into their own namespace */
|
||
|
||
#define yylex lparse_yylex
|
||
#define yyerror lparse_yyerror
|
||
#define yyparse lparse_yyparse
|
||
#define yylval lparse_yylval
|
||
#define yychar lparse_yychar
|
||
#define yynerrs lparse_yynerrs
|
||
|
||
static char cvsroot[] = "$Header$";
|
||
|
||
extern int lparse_yylex();
|
||
extern void LParse_strict_type(int);
|
||
|
||
void yyerror (char *s);
|
||
|
||
#include "lparse.h"
|
||
#include "preprocessor.h"
|
||
|
||
#define CPLUS_PRIVATE 1
|
||
#define CPLUS_PUBLIC 2
|
||
|
||
static DOH *top = 0;
|
||
static DOH *swig_rename = 0;
|
||
static LParseType *Active_typedef = 0;
|
||
static LParseType *Active_type = 0;
|
||
static DOH *Active_extern = 0;
|
||
static DOH *name_hash = 0;
|
||
static int NewObject = 0;
|
||
static int cplus_mode = CPLUS_PUBLIC;
|
||
static DOH *nested = 0;
|
||
static int Intype = 0;
|
||
|
||
/* LParse_parse() - Main entry point to the C parser */
|
||
DOH *LParse_parse(DOH *str) {
|
||
int yyparse();
|
||
DOH *tp;
|
||
LParse_push(str);
|
||
top = NewHash();
|
||
nested = NewList();
|
||
Setattr(top, "tag", "IncludeFile");
|
||
Setattr(top,"name", Getfile(str));
|
||
name_hash = NewHash();
|
||
tp = top;
|
||
yyparse();
|
||
return tp;
|
||
}
|
||
|
||
static void add_child(DOH *o) {
|
||
DOH *child;
|
||
assert(top);
|
||
|
||
child = Getattr(top,"children");
|
||
if (!child) {
|
||
child = NewList();
|
||
Setattr(top,"children", child);
|
||
}
|
||
Setattr(o,"parent", top);
|
||
Append(child,o);
|
||
}
|
||
|
||
static void apply_modifier(DOH *o) {
|
||
DOH *n;
|
||
if (swig_rename) {
|
||
Setattr(o,"rename",swig_rename);
|
||
}
|
||
n = Getattr(name_hash,Getattr(o,"name"));
|
||
if (n) {
|
||
Setattr(o,"rename",n);
|
||
}
|
||
if (NewObject) Setattr(o,"new",DohNone);
|
||
NewObject = 0;
|
||
swig_rename = 0;
|
||
}
|
||
|
||
static DOH *new_node(char *tag, DOH *file, int line) {
|
||
DOH *o;
|
||
o = NewHash();
|
||
Setattr(o,"tag",tag);
|
||
Setline(o,line);
|
||
Setfile(o,file);
|
||
add_child(o);
|
||
return o;
|
||
}
|
||
|
||
static void dump_nested(DOH *name) {
|
||
int i;
|
||
for (i = 0; i < Len(nested); i++) {
|
||
DOH *code;
|
||
LParseType *t;
|
||
DOH *o = Getitem(nested,i);
|
||
code = Getattr(o,"code");
|
||
Replace(code,"$classname",name,DOH_REPLACE_ANY);
|
||
t = (LParseType *) Getattr(o,"type");
|
||
sprintf(t->name,"%s_%s",Char(name),Char(Getattr(o,"name")));
|
||
o = new_node("HeaderBlock",Getfile(code),Getline(code));
|
||
Setattr(o,"text",code);
|
||
o = new_node("MemberData",Getfile(code),Getline(code));
|
||
Setattr(o,"name",Getattr(o,"name"));
|
||
Setattr(o,"type",t);
|
||
Seek(code,0,SEEK_SET);
|
||
/* Printf(stderr,"NESTED : %s\n", code); */
|
||
LParse_push(code);
|
||
}
|
||
Clear(nested);
|
||
}
|
||
|
||
#ifdef NEED_ALLOC
|
||
void *alloca(unsigned n) {
|
||
return((void *) malloc(n));
|
||
}
|
||
#else
|
||
/* This redefinition is apparently needed on a number of machines */
|
||
#undef alloca
|
||
#define alloca malloc
|
||
#endif
|
||
|
||
/* Promote the type of arithmetic expressions */
|
||
static int promote(int t1, int t2) {
|
||
|
||
if ((t1 == LPARSE_T_ERROR) || (t2 == LPARSE_T_ERROR)) return LPARSE_T_ERROR;
|
||
if ((t1 == LPARSE_T_DOUBLE) || (t2 == LPARSE_T_DOUBLE)) return LPARSE_T_DOUBLE;
|
||
if ((t1 == LPARSE_T_FLOAT) || (t2 == LPARSE_T_FLOAT)) return LPARSE_T_FLOAT;
|
||
if ((t1 == LPARSE_T_ULONG) || (t2 == LPARSE_T_ULONG)) return LPARSE_T_ULONG;
|
||
if ((t1 == LPARSE_T_LONG) || (t2 == LPARSE_T_LONG)) return LPARSE_T_LONG;
|
||
if ((t1 == LPARSE_T_UINT) || (t2 == LPARSE_T_UINT)) return LPARSE_T_UINT;
|
||
if ((t1 == LPARSE_T_INT) || (t2 == LPARSE_T_INT)) return LPARSE_T_INT;
|
||
if ((t1 == LPARSE_T_USHORT) || (t2 == LPARSE_T_USHORT)) return LPARSE_T_SHORT;
|
||
if ((t1 == LPARSE_T_SHORT) || (t2 == LPARSE_T_SHORT)) return LPARSE_T_SHORT;
|
||
if ((t1 == LPARSE_T_UCHAR) || (t2 == LPARSE_T_UCHAR)) return LPARSE_T_UCHAR;
|
||
if ((t1 == LPARSE_T_CHAR) || (t2 == LPARSE_T_CHAR)) return LPARSE_T_INT;
|
||
if (t1 != t2) {
|
||
LParse_error(0,0,"Type mismatch in constant expression.\n");
|
||
}
|
||
return t1;
|
||
}
|
||
|
||
#line 152 "parser.y"
|
||
typedef union {
|
||
struct {
|
||
DOH *filename;
|
||
int line;
|
||
DOH *text;
|
||
int ivalue;
|
||
void *data;
|
||
} tok;
|
||
DOH *node;
|
||
LParseType *type;
|
||
struct {
|
||
DOH *id;
|
||
int is_pointer;
|
||
int is_reference;
|
||
} decl;
|
||
struct {
|
||
DOH *name;
|
||
DOH *value;
|
||
DOH *array;
|
||
} pname;
|
||
struct {
|
||
DOH *name;
|
||
DOH *array;
|
||
DOH *parms;
|
||
} tmname;
|
||
} YYSTYPE;
|
||
#include <stdio.h>
|
||
|
||
#ifndef __cplusplus
|
||
#ifndef __STDC__
|
||
#define const
|
||
#endif
|
||
#endif
|
||
|
||
|
||
|
||
#define YYFINAL 629
|
||
#define YYFLAG -32768
|
||
#define YYNTBASE 120
|
||
|
||
#define YYTRANSLATE(x) ((unsigned)(x) <= 373 ? yytranslate[x] : 225)
|
||
|
||
static const char yytranslate[] = { 0,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
|
||
7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
|
||
17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
|
||
27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
|
||
37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
|
||
47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
|
||
57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
|
||
67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
|
||
77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
|
||
87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
|
||
97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
|
||
107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
|
||
117, 118, 119
|
||
};
|
||
|
||
#if YYDEBUG != 0
|
||
static const short yyprhs[] = { 0,
|
||
0, 3, 5, 7, 9, 10, 15, 17, 19, 22,
|
||
23, 34, 39, 44, 47, 50, 52, 54, 56, 58,
|
||
60, 62, 64, 66, 71, 72, 79, 81, 83, 85,
|
||
87, 89, 90, 97, 98, 102, 104, 107, 110, 113,
|
||
115, 117, 121, 125, 129, 133, 136, 138, 141, 144,
|
||
148, 153, 155, 158, 161, 163, 165, 167, 169, 178,
|
||
185, 194, 201, 212, 221, 227, 231, 233, 235, 238,
|
||
242, 244, 247, 251, 255, 258, 262, 265, 267, 271,
|
||
273, 279, 282, 288, 291, 296, 304, 307, 309, 310,
|
||
316, 318, 320, 322, 324, 326, 328, 329, 337, 342,
|
||
343, 353, 361, 362, 371, 379, 381, 382, 389, 390,
|
||
398, 400, 403, 405, 408, 410, 413, 415, 416, 425,
|
||
426, 427, 439, 441, 443, 447, 449, 451, 455, 457,
|
||
458, 465, 476, 488, 489, 497, 501, 505, 507, 509,
|
||
511, 512, 521, 522, 523, 535, 536, 537, 547, 550,
|
||
552, 554, 558, 560, 563, 567, 570, 574, 576, 578,
|
||
580, 583, 584, 585, 593, 594, 598, 600, 607, 615,
|
||
621, 628, 636, 637, 643, 648, 649, 655, 663, 666,
|
||
669, 672, 674, 675, 683, 685, 689, 691, 693, 694,
|
||
701, 702, 708, 710, 712, 714, 715, 721, 722, 729,
|
||
732, 735, 737, 739, 741, 745, 749, 752, 754, 756,
|
||
760, 763, 768, 773, 775, 776, 783, 786, 788, 792,
|
||
794, 797, 801, 805, 814, 818, 821, 824, 826, 828,
|
||
831, 835, 838, 840, 842, 845, 848, 851, 854, 858,
|
||
863, 865, 867, 869, 872, 875, 877, 879, 881, 883,
|
||
885, 888, 891, 894, 897, 900, 904, 907, 910, 912,
|
||
915, 918, 920, 922, 924, 926, 928, 931, 934, 937,
|
||
940, 943, 946, 948, 950, 952, 954, 957, 960, 962,
|
||
964, 966, 969, 972, 974, 976, 978, 980, 982, 984,
|
||
986, 988, 990, 992, 994, 996, 998, 1000, 1003, 1007,
|
||
1011, 1015, 1019, 1023, 1027, 1031, 1035, 1039, 1042, 1045,
|
||
1049, 1053, 1055
|
||
};
|
||
|
||
static const short yyrhs[] = { 120,
|
||
121, 0, 224, 0, 123, 0, 149, 0, 0, 15,
|
||
122, 120, 16, 0, 18, 0, 1, 0, 79, 136,
|
||
0, 0, 78, 3, 17, 6, 17, 7, 15, 124,
|
||
120, 16, 0, 87, 3, 3, 18, 0, 66, 3,
|
||
221, 18, 0, 70, 5, 0, 70, 6, 0, 125,
|
||
0, 131, 0, 132, 0, 137, 0, 144, 0, 145,
|
||
0, 128, 0, 147, 0, 94, 3, 223, 18, 0,
|
||
0, 127, 6, 15, 126, 120, 16, 0, 74, 0,
|
||
97, 0, 73, 0, 85, 0, 86, 0, 0, 80,
|
||
13, 136, 14, 129, 121, 0, 0, 82, 130, 121,
|
||
0, 5, 0, 98, 5, 0, 75, 5, 0, 76,
|
||
5, 0, 69, 0, 68, 0, 93, 6, 134, 0,
|
||
88, 6, 134, 0, 90, 6, 134, 0, 91, 6,
|
||
134, 0, 92, 5, 0, 67, 0, 89, 133, 0,
|
||
77, 133, 0, 3, 135, 134, 0, 134, 17, 3,
|
||
135, 0, 224, 0, 22, 7, 0, 22, 6, 0,
|
||
224, 0, 3, 0, 4, 0, 6, 0, 95, 13,
|
||
3, 17, 138, 14, 139, 15, 0, 95, 13, 138,
|
||
14, 139, 15, 0, 95, 13, 3, 17, 138, 14,
|
||
139, 18, 0, 95, 13, 138, 14, 139, 18, 0,
|
||
95, 13, 3, 17, 138, 14, 139, 22, 141, 18,
|
||
0, 95, 13, 138, 14, 139, 22, 141, 18, 0,
|
||
63, 141, 15, 139, 16, 0, 65, 139, 18, 0,
|
||
3, 0, 25, 0, 141, 140, 0, 17, 141, 140,
|
||
0, 224, 0, 214, 142, 0, 214, 211, 142, 0,
|
||
214, 109, 142, 0, 3, 143, 0, 3, 212, 143,
|
||
0, 212, 143, 0, 143, 0, 13, 205, 14, 0,
|
||
224, 0, 71, 13, 3, 14, 15, 0, 71, 15,
|
||
0, 71, 13, 3, 14, 18, 0, 71, 18, 0,
|
||
83, 3, 146, 18, 0, 83, 13, 3, 14, 3,
|
||
146, 18, 0, 22, 221, 0, 224, 0, 0, 81,
|
||
15, 148, 120, 16, 0, 150, 0, 152, 0, 161,
|
||
0, 168, 0, 172, 0, 30, 0, 0, 158, 214,
|
||
210, 213, 209, 151, 155, 0, 158, 215, 13, 114,
|
||
0, 0, 158, 214, 210, 13, 205, 14, 160, 153,
|
||
155, 0, 158, 214, 210, 13, 205, 14, 159, 0,
|
||
0, 158, 210, 13, 205, 14, 160, 154, 155, 0,
|
||
76, 214, 210, 13, 205, 14, 159, 0, 18, 0,
|
||
0, 17, 210, 213, 209, 156, 155, 0, 0, 17,
|
||
210, 13, 205, 14, 157, 155, 0, 28, 0, 28,
|
||
6, 0, 224, 0, 160, 15, 0, 25, 0, 41,
|
||
13, 0, 224, 0, 0, 158, 27, 165, 15, 162,
|
||
166, 16, 18, 0, 0, 0, 32, 27, 165, 15,
|
||
163, 166, 16, 3, 164, 171, 18, 0, 3, 0,
|
||
224, 0, 166, 17, 167, 0, 167, 0, 3, 0,
|
||
3, 22, 222, 0, 224, 0, 0, 32, 214, 210,
|
||
169, 171, 18, 0, 32, 214, 13, 114, 208, 14,
|
||
13, 205, 14, 18, 0, 32, 214, 211, 13, 114,
|
||
208, 14, 13, 205, 14, 18, 0, 0, 32, 214,
|
||
210, 212, 170, 171, 18, 0, 17, 210, 171, 0,
|
||
17, 210, 212, 0, 224, 0, 173, 0, 203, 0,
|
||
0, 158, 220, 3, 179, 15, 174, 183, 16, 0,
|
||
0, 0, 32, 220, 3, 179, 15, 175, 183, 16,
|
||
210, 176, 171, 0, 0, 0, 32, 220, 15, 177,
|
||
183, 16, 210, 178, 171, 0, 23, 180, 0, 224,
|
||
0, 181, 0, 180, 17, 181, 0, 3, 0, 42,
|
||
3, 0, 42, 182, 3, 0, 182, 3, 0, 182,
|
||
42, 3, 0, 39, 0, 37, 0, 38, 0, 187,
|
||
183, 0, 0, 0, 61, 15, 184, 183, 16, 185,
|
||
183, 0, 0, 1, 186, 183, 0, 224, 0, 214,
|
||
210, 13, 205, 14, 197, 0, 42, 214, 210, 13,
|
||
205, 14, 197, 0, 3, 13, 205, 14, 199, 0,
|
||
117, 3, 13, 205, 14, 197, 0, 42, 117, 3,
|
||
13, 205, 14, 197, 0, 0, 214, 210, 209, 188,
|
||
194, 0, 214, 210, 212, 209, 0, 0, 30, 214,
|
||
210, 189, 194, 0, 30, 214, 210, 13, 205, 14,
|
||
197, 0, 39, 23, 0, 37, 23, 0, 38, 23,
|
||
0, 128, 0, 0, 27, 165, 15, 190, 166, 16,
|
||
18, 0, 35, 0, 214, 198, 36, 0, 168, 0,
|
||
145, 0, 0, 220, 3, 15, 191, 193, 18, 0,
|
||
0, 220, 15, 192, 210, 18, 0, 210, 0, 224,
|
||
0, 18, 0, 0, 17, 210, 209, 195, 194, 0,
|
||
0, 17, 210, 212, 209, 196, 194, 0, 160, 18,
|
||
0, 160, 15, 0, 211, 0, 109, 0, 224, 0,
|
||
160, 200, 18, 0, 160, 200, 15, 0, 23, 201,
|
||
0, 224, 0, 202, 0, 201, 17, 202, 0, 3,
|
||
13, 0, 158, 220, 3, 18, 0, 158, 214, 210,
|
||
119, 0, 40, 0, 0, 61, 3, 15, 204, 183,
|
||
16, 0, 207, 206, 0, 224, 0, 17, 207, 206,
|
||
0, 224, 0, 214, 208, 0, 214, 211, 208, 0,
|
||
214, 109, 208, 0, 214, 13, 211, 208, 14, 13,
|
||
205, 14, 0, 19, 19, 19, 0, 3, 209, 0,
|
||
3, 212, 0, 212, 0, 224, 0, 22, 221, 0,
|
||
22, 109, 3, 0, 22, 15, 0, 224, 0, 3,
|
||
0, 211, 3, 0, 109, 3, 0, 114, 224, 0,
|
||
114, 211, 0, 20, 21, 213, 0, 20, 222, 21,
|
||
213, 0, 212, 0, 224, 0, 51, 0, 53, 219,
|
||
0, 54, 219, 0, 57, 0, 60, 0, 55, 0,
|
||
56, 0, 58, 0, 59, 217, 0, 52, 218, 0,
|
||
3, 216, 0, 25, 214, 0, 220, 3, 0, 3,
|
||
119, 3, 0, 119, 3, 0, 27, 3, 0, 51,
|
||
0, 53, 219, 0, 54, 219, 0, 57, 0, 60,
|
||
0, 55, 0, 56, 0, 58, 0, 59, 217, 0,
|
||
52, 218, 0, 4, 216, 0, 25, 214, 0, 220,
|
||
3, 0, 27, 3, 0, 104, 0, 224, 0, 224,
|
||
0, 51, 0, 53, 219, 0, 54, 219, 0, 57,
|
||
0, 224, 0, 51, 0, 53, 219, 0, 54, 219,
|
||
0, 57, 0, 51, 0, 224, 0, 34, 0, 31,
|
||
0, 33, 0, 222, 0, 6, 0, 7, 0, 8,
|
||
0, 10, 0, 11, 0, 12, 0, 9, 0, 29,
|
||
13, 0, 222, 112, 222, 0, 222, 113, 222, 0,
|
||
222, 114, 222, 0, 222, 115, 222, 0, 222, 109,
|
||
222, 0, 222, 107, 222, 0, 222, 108, 222, 0,
|
||
222, 110, 222, 0, 222, 111, 222, 0, 113, 222,
|
||
0, 117, 222, 0, 13, 222, 14, 0, 223, 17,
|
||
3, 0, 224, 0, 0
|
||
};
|
||
|
||
#endif
|
||
|
||
#if YYDEBUG != 0
|
||
static const short yyrline[] = { 0,
|
||
233, 234, 237, 238, 239, 242, 245, 246, 252, 257,
|
||
260, 265, 266, 273, 274, 275, 276, 277, 278, 279,
|
||
280, 281, 282, 283, 298, 302, 307, 308, 309, 314,
|
||
315, 316, 316, 317, 317, 322, 326, 330, 334, 347,
|
||
350, 356, 364, 371, 378, 386, 392, 397, 404, 411,
|
||
421, 428, 433, 436, 439, 444, 445, 446, 452, 469,
|
||
486, 501, 515, 533, 550, 560, 567, 570, 576, 582,
|
||
586, 589, 601, 614, 630, 635, 640, 645, 652, 655,
|
||
663, 672, 680, 687, 693, 698, 706, 709, 717, 720,
|
||
729, 730, 731, 732, 733, 734, 739, 759, 763, 772,
|
||
786, 790, 810, 825, 829, 847, 848, 866, 867, 880,
|
||
883, 887, 891, 897, 900, 901, 902, 907, 912, 921,
|
||
926, 937, 942, 943, 946, 947, 950, 955, 960, 963,
|
||
971, 975, 991, 1008, 1018, 1021, 1033, 1044, 1052, 1053,
|
||
1056, 1073, 1082, 1099, 1124, 1128, 1138, 1158, 1161, 1164,
|
||
1169, 1173, 1180, 1184, 1188, 1196, 1204, 1214, 1215, 1216,
|
||
1219, 1220, 1223, 1225, 1226, 1229, 1230, 1233, 1246, 1260,
|
||
1272, 1282, 1294, 1305, 1307, 1326, 1337, 1341, 1356, 1360,
|
||
1364, 1366, 1368, 1373, 1381, 1386, 1391, 1395, 1411, 1413,
|
||
1439, 1441, 1466, 1467, 1470, 1471, 1482, 1483, 1498, 1501,
|
||
1504, 1509, 1510, 1511, 1516, 1517, 1520, 1521, 1524, 1525,
|
||
1528, 1532, 1541, 1546, 1552, 1557, 1568, 1572, 1575, 1579,
|
||
1582, 1593, 1606, 1620, 1630, 1639, 1644, 1649, 1654, 1661,
|
||
1662, 1667, 1672, 1680, 1684, 1689, 1696, 1697, 1700, 1705,
|
||
1711, 1714, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727,
|
||
1728, 1735, 1742, 1755, 1759, 1763, 1769, 1774, 1783, 1784,
|
||
1785, 1786, 1787, 1788, 1789, 1790, 1791, 1798, 1805, 1814,
|
||
1818, 1822, 1830, 1833, 1837, 1838, 1842, 1846, 1850, 1857,
|
||
1858, 1862, 1866, 1870, 1875, 1876, 1879, 1880, 1881, 1888,
|
||
1891, 1897, 1901, 1905, 1909, 1913, 1917, 1922, 1952, 1957,
|
||
1962, 1967, 1972, 1980, 1989, 1998, 2007, 2016, 2021, 2029,
|
||
2036, 2039, 2044
|
||
};
|
||
#endif
|
||
|
||
|
||
#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
|
||
|
||
static const char * const yytname[] = { "$","error","$undefined.","ID","TYPE_TYPEDEF",
|
||
"HBLOCK","STRING","NUM_INT","NUM_FLOAT","CHARCONST","NUM_UNSIGNED","NUM_LONG",
|
||
"NUM_ULONG","LPAREN","RPAREN","LBRACE","RBRACE","COMMA","SEMI","PERIOD","LBRACKET",
|
||
"RBRACKET","EQUAL","COLON","POUND","CONST","DEFINED","ENUM","EXTERN","SIZEOF",
|
||
"STATIC","STRUCT","TYPEDEF","UNION","CLASS","FRIEND","OPERATOR","PRIVATE","PROTECTED",
|
||
"PUBLIC","TEMPLATE","THROW","VIRTUAL","OC_INTERFACE","OC_END","OC_PUBLIC","OC_PRIVATE",
|
||
"OC_PROTECTED","OC_CLASS","OC_IMPLEMENT","OC_PROTOCOL","TYPE_INT","TYPE_UNSIGNED",
|
||
"TYPE_SHORT","TYPE_LONG","TYPE_FLOAT","TYPE_DOUBLE","TYPE_CHAR","TYPE_VOID",
|
||
"TYPE_SIGNED","TYPE_BOOL","ADDMETHODS","ALPHA_MODE","APPLY","CHECKOUT","CLEAR",
|
||
"CONSTANT","DOCONLY","DOC_DISABLE","DOC_ENABLE","ECHO","EXCEPT","ILLEGAL","IMPORT",
|
||
"INCLUDE","INIT","INLINE","LOCALSTYLE","MACRO","MODULE","NAME","NATIVE","NEW",
|
||
"PRAGMA","RAW_MODE","READONLY","READWRITE","RENAME","SECTION","STYLE","SUBSECTION",
|
||
"SUBSUBSECTION","TEXT","TITLE","TYPE","TYPEMAP","USERDIRECTIVE","WEXTERN","WRAPPER",
|
||
"LOR","LAND","EQUALTO","NOTEQUAL","GREATERTHAN","LESSTHAN","LTEQUAL","GTEQUAL",
|
||
"OR","XOR","AND","LSHIFT","RSHIFT","PLUS","MINUS","STAR","SLASH","UMINUS","NOT",
|
||
"LNOT","DCOLON","interface","statement","@1","swig_directive","@2","file_include",
|
||
"@3","file_include_type","modifier_directive","@4","@5","code_block","doc_directive",
|
||
"stylelist","styletail","stylearg","idstring","typemap_directive","tm_method",
|
||
"tm_list","tm_tail","tm_parm","tm_name","tm_args","except_directive","pragma_directive",
|
||
"pragma_arg","native_directive","@6","c_declaration","variable_decl","@7","function_decl",
|
||
"@8","@9","stail","@10","@11","extern_spec","func_end","cpp_const","enum_decl",
|
||
"@12","@13","@14","ename","enumlist","edecl","typedef_decl","@15","@16","typedeflist",
|
||
"cpp_decl","cpp_class","@17","@18","@19","@20","@21","inherit","base_list","base_specifier",
|
||
"access_specifier","cpp_members","@22","@23","@24","cpp_member","@25","@26",
|
||
"@27","@28","@29","nested_decl","cpp_tail","@30","@31","cpp_end","type_extra",
|
||
"ctor_end","ctor_initializer","mem_initializer_list","mem_initializer","cpp_other",
|
||
"@32","parms","ptail","parm","pname","def_args","declaration","stars","array",
|
||
"array2","type","strict_type","template_decl","opt_signed","opt_unsigned","opt_int",
|
||
"cpptype","definetype","expr","idlist","empty", NULL
|
||
};
|
||
#endif
|
||
|
||
static const short yyr1[] = { 0,
|
||
120, 120, 121, 121, 122, 121, 121, 121, 123, 124,
|
||
123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
|
||
123, 123, 123, 123, 126, 125, 127, 127, 127, 128,
|
||
128, 129, 128, 130, 128, 131, 131, 131, 131, 132,
|
||
132, 132, 132, 132, 132, 132, 132, 132, 132, 133,
|
||
134, 134, 135, 135, 135, 136, 136, 136, 137, 137,
|
||
137, 137, 137, 137, 137, 137, 138, 138, 139, 140,
|
||
140, 141, 141, 141, 142, 142, 142, 142, 143, 143,
|
||
144, 144, 144, 144, 145, 145, 146, 146, 148, 147,
|
||
149, 149, 149, 149, 149, 149, 151, 150, 150, 153,
|
||
152, 152, 154, 152, 152, 155, 156, 155, 157, 155,
|
||
158, 158, 158, 159, 160, 160, 160, 162, 161, 163,
|
||
164, 161, 165, 165, 166, 166, 167, 167, 167, 169,
|
||
168, 168, 168, 170, 168, 171, 171, 171, 172, 172,
|
||
174, 173, 175, 176, 173, 177, 178, 173, 179, 179,
|
||
180, 180, 181, 181, 181, 181, 181, 182, 182, 182,
|
||
183, 184, 185, 183, 186, 183, 183, 187, 187, 187,
|
||
187, 187, 188, 187, 187, 189, 187, 187, 187, 187,
|
||
187, 187, 190, 187, 187, 187, 187, 187, 191, 187,
|
||
192, 187, 193, 193, 194, 195, 194, 196, 194, 197,
|
||
197, 198, 198, 198, 199, 199, 200, 200, 201, 201,
|
||
202, 203, 203, 203, 204, 203, 205, 205, 206, 206,
|
||
207, 207, 207, 207, 207, 208, 208, 208, 208, 209,
|
||
209, 209, 209, 210, 210, 210, 211, 211, 212, 212,
|
||
213, 213, 214, 214, 214, 214, 214, 214, 214, 214,
|
||
214, 214, 214, 214, 214, 214, 214, 214, 215, 215,
|
||
215, 215, 215, 215, 215, 215, 215, 215, 215, 215,
|
||
215, 215, 216, 216, 217, 217, 217, 217, 217, 218,
|
||
218, 218, 218, 218, 219, 219, 220, 220, 220, 221,
|
||
221, 222, 222, 222, 222, 222, 222, 222, 222, 222,
|
||
222, 222, 222, 222, 222, 222, 222, 222, 222, 222,
|
||
223, 223, 224
|
||
};
|
||
|
||
static const short yyr2[] = { 0,
|
||
2, 1, 1, 1, 0, 4, 1, 1, 2, 0,
|
||
10, 4, 4, 2, 2, 1, 1, 1, 1, 1,
|
||
1, 1, 1, 4, 0, 6, 1, 1, 1, 1,
|
||
1, 0, 6, 0, 3, 1, 2, 2, 2, 1,
|
||
1, 3, 3, 3, 3, 2, 1, 2, 2, 3,
|
||
4, 1, 2, 2, 1, 1, 1, 1, 8, 6,
|
||
8, 6, 10, 8, 5, 3, 1, 1, 2, 3,
|
||
1, 2, 3, 3, 2, 3, 2, 1, 3, 1,
|
||
5, 2, 5, 2, 4, 7, 2, 1, 0, 5,
|
||
1, 1, 1, 1, 1, 1, 0, 7, 4, 0,
|
||
9, 7, 0, 8, 7, 1, 0, 6, 0, 7,
|
||
1, 2, 1, 2, 1, 2, 1, 0, 8, 0,
|
||
0, 11, 1, 1, 3, 1, 1, 3, 1, 0,
|
||
6, 10, 11, 0, 7, 3, 3, 1, 1, 1,
|
||
0, 8, 0, 0, 11, 0, 0, 9, 2, 1,
|
||
1, 3, 1, 2, 3, 2, 3, 1, 1, 1,
|
||
2, 0, 0, 7, 0, 3, 1, 6, 7, 5,
|
||
6, 7, 0, 5, 4, 0, 5, 7, 2, 2,
|
||
2, 1, 0, 7, 1, 3, 1, 1, 0, 6,
|
||
0, 5, 1, 1, 1, 0, 5, 0, 6, 2,
|
||
2, 1, 1, 1, 3, 3, 2, 1, 1, 3,
|
||
2, 4, 4, 1, 0, 6, 2, 1, 3, 1,
|
||
2, 3, 3, 8, 3, 2, 2, 1, 1, 2,
|
||
3, 2, 1, 1, 2, 2, 2, 2, 3, 4,
|
||
1, 1, 1, 2, 2, 1, 1, 1, 1, 1,
|
||
2, 2, 2, 2, 2, 3, 2, 2, 1, 2,
|
||
2, 1, 1, 1, 1, 1, 2, 2, 2, 2,
|
||
2, 2, 1, 1, 1, 1, 2, 2, 1, 1,
|
||
1, 2, 2, 1, 1, 1, 1, 1, 1, 1,
|
||
1, 1, 1, 1, 1, 1, 1, 2, 3, 3,
|
||
3, 3, 3, 3, 3, 3, 3, 2, 2, 3,
|
||
3, 1, 0
|
||
};
|
||
|
||
static const short yydefact[] = { 313,
|
||
0, 2, 8, 36, 5, 7, 111, 96, 0, 214,
|
||
0, 0, 0, 0, 47, 41, 40, 0, 0, 29,
|
||
27, 0, 0, 0, 0, 0, 0, 0, 34, 0,
|
||
30, 31, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 28, 0, 1, 3, 16, 0, 22, 17, 18,
|
||
19, 20, 21, 23, 4, 91, 92, 0, 93, 94,
|
||
95, 139, 140, 113, 313, 112, 313, 0, 313, 288,
|
||
289, 287, 243, 313, 313, 313, 248, 249, 246, 250,
|
||
313, 247, 0, 0, 0, 0, 0, 0, 313, 0,
|
||
0, 313, 0, 14, 15, 0, 82, 84, 38, 39,
|
||
0, 313, 49, 0, 56, 57, 58, 9, 0, 89,
|
||
0, 313, 0, 0, 313, 48, 313, 313, 46, 313,
|
||
313, 0, 37, 0, 313, 313, 0, 313, 243, 313,
|
||
313, 313, 248, 249, 246, 250, 313, 247, 0, 313,
|
||
0, 0, 0, 0, 0, 0, 273, 0, 253, 274,
|
||
254, 258, 0, 124, 281, 313, 313, 284, 252, 280,
|
||
285, 244, 286, 245, 276, 313, 313, 279, 251, 275,
|
||
257, 234, 0, 130, 0, 255, 146, 215, 258, 0,
|
||
313, 313, 0, 313, 72, 78, 313, 313, 80, 255,
|
||
66, 0, 69, 71, 291, 292, 293, 297, 294, 295,
|
||
296, 0, 0, 0, 0, 0, 290, 0, 0, 0,
|
||
313, 55, 0, 0, 313, 35, 0, 0, 88, 0,
|
||
0, 43, 52, 44, 45, 42, 0, 312, 67, 68,
|
||
0, 25, 269, 254, 258, 0, 252, 244, 245, 251,
|
||
236, 238, 237, 313, 235, 313, 0, 255, 6, 256,
|
||
120, 282, 283, 277, 278, 313, 313, 134, 0, 0,
|
||
0, 150, 0, 0, 0, 75, 313, 0, 0, 313,
|
||
313, 218, 313, 0, 74, 73, 77, 313, 0, 298,
|
||
308, 309, 13, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 0, 313, 54, 53, 50, 0, 32, 0,
|
||
87, 85, 0, 12, 0, 0, 24, 0, 0, 313,
|
||
118, 0, 313, 213, 241, 313, 242, 99, 212, 0,
|
||
313, 313, 0, 228, 229, 0, 0, 138, 313, 313,
|
||
153, 159, 160, 158, 0, 149, 151, 0, 143, 165,
|
||
313, 313, 0, 0, 185, 0, 0, 0, 0, 0,
|
||
0, 182, 188, 187, 0, 0, 313, 0, 167, 0,
|
||
65, 76, 0, 79, 0, 217, 220, 0, 313, 221,
|
||
313, 239, 313, 70, 310, 304, 305, 303, 306, 307,
|
||
299, 300, 301, 302, 81, 83, 0, 0, 0, 90,
|
||
313, 313, 311, 67, 0, 0, 0, 313, 313, 0,
|
||
0, 97, 233, 141, 127, 0, 126, 129, 226, 227,
|
||
0, 313, 131, 0, 0, 154, 0, 0, 156, 0,
|
||
0, 0, 313, 0, 0, 180, 181, 179, 0, 0,
|
||
162, 0, 0, 161, 203, 0, 313, 202, 204, 255,
|
||
191, 216, 225, 313, 313, 223, 222, 240, 313, 0,
|
||
33, 0, 51, 0, 60, 62, 0, 26, 0, 115,
|
||
0, 103, 117, 313, 232, 0, 230, 0, 0, 0,
|
||
0, 313, 313, 136, 137, 135, 0, 155, 152, 157,
|
||
0, 166, 0, 183, 176, 0, 0, 0, 313, 147,
|
||
186, 313, 173, 313, 189, 0, 219, 0, 105, 0,
|
||
10, 86, 0, 0, 0, 116, 0, 102, 100, 231,
|
||
0, 106, 98, 0, 128, 121, 125, 0, 313, 0,
|
||
313, 313, 313, 0, 313, 313, 0, 0, 313, 0,
|
||
0, 175, 313, 0, 0, 114, 313, 59, 61, 0,
|
||
64, 119, 104, 0, 313, 142, 313, 0, 0, 144,
|
||
313, 170, 0, 0, 0, 195, 177, 0, 0, 163,
|
||
313, 148, 313, 174, 0, 193, 194, 192, 313, 0,
|
||
0, 101, 313, 313, 0, 132, 0, 313, 0, 0,
|
||
208, 0, 313, 313, 313, 313, 0, 0, 171, 168,
|
||
190, 0, 11, 63, 0, 107, 122, 133, 145, 0,
|
||
207, 209, 206, 205, 184, 178, 196, 313, 172, 169,
|
||
164, 201, 200, 224, 109, 0, 211, 0, 0, 198,
|
||
0, 108, 210, 197, 0, 110, 199, 0, 0
|
||
};
|
||
|
||
static const short yydefgoto[] = { 1,
|
||
44, 65, 45, 537, 46, 310, 47, 352, 389, 111,
|
||
49, 50, 103, 222, 211, 108, 51, 231, 91, 193,
|
||
92, 185, 186, 52, 353, 218, 54, 215, 55, 56,
|
||
468, 57, 544, 507, 513, 616, 621, 58, 499, 588,
|
||
59, 398, 321, 547, 153, 406, 407, 354, 257, 329,
|
||
327, 61, 62, 469, 421, 578, 263, 529, 261, 336,
|
||
337, 338, 355, 488, 587, 422, 356, 531, 524, 522,
|
||
533, 496, 565, 557, 619, 625, 589, 436, 552, 580,
|
||
601, 602, 63, 264, 269, 366, 270, 323, 402, 141,
|
||
142, 324, 316, 271, 144, 149, 169, 159, 162, 90,
|
||
206, 207, 227, 272
|
||
};
|
||
|
||
static const short yypact[] = {-32768,
|
||
591,-32768,-32768,-32768,-32768,-32768, 4,-32768, 1378,-32768,
|
||
25, 1414, 1414, 56,-32768,-32768,-32768, 174, 274,-32768,
|
||
-32768, 18, 1263, 61, 65, 311, 35, 75,-32768, 159,
|
||
-32768,-32768, 107, 113, 61, 121, 130, 169, 183, 213,
|
||
205,-32768, 194,-32768,-32768,-32768, 241,-32768,-32768,-32768,
|
||
-32768,-32768,-32768,-32768,-32768,-32768,-32768, 1227,-32768,-32768,
|
||
-32768,-32768,-32768,-32768,-32768,-32768, -16, 1414, 248,-32768,
|
||
-32768,-32768,-32768, 186, 211, 211,-32768,-32768,-32768,-32768,
|
||
286,-32768, 278, 39, 51, 283, 315, 308, 24, 325,
|
||
259, 331, 196,-32768,-32768, 352,-32768,-32768,-32768,-32768,
|
||
38, 310,-32768, 351,-32768,-32768,-32768,-32768, 311,-32768,
|
||
1091, 350, 376, 385,-32768,-32768,-32768,-32768,-32768,-32768,
|
||
-32768, 28,-32768, 375, 45, 289, 1414, 397, 392, 186,
|
||
211, 211, 393, 394, 398, 412, 286, 413, 407, 317,
|
||
419, 430, 38, 421, 433, 693,-32768, 435,-32768,-32768,
|
||
-32768, 424, 425,-32768,-32768, 211, 211,-32768,-32768,-32768,
|
||
-32768,-32768,-32768,-32768,-32768, 211, 211,-32768,-32768,-32768,
|
||
-32768,-32768, 333, 423, 162, 62,-32768,-32768,-32768, 1414,
|
||
201, 1332, 221, 43,-32768,-32768, 43, 444,-32768,-32768,
|
||
-32768, 1414,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
|
||
-32768, 406, 447, 406, 406, 449, 252, 451, 450, 262,
|
||
-32768,-32768, 456, 454,-32768,-32768, 196, 455,-32768, 460,
|
||
457, 461,-32768, 461, 461, 461, 336,-32768, 462,-32768,
|
||
463,-32768,-32768, 467, 182, 466, 469, 471, 472, 473,
|
||
-32768,-32768,-32768, 1332,-32768, 42, 373, 178,-32768,-32768,
|
||
-32768,-32768,-32768,-32768,-32768, 27, 474,-32768, 379, 216,
|
||
477,-32768, 1190, 1190, 479,-32768, 444, 487, 482, 490,
|
||
30,-32768, 423, 445,-32768,-32768,-32768, 331, 727,-32768,
|
||
-32768,-32768,-32768, 406, 406, 406, 406, 406, 406, 406,
|
||
406, 406, 153, 1332,-32768,-32768, 461, 501,-32768, 793,
|
||
-32768,-32768, 517,-32768, 522, 523,-32768, 36, 1414,-32768,
|
||
-32768, 513, 1332,-32768,-32768, 506,-32768,-32768,-32768, 515,
|
||
529, 277, 520,-32768,-32768, 38, 518,-32768, 474, 27,
|
||
-32768,-32768,-32768,-32768, 257, 521,-32768, 15,-32768,-32768,
|
||
59, 248, 1414, 1414,-32768, 512, 516, 525, 1342, 526,
|
||
537,-32768,-32768,-32768, 527, 1190, 46, 81,-32768, 528,
|
||
-32768,-32768, 530,-32768, 1332,-32768,-32768, 317, 27,-32768,
|
||
27,-32768, 423,-32768,-32768, 826, 389, 340, 189, 189,
|
||
263, 263,-32768,-32768,-32768,-32768, 532, 543, 1091,-32768,
|
||
350, 310,-32768,-32768, 548, 83, 893, 529, -3, 550,
|
||
626,-32768,-32768,-32768, 544, 365,-32768,-32768,-32768,-32768,
|
||
552, 271,-32768, 549, 554,-32768, 566, 216,-32768, 568,
|
||
1190, 1190, 1332, 557, 38,-32768,-32768,-32768, 570, 38,
|
||
-32768, 563, 38,-32768, 407, 541, 239, 430,-32768, 573,
|
||
-32768,-32768,-32768, 490, 27,-32768,-32768,-32768, -3, 575,
|
||
-32768, 579,-32768, 1414,-32768,-32768, 1414,-32768, 368,-32768,
|
||
580,-32768,-32768, -3,-32768, 578,-32768, 369, 1190, 406,
|
||
595, 529, 1332,-32768,-32768,-32768, 586,-32768,-32768,-32768,
|
||
584,-32768, 588,-32768, 590, 597, 598, 1190, 1332,-32768,
|
||
-32768, 1332,-32768, 506,-32768, 38,-32768, 599,-32768, 602,
|
||
-32768,-32768, 223, 594, 608,-32768, 369,-32768, 602,-32768,
|
||
38,-32768,-32768, 604, 252,-32768,-32768, 613, 1332, 38,
|
||
-3, 529, 1332, 378, 1332, 1332, 612, 615, 474, 616,
|
||
378,-32768, 38, 622, 640,-32768,-32768,-32768,-32768, 1414,
|
||
-32768,-32768,-32768, 369, 207,-32768, 474, 645, 661,-32768,
|
||
664,-32768, 387, 676, 38,-32768,-32768, 677, 678,-32768,
|
||
-3,-32768, -3,-32768, 675,-32768,-32768,-32768, 1332, 993,
|
||
681,-32768, 1332, 506, 683,-32768, 684, 474, 700, 318,
|
||
-32768, 686, -3, 277, -3, -3, 1190, 329,-32768,-32768,
|
||
-32768, 692,-32768,-32768, 698,-32768,-32768,-32768,-32768, 694,
|
||
696,-32768,-32768,-32768,-32768,-32768,-32768, 506,-32768,-32768,
|
||
-32768,-32768,-32768,-32768,-32768, 369,-32768, 700, 378,-32768,
|
||
369,-32768,-32768,-32768, 378,-32768,-32768, 714,-32768
|
||
};
|
||
|
||
static const short yypgoto[] = { -61,
|
||
-104,-32768,-32768,-32768,-32768,-32768,-32768, 5,-32768,-32768,
|
||
-32768,-32768, 680, -38, 324, 610,-32768, 409, -175, 452,
|
||
-9, 165, -82,-32768, 12, 337,-32768,-32768,-32768,-32768,
|
||
-32768,-32768,-32768,-32768, -471,-32768,-32768,-32768, 258, -378,
|
||
-32768,-32768,-32768,-32768, -119, -381, 260, 31,-32768,-32768,
|
||
-303,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 481,-32768,
|
||
313, 399, -252,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
|
||
-32768,-32768,-32768, -512,-32768,-32768, -373,-32768,-32768,-32768,
|
||
-32768, 118,-32768,-32768, -199, 293, 377, -247, -302, -50,
|
||
-49, -87, -265, 2,-32768, 614, 601, 625, 448, 20,
|
||
-201, 225,-32768, 0
|
||
};
|
||
|
||
|
||
#define YYLAST 1533
|
||
|
||
|
||
static const short yytable[] = { 2,
|
||
64, 188, 88, 146, 265, 48, 216, 372, 236, 66,
|
||
84, 360, 53, 89, 89, 301, 459, 419, 564, 409,
|
||
462, 460, 99, 370, 101, 414, 181, 86, 85, 322,
|
||
229, 60, 322, 174, 175, 543, 182, 461, 394, 187,
|
||
172, 172, 368, 183, 312, 181, 183, 109, 172, 183,
|
||
209, 173, 230, 176, 313, 182, 420, -234, 93, 143,
|
||
230, 183, 183, 102, 2, 177, 150, 104, 154, 151,
|
||
500, 423, 572, 160, 163, 163, -313, 145, 224, 225,
|
||
170, 226, 415, 440, 260, 509, 258, 147, 189, 110,
|
||
242, 194, 246, 267, 387, 441, 188, 455, 266, 188,
|
||
456, 212, 148, 434, 457, 277, 624, 448, 474, 114,
|
||
64, 219, 627, 400, 223, 48, 223, 223, 115, 223,
|
||
228, 446, 53, 447, 150, 150, 117, 154, 234, 160,
|
||
163, 163, 184, 396, 493, 118, 170, 140, 369, 243,
|
||
553, 60, 551, 140, 622, 64, 139, 139, 147, 626,
|
||
48, 140, 140, 300, 435, 163, 163, 53, 315, 140,
|
||
314, 112, 147, 148, 245, 163, 163, 385, 481, 482,
|
||
386, 113, 297, 119, 259, 262, 60, 148, 94, 95,
|
||
189, 89, 278, 189, 362, 315, 189, 189, 120, 590,
|
||
-271, 532, -313, 89, -272, 319, -123, 498, 123, 467,
|
||
260, 195, 196, 197, 198, 199, 200, 201, 202, 606,
|
||
223, 609, 610, 182, 2, 121, 514, 122, 331, 573,
|
||
183, 371, 424, 483, 203, 562, 183, 196, 197, 198,
|
||
199, 200, 201, 202, 410, 527, 155, 538, 156, 157,
|
||
539, 273, 158, 575, 540, 317, 124, 262, 397, 203,
|
||
152, 492, 332, 333, 334, 325, 328, 335, 183, 416,
|
||
401, 161, 359, 359, 357, 357, 189, 295, 296, 367,
|
||
325, 596, 317, 518, 599, 412, 191, 194, 503, 574,
|
||
171, 607, 358, 358, 451, 315, 96, 326, 97, 528,
|
||
183, 98, 530, 332, 333, 334, 183, 178, 401, 64,
|
||
289, 290, 291, 292, 48, 620, 437, 438, 204, 2,
|
||
89, 53, 205, 105, 106, 403, 107, 179, 445, 549,
|
||
408, 403, 180, 554, 475, 558, 559, 190, 328, 325,
|
||
60, 210, 603, 204, 611, 604, 165, 205, 166, 167,
|
||
150, 154, 168, 612, 425, 84, 613, 192, 275, 494,
|
||
430, 276, 306, 307, 208, 359, 439, 357, 284, 285,
|
||
286, 287, 288, 289, 290, 291, 292, 213, 325, 592,
|
||
325, 217, 317, 595, 485, 358, 291, 292, 220, 487,
|
||
471, 472, 490, 505, 472, 511, 512, 221, 64, 232,
|
||
219, 212, 147, 48, 555, 556, 64, 408, 463, 235,
|
||
53, 48, 582, 472, -259, -264, -265, 274, 53, 241,
|
||
-262, 328, 196, 197, 198, 199, 200, 201, 202, 60,
|
||
359, 359, 357, 357, -266, -263, 279, 60, 281, 282,
|
||
140, 244, 245, 247, 203, 248, 403, 250, -123, 251,
|
||
358, 358, 183, 367, 325, 534, 256, 504, 463, 287,
|
||
288, 289, 290, 291, 292, 89, 182, 315, 89, 280,
|
||
545, 298, 294, 463, 293, 373, 283, 299, 359, 550,
|
||
357, 408, 302, 303, 304, 570, 309, 305, 308, -270,
|
||
311, -268, 566, -260, -261, -267, 318, 359, 358, 357,
|
||
326, 339, 330, 403, 361, 364, 608, 286, 287, 288,
|
||
289, 290, 291, 292, 584, 363, 365, 358, 376, 377,
|
||
378, 379, 380, 381, 382, 383, 384, 388, 204, 391,
|
||
463, 408, 205, 164, 392, 393, 399, 401, 328, 404,
|
||
571, 405, 567, 411, 426, 413, 2, 418, 427, 432,
|
||
431, 89, 433, 442, 317, 449, 328, 428, 443, 450,
|
||
581, 284, 285, 286, 287, 288, 289, 290, 291, 292,
|
||
463, 454, 463, 464, 473, 470, 476, 477, 478, 64,
|
||
480, 484, 486, 403, 48, 489, 491, 328, 238, 239,
|
||
510, 53, 463, 403, 463, 463, 359, 495, 357, 501,
|
||
628, 3, 506, -313, -313, 4, 502, 516, 519, 520,
|
||
60, 521, 523, 252, 253, 5, 358, 403, 6, 525,
|
||
526, 541, 535, 254, 255, -313, 536, -313, 7, 546,
|
||
8, -313, 9, -313, -313, 542, 548, 560, 561, 563,
|
||
10, 195, 196, 197, 198, 199, 200, 201, 202, 568,
|
||
465, -313, -313, -313, -313, -313, -313, -313, -313, -313,
|
||
-313, 11, 569, 12, 203, 13, 14, 15, 16, 17,
|
||
18, 19, 576, 20, 21, 22, 23, 24, 25, 26,
|
||
27, 28, 29, 30, 577, 31, 32, 33, 34, 35,
|
||
36, 37, 38, 39, 40, 41, 579, 42, 43, 583,
|
||
585, 586, 591, 3, 515, -313, -313, 4, 594, -313,
|
||
597, 598, 600, 605, -313, 614, 617, 5, 249, -313,
|
||
6, 615, 618, 629, 116, 453, 395, -313, 214, -313,
|
||
7, 508, 8, -313, 9, -313, -313, 452, 320, 374,
|
||
479, 517, 10, 417, 466, 623, 497, 240, 204, 233,
|
||
375, 444, 205, -313, -313, -313, -313, -313, -313, -313,
|
||
-313, -313, -313, 11, 237, 12, 0, 13, 14, 15,
|
||
16, 17, 18, 19, 0, 20, 21, 22, 23, 24,
|
||
25, 26, 27, 28, 29, 30, 0, 31, 32, 33,
|
||
34, 35, 36, 37, 38, 39, 40, 41, 0, 42,
|
||
43, 0, 0, 3, 0, -313, -313, 4, 0, 0,
|
||
0, -313, 0, 0, 0, 0, -313, 5, 390, 0,
|
||
6, -313, 0, 0, 0, 0, 0, -313, 0, -313,
|
||
7, 0, 8, -313, 9, -313, -313, 0, 0, 0,
|
||
0, 0, 10, 284, 285, 286, 287, 288, 289, 290,
|
||
291, 292, 0, -313, -313, -313, -313, -313, -313, -313,
|
||
-313, -313, -313, 11, 0, 12, 0, 13, 14, 15,
|
||
16, 17, 18, 19, 0, 20, 21, 22, 23, 24,
|
||
25, 26, 27, 28, 29, 30, 0, 31, 32, 33,
|
||
34, 35, 36, 37, 38, 39, 40, 41, 0, 42,
|
||
43, 0, 0, 3, 0, -313, -313, 4, 0, 0,
|
||
0, -313, 0, 0, 0, 0, -313, 5, 458, 0,
|
||
6, -313, 0, 0, 0, 0, 0, -313, 0, -313,
|
||
7, 0, 8, -313, 9, -313, -313, 0, 0, 0,
|
||
0, 0, 10, 285, 286, 287, 288, 289, 290, 291,
|
||
292, 0, 0, -313, -313, -313, -313, -313, -313, -313,
|
||
-313, -313, -313, 11, 0, 12, 0, 13, 14, 15,
|
||
16, 17, 18, 19, 0, 20, 21, 22, 23, 24,
|
||
25, 26, 27, 28, 29, 30, 0, 31, 32, 33,
|
||
34, 35, 36, 37, 38, 39, 40, 41, 0, 42,
|
||
43, 0, 0, 3, 0, -313, -313, 4, 0, 0,
|
||
0, -313, 0, 0, 0, 0, -313, 5, 593, 0,
|
||
6, -313, 0, 0, 0, 0, 0, -313, 0, -313,
|
||
7, 0, 8, -313, 9, -313, -313, 0, 0, 0,
|
||
0, 0, 10, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 0, -313, -313, -313, -313, -313, -313, -313,
|
||
-313, -313, -313, 11, 0, 12, 0, 13, 14, 15,
|
||
16, 17, 18, 19, 0, 20, 21, 22, 23, 24,
|
||
25, 26, 27, 28, 29, 30, 0, 31, 32, 33,
|
||
34, 35, 36, 37, 38, 39, 40, 41, 0, 42,
|
||
43, 3, 0, -313, -313, 4, 0, 0, 0, 0,
|
||
0, -313, 0, 0, 0, 5, -313, 0, 6, 0,
|
||
0, -313, 0, 0, 0, -313, 0, -313, 7, 0,
|
||
8, -313, 9, -313, -313, 0, 0, 0, 0, 0,
|
||
10, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
0, -313, -313, -313, -313, -313, -313, -313, -313, -313,
|
||
-313, 11, 0, 12, 0, 13, 14, 15, 16, 17,
|
||
18, 19, 0, 20, 21, 22, 23, 24, 25, 26,
|
||
27, 28, 29, 30, 0, 31, 32, 33, 34, 35,
|
||
36, 37, 38, 39, 40, 41, 0, 42, 43, 0,
|
||
340, 0, 341, 0, 0, 0, 0, 0, 0, -313,
|
||
0, 0, 0, 0, -313, -313, 0, 0, 0, -313,
|
||
0, 0, 0, 0, 68, 0, 342, 0, 0, 343,
|
||
70, 344, 71, 72, 345, 0, 346, 347, 348, 125,
|
||
126, 349, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
|
||
350, 127, 0, 128, 0, 0, 0, 70, 0, 71,
|
||
72, 0, 0, 0, 0, 67, 0, 100, 0, 27,
|
||
0, 29, 30, 0, 31, 32, 0, 129, 130, 131,
|
||
132, 133, 134, 135, 136, 137, 138, 68, 0, 87,
|
||
0, 0, 0, 70, 0, 71, 72, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 0, 351, 0, 83, 0,
|
||
0, 0, 0, 73, 74, 75, 76, 77, 78, 79,
|
||
80, 81, 82, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 0, 0, 67, 139, 0, 0, 0, 0,
|
||
140, 0, 0, 0, 67, 83, 0, 0, 0, 0,
|
||
268, 0, 0, 0, 0, 0, 68, 0, 87, 0,
|
||
0, 0, 70, 0, 71, 72, 68, 0, 87, 0,
|
||
0, 0, 70, 0, 71, 72, 0, 0, 0, 0,
|
||
67, 83, 73, 74, 75, 76, 77, 78, 79, 80,
|
||
81, 82, 73, 74, 75, 76, 77, 78, 79, 80,
|
||
81, 82, 68, 0, 69, 0, 0, 0, 70, 0,
|
||
71, 72, 0, 0, 0, 0, 67, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 73, 74,
|
||
75, 76, 77, 78, 79, 80, 81, 82, 68, 0,
|
||
87, 0, 0, 0, 70, 0, 71, 72, 0, 0,
|
||
83, 0, 0, 0, 0, 0, 0, 0, 429, 0,
|
||
83, 0, 0, 0, 73, 74, 75, 76, 77, 78,
|
||
79, 80, 81, 82, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 0, 83, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 83
|
||
};
|
||
|
||
static const short yycheck[] = { 0,
|
||
1, 89, 12, 65, 180, 1, 111, 273, 128, 6,
|
||
9, 264, 1, 12, 13, 217, 398, 3, 531, 322,
|
||
399, 25, 5, 271, 23, 329, 3, 3, 9, 3,
|
||
3, 1, 3, 84, 84, 507, 13, 41, 3, 89,
|
||
3, 3, 13, 20, 244, 3, 20, 13, 3, 20,
|
||
101, 13, 25, 3, 13, 13, 42, 13, 3, 58,
|
||
25, 20, 20, 3, 65, 15, 67, 3, 69, 68,
|
||
449, 13, 544, 74, 75, 76, 15, 58, 117, 118,
|
||
81, 120, 330, 3, 23, 464, 174, 104, 89, 15,
|
||
140, 92, 143, 181, 294, 15, 184, 15, 181, 187,
|
||
18, 102, 119, 356, 22, 188, 619, 373, 412, 3,
|
||
111, 112, 625, 313, 115, 111, 117, 118, 6, 120,
|
||
121, 369, 111, 371, 125, 126, 6, 128, 127, 130,
|
||
131, 132, 109, 309, 437, 6, 137, 114, 109, 140,
|
||
522, 111, 521, 114, 616, 146, 109, 109, 104, 621,
|
||
146, 114, 114, 215, 109, 156, 157, 146, 246, 114,
|
||
119, 3, 104, 119, 3, 166, 167, 15, 421, 422,
|
||
18, 13, 211, 5, 13, 176, 146, 119, 5, 6,
|
||
181, 180, 192, 184, 267, 273, 187, 188, 6, 563,
|
||
13, 494, 15, 192, 13, 18, 15, 445, 5, 401,
|
||
23, 6, 7, 8, 9, 10, 11, 12, 13, 583,
|
||
211, 585, 586, 13, 215, 3, 469, 13, 3, 13,
|
||
20, 271, 342, 423, 29, 529, 20, 7, 8, 9,
|
||
10, 11, 12, 13, 322, 488, 51, 15, 53, 54,
|
||
18, 21, 57, 547, 22, 246, 6, 248, 310, 29,
|
||
3, 13, 37, 38, 39, 256, 257, 42, 20, 3,
|
||
22, 51, 263, 264, 263, 264, 267, 6, 7, 270,
|
||
271, 574, 273, 473, 578, 326, 18, 278, 454, 545,
|
||
3, 584, 263, 264, 389, 373, 13, 17, 15, 489,
|
||
20, 18, 492, 37, 38, 39, 20, 15, 22, 300,
|
||
112, 113, 114, 115, 300, 608, 357, 357, 113, 310,
|
||
309, 300, 117, 3, 4, 316, 6, 3, 368, 519,
|
||
321, 322, 15, 523, 412, 525, 526, 3, 329, 330,
|
||
300, 22, 15, 113, 587, 18, 51, 117, 53, 54,
|
||
341, 342, 57, 15, 343, 344, 18, 17, 184, 437,
|
||
349, 187, 17, 18, 3, 356, 357, 356, 107, 108,
|
||
109, 110, 111, 112, 113, 114, 115, 17, 369, 569,
|
||
371, 22, 373, 573, 425, 356, 114, 115, 3, 430,
|
||
16, 17, 433, 16, 17, 17, 18, 3, 389, 15,
|
||
391, 392, 104, 389, 17, 18, 397, 398, 399, 3,
|
||
389, 397, 16, 17, 13, 13, 13, 183, 397, 3,
|
||
13, 412, 7, 8, 9, 10, 11, 12, 13, 389,
|
||
421, 422, 421, 422, 13, 13, 202, 397, 204, 205,
|
||
114, 13, 3, 13, 29, 3, 437, 3, 15, 15,
|
||
421, 422, 20, 444, 445, 496, 114, 457, 449, 110,
|
||
111, 112, 113, 114, 115, 454, 13, 545, 457, 13,
|
||
511, 6, 13, 464, 14, 21, 18, 14, 469, 520,
|
||
469, 472, 18, 14, 18, 537, 14, 17, 17, 13,
|
||
15, 13, 533, 13, 13, 13, 114, 488, 469, 488,
|
||
17, 15, 114, 494, 16, 14, 584, 109, 110, 111,
|
||
112, 113, 114, 115, 555, 19, 17, 488, 284, 285,
|
||
286, 287, 288, 289, 290, 291, 292, 17, 113, 3,
|
||
521, 522, 117, 76, 3, 3, 14, 22, 529, 15,
|
||
540, 3, 533, 14, 23, 18, 537, 17, 23, 3,
|
||
15, 540, 16, 16, 545, 14, 547, 23, 19, 7,
|
||
551, 107, 108, 109, 110, 111, 112, 113, 114, 115,
|
||
561, 14, 563, 14, 13, 22, 18, 14, 3, 570,
|
||
3, 15, 3, 574, 570, 13, 36, 578, 131, 132,
|
||
3, 570, 583, 584, 585, 586, 587, 15, 587, 15,
|
||
0, 1, 13, 3, 4, 5, 18, 3, 13, 16,
|
||
570, 14, 13, 156, 157, 15, 587, 608, 18, 13,
|
||
13, 18, 14, 166, 167, 25, 15, 27, 28, 16,
|
||
30, 31, 32, 33, 34, 18, 14, 16, 14, 14,
|
||
40, 6, 7, 8, 9, 10, 11, 12, 13, 18,
|
||
15, 51, 52, 53, 54, 55, 56, 57, 58, 59,
|
||
60, 61, 13, 63, 29, 65, 66, 67, 68, 69,
|
||
70, 71, 18, 73, 74, 75, 76, 77, 78, 79,
|
||
80, 81, 82, 83, 14, 85, 86, 87, 88, 89,
|
||
90, 91, 92, 93, 94, 95, 23, 97, 98, 14,
|
||
14, 14, 18, 1, 470, 3, 4, 5, 18, 109,
|
||
18, 18, 3, 18, 114, 14, 13, 15, 16, 119,
|
||
18, 14, 17, 0, 35, 392, 308, 25, 109, 27,
|
||
28, 464, 30, 31, 32, 33, 34, 391, 248, 278,
|
||
418, 472, 40, 335, 109, 618, 444, 137, 113, 126,
|
||
14, 365, 117, 51, 52, 53, 54, 55, 56, 57,
|
||
58, 59, 60, 61, 130, 63, -1, 65, 66, 67,
|
||
68, 69, 70, 71, -1, 73, 74, 75, 76, 77,
|
||
78, 79, 80, 81, 82, 83, -1, 85, 86, 87,
|
||
88, 89, 90, 91, 92, 93, 94, 95, -1, 97,
|
||
98, -1, -1, 1, -1, 3, 4, 5, -1, -1,
|
||
-1, 109, -1, -1, -1, -1, 114, 15, 16, -1,
|
||
18, 119, -1, -1, -1, -1, -1, 25, -1, 27,
|
||
28, -1, 30, 31, 32, 33, 34, -1, -1, -1,
|
||
-1, -1, 40, 107, 108, 109, 110, 111, 112, 113,
|
||
114, 115, -1, 51, 52, 53, 54, 55, 56, 57,
|
||
58, 59, 60, 61, -1, 63, -1, 65, 66, 67,
|
||
68, 69, 70, 71, -1, 73, 74, 75, 76, 77,
|
||
78, 79, 80, 81, 82, 83, -1, 85, 86, 87,
|
||
88, 89, 90, 91, 92, 93, 94, 95, -1, 97,
|
||
98, -1, -1, 1, -1, 3, 4, 5, -1, -1,
|
||
-1, 109, -1, -1, -1, -1, 114, 15, 16, -1,
|
||
18, 119, -1, -1, -1, -1, -1, 25, -1, 27,
|
||
28, -1, 30, 31, 32, 33, 34, -1, -1, -1,
|
||
-1, -1, 40, 108, 109, 110, 111, 112, 113, 114,
|
||
115, -1, -1, 51, 52, 53, 54, 55, 56, 57,
|
||
58, 59, 60, 61, -1, 63, -1, 65, 66, 67,
|
||
68, 69, 70, 71, -1, 73, 74, 75, 76, 77,
|
||
78, 79, 80, 81, 82, 83, -1, 85, 86, 87,
|
||
88, 89, 90, 91, 92, 93, 94, 95, -1, 97,
|
||
98, -1, -1, 1, -1, 3, 4, 5, -1, -1,
|
||
-1, 109, -1, -1, -1, -1, 114, 15, 16, -1,
|
||
18, 119, -1, -1, -1, -1, -1, 25, -1, 27,
|
||
28, -1, 30, 31, 32, 33, 34, -1, -1, -1,
|
||
-1, -1, 40, -1, -1, -1, -1, -1, -1, -1,
|
||
-1, -1, -1, 51, 52, 53, 54, 55, 56, 57,
|
||
58, 59, 60, 61, -1, 63, -1, 65, 66, 67,
|
||
68, 69, 70, 71, -1, 73, 74, 75, 76, 77,
|
||
78, 79, 80, 81, 82, 83, -1, 85, 86, 87,
|
||
88, 89, 90, 91, 92, 93, 94, 95, -1, 97,
|
||
98, 1, -1, 3, 4, 5, -1, -1, -1, -1,
|
||
-1, 109, -1, -1, -1, 15, 114, -1, 18, -1,
|
||
-1, 119, -1, -1, -1, 25, -1, 27, 28, -1,
|
||
30, 31, 32, 33, 34, -1, -1, -1, -1, -1,
|
||
40, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||
-1, 51, 52, 53, 54, 55, 56, 57, 58, 59,
|
||
60, 61, -1, 63, -1, 65, 66, 67, 68, 69,
|
||
70, 71, -1, 73, 74, 75, 76, 77, 78, 79,
|
||
80, 81, 82, 83, -1, 85, 86, 87, 88, 89,
|
||
90, 91, 92, 93, 94, 95, -1, 97, 98, -1,
|
||
1, -1, 3, -1, -1, -1, -1, -1, -1, 109,
|
||
-1, -1, -1, -1, 114, 16, -1, -1, -1, 119,
|
||
-1, -1, -1, -1, 25, -1, 27, -1, -1, 30,
|
||
31, 32, 33, 34, 35, -1, 37, 38, 39, 3,
|
||
4, 42, -1, -1, -1, -1, -1, -1, -1, -1,
|
||
51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
|
||
61, 25, -1, 27, -1, -1, -1, 31, -1, 33,
|
||
34, -1, -1, -1, -1, 3, -1, 5, -1, 80,
|
||
-1, 82, 83, -1, 85, 86, -1, 51, 52, 53,
|
||
54, 55, 56, 57, 58, 59, 60, 25, -1, 27,
|
||
-1, -1, -1, 31, -1, 33, 34, -1, -1, -1,
|
||
-1, -1, -1, -1, -1, -1, 117, -1, 119, -1,
|
||
-1, -1, -1, 51, 52, 53, 54, 55, 56, 57,
|
||
58, 59, 60, -1, -1, -1, -1, -1, -1, -1,
|
||
-1, -1, -1, -1, 3, 109, -1, -1, -1, -1,
|
||
114, -1, -1, -1, 3, 119, -1, -1, -1, -1,
|
||
19, -1, -1, -1, -1, -1, 25, -1, 27, -1,
|
||
-1, -1, 31, -1, 33, 34, 25, -1, 27, -1,
|
||
-1, -1, 31, -1, 33, 34, -1, -1, -1, -1,
|
||
3, 119, 51, 52, 53, 54, 55, 56, 57, 58,
|
||
59, 60, 51, 52, 53, 54, 55, 56, 57, 58,
|
||
59, 60, 25, -1, 27, -1, -1, -1, 31, -1,
|
||
33, 34, -1, -1, -1, -1, 3, -1, -1, -1,
|
||
-1, -1, -1, -1, -1, -1, -1, -1, 51, 52,
|
||
53, 54, 55, 56, 57, 58, 59, 60, 25, -1,
|
||
27, -1, -1, -1, 31, -1, 33, 34, -1, -1,
|
||
119, -1, -1, -1, -1, -1, -1, -1, 117, -1,
|
||
119, -1, -1, -1, 51, 52, 53, 54, 55, 56,
|
||
57, 58, 59, 60, -1, -1, -1, -1, -1, -1,
|
||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||
-1, -1, -1, -1, -1, -1, 119, -1, -1, -1,
|
||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||
-1, -1, 119
|
||
};
|
||
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
|
||
#line 3 "/usr/lib/bison.simple"
|
||
/* This file comes from bison-1.27. */
|
||
|
||
/* Skeleton output parser for bison,
|
||
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
|
||
|
||
This program is free software; you can redistribute it and/or modify
|
||
it under the terms of the GNU General Public License as published by
|
||
the Free Software Foundation; either version 2, or (at your option)
|
||
any later version.
|
||
|
||
This program is distributed in the hope that it will be useful,
|
||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
GNU General Public License for more details.
|
||
|
||
You should have received a copy of the GNU General Public License
|
||
along with this program; if not, write to the Free Software
|
||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||
Boston, MA 02111-1307, USA. */
|
||
|
||
/* As a special exception, when this file is copied by Bison into a
|
||
Bison output file, you may use that output file without restriction.
|
||
This special exception was added by the Free Software Foundation
|
||
in version 1.24 of Bison. */
|
||
|
||
/* This is the parser code that is written into each bison parser
|
||
when the %semantic_parser declaration is not specified in the grammar.
|
||
It was written by Richard Stallman by simplifying the hairy parser
|
||
used when %semantic_parser is specified. */
|
||
|
||
#ifndef YYSTACK_USE_ALLOCA
|
||
#ifdef alloca
|
||
#define YYSTACK_USE_ALLOCA
|
||
#else /* alloca not defined */
|
||
#ifdef __GNUC__
|
||
#define YYSTACK_USE_ALLOCA
|
||
#define alloca __builtin_alloca
|
||
#else /* not GNU C. */
|
||
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
|
||
#define YYSTACK_USE_ALLOCA
|
||
#include <alloca.h>
|
||
#else /* not sparc */
|
||
/* We think this test detects Watcom and Microsoft C. */
|
||
/* This used to test MSDOS, but that is a bad idea
|
||
since that symbol is in the user namespace. */
|
||
#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
|
||
#if 0 /* No need for malloc.h, which pollutes the namespace;
|
||
instead, just don't use alloca. */
|
||
#include <malloc.h>
|
||
#endif
|
||
#else /* not MSDOS, or __TURBOC__ */
|
||
#if defined(_AIX)
|
||
/* I don't know what this was needed for, but it pollutes the namespace.
|
||
So I turned it off. rms, 2 May 1997. */
|
||
/* #include <malloc.h> */
|
||
#pragma alloca
|
||
#define YYSTACK_USE_ALLOCA
|
||
#else /* not MSDOS, or __TURBOC__, or _AIX */
|
||
#if 0
|
||
#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
|
||
and on HPUX 10. Eventually we can turn this on. */
|
||
#define YYSTACK_USE_ALLOCA
|
||
#define alloca __builtin_alloca
|
||
#endif /* __hpux */
|
||
#endif
|
||
#endif /* not _AIX */
|
||
#endif /* not MSDOS, or __TURBOC__ */
|
||
#endif /* not sparc */
|
||
#endif /* not GNU C */
|
||
#endif /* alloca not defined */
|
||
#endif /* YYSTACK_USE_ALLOCA not defined */
|
||
|
||
#ifdef YYSTACK_USE_ALLOCA
|
||
#define YYSTACK_ALLOC alloca
|
||
#else
|
||
#define YYSTACK_ALLOC malloc
|
||
#endif
|
||
|
||
/* Note: there must be only one dollar sign in this file.
|
||
It is replaced by the list of actions, each action
|
||
as one case of the switch. */
|
||
|
||
#define yyerrok (yyerrstatus = 0)
|
||
#define yyclearin (yychar = YYEMPTY)
|
||
#define YYEMPTY -2
|
||
#define YYEOF 0
|
||
#define YYACCEPT goto yyacceptlab
|
||
#define YYABORT goto yyabortlab
|
||
#define YYERROR goto yyerrlab1
|
||
/* Like YYERROR except do call yyerror.
|
||
This remains here temporarily to ease the
|
||
transition to the new meaning of YYERROR, for GCC.
|
||
Once GCC version 2 has supplanted version 1, this can go. */
|
||
#define YYFAIL goto yyerrlab
|
||
#define YYRECOVERING() (!!yyerrstatus)
|
||
#define YYBACKUP(token, value) \
|
||
do \
|
||
if (yychar == YYEMPTY && yylen == 1) \
|
||
{ yychar = (token), yylval = (value); \
|
||
yychar1 = YYTRANSLATE (yychar); \
|
||
YYPOPSTACK; \
|
||
goto yybackup; \
|
||
} \
|
||
else \
|
||
{ yyerror ("syntax error: cannot back up"); YYERROR; } \
|
||
while (0)
|
||
|
||
#define YYTERROR 1
|
||
#define YYERRCODE 256
|
||
|
||
#ifndef YYPURE
|
||
#define YYLEX yylex()
|
||
#endif
|
||
|
||
#ifdef YYPURE
|
||
#ifdef YYLSP_NEEDED
|
||
#ifdef YYLEX_PARAM
|
||
#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
|
||
#else
|
||
#define YYLEX yylex(&yylval, &yylloc)
|
||
#endif
|
||
#else /* not YYLSP_NEEDED */
|
||
#ifdef YYLEX_PARAM
|
||
#define YYLEX yylex(&yylval, YYLEX_PARAM)
|
||
#else
|
||
#define YYLEX yylex(&yylval)
|
||
#endif
|
||
#endif /* not YYLSP_NEEDED */
|
||
#endif
|
||
|
||
/* If nonreentrant, generate the variables here */
|
||
|
||
#ifndef YYPURE
|
||
|
||
int yychar; /* the lookahead symbol */
|
||
YYSTYPE yylval; /* the semantic value of the */
|
||
/* lookahead symbol */
|
||
|
||
#ifdef YYLSP_NEEDED
|
||
YYLTYPE yylloc; /* location data for the lookahead */
|
||
/* symbol */
|
||
#endif
|
||
|
||
int yynerrs; /* number of parse errors so far */
|
||
#endif /* not YYPURE */
|
||
|
||
#if YYDEBUG != 0
|
||
int yydebug; /* nonzero means print parse trace */
|
||
/* Since this is uninitialized, it does not stop multiple parsers
|
||
from coexisting. */
|
||
#endif
|
||
|
||
/* YYINITDEPTH indicates the initial size of the parser's stacks */
|
||
|
||
#ifndef YYINITDEPTH
|
||
#define YYINITDEPTH 200
|
||
#endif
|
||
|
||
/* YYMAXDEPTH is the maximum size the stacks can grow to
|
||
(effective only if the built-in stack extension method is used). */
|
||
|
||
#if YYMAXDEPTH == 0
|
||
#undef YYMAXDEPTH
|
||
#endif
|
||
|
||
#ifndef YYMAXDEPTH
|
||
#define YYMAXDEPTH 10000
|
||
#endif
|
||
|
||
/* Define __yy_memcpy. Note that the size argument
|
||
should be passed with type unsigned int, because that is what the non-GCC
|
||
definitions require. With GCC, __builtin_memcpy takes an arg
|
||
of type size_t, but it can handle unsigned int. */
|
||
|
||
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
|
||
#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
|
||
#else /* not GNU C or C++ */
|
||
#ifndef __cplusplus
|
||
|
||
/* This is the most reliable way to avoid incompatibilities
|
||
in available built-in functions on various systems. */
|
||
static void
|
||
__yy_memcpy (to, from, count)
|
||
char *to;
|
||
char *from;
|
||
unsigned int count;
|
||
{
|
||
register char *f = from;
|
||
register char *t = to;
|
||
register int i = count;
|
||
|
||
while (i-- > 0)
|
||
*t++ = *f++;
|
||
}
|
||
|
||
#else /* __cplusplus */
|
||
|
||
/* This is the most reliable way to avoid incompatibilities
|
||
in available built-in functions on various systems. */
|
||
static void
|
||
__yy_memcpy (char *to, char *from, unsigned int count)
|
||
{
|
||
register char *t = to;
|
||
register char *f = from;
|
||
register int i = count;
|
||
|
||
while (i-- > 0)
|
||
*t++ = *f++;
|
||
}
|
||
|
||
#endif
|
||
#endif
|
||
|
||
#line 216 "/usr/lib/bison.simple"
|
||
|
||
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
|
||
into yyparse. The argument should have type void *.
|
||
It should actually point to an object.
|
||
Grammar actions can access the variable by casting it
|
||
to the proper pointer type. */
|
||
|
||
#ifdef YYPARSE_PARAM
|
||
#ifdef __cplusplus
|
||
#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
|
||
#define YYPARSE_PARAM_DECL
|
||
#else /* not __cplusplus */
|
||
#define YYPARSE_PARAM_ARG YYPARSE_PARAM
|
||
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
|
||
#endif /* not __cplusplus */
|
||
#else /* not YYPARSE_PARAM */
|
||
#define YYPARSE_PARAM_ARG
|
||
#define YYPARSE_PARAM_DECL
|
||
#endif /* not YYPARSE_PARAM */
|
||
|
||
/* Prevent warning if -Wstrict-prototypes. */
|
||
#ifdef __GNUC__
|
||
#ifdef YYPARSE_PARAM
|
||
int yyparse (void *);
|
||
#else
|
||
int yyparse (void);
|
||
#endif
|
||
#endif
|
||
|
||
int
|
||
yyparse(YYPARSE_PARAM_ARG)
|
||
YYPARSE_PARAM_DECL
|
||
{
|
||
register int yystate;
|
||
register int yyn;
|
||
register short *yyssp;
|
||
register YYSTYPE *yyvsp;
|
||
int yyerrstatus; /* number of tokens to shift before error messages enabled */
|
||
int yychar1 = 0; /* lookahead token as an internal (translated) token number */
|
||
|
||
short yyssa[YYINITDEPTH]; /* the state stack */
|
||
YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
|
||
|
||
short *yyss = yyssa; /* refer to the stacks thru separate pointers */
|
||
YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
|
||
|
||
#ifdef YYLSP_NEEDED
|
||
YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
|
||
YYLTYPE *yyls = yylsa;
|
||
YYLTYPE *yylsp;
|
||
|
||
#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
|
||
#else
|
||
#define YYPOPSTACK (yyvsp--, yyssp--)
|
||
#endif
|
||
|
||
int yystacksize = YYINITDEPTH;
|
||
int yyfree_stacks = 0;
|
||
|
||
#ifdef YYPURE
|
||
int yychar;
|
||
YYSTYPE yylval;
|
||
int yynerrs;
|
||
#ifdef YYLSP_NEEDED
|
||
YYLTYPE yylloc;
|
||
#endif
|
||
#endif
|
||
|
||
YYSTYPE yyval; /* the variable used to return */
|
||
/* semantic values from the action */
|
||
/* routines */
|
||
|
||
int yylen;
|
||
|
||
#if YYDEBUG != 0
|
||
if (yydebug)
|
||
fprintf(stderr, "Starting parse\n");
|
||
#endif
|
||
|
||
yystate = 0;
|
||
yyerrstatus = 0;
|
||
yynerrs = 0;
|
||
yychar = YYEMPTY; /* Cause a token to be read. */
|
||
|
||
/* Initialize stack pointers.
|
||
Waste one element of value and location stack
|
||
so that they stay on the same level as the state stack.
|
||
The wasted elements are never initialized. */
|
||
|
||
yyssp = yyss - 1;
|
||
yyvsp = yyvs;
|
||
#ifdef YYLSP_NEEDED
|
||
yylsp = yyls;
|
||
#endif
|
||
|
||
/* Push a new state, which is found in yystate . */
|
||
/* In all cases, when you get here, the value and location stacks
|
||
have just been pushed. so pushing a state here evens the stacks. */
|
||
yynewstate:
|
||
|
||
*++yyssp = yystate;
|
||
|
||
if (yyssp >= yyss + yystacksize - 1)
|
||
{
|
||
/* Give user a chance to reallocate the stack */
|
||
/* Use copies of these so that the &'s don't force the real ones into memory. */
|
||
YYSTYPE *yyvs1 = yyvs;
|
||
short *yyss1 = yyss;
|
||
#ifdef YYLSP_NEEDED
|
||
YYLTYPE *yyls1 = yyls;
|
||
#endif
|
||
|
||
/* Get the current used size of the three stacks, in elements. */
|
||
int size = yyssp - yyss + 1;
|
||
|
||
#ifdef yyoverflow
|
||
/* Each stack pointer address is followed by the size of
|
||
the data in use in that stack, in bytes. */
|
||
#ifdef YYLSP_NEEDED
|
||
/* This used to be a conditional around just the two extra args,
|
||
but that might be undefined if yyoverflow is a macro. */
|
||
yyoverflow("parser stack overflow",
|
||
&yyss1, size * sizeof (*yyssp),
|
||
&yyvs1, size * sizeof (*yyvsp),
|
||
&yyls1, size * sizeof (*yylsp),
|
||
&yystacksize);
|
||
#else
|
||
yyoverflow("parser stack overflow",
|
||
&yyss1, size * sizeof (*yyssp),
|
||
&yyvs1, size * sizeof (*yyvsp),
|
||
&yystacksize);
|
||
#endif
|
||
|
||
yyss = yyss1; yyvs = yyvs1;
|
||
#ifdef YYLSP_NEEDED
|
||
yyls = yyls1;
|
||
#endif
|
||
#else /* no yyoverflow */
|
||
/* Extend the stack our own way. */
|
||
if (yystacksize >= YYMAXDEPTH)
|
||
{
|
||
yyerror("parser stack overflow");
|
||
if (yyfree_stacks)
|
||
{
|
||
free (yyss);
|
||
free (yyvs);
|
||
#ifdef YYLSP_NEEDED
|
||
free (yyls);
|
||
#endif
|
||
}
|
||
return 2;
|
||
}
|
||
yystacksize *= 2;
|
||
if (yystacksize > YYMAXDEPTH)
|
||
yystacksize = YYMAXDEPTH;
|
||
#ifndef YYSTACK_USE_ALLOCA
|
||
yyfree_stacks = 1;
|
||
#endif
|
||
yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
|
||
__yy_memcpy ((char *)yyss, (char *)yyss1,
|
||
size * (unsigned int) sizeof (*yyssp));
|
||
yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
|
||
__yy_memcpy ((char *)yyvs, (char *)yyvs1,
|
||
size * (unsigned int) sizeof (*yyvsp));
|
||
#ifdef YYLSP_NEEDED
|
||
yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
|
||
__yy_memcpy ((char *)yyls, (char *)yyls1,
|
||
size * (unsigned int) sizeof (*yylsp));
|
||
#endif
|
||
#endif /* no yyoverflow */
|
||
|
||
yyssp = yyss + size - 1;
|
||
yyvsp = yyvs + size - 1;
|
||
#ifdef YYLSP_NEEDED
|
||
yylsp = yyls + size - 1;
|
||
#endif
|
||
|
||
#if YYDEBUG != 0
|
||
if (yydebug)
|
||
fprintf(stderr, "Stack size increased to %d\n", yystacksize);
|
||
#endif
|
||
|
||
if (yyssp >= yyss + yystacksize - 1)
|
||
YYABORT;
|
||
}
|
||
|
||
#if YYDEBUG != 0
|
||
if (yydebug)
|
||
fprintf(stderr, "Entering state %d\n", yystate);
|
||
#endif
|
||
|
||
goto yybackup;
|
||
yybackup:
|
||
|
||
/* Do appropriate processing given the current state. */
|
||
/* Read a lookahead token if we need one and don't already have one. */
|
||
/* yyresume: */
|
||
|
||
/* First try to decide what to do without reference to lookahead token. */
|
||
|
||
yyn = yypact[yystate];
|
||
if (yyn == YYFLAG)
|
||
goto yydefault;
|
||
|
||
/* Not known => get a lookahead token if don't already have one. */
|
||
|
||
/* yychar is either YYEMPTY or YYEOF
|
||
or a valid token in external form. */
|
||
|
||
if (yychar == YYEMPTY)
|
||
{
|
||
#if YYDEBUG != 0
|
||
if (yydebug)
|
||
fprintf(stderr, "Reading a token: ");
|
||
#endif
|
||
yychar = YYLEX;
|
||
}
|
||
|
||
/* Convert token to internal form (in yychar1) for indexing tables with */
|
||
|
||
if (yychar <= 0) /* This means end of input. */
|
||
{
|
||
yychar1 = 0;
|
||
yychar = YYEOF; /* Don't call YYLEX any more */
|
||
|
||
#if YYDEBUG != 0
|
||
if (yydebug)
|
||
fprintf(stderr, "Now at end of input.\n");
|
||
#endif
|
||
}
|
||
else
|
||
{
|
||
yychar1 = YYTRANSLATE(yychar);
|
||
|
||
#if YYDEBUG != 0
|
||
if (yydebug)
|
||
{
|
||
fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
|
||
/* Give the individual parser a way to print the precise meaning
|
||
of a token, for further debugging info. */
|
||
#ifdef YYPRINT
|
||
YYPRINT (stderr, yychar, yylval);
|
||
#endif
|
||
fprintf (stderr, ")\n");
|
||
}
|
||
#endif
|
||
}
|
||
|
||
yyn += yychar1;
|
||
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
|
||
goto yydefault;
|
||
|
||
yyn = yytable[yyn];
|
||
|
||
/* yyn is what to do for this token type in this state.
|
||
Negative => reduce, -yyn is rule number.
|
||
Positive => shift, yyn is new state.
|
||
New state is final state => don't bother to shift,
|
||
just return success.
|
||
0, or most negative number => error. */
|
||
|
||
if (yyn < 0)
|
||
{
|
||
if (yyn == YYFLAG)
|
||
goto yyerrlab;
|
||
yyn = -yyn;
|
||
goto yyreduce;
|
||
}
|
||
else if (yyn == 0)
|
||
goto yyerrlab;
|
||
|
||
if (yyn == YYFINAL)
|
||
YYACCEPT;
|
||
|
||
/* Shift the lookahead token. */
|
||
|
||
#if YYDEBUG != 0
|
||
if (yydebug)
|
||
fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
|
||
#endif
|
||
|
||
/* Discard the token being shifted unless it is eof. */
|
||
if (yychar != YYEOF)
|
||
yychar = YYEMPTY;
|
||
|
||
*++yyvsp = yylval;
|
||
#ifdef YYLSP_NEEDED
|
||
*++yylsp = yylloc;
|
||
#endif
|
||
|
||
/* count tokens shifted since error; after three, turn off error status. */
|
||
if (yyerrstatus) yyerrstatus--;
|
||
|
||
yystate = yyn;
|
||
goto yynewstate;
|
||
|
||
/* Do the default action for the current state. */
|
||
yydefault:
|
||
|
||
yyn = yydefact[yystate];
|
||
if (yyn == 0)
|
||
goto yyerrlab;
|
||
|
||
/* Do a reduction. yyn is the number of a rule to reduce with. */
|
||
yyreduce:
|
||
yylen = yyr2[yyn];
|
||
if (yylen > 0)
|
||
yyval = yyvsp[1-yylen]; /* implement default value of the action */
|
||
|
||
#if YYDEBUG != 0
|
||
if (yydebug)
|
||
{
|
||
int i;
|
||
|
||
fprintf (stderr, "Reducing via rule %d (line %d), ",
|
||
yyn, yyrline[yyn]);
|
||
|
||
/* Print the symbols being reduced, and their result. */
|
||
for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
|
||
fprintf (stderr, "%s ", yytname[yyrhs[i]]);
|
||
fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
|
||
}
|
||
#endif
|
||
|
||
|
||
switch (yyn) {
|
||
|
||
case 1:
|
||
#line 233 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 2:
|
||
#line 234 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 3:
|
||
#line 237 "parser.y"
|
||
{ Intype = 0; ;
|
||
break;}
|
||
case 4:
|
||
#line 238 "parser.y"
|
||
{ Intype = 0; ;
|
||
break;}
|
||
case 5:
|
||
#line 239 "parser.y"
|
||
{
|
||
DOH *o = new_node("Scope",yyvsp[0].tok.filename,yyvsp[0].tok.line);
|
||
top = o;
|
||
;
|
||
break;}
|
||
case 6:
|
||
#line 242 "parser.y"
|
||
{
|
||
top = Getattr(top,"parent");
|
||
;
|
||
break;}
|
||
case 7:
|
||
#line 245 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 8:
|
||
#line 246 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 9:
|
||
#line 252 "parser.y"
|
||
{
|
||
if (!Getattr(top,"module")) {
|
||
Setattr(top,"module",yyvsp[0].tok.text);
|
||
}
|
||
;
|
||
break;}
|
||
case 10:
|
||
#line 257 "parser.y"
|
||
{
|
||
LParse_macro_location(yyvsp[-5].tok.text,yyvsp[-6].tok.filename,yyvsp[-6].tok.line);
|
||
LParse_set_location(yyvsp[-3].tok.text, atoi(Char(yyvsp[-1].tok.text))-1);
|
||
;
|
||
break;}
|
||
case 11:
|
||
#line 260 "parser.y"
|
||
{
|
||
LParse_macro_location(0,0,0);
|
||
LParse_set_location(yyvsp[-3].tok.filename,yyvsp[-3].tok.line-1);
|
||
;
|
||
break;}
|
||
case 12:
|
||
#line 265 "parser.y"
|
||
{ Setattr(name_hash,yyvsp[-2].tok.text,yyvsp[-1].tok.text); ;
|
||
break;}
|
||
case 13:
|
||
#line 266 "parser.y"
|
||
{
|
||
DOH *o = new_node("Constant",yyvsp[-2].tok.filename, yyvsp[-2].tok.line);
|
||
Setattr(o,"name",yyvsp[-2].tok.text);
|
||
Setattr(o,"value",yyvsp[-1].tok.text);
|
||
SetInt(o,"type",yyvsp[-1].tok.ivalue);
|
||
apply_modifier(o);
|
||
;
|
||
break;}
|
||
case 14:
|
||
#line 273 "parser.y"
|
||
{ Printf(stderr,"%s\n", yyvsp[0].tok.text); ;
|
||
break;}
|
||
case 15:
|
||
#line 274 "parser.y"
|
||
{ Printf(stderr,"%s\n", yyvsp[0].tok.text); ;
|
||
break;}
|
||
case 24:
|
||
#line 283 "parser.y"
|
||
{
|
||
DOH *l;
|
||
LParseType *t;
|
||
int i;
|
||
Insert(yyvsp[-1].node,0,yyvsp[-2].tok.text);
|
||
for (i = 0; i < Len(yyvsp[-1].node); i++) {
|
||
l = Getitem(yyvsp[-1].node,i);
|
||
t = NewLParseType(LPARSE_T_USER);
|
||
LParse_typedef_add(t,l);
|
||
}
|
||
;
|
||
break;}
|
||
case 25:
|
||
#line 298 "parser.y"
|
||
{
|
||
Setattr(yyvsp[-2].node,"name",yyvsp[-1].tok.text);
|
||
top = yyvsp[-2].node;
|
||
LParse_set_location(yyvsp[-1].tok.text,0);
|
||
;
|
||
break;}
|
||
case 26:
|
||
#line 302 "parser.y"
|
||
{
|
||
top = Getattr(top,"parent");
|
||
LParse_set_location(yyvsp[-3].tok.filename,yyvsp[-3].tok.line + 1);
|
||
;
|
||
break;}
|
||
case 27:
|
||
#line 307 "parser.y"
|
||
{ yyval.node = new_node("IncludeFile",yyvsp[0].tok.filename,yyvsp[0].tok.line); ;
|
||
break;}
|
||
case 28:
|
||
#line 308 "parser.y"
|
||
{ yyval.node = new_node("ExternFile",yyvsp[0].tok.filename,yyvsp[0].tok.line); ;
|
||
break;}
|
||
case 29:
|
||
#line 309 "parser.y"
|
||
{ yyval.node = new_node("ImportFile", yyvsp[0].tok.filename,yyvsp[0].tok.line); ;
|
||
break;}
|
||
case 30:
|
||
#line 314 "parser.y"
|
||
{ new_node("ReadOnly",yyvsp[0].tok.filename, yyvsp[0].tok.line); ;
|
||
break;}
|
||
case 31:
|
||
#line 315 "parser.y"
|
||
{ new_node("ReadWrite",yyvsp[0].tok.filename,yyvsp[0].tok.line); ;
|
||
break;}
|
||
case 32:
|
||
#line 316 "parser.y"
|
||
{ swig_rename = Copy(yyvsp[-1].tok.text); ;
|
||
break;}
|
||
case 33:
|
||
#line 316 "parser.y"
|
||
{ swig_rename = 0; ;
|
||
break;}
|
||
case 34:
|
||
#line 317 "parser.y"
|
||
{ NewObject = 1; ;
|
||
break;}
|
||
case 35:
|
||
#line 317 "parser.y"
|
||
{ NewObject = 0; ;
|
||
break;}
|
||
case 36:
|
||
#line 322 "parser.y"
|
||
{
|
||
DOH *o = new_node("HeaderBlock",yyvsp[0].tok.filename,yyvsp[0].tok.line);
|
||
Setattr(o,"text", yyvsp[0].tok.text);
|
||
;
|
||
break;}
|
||
case 37:
|
||
#line 326 "parser.y"
|
||
{
|
||
DOH *o = new_node("WrapperBlock",yyvsp[0].tok.filename,yyvsp[0].tok.line);
|
||
Setattr(o,"text",yyvsp[0].tok.text);
|
||
;
|
||
break;}
|
||
case 38:
|
||
#line 330 "parser.y"
|
||
{
|
||
DOH *o = new_node("InitBlock",yyvsp[0].tok.filename,yyvsp[0].tok.line);
|
||
Setattr(o,"text",yyvsp[0].tok.text);
|
||
;
|
||
break;}
|
||
case 39:
|
||
#line 334 "parser.y"
|
||
{
|
||
DOH *pp;
|
||
DOH *o = new_node("HeaderBlock",yyvsp[0].tok.filename,yyvsp[0].tok.line);
|
||
Setattr(o,"text", yyvsp[0].tok.text);
|
||
Seek(yyvsp[0].tok.text,0,SEEK_SET);
|
||
pp = Preprocessor_parse(yyvsp[0].tok.text);
|
||
Seek(pp,0,SEEK_SET);
|
||
LParse_push(pp);
|
||
;
|
||
break;}
|
||
case 40:
|
||
#line 347 "parser.y"
|
||
{
|
||
new_node("DocEnable",yyvsp[0].tok.filename,yyvsp[0].tok.line);
|
||
;
|
||
break;}
|
||
case 41:
|
||
#line 350 "parser.y"
|
||
{
|
||
new_node("DocDisable",yyvsp[0].tok.filename,yyvsp[0].tok.line);
|
||
;
|
||
break;}
|
||
case 42:
|
||
#line 356 "parser.y"
|
||
{
|
||
DOH *o = new_node("Title",yyvsp[-2].tok.filename,yyvsp[-2].tok.line);
|
||
Setattr(o,"text",yyvsp[-1].tok.text);
|
||
Setattr(o,"parms",yyvsp[0].node);
|
||
;
|
||
break;}
|
||
case 43:
|
||
#line 364 "parser.y"
|
||
{
|
||
DOH *o = new_node("Section",yyvsp[-2].tok.filename,yyvsp[-2].tok.line);
|
||
Setattr(o,"text",yyvsp[-2].tok.text);
|
||
Setattr(o,"parms",yyvsp[0].node);
|
||
;
|
||
break;}
|
||
case 44:
|
||
#line 371 "parser.y"
|
||
{
|
||
DOH *o = new_node("SubSection",yyvsp[-2].tok.filename,yyvsp[-2].tok.line);
|
||
Setattr(o,"text",yyvsp[-2].tok.text);
|
||
Setattr(o,"parms",yyvsp[0].node);
|
||
;
|
||
break;}
|
||
case 45:
|
||
#line 378 "parser.y"
|
||
{
|
||
DOH *o = new_node("SubSubSection",yyvsp[-2].tok.filename,yyvsp[-2].tok.line);
|
||
Setattr(o,"text",yyvsp[-2].tok.text);
|
||
Setattr(o,"parms",yyvsp[0].node);
|
||
;
|
||
break;}
|
||
case 46:
|
||
#line 386 "parser.y"
|
||
{
|
||
DOH *o = new_node("Text",yyvsp[-1].tok.filename,yyvsp[-1].tok.line);
|
||
Setattr(o,"text",yyvsp[0].tok.text);
|
||
;
|
||
break;}
|
||
case 47:
|
||
#line 392 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 48:
|
||
#line 397 "parser.y"
|
||
{
|
||
DOH *o = new_node("Style",yyvsp[-1].tok.filename,yyvsp[-1].tok.line);
|
||
Setattr(o,"parms",yyvsp[0].node);
|
||
;
|
||
break;}
|
||
case 49:
|
||
#line 404 "parser.y"
|
||
{
|
||
DOH *o = new_node("LocalStyle",yyvsp[-1].tok.filename,yyvsp[-1].tok.line);
|
||
Setattr(o,"parms",yyvsp[0].node);
|
||
;
|
||
break;}
|
||
case 50:
|
||
#line 411 "parser.y"
|
||
{
|
||
DOH *o;
|
||
o = NewHash();
|
||
Setattr(o,"name",yyvsp[-2].tok.text);
|
||
Setattr(o,"value",yyvsp[-1].tok.text);
|
||
Insert(yyvsp[0].node,0,o);
|
||
yyval.node = yyvsp[0].node;
|
||
;
|
||
break;}
|
||
case 51:
|
||
#line 421 "parser.y"
|
||
{
|
||
DOH *o;
|
||
yyval.node = yyvsp[-3].node;
|
||
o = NewHash();
|
||
Setattr(o,"name",yyvsp[-1].tok.text);
|
||
Setattr(o,"value",yyvsp[0].tok.text);
|
||
;
|
||
break;}
|
||
case 52:
|
||
#line 428 "parser.y"
|
||
{
|
||
yyval.node = NewList();
|
||
;
|
||
break;}
|
||
case 53:
|
||
#line 433 "parser.y"
|
||
{
|
||
yyval.tok = yyvsp[0].tok;
|
||
;
|
||
break;}
|
||
case 54:
|
||
#line 436 "parser.y"
|
||
{
|
||
yyval.tok = yyvsp[0].tok;
|
||
;
|
||
break;}
|
||
case 55:
|
||
#line 439 "parser.y"
|
||
{
|
||
yyval.tok.text = 0;
|
||
;
|
||
break;}
|
||
case 56:
|
||
#line 444 "parser.y"
|
||
{ yyval.tok = yyvsp[0].tok; ;
|
||
break;}
|
||
case 57:
|
||
#line 445 "parser.y"
|
||
{ yyval.tok = yyvsp[0].tok; ;
|
||
break;}
|
||
case 58:
|
||
#line 446 "parser.y"
|
||
{ yyval.tok = yyvsp[0].tok; ;
|
||
break;}
|
||
case 59:
|
||
#line 452 "parser.y"
|
||
{
|
||
DOH *o, *t, *l;
|
||
int i;
|
||
t = LParse_skip_balanced('{','}');
|
||
for (i = 0; i < Len(yyvsp[-1].node); i++) {
|
||
l = Getitem(yyvsp[-1].node,i);
|
||
o = new_node("Typemap",yyvsp[-7].tok.filename, yyvsp[-7].tok.line);
|
||
Setattr(o,"lang",yyvsp[-5].tok.text);
|
||
Setattr(o,"method",yyvsp[-3].tok.text);
|
||
Setattr(o,"code",t);
|
||
Setattr(o,"name",Getattr(l,"name"));
|
||
Setattr(o,"type",Getattr(l,"type"));
|
||
Setattr(o,"parms",Getattr(l,"parms"));
|
||
}
|
||
;
|
||
break;}
|
||
case 60:
|
||
#line 469 "parser.y"
|
||
{
|
||
DOH *o, *t, *l;
|
||
int i;
|
||
t = LParse_skip_balanced('{','}');
|
||
for (i = 0; i < Len(yyvsp[-1].node); i++) {
|
||
l = Getitem(yyvsp[-1].node,i);
|
||
o = new_node("Typemap",yyvsp[-5].tok.filename, yyvsp[-5].tok.line);
|
||
Setattr(o,"method",yyvsp[-3].tok.text);
|
||
Setattr(o,"code",t);
|
||
Setattr(o,"name",Getattr(l,"name"));
|
||
Setattr(o,"type",Getattr(l,"type"));
|
||
Setattr(o,"parms",Getattr(l,"parms"));
|
||
}
|
||
;
|
||
break;}
|
||
case 61:
|
||
#line 486 "parser.y"
|
||
{
|
||
DOH *o, *l;
|
||
int i;
|
||
for (i = 0; i < Len(yyvsp[-1].node); i++) {
|
||
l = Getitem(yyvsp[-1].node,i);
|
||
o = new_node("TypemapClear",yyvsp[-7].tok.filename, yyvsp[-7].tok.line);
|
||
Setattr(o,"lang",yyvsp[-5].tok.text);
|
||
Setattr(o,"method",yyvsp[-3].tok.text);
|
||
Setattr(o,"name",Getattr(l,"name"));
|
||
Setattr(o,"type",Getattr(l,"type"));
|
||
}
|
||
;
|
||
break;}
|
||
case 62:
|
||
#line 501 "parser.y"
|
||
{
|
||
DOH *o, *l;
|
||
int i;
|
||
for (i = 0; i < Len(yyvsp[-1].node); i++) {
|
||
l = Getitem(yyvsp[-1].node,i);
|
||
o = new_node("TypemapClear",yyvsp[-5].tok.filename, yyvsp[-5].tok.line);
|
||
Setattr(o,"method",yyvsp[-3].tok.text);
|
||
Setattr(o,"name",Getattr(l,"name"));
|
||
Setattr(o,"type",Getattr(l,"type"));
|
||
}
|
||
;
|
||
break;}
|
||
case 63:
|
||
#line 515 "parser.y"
|
||
{
|
||
DOH *o, *l;
|
||
int i;
|
||
for (i = 0; i < Len(yyvsp[-3].node); i++) {
|
||
l = Getitem(yyvsp[-3].node,i);
|
||
o = new_node("TypemapCopy",yyvsp[-9].tok.filename, yyvsp[-9].tok.line);
|
||
Setattr(o,"method", yyvsp[-5].tok.text);
|
||
Setattr(o,"lang", yyvsp[-7].tok.text);
|
||
Setattr(o,"name", Getattr(l,"name"));
|
||
Setattr(o,"type", Getattr(l,"type"));
|
||
Setattr(o,"parms",Getattr(l,"parms"));
|
||
Setattr(o,"srcname",Getattr(yyvsp[-1].node,"name"));
|
||
Setattr(o,"srctype",Getattr(yyvsp[-1].node,"type"));
|
||
}
|
||
;
|
||
break;}
|
||
case 64:
|
||
#line 533 "parser.y"
|
||
{
|
||
DOH *o, *l;
|
||
int i;
|
||
for (i = 0; i < Len(yyvsp[-3].node); i++) {
|
||
l = Getitem(yyvsp[-3].node,i);
|
||
o = new_node("TypemapCopy",yyvsp[-7].tok.filename, yyvsp[-7].tok.line);
|
||
Setattr(o,"method", yyvsp[-5].tok.text);
|
||
Setattr(o,"name", Getattr(l,"name"));
|
||
Setattr(o,"type", Getattr(l,"type"));
|
||
Setattr(o,"parms",Getattr(l,"parms"));
|
||
Setattr(o,"srcname",Getattr(yyvsp[-1].node,"name"));
|
||
Setattr(o,"srctype",Getattr(yyvsp[-1].node,"type"));
|
||
}
|
||
;
|
||
break;}
|
||
case 65:
|
||
#line 550 "parser.y"
|
||
{
|
||
DOH *o;
|
||
o = new_node("Apply",yyvsp[-4].tok.filename, yyvsp[-4].tok.line);
|
||
Setattr(o,"name",Getattr(yyvsp[-3].node,"name"));
|
||
Setattr(o,"type",Getattr(yyvsp[-3].node,"type"));
|
||
Setattr(o,"parms",yyvsp[-1].node);
|
||
;
|
||
break;}
|
||
case 66:
|
||
#line 560 "parser.y"
|
||
{
|
||
DOH *o;
|
||
o = new_node("ClearApply",yyvsp[-2].tok.filename, yyvsp[-2].tok.line);
|
||
Setattr(o,"parms",yyvsp[-1].node);
|
||
;
|
||
break;}
|
||
case 67:
|
||
#line 567 "parser.y"
|
||
{
|
||
yyval.tok = yyvsp[0].tok;
|
||
;
|
||
break;}
|
||
case 68:
|
||
#line 570 "parser.y"
|
||
{
|
||
yyval.tok.text = NewString("const");
|
||
;
|
||
break;}
|
||
case 69:
|
||
#line 576 "parser.y"
|
||
{
|
||
Append(yyvsp[0].node,yyvsp[-1].node);
|
||
yyval.node = yyvsp[0].node;
|
||
;
|
||
break;}
|
||
case 70:
|
||
#line 582 "parser.y"
|
||
{
|
||
Append(yyvsp[-1].node,yyvsp[0].node);
|
||
yyval.node = yyvsp[0].node;
|
||
;
|
||
break;}
|
||
case 71:
|
||
#line 586 "parser.y"
|
||
{ yyval.node = NewList(); ;
|
||
break;}
|
||
case 72:
|
||
#line 589 "parser.y"
|
||
{
|
||
yyval.node = NewHash();
|
||
if (yyvsp[0].tmname.array) {
|
||
yyvsp[-1].type->is_pointer++;
|
||
yyvsp[-1].type->arraystr = Swig_copy_string(Char(yyvsp[0].tmname.array));
|
||
}
|
||
Setattr(yyval.node,"type",yyvsp[-1].type);
|
||
if (yyvsp[0].tmname.name)
|
||
Setattr(yyval.node,"name",yyvsp[0].tmname.name);
|
||
if (yyvsp[0].tmname.parms)
|
||
Setattr(yyval.node,"parms",yyvsp[0].tmname.parms);
|
||
;
|
||
break;}
|
||
case 73:
|
||
#line 601 "parser.y"
|
||
{
|
||
yyval.node = NewHash();
|
||
yyvsp[-2].type->is_pointer += yyvsp[-1].tok.ivalue;
|
||
if (yyvsp[0].tmname.array) {
|
||
yyvsp[-2].type->is_pointer++;
|
||
yyvsp[-2].type->arraystr = Swig_copy_string(Char(yyvsp[0].tmname.array));
|
||
}
|
||
Setattr(yyval.node,"type",yyvsp[-2].type);
|
||
if (yyvsp[0].tmname.name)
|
||
Setattr(yyval.node,"name",yyvsp[0].tmname.name);
|
||
if (yyvsp[0].tmname.parms)
|
||
Setattr(yyval.node,"parms",yyvsp[0].tmname.parms);
|
||
;
|
||
break;}
|
||
case 74:
|
||
#line 614 "parser.y"
|
||
{
|
||
yyval.node = NewHash();
|
||
yyvsp[-2].type->is_reference = 1;
|
||
yyvsp[-2].type->is_pointer++;
|
||
if (yyvsp[0].tmname.array) {
|
||
yyvsp[-2].type->is_pointer++;
|
||
yyvsp[-2].type->arraystr = Swig_copy_string(Char(yyvsp[0].tmname.array));
|
||
}
|
||
Setattr(yyval.node,"type",yyvsp[-2].type);
|
||
if (yyvsp[0].tmname.name)
|
||
Setattr(yyval.node,"name",yyvsp[0].tmname.name);
|
||
if (yyvsp[0].tmname.parms)
|
||
Setattr(yyval.node,"parms",yyvsp[0].tmname.parms);
|
||
;
|
||
break;}
|
||
case 75:
|
||
#line 630 "parser.y"
|
||
{
|
||
yyval.tmname.parms = yyvsp[0].node;
|
||
yyval.tmname.name = yyvsp[-1].tok.text;
|
||
yyval.tmname.array = 0;
|
||
;
|
||
break;}
|
||
case 76:
|
||
#line 635 "parser.y"
|
||
{
|
||
yyval.tmname.name = yyvsp[-2].tok.text;
|
||
yyval.tmname.array = yyvsp[-1].tok.text;
|
||
yyval.tmname.parms = yyvsp[0].node;
|
||
;
|
||
break;}
|
||
case 77:
|
||
#line 640 "parser.y"
|
||
{
|
||
yyval.tmname.name = 0;
|
||
yyval.tmname.array = yyvsp[-1].tok.text;
|
||
yyval.tmname.parms = yyvsp[0].node;
|
||
;
|
||
break;}
|
||
case 78:
|
||
#line 645 "parser.y"
|
||
{
|
||
yyval.tmname.name = 0;
|
||
yyval.tmname.array = 0;
|
||
yyval.tmname.parms = yyvsp[0].node;
|
||
;
|
||
break;}
|
||
case 79:
|
||
#line 652 "parser.y"
|
||
{
|
||
yyval.node = yyvsp[-1].node;
|
||
;
|
||
break;}
|
||
case 80:
|
||
#line 655 "parser.y"
|
||
{
|
||
yyval.node = 0;
|
||
;
|
||
break;}
|
||
case 81:
|
||
#line 663 "parser.y"
|
||
{
|
||
DOH *o, *t;
|
||
t = LParse_skip_balanced('{','}');
|
||
o = new_node("Exception",yyvsp[-4].tok.filename,yyvsp[-4].tok.line);
|
||
Setattr(o,"lang",yyvsp[-2].tok.text);
|
||
Setattr(o,"code",t);
|
||
;
|
||
break;}
|
||
case 82:
|
||
#line 672 "parser.y"
|
||
{
|
||
DOH *o, *t;
|
||
t = LParse_skip_balanced('{','}');
|
||
o = new_node("Exception",yyvsp[-1].tok.filename,yyvsp[-1].tok.line);
|
||
Setattr(o,"code",t);
|
||
;
|
||
break;}
|
||
case 83:
|
||
#line 680 "parser.y"
|
||
{
|
||
DOH *o;
|
||
o = new_node("ExceptionClear",yyvsp[-4].tok.filename,yyvsp[-4].tok.line);
|
||
Setattr(o,"lang",yyvsp[-2].tok.text);
|
||
;
|
||
break;}
|
||
case 84:
|
||
#line 687 "parser.y"
|
||
{
|
||
new_node("ExceptionClear",yyvsp[-1].tok.filename,yyvsp[-1].tok.line);
|
||
;
|
||
break;}
|
||
case 85:
|
||
#line 693 "parser.y"
|
||
{
|
||
DOH *o = new_node("Pragma",yyvsp[-3].tok.filename,yyvsp[-3].tok.line);
|
||
Setattr(o,"name",yyvsp[-2].tok.text);
|
||
Setattr(o,"value",yyvsp[-1].tok.text);
|
||
;
|
||
break;}
|
||
case 86:
|
||
#line 698 "parser.y"
|
||
{
|
||
DOH *o = new_node("Pragma",yyvsp[-6].tok.filename,yyvsp[-6].tok.line);
|
||
Setattr(o,"name",yyvsp[-2].tok.text);
|
||
Setattr(o,"lang",yyvsp[-4].tok.text);
|
||
Setattr(o,"value",yyvsp[-1].tok.text);
|
||
;
|
||
break;}
|
||
case 87:
|
||
#line 706 "parser.y"
|
||
{
|
||
yyval.tok.text = yyvsp[0].tok.text;
|
||
;
|
||
break;}
|
||
case 88:
|
||
#line 709 "parser.y"
|
||
{
|
||
yyval.tok.text = 0;
|
||
;
|
||
break;}
|
||
case 89:
|
||
#line 717 "parser.y"
|
||
{
|
||
DOH *o = new_node("Native",yyvsp[-1].tok.filename,yyvsp[-1].tok.line);
|
||
top = o;
|
||
;
|
||
break;}
|
||
case 90:
|
||
#line 720 "parser.y"
|
||
{
|
||
top = Getattr(top,"parent");
|
||
;
|
||
break;}
|
||
case 96:
|
||
#line 734 "parser.y"
|
||
{ LParse_skip_decl(); ;
|
||
break;}
|
||
case 97:
|
||
#line 739 "parser.y"
|
||
{
|
||
DOH *o;
|
||
Active_type = (LParseType *) Copy(yyvsp[-3].type);
|
||
Active_extern = yyvsp[-4].tok.text;
|
||
yyvsp[-3].type->is_pointer += yyvsp[-2].decl.is_pointer;
|
||
if (yyvsp[-1].tok.text) {
|
||
yyvsp[-3].type->is_pointer++;
|
||
yyvsp[-3].type->arraystr = Swig_copy_string(Char(yyvsp[-1].tok.text));
|
||
}
|
||
yyvsp[-3].type->is_reference = yyvsp[-2].decl.is_reference;
|
||
o = new_node("Variable", Getfile(yyvsp[-2].decl.id),Getline(yyvsp[-2].decl.id));
|
||
Setattr(o,"name",yyvsp[-2].decl.id);
|
||
Setattr(o,"type",yyvsp[-3].type);
|
||
if (yyvsp[-4].tok.ivalue) {
|
||
Setattr(o,"extern",yyvsp[-4].tok.text);
|
||
}
|
||
if (yyvsp[0].tok.text)
|
||
Setattr(o,"value",yyvsp[0].tok.text);
|
||
|
||
apply_modifier(o);
|
||
;
|
||
break;}
|
||
case 98:
|
||
#line 759 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 99:
|
||
#line 763 "parser.y"
|
||
{
|
||
LParse_error(yyvsp[-1].tok.filename,yyvsp[-1].tok.line,"Pointer to function not currently supported.\n");
|
||
LParse_skip_decl();
|
||
;
|
||
break;}
|
||
case 100:
|
||
#line 772 "parser.y"
|
||
{
|
||
DOH *o;
|
||
Active_type = (LParseType *) Copy(yyvsp[-5].type);
|
||
Active_extern = yyvsp[-6].tok.text;
|
||
yyvsp[-5].type->is_pointer += yyvsp[-4].decl.is_pointer;
|
||
yyvsp[-5].type->is_reference = yyvsp[-4].decl.is_reference;
|
||
o = new_node("Function",Getfile(yyvsp[-4].decl.id),Getline(yyvsp[-4].decl.id));
|
||
Setattr(o,"name",yyvsp[-4].decl.id);
|
||
Setattr(o,"type",yyvsp[-5].type);
|
||
Setattr(o,"parms",yyvsp[-2].node);
|
||
if (yyvsp[-6].tok.ivalue) {
|
||
Setattr(o,"extern", yyvsp[-6].tok.text);
|
||
}
|
||
apply_modifier(o);
|
||
;
|
||
break;}
|
||
case 101:
|
||
#line 786 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 102:
|
||
#line 790 "parser.y"
|
||
{
|
||
DOH *o;
|
||
Active_type = (LParseType *) Copy(yyvsp[-5].type);
|
||
Active_extern = yyvsp[-6].tok.text;
|
||
yyvsp[-5].type->is_pointer += yyvsp[-4].decl.is_pointer;
|
||
yyvsp[-5].type->is_reference = yyvsp[-4].decl.is_reference;
|
||
o = new_node("Function",Getfile(yyvsp[-4].decl.id),Getline(yyvsp[-4].decl.id));
|
||
Setattr(o,"name",yyvsp[-4].decl.id);
|
||
Setattr(o,"type",yyvsp[-5].type);
|
||
Setattr(o,"parms",yyvsp[-2].node);
|
||
if (yyvsp[-6].tok.ivalue) {
|
||
Setattr(o,"extern", yyvsp[-6].tok.text);
|
||
}
|
||
if (yyvsp[0].tok.text)
|
||
Setattr(o,"code",yyvsp[0].tok.text);
|
||
apply_modifier(o);
|
||
;
|
||
break;}
|
||
case 103:
|
||
#line 810 "parser.y"
|
||
{
|
||
DOH *o;
|
||
LParseType *t = NewLParseType(LPARSE_T_INT);
|
||
Active_type = (LParseType *) Copy(t);
|
||
Active_extern = yyvsp[-5].tok.text;
|
||
t->is_pointer += yyvsp[-4].decl.is_pointer;
|
||
t->is_reference = yyvsp[-4].decl.is_reference;
|
||
o = new_node("Function", Getfile(yyvsp[-4].decl.id),Getline(yyvsp[-4].decl.id));
|
||
Setattr(o,"name",yyvsp[-4].decl.id);
|
||
Setattr(o,"type",t);
|
||
Setattr(o,"parms",yyvsp[-2].node);
|
||
if (yyvsp[-5].tok.ivalue) {
|
||
Setattr(o,"extern", yyvsp[-5].tok.text);
|
||
}
|
||
apply_modifier(o);
|
||
;
|
||
break;}
|
||
case 104:
|
||
#line 825 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 105:
|
||
#line 829 "parser.y"
|
||
{
|
||
DOH *o;
|
||
yyvsp[-5].type->is_pointer += yyvsp[-4].decl.is_pointer;
|
||
yyvsp[-5].type->is_reference = yyvsp[-4].decl.is_reference;
|
||
o = new_node("Function",Getfile(yyvsp[-4].decl.id),Getline(yyvsp[-4].decl.id));
|
||
Setattr(o,"name",yyvsp[-4].decl.id);
|
||
Setattr(o,"type",yyvsp[-5].type);
|
||
Setattr(o,"parms",yyvsp[-2].node);
|
||
Setattr(o,"inline",NewString(""));
|
||
if (yyvsp[0].tok.text) {
|
||
Setattr(o,"code",yyvsp[0].tok.text);
|
||
}
|
||
apply_modifier(o);
|
||
;
|
||
break;}
|
||
case 106:
|
||
#line 847 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 107:
|
||
#line 848 "parser.y"
|
||
{
|
||
DOH *o;
|
||
LParseType *t = (LParseType *) Copy(Active_type);
|
||
t->is_pointer += yyvsp[-2].decl.is_pointer;
|
||
if (yyvsp[-1].tok.text) {
|
||
t->is_pointer++;
|
||
t->arraystr = Swig_copy_string(Char(yyvsp[-1].tok.text));
|
||
}
|
||
t->is_reference = yyvsp[-2].decl.is_reference;
|
||
o = new_node("Variable", Getfile(yyvsp[-2].decl.id),Getline(yyvsp[-2].decl.id));
|
||
Setattr(o,"name",yyvsp[-2].decl.id);
|
||
Setattr(o,"type",t);
|
||
if (Active_extern) {
|
||
Setattr(o,"extern",Active_extern);
|
||
}
|
||
if (yyvsp[0].tok.text)
|
||
Setattr(o,"value",yyvsp[0].tok.text);
|
||
apply_modifier(o);
|
||
;
|
||
break;}
|
||
case 108:
|
||
#line 866 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 109:
|
||
#line 867 "parser.y"
|
||
{
|
||
DOH *o;
|
||
LParseType *t = (LParseType *) Copy(Active_type);
|
||
t->is_pointer += yyvsp[-3].decl.is_pointer;
|
||
t->is_reference = yyvsp[-3].decl.is_reference;
|
||
o = new_node("Function", Getfile(yyvsp[-3].decl.id), Getline(yyvsp[-3].decl.id));
|
||
Setattr(o,"name",yyvsp[-3].decl.id);
|
||
Setattr(o,"parms",yyvsp[-1].node);
|
||
Setattr(o,"type", t);
|
||
if (Active_extern) {
|
||
Setattr(o,"extern",Active_extern);
|
||
}
|
||
apply_modifier(o);
|
||
;
|
||
break;}
|
||
case 110:
|
||
#line 880 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 111:
|
||
#line 883 "parser.y"
|
||
{
|
||
yyval.tok.ivalue = 1;
|
||
yyval.tok.text = NewString("");
|
||
;
|
||
break;}
|
||
case 112:
|
||
#line 887 "parser.y"
|
||
{
|
||
yyval.tok.ivalue = 1;
|
||
yyval.tok.text = yyvsp[0].tok.text;
|
||
;
|
||
break;}
|
||
case 113:
|
||
#line 891 "parser.y"
|
||
{
|
||
yyval.tok.ivalue = 0;
|
||
yyval.tok.text = 0;
|
||
;
|
||
break;}
|
||
case 114:
|
||
#line 897 "parser.y"
|
||
{ yyval.tok.text = LParse_skip_balanced('{','}'); ;
|
||
break;}
|
||
case 115:
|
||
#line 900 "parser.y"
|
||
{;
|
||
break;}
|
||
case 116:
|
||
#line 901 "parser.y"
|
||
{ LParse_skip_balanced('(',')'); ;
|
||
break;}
|
||
case 117:
|
||
#line 902 "parser.y"
|
||
{;
|
||
break;}
|
||
case 118:
|
||
#line 907 "parser.y"
|
||
{
|
||
DOH *o;
|
||
o = new_node("Enumeration",yyvsp[-2].tok.filename,yyvsp[-2].tok.line);
|
||
Setattr(o,"name",yyvsp[-2].tok.text);
|
||
top = o;
|
||
;
|
||
break;}
|
||
case 119:
|
||
#line 912 "parser.y"
|
||
{
|
||
LParseType *t;
|
||
top = Getattr(top,"parent");
|
||
t = NewLParseType(LPARSE_T_ENUM);
|
||
LParse_typedef_add(t,yyvsp[-5].tok.text);
|
||
;
|
||
break;}
|
||
case 120:
|
||
#line 921 "parser.y"
|
||
{
|
||
DOH *o;
|
||
o = new_node("Enumeration",yyvsp[-2].tok.filename,yyvsp[-2].tok.line);
|
||
Setattr(o,"name",yyvsp[-1].tok.text);
|
||
top = o;
|
||
;
|
||
break;}
|
||
case 121:
|
||
#line 926 "parser.y"
|
||
{
|
||
LParseType *t;
|
||
DOH *o2;
|
||
top = Getattr(top,"parent");
|
||
t = NewLParseType(LPARSE_T_ENUM);
|
||
Active_typedef = (LParseType *) Copy(t);
|
||
LParse_typedef_add(t,yyvsp[-5].tok.text);
|
||
LParse_typedef_add(t,yyvsp[0].tok.text);
|
||
o2 = new_node("Typedef",yyvsp[-7].tok.filename,yyvsp[-7].tok.line);
|
||
Setattr(o2,"name",yyvsp[0].tok.text);
|
||
Setattr(o2,"type",Copy(t));
|
||
;
|
||
break;}
|
||
case 122:
|
||
#line 937 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 123:
|
||
#line 942 "parser.y"
|
||
{ yyval.tok = yyvsp[0].tok; ;
|
||
break;}
|
||
case 124:
|
||
#line 943 "parser.y"
|
||
{ yyval.tok.text = NewString(""); ;
|
||
break;}
|
||
case 125:
|
||
#line 946 "parser.y"
|
||
{;
|
||
break;}
|
||
case 126:
|
||
#line 947 "parser.y"
|
||
{;
|
||
break;}
|
||
case 127:
|
||
#line 950 "parser.y"
|
||
{
|
||
DOH *o = new_node("EnumValue",yyvsp[0].tok.filename,yyvsp[0].tok.line);
|
||
Setattr(o,"name",yyvsp[0].tok.text);
|
||
Setattr(o,"value",yyvsp[0].tok.text);
|
||
;
|
||
break;}
|
||
case 128:
|
||
#line 955 "parser.y"
|
||
{
|
||
DOH *o = new_node("EnumValue",yyvsp[-2].tok.filename,yyvsp[-2].tok.line);
|
||
Setattr(o,"name",yyvsp[-2].tok.text);
|
||
Setattr(o,"value",yyvsp[-2].tok.text);
|
||
;
|
||
break;}
|
||
case 129:
|
||
#line 960 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 130:
|
||
#line 963 "parser.y"
|
||
{
|
||
DOH *o;
|
||
Active_typedef = (LParseType *) Copy(yyvsp[-1].type);
|
||
yyvsp[-1].type->is_pointer += yyvsp[0].decl.is_pointer;
|
||
LParse_typedef_add(yyvsp[-1].type,yyvsp[0].decl.id);
|
||
o = new_node("Typedef", yyvsp[-2].tok.filename, yyvsp[-2].tok.line);
|
||
Setattr(o,"name", yyvsp[0].decl.id);
|
||
Setattr(o,"type", Copy(yyvsp[-1].type));
|
||
;
|
||
break;}
|
||
case 131:
|
||
#line 971 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 132:
|
||
#line 975 "parser.y"
|
||
{
|
||
DOH *o;
|
||
LParseType *rt;
|
||
rt = NewLParseType(LPARSE_T_FUNCTION);
|
||
rt->is_pointer = 1;
|
||
strcpy(rt->name,"<function ptr>");
|
||
LParse_typedef_add(rt,yyvsp[-5].pname.name);
|
||
o = new_node("Typedef", yyvsp[-9].tok.filename, yyvsp[-9].tok.line);
|
||
Setattr(o,"name", yyvsp[-5].pname.name);
|
||
Setattr(o,"type", Copy(rt));
|
||
Setattr(o,"rettype",yyvsp[-8].type);
|
||
Setattr(o,"parms", yyvsp[-2].node);
|
||
;
|
||
break;}
|
||
case 133:
|
||
#line 991 "parser.y"
|
||
{
|
||
DOH *o;
|
||
LParseType *rt;
|
||
rt = NewLParseType(LPARSE_T_FUNCTION);
|
||
rt->is_pointer = 1;
|
||
strcpy(rt->name,"<function ptr>");
|
||
yyvsp[-9].type->is_pointer += yyvsp[-8].tok.ivalue;
|
||
LParse_typedef_add(rt,yyvsp[-5].pname.name);
|
||
o = new_node("Typedef", yyvsp[-10].tok.filename, yyvsp[-10].tok.line);
|
||
Setattr(o,"name", yyvsp[-5].pname.name);
|
||
Setattr(o,"type", Copy(rt));
|
||
Setattr(o,"parms", yyvsp[-2].node);
|
||
Setattr(o,"rettype", yyvsp[-9].type);
|
||
;
|
||
break;}
|
||
case 134:
|
||
#line 1008 "parser.y"
|
||
{
|
||
DOH *o;
|
||
Active_typedef = (LParseType *) Copy(yyvsp[-2].type);
|
||
yyvsp[-2].type->is_pointer += yyvsp[-1].decl.is_pointer;
|
||
yyvsp[-2].type->is_pointer++;
|
||
yyvsp[-2].type->arraystr = Swig_copy_string(Char(yyvsp[0].tok.text));
|
||
LParse_typedef_add(yyvsp[-2].type,yyvsp[-1].decl.id);
|
||
o = new_node("Typedef", yyvsp[-3].tok.filename, yyvsp[-3].tok.line);
|
||
Setattr(o,"name", yyvsp[-1].decl.id);
|
||
Setattr(o,"type", Copy(yyvsp[-2].type));
|
||
;
|
||
break;}
|
||
case 135:
|
||
#line 1018 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 136:
|
||
#line 1021 "parser.y"
|
||
{
|
||
if (Active_typedef) {
|
||
DOH *o;
|
||
LParseType *t;
|
||
t = (LParseType *) Copy(Active_typedef);
|
||
t->is_pointer += yyvsp[-1].decl.is_pointer;
|
||
LParse_typedef_add(t,yyvsp[-1].decl.id);
|
||
o = new_node("Typedef", Getfile(yyvsp[-1].decl.id), Getline(yyvsp[-1].decl.id));
|
||
Setattr(o,"name", yyvsp[-1].decl.id);
|
||
Setattr(o,"type", t);
|
||
}
|
||
;
|
||
break;}
|
||
case 137:
|
||
#line 1033 "parser.y"
|
||
{
|
||
DOH *o;
|
||
LParseType *t;
|
||
t = (LParseType *) Copy(Active_typedef);
|
||
t->is_pointer += yyvsp[-1].decl.is_pointer + 1;
|
||
t->arraystr = Swig_copy_string(Char(yyvsp[0].tok.text));
|
||
LParse_typedef_add(t,yyvsp[-1].decl.id);
|
||
o = new_node("Typedef", Getfile(yyvsp[-1].decl.id), Getline(yyvsp[-1].decl.id));
|
||
Setattr(o,"name", yyvsp[-1].decl.id);
|
||
Setattr(o,"type", t);
|
||
;
|
||
break;}
|
||
case 139:
|
||
#line 1052 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 140:
|
||
#line 1053 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 141:
|
||
#line 1056 "parser.y"
|
||
{
|
||
LParseType *t;
|
||
DOH *o = new_node("Class",yyvsp[-2].tok.filename,yyvsp[-2].tok.line);
|
||
Setattr(o,"name",yyvsp[-2].tok.text);
|
||
Setattr(o,"bases",yyvsp[-1].node);
|
||
Setattr(o,"type",yyvsp[-3].tok.text);
|
||
apply_modifier(o);
|
||
t = NewLParseType(LPARSE_T_USER);
|
||
strcpy(t->name,Char(yyvsp[-2].tok.text));
|
||
LParse_typedef_add(t,yyvsp[-2].tok.text);
|
||
LParse_new_scope(0);
|
||
if (Cmp(yyvsp[-3].tok.text,"class") == 0) {
|
||
cplus_mode = CPLUS_PRIVATE;
|
||
} else {
|
||
cplus_mode = CPLUS_PUBLIC;
|
||
}
|
||
top = o;
|
||
;
|
||
break;}
|
||
case 142:
|
||
#line 1073 "parser.y"
|
||
{
|
||
dump_nested(yyvsp[-5].tok.text);
|
||
Setattr(top,"scope",LParse_collapse_scope(yyvsp[-5].tok.text));
|
||
top = Getattr(top,"parent");
|
||
cplus_mode = CPLUS_PUBLIC;
|
||
;
|
||
break;}
|
||
case 143:
|
||
#line 1082 "parser.y"
|
||
{
|
||
LParseType *t;
|
||
DOH *o = new_node("Class",yyvsp[-2].tok.filename,yyvsp[-2].tok.line);
|
||
Setattr(o,"name",yyvsp[-2].tok.text);
|
||
Setattr(o,"bases",yyvsp[-1].node);
|
||
Setattr(o,"type",yyvsp[-3].tok.text);
|
||
apply_modifier(o);
|
||
t = NewLParseType(LPARSE_T_USER);
|
||
strcpy(t->name,Char(yyvsp[-2].tok.text));
|
||
LParse_typedef_add(t,yyvsp[-2].tok.text);
|
||
LParse_new_scope(0);
|
||
if (Cmp(yyvsp[-3].tok.text,"class") == 0) {
|
||
cplus_mode = CPLUS_PRIVATE;
|
||
} else {
|
||
cplus_mode = CPLUS_PUBLIC;
|
||
}
|
||
top = o;
|
||
;
|
||
break;}
|
||
case 144:
|
||
#line 1099 "parser.y"
|
||
{
|
||
DOH *o2;
|
||
Active_typedef = NewLParseType(LPARSE_T_USER);
|
||
sprintf(Active_typedef->name,"%s %s", Char(yyvsp[-7].tok.text),Char(yyvsp[-6].tok.text));
|
||
Active_typedef->is_pointer = 0;
|
||
Active_typedef->implicit_ptr = 0;
|
||
/* Create dump nested class code */
|
||
if (yyvsp[0].decl.is_pointer > 0) {
|
||
dump_nested(yyvsp[-6].tok.text);
|
||
} else {
|
||
dump_nested(yyvsp[0].decl.id);
|
||
}
|
||
Setattr(top,"scope",LParse_collapse_scope(yyvsp[-6].tok.text));
|
||
o2 = top;
|
||
top = Getattr(top,"parent");
|
||
/* Create a typedef in global scope */
|
||
if (yyvsp[0].decl.is_pointer == 0) {
|
||
LParse_typedef_add((LParseType *) Copy(Active_typedef), yyvsp[0].decl.id);
|
||
Setattr(o2,"typedef",yyvsp[0].decl.id);
|
||
} else {
|
||
LParseType *t = (LParseType *) Copy(Active_typedef);
|
||
t->is_pointer += yyvsp[0].decl.is_pointer;
|
||
LParse_typedef_add(t,yyvsp[0].decl.id);
|
||
}
|
||
cplus_mode = CPLUS_PUBLIC;
|
||
;
|
||
break;}
|
||
case 145:
|
||
#line 1124 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 146:
|
||
#line 1128 "parser.y"
|
||
{
|
||
DOH *o = new_node("Class",yyvsp[-2].tok.filename,yyvsp[-2].tok.line);
|
||
Setattr(o,"type",yyvsp[-1].tok.text);
|
||
LParse_new_scope(0);
|
||
if (Cmp(yyvsp[-1].tok.text,"class") == 0) {
|
||
cplus_mode = CPLUS_PRIVATE;
|
||
} else {
|
||
cplus_mode = CPLUS_PUBLIC;
|
||
}
|
||
top = o;
|
||
;
|
||
break;}
|
||
case 147:
|
||
#line 1138 "parser.y"
|
||
{
|
||
if (yyvsp[0].decl.is_pointer > 0) {
|
||
LParse_error(yyvsp[-6].tok.filename,yyvsp[-6].tok.line,"typedef %s {} *%s not supported correctly. Will be ignored.\n", yyvsp[-5].tok.text, yyvsp[0].decl.id);
|
||
Setattr(top,"error",DohNone);
|
||
top = Getattr(top,"parent");
|
||
} else {
|
||
/* Create a datatype for correctly processing the typedef */
|
||
Active_typedef = NewLParseType(LPARSE_T_USER);
|
||
sprintf(Active_typedef->name,"%s",Char(yyvsp[0].decl.id));
|
||
if (yyvsp[0].decl.is_pointer == 0) {
|
||
dump_nested(yyvsp[0].decl.id);
|
||
}
|
||
Setattr(top,"name",yyvsp[0].decl.id);
|
||
apply_modifier(top);
|
||
Setattr(top,"typedef",yyvsp[0].decl.id);
|
||
Setattr(top,"scope",LParse_collapse_scope(0));
|
||
top = Getattr(top,"parent");
|
||
LParse_typedef_add((LParseType *) Copy(Active_typedef),yyvsp[0].decl.id);
|
||
}
|
||
cplus_mode = CPLUS_PUBLIC;
|
||
;
|
||
break;}
|
||
case 148:
|
||
#line 1158 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 149:
|
||
#line 1161 "parser.y"
|
||
{
|
||
yyval.node = yyvsp[0].node;
|
||
;
|
||
break;}
|
||
case 150:
|
||
#line 1164 "parser.y"
|
||
{
|
||
yyval.node = 0;
|
||
;
|
||
break;}
|
||
case 151:
|
||
#line 1169 "parser.y"
|
||
{
|
||
yyval.node = NewList();
|
||
Append(yyval.node,yyvsp[0].tok.text);
|
||
;
|
||
break;}
|
||
case 152:
|
||
#line 1173 "parser.y"
|
||
{
|
||
yyval.node = yyvsp[-2].node;
|
||
if (yyvsp[0].tok.text)
|
||
Append(yyval.node,yyvsp[0].tok.text);
|
||
;
|
||
break;}
|
||
case 153:
|
||
#line 1180 "parser.y"
|
||
{
|
||
LParse_error(yyvsp[0].tok.filename,yyvsp[0].tok.line,"No access specifier given for base class %s (ignored).\n", yyvsp[0].tok.text);
|
||
yyval.tok.text = 0;
|
||
;
|
||
break;}
|
||
case 154:
|
||
#line 1184 "parser.y"
|
||
{
|
||
LParse_error(yyvsp[0].tok.filename,yyvsp[0].tok.line,"No access specifier given for base class %s (ignored).\n", yyvsp[0].tok.text);
|
||
yyval.tok.text = 0;
|
||
;
|
||
break;}
|
||
case 155:
|
||
#line 1188 "parser.y"
|
||
{
|
||
if (Cmp(yyvsp[-1].tok.text,"public") == 0) {
|
||
yyval.tok = yyvsp[0].tok;
|
||
} else {
|
||
LParse_error(yyvsp[0].tok.filename,yyvsp[0].tok.line,"%s inheritance not supported (ignored).\n", yyvsp[-1].tok.text);
|
||
yyval.tok.text = 0;
|
||
}
|
||
;
|
||
break;}
|
||
case 156:
|
||
#line 1196 "parser.y"
|
||
{
|
||
if (Cmp(yyvsp[-1].tok.text,"public") == 0) {
|
||
yyval.tok = yyvsp[0].tok;
|
||
} else {
|
||
LParse_error(yyvsp[0].tok.filename,yyvsp[0].tok.line,"%s inheritance not supported (ignored).\n", yyvsp[-1].tok.text);
|
||
yyval.tok.text = 0;
|
||
}
|
||
;
|
||
break;}
|
||
case 157:
|
||
#line 1204 "parser.y"
|
||
{
|
||
if (Cmp(yyvsp[-2].tok.text,"public") == 0) {
|
||
yyval.tok = yyvsp[0].tok;
|
||
} else {
|
||
yyval.tok.text = 0;
|
||
LParse_error(yyvsp[0].tok.filename,yyvsp[0].tok.line,"%s inheritance not supported (ignored).\n", yyvsp[-2].tok.text);
|
||
}
|
||
;
|
||
break;}
|
||
case 158:
|
||
#line 1214 "parser.y"
|
||
{ yyval.tok.text = NewString("public"); ;
|
||
break;}
|
||
case 159:
|
||
#line 1215 "parser.y"
|
||
{ yyval.tok.text = NewString("private"); ;
|
||
break;}
|
||
case 160:
|
||
#line 1216 "parser.y"
|
||
{ yyval.tok.text = NewString("protected"); ;
|
||
break;}
|
||
case 161:
|
||
#line 1219 "parser.y"
|
||
{;
|
||
break;}
|
||
case 162:
|
||
#line 1220 "parser.y"
|
||
{
|
||
DOH *o = new_node("AddMethods",yyvsp[-1].tok.filename,yyvsp[-1].tok.line);
|
||
top = o;
|
||
;
|
||
break;}
|
||
case 163:
|
||
#line 1223 "parser.y"
|
||
{
|
||
top = Getattr(top,"parent");
|
||
;
|
||
break;}
|
||
case 164:
|
||
#line 1225 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 165:
|
||
#line 1226 "parser.y"
|
||
{
|
||
LParse_error(0,0,"Syntax error in class definition.\n");
|
||
LParse_skip_decl();
|
||
;
|
||
break;}
|
||
case 166:
|
||
#line 1229 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 167:
|
||
#line 1230 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 168:
|
||
#line 1233 "parser.y"
|
||
{
|
||
if (cplus_mode == CPLUS_PUBLIC) {
|
||
DOH *o = new_node("MemberFunction",yyvsp[-3].tok.filename,yyvsp[-3].tok.line);
|
||
Setattr(o,"name",yyvsp[-4].decl.id);
|
||
yyvsp[-5].type->is_pointer += yyvsp[-4].decl.is_pointer;
|
||
yyvsp[-5].type->is_reference = yyvsp[-4].decl.is_reference;
|
||
Setattr(o,"type",yyvsp[-5].type);
|
||
Setattr(o,"parms",yyvsp[-2].node);
|
||
Setattr(o,"code",yyvsp[0].tok.text);
|
||
apply_modifier(o);
|
||
}
|
||
;
|
||
break;}
|
||
case 169:
|
||
#line 1246 "parser.y"
|
||
{
|
||
if (cplus_mode == CPLUS_PUBLIC) {
|
||
DOH *o = new_node("MemberFunction",yyvsp[-3].tok.filename,yyvsp[-3].tok.line);
|
||
Setattr(o,"name",yyvsp[-4].decl.id);
|
||
yyvsp[-5].type->is_pointer += yyvsp[-4].decl.is_pointer;
|
||
yyvsp[-5].type->is_reference = yyvsp[-4].decl.is_reference;
|
||
Setattr(o,"type",yyvsp[-5].type);
|
||
Setattr(o,"parms",yyvsp[-2].node);
|
||
Setattr(o,"code",yyvsp[0].tok.text);
|
||
apply_modifier(o);
|
||
}
|
||
;
|
||
break;}
|
||
case 170:
|
||
#line 1260 "parser.y"
|
||
{
|
||
if (cplus_mode == CPLUS_PUBLIC) {
|
||
DOH *o = new_node("Constructor", yyvsp[-3].tok.filename, yyvsp[-3].tok.line);
|
||
Setattr(o,"name",yyvsp[-4].tok.text);
|
||
Setattr(o,"parms",yyvsp[-2].node);
|
||
Setattr(o,"code",yyvsp[0].tok.text);
|
||
apply_modifier(o);
|
||
}
|
||
;
|
||
break;}
|
||
case 171:
|
||
#line 1272 "parser.y"
|
||
{
|
||
if (cplus_mode == CPLUS_PUBLIC) {
|
||
DOH *o = new_node("Destructor",yyvsp[-4].tok.filename,yyvsp[-4].tok.line);
|
||
Setattr(o,"name",yyvsp[-5].tok.text);
|
||
Setattr(o,"parms",yyvsp[-2].node);
|
||
Setattr(o,"code",yyvsp[0].tok.text);
|
||
apply_modifier(o);
|
||
}
|
||
;
|
||
break;}
|
||
case 172:
|
||
#line 1282 "parser.y"
|
||
{
|
||
if (cplus_mode == CPLUS_PUBLIC) {
|
||
DOH *o = new_node("Destructor",yyvsp[-4].tok.filename,yyvsp[-4].tok.line);
|
||
Setattr(o,"name",yyvsp[-5].tok.text);
|
||
Setattr(o,"parms",yyvsp[-2].node);
|
||
Setattr(o,"code",yyvsp[0].tok.text);
|
||
apply_modifier(o);
|
||
}
|
||
;
|
||
break;}
|
||
case 173:
|
||
#line 1294 "parser.y"
|
||
{
|
||
if (cplus_mode == CPLUS_PUBLIC) {
|
||
DOH *o = new_node("MemberData",Getfile(yyvsp[-1].decl.id),Getline(yyvsp[-1].decl.id));
|
||
Active_type = (LParseType *) Copy(yyvsp[-2].type);
|
||
yyvsp[-2].type->is_pointer += yyvsp[-1].decl.is_pointer;
|
||
yyvsp[-2].type->is_reference = yyvsp[-1].decl.is_reference;
|
||
Setattr(o,"name",yyvsp[-1].decl.id);
|
||
Setattr(o,"type",yyvsp[-2].type);
|
||
Setattr(o,"value",yyvsp[0].tok.text);
|
||
apply_modifier(o);
|
||
}
|
||
;
|
||
break;}
|
||
case 174:
|
||
#line 1305 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 175:
|
||
#line 1307 "parser.y"
|
||
{
|
||
if (cplus_mode == CPLUS_PUBLIC) {
|
||
DOH *o = new_node("MemberData",Getfile(yyvsp[-2].decl.id),Getline(yyvsp[-2].decl.id));
|
||
Active_type = (LParseType *) Copy(yyvsp[-3].type);
|
||
yyvsp[-3].type->is_pointer += yyvsp[-2].decl.is_pointer;
|
||
yyvsp[-3].type->is_reference = yyvsp[-2].decl.is_reference;
|
||
if (yyvsp[-1].tok.text) {
|
||
yyvsp[-3].type->arraystr = Swig_copy_string(Char(yyvsp[-1].tok.text));
|
||
yyvsp[-3].type->is_pointer++;
|
||
}
|
||
Setattr(o,"name",yyvsp[-2].decl.id);
|
||
Setattr(o,"type",yyvsp[-3].type);
|
||
Setattr(o,"value",yyvsp[-1].tok.text);
|
||
apply_modifier(o);
|
||
}
|
||
;
|
||
break;}
|
||
case 176:
|
||
#line 1326 "parser.y"
|
||
{
|
||
if (cplus_mode == CPLUS_PUBLIC) {
|
||
DOH *o;
|
||
Active_type = (LParseType *) Copy(yyvsp[-1].type);
|
||
yyvsp[-1].type->is_pointer += yyvsp[0].decl.is_pointer;
|
||
yyvsp[-1].type->is_reference = yyvsp[0].decl.is_reference;
|
||
o = new_node("StaticMemberData",yyvsp[-2].tok.filename, yyvsp[-2].tok.line);
|
||
Setattr(o,"name",yyvsp[0].decl.id);
|
||
Setattr(o,"type",yyvsp[-1].type);
|
||
apply_modifier(o);
|
||
}
|
||
;
|
||
break;}
|
||
case 177:
|
||
#line 1337 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 178:
|
||
#line 1341 "parser.y"
|
||
{
|
||
if (cplus_mode == CPLUS_PUBLIC) {
|
||
DOH *o = new_node("StaticMemberFunction",yyvsp[-6].tok.filename,yyvsp[-6].tok.line);
|
||
yyvsp[-5].type->is_pointer += yyvsp[-4].decl.is_pointer;
|
||
yyvsp[-5].type->is_reference = yyvsp[-4].decl.is_reference;
|
||
Setattr(o,"name",yyvsp[-4].decl.id);
|
||
apply_modifier(o);
|
||
Setattr(o,"type",yyvsp[-5].type);
|
||
Setattr(o,"parms",yyvsp[-2].node);
|
||
Setattr(o,"code",yyvsp[0].tok.text);
|
||
}
|
||
;
|
||
break;}
|
||
case 179:
|
||
#line 1356 "parser.y"
|
||
{ cplus_mode = CPLUS_PUBLIC; ;
|
||
break;}
|
||
case 180:
|
||
#line 1360 "parser.y"
|
||
{ cplus_mode = CPLUS_PRIVATE; ;
|
||
break;}
|
||
case 181:
|
||
#line 1364 "parser.y"
|
||
{ cplus_mode = CPLUS_PRIVATE; ;
|
||
break;}
|
||
case 182:
|
||
#line 1366 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 183:
|
||
#line 1368 "parser.y"
|
||
{
|
||
DOH *o;
|
||
o = new_node("Enumeration",yyvsp[-1].tok.filename,yyvsp[-1].tok.line);
|
||
Setattr(o,"name",yyvsp[-1].tok.text);
|
||
top = o;
|
||
;
|
||
break;}
|
||
case 184:
|
||
#line 1373 "parser.y"
|
||
{
|
||
LParseType *t;
|
||
top = Getattr(top,"parent");
|
||
t = NewLParseType(LPARSE_T_ENUM);
|
||
LParse_typedef_add(t,yyvsp[-4].tok.text);
|
||
;
|
||
break;}
|
||
case 185:
|
||
#line 1381 "parser.y"
|
||
{
|
||
LParse_skip_decl();
|
||
;
|
||
break;}
|
||
case 186:
|
||
#line 1386 "parser.y"
|
||
{
|
||
LParse_skip_decl();
|
||
;
|
||
break;}
|
||
case 187:
|
||
#line 1391 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 188:
|
||
#line 1395 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 189:
|
||
#line 1411 "parser.y"
|
||
{
|
||
yyvsp[0].tok.text = LParse_skip_balanced('{','}');
|
||
;
|
||
break;}
|
||
case 190:
|
||
#line 1413 "parser.y"
|
||
{
|
||
if (cplus_mode == CPLUS_PUBLIC) {
|
||
LParseType *t = NewLParseType(LPARSE_T_USER);
|
||
strcpy(t->name,Char(yyvsp[-4].tok.text));
|
||
LParse_typedef_add(t,yyvsp[-4].tok.text);
|
||
if (yyvsp[-1].decl.id) {
|
||
if (Cmp(yyvsp[-5].tok.text,"class") == 0) {
|
||
LParse_error(yyvsp[-4].tok.filename,yyvsp[-4].tok.line,"Nested classes not currently supported (ignored).\n");
|
||
/* Generate some code for a new class */
|
||
} else {
|
||
DOH *s;
|
||
DOH *n = NewHash();
|
||
s = NewString("");
|
||
Printf(s,"typedef %s %s $classname_%s;\n", yyvsp[-5].tok.text,yyvsp[-3].tok.text,yyvsp[-1].decl.id);
|
||
Setattr(n,"code",s);
|
||
Setattr(n,"name",yyvsp[-1].decl.id);
|
||
t = (LParseType *) Copy(t);
|
||
t->is_pointer = yyvsp[-1].decl.is_pointer;
|
||
t->is_reference = yyvsp[-1].decl.is_reference;
|
||
Setattr(n,"type",t);
|
||
Append(nested,n);
|
||
}
|
||
}
|
||
}
|
||
;
|
||
break;}
|
||
case 191:
|
||
#line 1439 "parser.y"
|
||
{
|
||
yyvsp[0].tok.text = LParse_skip_balanced('{','}');
|
||
;
|
||
break;}
|
||
case 192:
|
||
#line 1441 "parser.y"
|
||
{
|
||
if (cplus_mode == CPLUS_PUBLIC) {
|
||
if (yyvsp[-1].decl.id) {
|
||
if (Cmp(yyvsp[-4].tok.text,"class") == 0) {
|
||
LParse_error(yyvsp[-3].tok.filename,yyvsp[-3].tok.line, "Nested classes not currently supported (ignored).\n");
|
||
/* Generate some code for a new class */
|
||
} else {
|
||
DOH *s;
|
||
LParseType *t;
|
||
DOH *n = NewHash();
|
||
s = NewString("");
|
||
Printf(s,"typedef %s %s $classname_%s;\n", yyvsp[-4].tok.text,yyvsp[-3].tok.text,yyvsp[-1].decl.id);
|
||
Setattr(n,"code",s);
|
||
Setattr(n,"name",yyvsp[-1].decl.id);
|
||
t = NewLParseType(LPARSE_T_USER);
|
||
t->is_pointer = yyvsp[-1].decl.is_pointer;
|
||
t->is_reference = yyvsp[-1].decl.is_reference;
|
||
Setattr(n,"type",t);
|
||
Append(nested,n);
|
||
}
|
||
}
|
||
}
|
||
;
|
||
break;}
|
||
case 193:
|
||
#line 1466 "parser.y"
|
||
{ yyval.decl = yyvsp[0].decl;;
|
||
break;}
|
||
case 194:
|
||
#line 1467 "parser.y"
|
||
{ yyval.decl.id = 0; ;
|
||
break;}
|
||
case 195:
|
||
#line 1470 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 196:
|
||
#line 1471 "parser.y"
|
||
{
|
||
if (cplus_mode == CPLUS_PUBLIC) {
|
||
DOH *o = new_node("MemberData",yyvsp[-2].tok.filename,yyvsp[-2].tok.line);
|
||
LParseType *t = (LParseType *) Copy(Active_type);
|
||
t->is_pointer += yyvsp[-1].decl.is_pointer;
|
||
t->is_reference = yyvsp[-1].decl.is_reference;
|
||
Setattr(o,"name", yyvsp[-1].decl.id);
|
||
Setattr(o,"type",t);
|
||
Setattr(o,"value",yyvsp[0].tok.text);
|
||
apply_modifier(o);
|
||
}
|
||
;
|
||
break;}
|
||
case 197:
|
||
#line 1482 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 198:
|
||
#line 1483 "parser.y"
|
||
{
|
||
if (cplus_mode == CPLUS_PUBLIC) {
|
||
DOH *o = new_node("MemberData",yyvsp[-3].tok.filename,yyvsp[-3].tok.line);
|
||
LParseType *t = (LParseType *) Copy(Active_type);
|
||
t->is_pointer += yyvsp[-2].decl.is_pointer;
|
||
t->is_reference = yyvsp[-2].decl.is_reference;
|
||
if (yyvsp[-1].tok.text) {
|
||
t->arraystr = Swig_copy_string(Char(yyvsp[-1].tok.text));
|
||
t->is_pointer++;
|
||
}
|
||
Setattr(o,"name",yyvsp[-2].decl.id);
|
||
Setattr(o,"type",t);
|
||
Setattr(o,"value",yyvsp[-1].tok.text);
|
||
apply_modifier(o);
|
||
}
|
||
;
|
||
break;}
|
||
case 199:
|
||
#line 1498 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 200:
|
||
#line 1501 "parser.y"
|
||
{
|
||
yyval.tok.text = 0;
|
||
;
|
||
break;}
|
||
case 201:
|
||
#line 1504 "parser.y"
|
||
{
|
||
yyval.tok.text = LParse_skip_balanced('{','}');
|
||
;
|
||
break;}
|
||
case 202:
|
||
#line 1509 "parser.y"
|
||
{;
|
||
break;}
|
||
case 203:
|
||
#line 1510 "parser.y"
|
||
{;
|
||
break;}
|
||
case 204:
|
||
#line 1511 "parser.y"
|
||
{;
|
||
break;}
|
||
case 205:
|
||
#line 1516 "parser.y"
|
||
{ yyval.tok.text = 0; ;
|
||
break;}
|
||
case 206:
|
||
#line 1517 "parser.y"
|
||
{ yyval.tok.text = LParse_skip_balanced('{','}'); ;
|
||
break;}
|
||
case 207:
|
||
#line 1520 "parser.y"
|
||
{;
|
||
break;}
|
||
case 208:
|
||
#line 1521 "parser.y"
|
||
{;
|
||
break;}
|
||
case 209:
|
||
#line 1524 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 210:
|
||
#line 1525 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 211:
|
||
#line 1528 "parser.y"
|
||
{ LParse_skip_balanced('(',')'); ;
|
||
break;}
|
||
case 212:
|
||
#line 1534 "parser.y"
|
||
{
|
||
DOH *o = new_node("ClassDecl",yyvsp[0].tok.filename,yyvsp[0].tok.line);
|
||
Setattr(o,"name",yyvsp[-1].tok.text);
|
||
;
|
||
break;}
|
||
case 213:
|
||
#line 1541 "parser.y"
|
||
{
|
||
LParse_skip_decl();
|
||
;
|
||
break;}
|
||
case 214:
|
||
#line 1546 "parser.y"
|
||
{
|
||
LParse_skip_decl();
|
||
;
|
||
break;}
|
||
case 215:
|
||
#line 1552 "parser.y"
|
||
{
|
||
DOH *o = new_node("AddMethods",yyvsp[0].tok.filename, yyvsp[0].tok.line);
|
||
Setattr(o,"name",yyvsp[-1].tok.text);
|
||
cplus_mode = CPLUS_PUBLIC;
|
||
top = o;
|
||
;
|
||
break;}
|
||
case 216:
|
||
#line 1557 "parser.y"
|
||
{
|
||
top = Getattr(top,"parent");
|
||
;
|
||
break;}
|
||
case 217:
|
||
#line 1568 "parser.y"
|
||
{
|
||
Insert(yyvsp[0].node,0,yyvsp[-1].node);
|
||
yyval.node = yyvsp[0].node;
|
||
;
|
||
break;}
|
||
case 218:
|
||
#line 1572 "parser.y"
|
||
{ yyval.node = NewList(); ;
|
||
break;}
|
||
case 219:
|
||
#line 1575 "parser.y"
|
||
{
|
||
Insert(yyvsp[0].node,0,yyvsp[-1].node);
|
||
yyval.node = yyvsp[0].node;
|
||
;
|
||
break;}
|
||
case 220:
|
||
#line 1579 "parser.y"
|
||
{ yyval.node = NewList(); ;
|
||
break;}
|
||
case 221:
|
||
#line 1582 "parser.y"
|
||
{
|
||
yyval.node = NewHash();
|
||
Setattr(yyval.node,"name",yyvsp[0].pname.name);
|
||
if (yyvsp[0].pname.array) {
|
||
yyvsp[-1].type->is_pointer++;
|
||
yyvsp[-1].type->arraystr = Swig_copy_string(Char(yyvsp[0].pname.array));
|
||
}
|
||
if (yyvsp[0].pname.value)
|
||
Setattr(yyval.node,"value",yyvsp[0].pname.value);
|
||
Setattr(yyval.node,"type",yyvsp[-1].type);
|
||
;
|
||
break;}
|
||
case 222:
|
||
#line 1593 "parser.y"
|
||
{
|
||
yyval.node = NewHash();
|
||
Setattr(yyval.node,"name",yyvsp[0].pname.name);
|
||
yyvsp[-2].type->is_pointer += yyvsp[-1].tok.ivalue;
|
||
if (yyvsp[0].pname.array) {
|
||
yyvsp[-2].type->is_pointer++;
|
||
yyvsp[-2].type->arraystr = Swig_copy_string(Char(yyvsp[0].pname.array));
|
||
}
|
||
if (yyvsp[0].pname.value) {
|
||
Setattr(yyval.node,"value",yyvsp[0].pname.value);
|
||
}
|
||
Setattr(yyval.node,"type",yyvsp[-2].type);
|
||
;
|
||
break;}
|
||
case 223:
|
||
#line 1606 "parser.y"
|
||
{
|
||
yyval.node = NewHash();
|
||
yyvsp[-2].type->is_reference = 1;
|
||
yyvsp[-2].type->is_pointer++;
|
||
Setattr(yyval.node,"name",yyvsp[0].pname.name);
|
||
if (yyvsp[0].pname.array) {
|
||
yyvsp[-2].type->is_pointer++;
|
||
yyvsp[-2].type->arraystr = Swig_copy_string(Char(yyvsp[0].pname.array));
|
||
}
|
||
if (yyvsp[0].pname.value) {
|
||
Setattr(yyval.node,"value",yyvsp[0].pname.value);
|
||
}
|
||
Setattr(yyval.node,"type",yyvsp[-2].type);
|
||
;
|
||
break;}
|
||
case 224:
|
||
#line 1620 "parser.y"
|
||
{
|
||
yyval.node = NewHash();
|
||
yyvsp[-7].type->type = LPARSE_T_FUNCTION;
|
||
yyvsp[-7].type->is_pointer += yyvsp[-5].tok.ivalue;
|
||
strcpy(yyvsp[-7].type->name,"<function ptr>");
|
||
Setattr(yyval.node,"name",yyvsp[-4].pname.name);
|
||
if (yyvsp[-4].pname.value)
|
||
Setattr(yyval.node,"value",yyvsp[-4].pname.value);
|
||
Setattr(yyval.node,"type",yyvsp[-7].type);
|
||
;
|
||
break;}
|
||
case 225:
|
||
#line 1630 "parser.y"
|
||
{
|
||
LParseType *t;
|
||
yyval.node = NewHash();
|
||
Setattr(yyval.node,"name","...");
|
||
t = NewLParseType(LPARSE_T_VARARGS);
|
||
Setattr(yyval.node,"type",t);
|
||
;
|
||
break;}
|
||
case 226:
|
||
#line 1639 "parser.y"
|
||
{
|
||
yyval.pname.name = yyvsp[-1].tok.text;
|
||
yyval.pname.value = yyvsp[0].tok.text;
|
||
yyval.pname.array = 0;
|
||
;
|
||
break;}
|
||
case 227:
|
||
#line 1644 "parser.y"
|
||
{
|
||
yyval.pname.name = yyvsp[-1].tok.text;
|
||
yyval.pname.value = 0;
|
||
yyval.pname.array = yyvsp[0].tok.text;
|
||
;
|
||
break;}
|
||
case 228:
|
||
#line 1649 "parser.y"
|
||
{
|
||
yyval.pname.name = NewString("");
|
||
yyval.pname.value = 0;
|
||
yyval.pname.array = yyvsp[0].tok.text;
|
||
;
|
||
break;}
|
||
case 229:
|
||
#line 1654 "parser.y"
|
||
{
|
||
yyval.pname.name = NewString("");
|
||
yyval.pname.value = 0;
|
||
yyval.pname.array = 0;
|
||
;
|
||
break;}
|
||
case 230:
|
||
#line 1661 "parser.y"
|
||
{ yyval.tok = yyvsp[0].tok; ;
|
||
break;}
|
||
case 231:
|
||
#line 1662 "parser.y"
|
||
{
|
||
yyval.tok.text = NewString("");
|
||
Printf(yyval.tok.text,"&%s",yyvsp[0].tok.text);
|
||
yyval.tok.ivalue = LPARSE_T_USER;
|
||
;
|
||
break;}
|
||
case 232:
|
||
#line 1667 "parser.y"
|
||
{
|
||
LParse_skip_balanced('{','}');
|
||
yyval.tok.text = 0;
|
||
yyval.tok.ivalue = 0;
|
||
;
|
||
break;}
|
||
case 233:
|
||
#line 1672 "parser.y"
|
||
{
|
||
yyval.tok.text = 0;
|
||
yyval.tok.ivalue = 0;
|
||
;
|
||
break;}
|
||
case 234:
|
||
#line 1680 "parser.y"
|
||
{ yyval.decl.id = yyvsp[0].tok.text;
|
||
yyval.decl.is_pointer = 0;
|
||
yyval.decl.is_reference = 0;
|
||
;
|
||
break;}
|
||
case 235:
|
||
#line 1684 "parser.y"
|
||
{
|
||
yyval.decl.id = yyvsp[0].tok.text;
|
||
yyval.decl.is_pointer = yyvsp[-1].tok.ivalue;
|
||
yyval.decl.is_reference = 0;
|
||
;
|
||
break;}
|
||
case 236:
|
||
#line 1689 "parser.y"
|
||
{
|
||
yyval.decl.id = yyvsp[0].tok.text;
|
||
yyval.decl.is_pointer = 1;
|
||
yyval.decl.is_reference = 1;
|
||
;
|
||
break;}
|
||
case 237:
|
||
#line 1696 "parser.y"
|
||
{ yyval.tok.ivalue = 1; ;
|
||
break;}
|
||
case 238:
|
||
#line 1697 "parser.y"
|
||
{ yyval.tok.ivalue = yyvsp[0].tok.ivalue + 1;;
|
||
break;}
|
||
case 239:
|
||
#line 1700 "parser.y"
|
||
{
|
||
yyval.tok.ivalue = yyvsp[0].tok.ivalue + 1;
|
||
yyval.tok.text = NewString("[]");
|
||
Append(yyval.tok.text,yyvsp[0].tok.text);
|
||
;
|
||
break;}
|
||
case 240:
|
||
#line 1705 "parser.y"
|
||
{
|
||
yyval.tok.ivalue = yyvsp[0].tok.ivalue + 1;
|
||
yyval.tok.text = NewString("");
|
||
Printf(yyval.tok.text,"[%s]",yyvsp[-2].tok.text);
|
||
;
|
||
break;}
|
||
case 241:
|
||
#line 1711 "parser.y"
|
||
{
|
||
yyval.tok = yyvsp[0].tok;
|
||
;
|
||
break;}
|
||
case 242:
|
||
#line 1714 "parser.y"
|
||
{ yyval.tok.ivalue = 0;
|
||
yyval.tok.text = 0;
|
||
;
|
||
break;}
|
||
case 243:
|
||
#line 1720 "parser.y"
|
||
{ yyval.type = NewLParseType(LPARSE_T_INT); ;
|
||
break;}
|
||
case 244:
|
||
#line 1721 "parser.y"
|
||
{ yyval.type = NewLParseType(LPARSE_T_SHORT); ;
|
||
break;}
|
||
case 245:
|
||
#line 1722 "parser.y"
|
||
{ yyval.type = NewLParseType(LPARSE_T_LONG); ;
|
||
break;}
|
||
case 246:
|
||
#line 1723 "parser.y"
|
||
{ yyval.type = NewLParseType(LPARSE_T_CHAR); ;
|
||
break;}
|
||
case 247:
|
||
#line 1724 "parser.y"
|
||
{ yyval.type = NewLParseType(LPARSE_T_BOOL); ;
|
||
break;}
|
||
case 248:
|
||
#line 1725 "parser.y"
|
||
{ yyval.type = NewLParseType(LPARSE_T_FLOAT); ;
|
||
break;}
|
||
case 249:
|
||
#line 1726 "parser.y"
|
||
{ yyval.type = NewLParseType(LPARSE_T_DOUBLE); ;
|
||
break;}
|
||
case 250:
|
||
#line 1727 "parser.y"
|
||
{ yyval.type = NewLParseType(LPARSE_T_VOID); ;
|
||
break;}
|
||
case 251:
|
||
#line 1728 "parser.y"
|
||
{
|
||
if (yyvsp[0].type) yyval.type = yyvsp[0].type;
|
||
else {
|
||
yyval.type = NewLParseType(LPARSE_T_INT);
|
||
strcpy(yyval.type->name,"signed");
|
||
}
|
||
;
|
||
break;}
|
||
case 252:
|
||
#line 1735 "parser.y"
|
||
{
|
||
if (yyvsp[0].type) yyval.type = yyvsp[0].type;
|
||
else {
|
||
yyval.type = NewLParseType(LPARSE_T_UINT);
|
||
strcpy(yyval.type->name,"unsigned");
|
||
}
|
||
;
|
||
break;}
|
||
case 253:
|
||
#line 1742 "parser.y"
|
||
{
|
||
yyval.type = NewLParseType(LPARSE_T_USER);
|
||
if (yyvsp[0].tok.text) {
|
||
sprintf(yyval.type->name,"%s%s",Char(yyvsp[-1].tok.text),Char(yyvsp[0].tok.text));
|
||
} else {
|
||
sprintf(yyval.type->name,"%s",Char(yyvsp[-1].tok.text));
|
||
}
|
||
if (!LParse_typedef_check(yyvsp[-1].tok.text)) {
|
||
LParse_error(Getfile(yyvsp[-1].tok.text), Getline(yyvsp[-1].tok.text), "Warning: '%s' used as a typename, but not defined as a type.\n", yyvsp[-1].tok.text);
|
||
}
|
||
|
||
LParse_typedef_resolve(yyval.type,0);
|
||
;
|
||
break;}
|
||
case 254:
|
||
#line 1755 "parser.y"
|
||
{
|
||
yyval.type = yyvsp[0].type;
|
||
yyval.type->qualifier = Swig_copy_string("const");
|
||
;
|
||
break;}
|
||
case 255:
|
||
#line 1759 "parser.y"
|
||
{
|
||
yyval.type = NewLParseType(LPARSE_T_USER);
|
||
sprintf(yyval.type->name,"%s %s",Char(yyvsp[-1].tok.text), Char(yyvsp[0].tok.text));
|
||
;
|
||
break;}
|
||
case 256:
|
||
#line 1763 "parser.y"
|
||
{
|
||
yyval.type = NewLParseType(LPARSE_T_USER);
|
||
sprintf(yyval.type->name,"%s::%s",Char(yyvsp[-2].tok.text),Char(yyvsp[0].tok.text));
|
||
LParse_typedef_resolve(yyval.type,0);
|
||
;
|
||
break;}
|
||
case 257:
|
||
#line 1769 "parser.y"
|
||
{
|
||
yyval.type = NewLParseType(LPARSE_T_USER);
|
||
sprintf(yyval.type->name,"%s", Char(yyvsp[0].tok.text));
|
||
LParse_typedef_resolve(yyval.type,1);
|
||
;
|
||
break;}
|
||
case 258:
|
||
#line 1774 "parser.y"
|
||
{
|
||
yyval.type = NewLParseType(LPARSE_T_ENUM);
|
||
sprintf(yyval.type->name,"enum %s", Char(yyvsp[0].tok.text));
|
||
/* LParse_typedef_resolve($$,1);*/
|
||
/* $$->typedef_resolve(1); */
|
||
;
|
||
break;}
|
||
case 259:
|
||
#line 1783 "parser.y"
|
||
{ yyval.type = NewLParseType(LPARSE_T_INT); ;
|
||
break;}
|
||
case 260:
|
||
#line 1784 "parser.y"
|
||
{ yyval.type = NewLParseType(LPARSE_T_SHORT); ;
|
||
break;}
|
||
case 261:
|
||
#line 1785 "parser.y"
|
||
{ yyval.type = NewLParseType(LPARSE_T_LONG); ;
|
||
break;}
|
||
case 262:
|
||
#line 1786 "parser.y"
|
||
{ yyval.type = NewLParseType(LPARSE_T_CHAR); ;
|
||
break;}
|
||
case 263:
|
||
#line 1787 "parser.y"
|
||
{ yyval.type = NewLParseType(LPARSE_T_BOOL); ;
|
||
break;}
|
||
case 264:
|
||
#line 1788 "parser.y"
|
||
{ yyval.type = NewLParseType(LPARSE_T_FLOAT); ;
|
||
break;}
|
||
case 265:
|
||
#line 1789 "parser.y"
|
||
{ yyval.type = NewLParseType(LPARSE_T_DOUBLE); ;
|
||
break;}
|
||
case 266:
|
||
#line 1790 "parser.y"
|
||
{ yyval.type = NewLParseType(LPARSE_T_VOID); ;
|
||
break;}
|
||
case 267:
|
||
#line 1791 "parser.y"
|
||
{
|
||
if (yyvsp[0].type) yyval.type = yyvsp[0].type;
|
||
else {
|
||
yyval.type = NewLParseType(LPARSE_T_INT);
|
||
strcpy(yyval.type->name,"signed");
|
||
}
|
||
;
|
||
break;}
|
||
case 268:
|
||
#line 1798 "parser.y"
|
||
{
|
||
if (yyvsp[0].type) yyval.type = yyvsp[0].type;
|
||
else {
|
||
yyval.type = NewLParseType(LPARSE_T_UINT);
|
||
strcpy(yyval.type->name,"unsigned");
|
||
}
|
||
;
|
||
break;}
|
||
case 269:
|
||
#line 1805 "parser.y"
|
||
{
|
||
yyval.type = NewLParseType(LPARSE_T_USER);
|
||
if (yyvsp[0].tok.text) {
|
||
sprintf(yyval.type->name,"%s%s",Char(yyvsp[-1].tok.text),Char(yyvsp[0].tok.text));
|
||
} else {
|
||
sprintf(yyval.type->name,"%s",Char(yyvsp[-1].tok.text));
|
||
}
|
||
LParse_typedef_resolve(yyval.type,0);
|
||
;
|
||
break;}
|
||
case 270:
|
||
#line 1814 "parser.y"
|
||
{
|
||
yyval.type = yyvsp[0].type;
|
||
yyval.type->qualifier = Swig_copy_string("const");
|
||
;
|
||
break;}
|
||
case 271:
|
||
#line 1818 "parser.y"
|
||
{
|
||
yyval.type = NewLParseType(LPARSE_T_USER);
|
||
sprintf(yyval.type->name,"%s %s",Char(yyvsp[-1].tok.text), Char(yyvsp[0].tok.text));
|
||
;
|
||
break;}
|
||
case 272:
|
||
#line 1822 "parser.y"
|
||
{
|
||
yyval.type = NewLParseType(LPARSE_T_ENUM);
|
||
sprintf(yyval.type->name,"enum %s", Char(yyvsp[0].tok.text));
|
||
/* LParse_typedef_resolve($$,1);*/
|
||
/* $$->typedef_resolve(1); */
|
||
;
|
||
break;}
|
||
case 273:
|
||
#line 1830 "parser.y"
|
||
{
|
||
yyval.tok.text = LParse_skip_balanced('<','>');
|
||
;
|
||
break;}
|
||
case 274:
|
||
#line 1833 "parser.y"
|
||
{ yyval.tok.text = 0; ;
|
||
break;}
|
||
case 275:
|
||
#line 1837 "parser.y"
|
||
{ yyval.type = 0; ;
|
||
break;}
|
||
case 276:
|
||
#line 1838 "parser.y"
|
||
{
|
||
yyval.type = NewLParseType(LPARSE_T_INT);
|
||
strcpy(yyval.type->name,"signed int");
|
||
;
|
||
break;}
|
||
case 277:
|
||
#line 1842 "parser.y"
|
||
{
|
||
yyval.type = NewLParseType(LPARSE_T_SHORT);
|
||
strcpy(yyval.type->name,"signed short");
|
||
;
|
||
break;}
|
||
case 278:
|
||
#line 1846 "parser.y"
|
||
{
|
||
yyval.type = NewLParseType(LPARSE_T_LONG);
|
||
strcpy(yyval.type->name,"signed long");
|
||
;
|
||
break;}
|
||
case 279:
|
||
#line 1850 "parser.y"
|
||
{
|
||
yyval.type = NewLParseType(LPARSE_T_SCHAR);
|
||
;
|
||
break;}
|
||
case 280:
|
||
#line 1857 "parser.y"
|
||
{ yyval.type = 0;;
|
||
break;}
|
||
case 281:
|
||
#line 1858 "parser.y"
|
||
{
|
||
yyval.type = NewLParseType(LPARSE_T_UINT);
|
||
strcpy(yyval.type->name,"unsigned int");
|
||
;
|
||
break;}
|
||
case 282:
|
||
#line 1862 "parser.y"
|
||
{
|
||
yyval.type = NewLParseType(LPARSE_T_USHORT);
|
||
strcpy(yyval.type->name,"unsigned short");
|
||
;
|
||
break;}
|
||
case 283:
|
||
#line 1866 "parser.y"
|
||
{
|
||
yyval.type = NewLParseType(LPARSE_T_ULONG);
|
||
strcpy(yyval.type->name, "unsigned long");
|
||
;
|
||
break;}
|
||
case 284:
|
||
#line 1870 "parser.y"
|
||
{
|
||
yyval.type = NewLParseType(LPARSE_T_UCHAR);
|
||
;
|
||
break;}
|
||
case 285:
|
||
#line 1875 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 286:
|
||
#line 1876 "parser.y"
|
||
{ ;
|
||
break;}
|
||
case 287:
|
||
#line 1879 "parser.y"
|
||
{ yyval.tok = yyvsp[0].tok; ;
|
||
break;}
|
||
case 288:
|
||
#line 1880 "parser.y"
|
||
{ yyval.tok = yyvsp[0].tok; ;
|
||
break;}
|
||
case 289:
|
||
#line 1881 "parser.y"
|
||
{ yyval.tok = yyvsp[0].tok; ;
|
||
break;}
|
||
case 290:
|
||
#line 1888 "parser.y"
|
||
{
|
||
yyval.tok = yyvsp[0].tok;
|
||
;
|
||
break;}
|
||
case 291:
|
||
#line 1891 "parser.y"
|
||
{
|
||
yyval.tok.text = yyvsp[0].tok.text;
|
||
yyval.tok.ivalue = LPARSE_T_STRING;
|
||
;
|
||
break;}
|
||
case 292:
|
||
#line 1897 "parser.y"
|
||
{
|
||
yyval.tok.text = yyvsp[0].tok.text;
|
||
yyval.tok.ivalue = LPARSE_T_INT;
|
||
;
|
||
break;}
|
||
case 293:
|
||
#line 1901 "parser.y"
|
||
{
|
||
yyval.tok.text = yyvsp[0].tok.text;
|
||
yyval.tok.ivalue = LPARSE_T_DOUBLE;
|
||
;
|
||
break;}
|
||
case 294:
|
||
#line 1905 "parser.y"
|
||
{
|
||
yyval.tok.text = yyvsp[0].tok.text;
|
||
yyval.tok.ivalue = LPARSE_T_UINT;
|
||
;
|
||
break;}
|
||
case 295:
|
||
#line 1909 "parser.y"
|
||
{
|
||
yyval.tok.text = yyvsp[0].tok.text;
|
||
yyval.tok.ivalue = LPARSE_T_LONG;
|
||
;
|
||
break;}
|
||
case 296:
|
||
#line 1913 "parser.y"
|
||
{
|
||
yyval.tok.text = yyvsp[0].tok.text;
|
||
yyval.tok.ivalue = LPARSE_T_ULONG;
|
||
;
|
||
break;}
|
||
case 297:
|
||
#line 1917 "parser.y"
|
||
{
|
||
yyval.tok.text = NewString("");
|
||
Printf(yyval.tok.text,"\'%s\'", yyvsp[0].tok.text);
|
||
yyval.tok.ivalue = LPARSE_T_CHAR;
|
||
;
|
||
break;}
|
||
case 298:
|
||
#line 1922 "parser.y"
|
||
{
|
||
yyval.tok.text = NewString("sizeof(");
|
||
Append(yyval.tok.text,LParse_skip_balanced('(',')'));
|
||
yyval.tok.ivalue = LPARSE_T_INT;
|
||
;
|
||
break;}
|
||
case 299:
|
||
#line 1952 "parser.y"
|
||
{
|
||
yyval.tok.text = NewString("");
|
||
Printf(yyval.tok.text,"%s+%s", yyvsp[-2].tok.text,yyvsp[0].tok.text);
|
||
yyval.tok.ivalue = promote(yyvsp[-2].tok.ivalue,yyvsp[0].tok.ivalue);
|
||
;
|
||
break;}
|
||
case 300:
|
||
#line 1957 "parser.y"
|
||
{
|
||
yyval.tok.text = NewString("");
|
||
Printf(yyval.tok.text,"%s-%s", yyvsp[-2].tok.text,yyvsp[0].tok.text);
|
||
yyval.tok.ivalue = promote(yyvsp[-2].tok.ivalue,yyvsp[0].tok.ivalue);
|
||
;
|
||
break;}
|
||
case 301:
|
||
#line 1962 "parser.y"
|
||
{
|
||
yyval.tok.text = NewString("");
|
||
Printf(yyval.tok.text,"%s*%s", yyvsp[-2].tok.text,yyvsp[0].tok.text);
|
||
yyval.tok.ivalue = promote(yyvsp[-2].tok.ivalue,yyvsp[0].tok.ivalue);
|
||
;
|
||
break;}
|
||
case 302:
|
||
#line 1967 "parser.y"
|
||
{
|
||
yyval.tok.text = NewString("");
|
||
Printf(yyval.tok.text,"%s/%s", yyvsp[-2].tok.text,yyvsp[0].tok.text);
|
||
yyval.tok.ivalue = promote(yyvsp[-2].tok.ivalue,yyvsp[0].tok.ivalue);
|
||
;
|
||
break;}
|
||
case 303:
|
||
#line 1972 "parser.y"
|
||
{
|
||
yyval.tok.text = NewString("");
|
||
Printf(yyval.tok.text,"%s&%s", yyvsp[-2].tok.text,yyvsp[0].tok.text);
|
||
yyval.tok.ivalue = promote(yyvsp[-2].tok.ivalue,yyvsp[0].tok.ivalue);
|
||
if ((yyvsp[-2].tok.ivalue == LPARSE_T_DOUBLE) || (yyvsp[0].tok.ivalue == LPARSE_T_DOUBLE)) {
|
||
LParse_error(yyvsp[-1].tok.filename,yyvsp[-1].tok.line,"Type error in constant expression (expecting integers).\n");
|
||
}
|
||
;
|
||
break;}
|
||
case 304:
|
||
#line 1980 "parser.y"
|
||
{
|
||
yyval.tok.text = NewString("");
|
||
Printf(yyval.tok.text,"%s|%s", yyvsp[-2].tok.text,yyvsp[0].tok.text);
|
||
yyval.tok.ivalue = promote(yyvsp[-2].tok.ivalue,yyvsp[0].tok.ivalue);
|
||
if ((yyvsp[-2].tok.ivalue == LPARSE_T_DOUBLE) || (yyvsp[0].tok.ivalue == LPARSE_T_DOUBLE)) {
|
||
LParse_error(yyvsp[-1].tok.filename,yyvsp[-1].tok.line,"Type error in constant expression (expecting integers).\n");
|
||
}
|
||
yyval.tok.ivalue = LPARSE_T_INT;
|
||
;
|
||
break;}
|
||
case 305:
|
||
#line 1989 "parser.y"
|
||
{
|
||
yyval.tok.text = NewString("");
|
||
Printf(yyval.tok.text,"%s^%s", yyvsp[-2].tok.text,yyvsp[0].tok.text);
|
||
yyval.tok.ivalue = promote(yyvsp[-2].tok.ivalue,yyvsp[0].tok.ivalue);
|
||
if ((yyvsp[-2].tok.ivalue == LPARSE_T_DOUBLE) || (yyvsp[0].tok.ivalue == LPARSE_T_DOUBLE)) {
|
||
LParse_error(yyvsp[-1].tok.filename,yyvsp[-1].tok.line,"Type error in constant expression (expecting integers).\n");
|
||
}
|
||
yyval.tok.ivalue = LPARSE_T_INT;
|
||
;
|
||
break;}
|
||
case 306:
|
||
#line 1998 "parser.y"
|
||
{
|
||
yyval.tok.text = NewString("");
|
||
Printf(yyval.tok.text,"%s<<%s", yyvsp[-2].tok.text,yyvsp[0].tok.text);
|
||
yyval.tok.ivalue = promote(yyvsp[-2].tok.ivalue,yyvsp[0].tok.ivalue);
|
||
if ((yyvsp[-2].tok.ivalue == LPARSE_T_DOUBLE) || (yyvsp[0].tok.ivalue == LPARSE_T_DOUBLE)) {
|
||
LParse_error(yyvsp[-1].tok.filename,yyvsp[-1].tok.line,"Type error in constant expression (expecting integers).\n");
|
||
}
|
||
yyval.tok.ivalue = LPARSE_T_INT;
|
||
;
|
||
break;}
|
||
case 307:
|
||
#line 2007 "parser.y"
|
||
{
|
||
yyval.tok.text = NewString("");
|
||
Printf(yyval.tok.text,"%s>>%s", yyvsp[-2].tok.text,yyvsp[0].tok.text);
|
||
yyval.tok.ivalue = promote(yyvsp[-2].tok.ivalue,yyvsp[0].tok.ivalue);
|
||
if ((yyvsp[-2].tok.ivalue == LPARSE_T_DOUBLE) || (yyvsp[0].tok.ivalue == LPARSE_T_DOUBLE)) {
|
||
LParse_error(yyvsp[-1].tok.filename,yyvsp[-1].tok.line,"Type error in constant expression (expecting integers).\n");
|
||
}
|
||
yyval.tok.ivalue = LPARSE_T_INT;
|
||
;
|
||
break;}
|
||
case 308:
|
||
#line 2016 "parser.y"
|
||
{
|
||
yyval.tok.text = NewString("");
|
||
Printf(yyval.tok.text,"-%s", yyvsp[0].tok.text);
|
||
yyval.tok.ivalue = yyvsp[0].tok.ivalue;
|
||
;
|
||
break;}
|
||
case 309:
|
||
#line 2021 "parser.y"
|
||
{
|
||
yyval.tok.text = NewString("");
|
||
Printf(yyval.tok.text,"~%s", yyvsp[0].tok.text);
|
||
if (yyvsp[0].tok.ivalue == LPARSE_T_DOUBLE) {
|
||
LParse_error(yyvsp[0].tok.filename,yyvsp[0].tok.line,"Type error in constant expression (expecting integers).\n");
|
||
}
|
||
yyval.tok.ivalue = yyvsp[0].tok.ivalue;
|
||
;
|
||
break;}
|
||
case 310:
|
||
#line 2029 "parser.y"
|
||
{
|
||
yyval.tok.text = NewString("");
|
||
Printf(yyval.tok.text,"(%s)", yyvsp[-1].tok.text);
|
||
yyval.tok.ivalue = yyvsp[-1].tok.ivalue;
|
||
;
|
||
break;}
|
||
case 311:
|
||
#line 2036 "parser.y"
|
||
{
|
||
Append(yyval.node,yyvsp[0].tok.text);
|
||
;
|
||
break;}
|
||
case 312:
|
||
#line 2039 "parser.y"
|
||
{
|
||
yyval.node = NewList();
|
||
;
|
||
break;}
|
||
}
|
||
/* the action file gets copied in in place of this dollarsign */
|
||
#line 542 "/usr/lib/bison.simple"
|
||
|
||
yyvsp -= yylen;
|
||
yyssp -= yylen;
|
||
#ifdef YYLSP_NEEDED
|
||
yylsp -= yylen;
|
||
#endif
|
||
|
||
#if YYDEBUG != 0
|
||
if (yydebug)
|
||
{
|
||
short *ssp1 = yyss - 1;
|
||
fprintf (stderr, "state stack now");
|
||
while (ssp1 != yyssp)
|
||
fprintf (stderr, " %d", *++ssp1);
|
||
fprintf (stderr, "\n");
|
||
}
|
||
#endif
|
||
|
||
*++yyvsp = yyval;
|
||
|
||
#ifdef YYLSP_NEEDED
|
||
yylsp++;
|
||
if (yylen == 0)
|
||
{
|
||
yylsp->first_line = yylloc.first_line;
|
||
yylsp->first_column = yylloc.first_column;
|
||
yylsp->last_line = (yylsp-1)->last_line;
|
||
yylsp->last_column = (yylsp-1)->last_column;
|
||
yylsp->text = 0;
|
||
}
|
||
else
|
||
{
|
||
yylsp->last_line = (yylsp+yylen-1)->last_line;
|
||
yylsp->last_column = (yylsp+yylen-1)->last_column;
|
||
}
|
||
#endif
|
||
|
||
/* Now "shift" the result of the reduction.
|
||
Determine what state that goes to,
|
||
based on the state we popped back to
|
||
and the rule number reduced by. */
|
||
|
||
yyn = yyr1[yyn];
|
||
|
||
yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
|
||
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
|
||
yystate = yytable[yystate];
|
||
else
|
||
yystate = yydefgoto[yyn - YYNTBASE];
|
||
|
||
goto yynewstate;
|
||
|
||
yyerrlab: /* here on detecting error */
|
||
|
||
if (! yyerrstatus)
|
||
/* If not already recovering from an error, report this error. */
|
||
{
|
||
++yynerrs;
|
||
|
||
#ifdef YYERROR_VERBOSE
|
||
yyn = yypact[yystate];
|
||
|
||
if (yyn > YYFLAG && yyn < YYLAST)
|
||
{
|
||
int size = 0;
|
||
char *msg;
|
||
int x, count;
|
||
|
||
count = 0;
|
||
/* Start X at -yyn if nec to avoid negative indexes in yycheck. */
|
||
for (x = (yyn < 0 ? -yyn : 0);
|
||
x < (sizeof(yytname) / sizeof(char *)); x++)
|
||
if (yycheck[x + yyn] == x)
|
||
size += strlen(yytname[x]) + 15, count++;
|
||
msg = (char *) malloc(size + 15);
|
||
if (msg != 0)
|
||
{
|
||
strcpy(msg, "parse error");
|
||
|
||
if (count < 5)
|
||
{
|
||
count = 0;
|
||
for (x = (yyn < 0 ? -yyn : 0);
|
||
x < (sizeof(yytname) / sizeof(char *)); x++)
|
||
if (yycheck[x + yyn] == x)
|
||
{
|
||
strcat(msg, count == 0 ? ", expecting `" : " or `");
|
||
strcat(msg, yytname[x]);
|
||
strcat(msg, "'");
|
||
count++;
|
||
}
|
||
}
|
||
yyerror(msg);
|
||
free(msg);
|
||
}
|
||
else
|
||
yyerror ("parse error; also virtual memory exceeded");
|
||
}
|
||
else
|
||
#endif /* YYERROR_VERBOSE */
|
||
yyerror("parse error");
|
||
}
|
||
|
||
goto yyerrlab1;
|
||
yyerrlab1: /* here on error raised explicitly by an action */
|
||
|
||
if (yyerrstatus == 3)
|
||
{
|
||
/* if just tried and failed to reuse lookahead token after an error, discard it. */
|
||
|
||
/* return failure if at end of input */
|
||
if (yychar == YYEOF)
|
||
YYABORT;
|
||
|
||
#if YYDEBUG != 0
|
||
if (yydebug)
|
||
fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
|
||
#endif
|
||
|
||
yychar = YYEMPTY;
|
||
}
|
||
|
||
/* Else will try to reuse lookahead token
|
||
after shifting the error token. */
|
||
|
||
yyerrstatus = 3; /* Each real token shifted decrements this */
|
||
|
||
goto yyerrhandle;
|
||
|
||
yyerrdefault: /* current state does not do anything special for the error token. */
|
||
|
||
#if 0
|
||
/* This is wrong; only states that explicitly want error tokens
|
||
should shift them. */
|
||
yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
|
||
if (yyn) goto yydefault;
|
||
#endif
|
||
|
||
yyerrpop: /* pop the current state because it cannot handle the error token */
|
||
|
||
if (yyssp == yyss) YYABORT;
|
||
yyvsp--;
|
||
yystate = *--yyssp;
|
||
#ifdef YYLSP_NEEDED
|
||
yylsp--;
|
||
#endif
|
||
|
||
#if YYDEBUG != 0
|
||
if (yydebug)
|
||
{
|
||
short *ssp1 = yyss - 1;
|
||
fprintf (stderr, "Error: state stack now");
|
||
while (ssp1 != yyssp)
|
||
fprintf (stderr, " %d", *++ssp1);
|
||
fprintf (stderr, "\n");
|
||
}
|
||
#endif
|
||
|
||
yyerrhandle:
|
||
|
||
yyn = yypact[yystate];
|
||
if (yyn == YYFLAG)
|
||
goto yyerrdefault;
|
||
|
||
yyn += YYTERROR;
|
||
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
|
||
goto yyerrdefault;
|
||
|
||
yyn = yytable[yyn];
|
||
if (yyn < 0)
|
||
{
|
||
if (yyn == YYFLAG)
|
||
goto yyerrpop;
|
||
yyn = -yyn;
|
||
goto yyreduce;
|
||
}
|
||
else if (yyn == 0)
|
||
goto yyerrpop;
|
||
|
||
if (yyn == YYFINAL)
|
||
YYACCEPT;
|
||
|
||
#if YYDEBUG != 0
|
||
if (yydebug)
|
||
fprintf(stderr, "Shifting error token, ");
|
||
#endif
|
||
|
||
*++yyvsp = yylval;
|
||
#ifdef YYLSP_NEEDED
|
||
*++yylsp = yylloc;
|
||
#endif
|
||
|
||
yystate = yyn;
|
||
goto yynewstate;
|
||
|
||
yyacceptlab:
|
||
/* YYACCEPT comes here. */
|
||
if (yyfree_stacks)
|
||
{
|
||
free (yyss);
|
||
free (yyvs);
|
||
#ifdef YYLSP_NEEDED
|
||
free (yyls);
|
||
#endif
|
||
}
|
||
return 0;
|
||
|
||
yyabortlab:
|
||
/* YYABORT comes here. */
|
||
if (yyfree_stacks)
|
||
{
|
||
free (yyss);
|
||
free (yyvs);
|
||
#ifdef YYLSP_NEEDED
|
||
free (yyls);
|
||
#endif
|
||
}
|
||
return 1;
|
||
}
|
||
#line 2046 "parser.y"
|
||
|
||
void lparse_error_recover() {
|
||
int c;
|
||
c = yylex();
|
||
while ((c > 0) && (c != SEMI))
|
||
c = yylex();
|
||
}
|
||
|
||
/* Called by the parser (yyparse) when an error is found.*/
|
||
void yyerror (char *e) {
|
||
if (Intype == 0) {
|
||
LParse_error(0,0,"Syntax error. Perhaps you need to specify a typename.\n");
|
||
} else {
|
||
LParse_error(0,0,"Syntax error.\n", e);
|
||
}
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|