From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 984BF21124AF7 for ; Fri, 7 Sep 2018 00:57:04 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Sep 2018 00:57:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,341,1531810800"; d="scan'208";a="83854073" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by fmsmga002.fm.intel.com with ESMTP; 07 Sep 2018 00:56:15 -0700 From: Yonghong Zhu To: edk2-devel@lists.01.org Cc: Liming Gao , Michael Kinney , Kevin W Shaw Date: Fri, 7 Sep 2018 15:56:13 +0800 Message-Id: <1536306973-22076-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [Patch] Build spec: correct the Operator used in the expression for Table 12 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Sep 2018 07:57:04 -0000 Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=598 Cc: Liming Gao Cc: Michael Kinney Cc: Kevin W Shaw Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- .../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`, || | Number, Boolean | | Lowest | -| `and`, `AND`, `&&` | Number, Boolean | | | -| | | 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`, || | Number, Boolean | | | +| `XOR`, `xor` | Number, Boolean | | | +| `and`, `AND`, `&&` | Number, Boolean | | | +| | | 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 `` 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