BaseTools: Enable Match2 Opcode.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hp.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17338 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Eric Dong
2015-05-06 10:38:04 +00:00
committed by ydong10
parent 1f9837b41e
commit 5d37761661
4 changed files with 39 additions and 1 deletions

View File

@@ -3401,6 +3401,7 @@ vfrStatementInvalidSaveRestoreDefaults :
#token ToUpper("toupper") "toupper"
#token ToLower("tolower") "tolower"
#token Match("match") "match"
#token Match2("match2") "match2"
#token Catenate("catenate") "catenate"
#token QuestionRefVal("questionrefval") "questionrefval"
#token StringRefVal("stringrefval") "stringrefval"
@@ -3569,6 +3570,7 @@ castTerm [UINT32 & RootLevel, UINT32 & ExpOpCount]:
atomTerm [UINT32 & RootLevel, UINT32 & ExpOpCount]:
vfrExpressionCatenate[$RootLevel, $ExpOpCount]
| vfrExpressionMatch[$RootLevel, $ExpOpCount]
| vfrExpressionMatch2[$RootLevel, $ExpOpCount]
| vfrExpressionParen[$RootLevel, $ExpOpCount]
| vfrExpressionBuildInFunction[$RootLevel, $ExpOpCount]
| vfrExpressionConstant[$RootLevel, $ExpOpCount]
@@ -3599,6 +3601,20 @@ vfrExpressionMatch [UINT32 & RootLevel, UINT32 & ExpOpCount]:
"\)" << { CIfrMatch MObj(L->getLine()); $ExpOpCount++; } >>
;
vfrExpressionMatch2 [UINT32 & RootLevel, UINT32 & ExpOpCount]:
<<
EFI_GUID Guid;
>>
L:Match2
"\("
vfrStatementExpressionSub[$RootLevel + 1, $ExpOpCount]
","
vfrStatementExpressionSub[$RootLevel + 1, $ExpOpCount]
","
guidDefinition[Guid]
"\)" << { CIfrMatch2 M2Obj(L->getLine(), &Guid); $ExpOpCount++; } >>
;
vfrExpressionParen [UINT32 & RootLevel, UINT32 & ExpOpCount]:
"\("
vfrStatementExpressionSub[$RootLevel + 1, $ExpOpCount]