Skip to content

kconfig: refactor lexer and parser code

Masahiro Yamada linux-kbuild lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest27 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/27kconfig: fix infinite loop when expanding a macro at the end of filescripts/kconfig/lexer.l+5 -20 replies
2/27kconfig: fix off-by-one in zconf_error()scripts/kconfig/parser.y+1 -10 replies
3/27kconfig: remove orphan lookup_file() declarationscripts/kconfig/expr.h+0 -10 replies
4/27kconfig: remove compat_getline()scripts/kconfig/confdata.c+1 -520 replies
5/27kconfig: remove unneeded sym_find() call in conf_parse()scripts/kconfig/parser.y+1 -10 replies
6/27kconfig: write Kconfig files to autoconf.cmd in orderscripts/kconfig/confdata.c scripts/kconfig/lkc.h scripts/kconfig/parser.y +1 more+11 -40 replies
7/27kconfig: call env_write_dep() right after yyparse()scripts/kconfig/confdata.c scripts/kconfig/lkc_proto.h scripts/kconfig/parser.y +1 more+18 -120 replies
8/27kconfig: split preprocessor prototypes into preprocess.hscripts/kconfig/lexer.l scripts/kconfig/lkc_proto.h scripts/kconfig/parser.y +2 more+23 -130 replies
9/27kconfig: replace current_pos with separate cur_{filename,lineno}scripts/kconfig/lexer.l+17 -80 replies
10/27kconfig: remove zconf_curname() and zconf_lineno()scripts/kconfig/internal.h scripts/kconfig/lexer.l scripts/kconfig/lkc.h +2 more+37 -510 replies
11/27kconfig: associate struct menu with file name directlyscripts/kconfig/expr.h scripts/kconfig/menu.c scripts/kconfig/parser.y +2 more+10 -100 replies
12/27kconfig: associate struct property with file name directlyscripts/kconfig/expr.h scripts/kconfig/menu.c scripts/kconfig/symbol.c+9 -90 replies
13/27kconfig: replace file->name with name in zconf_nextfile()scripts/kconfig/lexer.l+5 -50 replies
14/27kconfig: do not delay the cur_filename updatescripts/kconfig/lexer.l scripts/kconfig/parser.y+15 -100 replies
15/27kconfig: replace remaining current_file->name with cur_filenamescripts/kconfig/lexer.l scripts/kconfig/preprocess.c+6 -60 replies
16/27kconfig: move the file and lineno in struct file to struct bufferscripts/kconfig/expr.h scripts/kconfig/lexer.l scripts/kconfig/menu.c+22 -320 replies
17/27kconfig: make file::name a flexible array memberscripts/kconfig/expr.h scripts/kconfig/util.c+6 -30 replies
18/27kconfig: change file_lookup() to return the file namescripts/kconfig/expr.h scripts/kconfig/lexer.l scripts/kconfig/lkc.h +2 more+13 -160 replies
19/27kconfig: split list_head into a separate headerscripts/kconfig/expr.h scripts/kconfig/list.h scripts/kconfig/list_types.h +3 more+15 -70 replies
20/27kconfig: resync list.hscripts/kconfig/list.h+121 -620 replies
21/27kconfig: import more list macros and inline functionsscripts/kconfig/list.h scripts/kconfig/list_types.h+77 -00 replies
22/27kconfig: add macros useful for hashtablescripts/kconfig/hashtable.h+48 -00 replies
23/27kconfig: move ARRAY_SIZE to a headerscripts/kconfig/array_size.h scripts/kconfig/preprocess.c+12 -20 replies
24/27kconfig: move strhash() to a headerscripts/kconfig/symbol.c scripts/kconfig/util.h+16 -90 replies
25/27kconfig: convert linked list of files to hash tablescripts/kconfig/util.c+12 -90 replies
26/27kconfig: use generic macros to implement symbol hashtablescripts/kconfig/conf.c scripts/kconfig/confdata.c scripts/kconfig/expr.h +4 more+43 -410 replies
27/27kconfig: do not imply the type of choice valuescripts/kconfig/menu.c+0 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/27] kconfig: refactor lexer and parser code

Random fixes, cleanups, etc.

Masahiro Yamada (27):
kconfig: fix infinite loop when expanding a macro at the end of file
kconfig: fix off-by-one in zconf_error()
kconfig: remove orphan lookup_file() declaration
kconfig: remove compat_getline()
kconfig: remove unneeded sym_find() call in conf_parse()
kconfig: write Kconfig files to autoconf.cmd in order
kconfig: call env_write_dep() right after yyparse()
kconfig: split preprocessor prototypes into preprocess.h
kconfig: replace current_pos with separate cur_{filename,lineno}
kconfig: remove zconf_curname() and zconf_lineno()
kconfig: associate struct menu with file name directly
kconfig: associate struct property with file name directly
kconfig: replace file->name with name in zconf_nextfile()
kconfig: do not delay the cur_filename update
kconfig: replace remaining current_file->name with cur_filename
kconfig: move the file and lineno in struct file to struct buffer
kconfig: make file::name a flexible array member
kconfig: change file_lookup() to return the file name
kconfig: split list_head into a separate header
kconfig: resync list.h
kconfig: import more list macros and inline functions
kconfig: add macros useful for hashtable
kconfig: move ARRAY_SIZE to a header
kconfig: move strhash() to a header
kconfig: convert linked list of files to hash table
kconfig: use generic macros to implement symbol hashtable
kconfig: do not imply the type of choice value

 scripts/kconfig/array_size.h |  11 ++
 scripts/kconfig/conf.c       |  12 +-
 scripts/kconfig/confdata.c   |  91 +++----------
 scripts/kconfig/expr.h       |  24 +---
 scripts/kconfig/hashtable.h  |  48 +++++++
 scripts/kconfig/internal.h   |  12 ++
 scripts/kconfig/lexer.l      | 100 +++++++-------
 scripts/kconfig/list.h       | 254 ++++++++++++++++++++++++++---------
 scripts/kconfig/list_types.h |  17 +++
 scripts/kconfig/lkc.h        |   5 +-
 scripts/kconfig/lkc_proto.h  |  15 ---
 scripts/kconfig/mconf.c      |   1 +
 scripts/kconfig/menu.c       |  24 ++--
 scripts/kconfig/nconf.c      |   1 +
 scripts/kconfig/parser.y     |  92 +++++++------
 scripts/kconfig/preprocess.c |  23 ++--
 scripts/kconfig/preprocess.h |  19 +++
 scripts/kconfig/qconf.cc     |   2 +-
 scripts/kconfig/symbol.c     |  46 +++----
 scripts/kconfig/util.c       |  38 ++++--
 scripts/kconfig/util.h       |  15 +++
 21 files changed, 511 insertions(+), 339 deletions(-)
 create mode 100644 scripts/kconfig/array_size.h
 create mode 100644 scripts/kconfig/hashtable.h
 create mode 100644 scripts/kconfig/list_types.h
 create mode 100644 scripts/kconfig/preprocess.h
 create mode 100644 scripts/kconfig/util.h
Signature · 1 line
2.40.1