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 y_sb to y_name
details: https://anonhg.NetBSD.org/src/rev/1a424f2f115e
branches: trunk
changeset: 984513:1a424f2f115e
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Jul 10 17:46:55 2021 +0000
description:
lint: rename y_sb to y_name
That buffer is only used for names of identifiers, so be more specific.
No functional change.
diffstat:
usr.bin/xlint/lint1/cgram.y | 15 ++++++++-------
usr.bin/xlint/lint1/lex.c | 6 +++---
2 files changed, 11 insertions(+), 10 deletions(-)
diffs (91 lines):
diff -r bf6db2a47a1b -r 1a424f2f115e usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y Sat Jul 10 17:35:54 2021 +0000
+++ b/usr.bin/xlint/lint1/cgram.y Sat Jul 10 17:46:55 2021 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: cgram.y,v 1.296 2021/07/10 17:35:54 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.297 2021/07/10 17:46:55 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.296 2021/07/10 17:35:54 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.297 2021/07/10 17:46:55 rillig Exp $");
#endif
#include <limits.h>
@@ -121,13 +121,14 @@
for ( ; s != NULL; s = s->s_next)
s->s_styp = NULL;
}
+
%}
%expect 136
%union {
val_t *y_val;
- sbuf_t *y_sb;
+ sbuf_t *y_name;
sym_t *y_sym;
op_t y_op;
scl_t y_scl;
@@ -272,8 +273,8 @@
%right T_UNARY T_INCDEC T_SIZEOF T_REAL T_IMAG
%left T_LPAREN T_LBRACK T_POINT T_ARROW
-%token <y_sb> T_NAME
-%token <y_sb> T_TYPENAME
+%token <y_name> T_NAME
+%token <y_name> T_TYPENAME
%token <y_val> T_CON
%token <y_string> T_STRING
@@ -288,7 +289,7 @@
%type <y_sym> enum_tag
%type <y_tspec> struct
%type <y_sym> struct_declaration
-%type <y_sb> identifier
+%type <y_name> identifier
%type <y_sym> member_declaration_list_semi
%type <y_sym> member_declaration_list
%type <y_sym> member_declaration
@@ -335,7 +336,7 @@
%type <y_tnode> expr_opt
%type <y_string> string
%type <y_string> string2
-%type <y_sb> asm_or_symbolrename_opt
+%type <y_name> asm_or_symbolrename_opt
%type <y_range> range
%type <y_seen_statement> block_item_list
%type <y_seen_statement> block_item
diff -r bf6db2a47a1b -r 1a424f2f115e usr.bin/xlint/lint1/lex.c
--- a/usr.bin/xlint/lint1/lex.c Sat Jul 10 17:35:54 2021 +0000
+++ b/usr.bin/xlint/lint1/lex.c Sat Jul 10 17:46:55 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lex.c,v 1.53 2021/07/08 03:10:39 rillig Exp $ */
+/* $NetBSD: lex.c,v 1.54 2021/07/10 17:46:55 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: lex.c,v 1.53 2021/07/08 03:10:39 rillig Exp $");
+__RCSID("$NetBSD: lex.c,v 1.54 2021/07/10 17:46:55 rillig Exp $");
#endif
#include <ctype.h>
@@ -440,7 +440,7 @@
tok = T_NAME;
}
- yylval.y_sb = sb;
+ yylval.y_name = sb;
return tok;
}
Home |
Main Index |
Thread Index |
Old Index