[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNASam+Do=PVxjVLYNY5ANw+pC4Rc6RV0Cua+Ac5+i2N6Vw@mail.gmail.com>
Date: Tue, 27 Mar 2018 00:25:19 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>
Cc: Michal Marek <michal.lkml@...kovi.net>,
Sam Ravnborg <sam@...nborg.org>,
Ulf Magnusson <ulfalizer@...il.com>,
"Luis R . Rodriguez" <mcgrof@...nel.org>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] kconfig: use yylineno option instead of manual lineno increments
2018-03-23 2:00 GMT+09:00 Masahiro Yamada <yamada.masahiro@...ionext.com>:
> Tracking the line number by hand is error-prone since we need to make
> sure to increment it in all the \n matching patterns.
>
> If '%option yylineno' is set, flex defines 'yylineno' to contain the
> current line number and automatically updates it each time it reads a
> \n character. This is much more convenient although the lexer does
> not initializes yylineno, so you need to set it to 1 each time you
> start reading a new file, and restore it you go back to the previous
> file.
>
> I tested this with DEBUG_PARSE, and confirmed the same dump message
> was produced.
>
> I removed the perf-report option. Otherwise, I see the following
> message:
> %option yylineno entails a performance penalty ONLY on rules that
> can match newline characters
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
> ---
Applied to linux-kbuild/kconfig.
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists