from collections import defaultdict\r
from .MetaFileTable import MetaFileStorage\r
from .MetaFileCommentParser import CheckInfComment\r
+from Common.DataType import TAB_COMMENT_EDK_START, TAB_COMMENT_EDK_END\r
\r
## RegEx for finding file versions\r
hexVersionPattern = re.compile(r'0[xX][\da-f-A-F]{5,8}')\r
## A decorator used to parse macro definition\r
def ParseMacro(Parser):\r
def MacroParser(self):\r
- Match = gMacroDefPattern.match(self._CurrentLine)\r
+ Match = GlobalData.gMacroDefPattern.match(self._CurrentLine)\r
if not Match:\r
# Not 'DEFINE/EDK_GLOBAL' statement, call decorated method\r
Parser(self)\r
EdkLogger.error('Parser', FORMAT_INVALID, "%s can only be defined via environment variable" % Name,\r
ExtraData=self._CurrentLine, File=self.MetaFile, Line=self._LineIndex + 1)\r
# Only upper case letters, digit and '_' are allowed\r
- if not gMacroNamePattern.match(Name):\r
+ if not GlobalData.gMacroNamePattern.match(Name):\r
EdkLogger.error('Parser', FORMAT_INVALID, "The macro name must be in the pattern [A-Z][A-Z0-9_]*",\r
ExtraData=self._CurrentLine, File=self.MetaFile, Line=self._LineIndex + 1)\r
\r
SectionComments.extend(Comments)\r
Comments = []\r
continue\r
- if Line.find(DataType.TAB_COMMENT_EDK_START) > -1:\r
+ if Line.find(TAB_COMMENT_EDK_START) > -1:\r
IsFindBlockComment = True\r
continue\r
- if Line.find(DataType.TAB_COMMENT_EDK_END) > -1:\r
+ if Line.find(TAB_COMMENT_EDK_END) > -1:\r
IsFindBlockComment = False\r
continue\r
if IsFindBlockComment:\r