Class TSymbol

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TSymbol = class(TObject)

Description

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.

Hierarchy

Overview

Methods

Public procedure InsertNext(NewNext: TSymbol);
Public function GraphLabel(LongNonTerminalNames: boolean): string; virtual; abstract;
Public function Name: string; virtual; abstract;
Public function IsFirst: boolean;
Public function IsLast: boolean;
Public function CreateCopyContents: TSymbol; virtual; abstract;

Properties

Public property Next: TSymbol read FNext write FNext;
Public property Previous: TSymbol read FPrevious write FPrevious;

Description

Methods

Public 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.

Public function GraphLabel(LongNonTerminalNames: boolean): string; virtual; abstract;
 
Public function Name: string; virtual; abstract;
 
Public function IsFirst: boolean;
 
Public function IsLast: boolean;
 
Public 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.

Properties

Public property Next: TSymbol read FNext write FNext;
 
Public property Previous: TSymbol read FPrevious write FPrevious;
 

Generated by PasDoc 0.10.0 on 2006-07-12 06:44:38