Changeset 609 for branches/GNU/src/binutils/gas/itbl-parse.c
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/gas/itbl-parse.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 2 /* A Bison parser, made from itbl-parse.y 3 by GNU Bison version 1.28 */ 1 /* A Bison parser, made from itbl-parse.y 2 by GNU bison 1.35. */ 4 3 5 4 #define YYBISON 1 /* Identify Bison output. */ 6 5 7 # define DREG 2578 # define CREG 2589 # define GREG 25910 # define IMMED 26011 # define ADDR 26112 # define INSN 26213 # define NUM 26314 # define ID 26415 # define NL 26516 # define PNUM 2666 # define DREG 257 7 # define CREG 258 8 # define GREG 259 9 # define IMMED 260 10 # define ADDR 261 11 # define INSN 262 12 # define NUM 263 13 # define ID 264 14 # define NL 265 15 # define PNUM 266 17 16 18 17 #line 21 "itbl-parse.y" … … 279 278 280 279 #line 283 "itbl-parse.y" 280 #ifndef YYSTYPE 281 281 typedef union 282 282 { … … 285 285 int processor; 286 286 unsigned long val; 287 } YYSTYPE; 288 #include <stdio.h> 289 290 #ifndef __cplusplus 291 #ifndef __STDC__ 292 #define const 293 #endif 287 } yystype; 288 # define YYSTYPE yystype 289 # define YYSTYPE_IS_TRIVIAL 1 290 #endif 291 #ifndef YYDEBUG 292 # define YYDEBUG 0 294 293 #endif 295 294 … … 300 299 #define YYNTBASE 20 301 300 301 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ 302 302 #define YYTRANSLATE(x) ((unsigned)(x) <= 266 ? yytranslate[x] : 34) 303 303 304 static const char yytranslate[] = { 0, 305 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 306 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 307 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 308 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 309 2, 17, 2, 13, 19, 2, 2, 2, 2, 2, 310 2, 2, 2, 2, 2, 2, 2, 18, 2, 2, 311 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 312 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 313 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 314 15, 2, 16, 2, 2, 2, 2, 2, 2, 2, 315 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 316 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 317 2, 2, 2, 14, 2, 2, 2, 2, 2, 2, 318 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 319 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 320 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 321 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 322 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 323 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 324 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 325 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 326 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 327 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 328 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 329 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 330 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, 331 7, 8, 9, 10, 11, 12 304 /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ 305 static const char yytranslate[] = 306 { 307 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 308 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 309 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 310 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 311 2, 2, 17, 2, 13, 19, 2, 2, 2, 2, 312 2, 2, 2, 2, 2, 2, 2, 2, 18, 2, 313 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 314 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 315 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 316 2, 15, 2, 16, 2, 2, 2, 2, 2, 2, 317 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 318 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 319 2, 2, 2, 2, 14, 2, 2, 2, 2, 2, 320 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 321 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 322 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 323 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 324 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 325 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 326 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 327 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 328 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 329 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 330 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 331 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 332 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, 333 6, 7, 8, 9, 10, 11, 12 332 334 }; 333 335 334 #if YYDEBUG != 0 335 static const short yyprhs[] = { 0, 336 0, 2, 5, 6, 12, 13, 23, 25, 28, 32, 337 35, 36, 38, 40, 42, 46, 50, 54, 56, 59, 338 60, 65, 66, 68, 70, 72, 74, 76, 78 336 #if YYDEBUG 337 static const short yyprhs[] = 338 { 339 0, 0, 2, 5, 6, 12, 13, 23, 25, 28, 340 32, 35, 36, 38, 40, 42, 46, 50, 54, 56, 341 59, 60, 65, 66, 68, 70, 72, 74, 76, 78 339 342 }; 340 341 static const short yyrhs[] = { 21, 342 0, 22, 21, 0, 0, 30, 31, 32, 33, 11,343 0, 0, 30, 8, 32, 33, 29, 28, 23, 24,344 11, 0, 11, 0, 1, 11, 0, 13, 26, 24,345 0, 26, 24, 0, 0, 31, 0, 7, 0, 6,346 0, 25, 29, 28, 0, 9, 14, 27, 0, 15,347 27, 16, 0, 9, 0, 17, 27, 0, 0, 18,348 9, 19, 9, 0, 0, 12, 0, 3, 0, 4,349 0, 5, 0, 10, 0, 9, 0, 9, 0343 static const short yyrhs[] = 344 { 345 21, 0, 22, 21, 0, 0, 30, 31, 32, 33, 346 11, 0, 0, 30, 8, 32, 33, 29, 28, 23, 347 24, 11, 0, 11, 0, 1, 11, 0, 13, 26, 348 24, 0, 26, 24, 0, 0, 31, 0, 7, 0, 349 6, 0, 25, 29, 28, 0, 9, 14, 27, 0, 350 15, 27, 16, 0, 9, 0, 17, 27, 0, 0, 351 18, 9, 19, 9, 0, 0, 12, 0, 3, 0, 352 4, 0, 5, 0, 10, 0, 9, 0, 9, 0 350 353 }; 351 354 352 355 #endif 353 356 354 #if YYDEBUG != 0 355 static const short yyrline[] = { 0, 356 300, 304, 306, 309, 316, 323, 324, 325, 328, 330, 357 331, 334, 340, 345, 352, 361, 366, 370, 376, 382, 358 388, 395, 402, 410, 416, 421, 428, 436, 444 357 #if YYDEBUG 358 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 359 static const short yyrline[] = 360 { 361 0, 300, 304, 306, 309, 316, 316, 325, 326, 329, 362 331, 332, 335, 341, 346, 353, 362, 367, 371, 377, 363 383, 389, 396, 403, 411, 417, 422, 429, 437, 445 359 364 }; 360 365 #endif 361 366 362 367 363 #if YYDEBUG != 0 || defined (YYERROR_VERBOSE) 364 365 static const char * const yytname[] = { "$","error","$undefined.","DREG","CREG", 366 "GREG","IMMED","ADDR","INSN","NUM","ID","NL","PNUM","','","'|'","'['","']'", 367 "'*'","':'","'-'","insntbl","entrys","entry","@1","fieldspecs","ftype","fieldspec", 368 "flagexpr","flags","range","pnum","regtype","name","value", NULL 368 #if (YYDEBUG) || defined YYERROR_VERBOSE 369 370 /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ 371 static const char *const yytname[] = 372 { 373 "$", "error", "$undefined.", "DREG", "CREG", "GREG", "IMMED", "ADDR", 374 "INSN", "NUM", "ID", "NL", "PNUM", "','", "'|'", "'['", "']'", "'*'", 375 "':'", "'-'", "insntbl", "entrys", "entry", "@1", "fieldspecs", "ftype", 376 "fieldspec", "flagexpr", "flags", "range", "pnum", "regtype", "name", 377 "value", 0 369 378 }; 370 379 #endif 371 380 372 static const short yyr1[] = { 0, 373 20, 21, 21, 22, 23, 22, 22, 22, 24, 24, 374 24, 25, 25, 25, 26, 27, 27, 27, 28, 28, 375 29, 29, 30, 31, 31, 31, 32, -1, 33 381 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 382 static const short yyr1[] = 383 { 384 0, 20, 21, 21, 22, 23, 22, 22, 22, 24, 385 24, 24, 25, 25, 25, 26, 27, 27, 27, 28, 386 28, 29, 29, 30, 31, 31, 31, 32, 34, 33 376 387 }; 377 388 378 static const short yyr2[] = { 0, 379 1, 2, 0, 5, 0, 9, 1, 2, 3, 2, 380 0, 1, 1, 1, 3, 3, 3, 1, 2, 0, 381 4, 0, 1, 1, 1, 1, 1, 1, 1 389 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 390 static const short yyr2[] = 391 { 392 0, 1, 2, 0, 5, 0, 9, 1, 2, 3, 393 2, 0, 1, 1, 1, 3, 3, 3, 1, 2, 394 0, 4, 0, 1, 1, 1, 1, 1, 1, 1 382 395 }; 383 396 384 static const short yydefact[] = { 0, 385 0, 7, 23, 1, 0, 0, 8, 2, 24, 25, 386 26, 0, 0, 27, 0, 0, 29, 22, 0, 0, 387 20, 4, 0, 0, 5, 0, 18, 0, 19, 11, 388 21, 0, 0, 14, 13, 0, 0, 22, 11, 12, 389 16, 17, 11, 6, 20, 10, 9, 15, 0, 0, 390 0 397 /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE 398 doesn't specify something else to do. Zero means the default is an 399 error. */ 400 static const short yydefact[] = 401 { 402 0, 0, 7, 23, 1, 0, 0, 8, 2, 24, 403 25, 26, 0, 0, 27, 0, 0, 29, 22, 0, 404 0, 20, 4, 0, 0, 5, 0, 18, 0, 19, 405 11, 21, 0, 0, 14, 13, 0, 0, 22, 11, 406 12, 16, 17, 11, 6, 20, 10, 9, 15, 0, 407 0, 0 391 408 }; 392 409 393 static const short yydefgoto[] = { 49, 394 4, 5, 30, 37, 38, 39, 29, 25, 21, 6, 395 40, 15, 18 410 static const short yydefgoto[] = 411 { 412 49, 4, 5, 30, 37, 38, 39, 29, 25, 21, 413 6, 40, 15, 18 396 414 }; 397 415 398 static const short yypact[] = { 0, 399 -9,-32768,-32768,-32768, 0, 12,-32768,-32768,-32768,-32768, 400 -32768, 3, 3,-32768, 9, 9,-32768, -8, 8, 19, 401 15,-32768, 10, -6,-32768, 24, 20, -6,-32768, 1, 402 -32768, -6, 21,-32768,-32768, 18, 25, -8, 1,-32768, 403 -32768,-32768, 1,-32768, 15,-32768,-32768,-32768, 35, 38, 404 -32768 416 static const short yypact[] = 417 { 418 0, -9,-32768,-32768,-32768, 0, 12,-32768,-32768,-32768, 419 -32768,-32768, 3, 3,-32768, 9, 9,-32768, -8, 8, 420 19, 15,-32768, 10, -6,-32768, 24, 20, -6,-32768, 421 1,-32768, -6, 21,-32768,-32768, 18, 25, -8, 1, 422 -32768,-32768,-32768, 1,-32768, 15,-32768,-32768,-32768, 35, 423 38,-32768 405 424 }; 406 425 407 static const short yypgoto[] = {-32768, 408 34,-32768,-32768, -13,-32768, 4, -1, -4, 5,-32768, 409 36, 31, 29 426 static const short yypgoto[] = 427 { 428 -32768, 34,-32768,-32768, -13,-32768, 4, -1, -4, 5, 429 -32768, 36, 31, 29 410 430 }; 411 431 … … 414 434 415 435 416 static const short yytable[] = { -3, 417 1, 7, 27, 9, 10, 11, 34, 35, 28, 20, 418 2, 3, 14, 36, 9, 10, 11, 17, 22, 12, 419 9, 10, 11, 34, 35, 46, 33, 23, 26, 47, 420 41, 24, 31, 32, 50, 44, 42, 51, 8, 43, 421 48, 13, 45, 16, 19 436 static const short yytable[] = 437 { 438 -3, 1, 7, 27, 9, 10, 11, 34, 35, 28, 439 20, 2, 3, 14, 36, 9, 10, 11, 17, 22, 440 12, 9, 10, 11, 34, 35, 46, 33, 23, 26, 441 47, 41, 24, 31, 32, 50, 44, 42, 51, 8, 442 43, 48, 13, 45, 16, 19 422 443 }; 423 444 424 static const short yycheck[] = { 0, 425 1, 11, 9, 3, 4, 5, 6, 7, 15, 18, 426 11, 12, 10, 13, 3, 4, 5, 9, 11, 8, 427 3, 4, 5, 6, 7, 39, 28, 9, 19, 43, 428 32, 17, 9, 14, 0, 11, 16, 0, 5, 36, 429 45, 6, 38, 13, 16 445 static const short yycheck[] = 446 { 447 0, 1, 11, 9, 3, 4, 5, 6, 7, 15, 448 18, 11, 12, 10, 13, 3, 4, 5, 9, 11, 449 8, 3, 4, 5, 6, 7, 39, 28, 9, 19, 450 43, 32, 17, 9, 14, 0, 11, 16, 0, 5, 451 36, 45, 6, 38, 13, 16 430 452 }; 431 453 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ 432 #line 3 "/usr/share/bison/bison.simple" 433 /* This file comes from bison-1.28. */ 454 #line 3 "/usr/share/bison-1.35/bison.simple" 434 455 435 456 /* Skeleton output parser for bison, 436 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. 457 458 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software 459 Foundation, Inc. 437 460 438 461 This program is free software; you can redistribute it and/or modify … … 456 479 in version 1.24 of Bison. */ 457 480 458 /* This is the parser code that is written into each bison parser 459 when the %semantic_parser declaration is not specified in the grammar. 460 It was written by Richard Stallman by simplifying the hairy parser 461 used when %semantic_parser is specified. */ 462 463 #ifndef YYSTACK_USE_ALLOCA 464 #ifdef alloca 465 #define YYSTACK_USE_ALLOCA 466 #else /* alloca not defined */ 467 #ifdef __GNUC__ 468 #define YYSTACK_USE_ALLOCA 469 #define alloca __builtin_alloca 470 #else /* not GNU C. */ 471 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) 472 #define YYSTACK_USE_ALLOCA 473 #include <alloca.h> 474 #else /* not sparc */ 475 /* We think this test detects Watcom and Microsoft C. */ 476 /* This used to test MSDOS, but that is a bad idea 477 since that symbol is in the user namespace. */ 478 #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) 479 #if 0 /* No need for malloc.h, which pollutes the namespace; 480 instead, just don't use alloca. */ 481 #include <malloc.h> 482 #endif 483 #else /* not MSDOS, or __TURBOC__ */ 484 #if defined(_AIX) 485 /* I don't know what this was needed for, but it pollutes the namespace. 486 So I turned it off. rms, 2 May 1997. */ 487 /* #include <malloc.h> */ 488 #pragma alloca 489 #define YYSTACK_USE_ALLOCA 490 #else /* not MSDOS, or __TURBOC__, or _AIX */ 491 #if 0 492 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, 493 and on HPUX 10. Eventually we can turn this on. */ 494 #define YYSTACK_USE_ALLOCA 495 #define alloca __builtin_alloca 496 #endif /* __hpux */ 497 #endif 498 #endif /* not _AIX */ 499 #endif /* not MSDOS, or __TURBOC__ */ 500 #endif /* not sparc */ 501 #endif /* not GNU C */ 502 #endif /* alloca not defined */ 503 #endif /* YYSTACK_USE_ALLOCA not defined */ 504 505 #ifdef YYSTACK_USE_ALLOCA 506 #define YYSTACK_ALLOC alloca 507 #else 508 #define YYSTACK_ALLOC malloc 509 #endif 510 511 /* Note: there must be only one dollar sign in this file. 512 It is replaced by the list of actions, each action 513 as one case of the switch. */ 481 /* This is the parser code that is written into each bison parser when 482 the %semantic_parser declaration is not specified in the grammar. 483 It was written by Richard Stallman by simplifying the hairy parser 484 used when %semantic_parser is specified. */ 485 486 /* All symbols defined below should begin with yy or YY, to avoid 487 infringing on user name space. This should be done even for local 488 variables, as they might otherwise be expanded by user macros. 489 There are some unavoidable exceptions within include files to 490 define necessary library symbols; they are noted "INFRINGES ON 491 USER NAME SPACE" below. */ 492 493 #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) 494 495 /* The parser invokes alloca or malloc; define the necessary symbols. */ 496 497 # if YYSTACK_USE_ALLOCA 498 # define YYSTACK_ALLOC alloca 499 # else 500 # ifndef YYSTACK_USE_ALLOCA 501 # if defined (alloca) || defined (_ALLOCA_H) 502 # define YYSTACK_ALLOC alloca 503 # else 504 # ifdef __GNUC__ 505 # define YYSTACK_ALLOC __builtin_alloca 506 # endif 507 # endif 508 # endif 509 # endif 510 511 # ifdef YYSTACK_ALLOC 512 /* Pacify GCC's `empty if-body' warning. */ 513 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) 514 # else 515 # if defined (__STDC__) || defined (__cplusplus) 516 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 517 # define YYSIZE_T size_t 518 # endif 519 # define YYSTACK_ALLOC malloc 520 # define YYSTACK_FREE free 521 # endif 522 #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ 523 524 525 #if (! defined (yyoverflow) \ 526 && (! defined (__cplusplus) \ 527 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 528 529 /* A type that is properly aligned for any stack member. */ 530 union yyalloc 531 { 532 short yyss; 533 YYSTYPE yyvs; 534 # if YYLSP_NEEDED 535 YYLTYPE yyls; 536 # endif 537 }; 538 539 /* The size of the maximum gap between one aligned stack and the next. */ 540 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) 541 542 /* The size of an array large to enough to hold all stacks, each with 543 N elements. */ 544 # if YYLSP_NEEDED 545 # define YYSTACK_BYTES(N) \ 546 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ 547 + 2 * YYSTACK_GAP_MAX) 548 # else 549 # define YYSTACK_BYTES(N) \ 550 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ 551 + YYSTACK_GAP_MAX) 552 # endif 553 554 /* Copy COUNT objects from FROM to TO. The source and destination do 555 not overlap. */ 556 # ifndef YYCOPY 557 # if 1 < __GNUC__ 558 # define YYCOPY(To, From, Count) \ 559 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 560 # else 561 # define YYCOPY(To, From, Count) \ 562 do \ 563 { \ 564 register YYSIZE_T yyi; \ 565 for (yyi = 0; yyi < (Count); yyi++) \ 566 (To)[yyi] = (From)[yyi]; \ 567 } \ 568 while (0) 569 # endif 570 # endif 571 572 /* Relocate STACK from its old location to the new one. The 573 local variables YYSIZE and YYSTACKSIZE give the old and new number of 574 elements in the stack, and YYPTR gives the new location of the 575 stack. Advance YYPTR to a properly aligned location for the next 576 stack. */ 577 # define YYSTACK_RELOCATE(Stack) \ 578 do \ 579 { \ 580 YYSIZE_T yynewbytes; \ 581 YYCOPY (&yyptr->Stack, Stack, yysize); \ 582 Stack = &yyptr->Stack; \ 583 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ 584 yyptr += yynewbytes / sizeof (*yyptr); \ 585 } \ 586 while (0) 587 588 #endif 589 590 591 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) 592 # define YYSIZE_T __SIZE_TYPE__ 593 #endif 594 #if ! defined (YYSIZE_T) && defined (size_t) 595 # define YYSIZE_T size_t 596 #endif 597 #if ! defined (YYSIZE_T) 598 # if defined (__STDC__) || defined (__cplusplus) 599 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 600 # define YYSIZE_T size_t 601 # endif 602 #endif 603 #if ! defined (YYSIZE_T) 604 # define YYSIZE_T unsigned int 605 #endif 514 606 515 607 #define yyerrok (yyerrstatus = 0) … … 520 612 #define YYABORT goto yyabortlab 521 613 #define YYERROR goto yyerrlab1 522 /* Like YYERROR except do call yyerror. 523 This remains here temporarily to ease the 524 transition to the new meaning of YYERROR, for GCC. 614 /* Like YYERROR except do call yyerror. This remains here temporarily 615 to ease the transition to the new meaning of YYERROR, for GCC. 525 616 Once GCC version 2 has supplanted version 1, this can go. */ 526 617 #define YYFAIL goto yyerrlab 527 618 #define YYRECOVERING() (!!yyerrstatus) 528 #define YYBACKUP( token, value)\619 #define YYBACKUP(Token, Value) \ 529 620 do \ 530 621 if (yychar == YYEMPTY && yylen == 1) \ 531 { yychar = (token), yylval = (value); \ 622 { \ 623 yychar = (Token); \ 624 yylval = (Value); \ 532 625 yychar1 = YYTRANSLATE (yychar); \ 533 626 YYPOPSTACK; \ … … 535 628 } \ 536 629 else \ 537 { yyerror ("syntax error: cannot back up"); YYERROR; } \ 630 { \ 631 yyerror ("syntax error: cannot back up"); \ 632 YYERROR; \ 633 } \ 538 634 while (0) 539 635 … … 541 637 #define YYERRCODE 256 542 638 543 #ifndef YYPURE 544 #define YYLEX yylex() 545 #endif 546 547 #ifdef YYPURE 548 #ifdef YYLSP_NEEDED 549 #ifdef YYLEX_PARAM 550 #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) 551 #else 552 #define YYLEX yylex(&yylval, &yylloc) 553 #endif 554 #else /* not YYLSP_NEEDED */ 555 #ifdef YYLEX_PARAM 556 #define YYLEX yylex(&yylval, YYLEX_PARAM) 557 #else 558 #define YYLEX yylex(&yylval) 559 #endif 560 #endif /* not YYLSP_NEEDED */ 561 #endif 562 563 /* If nonreentrant, generate the variables here */ 564 565 #ifndef YYPURE 566 567 int yychar; /* the lookahead symbol */ 568 YYSTYPE yylval; /* the semantic value of the */ 569 /* lookahead symbol */ 570 571 #ifdef YYLSP_NEEDED 572 YYLTYPE yylloc; /* location data for the lookahead */ 573 /* symbol */ 574 #endif 575 576 int yynerrs; /* number of parse errors so far */ 577 #endif /* not YYPURE */ 578 579 #if YYDEBUG != 0 580 int yydebug; /* nonzero means print parse trace */ 581 /* Since this is uninitialized, it does not stop multiple parsers 582 from coexisting. */ 583 #endif 584 585 /* YYINITDEPTH indicates the initial size of the parser's stacks */ 586 639 640 /* YYLLOC_DEFAULT -- Compute the default location (before the actions 641 are run). 642 643 When YYLLOC_DEFAULT is run, CURRENT is set the location of the 644 first token. By default, to implement support for ranges, extend 645 its range to the last symbol. */ 646 647 #ifndef YYLLOC_DEFAULT 648 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 649 Current.last_line = Rhs[N].last_line; \ 650 Current.last_column = Rhs[N].last_column; 651 #endif 652 653 654 /* YYLEX -- calling `yylex' with the right arguments. */ 655 656 #if YYPURE 657 # if YYLSP_NEEDED 658 # ifdef YYLEX_PARAM 659 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) 660 # else 661 # define YYLEX yylex (&yylval, &yylloc) 662 # endif 663 # else /* !YYLSP_NEEDED */ 664 # ifdef YYLEX_PARAM 665 # define YYLEX yylex (&yylval, YYLEX_PARAM) 666 # else 667 # define YYLEX yylex (&yylval) 668 # endif 669 # endif /* !YYLSP_NEEDED */ 670 #else /* !YYPURE */ 671 # define YYLEX yylex () 672 #endif /* !YYPURE */ 673 674 675 /* Enable debugging if requested. */ 676 #if YYDEBUG 677 678 # ifndef YYFPRINTF 679 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 680 # define YYFPRINTF fprintf 681 # endif 682 683 # define YYDPRINTF(Args) \ 684 do { \ 685 if (yydebug) \ 686 YYFPRINTF Args; \ 687 } while (0) 688 /* Nonzero means print parse trace. It is left uninitialized so that 689 multiple parsers can coexist. */ 690 int yydebug; 691 #else /* !YYDEBUG */ 692 # define YYDPRINTF(Args) 693 #endif /* !YYDEBUG */ 694 695 /* YYINITDEPTH -- initial size of the parser's stacks. */ 587 696 #ifndef YYINITDEPTH 588 #define YYINITDEPTH 200 589 #endif 590 591 /* YYMAXDEPTH is the maximum size the stacks can grow to 592 (effective only if the built-in stack extension method is used). */ 697 # define YYINITDEPTH 200 698 #endif 699 700 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 701 if the built-in stack extension method is used). 702 703 Do not make this value too large; the results are undefined if 704 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) 705 evaluated with infinite-precision integer arithmetic. */ 593 706 594 707 #if YYMAXDEPTH == 0 595 # undef YYMAXDEPTH708 # undef YYMAXDEPTH 596 709 #endif 597 710 598 711 #ifndef YYMAXDEPTH 599 #define YYMAXDEPTH 10000 600 #endif 601 602 603 /* Define __yy_memcpy. Note that the size argument 604 should be passed with type unsigned int, because that is what the non-GCC 605 definitions require. With GCC, __builtin_memcpy takes an arg 606 of type size_t, but it can handle unsigned int. */ 607 608 #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ 609 #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) 610 #else /* not GNU C or C++ */ 611 #ifndef __cplusplus 612 613 /* This is the most reliable way to avoid incompatibilities 614 in available built-in functions on various systems. */ 615 static void 616 __yy_memcpy (to, from, count) 617 char *to; 618 char *from; 619 unsigned int count; 620 { 621 register char *f = from; 622 register char *t = to; 623 register int i = count; 624 625 while (i-- > 0) 626 *t++ = *f++; 712 # define YYMAXDEPTH 10000 713 #endif 714 715 716 #ifdef YYERROR_VERBOSE 717 718 # ifndef yystrlen 719 # if defined (__GLIBC__) && defined (_STRING_H) 720 # define yystrlen strlen 721 # else 722 /* Return the length of YYSTR. */ 723 static YYSIZE_T 724 # if defined (__STDC__) || defined (__cplusplus) 725 yystrlen (const char *yystr) 726 # else 727 yystrlen (yystr) 728 const char *yystr; 729 # endif 730 { 731 register const char *yys = yystr; 732 733 while (*yys++ != '\0') 734 continue; 735 736 return yys - yystr - 1; 627 737 } 628 629 #else /* __cplusplus */ 630 631 /* This is the most reliable way to avoid incompatibilities 632 in available built-in functions on various systems. */ 633 static void 634 __yy_memcpy (char *to, char *from, unsigned int count) 635 { 636 register char *t = to; 637 register char *f = from; 638 register int i = count; 639 640 while (i-- > 0) 641 *t++ = *f++; 738 # endif 739 # endif 740 741 # ifndef yystpcpy 742 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) 743 # define yystpcpy stpcpy 744 # else 745 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 746 YYDEST. */ 747 static char * 748 # if defined (__STDC__) || defined (__cplusplus) 749 yystpcpy (char *yydest, const char *yysrc) 750 # else 751 yystpcpy (yydest, yysrc) 752 char *yydest; 753 const char *yysrc; 754 # endif 755 { 756 register char *yyd = yydest; 757 register const char *yys = yysrc; 758 759 while ((*yyd++ = *yys++) != '\0') 760 continue; 761 762 return yyd - 1; 642 763 } 643 644 #endif 645 #endif 646 647 648 #line 217 "/usr/share/bison/bison.simple" 764 # endif 765 # endif 766 #endif 767 768 769 #line 315 "/usr/share/bison-1.35/bison.simple" 770 649 771 650 772 /* The user can define YYPARSE_PARAM as the name of an argument to be passed … … 655 777 656 778 #ifdef YYPARSE_PARAM 657 # ifdef __cplusplus658 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM659 # define YYPARSE_PARAM_DECL660 # else /* not __cplusplus */661 # define YYPARSE_PARAM_ARG YYPARSE_PARAM662 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;663 # endif /* not __cplusplus */664 #else /* notYYPARSE_PARAM */665 # define YYPARSE_PARAM_ARG666 # define YYPARSE_PARAM_DECL667 #endif /* notYYPARSE_PARAM */779 # if defined (__STDC__) || defined (__cplusplus) 780 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM 781 # define YYPARSE_PARAM_DECL 782 # else 783 # define YYPARSE_PARAM_ARG YYPARSE_PARAM 784 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; 785 # endif 786 #else /* !YYPARSE_PARAM */ 787 # define YYPARSE_PARAM_ARG 788 # define YYPARSE_PARAM_DECL 789 #endif /* !YYPARSE_PARAM */ 668 790 669 791 /* Prevent warning if -Wstrict-prototypes. */ 670 792 #ifdef __GNUC__ 671 # ifdef YYPARSE_PARAM793 # ifdef YYPARSE_PARAM 672 794 int yyparse (void *); 795 # else 796 int yyparse (void); 797 # endif 798 #endif 799 800 /* YY_DECL_VARIABLES -- depending whether we use a pure parser, 801 variables are global, or local to YYPARSE. */ 802 803 #define YY_DECL_NON_LSP_VARIABLES \ 804 /* The lookahead symbol. */ \ 805 int yychar; \ 806 \ 807 /* The semantic value of the lookahead symbol. */ \ 808 YYSTYPE yylval; \ 809 \ 810 /* Number of parse errors so far. */ \ 811 int yynerrs; 812 813 #if YYLSP_NEEDED 814 # define YY_DECL_VARIABLES \ 815 YY_DECL_NON_LSP_VARIABLES \ 816 \ 817 /* Location data for the lookahead symbol. */ \ 818 YYLTYPE yylloc; 673 819 #else 674 int yyparse (void); 675 #endif 676 #endif 820 # define YY_DECL_VARIABLES \ 821 YY_DECL_NON_LSP_VARIABLES 822 #endif 823 824 825 /* If nonreentrant, generate the variables here. */ 826 827 #if !YYPURE 828 YY_DECL_VARIABLES 829 #endif /* !YYPURE */ 677 830 678 831 int 679 yyparse (YYPARSE_PARAM_ARG)832 yyparse (YYPARSE_PARAM_ARG) 680 833 YYPARSE_PARAM_DECL 681 834 { 835 /* If reentrant, generate the variables here. */ 836 #if YYPURE 837 YY_DECL_VARIABLES 838 #endif /* !YYPURE */ 839 682 840 register int yystate; 683 841 register int yyn; 842 int yyresult; 843 /* Number of tokens to shift before error messages enabled. */ 844 int yyerrstatus; 845 /* Lookahead token as an internal (translated) token number. */ 846 int yychar1 = 0; 847 848 /* Three stacks and their tools: 849 `yyss': related to states, 850 `yyvs': related to semantic values, 851 `yyls': related to locations. 852 853 Refer to the stacks thru separate pointers, to allow yyoverflow 854 to reallocate them elsewhere. */ 855 856 /* The state stack. */ 857 short yyssa[YYINITDEPTH]; 858 short *yyss = yyssa; 684 859 register short *yyssp; 860 861 /* The semantic value stack. */ 862 YYSTYPE yyvsa[YYINITDEPTH]; 863 YYSTYPE *yyvs = yyvsa; 685 864 register YYSTYPE *yyvsp; 686 int yyerrstatus; /* number of tokens to shift before error messages enabled */ 687 int yychar1 = 0; /* lookahead token as an internal (translated) token number */ 688 689 short yyssa[YYINITDEPTH]; /* the state stack */ 690 YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ 691 692 short *yyss = yyssa; /* refer to the stacks thru separate pointers */ 693 YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ 694 695 #ifdef YYLSP_NEEDED 696 YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ 865 866 #if YYLSP_NEEDED 867 /* The location stack. */ 868 YYLTYPE yylsa[YYINITDEPTH]; 697 869 YYLTYPE *yyls = yylsa; 698 870 YYLTYPE *yylsp; 699 700 #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) 871 #endif 872 873 #if YYLSP_NEEDED 874 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) 701 875 #else 702 #define YYPOPSTACK (yyvsp--, yyssp--) 703 #endif 704 705 int yystacksize = YYINITDEPTH; 706 int yyfree_stacks = 0; 707 708 #ifdef YYPURE 709 int yychar; 710 YYSTYPE yylval; 711 int yynerrs; 712 #ifdef YYLSP_NEEDED 713 YYLTYPE yylloc; 714 #endif 715 #endif 716 717 YYSTYPE yyval; /* the variable used to return */ 718 /* semantic values from the action */ 719 /* routines */ 720 876 # define YYPOPSTACK (yyvsp--, yyssp--) 877 #endif 878 879 YYSIZE_T yystacksize = YYINITDEPTH; 880 881 882 /* The variables used to return semantic value and location from the 883 action routines. */ 884 YYSTYPE yyval; 885 #if YYLSP_NEEDED 886 YYLTYPE yyloc; 887 #endif 888 889 /* When reducing, the number of symbols on the RHS of the reduced 890 rule. */ 721 891 int yylen; 722 892 723 #if YYDEBUG != 0 724 if (yydebug) 725 fprintf(stderr, "Starting parse\n"); 726 #endif 893 YYDPRINTF ((stderr, "Starting parse\n")); 727 894 728 895 yystate = 0; … … 736 903 The wasted elements are never initialized. */ 737 904 738 yyssp = yyss - 1;905 yyssp = yyss; 739 906 yyvsp = yyvs; 740 #if defYYLSP_NEEDED907 #if YYLSP_NEEDED 741 908 yylsp = yyls; 742 909 #endif 743 744 /* Push a new state, which is found in yystate . */ 745 /* In all cases, when you get here, the value and location stacks 746 have just been pushed. so pushing a state here evens the stacks. */ 747 yynewstate: 748 749 *++yyssp = yystate; 910 goto yysetstate; 911 912 /*------------------------------------------------------------. 913 | yynewstate -- Push a new state, which is found in yystate. | 914 `------------------------------------------------------------*/ 915 yynewstate: 916 /* In all cases, when you get here, the value and location stacks 917 have just been pushed. so pushing a state here evens the stacks. 918 */ 919 yyssp++; 920 921 yysetstate: 922 *yyssp = yystate; 750 923 751 924 if (yyssp >= yyss + yystacksize - 1) 752 925 { 753 /* Give user a chance to reallocate the stack */754 /* Use copies of these so that the &'s don't force the real ones into memory. */755 YYSTYPE *yyvs1 = yyvs;756 short *yyss1 = yyss;757 #ifdef YYLSP_NEEDED758 YYLTYPE *yyls1 = yyls;759 #endif760 761 926 /* Get the current used size of the three stacks, in elements. */ 762 intsize = yyssp - yyss + 1;927 YYSIZE_T yysize = yyssp - yyss + 1; 763 928 764 929 #ifdef yyoverflow 765 /* Each stack pointer address is followed by the size of 766 the data in use in that stack, in bytes. */ 767 #ifdef YYLSP_NEEDED 768 /* This used to be a conditional around just the two extra args, 769 but that might be undefined if yyoverflow is a macro. */ 770 yyoverflow("parser stack overflow", 771 &yyss1, size * sizeof (*yyssp), 772 &yyvs1, size * sizeof (*yyvsp), 773 &yyls1, size * sizeof (*yylsp), 774 &yystacksize); 775 #else 776 yyoverflow("parser stack overflow", 777 &yyss1, size * sizeof (*yyssp), 778 &yyvs1, size * sizeof (*yyvsp), 779 &yystacksize); 780 #endif 781 782 yyss = yyss1; yyvs = yyvs1; 783 #ifdef YYLSP_NEEDED 784 yyls = yyls1; 785 #endif 930 { 931 /* Give user a chance to reallocate the stack. Use copies of 932 these so that the &'s don't force the real ones into 933 memory. */ 934 YYSTYPE *yyvs1 = yyvs; 935 short *yyss1 = yyss; 936 937 /* Each stack pointer address is followed by the size of the 938 data in use in that stack, in bytes. */ 939 # if YYLSP_NEEDED 940 YYLTYPE *yyls1 = yyls; 941 /* This used to be a conditional around just the two extra args, 942 but that might be undefined if yyoverflow is a macro. */ 943 yyoverflow ("parser stack overflow", 944 &yyss1, yysize * sizeof (*yyssp), 945 &yyvs1, yysize * sizeof (*yyvsp), 946 &yyls1, yysize * sizeof (*yylsp), 947 &yystacksize); 948 yyls = yyls1; 949 # else 950 yyoverflow ("parser stack overflow", 951 &yyss1, yysize * sizeof (*yyssp), 952 &yyvs1, yysize * sizeof (*yyvsp), 953 &yystacksize); 954 # endif 955 yyss = yyss1; 956 yyvs = yyvs1; 957 } 786 958 #else /* no yyoverflow */ 959 # ifndef YYSTACK_RELOCATE 960 goto yyoverflowlab; 961 # else 787 962 /* Extend the stack our own way. */ 788 963 if (yystacksize >= YYMAXDEPTH) 789 { 790 yyerror("parser stack overflow"); 791 if (yyfree_stacks) 792 { 793 free (yyss); 794 free (yyvs); 795 #ifdef YYLSP_NEEDED 796 free (yyls); 797 #endif 798 } 799 return 2; 800 } 964 goto yyoverflowlab; 801 965 yystacksize *= 2; 802 966 if (yystacksize > YYMAXDEPTH) 803 967 yystacksize = YYMAXDEPTH; 804 #ifndef YYSTACK_USE_ALLOCA 805 yyfree_stacks = 1; 806 #endif 807 yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); 808 __yy_memcpy ((char *)yyss, (char *)yyss1, 809 size * (unsigned int) sizeof (*yyssp)); 810 yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); 811 __yy_memcpy ((char *)yyvs, (char *)yyvs1, 812 size * (unsigned int) sizeof (*yyvsp)); 813 #ifdef YYLSP_NEEDED 814 yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); 815 __yy_memcpy ((char *)yyls, (char *)yyls1, 816 size * (unsigned int) sizeof (*yylsp)); 817 #endif 968 969 { 970 short *yyss1 = yyss; 971 union yyalloc *yyptr = 972 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 973 if (! yyptr) 974 goto yyoverflowlab; 975 YYSTACK_RELOCATE (yyss); 976 YYSTACK_RELOCATE (yyvs); 977 # if YYLSP_NEEDED 978 YYSTACK_RELOCATE (yyls); 979 # endif 980 # undef YYSTACK_RELOCATE 981 if (yyss1 != yyssa) 982 YYSTACK_FREE (yyss1); 983 } 984 # endif 818 985 #endif /* no yyoverflow */ 819 986 820 yyssp = yyss + size - 1; 821 yyvsp = yyvs + size - 1; 822 #ifdef YYLSP_NEEDED 823 yylsp = yyls + size - 1; 824 #endif 825 826 #if YYDEBUG != 0 827 if (yydebug) 828 fprintf(stderr, "Stack size increased to %d\n", yystacksize); 829 #endif 987 yyssp = yyss + yysize - 1; 988 yyvsp = yyvs + yysize - 1; 989 #if YYLSP_NEEDED 990 yylsp = yyls + yysize - 1; 991 #endif 992 993 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 994 (unsigned long int) yystacksize)); 830 995 831 996 if (yyssp >= yyss + yystacksize - 1) … … 833 998 } 834 999 835 #if YYDEBUG != 0 836 if (yydebug) 837 fprintf(stderr, "Entering state %d\n", yystate); 838 #endif 1000 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 839 1001 840 1002 goto yybackup; 841 yybackup: 1003 1004 1005 /*-----------. 1006 | yybackup. | 1007 `-----------*/ 1008 yybackup: 842 1009 843 1010 /* Do appropriate processing given the current state. */ … … 858 1025 if (yychar == YYEMPTY) 859 1026 { 860 #if YYDEBUG != 0 861 if (yydebug) 862 fprintf(stderr, "Reading a token: "); 863 #endif 1027 YYDPRINTF ((stderr, "Reading a token: ")); 864 1028 yychar = YYLEX; 865 1029 } … … 872 1036 yychar = YYEOF; /* Don't call YYLEX any more */ 873 1037 874 #if YYDEBUG != 0 875 if (yydebug) 876 fprintf(stderr, "Now at end of input.\n"); 877 #endif 1038 YYDPRINTF ((stderr, "Now at end of input.\n")); 878 1039 } 879 1040 else 880 1041 { 881 yychar1 = YYTRANSLATE(yychar); 882 883 #if YYDEBUG != 0 1042 yychar1 = YYTRANSLATE (yychar); 1043 1044 #if YYDEBUG 1045 /* We have to keep this `#if YYDEBUG', since we use variables 1046 which are defined only if `YYDEBUG' is set. */ 884 1047 if (yydebug) 885 1048 { 886 fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); 887 /* Give the individual parser a way to print the precise meaning 888 of a token, for further debugging info. */ 889 #ifdef YYPRINT 1049 YYFPRINTF (stderr, "Next token is %d (%s", 1050 yychar, yytname[yychar1]); 1051 /* Give the individual parser a way to print the precise 1052 meaning of a token, for further debugging info. */ 1053 # ifdef YYPRINT 890 1054 YYPRINT (stderr, yychar, yylval); 891 # endif892 fprintf(stderr, ")\n");1055 # endif 1056 YYFPRINTF (stderr, ")\n"); 893 1057 } 894 1058 #endif … … 922 1086 923 1087 /* Shift the lookahead token. */ 924 925 #if YYDEBUG != 0 926 if (yydebug) 927 fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); 928 #endif 1088 YYDPRINTF ((stderr, "Shifting token %d (%s), ", 1089 yychar, yytname[yychar1])); 929 1090 930 1091 /* Discard the token being shifted unless it is eof. */ … … 933 1094 934 1095 *++yyvsp = yylval; 935 #if defYYLSP_NEEDED1096 #if YYLSP_NEEDED 936 1097 *++yylsp = yylloc; 937 1098 #endif 938 1099 939 /* count tokens shifted since error; after three, turn off error status. */ 940 if (yyerrstatus) yyerrstatus--; 1100 /* Count tokens shifted since error; after three, turn off error 1101 status. */ 1102 if (yyerrstatus) 1103 yyerrstatus--; 941 1104 942 1105 yystate = yyn; 943 1106 goto yynewstate; 944 1107 945 /* Do the default action for the current state. */ 1108 1109 /*-----------------------------------------------------------. 1110 | yydefault -- do the default action for the current state. | 1111 `-----------------------------------------------------------*/ 946 1112 yydefault: 947 948 1113 yyn = yydefact[yystate]; 949 1114 if (yyn == 0) 950 1115 goto yyerrlab; 951 952 /* Do a reduction. yyn is the number of a rule to reduce with. */ 1116 goto yyreduce; 1117 1118 1119 /*-----------------------------. 1120 | yyreduce -- Do a reduction. | 1121 `-----------------------------*/ 953 1122 yyreduce: 1123 /* yyn is the number of a rule to reduce with. */ 954 1124 yylen = yyr2[yyn]; 955 if (yylen > 0) 956 yyval = yyvsp[1-yylen]; /* implement default value of the action */ 957 958 #if YYDEBUG != 0 1125 1126 /* If YYLEN is nonzero, implement the default value of the action: 1127 `$$ = $1'. 1128 1129 Otherwise, the following line sets YYVAL to the semantic value of 1130 the lookahead token. This behavior is undocumented and Bison 1131 users should not rely upon it. Assigning to YYVAL 1132 unconditionally makes the parser a bit smaller, and it avoids a 1133 GCC warning that YYVAL may be used uninitialized. */ 1134 yyval = yyvsp[1-yylen]; 1135 1136 #if YYLSP_NEEDED 1137 /* Similarly for the default location. Let the user run additional 1138 commands if for instance locations are ranges. */ 1139 yyloc = yylsp[1-yylen]; 1140 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); 1141 #endif 1142 1143 #if YYDEBUG 1144 /* We have to keep this `#if YYDEBUG', since we use variables which 1145 are defined only if `YYDEBUG' is set. */ 959 1146 if (yydebug) 960 1147 { 961 int i;962 963 fprintf(stderr, "Reducing via rule %d (line %d), ",964 1148 int yyi; 1149 1150 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", 1151 yyn, yyrline[yyn]); 965 1152 966 1153 /* Print the symbols being reduced, and their result. */ 967 for ( i = yyprhs[yyn]; yyrhs[i] > 0;i++)968 fprintf (stderr, "%s ", yytname[yyrhs[i]]);969 fprintf(stderr, " -> %s\n", yytname[yyr1[yyn]]);1154 for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) 1155 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); 1156 YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); 970 1157 } 971 1158 #endif 972 973 1159 974 1160 switch (yyn) { … … 980 1166 insntbl_line, yyvsp[-4].num, yyvsp[-3].num, yyvsp[-2].str, yyvsp[-1].val)); 981 1167 itbl_add_reg (yyvsp[-4].num, yyvsp[-3].num, yyvsp[-2].str, yyvsp[-1].val); 982 ;983 break; }1168 } 1169 break; 984 1170 case 5: 985 1171 #line 317 "itbl-parse.y" … … 989 1175 DBG ((" sbit=%d ebit=%d flags=0x%x\n", sbit, ebit, yyvsp[0].val)); 990 1176 insn=itbl_add_insn (yyvsp[-5].num, yyvsp[-3].str, yyvsp[-2].val, sbit, ebit, yyvsp[0].val); 991 ; 992 break;} 1177 } 1178 break; 1179 case 6: 1180 #line 324 "itbl-parse.y" 1181 {} 1182 break; 993 1183 case 12: 994 #line 33 6"itbl-parse.y"1184 #line 337 "itbl-parse.y" 995 1185 { 996 1186 DBGL2 (("ftype\n")); 997 1187 yyval.num = yyvsp[0].num; 998 ;999 break; }1188 } 1189 break; 1000 1190 case 13: 1001 #line 34 1"itbl-parse.y"1191 #line 342 "itbl-parse.y" 1002 1192 { 1003 1193 DBGL2 (("addr\n")); 1004 1194 yyval.num = ADDR; 1005 ;1006 break; }1195 } 1196 break; 1007 1197 case 14: 1008 #line 34 6"itbl-parse.y"1198 #line 347 "itbl-parse.y" 1009 1199 { 1010 1200 DBGL2 (("immed\n")); 1011 1201 yyval.num = IMMED; 1012 ;1013 break; }1202 } 1203 break; 1014 1204 case 15: 1015 #line 35 4"itbl-parse.y"1205 #line 355 "itbl-parse.y" 1016 1206 { 1017 1207 DBG (("line %d: field type=%d sbit=%d ebit=%d, flags=0x%x\n", 1018 1208 insntbl_line, yyvsp[-2].num, sbit, ebit, yyvsp[0].val)); 1019 1209 itbl_add_operand (insn, yyvsp[-2].num, sbit, ebit, yyvsp[0].val); 1020 ;1021 break; }1210 } 1211 break; 1022 1212 case 16: 1023 #line 36 3"itbl-parse.y"1213 #line 364 "itbl-parse.y" 1024 1214 { 1025 1215 yyval.val = yyvsp[-2].num | yyvsp[0].val; 1026 ;1027 break; }1216 } 1217 break; 1028 1218 case 17: 1029 #line 36 7"itbl-parse.y"1219 #line 368 "itbl-parse.y" 1030 1220 { 1031 1221 yyval.val = yyvsp[-1].val; 1032 ;1033 break; }1222 } 1223 break; 1034 1224 case 18: 1035 #line 37 1"itbl-parse.y"1225 #line 372 "itbl-parse.y" 1036 1226 { 1037 1227 yyval.val = yyvsp[0].num; 1038 ;1039 break; }1228 } 1229 break; 1040 1230 case 19: 1041 #line 37 8"itbl-parse.y"1231 #line 379 "itbl-parse.y" 1042 1232 { 1043 1233 DBGL2 (("flags=%d\n", yyvsp[0].val)); 1044 1234 yyval.val = yyvsp[0].val; 1045 ;1046 break; }1235 } 1236 break; 1047 1237 case 20: 1048 #line 38 3"itbl-parse.y"1238 #line 384 "itbl-parse.y" 1049 1239 { 1050 1240 yyval.val = 0; 1051 ;1052 break; }1241 } 1242 break; 1053 1243 case 21: 1054 #line 39 0"itbl-parse.y"1244 #line 391 "itbl-parse.y" 1055 1245 { 1056 1246 DBGL2 (("range %d %d\n", yyvsp[-2].num, yyvsp[0].num)); 1057 1247 sbit = yyvsp[-2].num; 1058 1248 ebit = yyvsp[0].num; 1059 ;1060 break; }1249 } 1250 break; 1061 1251 case 22: 1062 #line 39 6"itbl-parse.y"1252 #line 397 "itbl-parse.y" 1063 1253 { 1064 1254 sbit = 31; 1065 1255 ebit = 0; 1066 ;1067 break; }1256 } 1257 break; 1068 1258 case 23: 1069 #line 40 4"itbl-parse.y"1259 #line 405 "itbl-parse.y" 1070 1260 { 1071 1261 DBGL2 (("pnum=%d\n",yyvsp[0].num)); 1072 1262 yyval.num = yyvsp[0].num; 1073 ;1074 break; }1263 } 1264 break; 1075 1265 case 24: 1076 #line 41 2"itbl-parse.y"1266 #line 413 "itbl-parse.y" 1077 1267 { 1078 1268 DBGL2 (("dreg\n")); 1079 1269 yyval.num = DREG; 1080 ;1081 break; }1270 } 1271 break; 1082 1272 case 25: 1083 #line 41 7"itbl-parse.y"1273 #line 418 "itbl-parse.y" 1084 1274 { 1085 1275 DBGL2 (("creg\n")); 1086 1276 yyval.num = CREG; 1087 ;1088 break; }1277 } 1278 break; 1089 1279 case 26: 1090 #line 42 2"itbl-parse.y"1280 #line 423 "itbl-parse.y" 1091 1281 { 1092 1282 DBGL2 (("greg\n")); 1093 1283 yyval.num = GREG; 1094 ;1095 break; }1284 } 1285 break; 1096 1286 case 27: 1097 #line 43 0"itbl-parse.y"1287 #line 431 "itbl-parse.y" 1098 1288 { 1099 1289 DBGL2 (("name=%s\n",yyvsp[0].str)); 1100 1290 yyval.str = yyvsp[0].str; 1101 ;1102 break; }1291 } 1292 break; 1103 1293 case 28: 1104 #line 43 8"itbl-parse.y"1294 #line 439 "itbl-parse.y" 1105 1295 { 1106 1296 DBGL2 (("num=%d\n",yyvsp[0].num)); 1107 1297 yyval.num = yyvsp[0].num; 1108 ;1109 break; }1298 } 1299 break; 1110 1300 case 29: 1111 #line 44 6"itbl-parse.y"1301 #line 447 "itbl-parse.y" 1112 1302 { 1113 1303 DBGL2 (("val=x%x\n",yyvsp[0].num)); 1114 1304 yyval.val = yyvsp[0].num; 1115 ;1116 break; }1305 } 1306 break; 1117 1307 } 1118 /* the action file gets copied in in place of this dollarsign */ 1119 #line 543 "/usr/share/bison/bison.simple" 1308 1309 #line 705 "/usr/share/bison-1.35/bison.simple" 1310 1120 1311 1121 1312 1122 1313 yyvsp -= yylen; 1123 1314 yyssp -= yylen; 1124 #if defYYLSP_NEEDED1315 #if YYLSP_NEEDED 1125 1316 yylsp -= yylen; 1126 1317 #endif 1127 1318 1128 #if YYDEBUG != 01319 #if YYDEBUG 1129 1320 if (yydebug) 1130 1321 { 1131 short * ssp1 = yyss - 1;1132 fprintf(stderr, "state stack now");1133 while ( ssp1 != yyssp)1134 fprintf (stderr, " %d", *++ssp1);1135 fprintf(stderr, "\n");1322 short *yyssp1 = yyss - 1; 1323 YYFPRINTF (stderr, "state stack now"); 1324 while (yyssp1 != yyssp) 1325 YYFPRINTF (stderr, " %d", *++yyssp1); 1326 YYFPRINTF (stderr, "\n"); 1136 1327 } 1137 1328 #endif 1138 1329 1139 1330 *++yyvsp = yyval; 1140 1141 #ifdef YYLSP_NEEDED 1142 yylsp++; 1143 if (yylen == 0) 1144 { 1145 yylsp->first_line = yylloc.first_line; 1146 yylsp->first_column = yylloc.first_column; 1147 yylsp->last_line = (yylsp-1)->last_line; 1148 yylsp->last_column = (yylsp-1)->last_column; 1149 yylsp->text = 0; 1150 } 1151 else 1152 { 1153 yylsp->last_line = (yylsp+yylen-1)->last_line; 1154 yylsp->last_column = (yylsp+yylen-1)->last_column; 1155 } 1156 #endif 1157 1158 /* Now "shift" the result of the reduction. 1159 Determine what state that goes to, 1160 based on the state we popped back to 1161 and the rule number reduced by. */ 1331 #if YYLSP_NEEDED 1332 *++yylsp = yyloc; 1333 #endif 1334 1335 /* Now `shift' the result of the reduction. Determine what state 1336 that goes to, based on the state we popped back to and the rule 1337 number reduced by. */ 1162 1338 1163 1339 yyn = yyr1[yyn]; … … 1171 1347 goto yynewstate; 1172 1348 1173 yyerrlab: /* here on detecting error */ 1174 1175 if (! yyerrstatus) 1176 /* If not already recovering from an error, report this error. */ 1349 1350 /*------------------------------------. 1351 | yyerrlab -- here on detecting error | 1352 `------------------------------------*/ 1353 yyerrlab: 1354 /* If not already recovering from an error, report this error. */ 1355 if (!yyerrstatus) 1177 1356 { 1178 1357 ++yynerrs; … … 1183 1362 if (yyn > YYFLAG && yyn < YYLAST) 1184 1363 { 1185 int size = 0; 1186 char *msg; 1187 int x, count; 1188 1189 count = 0; 1190 /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ 1191 for (x = (yyn < 0 ? -yyn : 0); 1192 x < (sizeof(yytname) / sizeof(char *)); x++) 1193 if (yycheck[x + yyn] == x) 1194 size += strlen(yytname[x]) + 15, count++; 1195 msg = (char *) malloc(size + 15); 1196 if (msg != 0) 1364 YYSIZE_T yysize = 0; 1365 char *yymsg; 1366 int yyx, yycount; 1367 1368 yycount = 0; 1369 /* Start YYX at -YYN if negative to avoid negative indexes in 1370 YYCHECK. */ 1371 for (yyx = yyn < 0 ? -yyn : 0; 1372 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) 1373 if (yycheck[yyx + yyn] == yyx) 1374 yysize += yystrlen (yytname[yyx]) + 15, yycount++; 1375 yysize += yystrlen ("parse error, unexpected ") + 1; 1376 yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); 1377 yymsg = (char *) YYSTACK_ALLOC (yysize); 1378 if (yymsg != 0) 1197 1379 { 1198 strcpy(msg, "parse error"); 1199 1200 if (count < 5) 1380 char *yyp = yystpcpy (yymsg, "parse error, unexpected "); 1381 yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); 1382 1383 if (yycount < 5) 1201 1384 { 1202 count = 0; 1203 for (x = (yyn < 0 ? -yyn : 0); 1204 x < (sizeof(yytname) / sizeof(char *)); x++) 1205 if (yycheck[x + yyn] == x) 1385 yycount = 0; 1386 for (yyx = yyn < 0 ? -yyn : 0; 1387 yyx < (int) (sizeof (yytname) / sizeof (char *)); 1388 yyx++) 1389 if (yycheck[yyx + yyn] == yyx) 1206 1390 { 1207 strcat(msg, count == 0 ? ", expecting `" : " or `");1208 strcat(msg, yytname[x]);1209 strcat(msg, "'");1210 count++;1391 const char *yyq = ! yycount ? ", expecting " : " or "; 1392 yyp = yystpcpy (yyp, yyq); 1393 yyp = yystpcpy (yyp, yytname[yyx]); 1394 yycount++; 1211 1395 } 1212 1396 } 1213 yyerror (msg);1214 free(msg);1397 yyerror (yymsg); 1398 YYSTACK_FREE (yymsg); 1215 1399 } 1216 1400 else 1217 yyerror ("parse error; also virtual memory ex ceeded");1401 yyerror ("parse error; also virtual memory exhausted"); 1218 1402 } 1219 1403 else 1220 #endif /* YYERROR_VERBOSE*/1221 yyerror ("parse error");1404 #endif /* defined (YYERROR_VERBOSE) */ 1405 yyerror ("parse error"); 1222 1406 } 1223 1224 1407 goto yyerrlab1; 1225 yyerrlab1: /* here on error raised explicitly by an action */ 1226 1408 1409 1410 /*--------------------------------------------------. 1411 | yyerrlab1 -- error raised explicitly by an action | 1412 `--------------------------------------------------*/ 1413 yyerrlab1: 1227 1414 if (yyerrstatus == 3) 1228 1415 { 1229 /* if just tried and failed to reuse lookahead token after an error, discard it. */ 1416 /* If just tried and failed to reuse lookahead token after an 1417 error, discard it. */ 1230 1418 1231 1419 /* return failure if at end of input */ 1232 1420 if (yychar == YYEOF) 1233 1421 YYABORT; 1234 1235 #if YYDEBUG != 0 1236 if (yydebug) 1237 fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); 1238 #endif 1239 1422 YYDPRINTF ((stderr, "Discarding token %d (%s).\n", 1423 yychar, yytname[yychar1])); 1240 1424 yychar = YYEMPTY; 1241 1425 } 1242 1426 1243 /* Else will try to reuse lookahead token 1244 after shifting the errortoken. */1427 /* Else will try to reuse lookahead token after shifting the error 1428 token. */ 1245 1429 1246 1430 yyerrstatus = 3; /* Each real token shifted decrements this */ … … 1248 1432 goto yyerrhandle; 1249 1433 1250 yyerrdefault: /* current state does not do anything special for the error token. */ 1251 1434 1435 /*-------------------------------------------------------------------. 1436 | yyerrdefault -- current state does not do anything special for the | 1437 | error token. | 1438 `-------------------------------------------------------------------*/ 1439 yyerrdefault: 1252 1440 #if 0 1253 1441 /* This is wrong; only states that explicitly want error tokens 1254 1442 should shift them. */ 1255 yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ 1256 if (yyn) goto yydefault; 1257 #endif 1258 1259 yyerrpop: /* pop the current state because it cannot handle the error token */ 1260 1261 if (yyssp == yyss) YYABORT; 1443 1444 /* If its default is to accept any token, ok. Otherwise pop it. */ 1445 yyn = yydefact[yystate]; 1446 if (yyn) 1447 goto yydefault; 1448 #endif 1449 1450 1451 /*---------------------------------------------------------------. 1452 | yyerrpop -- pop the current state because it cannot handle the | 1453 | error token | 1454 `---------------------------------------------------------------*/ 1455 yyerrpop: 1456 if (yyssp == yyss) 1457 YYABORT; 1262 1458 yyvsp--; 1263 1459 yystate = *--yyssp; 1264 #if defYYLSP_NEEDED1460 #if YYLSP_NEEDED 1265 1461 yylsp--; 1266 1462 #endif 1267 1463 1268 #if YYDEBUG != 01464 #if YYDEBUG 1269 1465 if (yydebug) 1270 1466 { 1271 short * ssp1 = yyss - 1;1272 fprintf(stderr, "Error: state stack now");1273 while ( ssp1 != yyssp)1274 fprintf (stderr, " %d", *++ssp1);1275 fprintf(stderr, "\n");1467 short *yyssp1 = yyss - 1; 1468 YYFPRINTF (stderr, "Error: state stack now"); 1469 while (yyssp1 != yyssp) 1470 YYFPRINTF (stderr, " %d", *++yyssp1); 1471 YYFPRINTF (stderr, "\n"); 1276 1472 } 1277 1473 #endif 1278 1474 1475 /*--------------. 1476 | yyerrhandle. | 1477 `--------------*/ 1279 1478 yyerrhandle: 1280 1281 1479 yyn = yypact[yystate]; 1282 1480 if (yyn == YYFLAG) … … 1301 1499 YYACCEPT; 1302 1500 1303 #if YYDEBUG != 0 1304 if (yydebug) 1305 fprintf(stderr, "Shifting error token, "); 1306 #endif 1501 YYDPRINTF ((stderr, "Shifting error token, ")); 1307 1502 1308 1503 *++yyvsp = yylval; 1309 #if defYYLSP_NEEDED1504 #if YYLSP_NEEDED 1310 1505 *++yylsp = yylloc; 1311 1506 #endif … … 1314 1509 goto yynewstate; 1315 1510 1316 yyacceptlab: 1317 /* YYACCEPT comes here. */ 1318 if (yyfree_stacks) 1319 { 1320 free (yyss); 1321 free (yyvs); 1322 #ifdef YYLSP_NEEDED 1323 free (yyls); 1324 #endif 1325 } 1326 return 0; 1327 1328 yyabortlab: 1329 /* YYABORT comes here. */ 1330 if (yyfree_stacks) 1331 { 1332 free (yyss); 1333 free (yyvs); 1334 #ifdef YYLSP_NEEDED 1335 free (yyls); 1336 #endif 1337 } 1338 return 1; 1511 1512 /*-------------------------------------. 1513 | yyacceptlab -- YYACCEPT comes here. | 1514 `-------------------------------------*/ 1515 yyacceptlab: 1516 yyresult = 0; 1517 goto yyreturn; 1518 1519 /*-----------------------------------. 1520 | yyabortlab -- YYABORT comes here. | 1521 `-----------------------------------*/ 1522 yyabortlab: 1523 yyresult = 1; 1524 goto yyreturn; 1525 1526 /*---------------------------------------------. 1527 | yyoverflowab -- parser overflow comes here. | 1528 `---------------------------------------------*/ 1529 yyoverflowlab: 1530 yyerror ("parser stack overflow"); 1531 yyresult = 2; 1532 /* Fall through. */ 1533 1534 yyreturn: 1535 #ifndef yyoverflow 1536 if (yyss != yyssa) 1537 YYSTACK_FREE (yyss); 1538 #endif 1539 return yyresult; 1339 1540 } 1340 #line 45 1"itbl-parse.y"1541 #line 452 "itbl-parse.y" 1341 1542 1342 1543 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.