Description | Hierarchy | Fields | Methods | Properties |
type TSymbol = class(TObject)
Terminal or non-terminal symbol of the grammar.
This is an item of double-linked list TProduction. Note that one TProduction instance may be used many times (by many TNonTerminal symbols), however each TSymbol
instance can be used in only one TProduction instance — so that Next and Previous fields have sense.
![]() |
procedure InsertNext(NewNext: TSymbol); |
![]() |
function GraphLabel(LongNonTerminalNames: boolean): string; virtual; abstract; |
![]() |
function Name: string; virtual; abstract; |
![]() |
function IsFirst: boolean; |
![]() |
function IsLast: boolean; |
![]() |
function CreateCopyContents: TSymbol; virtual; abstract; |
![]() |
property Next: TSymbol read FNext write FNext; |
![]() |
property Previous: TSymbol read FPrevious write FPrevious; |
![]() |
procedure InsertNext(NewNext: TSymbol); |
Insert NewNext as the next symbol after this symbol, within our parent production. IOW, Next becomes NewNext and all other previous/next links are set correctly too. |
![]() |
function GraphLabel(LongNonTerminalNames: boolean): string; virtual; abstract; |
![]() |
function Name: string; virtual; abstract; |
![]() |
function IsFirst: boolean; |
![]() |
function IsLast: boolean; |
![]() |
function CreateCopyContents: TSymbol; virtual; abstract; |
This creates new TSymbol instance with contents (Value of terminal, production of non-terminal) copied. But links (Next, Previous) are not copied — the intention is that you will want to insert new symbol to new production. |
![]() |
property Next: TSymbol read FNext write FNext; |
![]() |
property Previous: TSymbol read FPrevious write FPrevious; |