public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] Build spec: correct the Operator used in the expression for Table 12
@ 2018-09-07  7:56 Yonghong Zhu
  2018-09-12  5:42 ` Gao, Liming
  0 siblings, 1 reply; 2+ messages in thread
From: Yonghong Zhu @ 2018-09-07  7:56 UTC (permalink / raw)
  To: edk2-devel; +Cc: Liming Gao, Michael Kinney, Kevin W Shaw

Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=598
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Kevin W Shaw <kevin.w.shaw@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
---
 .../82_auto-generation_process.md                  | 34 +++++++++++-----------
 README.md                                          |  1 +
 2 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/8_pre-build_autogen_stage/82_auto-generation_process.md b/8_pre-build_autogen_stage/82_auto-generation_process.md
index 6ce1710..9b61e0d 100644
--- a/8_pre-build_autogen_stage/82_auto-generation_process.md
+++ b/8_pre-build_autogen_stage/82_auto-generation_process.md
@@ -657,15 +657,11 @@ Refer to the DSC and FDF file form specifications "_Conditional Directive
 Blocks_" section for additional details of how directives must be processed.
 
 #### 8.2.4.6 Expressions
 
 Expressions can be used in conditional directive comparison statements and in
-value fields for PCDs in the DSC and FDF files.
-
-**********
-**Note:** Expressions are not supported in the INF and DEC files.
-**********
+value fields for PCDs in the meta-data files.
 
 Expressions follow C relation, equality, logical and bitwise precedence and
 associativity. Not all C operators are supported, only operators in the
 following list can be used.
 
@@ -681,22 +677,26 @@ Use of parenthesis is encouraged to remove ambiguity.
 Additional scripting style operators may be used in place of C operators as
 shown in the table below.
 
 ###### Table 12 Operator Precedence and Supported Operands
 
-| Operator                                     | Use with Data Types   | Notes                                                                                                                                                                                                                         | Priority |
-| -------------------------------------------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
-| `or`, `OR`, <code>&#124;&#124;</code>        | Number, Boolean       |                                                                                                                                                                                                                               | Lowest   |
-| `and`, `AND`, `&&`                           | Number, Boolean       |                                                                                                                                                                                                                               |          |
-| <code>&#124;</code>                          | Number, Boolean       | Bitwise OR                                                                                                                                                                                                                    |          |
-| `^`, `xor`, `XOR`                            | Number, Boolean       | Exclusive OR                                                                                                                                                                                                                  |          |
-| `&`                                          | Number, Boolean       | Bitwise AND                                                                                                                                                                                                                   |          |
-| `==`, `!=`, `EQ`, `NE`, `IN`                 | All                   | The IN operator can only be used to test a quoted unary literal string for membership in a list.                                                                                                                              |          |
-|                                              |                       | Space characters must be used before and after the letter operators Strings compared to boolean or numeric values using "==" or "EQ" will always return FALSE, while using the "!=" or "NE" operators will always return TRUE |          |
-| `<=`, `>=`, `<`, `>`, `LE`, `GE`, `LT`, `GT` | All                   | Space characters must be used before and after the letter operators.                                                                                                                                                          |          |
-| `+`, `-`                                     | Number, Boolean       | Cannot be used with strings - the system does not automatically do concatenation. Tools should report a warning message if these operators are used with both a boolean and number value                                      |          |
-| `!`, `not`, `NOT`                            | Number, Boolean       |                                                                                                                                                                                                                               | Highest  |
+| Operator                                     | Use with Data Types | Notes                                                                                                                                                     | Priority |
+| -------------------------------------------- | ------------------- | -------------------------------------------------------------------------       ------------------------------------------------------------------------- | -------- |
+| `? :`                                        | All                 | Conditional operator                                                                                                                                      |  Lowest  |
+| `or`, `OR`, <code>&#124;&#124;</code>        | Number, Boolean     |                                                                                                                                                           |          |
+| `XOR`, `xor`                                 | Number, Boolean     |                                                                                                                                                           |          |
+| `and`, `AND`, `&&`                           | Number, Boolean     |                                                                                                                                                           |          |
+| <code>&#124;</code>                          | Number, Boolean     | Bitwise OR                                                                                                                                                |          |
+| `^`                                          | Number, Boolean     | Bitwise XOR                                                                                                                                               |          |
+| `&`                                          | Number, Boolean     | Bitwise AND                                                                                                                                               |          |
+| `==`, `!=`, `EQ`, `NE`, `IN`                 | All                 | The IN operator can only be used to test a quoted unary literal string for membership in a list.                                                          |          |
+|                                              |                     | Strings compared to boolean or numeric values using "==" or "EQ" will always return FALSE, while using the "!=" or "NE" operators will always return TRUE |          |
+| `<=`, `>=`, `<`, `>`, `LE`, `GE`, `LT`, `GT` | All                 |                                                                                                                                                           |          |
+| `<<`, `>>`                                   | Number, Boolean     |                                                                                                                                                           |          |
+| `+`, `-`                                     | Number, Boolean     | Cannot be used with strings - the system does not automatically do concatenation.                                                                         |          |
+| `*`, `/`, `%`                                | Number, Boolean     | Cannot be used with strings                                                                                                                               |          |
+| `!`, `not`, `NOT`, `~`                       | Number, Boolean     |                                                                                                                                                           |  Highest |
 
 The `IN` operator can only be used to test a literal string against elements
 in the following global variables:
 
 **_$(FAMILY)_**
diff --git a/README.md b/README.md
index a370537..637a4a4 100644
--- a/README.md
+++ b/README.md
@@ -226,5 +226,6 @@ Copyright (c) 2008-2017, Intel Corporation. All rights reserved.
 |            | Clarify structure PCD field value assignment precedence                                                                                                                                                                                                                                                                                                             |               |
 |            | Update description for build handles PCDs for SKU support                                                                                                                                                                                                                                                                                                           |               |
 |            | Add statement about module scoped `<Pcd*>` section override scope                                                                                                                                                                                                                                                                                                   |               |
 |            | Add !error statement section                                                                                                                                                                                                                                                                                                                                        |               |
 |            | [#1110](https://bugzilla.tianocore.org/show_bug.cgi?id=1110) Extend exclamation statement's keyword to case-insensitive                                                                                                                                                                                                                                             |               |
+|            | [#598](https://bugzilla.tianocore.org/show_bug.cgi?id=598) update supported operators in 8.2.4.6 Expressions                                                                                                                                                                                                                                                        |               |
-- 
2.6.1.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Patch] Build spec: correct the Operator used in the expression for Table 12
  2018-09-07  7:56 [Patch] Build spec: correct the Operator used in the expression for Table 12 Yonghong Zhu
@ 2018-09-12  5:42 ` Gao, Liming
  0 siblings, 0 replies; 2+ messages in thread
From: Gao, Liming @ 2018-09-12  5:42 UTC (permalink / raw)
  To: Zhu, Yonghong, edk2-devel@lists.01.org; +Cc: Kinney, Michael D, Shaw, Kevin W

Reviewed-by: Liming Gao <liming.gao@intel.com>

>-----Original Message-----
>From: Zhu, Yonghong
>Sent: Friday, September 07, 2018 3:56 PM
>To: edk2-devel@lists.01.org
>Cc: Gao, Liming <liming.gao@intel.com>; Kinney, Michael D
><michael.d.kinney@intel.com>; Shaw, Kevin W <kevin.w.shaw@intel.com>
>Subject: [Patch] Build spec: correct the Operator used in the expression for
>Table 12
>
>Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=598
>Cc: Liming Gao <liming.gao@intel.com>
>Cc: Michael Kinney <michael.d.kinney@intel.com>
>Cc: Kevin W Shaw <kevin.w.shaw@intel.com>
>Contributed-under: TianoCore Contribution Agreement 1.1
>Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
>---
> .../82_auto-generation_process.md                  | 34 +++++++++++-----------
> README.md                                          |  1 +
> 2 files changed, 18 insertions(+), 17 deletions(-)
>
>diff --git a/8_pre-build_autogen_stage/82_auto-generation_process.md
>b/8_pre-build_autogen_stage/82_auto-generation_process.md
>index 6ce1710..9b61e0d 100644
>--- a/8_pre-build_autogen_stage/82_auto-generation_process.md
>+++ b/8_pre-build_autogen_stage/82_auto-generation_process.md
>@@ -657,15 +657,11 @@ Refer to the DSC and FDF file form specifications
>"_Conditional Directive
> Blocks_" section for additional details of how directives must be processed.
>
> #### 8.2.4.6 Expressions
>
> Expressions can be used in conditional directive comparison statements and
>in
>-value fields for PCDs in the DSC and FDF files.
>-
>-**********
>-**Note:** Expressions are not supported in the INF and DEC files.
>-**********
>+value fields for PCDs in the meta-data files.
>
> Expressions follow C relation, equality, logical and bitwise precedence and
> associativity. Not all C operators are supported, only operators in the
> following list can be used.
>
>@@ -681,22 +677,26 @@ Use of parenthesis is encouraged to remove
>ambiguity.
> Additional scripting style operators may be used in place of C operators as
> shown in the table below.
>
> ###### Table 12 Operator Precedence and Supported Operands
>
>-| Operator                                     | Use with Data Types   | Notes
>| Priority |
>-| -------------------------------------------- | --------------------- | ----------------------
>-----------------------------------------------------------------------------------------------
>-----------------------------------------------------------------------------------------------
>--------- | -------- |
>-| `or`, `OR`, <code>&#124;&#124;</code>        | Number, Boolean       |
>| Lowest   |
>-| `and`, `AND`, `&&`                           | Number, Boolean       |
>|          |
>-| <code>&#124;</code>                          | Number, Boolean       | Bitwise OR
>|          |
>-| `^`, `xor`, `XOR`                            | Number, Boolean       | Exclusive OR
>|          |
>-| `&`                                          | Number, Boolean       | Bitwise AND
>|          |
>-| `==`, `!=`, `EQ`, `NE`, `IN`                 | All                   | The IN operator can only be
>used to test a quoted unary literal string for membership in a list.
>|          |
>-|                                              |                       | Space characters must be used before
>and after the letter operators Strings compared to boolean or numeric values
>using "==" or "EQ" will always return FALSE, while using the "!=" or "NE"
>operators will always return TRUE |          |
>-| `<=`, `>=`, `<`, `>`, `LE`, `GE`, `LT`, `GT` | All                   | Space characters must
>be used before and after the letter operators.
>|          |
>-| `+`, `-`                                     | Number, Boolean       | Cannot be used with
>strings - the system does not automatically do concatenation. Tools should
>report a warning message if these operators are used with both a boolean
>and number value                                      |          |
>-| `!`, `not`, `NOT`                            | Number, Boolean       |
>| Highest  |
>+| Operator                                     | Use with Data Types | Notes
>| Priority |
>+| -------------------------------------------- | ------------------- | -----------------------
>--------------------------------------------------       -----------------------------------------
>-------------------------------- | -------- |
>+| `? :`                                        | All                 | Conditional operator
>|  Lowest  |
>+| `or`, `OR`, <code>&#124;&#124;</code>        | Number, Boolean     |
>|          |
>+| `XOR`, `xor`                                 | Number, Boolean     |
>|          |
>+| `and`, `AND`, `&&`                           | Number, Boolean     |
>|          |
>+| <code>&#124;</code>                          | Number, Boolean     | Bitwise OR
>|          |
>+| `^`                                          | Number, Boolean     | Bitwise XOR
>|          |
>+| `&`                                          | Number, Boolean     | Bitwise AND
>|          |
>+| `==`, `!=`, `EQ`, `NE`, `IN`                 | All                 | The IN operator can only be
>used to test a quoted unary literal string for membership in a list.
>|          |
>+|                                              |                     | Strings compared to boolean or
>numeric values using "==" or "EQ" will always return FALSE, while using the
>"!=" or "NE" operators will always return TRUE |          |
>+| `<=`, `>=`, `<`, `>`, `LE`, `GE`, `LT`, `GT` | All                 |
>|          |
>+| `<<`, `>>`                                   | Number, Boolean     |
>|          |
>+| `+`, `-`                                     | Number, Boolean     | Cannot be used with
>strings - the system does not automatically do concatenation.
>|          |
>+| `*`, `/`, `%`                                | Number, Boolean     | Cannot be used with
>strings                                                                                                                               |          |
>+| `!`, `not`, `NOT`, `~`                       | Number, Boolean     |
>|  Highest |
>
> The `IN` operator can only be used to test a literal string against elements
> in the following global variables:
>
> **_$(FAMILY)_**
>diff --git a/README.md b/README.md
>index a370537..637a4a4 100644
>--- a/README.md
>+++ b/README.md
>@@ -226,5 +226,6 @@ Copyright (c) 2008-2017, Intel Corporation. All rights
>reserved.
> |            | Clarify structure PCD field value assignment precedence
>|               |
> |            | Update description for build handles PCDs for SKU support
>|               |
> |            | Add statement about module scoped `<Pcd*>` section override
>scope
>|               |
> |            | Add !error statement section
>|               |
> |            | [#1110](https://bugzilla.tianocore.org/show_bug.cgi?id=1110)
>Extend exclamation statement's keyword to case-insensitive
>|               |
>+|            | [#598](https://bugzilla.tianocore.org/show_bug.cgi?id=598) update
>supported operators in 8.2.4.6 Expressions
>|               |
>--
>2.6.1.windows.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-12  5:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-07  7:56 [Patch] Build spec: correct the Operator used in the expression for Table 12 Yonghong Zhu
2018-09-12  5:42 ` Gao, Liming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox