Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Side by Side Diff: gdb/p-exp.y

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/p-exp.c ('k') | gdb/p-lang.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
None
OLDNEW
1 /* YACC parser for Pascal expressions, for GDB. 1 /* YACC parser for Pascal expressions, for GDB.
2 Copyright (C) 2000, 2006-2012 Free Software Foundation, Inc. 2 Copyright (C) 2000-2013 Free Software Foundation, Inc.
3 3
4 This file is part of GDB. 4 This file is part of GDB.
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 3 of the License, or 8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 24 matching lines...) Expand all
37 37
38 /* Known bugs or limitations: 38 /* Known bugs or limitations:
39 - pascal string operations are not supported at all. 39 - pascal string operations are not supported at all.
40 - there are some problems with boolean types. 40 - there are some problems with boolean types.
41 - Pascal type hexadecimal constants are not supported 41 - Pascal type hexadecimal constants are not supported
42 because they conflict with the internal variables format. 42 because they conflict with the internal variables format.
43 Probably also lots of other problems, less well defined PM. */ 43 Probably also lots of other problems, less well defined PM. */
44 %{ 44 %{
45 45
46 #include "defs.h" 46 #include "defs.h"
47 #include "gdb_string.h" 47 #include <string.h>
48 #include <ctype.h> 48 #include <ctype.h>
49 #include "expression.h" 49 #include "expression.h"
50 #include "value.h" 50 #include "value.h"
51 #include "parser-defs.h" 51 #include "parser-defs.h"
52 #include "language.h" 52 #include "language.h"
53 #include "p-lang.h" 53 #include "p-lang.h"
54 #include "bfd.h" /* Required by objfiles.h. */ 54 #include "bfd.h" /* Required by objfiles.h. */
55 #include "symfile.h" /* Required by objfiles.h. */ 55 #include "symfile.h" /* Required by objfiles.h. */
56 #include "objfiles.h" /* For have_full_symbols and have_partial_symbols. */ 56 #include "objfiles.h" /* For have_full_symbols and have_partial_symbols. */
57 #include "block.h" 57 #include "block.h"
58 #include "completer.h"
58 59
59 #define parse_type builtin_type (parse_gdbarch) 60 #define parse_type builtin_type (parse_gdbarch)
60 61
61 /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc), 62 /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
62 as well as gratuitiously global symbol names, so we can have multiple 63 as well as gratuitiously global symbol names, so we can have multiple
63 yacc generated parsers in gdb. Note that these are only the variables 64 yacc generated parsers in gdb. Note that these are only the variables
64 produced by yacc. If other parser generators (bison, byacc, etc) produce 65 produced by yacc. If other parser generators (bison, byacc, etc) produce
65 additional global names that conflict at link time, then those parser 66 additional global names that conflict at link time, then those parser
66 generators need to be fixed instead of adding those names to this list. */ 67 generators need to be fixed instead of adding those names to this list. */
67 68
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 #endif 118 #endif
118 119
119 #define YYFPRINTF parser_fprintf 120 #define YYFPRINTF parser_fprintf
120 121
121 int yyparse (void); 122 int yyparse (void);
122 123
123 static int yylex (void); 124 static int yylex (void);
124 125
125 void yyerror (char *); 126 void yyerror (char *);
126 127
127 static char * uptok (char *, int); 128 static char *uptok (const char *, int);
128 %} 129 %}
129 130
130 /* Although the yacc "value" of an expression is not used, 131 /* Although the yacc "value" of an expression is not used,
131 since the result is stored in the structure being created, 132 since the result is stored in the structure being created,
132 other node types do have values. */ 133 other node types do have values. */
133 134
134 %union 135 %union
135 { 136 {
136 LONGEST lval; 137 LONGEST lval;
137 struct { 138 struct {
(...skipping 13 matching lines...) Expand all
151 struct block *bval; 152 struct block *bval;
152 enum exp_opcode opcode; 153 enum exp_opcode opcode;
153 struct internalvar *ivar; 154 struct internalvar *ivar;
154 155
155 struct type **tvec; 156 struct type **tvec;
156 int *ivec; 157 int *ivec;
157 } 158 }
158 159
159 %{ 160 %{
160 /* YYSTYPE gets defined by %union */ 161 /* YYSTYPE gets defined by %union */
161 static int parse_number (char *, int, int, YYSTYPE *); 162 static int parse_number (const char *, int, int, YYSTYPE *);
162 163
163 static struct type *current_type; 164 static struct type *current_type;
164 static struct internalvar *intvar; 165 static struct internalvar *intvar;
165 static int leftdiv_is_integer; 166 static int leftdiv_is_integer;
166 static void push_current_type (void); 167 static void push_current_type (void);
167 static void pop_current_type (void); 168 static void pop_current_type (void);
168 static int search_field; 169 static int search_field;
169 %} 170 %}
170 171
171 %type <voidval> exp exp1 type_exp start normal_start variable qualified_name 172 %type <voidval> exp exp1 type_exp start normal_start variable qualified_name
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 if (current_type) 306 if (current_type)
306 { 307 {
307 while (TYPE_CODE (current_type) 308 while (TYPE_CODE (current_type)
308 == TYPE_CODE_PTR) 309 == TYPE_CODE_PTR)
309 current_type = 310 current_type =
310 TYPE_TARGET_TYPE (current_type); 311 TYPE_TARGET_TYPE (current_type);
311 current_type = lookup_struct_elt_type ( 312 current_type = lookup_struct_elt_type (
312 current_type, $2.ptr, 0); 313 current_type, $2.ptr, 0);
313 } 314 }
314 } 315 }

error: old chunk mismatch

OLDNEW
« no previous file with comments | « gdb/p-exp.c ('k') | gdb/p-lang.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698