]> git.proxmox.com Git - mirror_qemu.git/commit - scripts/minikconf.py
minikconfig: add parser skeleton
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 23 Jan 2019 06:55:56 +0000 (14:55 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 7 Mar 2019 20:45:53 +0000 (21:45 +0100)
commitd4fdccadbab5043c442b00dbf54555873c6bee7b
tree94fc85db389462ace62dd99fb1d6a30c66bdda1d
parent28ba6bdd2f0acc1dace44c835aa49438f9929ad9
minikconfig: add parser skeleton

This implements a scanner and recursive descent parser for Kconfig-like
configuration files.  The only "action" of the parser is for now to
detect undefined variables and process include files.

The main differences between Kconfig and this are:

* only the "bool" type is supported

* variables can only be defined once

* choices are not supported (but they could be added as syntactic
sugar for multiple Boolean values)

* menus and other graphical concepts (prompts, help text) are not
supported

* assignments ("CONFIG_FOO=y", "CONFIG_FOO=n") are parsed as part
of the Kconfig language, not as a separate file.

The idea was originally by Ákos Kovács, but I could not find his
implementation so I had to redo it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20190123065618.3520-23-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scripts/minikconf.py [new file with mode: 0644]