summaryrefslogtreecommitdiff
path: root/BaseTools
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2015-08-27 08:19:40 +0000
committerdandanbi <dandanbi@Edk2>2015-08-27 08:19:40 +0000
commit2bf63b20d24947d59b8cc93c2b460c0a607fe4aa (patch)
tree630592cc8edacc83cf02ac02fe0b0ac10a74722a /BaseTools
parenta909257835f3c034008e923ab83f5966512235ff (diff)
downloadedk2-platforms-2bf63b20d24947d59b8cc93c2b460c0a607fe4aa.tar.xz
BaseTools:To generate string default type correctly in VfrCompiler
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18336 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrFormPkg.h1
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrSyntax.g6
2 files changed, 5 insertions, 2 deletions
diff --git a/BaseTools/Source/C/VfrCompile/VfrFormPkg.h b/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
index 84300a7584..644dfddad9 100644
--- a/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
+++ b/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
@@ -604,6 +604,7 @@ public:
static CIfrQuestionHeader *gCurrentQuestion = NULL;
static CIfrMinMaxStepData *gCurrentMinMaxData = NULL;
static BOOLEAN gIsOrderedList = FALSE;
+static BOOLEAN gIsStringOp = FALSE;
/*
* The definition of all of the UEFI IFR Objects
diff --git a/BaseTools/Source/C/VfrCompile/VfrSyntax.g b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
index fba8967fd2..ad839b2ab6 100644
--- a/BaseTools/Source/C/VfrCompile/VfrSyntax.g
+++ b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
@@ -1746,6 +1746,8 @@ vfrStatementDefault :
DObj->SetLineNo(D->getLine());
if (ArrayType) {
DObj->SetType (EFI_IFR_TYPE_BUFFER);
+ } else if (gIsStringOp) {
+ DObj->SetType (EFI_IFR_TYPE_STRING);
} else {
DObj->SetType (_GET_CURRQEST_DATATYPE());
}
@@ -2819,7 +2821,7 @@ vfrStatementString :
UINT8 StringMinSize;
UINT8 StringMaxSize;
>>
- L:String << SObj.SetLineNo(L->getLine()); >>
+ L:String << SObj.SetLineNo(L->getLine()); gIsStringOp = TRUE;>>
vfrQuestionHeader[SObj] ","
{ F:FLAGS "=" vfrStringFlagsField[SObj, F->getLine()] "," }
{
@@ -2847,7 +2849,7 @@ vfrStatementString :
SObj.SetMaxSize (StringMaxSize);
>>
vfrStatementQuestionOptionList
- E:EndString << CRT_END_OP (E); >>
+ E:EndString << CRT_END_OP (E); gIsStringOp = FALSE;>>
";"
;