3190 lines
113 KiB
C
3190 lines
113 KiB
C
|
||
/* A Bison parser, made from SDCC.y
|
||
by GNU Bison version 1.28 */
|
||
|
||
#define YYBISON 1 /* Identify Bison output. */
|
||
|
||
#define IDENTIFIER 257
|
||
#define TYPE_NAME 258
|
||
#define CONSTANT 259
|
||
#define STRING_LITERAL 260
|
||
#define SIZEOF 261
|
||
#define PTR_OP 262
|
||
#define INC_OP 263
|
||
#define DEC_OP 264
|
||
#define LEFT_OP 265
|
||
#define RIGHT_OP 266
|
||
#define LE_OP 267
|
||
#define GE_OP 268
|
||
#define EQ_OP 269
|
||
#define NE_OP 270
|
||
#define AND_OP 271
|
||
#define OR_OP 272
|
||
#define MUL_ASSIGN 273
|
||
#define DIV_ASSIGN 274
|
||
#define MOD_ASSIGN 275
|
||
#define ADD_ASSIGN 276
|
||
#define SUB_ASSIGN 277
|
||
#define LEFT_ASSIGN 278
|
||
#define RIGHT_ASSIGN 279
|
||
#define AND_ASSIGN 280
|
||
#define XOR_ASSIGN 281
|
||
#define OR_ASSIGN 282
|
||
#define TYPEDEF 283
|
||
#define EXTERN 284
|
||
#define STATIC 285
|
||
#define AUTO 286
|
||
#define REGISTER 287
|
||
#define CODE 288
|
||
#define EEPROM 289
|
||
#define INTERRUPT 290
|
||
#define SFR 291
|
||
#define AT 292
|
||
#define SBIT 293
|
||
#define REENTRANT 294
|
||
#define USING 295
|
||
#define XDATA 296
|
||
#define DATA 297
|
||
#define IDATA 298
|
||
#define PDATA 299
|
||
#define VAR_ARGS 300
|
||
#define CRITICAL 301
|
||
#define NONBANKED 302
|
||
#define BANKED 303
|
||
#define CHAR 304
|
||
#define SHORT 305
|
||
#define INT 306
|
||
#define LONG 307
|
||
#define SIGNED 308
|
||
#define UNSIGNED 309
|
||
#define FLOAT 310
|
||
#define DOUBLE 311
|
||
#define CONST 312
|
||
#define VOLATILE 313
|
||
#define VOID 314
|
||
#define BIT 315
|
||
#define STRUCT 316
|
||
#define UNION 317
|
||
#define ENUM 318
|
||
#define ELIPSIS 319
|
||
#define RANGE 320
|
||
#define FAR 321
|
||
#define CASE 322
|
||
#define DEFAULT 323
|
||
#define IF 324
|
||
#define ELSE 325
|
||
#define SWITCH 326
|
||
#define WHILE 327
|
||
#define DO 328
|
||
#define FOR 329
|
||
#define GOTO 330
|
||
#define CONTINUE 331
|
||
#define BREAK 332
|
||
#define RETURN 333
|
||
#define NAKED 334
|
||
#define INLINEASM 335
|
||
#define IFX 336
|
||
#define ADDRESS_OF 337
|
||
#define GET_VALUE_AT_ADDRESS 338
|
||
#define SPIL 339
|
||
#define UNSPIL 340
|
||
#define GETHBIT 341
|
||
#define BITWISEAND 342
|
||
#define UNARYMINUS 343
|
||
#define IPUSH 344
|
||
#define IPOP 345
|
||
#define PCALL 346
|
||
#define ENDFUNCTION 347
|
||
#define JUMPTABLE 348
|
||
#define RRC 349
|
||
#define RLC 350
|
||
#define CAST 351
|
||
#define CALL 352
|
||
#define PARAM 353
|
||
#define NULLOP 354
|
||
#define BLOCK 355
|
||
#define LABEL 356
|
||
#define RECEIVE 357
|
||
#define SEND 358
|
||
#define ARRAYINIT 359
|
||
|
||
#line 24 "SDCC.y"
|
||
|
||
#include <stdio.h>
|
||
#include <stdarg.h>
|
||
#include <string.h>
|
||
#include "SDCCglobl.h"
|
||
#include "SDCCsymt.h"
|
||
#include "SDCChasht.h"
|
||
#include "SDCCval.h"
|
||
#include "SDCCmem.h"
|
||
#include "SDCCast.h"
|
||
#include "port.h"
|
||
#include "newalloc.h"
|
||
#include "SDCCerr.h"
|
||
|
||
extern int yyerror (char *);
|
||
extern FILE *yyin;
|
||
int NestLevel = 0 ; /* current NestLevel */
|
||
int stackPtr = 1 ; /* stack pointer */
|
||
int xstackPtr = 0 ; /* xstack pointer */
|
||
int reentrant = 0 ;
|
||
int blockNo = 0 ; /* sequential block number */
|
||
int currBlockno=0 ;
|
||
extern int yylex();
|
||
int yyparse(void);
|
||
extern int noLineno ;
|
||
char lbuff[1024]; /* local buffer */
|
||
|
||
/* break & continue stacks */
|
||
STACK_DCL(continueStack ,symbol *,MAX_NEST_LEVEL)
|
||
STACK_DCL(breakStack ,symbol *,MAX_NEST_LEVEL)
|
||
STACK_DCL(forStack ,symbol *,MAX_NEST_LEVEL)
|
||
STACK_DCL(swStk ,ast *,MAX_NEST_LEVEL)
|
||
STACK_DCL(blockNum,int,MAX_NEST_LEVEL*3)
|
||
|
||
value *cenum = NULL ; /* current enumeration type chain*/
|
||
|
||
|
||
#line 63 "SDCC.y"
|
||
typedef union {
|
||
symbol *sym ; /* symbol table pointer */
|
||
structdef *sdef; /* structure definition */
|
||
char yychar[SDCC_NAME_MAX+1];
|
||
sym_link *lnk ; /* declarator or specifier */
|
||
int yyint; /* integer value returned */
|
||
value *val ; /* for integer constant */
|
||
initList *ilist; /* initial list */
|
||
char *yyinline; /* inlined assembler code */
|
||
ast *asts; /* expression tree */
|
||
} YYSTYPE;
|
||
#include <stdio.h>
|
||
|
||
#ifndef __cplusplus
|
||
#ifndef __STDC__
|
||
#define const
|
||
#endif
|
||
#endif
|
||
|
||
|
||
|
||
#define YYFINAL 388
|
||
#define YYFLAG -32768
|
||
#define YYNTBASE 130
|
||
|
||
#define YYTRANSLATE(x) ((unsigned)(x) <= 359 ? yytranslate[x] : 216)
|
||
|
||
static const short 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, 117, 2, 2, 2, 119, 112, 2, 106,
|
||
107, 113, 114, 111, 115, 110, 118, 2, 2, 2,
|
||
2, 2, 2, 2, 2, 2, 2, 125, 127, 120,
|
||
126, 121, 124, 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,
|
||
108, 2, 109, 122, 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, 128, 123, 129, 116, 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
|
||
};
|
||
|
||
#if YYDEBUG != 0
|
||
static const short yyprhs[] = { 0,
|
||
0, 2, 5, 7, 9, 12, 16, 18, 21, 24,
|
||
26, 28, 30, 32, 34, 36, 38, 41, 43, 45,
|
||
47, 51, 53, 55, 60, 64, 69, 73, 77, 80,
|
||
83, 85, 89, 91, 94, 97, 100, 103, 108, 110,
|
||
112, 114, 116, 118, 120, 122, 127, 129, 133, 137,
|
||
141, 143, 147, 151, 153, 157, 161, 163, 167, 171,
|
||
175, 179, 181, 185, 189, 191, 195, 197, 201, 203,
|
||
207, 209, 213, 215, 219, 221, 227, 229, 233, 235,
|
||
237, 239, 241, 243, 245, 247, 249, 251, 253, 255,
|
||
257, 261, 263, 266, 270, 272, 275, 277, 280, 282,
|
||
286, 288, 292, 294, 296, 298, 300, 302, 305, 307,
|
||
311, 313, 315, 317, 319, 321, 323, 325, 327, 329,
|
||
331, 333, 335, 337, 339, 341, 343, 345, 347, 349,
|
||
351, 353, 355, 357, 363, 366, 368, 370, 372, 373,
|
||
375, 377, 380, 384, 386, 390, 392, 395, 399, 404,
|
||
410, 413, 415, 418, 422, 425, 428, 429, 431, 434,
|
||
436, 439, 441, 445, 449, 454, 458, 459, 465, 470,
|
||
472, 475, 478, 482, 484, 486, 489, 491, 495, 497,
|
||
501, 503, 507, 509, 513, 516, 518, 520, 523, 525,
|
||
527, 530, 534, 537, 541, 545, 550, 553, 557, 561,
|
||
566, 568, 572, 577, 579, 583, 585, 587, 589, 591,
|
||
593, 595, 598, 601, 606, 610, 612, 614, 617, 621,
|
||
622, 627, 628, 634, 637, 639, 642, 644, 647, 649,
|
||
652, 655, 656, 663, 664, 671, 673, 675, 677, 683,
|
||
691, 701, 702, 704, 708, 711, 714, 717, 721
|
||
};
|
||
|
||
static const short yyrhs[] = { 131,
|
||
0, 130, 131, 0, 132, 0, 158, 0, 179, 135,
|
||
0, 159, 179, 135, 0, 134, 0, 134, 133, 0,
|
||
41, 5, 0, 40, 0, 47, 0, 80, 0, 48,
|
||
0, 49, 0, 163, 0, 200, 0, 203, 200, 0,
|
||
215, 0, 5, 0, 137, 0, 106, 156, 107, 0,
|
||
6, 0, 136, 0, 138, 108, 156, 109, 0, 138,
|
||
106, 107, 0, 138, 106, 139, 107, 0, 138, 110,
|
||
215, 0, 138, 8, 215, 0, 138, 9, 0, 138,
|
||
10, 0, 154, 0, 154, 111, 139, 0, 138, 0,
|
||
9, 140, 0, 10, 140, 0, 141, 142, 0, 7,
|
||
140, 0, 7, 106, 191, 107, 0, 112, 0, 113,
|
||
0, 114, 0, 115, 0, 116, 0, 117, 0, 140,
|
||
0, 106, 191, 107, 142, 0, 142, 0, 143, 113,
|
||
142, 0, 143, 118, 142, 0, 143, 119, 142, 0,
|
||
143, 0, 144, 114, 143, 0, 144, 115, 143, 0,
|
||
144, 0, 145, 11, 144, 0, 145, 12, 144, 0,
|
||
145, 0, 146, 120, 145, 0, 146, 121, 145, 0,
|
||
146, 13, 145, 0, 146, 14, 145, 0, 146, 0,
|
||
147, 15, 146, 0, 147, 16, 146, 0, 147, 0,
|
||
148, 112, 147, 0, 148, 0, 149, 122, 148, 0,
|
||
149, 0, 150, 123, 149, 0, 150, 0, 151, 17,
|
||
150, 0, 151, 0, 152, 18, 151, 0, 152, 0,
|
||
152, 124, 152, 125, 153, 0, 153, 0, 140, 155,
|
||
154, 0, 126, 0, 19, 0, 20, 0, 21, 0,
|
||
22, 0, 23, 0, 24, 0, 25, 0, 26, 0,
|
||
27, 0, 28, 0, 154, 0, 156, 111, 154, 0,
|
||
153, 0, 159, 127, 0, 159, 160, 127, 0, 162,
|
||
0, 162, 159, 0, 164, 0, 164, 159, 0, 161,
|
||
0, 160, 111, 161, 0, 179, 0, 179, 126, 194,
|
||
0, 29, 0, 30, 0, 31, 0, 32, 0, 33,
|
||
0, 36, 5, 0, 165, 0, 165, 38, 157, 0,
|
||
50, 0, 51, 0, 52, 0, 53, 0, 54, 0,
|
||
55, 0, 60, 0, 58, 0, 59, 0, 56, 0,
|
||
42, 0, 34, 0, 35, 0, 43, 0, 44, 0,
|
||
45, 0, 61, 0, 167, 0, 175, 0, 4, 0,
|
||
166, 0, 39, 0, 37, 0, 168, 169, 128, 171,
|
||
129, 0, 168, 170, 0, 62, 0, 63, 0, 170,
|
||
0, 0, 215, 0, 172, 0, 171, 172, 0, 185,
|
||
173, 127, 0, 174, 0, 173, 111, 174, 0, 179,
|
||
0, 125, 157, 0, 179, 125, 157, 0, 64, 128,
|
||
176, 129, 0, 64, 215, 128, 176, 129, 0, 64,
|
||
215, 0, 177, 0, 176, 111, 0, 176, 111, 177,
|
||
0, 215, 178, 0, 126, 157, 0, 0, 180, 0,
|
||
183, 180, 0, 181, 0, 181, 133, 0, 215, 0,
|
||
106, 179, 107, 0, 181, 108, 109, 0, 181, 108,
|
||
157, 109, 0, 181, 106, 107, 0, 0, 181, 106,
|
||
182, 188, 107, 0, 181, 106, 186, 107, 0, 184,
|
||
0, 184, 185, 0, 184, 183, 0, 184, 185, 183,
|
||
0, 113, 0, 164, 0, 185, 164, 0, 187, 0,
|
||
187, 111, 65, 0, 215, 0, 187, 111, 215, 0,
|
||
189, 0, 189, 111, 46, 0, 190, 0, 189, 111,
|
||
190, 0, 185, 179, 0, 191, 0, 185, 0, 185,
|
||
192, 0, 183, 0, 193, 0, 183, 193, 0, 106,
|
||
192, 107, 0, 108, 109, 0, 108, 157, 109, 0,
|
||
193, 108, 109, 0, 193, 108, 157, 109, 0, 106,
|
||
107, 0, 106, 188, 107, 0, 193, 106, 107, 0,
|
||
193, 106, 188, 107, 0, 154, 0, 128, 195, 129,
|
||
0, 128, 195, 111, 129, 0, 194, 0, 195, 111,
|
||
194, 0, 197, 0, 200, 0, 205, 0, 207, 0,
|
||
212, 0, 214, 0, 81, 127, 0, 215, 125, 0,
|
||
68, 157, 125, 196, 0, 69, 125, 196, 0, 128,
|
||
0, 129, 0, 198, 199, 0, 198, 204, 199, 0,
|
||
0, 198, 203, 201, 199, 0, 0, 198, 203, 202,
|
||
204, 199, 0, 1, 127, 0, 158, 0, 203, 158,
|
||
0, 196, 0, 204, 196, 0, 127, 0, 156, 127,
|
||
0, 71, 196, 0, 0, 70, 106, 156, 107, 196,
|
||
206, 0, 0, 72, 106, 156, 107, 208, 196, 0,
|
||
73, 0, 74, 0, 75, 0, 209, 106, 156, 107,
|
||
196, 0, 210, 196, 73, 106, 156, 107, 127, 0,
|
||
211, 106, 213, 127, 213, 127, 213, 107, 196, 0,
|
||
0, 156, 0, 76, 215, 127, 0, 77, 127, 0,
|
||
78, 127, 0, 79, 127, 0, 79, 156, 127, 0,
|
||
3, 0
|
||
};
|
||
|
||
#endif
|
||
|
||
#if YYDEBUG != 0
|
||
static const short yyrline[] = { 0,
|
||
126, 127, 131, 134, 159, 164, 173, 174, 178, 183,
|
||
187, 191, 195, 202, 212, 222, 223, 231, 232, 233,
|
||
234, 238, 242, 243, 244, 246, 250, 257, 263, 265,
|
||
270, 271, 275, 276, 277, 278, 279, 280, 284, 285,
|
||
286, 287, 288, 289, 293, 294, 298, 299, 300, 301,
|
||
305, 306, 307, 311, 312, 313, 317, 318, 323, 328,
|
||
333, 341, 342, 347, 355, 356, 360, 361, 365, 366,
|
||
370, 371, 376, 377, 382, 383, 391, 392, 437, 438,
|
||
439, 440, 441, 442, 443, 444, 445, 446, 447, 451,
|
||
452, 456, 460, 461, 478, 479, 492, 493, 509, 510,
|
||
514, 515, 520, 525, 530, 535, 540, 548, 552, 553,
|
||
563, 568, 573, 578, 583, 588, 593, 598, 603, 608,
|
||
613, 618, 623, 628, 633, 638, 643, 652, 653, 657,
|
||
665, 669, 675, 685, 700, 710, 711, 715, 716, 723,
|
||
734, 735, 747, 771, 772, 780, 781, 785, 792, 797,
|
||
813, 830, 831, 833, 840, 852, 858, 871, 872, 880,
|
||
881, 902, 903, 904, 913, 929, 930, 930, 955, 966,
|
||
967, 972, 978, 1016, 1024, 1026, 1042, 1043, 1047, 1048,
|
||
1056, 1057, 1061, 1062, 1070, 1079, 1087, 1088, 1100, 1101,
|
||
1102, 1106, 1107, 1112, 1118, 1124, 1132, 1133, 1134, 1140,
|
||
1153, 1154, 1155, 1159, 1160, 1164, 1165, 1166, 1167, 1168,
|
||
1169, 1170, 1180, 1181, 1182, 1185, 1188, 1192, 1193, 1194,
|
||
1196, 1197, 1200, 1201, 1205, 1216, 1240, 1241, 1245, 1246,
|
||
1250, 1251, 1256, 1257, 1272, 1280, 1293, 1306, 1324, 1332,
|
||
1340, 1368, 1369, 1373, 1378, 1391, 1401, 1402, 1406
|
||
};
|
||
#endif
|
||
|
||
|
||
#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
|
||
|
||
static const char * const yytname[] = { "$","error","$undefined.","IDENTIFIER",
|
||
"TYPE_NAME","CONSTANT","STRING_LITERAL","SIZEOF","PTR_OP","INC_OP","DEC_OP",
|
||
"LEFT_OP","RIGHT_OP","LE_OP","GE_OP","EQ_OP","NE_OP","AND_OP","OR_OP","MUL_ASSIGN",
|
||
"DIV_ASSIGN","MOD_ASSIGN","ADD_ASSIGN","SUB_ASSIGN","LEFT_ASSIGN","RIGHT_ASSIGN",
|
||
"AND_ASSIGN","XOR_ASSIGN","OR_ASSIGN","TYPEDEF","EXTERN","STATIC","AUTO","REGISTER",
|
||
"CODE","EEPROM","INTERRUPT","SFR","AT","SBIT","REENTRANT","USING","XDATA","DATA",
|
||
"IDATA","PDATA","VAR_ARGS","CRITICAL","NONBANKED","BANKED","CHAR","SHORT","INT",
|
||
"LONG","SIGNED","UNSIGNED","FLOAT","DOUBLE","CONST","VOLATILE","VOID","BIT",
|
||
"STRUCT","UNION","ENUM","ELIPSIS","RANGE","FAR","CASE","DEFAULT","IF","ELSE",
|
||
"SWITCH","WHILE","DO","FOR","GOTO","CONTINUE","BREAK","RETURN","NAKED","INLINEASM",
|
||
"IFX","ADDRESS_OF","GET_VALUE_AT_ADDRESS","SPIL","UNSPIL","GETHBIT","BITWISEAND",
|
||
"UNARYMINUS","IPUSH","IPOP","PCALL","ENDFUNCTION","JUMPTABLE","RRC","RLC","CAST",
|
||
"CALL","PARAM","NULLOP","BLOCK","LABEL","RECEIVE","SEND","ARRAYINIT","'('","')'",
|
||
"'['","']'","'.'","','","'&'","'*'","'+'","'-'","'~'","'!'","'/'","'%'","'<'",
|
||
"'>'","'^'","'|'","'?'","':'","'='","';'","'{'","'}'","file","external_definition",
|
||
"function_definition","function_attribute","function_attributes","function_body",
|
||
"primary_expr","string_literal","postfix_expr","argument_expr_list","unary_expr",
|
||
"unary_operator","cast_expr","multiplicative_expr","additive_expr","shift_expr",
|
||
"relational_expr","equality_expr","and_expr","exclusive_or_expr","inclusive_or_expr",
|
||
"logical_and_expr","logical_or_expr","conditional_expr","assignment_expr","assignment_operator",
|
||
"expr","constant_expr","declaration","declaration_specifiers","init_declarator_list",
|
||
"init_declarator","storage_class_specifier","Interrupt_storage","type_specifier",
|
||
"type_specifier2","sfr_reg_bit","struct_or_union_specifier","struct_or_union",
|
||
"opt_stag","stag","struct_declaration_list","struct_declaration","struct_declarator_list",
|
||
"struct_declarator","enum_specifier","enumerator_list","enumerator","opt_assign_expr",
|
||
"declarator","declarator2_function_attributes","declarator2","@1","pointer",
|
||
"unqualified_pointer","type_specifier_list","parameter_identifier_list","identifier_list",
|
||
"parameter_type_list","parameter_list","parameter_declaration","type_name","abstract_declarator",
|
||
"abstract_declarator2","initializer","initializer_list","statement","labeled_statement",
|
||
"start_block","end_block","compound_statement","@2","@3","declaration_list",
|
||
"statement_list","expression_statement","else_statement","selection_statement",
|
||
"@4","while","do","for","iteration_statement","expr_opt","jump_statement","identifier", NULL
|
||
};
|
||
#endif
|
||
|
||
static const short yyr1[] = { 0,
|
||
130, 130, 131, 131, 132, 132, 133, 133, 134, 134,
|
||
134, 134, 134, 134, 134, 135, 135, 136, 136, 136,
|
||
136, 137, 138, 138, 138, 138, 138, 138, 138, 138,
|
||
139, 139, 140, 140, 140, 140, 140, 140, 141, 141,
|
||
141, 141, 141, 141, 142, 142, 143, 143, 143, 143,
|
||
144, 144, 144, 145, 145, 145, 146, 146, 146, 146,
|
||
146, 147, 147, 147, 148, 148, 149, 149, 150, 150,
|
||
151, 151, 152, 152, 153, 153, 154, 154, 155, 155,
|
||
155, 155, 155, 155, 155, 155, 155, 155, 155, 156,
|
||
156, 157, 158, 158, 159, 159, 159, 159, 160, 160,
|
||
161, 161, 162, 162, 162, 162, 162, 163, 164, 164,
|
||
165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
|
||
165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
|
||
165, 166, 166, 167, 167, 168, 168, 169, 169, 170,
|
||
171, 171, 172, 173, 173, 174, 174, 174, 175, 175,
|
||
175, 176, 176, 176, 177, 178, 178, 179, 179, 180,
|
||
180, 181, 181, 181, 181, 181, 182, 181, 181, 183,
|
||
183, 183, 183, 184, 185, 185, 186, 186, 187, 187,
|
||
188, 188, 189, 189, 190, 190, 191, 191, 192, 192,
|
||
192, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
||
194, 194, 194, 195, 195, 196, 196, 196, 196, 196,
|
||
196, 196, 197, 197, 197, 198, 199, 200, 200, 201,
|
||
200, 202, 200, 200, 203, 203, 204, 204, 205, 205,
|
||
206, 206, 207, 208, 207, 209, 210, 211, 212, 212,
|
||
212, 213, 213, 214, 214, 214, 214, 214, 215
|
||
};
|
||
|
||
static const short yyr2[] = { 0,
|
||
1, 2, 1, 1, 2, 3, 1, 2, 2, 1,
|
||
1, 1, 1, 1, 1, 1, 2, 1, 1, 1,
|
||
3, 1, 1, 4, 3, 4, 3, 3, 2, 2,
|
||
1, 3, 1, 2, 2, 2, 2, 4, 1, 1,
|
||
1, 1, 1, 1, 1, 4, 1, 3, 3, 3,
|
||
1, 3, 3, 1, 3, 3, 1, 3, 3, 3,
|
||
3, 1, 3, 3, 1, 3, 1, 3, 1, 3,
|
||
1, 3, 1, 3, 1, 5, 1, 3, 1, 1,
|
||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||
3, 1, 2, 3, 1, 2, 1, 2, 1, 3,
|
||
1, 3, 1, 1, 1, 1, 1, 2, 1, 3,
|
||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||
1, 1, 1, 5, 2, 1, 1, 1, 0, 1,
|
||
1, 2, 3, 1, 3, 1, 2, 3, 4, 5,
|
||
2, 1, 2, 3, 2, 2, 0, 1, 2, 1,
|
||
2, 1, 3, 3, 4, 3, 0, 5, 4, 1,
|
||
2, 2, 3, 1, 1, 2, 1, 3, 1, 3,
|
||
1, 3, 1, 3, 2, 1, 1, 2, 1, 1,
|
||
2, 3, 2, 3, 3, 4, 2, 3, 3, 4,
|
||
1, 3, 4, 1, 3, 1, 1, 1, 1, 1,
|
||
1, 2, 2, 4, 3, 1, 1, 2, 3, 0,
|
||
4, 0, 5, 2, 1, 2, 1, 2, 1, 2,
|
||
2, 0, 6, 0, 6, 1, 1, 1, 5, 7,
|
||
9, 0, 1, 3, 2, 2, 2, 3, 1
|
||
};
|
||
|
||
static const short yydefact[] = { 0,
|
||
249, 130, 103, 104, 105, 106, 107, 122, 123, 133,
|
||
132, 121, 124, 125, 126, 111, 112, 113, 114, 115,
|
||
116, 120, 118, 119, 117, 127, 136, 137, 0, 0,
|
||
174, 0, 1, 3, 4, 0, 95, 97, 109, 131,
|
||
128, 139, 129, 0, 158, 160, 0, 170, 162, 0,
|
||
151, 0, 2, 93, 0, 99, 0, 96, 98, 0,
|
||
0, 135, 140, 0, 216, 5, 225, 0, 0, 16,
|
||
0, 0, 10, 0, 11, 13, 14, 12, 167, 0,
|
||
161, 7, 15, 159, 175, 172, 171, 0, 152, 157,
|
||
0, 163, 0, 94, 0, 6, 19, 22, 0, 0,
|
||
0, 0, 39, 40, 41, 42, 43, 44, 23, 20,
|
||
33, 45, 0, 47, 51, 54, 57, 62, 65, 67,
|
||
69, 71, 73, 75, 92, 110, 18, 0, 224, 101,
|
||
0, 0, 0, 0, 236, 237, 238, 0, 0, 0,
|
||
0, 0, 229, 217, 45, 77, 90, 0, 227, 206,
|
||
218, 207, 222, 0, 208, 209, 0, 0, 0, 210,
|
||
211, 18, 226, 17, 108, 9, 166, 0, 0, 177,
|
||
179, 164, 0, 8, 176, 173, 153, 149, 0, 155,
|
||
0, 100, 0, 201, 102, 0, 37, 0, 34, 35,
|
||
0, 187, 0, 0, 29, 30, 0, 0, 0, 36,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
141, 0, 0, 0, 0, 0, 0, 245, 246, 247,
|
||
0, 212, 80, 81, 82, 83, 84, 85, 86, 87,
|
||
88, 89, 79, 0, 0, 230, 0, 0, 228, 219,
|
||
0, 0, 242, 213, 187, 0, 181, 183, 186, 169,
|
||
0, 165, 154, 156, 150, 204, 0, 0, 21, 0,
|
||
0, 189, 188, 190, 0, 28, 25, 0, 31, 0,
|
||
27, 48, 49, 50, 52, 53, 55, 56, 60, 61,
|
||
58, 59, 63, 64, 66, 68, 70, 72, 74, 0,
|
||
134, 142, 0, 0, 144, 146, 0, 215, 0, 0,
|
||
244, 248, 78, 91, 221, 0, 0, 0, 243, 0,
|
||
0, 185, 189, 168, 0, 178, 180, 0, 202, 38,
|
||
197, 0, 0, 193, 0, 191, 0, 0, 46, 26,
|
||
0, 24, 0, 147, 0, 143, 0, 214, 0, 234,
|
||
223, 0, 0, 242, 182, 184, 203, 205, 198, 192,
|
||
194, 199, 0, 195, 0, 32, 76, 145, 148, 232,
|
||
0, 239, 0, 0, 200, 196, 0, 233, 235, 0,
|
||
242, 231, 240, 0, 0, 241, 0, 0
|
||
};
|
||
|
||
static const short yydefgoto[] = { 32,
|
||
33, 34, 81, 82, 66, 109, 110, 111, 278, 145,
|
||
113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
|
||
123, 124, 146, 147, 244, 148, 126, 67, 68, 55,
|
||
56, 37, 83, 85, 39, 40, 41, 42, 61, 62,
|
||
220, 221, 304, 305, 43, 88, 89, 180, 44, 45,
|
||
46, 168, 47, 48, 255, 169, 170, 332, 257, 258,
|
||
259, 273, 274, 185, 267, 149, 150, 69, 151, 152,
|
||
247, 248, 71, 154, 155, 378, 156, 371, 157, 158,
|
||
159, 160, 320, 161, 127
|
||
};
|
||
|
||
static const short yypact[] = { 1229,
|
||
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
|
||
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
|
||
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 2, 16,
|
||
-32768, 1192,-32768,-32768,-32768, 12, 1616, 1616, -14,-32768,
|
||
-32768, 53,-32768, 574,-32768, 262, 28, 1523,-32768, 53,
|
||
-85, -34,-32768,-32768, -44,-32768, 537,-32768,-32768, 1070,
|
||
-48, -41,-32768, -4,-32768,-32768,-32768, 12, 357,-32768,
|
||
574, 114,-32768, 151,-32768,-32768,-32768,-32768, 30, 940,
|
||
-32768, 279,-32768,-32768,-32768,-32768, 1523, -83,-32768, 43,
|
||
53,-32768, 16,-32768, 860,-32768,-32768,-32768, 1091, 1103,
|
||
1103, 955,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
|
||
133,-32768, 1070,-32768, 46, -10, 101, 24, 175, 54,
|
||
64, 69, 204, 7,-32768,-32768,-32768, 1680,-32768, 103,
|
||
1070, 106, 127, 130,-32768,-32768,-32768, 53, 110, 113,
|
||
169, 115,-32768,-32768, 428,-32768,-32768, -35,-32768,-32768,
|
||
-32768,-32768, 766, 436,-32768,-32768, 139, 640, 140,-32768,
|
||
-32768, 128,-32768,-32768,-32768,-32768,-32768, 1680, 147, 145,
|
||
-32768,-32768, 149,-32768,-32768,-32768, 53,-32768, 1070,-32768,
|
||
-59,-32768, 860,-32768,-32768, 955,-32768, 1070,-32768,-32768,
|
||
-63, 1448, 152, 53,-32768,-32768, 976, 1070, 53,-32768,
|
||
1070, 1070, 1070, 1070, 1070, 1070, 1070, 1070, 1070, 1070,
|
||
1070, 1070, 1070, 1070, 1070, 1070, 1070, 1070, 1070, 798,
|
||
-32768, 878, 135, 640, 1070, 1070, 141,-32768,-32768,-32768,
|
||
-17,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
|
||
-32768,-32768,-32768, 1070, 1070,-32768, 137, 640,-32768,-32768,
|
||
1070, 194, 1070,-32768, 1341, 162, 159,-32768,-32768,-32768,
|
||
42,-32768,-32768,-32768,-32768,-32768, -54, 164,-32768, 1416,
|
||
1017, -43,-32768, 49, 1070,-32768,-32768, 166, 168, 38,
|
||
-32768,-32768,-32768,-32768, 46, 46, -10, -10, 101, 101,
|
||
101, 101, 24, 24, 175, 54, 64, 69, 204, -5,
|
||
-32768,-32768, 1070, 35,-32768, 163, 640,-32768, 60, 74,
|
||
-32768,-32768,-32768,-32768,-32768, 436, 76, 181, 179, 173,
|
||
1304,-32768, 18,-32768, 1648,-32768,-32768, 663,-32768,-32768,
|
||
-32768, 186, 199,-32768, 203, 49, 1555, 1029,-32768,-32768,
|
||
1070,-32768, 1070,-32768, 15,-32768, 1070,-32768, 640,-32768,
|
||
-32768, 640, 1070, 1070,-32768,-32768,-32768,-32768,-32768,-32768,
|
||
-32768,-32768, 201,-32768, 205,-32768,-32768,-32768,-32768, 246,
|
||
640,-32768, 77, 195,-32768,-32768, 640,-32768,-32768, 197,
|
||
1070,-32768,-32768, 218, 640,-32768, 329,-32768
|
||
};
|
||
|
||
static const short yypgoto[] = {-32768,
|
||
298,-32768, 249,-32768, 275,-32768,-32768,-32768, -7, 1,
|
||
-32768, -86, -8, -6, 41, 14, 119, 120, 121, 123,
|
||
118, 122, -46, -94,-32768, -90, -73, 17, 22,-32768,
|
||
245,-32768,-32768, 40,-32768,-32768,-32768,-32768,-32768,-32768,
|
||
-32768, 126,-32768, -2,-32768, 256, 174,-32768, -27, -45,
|
||
-32768,-32768, -32,-32768, -38,-32768,-32768, -164,-32768, 25,
|
||
-91, -250, -249, -175,-32768, -72,-32768,-32768, -148, -18,
|
||
-32768,-32768, 284, 107,-32768,-32768,-32768,-32768,-32768,-32768,
|
||
-32768,-32768, -319,-32768, 0
|
||
};
|
||
|
||
|
||
#define YYLAST 1744
|
||
|
||
|
||
static const short yytable[] = { 49,
|
||
184, 84, 52, 256, 1, 250, 173, 266, 57, 87,
|
||
193, 191, 218, 125, 1, 86, 35, 1, 1, 333,
|
||
1, 36, 336, 60, 218, 70, 200, 177, 51, 49,
|
||
1, 49, 1, 125, 374, 49, 208, 209, 70, 38,
|
||
130, 63, 91, 269, 1, 178, 49, 245, 35, 90,
|
||
231, 177, 164, 36, 176, 1, 328, 223, 58, 59,
|
||
112, 384, 270, 192, 271, 130, 93, 49, 162, 265,
|
||
333, 38, 92, 336, 329, 245, 38, 38, 171, 128,
|
||
112, 249, 94, 38, 125, 252, -138, 163, 184, 222,
|
||
90, 246, 49, 245, 268, 191, 38, 191, 315, 187,
|
||
189, 190, 279, 204, 205, 264, 326, 280, 38, 312,
|
||
38, 206, 207, 112, 282, 283, 284, 30, 165, 343,
|
||
30, 30, 129, 321, 31, 271, 175, 31, 31, 50,
|
||
219, 112, 125, 30, 309, 310, 167, 227, 54, 303,
|
||
194, 195, 196, 210, 211, 345, 342, 192, 245, 313,
|
||
314, 308, 358, 162, 337, 166, 338, 162, 201, 272,
|
||
317, 346, 319, 202, 203, 214, 349, 351, 179, 163,
|
||
245, 1, 363, 97, 98, 99, 90, 100, 101, 112,
|
||
350, 222, 352, 380, 245, 215, 245, 245, 339, 212,
|
||
213, 216, 38, 276, 306, 285, 286, 335, 281, 287,
|
||
288, 112, 112, 112, 112, 112, 112, 112, 112, 112,
|
||
112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
|
||
217, 49, 323, 162, 125, 293, 294, 322, 95, 344,
|
||
224, 175, 225, 184, 348, 226, 228, 272, 197, 229,
|
||
198, 232, 199, 249, 251, 253, 279, 162, 289, 290,
|
||
291, 292, 254, 260, 49, 261, 125, 262, 275, 307,
|
||
327, 175, 373, 319, 365, 144, 318, 311, 324, 325,
|
||
330, 112, 340, 369, 102, 112, 370, 84, 341, 372,
|
||
103, 104, 105, 106, 107, 108, 353, 347, 323, 245,
|
||
319, 125, 359, 52, 175, 230, 367, 72, 379, 354,
|
||
125, 73, 74, 112, 382, 360, 162, 375, 75, 76,
|
||
77, 361, 386, 376, 72, 162, 377, 306, 73, 74,
|
||
49, 381, 49, 383, 385, 75, 76, 77, 388, 53,
|
||
174, 96, 295, 366, 296, 299, 297, 182, 112, 298,
|
||
300, 78, 368, 112, 49, 302, 181, 112, 162, 356,
|
||
263, 162, 153, 0, 316, 0, 0, 64, 78, 1,
|
||
2, 97, 98, 99, 0, 100, 101, 79, 0, 80,
|
||
162, 0, 0, 0, 0, 0, 162, 0, 0, 0,
|
||
0, 0, 0, 0, 162, 3, 4, 5, 6, 7,
|
||
8, 9, 0, 10, 0, 11, 0, 0, 12, 13,
|
||
14, 15, 0, 0, 0, 0, 16, 17, 18, 19,
|
||
20, 21, 22, 0, 23, 24, 25, 26, 27, 28,
|
||
29, 0, 0, 0, 131, 132, 133, 0, 134, 135,
|
||
136, 137, 138, 139, 140, 141, 64, 142, 1, 0,
|
||
97, 98, 99, 0, 100, 101, 233, 234, 235, 236,
|
||
237, 238, 239, 240, 241, 242, 0, 0, 0, 0,
|
||
0, 0, 102, 0, 0, 0, 0, 0, 103, 104,
|
||
105, 106, 107, 108, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 0, 143, 65, 144, 0, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 0, 131, 132, 133, 0, 134, 135, 136,
|
||
137, 138, 139, 140, 141, 0, 142, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 0, 0, 64, 0, 0,
|
||
2, 102, 0, 0, 0, 0, 0, 103, 104, 105,
|
||
106, 107, 108, 243, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 143, 65, 144, 3, 4, 5, 6, 7,
|
||
8, 9, 0, 10, 64, 11, 0, 2, 12, 13,
|
||
14, 15, 0, 0, 0, 0, 16, 17, 18, 19,
|
||
20, 21, 22, 0, 23, 24, 25, 26, 27, 28,
|
||
29, 0, 3, 4, 5, 6, 7, 8, 9, 0,
|
||
10, 0, 11, 0, 0, 12, 13, 14, 15, 0,
|
||
0, 0, 0, 16, 17, 18, 19, 20, 21, 22,
|
||
0, 23, 24, 25, 26, 27, 28, 29, 0, 0,
|
||
64, 0, 1, 0, 97, 98, 99, -101, 100, 101,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 95, -101, 65, 1, 0, 97, 98, 99,
|
||
0, 100, 101, 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, 65, 0, 0, 0, 0, 0, 131, 132, 133,
|
||
0, 134, 135, 136, 137, 138, 139, 140, 141, 0,
|
||
142, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 102, 0, 0, 0, 0,
|
||
0, 103, 104, 105, 106, 107, 108, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 0, 143, 65, 102, 2,
|
||
0, 0, 0, 0, 103, 104, 105, 106, 107, 108,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
183, 357, 0, 0, 3, 4, 5, 6, 7, 8,
|
||
9, 2, 10, 0, 11, 0, 0, 12, 13, 14,
|
||
15, 0, 0, 0, 0, 16, 17, 18, 19, 20,
|
||
21, 22, 0, 23, 24, 25, 26, 27, 28, 29,
|
||
0, 8, 9, 0, 10, 0, 11, 0, 0, 12,
|
||
13, 14, 15, 0, 0, 0, 0, 16, 17, 18,
|
||
19, 20, 21, 22, 0, 23, 24, 25, 26, 27,
|
||
28, 29, 1, 0, 97, 98, 99, 0, 100, 101,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
1, 2, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 0, 0, -220, 0, 0, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 8, 9, 0, 10, 0, 11, 0, 0, 12,
|
||
13, 14, 15, 0, 0, 0, 301, 16, 17, 18,
|
||
19, 20, 21, 22, 0, 23, 24, 25, 26, 27,
|
||
28, 29, 1, 0, 97, 98, 99, 0, 100, 101,
|
||
0, 0, 0, 0, 0, 0, 0, 1, 2, 97,
|
||
98, 99, 0, 100, 101, 102, 0, 0, 0, 0,
|
||
0, 103, 104, 105, 106, 107, 108, 0, 1, 0,
|
||
97, 98, 99, 30, 100, 101, 0, 183, 8, 9,
|
||
31, 10, 0, 11, 0, 0, 12, 13, 14, 15,
|
||
0, 0, 303, 0, 16, 17, 18, 19, 20, 21,
|
||
22, 0, 23, 24, 25, 26, 27, 28, 29, 1,
|
||
0, 97, 98, 99, 0, 100, 101, 0, 0, 0,
|
||
0, 1, 0, 97, 98, 99, 0, 100, 101, 0,
|
||
0, 0, 0, 0, 0, 102, 0, 0, 172, 0,
|
||
0, 103, 104, 105, 106, 107, 108, 0, 0, 0,
|
||
102, 0, 0, 0, 0, 0, 103, 104, 105, 106,
|
||
107, 108, 1, 0, 97, 98, 99, 0, 100, 101,
|
||
0, 102, 277, 0, 0, 0, 0, 103, 104, 105,
|
||
106, 107, 108, 1, 0, 97, 98, 99, 0, 100,
|
||
101, 0, 0, 0, 0, 1, 0, 97, 98, 99,
|
||
0, 100, 101, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 102, 0, 0, 334, 0, 0, 103, 104,
|
||
105, 106, 107, 108, 102, 0, 0, 364, 0, 0,
|
||
103, 104, 105, 106, 107, 108, 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, 102, 0, 0, 0, 0,
|
||
0, 103, 104, 105, 106, 107, 108, 0, 0, 0,
|
||
0, 387, 0, 0, 1, 2, 186, 0, 0, 0,
|
||
0, 0, 103, 104, 105, 106, 107, 108, 188, 0,
|
||
0, 0, 0, 0, 103, 104, 105, 106, 107, 108,
|
||
3, 4, 5, 6, 7, 8, 9, 0, 10, 0,
|
||
11, 1, 2, 12, 13, 14, 15, 0, 0, 0,
|
||
0, 16, 17, 18, 19, 20, 21, 22, 0, 23,
|
||
24, 25, 26, 27, 28, 29, 0, 3, 4, 5,
|
||
6, 7, 8, 9, 0, 10, 0, 11, 0, 0,
|
||
12, 13, 14, 15, 0, 0, 0, 0, 16, 17,
|
||
18, 19, 20, 21, 22, 0, 23, 24, 25, 26,
|
||
27, 28, 29, 0, 0, 0, 0, 30, 0, 0,
|
||
0, 0, 0, 0, 31, 0, 1, 2, 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, 30, 0, 0, 8, 9, 0,
|
||
10, 31, 11, 1, 2, 12, 13, 14, 15, 0,
|
||
0, 0, 0, 16, 17, 18, 19, 20, 21, 22,
|
||
0, 23, 24, 25, 26, 27, 28, 29, 0, 0,
|
||
0, 0, 0, 0, 8, 9, 0, 10, 0, 11,
|
||
0, 0, 12, 13, 14, 15, 0, 0, 0, 0,
|
||
16, 17, 18, 19, 20, 21, 22, 0, 23, 24,
|
||
25, 26, 27, 28, 29, 0, 0, 0, 0, 321,
|
||
331, 271, 0, 0, 0, 0, 31, 0, 0, 2,
|
||
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, 321, 0, 271, 8,
|
||
9, 2, 10, 31, 11, 0, 0, 12, 13, 14,
|
||
15, 0, 0, 0, 0, 16, 17, 18, 19, 20,
|
||
21, 22, 0, 23, 24, 25, 26, 27, 28, 29,
|
||
0, 8, 9, 0, 10, 0, 11, 0, 0, 12,
|
||
13, 14, 15, 0, 0, 0, 0, 16, 17, 18,
|
||
19, 20, 21, 22, 0, 23, 24, 25, 26, 27,
|
||
28, 29, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 270, 331, 271, 0, 0, 2, 0, 31, 0,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 0, 270, 0, 271, 8, 9, 2, 10,
|
||
31, 11, 0, 0, 12, 13, 14, 15, 0, 0,
|
||
0, 0, 16, 17, 18, 19, 20, 21, 22, 0,
|
||
23, 24, 25, 26, 27, 28, 29, 0, 8, 9,
|
||
0, 10, 0, 11, 0, 0, 12, 13, 14, 15,
|
||
0, 0, 0, 0, 16, 17, 18, 19, 20, 21,
|
||
22, 0, 23, 24, 25, 26, 27, 28, 29, 2,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 31, 0, 0, 0, 0,
|
||
0, 0, 0, 0, 3, 4, 5, 6, 7, 8,
|
||
9, 2, 10, 0, 11, 0, 0, 12, 13, 14,
|
||
15, 362, 0, 0, 0, 16, 17, 18, 19, 20,
|
||
21, 22, 0, 23, 24, 25, 26, 27, 28, 29,
|
||
0, 8, 9, 2, 10, 0, 11, 0, 0, 12,
|
||
13, 14, 15, 355, 0, 0, 0, 16, 17, 18,
|
||
19, 20, 21, 22, 0, 23, 24, 25, 26, 27,
|
||
28, 29, 0, 8, 9, 0, 10, 0, 11, 0,
|
||
0, 12, 13, 14, 15, 0, 0, 0, 0, 16,
|
||
17, 18, 19, 20, 21, 22, 0, 23, 24, 25,
|
||
26, 27, 28, 29
|
||
};
|
||
|
||
static const short yycheck[] = { 0,
|
||
95, 47, 30, 168, 3, 154, 80, 183, 36, 48,
|
||
102, 102, 18, 60, 3, 48, 0, 3, 3, 270,
|
||
3, 0, 272, 38, 18, 44, 113, 111, 29, 30,
|
||
3, 32, 3, 80, 354, 36, 13, 14, 57, 0,
|
||
68, 42, 128, 107, 3, 129, 47, 111, 32, 50,
|
||
141, 111, 71, 32, 87, 3, 111, 131, 37, 38,
|
||
60, 381, 106, 102, 108, 93, 111, 68, 69, 129,
|
||
321, 32, 107, 323, 129, 111, 37, 38, 79, 128,
|
||
80, 154, 127, 44, 131, 158, 128, 71, 183, 128,
|
||
91, 127, 93, 111, 186, 186, 57, 188, 247, 99,
|
||
100, 101, 197, 114, 115, 179, 65, 198, 69, 127,
|
||
71, 11, 12, 113, 201, 202, 203, 106, 5, 125,
|
||
106, 106, 127, 106, 113, 108, 87, 113, 113, 128,
|
||
124, 131, 179, 106, 225, 226, 107, 138, 127, 125,
|
||
8, 9, 10, 120, 121, 111, 109, 186, 111, 244,
|
||
245, 224, 328, 154, 106, 5, 108, 158, 113, 192,
|
||
251, 127, 253, 118, 119, 112, 107, 316, 126, 153,
|
||
111, 3, 337, 5, 6, 7, 177, 9, 10, 179,
|
||
107, 220, 107, 107, 111, 122, 111, 111, 275, 15,
|
||
16, 123, 153, 194, 222, 204, 205, 271, 199, 206,
|
||
207, 201, 202, 203, 204, 205, 206, 207, 208, 209,
|
||
210, 211, 212, 213, 214, 215, 216, 217, 218, 219,
|
||
17, 222, 255, 224, 271, 212, 213, 255, 126, 303,
|
||
125, 192, 106, 328, 307, 106, 127, 270, 106, 127,
|
||
108, 127, 110, 316, 106, 106, 341, 248, 208, 209,
|
||
210, 211, 125, 107, 255, 111, 303, 109, 107, 125,
|
||
261, 222, 353, 354, 338, 129, 73, 127, 107, 111,
|
||
107, 271, 107, 347, 106, 275, 349, 323, 111, 352,
|
||
112, 113, 114, 115, 116, 117, 106, 125, 321, 111,
|
||
381, 338, 107, 321, 255, 127, 343, 36, 371, 127,
|
||
347, 40, 41, 303, 377, 107, 307, 107, 47, 48,
|
||
49, 109, 385, 109, 36, 316, 71, 345, 40, 41,
|
||
321, 127, 323, 127, 107, 47, 48, 49, 0, 32,
|
||
82, 57, 214, 341, 215, 218, 216, 93, 338, 217,
|
||
219, 80, 345, 343, 345, 220, 91, 347, 349, 325,
|
||
177, 352, 69, -1, 248, -1, -1, 1, 80, 3,
|
||
4, 5, 6, 7, -1, 9, 10, 106, -1, 108,
|
||
371, -1, -1, -1, -1, -1, 377, -1, -1, -1,
|
||
-1, -1, -1, -1, 385, 29, 30, 31, 32, 33,
|
||
34, 35, -1, 37, -1, 39, -1, -1, 42, 43,
|
||
44, 45, -1, -1, -1, -1, 50, 51, 52, 53,
|
||
54, 55, 56, -1, 58, 59, 60, 61, 62, 63,
|
||
64, -1, -1, -1, 68, 69, 70, -1, 72, 73,
|
||
74, 75, 76, 77, 78, 79, 1, 81, 3, -1,
|
||
5, 6, 7, -1, 9, 10, 19, 20, 21, 22,
|
||
23, 24, 25, 26, 27, 28, -1, -1, -1, -1,
|
||
-1, -1, 106, -1, -1, -1, -1, -1, 112, 113,
|
||
114, 115, 116, 117, -1, -1, -1, -1, -1, -1,
|
||
-1, -1, -1, 127, 128, 129, -1, -1, -1, -1,
|
||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||
-1, -1, -1, 68, 69, 70, -1, 72, 73, 74,
|
||
75, 76, 77, 78, 79, -1, 81, -1, -1, -1,
|
||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||
-1, -1, -1, -1, -1, -1, -1, 1, -1, -1,
|
||
4, 106, -1, -1, -1, -1, -1, 112, 113, 114,
|
||
115, 116, 117, 126, -1, -1, -1, -1, -1, -1,
|
||
-1, -1, 127, 128, 129, 29, 30, 31, 32, 33,
|
||
34, 35, -1, 37, 1, 39, -1, 4, 42, 43,
|
||
44, 45, -1, -1, -1, -1, 50, 51, 52, 53,
|
||
54, 55, 56, -1, 58, 59, 60, 61, 62, 63,
|
||
64, -1, 29, 30, 31, 32, 33, 34, 35, -1,
|
||
37, -1, 39, -1, -1, 42, 43, 44, 45, -1,
|
||
-1, -1, -1, 50, 51, 52, 53, 54, 55, 56,
|
||
-1, 58, 59, 60, 61, 62, 63, 64, -1, -1,
|
||
1, -1, 3, -1, 5, 6, 7, 111, 9, 10,
|
||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||
-1, -1, 126, 127, 128, 3, -1, 5, 6, 7,
|
||
-1, 9, 10, -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, 128, -1, -1, -1, -1, -1, 68, 69, 70,
|
||
-1, 72, 73, 74, 75, 76, 77, 78, 79, -1,
|
||
81, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||
-1, -1, -1, -1, -1, 106, -1, -1, -1, -1,
|
||
-1, 112, 113, 114, 115, 116, 117, -1, -1, -1,
|
||
-1, -1, -1, -1, -1, -1, 127, 128, 106, 4,
|
||
-1, -1, -1, -1, 112, 113, 114, 115, 116, 117,
|
||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||
128, 129, -1, -1, 29, 30, 31, 32, 33, 34,
|
||
35, 4, 37, -1, 39, -1, -1, 42, 43, 44,
|
||
45, -1, -1, -1, -1, 50, 51, 52, 53, 54,
|
||
55, 56, -1, 58, 59, 60, 61, 62, 63, 64,
|
||
-1, 34, 35, -1, 37, -1, 39, -1, -1, 42,
|
||
43, 44, 45, -1, -1, -1, -1, 50, 51, 52,
|
||
53, 54, 55, 56, -1, 58, 59, 60, 61, 62,
|
||
63, 64, 3, -1, 5, 6, 7, -1, 9, 10,
|
||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||
3, 4, -1, -1, -1, -1, -1, -1, -1, -1,
|
||
-1, -1, -1, -1, 129, -1, -1, -1, -1, -1,
|
||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||
-1, 34, 35, -1, 37, -1, 39, -1, -1, 42,
|
||
43, 44, 45, -1, -1, -1, 129, 50, 51, 52,
|
||
53, 54, 55, 56, -1, 58, 59, 60, 61, 62,
|
||
63, 64, 3, -1, 5, 6, 7, -1, 9, 10,
|
||
-1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
|
||
6, 7, -1, 9, 10, 106, -1, -1, -1, -1,
|
||
-1, 112, 113, 114, 115, 116, 117, -1, 3, -1,
|
||
5, 6, 7, 106, 9, 10, -1, 128, 34, 35,
|
||
113, 37, -1, 39, -1, -1, 42, 43, 44, 45,
|
||
-1, -1, 125, -1, 50, 51, 52, 53, 54, 55,
|
||
56, -1, 58, 59, 60, 61, 62, 63, 64, 3,
|
||
-1, 5, 6, 7, -1, 9, 10, -1, -1, -1,
|
||
-1, 3, -1, 5, 6, 7, -1, 9, 10, -1,
|
||
-1, -1, -1, -1, -1, 106, -1, -1, 109, -1,
|
||
-1, 112, 113, 114, 115, 116, 117, -1, -1, -1,
|
||
106, -1, -1, -1, -1, -1, 112, 113, 114, 115,
|
||
116, 117, 3, -1, 5, 6, 7, -1, 9, 10,
|
||
-1, 106, 107, -1, -1, -1, -1, 112, 113, 114,
|
||
115, 116, 117, 3, -1, 5, 6, 7, -1, 9,
|
||
10, -1, -1, -1, -1, 3, -1, 5, 6, 7,
|
||
-1, 9, 10, -1, -1, -1, -1, -1, -1, -1,
|
||
-1, -1, 106, -1, -1, 109, -1, -1, 112, 113,
|
||
114, 115, 116, 117, 106, -1, -1, 109, -1, -1,
|
||
112, 113, 114, 115, 116, 117, -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, 106, -1, -1, -1, -1,
|
||
-1, 112, 113, 114, 115, 116, 117, -1, -1, -1,
|
||
-1, 0, -1, -1, 3, 4, 106, -1, -1, -1,
|
||
-1, -1, 112, 113, 114, 115, 116, 117, 106, -1,
|
||
-1, -1, -1, -1, 112, 113, 114, 115, 116, 117,
|
||
29, 30, 31, 32, 33, 34, 35, -1, 37, -1,
|
||
39, 3, 4, 42, 43, 44, 45, -1, -1, -1,
|
||
-1, 50, 51, 52, 53, 54, 55, 56, -1, 58,
|
||
59, 60, 61, 62, 63, 64, -1, 29, 30, 31,
|
||
32, 33, 34, 35, -1, 37, -1, 39, -1, -1,
|
||
42, 43, 44, 45, -1, -1, -1, -1, 50, 51,
|
||
52, 53, 54, 55, 56, -1, 58, 59, 60, 61,
|
||
62, 63, 64, -1, -1, -1, -1, 106, -1, -1,
|
||
-1, -1, -1, -1, 113, -1, 3, 4, -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, 106, -1, -1, 34, 35, -1,
|
||
37, 113, 39, 3, 4, 42, 43, 44, 45, -1,
|
||
-1, -1, -1, 50, 51, 52, 53, 54, 55, 56,
|
||
-1, 58, 59, 60, 61, 62, 63, 64, -1, -1,
|
||
-1, -1, -1, -1, 34, 35, -1, 37, -1, 39,
|
||
-1, -1, 42, 43, 44, 45, -1, -1, -1, -1,
|
||
50, 51, 52, 53, 54, 55, 56, -1, 58, 59,
|
||
60, 61, 62, 63, 64, -1, -1, -1, -1, 106,
|
||
107, 108, -1, -1, -1, -1, 113, -1, -1, 4,
|
||
-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, 106, -1, 108, 34,
|
||
35, 4, 37, 113, 39, -1, -1, 42, 43, 44,
|
||
45, -1, -1, -1, -1, 50, 51, 52, 53, 54,
|
||
55, 56, -1, 58, 59, 60, 61, 62, 63, 64,
|
||
-1, 34, 35, -1, 37, -1, 39, -1, -1, 42,
|
||
43, 44, 45, -1, -1, -1, -1, 50, 51, 52,
|
||
53, 54, 55, 56, -1, 58, 59, 60, 61, 62,
|
||
63, 64, -1, -1, -1, -1, -1, -1, -1, -1,
|
||
-1, 106, 107, 108, -1, -1, 4, -1, 113, -1,
|
||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||
-1, -1, -1, 106, -1, 108, 34, 35, 4, 37,
|
||
113, 39, -1, -1, 42, 43, 44, 45, -1, -1,
|
||
-1, -1, 50, 51, 52, 53, 54, 55, 56, -1,
|
||
58, 59, 60, 61, 62, 63, 64, -1, 34, 35,
|
||
-1, 37, -1, 39, -1, -1, 42, 43, 44, 45,
|
||
-1, -1, -1, -1, 50, 51, 52, 53, 54, 55,
|
||
56, -1, 58, 59, 60, 61, 62, 63, 64, 4,
|
||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||
-1, -1, -1, -1, -1, 113, -1, -1, -1, -1,
|
||
-1, -1, -1, -1, 29, 30, 31, 32, 33, 34,
|
||
35, 4, 37, -1, 39, -1, -1, 42, 43, 44,
|
||
45, 107, -1, -1, -1, 50, 51, 52, 53, 54,
|
||
55, 56, -1, 58, 59, 60, 61, 62, 63, 64,
|
||
-1, 34, 35, 4, 37, -1, 39, -1, -1, 42,
|
||
43, 44, 45, 46, -1, -1, -1, 50, 51, 52,
|
||
53, 54, 55, 56, -1, 58, 59, 60, 61, 62,
|
||
63, 64, -1, 34, 35, -1, 37, -1, 39, -1,
|
||
-1, 42, 43, 44, 45, -1, -1, -1, -1, 50,
|
||
51, 52, 53, 54, 55, 56, -1, 58, 59, 60,
|
||
61, 62, 63, 64
|
||
};
|
||
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
|
||
#line 3 "/usr/share/bison/bison.simple"
|
||
/* This file comes from bison-1.28. */
|
||
|
||
/* 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 217 "/usr/share/bison/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 3:
|
||
#line 131 "SDCC.y"
|
||
{
|
||
blockNo=0;
|
||
;
|
||
break;}
|
||
case 4:
|
||
#line 134 "SDCC.y"
|
||
{
|
||
if (yyvsp[0].sym && yyvsp[0].sym->type
|
||
&& IS_FUNC(yyvsp[0].sym->type))
|
||
{
|
||
/* The only legal storage classes for
|
||
* a function prototype (declaration)
|
||
* are extern and static. extern is the
|
||
* default. Thus, if this function isn't
|
||
* explicitly marked static, mark it
|
||
* extern.
|
||
*/
|
||
if (yyvsp[0].sym->etype
|
||
&& IS_SPEC(yyvsp[0].sym->etype)
|
||
&& !SPEC_STAT(yyvsp[0].sym->etype))
|
||
{
|
||
SPEC_EXTR(yyvsp[0].sym->etype) = 1;
|
||
}
|
||
}
|
||
addSymChain (yyvsp[0].sym);
|
||
allocVariables (yyvsp[0].sym) ;
|
||
cleanUpLevel (SymbolTab,1);
|
||
;
|
||
break;}
|
||
case 5:
|
||
#line 159 "SDCC.y"
|
||
{ /* function type not specified */
|
||
/* assume it to be 'int' */
|
||
addDecl(yyvsp[-1].sym,0,newIntLink());
|
||
yyval.asts = createFunction(yyvsp[-1].sym,yyvsp[0].asts);
|
||
;
|
||
break;}
|
||
case 6:
|
||
#line 165 "SDCC.y"
|
||
{
|
||
pointerTypes(yyvsp[-1].sym->type,copyLinkChain(yyvsp[-2].lnk));
|
||
addDecl(yyvsp[-1].sym,0,yyvsp[-2].lnk);
|
||
yyval.asts = createFunction(yyvsp[-1].sym,yyvsp[0].asts);
|
||
;
|
||
break;}
|
||
case 8:
|
||
#line 174 "SDCC.y"
|
||
{ yyval.lnk = mergeSpec(yyvsp[-1].lnk,yyvsp[0].lnk,"function_attribute"); ;
|
||
break;}
|
||
case 9:
|
||
#line 178 "SDCC.y"
|
||
{
|
||
yyval.lnk = newLink() ;
|
||
yyval.lnk->class = SPECIFIER ;
|
||
FUNC_REGBANK(yyval.lnk) = (int) floatFromVal(yyvsp[0].val);
|
||
;
|
||
break;}
|
||
case 10:
|
||
#line 183 "SDCC.y"
|
||
{ yyval.lnk = newLink ();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
FUNC_ISREENT(yyval.lnk)=1;
|
||
;
|
||
break;}
|
||
case 11:
|
||
#line 187 "SDCC.y"
|
||
{ yyval.lnk = newLink ();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
FUNC_ISCRITICAL(yyval.lnk) = 1;
|
||
;
|
||
break;}
|
||
case 12:
|
||
#line 191 "SDCC.y"
|
||
{ yyval.lnk = newLink ();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
FUNC_ISNAKED(yyval.lnk)=1;
|
||
;
|
||
break;}
|
||
case 13:
|
||
#line 195 "SDCC.y"
|
||
{yyval.lnk = newLink ();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
FUNC_NONBANKED(yyval.lnk) = 1;
|
||
if (FUNC_BANKED(yyval.lnk)) {
|
||
werror(W_BANKED_WITH_NONBANKED);
|
||
}
|
||
;
|
||
break;}
|
||
case 14:
|
||
#line 202 "SDCC.y"
|
||
{yyval.lnk = newLink ();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
FUNC_BANKED(yyval.lnk) = 1;
|
||
if (FUNC_NONBANKED(yyval.lnk)) {
|
||
werror(W_BANKED_WITH_NONBANKED);
|
||
}
|
||
if (SPEC_STAT(yyval.lnk)) {
|
||
werror(W_BANKED_WITH_STATIC);
|
||
}
|
||
;
|
||
break;}
|
||
case 15:
|
||
#line 213 "SDCC.y"
|
||
{
|
||
yyval.lnk = newLink () ;
|
||
yyval.lnk->class = SPECIFIER ;
|
||
FUNC_INTNO(yyval.lnk) = yyvsp[0].yyint ;
|
||
FUNC_ISISR(yyval.lnk) = 1;
|
||
;
|
||
break;}
|
||
case 17:
|
||
#line 224 "SDCC.y"
|
||
{
|
||
werror(E_OLD_STYLE,(yyvsp[-1].sym ? yyvsp[-1].sym->name: "")) ;
|
||
exit(1);
|
||
;
|
||
break;}
|
||
case 18:
|
||
#line 231 "SDCC.y"
|
||
{ yyval.asts = newAst_VALUE(symbolVal(yyvsp[0].sym)); ;
|
||
break;}
|
||
case 19:
|
||
#line 232 "SDCC.y"
|
||
{ yyval.asts = newAst_VALUE(yyvsp[0].val); ;
|
||
break;}
|
||
case 21:
|
||
#line 234 "SDCC.y"
|
||
{ yyval.asts = yyvsp[-1].asts ; ;
|
||
break;}
|
||
case 22:
|
||
#line 238 "SDCC.y"
|
||
{ yyval.asts = newAst_VALUE(yyvsp[0].val); ;
|
||
break;}
|
||
case 24:
|
||
#line 243 "SDCC.y"
|
||
{ yyval.asts = newNode ('[', yyvsp[-3].asts, yyvsp[-1].asts) ; ;
|
||
break;}
|
||
case 25:
|
||
#line 244 "SDCC.y"
|
||
{ yyval.asts = newNode (CALL,yyvsp[-2].asts,NULL);
|
||
yyval.asts->left->funcName = 1;;
|
||
break;}
|
||
case 26:
|
||
#line 247 "SDCC.y"
|
||
{
|
||
yyval.asts = newNode (CALL,yyvsp[-3].asts,yyvsp[-1].asts) ; yyval.asts->left->funcName = 1;
|
||
;
|
||
break;}
|
||
case 27:
|
||
#line 251 "SDCC.y"
|
||
{
|
||
yyvsp[0].sym = newSymbol(yyvsp[0].sym->name,NestLevel);
|
||
yyvsp[0].sym->implicit = 1;
|
||
yyval.asts = newNode(PTR_OP,newNode('&',yyvsp[-2].asts,NULL),newAst_VALUE(symbolVal(yyvsp[0].sym)));
|
||
/* $$ = newNode('.',$1,newAst(EX_VALUE,symbolVal($3))) ; */
|
||
;
|
||
break;}
|
||
case 28:
|
||
#line 258 "SDCC.y"
|
||
{
|
||
yyvsp[0].sym = newSymbol(yyvsp[0].sym->name,NestLevel);
|
||
yyvsp[0].sym->implicit = 1;
|
||
yyval.asts = newNode(PTR_OP,yyvsp[-2].asts,newAst_VALUE(symbolVal(yyvsp[0].sym)));
|
||
;
|
||
break;}
|
||
case 29:
|
||
#line 264 "SDCC.y"
|
||
{ yyval.asts = newNode(INC_OP,yyvsp[-1].asts,NULL);;
|
||
break;}
|
||
case 30:
|
||
#line 266 "SDCC.y"
|
||
{ yyval.asts = newNode(DEC_OP,yyvsp[-1].asts,NULL); ;
|
||
break;}
|
||
case 32:
|
||
#line 271 "SDCC.y"
|
||
{ yyval.asts = newNode(PARAM,yyvsp[-2].asts,yyvsp[0].asts); ;
|
||
break;}
|
||
case 34:
|
||
#line 276 "SDCC.y"
|
||
{ yyval.asts = newNode(INC_OP,NULL,yyvsp[0].asts); ;
|
||
break;}
|
||
case 35:
|
||
#line 277 "SDCC.y"
|
||
{ yyval.asts = newNode(DEC_OP,NULL,yyvsp[0].asts); ;
|
||
break;}
|
||
case 36:
|
||
#line 278 "SDCC.y"
|
||
{ yyval.asts = newNode(yyvsp[-1].yyint,yyvsp[0].asts,NULL) ; ;
|
||
break;}
|
||
case 37:
|
||
#line 279 "SDCC.y"
|
||
{ yyval.asts = newNode(SIZEOF,NULL,yyvsp[0].asts); ;
|
||
break;}
|
||
case 38:
|
||
#line 280 "SDCC.y"
|
||
{ yyval.asts = newAst_VALUE(sizeofOp(yyvsp[-1].lnk)); ;
|
||
break;}
|
||
case 39:
|
||
#line 284 "SDCC.y"
|
||
{ yyval.yyint = '&' ;;
|
||
break;}
|
||
case 40:
|
||
#line 285 "SDCC.y"
|
||
{ yyval.yyint = '*' ;;
|
||
break;}
|
||
case 41:
|
||
#line 286 "SDCC.y"
|
||
{ yyval.yyint = '+' ;;
|
||
break;}
|
||
case 42:
|
||
#line 287 "SDCC.y"
|
||
{ yyval.yyint = '-' ;;
|
||
break;}
|
||
case 43:
|
||
#line 288 "SDCC.y"
|
||
{ yyval.yyint = '~' ;;
|
||
break;}
|
||
case 44:
|
||
#line 289 "SDCC.y"
|
||
{ yyval.yyint = '!' ;;
|
||
break;}
|
||
case 46:
|
||
#line 294 "SDCC.y"
|
||
{ yyval.asts = newNode(CAST,newAst_LINK(yyvsp[-2].lnk),yyvsp[0].asts); ;
|
||
break;}
|
||
case 48:
|
||
#line 299 "SDCC.y"
|
||
{ yyval.asts = newNode('*',yyvsp[-2].asts,yyvsp[0].asts);;
|
||
break;}
|
||
case 49:
|
||
#line 300 "SDCC.y"
|
||
{ yyval.asts = newNode('/',yyvsp[-2].asts,yyvsp[0].asts);;
|
||
break;}
|
||
case 50:
|
||
#line 301 "SDCC.y"
|
||
{ yyval.asts = newNode('%',yyvsp[-2].asts,yyvsp[0].asts);;
|
||
break;}
|
||
case 52:
|
||
#line 306 "SDCC.y"
|
||
{ yyval.asts=newNode('+',yyvsp[-2].asts,yyvsp[0].asts);;
|
||
break;}
|
||
case 53:
|
||
#line 307 "SDCC.y"
|
||
{ yyval.asts=newNode('-',yyvsp[-2].asts,yyvsp[0].asts);;
|
||
break;}
|
||
case 55:
|
||
#line 312 "SDCC.y"
|
||
{ yyval.asts = newNode(LEFT_OP,yyvsp[-2].asts,yyvsp[0].asts); ;
|
||
break;}
|
||
case 56:
|
||
#line 313 "SDCC.y"
|
||
{ yyval.asts = newNode(RIGHT_OP,yyvsp[-2].asts,yyvsp[0].asts); ;
|
||
break;}
|
||
case 58:
|
||
#line 318 "SDCC.y"
|
||
{
|
||
yyval.asts = (port->lt_nge ?
|
||
newNode('!',newNode(GE_OP,yyvsp[-2].asts,yyvsp[0].asts),NULL) :
|
||
newNode('<', yyvsp[-2].asts,yyvsp[0].asts));
|
||
;
|
||
break;}
|
||
case 59:
|
||
#line 323 "SDCC.y"
|
||
{
|
||
yyval.asts = (port->gt_nle ?
|
||
newNode('!',newNode(LE_OP,yyvsp[-2].asts,yyvsp[0].asts),NULL) :
|
||
newNode('>',yyvsp[-2].asts,yyvsp[0].asts));
|
||
;
|
||
break;}
|
||
case 60:
|
||
#line 328 "SDCC.y"
|
||
{
|
||
yyval.asts = (port->le_ngt ?
|
||
newNode('!', newNode('>', yyvsp[-2].asts , yyvsp[0].asts ), NULL) :
|
||
newNode(LE_OP,yyvsp[-2].asts,yyvsp[0].asts));
|
||
;
|
||
break;}
|
||
case 61:
|
||
#line 333 "SDCC.y"
|
||
{
|
||
yyval.asts = (port->ge_nlt ?
|
||
newNode('!', newNode('<', yyvsp[-2].asts , yyvsp[0].asts ), NULL) :
|
||
newNode(GE_OP,yyvsp[-2].asts,yyvsp[0].asts));
|
||
;
|
||
break;}
|
||
case 63:
|
||
#line 342 "SDCC.y"
|
||
{
|
||
yyval.asts = (port->eq_nne ?
|
||
newNode('!',newNode(NE_OP,yyvsp[-2].asts,yyvsp[0].asts),NULL) :
|
||
newNode(EQ_OP,yyvsp[-2].asts,yyvsp[0].asts));
|
||
;
|
||
break;}
|
||
case 64:
|
||
#line 347 "SDCC.y"
|
||
{
|
||
yyval.asts = (port->ne_neq ?
|
||
newNode('!', newNode(EQ_OP,yyvsp[-2].asts,yyvsp[0].asts), NULL) :
|
||
newNode(NE_OP,yyvsp[-2].asts,yyvsp[0].asts));
|
||
;
|
||
break;}
|
||
case 66:
|
||
#line 356 "SDCC.y"
|
||
{ yyval.asts = newNode('&',yyvsp[-2].asts,yyvsp[0].asts);;
|
||
break;}
|
||
case 68:
|
||
#line 361 "SDCC.y"
|
||
{ yyval.asts = newNode('^',yyvsp[-2].asts,yyvsp[0].asts);;
|
||
break;}
|
||
case 70:
|
||
#line 366 "SDCC.y"
|
||
{ yyval.asts = newNode('|',yyvsp[-2].asts,yyvsp[0].asts);;
|
||
break;}
|
||
case 72:
|
||
#line 372 "SDCC.y"
|
||
{ yyval.asts = newNode(AND_OP,yyvsp[-2].asts,yyvsp[0].asts);;
|
||
break;}
|
||
case 74:
|
||
#line 378 "SDCC.y"
|
||
{ yyval.asts = newNode(OR_OP,yyvsp[-2].asts,yyvsp[0].asts); ;
|
||
break;}
|
||
case 76:
|
||
#line 384 "SDCC.y"
|
||
{
|
||
yyval.asts = newNode(':',yyvsp[-2].asts,yyvsp[0].asts) ;
|
||
yyval.asts = newNode('?',yyvsp[-4].asts,yyval.asts) ;
|
||
;
|
||
break;}
|
||
case 78:
|
||
#line 393 "SDCC.y"
|
||
{
|
||
|
||
switch (yyvsp[-1].yyint) {
|
||
case '=':
|
||
yyval.asts = newNode(yyvsp[-1].yyint,yyvsp[-2].asts,yyvsp[0].asts);
|
||
break;
|
||
case MUL_ASSIGN:
|
||
yyval.asts = newNode('=',yyvsp[-2].asts,newNode('*',copyAst(yyvsp[-2].asts),yyvsp[0].asts));
|
||
break;
|
||
case DIV_ASSIGN:
|
||
yyval.asts = newNode('=',yyvsp[-2].asts,newNode('/',copyAst(yyvsp[-2].asts),yyvsp[0].asts));
|
||
break;
|
||
case MOD_ASSIGN:
|
||
yyval.asts = newNode('=',yyvsp[-2].asts,newNode('%',copyAst(yyvsp[-2].asts),yyvsp[0].asts));
|
||
break;
|
||
case ADD_ASSIGN:
|
||
yyval.asts = newNode('=',yyvsp[-2].asts,newNode('+',copyAst(yyvsp[-2].asts),yyvsp[0].asts));
|
||
break;
|
||
case SUB_ASSIGN:
|
||
yyval.asts = newNode('=',yyvsp[-2].asts,newNode('-',copyAst(yyvsp[-2].asts),yyvsp[0].asts));
|
||
break;
|
||
case LEFT_ASSIGN:
|
||
yyval.asts = newNode('=',yyvsp[-2].asts,newNode(LEFT_OP,copyAst(yyvsp[-2].asts),yyvsp[0].asts));
|
||
break;
|
||
case RIGHT_ASSIGN:
|
||
yyval.asts = newNode('=',yyvsp[-2].asts,newNode(RIGHT_OP,copyAst(yyvsp[-2].asts),yyvsp[0].asts));
|
||
break;
|
||
case AND_ASSIGN:
|
||
yyval.asts = newNode('=',yyvsp[-2].asts,newNode('&',copyAst(yyvsp[-2].asts),yyvsp[0].asts));
|
||
break;
|
||
case XOR_ASSIGN:
|
||
yyval.asts = newNode('=',yyvsp[-2].asts,newNode('^',copyAst(yyvsp[-2].asts),yyvsp[0].asts));
|
||
break;
|
||
case OR_ASSIGN:
|
||
yyval.asts = newNode('=',yyvsp[-2].asts,newNode('|',copyAst(yyvsp[-2].asts),yyvsp[0].asts));
|
||
break;
|
||
default :
|
||
yyval.asts = NULL;
|
||
}
|
||
|
||
;
|
||
break;}
|
||
case 79:
|
||
#line 437 "SDCC.y"
|
||
{ yyval.yyint = '=' ;;
|
||
break;}
|
||
case 91:
|
||
#line 452 "SDCC.y"
|
||
{ yyval.asts = newNode(',',yyvsp[-2].asts,yyvsp[0].asts);;
|
||
break;}
|
||
case 93:
|
||
#line 460 "SDCC.y"
|
||
{ yyval.sym = NULL ; ;
|
||
break;}
|
||
case 94:
|
||
#line 462 "SDCC.y"
|
||
{
|
||
/* add the specifier list to the id */
|
||
symbol *sym , *sym1;
|
||
|
||
for (sym1 = sym = reverseSyms(yyvsp[-1].sym);sym != NULL;sym = sym->next) {
|
||
sym_link *lnk = copyLinkChain(yyvsp[-2].lnk);
|
||
/* do the pointer stuff */
|
||
pointerTypes(sym->type,lnk);
|
||
addDecl (sym,0,lnk) ;
|
||
}
|
||
|
||
yyval.sym = sym1 ;
|
||
;
|
||
break;}
|
||
case 95:
|
||
#line 478 "SDCC.y"
|
||
{ yyval.lnk = yyvsp[0].lnk; ;
|
||
break;}
|
||
case 96:
|
||
#line 479 "SDCC.y"
|
||
{
|
||
/* if the decl $2 is not a specifier */
|
||
/* find the spec and replace it */
|
||
if ( !IS_SPEC(yyvsp[0].lnk)) {
|
||
sym_link *lnk = yyvsp[0].lnk ;
|
||
while (lnk && !IS_SPEC(lnk->next))
|
||
lnk = lnk->next;
|
||
lnk->next = mergeSpec(yyvsp[-1].lnk,lnk->next, yytext);
|
||
yyval.lnk = yyvsp[0].lnk ;
|
||
}
|
||
else
|
||
yyval.lnk = mergeSpec(yyvsp[-1].lnk,yyvsp[0].lnk, yytext);
|
||
;
|
||
break;}
|
||
case 97:
|
||
#line 492 "SDCC.y"
|
||
{ yyval.lnk = yyvsp[0].lnk; ;
|
||
break;}
|
||
case 98:
|
||
#line 493 "SDCC.y"
|
||
{
|
||
/* if the decl $2 is not a specifier */
|
||
/* find the spec and replace it */
|
||
if ( !IS_SPEC(yyvsp[0].lnk)) {
|
||
sym_link *lnk = yyvsp[0].lnk ;
|
||
while (lnk && !IS_SPEC(lnk->next))
|
||
lnk = lnk->next;
|
||
lnk->next = mergeSpec(yyvsp[-1].lnk,lnk->next, yytext);
|
||
yyval.lnk = yyvsp[0].lnk ;
|
||
}
|
||
else
|
||
yyval.lnk = mergeSpec(yyvsp[-1].lnk,yyvsp[0].lnk, yytext);
|
||
;
|
||
break;}
|
||
case 100:
|
||
#line 510 "SDCC.y"
|
||
{ yyvsp[0].sym->next = yyvsp[-2].sym ; yyval.sym = yyvsp[0].sym;;
|
||
break;}
|
||
case 101:
|
||
#line 514 "SDCC.y"
|
||
{ yyvsp[0].sym->ival = NULL ; ;
|
||
break;}
|
||
case 102:
|
||
#line 515 "SDCC.y"
|
||
{ yyvsp[-2].sym->ival = yyvsp[0].ilist ; ;
|
||
break;}
|
||
case 103:
|
||
#line 520 "SDCC.y"
|
||
{
|
||
yyval.lnk = newLink () ;
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_TYPEDEF(yyval.lnk) = 1 ;
|
||
;
|
||
break;}
|
||
case 104:
|
||
#line 525 "SDCC.y"
|
||
{
|
||
yyval.lnk = newLink();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_EXTR(yyval.lnk) = 1 ;
|
||
;
|
||
break;}
|
||
case 105:
|
||
#line 530 "SDCC.y"
|
||
{
|
||
yyval.lnk = newLink ();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_STAT(yyval.lnk) = 1 ;
|
||
;
|
||
break;}
|
||
case 106:
|
||
#line 535 "SDCC.y"
|
||
{
|
||
yyval.lnk = newLink () ;
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_SCLS(yyval.lnk) = S_AUTO ;
|
||
;
|
||
break;}
|
||
case 107:
|
||
#line 540 "SDCC.y"
|
||
{
|
||
yyval.lnk = newLink ();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_SCLS(yyval.lnk) = S_REGISTER ;
|
||
;
|
||
break;}
|
||
case 108:
|
||
#line 548 "SDCC.y"
|
||
{ yyval.yyint = (int) floatFromVal(yyvsp[0].val) ; ;
|
||
break;}
|
||
case 110:
|
||
#line 554 "SDCC.y"
|
||
{
|
||
/* add this to the storage class specifier */
|
||
SPEC_ABSA(yyvsp[-2].lnk) = 1; /* set the absolute addr flag */
|
||
/* now get the abs addr from value */
|
||
SPEC_ADDR(yyvsp[-2].lnk) = (int) floatFromVal(constExprValue(yyvsp[0].asts,TRUE)) ;
|
||
;
|
||
break;}
|
||
case 111:
|
||
#line 563 "SDCC.y"
|
||
{
|
||
yyval.lnk=newLink();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_NOUN(yyval.lnk) = V_CHAR ;
|
||
;
|
||
break;}
|
||
case 112:
|
||
#line 568 "SDCC.y"
|
||
{
|
||
yyval.lnk=newLink();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
yyval.lnk->select.s._short = 1 ;
|
||
;
|
||
break;}
|
||
case 113:
|
||
#line 573 "SDCC.y"
|
||
{
|
||
yyval.lnk=newLink();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_NOUN(yyval.lnk) = V_INT ;
|
||
;
|
||
break;}
|
||
case 114:
|
||
#line 578 "SDCC.y"
|
||
{
|
||
yyval.lnk=newLink();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_LONG(yyval.lnk) = 1 ;
|
||
;
|
||
break;}
|
||
case 115:
|
||
#line 583 "SDCC.y"
|
||
{
|
||
yyval.lnk=newLink();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
yyval.lnk->select.s._signed = 1;
|
||
;
|
||
break;}
|
||
case 116:
|
||
#line 588 "SDCC.y"
|
||
{
|
||
yyval.lnk=newLink();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_USIGN(yyval.lnk) = 1 ;
|
||
;
|
||
break;}
|
||
case 117:
|
||
#line 593 "SDCC.y"
|
||
{
|
||
yyval.lnk=newLink();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_NOUN(yyval.lnk) = V_VOID ;
|
||
;
|
||
break;}
|
||
case 118:
|
||
#line 598 "SDCC.y"
|
||
{
|
||
yyval.lnk=newLink();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_CONST(yyval.lnk) = 1;
|
||
;
|
||
break;}
|
||
case 119:
|
||
#line 603 "SDCC.y"
|
||
{
|
||
yyval.lnk=newLink();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_VOLATILE(yyval.lnk) = 1 ;
|
||
;
|
||
break;}
|
||
case 120:
|
||
#line 608 "SDCC.y"
|
||
{
|
||
yyval.lnk=newLink();
|
||
SPEC_NOUN(yyval.lnk) = V_FLOAT;
|
||
yyval.lnk->class = SPECIFIER ;
|
||
;
|
||
break;}
|
||
case 121:
|
||
#line 613 "SDCC.y"
|
||
{
|
||
yyval.lnk = newLink ();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_SCLS(yyval.lnk) = S_XDATA ;
|
||
;
|
||
break;}
|
||
case 122:
|
||
#line 618 "SDCC.y"
|
||
{
|
||
yyval.lnk = newLink () ;
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_SCLS(yyval.lnk) = S_CODE ;
|
||
;
|
||
break;}
|
||
case 123:
|
||
#line 623 "SDCC.y"
|
||
{
|
||
yyval.lnk = newLink () ;
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_SCLS(yyval.lnk) = S_EEPROM ;
|
||
;
|
||
break;}
|
||
case 124:
|
||
#line 628 "SDCC.y"
|
||
{
|
||
yyval.lnk = newLink ();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_SCLS(yyval.lnk) = S_DATA ;
|
||
;
|
||
break;}
|
||
case 125:
|
||
#line 633 "SDCC.y"
|
||
{
|
||
yyval.lnk = newLink ();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_SCLS(yyval.lnk) = S_IDATA ;
|
||
;
|
||
break;}
|
||
case 126:
|
||
#line 638 "SDCC.y"
|
||
{
|
||
yyval.lnk = newLink ();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_SCLS(yyval.lnk) = S_PDATA ;
|
||
;
|
||
break;}
|
||
case 127:
|
||
#line 643 "SDCC.y"
|
||
{
|
||
yyval.lnk=newLink();
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_NOUN(yyval.lnk) = V_BIT ;
|
||
SPEC_SCLS(yyval.lnk) = S_BIT ;
|
||
SPEC_BLEN(yyval.lnk) = 1;
|
||
SPEC_BSTR(yyval.lnk) = 0;
|
||
;
|
||
break;}
|
||
case 129:
|
||
#line 653 "SDCC.y"
|
||
{
|
||
cenum = NULL ;
|
||
yyval.lnk = yyvsp[0].lnk ;
|
||
;
|
||
break;}
|
||
case 130:
|
||
#line 658 "SDCC.y"
|
||
{
|
||
symbol *sym;
|
||
sym_link *p ;
|
||
sym = findSym(TypedefTab,NULL,yyvsp[0].yychar) ;
|
||
yyval.lnk = p = copyLinkChain(sym->type);
|
||
SPEC_TYPEDEF(getSpec(p)) = 0;
|
||
;
|
||
break;}
|
||
case 132:
|
||
#line 669 "SDCC.y"
|
||
{
|
||
yyval.lnk = newLink() ;
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_NOUN(yyval.lnk) = V_SBIT;
|
||
SPEC_SCLS(yyval.lnk) = S_SBIT;
|
||
;
|
||
break;}
|
||
case 133:
|
||
#line 675 "SDCC.y"
|
||
{
|
||
yyval.lnk = newLink() ;
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_NOUN(yyval.lnk) = V_CHAR;
|
||
SPEC_SCLS(yyval.lnk) = S_SFR ;
|
||
SPEC_USIGN(yyval.lnk) = 1 ;
|
||
;
|
||
break;}
|
||
case 134:
|
||
#line 686 "SDCC.y"
|
||
{
|
||
structdef *sdef ;
|
||
|
||
/* Create a structdef */
|
||
sdef = yyvsp[-3].sdef ;
|
||
sdef->fields = reverseSyms(yyvsp[-1].sym) ; /* link the fields */
|
||
sdef->size = compStructSize(yyvsp[-4].yyint,sdef); /* update size of */
|
||
|
||
/* Create the specifier */
|
||
yyval.lnk = newLink () ;
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_NOUN(yyval.lnk) = V_STRUCT;
|
||
SPEC_STRUCT(yyval.lnk)= sdef ;
|
||
;
|
||
break;}
|
||
case 135:
|
||
#line 701 "SDCC.y"
|
||
{
|
||
yyval.lnk = newLink() ;
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_NOUN(yyval.lnk) = V_STRUCT;
|
||
SPEC_STRUCT(yyval.lnk) = yyvsp[0].sdef ;
|
||
;
|
||
break;}
|
||
case 136:
|
||
#line 710 "SDCC.y"
|
||
{ yyval.yyint = STRUCT ; ;
|
||
break;}
|
||
case 137:
|
||
#line 711 "SDCC.y"
|
||
{ yyval.yyint = UNION ; ;
|
||
break;}
|
||
case 139:
|
||
#line 716 "SDCC.y"
|
||
{ /* synthesize a name add to structtable */
|
||
yyval.sdef = newStruct(genSymName(NestLevel)) ;
|
||
yyval.sdef->level = NestLevel ;
|
||
addSym (StructTab, yyval.sdef, yyval.sdef->tag,yyval.sdef->level,currBlockno, 0);
|
||
;
|
||
break;}
|
||
case 140:
|
||
#line 723 "SDCC.y"
|
||
{ /* add name to structure table */
|
||
yyval.sdef = findSymWithBlock (StructTab,yyvsp[0].sym,currBlockno);
|
||
if (! yyval.sdef ) {
|
||
yyval.sdef = newStruct(yyvsp[0].sym->name) ;
|
||
yyval.sdef->level = NestLevel ;
|
||
addSym (StructTab, yyval.sdef, yyval.sdef->tag,yyval.sdef->level,currBlockno,0);
|
||
}
|
||
;
|
||
break;}
|
||
case 142:
|
||
#line 736 "SDCC.y"
|
||
{
|
||
symbol *sym = yyvsp[0].sym;
|
||
/* go to the end of the chain */
|
||
while (sym->next) sym = sym->next;
|
||
|
||
sym->next = yyvsp[-1].sym ;
|
||
yyval.sym = yyvsp[0].sym;
|
||
;
|
||
break;}
|
||
case 143:
|
||
#line 748 "SDCC.y"
|
||
{
|
||
/* add this type to all the symbols */
|
||
symbol *sym ;
|
||
for ( sym = yyvsp[-1].sym ; sym != NULL ; sym = sym->next ) {
|
||
|
||
/* make the symbol one level up */
|
||
sym->level-- ;
|
||
|
||
pointerTypes(sym->type,copyLinkChain(yyvsp[-2].lnk));
|
||
if (!sym->type) {
|
||
sym->type = copyLinkChain(yyvsp[-2].lnk);
|
||
sym->etype = getSpec(sym->type);
|
||
}
|
||
else
|
||
addDecl (sym,0,cloneSpec(yyvsp[-2].lnk));
|
||
/* make sure the type is complete and sane */
|
||
checkTypeSanity(sym->etype, sym->name);
|
||
}
|
||
yyval.sym = yyvsp[-1].sym;
|
||
;
|
||
break;}
|
||
case 145:
|
||
#line 773 "SDCC.y"
|
||
{
|
||
yyvsp[0].sym->next = yyvsp[-2].sym ;
|
||
yyval.sym = yyvsp[0].sym ;
|
||
;
|
||
break;}
|
||
case 147:
|
||
#line 781 "SDCC.y"
|
||
{
|
||
yyval.sym = newSymbol (genSymName(NestLevel),NestLevel) ;
|
||
yyval.sym->bitVar = (int) floatFromVal(constExprValue(yyvsp[0].asts,TRUE));
|
||
;
|
||
break;}
|
||
case 148:
|
||
#line 786 "SDCC.y"
|
||
{
|
||
yyvsp[-2].sym->bitVar = (int) floatFromVal(constExprValue(yyvsp[0].asts,TRUE));
|
||
;
|
||
break;}
|
||
case 149:
|
||
#line 792 "SDCC.y"
|
||
{
|
||
addSymChain (yyvsp[-1].sym);
|
||
allocVariables(reverseSyms(yyvsp[-1].sym)) ;
|
||
yyval.lnk = copyLinkChain(cenum->type);
|
||
;
|
||
break;}
|
||
case 150:
|
||
#line 797 "SDCC.y"
|
||
{
|
||
symbol *csym ;
|
||
|
||
yyvsp[-3].sym->type = copyLinkChain(cenum->type);
|
||
yyvsp[-3].sym->etype = getSpec(yyvsp[-3].sym->type);
|
||
/* add this to the enumerator table */
|
||
if (!(csym=findSym(enumTab,yyvsp[-3].sym,yyvsp[-3].sym->name)) &&
|
||
(csym && csym->level == yyvsp[-3].sym->level))
|
||
werror(E_DUPLICATE_TYPEDEF,csym->name);
|
||
|
||
addSym ( enumTab,yyvsp[-3].sym,yyvsp[-3].sym->name,yyvsp[-3].sym->level,yyvsp[-3].sym->block, 0);
|
||
addSymChain (yyvsp[-1].sym);
|
||
allocVariables (reverseSyms(yyvsp[-1].sym));
|
||
yyval.lnk = copyLinkChain(cenum->type);
|
||
SPEC_SCLS(getSpec(yyval.lnk)) = 0 ;
|
||
;
|
||
break;}
|
||
case 151:
|
||
#line 813 "SDCC.y"
|
||
{
|
||
symbol *csym ;
|
||
|
||
/* check the enumerator table */
|
||
if ((csym = findSym(enumTab,yyvsp[0].sym,yyvsp[0].sym->name)))
|
||
yyval.lnk = copyLinkChain(csym->type);
|
||
else {
|
||
yyval.lnk = newLink() ;
|
||
yyval.lnk->class = SPECIFIER ;
|
||
SPEC_NOUN(yyval.lnk) = V_INT ;
|
||
}
|
||
|
||
SPEC_SCLS(getSpec(yyval.lnk)) = 0 ;
|
||
;
|
||
break;}
|
||
case 153:
|
||
#line 831 "SDCC.y"
|
||
{
|
||
;
|
||
break;}
|
||
case 154:
|
||
#line 833 "SDCC.y"
|
||
{
|
||
yyvsp[0].sym->next = yyvsp[-2].sym ;
|
||
yyval.sym = yyvsp[0].sym ;
|
||
;
|
||
break;}
|
||
case 155:
|
||
#line 840 "SDCC.y"
|
||
{
|
||
/* make the symbol one level up */
|
||
yyvsp[-1].sym->level-- ;
|
||
yyvsp[-1].sym->type = copyLinkChain(yyvsp[0].val->type);
|
||
yyvsp[-1].sym->etype= getSpec(yyvsp[-1].sym->type);
|
||
SPEC_ENUM(yyvsp[-1].sym->etype) = 1;
|
||
yyval.sym = yyvsp[-1].sym ;
|
||
|
||
;
|
||
break;}
|
||
case 156:
|
||
#line 852 "SDCC.y"
|
||
{
|
||
value *val ;
|
||
|
||
val = constExprValue(yyvsp[0].asts,TRUE);
|
||
yyval.val = cenum = val ;
|
||
;
|
||
break;}
|
||
case 157:
|
||
#line 858 "SDCC.y"
|
||
{
|
||
if (cenum) {
|
||
sprintf(lbuff,"%d",(int) floatFromVal(cenum)+1);
|
||
yyval.val = cenum = constVal(lbuff);
|
||
}
|
||
else {
|
||
sprintf(lbuff,"%d",0);
|
||
yyval.val = cenum = constVal(lbuff);
|
||
}
|
||
;
|
||
break;}
|
||
case 158:
|
||
#line 871 "SDCC.y"
|
||
{ yyval.sym = yyvsp[0].sym; ;
|
||
break;}
|
||
case 159:
|
||
#line 873 "SDCC.y"
|
||
{
|
||
addDecl (yyvsp[0].sym,0,reverseLink(yyvsp[-1].lnk));
|
||
yyval.sym = yyvsp[0].sym ;
|
||
;
|
||
break;}
|
||
case 160:
|
||
#line 880 "SDCC.y"
|
||
{ yyval.sym = yyvsp[0].sym ; ;
|
||
break;}
|
||
case 161:
|
||
#line 881 "SDCC.y"
|
||
{
|
||
// copy the functionAttributes (not the args and hasVargs !!)
|
||
sym_link *funcType=yyvsp[-1].sym->etype;
|
||
struct value *args=FUNC_ARGS(funcType);
|
||
unsigned hasVargs=FUNC_HASVARARGS(funcType);
|
||
|
||
memcpy (&funcType->funcAttrs, &yyvsp[0].lnk->funcAttrs,
|
||
sizeof(yyvsp[0].lnk->funcAttrs));
|
||
|
||
FUNC_ARGS(funcType)=args;
|
||
FUNC_HASVARARGS(funcType)=hasVargs;
|
||
|
||
// just to be sure
|
||
memset (&yyvsp[0].lnk->funcAttrs, 0,
|
||
sizeof(yyvsp[0].lnk->funcAttrs));
|
||
|
||
addDecl (yyvsp[-1].sym,0,yyvsp[0].lnk);
|
||
;
|
||
break;}
|
||
case 163:
|
||
#line 903 "SDCC.y"
|
||
{ yyval.sym = yyvsp[-1].sym; ;
|
||
break;}
|
||
case 164:
|
||
#line 905 "SDCC.y"
|
||
{
|
||
sym_link *p;
|
||
|
||
p = newLink ();
|
||
DCL_TYPE(p) = ARRAY ;
|
||
DCL_ELEM(p) = 0 ;
|
||
addDecl(yyvsp[-2].sym,0,p);
|
||
;
|
||
break;}
|
||
case 165:
|
||
#line 914 "SDCC.y"
|
||
{
|
||
sym_link *p ;
|
||
value *tval;
|
||
|
||
p = (tval = constExprValue(yyvsp[-1].asts,TRUE))->etype;
|
||
/* if it is not a constant then Error */
|
||
if ( SPEC_SCLS(p) != S_LITERAL)
|
||
werror(E_CONST_EXPECTED) ;
|
||
else {
|
||
p = newLink ();
|
||
DCL_TYPE(p) = ARRAY ;
|
||
DCL_ELEM(p) = (int) floatFromVal(tval) ;
|
||
addDecl(yyvsp[-3].sym,0,p);
|
||
}
|
||
;
|
||
break;}
|
||
case 166:
|
||
#line 929 "SDCC.y"
|
||
{ addDecl (yyvsp[-2].sym,FUNCTION,NULL) ; ;
|
||
break;}
|
||
case 167:
|
||
#line 930 "SDCC.y"
|
||
{ NestLevel++ ; currBlockno++; ;
|
||
break;}
|
||
case 168:
|
||
#line 931 "SDCC.y"
|
||
{
|
||
|
||
addDecl (yyvsp[-4].sym,FUNCTION,NULL) ;
|
||
|
||
FUNC_HASVARARGS(yyvsp[-4].sym->type) = IS_VARG(yyvsp[-1].val);
|
||
FUNC_ARGS(yyvsp[-4].sym->type) = reverseVal(yyvsp[-1].val);
|
||
|
||
/* nest level was incremented to take care of the parms */
|
||
NestLevel-- ;
|
||
currBlockno--;
|
||
|
||
// if this was a pointer (to a function)
|
||
if (IS_PTR(yyvsp[-4].sym->type)) {
|
||
// move the args and hasVargs to the function
|
||
FUNC_ARGS(yyvsp[-4].sym->etype)=FUNC_ARGS(yyvsp[-4].sym->type);
|
||
FUNC_HASVARARGS(yyvsp[-4].sym->etype)=FUNC_HASVARARGS(yyvsp[-4].sym->type);
|
||
memset (&yyvsp[-4].sym->type->funcAttrs, 0,
|
||
sizeof(yyvsp[-4].sym->type->funcAttrs));
|
||
// remove the symbol args (if any)
|
||
cleanUpLevel(SymbolTab,NestLevel+1);
|
||
}
|
||
|
||
yyval.sym = yyvsp[-4].sym;
|
||
;
|
||
break;}
|
||
case 169:
|
||
#line 956 "SDCC.y"
|
||
{
|
||
werror(E_OLD_STYLE,yyvsp[-3].sym->name) ;
|
||
|
||
/* assume it returns an int */
|
||
yyvsp[-3].sym->type = yyvsp[-3].sym->etype = newIntLink();
|
||
yyval.sym = yyvsp[-3].sym ;
|
||
;
|
||
break;}
|
||
case 170:
|
||
#line 966 "SDCC.y"
|
||
{ yyval.lnk = yyvsp[0].lnk ;;
|
||
break;}
|
||
case 171:
|
||
#line 968 "SDCC.y"
|
||
{
|
||
yyval.lnk = yyvsp[-1].lnk ;
|
||
DCL_TSPEC(yyvsp[-1].lnk) = yyvsp[0].lnk;
|
||
;
|
||
break;}
|
||
case 172:
|
||
#line 973 "SDCC.y"
|
||
{
|
||
yyval.lnk = yyvsp[-1].lnk ;
|
||
yyval.lnk->next = yyvsp[0].lnk ;
|
||
DCL_TYPE(yyvsp[0].lnk)=GPOINTER;
|
||
;
|
||
break;}
|
||
case 173:
|
||
#line 979 "SDCC.y"
|
||
{
|
||
yyval.lnk = yyvsp[-2].lnk ;
|
||
if (IS_SPEC(yyvsp[-1].lnk) && DCL_TYPE(yyvsp[0].lnk) == UPOINTER) {
|
||
DCL_PTR_CONST(yyvsp[-2].lnk) = SPEC_CONST(yyvsp[-1].lnk);
|
||
DCL_PTR_VOLATILE(yyvsp[-2].lnk) = SPEC_VOLATILE(yyvsp[-1].lnk);
|
||
switch (SPEC_SCLS(yyvsp[-1].lnk)) {
|
||
case S_XDATA:
|
||
DCL_TYPE(yyvsp[0].lnk) = FPOINTER;
|
||
break;
|
||
case S_IDATA:
|
||
DCL_TYPE(yyvsp[0].lnk) = IPOINTER ;
|
||
break;
|
||
case S_PDATA:
|
||
DCL_TYPE(yyvsp[0].lnk) = PPOINTER ;
|
||
break;
|
||
case S_DATA:
|
||
DCL_TYPE(yyvsp[0].lnk) = POINTER ;
|
||
break;
|
||
case S_CODE:
|
||
DCL_PTR_CONST(yyvsp[0].lnk) = 1;
|
||
DCL_TYPE(yyvsp[0].lnk) = CPOINTER ;
|
||
break;
|
||
case S_EEPROM:
|
||
DCL_TYPE(yyvsp[0].lnk) = EEPPOINTER;
|
||
break;
|
||
default:
|
||
// this could be just "constant"
|
||
// werror(W_PTR_TYPE_INVALID);
|
||
}
|
||
}
|
||
else
|
||
werror (W_PTR_TYPE_INVALID);
|
||
yyval.lnk->next = yyvsp[0].lnk ;
|
||
;
|
||
break;}
|
||
case 174:
|
||
#line 1017 "SDCC.y"
|
||
{
|
||
yyval.lnk = newLink();
|
||
DCL_TYPE(yyval.lnk)=UPOINTER;
|
||
;
|
||
break;}
|
||
case 176:
|
||
#line 1026 "SDCC.y"
|
||
{
|
||
/* if the decl $2 is not a specifier */
|
||
/* find the spec and replace it */
|
||
if ( !IS_SPEC(yyvsp[0].lnk)) {
|
||
sym_link *lnk = yyvsp[0].lnk ;
|
||
while (lnk && !IS_SPEC(lnk->next))
|
||
lnk = lnk->next;
|
||
lnk->next = mergeSpec(yyvsp[-1].lnk,lnk->next, "type_specifier_list");
|
||
yyval.lnk = yyvsp[0].lnk ;
|
||
}
|
||
else
|
||
yyval.lnk = mergeSpec(yyvsp[-1].lnk,yyvsp[0].lnk, "type_specifier_list");
|
||
;
|
||
break;}
|
||
case 180:
|
||
#line 1049 "SDCC.y"
|
||
{
|
||
yyvsp[0].sym->next = yyvsp[-2].sym;
|
||
yyval.sym = yyvsp[0].sym ;
|
||
;
|
||
break;}
|
||
case 182:
|
||
#line 1057 "SDCC.y"
|
||
{ yyvsp[-2].val->vArgs = 1;;
|
||
break;}
|
||
case 184:
|
||
#line 1063 "SDCC.y"
|
||
{
|
||
yyvsp[0].val->next = yyvsp[-2].val ;
|
||
yyval.val = yyvsp[0].val ;
|
||
;
|
||
break;}
|
||
case 185:
|
||
#line 1071 "SDCC.y"
|
||
{
|
||
symbol *loop ;
|
||
pointerTypes(yyvsp[0].sym->type,yyvsp[-1].lnk);
|
||
addDecl (yyvsp[0].sym,0,yyvsp[-1].lnk);
|
||
for (loop=yyvsp[0].sym;loop;loop->_isparm=1,loop=loop->next);
|
||
addSymChain (yyvsp[0].sym);
|
||
yyval.val = symbolVal(yyvsp[0].sym);
|
||
;
|
||
break;}
|
||
case 186:
|
||
#line 1079 "SDCC.y"
|
||
{
|
||
yyval.val = newValue() ;
|
||
yyval.val->type = yyvsp[0].lnk;
|
||
yyval.val->etype = getSpec(yyval.val->type);
|
||
;
|
||
break;}
|
||
case 187:
|
||
#line 1087 "SDCC.y"
|
||
{ yyval.lnk = yyvsp[0].lnk ;;
|
||
break;}
|
||
case 188:
|
||
#line 1089 "SDCC.y"
|
||
{
|
||
/* go to the end of the list */
|
||
sym_link *p;
|
||
pointerTypes(yyvsp[0].lnk,yyvsp[-1].lnk);
|
||
for ( p = yyvsp[0].lnk ; p->next ; p=p->next);
|
||
p->next = yyvsp[-1].lnk ;
|
||
yyval.lnk = yyvsp[0].lnk ;
|
||
;
|
||
break;}
|
||
case 189:
|
||
#line 1100 "SDCC.y"
|
||
{ yyval.lnk = reverseLink(yyvsp[0].lnk); ;
|
||
break;}
|
||
case 191:
|
||
#line 1102 "SDCC.y"
|
||
{ yyvsp[-1].lnk = reverseLink(yyvsp[-1].lnk); yyvsp[-1].lnk->next = yyvsp[0].lnk ; yyval.lnk = yyvsp[-1].lnk;;
|
||
break;}
|
||
case 192:
|
||
#line 1106 "SDCC.y"
|
||
{ yyval.lnk = yyvsp[-1].lnk ; ;
|
||
break;}
|
||
case 193:
|
||
#line 1107 "SDCC.y"
|
||
{
|
||
yyval.lnk = newLink ();
|
||
DCL_TYPE(yyval.lnk) = ARRAY ;
|
||
DCL_ELEM(yyval.lnk) = 0 ;
|
||
;
|
||
break;}
|
||
case 194:
|
||
#line 1112 "SDCC.y"
|
||
{
|
||
value *val ;
|
||
yyval.lnk = newLink ();
|
||
DCL_TYPE(yyval.lnk) = ARRAY ;
|
||
DCL_ELEM(yyval.lnk) = (int) floatFromVal(val = constExprValue(yyvsp[-1].asts,TRUE));
|
||
;
|
||
break;}
|
||
case 195:
|
||
#line 1118 "SDCC.y"
|
||
{
|
||
yyval.lnk = newLink ();
|
||
DCL_TYPE(yyval.lnk) = ARRAY ;
|
||
DCL_ELEM(yyval.lnk) = 0 ;
|
||
yyval.lnk->next = yyvsp[-2].lnk ;
|
||
;
|
||
break;}
|
||
case 196:
|
||
#line 1125 "SDCC.y"
|
||
{
|
||
value *val ;
|
||
yyval.lnk = newLink ();
|
||
DCL_TYPE(yyval.lnk) = ARRAY ;
|
||
DCL_ELEM(yyval.lnk) = (int) floatFromVal(val = constExprValue(yyvsp[-1].asts,TRUE));
|
||
yyval.lnk->next = yyvsp[-3].lnk ;
|
||
;
|
||
break;}
|
||
case 197:
|
||
#line 1132 "SDCC.y"
|
||
{ yyval.lnk = NULL;;
|
||
break;}
|
||
case 198:
|
||
#line 1133 "SDCC.y"
|
||
{ yyval.lnk = NULL;;
|
||
break;}
|
||
case 199:
|
||
#line 1134 "SDCC.y"
|
||
{
|
||
// $1 must be a pointer to a function
|
||
sym_link *p=newLink();
|
||
DCL_TYPE(p) = FUNCTION;
|
||
yyvsp[-2].lnk->next=p;
|
||
;
|
||
break;}
|
||
case 200:
|
||
#line 1140 "SDCC.y"
|
||
{
|
||
if (!IS_VOID(yyvsp[-1].val->type)) {
|
||
// this is nonsense, so let's just burp something
|
||
werror(E_TOO_FEW_PARMS);
|
||
} else {
|
||
// $1 must be a pointer to a function
|
||
sym_link *p=newLink();
|
||
DCL_TYPE(p) = FUNCTION;
|
||
yyvsp[-3].lnk->next=p;
|
||
}
|
||
;
|
||
break;}
|
||
case 201:
|
||
#line 1153 "SDCC.y"
|
||
{ yyval.ilist = newiList(INIT_NODE,yyvsp[0].asts); ;
|
||
break;}
|
||
case 202:
|
||
#line 1154 "SDCC.y"
|
||
{ yyval.ilist = newiList(INIT_DEEP,revinit(yyvsp[-1].ilist)); ;
|
||
break;}
|
||
case 203:
|
||
#line 1155 "SDCC.y"
|
||
{ yyval.ilist = newiList(INIT_DEEP,revinit(yyvsp[-2].ilist)); ;
|
||
break;}
|
||
case 205:
|
||
#line 1160 "SDCC.y"
|
||
{ yyvsp[0].ilist->next = yyvsp[-2].ilist; yyval.ilist = yyvsp[0].ilist; ;
|
||
break;}
|
||
case 212:
|
||
#line 1170 "SDCC.y"
|
||
{
|
||
ast *ex = newNode(INLINEASM,NULL,NULL);
|
||
ex->values.inlineasm = malloc(strlen(yyvsp[-1].yyinline)+1);
|
||
strcpy(ex->values.inlineasm,yyvsp[-1].yyinline);
|
||
yyval.asts = ex;
|
||
;
|
||
break;}
|
||
case 213:
|
||
#line 1180 "SDCC.y"
|
||
{ yyval.asts = createLabel(yyvsp[-1].sym,NULL); ;
|
||
break;}
|
||
case 214:
|
||
#line 1181 "SDCC.y"
|
||
{ yyval.asts = createCase(STACK_PEEK(swStk),yyvsp[-2].asts,yyvsp[0].asts); ;
|
||
break;}
|
||
case 215:
|
||
#line 1182 "SDCC.y"
|
||
{ yyval.asts = createDefault(STACK_PEEK(swStk),yyvsp[0].asts); ;
|
||
break;}
|
||
case 216:
|
||
#line 1185 "SDCC.y"
|
||
{ STACK_PUSH(blockNum,currBlockno); currBlockno = ++blockNo ; ;
|
||
break;}
|
||
case 217:
|
||
#line 1188 "SDCC.y"
|
||
{ currBlockno = STACK_POP(blockNum); ;
|
||
break;}
|
||
case 218:
|
||
#line 1192 "SDCC.y"
|
||
{ yyval.asts = createBlock(NULL,NULL); ;
|
||
break;}
|
||
case 219:
|
||
#line 1193 "SDCC.y"
|
||
{ yyval.asts = createBlock(NULL,yyvsp[-1].asts) ; ;
|
||
break;}
|
||
case 220:
|
||
#line 1195 "SDCC.y"
|
||
{ addSymChain(yyvsp[0].sym); ;
|
||
break;}
|
||
case 221:
|
||
#line 1196 "SDCC.y"
|
||
{ yyval.asts = createBlock(yyvsp[-2].sym,NULL) ; ;
|
||
break;}
|
||
case 222:
|
||
#line 1198 "SDCC.y"
|
||
{ addSymChain (yyvsp[0].sym); ;
|
||
break;}
|
||
case 223:
|
||
#line 1200 "SDCC.y"
|
||
{yyval.asts = createBlock(yyvsp[-3].sym,yyvsp[-1].asts) ; ;
|
||
break;}
|
||
case 224:
|
||
#line 1201 "SDCC.y"
|
||
{ yyval.asts = NULL ; ;
|
||
break;}
|
||
case 225:
|
||
#line 1206 "SDCC.y"
|
||
{
|
||
/* if this is typedef declare it immediately */
|
||
if ( yyvsp[0].sym && IS_TYPEDEF(yyvsp[0].sym->etype)) {
|
||
allocVariables (yyvsp[0].sym);
|
||
yyval.sym = NULL ;
|
||
}
|
||
else
|
||
yyval.sym = yyvsp[0].sym ;
|
||
;
|
||
break;}
|
||
case 226:
|
||
#line 1217 "SDCC.y"
|
||
{
|
||
symbol *sym;
|
||
|
||
/* if this is a typedef */
|
||
if (yyvsp[0].sym && IS_TYPEDEF(yyvsp[0].sym->etype)) {
|
||
allocVariables (yyvsp[0].sym);
|
||
yyval.sym = yyvsp[-1].sym ;
|
||
}
|
||
else {
|
||
/* get to the end of the previous decl */
|
||
if ( yyvsp[-1].sym ) {
|
||
yyval.sym = sym = yyvsp[-1].sym ;
|
||
while (sym->next)
|
||
sym = sym->next ;
|
||
sym->next = yyvsp[0].sym;
|
||
}
|
||
else
|
||
yyval.sym = yyvsp[0].sym ;
|
||
}
|
||
;
|
||
break;}
|
||
case 228:
|
||
#line 1241 "SDCC.y"
|
||
{ yyval.asts = newNode(NULLOP,yyvsp[-1].asts,yyvsp[0].asts) ;;
|
||
break;}
|
||
case 229:
|
||
#line 1245 "SDCC.y"
|
||
{ yyval.asts = NULL;;
|
||
break;}
|
||
case 231:
|
||
#line 1250 "SDCC.y"
|
||
{ yyval.asts = yyvsp[0].asts ; ;
|
||
break;}
|
||
case 232:
|
||
#line 1251 "SDCC.y"
|
||
{ yyval.asts = NULL;;
|
||
break;}
|
||
case 233:
|
||
#line 1256 "SDCC.y"
|
||
{ noLineno++ ; yyval.asts = createIf (yyvsp[-3].asts, yyvsp[-1].asts, yyvsp[0].asts ); noLineno--;;
|
||
break;}
|
||
case 234:
|
||
#line 1257 "SDCC.y"
|
||
{
|
||
ast *ex ;
|
||
static int swLabel = 0 ;
|
||
|
||
/* create a node for expression */
|
||
ex = newNode(SWITCH,yyvsp[-1].asts,NULL);
|
||
STACK_PUSH(swStk,ex); /* save it in the stack */
|
||
ex->values.switchVals.swNum = swLabel ;
|
||
|
||
/* now create the label */
|
||
sprintf(lbuff,"_swBrk_%d",swLabel++);
|
||
yyval.sym = newSymbol(lbuff,NestLevel);
|
||
/* put label in the break stack */
|
||
STACK_PUSH(breakStack,yyval.sym);
|
||
;
|
||
break;}
|
||
case 235:
|
||
#line 1272 "SDCC.y"
|
||
{
|
||
/* get back the switch form the stack */
|
||
yyval.asts = STACK_POP(swStk) ;
|
||
yyval.asts->right = newNode (NULLOP,yyvsp[0].asts,createLabel(yyvsp[-1].sym,NULL));
|
||
STACK_POP(breakStack);
|
||
;
|
||
break;}
|
||
case 236:
|
||
#line 1280 "SDCC.y"
|
||
{ /* create and push the continue , break & body labels */
|
||
static int Lblnum = 0 ;
|
||
/* continue */
|
||
sprintf (lbuff,"_whilecontinue_%d",Lblnum);
|
||
STACK_PUSH(continueStack,newSymbol(lbuff,NestLevel));
|
||
/* break */
|
||
sprintf (lbuff,"_whilebreak_%d",Lblnum);
|
||
STACK_PUSH(breakStack,newSymbol(lbuff,NestLevel));
|
||
/* body */
|
||
sprintf (lbuff,"_whilebody_%d",Lblnum++);
|
||
yyval.sym = newSymbol(lbuff,NestLevel);
|
||
;
|
||
break;}
|
||
case 237:
|
||
#line 1293 "SDCC.y"
|
||
{ /* create and push the continue , break & body Labels */
|
||
static int Lblnum = 0 ;
|
||
|
||
/* continue */
|
||
sprintf(lbuff,"_docontinue_%d",Lblnum);
|
||
STACK_PUSH(continueStack,newSymbol(lbuff,NestLevel));
|
||
/* break */
|
||
sprintf (lbuff,"_dobreak_%d",Lblnum);
|
||
STACK_PUSH(breakStack,newSymbol(lbuff,NestLevel));
|
||
/* do body */
|
||
sprintf (lbuff,"_dobody_%d",Lblnum++);
|
||
yyval.sym = newSymbol (lbuff,NestLevel);
|
||
;
|
||
break;}
|
||
case 238:
|
||
#line 1306 "SDCC.y"
|
||
{ /* create & push continue, break & body labels */
|
||
static int Lblnum = 0 ;
|
||
|
||
/* continue */
|
||
sprintf (lbuff,"_forcontinue_%d",Lblnum);
|
||
STACK_PUSH(continueStack,newSymbol(lbuff,NestLevel));
|
||
/* break */
|
||
sprintf (lbuff,"_forbreak_%d",Lblnum);
|
||
STACK_PUSH(breakStack,newSymbol(lbuff,NestLevel));
|
||
/* body */
|
||
sprintf (lbuff,"_forbody_%d",Lblnum);
|
||
yyval.sym = newSymbol(lbuff,NestLevel);
|
||
/* condition */
|
||
sprintf (lbuff,"_forcond_%d",Lblnum++);
|
||
STACK_PUSH(forStack,newSymbol(lbuff,NestLevel));
|
||
;
|
||
break;}
|
||
case 239:
|
||
#line 1325 "SDCC.y"
|
||
{
|
||
noLineno++ ;
|
||
yyval.asts = createWhile ( yyvsp[-4].sym, STACK_POP(continueStack),
|
||
STACK_POP(breakStack), yyvsp[-2].asts, yyvsp[0].asts );
|
||
yyval.asts->lineno = yyvsp[-4].sym->lineDef ;
|
||
noLineno-- ;
|
||
;
|
||
break;}
|
||
case 240:
|
||
#line 1333 "SDCC.y"
|
||
{
|
||
noLineno++ ;
|
||
yyval.asts = createDo ( yyvsp[-6].sym , STACK_POP(continueStack),
|
||
STACK_POP(breakStack), yyvsp[-2].asts, yyvsp[-5].asts);
|
||
yyval.asts->lineno = yyvsp[-6].sym->lineDef ;
|
||
noLineno-- ;
|
||
;
|
||
break;}
|
||
case 241:
|
||
#line 1341 "SDCC.y"
|
||
{
|
||
noLineno++ ;
|
||
|
||
/* if break or continue statement present
|
||
then create a general case loop */
|
||
if (STACK_PEEK(continueStack)->isref ||
|
||
STACK_PEEK(breakStack)->isref) {
|
||
yyval.asts = createFor (yyvsp[-8].sym, STACK_POP(continueStack),
|
||
STACK_POP(breakStack) ,
|
||
STACK_POP(forStack) ,
|
||
yyvsp[-6].asts , yyvsp[-4].asts , yyvsp[-2].asts, yyvsp[0].asts );
|
||
} else {
|
||
yyval.asts = newNode(FOR,yyvsp[0].asts,NULL);
|
||
AST_FOR(yyval.asts,trueLabel) = yyvsp[-8].sym;
|
||
AST_FOR(yyval.asts,continueLabel) = STACK_POP(continueStack);
|
||
AST_FOR(yyval.asts,falseLabel) = STACK_POP(breakStack);
|
||
AST_FOR(yyval.asts,condLabel) = STACK_POP(forStack) ;
|
||
AST_FOR(yyval.asts,initExpr) = yyvsp[-6].asts;
|
||
AST_FOR(yyval.asts,condExpr) = yyvsp[-4].asts;
|
||
AST_FOR(yyval.asts,loopExpr) = yyvsp[-2].asts;
|
||
}
|
||
|
||
noLineno-- ;
|
||
;
|
||
break;}
|
||
case 242:
|
||
#line 1368 "SDCC.y"
|
||
{ yyval.asts = NULL ; ;
|
||
break;}
|
||
case 244:
|
||
#line 1373 "SDCC.y"
|
||
{
|
||
yyvsp[-1].sym->islbl = 1;
|
||
yyval.asts = newAst_VALUE(symbolVal(yyvsp[-1].sym));
|
||
yyval.asts = newNode(GOTO,yyval.asts,NULL);
|
||
;
|
||
break;}
|
||
case 245:
|
||
#line 1378 "SDCC.y"
|
||
{
|
||
/* make sure continue is in context */
|
||
if (STACK_PEEK(continueStack) == NULL) {
|
||
werror(E_BREAK_CONTEXT);
|
||
yyval.asts = NULL;
|
||
}
|
||
else {
|
||
yyval.asts = newAst_VALUE(symbolVal(STACK_PEEK(continueStack)));
|
||
yyval.asts = newNode(GOTO,yyval.asts,NULL);
|
||
/* mark the continue label as referenced */
|
||
STACK_PEEK(continueStack)->isref = 1;
|
||
}
|
||
;
|
||
break;}
|
||
case 246:
|
||
#line 1391 "SDCC.y"
|
||
{
|
||
if (STACK_PEEK(breakStack) == NULL) {
|
||
werror(E_BREAK_CONTEXT);
|
||
yyval.asts = NULL;
|
||
} else {
|
||
yyval.asts = newAst_VALUE(symbolVal(STACK_PEEK(breakStack)));
|
||
yyval.asts = newNode(GOTO,yyval.asts,NULL);
|
||
STACK_PEEK(breakStack)->isref = 1;
|
||
}
|
||
;
|
||
break;}
|
||
case 247:
|
||
#line 1401 "SDCC.y"
|
||
{ yyval.asts = newNode(RETURN,NULL,NULL) ; ;
|
||
break;}
|
||
case 248:
|
||
#line 1402 "SDCC.y"
|
||
{ yyval.asts = newNode(RETURN,NULL,yyvsp[-1].asts) ; ;
|
||
break;}
|
||
case 249:
|
||
#line 1406 "SDCC.y"
|
||
{ yyval.sym = newSymbol (yyvsp[0].yychar,NestLevel) ; ;
|
||
break;}
|
||
}
|
||
/* the action file gets copied in in place of this dollarsign */
|
||
#line 543 "/usr/share/bison/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 1408 "SDCC.y"
|
||
|
||
|