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: clean up grammar for declaration a...



details:   https://anonhg.NetBSD.org/src/rev/b1a794c5f333
branches:  trunk
changeset: 960530:b1a794c5f333
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Mar 20 15:30:58 2021 +0000

description:
lint: clean up grammar for declaration after statement

No functional change.

diffstat:

 usr.bin/xlint/lint1/cgram.y |  18 +++---------------
 1 files changed, 3 insertions(+), 15 deletions(-)

diffs (54 lines):

diff -r fec897d1b960 -r b1a794c5f333 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Sat Mar 20 15:28:07 2021 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Sat Mar 20 15:30:58 2021 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.185 2021/03/20 15:28:07 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.186 2021/03/20 15:30:58 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.185 2021/03/20 15:28:07 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.186 2021/03/20 15:30:58 rillig Exp $");
 #endif
 
 #include <limits.h>
@@ -329,8 +329,6 @@
 %type  <y_string>      string2
 %type  <y_sb>          opt_asm_or_symbolrename
 %type  <y_range>       range
-%type  <y_seen_statement> block
-%type  <y_seen_statement> block_begin
 %type  <y_seen_statement> block_item_list
 %type  <y_seen_statement> block_item
 
@@ -1517,7 +1515,7 @@
 
 compound_statement:            /* C99 6.8.2 */
          compound_statement_lbrace compound_statement_rbrace
-       | compound_statement_lbrace block compound_statement_rbrace
+       | compound_statement_lbrace block_item_list compound_statement_rbrace
        ;
 
 compound_statement_lbrace:
@@ -1538,16 +1536,6 @@
          }
        ;
 
-block:
-         block_begin block_item_list
-       ;
-
-block_begin:
-         /* empty */ {
-               $$ = false;
-         }
-       ;
-
 block_item_list:
          block_item
        | block_item_list block_item {



Home | Main Index | Thread Index | Old Index