Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp3929732pxb; Mon, 27 Sep 2021 05:57:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeYEMwH+dS9bTqeHlVHacyw6l7bfPv87mBu+lMFBMewCysRuxttaWEC29EeNmHiq7tUeSG X-Received: by 2002:a50:cfc3:: with SMTP id i3mr22621508edk.36.1632747465739; Mon, 27 Sep 2021 05:57:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632747465; cv=none; d=google.com; s=arc-20160816; b=ZAXHEKypqnbyV0gL2ADsRf2lOJL30uxZ4pIQdGY+jKeNHclbwdWonh5glrRQ+zEB7M ztkFTfmAiqpdICQlJ2AaJvfUjjUclZ4AroBNbIw0bG++xu0T/IybvWW4cjuo1cxkrHZz kEZUb91v5A2Ye1KuAPBfisJeh6G/efBHVBS7jlEpv5wQHlS13/L3IEAP0nnIgy3AKsNJ 8v3CIPUxEG4XI8/axvY3/PN3ZPJn5VCcJRyWOSGOJ4LhCwbeWbUmQ2aQ/3reCKIu60Cl W4+waXeikKUB0Qf3lFbtpMvQYSjU/NiJ8Y8JbkfeaTq3A836uyxD7nWhuT0f9HbS9CWv ctAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=ApYGefbovH3YDnI1o13UMUD8Y4BudcfAKenkft0EDMU=; b=DAEoaMEizUp+j35vHSlwrN4wzVYB3YLPKIeMpu4u19lnY6N0yd6T23DVW03G32iGtl 0O/nsfUBhRQDfX6FgtTpGftnbtJMEGzSMlV+kbLdWBiEOzQ2wPGus2itYbNLYOnKXzdq GQcBSpEPaOjj+JN3UUHZ1rPKrX1k+V47Lhjo3KzaS3G0zh2F1hniNRoM8PrK5z+legs8 BsFVBxkeH7LhLlz55ukksqIyNpL2BBZ9jPfd99WD2Ym0fSw21+XRKljZ+huTo5NJlxtu JZQtPLiIUUwKMlfTUNsk3OFYRSvwJ6fK20QX42J6AZHmQTw4cKes8sJUxoi5/Cp1Hs8x C8fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=1TiQKUO3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p22si6938503ejm.526.2021.09.27.05.57.21; Mon, 27 Sep 2021 05:57:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=1TiQKUO3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234475AbhI0M5h (ORCPT + 99 others); Mon, 27 Sep 2021 08:57:37 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:41362 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234446AbhI0M5g (ORCPT ); Mon, 27 Sep 2021 08:57:36 -0400 Received: from grover.. (133-32-232-101.west.xps.vectant.ne.jp [133.32.232.101]) (authenticated) by conuserg-12.nifty.com with ESMTP id 18RCt8TH023197; Mon, 27 Sep 2021 21:55:38 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 18RCt8TH023197 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1632747338; bh=ApYGefbovH3YDnI1o13UMUD8Y4BudcfAKenkft0EDMU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1TiQKUO3N2GDlZIGR9dZItuQBAl5kfKk4jzb6RiF/1B4qkVzWiqpglLiBTfsDog33 qjOH3n0oGJhyggp3B0aLcefmAp2kVKOIThyiTK1IXBJ0jVWP6+gLkwvkMVjv+KMEsf fGCtLA5Kaz05Sot2e/cl7FCB6pWdFYE1A8VtqXC5hvZcFvngEuNq4KEZ3wt75t7CX0 8Ay/JmEzyesr/8CxqnHgQGR3p8/8Ots9t8OWbOX1MweM94/w9Gu+SouIwrhn2h9kcC Ca+OfI+h43oWPGC8N2MiO4TncoPe73qFRma45IRalpHubEQufJOaGybkZV5Cy57TWf mZ0i08rLl23Qg== X-Nifty-SrcIP: [133.32.232.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] kconfig: rename a variable in the lexer to a clearer name Date: Mon, 27 Sep 2021 21:54:37 +0900 Message-Id: <20210927125437.818092-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210927125437.818092-1-masahiroy@kernel.org> References: <20210927125437.818092-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In Kconfig, like Python, you can enclose a string by double-quotes or single-quotes. So, both "foo" and 'foo' are allowed. The variable, "str", is used to remember whether the string started with a double-quote or a single-quote. Rename it to a clearer name. The type should be 'char'. Signed-off-by: Masahiro Yamada --- scripts/kconfig/lexer.l | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/kconfig/lexer.l b/scripts/kconfig/lexer.l index efe487859308..cc386e443683 100644 --- a/scripts/kconfig/lexer.l +++ b/scripts/kconfig/lexer.l @@ -84,7 +84,7 @@ static void warn_ignored_character(char chr) n [A-Za-z0-9_-] %% - int str = 0; + char open_quote = 0; #.* /* ignore comment */ [ \t]* /* whitespaces */ @@ -133,7 +133,7 @@ n [A-Za-z0-9_-] ":=" return T_COLON_EQUAL; "+=" return T_PLUS_EQUAL; \"|\' { - str = yytext[0]; + open_quote = yytext[0]; new_string(); BEGIN(STRING); } @@ -170,7 +170,7 @@ n [A-Za-z0-9_-] append_string(yytext + 1, yyleng - 1); } \'|\" { - if (str == yytext[0]) { + if (open_quote == yytext[0]) { BEGIN(INITIAL); yylval.string = text; return T_WORD_QUOTE; -- 2.30.2