Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1175846
| From | Paul Bolle <pebolle@tiscali.nl> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: Kconfig: '+config' valid syntax? |
| Date | 2015-07-02 11:10 +0200 |
| Message-ID | <pHIFj-Jv-1@gated-at.bofh.it> (permalink) |
| References | <pHHJg-9G-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Dropped Yann. You already know Yann disappeared.]
On Thu, 2015-07-02 at 10:08 +0200, Valentin Rothberg wrote:
> commit ed013214afa7 ("ACPI / init: Make it possible to override _REV")
> is in today's linux-next tree (i.e., next-20150702) adding the
> following hunk to drivers/acpi/Kconfig:
>
> --- a/drivers/acpi/Kconfig
> +++ b/drivers/acpi/Kconfig
> @@ -428,6 +428,26 @@ config XPOWER_PMIC_OPREGION
> help
> This config adds ACPI operation region support for XPower
> AXP288 PMIC.
>
> ++config ACPI_REV_OVERRIDE_POSSIBLE
(Odd. Botched conflict resolution?)
> + bool "Allow supported ACPI revision to be overriden"
> + depends on X86
> + default y
> [...]
>
> By having a close look at the first added line, we can see that
> '+config ACPI_...' is added. To my great surprise, it's valid Kconfig
> syntax.
I played a bit with this. It seems you can basically add a '+' anywhere
you like and kconfig will just ignore it.
> How is that possible? IMHO it's an invalid token, such that
> Kconfig should complain about it. Or do I miss something?
Welcome to the wonders of lex and yacc!
I try to spend as little time as possible looking at the lex rules, so
I'm just guessing here. Anyhow, you might start by looking at this
snippet in zconf.l:
. {
unput(yytext[0]);
BEGIN(COMMAND);
}
<COMMAND>{
{n}+ {
[...]
}
.
\n {
BEGIN(INITIAL);
current_file->lineno++;
return T_EOL;
}
}
Which perhaps translates to:
- ignore unknown stuff for now and go in COMMAND state;
- do something if we encounter some text ({n} = [A-Za-z0-9_]);
- go in INITIAL state if we encounter newlines or unknown stuff.
At the end of which we're back where we started before encountering
the'+'. But there are more references to '.' in the lex rules so it's
probably more complicated.
Hope this helps,
Paul Bolle
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Kconfig: '+config' valid syntax? Paul Bolle <pebolle@tiscali.nl> - 2015-07-02 11:10 +0200
Re: Kconfig: '+config' valid syntax? Paul Bolle <pebolle@tiscali.nl> - 2015-07-02 11:30 +0200
Re: Kconfig: '+config' valid syntax? Andreas Ruprecht <andreas.ruprecht@fau.de> - 2015-07-03 11:30 +0200
Re: Kconfig: '+config' valid syntax? Ulf Magnusson <ulfalizer.lkml@gmail.com> - 2015-07-03 12:50 +0200
Re: Kconfig: '+config' valid syntax? Valentin Rothberg <valentinrothberg@gmail.com> - 2015-07-03 13:00 +0200
Re: Kconfig: '+config' valid syntax? Stefan Hengelein <stefan.hengelein@fau.de> - 2015-07-03 13:00 +0200
Re: Kconfig: '+config' valid syntax? Paul Bolle <pebolle@tiscali.nl> - 2015-07-03 13:10 +0200
Re: Kconfig: '+config' valid syntax? Paul Bolle <pebolle@tiscali.nl> - 2015-07-03 13:00 +0200
csiph-web