Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint/lint1 lint: rename token T_XOR to T_BITXOR



details:   https://anonhg.NetBSD.org/src/rev/3700e25d6708
branches:  trunk
changeset: 960549:3700e25d6708
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Mar 21 08:55:59 2021 +0000

description:
lint: rename token T_XOR to T_BITXOR

For symmetry with the operator, which is named BITXOR.

No functional change.

diffstat:

 usr.bin/xlint/lint1/cgram.y |  10 +++++-----
 usr.bin/xlint/lint1/scan.l  |   6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)

diffs (74 lines):

diff -r c2f2451de7f4 -r 3700e25d6708 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Sun Mar 21 08:52:05 2021 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Sun Mar 21 08:55:59 2021 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.190 2021/03/21 08:52:05 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.191 2021/03/21 08:55:59 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.y,v 1.190 2021/03/21 08:52:05 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.191 2021/03/21 08:55:59 rillig Exp $");
 #endif
 
 #include <limits.h>
@@ -157,7 +157,7 @@
 %token <y_op>          T_RELATIONAL
 %token <y_op>          T_EQUALITY
 %token                 T_AMPER
-%token                 T_XOR
+%token                 T_BITXOR
 %token                 T_BITOR
 %token                 T_LOGAND
 %token                 T_LOGOR
@@ -257,7 +257,7 @@
 %left  T_LOGOR
 %left  T_LOGAND
 %left  T_BITOR
-%left  T_XOR
+%left  T_BITXOR
 %left  T_AMPER
 %left  T_EQUALITY
 %left  T_RELATIONAL
@@ -1823,7 +1823,7 @@
        | expr T_AMPER expr {
                $$ = build(BITAND, $1, $3);
          }
-       | expr T_XOR expr {
+       | expr T_BITXOR expr {
                $$ = build(BITXOR, $1, $3);
          }
        | expr T_BITOR expr {
diff -r c2f2451de7f4 -r 3700e25d6708 usr.bin/xlint/lint1/scan.l
--- a/usr.bin/xlint/lint1/scan.l        Sun Mar 21 08:52:05 2021 +0000
+++ b/usr.bin/xlint/lint1/scan.l        Sun Mar 21 08:55:59 2021 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: scan.l,v 1.132 2021/03/21 08:46:26 rillig Exp $ */
+/* $NetBSD: scan.l,v 1.133 2021/03/21 08:55:59 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: scan.l,v 1.132 2021/03/21 08:46:26 rillig Exp $");
+__RCSID("$NetBSD: scan.l,v 1.133 2021/03/21 08:55:59 rillig Exp $");
 #endif
 
 #include "lint1.h"
@@ -83,7 +83,7 @@
 "&&"                           return T_LOGAND;
 "|"                            return T_BITOR;
 "&"                            return T_AMPER;
-"^"                            return T_XOR;
+"^"                            return T_BITXOR;
 "=="                           return lex_operator(T_EQUALITY, EQ);
 "!="                           return lex_operator(T_EQUALITY, NE);
 "<"                            return lex_operator(T_RELATIONAL, LT);



Home | Main Index | Thread Index | Old Index