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: align names of C grammar rules wit...



details:   https://anonhg.NetBSD.org/src/rev/8463dce9b37f
branches:  trunk
changeset: 953392:8463dce9b37f
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Mar 07 19:46:18 2021 +0000

description:
lint: align names of C grammar rules with C99

No functional change.

diffstat:

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

diffs (46 lines):

diff -r 1992015dc32a -r 8463dce9b37f usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Sun Mar 07 19:42:54 2021 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Sun Mar 07 19:46:18 2021 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.166 2021/03/07 19:42:54 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.167 2021/03/07 19:46:18 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.166 2021/03/07 19:42:54 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.167 2021/03/07 19:46:18 rillig Exp $");
 #endif
 
 #include <limits.h>
@@ -1358,7 +1358,7 @@
          }
        ;
 
-init_field:
+designator:                    /* C99 6.7.8 "Initialization" */
          T_LBRACK range T_RBRACK {
                if (!Sflag)
                        /* array initializer with des.s is a C9X feature */
@@ -1372,13 +1372,13 @@
          }
        ;
 
-init_field_list:
-         init_field
-       | init_field_list init_field
+designator_list:               /* C99 6.7.8 "Initialization" */
+         designator
+       | designator_list designator
        ;
 
 init_by_name:
-         init_field_list T_ASSIGN
+         designator_list T_ASSIGN
        | identifier T_COLON {
                /* GCC style struct or union member name in initializer */
                gnuism(315);



Home | Main Index | Thread Index | Old Index