67 lines
6.2 KiB
ObjectPascal
67 lines
6.2 KiB
ObjectPascal
unit PaxCompilerDLL;
|
|
|
|
interface
|
|
|
|
const
|
|
{$IFDEF WIN32}
|
|
DLL = 'PaxCompilerLib.dll';
|
|
{$ENDIF}
|
|
{$IFDEF LINUX}
|
|
DLL = 'libPaxCompiler.so';
|
|
{$ENDIF}
|
|
{$IFDEF DARWIN}
|
|
DLL = 'libPaxCompiler.dylib';
|
|
{$ENDIF}
|
|
|
|
/////////////////////// PaxCompiler ////////////////////////////////////////////
|
|
function PaxCompiler_Create: Integer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
procedure PaxCompiler_Destroy(HCompiler: Integer); {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
procedure PaxCompiler_Reset(HCompiler: Integer); {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
procedure PaxCompiler_AddModule(HCompiler: Integer; Name, LanguageName: PChar); {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
procedure PaxCompiler_AddCode(HCompiler: Integer; ModuleName, Text: PChar); {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
procedure PaxCompiler_AddCodeFromFile(HCompiler: Integer; ModuleName, FileName: PChar); {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
procedure PaxCompiler_RegisterLanguage(HCompiler, HLanguage: Integer); {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxCompiler_RegisterNamespace(HCompiler, LevelId: Integer; NamespaceName: PChar): Integer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxCompiler_RegisterRecordType(HCompiler, LevelId: Integer; TypeName: PChar): Integer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxCompiler_RegisterRecordTypeField(HCompiler, RecordTypeId: Integer; FieldName: PChar; FieldTypeID: Integer): Integer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxCompiler_RegisterSubrangeType(HCompiler, LevelId: Integer; TypeName: PChar; TypeBaseId: Integer; B1, B2: Integer): Integer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxCompiler_RegisterArrayType(HCompiler, LevelId: Integer; TypeName: PChar; RangeTypeId, ElemTypeId: Integer): Integer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxCompiler_RegisterPointerType(HCompiler, LevelId: Integer; TypeName: PChar; OriginTypeId: Integer): Integer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxCompiler_RegisterSetType(HCompiler, LevelId: Integer; TypeName: PChar; OriginTypeId: Integer): Integer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxCompiler_RegisterProceduralType(HCompiler, LevelId: Integer; TypeName: PChar; SubId: Integer): Integer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxCompiler_RegisterVariable(HCompiler, LevelId: Integer; Name: PChar; TypeId: Integer): Integer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxCompiler_RegisterRoutine(HCompiler, LevelId: Integer; Name: PChar; ResultTypeID: Integer): Integer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxCompiler_RegisterRoutineEx(HCompiler, LevelId: Integer; Name: PChar; ResultTypeID: Integer; CallConvention: Integer): Integer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxCompiler_RegisterParameter(HCompiler, HSub: Integer; ParamTypeID: Integer; ByRef: Boolean): Integer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxCompiler_RegisterClassType(HCompiler, LevelId: Integer; C: TClass): Integer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxCompiler_RegisterHeader(HCompiler, LevelId: Integer; const Header: PChar; Address: Pointer{$IFDEF WIN32} = nil{$ENDIF}): Integer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxCompiler_GetHandle(HCompiler, LevelId: Integer; Name: PChar; Upcase: Boolean): Integer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxCompiler_Compile(HCompiler, HProgram: Integer): boolean; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxCompiler_GetErrorCount(HCompiler: Integer): Integer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxCompiler_GetErrorMessage(HCompiler, I: Integer): PChar; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxCompiler_GetErrorModuleName(HCompiler, I: Integer): PChar; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxCompiler_GetErrorLine(HCompiler, I: Integer): PChar; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxCompiler_GetErrorLineNumber(HCompiler, I: Integer): Integer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
|
|
/////////////////////// PaxProgram /////////////////////////////////////////////
|
|
function PaxProgram_Create: Integer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
procedure PaxProgram_Destroy(HProgram: Integer); {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
procedure PaxProgram_Run(HProgram: Integer); {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
procedure PaxProgram_SaveToFile(HProgram: Integer; Path: PChar); {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
procedure PaxProgram_LoadFromFile(HProgram: Integer; Path: PChar); {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxProgram_GetAddress(HProgram: Integer; Handle: Integer): Pointer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
procedure PaxProgram_SetAddress(HProgram, Handle: Integer; P: Pointer); {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
procedure PaxProgram_BeginCall(HProgram: Integer); {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
procedure PaxProgram_EndCall(HProgram: Integer); {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxProgram_GetDataPtr(HProgram: Integer): Pointer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
function PaxProgram_GetCodePtr(HProgram: Integer): Pointer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
|
|
/////////////////////// PaxPascalLanguage //////////////////////////////////////
|
|
function PaxPascalLanguage_Create: Integer; {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
procedure PaxPascalLanguage_Destroy(HPaxPascalLanguage: Integer); {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
procedure PaxPascalLanguage_SetCallConv(HPaxPascalLanguage: Integer; cc: Integer); {$IFDEF WIN32}stdcall;{$ELSE}cdecl;{$ENDIF} external DLL;
|
|
|
|
implementation
|
|
|
|
end.
|