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 T_STROP to T_MEMBACC



details:   https://anonhg.NetBSD.org/src/rev/b33c3f7b8d6e
branches:  trunk
changeset: 950150:b33c3f7b8d6e
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Jan 18 16:29:59 2021 +0000

description:
lint: rename T_STROP to T_MEMBACC

The 'STR' was misleading since it is the abbreviation for 'string' in
many other programs.  Member access not only happens in structs, it also
happens in unions.

diffstat:

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

diffs (84 lines):

diff -r 92d98029010e -r b33c3f7b8d6e usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Mon Jan 18 15:29:31 2021 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Mon Jan 18 16:29:59 2021 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.145 2021/01/17 15:09:56 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.146 2021/01/18 16:29: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.145 2021/01/17 15:09:56 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.146 2021/01/18 16:29:59 rillig Exp $");
 #endif
 
 #include <limits.h>
@@ -139,7 +139,7 @@
 };
 
 %token                 T_LBRACE T_RBRACE T_LBRACK T_RBRACK T_LPAREN T_RPAREN
-%token <y_op>          T_STROP
+%token <y_op>          T_MEMBACC
 %token <y_op>          T_UNOP
 %token <y_op>          T_INCDEC
 %token                 T_SIZEOF
@@ -261,7 +261,7 @@
 %left  T_ADDOP
 %left  T_ASTERISK T_DIVOP
 %right T_UNOP T_INCDEC T_SIZEOF T_ALIGNOF T_REAL T_IMAG
-%left  T_LPAREN T_LBRACK T_STROP
+%left  T_LPAREN T_LBRACK T_MEMBACC
 
 %token <y_sb>          T_NAME
 %token <y_sb>          T_TYPENAME
@@ -2021,14 +2021,14 @@
        ;
 
 point_or_arrow:
-         T_STROP {
+         T_MEMBACC {
                symtyp = FMEMBER;
                $$ = $1;
          }
        ;
 
 point:
-         T_STROP {
+         T_MEMBACC {
                if ($1 != POINT) {
                        /* syntax error '%s' */
                        error(249, yytext);
diff -r 92d98029010e -r b33c3f7b8d6e usr.bin/xlint/lint1/scan.l
--- a/usr.bin/xlint/lint1/scan.l        Mon Jan 18 15:29:31 2021 +0000
+++ b/usr.bin/xlint/lint1/scan.l        Mon Jan 18 16:29:59 2021 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: scan.l,v 1.121 2021/01/17 23:04:09 rillig Exp $ */
+/* $NetBSD: scan.l,v 1.122 2021/01/18 16:29: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.121 2021/01/17 23:04:09 rillig Exp $");
+__RCSID("$NetBSD: scan.l,v 1.122 2021/01/18 16:29:59 rillig Exp $");
 #endif
 
 #include <ctype.h>
@@ -139,8 +139,8 @@
 ">>"                           return operator(T_SHFTOP, SHR);
 "++"                           return operator(T_INCDEC, INC);
 "--"                           return operator(T_INCDEC, DEC);
-"->"                           return operator(T_STROP, ARROW);
-"."                            return operator(T_STROP, POINT);
+"->"                           return operator(T_MEMBACC, ARROW);
+"."                            return operator(T_MEMBACC, POINT);
 "+"                            return operator(T_ADDOP, PLUS);
 "-"                            return operator(T_ADDOP, MINUS);
 "*"                            return operator(T_ASTERISK, NOOP);



Home | Main Index | Thread Index | Old Index