From patchwork Tue Dec 11 11:01:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 153427 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp475294ljp; Tue, 11 Dec 2018 03:02:21 -0800 (PST) X-Google-Smtp-Source: AFSGD/XMohy3QWfDDot3k68lHoBTEA2R22hfyXtN10EcrHZ6lOLlrwa9N0tU9bctOkpIi+k8uwbJ X-Received: by 2002:a63:ce08:: with SMTP id y8mr13991694pgf.388.1544526141825; Tue, 11 Dec 2018 03:02:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544526141; cv=none; d=google.com; s=arc-20160816; b=iyFcI/4otqGcLF3alRg0uiisnn+BTzpshsSJbYNVPS2blJ5HsGjfXNW+nM2wjxcxFs W9K0ZZA/IRZBt0ENABg1c7L0V665a9klxORg0KOlSw1/Gl3ORIQ4t+ItQ3L+BGT+IUlh L6NC0N19uxEcNTgZUsg1oomR5XipR6WSnj8JtUI3tedHTkkXdeWn6vAQ/n8MyWzdT1y4 H9sv5Yzqa4iV9rD7WwNKHopkLyW6dudKRkdSGGYWaPbv9qIl2qpX/X0bTppSIDlk6CCz wMbPyL7mhZjaXwoC7+85B4r7GhAf1GSQ7APXBXRxF9/fsNNAQ3nhqJ1IwaRivYLwAXvf 4GpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=hzYyyrxQPXTdQIdYAboEbvyEEikywwYe5oI5dt1P3mQ=; b=JaPa/HORGua6Ws2KYfT5AwEgzoH+WRLhGtLOs9A2dqXjG72AW+pH603OJfpnuNbRFP FCBRbL3RObn4LUpRGoy4SJ+ma6t36A7iKg+O/QYf6ODgeZx8IrVFhFW71xM1pqTGVBaH KH411hsnF1lrxhKLyC5EOFvRs4lQMfkzYA6eyFc/QL8WHJWBCKeqTYJAR1wQW4VvXot9 /cmqRMCvJKDTme+EXWwKYMUZyd5P5JRmjDNAMY9YKnUZ9cFP2mWWj3wBfmMmbRISnZBq 47oCZN0UEKQhe57g0Y7d5tUROJoTjqvb21TcsMyRKPgjegTRbl8ysS3zrs0aON9Q/Ltm vqMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=2csVzN7A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w19si11573900pgc.96.2018.12.11.03.02.21; Tue, 11 Dec 2018 03:02:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=2csVzN7A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726802AbeLKLCT (ORCPT + 31 others); Tue, 11 Dec 2018 06:02:19 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:36859 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726709AbeLKLBt (ORCPT ); Tue, 11 Dec 2018 06:01:49 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id wBBB1C61017210; Tue, 11 Dec 2018 20:01:30 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com wBBB1C61017210 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1544526090; bh=hzYyyrxQPXTdQIdYAboEbvyEEikywwYe5oI5dt1P3mQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2csVzN7AzTqpD+zj9d5WfbxsrqC0uVfoUtK8CkVpMoiaCtmZbP1nzk5psmOgpOyi7 zpQdQblf1K0zbT6nFKIcY23B29MLAJztgTp09YP7kqKLIGb3YBBkh3K7fS9ukzFOWh 9SZ4YlhISEMZb4OGA1HvhjN9DENDVBugYGv7DFJJZ43zmyJAenTT4c1n6m3ahbcIea UceMwDr1sOXqNlcdre6bHynmjGX+IkNXK+M1wvFgw/5A2mghnCfuu7TzofdcvZxqxw DVOW3nioO7DTc4ZUMb7rN7YWLLWzGiMOcGNZTe0pT9I2OW8Q6hplcrLR4aWnsQuoQF dGjmr6J5s6sNw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Ulf Magnusson , linux-kernel@vger.kernel.org, Masahiro Yamada Subject: [PATCH 24/27] kconfig: stop associating kconf_id with yylval Date: Tue, 11 Dec 2018 20:01:07 +0900 Message-Id: <1544526070-16690-25-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544526070-16690-1-git-send-email-yamada.masahiro@socionext.com> References: <1544526070-16690-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The lexer has conventionally associated kconf_id data with yylval to carry additional information to the parser. No token is relying on this any more. Signed-off-by: Masahiro Yamada --- scripts/kconfig/zconf.l | 2 -- scripts/kconfig/zconf.y | 41 ++++++++++++++++++++--------------------- 2 files changed, 20 insertions(+), 23 deletions(-) -- 2.7.4 diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index b715af9..c8823a4 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l @@ -111,7 +111,6 @@ n [A-Za-z0-9_-] current_pos.lineno = yylineno; if (id && id->flags & TF_COMMAND) { BEGIN(PARAM); - yylval.id = id; return id->token; } alloc_string(yytext, yyleng); @@ -170,7 +169,6 @@ n [A-Za-z0-9_-] {n}+ { const struct kconf_id *id = kconf_id_lookup(yytext, yyleng); if (id && id->flags & TF_PARAM) { - yylval.id = id; return id->token; } alloc_string(yytext, yyleng); diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y index 36cffc0..c611d70 100644 --- a/scripts/kconfig/zconf.y +++ b/scripts/kconfig/zconf.y @@ -40,50 +40,49 @@ static struct menu *current_menu, *current_entry; struct symbol *symbol; struct expr *expr; struct menu *menu; - const struct kconf_id *id; enum symbol_type type; enum variable_flavor flavor; } -%token T_MAINMENU -%token T_MENU -%token T_ENDMENU -%token T_SOURCE -%token T_CHOICE -%token T_ENDCHOICE -%token T_COMMENT -%token T_CONFIG -%token T_MENUCONFIG -%token T_HELP %token T_HELPTEXT -%token T_IF -%token T_ENDIF -%token T_DEPENDS -%token T_OPTIONAL -%token T_PROMPT -%token T_SELECT -%token T_IMPLY -%token T_RANGE -%token T_VISIBLE -%token T_ON %token T_WORD %token T_WORD_QUOTE %token T_ALLNOCONFIG_Y %token T_BOOL +%token T_CHOICE %token T_CLOSE_PAREN %token T_COLON_EQUAL +%token T_COMMENT +%token T_CONFIG %token T_DEFAULT %token T_DEFCONFIG_LIST %token T_DEF_BOOL %token T_DEF_TRISTATE +%token T_DEPENDS +%token T_ENDCHOICE +%token T_ENDIF +%token T_ENDMENU +%token T_HELP %token T_HEX +%token T_IF +%token T_IMPLY %token T_INT +%token T_MAINMENU +%token T_MENU +%token T_MENUCONFIG %token T_MODULES +%token T_ON %token T_OPEN_PAREN %token T_OPTION +%token T_OPTIONAL %token T_PLUS_EQUAL +%token T_PROMPT +%token T_RANGE +%token T_SELECT +%token T_SOURCE %token T_STRING %token T_TRISTATE +%token T_VISIBLE %token T_EOL %token T_ASSIGN_VAL