EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index
Data Structures | Functions | Variables

Parser::DecParserMisc Namespace Reference

Data Structures

class  FileContent
 FileContent Class to hold DEC file information. More...
class  ParserHelper
 ParserHelper. More...

Functions

def StripRoot
 StripRoot.
def CleanString
 CleanString.
def IsValidHexByte
 IsValidHexByte.
def IsValidNList
 IsValidNList.
def IsValidCArray
 IsValidCArray.
def IsValidPcdDatum
 IsValidPcdDatum.

Variables

string TOOL_NAME = 'DecParser'
string VERSION_PATTERN = '[0-9]+(\.[0-9]+)?'
string CVAR_PATTERN = '[_a-zA-Z][a-zA-Z0-9_]*'
string PCD_TOKEN_PATTERN = '(0[xX]0*[a-fA-F0-9]{1,8})|([0-9]+)'
string MACRO_PATTERN = '[A-Z][_A-Z0-9]*'

Function Documentation

def Parser::DecParserMisc::CleanString (   Line,
  CommentCharacter = TAB_COMMENT_SPLIT,
  AllowCppStyleComment = False 
)

CleanString.

Split comments in a string Remove spaces

Parameters:
Line,:The string to be cleaned
CommentCharacter,:Comment char, used to ignore comment content, default is DataType.TAB_COMMENT_SPLIT

Definition at line 109 of file DecParserMisc.py.

def Parser::DecParserMisc::IsValidCArray (   Array)

IsValidCArray.

check Array is valid

Parameters:
Array,:The input Array

Definition at line 182 of file DecParserMisc.py.

def Parser::DecParserMisc::IsValidHexByte (   Token)

IsValidHexByte.

Check if Token is HexByte: <HexByte> ::= 0x <HexDigit>{1,2}

Parameters:
Token,:Token to be checked

Definition at line 143 of file DecParserMisc.py.

def Parser::DecParserMisc::IsValidNList (   Value)

IsValidNList.

Check if Value has the format of <HexByte> ["," <HexByte>]{0,} <HexByte> ::= "0x" <HexDigit>{1,2}

Parameters:
Value,:Value to be checked

Definition at line 160 of file DecParserMisc.py.

def Parser::DecParserMisc::IsValidPcdDatum (   Type,
  Value 
)

IsValidPcdDatum.

check PcdDatum is valid

Parameters:
Type,:The pcd Type
Value,:The pcd Value

Definition at line 215 of file DecParserMisc.py.

def Parser::DecParserMisc::StripRoot (   Root,
  Path 
)

StripRoot.

Strip root path

Parameters:
Root,:Root must be absolute path
Path,:Path to be stripped

Definition at line 87 of file DecParserMisc.py.


Variable Documentation

string CVAR_PATTERN = '[_a-zA-Z][a-zA-Z0-9_]*'

Definition at line 34 of file DecParserMisc.py.

string MACRO_PATTERN = '[A-Z][_A-Z0-9]*'

Definition at line 36 of file DecParserMisc.py.

string PCD_TOKEN_PATTERN = '(0[xX]0*[a-fA-F0-9]{1,8})|([0-9]+)'

Definition at line 35 of file DecParserMisc.py.

string TOOL_NAME = 'DecParser'

Definition at line 32 of file DecParserMisc.py.

string VERSION_PATTERN = '[0-9]+(\.[0-9]+)?'

Definition at line 33 of file DecParserMisc.py.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines