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: reorder grammar rule begin_type_ty...
details: https://anonhg.NetBSD.org/src/rev/798d9bd1e9c4
branches: trunk
changeset: 365863:798d9bd1e9c4
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Apr 29 19:37:00 2022 +0000
description:
lint: reorder grammar rule begin_type_typespec
This makes the rule structurally more similar to the other rules. The
goal is that all rules whose name starts with 'begin_type_' actually
start with the rule 'begin_type'. Currently, some rules parse their
type attributes before 'begin_type', which feels wrong, as type
attributes should be part of the type.
No functional change intended.
diffstat:
usr.bin/xlint/lint1/cgram.y | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r 74c7d32cca64 -r 798d9bd1e9c4 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y Fri Apr 29 07:45:20 2022 +0000
+++ b/usr.bin/xlint/lint1/cgram.y Fri Apr 29 19:37:00 2022 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: cgram.y,v 1.405 2022/04/29 07:02:40 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.406 2022/04/29 19:37:00 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.405 2022/04/29 07:02:40 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.406 2022/04/29 19:37:00 rillig Exp $");
#endif
#include <limits.h>
@@ -817,8 +817,8 @@
begin_type notype_type_specifier {
$$ = $2;
}
- | T_TYPENAME begin_type {
- $$ = getsym($1)->s_type;
+ | begin_type T_TYPENAME {
+ $$ = getsym($2)->s_type;
}
;
Home |
Main Index |
Thread Index |
Old Index