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 grammar rules to align with...



details:   https://anonhg.NetBSD.org/src/rev/b7892e79bb31
branches:  trunk
changeset: 950162:b7892e79bb31
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Jan 18 18:18:20 2021 +0000

description:
lint: rename grammar rules to align with C99 6.7.6

diffstat:

 usr.bin/xlint/lint1/cgram.y |  52 ++++++++++++++++++++++----------------------
 1 files changed, 26 insertions(+), 26 deletions(-)

diffs (158 lines):

diff -r dabe0b36121b -r b7892e79bb31 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Mon Jan 18 18:14:57 2021 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Mon Jan 18 18:18:20 2021 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.154 2021/01/18 18:14:57 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.155 2021/01/18 18:18:20 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.154 2021/01/18 18:14:57 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.155 2021/01/18 18:18:20 rillig Exp $");
 #endif
 
 #include <limits.h>
@@ -302,15 +302,15 @@
 %type  <y_pqinf>       asterisk
 %type  <y_sym>         param_decl
 %type  <y_sym>         param_list
-%type  <y_sym>         abs_decl_param_list
+%type  <y_sym>         abstract_decl_param_list
 %type  <y_sym>         direct_param_decl
 %type  <y_sym>         notype_param_decl
 %type  <y_sym>         direct_notype_param_decl
 %type  <y_pqinf>       type_qualifier_list
 %type  <y_pqinf>       type_qualifier
 %type  <y_sym>         identifier_list
-%type  <y_sym>         abs_decl
-%type  <y_sym>         direct_abs_decl
+%type  <y_sym>         abstract_decl
+%type  <y_sym>         direct_abstract_decl
 %type  <y_sym>         vararg_parameter_type_list
 %type  <y_sym>         parameter_type_list
 %type  <y_sym>         parameter_declaration
@@ -1208,7 +1208,7 @@
          id_list_lparn identifier_list T_RPAREN {
                $$ = $2;
          }
-       | abs_decl_param_list {
+       | abstract_decl_param_list {
                $$ = $1;
          }
        ;
@@ -1232,20 +1232,20 @@
          }
        ;
 
-abs_decl_param_list:
-         abs_decl_lparn T_RPAREN {
+abstract_decl_param_list:
+         abstract_decl_lparn T_RPAREN {
                $$ = NULL;
          }
-       | abs_decl_lparn vararg_parameter_type_list T_RPAREN {
+       | abstract_decl_lparn vararg_parameter_type_list T_RPAREN {
                dcs->d_proto = true;
                $$ = $2;
          }
-       | abs_decl_lparn error T_RPAREN {
+       | abstract_decl_lparn error T_RPAREN {
                $$ = NULL;
          }
        ;
 
-abs_decl_lparn:
+abstract_decl_lparn:
          T_LPAREN {
                blklev++;
                pushdecl(PARG);
@@ -1302,10 +1302,10 @@
        | declspecs deftyp param_decl {
                $$ = declare_argument($3, 0);
          }
-       | declmods deftyp abs_decl {
+       | declmods deftyp abstract_decl {
                $$ = declare_argument($3, 0);
          }
-       | declspecs deftyp abs_decl {
+       | declspecs deftyp abstract_decl {
                $$ = declare_argument($3, 0);
          }
        ;
@@ -1422,22 +1422,22 @@
        | noclass_declspecs deftyp {
                $$ = declare_1_abstract(abstract_name());
          }
-       | noclass_declmods deftyp abs_decl {
+       | noclass_declmods deftyp abstract_decl {
                $$ = declare_1_abstract($3);
          }
-       | noclass_declspecs deftyp abs_decl {
+       | noclass_declspecs deftyp abstract_decl {
                $$ = declare_1_abstract($3);
          }
        ;
 
-abs_decl:
+abstract_decl:
          pointer {
                $$ = add_pointer(abstract_name(), $1);
          }
-       | direct_abs_decl {
+       | direct_abstract_decl {
                $$ = $1;
          }
-       | pointer direct_abs_decl {
+       | pointer direct_abstract_decl {
                $$ = add_pointer($2, $1);
          }
        | T_TYPEOF term {
@@ -1445,8 +1445,8 @@
          }
        ;
 
-direct_abs_decl:
-         T_LPAREN abs_decl T_RPAREN {
+direct_abstract_decl:
+         T_LPAREN abstract_decl T_RPAREN {
                $$ = $2;
          }
        | T_LBRACK T_RBRACK {
@@ -1455,26 +1455,26 @@
        | T_LBRACK constant T_RBRACK {
                $$ = add_array(abstract_name(), 1, toicon($2, 0));
          }
-       | type_attribute direct_abs_decl {
+       | type_attribute direct_abstract_decl {
                $$ = $2;
          }
-       | direct_abs_decl T_LBRACK T_RBRACK {
+       | direct_abstract_decl T_LBRACK T_RBRACK {
                $$ = add_array($1, 0, 0);
          }
-       | direct_abs_decl T_LBRACK constant T_RBRACK {
+       | direct_abstract_decl T_LBRACK constant T_RBRACK {
                $$ = add_array($1, 1, toicon($3, 0));
          }
-       | abs_decl_param_list opt_asm_or_symbolrename {
+       | abstract_decl_param_list opt_asm_or_symbolrename {
                $$ = add_function(symbolrename(abstract_name(), $2), $1);
                popdecl();
                blklev--;
          }
-       | direct_abs_decl abs_decl_param_list opt_asm_or_symbolrename {
+       | direct_abstract_decl abstract_decl_param_list opt_asm_or_symbolrename {
                $$ = add_function(symbolrename($1, $3), $2);
                popdecl();
                blklev--;
          }
-       | direct_abs_decl type_attribute_list
+       | direct_abstract_decl type_attribute_list
        ;
 
 non_expr_statement:



Home | Main Index | Thread Index | Old Index