| OLD | NEW |
| 1 /* A Bison parser, made by GNU Bison 1.875c. */ | 1 /* A Bison parser, made by GNU Bison 1.875c. */ |
| 2 | 2 |
| 3 /* Skeleton parser for Yacc-like parsing with Bison, | 3 /* Skeleton parser for Yacc-like parsing with Bison, |
| 4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundati
on, Inc. | 4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundati
on, Inc. |
| 5 | 5 |
| 6 This program is free software; you can redistribute it and/or modify | 6 This program is free software; you can redistribute it and/or modify |
| 7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
| 8 the Free Software Foundation; either version 2, or (at your option) | 8 the Free Software Foundation; either version 2, or (at your option) |
| 9 any later version. | 9 any later version. |
| 10 | 10 |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 #define yyrule m2_rule /* With YYDEBUG defined */ | 212 #define yyrule m2_rule /* With YYDEBUG defined */ |
| 213 #define yylhs m2_yylhs | 213 #define yylhs m2_yylhs |
| 214 #define yylen m2_yylen | 214 #define yylen m2_yylen |
| 215 #define yydefred m2_yydefred | 215 #define yydefred m2_yydefred |
| 216 #define yydgoto m2_yydgoto | 216 #define yydgoto m2_yydgoto |
| 217 #define yysindex m2_yysindex | 217 #define yysindex m2_yysindex |
| 218 #define yyrindex m2_yyrindex | 218 #define yyrindex m2_yyrindex |
| 219 #define yygindex m2_yygindex | 219 #define yygindex m2_yygindex |
| 220 #define yytable m2_yytable | 220 #define yytable m2_yytable |
| 221 #define yycheck m2_yycheck | 221 #define yycheck m2_yycheck |
| 222 #define yyss m2_yyss |
| 223 #define yysslim m2_yysslim |
| 224 #define yyssp m2_yyssp |
| 225 #define yystacksize m2_yystacksize |
| 226 #define yyvs m2_yyvs |
| 227 #define yyvsp m2_yyvsp |
| 222 | 228 |
| 223 #ifndef YYDEBUG | 229 #ifndef YYDEBUG |
| 224 #define YYDEBUG 1 /* Default to yydebug support */ | 230 #define YYDEBUG 1 /* Default to yydebug support */ |
| 225 #endif | 231 #endif |
| 226 | 232 |
| 227 #define YYFPRINTF parser_fprintf | 233 #define YYFPRINTF parser_fprintf |
| 228 | 234 |
| 229 int yyparse (void); | 235 int yyparse (void); |
| 230 | 236 |
| 231 static int yylex (void); | 237 static int yylex (void); |
| 232 | 238 |
| 233 void yyerror (char *); | 239 void yyerror (char *); |
| 234 | 240 |
| 235 #if 0 | |
| 236 static char *make_qualname (char *, char *); | |
| 237 #endif | |
| 238 | |
| 239 static int parse_number (int); | 241 static int parse_number (int); |
| 240 | 242 |
| 241 /* The sign of the number being parsed. */ | 243 /* The sign of the number being parsed. */ |
| 242 static int number_sign = 1; | 244 static int number_sign = 1; |
| 243 | 245 |
| 244 /* The block that the module specified by the qualifer on an identifer is | |
| 245 contained in, */ | |
| 246 #if 0 | |
| 247 static struct block *modblock=0; | |
| 248 #endif | |
| 249 | |
| 250 | 246 |
| 251 | 247 |
| 252 /* Enabling traces. */ | 248 /* Enabling traces. */ |
| 253 #ifndef YYDEBUG | 249 #ifndef YYDEBUG |
| 254 # define YYDEBUG 0 | 250 # define YYDEBUG 0 |
| 255 #endif | 251 #endif |
| 256 | 252 |
| 257 /* Enabling verbose error messages. */ | 253 /* Enabling verbose error messages. */ |
| 258 #ifdef YYERROR_VERBOSE | 254 #ifdef YYERROR_VERBOSE |
| 259 # undef YYERROR_VERBOSE | 255 # undef YYERROR_VERBOSE |
| 260 # define YYERROR_VERBOSE 1 | 256 # define YYERROR_VERBOSE 1 |
| 261 #else | 257 #else |
| 262 # define YYERROR_VERBOSE 0 | 258 # define YYERROR_VERBOSE 0 |
| 263 #endif | 259 #endif |
| 264 | 260 |
| 265 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) | 261 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) |
| 266 #line 138 "m2-exp.y" | 262 #line 134 "m2-exp.y" |
| 267 typedef union YYSTYPE { | 263 typedef union YYSTYPE { |
| 268 LONGEST lval; | 264 LONGEST lval; |
| 269 ULONGEST ulval; | 265 ULONGEST ulval; |
| 270 DOUBLEST dval; | 266 DOUBLEST dval; |
| 271 struct symbol *sym; | 267 struct symbol *sym; |
| 272 struct type *tval; | 268 struct type *tval; |
| 273 struct stoken sval; | 269 struct stoken sval; |
| 274 int voidval; | 270 int voidval; |
| 275 struct block *bval; | 271 struct block *bval; |
| 276 enum exp_opcode opcode; | 272 enum exp_opcode opcode; |
| 277 struct internalvar *ivar; | 273 struct internalvar *ivar; |
| 278 | 274 |
| 279 struct type **tvec; | 275 struct type **tvec; |
| 280 int *ivec; | 276 int *ivec; |
| 281 } YYSTYPE; | 277 } YYSTYPE; |
| 282 /* Line 191 of yacc.c. */ | 278 /* Line 191 of yacc.c. */ |
| 283 #line 284 "m2-exp.c" | 279 #line 280 "m2-exp.c" |
| 284 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ | 280 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
| 285 # define YYSTYPE_IS_DECLARED 1 | 281 # define YYSTYPE_IS_DECLARED 1 |
| 286 # define YYSTYPE_IS_TRIVIAL 1 | 282 # define YYSTYPE_IS_TRIVIAL 1 |
| 287 #endif | 283 #endif |
| 288 | 284 |
| 289 | 285 |
| 290 | 286 |
| 291 /* Copy the second part of user declarations. */ | 287 /* Copy the second part of user declarations. */ |
| 292 | 288 |
| 293 | 289 |
| 294 /* Line 214 of yacc.c. */ | 290 /* Line 214 of yacc.c. */ |
| 295 #line 296 "m2-exp.c" | 291 #line 292 "m2-exp.c" |
| 296 | 292 |
| 297 #if ! defined (yyoverflow) || YYERROR_VERBOSE | 293 #if ! defined (yyoverflow) || YYERROR_VERBOSE |
| 298 | 294 |
| 299 # ifndef YYFREE | 295 # ifndef YYFREE |
| 300 # define YYFREE xfree | 296 # define YYFREE xfree |
| 301 # endif | 297 # endif |
| 302 # ifndef YYMALLOC | 298 # ifndef YYMALLOC |
| 303 # define YYMALLOC xmalloc | 299 # define YYMALLOC xmalloc |
| 304 # endif | 300 # endif |
| 305 | 301 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 38, 72, -1, 7, -1, 8, -1, 3, -1, 6, | 496 38, 72, -1, 7, -1, 8, -1, 3, -1, 6, |
| 501 -1, 9, -1, 10, -1, 82, -1, 17, 60, 83, | 497 -1, 9, -1, 10, -1, 82, -1, 17, 60, 83, |
| 502 65, -1, 11, -1, 81, -1, 13, -1, 80, 34, | 498 65, -1, 11, -1, 81, -1, 13, -1, 80, 34, |
| 503 13, -1, 81, -1, 35, -1, 80, 34, 12, -1, | 499 13, -1, 81, -1, 35, -1, 80, 34, 12, -1, |
| 504 12, -1, 16, -1 | 500 12, -1, 16, -1 |
| 505 }; | 501 }; |
| 506 | 502 |
| 507 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ | 503 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
| 508 static const unsigned short yyrline[] = | 504 static const unsigned short yyrline[] = |
| 509 { | 505 { |
| 510 0, 207, 207, 208, 211, 220, 225, 224, 231, 235, | 506 0, 203, 203, 204, 207, 216, 221, 220, 227, 231, |
| 511 239, 240, 243, 247, 251, 255, 259, 265, 271, 275, | 507 235, 236, 239, 243, 247, 251, 255, 261, 267, 271, |
| 512 281, 285, 289, 293, 297, 302, 306, 312, 316, 322, | 508 277, 281, 285, 289, 293, 298, 302, 308, 312, 318, |
| 513 328, 331, 335, 339, 343, 345, 355, 351, 362, 369, | 509 324, 327, 331, 335, 339, 341, 351, 347, 358, 365, |
| 514 366, 376, 379, 383, 388, 393, 398, 404, 410, 418, | 510 362, 372, 375, 379, 384, 389, 394, 400, 406, 414, |
| 515 422, 426, 430, 434, 438, 442, 446, 450, 452, 456, | 511 418, 422, 426, 430, 434, 438, 442, 446, 448, 452, |
| 516 460, 464, 468, 472, 476, 480, 487, 493, 499, 506, | 512 456, 460, 464, 468, 472, 476, 483, 489, 495, 502, |
| 517 515, 523, 530, 533, 540, 547, 551, 560, 572, 580, | 513 511, 519, 526, 529, 536, 543, 547, 556, 568, 576, |
| 518 584, 600, 645 | 514 580, 603, 648 |
| 519 }; | 515 }; |
| 520 #endif | 516 #endif |
| 521 | 517 |
| 522 #if YYDEBUG || YYERROR_VERBOSE | 518 #if YYDEBUG || YYERROR_VERBOSE |
| 523 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. | 519 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
| 524 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ | 520 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
| 525 static const char *const yytname[] = | 521 static const char *const yytname[] = |
| 526 { | 522 { |
| 527 "$end", "error", "$undefined", "INT", "HEX", "ERROR", "UINT", "M2_TRUE", | 523 "$end", "error", "$undefined", "INT", "HEX", "ERROR", "UINT", "M2_TRUE", |
| 528 "M2_FALSE", "CHAR", "FLOAT", "STRING", "NAME", "BLOCKNAME", "IDENT", | 524 "M2_FALSE", "CHAR", "FLOAT", "STRING", "NAME", "BLOCKNAME", "IDENT", |
| (...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1469 | 1465 |
| 1470 /* If YYLEN is nonzero, implement the default value of the action: | 1466 /* If YYLEN is nonzero, implement the default value of the action: |
| 1471 `$$ = $1'. | 1467 `$$ = $1'. |
| 1472 | 1468 |
| 1473 Otherwise, the following line sets YYVAL to garbage. | 1469 Otherwise, the following line sets YYVAL to garbage. |
| 1474 This behavior is undocumented and Bison | 1470 This behavior is undocumented and Bison |
| 1475 users should not rely upon it. Assigning to YYVAL | 1471 users should not rely upon it. Assigning to YYVAL |
| 1476 unconditionally makes the parser a bit smaller, and it avoids a | 1472 unconditionally makes the parser a bit smaller, and it avoids a |
| 1477 GCC warning that YYVAL may be used uninitialized. */ | 1473 GCC warning that YYVAL may be used uninitialized. */ |
| 1478 yyval = yyvsp[1-yylen]; | 1474 yyval = yyvsp[1-yylen]; |
error: old chunk mismatch |
None
| OLD | NEW |