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