kconfig: refactor pattern matching in STRING state
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 11 Dec 2018 11:00:48 +0000 (20:00 +0900)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 10 Feb 2019 21:31:57 +0000 (22:31 +0100)
commitcc43c9e39b766069cad56a27764a283e10171d90
tree97992debc9668ae66224c81c1a6417c510579bdf
parent470582e04372ab9d3079f0da8d6887d339b4a68b
kconfig: refactor pattern matching in STRING state

Here, similar matching patters are duplicated in order to look ahead
the '\n' character. If the next character is '\n', the lexer returns
T_WORD_QUOTE because it must be prepared to return T_EOL at the next
match.

Use unput('\n') trick to reduce the code duplication.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
config/zconf.l