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: rename func_arg_list to align with...



details:   https://anonhg.NetBSD.org/src/rev/ac60c7e29fed
branches:  trunk
changeset: 1022250:ac60c7e29fed
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Jul 10 18:13:06 2021 +0000

description:
lint: rename func_arg_list to align with C99

No functional change.

diffstat:

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

diffs (69 lines):

diff -r c8d6b4044876 -r ac60c7e29fed usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Sat Jul 10 17:46:55 2021 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Sat Jul 10 18:13:06 2021 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.297 2021/07/10 17:46:55 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.298 2021/07/10 18:13:06 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.297 2021/07/10 17:46:55 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.298 2021/07/10 18:13:06 rillig Exp $");
 #endif
 
 #include <limits.h>
@@ -329,7 +329,7 @@
 %type  <y_tnode>       gcc_statement_expr_item
 %type  <y_tnode>       term
 %type  <y_tnode>       generic_selection
-%type  <y_tnode>       func_arg_list
+%type  <y_tnode>       argument_expression_list
 %type  <y_op>          point_or_arrow
 %type  <y_type>        type_name
 %type  <y_sym>         abstract_declaration
@@ -1731,7 +1731,7 @@
        | term T_LPAREN T_RPAREN {
                $$ = new_function_call_node($1, NULL);
          }
-       | term T_LPAREN func_arg_list T_RPAREN {
+       | term T_LPAREN argument_expression_list T_RPAREN {
                $$ = new_function_call_node($1, $3);
          }
        | term point_or_arrow T_NAME {
@@ -1824,6 +1824,15 @@
          }
        ;
 
+argument_expression_list:      /* C99 6.5.2 */
+         expr %prec T_COMMA {
+               $$ = new_function_argument_node(NULL, $1);
+         }
+       | argument_expression_list T_COMMA expr {
+               $$ = new_function_argument_node($1, $3);
+         }
+       ;
+
 /*
  * The inner part of a GCC statement-expression of the form ({ ... }).
  *
@@ -1880,15 +1889,6 @@
          }
        ;
 
-func_arg_list:
-         expr %prec T_COMMA {
-               $$ = new_function_argument_node(NULL, $1);
-         }
-       | func_arg_list T_COMMA expr {
-               $$ = new_function_argument_node($1, $3);
-         }
-       ;
-
 point_or_arrow:
          T_POINT {
                symtyp = FMEMBER;



Home | Main Index | Thread Index | Old Index