| Age | Commit message (Collapse) | Author |
|
|
|
|
|
Bit silly to use separate variables for trivial fields.
|
|
(It was never required if you explicitly passed a 'base_dir', but it's a
bit silly to have to do that too.)
This is a bug. I expected os.path.expandvars() to replace references
non-set environment variables with nothing, but it leaves them as is.
Work around it by letting base_dir = None be special and the default. It
uses $srctree if set and the current directory otherwise. This has the
following advantages:
- It avoids having to reimplement a different version of
os.path.expandvars() and special-casing "" to mean the current
directory.
- It means '$' can appear in paths. (Though it probably never will.)
Maybe the expansion behavior could be removed too, but keep it for now
to be backwards compatible.
|
|
This is the only way it's used. Maybe it ought to be removed completely.
|
|
|
|
Minor bug due to an early return from load_config(). Piggyback a
refactoring of the code. Reading the header is unlikely to be
performance-sensitive.
Add a testcase too.
|
|
|
|
|
|
|
|
Just noticed that the C implementation does. Haven't run into it in the
wild.
For example, the assignment to B below is ignored:
CONFIG_A=y
CONFIG_B=y
|
|
Faster without sacrificing readability.
|
|
Each expression in the loop is relatively expensive at this point too.
|
|
|
|
|
|
In preparation for some changes.
|
|
|
|
All symbols get a 'dep', so it's pointless to do it afterwards.
|
|
|
|
For consistency.
|
|
|
|
Also fix a tokenizer nit: a '!' at the end of a line can be tokenized
(though it's meaningless).
|
|
Bit neater, and Python 3-friendly.
|
|
|
|
|
|
|
|
Semi-pointless in _parse_block(). Often not even used.
|
|
Also add named choices defined in multiple locations to the block at
each location. Not sure why I only added them at the first location
before, as symbols don't work that way.
I still doubt named choices defined in multiple locations will ever be
used.
|
|
Redundant.
|
|
Consistent with 'user_val'.
|
|
|
|
|
|
_Block turned simple enough that it became pointless.
|
|
The entire _Block class is probably up next.
|
|
The menu must be added to self.menus before parsing its contents, so
that it comes before any contained menus. Make the comment and menu
cases consistent by rearranging the comment case instead.
|
|
Ops... this breaks menu ordering.
|
|
|
|
Sorry if this has bit anyone!
|
|
|
|
|
|
Small tokenizer optimization, similar to the regex optimizations.
|
|
strip() instead of lstrip() makes the loop terminate earlier, saving
lots of calls. Shaves a few % of parsing the x86 Kconfigs.
|
|
Pre-bump 'i' and let it be the index of the "next" character instead.
|
|
c.eval("&") would cause a hang before for example.
|
|
strip() the faulty line (seeing that whitespace probably isn't helpful),
remove an assert that probably isn't useful in practice, and simplify
the code.
|
|
- The caret was always set to the end of the string in the current
version, which is pointless.
- Part of the error string was output manually, and part of it was part
of the exception message. Ugly oversight.
|
|
|
|
I must have missed that expandtabs() already takes the context of tabs
into account the first time around.
Also remove error check that probably won't be useful.
|
|
Use the fact that startswith() can check multiple prefixes.
|
|
Will also strip many '/'s, which makes sense here.
|