public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Yonghong Zhu <yonghong.zhu@intel.com>
To: edk2-devel@lists.01.org
Cc: Liming Gao <liming.gao@intel.com>,
	Michael Kinney <michael.d.kinney@intel.com>,
	Kevin W Shaw <kevin.w.shaw@intel.com>
Subject: [Patch] Build spec: correct the Operator used in the expression for Table 12
Date: Fri,  7 Sep 2018 15:56:13 +0800	[thread overview]
Message-ID: <1536306973-22076-1-git-send-email-yonghong.zhu@intel.com> (raw)

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



             reply	other threads:[~2018-09-07  7:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-07  7:56 Yonghong Zhu [this message]
2018-09-12  5:42 ` [Patch] Build spec: correct the Operator used in the expression for Table 12 Gao, Liming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1536306973-22076-1-git-send-email-yonghong.zhu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox