Ejemplo n.º 1
0
 def _ParseItem(self):
     Line = self._RawData.CurrentLine
     TokenList = GetSplitValueList(Line, DT.TAB_EQUAL_SPLIT, 1)
     if TokenList[0] == DT.TAB_DEC_DEFINES_PKG_UNI_FILE:
         self.DefineValidation[TokenList[0]](TokenList[1])
     elif len(TokenList) < 2:
         self._LoggerError(ST.ERR_DECPARSE_DEFINE_FORMAT)
     elif TokenList[0] not in self.DefineValidation:
         self._LoggerError(ST.ERR_DECPARSE_DEFINE_UNKNOWKEY % TokenList[0])
     else:
         self.DefineValidation[TokenList[0]](TokenList[1])
     
     DefineItem = DecDefineItemObject()
     DefineItem.Key   = TokenList[0]
     DefineItem.Value = TokenList[1]
     self.ItemObject.AddItem(DefineItem, self._RawData.CurrentScope)
     return DefineItem
Ejemplo n.º 2
0
    def _ParseItem(self):
        Line = self._RawData.CurrentLine
        TokenList = GetSplitValueList(Line, DT.TAB_EQUAL_SPLIT, 1)
        if TokenList[0] == DT.TAB_DEC_DEFINES_PKG_UNI_FILE:
            self.DefineValidation[TokenList[0]](TokenList[1])
        elif len(TokenList) < 2:
            self._LoggerError(ST.ERR_DECPARSE_DEFINE_FORMAT)
        elif TokenList[0] not in self.DefineValidation:
            self._LoggerError(ST.ERR_DECPARSE_DEFINE_UNKNOWKEY % TokenList[0])
        else:
            self.DefineValidation[TokenList[0]](TokenList[1])

        DefineItem = DecDefineItemObject()
        DefineItem.Key   = TokenList[0]
        DefineItem.Value = TokenList[1]
        self.ItemObject.AddItem(DefineItem, self._RawData.CurrentScope)
        return DefineItem