Module Name:    src
Committed By:   rillig
Date:           Sun Mar 21 08:55:59 UTC 2021

Modified Files:
        src/usr.bin/xlint/lint1: cgram.y scan.l

Log Message:
lint: rename token T_XOR to T_BITXOR

For symmetry with the operator, which is named BITXOR.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.132 -r1.133 src/usr.bin/xlint/lint1/scan.l

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.190 src/usr.bin/xlint/lint1/cgram.y:1.191
--- src/usr.bin/xlint/lint1/cgram.y:1.190	Sun Mar 21 08:52:05 2021
+++ src/usr.bin/xlint/lint1/cgram.y	Sun Mar 21 08:55:59 2021
@@ -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 @@ anonymize(sym_t *s)
 %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 @@ anonymize(sym_t *s)
 %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:
 	| expr T_AMPER expr {
 		$$ = build(BITAND, $1, $3);
 	  }
-	| expr T_XOR expr {
+	| expr T_BITXOR expr {
 		$$ = build(BITXOR, $1, $3);
 	  }
 	| expr T_BITOR expr {

Index: src/usr.bin/xlint/lint1/scan.l
diff -u src/usr.bin/xlint/lint1/scan.l:1.132 src/usr.bin/xlint/lint1/scan.l:1.133
--- src/usr.bin/xlint/lint1/scan.l:1.132	Sun Mar 21 08:46:26 2021
+++ src/usr.bin/xlint/lint1/scan.l	Sun Mar 21 08:55:59 2021
@@ -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 @@ TL	([fFlL]?[i]?)
 "&&"				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);

Reply via email to