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: move optional grammar rules above ...
details: https://anonhg.NetBSD.org/src/rev/14636076ff26
branches: trunk
changeset: 984442:14636076ff26
user: rillig <rillig%NetBSD.org@localhost>
date: Thu Jul 08 03:22:47 2021 +0000
description:
lint: move optional grammar rules above their corresponding rules
No functional change.
diffstat:
usr.bin/xlint/lint1/cgram.y | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diffs (71 lines):
diff -r 3b0d2738d090 -r 14636076ff26 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y Thu Jul 08 03:19:17 2021 +0000
+++ b/usr.bin/xlint/lint1/cgram.y Thu Jul 08 03:22:47 2021 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: cgram.y,v 1.267 2021/07/08 03:19:17 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.268 2021/07/08 03:22:47 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.267 2021/07/08 03:19:17 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.268 2021/07/08 03:22:47 rillig Exp $");
#endif
#include <limits.h>
@@ -690,11 +690,6 @@
}
;
-type_attribute_opt:
- /* empty */
- | type_attribute
- ;
-
member_declaration_list:
member_declaration
| member_declaration_list T_SEMI member_declaration {
@@ -1627,13 +1622,6 @@
}
;
-expr_opt:
- /* empty */ {
- $$ = NULL;
- }
- | expr
- ;
-
jump_statement: /* C99 6.8.6 */
goto identifier T_SEMI {
do_goto(getsym($2));
@@ -1691,6 +1679,13 @@
expr %prec T_ASSIGN
;
+expr_opt:
+ /* empty */ {
+ $$ = NULL;
+ }
+ | expr
+ ;
+
expr:
expr T_ASTERISK expr {
$$ = build(MULT, $1, $3);
@@ -1995,6 +1990,11 @@
| type_attribute_list type_attribute
;
+type_attribute_opt:
+ /* empty */
+ | type_attribute
+ ;
+
type_attribute:
gcc_attribute
| T_ALIGNAS T_LPAREN align_as T_RPAREN
Home |
Main Index |
Thread Index |
Old Index