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: inline grammar rule clrtyp_typespec



details:   https://anonhg.NetBSD.org/src/rev/84f37f65ebe5
branches:  trunk
changeset: 984505:84f37f65ebe5
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Jul 10 16:41:51 2021 +0000

description:
lint: inline grammar rule clrtyp_typespec

No functional change.

diffstat:

 usr.bin/xlint/lint1/cgram.y |  19 ++++++-------------
 1 files changed, 6 insertions(+), 13 deletions(-)

diffs (62 lines):

diff -r 71561735e649 -r 84f37f65ebe5 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Sat Jul 10 16:39:43 2021 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Sat Jul 10 16:41:51 2021 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.291 2021/07/10 16:39:43 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.292 2021/07/10 16:41:51 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.291 2021/07/10 16:39:43 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.292 2021/07/10 16:41:51 rillig Exp $");
 #endif
 
 #include <limits.h>
@@ -281,7 +281,6 @@
 %type  <y_sym>         notype_decl
 %type  <y_sym>         type_decl
 %type  <y_type>        typespec
-%type  <y_type>        clrtyp_typespec
 %type  <y_type>        notype_typespec
 %type  <y_type>        struct_spec
 %type  <y_type>        enum_spec
@@ -535,8 +534,8 @@
        ;
 
 declaration_specifiers:                /* C99 6.7 */
-         clrtyp_typespec {
-               add_type($1);
+         clrtyp typespec {
+               add_type($2);
          }
        | clrtyp_declmods typespec {
                add_type($2);
@@ -567,12 +566,6 @@
          }
        ;
 
-clrtyp_typespec:
-         clrtyp typespec {
-               $$ = $2;
-         }
-       ;
-
 typespec:
          notype_typespec
        | T_TYPENAME {
@@ -717,8 +710,8 @@
        ;
 
 noclass_declspecs_postfix:
-         clrtyp_typespec {
-               add_type($1);
+         clrtyp typespec {
+               add_type($2);
          }
        | clrtyp add_type_qualifier_list typespec {
                add_type($3);



Home | Main Index | Thread Index | Old Index