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 rule declmods to cl...
details: https://anonhg.NetBSD.org/src/rev/5197947c47d9
branches: trunk
changeset: 984502:5197947c47d9
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Jul 10 14:45:15 2021 +0000
description:
lint: rename grammar rule declmods to clrtyp_declmods
It wasn't obvious from the name 'declmods' that this rule starts a new
type declaration.
No functional change.
diffstat:
usr.bin/xlint/lint1/cgram.y | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diffs (113 lines):
diff -r 9e89bdea6711 -r 5197947c47d9 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y Sat Jul 10 13:22:01 2021 +0000
+++ b/usr.bin/xlint/lint1/cgram.y Sat Jul 10 14:45:15 2021 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: cgram.y,v 1.288 2021/07/10 11:22:19 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.289 2021/07/10 14:45:15 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.288 2021/07/10 11:22:19 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.289 2021/07/10 14:45:15 rillig Exp $");
#endif
#include <limits.h>
@@ -445,7 +445,7 @@
clrtyp deftyp notype_decl {
$$ = $3;
}
- | declmods deftyp notype_decl {
+ | clrtyp_declmods deftyp notype_decl {
$$ = $3;
}
| declaration_specifiers deftyp type_decl {
@@ -470,11 +470,11 @@
* needs other error handling.
*/
arg_declaration:
- declmods deftyp T_SEMI {
+ clrtyp_declmods deftyp T_SEMI {
/* empty declaration */
warning(2);
}
- | declmods deftyp notype_init_decls T_SEMI
+ | clrtyp_declmods deftyp notype_init_decls T_SEMI
| declaration_specifiers deftyp T_SEMI {
if (!dcs->d_nonempty_decl) {
/* empty declaration */
@@ -490,7 +490,7 @@
warning(3, type_name(dcs->d_type));
}
}
- | declmods error
+ | clrtyp_declmods error
| declaration_specifiers error
;
@@ -500,7 +500,7 @@
;
declaration_noerror: /* see C99 6.7 'declaration' */
- declmods deftyp T_SEMI {
+ clrtyp_declmods deftyp T_SEMI {
if (dcs->d_scl == TYPEDEF) {
/* typedef declares no type name */
warning(72);
@@ -509,7 +509,7 @@
warning(2);
}
}
- | declmods deftyp notype_init_decls T_SEMI
+ | clrtyp_declmods deftyp notype_init_decls T_SEMI
| declaration_specifiers deftyp T_SEMI {
if (dcs->d_scl == TYPEDEF) {
/* typedef declares no type name */
@@ -538,7 +538,7 @@
clrtyp_typespec {
add_type($1);
}
- | declmods typespec {
+ | clrtyp_declmods typespec {
add_type($2);
}
| type_attribute declaration_specifiers
@@ -548,9 +548,9 @@
}
;
-declmods:
+clrtyp_declmods:
clrtyp qualifier_or_storage_class
- | declmods declmod
+ | clrtyp_declmods declmod
;
declmod:
@@ -1160,19 +1160,19 @@
/* XXX: C99 6.7.5 defines the same name, but it looks completely different. */
parameter_declaration:
- declmods deftyp {
+ clrtyp_declmods deftyp {
$$ = declare_argument(abstract_name(), false);
}
| declaration_specifiers deftyp {
$$ = declare_argument(abstract_name(), false);
}
- | declmods deftyp notype_param_decl {
+ | clrtyp_declmods deftyp notype_param_decl {
$$ = declare_argument($3, false);
}
| declaration_specifiers deftyp type_param_decl {
$$ = declare_argument($3, false);
}
- | declmods deftyp abstract_declarator {
+ | clrtyp_declmods deftyp abstract_declarator {
$$ = declare_argument($3, false);
}
| declaration_specifiers deftyp abstract_declarator {
Home |
Main Index |
Thread Index |
Old Index