Add the end label for the framework VFR file.
authorlgao4 <lgao4@7335b38e-4728-0410-8992-fb3ffe349368>
Mon, 20 Apr 2009 08:10:38 +0000 (08:10 +0000)
committerlgao4 <lgao4@7335b38e-4728-0410-8992-fb3ffe349368>
Mon, 20 Apr 2009 08:10:38 +0000 (08:10 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1552 7335b38e-4728-0410-8992-fb3ffe349368

Source/C/VfrCompile/VfrSyntax.g

index 0ba4586..1afa3cc 100644 (file)
@@ -1035,9 +1035,15 @@ vfrFormDefinition :
                                                         //\r
                                                         // Add Label for Framework Vfr\r
                                                         //\r
-                                                        CIfrLabel LObj;\r
-                                                        LObj.SetLineNo(E->getLine());\r
-                                                        LObj.SetNumber (0x0);  //add dummy label for UEFI, label number hardcode 0x0\r
+                                                        CIfrLabel LObj1;\r
+                                                        LObj1.SetLineNo(E->getLine());\r
+                                                        LObj1.SetNumber (0xffff);  //add end label for UEFI, label number hardcode 0xffff\r
+                                                        CIfrLabel LObj2;\r
+                                                        LObj2.SetLineNo(E->getLine());\r
+                                                        LObj2.SetNumber (0x0);     //add dummy label for UEFI, label number hardcode 0x0\r
+                                                        CIfrLabel LObj3;\r
+                                                        LObj3.SetLineNo(E->getLine());\r
+                                                        LObj3.SetNumber (0xffff);  //add end label for UEFI, label number hardcode 0xffff\r
                                                         //\r
                                                         // Declare undefined Question\r
                                                         //\r
@@ -2227,9 +2233,23 @@ oneofoptionFlagsField [UINT8 & HFlags, UINT8 & LFlags] :
   ;\r
 \r
 vfrStatementLabel :\r
-  << CIfrLabel LObj; >>\r
-  L:Label                                              << LObj.SetLineNo(L->getLine()); >>\r
-  N:Number                                             << LObj.SetNumber (_STOU16(N->getText())); >>\r
+  L:Label\r
+  N:Number                                             <<\r
+                                                          if (mCompatibleMode) {\r
+                                                            //\r
+                                                            // Add end Label for Framework Vfr\r
+                                                            //\r
+                                                            CIfrLabel LObj1;\r
+                                                            LObj1.SetLineNo(L->getLine());\r
+                                                            LObj1.SetNumber (0xffff);  //add end label for UEFI, label number hardcode 0xffff\r
+                                                          }\r
+\r
+                                                          {\r
+                                                            CIfrLabel LObj2;\r
+                                                            LObj2.SetLineNo(L->getLine());\r
+                                                            LObj2.SetNumber (_STOU16(N->getText()));\r
+                                                          }\r
+                                                       >>\r
   ";"\r
   ;\r
 \r