Update VfrCompiler to handle ideqvallist as the first opcode case. Per UEFI spec...
authorlgao4 <lgao4@7335b38e-4728-0410-8992-fb3ffe349368>
Tue, 21 Apr 2009 14:02:44 +0000 (14:02 +0000)
committerlgao4 <lgao4@7335b38e-4728-0410-8992-fb3ffe349368>
Tue, 21 Apr 2009 14:02:44 +0000 (14:02 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1553 7335b38e-4728-0410-8992-fb3ffe349368

Source/C/VfrCompile/VfrFormPkg.h
Source/C/VfrCompile/VfrSyntax.g

index aec2286..3f38766 100644 (file)
@@ -269,6 +269,10 @@ public:
   VOID SetScope (IN UINT8 Scope) {\r
     mHeader->Scope = Scope;\r
   }\r
+\r
+  VOID UpdateHeader (IN EFI_IFR_OP_HEADER *Header) {\r
+    mHeader = Header;\r
+  }\r
 };\r
 \r
 extern UINT8 gScopeCount;\r
@@ -1570,6 +1574,7 @@ public:
   ) {\r
     _EMIT_PENDING_OBJ();\r
     mEqIdVList = (EFI_IFR_EQ_ID_LIST *) GetObjBinAddr();\r
+    UpdateHeader (&mEqIdVList->Header);\r
   }\r
 \r
   VOID SetQuestionId (\r
index 1afa3cc..2aee307 100644 (file)
@@ -2783,7 +2783,6 @@ ideqvallistExp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
                                                           } else {\r
                                                             UINT16       Index;\r
                                                             CIfrEqIdList EILObj(L->getLine());\r
-                                                            _SAVE_OPHDR_COND (EILObj, ($ExpOpCount == 0), L->getLine());\r
                                                             if (QId != EFI_QUESTION_ID_INVALID) {\r
                                                               EILObj.SetQuestionId (QId, VarIdStr, LineNo);\r
                                                             }\r
@@ -2791,8 +2790,11 @@ ideqvallistExp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
                                                             for (Index = 0; Index < ListLen; Index++) {\r
                                                               EILObj.SetValueList (Index, ValueList[Index]);\r
                                                             }\r
+                                                            \r
+                                                            EILObj.UpdateIfrBuffer();\r
+                                                            _SAVE_OPHDR_COND (EILObj, ($ExpOpCount == 0), L->getLine());                                                            \r
+                                                            \r
                                                             if (QId == EFI_QUESTION_ID_INVALID) {\r
-                                                              EILObj.UpdateIfrBuffer();\r
                                                               EILObj.SetQuestionId (QId, VarIdStr, LineNo);\r
                                                             }\r
                                                             $ExpOpCount++;\r
@@ -3117,13 +3119,7 @@ EfiVfrParser::_SAVE_OPHDR_COND (
   )\r
 {\r
   if (Cond == TRUE) {\r
-#if 0\r
-    printf ("######_SAVE_OPHDR_COND\n");\r
-#endif\r
     if (mCIfrOpHdr != NULL) {\r
-#if 0\r
-      printf ("######_SAVE_OPHDR_COND Error\n");\r
-#endif\r
       return ;\r
     }\r
     mCIfrOpHdr       = new CIfrOpHeader(OpHdr);\r
@@ -3136,9 +3132,6 @@ EfiVfrParser::_CLEAR_SAVED_OPHDR (
   VOID\r
   )\r
 {\r
-#if 0\r
-  printf ("######_CLEAR_SAVED_OPHDR\n");\r
-#endif\r
   mCIfrOpHdr       = NULL;\r
   mCIfrOpHdrLineNo = 0;\r
 }\r
@@ -3148,9 +3141,6 @@ EfiVfrParser::_SET_SAVED_OPHDR_SCOPE (
   VOID\r
   )\r
 {\r
-#if 0\r
-  printf ("#######_SET_SAVED_OPHDR_SCOPE\n");\r
-#endif\r
   if (mCIfrOpHdr != NULL) {\r
     mCIfrOpHdr->SetScope (1);\r
     return TRUE;\r