This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 10/18] poison "operator"


From: Tom Tromey <tromey@redhat.com>

gdb/ChangeLog

2013-10-21  Tom Tromey  <tromey@redhat.com>

	* 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/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 +++---
 6 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index a796dbb..6d50c0c 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]