make line alignment.
authorlgao4 <lgao4@7335b38e-4728-0410-8992-fb3ffe349368>
Mon, 24 Nov 2008 05:18:38 +0000 (05:18 +0000)
committerlgao4 <lgao4@7335b38e-4728-0410-8992-fb3ffe349368>
Mon, 24 Nov 2008 05:18:38 +0000 (05:18 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1371 7335b38e-4728-0410-8992-fb3ffe349368

Source/C/VfrCompile/VfrSyntax.g

index da30a05..12083dc 100644 (file)
@@ -321,13 +321,13 @@ vfrDataStructDefinition :
 vfrDataStructFields :\r
   (\r
      dataStructField64     |\r
-   dataStructField32     |\r
-   dataStructField16     |\r
-   dataStructField8      |\r
+     dataStructField32     |\r
+     dataStructField16     |\r
+     dataStructField8      |\r
      dataStructFieldBool   |\r
-   dataStructFieldString |\r
-   dataStructFieldDate   |\r
-   dataStructFieldTime   |\r
+     dataStructFieldString |\r
+     dataStructFieldDate   |\r
+     dataStructFieldTime   |\r
      dataStructFieldUser\r
   )*\r
   ;\r
@@ -429,14 +429,14 @@ dataStructFieldUser :
 guidSubDefinition [EFI_GUID &Guid] :\r
   G4:Number "," G5:Number "," G6:Number "," G7:Number "," G8:Number "," G9:Number "," G10:Number "," G11:Number\r
                                                     <<\r
-                             Guid.Data4[0] = _STOU8(G4->getText());\r
-                             Guid.Data4[1] = _STOU8(G5->getText());\r
-                             Guid.Data4[2] = _STOU8(G6->getText());\r
-                             Guid.Data4[3] = _STOU8(G7->getText());\r
-                             Guid.Data4[4] = _STOU8(G8->getText());\r
-                             Guid.Data4[5] = _STOU8(G9->getText());\r
-                             Guid.Data4[6] = _STOU8(G10->getText());\r
-                             Guid.Data4[7] = _STOU8(G11->getText());\r
+                                                       Guid.Data4[0] = _STOU8(G4->getText());\r
+                                                       Guid.Data4[1] = _STOU8(G5->getText());\r
+                                                       Guid.Data4[2] = _STOU8(G6->getText());\r
+                                                       Guid.Data4[3] = _STOU8(G7->getText());\r
+                                                       Guid.Data4[4] = _STOU8(G8->getText());\r
+                                                       Guid.Data4[5] = _STOU8(G9->getText());\r
+                                                       Guid.Data4[6] = _STOU8(G10->getText());\r
+                                                       Guid.Data4[7] = _STOU8(G11->getText());\r
                                                     >>\r
   ;\r
 \r
@@ -522,12 +522,12 @@ vfrStatementDefaultStore :
                                                        if (mCVfrDefaultStore.DefaultIdRegistered (DefaultId) == FALSE) {\r
                                                          CIfrDefaultStore DSObj;\r
                                                          _PCATCH(mCVfrDefaultStore.RegisterDefaultStore (DSObj.GetObjBinAddr(), N->getText(), _STOSID(S->getText()), DefaultId)), D->getLine();\r
-                             DSObj.SetLineNo(D->getLine());\r
+                                                         DSObj.SetLineNo(D->getLine());\r
                                                          DSObj.SetDefaultName (_STOSID(S->getText()));\r
                                                          DSObj.SetDefaultId (DefaultId);\r
-                             } else {\r
+                                                       } else {\r
                                                          _PCATCH(mCVfrDefaultStore.ReRegisterDefaultStoreById (DefaultId, N->getText(), _STOSID(S->getText()))), D->getLine();\r
-                             }\r
+                                                       }\r
                                                     >>\r
   ";"\r
   ;\r
@@ -545,18 +545,18 @@ vfrStatementVarStoreLinear :
   V:Varstore                                        << VSObj.SetLineNo(V->getLine()); >>\r
   (\r
       TN:StringIdentifier ","                       << TypeName = TN->getText(); LineNum = TN->getLine(); >>\r
-  | U8:"UINT8" ","                                << TypeName = "UINT8"; LineNum = U8->getLine(); >>\r
-  | U16:"UINT16" ","                              << TypeName = "UINT16"; LineNum = U16->getLine(); >>\r
-  | U32:"UINT32" ","                              << TypeName = "UINT32"; LineNum = U32->getLine(); >>\r
-  | U64:"UINT64" ","                              << TypeName = "UINT64"; LineNum = U64->getLine(); >>\r
-  | D:"EFI_HII_DATE" ","                          << TypeName = "EFI_HII_DATE"; LineNum = D->getLine(); >>\r
-  | T:"EFI_HII_TIME" ","                          << TypeName = "EFI_HII_TIME"; LineNum = T->getLine(); >>\r
+    | U8:"UINT8" ","                                << TypeName = "UINT8"; LineNum = U8->getLine(); >>\r
+    | U16:"UINT16" ","                              << TypeName = "UINT16"; LineNum = U16->getLine(); >>\r
+    | U32:"UINT32" ","                              << TypeName = "UINT32"; LineNum = U32->getLine(); >>\r
+    | U64:"UINT64" ","                              << TypeName = "UINT64"; LineNum = U64->getLine(); >>\r
+    | D:"EFI_HII_DATE" ","                          << TypeName = "EFI_HII_DATE"; LineNum = D->getLine(); >>\r
+    | T:"EFI_HII_TIME" ","                          << TypeName = "EFI_HII_TIME"; LineNum = T->getLine(); >>\r
   )\r
-  { Key "=" FID:Number ","                       << // Key is used to assign Varid in Framework VFR but no use in UEFI2.1 VFR\r
-                                                     if (mCompatibleMode) {\r
-                                                       VarStoreId = _STOU16(FID->getText());\r
-                                                     }\r
-                                                  >>\r
+  { Key "=" FID:Number ","                          << // Key is used to assign Varid in Framework VFR but no use in UEFI2.1 VFR\r
+                                                       if (mCompatibleMode) {\r
+                                                         VarStoreId = _STOU16(FID->getText());\r
+                                                       }\r
+                                                    >>\r
   }\r
   {\r
     VarId "=" ID:Number ","                         <<\r
@@ -715,26 +715,26 @@ vfrQuestionHeader[CIfrQuestionHeader & QHObj, EFI_QUESION_TYPE QType = QUESTION_
                                                        case QUESTION_NORMAL:\r
                                                          mCVfrQuestionDB.RegisterQuestion (QName, VarIdStr, QId);\r
                                                          break;\r
-                             case QUESTION_DATE:\r
-                             mCVfrQuestionDB.RegisterNewDateQuestion (QName, VarIdStr, QId);\r
-                             break;\r
-                             case QUESTION_TIME:\r
-                             mCVfrQuestionDB.RegisterNewTimeQuestion (QName, VarIdStr, QId);\r
-                             break;\r
-                             default:\r
-                             _PCATCH(VFR_RETURN_FATAL_ERROR);\r
-                             }\r
+                                                       case QUESTION_DATE:\r
+                                                       mCVfrQuestionDB.RegisterNewDateQuestion (QName, VarIdStr, QId);\r
+                                                       break;\r
+                                                       case QUESTION_TIME:\r
+                                                       mCVfrQuestionDB.RegisterNewTimeQuestion (QName, VarIdStr, QId);\r
+                                                       break;\r
+                                                       default:\r
+                                                       _PCATCH(VFR_RETURN_FATAL_ERROR);\r
+                                                       }\r
                                                        $QHObj.SetQuestionId (QId);\r
                                                        $QHObj.SetVarStoreInfo (&Info);\r
                                                     >>\r
   vfrStatementHeader[&$QHObj]\r
                                                     << _SAVE_CURRQEST_VARINFO (Info); >>\r
-                          << if (VarIdStr != NULL) delete VarIdStr; >>\r
+                                                    << if (VarIdStr != NULL) delete VarIdStr; >>\r
   ;\r
 \r
 vfrQuestionHeaderWithNoStorage[CIfrQuestionHeader *QHObj] :\r
   <<\r
-   EFI_QUESTION_ID   QId = EFI_QUESTION_ID_INVALID;\r
+     EFI_QUESTION_ID   QId = EFI_QUESTION_ID_INVALID;\r
      CHAR8             *QName = NULL;\r
   >>\r
   {\r
@@ -1054,7 +1054,7 @@ vfrStatementDefault :
                                                                    D->getLine()\r
                                                                    );\r
                                                        }\r
-                          >>\r
+                                                    >>\r
   )\r
   ;\r
 \r
@@ -1397,7 +1397,7 @@ vfrStatementCheckBox :
                                                               "No manufacturing default storage found"\r
                                                               );\r
                                                           }\r
-                                                         >>\r
+                                                        >>\r
   }\r
   {\r
     Key "=" KN:Number  ","                             << AssignQuestionKey (CBObj, KN); >>\r
@@ -1526,7 +1526,7 @@ vfrStatementDate :
                                                           DObj.SetHelp (_STOSID(YH->getText()));\r
                                                           if (VarIdStr[0] != NULL) { delete VarIdStr[0]; } if (VarIdStr[1] != NULL) { delete VarIdStr[1]; } if (VarIdStr[2] != NULL) { delete VarIdStr[2]; }\r
                                                        >>\r
-                                                     << {CIfrDefault DefaultObj(EFI_HII_DEFAULT_CLASS_STANDARD, EFI_IFR_TYPE_DATE, Val); DefaultObj.SetLineNo(L->getLine());} >>\r
+                                                       << {CIfrDefault DefaultObj(EFI_HII_DEFAULT_CLASS_STANDARD, EFI_IFR_TYPE_DATE, Val); DefaultObj.SetLineNo(L->getLine());} >>\r
     )\r
     ( vfrStatementInconsistentIf )*\r
   )\r
@@ -1544,7 +1544,7 @@ minMaxDateStepDefault[EFI_HII_DATE & D, UINT8 KeyValue] :
                                                           case 0: D.Year  = _STOU16(N->getText()); break;\r
                                                           case 1: D.Month = _STOU8(N->getText()); break;\r
                                                           case 2: D.Day   = _STOU8(N->getText()); break;\r
-                              }\r
+                                                          }\r
                                                        >>\r
   }\r
   ;\r
@@ -1585,7 +1585,7 @@ vfrSetMinMaxStep[CIfrMinMaxStepData & MMSDObj] :
                                                           case EFI_IFR_TYPE_NUM_SIZE_16 : MinU2 = _STOU16(I->getText()); break;\r
                                                           case EFI_IFR_TYPE_NUM_SIZE_8 :  MinU1 = _STOU8(I->getText());  break;\r
                                                           }\r
-                             >>\r
+                                                       >>\r
   Maximum   "=" A:Number ","\r
                                                        <<\r
                                                           switch (_GET_CURRQEST_DATATYPE ()) {\r
@@ -1594,7 +1594,7 @@ vfrSetMinMaxStep[CIfrMinMaxStepData & MMSDObj] :
                                                           case EFI_IFR_TYPE_NUM_SIZE_16 : MaxU2 = _STOU16(A->getText()); break;\r
                                                           case EFI_IFR_TYPE_NUM_SIZE_8 :  MaxU1 = _STOU8(A->getText());  break;\r
                                                           }\r
-                             >>\r
+                                                       >>\r
   {\r
     STEP    "=" S:Number ","\r
                                                        <<\r
@@ -1604,7 +1604,7 @@ vfrSetMinMaxStep[CIfrMinMaxStepData & MMSDObj] :
                                                           case EFI_IFR_TYPE_NUM_SIZE_16 : StepU2 = _STOU16(S->getText()); break;\r
                                                           case EFI_IFR_TYPE_NUM_SIZE_8 :  StepU1 = _STOU8(S->getText());  break;\r
                                                           }\r
-                             >>\r
+                                                       >>\r
   }\r
                                                        <<\r
                                                           switch (_GET_CURRQEST_DATATYPE ()) {\r
@@ -1613,7 +1613,7 @@ vfrSetMinMaxStep[CIfrMinMaxStepData & MMSDObj] :
                                                           case EFI_IFR_TYPE_NUM_SIZE_16 : $MMSDObj.SetMinMaxStepData (MinU2, MaxU2, StepU2); break;\r
                                                           case EFI_IFR_TYPE_NUM_SIZE_8 :  $MMSDObj.SetMinMaxStepData (MinU1, MaxU1, StepU1);  break;\r
                                                           }\r
-                             >>\r
+                                                       >>\r
   ;\r
 \r
 vfrStatementNumeric :\r
@@ -1844,7 +1844,7 @@ minMaxTimeStepDefault[EFI_HII_TIME & T, UINT8 KeyValue] :
                                                           case 0: T.Hour   = _STOU8(N->getText()); break;\r
                                                           case 1: T.Minute = _STOU8(N->getText()); break;\r
                                                           case 2: T.Second = _STOU8(N->getText()); break;\r
-                              }\r
+                                                          }\r
                                                        >>\r
   }\r
   ;\r
@@ -2421,7 +2421,7 @@ castTerm [UINT32 & RootLevel, UINT32 & ExpOpCount]:
                                                            case 0: { CIfrToBoolean TBObj(L->getLine()); $ExpOpCount++; } break;\r
                                                            case 1: { CIfrToUint TUObj(L->getLine()); $ExpOpCount++; } break;\r
                                                            }\r
-                            >>\r
+                                                        >>\r
   ;\r
 \r
 atomTerm [UINT32 & RootLevel, UINT32 & ExpOpCount]:\r
@@ -2704,7 +2704,7 @@ questionref13Exp[UINT32 & RootLevel, UINT32 & ExpOpCount] :
      UINT8           Type = 0x1;\r
      EFI_STRING_ID   DevPath;\r
      EFI_GUID        Guid;\r
-   EFI_QUESTION_ID QId = EFI_QUESTION_ID_INVALID;\r
+     EFI_QUESTION_ID QId = EFI_QUESTION_ID_INVALID;\r
      UINT32          BitMask;\r
      CHAR8           *QName = NULL;\r
      UINT32          LineNo = 0;\r
@@ -3201,7 +3201,7 @@ EfiVfrParser::_STOU8 (
     //\r
     // BUG: does not handle overflow here\r
     //\r
-  (IsHex == TRUE) ? (Value <<= 4) : (Value *= 10);\r
+    (IsHex == TRUE) ? (Value <<= 4) : (Value *= 10);\r
 \r
     if ((IsHex == TRUE) && (c >= 'a') && (c <= 'f')) {\r
       Value += (c - 'a' + 10);\r
@@ -3231,7 +3231,7 @@ EfiVfrParser::_STOU16 (
     //\r
     // BUG: does not handle overflow here\r
     //\r
-  (IsHex == TRUE) ? (Value <<= 4) : (Value *= 10);\r
+    (IsHex == TRUE) ? (Value <<= 4) : (Value *= 10);\r
 \r
     if ((IsHex == TRUE) && (c >= 'a') && (c <= 'f')) {\r
       Value += (c - 'a' + 10);\r
@@ -3261,7 +3261,7 @@ EfiVfrParser::_STOU32 (
     //\r
     // BUG: does not handle overflow here\r
     //\r
-  (IsHex == TRUE) ? (Value <<= 4) : (Value *= 10);\r
+    (IsHex == TRUE) ? (Value <<= 4) : (Value *= 10);\r
 \r
     if ((IsHex == TRUE) && (c >= 'a') && (c <= 'f')) {\r
       Value += (c - 'a' + 10);\r
@@ -3291,7 +3291,7 @@ EfiVfrParser::_STOU64 (
     //\r
     // BUG: does not handle overflow here\r
     //\r
-  (IsHex == TRUE) ? (Value <<= 4) : (Value *= 10);\r
+    (IsHex == TRUE) ? (Value <<= 4) : (Value *= 10);\r
 \r
     if ((IsHex == TRUE) && (c >= 'a') && (c <= 'f')) {\r
       Value += (c - 'a' + 10);\r