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: use more commo...



details:   https://anonhg.NetBSD.org/src/rev/dad7b1194fe8
branches:  trunk
changeset: 951921:dad7b1194fe8
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Feb 07 17:32:55 2021 +0000

description:
tests/libcurses: use more common abbreviations for tokens

diffstat:

 tests/lib/libcurses/director/testlang_conf.l  |  18 +++++++++---------
 tests/lib/libcurses/director/testlang_parse.y |  14 +++++++-------
 2 files changed, 16 insertions(+), 16 deletions(-)

diffs (104 lines):

diff -r e60efb31fae8 -r dad7b1194fe8 tests/lib/libcurses/director/testlang_conf.l
--- a/tests/lib/libcurses/director/testlang_conf.l      Sun Feb 07 17:26:15 2021 +0000
+++ b/tests/lib/libcurses/director/testlang_conf.l      Sun Feb 07 17:32:55 2021 +0000
@@ -1,5 +1,5 @@
 %{
-/*     $NetBSD: testlang_conf.l,v 1.11 2021/02/07 12:05:36 rillig Exp $        */
+/*     $NetBSD: testlang_conf.l,v 1.12 2021/02/07 17:32:55 rillig Exp $        */
 
 /*-
  * Copyright 2009 Brett Lymn <blymn%NetBSD.org@localhost>
@@ -159,10 +159,10 @@
 WCHAR          [wW][cC][hH][aA][rR]
 BYTE           BYTE
 OR             \|
-LHB            \(
-RHB            \)
-LHSB           \[
-RHSB           \]
+LPAREN         \(
+RPAREN         \)
+LBRACK         \[
+RBRACK         \]
 MULTIPLIER     \*
 
 %x incl
@@ -248,10 +248,10 @@
 {CCHAR}                return CCHAR;
 {WCHAR}                return WCHAR;
 {OR}           return OR;
-{LHB}          return LHB;
-{RHB}          return RHB;
-{LHSB}         return LHSB;
-{RHSB}         return RHSB;
+{LPAREN}       return LPAREN;
+{RPAREN}       return RPAREN;
+{LBRACK}       return LBRACK;
+{RBRACK}       return RBRACK;
 
 {HEX}          {
                        /* Hex value, convert to decimal and return numeric */
diff -r e60efb31fae8 -r dad7b1194fe8 tests/lib/libcurses/director/testlang_parse.y
--- a/tests/lib/libcurses/director/testlang_parse.y     Sun Feb 07 17:26:15 2021 +0000
+++ b/tests/lib/libcurses/director/testlang_parse.y     Sun Feb 07 17:32:55 2021 +0000
@@ -1,5 +1,5 @@
 %{
-/*     $NetBSD: testlang_parse.y,v 1.26 2021/02/07 17:26:15 rillig Exp $       */
+/*     $NetBSD: testlang_parse.y,v 1.27 2021/02/07 17:32:55 rillig Exp $       */
 
 /*-
  * Copyright 2009 Brett Lymn <blymn%NetBSD.org@localhost>
@@ -189,7 +189,7 @@
 %token <string> ASSIGN
 %token <string> CCHAR
 %token <string> WCHAR
-%token EOL CALL CHECK NOINPUT OR MULTIPLIER LHB RHB LHSB RHSB
+%token EOL CALL CHECK NOINPUT OR MULTIPLIER LPAREN RPAREN LBRACK RBRACK
 %token CALL2 CALL3 CALL4 DRAIN
 
 %nonassoc OR
@@ -219,7 +219,7 @@
 assign         : ASSIGN VARNAME numeric {
                        set_var(data_number, $2, $3);
                }
-               | ASSIGN VARNAME LHB expr RHB {
+               | ASSIGN VARNAME LPAREN expr RPAREN {
                        set_var(data_number, $2, $<string>4);
                }
                | ASSIGN VARNAME STRING {
@@ -241,7 +241,7 @@
                ;
 
 attributes     : numeric
-               | LHB expr RHB {
+               | LPAREN expr RPAREN {
                        $<string>$ = $<string>2;
                }
                | VARIABLE {
@@ -252,7 +252,7 @@
 char_vals      : numeric {
                        add_to_vals(data_number, $1);
                }
-               | LHSB array RHSB
+               | LBRACK array RBRACK
                | VARIABLE {
                        add_to_vals(data_var, $1);
                }
@@ -451,7 +451,7 @@
                ;
 
 returns                : numeric { assign_rets(data_number, $1); }
-               | LHB expr RHB { assign_rets(data_number, $<string>2); }
+               | LPAREN expr RPAREN { assign_rets(data_number, $<string>2); }
                | STRING { assign_rets(data_string, $1); }
                | BYTE { assign_rets(data_byte, (void *) $1); }
                | ERR_RET { assign_rets(data_err, NULL); }
@@ -549,7 +549,7 @@
                | arg args
                ;
 
-arg            : LHB expr RHB {
+arg            : LPAREN expr RPAREN {
                        assign_arg(data_static, $<string>2);
                }
                | numeric {



Home | Main Index | Thread Index | Old Index