//***************************************************************************************** // Copyright (c) 2017 Sergey V. Natarov // All rights reserved, LGPL license // // // $FileName : TokensList.pkg // $ProjectName : TheHammer 3.0 // $Author : Sergey V. Natarov // $Created : 04-04-2017 // // Contents: // An array which contains all the available DataFlex tokens // // $Rev History // //***************************************************************************************** //TH-RevisionStart //TH-RevisionEnd Class cDataFilesArray is an Array Procedure Construct_Object Forward Send Construct_Object End_Procedure // Construct_Object Procedure Fill String sDDSrc sLine Send Delete_Data Get PrimaryDdSrcPath of ghoWorkSpaceHandlerEx to sDDSrc Direct_Input ("DIR:" - sDDSrc - '*.fd') While (not(SeqEof)) Readln sLine If (sLine<>"") Begin //Move (Uppercase(Trim(sLine))) to sLine Move (Left(sLine, Length(sLine)-3)) to sLine Set Value item (Item_Count(Self)) to sLine End Loop Close_Input End_Procedure Procedure End_Construct_Object Send Fill Forward Send End_Construct_Object End_Procedure End_Class // cCommandsArray Class cTokensArray is an Array Procedure Construct_Object Forward Send Construct_Object Property String psTokenType "Command" Property String psCommandsINI "tokens.ini" End_Procedure // Construct_Object Procedure Fill String sType sTokenType String sLine Get psTokenType to sTokenType Direct_Input (psCommandsINI(Self)) While (not(SeqEof)) Readln sLine Move (Trim(sLine)) to sLine If (sLine contains "//") Begin Move (Left(sLine, Pos("/", sLine)-1)) to sLine End If (not(Pos("=", sLine))) Move "" to sLine Else Begin Move (Left(sLine, Pos("=", sLine)-1)) to sType Move (Replace(sType+"=", sLine, "")) to sLine Move (Trim(sType)) to sType Move (Trim(sLine)) to sLine End If ((sLine<>"")and(sType=sTokenType)) Begin Set Value item (Item_Count(Self)) to sLine End Loop Close_Input End_Procedure Procedure End_Construct_Object Send Fill Forward Send End_Construct_Object End_Procedure End_Class // cCommandsArray Object oCommandsArray is a cTokensArray Set psTokenType to "Command" End_Object Object oTypesArray is a cTokensArray Set psTokenType to "Type" End_Object Object oAttrArray is a cTokensArray Set psTokenType to "Attribute" End_Object Object oDataFilesArray is a cDataFilesArray End_Object