1. Support SuppressIf form usage.
authorlgao4 <lgao4@7335b38e-4728-0410-8992-fb3ffe349368>
Wed, 11 Nov 2009 05:33:35 +0000 (05:33 +0000)
committerlgao4 <lgao4@7335b38e-4728-0410-8992-fb3ffe349368>
Wed, 11 Nov 2009 05:33:35 +0000 (05:33 +0000)
2. Support DisableIf question and question tag with the dynamic question value.

git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1743 7335b38e-4728-0410-8992-fb3ffe349368

Source/C/VfrCompile/VfrSyntax.g

index ea529a5..bb231ee 100644 (file)
@@ -547,7 +547,8 @@ vfrFormSetList :
     vfrStatementVarStoreEfi       |\r
     vfrStatementVarStoreNameValue |\r
     vfrStatementDefaultStore      |\r
-    vfrStatementDisableIfFormSet\r
+    vfrStatementDisableIfFormSet  |\r
+    vfrStatementSuppressIfFormSet\r
   )*\r
   ;\r
 \r
@@ -720,6 +721,21 @@ vfrStatementDisableIfFormSet :
   ";"\r
   ;\r
 \r
+vfrStatementSuppressIfFormSet :\r
+  << CIfrSuppressIf SIObj;>>\r
+  L:SuppressIf                                         <<\r
+                                                           if (mCompatibleMode) {\r
+                                                             _PCATCH (VFR_RETURN_UNSUPPORTED, L);\r
+                                                           }\r
+                                                           SIObj.SetLineNo(L->getLine()); \r
+                                                       >>\r
+  { FLAGS "=" flagsField ( "\|" flagsField )* "," }\r
+  vfrStatementExpression[0] ";"\r
+  vfrFormSetList\r
+  E: EndIf \r
+  ";"                                                  << CRT_END_OP (E); >>\r
+  ;\r
+\r
 //*****************************************************************************\r
 //\r
 // the syntax of question header and statement header\r
@@ -2080,10 +2096,9 @@ vfrStatementStatListOld :
 vfrStatementDisableIfStat :\r
   << \r
     CIfrDisableIf DIObj; \r
-    mConstantOnlyInExpression = TRUE;\r
   >>\r
   L:DisableIf                                          << DIObj.SetLineNo(L->getLine()); >>\r
-  vfrStatementExpression[0] ";"                        << mConstantOnlyInExpression = FALSE; >>\r
+  vfrStatementExpression[0] ";" \r
   ( vfrStatementStatList )*\r
   E:EndIf                                              << CRT_END_OP (E); >>\r
   ";"\r
@@ -2227,10 +2242,9 @@ vfrStatementNoSubmitIf :
 vfrStatementDisableIfQuest :\r
   << \r
     CIfrDisableIf DIObj; \r
-    mConstantOnlyInExpression = TRUE;\r
   >>\r
   L:DisableIf                                          << DIObj.SetLineNo(L->getLine()); >>\r
-  vfrStatementExpression[0] ";"                        << mConstantOnlyInExpression = FALSE; >>\r
+  vfrStatementExpression[0] ";"\r
   vfrStatementQuestionOptionList\r
   E:EndIf                                              << CRT_END_OP (E); >>\r
   ;\r