summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2017-09-22 07:10:42 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2017-09-22 07:11:56 +0200
commit240add8c97403fa77b38a89961becb3476a3c359 (patch)
tree6ebdd7d57cb60ff5444f1679ef21bbd9ec91504b
parent8f81cbdcc1d35eeb419c96968d4eedbfeee42e55 (diff)
Explain the expression structure clearer
-rw-r--r--README.md3
-rw-r--r--kconfiglib.py6
2 files changed, 5 insertions, 4 deletions
diff --git a/README.md b/README.md
index 272420f..bbf3ec5 100644
--- a/README.md
+++ b/README.md
@@ -101,7 +101,8 @@ to the test suite would make sense.
* **Useful information can be extracted from internal data structures.** The
expression format is pretty simple for example: `A && B && (!C || D == 3)` is
- represented as (AND A (AND B (OR (NOT C) (EQUAL D 3)))); see the
+ represented as the tuple structure
+ `(AND, A, (AND, B, (OR, (NOT, C), (EQUAL, D, 3))))`; see the
`Config._parse_expr()` docstring).
It's hard to come up with good APIs for dealing with expressions given how
diff --git a/kconfiglib.py b/kconfiglib.py
index 8ae3360..93b2279 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -1102,9 +1102,9 @@ class Config(object):
kconfiglib.AND. If there is only one operand (i.e., no && or ||), then
the operand is returned directly. This also goes for subexpressions.
- As an example, A && B && (!C || D == 3) is represented as
- (AND A (AND B (OR (NOT C) (EQUAL D 3)))), with the Symbol objects
- stored directly in the expression.
+ As an example, A && B && (!C || D == 3) is represented as the tuple
+ structure (AND, A, (AND, B, (OR, (NOT, C), (EQUAL, D, 3)))), with the
+ Symbol objects stored directly in the expression.
feed: _Feed instance containing the tokens for the expression.