1 | 2 | /* A Bison parser, made from parse.y 3 | by GNU Bison version 1.25 4 | */ 5 | 6 | #define YYBISON 1 /* Identify Bison output. */ 7 | 8 | #define IDENTIFIER 258 9 | #define TYPE_NAME 259 10 | #define LITERAL 260 11 | #define STRING_LITERAL 261 12 | #define ELLIPSES 262 13 | #define MUL_ASSIGN 263 14 | #define DIV_ASSIGN 264 15 | #define MOD_ASSIGN 265 16 | #define ADD_ASSIGN 266 17 | #define SUB_ASSIGN 267 18 | #define LEFT_ASSIGN 268 19 | #define RIGHT_ASSIGN 269 20 | #define AND_ASSIGN 270 21 | #define XOR_ASSIGN 271 22 | #define OR_ASSIGN 272 23 | #define EQ_OP 273 24 | #define NE_OP 274 25 | #define PTR_OP 275 26 | #define AND_OP 276 27 | #define OR_OP 277 28 | #define DEC_OP 278 29 | #define INC_OP 279 30 | #define LE_OP 280 31 | #define GE_OP 281 32 | #define LEFT_SHIFT 282 33 | #define RIGHT_SHIFT 283 34 | #define SIZEOF 284 35 | #define TYPEDEF 285 36 | #define EXTERN 286 37 | #define STATIC 287 38 | #define AUTO 288 39 | #define REGISTER 289 40 | #define CONST 290 41 | #define VOLATILE 291 42 | #define VOID 292 43 | #define INLINE 293 44 | #define CHAR 294 45 | #define SHORT 295 46 | #define INT 296 47 | #define LONG 297 48 | #define SIGNED 298 49 | #define UNSIGNED 299 50 | #define FLOAT 300 51 | #define DOUBLE 301 52 | #define STRUCT 302 53 | #define UNION 303 54 | #define ENUM 304 55 | #define CASE 305 56 | #define DEFAULT 306 57 | #define IF 307 58 | #define ELSE 308 59 | #define SWITCH 309 60 | #define WHILE 310 61 | #define DO 311 62 | #define FOR 312 63 | #define GOTO 313 64 | #define CONTINUE 314 65 | #define BREAK 315 66 | #define RETURN 316 67 | #define ASM 317 68 | 69 | #line 1 "parse.y" 70 | 71 | /*************************************** 72 | $Header: /home/amb/cxref/RCS/parse.y 1.40 1999/06/17 18:00:39 amb Exp $ 73 | 74 | C Cross Referencing & Documentation tool. Version 1.5a. 75 | 76 | C parser. 77 | ******************/ /****************** 78 | Written by Andrew M. Bishop 79 | 80 | This file Copyright 1995,96,97,98 Andrew M. Bishop 81 | It may be distributed under the GNU Public License, version 2, or 82 | any higher version. See section COPYING of the GNU Public license 83 | for conditions under which this file may be redistributed. 84 | ***************************************/ 85 | 86 | #include <string.h> 87 | #include "parse-yy.h" 88 | #include "cxref.h" 89 | #include "memory.h" 90 | 91 | /*+ A structure to hold the information about an object. +*/ 92 | typedef struct _stack 93 | { 94 | char *name; /*+ The name of the object. +*/ 95 | char *type; /*+ The type of the object. +*/ 96 | char *qual; /*+ The type qualifier of the object. +*/ 97 | } 98 | stack; 99 | 100 | #define yylex cxref_yylex 101 | 102 | static int cxref_yylex(void); 103 | 104 | static void yyerror(char *s); 105 | 106 | /*+ When in a header file, some stuff can be skipped over quickly. +*/ 107 | extern int in_header; 108 | 109 | /*+ A flag that is set to true when typedef is seen in a statement. +*/ 110 | int in_typedef=0; 111 | 112 | /*+ The scope of the function / variable that is being examined. +*/ 113 | static int scope; 114 | 115 | /*+ The variable must be LOCAL or EXTERNAL or GLOBAL, so this checks and sets that. +*/ 116 | #define SCOPE ( scope&(LOCAL|EXTERNAL|EXTERN_H|EXTERN_F) ? scope : scope|GLOBAL ) 117 | 118 | /*+ When in a function or a function definition, the behaviour is different. +*/ 119 | static int in_function=0,in_funcdef=0,in_funcbody=0; 120 | 121 | /*+ The parsing stack +*/ 122 | static stack first={NULL,NULL,NULL}, /*+ first value. +*/ 123 | *list=NULL, /*+ list of all values. +*/ 124 | *current=&first; /*+ current values. +*/ 125 | 126 | /*+ The depth of the stack +*/ 127 | static int depth=0, /*+ currently in use. +*/ 128 | maxdepth=0; /*+ total malloced. +*/ 129 | 130 | /*+ Declarations that are in the same statement share this comment. +*/ 131 | static char* common_comment=NULL; 132 | 133 | /*+ When inside a struct / union / enum definition, this is the depth. +*/ 134 | static int in_structunion=0; 135 | 136 | /*+ When inside a struct / union definition, this is the component type. +*/ 137 | static char *comp_type=NULL; 138 | 139 | /*+ To solve the problem where a type name is used as an identifier. +*/ 140 | static int in_type_spec=0; 141 | 142 | 143 | /*++++++++++++++++++++++++++++++++++++++ 144 | Reset the current level on the stack. 145 | ++++++++++++++++++++++++++++++++++++++*/ 146 | 147 | static void reset(void) 148 | { 149 | current->name=NULL; 150 | current->type=NULL; 151 | current->qual=NULL; 152 | } 153 | 154 | 155 | /*++++++++++++++++++++++++++++++++++++++ 156 | Push a level onto the stack. 157 | ++++++++++++++++++++++++++++++++++++++*/ 158 | 159 | static void push(void) 160 | { 161 | if(list==NULL) 162 | { 163 | list=(stack*)Malloc(8*sizeof(struct _stack)); 164 | list[0]=first; 165 | maxdepth=8; 166 | } 167 | else if(depth==maxdepth) 168 | { 169 | list=Realloc(list,(maxdepth+8)*sizeof(struct _stack)); 170 | maxdepth+=8; 171 | } 172 | 173 | depth++; 174 | current=&list[depth]; 175 | 176 | reset(); 177 | } 178 | 179 | 180 | /*++++++++++++++++++++++++++++++++++++++ 181 | Pop a level from the stack. 182 | ++++++++++++++++++++++++++++++++++++++*/ 183 | 184 | static void pop(void) 185 | { 186 | reset(); 187 | 188 | depth--; 189 | current=&list[depth]; 190 | } 191 | 192 | 193 | /*++++++++++++++++++++++++++++++++++++++ 194 | Reset the Parser, ready for the next file. 195 | ++++++++++++++++++++++++++++++++++++++*/ 196 | 197 | void ResetParser(void) 198 | { 199 | in_typedef=0; 200 | scope=0; 201 | in_function=0; 202 | in_funcdef=0; 203 | in_funcbody=0; 204 | depth=0; 205 | maxdepth=0; 206 | if(list) Free(list); 207 | list=NULL; 208 | current=&first; 209 | reset(); 210 | common_comment=NULL; 211 | in_structunion=0; 212 | comp_type=NULL; 213 | in_type_spec=0; 214 | } 215 | 216 | #ifndef YYSTYPE 217 | #define YYSTYPE int 218 | #endif 219 | #include <stdio.h> 220 | 221 | #ifndef __cplusplus 222 | #ifndef __STDC__ 223 | #define const 224 | #endif 225 | #endif 226 | 227 | 228 | 229 | #define YYFINAL 573 230 | #define YYFLAG -32768 231 | #define YYNTBASE 87 232 | 233 | #define YYTRANSLATE(x) ((unsigned)(x) <= 317 ? yytranslate[x] : 257) 234 | 235 | static const char yytranslate[] = { 0, 236 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 237 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 238 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 239 | 2, 2, 86, 2, 2, 2, 84, 78, 2, 72, 240 | 73, 74, 81, 64, 82, 69, 83, 2, 2, 2, 241 | 2, 2, 2, 2, 2, 2, 2, 68, 63, 79, 242 | 65, 80, 75, 2, 2, 2, 2, 2, 2, 2, 243 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 244 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 245 | 70, 2, 71, 77, 2, 2, 2, 2, 2, 2, 246 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 247 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 248 | 2, 2, 66, 76, 67, 85, 2, 2, 2, 2, 249 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 250 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 251 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 252 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 253 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 254 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 255 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 256 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 257 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 258 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 259 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 260 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 261 | 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 262 | 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 263 | 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 264 | 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 265 | 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 266 | 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 267 | 56, 57, 58, 59, 60, 61, 62 268 | }; 269 | 270 | #if YYDEBUG != 0 271 | static const short yyprhs[] = { 0, 272 | 0, 1, 3, 5, 8, 10, 12, 14, 16, 18, 273 | 21, 25, 28, 30, 32, 35, 37, 40, 42, 45, 274 | 47, 48, 53, 55, 57, 60, 63, 67, 70, 72, 275 | 75, 79, 84, 86, 90, 92, 96, 101, 106, 112, 276 | 114, 118, 120, 123, 125, 129, 132, 136, 140, 145, 277 | 148, 152, 156, 161, 163, 166, 168, 171, 174, 178, 278 | 180, 184, 186, 188, 190, 194, 195, 196, 203, 205, 279 | 207, 209, 211, 213, 215, 217, 219, 222, 224, 226, 280 | 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 281 | 249, 252, 254, 257, 260, 262, 264, 266, 268, 270, 282 | 272, 274, 276, 278, 281, 283, 285, 286, 292, 293, 283 | 300, 302, 305, 307, 311, 313, 317, 319, 322, 324, 284 | 326, 328, 330, 331, 337, 338, 345, 348, 350, 352, 285 | 354, 356, 357, 363, 364, 371, 374, 376, 378, 379, 286 | 381, 383, 386, 388, 391, 394, 396, 397, 402, 403, 287 | 409, 410, 416, 418, 422, 424, 426, 428, 431, 435, 288 | 437, 439, 441, 442, 446, 448, 450, 453, 456, 460, 289 | 462, 464, 467, 468, 474, 476, 477, 479, 481, 483, 290 | 487, 489, 493, 495, 499, 502, 504, 507, 509, 511, 291 | 513, 515, 517, 519, 521, 523, 525, 527, 529, 531, 292 | 533, 536, 537, 538, 544, 545, 547, 549, 552, 554, 293 | 556, 558, 566, 572, 574, 576, 578, 586, 592, 595, 294 | 599, 603, 607, 612, 617, 622, 628, 634, 637, 640, 295 | 643, 646, 651, 653, 655, 661, 664, 667, 670, 674, 296 | 676, 679, 683, 685, 687, 691, 693, 695, 699, 705, 297 | 707, 709, 711, 713, 715, 717, 719, 721, 723, 725, 298 | 727, 729, 735, 740, 742, 746, 748, 752, 754, 758, 299 | 760, 764, 766, 770, 772, 776, 778, 780, 782, 786, 300 | 788, 790, 792, 794, 796, 800, 802, 804, 806, 810, 301 | 812, 814, 816, 820, 822, 824, 826, 828, 830, 832, 302 | 834, 836, 838, 840, 842, 844, 846, 848, 851, 854, 303 | 859, 866, 873, 876, 879, 882, 885, 890, 893, 896, 304 | 899, 901, 903, 905, 907, 909, 911, 913, 915, 917, 305 | 921, 925, 929, 934, 938, 943, 946, 949, 954, 956, 306 | 958, 960, 962, 964, 967, 971, 972, 973, 979, 981, 307 | 983, 987, 993, 1001, 1011, 1023, 1025, 1028, 1031, 1032, 308 | 1034, 1038, 1043, 1044, 1046, 1050, 1055, 1058, 1060, 1064, 309 | 1065, 1067, 1071, 1075, 1081, 1086, 1093, 1095 310 | }; 311 | 312 | static const short yyrhs[] = { -1, 313 | 88, 0, 89, 0, 88, 89, 0, 91, 0, 159, 314 | 0, 246, 0, 197, 0, 91, 0, 90, 91, 0, 315 | 92, 94, 63, 0, 92, 63, 0, 93, 0, 113, 316 | 0, 113, 93, 0, 116, 0, 116, 93, 0, 115, 317 | 0, 115, 93, 0, 96, 0, 0, 94, 64, 95, 318 | 96, 0, 97, 0, 105, 0, 105, 251, 0, 105, 319 | 98, 0, 105, 251, 98, 0, 65, 99, 0, 201, 320 | 0, 66, 67, 0, 66, 100, 67, 0, 66, 100, 321 | 64, 67, 0, 101, 0, 100, 64, 101, 0, 99, 322 | 0, 158, 68, 99, 0, 69, 158, 65, 99, 0, 323 | 70, 102, 71, 99, 0, 70, 102, 71, 65, 99, 324 | 0, 244, 0, 244, 7, 244, 0, 106, 0, 106, 325 | 104, 0, 104, 0, 72, 103, 73, 0, 70, 71, 326 | 0, 104, 70, 71, 0, 70, 244, 71, 0, 104, 327 | 70, 244, 71, 0, 72, 73, 0, 104, 72, 73, 328 | 0, 72, 170, 73, 0, 104, 72, 170, 73, 0, 329 | 107, 0, 106, 107, 0, 74, 0, 74, 114, 0, 330 | 74, 106, 0, 74, 114, 106, 0, 108, 0, 72, 331 | 105, 73, 0, 109, 0, 165, 0, 3, 0, 107, 332 | 70, 71, 0, 0, 0, 107, 70, 110, 244, 111, 333 | 71, 0, 3, 0, 33, 0, 31, 0, 34, 0, 334 | 32, 0, 30, 0, 38, 0, 115, 0, 114, 115, 335 | 0, 35, 0, 36, 0, 117, 0, 124, 0, 118, 336 | 0, 119, 0, 134, 0, 121, 0, 140, 0, 122, 337 | 0, 45, 0, 46, 0, 46, 42, 0, 42, 46, 338 | 0, 120, 0, 120, 115, 0, 119, 120, 0, 43, 339 | 0, 44, 0, 39, 0, 40, 0, 41, 0, 42, 340 | 0, 4, 0, 37, 0, 92, 0, 92, 103, 0, 341 | 125, 0, 132, 0, 0, 49, 66, 126, 128, 67, 342 | 0, 0, 49, 133, 66, 127, 128, 67, 0, 129, 343 | 0, 129, 64, 0, 130, 0, 129, 64, 130, 0, 344 | 131, 0, 131, 65, 201, 0, 3, 0, 49, 133, 345 | 0, 3, 0, 4, 0, 135, 0, 138, 0, 0, 346 | 47, 66, 136, 146, 67, 0, 0, 47, 139, 66, 347 | 137, 146, 67, 0, 47, 139, 0, 3, 0, 4, 348 | 0, 141, 0, 144, 0, 0, 48, 66, 142, 146, 349 | 67, 0, 0, 48, 145, 66, 143, 146, 67, 0, 350 | 48, 145, 0, 3, 0, 4, 0, 0, 147, 0, 351 | 148, 0, 147, 148, 0, 63, 0, 135, 63, 0, 352 | 141, 63, 0, 149, 0, 0, 116, 150, 153, 63, 353 | 0, 0, 114, 116, 151, 153, 63, 0, 0, 116, 354 | 114, 152, 153, 63, 0, 154, 0, 153, 64, 154, 355 | 0, 155, 0, 156, 0, 105, 0, 68, 157, 0, 356 | 105, 68, 157, 0, 201, 0, 3, 0, 4, 0, 357 | 0, 161, 160, 175, 0, 162, 0, 163, 0, 92, 358 | 163, 0, 163, 90, 0, 92, 163, 90, 0, 164, 359 | 0, 165, 0, 106, 165, 0, 0, 167, 72, 166, 360 | 168, 73, 0, 107, 0, 0, 170, 0, 169, 0, 361 | 3, 0, 169, 64, 3, 0, 171, 0, 171, 64, 362 | 7, 0, 172, 0, 171, 64, 172, 0, 92, 105, 363 | 0, 92, 0, 92, 103, 0, 246, 0, 175, 0, 364 | 180, 0, 183, 0, 188, 0, 192, 0, 193, 0, 365 | 194, 0, 195, 0, 196, 0, 197, 0, 198, 0, 366 | 173, 0, 174, 173, 0, 0, 0, 66, 176, 178, 367 | 177, 67, 0, 0, 179, 0, 174, 0, 179, 174, 368 | 0, 90, 0, 182, 0, 181, 0, 52, 72, 199, 369 | 73, 173, 53, 173, 0, 52, 72, 199, 73, 173, 370 | 0, 184, 0, 185, 0, 187, 0, 56, 173, 55, 371 | 72, 199, 73, 63, 0, 57, 72, 186, 73, 173, 372 | 0, 63, 63, 0, 199, 63, 63, 0, 63, 199, 373 | 63, 0, 63, 63, 199, 0, 63, 199, 63, 199, 374 | 0, 199, 63, 63, 199, 0, 199, 63, 199, 63, 375 | 0, 199, 63, 199, 63, 199, 0, 55, 72, 199, 376 | 73, 173, 0, 189, 68, 0, 191, 68, 0, 190, 377 | 68, 0, 50, 244, 0, 50, 244, 7, 244, 0, 378 | 51, 0, 3, 0, 54, 72, 199, 73, 173, 0, 379 | 60, 63, 0, 59, 63, 0, 199, 63, 0, 58, 380 | 3, 63, 0, 63, 0, 61, 63, 0, 61, 199, 381 | 63, 0, 200, 0, 201, 0, 200, 64, 201, 0, 382 | 203, 0, 252, 0, 219, 202, 201, 0, 219, 202, 383 | 66, 253, 67, 0, 65, 0, 8, 0, 9, 0, 384 | 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 385 | 15, 0, 16, 0, 17, 0, 204, 0, 204, 75, 386 | 199, 68, 203, 0, 204, 75, 68, 203, 0, 205, 387 | 0, 204, 22, 205, 0, 206, 0, 205, 21, 206, 388 | 0, 207, 0, 206, 76, 207, 0, 208, 0, 207, 389 | 77, 208, 0, 209, 0, 208, 78, 209, 0, 211, 390 | 0, 209, 210, 211, 0, 18, 0, 19, 0, 213, 391 | 0, 211, 212, 213, 0, 79, 0, 25, 0, 80, 392 | 0, 26, 0, 215, 0, 213, 214, 215, 0, 27, 393 | 0, 28, 0, 217, 0, 215, 216, 217, 0, 81, 394 | 0, 82, 0, 219, 0, 217, 218, 219, 0, 74, 395 | 0, 83, 0, 84, 0, 220, 0, 221, 0, 222, 396 | 0, 223, 0, 224, 0, 225, 0, 226, 0, 227, 397 | 0, 228, 0, 229, 0, 230, 0, 78, 219, 0, 398 | 85, 219, 0, 72, 123, 73, 219, 0, 72, 123, 399 | 73, 66, 253, 67, 0, 72, 123, 73, 66, 256, 400 | 67, 0, 74, 219, 0, 86, 219, 0, 23, 219, 401 | 0, 24, 219, 0, 29, 72, 123, 73, 0, 29, 402 | 219, 0, 82, 219, 0, 81, 219, 0, 231, 0, 403 | 234, 0, 235, 0, 236, 0, 237, 0, 238, 0, 404 | 239, 0, 232, 0, 233, 0, 230, 69, 158, 0, 405 | 230, 20, 158, 0, 230, 72, 73, 0, 230, 72, 406 | 245, 73, 0, 112, 72, 73, 0, 112, 72, 245, 407 | 73, 0, 230, 23, 0, 230, 24, 0, 230, 70, 408 | 199, 71, 0, 112, 0, 5, 0, 240, 0, 241, 409 | 0, 6, 0, 240, 6, 0, 72, 199, 73, 0, 410 | 0, 0, 72, 242, 175, 243, 73, 0, 199, 0, 411 | 201, 0, 245, 64, 201, 0, 247, 72, 240, 73, 412 | 63, 0, 247, 72, 240, 68, 248, 73, 63, 0, 413 | 247, 72, 240, 68, 248, 68, 248, 73, 63, 0, 414 | 247, 72, 240, 68, 248, 68, 248, 68, 250, 73, 415 | 63, 0, 62, 0, 62, 36, 0, 36, 62, 0, 416 | 0, 249, 0, 248, 64, 249, 0, 240, 72, 199, 417 | 73, 0, 0, 240, 0, 250, 64, 240, 0, 62, 418 | 72, 240, 73, 0, 21, 191, 0, 254, 0, 253, 419 | 64, 254, 0, 0, 201, 0, 66, 253, 67, 0, 420 | 158, 68, 201, 0, 158, 68, 66, 253, 67, 0, 421 | 69, 158, 65, 201, 0, 69, 158, 65, 66, 253, 422 | 67, 0, 255, 0, 256, 64, 255, 0 423 | }; 424 | 425 | #endif 426 | 427 | #if YYDEBUG != 0 428 | static const short yyrline[] = { 0, 429 | 169, 170, 174, 175, 179, 181, 183, 184, 190, 192, 430 | 198, 200, 205, 211, 212, 214, 216, 219, 220, 227, 431 | 228, 229, 232, 279, 280, 281, 282, 286, 290, 291, 432 | 292, 293, 297, 298, 302, 303, 304, 305, 306, 310, 433 | 311, 318, 319, 321, 325, 328, 330, 332, 334, 336, 434 | 338, 340, 342, 349, 351, 356, 357, 359, 361, 366, 435 | 367, 371, 372, 376, 383, 385, 385, 386, 392, 396, 436 | 398, 403, 405, 407, 411, 416, 417, 422, 424, 431, 437 | 436, 437, 438, 439, 440, 441, 442, 446, 447, 448, 438 | 450, 455, 456, 458, 463, 464, 465, 466, 467, 468, 439 | 472, 476, 480, 482, 489, 490, 494, 502, 507, 515, 440 | 523, 524, 528, 529, 534, 536, 541, 545, 550, 551, 441 | 557, 558, 562, 570, 575, 583, 591, 596, 597, 603, 442 | 604, 608, 616, 621, 629, 637, 642, 643, 649, 650, 443 | 654, 655, 660, 661, 664, 667, 671, 673, 675, 677, 444 | 679, 681, 686, 688, 694, 695, 699, 704, 706, 711, 445 | 715, 716, 724, 727, 731, 753, 754, 756, 757, 764, 446 | 769, 770, 775, 778, 784, 792, 795, 796, 800, 802, 447 | 808, 809, 815, 818, 824, 826, 828, 835, 836, 837, 448 | 838, 839, 840, 841, 842, 843, 844, 845, 846, 850, 449 | 851, 857, 860, 862, 865, 866, 867, 868, 872, 878, 450 | 879, 883, 887, 893, 894, 895, 899, 903, 907, 908, 451 | 909, 910, 911, 912, 913, 914, 918, 924, 925, 926, 452 | 930, 931, 935, 939, 945, 951, 954, 958, 962, 966, 453 | 970, 971, 977, 983, 984, 991, 992, 993, 994, 997, 454 | 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 455 | 1013, 1014, 1016, 1023, 1024, 1031, 1032, 1039, 1040, 1047, 456 | 1048, 1055, 1056, 1063, 1064, 1068, 1069, 1075, 1076, 1080, 457 | 1081, 1082, 1083, 1089, 1090, 1094, 1095, 1101, 1102, 1106, 458 | 1107, 1113, 1114, 1118, 1119, 1120, 1126, 1127, 1128, 1129, 459 | 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1140, 1144, 1149, 460 | 1151, 1152, 1156, 1160, 1165, 1169, 1173, 1175, 1180, 1185, 461 | 1192, 1193, 1194, 1196, 1197, 1198, 1199, 1203, 1204, 1208, 462 | 1212, 1216, 1217, 1221, 1222, 1226, 1230, 1234, 1238, 1240, 463 | 1241, 1242, 1245, 1246, 1250, 1252, 1252, 1253, 1258, 1262, 464 | 1263, 1271, 1272, 1273, 1274, 1278, 1279, 1280, 1284, 1285, 465 | 1286, 1290, 1294, 1295, 1296, 1300, 1306, 1312, 1313, 1317, 466 | 1318, 1319, 1323, 1324, 1325, 1326, 1330, 1331 467 | }; 468 | #endif 469 | 470 | 471 | #if YYDEBUG != 0 || defined (YYERROR_VERBOSE) 472 | 473 | static const char * const yytname[] = { "$","error","$undefined.","IDENTIFIER", 474 | "TYPE_NAME","LITERAL","STRING_LITERAL","ELLIPSES","MUL_ASSIGN","DIV_ASSIGN", 475 | "MOD_ASSIGN","ADD_ASSIGN","SUB_ASSIGN","LEFT_ASSIGN","RIGHT_ASSIGN","AND_ASSIGN", 476 | "XOR_ASSIGN","OR_ASSIGN","EQ_OP","NE_OP","PTR_OP","AND_OP","OR_OP","DEC_OP", 477 | "INC_OP","LE_OP","GE_OP","LEFT_SHIFT","RIGHT_SHIFT","SIZEOF","TYPEDEF","EXTERN", 478 | "STATIC","AUTO","REGISTER","CONST","VOLATILE","VOID","INLINE","CHAR","SHORT", 479 | "INT","LONG","SIGNED","UNSIGNED","FLOAT","DOUBLE","STRUCT","UNION","ENUM","CASE", 480 | "DEFAULT","IF","ELSE","SWITCH","WHILE","DO","FOR","GOTO","CONTINUE","BREAK", 481 | "RETURN","ASM","';'","','","'='","'{'","'}'","':'","'.'","'['","']'","'('","')'", 482 | "'*'","'?'","'|'","'^'","'&'","'<'","'>'","'+'","'-'","'/'","'%'","'~'","'!'", 483 | "file","program","top_level_declaration","declaration_list","declaration","declaration_specifiers", 484 | "declaration_specifiers1","initialized_declarator_list","@1","initialized_declarator", 485 | "initialized_declarator1","initializer_part","initializer","initializer_list", 486 | "named_initializer","named_initializer_index","abstract_declarator","direct_abstract_declarator", 487 | "declarator","pointer","direct_declarator","simple_declarator","array_declarator", 488 | "@2","@3","name","storage_class_specifier","type_qualifier_list","type_qualifier", 489 | "type_specifier","type_specifier1","floating_type_specifier","integer_type_specifier", 490 | "integer_type_specifier_part","typedef_name","void_type_specifier","type_name", 491 | "enumeration_type_specifier","enumeration_type_definition","@4","@5","enumeration_definition_list", 492 | "enumeration_definition_list1","enumeration_constant_definition","enumeration_constant", 493 | "enumeration_type_reference","enumeration_tag","structure_type_specifier","structure_type_definition", 494 | "@6","@7","structure_type_reference","structure_tag","union_type_specifier", 495 | "union_type_definition","@8","@9","union_type_reference","union_tag","field_list", 496 | "field_list1","field_list2","component_declaration","@10","@11","@12","component_declarator_list", 497 | "component_declarator","simple_component","bit_field","width","component_name", 498 | "function_definition","@13","function_specifier","function_specifier1","function_declarator", 499 | "function_declarator0","function_direct_declarator","@14","function_declarator1", 500 | "function_declarator2","identifier_list","parameter_type_list","parameter_list", 501 | "parameter_declaration","statement","statement_list","compound_statement","@15", 502 | "@16","compound_statement_body","inner_declaration_list","conditional_statement", 503 | "if_else_statement","if_statement","iterative_statement","do_statement","for_statement", 504 | "for_expressions","while_statement","labeled_statement","case_label","default_label", 505 | "named_label","switch_statement","break_statement","continue_statement","expression_statement", 506 | "goto_statement","null_statement","return_statement","expression","comma_expression", 507 | "assignment_expression","assignment_op","conditional_expression","logical_or_expression", 508 | "logical_and_expression","bitwise_or_expression","bitwise_xor_expression","bitwise_and_expression", 509 | "equality_expression","equality_op","relational_expression","relational_op", 510 | "shift_expression","shift_op","additive_expression","add_op","multiplicative_expression", 511 | "mult_op","unary_expression","address_expression","bitwise_negation_expression", 512 | "cast_expression","indirection_expression","logical_negation_expression","predecrement_expression", 513 | "preincrement_expression","sizeof_expression","unary_minus_expression","unary_plus_expression", 514 | "postfix_expression","component_selection_expression","direct_component_selection", 515 | "indirect_component_selection","function_call","function_call_direct","postdecrement_expression", 516 | "postincrement_expression","subscript_expression","primary_expression","string_literal", 517 | "parenthesized_expression","@17","@18","constant_expression","expression_list", 518 | "asm_statement","asm_type","asm_inout_list","asm_inout","asm_clobber_list","asm_label", 519 | "named_label_address","assignment_expression_list","assignment_expression_list_item", 520 | "named_assignment","named_assignment_list", NULL 521 | }; 522 | #endif 523 | 524 | static const short yyr1[] = { 0, 525 | 87, 87, 88, 88, 89, 89, 89, 89, 90, 90, 526 | 91, 91, 92, 93, 93, 93, 93, 93, 93, 94, 527 | 95, 94, 96, 97, 97, 97, 97, 98, 99, 99, 528 | 99, 99, 100, 100, 101, 101, 101, 101, 101, 102, 529 | 102, 103, 103, 103, 104, 104, 104, 104, 104, 104, 530 | 104, 104, 104, 105, 105, 106, 106, 106, 106, 107, 531 | 107, 107, 107, 108, 109, 110, 111, 109, 112, 113, 532 | 113, 113, 113, 113, 113, 114, 114, 115, 115, 116, 533 | 117, 117, 117, 117, 117, 117, 117, 118, 118, 118, 534 | 118, 119, 119, 119, 120, 120, 120, 120, 120, 120, 535 | 121, 122, 123, 123, 124, 124, 126, 125, 127, 125, 536 | 128, 128, 129, 129, 130, 130, 131, 132, 133, 133, 537 | 134, 134, 136, 135, 137, 135, 138, 139, 139, 140, 538 | 140, 142, 141, 143, 141, 144, 145, 145, 146, 146, 539 | 147, 147, 148, 148, 148, 148, 150, 149, 151, 149, 540 | 152, 149, 153, 153, 154, 154, 155, 156, 156, 157, 541 | 158, 158, 160, 159, 161, 162, 162, 162, 162, 163, 542 | 164, 164, 166, 165, 167, 168, 168, 168, 169, 169, 543 | 170, 170, 171, 171, 172, 172, 172, 173, 173, 173, 544 | 173, 173, 173, 173, 173, 173, 173, 173, 173, 174, 545 | 174, 176, 177, 175, 178, 178, 178, 178, 179, 180, 546 | 180, 181, 182, 183, 183, 183, 184, 185, 186, 186, 547 | 186, 186, 186, 186, 186, 186, 187, 188, 188, 188, 548 | 189, 189, 190, 191, 192, 193, 194, 195, 196, 197, 549 | 198, 198, 199, 200, 200, 201, 201, 201, 201, 202, 550 | 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 551 | 203, 203, 203, 204, 204, 205, 205, 206, 206, 207, 552 | 207, 208, 208, 209, 209, 210, 210, 211, 211, 212, 553 | 212, 212, 212, 213, 213, 214, 214, 215, 215, 216, 554 | 216, 217, 217, 218, 218, 218, 219, 219, 219, 219, 555 | 219, 219, 219, 219, 219, 219, 219, 220, 221, 222, 556 | 222, 222, 223, 224, 225, 226, 227, 227, 228, 229, 557 | 230, 230, 230, 230, 230, 230, 230, 231, 231, 232, 558 | 233, 234, 234, 235, 235, 236, 237, 238, 239, 239, 559 | 239, 239, 240, 240, 241, 242, 243, 241, 244, 245, 560 | 245, 246, 246, 246, 246, 247, 247, 247, 248, 248, 561 | 248, 249, 250, 250, 250, 251, 252, 253, 253, 254, 562 | 254, 254, 255, 255, 255, 255, 256, 256 563 | }; 564 | 565 | static const short yyr2[] = { 0, 566 | 0, 1, 1, 2, 1, 1, 1, 1, 1, 2, 567 | 3, 2, 1, 1, 2, 1, 2, 1, 2, 1, 568 | 0, 4, 1, 1, 2, 2, 3, 2, 1, 2, 569 | 3, 4, 1, 3, 1, 3, 4, 4, 5, 1, 570 | 3, 1, 2, 1, 3, 2, 3, 3, 4, 2, 571 | 3, 3, 4, 1, 2, 1, 2, 2, 3, 1, 572 | 3, 1, 1, 1, 3, 0, 0, 6, 1, 1, 573 | 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 574 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 575 | 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 576 | 1, 1, 1, 2, 1, 1, 0, 5, 0, 6, 577 | 1, 2, 1, 3, 1, 3, 1, 2, 1, 1, 578 | 1, 1, 0, 5, 0, 6, 2, 1, 1, 1, 579 | 1, 0, 5, 0, 6, 2, 1, 1, 0, 1, 580 | 1, 2, 1, 2, 2, 1, 0, 4, 0, 5, 581 | 0, 5, 1, 3, 1, 1, 1, 2, 3, 1, 582 | 1, 1, 0, 3, 1, 1, 2, 2, 3, 1, 583 | 1, 2, 0, 5, 1, 0, 1, 1, 1, 3, 584 | 1, 3, 1, 3, 2, 1, 2, 1, 1, 1, 585 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 586 | 2, 0, 0, 5, 0, 1, 1, 2, 1, 1, 587 | 1, 7, 5, 1, 1, 1, 7, 5, 2, 3, 588 | 3, 3, 4, 4, 4, 5, 5, 2, 2, 2, 589 | 2, 4, 1, 1, 5, 2, 2, 2, 3, 1, 590 | 2, 3, 1, 1, 3, 1, 1, 3, 5, 1, 591 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 592 | 1, 5, 4, 1, 3, 1, 3, 1, 3, 1, 593 | 3, 1, 3, 1, 3, 1, 1, 1, 3, 1, 594 | 1, 1, 1, 1, 3, 1, 1, 1, 3, 1, 595 | 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 596 | 1, 1, 1, 1, 1, 1, 1, 2, 2, 4, 597 | 6, 6, 2, 2, 2, 2, 4, 2, 2, 2, 598 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 599 | 3, 3, 4, 3, 4, 2, 2, 4, 1, 1, 600 | 1, 1, 1, 2, 3, 0, 0, 5, 1, 1, 601 | 3, 5, 7, 9, 11, 1, 2, 2, 0, 1, 602 | 3, 4, 0, 1, 3, 4, 2, 1, 3, 0, 603 | 1, 3, 3, 5, 4, 6, 1, 3 604 | }; 605 | 606 | static const short yydefact[] = { 1, 607 | 64, 101, 74, 71, 73, 70, 72, 78, 79, 102, 608 | 75, 97, 98, 99, 100, 95, 96, 88, 89, 0, 609 | 0, 0, 356, 240, 0, 56, 2, 3, 5, 0, 610 | 13, 0, 175, 60, 62, 14, 18, 16, 80, 82, 611 | 83, 92, 85, 87, 81, 105, 106, 84, 121, 122, 612 | 86, 130, 131, 6, 163, 165, 166, 170, 171, 0, 613 | 8, 7, 0, 358, 91, 90, 128, 129, 123, 127, 614 | 137, 138, 132, 136, 119, 120, 107, 118, 357, 0, 615 | 0, 54, 63, 79, 58, 57, 76, 4, 12, 0, 616 | 20, 23, 24, 0, 167, 172, 66, 15, 19, 17, 617 | 100, 94, 93, 0, 168, 9, 0, 173, 0, 139, 618 | 125, 139, 134, 0, 109, 61, 55, 59, 77, 11, 619 | 21, 0, 0, 26, 25, 169, 65, 0, 202, 164, 620 | 10, 176, 343, 0, 143, 0, 147, 121, 130, 0, 621 | 140, 141, 146, 139, 0, 139, 117, 0, 111, 113, 622 | 115, 0, 0, 0, 69, 340, 0, 0, 0, 0, 623 | 0, 346, 0, 0, 0, 0, 0, 0, 28, 339, 624 | 29, 246, 261, 264, 266, 268, 270, 272, 274, 278, 625 | 284, 288, 292, 297, 298, 299, 300, 301, 302, 303, 626 | 304, 305, 306, 307, 321, 328, 329, 322, 323, 324, 627 | 325, 326, 327, 341, 342, 247, 27, 349, 243, 244, 628 | 67, 205, 179, 186, 0, 178, 177, 181, 183, 344, 629 | 359, 0, 149, 151, 0, 144, 145, 124, 142, 0, 630 | 133, 0, 108, 112, 0, 0, 22, 0, 234, 367, 631 | 315, 316, 346, 318, 69, 162, 30, 0, 0, 35, 632 | 0, 33, 0, 103, 0, 0, 0, 313, 308, 320, 633 | 319, 309, 314, 0, 0, 0, 0, 0, 0, 0, 634 | 276, 277, 0, 281, 283, 280, 282, 0, 286, 287, 635 | 0, 290, 291, 0, 294, 295, 296, 0, 251, 252, 636 | 253, 254, 255, 256, 257, 258, 259, 260, 250, 0, 637 | 0, 336, 337, 0, 0, 0, 0, 0, 69, 0, 638 | 233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 639 | 209, 200, 207, 189, 203, 206, 190, 211, 210, 191, 640 | 214, 215, 216, 192, 0, 0, 0, 193, 194, 195, 641 | 196, 197, 198, 199, 0, 188, 0, 0, 187, 44, 642 | 185, 42, 174, 0, 0, 0, 0, 360, 352, 0, 643 | 0, 0, 157, 0, 153, 155, 156, 126, 135, 114, 644 | 116, 110, 366, 0, 161, 0, 0, 40, 0, 31, 645 | 0, 0, 104, 42, 0, 345, 347, 334, 350, 0, 646 | 265, 292, 0, 0, 267, 269, 271, 273, 275, 279, 647 | 285, 289, 293, 370, 248, 331, 330, 0, 332, 0, 648 | 245, 68, 231, 0, 0, 0, 0, 0, 0, 0, 649 | 237, 236, 241, 0, 201, 0, 208, 228, 230, 229, 650 | 238, 46, 0, 50, 0, 0, 0, 0, 43, 180, 651 | 182, 184, 0, 0, 359, 0, 0, 0, 158, 160, 652 | 0, 148, 0, 317, 0, 0, 0, 32, 34, 36, 653 | 370, 310, 0, 0, 335, 263, 0, 370, 371, 0, 654 | 368, 338, 333, 0, 0, 0, 0, 0, 0, 0, 655 | 0, 239, 242, 204, 48, 45, 52, 47, 0, 51, 656 | 0, 0, 361, 0, 353, 150, 152, 159, 154, 37, 657 | 0, 38, 41, 0, 0, 0, 377, 0, 348, 351, 658 | 262, 0, 370, 249, 232, 0, 0, 0, 0, 219, 659 | 0, 0, 0, 49, 53, 362, 363, 0, 39, 0, 660 | 0, 311, 0, 312, 372, 369, 213, 235, 227, 0, 661 | 222, 221, 218, 220, 0, 364, 0, 354, 0, 370, 662 | 373, 378, 0, 0, 223, 224, 225, 0, 0, 370, 663 | 375, 0, 212, 217, 226, 365, 355, 0, 374, 376, 664 | 0, 0, 0 665 | }; 666 | 667 | static const short yydefgoto[] = { 571, 668 | 27, 28, 105, 106, 107, 31, 90, 153, 91, 92, 669 | 124, 250, 251, 252, 377, 435, 350, 363, 81, 82, 670 | 34, 35, 128, 308, 170, 36, 136, 37, 38, 39, 671 | 40, 41, 42, 43, 44, 255, 45, 46, 114, 152, 672 | 148, 149, 150, 151, 47, 78, 48, 49, 110, 144, 673 | 50, 70, 51, 52, 112, 146, 53, 74, 140, 141, 674 | 142, 143, 225, 360, 361, 364, 365, 366, 367, 449, 675 | 253, 54, 104, 55, 56, 57, 58, 83, 132, 60, 676 | 215, 216, 436, 218, 219, 322, 323, 324, 212, 426, 677 | 325, 326, 327, 328, 329, 330, 331, 332, 480, 333, 678 | 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 679 | 344, 345, 209, 210, 300, 172, 173, 174, 175, 176, 680 | 177, 178, 273, 179, 278, 180, 281, 181, 284, 182, 681 | 288, 183, 184, 185, 186, 187, 188, 189, 190, 191, 682 | 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 683 | 202, 203, 204, 205, 257, 463, 211, 390, 346, 63, 684 | 357, 358, 547, 125, 206, 470, 471, 507, 508 685 | }; 686 | 687 | static const short yypact[] = { 1498, 688 | -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -10,-32768, 689 | -32768,-32768,-32768,-32768, 12,-32768,-32768,-32768, 99, 73, 690 | 83, 100, 38,-32768, 22, 21, 1498,-32768,-32768, 27, 691 | -32768, 48, 97,-32768,-32768, 1725, 1725, 1725,-32768,-32768, 692 | 272, 94,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 693 | -32768,-32768,-32768,-32768,-32768,-32768, 1725,-32768, 154, 92, 694 | -32768,-32768, 112,-32768,-32768,-32768,-32768,-32768,-32768, 105, 695 | -32768,-32768,-32768, 122,-32768,-32768,-32768, 145,-32768, 152, 696 | 48, 87,-32768,-32768,-32768, 21,-32768,-32768,-32768, 174, 697 | -32768,-32768, 35, 48, 1725, 154, 172,-32768,-32768,-32768, 698 | -32768,-32768,-32768, 197, 1725,-32768, 27,-32768, 243, 364, 699 | -32768, 364,-32768, 271,-32768,-32768, 87,-32768,-32768,-32768, 700 | -32768, 193, 797,-32768, 225, 1725,-32768, 1332,-32768,-32768, 701 | -32768, 1659,-32768, 10,-32768, 158, 94, 234, 239, 253, 702 | 364,-32768,-32768, 364, 266, 364,-32768, 270, 279,-32768, 703 | 283, 271, 22, 243,-32768,-32768, 342, 1418, 1418, 1440, 704 | 647, 516, 1418, 1418, 1418, 1418, 1418, 1418,-32768, 278, 705 | -32768,-32768, 33, 336, 288, 282, 289, 262, 130, 297, 706 | 246, -14, 164,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 707 | -32768,-32768,-32768, 162,-32768,-32768,-32768,-32768,-32768,-32768, 708 | -32768,-32768,-32768, 369,-32768,-32768,-32768,-32768, 312,-32768, 709 | -32768, 432,-32768, 39, 305, 315,-32768, 316,-32768,-32768, 710 | 243, 318,-32768, 94, 76,-32768,-32768,-32768,-32768, 319, 711 | -32768, 321,-32768, 271, 1332, 323,-32768, 18,-32768,-32768, 712 | -32768,-32768, 516,-32768, 317,-32768,-32768, 326, 1332,-32768, 713 | 166,-32768, 324, 196, 320, 322, 197,-32768,-32768,-32768, 714 | -32768,-32768,-32768, 280, 1418, 867, 1418, 1418, 1418, 1418, 715 | -32768,-32768, 1418,-32768,-32768,-32768,-32768, 1418,-32768,-32768, 716 | 1418,-32768,-32768, 1418,-32768,-32768,-32768, 1418,-32768,-32768, 717 | -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 889, 718 | 326,-32768,-32768, 326, 1332, 959, 1332, 327, 329, 1332, 719 | -32768, 330, 343, 344, 563, 345, 388, 331, 356, 984, 720 | 1725,-32768, 563,-32768,-32768, 563,-32768,-32768,-32768,-32768, 721 | -32768,-32768,-32768,-32768, 352, 353, 357,-32768,-32768,-32768, 722 | -32768,-32768,-32768,-32768, 361,-32768, 1006, 1545,-32768, 142, 723 | -32768, 45,-32768, 425, 1679, 30, -1,-32768,-32768, 76, 724 | 76, 1332, 362, 268,-32768,-32768,-32768,-32768,-32768,-32768, 725 | -32768,-32768,-32768, 358,-32768, 375, 363, 422, 669,-32768, 726 | 797, 1565,-32768, 183, 1354,-32768,-32768,-32768,-32768, 25, 727 | 336,-32768, 1418, 373, 288, 282, 289, 262, 130, 297, 728 | 246, -14,-32768, 1076,-32768,-32768,-32768, 371,-32768, 81, 729 | -32768,-32768, 437, 1332, 1332, 1332, -10, 391, 1101, 385, 730 | -32768,-32768,-32768, 387,-32768, 384, 563,-32768,-32768,-32768, 731 | -32768,-32768, 381,-32768, 386, 412, 1123, 1612, 142,-32768, 732 | -32768,-32768, 1332, 243, 243, 394, 306, 308,-32768,-32768, 733 | 1332,-32768, 76, 1354, 797, 775, 1332,-32768,-32768,-32768, 734 | 753,-32768, 423, 1332,-32768,-32768, 1418, 1076,-32768, 205, 735 | -32768,-32768,-32768, 1332, 424, 426, 427, 382, 1193, 428, 736 | 395,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 431,-32768, 737 | 430, 434,-32768, 123,-32768,-32768,-32768,-32768,-32768,-32768, 738 | 797,-32768,-32768, 326, 440, 209,-32768, 211,-32768,-32768, 739 | -32768, 215, 1076,-32768,-32768, 563, 563, 563, 1332, 1332, 740 | 442, 563, 1218,-32768,-32768,-32768, 243, 446,-32768, 447, 741 | 1240,-32768, 37,-32768,-32768,-32768, 458,-32768,-32768, 443, 742 | -32768, 1332,-32768, 1332, 452, 369, 163,-32768, 1310, 1076, 743 | -32768,-32768, 563, 460,-32768,-32768, 1332, 243, 461, 1076, 744 | -32768, 231,-32768,-32768,-32768, 369,-32768, 232,-32768,-32768, 745 | 525, 526,-32768 746 | }; 747 | 748 | static const short yypgoto[] = {-32768, 749 | -32768, 500, -72, 2, 1, 269,-32768,-32768, 376,-32768, 750 | 403, -114,-32768, 151,-32768, -179, -303, -22, 7, 11, 751 | -32768,-32768,-32768,-32768,-32768,-32768, 0, 24, 148,-32768, 752 | -32768,-32768, 490,-32768,-32768, 290,-32768,-32768,-32768,-32768, 753 | 380,-32768, 300,-32768,-32768,-32768,-32768, 110,-32768,-32768, 754 | -32768,-32768,-32768, 147,-32768,-32768,-32768,-32768, -30,-32768, 755 | 397,-32768,-32768,-32768,-32768, 13, 82,-32768,-32768, 85, 756 | -233,-32768,-32768,-32768,-32768, 511,-32768, 32,-32768,-32768, 757 | -32768,-32768, -128,-32768, 187, -276, 217, -99,-32768,-32768, 758 | -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 759 | -32768,-32768,-32768, 410,-32768,-32768,-32768,-32768,-32768, 46, 760 | -32768, -97,-32768, -117,-32768, -383,-32768, 307, 277, 302, 761 | 304, 301,-32768, 303,-32768, 296,-32768, 294,-32768, 293, 762 | -32768, -146,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 763 | -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 764 | -32768,-32768, -109,-32768,-32768,-32768, -222, 273, 53,-32768, 765 | 133, 136,-32768,-32768,-32768, -407, 68, 49,-32768 766 | }; 767 | 768 | 769 | #define YYLAST 1774 770 | 771 | 772 | static const short yytable[] = { 134, 773 | 30, 29, 80, 217, 130, 171, 32, 93, 169, 466, 774 | 33, 241, 242, 244, 376, 220, 258, 259, 260, 261, 775 | 262, 263, 126, 220, 1, 86, 378, 30, 29, 1, 776 | 208, 59, 85, 32, 349, 220, 94, 33, 418, 375, 777 | 246, 1, 33, 171, 238, 61, 425, 1, 439, 87, 778 | 1, 64, 62, 506, 265, 8, 84, 65, 59, 285, 779 | 512, 59, 444, 96, 256, 103, 445, 406, 286, 287, 780 | 407, 446, 61, 79, 383, 67, 68, 221, 1, 62, 781 | 439, 145, 222, 511, 93, 71, 72, 413, 464, 89, 782 | 373, 117, 118, 25, 26, 26, 122, 465, 25, 123, 783 | 26, 443, 75, 76, 117, 504, 131, 266, 347, 119, 784 | 348, 356, 26, 230, 347, 232, 348, 371, 392, 25, 785 | 392, 392, 392, 392, 433, 96, 392, 131, 8, 84, 786 | 93, 392, 214, 87, 392, 87, 224, 392, 69, 321, 787 | 66, 403, 562, 362, 464, 256, 389, 25, 73, 26, 788 | 425, 208, 568, 473, 274, 275, 97, 387, -175, 119, 789 | 87, 2, 254, 108, 87, 77, 97, 87, 394, 87, 790 | 111, 289, 290, 291, 292, 293, 294, 295, 296, 297, 791 | 298, 301, 405, 109, 302, 303, 444, 113, 389, 411, 792 | 527, 351, 8, 84, 10, 528, 12, 13, 14, 15, 793 | 16, 17, 18, 19, 20, 21, 22, 408, 276, 277, 794 | 115, 437, 208, 438, 489, -63, -63, -63, -63, 138, 795 | 352, 138, 424, -63, 116, -63, 558, 505, 299, 379, 796 | 304, 305, 380, 306, 503, 559, 120, 121, 462, 537, 797 | 538, 539, 127, 254, 450, 543, 392, 119, 133, 208, 798 | 138, 515, 347, 138, 382, 138, 139, 137, 139, 137, 799 | 384, 171, 129, 171, 154, 347, 460, 382, 513, 26, 800 | 530, 514, 513, 147, 533, 532, 563, 534, 513, 271, 801 | 272, 535, 155, 223, 156, 133, 469, 139, 137, 123, 802 | 139, 137, 139, 137, 513, 513, 226, 569, 570, 505, 803 | 157, 227, 158, 159, 98, 99, 100, 462, 160, 491, 804 | 12, 13, 14, 101, 16, 17, 475, 476, 477, 228, 805 | 392, 481, 131, 279, 280, 80, 282, 283, 375, 246, 806 | 452, 453, 231, 450, 356, 356, 233, 171, 171, 208, 807 | 500, 502, 234, 469, 239, 492, 510, 235, 214, 264, 808 | 469, 162, 388, 163, 352, 214, 267, 164, 269, 208, 809 | 165, 166, 117, 268, 167, 168, 270, 2, 496, 453, 810 | 497, 453, 447, 448, 220, 307, 208, 353, 354, 355, 811 | 359, 521, 214, 171, -161, 368, 529, 369, 384, 372, 812 | 420, 381, 385, 421, 386, 469, -234, 412, 8, 84, 813 | 10, 414, 12, 13, 14, 15, 16, 17, 18, 19, 814 | 20, 21, 22, 551, 415, 416, 419, 546, 422, 428, 815 | 429, 540, 541, 431, 430, 545, 135, 440, 457, 451, 816 | 454, 561, 469, 456, 309, 2, 156, 133, 214, 455, 817 | 467, 472, 469, 474, 555, 478, 556, 482, 566, 483, 818 | 484, 485, 157, 519, 158, 159, 495, 523, 486, 565, 819 | 160, 3, 4, 5, 6, 7, 8, 9, 10, 11, 820 | 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 821 | 22, 310, 311, 312, 487, 313, 314, 315, 316, 317, 822 | 318, 319, 320, 23, 24, 509, 516, 129, 517, 518, 823 | 522, 524, 525, 162, 542, 163, 526, 531, 548, 164, 824 | 553, 549, 165, 166, 557, 554, 167, 168, 155, 2, 825 | 156, 133, 564, 567, 572, 573, 88, 207, 237, 459, 826 | 102, 236, 374, 370, 499, 498, 157, 229, 158, 159, 827 | 95, 442, 427, 395, 160, 3, 4, 5, 6, 7, 828 | 8, 84, 10, 11, 12, 13, 14, 15, 16, 17, 829 | 18, 19, 20, 21, 22, 309, 240, 156, 133, 396, 830 | 398, 391, 397, 400, 401, 399, 402, 494, 410, 493, 831 | 536, 552, 0, 157, 0, 158, 159, 162, 0, 163, 832 | 0, 160, 0, 164, 0, 0, 165, 166, 417, 0, 833 | 167, 168, 0, 0, 0, 0, 0, 0, 0, 0, 834 | 0, 0, 310, 311, 312, 0, 313, 314, 315, 316, 835 | 317, 318, 319, 320, 23, 24, 0, 0, 129, 0, 836 | 0, 0, 0, 0, 162, 0, 163, 0, 0, 0, 837 | 164, 0, 0, 165, 166, 0, 0, 167, 168, 245, 838 | 246, 156, 133, 0, 0, 0, 0, 0, 0, 0, 839 | 0, 0, 0, 0, 0, 0, 0, 157, 0, 158, 840 | 159, 245, 246, 156, 133, 160, 0, 0, 0, 0, 841 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 157, 842 | 0, 158, 159, 0, 0, 0, 0, 160, 0, 0, 843 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 844 | 0, 0, 161, 247, 0, 248, 249, 0, 162, 0, 845 | 163, 0, 0, 0, 164, 0, 0, 165, 166, 0, 846 | 0, 167, 168, 0, 161, 458, 0, 248, 249, 0, 847 | 162, 0, 163, 0, 0, 0, 164, 0, 0, 165, 848 | 166, 0, 0, 167, 168, 245, 246, 156, 133, 0, 849 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 850 | 0, 0, 0, 157, 0, 158, 159, 155, 0, 156, 851 | 133, 160, 0, 0, 0, 0, 0, 0, 0, 0, 852 | 0, 0, 0, 0, 0, 157, 0, 158, 159, 155, 853 | 0, 156, 133, 160, 0, 0, 0, 0, 0, 0, 854 | 0, 0, 0, 0, 0, 0, 0, 157, 468, 158, 855 | 159, 504, 0, 0, 162, 160, 163, 0, 0, 0, 856 | 164, 0, 0, 165, 166, 0, 0, 167, 168, 501, 857 | 161, 0, 0, 0, 0, 0, 162, 0, 163, 0, 858 | 0, 0, 164, 0, 0, 165, 166, 0, 0, 167, 859 | 168, 0, 161, 0, 0, 0, 0, 0, 162, 155, 860 | 163, 156, 133, 0, 164, 0, 0, 165, 166, 0, 861 | 0, 167, 168, 0, 0, 0, 0, 157, 0, 158, 862 | 159, 155, 0, 156, 133, 160, 0, 0, 0, 0, 863 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 157, 864 | 0, 158, 159, 0, 0, 0, 0, 160, 0, 0, 865 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 866 | 0, 0, 0, 0, 393, 0, 0, 0, 162, 0, 867 | 163, 0, 0, 0, 164, 0, 0, 165, 166, 0, 868 | 0, 167, 168, 0, 404, 0, 0, 0, 0, 0, 869 | 162, 155, 163, 156, 133, 0, 164, 0, 0, 165, 870 | 166, 0, 0, 167, 168, 0, 0, 0, 0, 157, 871 | 0, 158, 159, 0, 0, 0, 155, 160, 156, 133, 872 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 873 | 0, 0, 0, 0, 157, 0, 158, 159, 155, 0, 874 | 156, 133, 160, 0, 0, 0, 0, 0, 0, 0, 875 | 0, 0, 0, 0, 0, 0, 157, 0, 158, 159, 876 | 162, 409, 163, 0, 160, 0, 164, 0, 0, 165, 877 | 166, 0, 0, 167, 168, 0, 423, 0, 0, 0, 878 | 0, 0, 0, 0, 0, 162, 0, 163, 0, 0, 879 | 0, 164, 0, 0, 165, 166, 0, 0, 167, 168, 880 | 0, 0, 0, 0, 0, 0, 432, 162, 155, 163, 881 | 156, 133, 0, 164, 0, 0, 165, 166, 0, 0, 882 | 167, 168, 0, 0, 0, 0, 157, 0, 158, 159, 883 | 0, 0, 0, 155, 160, 156, 133, 0, 0, 0, 884 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 885 | 0, 157, 0, 158, 159, 155, 0, 156, 133, 160, 886 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 887 | 0, 468, 0, 157, 0, 158, 159, 162, 0, 163, 888 | 0, 160, 0, 164, 0, 0, 165, 166, 0, 0, 889 | 167, 168, 0, 479, 0, 0, 0, 0, 0, 0, 890 | 0, 0, 162, 0, 163, 0, 0, 0, 164, 0, 891 | 0, 165, 166, 0, 0, 167, 168, 0, 0, 0, 892 | 0, 0, 0, 488, 162, 155, 163, 156, 133, 0, 893 | 164, 0, 0, 165, 166, 0, 0, 167, 168, 0, 894 | 0, 0, 0, 157, 0, 158, 159, 0, 0, 0, 895 | 155, 160, 156, 133, 0, 0, 0, 0, 0, 0, 896 | 0, 0, 0, 0, 0, 0, 0, 0, 157, 0, 897 | 158, 159, 155, 0, 156, 133, 160, 0, 0, 0, 898 | 0, 0, 0, 0, 0, 520, 0, 0, 0, 0, 899 | 157, 0, 158, 159, 162, 0, 163, 0, 160, 0, 900 | 164, 0, 0, 165, 166, 0, 0, 167, 168, 0, 901 | 544, 0, 0, 0, 0, 0, 0, 0, 0, 162, 902 | 0, 163, 0, 0, 0, 164, 0, 0, 165, 166, 903 | 0, 0, 167, 168, 0, 550, 0, 0, 0, 0, 904 | 0, 162, 155, 163, 156, 133, 0, 164, 0, 0, 905 | 165, 166, 0, 0, 167, 168, 0, 0, 0, 0, 906 | 157, 0, 158, 159, 155, 0, 156, 133, 160, 0, 907 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 908 | 0, 0, 157, 0, 158, 159, 155, 0, 156, 133, 909 | 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 910 | 0, 0, 0, 0, 0, 560, 158, 159, 0, 0, 911 | 0, 162, 160, 163, 0, 0, 0, 164, 0, 0, 912 | 165, 166, 0, 0, 167, 168, 0, 0, 0, 0, 913 | 0, 0, 0, 162, 0, 163, 0, 0, 0, 164, 914 | 0, 0, 165, 166, 0, 0, 167, 168, 0, 461, 915 | 155, 0, 156, 133, 0, 162, 0, 163, 0, 0, 916 | 0, 164, 0, 0, 165, 166, 0, 0, 167, 168, 917 | 158, 159, 155, 0, 156, 133, 160, 0, 0, 0, 918 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 919 | 0, 0, 158, 159, 0, 0, 0, 0, 160, 0, 920 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 921 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 162, 922 | 0, 163, 0, 0, 0, 164, 0, 0, 165, 166, 923 | 1, 2, 167, 168, 0, 0, 0, 0, 0, 0, 924 | 0, 243, 0, 163, 0, 0, 0, 164, 0, 0, 925 | 165, 166, 0, 0, 167, 168, 0, 3, 4, 5, 926 | 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 927 | 16, 17, 18, 19, 20, 21, 22, 1, 2, 0, 928 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 929 | 24, 0, 0, 0, 0, 0, 0, 0, 2, 25, 930 | 0, 26, 0, 0, 3, 4, 5, 6, 7, 8, 931 | 84, 10, 11, 12, 13, 14, 15, 16, 17, 18, 932 | 19, 20, 21, 22, 3, 4, 5, 6, 7, 8, 933 | 84, 10, 11, 12, 13, 14, 15, 16, 17, 18, 934 | 19, 20, 21, 22, 347, 2, 348, 434, 26, 0, 935 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 936 | 0, 0, 0, 0, 347, 0, 382, 434, 26, 0, 937 | 0, 3, 4, 5, 6, 7, 8, 84, 10, 11, 938 | 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 939 | 22, 213, 2, 0, 0, 0, 0, 0, 0, 0, 940 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 941 | 0, 0, 2, 0, 490, 441, 0, 0, 3, 4, 942 | 5, 6, 7, 8, 84, 10, 11, 12, 13, 14, 943 | 15, 16, 17, 18, 19, 20, 21, 22, 3, 4, 944 | 5, 6, 7, 8, 84, 10, 11, 12, 13, 14, 945 | 15, 16, 17, 18, 19, 20, 21, 22, 2, 0, 946 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 947 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 948 | 0, 0, 0, 0, 3, 4, 5, 6, 7, 8, 949 | 84, 10, 11, 12, 13, 14, 15, 16, 17, 18, 950 | 19, 20, 21, 22 951 | }; 952 | 953 | static const short yycheck[] = { 109, 954 | 0, 0, 25, 132, 104, 123, 0, 30, 123, 393, 955 | 0, 158, 159, 160, 248, 6, 163, 164, 165, 166, 956 | 167, 168, 95, 6, 3, 26, 249, 27, 27, 3, 957 | 128, 0, 26, 27, 214, 6, 30, 27, 315, 3, 958 | 4, 3, 32, 161, 154, 0, 323, 3, 352, 26, 959 | 3, 62, 0, 461, 22, 35, 36, 46, 27, 74, 960 | 468, 30, 64, 32, 162, 42, 68, 301, 83, 84, 961 | 304, 73, 27, 36, 254, 3, 4, 68, 3, 27, 962 | 384, 112, 73, 467, 107, 3, 4, 310, 64, 63, 963 | 73, 81, 86, 72, 74, 74, 62, 73, 72, 65, 964 | 74, 72, 3, 4, 94, 69, 105, 75, 70, 86, 965 | 72, 221, 74, 144, 70, 146, 72, 235, 265, 72, 966 | 267, 268, 269, 270, 347, 94, 273, 126, 35, 36, 967 | 153, 278, 132, 110, 281, 112, 137, 284, 66, 212, 968 | 42, 288, 550, 68, 64, 243, 264, 72, 66, 74, 969 | 427, 249, 560, 73, 25, 26, 70, 257, 72, 136, 970 | 137, 4, 162, 72, 141, 66, 70, 144, 266, 146, 971 | 66, 8, 9, 10, 11, 12, 13, 14, 15, 16, 972 | 17, 20, 300, 72, 23, 24, 64, 66, 306, 307, 973 | 68, 214, 35, 36, 37, 73, 39, 40, 41, 42, 974 | 43, 44, 45, 46, 47, 48, 49, 305, 79, 80, 975 | 66, 70, 310, 72, 437, 62, 63, 64, 65, 110, 976 | 214, 112, 320, 70, 73, 72, 64, 461, 65, 64, 977 | 69, 70, 67, 72, 457, 73, 63, 64, 385, 516, 978 | 517, 518, 71, 243, 362, 522, 393, 224, 6, 347, 979 | 141, 474, 70, 144, 72, 146, 110, 110, 112, 112, 980 | 254, 379, 66, 381, 72, 70, 381, 72, 64, 74, 981 | 504, 67, 64, 3, 64, 67, 553, 67, 64, 18, 982 | 19, 67, 3, 136, 5, 6, 404, 141, 141, 65, 983 | 144, 144, 146, 146, 64, 64, 63, 67, 67, 533, 984 | 21, 63, 23, 24, 36, 37, 38, 454, 29, 438, 985 | 39, 40, 41, 42, 43, 44, 414, 415, 416, 67, 986 | 467, 419, 321, 27, 28, 348, 81, 82, 3, 4, 987 | 63, 64, 67, 451, 444, 445, 67, 455, 456, 437, 988 | 455, 456, 64, 461, 3, 443, 464, 65, 348, 72, 989 | 468, 72, 73, 74, 348, 355, 21, 78, 77, 457, 990 | 81, 82, 352, 76, 85, 86, 78, 4, 63, 64, 991 | 63, 64, 360, 361, 6, 64, 474, 73, 64, 64, 992 | 63, 479, 382, 501, 68, 67, 501, 67, 382, 67, 993 | 3, 68, 73, 63, 73, 513, 68, 71, 35, 36, 994 | 37, 72, 39, 40, 41, 42, 43, 44, 45, 46, 995 | 47, 48, 49, 531, 72, 72, 72, 527, 63, 68, 996 | 68, 519, 520, 63, 68, 523, 63, 3, 7, 68, 997 | 73, 549, 550, 71, 3, 4, 5, 6, 438, 65, 998 | 68, 71, 560, 7, 542, 55, 544, 63, 558, 63, 999 | 67, 71, 21, 72, 23, 24, 63, 63, 73, 557, 1000 | 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 1001 | 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 1002 | 49, 50, 51, 52, 73, 54, 55, 56, 57, 58, 1003 | 59, 60, 61, 62, 63, 73, 73, 66, 73, 73, 1004 | 73, 71, 73, 72, 63, 74, 73, 68, 63, 78, 1005 | 53, 65, 81, 82, 63, 73, 85, 86, 3, 4, 1006 | 5, 6, 63, 63, 0, 0, 27, 125, 153, 379, 1007 | 41, 152, 243, 234, 453, 451, 21, 141, 23, 24, 1008 | 30, 355, 326, 267, 29, 30, 31, 32, 33, 34, 1009 | 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 1010 | 45, 46, 47, 48, 49, 3, 157, 5, 6, 268, 1011 | 270, 265, 269, 278, 281, 273, 284, 445, 306, 444, 1012 | 513, 533, -1, 21, -1, 23, 24, 72, -1, 74, 1013 | -1, 29, -1, 78, -1, -1, 81, 82, 36, -1, 1014 | 85, 86, -1, -1, -1, -1, -1, -1, -1, -1, 1015 | -1, -1, 50, 51, 52, -1, 54, 55, 56, 57, 1016 | 58, 59, 60, 61, 62, 63, -1, -1, 66, -1, 1017 | -1, -1, -1, -1, 72, -1, 74, -1, -1, -1, 1018 | 78, -1, -1, 81, 82, -1, -1, 85, 86, 3, 1019 | 4, 5, 6, -1, -1, -1, -1, -1, -1, -1, 1020 | -1, -1, -1, -1, -1, -1, -1, 21, -1, 23, 1021 | 24, 3, 4, 5, 6, 29, -1, -1, -1, -1, 1022 | -1, -1, -1, -1, -1, -1, -1, -1, -1, 21, 1023 | -1, 23, 24, -1, -1, -1, -1, 29, -1, -1, 1024 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1025 | -1, -1, 66, 67, -1, 69, 70, -1, 72, -1, 1026 | 74, -1, -1, -1, 78, -1, -1, 81, 82, -1, 1027 | -1, 85, 86, -1, 66, 67, -1, 69, 70, -1, 1028 | 72, -1, 74, -1, -1, -1, 78, -1, -1, 81, 1029 | 82, -1, -1, 85, 86, 3, 4, 5, 6, -1, 1030 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1031 | -1, -1, -1, 21, -1, 23, 24, 3, -1, 5, 1032 | 6, 29, -1, -1, -1, -1, -1, -1, -1, -1, 1033 | -1, -1, -1, -1, -1, 21, -1, 23, 24, 3, 1034 | -1, 5, 6, 29, -1, -1, -1, -1, -1, -1, 1035 | -1, -1, -1, -1, -1, -1, -1, 21, 66, 23, 1036 | 24, 69, -1, -1, 72, 29, 74, -1, -1, -1, 1037 | 78, -1, -1, 81, 82, -1, -1, 85, 86, 65, 1038 | 66, -1, -1, -1, -1, -1, 72, -1, 74, -1, 1039 | -1, -1, 78, -1, -1, 81, 82, -1, -1, 85, 1040 | 86, -1, 66, -1, -1, -1, -1, -1, 72, 3, 1041 | 74, 5, 6, -1, 78, -1, -1, 81, 82, -1, 1042 | -1, 85, 86, -1, -1, -1, -1, 21, -1, 23, 1043 | 24, 3, -1, 5, 6, 29, -1, -1, -1, -1, 1044 | -1, -1, -1, -1, -1, -1, -1, -1, -1, 21, 1045 | -1, 23, 24, -1, -1, -1, -1, 29, -1, -1, 1046 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1047 | -1, -1, -1, -1, 68, -1, -1, -1, 72, -1, 1048 | 74, -1, -1, -1, 78, -1, -1, 81, 82, -1, 1049 | -1, 85, 86, -1, 66, -1, -1, -1, -1, -1, 1050 | 72, 3, 74, 5, 6, -1, 78, -1, -1, 81, 1051 | 82, -1, -1, 85, 86, -1, -1, -1, -1, 21, 1052 | -1, 23, 24, -1, -1, -1, 3, 29, 5, 6, 1053 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1054 | -1, -1, -1, -1, 21, -1, 23, 24, 3, -1, 1055 | 5, 6, 29, -1, -1, -1, -1, -1, -1, -1, 1056 | -1, -1, -1, -1, -1, -1, 21, -1, 23, 24, 1057 | 72, 73, 74, -1, 29, -1, 78, -1, -1, 81, 1058 | 82, -1, -1, 85, 86, -1, 63, -1, -1, -1, 1059 | -1, -1, -1, -1, -1, 72, -1, 74, -1, -1, 1060 | -1, 78, -1, -1, 81, 82, -1, -1, 85, 86, 1061 | -1, -1, -1, -1, -1, -1, 71, 72, 3, 74, 1062 | 5, 6, -1, 78, -1, -1, 81, 82, -1, -1, 1063 | 85, 86, -1, -1, -1, -1, 21, -1, 23, 24, 1064 | -1, -1, -1, 3, 29, 5, 6, -1, -1, -1, 1065 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1066 | -1, 21, -1, 23, 24, 3, -1, 5, 6, 29, 1067 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1068 | -1, 66, -1, 21, -1, 23, 24, 72, -1, 74, 1069 | -1, 29, -1, 78, -1, -1, 81, 82, -1, -1, 1070 | 85, 86, -1, 63, -1, -1, -1, -1, -1, -1, 1071 | -1, -1, 72, -1, 74, -1, -1, -1, 78, -1, 1072 | -1, 81, 82, -1, -1, 85, 86, -1, -1, -1, 1073 | -1, -1, -1, 71, 72, 3, 74, 5, 6, -1, 1074 | 78, -1, -1, 81, 82, -1, -1, 85, 86, -1, 1075 | -1, -1, -1, 21, -1, 23, 24, -1, -1, -1, 1076 | 3, 29, 5, 6, -1, -1, -1, -1, -1, -1, 1077 | -1, -1, -1, -1, -1, -1, -1, -1, 21, -1, 1078 | 23, 24, 3, -1, 5, 6, 29, -1, -1, -1, 1079 | -1, -1, -1, -1, -1, 63, -1, -1, -1, -1, 1080 | 21, -1, 23, 24, 72, -1, 74, -1, 29, -1, 1081 | 78, -1, -1, 81, 82, -1, -1, 85, 86, -1, 1082 | 63, -1, -1, -1, -1, -1, -1, -1, -1, 72, 1083 | -1, 74, -1, -1, -1, 78, -1, -1, 81, 82, 1084 | -1, -1, 85, 86, -1, 66, -1, -1, -1, -1, 1085 | -1, 72, 3, 74, 5, 6, -1, 78, -1, -1, 1086 | 81, 82, -1, -1, 85, 86, -1, -1, -1, -1, 1087 | 21, -1, 23, 24, 3, -1, 5, 6, 29, -1, 1088 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1089 | -1, -1, 21, -1, 23, 24, 3, -1, 5, 6, 1090 | 29, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1091 | -1, -1, -1, -1, -1, 66, 23, 24, -1, -1, 1092 | -1, 72, 29, 74, -1, -1, -1, 78, -1, -1, 1093 | 81, 82, -1, -1, 85, 86, -1, -1, -1, -1, 1094 | -1, -1, -1, 72, -1, 74, -1, -1, -1, 78, 1095 | -1, -1, 81, 82, -1, -1, 85, 86, -1, 66, 1096 | 3, -1, 5, 6, -1, 72, -1, 74, -1, -1, 1097 | -1, 78, -1, -1, 81, 82, -1, -1, 85, 86, 1098 | 23, 24, 3, -1, 5, 6, 29, -1, -1, -1, 1099 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1100 | -1, -1, 23, 24, -1, -1, -1, -1, 29, -1, 1101 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1102 | -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, 1103 | -1, 74, -1, -1, -1, 78, -1, -1, 81, 82, 1104 | 3, 4, 85, 86, -1, -1, -1, -1, -1, -1, 1105 | -1, 72, -1, 74, -1, -1, -1, 78, -1, -1, 1106 | 81, 82, -1, -1, 85, 86, -1, 30, 31, 32, 1107 | 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 1108 | 43, 44, 45, 46, 47, 48, 49, 3, 4, -1, 1109 | -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, 1110 | 63, -1, -1, -1, -1, -1, -1, -1, 4, 72, 1111 | -1, 74, -1, -1, 30, 31, 32, 33, 34, 35, 1112 | 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 1113 | 46, 47, 48, 49, 30, 31, 32, 33, 34, 35, 1114 | 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 1115 | 46, 47, 48, 49, 70, 4, 72, 73, 74, -1, 1116 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1117 | -1, -1, -1, -1, 70, -1, 72, 73, 74, -1, 1118 | -1, 30, 31, 32, 33, 34, 35, 36, 37, 38, 1119 | 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 1120 | 49, 3, 4, -1, -1, -1, -1, -1, -1, -1, 1121 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1122 | -1, -1, 4, -1, 73, 7, -1, -1, 30, 31, 1123 | 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 1124 | 42, 43, 44, 45, 46, 47, 48, 49, 30, 31, 1125 | 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 1126 | 42, 43, 44, 45, 46, 47, 48, 49, 4, -1, 1127 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1128 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1129 | -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 1130 | 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 1131 | 46, 47, 48, 49 1132 | }; 1133 | /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ 1134 | #line 3 "/usr/share/misc/bison.simple" 1135 | 1136 | /* Skeleton output parser for bison, 1137 | Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. 1138 | 1139 | This program is free software; you can redistribute it and/or modify 1140 | it under the terms of the GNU General Public License as published by 1141 | the Free Software Foundation; either version 2, or (at your option) 1142 | any later version. 1143 | 1144 | This program is distributed in the hope that it will be useful, 1145 | but WITHOUT ANY WARRANTY; without even the implied warranty of 1146 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1147 | GNU General Public License for more details. 1148 | 1149 | You should have received a copy of the GNU General Public License 1150 | along with this program; if not, write to the Free Software 1151 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 1152 | 1153 | /* As a special exception, when this file is copied by Bison into a 1154 | Bison output file, you may use that output file without restriction. 1155 | This special exception was added by the Free Software Foundation 1156 | in version 1.24 of Bison. */ 1157 | 1158 | #ifndef alloca 1159 | #ifdef __GNUC__ 1160 | #define alloca __builtin_alloca 1161 | #else /* not GNU C. */ 1162 | #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) 1163 | #include <alloca.h> 1164 | #else /* not sparc */ 1165 | #if defined (MSDOS) && !defined (__TURBOC__) 1166 | #include <malloc.h> 1167 | #else /* not MSDOS, or __TURBOC__ */ 1168 | #if defined(_AIX) 1169 | #include <malloc.h> 1170 | #pragma alloca 1171 | #else /* not MSDOS, __TURBOC__, or _AIX */ 1172 | #ifdef __hpux 1173 | #ifdef __cplusplus 1174 | extern "C" { 1175 | void *alloca (unsigned int); 1176 | }; 1177 | #else /* not __cplusplus */ 1178 | void *alloca (); 1179 | #endif /* not __cplusplus */ 1180 | #endif /* __hpux */ 1181 | #endif /* not _AIX */ 1182 | #endif /* not MSDOS, or __TURBOC__ */ 1183 | #endif /* not sparc. */ 1184 | #endif /* not GNU C. */ 1185 | #endif /* alloca not defined. */ 1186 | 1187 | /* This is the parser code that is written into each bison parser 1188 | when the %semantic_parser declaration is not specified in the grammar. 1189 | It was written by Richard Stallman by simplifying the hairy parser 1190 | used when %semantic_parser is specified. */ 1191 | 1192 | /* Note: there must be only one dollar sign in this file. 1193 | It is replaced by the list of actions, each action 1194 | as one case of the switch. */ 1195 | 1196 | #define yyerrok (yyerrstatus = 0) 1197 | #define yyclearin (yychar = YYEMPTY) 1198 | #define YYEMPTY -2 1199 | #define YYEOF 0 1200 | #define YYACCEPT return(0) 1201 | #define YYABORT return(1) 1202 | #define YYERROR goto yyerrlab1 1203 | /* Like YYERROR except do call yyerror. 1204 | This remains here temporarily to ease the 1205 | transition to the new meaning of YYERROR, for GCC. 1206 | Once GCC version 2 has supplanted version 1, this can go. */ 1207 | #define YYFAIL goto yyerrlab 1208 | #define YYRECOVERING() (!!yyerrstatus) 1209 | #define YYBACKUP(token, value) \ 1210 | do \ 1211 | if (yychar == YYEMPTY && yylen == 1) \ 1212 | { yychar = (token), yylval = (value); \ 1213 | yychar1 = YYTRANSLATE (yychar); \ 1214 | YYPOPSTACK; \ 1215 | goto yybackup; \ 1216 | } \ 1217 | else \ 1218 | { yyerror ("syntax error: cannot back up"); YYERROR; } \ 1219 | while (0) 1220 | 1221 | #define YYTERROR 1 1222 | #define YYERRCODE 256 1223 | 1224 | #ifndef YYPURE 1225 | #define YYLEX yylex() 1226 | #endif 1227 | 1228 | #ifdef YYPURE 1229 | #ifdef YYLSP_NEEDED 1230 | #ifdef YYLEX_PARAM 1231 | #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) 1232 | #else 1233 | #define YYLEX yylex(&yylval, &yylloc) 1234 | #endif 1235 | #else /* not YYLSP_NEEDED */ 1236 | #ifdef YYLEX_PARAM 1237 | #define YYLEX yylex(&yylval, YYLEX_PARAM) 1238 | #else 1239 | #define YYLEX yylex(&yylval) 1240 | #endif 1241 | #endif /* not YYLSP_NEEDED */ 1242 | #endif 1243 | 1244 | /* If nonreentrant, generate the variables here */ 1245 | 1246 | #ifndef YYPURE 1247 | 1248 | int yychar; /* the lookahead symbol */ 1249 | YYSTYPE yylval; /* the semantic value of the */ 1250 | /* lookahead symbol */ 1251 | 1252 | #ifdef YYLSP_NEEDED 1253 | YYLTYPE yylloc; /* location data for the lookahead */ 1254 | /* symbol */ 1255 | #endif 1256 | 1257 | int yynerrs; /* number of parse errors so far */ 1258 | #endif /* not YYPURE */ 1259 | 1260 | #if YYDEBUG != 0 1261 | int yydebug; /* nonzero means print parse trace */ 1262 | /* Since this is uninitialized, it does not stop multiple parsers 1263 | from coexisting. */ 1264 | #endif 1265 | 1266 | /* YYINITDEPTH indicates the initial size of the parser's stacks */ 1267 | 1268 | #ifndef YYINITDEPTH 1269 | #define YYINITDEPTH 200 1270 | #endif 1271 | 1272 | /* YYMAXDEPTH is the maximum size the stacks can grow to 1273 | (effective only if the built-in stack extension method is used). */ 1274 | 1275 | #if YYMAXDEPTH == 0 1276 | #undef YYMAXDEPTH 1277 | #endif 1278 | 1279 | #ifndef YYMAXDEPTH 1280 | #define YYMAXDEPTH 10000 1281 | #endif 1282 | 1283 | /* Prevent warning if -Wstrict-prototypes. */ 1284 | #ifdef __GNUC__ 1285 | #ifndef YYPARSE_PARAM 1286 | int yyparse (void); 1287 | #endif 1288 | #endif 1289 | 1290 | #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ 1291 | #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) 1292 | #else /* not GNU C or C++ */ 1293 | #ifndef __cplusplus 1294 | 1295 | /* This is the most reliable way to avoid incompatibilities 1296 | in available built-in functions on various systems. */ 1297 | static void 1298 | __yy_memcpy (to, from, count) 1299 | char *to; 1300 | char *from; 1301 | int count; 1302 | { 1303 | register char *f = from; 1304 | register char *t = to; 1305 | register int i = count; 1306 | 1307 | while (i-- > 0) 1308 | *t++ = *f++; 1309 | } 1310 | 1311 | #else /* __cplusplus */ 1312 | 1313 | /* This is the most reliable way to avoid incompatibilities 1314 | in available built-in functions on various systems. */ 1315 | static void 1316 | __yy_memcpy (char *to, char *from, int count) 1317 | { 1318 | register char *f = from; 1319 | register char *t = to; 1320 | register int i = count; 1321 | 1322 | while (i-- > 0) 1323 | *t++ = *f++; 1324 | } 1325 | 1326 | #endif 1327 | #endif 1328 | 1329 | #line 196 "/usr/share/misc/bison.simple" 1330 | 1331 | /* The user can define YYPARSE_PARAM as the name of an argument to be passed 1332 | into yyparse. The argument should have type void *. 1333 | It should actually point to an object. 1334 | Grammar actions can access the variable by casting it 1335 | to the proper pointer type. */ 1336 | 1337 | #ifdef YYPARSE_PARAM 1338 | #ifdef __cplusplus 1339 | #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM 1340 | #define YYPARSE_PARAM_DECL 1341 | #else /* not __cplusplus */ 1342 | #define YYPARSE_PARAM_ARG YYPARSE_PARAM 1343 | #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; 1344 | #endif /* not __cplusplus */ 1345 | #else /* not YYPARSE_PARAM */ 1346 | #define YYPARSE_PARAM_ARG 1347 | #define YYPARSE_PARAM_DECL 1348 | #endif /* not YYPARSE_PARAM */ 1349 | 1350 | int 1351 | yyparse(YYPARSE_PARAM_ARG) 1352 | YYPARSE_PARAM_DECL 1353 | { 1354 | register int yystate; 1355 | register int yyn; 1356 | register short *yyssp; 1357 | register YYSTYPE *yyvsp; 1358 | int yyerrstatus; /* number of tokens to shift before error messages enabled */ 1359 | int yychar1 = 0; /* lookahead token as an internal (translated) token number */ 1360 | 1361 | short yyssa[YYINITDEPTH]; /* the state stack */ 1362 | YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ 1363 | 1364 | short *yyss = yyssa; /* refer to the stacks thru separate pointers */ 1365 | YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ 1366 | 1367 | #ifdef YYLSP_NEEDED 1368 | YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ 1369 | YYLTYPE *yyls = yylsa; 1370 | YYLTYPE *yylsp; 1371 | 1372 | #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) 1373 | #else 1374 | #define YYPOPSTACK (yyvsp--, yyssp--) 1375 | #endif 1376 | 1377 | int yystacksize = YYINITDEPTH; 1378 | 1379 | #ifdef YYPURE 1380 | int yychar; 1381 | YYSTYPE yylval; 1382 | int yynerrs; 1383 | #ifdef YYLSP_NEEDED 1384 | YYLTYPE yylloc; 1385 | #endif 1386 | #endif 1387 | 1388 | YYSTYPE yyval; /* the variable used to return */ 1389 | /* semantic values from the action */ 1390 | /* routines */ 1391 | 1392 | int yylen; 1393 | 1394 | #if YYDEBUG != 0 1395 | if (yydebug) 1396 | fprintf(stderr, "Starting parse\n"); 1397 | #endif 1398 | 1399 | yystate = 0; 1400 | yyerrstatus = 0; 1401 | yynerrs = 0; 1402 | yychar = YYEMPTY; /* Cause a token to be read. */ 1403 | 1404 | /* Initialize stack pointers. 1405 | Waste one element of value and location stack 1406 | so that they stay on the same level as the state stack. 1407 | The wasted elements are never initialized. */ 1408 | 1409 | yyssp = yyss - 1; 1410 | yyvsp = yyvs; 1411 | #ifdef YYLSP_NEEDED 1412 | yylsp = yyls; 1413 | #endif 1414 | 1415 | /* Push a new state, which is found in yystate . */ 1416 | /* In all cases, when you get here, the value and location stacks 1417 | have just been pushed. so pushing a state here evens the stacks. */ 1418 | yynewstate: 1419 | 1420 | *++yyssp = yystate; 1421 | 1422 | if (yyssp >= yyss + yystacksize - 1) 1423 | { 1424 | /* Give user a chance to reallocate the stack */ 1425 | /* Use copies of these so that the &'s don't force the real ones into memory. */ 1426 | YYSTYPE *yyvs1 = yyvs; 1427 | short *yyss1 = yyss; 1428 | #ifdef YYLSP_NEEDED 1429 | YYLTYPE *yyls1 = yyls; 1430 | #endif 1431 | 1432 | /* Get the current used size of the three stacks, in elements. */ 1433 | int size = yyssp - yyss + 1; 1434 | 1435 | #ifdef yyoverflow 1436 | /* Each stack pointer address is followed by the size of 1437 | the data in use in that stack, in bytes. */ 1438 | #ifdef YYLSP_NEEDED 1439 | /* This used to be a conditional around just the two extra args, 1440 | but that might be undefined if yyoverflow is a macro. */ 1441 | yyoverflow("parser stack overflow", 1442 | &yyss1, size * sizeof (*yyssp), 1443 | &yyvs1, size * sizeof (*yyvsp), 1444 | &yyls1, size * sizeof (*yylsp), 1445 | &yystacksize); 1446 | #else 1447 | yyoverflow("parser stack overflow", 1448 | &yyss1, size * sizeof (*yyssp), 1449 | &yyvs1, size * sizeof (*yyvsp), 1450 | &yystacksize); 1451 | #endif 1452 | 1453 | yyss = yyss1; yyvs = yyvs1; 1454 | #ifdef YYLSP_NEEDED 1455 | yyls = yyls1; 1456 | #endif 1457 | #else /* no yyoverflow */ 1458 | /* Extend the stack our own way. */ 1459 | if (yystacksize >= YYMAXDEPTH) 1460 | { 1461 | yyerror("parser stack overflow"); 1462 | return 2; 1463 | } 1464 | yystacksize *= 2; 1465 | if (yystacksize > YYMAXDEPTH) 1466 | yystacksize = YYMAXDEPTH; 1467 | yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); 1468 | __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp)); 1469 | yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); 1470 | __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp)); 1471 | #ifdef YYLSP_NEEDED 1472 | yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); 1473 | __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp)); 1474 | #endif 1475 | #endif /* no yyoverflow */ 1476 | 1477 | yyssp = yyss + size - 1; 1478 | yyvsp = yyvs + size - 1; 1479 | #ifdef YYLSP_NEEDED 1480 | yylsp = yyls + size - 1; 1481 | #endif 1482 | 1483 | #if YYDEBUG != 0 1484 | if (yydebug) 1485 | fprintf(stderr, "Stack size increased to %d\n", yystacksize); 1486 | #endif 1487 | 1488 | if (yyssp >= yyss + yystacksize - 1) 1489 | YYABORT; 1490 | } 1491 | 1492 | #if YYDEBUG != 0 1493 | if (yydebug) 1494 | fprintf(stderr, "Entering state %d\n", yystate); 1495 | #endif 1496 | 1497 | goto yybackup; 1498 | yybackup: 1499 | 1500 | /* Do appropriate processing given the current state. */ 1501 | /* Read a lookahead token if we need one and don't already have one. */ 1502 | /* yyresume: */ 1503 | 1504 | /* First try to decide what to do without reference to lookahead token. */ 1505 | 1506 | yyn = yypact[yystate]; 1507 | if (yyn == YYFLAG) 1508 | goto yydefault; 1509 | 1510 | /* Not known => get a lookahead token if don't already have one. */ 1511 | 1512 | /* yychar is either YYEMPTY or YYEOF 1513 | or a valid token in external form. */ 1514 | 1515 | if (yychar == YYEMPTY) 1516 | { 1517 | #if YYDEBUG != 0 1518 | if (yydebug) 1519 | fprintf(stderr, "Reading a token: "); 1520 | #endif 1521 | yychar = YYLEX; 1522 | } 1523 | 1524 | /* Convert token to internal form (in yychar1) for indexing tables with */ 1525 | 1526 | if (yychar <= 0) /* This means end of input. */ 1527 | { 1528 | yychar1 = 0; 1529 | yychar = YYEOF; /* Don't call YYLEX any more */ 1530 | 1531 | #if YYDEBUG != 0 1532 | if (yydebug) 1533 | fprintf(stderr, "Now at end of input.\n"); 1534 | #endif 1535 | } 1536 | else 1537 | { 1538 | yychar1 = YYTRANSLATE(yychar); 1539 | 1540 | #if YYDEBUG != 0 1541 | if (yydebug) 1542 | { 1543 | fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); 1544 | /* Give the individual parser a way to print the precise meaning 1545 | of a token, for further debugging info. */ 1546 | #ifdef YYPRINT 1547 | YYPRINT (stderr, yychar, yylval); 1548 | #endif 1549 | fprintf (stderr, ")\n"); 1550 | } 1551 | #endif 1552 | } 1553 | 1554 | yyn += yychar1; 1555 | if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) 1556 | goto yydefault; 1557 | 1558 | yyn = yytable[yyn]; 1559 | 1560 | /* yyn is what to do for this token type in this state. 1561 | Negative => reduce, -yyn is rule number. 1562 | Positive => shift, yyn is new state. 1563 | New state is final state => don't bother to shift, 1564 | just return success. 1565 | 0, or most negative number => error. */ 1566 | 1567 | if (yyn < 0) 1568 | { 1569 | if (yyn == YYFLAG) 1570 | goto yyerrlab; 1571 | yyn = -yyn; 1572 | goto yyreduce; 1573 | } 1574 | else if (yyn == 0) 1575 | goto yyerrlab; 1576 | 1577 | if (yyn == YYFINAL) 1578 | YYACCEPT; 1579 | 1580 | /* Shift the lookahead token. */ 1581 | 1582 | #if YYDEBUG != 0 1583 | if (yydebug) 1584 | fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); 1585 | #endif 1586 | 1587 | /* Discard the token being shifted unless it is eof. */ 1588 | if (yychar != YYEOF) 1589 | yychar = YYEMPTY; 1590 | 1591 | *++yyvsp = yylval; 1592 | #ifdef YYLSP_NEEDED 1593 | *++yylsp = yylloc; 1594 | #endif 1595 | 1596 | /* count tokens shifted since error; after three, turn off error status. */ 1597 | if (yyerrstatus) yyerrstatus--; 1598 | 1599 | yystate = yyn; 1600 | goto yynewstate; 1601 | 1602 | /* Do the default action for the current state. */ 1603 | yydefault: 1604 | 1605 | yyn = yydefact[yystate]; 1606 | if (yyn == 0) 1607 | goto yyerrlab; 1608 | 1609 | /* Do a reduction. yyn is the number of a rule to reduce with. */ 1610 | yyreduce: 1611 | yylen = yyr2[yyn]; 1612 | if (yylen > 0) 1613 | yyval = yyvsp[1-yylen]; /* implement default value of the action */ 1614 | 1615 | #if YYDEBUG != 0 1616 | if (yydebug) 1617 | { 1618 | int i; 1619 | 1620 | fprintf (stderr, "Reducing via rule %d (line %d), ", 1621 | yyn, yyrline[yyn]); 1622 | 1623 | /* Print the symbols being reduced, and their result. */ 1624 | for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) 1625 | fprintf (stderr, "%s ", yytname[yyrhs[i]]); 1626 | fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); 1627 | } 1628 | #endif 1629 | 1630 | 1631 | switch (yyn) { 1632 | 1633 | case 5: 1634 | #line 180 "parse.y" 1635 | { scope=0; reset(); common_comment=NULL; in_typedef=0; GetCurrentComment(); ; 1636 | break;} 1637 | case 6: 1638 | #line 182 "parse.y" 1639 | { scope=0; reset(); common_comment=NULL; in_typedef=0; GetCurrentComment(); ; 1640 | break;} 1641 | case 9: 1642 | #line 191 "parse.y" 1643 | { scope=0; reset(); common_comment=NULL; in_typedef=0; ; 1644 | break;} 1645 | case 10: 1646 | #line 193 "parse.y" 1647 | { scope=0; reset(); common_comment=NULL; in_typedef=0; 1648 | yyval=yyvsp[0]; ; 1649 | break;} 1650 | case 11: 1651 | #line 199 "parse.y" 1652 | { in_type_spec=0; ; 1653 | break;} 1654 | case 12: 1655 | #line 201 "parse.y" 1656 | { in_type_spec=0; ; 1657 | break;} 1658 | case 13: 1659 | #line 206 "parse.y" 1660 | { if(!in_typedef && !in_function && !common_comment) 1661 | {common_comment=CopyString(GetCurrentComment()); SetCurrentComment(common_comment);} ; 1662 | break;} 1663 | case 15: 1664 | #line 213 "parse.y" 1665 | { if(yyvsp[-1]) yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); else yyval=yyvsp[0]; ; 1666 | break;} 1667 | case 16: 1668 | #line 215 "parse.y" 1669 | { if(!current->type) current->type=yyvsp[0]; ; 1670 | break;} 1671 | case 17: 1672 | #line 217 "parse.y" 1673 | { if(!current->type) current->type=yyvsp[-1]; 1674 | yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ; 1675 | break;} 1676 | case 19: 1677 | #line 221 "parse.y" 1678 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ; 1679 | break;} 1680 | case 21: 1681 | #line 228 "parse.y" 1682 | { in_type_spec=1; ; 1683 | break;} 1684 | case 23: 1685 | #line 233 "parse.y" 1686 | { 1687 | if((in_function==0 || in_function==3) && !in_funcdef && !in_structunion) 1688 | { 1689 | char* specific_comment=GetCurrentComment(); 1690 | if(!common_comment) SetCurrentComment(specific_comment); else 1691 | if(!specific_comment) SetCurrentComment(common_comment); else 1692 | if(strcmp(common_comment,specific_comment)) SetCurrentComment(ConcatStrings(3,common_comment," ",specific_comment)); else 1693 | SetCurrentComment(common_comment); 1694 | } 1695 | 1696 | if(in_typedef) 1697 | { 1698 | char* vname=strstr(yyvsp[0],current->name); 1699 | SeenTypedefName(current->name,vname[strlen(current->name)]=='('?-1:1); 1700 | if(!in_header) 1701 | SeenTypedef(current->name,ConcatStrings(3,current->qual,current->type,yyvsp[0])); 1702 | if(in_function==3) 1703 | DownScope(); 1704 | } 1705 | else 1706 | if(in_function==2) 1707 | SeenFunctionArg(current->name,ConcatStrings(3,current->qual,current->type,yyvsp[0])); 1708 | else 1709 | { 1710 | char* vname=strstr(yyvsp[0],current->name); 1711 | if(vname[strlen(current->name)]!='(' && IsATypeName(current->type)!='f') 1712 | { 1713 | if((in_funcbody==0 || scope&EXTERN_F) && !in_structunion && !(in_header==GLOBAL && scope&EXTERN_H)) 1714 | SeenVariableDefinition(current->name,ConcatStrings(3,current->qual,current->type,yyvsp[0]),SCOPE); 1715 | else 1716 | if(in_funcbody) 1717 | SeenScopeVariable(current->name); 1718 | } 1719 | else 1720 | { 1721 | SeenFunctionProto(current->name,in_funcbody); 1722 | if(in_function==3) 1723 | DownScope(); 1724 | } 1725 | } 1726 | 1727 | if(in_function==3) in_function=0; 1728 | ; 1729 | break;} 1730 | case 43: 1731 | #line 320 "parse.y" 1732 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ; 1733 | break;} 1734 | case 45: 1735 | #line 326 "parse.y" 1736 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); 1737 | { int i=0; while(yyvsp[-1][i] && yyvsp[-1][i]=='*') i++; if(!yyvsp[-1][i]) in_type_spec=0; } ; 1738 | break;} 1739 | case 46: 1740 | #line 329 "parse.y" 1741 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ; 1742 | break;} 1743 | case 47: 1744 | #line 331 "parse.y" 1745 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 1746 | break;} 1747 | case 48: 1748 | #line 333 "parse.y" 1749 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 1750 | break;} 1751 | case 49: 1752 | #line 335 "parse.y" 1753 | { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 1754 | break;} 1755 | case 50: 1756 | #line 337 "parse.y" 1757 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ; 1758 | break;} 1759 | case 51: 1760 | #line 339 "parse.y" 1761 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 1762 | break;} 1763 | case 52: 1764 | #line 341 "parse.y" 1765 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 1766 | break;} 1767 | case 53: 1768 | #line 343 "parse.y" 1769 | { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 1770 | break;} 1771 | case 54: 1772 | #line 350 "parse.y" 1773 | { in_type_spec=0; ; 1774 | break;} 1775 | case 55: 1776 | #line 352 "parse.y" 1777 | { in_type_spec=0; yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ; 1778 | break;} 1779 | case 57: 1780 | #line 358 "parse.y" 1781 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ; 1782 | break;} 1783 | case 58: 1784 | #line 360 "parse.y" 1785 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ; 1786 | break;} 1787 | case 59: 1788 | #line 362 "parse.y" 1789 | { yyval=ConcatStrings(4,yyvsp[-2]," ",yyvsp[-1],yyvsp[0]); ; 1790 | break;} 1791 | case 61: 1792 | #line 368 "parse.y" 1793 | { if(yyvsp[-1][0]=='*' && yyvsp[-1][1]==' ') { yyvsp[-1]=&yyvsp[-1][1]; yyvsp[-1][0]='*'; } 1794 | yyval=ConcatStrings(4," ",yyvsp[-2],yyvsp[-1],yyvsp[0]); 1795 | ; 1796 | break;} 1797 | case 64: 1798 | #line 377 "parse.y" 1799 | { yyval=ConcatStrings(2," ",yyvsp[0]); current->name=yyvsp[0]; 1800 | if(!current->type) current->type="int"; 1801 | if(in_funcdef==1 && in_function!=3 && !in_structunion) SeenScopeVariable(yyvsp[0]); ; 1802 | break;} 1803 | case 65: 1804 | #line 384 "parse.y" 1805 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 1806 | break;} 1807 | case 66: 1808 | #line 385 "parse.y" 1809 | { in_type_spec=0; ; 1810 | break;} 1811 | case 67: 1812 | #line 385 "parse.y" 1813 | { in_type_spec=1; ; 1814 | break;} 1815 | case 68: 1816 | #line 386 "parse.y" 1817 | { yyval=ConcatStrings(4,yyvsp[-5],yyvsp[-4],yyvsp[-2],yyvsp[0]); ; 1818 | break;} 1819 | case 70: 1820 | #line 397 "parse.y" 1821 | { yyval=NULL; ; 1822 | break;} 1823 | case 71: 1824 | #line 399 "parse.y" 1825 | { yyval=NULL; 1826 | if(in_funcbody) scope|=EXTERN_F; 1827 | else if(in_header) scope|=EXTERN_H; 1828 | else scope|=EXTERNAL; ; 1829 | break;} 1830 | case 72: 1831 | #line 404 "parse.y" 1832 | { yyval=NULL; ; 1833 | break;} 1834 | case 73: 1835 | #line 406 "parse.y" 1836 | { yyval=NULL; scope |= LOCAL; ; 1837 | break;} 1838 | case 74: 1839 | #line 408 "parse.y" 1840 | { yyval=NULL; 1841 | in_typedef=1; if(!in_header) SeenTypedef(NULL,NULL); 1842 | common_comment=CopyString(GetCurrentComment()); ; 1843 | break;} 1844 | case 75: 1845 | #line 412 "parse.y" 1846 | { yyval=NULL; scope |= INLINED; ; 1847 | break;} 1848 | case 77: 1849 | #line 418 "parse.y" 1850 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ; 1851 | break;} 1852 | case 78: 1853 | #line 423 "parse.y" 1854 | { if(!current->type) current->qual=ConcatStrings(3,current->qual,yyvsp[0]," "); ; 1855 | break;} 1856 | case 79: 1857 | #line 425 "parse.y" 1858 | { if(!current->type) current->qual=ConcatStrings(3,current->qual,yyvsp[0]," "); ; 1859 | break;} 1860 | case 80: 1861 | #line 432 "parse.y" 1862 | { in_type_spec=1; ; 1863 | break;} 1864 | case 90: 1865 | #line 449 "parse.y" 1866 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ; 1867 | break;} 1868 | case 91: 1869 | #line 451 "parse.y" 1870 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ; 1871 | break;} 1872 | case 93: 1873 | #line 457 "parse.y" 1874 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ; 1875 | break;} 1876 | case 94: 1877 | #line 459 "parse.y" 1878 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ; 1879 | break;} 1880 | case 103: 1881 | #line 481 "parse.y" 1882 | { in_type_spec=0; ; 1883 | break;} 1884 | case 104: 1885 | #line 483 "parse.y" 1886 | { in_type_spec=0; yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ; 1887 | break;} 1888 | case 107: 1889 | #line 495 "parse.y" 1890 | { push(); 1891 | if(!in_header) 1892 | { 1893 | if(in_structunion) SeenStructUnionComp(yyvsp[-1],in_structunion); 1894 | else SeenStructUnionStart(yyvsp[-1]); 1895 | } 1896 | in_structunion++; ; 1897 | break;} 1898 | case 108: 1899 | #line 503 "parse.y" 1900 | { pop(); in_structunion--; 1901 | if(!in_structunion && !current->type) current->type=ConcatStrings(2,yyvsp[-4]," {...}"); 1902 | if(!in_header && !in_structunion && in_typedef) SeenStructUnionEnd(); 1903 | yyval=ConcatStrings(5,yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]); ; 1904 | break;} 1905 | case 109: 1906 | #line 508 "parse.y" 1907 | { push(); 1908 | if(!in_header) 1909 | { 1910 | if(in_structunion) SeenStructUnionComp(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1]),in_structunion); 1911 | else SeenStructUnionStart(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1])); 1912 | } 1913 | in_structunion++; ; 1914 | break;} 1915 | case 110: 1916 | #line 516 "parse.y" 1917 | { pop(); in_structunion--; 1918 | if(!in_structunion && !current->type) current->type=ConcatStrings(3,yyvsp[-5]," ",yyvsp[-4]); 1919 | if(!in_header && !in_structunion) SeenStructUnionEnd(); 1920 | yyval=ConcatStrings(7,yyvsp[-5]," ",yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]);; 1921 | break;} 1922 | case 114: 1923 | #line 530 "parse.y" 1924 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 1925 | break;} 1926 | case 115: 1927 | #line 535 "parse.y" 1928 | { if(!in_header) SeenStructUnionComp(yyvsp[0],in_structunion); ; 1929 | break;} 1930 | case 116: 1931 | #line 537 "parse.y" 1932 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); if(!in_header) SeenStructUnionComp(yyvsp[-2],in_structunion); ; 1933 | break;} 1934 | case 118: 1935 | #line 546 "parse.y" 1936 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ; 1937 | break;} 1938 | case 123: 1939 | #line 563 "parse.y" 1940 | { push(); 1941 | if(!in_header) 1942 | { 1943 | if(in_structunion) SeenStructUnionComp(yyvsp[-1],in_structunion); 1944 | else SeenStructUnionStart(yyvsp[-1]); 1945 | } 1946 | in_structunion++; ; 1947 | break;} 1948 | case 124: 1949 | #line 571 "parse.y" 1950 | { pop(); in_structunion--; 1951 | if(!in_structunion && !current->type) current->type=ConcatStrings(2,yyvsp[-4]," {...}"); 1952 | if(!in_header && !in_structunion && in_typedef) SeenStructUnionEnd(); 1953 | yyval=ConcatStrings(5,yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]); ; 1954 | break;} 1955 | case 125: 1956 | #line 576 "parse.y" 1957 | { push(); 1958 | if(!in_header) 1959 | { 1960 | if(in_structunion) SeenStructUnionComp(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1]),in_structunion); 1961 | else SeenStructUnionStart(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1])); 1962 | } 1963 | in_structunion++; ; 1964 | break;} 1965 | case 126: 1966 | #line 584 "parse.y" 1967 | { pop(); in_structunion--; 1968 | if(!in_structunion && !current->type) current->type=ConcatStrings(3,yyvsp[-5]," ",yyvsp[-4]); 1969 | if(!in_header && !in_structunion) SeenStructUnionEnd(); 1970 | yyval=ConcatStrings(7,yyvsp[-5]," ",yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]);; 1971 | break;} 1972 | case 127: 1973 | #line 592 "parse.y" 1974 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ; 1975 | break;} 1976 | case 132: 1977 | #line 609 "parse.y" 1978 | { push(); 1979 | if(!in_header) 1980 | { 1981 | if(in_structunion) SeenStructUnionComp(yyvsp[-1],in_structunion); 1982 | else SeenStructUnionStart(yyvsp[-1]); 1983 | } 1984 | in_structunion++; ; 1985 | break;} 1986 | case 133: 1987 | #line 617 "parse.y" 1988 | { pop(); in_structunion--; 1989 | if(!in_structunion && !current->type) current->type=ConcatStrings(2,yyvsp[-4]," {...}"); 1990 | if(!in_header && !in_structunion && in_typedef) SeenStructUnionEnd(); 1991 | yyval=ConcatStrings(5,yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]); ; 1992 | break;} 1993 | case 134: 1994 | #line 622 "parse.y" 1995 | { push(); 1996 | if(!in_header) 1997 | { 1998 | if(in_structunion) SeenStructUnionComp(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1]),in_structunion); 1999 | else SeenStructUnionStart(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1])); 2000 | } 2001 | in_structunion++; ; 2002 | break;} 2003 | case 135: 2004 | #line 630 "parse.y" 2005 | { pop(); in_structunion--; 2006 | if(!in_structunion && !current->type) current->type=ConcatStrings(3,yyvsp[-5]," ",yyvsp[-4]); 2007 | if(!in_header && !in_structunion) SeenStructUnionEnd(); 2008 | yyval=ConcatStrings(7,yyvsp[-5]," ",yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]);; 2009 | break;} 2010 | case 136: 2011 | #line 638 "parse.y" 2012 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ; 2013 | break;} 2014 | case 142: 2015 | #line 656 "parse.y" 2016 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ; 2017 | break;} 2018 | case 144: 2019 | #line 662 "parse.y" 2020 | { yyval = ConcatStrings(3, yyvsp[-1], " ", yyvsp[0]); 2021 | if(!in_header) SeenStructUnionComp(yyvsp[-1],in_structunion); ; 2022 | break;} 2023 | case 145: 2024 | #line 665 "parse.y" 2025 | { yyval = ConcatStrings(3, yyvsp[-1], " ", yyvsp[0]); 2026 | if(!in_header) SeenStructUnionComp(yyvsp[-1],in_structunion); ; 2027 | break;} 2028 | case 147: 2029 | #line 672 "parse.y" 2030 | { comp_type=yyvsp[0]; ; 2031 | break;} 2032 | case 148: 2033 | #line 674 "parse.y" 2034 | { yyval=ConcatStrings(3,yyvsp[-3],yyvsp[-1],yyvsp[0]); reset(); in_type_spec=0; ; 2035 | break;} 2036 | case 149: 2037 | #line 676 "parse.y" 2038 | { comp_type=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ; 2039 | break;} 2040 | case 150: 2041 | #line 678 "parse.y" 2042 | { yyval=ConcatStrings(4,yyvsp[-4],yyvsp[-3],yyvsp[-1],yyvsp[0]); reset(); in_type_spec=0; ; 2043 | break;} 2044 | case 151: 2045 | #line 680 "parse.y" 2046 | { comp_type=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); ; 2047 | break;} 2048 | case 152: 2049 | #line 682 "parse.y" 2050 | { yyval=ConcatStrings(4,yyvsp[-4],yyvsp[-3],yyvsp[-1],yyvsp[0]); reset(); in_type_spec=0; ; 2051 | break;} 2052 | case 153: 2053 | #line 687 "parse.y" 2054 | { if(!in_header) SeenStructUnionComp(ConcatStrings(2,comp_type,yyvsp[0]),in_structunion); ; 2055 | break;} 2056 | case 154: 2057 | #line 689 "parse.y" 2058 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); 2059 | if(!in_header) SeenStructUnionComp(ConcatStrings(2,comp_type,yyvsp[0]),in_structunion); ; 2060 | break;} 2061 | case 157: 2062 | #line 700 "parse.y" 2063 | { if(in_function==2) { DownScope(); pop(); in_function=0; } ; 2064 | break;} 2065 | case 158: 2066 | #line 705 "parse.y" 2067 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ; 2068 | break;} 2069 | case 159: 2070 | #line 707 "parse.y" 2071 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 2072 | break;} 2073 | case 163: 2074 | #line 725 "parse.y" 2075 | { pop(); in_funcbody=1; in_function=0; ; 2076 | break;} 2077 | case 164: 2078 | #line 727 "parse.y" 2079 | { in_funcbody=in_function=0; DownScope(); SeenFunctionDefinition(NULL); ; 2080 | break;} 2081 | case 165: 2082 | #line 732 "parse.y" 2083 | { char *func_type,*fname=strstr(yyvsp[0],(current-1)->name),*parenth=strstr(yyvsp[0],"("); 2084 | if(parenth>fname) 2085 | {parenth[0]=0;func_type=ConcatStrings(3,(current-1)->qual,(current-1)->type,yyvsp[0]);} 2086 | else 2087 | { 2088 | int open=1; 2089 | char *argbeg=strstr(&parenth[1],"("),*argend; 2090 | argbeg[1]=0; 2091 | for(argend=argbeg+2;*argend;argend++) 2092 | { 2093 | if(*argend=='(') open++; 2094 | if(*argend==')') open--; 2095 | if(!open) break; 2096 | } 2097 | func_type=ConcatStrings(4,(current-1)->qual,(current-1)->type,yyvsp[0],argend); 2098 | } 2099 | SeenFunctionDefinition(func_type); 2100 | ; 2101 | break;} 2102 | case 167: 2103 | #line 755 "parse.y" 2104 | { yyval=ConcatStrings(3,current->qual,current->type,yyvsp[0]); ; 2105 | break;} 2106 | case 169: 2107 | #line 758 "parse.y" 2108 | { yyval=ConcatStrings(3,current->qual,current->type,yyvsp[-1]); ; 2109 | break;} 2110 | case 170: 2111 | #line 765 "parse.y" 2112 | { push(); in_function=2; ; 2113 | break;} 2114 | case 172: 2115 | #line 771 "parse.y" 2116 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ; 2117 | break;} 2118 | case 173: 2119 | #line 776 "parse.y" 2120 | { push(); if(in_function==0) UpScope(); 2121 | if(in_function==0 && !in_funcdef) in_function=1; if(in_function!=3) in_funcdef++; ; 2122 | break;} 2123 | case 174: 2124 | #line 779 "parse.y" 2125 | { pop(); if(in_function!=3) in_funcdef--; if(in_funcdef==0) in_function=3; 2126 | yyval=ConcatStrings(4,yyvsp[-4],yyvsp[-3],yyvsp[-1],yyvsp[0]); ; 2127 | break;} 2128 | case 175: 2129 | #line 785 "parse.y" 2130 | { 2131 | if(!in_funcdef && !in_function && !in_funcbody) SeenFunctionDeclaration(current->name,SCOPE); 2132 | in_type_spec=0; 2133 | ; 2134 | break;} 2135 | case 176: 2136 | #line 793 "parse.y" 2137 | { if(in_function==1 && in_funcdef==1) SeenFunctionArg("void","void"); 2138 | if(in_structunion) yyval=NULL; else yyval="void"; ; 2139 | break;} 2140 | case 179: 2141 | #line 801 "parse.y" 2142 | { if(in_function==1 && in_funcdef==1 && in_funcbody==0) { SeenFunctionArg(yyvsp[0],NULL); SeenScopeVariable(yyvsp[0]); } ; 2143 | break;} 2144 | case 180: 2145 | #line 803 "parse.y" 2146 | { if(in_function==1 && in_funcdef==1 && in_funcbody==0) { SeenFunctionArg(yyvsp[0],NULL); SeenScopeVariable(yyvsp[0]); } 2147 | yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 2148 | break;} 2149 | case 182: 2150 | #line 810 "parse.y" 2151 | { if(in_function==1 && in_funcdef==1 && in_funcbody==0) SeenFunctionArg(yyvsp[0],yyvsp[0]); 2152 | yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 2153 | break;} 2154 | case 183: 2155 | #line 816 "parse.y" 2156 | { if(in_function==1 && in_funcdef==1 && in_funcbody==0) SeenFunctionArg(strcmp("void",yyvsp[0])?current->name:"void",yyvsp[0]); 2157 | in_type_spec=0; ; 2158 | break;} 2159 | case 184: 2160 | #line 819 "parse.y" 2161 | { if(in_function==1 && in_funcdef==1 && in_funcbody==0) SeenFunctionArg(current->name,yyvsp[0]); 2162 | in_type_spec=0; yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 2163 | break;} 2164 | case 185: 2165 | #line 825 "parse.y" 2166 | { in_type_spec=0; yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ; 2167 | break;} 2168 | case 186: 2169 | #line 827 "parse.y" 2170 | { in_type_spec=0; ; 2171 | break;} 2172 | case 187: 2173 | #line 829 "parse.y" 2174 | { in_type_spec=0; yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ; 2175 | break;} 2176 | case 202: 2177 | #line 858 "parse.y" 2178 | { UpScope(); reset(); ; 2179 | break;} 2180 | case 203: 2181 | #line 860 "parse.y" 2182 | { DownScope(); ; 2183 | break;} 2184 | case 245: 2185 | #line 985 "parse.y" 2186 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 2187 | break;} 2188 | case 262: 2189 | #line 1015 "parse.y" 2190 | { yyval=ConcatStrings(5,yyvsp[-4],yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 2191 | break;} 2192 | case 263: 2193 | #line 1017 "parse.y" 2194 | { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 2195 | break;} 2196 | case 265: 2197 | #line 1025 "parse.y" 2198 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 2199 | break;} 2200 | case 267: 2201 | #line 1033 "parse.y" 2202 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 2203 | break;} 2204 | case 269: 2205 | #line 1041 "parse.y" 2206 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 2207 | break;} 2208 | case 271: 2209 | #line 1049 "parse.y" 2210 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 2211 | break;} 2212 | case 273: 2213 | #line 1057 "parse.y" 2214 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 2215 | break;} 2216 | case 275: 2217 | #line 1065 "parse.y" 2218 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 2219 | break;} 2220 | case 279: 2221 | #line 1077 "parse.y" 2222 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 2223 | break;} 2224 | case 285: 2225 | #line 1091 "parse.y" 2226 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 2227 | break;} 2228 | case 289: 2229 | #line 1103 "parse.y" 2230 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 2231 | break;} 2232 | case 293: 2233 | #line 1115 "parse.y" 2234 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 2235 | break;} 2236 | case 309: 2237 | #line 1145 "parse.y" 2238 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ; 2239 | break;} 2240 | case 310: 2241 | #line 1150 "parse.y" 2242 | { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 2243 | break;} 2244 | case 314: 2245 | #line 1161 "parse.y" 2246 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ; 2247 | break;} 2248 | case 317: 2249 | #line 1174 "parse.y" 2250 | { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 2251 | break;} 2252 | case 318: 2253 | #line 1176 "parse.y" 2254 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ; 2255 | break;} 2256 | case 319: 2257 | #line 1181 "parse.y" 2258 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ; 2259 | break;} 2260 | case 320: 2261 | #line 1186 "parse.y" 2262 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); ; 2263 | break;} 2264 | case 323: 2265 | #line 1195 "parse.y" 2266 | { if(!IsAScopeVariable(yyvsp[0])) SeenFunctionCall(yyvsp[0]); ; 2267 | break;} 2268 | case 339: 2269 | #line 1239 "parse.y" 2270 | { CheckFunctionVariableRef(yyvsp[0],in_funcbody); ; 2271 | break;} 2272 | case 345: 2273 | #line 1251 "parse.y" 2274 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); ; 2275 | break;} 2276 | case 346: 2277 | #line 1252 "parse.y" 2278 | { push(); ; 2279 | break;} 2280 | case 347: 2281 | #line 1252 "parse.y" 2282 | { pop(); ; 2283 | break;} 2284 | } 2285 | /* the action file gets copied in in place of this dollarsign */ 2286 | #line 498 "/usr/share/misc/bison.simple" 2287 | 2288 | yyvsp -= yylen; 2289 | yyssp -= yylen; 2290 | #ifdef YYLSP_NEEDED 2291 | yylsp -= yylen; 2292 | #endif 2293 | 2294 | #if YYDEBUG != 0 2295 | if (yydebug) 2296 | { 2297 | short *ssp1 = yyss - 1; 2298 | fprintf (stderr, "state stack now"); 2299 | while (ssp1 != yyssp) 2300 | fprintf (stderr, " %d", *++ssp1); 2301 | fprintf (stderr, "\n"); 2302 | } 2303 | #endif 2304 | 2305 | *++yyvsp = yyval; 2306 | 2307 | #ifdef YYLSP_NEEDED 2308 | yylsp++; 2309 | if (yylen == 0) 2310 | { 2311 | yylsp->first_line = yylloc.first_line; 2312 | yylsp->first_column = yylloc.first_column; 2313 | yylsp->last_line = (yylsp-1)->last_line; 2314 | yylsp->last_column = (yylsp-1)->last_column; 2315 | yylsp->text = 0; 2316 | } 2317 | else 2318 | { 2319 | yylsp->last_line = (yylsp+yylen-1)->last_line; 2320 | yylsp->last_column = (yylsp+yylen-1)->last_column; 2321 | } 2322 | #endif 2323 | 2324 | /* Now "shift" the result of the reduction. 2325 | Determine what state that goes to, 2326 | based on the state we popped back to 2327 | and the rule number reduced by. */ 2328 | 2329 | yyn = yyr1[yyn]; 2330 | 2331 | yystate = yypgoto[yyn - YYNTBASE] + *yyssp; 2332 | if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) 2333 | yystate = yytable[yystate]; 2334 | else 2335 | yystate = yydefgoto[yyn - YYNTBASE]; 2336 | 2337 | goto yynewstate; 2338 | 2339 | yyerrlab: /* here on detecting error */ 2340 | 2341 | if (! yyerrstatus) 2342 | /* If not already recovering from an error, report this error. */ 2343 | { 2344 | ++yynerrs; 2345 | 2346 | #ifdef YYERROR_VERBOSE 2347 | yyn = yypact[yystate]; 2348 | 2349 | if (yyn > YYFLAG && yyn < YYLAST) 2350 | { 2351 | int size = 0; 2352 | char *msg; 2353 | int x, count; 2354 | 2355 | count = 0; 2356 | /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ 2357 | for (x = (yyn < 0 ? -yyn : 0); 2358 | x < (sizeof(yytname) / sizeof(char *)); x++) 2359 | if (yycheck[x + yyn] == x) 2360 | size += strlen(yytname[x]) + 15, count++; 2361 | msg = (char *) malloc(size + 15); 2362 | if (msg != 0) 2363 | { 2364 | strcpy(msg, "parse error"); 2365 | 2366 | if (count < 5) 2367 | { 2368 | count = 0; 2369 | for (x = (yyn < 0 ? -yyn : 0); 2370 | x < (sizeof(yytname) / sizeof(char *)); x++) 2371 | if (yycheck[x + yyn] == x) 2372 | { 2373 | strcat(msg, count == 0 ? ", expecting `" : " or `"); 2374 | strcat(msg, yytname[x]); 2375 | strcat(msg, "'"); 2376 | count++; 2377 | } 2378 | } 2379 | yyerror(msg); 2380 | free(msg); 2381 | } 2382 | else 2383 | yyerror ("parse error; also virtual memory exceeded"); 2384 | } 2385 | else 2386 | #endif /* YYERROR_VERBOSE */ 2387 | yyerror("parse error"); 2388 | } 2389 | 2390 | goto yyerrlab1; 2391 | yyerrlab1: /* here on error raised explicitly by an action */ 2392 | 2393 | if (yyerrstatus == 3) 2394 | { 2395 | /* if just tried and failed to reuse lookahead token after an error, discard it. */ 2396 | 2397 | /* return failure if at end of input */ 2398 | if (yychar == YYEOF) 2399 | YYABORT; 2400 | 2401 | #if YYDEBUG != 0 2402 | if (yydebug) 2403 | fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); 2404 | #endif 2405 | 2406 | yychar = YYEMPTY; 2407 | } 2408 | 2409 | /* Else will try to reuse lookahead token 2410 | after shifting the error token. */ 2411 | 2412 | yyerrstatus = 3; /* Each real token shifted decrements this */ 2413 | 2414 | goto yyerrhandle; 2415 | 2416 | yyerrdefault: /* current state does not do anything special for the error token. */ 2417 | 2418 | #if 0 2419 | /* This is wrong; only states that explicitly want error tokens 2420 | should shift them. */ 2421 | yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ 2422 | if (yyn) goto yydefault; 2423 | #endif 2424 | 2425 | yyerrpop: /* pop the current state because it cannot handle the error token */ 2426 | 2427 | if (yyssp == yyss) YYABORT; 2428 | yyvsp--; 2429 | yystate = *--yyssp; 2430 | #ifdef YYLSP_NEEDED 2431 | yylsp--; 2432 | #endif 2433 | 2434 | #if YYDEBUG != 0 2435 | if (yydebug) 2436 | { 2437 | short *ssp1 = yyss - 1; 2438 | fprintf (stderr, "Error: state stack now"); 2439 | while (ssp1 != yyssp) 2440 | fprintf (stderr, " %d", *++ssp1); 2441 | fprintf (stderr, "\n"); 2442 | } 2443 | #endif 2444 | 2445 | yyerrhandle: 2446 | 2447 | yyn = yypact[yystate]; 2448 | if (yyn == YYFLAG) 2449 | goto yyerrdefault; 2450 | 2451 | yyn += YYTERROR; 2452 | if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) 2453 | goto yyerrdefault; 2454 | 2455 | yyn = yytable[yyn]; 2456 | if (yyn < 0) 2457 | { 2458 | if (yyn == YYFLAG) 2459 | goto yyerrpop; 2460 | yyn = -yyn; 2461 | goto yyreduce; 2462 | } 2463 | else if (yyn == 0) 2464 | goto yyerrpop; 2465 | 2466 | if (yyn == YYFINAL) 2467 | YYACCEPT; 2468 | 2469 | #if YYDEBUG != 0 2470 | if (yydebug) 2471 | fprintf(stderr, "Shifting error token, "); 2472 | #endif 2473 | 2474 | *++yyvsp = yylval; 2475 | #ifdef YYLSP_NEEDED 2476 | *++yylsp = yylloc; 2477 | #endif 2478 | 2479 | yystate = yyn; 2480 | goto yynewstate; 2481 | } 2482 | #line 1334 "parse.y" 2483 | 2484 | 2485 | #if YYDEBUG 2486 | 2487 | static int last_yylex[11]; 2488 | static char *last_yylval[11]; 2489 | static int count=0,modcount=0; 2490 | 2491 | #endif /* YYDEBUG */ 2492 | 2493 | 2494 | /*++++++++++++++++++++++++++++++++++++++ 2495 | Stop parsing the current file, due to an error. 2496 | 2497 | char *s The error message to print out. 2498 | ++++++++++++++++++++++++++++++++++++++*/ 2499 | 2500 | static void yyerror( char *s ) 2501 | { 2502 | #if YYDEBUG 2503 | int i; 2504 | #endif 2505 | 2506 | fflush(stdout); 2507 | fprintf(stderr,"%s:%d: cxref: %s\n\n",parse_file,parse_line,s); 2508 | 2509 | #if YYDEBUG 2510 | 2511 | fprintf(stderr,"The previous 10, current and next 10 symbols are:\n"); 2512 | 2513 | for(i=count>10?count-11:0,modcount=i%11;i<count-1;i++,modcount=i%11) 2514 | #ifdef YYBISON 2515 | fprintf(stderr,"%3d | %3d : %16s : %s\n",i+1-count,last_yylex[modcount],last_yylex[modcount]>255?yytname[last_yylex[modcount]-255]:"",last_yylval[modcount]); 2516 | #else 2517 | fprintf(stderr,"%3d | %3d : %s\n",i+1-count,last_yylex[modcount],last_yylval[modcount]); 2518 | #endif 2519 | 2520 | #ifdef YYBISON 2521 | fprintf(stderr," 0 | %3d : %16s : %s\n",yychar,yychar>255?yytname[yychar-255]:"",yylval); 2522 | #else 2523 | fprintf(stderr," 0 | %3d : %s\n",yychar,yylval); 2524 | #endif 2525 | 2526 | for(i=0;i<10;i++) 2527 | { 2528 | yychar=yylex(); 2529 | if(!yychar) 2530 | {fprintf(stderr,"END OF FILE\n");break;} 2531 | #ifdef YYBISON 2532 | fprintf(stderr,"%3d | %3d : %16s : %s\n",i+1,yychar,yychar>255?yytname[yychar-255]:"",yylval); 2533 | #else 2534 | fprintf(stderr,"%3d | %3d : %s\n",i+1,yychar,yylval); 2535 | #endif 2536 | } 2537 | 2538 | fprintf(stderr,"\n"); 2539 | 2540 | #endif /* YYDEBUG */ 2541 | 2542 | /* Finish off the input. */ 2543 | 2544 | #undef yylex 2545 | 2546 | if(yychar) 2547 | while((yychar=yylex())); 2548 | } 2549 | 2550 | 2551 | /*++++++++++++++++++++++++++++++++++++++ 2552 | Call the lexer, the feedback from the parser to the lexer is applied here. 2553 | 2554 | int cxref_yylex Returns the value from the lexer, modified due to parser feedback. 2555 | ++++++++++++++++++++++++++++++++++++++*/ 2556 | 2557 | static int cxref_yylex(void) 2558 | { 2559 | static int last_yyl=0; 2560 | int yyl=yylex(); 2561 | 2562 | if(yyl==TYPE_NAME) 2563 | if(in_type_spec || (in_structunion && last_yyl=='}') || last_yyl==TYPE_NAME || 2564 | last_yyl==CHAR || last_yyl==SHORT || last_yyl==INT || last_yyl==LONG || 2565 | last_yyl==SIGNED || last_yyl==UNSIGNED || 2566 | last_yyl==FLOAT || last_yyl==DOUBLE) 2567 | yyl=IDENTIFIER; 2568 | 2569 | last_yyl=yyl; 2570 | 2571 | #if YYDEBUG 2572 | 2573 | last_yylex [modcount]=yyl; 2574 | last_yylval[modcount]=yylval; 2575 | 2576 | if(yyl) 2577 | { 2578 | count++; 2579 | modcount=count%11; 2580 | } 2581 | else 2582 | { 2583 | count=0; 2584 | modcount=0; 2585 | } 2586 | 2587 | #if YYDEBUG == 2 2588 | 2589 | if(yyl) 2590 | #ifdef YYBISON 2591 | printf("#parse.y# %6d | %16s:%4d | %3d : %16s : %s\n",count,parse_file,parse_line,yyl,yyl>255?yytname[yyl-255]:"",yylval); 2592 | #else 2593 | printf("#parse.y# %6d | %16s:%4d | %3d : %s\n",count,parse_file,parse_line,yyl,yylval); 2594 | #endif /* YYBISON */ 2595 | else 2596 | printf("#parse.y# %6d | %16s:%4d | END OF FILE\n",count,parse_file,parse_line); 2597 | 2598 | fflush(stdout); 2599 | 2600 | #endif /* YYDEBUG==2 */ 2601 | 2602 | #endif /* YYDEBUG */ 2603 | 2604 | return(yyl); 2605 | }