Initial check in lib
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
unit dpglib.GrammarSymbol;
|
||||
|
||||
interface
|
||||
uses
|
||||
dpglib.types;
|
||||
|
||||
type
|
||||
TGrammarSymbol = class( TInterfacedObject, IGrammarSymbol)
|
||||
protected
|
||||
fID: AnsiString;
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// IdpgGrammar methods
|
||||
// ----------------------------------------------------------------------
|
||||
protected
|
||||
function GetID: AnsiString;
|
||||
procedure SetID( pID: AnsiString);
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Construction/destruction
|
||||
// ----------------------------------------------------------------------
|
||||
public
|
||||
constructor Create; overload;
|
||||
constructor Create( ID: AnsiString); overload;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
// @@@: Construction/destruction ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
//
|
||||
// Construction/destruction
|
||||
//
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// ================================================================================================
|
||||
// Constructor
|
||||
// ================================================================================================
|
||||
constructor TGrammarSymbol.Create;
|
||||
begin
|
||||
fID := '';
|
||||
end;
|
||||
|
||||
// ================================================================================================
|
||||
// Constructor
|
||||
// ================================================================================================
|
||||
constructor TGrammarSymbol.Create(ID: AnsiString);
|
||||
begin
|
||||
fID := ID;
|
||||
end;
|
||||
|
||||
// @@@: IdpgGrammarSymbol implementation ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
//
|
||||
// IdpgGrammarSymbol implementation
|
||||
//
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// ================================================================================================
|
||||
// Get ID
|
||||
// ================================================================================================
|
||||
function TGrammarSymbol.GetID: AnsiString;
|
||||
begin
|
||||
result := fID;
|
||||
end;
|
||||
|
||||
// ================================================================================================
|
||||
// Set ID
|
||||
// ================================================================================================
|
||||
procedure TGrammarSymbol.SetID(pID: AnsiString);
|
||||
begin
|
||||
fID := pID;
|
||||
end;
|
||||
|
||||
end.
|
||||
Reference in New Issue
Block a user