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 allow cascaded attributes



details:   https://anonhg.NetBSD.org/src/rev/aa7c97d73ce4
branches:  trunk
changeset: 820099:aa7c97d73ce4
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Dec 29 19:40:21 2016 +0000

description:
allow cascaded attributes

diffstat:

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

diffs (85 lines):

diff -r e3215e497dd5 -r aa7c97d73ce4 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Thu Dec 29 19:22:51 2016 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Thu Dec 29 19:40:21 2016 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.86 2016/12/29 18:44:49 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.87 2016/12/29 19:40:21 christos 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.86 2016/12/29 18:44:49 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.87 2016/12/29 19:40:21 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -117,7 +117,7 @@
 }
 %}
 
-%expect 92
+%expect 100
 
 %union {
        int     y_int;
@@ -562,6 +562,11 @@
        }
        ;
 
+type_attribute_list:
+         type_attribute
+       | type_attribute_list type_attribute
+       ;
+
 clrtyp:
          {
                clrtyp();
@@ -605,7 +610,7 @@
        | T_SCLASS {
                addscl($1);
          }
-       | type_attribute
+       | type_attribute_list
        ;
 
 clrtyp_typespec:
@@ -1001,7 +1006,7 @@
                popdecl();
                blklev--;
          }
-       | notype_direct_decl type_attribute
+       | notype_direct_decl type_attribute_list
        ;
 
 type_decl:
@@ -1034,7 +1039,7 @@
                popdecl();
                blklev--;
          }
-       | type_direct_decl type_attribute
+       | type_direct_decl type_attribute_list
        ;
 
 /*
@@ -1054,7 +1059,7 @@
        ;
 
 direct_param_decl:
-         identifier type_attribute {
+         identifier type_attribute_list {
                $$ = dname(getsym($1));
          }
        | identifier {
@@ -1407,7 +1412,7 @@
                popdecl();
                blklev--;
          }
-       | direct_abs_decl type_attribute
+       | direct_abs_decl type_attribute_list
        ;
 
 non_expr_stmnt:



Home | Main Index | Thread Index | Old Index