Support EFI_IFR_NUMERIC_SIZE_x flags definition
authorlgao4 <lgao4@7335b38e-4728-0410-8992-fb3ffe349368>
Wed, 23 Dec 2009 02:48:57 +0000 (02:48 +0000)
committerlgao4 <lgao4@7335b38e-4728-0410-8992-fb3ffe349368>
Wed, 23 Dec 2009 02:48:57 +0000 (02:48 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1778 7335b38e-4728-0410-8992-fb3ffe349368

Source/C/VfrCompile/VfrSyntax.g

index c0bda6f..b00e866 100644 (file)
@@ -1809,7 +1809,7 @@ vfrStatementNumeric :
 \r
 vfrNumericFlags [CIfrNumeric & NObj, UINT32 LineNum] :\r
   <<\r
-     UINT8 LFlags = _GET_CURRQEST_DATATYPE();\r
+     UINT8 LFlags = _GET_CURRQEST_DATATYPE() & EFI_IFR_NUMERIC_SIZE;\r
      UINT8 HFlags = 0;\r
   >>\r
   numericFlagsField[HFlags, LFlags] ( "\|" numericFlagsField[HFlags, LFlags] )*\r
@@ -1818,9 +1818,13 @@ vfrNumericFlags [CIfrNumeric & NObj, UINT32 LineNum] :
 \r
 numericFlagsField [UINT8 & HFlags, UINT8 & LFlags] :\r
     N:Number                                           << _PCATCH(_STOU8(N->getText()) == 0 ? VFR_RETURN_SUCCESS : VFR_RETURN_UNSUPPORTED, N->getLine()); >>\r
-  | "DISPLAY_INT_DEC"                                  << $LFlags |= 0x00; >>\r
-  | "DISPLAY_UINT_DEC"                                 << $LFlags |= 0x10; >>\r
-  | "DISPLAY_UINT_HEX"                                 << $LFlags |= 0x20; >>\r
+  | "NUMERIC_SIZE_1"                                   << $LFlags = ($LFlags & ~EFI_IFR_NUMERIC_SIZE) | EFI_IFR_NUMERIC_SIZE_1; >>\r
+  | "NUMERIC_SIZE_2"                                   << $LFlags = ($LFlags & ~EFI_IFR_NUMERIC_SIZE) | EFI_IFR_NUMERIC_SIZE_2; >>\r
+  | "NUMERIC_SIZE_4"                                   << $LFlags = ($LFlags & ~EFI_IFR_NUMERIC_SIZE) | EFI_IFR_NUMERIC_SIZE_4; >>\r
+  | "NUMERIC_SIZE_8"                                   << $LFlags = ($LFlags & ~EFI_IFR_NUMERIC_SIZE) | EFI_IFR_NUMERIC_SIZE_8; >>\r
+  | "DISPLAY_INT_DEC"                                  << $LFlags = ($LFlags & ~EFI_IFR_DISPLAY) | EFI_IFR_DISPLAY_INT_DEC; >>\r
+  | "DISPLAY_UINT_DEC"                                 << $LFlags = ($LFlags & ~EFI_IFR_DISPLAY) | EFI_IFR_DISPLAY_UINT_DEC; >>\r
+  | "DISPLAY_UINT_HEX"                                 << $LFlags = ($LFlags & ~EFI_IFR_DISPLAY) | EFI_IFR_DISPLAY_UINT_HEX; >>\r
   | questionheaderFlagsField[HFlags]\r
   ;\r
 \r