From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16040 invoked by alias); 9 Oct 2013 17:18:04 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 15948 invoked by uid 89); 9 Oct 2013 17:18:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 09 Oct 2013 17:18:03 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r99HI0pu018453 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 9 Oct 2013 13:18:02 -0400 Received: from redhat.brq.redhat.com (unused-4-133.brq.redhat.com [10.34.4.133]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r99HHgcG010424; Wed, 9 Oct 2013 13:17:59 -0400 From: Ondrej Oprala To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 10/18] poison "operator" Date: Wed, 09 Oct 2013 17:18:00 -0000 Message-Id: <1381339053-14519-11-git-send-email-ooprala@redhat.com> In-Reply-To: <1381339053-14519-1-git-send-email-ooprala@redhat.com> References: <1381339053-14519-1-git-send-email-ooprala@redhat.com> X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00302.txt.bz2 From: Tom Tromey * c-exp.y (oper) : Renamed from operator. * f-exp.y (oper) : Likewise. * go-exp.y (oper) : Likewise. * jv-exp.y (oper) : Likewise. * p-exp.y (oper) : Likewise. * valarith.c (oper) : Likewise. --- gdb/ChangeLog | 9 +++++++++ gdb/c-exp.y | 8 ++++---- gdb/f-exp.y | 18 +++++++++--------- gdb/go-exp.y | 8 ++++---- gdb/jv-exp.y | 6 +++--- gdb/p-exp.y | 10 +++++----- gdb/valarith.c | 6 +++--- 7 files changed, 37 insertions(+), 28 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index be1f2e0..a0728dd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -17,6 +17,15 @@ 2013-10-09 Tom Tromey + * c-exp.y (oper) : Renamed from operator. + * f-exp.y (oper) : Likewise. + * go-exp.y (oper) : Likewise. + * jv-exp.y (oper) : Likewise. + * p-exp.y (oper) : Likewise. + * valarith.c (oper) : Likewise. + +2013-10-09 Tom Tromey + * ada-lang.c (domain) : Renamed from namespace. * ada-lang.h (domain) : Likewise. * block.h (namespace_info) : Likewise. diff --git a/gdb/c-exp.y b/gdb/c-exp.y index 2428e3d..d8528a9 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -2223,7 +2223,7 @@ enum token_flags struct token { - char *operator; + char *oper; int token; enum exp_opcode opcode; enum token_flags flags; @@ -2444,7 +2444,7 @@ lex_one_token (void) tokstart = lexptr; /* See if it is a special token of length 3. */ for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++) - if (strncmp (tokstart, tokentab3[i].operator, 3) == 0) + if (strncmp (tokstart, tokentab3[i].oper, 3) == 0) { if ((tokentab3[i].flags & FLAG_CXX) != 0 && parse_language->la_language != language_cplus) @@ -2457,7 +2457,7 @@ lex_one_token (void) /* See if it is a special token of length 2. */ for (i = 0; i < sizeof tokentab2 / sizeof tokentab2[0]; i++) - if (strncmp (tokstart, tokentab2[i].operator, 2) == 0) + if (strncmp (tokstart, tokentab2[i].oper, 2) == 0) { if ((tokentab2[i].flags & FLAG_CXX) != 0 && parse_language->la_language != language_cplus) @@ -2751,7 +2751,7 @@ lex_one_token (void) /* Catch specific keywords. */ copy = copy_name (yylval.sval); for (i = 0; i < sizeof ident_tokens / sizeof ident_tokens[0]; i++) - if (strcmp (copy, ident_tokens[i].operator) == 0) + if (strcmp (copy, ident_tokens[i].oper) == 0) { if ((ident_tokens[i].flags & FLAG_CXX) != 0 && parse_language->la_language != language_cplus) diff --git a/gdb/f-exp.y b/gdb/f-exp.y index 59c5e6c..fcaccdf 100644 --- a/gdb/f-exp.y +++ b/gdb/f-exp.y @@ -806,7 +806,7 @@ parse_number (const char *p, int len, int parsed_float, YYSTYPE *putithere) struct token { - char *operator; + char *oper; int token; enum exp_opcode opcode; }; @@ -982,11 +982,11 @@ yylex (void) /* See if it is a special .foo. operator. */ - for (i = 0; dot_ops[i].operator != NULL; i++) - if (strncmp (tokstart, dot_ops[i].operator, - strlen (dot_ops[i].operator)) == 0) + for (i = 0; dot_ops[i].oper != NULL; i++) + if (strncmp (tokstart, dot_ops[i].oper, + strlen (dot_ops[i].oper)) == 0) { - lexptr += strlen (dot_ops[i].operator); + lexptr += strlen (dot_ops[i].oper); yylval.opcode = dot_ops[i].opcode; return dot_ops[i].token; } @@ -1150,11 +1150,11 @@ yylex (void) /* Catch specific keywords. */ - for (i = 0; f77_keywords[i].operator != NULL; i++) - if (strlen (f77_keywords[i].operator) == namelen - && strncmp (tokstart, f77_keywords[i].operator, namelen) == 0) + for (i = 0; f77_keywords[i].oper != NULL; i++) + if (strlen (f77_keywords[i].oper) == namelen + && strncmp (tokstart, f77_keywords[i].oper, namelen) == 0) { - /* lexptr += strlen(f77_keywords[i].operator); */ + /* lexptr += strlen(f77_keywords[i].oper); */ yylval.opcode = f77_keywords[i].opcode; return f77_keywords[i].token; } diff --git a/gdb/go-exp.y b/gdb/go-exp.y index 01c382a..412de64 100644 --- a/gdb/go-exp.y +++ b/gdb/go-exp.y @@ -975,7 +975,7 @@ parse_string_or_char (const char *tokptr, const char **outptr, struct token { - char *operator; + char *oper; int token; enum exp_opcode opcode; }; @@ -1062,7 +1062,7 @@ lex_one_token (void) tokstart = lexptr; /* See if it is a special token of length 3. */ for (i = 0; i < sizeof (tokentab3) / sizeof (tokentab3[0]); i++) - if (strncmp (tokstart, tokentab3[i].operator, 3) == 0) + if (strncmp (tokstart, tokentab3[i].oper, 3) == 0) { lexptr += 3; yylval.opcode = tokentab3[i].opcode; @@ -1071,7 +1071,7 @@ lex_one_token (void) /* See if it is a special token of length 2. */ for (i = 0; i < sizeof (tokentab2) / sizeof (tokentab2[0]); i++) - if (strncmp (tokstart, tokentab2[i].operator, 2) == 0) + if (strncmp (tokstart, tokentab2[i].oper, 2) == 0) { lexptr += 2; yylval.opcode = tokentab2[i].opcode; @@ -1301,7 +1301,7 @@ lex_one_token (void) /* Catch specific keywords. */ copy = copy_name (yylval.sval); for (i = 0; i < sizeof (ident_tokens) / sizeof (ident_tokens[0]); i++) - if (strcmp (copy, ident_tokens[i].operator) == 0) + if (strcmp (copy, ident_tokens[i].oper) == 0) { /* It is ok to always set this, even though we don't always strictly need to. */ diff --git a/gdb/jv-exp.y b/gdb/jv-exp.y index e4b1cec..5e4503e 100644 --- a/gdb/jv-exp.y +++ b/gdb/jv-exp.y @@ -821,7 +821,7 @@ parse_number (const char *p, int len, int parsed_float, YYSTYPE *putithere) struct token { - char *operator; + char *oper; int token; enum exp_opcode opcode; }; @@ -875,7 +875,7 @@ yylex (void) tokstart = lexptr; /* See if it is a special token of length 3. */ for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++) - if (strncmp (tokstart, tokentab3[i].operator, 3) == 0) + if (strncmp (tokstart, tokentab3[i].oper, 3) == 0) { lexptr += 3; yylval.opcode = tokentab3[i].opcode; @@ -884,7 +884,7 @@ yylex (void) /* See if it is a special token of length 2. */ for (i = 0; i < sizeof tokentab2 / sizeof tokentab2[0]; i++) - if (strncmp (tokstart, tokentab2[i].operator, 2) == 0) + if (strncmp (tokstart, tokentab2[i].oper, 2) == 0) { lexptr += 2; yylval.opcode = tokentab2[i].opcode; diff --git a/gdb/p-exp.y b/gdb/p-exp.y index de14cbb..41207ed 100644 --- a/gdb/p-exp.y +++ b/gdb/p-exp.y @@ -1075,7 +1075,7 @@ pop_current_type (void) struct token { - char *operator; + char *oper; int token; enum exp_opcode opcode; }; @@ -1153,8 +1153,8 @@ yylex (void) /* See if it is a special token of length 3. */ if (explen > 2) for (i = 0; i < sizeof (tokentab3) / sizeof (tokentab3[0]); i++) - if (strncasecmp (tokstart, tokentab3[i].operator, 3) == 0 - && (!isalpha (tokentab3[i].operator[0]) || explen == 3 + if (strncasecmp (tokstart, tokentab3[i].oper, 3) == 0 + && (!isalpha (tokentab3[i].oper[0]) || explen == 3 || (!isalpha (tokstart[3]) && !isdigit (tokstart[3]) && tokstart[3] != '_'))) { @@ -1166,8 +1166,8 @@ yylex (void) /* See if it is a special token of length 2. */ if (explen > 1) for (i = 0; i < sizeof (tokentab2) / sizeof (tokentab2[0]); i++) - if (strncasecmp (tokstart, tokentab2[i].operator, 2) == 0 - && (!isalpha (tokentab2[i].operator[0]) || explen == 2 + if (strncasecmp (tokstart, tokentab2[i].oper, 2) == 0 + && (!isalpha (tokentab2[i].oper[0]) || explen == 2 || (!isalpha (tokstart[2]) && !isdigit (tokstart[2]) && tokstart[2] != '_'))) { diff --git a/gdb/valarith.c b/gdb/valarith.c index 18c14fc..b50bd21 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -286,14 +286,14 @@ unop_user_defined_p (enum exp_opcode op, struct value *arg1) situations or combinations thereof. */ static struct value * -value_user_defined_cpp_op (struct value **args, int nargs, char *operator, +value_user_defined_cpp_op (struct value **args, int nargs, char *oper, int *static_memfuncp) { struct symbol *symp = NULL; struct value *valp = NULL; - find_overload_match (args, nargs, operator, BOTH /* could be method */, + find_overload_match (args, nargs, oper, BOTH /* could be method */, &args[0] /* objp */, NULL /* pass NULL symbol since symbol is unknown */, &valp, &symp, static_memfuncp, 0); @@ -310,7 +310,7 @@ value_user_defined_cpp_op (struct value **args, int nargs, char *operator, return value_of_variable (symp, 0); } - error (_("Could not find %s."), operator); + error (_("Could not find %s."), oper); } /* Lookup user defined operator NAME. Return a value representing the -- 1.8.3.1