Correct CHAR16 data type to HII UINT16 data type
authorlgao4 <lgao4@7335b38e-4728-0410-8992-fb3ffe349368>
Mon, 4 Jan 2010 02:45:22 +0000 (02:45 +0000)
committerlgao4 <lgao4@7335b38e-4728-0410-8992-fb3ffe349368>
Mon, 4 Jan 2010 02:45:22 +0000 (02:45 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1789 7335b38e-4728-0410-8992-fb3ffe349368

Source/C/VfrCompile/VfrSyntax.g

index 83eb26d..7516cd5 100644 (file)
@@ -356,18 +356,13 @@ dataStructField32 :
 dataStructField16 :\r
   << \r
     UINT32 ArrayNum = 0; \r
-    CHAR8  *TypeName = NULL;\r
   >>\r
-  (\r
-    D:"UINT16"                                      << TypeName = D->getText();>>\r
-   | \r
-    C:"CHAR16"                                      << TypeName = C->getText();>>\r
-  )\r
+  ("UINT16" | "CHAR16")\r
   N:StringIdentifier\r
   {\r
     OpenBracket I:Number CloseBracket               << ArrayNum = _STOU32(I->getText()); >>\r
   }\r
-  ";"                                               << _PCATCH(gCVfrVarDataTypeDB.DataTypeAddField (N->getText(), TypeName, ArrayNum), N); >>\r
+  ";"                                               << _PCATCH(gCVfrVarDataTypeDB.DataTypeAddField (N->getText(), (CHAR8 *) "UINT16", ArrayNum), N); >>\r
   ;\r
 \r
 dataStructField8 :\r
@@ -595,7 +590,7 @@ vfrStatementVarStoreLinear :
       TN:StringIdentifier ","                       << TypeName = TN->getText(); LineNum = TN->getLine(); >>\r
     | U8:"UINT8" ","                                << TypeName = U8->getText(); LineNum = U8->getLine(); >>\r
     | U16:"UINT16" ","                              << TypeName = U16->getText(); LineNum = U16->getLine(); >>\r
-    | C16:"CHAR16" ","                              << TypeName = C16->getText(); LineNum = C16->getLine(); >>\r
+    | C16:"CHAR16" ","                              << TypeName = (CHAR8 *) "UINT16"; LineNum = C16->getLine(); >>\r
     | U32:"UINT32" ","                              << TypeName = U32->getText(); LineNum = U32->getLine(); >>\r
     | U64:"UINT64" ","                              << TypeName = U64->getText(); LineNum = U64->getLine(); >>\r
     | D:"EFI_HII_DATE" ","                          << TypeName = D->getText(); LineNum = D->getLine(); >>\r