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 tokens for left and right p...



details:   https://anonhg.NetBSD.org/src/rev/6d1aa47b85e7
branches:  trunk
changeset: 958332:6d1aa47b85e7
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Jan 01 11:09:40 2021 +0000

description:
lint: rename tokens for left and right parentheses

diffstat:

 usr.bin/xlint/lint1/cgram.y |  126 ++++++++++++++++++++++----------------------
 usr.bin/xlint/lint1/func.c  |   12 ++--
 usr.bin/xlint/lint1/scan.l  |    8 +-
 usr.bin/xlint/lint1/tree.c  |    6 +-
 4 files changed, 76 insertions(+), 76 deletions(-)

diffs (truncated from 498 to 300 lines):

diff -r 5b97062c60c9 -r 6d1aa47b85e7 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Fri Jan 01 11:01:03 2021 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Fri Jan 01 11:09:40 2021 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.125 2021/01/01 10:55:27 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.126 2021/01/01 11:09:40 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.125 2021/01/01 10:55:27 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.126 2021/01/01 11:09:40 rillig Exp $");
 #endif
 
 #include <limits.h>
@@ -137,7 +137,7 @@
        pqinf_t *y_pqinf;
 };
 
-%token                 T_LBRACE T_RBRACE T_LBRACK T_RBRACK T_LPARN T_RPARN
+%token                 T_LBRACE T_RBRACE T_LBRACK T_RBRACK T_LPAREN T_RPAREN
 %token <y_op>          T_STROP
 %token <y_op>          T_UNOP
 %token <y_op>          T_INCDEC
@@ -260,7 +260,7 @@
 %left  T_ADDOP
 %left  T_MULT T_DIVOP
 %right T_UNOP T_INCDEC T_SIZEOF TBUILTIN_SIZEOF T_ALIGNOF T_REAL T_IMAG
-%left  T_LPARN T_LBRACK T_STROP
+%left  T_LPAREN T_LBRACK T_STROP
 
 %token <y_sb>          T_NAME
 %token <y_sb>          T_TYPENAME
@@ -538,23 +538,23 @@
 
 type_attribute_spec:
          /* empty */
-       | T_AT_DEPRECATED T_LPARN string T_RPARN
+       | T_AT_DEPRECATED T_LPAREN string T_RPAREN
        | T_AT_DEPRECATED
-       | T_AT_ALIGNED T_LPARN constant T_RPARN
-       | T_AT_ALLOC_SIZE T_LPARN constant T_COMMA constant T_RPARN
-       | T_AT_ALLOC_SIZE T_LPARN constant T_RPARN
-       | T_AT_BOUNDED T_LPARN type_attribute_bounded_type
-         T_COMMA constant T_COMMA constant T_RPARN
-       | T_AT_SENTINEL T_LPARN constant T_RPARN
+       | T_AT_ALIGNED T_LPAREN constant T_RPAREN
+       | T_AT_ALLOC_SIZE T_LPAREN constant T_COMMA constant T_RPAREN
+       | T_AT_ALLOC_SIZE T_LPAREN constant T_RPAREN
+       | T_AT_BOUNDED T_LPAREN type_attribute_bounded_type
+         T_COMMA constant T_COMMA constant T_RPAREN
+       | T_AT_SENTINEL T_LPAREN constant T_RPAREN
        | T_AT_SENTINEL
-       | T_AT_FORMAT_ARG T_LPARN constant T_RPARN
-       | T_AT_NONNULL T_LPARN constant T_RPARN
-       | T_AT_MODE T_LPARN T_NAME T_RPARN
-       | T_AT_ALIAS T_LPARN string T_RPARN
-       | T_AT_OPTIMIZE T_LPARN string T_RPARN
-       | T_AT_PCS T_LPARN string T_RPARN
-       | T_AT_SECTION T_LPARN string T_RPARN
-       | T_AT_TLS_MODEL T_LPARN string T_RPARN
+       | T_AT_FORMAT_ARG T_LPAREN constant T_RPAREN
+       | T_AT_NONNULL T_LPAREN constant T_RPAREN
+       | T_AT_MODE T_LPAREN T_NAME T_RPAREN
+       | T_AT_ALIAS T_LPAREN string T_RPAREN
+       | T_AT_OPTIMIZE T_LPAREN string T_RPAREN
+       | T_AT_PCS T_LPAREN string T_RPAREN
+       | T_AT_SECTION T_LPAREN string T_RPAREN
+       | T_AT_TLS_MODEL T_LPAREN string T_RPAREN
        | T_AT_ALIGNED
        | T_AT_CONSTRUCTOR
        | T_AT_DESTRUCTOR
@@ -573,8 +573,8 @@
        | T_AT_TUNION
        | T_AT_GNU_INLINE
        | T_AT_ALWAYS_INLINE
-       | T_AT_FORMAT T_LPARN type_attribute_format_type T_COMMA
-           constant T_COMMA constant T_RPARN
+       | T_AT_FORMAT T_LPAREN type_attribute_format_type T_COMMA
+           constant T_COMMA constant T_RPAREN
        | T_AT_USED {
                add_attr_used();
        }
@@ -583,7 +583,7 @@
        }
        | T_AT_WARN_UNUSED_RESULT
        | T_AT_WEAK
-       | T_AT_VISIBILITY T_LPARN constant T_RPARN
+       | T_AT_VISIBILITY T_LPAREN constant T_RPAREN
        | T_QUAL {
                if ($1 != CONST)
                        yyerror("Bad attribute");
@@ -596,11 +596,11 @@
        ;
 
 type_attribute:
-         T_ATTRIBUTE T_LPARN T_LPARN {
+         T_ATTRIBUTE T_LPAREN T_LPAREN {
            attron = 1;
        } type_attribute_spec_list {
            attron = 0;
-       } T_RPARN T_RPARN
+       } T_RPAREN T_RPAREN
        | T_PACKED {
                addpacked();
        }
@@ -1034,7 +1034,7 @@
          T_NAME {
                $$ = declarator_name(getsym($1));
          }
-       | T_LPARN type_decl T_RPARN {
+       | T_LPAREN type_decl T_RPAREN {
                $$ = $2;
          }
        | type_attribute notype_direct_decl {
@@ -1067,7 +1067,7 @@
          identifier {
                $$ = declarator_name(getsym($1));
          }
-       | T_LPARN type_decl T_RPARN {
+       | T_LPAREN type_decl T_RPAREN {
                $$ = $2;
          }
        | type_attribute type_direct_decl {
@@ -1110,7 +1110,7 @@
        | identifier {
                $$ = declarator_name(getsym($1));
          }
-       | T_LPARN notype_param_decl T_RPARN {
+       | T_LPAREN notype_param_decl T_RPAREN {
                $$ = $2;
          }
        | direct_param_decl T_LBRACK T_RBRACK {
@@ -1139,7 +1139,7 @@
          identifier {
                $$ = declarator_name(getsym($1));
          }
-       | T_LPARN notype_param_decl T_RPARN {
+       | T_LPAREN notype_param_decl T_RPAREN {
                $$ = $2;
          }
        | direct_notype_param_decl T_LBRACK T_RBRACK {
@@ -1199,7 +1199,7 @@
        ;
 
 param_list:
-         id_list_lparn identifier_list T_RPARN {
+         id_list_lparn identifier_list T_RPAREN {
                $$ = $2;
          }
        | abs_decl_param_list {
@@ -1208,7 +1208,7 @@
        ;
 
 id_list_lparn:
-         T_LPARN {
+         T_LPAREN {
                blklev++;
                pushdecl(PARG);
          }
@@ -1227,20 +1227,20 @@
        ;
 
 abs_decl_param_list:
-         abs_decl_lparn T_RPARN {
+         abs_decl_lparn T_RPAREN {
                $$ = NULL;
          }
-       | abs_decl_lparn vararg_parameter_type_list T_RPARN {
+       | abs_decl_lparn vararg_parameter_type_list T_RPAREN {
                dcs->d_proto = 1;
                $$ = $2;
          }
-       | abs_decl_lparn error T_RPARN {
+       | abs_decl_lparn error T_RPAREN {
                $$ = NULL;
          }
        ;
 
 abs_decl_lparn:
-         T_LPARN {
+         T_LPAREN {
                blklev++;
                pushdecl(PARG);
          }
@@ -1308,11 +1308,11 @@
          /* empty */ {
                $$ = NULL;
          }
-       | T_ASM T_LPARN T_STRING T_RPARN {
+       | T_ASM T_LPAREN T_STRING T_RPAREN {
                freeyyv(&$3, T_STRING);
                $$ = NULL;
          }
-       | T_SYMBOLRENAME T_LPARN T_NAME T_RPARN {
+       | T_SYMBOLRENAME T_LPAREN T_NAME T_RPAREN {
                $$ = $3;
          }
        ;
@@ -1437,7 +1437,7 @@
        ;
 
 direct_abs_decl:
-         T_LPARN abs_decl T_RPARN {
+         T_LPAREN abs_decl T_RPAREN {
                $$ = $2;
          }
        | T_LBRACK T_RBRACK {
@@ -1618,14 +1618,14 @@
        ;
 
 if_expr:
-         T_IF T_LPARN expr T_RPARN {
+         T_IF T_LPAREN expr T_RPAREN {
                if1($3);
                CLRWFLGS(__FILE__, __LINE__);
          }
        ;
 
 switch_expr:
-         T_SWITCH T_LPARN expr T_RPARN {
+         T_SWITCH T_LPAREN expr T_RPAREN {
                switch1($3);
                CLRWFLGS(__FILE__, __LINE__);
          }
@@ -1642,7 +1642,7 @@
        ;
 
 generic_expr:
-         T_GENERIC T_LPARN expr T_COMMA association_list T_RPARN {
+         T_GENERIC T_LPAREN expr T_COMMA association_list T_RPAREN {
                $$ = $3;
          }
        ;
@@ -1685,7 +1685,7 @@
        ;
 
 while_expr:
-         T_WHILE T_LPARN expr T_RPARN {
+         T_WHILE T_LPAREN expr T_RPAREN {
                while1($3);
                CLRWFLGS(__FILE__, __LINE__);
          }
@@ -1698,25 +1698,25 @@
        ;
 
 do_while_expr:
-         T_WHILE T_LPARN expr T_RPARN T_SEMI {
+         T_WHILE T_LPAREN expr T_RPAREN T_SEMI {
                $$ = $3;
          }
        ;
 
 for_start:
-         T_FOR T_LPARN {
+         T_FOR T_LPAREN {
                pushdecl(AUTO);
                blklev++;
          }
        ;
 for_exprs:
          for_start declspecs deftyp notype_init_decls T_SEMI opt_expr
-         T_SEMI opt_expr T_RPARN {
+         T_SEMI opt_expr T_RPAREN {
                c99ism(325);
                for1(NULL, $6, $8);
                CLRWFLGS(__FILE__, __LINE__);
            }
-         | for_start opt_expr T_SEMI opt_expr T_SEMI opt_expr T_RPARN {
+         | for_start opt_expr T_SEMI opt_expr T_SEMI opt_expr T_RPAREN {
                for1($2, $4, $6);
                CLRWFLGS(__FILE__, __LINE__);
          }
@@ -1759,10 +1759,10 @@
        ;
 
 asm_stmnt:
-         T_ASM T_LPARN read_until_rparn T_SEMI {
+         T_ASM T_LPAREN read_until_rparn T_SEMI {
                setasm();
          }
-       | T_ASM T_QUAL T_LPARN read_until_rparn T_SEMI {
+       | T_ASM T_QUAL T_LPAREN read_until_rparn T_SEMI {
                setasm();
          }
        | T_ASM error
@@ -1856,29 +1856,29 @@
        | T_CON {
                $$ = getcnode(gettyp($1->v_tspec), $1);
          }
-       | T_LPARN expr T_RPARN {
+       | T_LPAREN expr T_RPAREN {
                if ($2 != NULL)
                        $2->tn_parenthesized = 1;
                $$ = $2;
          }



Home | Main Index | Thread Index | Old Index