| OLD | NEW |
| 1 /* YACC parser for Fortran expressions, for GDB. | 1 /* YACC parser for Fortran expressions, for GDB. |
| 2 Copyright (C) 1986, 1989-1991, 1993-1996, 2000-2012 Free Software | 2 Copyright (C) 1986-2013 Free Software Foundation, Inc. |
| 3 Foundation, Inc. | |
| 4 | 3 |
| 5 Contributed by Motorola. Adapted from the C parser by Farooq Butt | 4 Contributed by Motorola. Adapted from the C parser by Farooq Butt |
| 6 (fmbutt@engage.sps.mot.com). | 5 (fmbutt@engage.sps.mot.com). |
| 7 | 6 |
| 8 This file is part of GDB. | 7 This file is part of GDB. |
| 9 | 8 |
| 10 This program is free software; you can redistribute it and/or modify | 9 This program is free software; you can redistribute it and/or modify |
| 11 it under the terms of the GNU General Public License as published by | 10 it under the terms of the GNU General Public License as published by |
| 12 the Free Software Foundation; either version 3 of the License, or | 11 the Free Software Foundation; either version 3 of the License, or |
| 13 (at your option) any later version. | 12 (at your option) any later version. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 36 xmalloc and xrealloc respectively by the same sed command in the | 35 xmalloc and xrealloc respectively by the same sed command in the |
| 37 makefile that remaps any other malloc/realloc inserted by the parser | 36 makefile that remaps any other malloc/realloc inserted by the parser |
| 38 generator. Doing this with #defines and trying to control the interaction | 37 generator. Doing this with #defines and trying to control the interaction |
| 39 with include files (<malloc.h> and <stdlib.h> for example) just became | 38 with include files (<malloc.h> and <stdlib.h> for example) just became |
| 40 too messy, particularly when such includes can be inserted at random | 39 too messy, particularly when such includes can be inserted at random |
| 41 times by the parser generator. */ | 40 times by the parser generator. */ |
| 42 | 41 |
| 43 %{ | 42 %{ |
| 44 | 43 |
| 45 #include "defs.h" | 44 #include "defs.h" |
| 46 #include "gdb_string.h" | 45 #include <string.h> |
| 47 #include "expression.h" | 46 #include "expression.h" |
| 48 #include "value.h" | 47 #include "value.h" |
| 49 #include "parser-defs.h" | 48 #include "parser-defs.h" |
| 50 #include "language.h" | 49 #include "language.h" |
| 51 #include "f-lang.h" | 50 #include "f-lang.h" |
| 52 #include "bfd.h" /* Required by objfiles.h. */ | 51 #include "bfd.h" /* Required by objfiles.h. */ |
| 53 #include "symfile.h" /* Required by objfiles.h. */ | 52 #include "symfile.h" /* Required by objfiles.h. */ |
| 54 #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */ | 53 #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */ |
| 55 #include "block.h" | 54 #include "block.h" |
| 56 #include <ctype.h> | 55 #include <ctype.h> |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 struct block *bval; | 150 struct block *bval; |
| 152 enum exp_opcode opcode; | 151 enum exp_opcode opcode; |
| 153 struct internalvar *ivar; | 152 struct internalvar *ivar; |
| 154 | 153 |
| 155 struct type **tvec; | 154 struct type **tvec; |
| 156 int *ivec; | 155 int *ivec; |
| 157 } | 156 } |
| 158 | 157 |
| 159 %{ | 158 %{ |
| 160 /* YYSTYPE gets defined by %union */ | 159 /* YYSTYPE gets defined by %union */ |
| 161 static int parse_number (char *, int, int, YYSTYPE *); | 160 static int parse_number (const char *, int, int, YYSTYPE *); |
| 162 %} | 161 %} |
| 163 | 162 |
| 164 %type <voidval> exp type_exp start variable | 163 %type <voidval> exp type_exp start variable |
| 165 %type <tval> type typebase | 164 %type <tval> type typebase |
| 166 %type <tvec> nonempty_typelist | 165 %type <tvec> nonempty_typelist |
| 167 /* %type <bval> block */ | 166 /* %type <bval> block */ |
| 168 | 167 |
| 169 /* Fancy type parsing. */ | 168 /* Fancy type parsing. */ |
| 170 %type <voidval> func_mod direct_abs_decl abs_decl | 169 %type <voidval> func_mod direct_abs_decl abs_decl |
| 171 %type <tval> ptype | 170 %type <tval> ptype |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 innermost_block)) | 503 innermost_block)) |
| 505 innermost_block = block_found; | 504 innermost_block = block_found; |
| 506 } | 505 } |
| 507 write_exp_elt_opcode (OP_VAR_VALUE); | 506 write_exp_elt_opcode (OP_VAR_VALUE); |
| 508 /* We want to use the selected frame, not | 507 /* We want to use the selected frame, not |
| 509 another more inner frame which happens to | 508 another more inner frame which happens to |
| 510 be in the same block. */ | 509 be in the same block. */ |
| 511 write_exp_elt_block (NULL); | 510 write_exp_elt_block (NULL); |
| 512 write_exp_elt_sym (sym); | 511 write_exp_elt_sym (sym); |
| 513 write_exp_elt_opcode (OP_VAR_VALUE); | 512 write_exp_elt_opcode (OP_VAR_VALUE); |
error: old chunk mismatch |
None
| OLD | NEW |