Units
Classes, Interfaces, Objects
Types
Variables
Constants
Functions, Procedures
Identifiers

Class TIFPSPascalCompiler

Unit

ifpscomp

Declaration

type TIFPSPascalCompiler = class

Fields

NameDescription
FAllowNoBegin  
FAllowNoEnd  
FAllowUnit  
FAutoFreeList  
FAvailableTypes  
FConstants  
FContinueOffsets  
FDebugOutput  
FID  
FIsUnit  
FMessages  
FOnExportCheck  
FOnExternalProc  
FOnUses  
FOnUseVariable  
FOnWriteLine  
FOutput  
FParser  
FProcs  
FRegProcs  
FUsedTypes  
FVars  

Methods

Overview

Public constructor Create;
Public destructor Destroy; override;
Public function AddConstant(const Name: string; FType: Cardinal): PIFPSConstant;
Public function AddConstantN(const Name, FType: string): PIFPSConstant;
Public function AddFunction(const Header: string): PIFPSRegProc;
Public procedure AddToFreeList(Obj: TObject);
Public function AddType(const Name: string; const BaseType: TIFPSBaseType): PIFPSType;
Public function AddTypeCopy(const Name: string; TypeNo: Cardinal): PIFPSType;
Public function AddTypeCopyN(const Name, FType: string): PIFPSType;
Public function AddTypeS(const Name, Decl: string): PIFPSType;
Protected function AddUsedFunction(var Proc: PIFPSProcedure): Cardinal;
Protected function AddUsedFunction2(var Proc: PIFPSUsedRegProc): Cardinal;
Public function AddUsedVariable(const Name: string; FType: Cardinal): PIFPSVar;
Public function AddUsedVariableN(const Name, FType: string): PIFPSVar;
Public function AddVariable(const Name: string; FType: Cardinal): PIFPSVar;
Public function AddVariableN(const Name, FType: string): PIFPSVar;
Protected function AT2UT(L: Cardinal): Cardinal;
Public procedure Clear;
Public function Compile(const s: string): Boolean;
Protected procedure Debug_SavePosition(ProcNo: Cardinal; Proc: PIFPSProcedure);
Protected procedure Debug_WriteParams(ProcNo: Cardinal; Proc: PIFPSProcedure);
Protected procedure DefineStandardTypes;
Protected function DoTypeBlock(FParser: TIfPascalParser): Boolean;
Protected function DoVarBlock(proc: PIFPSProcedure): Boolean;
Public function FindType(const Name: string): Cardinal;
Protected function GetAvailableType(No: Cardinal): PIFPSType;
Protected function GetAvailableTypeCount: Cardinal;
Protected function GetBooleanType(FOnlyAvailTypes: Boolean): Cardinal;
Public function GetDebugOutput(var s: string): Boolean;
Protected function GetInt(FUseTypes: TIFList; Src: PIfVariant; var s: Boolean): Longint;
Protected function GetMsg(l: Longint): PIFPSPascalCompilerMessage;
Protected function GetMsgCount: Longint;
Public function GetOutput(var s: string): Boolean;
Protected function GetProc(No: Cardinal): PIFPSProcedure;
Protected function GetProcCount: Cardinal;
Protected function GetReal(FUseTypes: TIFList; Src: PIfVariant; var s: Boolean): Extended;
Protected function GetString(FUseTypes: TIFList; Src: PIfVariant; var s: Boolean): string;
Protected function GetTypeCopyLink(p: PIFPSType): PIFPSType;
Protected function GetUInt(FUseTypes: TIFList; Src: PIfVariant; var s: Boolean): Cardinal;
Protected function GetUsedType(No: Cardinal): PIFPSType;
Protected function GetUsedTypeCount: Cardinal;
Protected function GetVariable(No: Cardinal): PIFPSVar;
Protected function GetVariableCount: Cardinal;
Protected function IsDuplicate(const s: string): Boolean;
Protected function MakeDecl(decl: string): string;
Public function MakeError(const Module: string; E: TIFPSPascalCompilerError; const Param: string): PIFPSPascalCompilerMessage;
Public function MakeHint(const Module: string; E: TIFPSPascalCompilerHint; const Param: string): PIFPSPascalCompilerMessage;
Public function MakeWarning(const Module: string; E: TIFPSPascalCompilerWarning; const Param: string): PIFPSPascalCompilerMessage;
Protected function NewProc(const Name: string): PIFPSProcedure;
Protected function PreCalc(FUseTypes: TIFList; Var1Mod: Byte; var1: PIFVariant; Var2Mod: Byte; Var2: PIfVariant; Cmd: Byte; Pos: Cardinal): Boolean;
Protected function ProcessFunction: Boolean;
Protected function ProcessLabel(Proc: PIFPSProcedure): Boolean;
Protected function ProcessLabelForwards(Proc: PIFPSProcedure): Boolean;
Protected function ProcessSub(FType: TSubOptType; ProcNo: Cardinal; proc: PIFPSProcedure): Boolean;
Protected function ReadConstant(StopOn: TIfPasToken): PIfVariant;
Protected function ReadType(const Name: string; FParser: TIfPascalParser): Cardinal;
Protected procedure ReplaceTypes(var s: string);
Protected procedure UpdateRecordFields(r: Pointer);
Protected function UseAvailableType(No: Cardinal): Cardinal;
Protected procedure WriteDebugData(const s: string);

Description

constructor Create;

Create

destructor Destroy; override;

Destroy the current instance of the script compiler

function AddConstant(const Name: string; FType: Cardinal): PIFPSConstant;

Add a constant

function AddConstantN(const Name, FType: string): PIFPSConstant;

Add a constant

function AddFunction(const Header: string): PIFPSRegProc;

Add a function

procedure AddToFreeList(Obj: TObject);

Add an object to the auto-free list

function AddType(const Name: string; const BaseType: TIFPSBaseType): PIFPSType;

add a type

function AddTypeCopy(const Name: string; TypeNo: Cardinal): PIFPSType;

Add a type copy type

function AddTypeCopyN(const Name, FType: string): PIFPSType;

Add a type copy type

function AddTypeS(const Name, Decl: string): PIFPSType;

Add a type declared in a string

function AddUsedFunction(var Proc: PIFPSProcedure): Cardinal;

 

function AddUsedFunction2(var Proc: PIFPSUsedRegProc): Cardinal;

 

function AddUsedVariable(const Name: string; FType: Cardinal): PIFPSVar;

Add an used variable

function AddUsedVariableN(const Name, FType: string): PIFPSVar;

add an used variable (with named type)

function AddVariable(const Name: string; FType: Cardinal): PIFPSVar;

Add a variable

function AddVariableN(const Name, FType: string): PIFPSVar;

Add a variable

function AT2UT(L: Cardinal): Cardinal;

 

procedure Clear;

Clear the current data

function Compile(const s: string): Boolean;

Compile a script (s)

procedure Debug_SavePosition(ProcNo: Cardinal; Proc: PIFPSProcedure);

 

procedure Debug_WriteParams(ProcNo: Cardinal; Proc: PIFPSProcedure);

 

procedure DefineStandardTypes;

 

function DoTypeBlock(FParser: TIfPascalParser): Boolean;

 

function DoVarBlock(proc: PIFPSProcedure): Boolean;

 

function FindType(const Name: string): Cardinal;

Search for a type

function GetAvailableType(No: Cardinal): PIFPSType;

 

function GetAvailableTypeCount: Cardinal;

 

function GetBooleanType(FOnlyAvailTypes: Boolean): Cardinal;

 

function GetDebugOutput(var s: string): Boolean;

Return the debugger output

function GetInt(FUseTypes: TIFList; Src: PIfVariant; var s: Boolean): Longint;

 

function GetMsg(l: Longint): PIFPSPascalCompilerMessage;

 

function GetMsgCount: Longint;

 

function GetOutput(var s: string): Boolean;

Return the output

function GetProc(No: Cardinal): PIFPSProcedure;

 

function GetProcCount: Cardinal;

 

function GetReal(FUseTypes: TIFList; Src: PIfVariant; var s: Boolean): Extended;

 

function GetString(FUseTypes: TIFList; Src: PIfVariant; var s: Boolean): string;

 

function GetTypeCopyLink(p: PIFPSType): PIFPSType;

 

function GetUInt(FUseTypes: TIFList; Src: PIfVariant; var s: Boolean): Cardinal;

 

function GetUsedType(No: Cardinal): PIFPSType;

 

function GetUsedTypeCount: Cardinal;

 

function GetVariable(No: Cardinal): PIFPSVar;

 

function GetVariableCount: Cardinal;

 

function IsDuplicate(const s: string): Boolean;

 

function MakeDecl(decl: string): string;

 

function MakeError(const Module: string; E: TIFPSPascalCompilerError; const Param: string): PIFPSPascalCompilerMessage;

Add an error the messages

function MakeHint(const Module: string; E: TIFPSPascalCompilerHint; const Param: string): PIFPSPascalCompilerMessage;

Add a hint to the messages

function MakeWarning(const Module: string; E: TIFPSPascalCompilerWarning; const Param: string): PIFPSPascalCompilerMessage;

Add a warning to the messages

function NewProc(const Name: string): PIFPSProcedure;

 

function PreCalc(FUseTypes: TIFList; Var1Mod: Byte; var1: PIFVariant; Var2Mod: Byte; Var2: PIfVariant; Cmd: Byte; Pos: Cardinal): Boolean;

 

function ProcessFunction: Boolean;

 

function ProcessLabel(Proc: PIFPSProcedure): Boolean;

 

function ProcessLabelForwards(Proc: PIFPSProcedure): Boolean;

 

function ProcessSub(FType: TSubOptType; ProcNo: Cardinal; proc: PIFPSProcedure): Boolean;

 

function ReadConstant(StopOn: TIfPasToken): PIfVariant;

 

function ReadType(const Name: string; FParser: TIfPascalParser): Cardinal;

 

procedure ReplaceTypes(var s: string);

 

procedure UpdateRecordFields(r: Pointer);

 

function UseAvailableType(No: Cardinal): Cardinal;

 

procedure WriteDebugData(const s: string);

 

Properties

Overview

Public AllowNoBegin: Boolean;
Public AllowNoEnd: Boolean;
Public AllowUnit: Boolean;
Public ID: Pointer;
Public IsUnit: Boolean;
Public Msg[l: Longint]: PIFPSPascalCompilerMessage;
Public MsgCount: Longint;
Public OnExportCheck: TIFPSOnExportCheck;
Public OnExternalProc: TIFPSOnExternalProc;
Public OnUses: TIFPSOnUses;
Public OnUseVariable: TIFPSOnUseVariable;
Public OnWriteLine: TIFPSOnWriteLineEvent;

Description

AllowNoBegin: Boolean;

Allow no main begin/end

AllowNoEnd: Boolean;

Allow it to have no END on the script (only works when AllowNoBegin is true)

AllowUnit: Boolean;

Allow a unit instead of program

ID: Pointer;

Tag

IsUnit: Boolean;

contains true if the current file is a unit

Msg[l: Longint]: PIFPSPascalCompilerMessage;

The messages/warnings/errors

MsgCount: Longint;

contains the number of messages

OnExportCheck: TIFPSOnExportCheck;

OnExportCheck is called for each function to check if it needs to be exported and has the correct parameters

OnExternalProc: TIFPSOnExternalProc;

OnExternalProc is called when an external token is found after a procedure header

OnUses: TIFPSOnUses;

OnUses i scalled for each Uses and always first with 'SYSTEM' parameters

OnUseVariable: TIFPSOnUseVariable;

The OnUseVariant event is called when a variable is used by the script engine

OnWriteLine: TIFPSOnWriteLineEvent;

OnWriteLine is called after each line


Generated by rjPasDoc 0.7 on Wed 15 May 2002 19:21:35