Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libcurses/director tests/libcurses: extract gramma...



details:   https://anonhg.NetBSD.org/src/rev/ad66ac279e3e
branches:  trunk
changeset: 959307:ad66ac279e3e
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Feb 07 17:23:29 2021 +0000

description:
tests/libcurses: extract grammar rule 'arg'

diffstat:

 tests/lib/libcurses/director/testlang_parse.y |  23 +++++++++++++----------
 1 files changed, 13 insertions(+), 10 deletions(-)

diffs (38 lines):

diff -r 3fe77973b8bd -r ad66ac279e3e tests/lib/libcurses/director/testlang_parse.y
--- a/tests/lib/libcurses/director/testlang_parse.y     Sun Feb 07 17:17:25 2021 +0000
+++ b/tests/lib/libcurses/director/testlang_parse.y     Sun Feb 07 17:23:29 2021 +0000
@@ -1,5 +1,5 @@
 %{
-/*     $NetBSD: testlang_parse.y,v 1.24 2021/02/07 12:56:53 rillig Exp $       */
+/*     $NetBSD: testlang_parse.y,v 1.25 2021/02/07 17:23:29 rillig Exp $       */
 
 /*-
  * Copyright 2009 Brett Lymn <blymn%NetBSD.org@localhost>
@@ -546,15 +546,18 @@
 
                /* TODO: split into 'arg' */
 args           : /* empty */
-               | LHB expr RHB { assign_arg(data_static, $<string>2); } args
-               | numeric { assign_arg(data_static, $1); } args
-               | STRING { assign_arg(data_static, $1); } args
-               | BYTE { assign_arg(data_byte, $1); } args
-               | PATH { assign_arg(data_static, $1); } args
-               | FILENAME { assign_arg(data_static, $1); } args
-               | VARNAME { assign_arg(data_static, $1); } args
-               | VARIABLE  { assign_arg(data_var, $1); } args
-               | NULL_RET { assign_arg(data_null, $1); } args
+               | arg args
+               ;
+
+arg            : LHB expr RHB { assign_arg(data_static, $<string>2); }
+               | numeric { assign_arg(data_static, $1); }
+               | STRING { assign_arg(data_static, $1); }
+               | BYTE { assign_arg(data_byte, $1); }
+               | PATH { assign_arg(data_static, $1); }
+               | FILENAME { assign_arg(data_static, $1); }
+               | VARNAME { assign_arg(data_static, $1); }
+               | VARIABLE  { assign_arg(data_var, $1); }
+               | NULL_RET { assign_arg(data_null, $1); }
                ;
 
 eol            : EOL



Home | Main Index | Thread Index | Old Index